=============================================================================== 40009040 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 40009040: c4 02 00 00 ld [ %o0 ], %g2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 40009044: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 switch( node->type ) { 40009048: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 4000904c: 84 00 bf ff add %g2, -1, %g2 40009050: 80 a0 a0 06 cmp %g2, 6 40009054: 18 80 00 15 bgu 400090a8 <== NEVER TAKEN 40009058: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4000905c: 85 28 a0 02 sll %g2, 2, %g2 40009060: 07 10 00 24 sethi %hi(0x40009000), %g3 40009064: 86 10 e0 24 or %g3, 0x24, %g3 ! 40009024 40009068: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 4000906c: 81 c0 80 00 jmp %g2 40009070: 01 00 00 00 nop case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 40009074: 10 80 00 0c b 400090a4 40009078: c2 00 60 0c ld [ %g1 + 0xc ], %g1 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4000907c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40009080: 10 80 00 09 b 400090a4 40009084: 82 10 62 d0 or %g1, 0x2d0, %g1 ! 40019ed0 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 40009088: 03 10 00 67 sethi %hi(0x40019c00), %g1 4000908c: 10 80 00 06 b 400090a4 40009090: 82 10 63 08 or %g1, 0x308, %g1 ! 40019f08 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 40009094: 10 80 00 04 b 400090a4 40009098: c2 00 60 08 ld [ %g1 + 8 ], %g1 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 4000909c: 03 10 00 67 sethi %hi(0x40019c00), %g1 400090a0: 82 10 61 fc or %g1, 0x1fc, %g1 ! 40019dfc 400090a4: c2 22 20 08 st %g1, [ %o0 + 8 ] break; } return 0; } 400090a8: 81 c3 e0 08 retl 400090ac: 90 10 20 00 clr %o0 =============================================================================== 4000c2a8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4000c2a8: 9d e3 bf 98 save %sp, -104, %sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000c2ac: 92 10 20 68 mov 0x68, %o1 4000c2b0: 7f ff f7 39 call 40009f94 4000c2b4: 90 10 20 01 mov 1, %o0 IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 4000c2b8: 92 10 00 19 mov %i1, %o1 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); if ( !node ) 4000c2bc: 80 a2 20 00 cmp %o0, 0 4000c2c0: 02 80 00 12 be 4000c308 <== NEVER TAKEN 4000c2c4: a0 10 00 08 mov %o0, %l0 return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4000c2c8: 82 10 20 01 mov 1, %g1 node->type = type; 4000c2cc: f0 22 20 4c st %i0, [ %o0 + 0x4c ] return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 4000c2d0: c2 32 20 34 sth %g1, [ %o0 + 0x34 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000c2d4: 94 10 20 20 mov 0x20, %o2 4000c2d8: 40 00 07 c3 call 4000e1e4 4000c2dc: 90 02 20 0c add %o0, 0xc, %o0 #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c2e0: 90 07 bf f8 add %fp, -8, %o0 strncpy( node->name, name, IMFS_NAME_MAX ); /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 4000c2e4: f4 24 20 30 st %i2, [ %l0 + 0x30 ] #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 4000c2e8: c0 34 20 3c clrh [ %l0 + 0x3c ] node->st_gid = 0; 4000c2ec: c0 34 20 3e clrh [ %l0 + 0x3e ] #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c2f0: 7f ff f7 d4 call 4000a240 4000c2f4: 92 10 20 00 clr %o1 node->stat_atime = (time_t) tv.tv_sec; 4000c2f8: c2 07 bf f8 ld [ %fp + -8 ], %g1 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4000c2fc: c2 24 20 48 st %g1, [ %l0 + 0x48 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000c300: c2 24 20 40 st %g1, [ %l0 + 0x40 ] node->stat_mtime = (time_t) tv.tv_sec; 4000c304: c2 24 20 44 st %g1, [ %l0 + 0x44 ] node->stat_ctime = (time_t) tv.tv_sec; return node; } 4000c308: 81 c7 e0 08 ret 4000c30c: 91 e8 00 10 restore %g0, %l0, %o0 =============================================================================== 4000e418 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4000e418: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 4000e41c: e0 06 00 00 ld [ %i0 ], %l0 #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 4000e420: 90 07 bf f8 add %fp, -8, %o0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4000e424: f2 34 20 3c sth %i1, [ %l0 + 0x3c ] jnode->st_gid = group; 4000e428: f4 34 20 3e sth %i2, [ %l0 + 0x3e ] IMFS_update_ctime( jnode ); 4000e42c: 7f ff d5 39 call 40003910 4000e430: 92 10 20 00 clr %o1 4000e434: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000e438: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 4000e43c: 81 c7 e0 08 ret 4000e440: 91 e8 20 00 restore %g0, 0, %o0 4000e444: 40 00 e5 68 call 400479e4 <__end+0x26224> <== NOT EXECUTED 4000e448: 40 00 e5 88 call 40047a68 <__end+0x262a8> <== NOT EXECUTED 4000e44c: 40 00 e5 80 call 40047a4c <__end+0x2628c> <== NOT EXECUTED 4000e450: 40 00 e5 80 call 40047a50 <__end+0x26290> <== NOT EXECUTED 4000e454: 40 00 e5 a8 call 40047af4 <__end+0x26334> <== NOT EXECUTED 4000e458: 40 00 e5 9c call 40047ac8 <__end+0x26308> <== NOT EXECUTED 4000e45c: 40 00 e5 c0 call 40047b5c <__end+0x2639c> <== NOT EXECUTED =============================================================================== 4000c350 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000c350: 9d e3 bf a0 save %sp, -96, %sp 4000c354: 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 ) 4000c358: 80 a6 20 00 cmp %i0, 0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000c35c: 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 ) 4000c360: 02 80 00 3e be 4000c458 <== NEVER TAKEN 4000c364: 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 ); 4000c368: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000c36c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 4001aaf8 4000c370: 90 10 00 19 mov %i1, %o0 4000c374: d4 00 60 2c ld [ %g1 + 0x2c ], %o2 4000c378: 7f ff ff cc call 4000c2a8 4000c37c: 94 2e c0 0a andn %i3, %o2, %o2 if ( !node ) 4000c380: b0 92 20 00 orcc %o0, 0, %i0 4000c384: 02 80 00 35 be 4000c458 <== NEVER TAKEN 4000c388: b2 06 7f ff add %i1, -1, %i1 return NULL; /* * Set the type specific information */ switch (type) { 4000c38c: 80 a6 60 06 cmp %i1, 6 4000c390: 38 80 00 20 bgu,a 4000c410 <== NEVER TAKEN 4000c394: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED 4000c398: b3 2e 60 02 sll %i1, 2, %i1 4000c39c: 03 10 00 30 sethi %hi(0x4000c000), %g1 4000c3a0: 82 10 62 8c or %g1, 0x28c, %g1 ! 4000c28c 4000c3a4: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4000c3a8: 81 c0 40 00 jmp %g1 4000c3ac: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c3b0: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 4000c3b4: 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); 4000c3b8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c3bc: 82 06 20 50 add %i0, 0x50, %g1 4000c3c0: 10 80 00 1b b 4000c42c 4000c3c4: 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; 4000c3c8: 10 80 00 05 b 4000c3dc 4000c3cc: 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; 4000c3d0: 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; 4000c3d4: c2 07 00 00 ld [ %i4 ], %g1 node->info.device.minor = info->device.minor; 4000c3d8: c4 26 20 54 st %g2, [ %i0 + 0x54 ] break; 4000c3dc: 10 80 00 14 b 4000c42c 4000c3e0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000c3e4: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED 4000c3e8: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000c3ec: c0 26 20 58 clr [ %i0 + 0x58 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000c3f0: c0 26 20 50 clr [ %i0 + 0x50 ] 4000c3f4: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.indirect = 0; 4000c3f8: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.file.doubly_indirect = 0; 4000c3fc: c0 26 20 5c clr [ %i0 + 0x5c ] node->info.file.triply_indirect = 0; break; 4000c400: 10 80 00 0b b 4000c42c 4000c404: c0 26 20 60 clr [ %i0 + 0x60 ] case IMFS_FIFO: node->info.fifo.pipe = NULL; break; 4000c408: 10 80 00 09 b 4000c42c 4000c40c: c0 26 20 50 clr [ %i0 + 0x50 ] default: assert(0); 4000c410: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000c414: 17 10 00 68 sethi %hi(0x4001a000), %o3 <== NOT EXECUTED 4000c418: 90 12 20 98 or %o0, 0x98, %o0 <== NOT EXECUTED 4000c41c: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 4000c420: 96 12 e0 e8 or %o3, 0xe8, %o3 <== NOT EXECUTED 4000c424: 7f ff d6 77 call 40001e00 <__assert_func> <== NOT EXECUTED 4000c428: 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; 4000c42c: 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; 4000c430: d0 04 00 00 ld [ %l0 ], %o0 fs_info = parent_loc->mt_entry->fs_info; 4000c434: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 node->Parent = parent; 4000c438: d0 26 20 08 st %o0, [ %i0 + 8 ] node->st_ino = ++fs_info->ino_count; 4000c43c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4000c440: 90 02 20 50 add %o0, 0x50, %o0 4000c444: 82 00 60 01 inc %g1 4000c448: c2 20 a0 04 st %g1, [ %g2 + 4 ] 4000c44c: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 4000c450: 7f ff e6 ad call 40005f04 <_Chain_Append> 4000c454: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4000c458: 81 c7 e0 08 ret 4000c45c: 81 e8 00 00 restore =============================================================================== 4000c310 : IMFS_jnode_t *IMFS_create_root_node(void) { 4000c310: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 4000c314: 90 10 20 01 mov 1, %o0 4000c318: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000c31c: 15 00 00 10 sethi %hi(0x4000), %o2 4000c320: 92 12 60 90 or %o1, 0x90, %o1 4000c324: 7f ff ff e1 call 4000c2a8 4000c328: 94 12 a1 ed or %o2, 0x1ed, %o2 if ( !node ) 4000c32c: 80 a2 20 00 cmp %o0, 0 4000c330: 02 80 00 06 be 4000c348 <== NEVER TAKEN 4000c334: 82 02 20 54 add %o0, 0x54, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000c338: c0 22 20 54 clr [ %o0 + 0x54 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c33c: c2 22 20 50 st %g1, [ %o0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c340: 82 02 20 50 add %o0, 0x50, %g1 4000c344: c2 22 20 58 st %g1, [ %o0 + 0x58 ] * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 4000c348: 81 c7 e0 08 ret 4000c34c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40004530 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004530: 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 ); 40004534: 80 a6 20 00 cmp %i0, 0 40004538: 12 80 00 0a bne 40004560 <== ALWAYS TAKEN 4000453c: 80 a6 60 00 cmp %i1, 0 40004540: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 40004544: 15 10 00 92 sethi %hi(0x40024800), %o2 <== NOT EXECUTED 40004548: 17 10 00 91 sethi %hi(0x40024400), %o3 <== NOT EXECUTED 4000454c: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 40004550: 94 12 a0 68 or %o2, 0x68, %o2 <== NOT EXECUTED 40004554: 96 12 e3 58 or %o3, 0x358, %o3 <== NOT EXECUTED 40004558: 10 80 00 0b b 40004584 <== NOT EXECUTED 4000455c: 92 10 20 84 mov 0x84, %o1 <== NOT EXECUTED assert( level >= 0 ); 40004560: 36 80 00 0b bge,a 4000458c <== ALWAYS TAKEN 40004564: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40004568: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 4000456c: 15 10 00 92 sethi %hi(0x40024800), %o2 <== NOT EXECUTED 40004570: 17 10 00 91 sethi %hi(0x40024400), %o3 <== NOT EXECUTED 40004574: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 40004578: 94 12 a0 68 or %o2, 0x68, %o2 <== NOT EXECUTED 4000457c: 96 12 e3 68 or %o3, 0x368, %o3 <== NOT EXECUTED 40004580: 92 10 20 86 mov 0x86, %o1 <== NOT EXECUTED 40004584: 40 00 02 26 call 40004e1c <__assert_func> <== NOT EXECUTED 40004588: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 4000458c: 80 a0 60 01 cmp %g1, 1 40004590: 02 80 00 0a be 400045b8 <== ALWAYS TAKEN 40004594: 29 10 00 98 sethi %hi(0x40026000), %l4 40004598: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 4000459c: 15 10 00 92 sethi %hi(0x40024800), %o2 <== NOT EXECUTED 400045a0: 17 10 00 91 sethi %hi(0x40024400), %o3 <== NOT EXECUTED 400045a4: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 400045a8: 94 12 a0 68 or %o2, 0x68, %o2 <== NOT EXECUTED 400045ac: 96 12 e3 78 or %o3, 0x378, %o3 <== NOT EXECUTED 400045b0: 10 bf ff f5 b 40004584 <== NOT EXECUTED 400045b4: 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, "...." ); 400045b8: 27 10 00 91 sethi %hi(0x40024400), %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400045bc: aa 06 20 54 add %i0, 0x54, %l5 400045c0: a8 15 23 f8 or %l4, 0x3f8, %l4 400045c4: a6 14 e3 a0 or %l3, 0x3a0, %l3 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 400045c8: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 400045cc: 10 80 00 14 b 4000461c 400045d0: 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, "...." ); 400045d4: c2 05 00 00 ld [ %l4 ], %g1 400045d8: 90 10 00 13 mov %l3, %o0 400045dc: d2 00 60 08 ld [ %g1 + 8 ], %o1 400045e0: 40 00 3a d1 call 40013124 400045e4: 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++ ) 400045e8: 80 a4 40 19 cmp %l1, %i1 400045ec: 24 bf ff fb ble,a 400045d8 400045f0: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 400045f4: 7f ff ff 71 call 400043b8 400045f8: 90 10 00 10 mov %l0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 400045fc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40004600: 80 a0 60 01 cmp %g1, 1 40004604: 32 80 00 06 bne,a 4000461c 40004608: e0 04 00 00 ld [ %l0 ], %l0 IMFS_dump_directory( the_jnode, level + 1 ); 4000460c: 90 10 00 10 mov %l0, %o0 40004610: 7f ff ff c8 call 40004530 40004614: 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 ) { 40004618: 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; 4000461c: 80 a4 00 15 cmp %l0, %l5 40004620: 12 bf ff ed bne 400045d4 40004624: 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 ); } } 40004628: 81 c7 e0 08 ret 4000462c: 81 e8 00 00 restore =============================================================================== 40009220 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009220: 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 ) 40009224: 2b 10 00 6a sethi %hi(0x4001a800), %l5 const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009228: 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 ) 4000922c: aa 15 62 f8 or %l5, 0x2f8, %l5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009230: e2 06 c0 00 ld [ %i3 ], %l1 40009234: ae 10 20 01 mov 1, %l7 40009238: 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 ); 4000923c: 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) ) { 40009240: 10 80 00 6c b 400093f0 40009244: a8 07 bf fc add %fp, -4, %l4 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 40009248: 90 04 00 12 add %l0, %l2, %o0 4000924c: 92 10 00 19 mov %i1, %o1 40009250: 94 10 00 13 mov %l3, %o2 40009254: 40 00 02 40 call 40009b54 40009258: 96 10 00 14 mov %l4, %o3 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4000925c: 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 ); 40009260: ae 10 00 08 mov %o0, %l7 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 40009264: 80 a0 60 00 cmp %g1, 0 40009268: 02 80 00 5a be 400093d0 <== NEVER TAKEN 4000926c: ec 07 bf fc ld [ %fp + -4 ], %l6 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 40009270: 80 a2 20 00 cmp %o0, 0 40009274: 02 80 00 0a be 4000929c 40009278: b2 26 40 16 sub %i1, %l6, %i1 if ( node->type == IMFS_DIRECTORY ) 4000927c: c4 04 60 4c ld [ %l1 + 0x4c ], %g2 40009280: 80 a0 a0 01 cmp %g2, 1 40009284: 12 80 00 06 bne 4000929c 40009288: 01 00 00 00 nop /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4000928c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 40009290: 80 88 a0 40 btst 0x40, %g2 40009294: 02 80 00 84 be 400094a4 40009298: 01 00 00 00 nop while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; i += len; 4000929c: a4 04 80 16 add %l2, %l6, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 400092a0: 80 a5 e0 03 cmp %l7, 3 400092a4: 02 80 00 27 be 40009340 400092a8: a2 10 00 01 mov %g1, %l1 400092ac: 80 a5 e0 04 cmp %l7, 4 400092b0: 02 80 00 4c be 400093e0 400092b4: 80 a5 e0 02 cmp %l7, 2 400092b8: 12 80 00 4f bne 400093f4 400092bc: 80 a5 e0 04 cmp %l7, 4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 400092c0: c4 05 40 00 ld [ %l5 ], %g2 400092c4: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 400092c8: 80 a0 40 02 cmp %g1, %g2 400092cc: 02 bf ff e0 be 4000924c 400092d0: 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) { 400092d4: d2 06 e0 10 ld [ %i3 + 0x10 ], %o1 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 400092d8: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 400092dc: 80 a0 40 02 cmp %g1, %g2 400092e0: 32 80 00 11 bne,a 40009324 400092e4: e2 00 60 08 ld [ %g1 + 8 ], %l1 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 400092e8: 92 02 60 08 add %o1, 8, %o1 400092ec: a2 07 bf e8 add %fp, -24, %l1 400092f0: 94 10 20 14 mov 0x14, %o2 400092f4: 40 00 12 0b call 4000db20 400092f8: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 400092fc: 92 10 00 11 mov %l1, %o1 40009300: 90 10 00 1b mov %i3, %o0 40009304: 40 00 12 07 call 4000db20 40009308: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4000930c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 40009310: a4 24 80 16 sub %l2, %l6, %l2 40009314: 92 05 80 19 add %l6, %i1, %o1 40009318: c2 00 40 00 ld [ %g1 ], %g1 4000931c: 10 80 00 51 b 40009460 40009320: 90 04 00 12 add %l0, %l2, %o0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 40009324: 80 a4 60 00 cmp %l1, 0 40009328: 32 bf ff c8 bne,a 40009248 4000932c: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009330: 40 00 0f c0 call 4000d230 <__errno> 40009334: 01 00 00 00 nop 40009338: 10 80 00 5f b 400094b4 4000933c: ee 22 00 00 st %l7, [ %o0 ] case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 40009340: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 40009344: 80 a0 60 03 cmp %g1, 3 40009348: 12 80 00 0a bne 40009370 4000934c: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 40009350: 90 10 00 1b mov %i3, %o0 40009354: 7f ff ff 5e call 400090cc 40009358: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000935c: e2 06 c0 00 ld [ %i3 ], %l1 if ( !node ) 40009360: 80 a4 60 00 cmp %l1, 0 40009364: 32 80 00 0c bne,a 40009394 <== ALWAYS TAKEN 40009368: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 4000936c: 30 80 00 0d b,a 400093a0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 40009370: 32 80 00 09 bne,a 40009394 40009374: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 40009378: 90 10 00 1b mov %i3, %o0 4000937c: 7f ff ff 6e call 40009134 40009380: 92 10 20 00 clr %o1 node = pathloc->node_access; if ( result == -1 ) 40009384: 80 a2 3f ff cmp %o0, -1 40009388: 02 80 00 44 be 40009498 <== NEVER TAKEN 4000938c: e2 06 c0 00 ld [ %i3 ], %l1 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009390: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 40009394: 80 a0 60 01 cmp %g1, 1 40009398: 22 80 00 06 be,a 400093b0 4000939c: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400093a0: 40 00 0f a4 call 4000d230 <__errno> 400093a4: 01 00 00 00 nop 400093a8: 10 80 00 42 b 400094b0 400093ac: 82 10 20 14 mov 0x14, %g1 ! 14 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 400093b0: 80 a2 60 00 cmp %o1, 0 400093b4: 12 80 00 1c bne 40009424 400093b8: 90 10 00 11 mov %l1, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 400093bc: 40 00 01 bb call 40009aa8 400093c0: 92 10 00 13 mov %l3, %o1 if ( !node ) 400093c4: a2 92 20 00 orcc %o0, 0, %l1 400093c8: 32 bf ff a0 bne,a 40009248 400093cc: e2 26 c0 00 st %l1, [ %i3 ] rtems_set_errno_and_return_minus_one( ENOENT ); 400093d0: 40 00 0f 98 call 4000d230 <__errno> 400093d4: 01 00 00 00 nop 400093d8: 10 80 00 36 b 400094b0 400093dc: 82 10 20 02 mov 2, %g1 ! 2 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 400093e0: 40 00 0f 94 call 4000d230 <__errno> 400093e4: 01 00 00 00 nop 400093e8: 10 80 00 32 b 400094b0 400093ec: 82 10 20 5b mov 0x5b, %g1 ! 5b /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 400093f0: 80 a5 e0 04 cmp %l7, 4 400093f4: 02 80 00 04 be 40009404 <== NEVER TAKEN 400093f8: 80 a5 e0 00 cmp %l7, 0 400093fc: 12 bf ff 94 bne 4000924c 40009400: 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 ) { 40009404: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 40009408: 80 a0 60 01 cmp %g1, 1 4000940c: 12 80 00 1a bne 40009474 40009410: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 40009414: d2 04 60 5c ld [ %l1 + 0x5c ], %o1 40009418: 80 a2 60 00 cmp %o1, 0 4000941c: 02 80 00 16 be 40009474 40009420: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 40009424: 92 02 60 1c add %o1, 0x1c, %o1 40009428: a2 07 bf e8 add %fp, -24, %l1 4000942c: 94 10 20 14 mov 0x14, %o2 40009430: 40 00 11 bc call 4000db20 40009434: 90 10 00 11 mov %l1, %o0 *pathloc = newloc; 40009438: 92 10 00 11 mov %l1, %o1 4000943c: 90 10 00 1b mov %i3, %o0 40009440: 40 00 11 b8 call 4000db20 40009444: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalpath_h)( &pathname[i-len], 40009448: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 4000944c: d0 07 bf fc ld [ %fp + -4 ], %o0 40009450: c2 00 40 00 ld [ %g1 ], %g1 40009454: 92 06 40 08 add %i1, %o0, %o1 40009458: 90 24 80 08 sub %l2, %o0, %o0 4000945c: 90 04 00 08 add %l0, %o0, %o0 40009460: 94 10 00 1a mov %i2, %o2 40009464: 9f c0 40 00 call %g1 40009468: 96 10 00 1b mov %i3, %o3 4000946c: 81 c7 e0 08 ret 40009470: 91 e8 00 08 restore %g0, %o0, %o0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 40009474: 7f ff fe f3 call 40009040 40009478: 90 10 00 1b mov %i3, %o0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 4000947c: c2 06 c0 00 ld [ %i3 ], %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009480: b5 2e a0 06 sll %i2, 6, %i2 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 40009484: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40009488: 82 0e 80 01 and %i2, %g1, %g1 4000948c: 80 a0 40 1a cmp %g1, %i2 40009490: 12 80 00 05 bne 400094a4 40009494: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009498: b0 10 00 08 mov %o0, %i0 4000949c: 81 c7 e0 08 ret 400094a0: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 400094a4: 40 00 0f 63 call 4000d230 <__errno> 400094a8: 01 00 00 00 nop 400094ac: 82 10 20 0d mov 0xd, %g1 ! d 400094b0: c2 22 00 00 st %g1, [ %o0 ] 400094b4: 10 bf ff f9 b 40009498 400094b8: 90 10 3f ff mov -1, %o0 =============================================================================== 40009578 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 40009578: 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; 4000957c: e0 06 40 00 ld [ %i1 ], %l0 /* * Get the path length. */ pathlen = strlen( path ); 40009580: 90 10 00 18 mov %i0, %o0 40009584: 40 00 12 e3 call 4000e110 40009588: 2b 10 00 6a sethi %hi(0x4001a800), %l5 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000958c: a2 10 00 18 mov %i0, %l1 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 40009590: 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 ); 40009594: a8 07 bf c0 add %fp, -64, %l4 40009598: ac 07 bf fc add %fp, -4, %l6 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4000959c: 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 ) 400095a0: aa 15 62 f8 or %l5, 0x2f8, %l5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 400095a4: 92 10 00 13 mov %l3, %o1 400095a8: 90 04 40 12 add %l1, %l2, %o0 400095ac: 94 10 00 14 mov %l4, %o2 400095b0: 40 00 01 69 call 40009b54 400095b4: 96 10 00 16 mov %l6, %o3 pathlen -= len; i += len; if ( !pathloc->node_access ) 400095b8: c2 06 40 00 ld [ %i1 ], %g1 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 400095bc: ee 07 bf fc ld [ %fp + -4 ], %l7 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 400095c0: ba 10 00 08 mov %o0, %i5 pathlen -= len; i += len; if ( !pathloc->node_access ) 400095c4: 80 a0 60 00 cmp %g1, 0 400095c8: 02 80 00 7f be 400097c4 <== NEVER TAKEN 400095cc: a6 24 c0 17 sub %l3, %l7, %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 400095d0: 80 a2 20 00 cmp %o0, 0 400095d4: 02 80 00 0a be 400095fc 400095d8: a4 04 80 17 add %l2, %l7, %l2 if ( node->type == IMFS_DIRECTORY ) 400095dc: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 400095e0: 80 a0 a0 01 cmp %g2, 1 400095e4: 12 80 00 06 bne 400095fc 400095e8: 01 00 00 00 nop /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400095ec: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 400095f0: 80 88 a0 40 btst 0x40, %g2 400095f4: 02 80 00 8e be 4000982c 400095f8: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 400095fc: 80 a7 60 02 cmp %i5, 2 40009600: 02 80 00 0f be 4000963c 40009604: a0 10 00 01 mov %g1, %l0 40009608: 80 a7 60 02 cmp %i5, 2 4000960c: 18 80 00 07 bgu 40009628 40009610: 80 a7 60 03 cmp %i5, 3 40009614: 80 a7 60 00 cmp %i5, 0 40009618: 02 80 00 58 be 40009778 4000961c: 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 ); 40009620: 10 bf ff e3 b 400095ac 40009624: 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 ) { 40009628: 02 80 00 23 be 400096b4 4000962c: 80 a7 60 04 cmp %i5, 4 40009630: 12 bf ff de bne 400095a8 <== NEVER TAKEN 40009634: 92 10 00 13 mov %l3, %o1 40009638: 30 80 00 54 b,a 40009788 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000963c: c4 05 40 00 ld [ %l5 ], %g2 40009640: c4 00 a0 18 ld [ %g2 + 0x18 ], %g2 40009644: 80 a0 40 02 cmp %g1, %g2 40009648: 02 bf ff d8 be 400095a8 4000964c: 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){ 40009650: d2 06 60 10 ld [ %i1 + 0x10 ], %o1 40009654: c4 02 60 1c ld [ %o1 + 0x1c ], %g2 40009658: 80 a0 40 02 cmp %g1, %g2 4000965c: 32 80 00 0f bne,a 40009698 40009660: e0 00 60 08 ld [ %g1 + 8 ], %l0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 40009664: 92 02 60 08 add %o1, 8, %o1 40009668: a0 07 bf e8 add %fp, -24, %l0 4000966c: 94 10 20 14 mov 0x14, %o2 40009670: 40 00 11 2c call 4000db20 40009674: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 40009678: 90 10 00 19 mov %i1, %o0 4000967c: 92 10 00 10 mov %l0, %o1 40009680: 40 00 11 28 call 4000db20 40009684: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009688: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4000968c: a4 24 80 17 sub %l2, %l7, %l2 40009690: 10 80 00 2d b 40009744 40009694: c2 00 60 04 ld [ %g1 + 4 ], %g1 } } else { if ( !node->Parent ) 40009698: 80 a4 20 00 cmp %l0, 0 4000969c: 32 bf ff c2 bne,a 400095a4 400096a0: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 400096a4: 40 00 0e e3 call 4000d230 <__errno> 400096a8: 01 00 00 00 nop 400096ac: 10 80 00 64 b 4000983c 400096b0: fa 22 00 00 st %i5, [ %o0 ] pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 400096b4: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 400096b8: 80 a0 60 03 cmp %g1, 3 400096bc: 02 80 00 04 be 400096cc 400096c0: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 400096c4: 32 80 00 09 bne,a 400096e8 400096c8: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 400096cc: 90 10 00 19 mov %i1, %o0 400096d0: 7f ff ff 7b call 400094bc 400096d4: 92 10 20 00 clr %o1 if ( result == -1 ) 400096d8: 80 a2 3f ff cmp %o0, -1 400096dc: 02 80 00 52 be 40009824 <== NEVER TAKEN 400096e0: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 400096e4: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 400096e8: 80 a2 20 00 cmp %o0, 0 400096ec: 02 80 00 45 be 40009800 <== NEVER TAKEN 400096f0: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 400096f4: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 400096f8: 80 a0 60 01 cmp %g1, 1 400096fc: 12 80 00 41 bne 40009800 40009700: 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 ) { 40009704: d2 02 20 5c ld [ %o0 + 0x5c ], %o1 40009708: 80 a2 60 00 cmp %o1, 0 4000970c: 02 80 00 14 be 4000975c 40009710: 92 02 60 1c add %o1, 0x1c, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 40009714: a0 07 bf e8 add %fp, -24, %l0 40009718: 94 10 20 14 mov 0x14, %o2 4000971c: 40 00 11 01 call 4000db20 40009720: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 40009724: 90 10 00 19 mov %i1, %o0 40009728: 92 10 00 10 mov %l0, %o1 4000972c: 40 00 10 fd call 4000db20 40009730: 94 10 20 14 mov 0x14, %o2 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009734: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40009738: c4 07 bf fc ld [ %fp + -4 ], %g2 4000973c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009740: a4 24 80 02 sub %l2, %g2, %l2 40009744: 90 04 40 12 add %l1, %l2, %o0 40009748: 92 10 00 19 mov %i1, %o1 4000974c: 9f c0 40 00 call %g1 40009750: 94 10 00 1a mov %i2, %o2 40009754: 81 c7 e0 08 ret 40009758: 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 ); 4000975c: 40 00 00 d3 call 40009aa8 40009760: 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 ) 40009764: a0 92 20 00 orcc %o0, 0, %l0 40009768: 02 80 00 0c be 40009798 4000976c: c4 07 bf fc ld [ %fp + -4 ], %g2 done = true; else pathloc->node_access = node; 40009770: 10 bf ff 8d b 400095a4 40009774: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 40009778: 40 00 0e ae call 4000d230 <__errno> 4000977c: 01 00 00 00 nop 40009780: 10 80 00 2e b 40009838 40009784: 82 10 20 11 mov 0x11, %g1 ! 11 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 40009788: 40 00 0e aa call 4000d230 <__errno> 4000978c: 01 00 00 00 nop 40009790: 10 80 00 2a b 40009838 40009794: 82 10 20 5b mov 0x5b, %g1 ! 5b case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 40009798: 82 04 40 12 add %l1, %l2, %g1 4000979c: a4 24 80 02 sub %l2, %g2, %l2 400097a0: 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++) { 400097a4: 10 80 00 0c b 400097d4 400097a8: e2 26 80 00 st %l1, [ %i2 ] if ( !IMFS_is_separator( path[ i ] ) ) 400097ac: 80 a0 a0 5c cmp %g2, 0x5c 400097b0: 22 80 00 0a be,a 400097d8 400097b4: c4 48 40 00 ldsb [ %g1 ], %g2 400097b8: 80 a0 a0 2f cmp %g2, 0x2f 400097bc: 22 80 00 07 be,a 400097d8 400097c0: c4 48 40 00 ldsb [ %g1 ], %g2 rtems_set_errno_and_return_minus_one( ENOENT ); 400097c4: 40 00 0e 9b call 4000d230 <__errno> 400097c8: 01 00 00 00 nop 400097cc: 10 80 00 1b b 40009838 400097d0: 82 10 20 02 mov 2, %g1 ! 2 /* * 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++) { 400097d4: c4 48 40 00 ldsb [ %g1 ], %g2 400097d8: 80 a0 a0 00 cmp %g2, 0 400097dc: 12 bf ff f4 bne 400097ac 400097e0: 82 00 60 01 inc %g1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 400097e4: 7f ff fe 17 call 40009040 400097e8: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; 400097ec: c2 06 40 00 ld [ %i1 ], %g1 if ( node->type != IMFS_DIRECTORY ) 400097f0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 400097f4: 80 a0 a0 01 cmp %g2, 1 400097f8: 22 80 00 06 be,a 40009810 <== ALWAYS TAKEN 400097fc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40009800: 40 00 0e 8c call 4000d230 <__errno> 40009804: 01 00 00 00 nop 40009808: 10 80 00 0c b 40009838 4000980c: 82 10 20 14 mov 0x14, %g1 ! 14 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 40009810: 82 08 60 c0 and %g1, 0xc0, %g1 40009814: 80 a0 60 c0 cmp %g1, 0xc0 40009818: 12 80 00 05 bne 4000982c 4000981c: 01 00 00 00 nop if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009820: b0 10 00 08 mov %o0, %i0 40009824: 81 c7 e0 08 ret 40009828: 81 e8 00 00 restore */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000982c: 40 00 0e 81 call 4000d230 <__errno> 40009830: 01 00 00 00 nop 40009834: 82 10 20 0d mov 0xd, %g1 ! d 40009838: c2 22 00 00 st %g1, [ %o0 ] 4000983c: 10 bf ff f9 b 40009820 40009840: 90 10 3f ff mov -1, %o0 =============================================================================== 400090cc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 400090cc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 400090d0: c2 06 00 00 ld [ %i0 ], %g1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 400090d4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 400090d8: 80 a0 a0 03 cmp %g2, 3 400090dc: 22 80 00 04 be,a 400090ec <== ALWAYS TAKEN 400090e0: c2 00 60 50 ld [ %g1 + 0x50 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 400090e4: 7f ff f2 c8 call 40005c04 <== NOT EXECUTED 400090e8: 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 ); 400090ec: 90 10 00 18 mov %i0, %o0 400090f0: 7f ff ff d4 call 40009040 400090f4: c2 26 00 00 st %g1, [ %i0 ] if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 400090f8: c2 06 00 00 ld [ %i0 ], %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400090fc: b3 2e 60 06 sll %i1, 6, %i1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 40009100: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40009104: 82 0e 40 01 and %i1, %g1, %g1 40009108: 80 a0 40 19 cmp %g1, %i1 4000910c: 12 80 00 04 bne 4000911c <== NEVER TAKEN 40009110: 01 00 00 00 nop if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009114: 81 c7 e0 08 ret 40009118: 91 e8 20 00 restore %g0, 0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000911c: 40 00 10 45 call 4000d230 <__errno> <== NOT EXECUTED 40009120: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009124: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009128: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000912c: 81 c7 e0 08 ret <== NOT EXECUTED 40009130: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400090b0 : /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400090b0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400090b4: 93 2a 60 06 sll %o1, 6, %o1 <== NOT EXECUTED 400090b8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 400090bc: 82 2a 40 01 andn %o1, %g1, %g1 <== NOT EXECUTED return 1; return 0; } 400090c0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400090c4: 81 c3 e0 08 retl <== NOT EXECUTED 400090c8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40009134 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009134: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = node->node_access; 40009138: e2 06 00 00 ld [ %i0 ], %l1 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000913c: a0 10 00 18 mov %i0, %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 40009140: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 40009144: 80 a0 60 04 cmp %g1, 4 40009148: 12 80 00 07 bne 40009164 <== NEVER TAKEN 4000914c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 40009150: c2 04 60 08 ld [ %l1 + 8 ], %g1 40009154: 80 a0 60 00 cmp %g1, 0 40009158: 32 80 00 05 bne,a 4000916c <== ALWAYS TAKEN 4000915c: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 40009160: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 40009164: 7f ff f2 a8 call 40005c04 <== NOT EXECUTED 40009168: 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( 4000916c: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 40009170: c2 48 40 00 ldsb [ %g1 ], %g1 40009174: 80 a0 60 5c cmp %g1, 0x5c 40009178: 22 80 00 09 be,a 4000919c <== NEVER TAKEN 4000917c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40009180: 80 a0 60 2f cmp %g1, 0x2f 40009184: 22 80 00 06 be,a 4000919c 40009188: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000918c: 80 a0 60 00 cmp %g1, 0 40009190: 12 80 00 09 bne 400091b4 <== ALWAYS TAKEN 40009194: 82 10 20 00 clr %g1 40009198: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000919c: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 ! 4001aaf8 400091a0: 90 10 00 10 mov %l0, %o0 400091a4: 92 02 60 18 add %o1, 0x18, %o1 400091a8: 40 00 12 5e call 4000db20 400091ac: 94 10 20 14 mov 0x14, %o2 400091b0: 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] ), 400091b4: e2 04 60 50 ld [ %l1 + 0x50 ], %l1 400091b8: a2 04 40 01 add %l1, %g1, %l1 400091bc: 40 00 13 d5 call 4000e110 400091c0: 90 10 00 11 mov %l1, %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 400091c4: 94 10 00 19 mov %i1, %o2 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 400091c8: 92 10 00 08 mov %o0, %o1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 400091cc: 96 10 00 10 mov %l0, %o3 400091d0: 40 00 00 14 call 40009220 400091d4: 90 10 00 11 mov %l1, %o0 400091d8: b0 10 00 08 mov %o0, %i0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 400091dc: 7f ff ff 99 call 40009040 400091e0: 90 10 00 10 mov %l0, %o0 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 400091e4: c2 04 00 00 ld [ %l0 ], %g1 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 400091e8: b3 2e 60 06 sll %i1, 6, %i1 if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } jnode = node->node_access; 400091ec: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 400091f0: 82 0e 40 01 and %i1, %g1, %g1 400091f4: 80 a0 40 19 cmp %g1, %i1 400091f8: 12 80 00 04 bne 40009208 <== NEVER TAKEN 400091fc: 01 00 00 00 nop if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 40009200: 81 c7 e0 08 ret 40009204: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 40009208: 40 00 10 0a call 4000d230 <__errno> <== NOT EXECUTED 4000920c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009210: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009214: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009218: 81 c7 e0 08 ret <== NOT EXECUTED 4000921c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400099ec : } int IMFS_fifo_close( rtems_libio_t *iop ) { 400099ec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 400099f0: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 400099f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 400099f8: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 400099fc: 40 00 08 f7 call 4000bdd8 <== NOT EXECUTED 40009a00: 90 04 20 50 add %l0, 0x50, %o0 <== NOT EXECUTED if (! err) { 40009a04: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40009a08: 12 80 00 12 bne 40009a50 <== NOT EXECUTED 40009a0c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 40009a10: 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) 40009a14: 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; 40009a18: 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) 40009a1c: 40 00 02 41 call 4000a320 <== NOT EXECUTED 40009a20: c2 24 60 18 st %g1, [ %l1 + 0x18 ] <== NOT EXECUTED 40009a24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40009a28: 12 80 00 10 bne 40009a68 <== NOT EXECUTED 40009a2c: 01 00 00 00 nop <== NOT EXECUTED 40009a30: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 40009a34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009a38: 12 80 00 0c bne 40009a68 <== NOT EXECUTED 40009a3c: 01 00 00 00 nop <== NOT EXECUTED free(jnode); 40009a40: 40 00 01 9b call 4000a0ac <== NOT EXECUTED 40009a44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40009a48: 81 c7 e0 08 ret <== NOT EXECUTED 40009a4c: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 40009a50: 16 80 00 06 bge 40009a68 <== NOT EXECUTED 40009a54: 01 00 00 00 nop <== NOT EXECUTED 40009a58: 40 00 0d f6 call 4000d230 <__errno> <== NOT EXECUTED 40009a5c: b0 20 00 18 neg %i0 <== NOT EXECUTED 40009a60: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 40009a64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 40009a68: 81 c7 e0 08 ret <== NOT EXECUTED 40009a6c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000989c : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000989c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int err; if (command == FIONBIO) { 400098a0: 03 20 01 19 sethi %hi(0x80046400), %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 400098a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED int err; if (command == FIONBIO) { 400098a8: 82 10 62 7e or %g1, 0x27e, %g1 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 400098ac: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED int err; if (command == FIONBIO) { 400098b0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 400098b4: 12 80 00 0f bne 400098f0 <== NOT EXECUTED 400098b8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (buffer == NULL) 400098bc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 400098c0: 02 80 00 12 be 40009908 <== NOT EXECUTED 400098c4: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 400098c8: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 400098cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400098d0: 02 80 00 04 be 400098e0 <== NOT EXECUTED 400098d4: c2 02 e0 18 ld [ %o3 + 0x18 ], %g1 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 400098d8: 10 80 00 03 b 400098e4 <== NOT EXECUTED 400098dc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 400098e0: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 400098e4: c2 22 e0 18 st %g1, [ %o3 + 0x18 ] <== NOT EXECUTED 400098e8: 81 c7 e0 08 ret <== NOT EXECUTED 400098ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 400098f0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 400098f4: 40 00 08 3d call 4000b9e8 <== NOT EXECUTED 400098f8: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 400098fc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40009900: 16 80 00 06 bge 40009918 <== NOT EXECUTED 40009904: 01 00 00 00 nop <== NOT EXECUTED 40009908: 40 00 0e 4a call 4000d230 <__errno> <== NOT EXECUTED 4000990c: b0 20 00 18 neg %i0 <== NOT EXECUTED 40009910: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 40009914: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 40009918: 81 c7 e0 08 ret <== NOT EXECUTED 4000991c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40009844 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 40009844: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 40009848: 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 ) { 4000984c: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 40009850: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 40009854: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED 40009858: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000985c: 40 00 08 46 call 4000b974 <== NOT EXECUTED 40009860: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009864: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED 40009868: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 4000986c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009870: 16 80 00 08 bge 40009890 <== NOT EXECUTED 40009874: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 40009878: 40 00 0e 6e call 4000d230 <__errno> <== NOT EXECUTED 4000987c: a0 20 00 10 neg %l0 <== NOT EXECUTED 40009880: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 40009884: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED 40009888: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 4000988c: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED } 40009890: b2 10 00 03 mov %g3, %i1 <== NOT EXECUTED 40009894: 81 c7 e0 08 ret <== NOT EXECUTED 40009898: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED =============================================================================== 40009a70 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40009a70: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 40009a74: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40009a78: 92 10 00 18 mov %i0, %o1 IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 40009a7c: 40 00 09 1b call 4000bee8 40009a80: 90 02 20 50 add %o0, 0x50, %o0 IMFS_FIFO_RETURN(err); 40009a84: b0 92 20 00 orcc %o0, 0, %i0 40009a88: 16 80 00 06 bge 40009aa0 <== NEVER TAKEN 40009a8c: 01 00 00 00 nop 40009a90: 40 00 0d e8 call 4000d230 <__errno> 40009a94: b0 20 00 18 neg %i0 40009a98: f0 22 00 00 st %i0, [ %o0 ] 40009a9c: b0 10 3f ff mov -1, %i0 } 40009aa0: 81 c7 e0 08 ret 40009aa4: 81 e8 00 00 restore =============================================================================== 40009988 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40009988: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 4000998c: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40009990: 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); 40009994: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 40009998: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000999c: 40 00 08 9c call 4000bc0c <== NOT EXECUTED 400099a0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) 400099a4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400099a8: 04 80 00 08 ble 400099c8 <== NOT EXECUTED 400099ac: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_update_atime(jnode); 400099b0: 40 00 02 24 call 4000a240 <== NOT EXECUTED 400099b4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400099b8: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 400099bc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED 400099c0: 81 c7 e0 08 ret <== NOT EXECUTED 400099c4: 81 e8 00 00 restore <== NOT EXECUTED IMFS_FIFO_RETURN(err); 400099c8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400099cc: 02 80 00 06 be 400099e4 <== NOT EXECUTED 400099d0: 01 00 00 00 nop <== NOT EXECUTED 400099d4: 40 00 0e 17 call 4000d230 <__errno> <== NOT EXECUTED 400099d8: b0 20 00 18 neg %i0 <== NOT EXECUTED 400099dc: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 400099e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 400099e4: 81 c7 e0 08 ret <== NOT EXECUTED 400099e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40009920 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40009920: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 40009924: 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 ) { 40009928: 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); 4000992c: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 <== NOT EXECUTED 40009930: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009934: 40 00 08 46 call 4000ba4c <== NOT EXECUTED 40009938: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (err > 0) { 4000993c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40009940: 04 80 00 09 ble 40009964 <== NOT EXECUTED 40009944: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 40009948: 40 00 02 3e call 4000a240 <== NOT EXECUTED 4000994c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009950: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40009954: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 40009958: c2 24 20 44 st %g1, [ %l0 + 0x44 ] <== NOT EXECUTED 4000995c: 81 c7 e0 08 ret <== NOT EXECUTED 40009960: 81 e8 00 00 restore <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 40009964: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40009968: 02 80 00 06 be 40009980 <== NOT EXECUTED 4000996c: 01 00 00 00 nop <== NOT EXECUTED 40009970: 40 00 0e 30 call 4000d230 <__errno> <== NOT EXECUTED 40009974: b0 20 00 18 neg %i0 <== NOT EXECUTED 40009978: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED 4000997c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } 40009980: 81 c7 e0 08 ret <== NOT EXECUTED 40009984: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40009aa8 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 40009aa8: 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 ); 40009aac: 80 a6 20 00 cmp %i0, 0 40009ab0: 12 80 00 0a bne 40009ad8 <== ALWAYS TAKEN 40009ab4: 80 a6 60 00 cmp %i1, 0 40009ab8: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40009abc: 15 10 00 67 sethi %hi(0x40019c00), %o2 <== NOT EXECUTED 40009ac0: 17 10 00 67 sethi %hi(0x40019c00), %o3 <== NOT EXECUTED 40009ac4: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED 40009ac8: 94 12 a2 a8 or %o2, 0x2a8, %o2 <== NOT EXECUTED 40009acc: 96 12 e2 88 or %o3, 0x288, %o3 <== NOT EXECUTED 40009ad0: 7f ff e0 cc call 40001e00 <__assert_func> <== NOT EXECUTED 40009ad4: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 40009ad8: 02 80 00 1c be 40009b48 <== NEVER TAKEN 40009adc: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 40009ae0: 13 10 00 67 sethi %hi(0x40019c00), %o1 40009ae4: 40 00 11 3a call 4000dfcc 40009ae8: 92 12 62 98 or %o1, 0x298, %o1 ! 40019e98 40009aec: 80 a2 20 00 cmp %o0, 0 40009af0: 02 80 00 09 be 40009b14 <== NEVER TAKEN 40009af4: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 40009af8: 13 10 00 67 sethi %hi(0x40019c00), %o1 40009afc: 40 00 11 34 call 4000dfcc 40009b00: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 40019ea0 40009b04: 80 a2 20 00 cmp %o0, 0 40009b08: 12 80 00 05 bne 40009b1c <== ALWAYS TAKEN 40009b0c: a0 06 20 54 add %i0, 0x54, %l0 return directory->Parent; 40009b10: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 40009b14: 81 c7 e0 08 ret <== NOT EXECUTED 40009b18: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 40009b1c: 10 80 00 08 b 40009b3c 40009b20: 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 ) ) 40009b24: 40 00 11 2a call 4000dfcc 40009b28: 92 06 20 0c add %i0, 0xc, %o1 40009b2c: 80 a2 20 00 cmp %o0, 0 40009b30: 02 80 00 07 be 40009b4c 40009b34: 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 ) { 40009b38: 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; 40009b3c: 80 a6 00 10 cmp %i0, %l0 40009b40: 12 bf ff f9 bne 40009b24 40009b44: 90 10 00 19 mov %i1, %o0 40009b48: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 40009b4c: 81 c7 e0 08 ret 40009b50: 81 e8 00 00 restore =============================================================================== 4000f0a4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4000f0a4: 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; 4000f0a8: 94 10 20 14 mov 0x14, %o2 4000f0ac: 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; 4000f0b0: 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 ); 4000f0b4: 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; 4000f0b8: 40 00 10 b8 call 40013398 4000f0bc: 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; 4000f0c0: c0 26 20 1c clr [ %i0 + 0x1c ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 4000f0c4: e0 27 bf ec st %l0, [ %fp + -20 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4000f0c8: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4000f0cc: 7f ff fd 5a call 4000e634 4000f0d0: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4000f0d4: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4000f0d8: 80 a0 a0 01 cmp %g2, 1 4000f0dc: 12 80 00 06 bne 4000f0f4 4000f0e0: 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; 4000f0e4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4000f0e8: 80 a0 80 01 cmp %g2, %g1 4000f0ec: 12 80 00 09 bne 4000f110 4000f0f0: 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 ); 4000f0f4: 90 10 20 00 clr %o0 4000f0f8: 7f ff d0 45 call 4000320c 4000f0fc: 92 10 00 11 mov %l1, %o1 if (result != 0) 4000f100: 80 a2 20 00 cmp %o0, 0 4000f104: 12 80 00 13 bne 4000f150 <== NEVER TAKEN 4000f108: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 4000f10c: 80 a4 20 00 cmp %l0, 0 4000f110: 22 80 00 11 be,a 4000f154 4000f114: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 4000f118: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4000f11c: 80 a0 60 01 cmp %g1, 1 4000f120: 32 bf ff ea bne,a 4000f0c8 <== NEVER TAKEN 4000f124: e0 27 bf ec st %l0, [ %fp + -20 ] <== NOT EXECUTED 4000f128: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4000f12c: 84 04 20 54 add %l0, 0x54, %g2 4000f130: 80 a0 40 02 cmp %g1, %g2 4000f134: 22 bf ff e5 be,a 4000f0c8 4000f138: e0 27 bf ec st %l0, [ %fp + -20 ] if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4000f13c: a0 90 60 00 orcc %g1, 0, %l0 4000f140: 32 bf ff e2 bne,a 4000f0c8 <== ALWAYS TAKEN 4000f144: e0 27 bf ec st %l0, [ %fp + -20 ] 4000f148: 81 c7 e0 08 ret <== NOT EXECUTED 4000f14c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000f150: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 4000f154: 81 c7 e0 08 ret 4000f158: 81 e8 00 00 restore =============================================================================== 40009b54 : const char *path, int pathlen, char *token, int *token_len ) { 40009b54: 9d e3 bf a0 save %sp, -96, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 40009b58: 82 10 20 00 clr %g1 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 40009b5c: 10 80 00 08 b 40009b7c 40009b60: c4 0e 00 00 ldub [ %i0 ], %g2 token[i] = c; if ( i == IMFS_NAME_MAX ) 40009b64: 80 a0 60 20 cmp %g1, 0x20 40009b68: 12 80 00 04 bne 40009b78 40009b6c: 82 00 60 01 inc %g1 40009b70: 81 c7 e0 08 ret 40009b74: 91 e8 20 04 restore %g0, 4, %o0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 40009b78: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 40009b7c: 87 28 a0 18 sll %g2, 0x18, %g3 40009b80: 87 38 e0 18 sra %g3, 0x18, %g3 40009b84: 80 a0 e0 5c cmp %g3, 0x5c 40009b88: 02 80 00 08 be 40009ba8 40009b8c: 80 a0 e0 2f cmp %g3, 0x2f 40009b90: 02 80 00 06 be 40009ba8 40009b94: 80 a0 40 19 cmp %g1, %i1 40009b98: 16 80 00 04 bge 40009ba8 40009b9c: 80 a0 e0 00 cmp %g3, 0 40009ba0: 32 bf ff f1 bne,a 40009b64 <== ALWAYS TAKEN 40009ba4: c4 2e 80 01 stb %g2, [ %i2 + %g1 ] /* * Copy a seperator into token. */ if ( i == 0 ) { 40009ba8: 80 a0 60 00 cmp %g1, 0 40009bac: 32 80 00 0d bne,a 40009be0 40009bb0: 84 06 80 01 add %i2, %g1, %g2 token[i] = c; 40009bb4: c4 2e 80 00 stb %g2, [ %i2 ] if ( (token[i] != '\0') && pathlen ) { 40009bb8: 85 28 a0 18 sll %g2, 0x18, %g2 40009bbc: 80 a0 a0 00 cmp %g2, 0 40009bc0: 02 80 00 0d be 40009bf4 40009bc4: b0 10 20 00 clr %i0 40009bc8: 80 a6 60 00 cmp %i1, 0 40009bcc: 02 80 00 0b be 40009bf8 40009bd0: 80 a6 20 03 cmp %i0, 3 40009bd4: b0 10 20 01 mov 1, %i0 40009bd8: 10 80 00 07 b 40009bf4 40009bdc: 82 10 20 01 mov 1, %g1 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 40009be0: c4 48 bf ff ldsb [ %g2 + -1 ], %g2 40009be4: 80 a0 a0 00 cmp %g2, 0 40009be8: 02 80 00 03 be 40009bf4 <== NEVER TAKEN 40009bec: b0 10 20 03 mov 3, %i0 token[i] = '\0'; 40009bf0: c0 2e 80 01 clrb [ %i2 + %g1 ] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 40009bf4: 80 a6 20 03 cmp %i0, 3 40009bf8: 12 80 00 11 bne 40009c3c 40009bfc: c2 26 c0 00 st %g1, [ %i3 ] if ( strcmp( token, "..") == 0 ) 40009c00: 90 10 00 1a mov %i2, %o0 40009c04: 13 10 00 67 sethi %hi(0x40019c00), %o1 40009c08: 40 00 10 f1 call 4000dfcc 40009c0c: 92 12 62 c0 or %o1, 0x2c0, %o1 ! 40019ec0 <__FUNCTION__.5426+0x18> 40009c10: 80 a2 20 00 cmp %o0, 0 40009c14: 12 80 00 04 bne 40009c24 40009c18: 90 10 00 1a mov %i2, %o0 40009c1c: 81 c7 e0 08 ret 40009c20: 91 e8 20 02 restore %g0, 2, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 40009c24: 13 10 00 67 sethi %hi(0x40019c00), %o1 40009c28: 40 00 10 e9 call 4000dfcc 40009c2c: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 40019ec8 <__FUNCTION__.5426+0x20> 40009c30: 80 a2 20 00 cmp %o0, 0 40009c34: 22 80 00 02 be,a 40009c3c 40009c38: b0 10 20 01 mov 1, %i0 type = IMFS_CURRENT_DIR; } return type; } 40009c3c: 81 c7 e0 08 ret 40009c40: 81 e8 00 00 restore =============================================================================== 40009c44 : 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 ) { 40009c44: 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, 40009c48: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009c4c: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 ! 4001a9e8 40009c50: 86 10 20 00 clr %g3 40009c54: 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) { 40009c58: 80 a0 80 01 cmp %g2, %g1 40009c5c: 02 80 00 06 be 40009c74 40009c60: 86 00 e0 01 inc %g3 40009c64: 80 a0 e0 06 cmp %g3, 6 40009c68: 12 bf ff fc bne 40009c58 <== ALWAYS TAKEN 40009c6c: 85 28 a0 01 sll %g2, 1, %g2 40009c70: 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) 40009c74: 03 10 00 6c sethi %hi(0x4001b000), %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(); 40009c78: 40 00 09 a6 call 4000c310 40009c7c: c4 20 61 2c st %g2, [ %g1 + 0x12c ] ! 4001b12c 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; 40009c80: 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(); 40009c84: 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; 40009c88: 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; 40009c8c: 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; 40009c90: 13 10 00 68 sethi %hi(0x4001a000), %o1 40009c94: 90 06 20 38 add %i0, 0x38, %o0 40009c98: 40 00 0f a2 call 4000db20 40009c9c: 92 12 60 60 or %o1, 0x60, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 40009ca0: 90 10 20 01 mov 1, %o0 40009ca4: 40 00 00 bc call 40009f94 40009ca8: 92 10 20 10 mov 0x10, %o1 if ( !fs_info ) { 40009cac: 82 92 20 00 orcc %o0, 0, %g1 40009cb0: 12 80 00 0a bne 40009cd8 <== ALWAYS TAKEN 40009cb4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 free(temp_mt_entry->mt_fs_root.node_access); 40009cb8: 40 00 00 fd call 4000a0ac <== NOT EXECUTED 40009cbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 40009cc0: 40 00 0d 5c call 4000d230 <__errno> <== NOT EXECUTED 40009cc4: 01 00 00 00 nop <== NOT EXECUTED 40009cc8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40009ccc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009cd0: 81 c7 e0 08 ret <== NOT EXECUTED 40009cd4: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 40009cd8: 07 10 00 6c sethi %hi(0x4001b000), %g3 40009cdc: c4 00 e1 30 ld [ %g3 + 0x130 ], %g2 ! 4001b130 fs_info->ino_count = 1; 40009ce0: 88 10 20 01 mov 1, %g4 40009ce4: c8 20 60 04 st %g4, [ %g1 + 4 ] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 40009ce8: c8 22 20 38 st %g4, [ %o0 + 0x38 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 40009cec: 88 00 a0 01 add %g2, 1, %g4 40009cf0: c8 20 e1 30 st %g4, [ %g3 + 0x130 ] 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; 40009cf4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 40009cf8: f6 20 60 0c st %i3, [ %g1 + 0xc ] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 40009cfc: f4 20 60 08 st %i2, [ %g1 + 8 ] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 40009d00: c4 20 40 00 st %g2, [ %g1 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 40009d04: 40 00 07 1e call 4000b97c 40009d08: b0 10 20 00 clr %i0 return 0; } 40009d0c: 81 c7 e0 08 ret 40009d10: 81 e8 00 00 restore =============================================================================== 40002ee0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40002ee0: 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; 40002ee4: c2 06 00 00 ld [ %i0 ], %g1 40002ee8: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40002eec: c2 10 60 34 lduh [ %g1 + 0x34 ], %g1 40002ef0: 80 a0 60 07 cmp %g1, 7 40002ef4: 08 80 00 06 bleu 40002f0c 40002ef8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMLINK ); 40002efc: 40 00 3e eb call 40012aa8 <__errno> 40002f00: 01 00 00 00 nop 40002f04: 10 80 00 17 b 40002f60 40002f08: 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 ); 40002f0c: 40 00 42 86 call 40013924 40002f10: 90 10 00 1a mov %i2, %o0 40002f14: a0 07 bf b0 add %fp, -80, %l0 40002f18: 92 10 00 08 mov %o0, %o1 40002f1c: 96 07 bf fc add %fp, -4, %o3 40002f20: 94 10 00 10 mov %l0, %o2 40002f24: 40 00 30 b9 call 4000f208 40002f28: 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( 40002f2c: 90 10 00 19 mov %i1, %o0 40002f30: 94 10 00 10 mov %l0, %o2 40002f34: 92 10 20 03 mov 3, %o1 40002f38: 17 00 00 28 sethi %hi(0xa000), %o3 40002f3c: 98 07 bf d8 add %fp, -40, %o4 40002f40: 40 00 2d 72 call 4000e508 40002f44: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40002f48: 80 a2 20 00 cmp %o0, 0 40002f4c: 12 80 00 08 bne 40002f6c <== ALWAYS TAKEN 40002f50: c2 07 bf d8 ld [ %fp + -40 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40002f54: 40 00 3e d5 call 40012aa8 <__errno> <== NOT EXECUTED 40002f58: 01 00 00 00 nop <== NOT EXECUTED 40002f5c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40002f60: c2 22 00 00 st %g1, [ %o0 ] 40002f64: 81 c7 e0 08 ret 40002f68: 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 ); 40002f6c: 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++; 40002f70: c4 10 60 34 lduh [ %g1 + 0x34 ], %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f74: 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++; 40002f78: 84 00 a0 01 inc %g2 IMFS_update_ctime( info.hard_link.link_node ); 40002f7c: 40 00 02 65 call 40003910 40002f80: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] 40002f84: c4 07 bf f4 ld [ %fp + -12 ], %g2 40002f88: c2 07 bf d8 ld [ %fp + -40 ], %g1 40002f8c: c4 20 60 48 st %g2, [ %g1 + 0x48 ] return 0; } 40002f90: 81 c7 e0 08 ret 40002f94: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40011584 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40011584: 9d e3 bf a0 save %sp, -96, %sp 40011588: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001158c: 80 a6 20 00 cmp %i0, 0 40011590: 12 80 00 0a bne 400115b8 <== ALWAYS TAKEN 40011594: 92 10 00 19 mov %i1, %o1 40011598: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 4001159c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 400115a0: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 400115a4: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 400115a8: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 400115ac: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 400115b0: 10 80 00 0c b 400115e0 <== NOT EXECUTED 400115b4: 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 ); 400115b8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 400115bc: 80 a0 60 05 cmp %g1, 5 400115c0: 02 80 00 0a be 400115e8 <== ALWAYS TAKEN 400115c4: 15 10 00 7f sethi %hi(0x4001fc00), %o2 400115c8: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 400115cc: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 400115d0: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 400115d4: 94 12 a3 c8 or %o2, 0x3c8, %o2 <== NOT EXECUTED 400115d8: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED 400115dc: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 400115e0: 7f ff c7 ac call 40003490 <__assert_func> <== NOT EXECUTED 400115e4: 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 ); 400115e8: 7f ff fe 6c call 40010f98 400115ec: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 400115f0: 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 ); 400115f4: a0 10 00 08 mov %o0, %l0 if ( *block_entry_ptr ) 400115f8: 80 a0 60 00 cmp %g1, 0 400115fc: 12 80 00 09 bne 40011620 40011600: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 40011604: 7f ff fe 58 call 40010f64 40011608: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001160c: 80 a2 20 00 cmp %o0, 0 40011610: 02 80 00 04 be 40011620 <== NEVER TAKEN 40011614: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 40011618: d0 24 00 00 st %o0, [ %l0 ] 4001161c: b0 10 20 00 clr %i0 return 0; } 40011620: 81 c7 e0 08 ret 40011624: 81 e8 00 00 restore =============================================================================== 40011628 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40011628: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001162c: 80 a6 20 00 cmp %i0, 0 40011630: 32 80 00 0a bne,a 40011658 <== ALWAYS TAKEN 40011634: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40011638: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 4001163c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011640: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011644: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011648: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 4001164c: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 40011650: 10 80 00 0c b 40011680 <== NOT EXECUTED 40011654: 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 ); 40011658: 80 a0 60 05 cmp %g1, 5 4001165c: 02 80 00 0b be 40011688 <== ALWAYS TAKEN 40011660: 03 10 00 83 sethi %hi(0x40020c00), %g1 40011664: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011668: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 4001166c: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011670: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011674: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 40011678: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED 4001167c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 40011680: 7f ff c7 84 call 40003490 <__assert_func> <== NOT EXECUTED 40011684: 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 ) 40011688: e0 00 63 34 ld [ %g1 + 0x334 ], %l0 4001168c: a3 34 20 02 srl %l0, 2, %l1 40011690: 92 10 00 11 mov %l1, %o1 40011694: 40 00 2a 07 call 4001beb0 <.umul> 40011698: 90 04 60 01 add %l1, 1, %o0 4001169c: 92 10 00 11 mov %l1, %o1 400116a0: 40 00 2a 04 call 4001beb0 <.umul> 400116a4: 90 02 20 01 inc %o0 400116a8: 92 10 00 10 mov %l0, %o1 400116ac: 40 00 2a 01 call 4001beb0 <.umul> 400116b0: 90 02 3f ff add %o0, -1, %o0 400116b4: 82 10 20 00 clr %g1 400116b8: 80 a0 40 19 cmp %g1, %i1 400116bc: 34 80 00 0b bg,a 400116e8 <== NEVER TAKEN 400116c0: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 <== NOT EXECUTED 400116c4: 80 a0 40 19 cmp %g1, %i1 400116c8: 12 80 00 04 bne 400116d8 <== NEVER TAKEN 400116cc: 80 a2 00 1a cmp %o0, %i2 400116d0: 38 80 00 06 bgu,a 400116e8 <== ALWAYS TAKEN 400116d4: e2 06 20 50 ld [ %i0 + 0x50 ], %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 400116d8: 40 00 04 f4 call 40012aa8 <__errno> <== NOT EXECUTED 400116dc: 01 00 00 00 nop <== NOT EXECUTED 400116e0: 10 80 00 2b b 4001178c <== NOT EXECUTED 400116e4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 400116e8: 80 a6 40 11 cmp %i1, %l1 400116ec: 14 80 00 09 bg 40011710 <== NEVER TAKEN 400116f0: e6 06 20 54 ld [ %i0 + 0x54 ], %l3 400116f4: 80 a6 40 11 cmp %i1, %l1 400116f8: 12 80 00 04 bne 40011708 <== NEVER TAKEN 400116fc: 80 a6 80 13 cmp %i2, %l3 40011700: 18 80 00 05 bgu 40011714 40011704: a5 3c 20 1f sra %l0, 0x1f, %l2 40011708: 81 c7 e0 08 ret 4001170c: 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; 40011710: a5 3c 20 1f sra %l0, 0x1f, %l2 <== NOT EXECUTED 40011714: 96 10 00 10 mov %l0, %o3 40011718: 94 10 00 12 mov %l2, %o2 4001171c: 90 10 00 19 mov %i1, %o0 40011720: 40 00 2b a9 call 4001c5c4 <__divdi3> 40011724: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40011728: 90 10 00 11 mov %l1, %o0 4001172c: 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; 40011730: a8 10 00 09 mov %o1, %l4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40011734: 94 10 00 12 mov %l2, %o2 40011738: 40 00 2b a3 call 4001c5c4 <__divdi3> 4001173c: 92 10 00 13 mov %l3, %o1 40011740: a2 10 00 09 mov %o1, %l1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40011744: 10 80 00 15 b 40011798 40011748: a0 10 00 09 mov %o1, %l0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001174c: 7f ff ff 8e call 40011584 40011750: 92 10 00 10 mov %l0, %o1 40011754: 80 a2 20 00 cmp %o0, 0 40011758: 22 80 00 10 be,a 40011798 <== ALWAYS TAKEN 4001175c: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 40011760: 10 80 00 06 b 40011778 <== NOT EXECUTED 40011764: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40011768: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001176c: 7f ff fe d7 call 400112c8 <== NOT EXECUTED 40011770: 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-- ) { 40011774: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 40011778: 1a bf ff fc bcc 40011768 <== NOT EXECUTED 4001177c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40011780: 40 00 04 ca call 40012aa8 <__errno> <== NOT EXECUTED 40011784: 01 00 00 00 nop <== NOT EXECUTED 40011788: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 4001178c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011790: 81 c7 e0 08 ret <== NOT EXECUTED 40011794: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40011798: 80 a4 00 14 cmp %l0, %l4 4001179c: 08 bf ff ec bleu 4001174c 400117a0: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 400117a4: f4 26 20 54 st %i2, [ %i0 + 0x54 ] 400117a8: f2 26 20 50 st %i1, [ %i0 + 0x50 ] return 0; } 400117ac: 81 c7 e0 08 ret 400117b0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40010f98 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40010f98: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40010f9c: 80 a6 20 00 cmp %i0, 0 40010fa0: 32 80 00 0a bne,a 40010fc8 <== ALWAYS TAKEN 40010fa4: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40010fa8: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40010fac: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40010fb0: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40010fb4: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40010fb8: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED 40010fbc: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 40010fc0: 10 80 00 0c b 40010ff0 <== NOT EXECUTED 40010fc4: 92 10 23 88 mov 0x388, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40010fc8: 80 a0 60 05 cmp %g1, 5 40010fcc: 02 80 00 0b be 40010ff8 <== ALWAYS TAKEN 40010fd0: 03 10 00 83 sethi %hi(0x40020c00), %g1 40010fd4: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40010fd8: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40010fdc: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40010fe0: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40010fe4: 94 12 a3 20 or %o2, 0x320, %o2 <== NOT EXECUTED 40010fe8: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED 40010fec: 92 10 23 8c mov 0x38c, %o1 <== NOT EXECUTED 40010ff0: 7f ff c9 28 call 40003490 <__assert_func> <== NOT EXECUTED 40010ff4: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40010ff8: e0 00 63 34 ld [ %g1 + 0x334 ], %l0 40010ffc: a1 34 20 02 srl %l0, 2, %l0 40011000: 82 04 3f ff add %l0, -1, %g1 40011004: 80 a6 40 01 cmp %i1, %g1 40011008: 18 80 00 16 bgu 40011060 <== NEVER TAKEN 4001100c: 90 04 20 01 add %l0, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40011010: 80 a6 a0 00 cmp %i2, 0 40011014: 02 80 00 0f be 40011050 40011018: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 4001101c: 80 a0 60 00 cmp %g1, 0 40011020: 32 80 00 09 bne,a 40011044 40011024: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 40011028: 7f ff ff cf call 40010f64 4001102c: 01 00 00 00 nop if ( !p ) 40011030: 80 a2 20 00 cmp %o0, 0 40011034: 22 80 00 86 be,a 4001124c <== NEVER TAKEN 40011038: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 4001103c: d0 26 20 58 st %o0, [ %i0 + 0x58 ] } return &info->indirect[ my_block ]; 40011040: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40011044: b3 2e 60 02 sll %i1, 2, %i1 40011048: 81 c7 e0 08 ret 4001104c: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) return 0; return &info->indirect[ my_block ]; 40011050: b3 2e 60 02 sll %i1, 2, %i1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40011054: 80 a0 60 00 cmp %g1, 0 return 0; return &info->indirect[ my_block ]; 40011058: 10 80 00 32 b 40011120 4001105c: b0 00 40 19 add %g1, %i1, %i0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40011060: 40 00 2b 94 call 4001beb0 <.umul> <== NOT EXECUTED 40011064: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011068: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4001106c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40011070: 18 80 00 30 bgu 40011130 <== NOT EXECUTED 40011074: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40011078: b2 26 40 10 sub %i1, %l0, %i1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001107c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011080: 40 00 2c 72 call 4001c248 <.urem> <== NOT EXECUTED 40011084: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011088: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001108c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011090: 40 00 2b c2 call 4001bf98 <.udiv> <== NOT EXECUTED 40011094: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40011098: 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; 4001109c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 400110a0: 02 80 00 18 be 40011100 <== NOT EXECUTED 400110a4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED if ( !p ) { 400110a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400110ac: 12 80 00 08 bne 400110cc <== NOT EXECUTED 400110b0: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED p = memfile_alloc_block(); 400110b4: 7f ff ff ac call 40010f64 <== NOT EXECUTED 400110b8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400110bc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400110c0: 22 80 00 63 be,a 4001124c <== NOT EXECUTED 400110c4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 400110c8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 400110cc: d0 00 40 10 ld [ %g1 + %l0 ], %o0 <== NOT EXECUTED if ( !p1 ) { 400110d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400110d4: 12 80 00 08 bne 400110f4 <== NOT EXECUTED 400110d8: a0 00 40 10 add %g1, %l0, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 400110dc: 7f ff ff a2 call 40010f64 <== NOT EXECUTED 400110e0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400110e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400110e8: 22 80 00 59 be,a 4001124c <== NOT EXECUTED 400110ec: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 400110f0: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 400110f4: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 400110f8: 81 c7 e0 08 ret <== NOT EXECUTED 400110fc: 91 ea 00 11 restore %o0, %l1, %o0 <== NOT EXECUTED } if ( !p ) 40011100: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011104: 02 80 00 52 be 4001124c <== NOT EXECUTED 40011108: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4001110c: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED 40011110: 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 ]; 40011114: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40011118: 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 ]; 4001111c: b0 00 40 11 add %g1, %l1, %i0 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40011120: 12 80 00 4b bne 4001124c <== ALWAYS TAKEN 40011124: 01 00 00 00 nop p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40011128: 81 c7 e0 08 ret <== NOT EXECUTED 4001112c: 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 ) { 40011130: 90 02 20 01 inc %o0 <== NOT EXECUTED 40011134: 40 00 2b 5f call 4001beb0 <.umul> <== NOT EXECUTED 40011138: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001113c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40011140: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40011144: 18 80 00 41 bgu 40011248 <== NOT EXECUTED 40011148: b2 26 40 11 sub %i1, %l1, %i1 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001114c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40011150: 40 00 2c 3e call 4001c248 <.urem> <== NOT EXECUTED 40011154: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011158: 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; 4001115c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40011160: 40 00 2b 8e call 4001bf98 <.udiv> <== NOT EXECUTED 40011164: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40011168: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001116c: 40 00 2b 8b call 4001bf98 <.udiv> <== NOT EXECUTED 40011170: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40011174: 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; 40011178: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001117c: 40 00 2c 33 call 4001c248 <.urem> <== NOT EXECUTED 40011180: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40011184: 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; 40011188: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001118c: 02 80 00 23 be 40011218 <== NOT EXECUTED 40011190: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED if ( !p ) { 40011194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011198: 12 80 00 08 bne 400111b8 <== NOT EXECUTED 4001119c: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED p = memfile_alloc_block(); 400111a0: 7f ff ff 71 call 40010f64 <== NOT EXECUTED 400111a4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 400111a8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400111ac: 22 80 00 28 be,a 4001124c <== NOT EXECUTED 400111b0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->triply_indirect = p; 400111b4: c2 26 20 60 st %g1, [ %i0 + 0x60 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 400111b8: c4 00 40 11 ld [ %g1 + %l1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 400111bc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400111c0: 12 80 00 08 bne 400111e0 <== NOT EXECUTED 400111c4: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED p1 = memfile_alloc_block(); 400111c8: 7f ff ff 67 call 40010f64 <== NOT EXECUTED 400111cc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 400111d0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400111d4: 02 80 00 1e be 4001124c <== NOT EXECUTED 400111d8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 400111dc: c4 24 40 00 st %g2, [ %l1 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 400111e0: a1 2c 20 02 sll %l0, 2, %l0 <== NOT EXECUTED 400111e4: d0 00 80 10 ld [ %g2 + %l0 ], %o0 <== NOT EXECUTED if ( !p2 ) { 400111e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400111ec: 12 80 00 08 bne 4001120c <== NOT EXECUTED 400111f0: a0 00 80 10 add %g2, %l0, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 400111f4: 7f ff ff 5c call 40010f64 <== NOT EXECUTED 400111f8: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 400111fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011200: 22 80 00 13 be,a 4001124c <== NOT EXECUTED 40011204: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40011208: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 4001120c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40011210: 81 c7 e0 08 ret <== NOT EXECUTED 40011214: 91 ea 00 12 restore %o0, %l2, %o0 <== NOT EXECUTED } if ( !p ) 40011218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001121c: 02 80 00 0c be 4001124c <== NOT EXECUTED 40011220: 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 ]; 40011224: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 40011228: c2 00 40 11 ld [ %g1 + %l1 ], %g1 <== NOT EXECUTED if ( !p1 ) 4001122c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011230: 02 80 00 07 be 4001124c <== NOT EXECUTED 40011234: a1 2a 20 02 sll %o0, 2, %l0 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40011238: f0 00 40 10 ld [ %g1 + %l0 ], %i0 <== NOT EXECUTED 4001123c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 40011240: 81 c7 e0 08 ret <== NOT EXECUTED 40011244: 91 ee 00 12 restore %i0, %l2, %o0 <== NOT EXECUTED 40011248: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001124c: 81 c7 e0 08 ret 40011250: 81 e8 00 00 restore =============================================================================== 40011c34 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40011c34: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40011c38: a0 96 20 00 orcc %i0, 0, %l0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 40011c3c: a4 10 00 19 mov %i1, %l2 /* * Perform internal consistency checks */ assert( the_jnode ); 40011c40: 12 80 00 0a bne 40011c68 <== ALWAYS TAKEN 40011c44: a6 10 00 1a mov %i2, %l3 40011c48: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011c4c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011c50: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011c54: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011c58: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011c5c: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 40011c60: 10 80 00 0e b 40011c98 <== NOT EXECUTED 40011c64: 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 || 40011c68: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40011c6c: 84 00 7f fb add %g1, -5, %g2 40011c70: 80 a0 a0 01 cmp %g2, 1 40011c74: 08 80 00 0b bleu 40011ca0 <== ALWAYS TAKEN 40011c78: 80 a6 e0 00 cmp %i3, 0 40011c7c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011c80: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011c84: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011c88: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011c8c: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011c90: 96 12 e2 c8 or %o3, 0x2c8, %o3 <== NOT EXECUTED 40011c94: 92 10 22 51 mov 0x251, %o1 <== NOT EXECUTED 40011c98: 7f ff c5 fe call 40003490 <__assert_func> <== NOT EXECUTED 40011c9c: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 40011ca0: 32 80 00 0a bne,a 40011cc8 <== ALWAYS TAKEN 40011ca4: 80 a7 20 00 cmp %i4, 0 40011ca8: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011cac: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011cb0: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011cb4: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011cb8: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011cbc: 96 12 e3 18 or %o3, 0x318, %o3 <== NOT EXECUTED 40011cc0: 10 bf ff f6 b 40011c98 <== NOT EXECUTED 40011cc4: 92 10 22 5a mov 0x25a, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 40011cc8: 12 80 00 08 bne 40011ce8 <== ALWAYS TAKEN 40011ccc: 80 a0 60 06 cmp %g1, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 40011cd0: 40 00 03 76 call 40012aa8 <__errno> <== NOT EXECUTED 40011cd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011cd8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40011cdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011ce0: 81 c7 e0 08 ret <== NOT EXECUTED 40011ce4: 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) { 40011ce8: 32 80 00 1c bne,a 40011d58 <== ALWAYS TAKEN 40011cec: 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)) 40011cf0: d8 1c 20 50 ldd [ %l0 + 0x50 ], %o4 <== NOT EXECUTED 40011cf4: 82 10 20 00 clr %g1 <== NOT EXECUTED 40011cf8: 86 a3 40 1a subcc %o5, %i2, %g3 <== NOT EXECUTED 40011cfc: 84 63 00 19 subx %o4, %i1, %g2 <== NOT EXECUTED 40011d00: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011d04: 14 80 00 09 bg 40011d28 <== NOT EXECUTED 40011d08: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 <== NOT EXECUTED 40011d0c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011d10: 12 80 00 04 bne 40011d20 <== NOT EXECUTED 40011d14: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 40011d18: 38 80 00 05 bgu,a 40011d2c <== NOT EXECUTED 40011d1c: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED 40011d20: 10 80 00 03 b 40011d2c <== NOT EXECUTED 40011d24: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 40011d28: b0 23 40 13 sub %o5, %l3, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 40011d2c: 92 02 40 13 add %o1, %l3, %o1 <== NOT EXECUTED 40011d30: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40011d34: 40 00 05 99 call 40013398 <== NOT EXECUTED 40011d38: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 40011d3c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40011d40: 7f ff c6 f4 call 40003910 <== NOT EXECUTED 40011d44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011d48: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40011d4c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED return my_length; 40011d50: 81 c7 e0 08 ret <== NOT EXECUTED 40011d54: 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 ) 40011d58: 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; 40011d5c: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 40011d60: 80 a1 00 03 cmp %g4, %g3 40011d64: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 40011d68: 14 80 00 08 bg 40011d88 <== NEVER TAKEN 40011d6c: 9a 07 00 1a add %i4, %i2, %o5 40011d70: 80 a1 00 03 cmp %g4, %g3 40011d74: 32 80 00 07 bne,a 40011d90 <== NEVER TAKEN 40011d78: 03 10 00 83 sethi %hi(0x40020c00), %g1 <== NOT EXECUTED 40011d7c: 80 a3 40 02 cmp %o5, %g2 40011d80: 28 80 00 04 bleu,a 40011d90 40011d84: 03 10 00 83 sethi %hi(0x40020c00), %g1 my_length = the_jnode->info.file.size - start; 40011d88: 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; 40011d8c: 03 10 00 83 sethi %hi(0x40020c00), %g1 40011d90: e2 00 63 34 ld [ %g1 + 0x334 ], %l1 ! 40020f34 40011d94: 90 10 00 12 mov %l2, %o0 40011d98: ab 3c 60 1f sra %l1, 0x1f, %l5 40011d9c: 96 10 00 11 mov %l1, %o3 40011da0: 94 10 00 15 mov %l5, %o2 40011da4: 40 00 2a ef call 4001c960 <__moddi3> 40011da8: 92 10 00 13 mov %l3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40011dac: 90 10 00 12 mov %l2, %o0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40011db0: a8 10 00 09 mov %o1, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40011db4: 94 10 00 15 mov %l5, %o2 40011db8: 92 10 00 13 mov %l3, %o1 40011dbc: 40 00 2a 02 call 4001c5c4 <__divdi3> 40011dc0: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 40011dc4: 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; 40011dc8: a4 10 00 09 mov %o1, %l2 if ( start_offset ) { 40011dcc: aa 10 00 1b mov %i3, %l5 40011dd0: 02 80 00 1c be 40011e40 40011dd4: 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 ); 40011dd8: 90 10 00 10 mov %l0, %o0 40011ddc: 7f ff fc 6f call 40010f98 40011de0: 94 10 20 00 clr %o2 assert( block_ptr ); 40011de4: 80 a2 20 00 cmp %o0, 0 40011de8: 32 80 00 0a bne,a 40011e10 <== ALWAYS TAKEN 40011dec: a2 24 40 14 sub %l1, %l4, %l1 40011df0: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011df4: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011df8: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011dfc: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011e00: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011e04: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011e08: 10 bf ff a4 b 40011c98 <== NOT EXECUTED 40011e0c: 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; 40011e10: 80 a7 00 11 cmp %i4, %l1 40011e14: 08 80 00 03 bleu 40011e20 40011e18: 94 10 00 1c mov %i4, %o2 40011e1c: 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 ); 40011e20: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 40011e24: aa 06 c0 0a add %i3, %o2, %l5 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 ); 40011e28: 92 02 40 14 add %o1, %l4, %o1 dest += to_copy; block++; 40011e2c: a4 04 a0 01 inc %l2 my_length -= to_copy; 40011e30: b8 27 00 0a sub %i4, %o2, %i4 40011e34: b0 10 00 0a mov %o2, %i0 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 40011e38: 40 00 05 58 call 40013398 40011e3c: 90 10 00 1b mov %i3, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40011e40: 03 10 00 83 sethi %hi(0x40020c00), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40011e44: a8 10 63 34 or %g1, 0x334, %l4 ! 40020f34 40011e48: 10 80 00 17 b 40011ea4 40011e4c: e2 00 63 34 ld [ %g1 + 0x334 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40011e50: 92 10 00 12 mov %l2, %o1 40011e54: 7f ff fc 51 call 40010f98 40011e58: 94 10 20 00 clr %o2 assert( block_ptr ); 40011e5c: 80 a2 20 00 cmp %o0, 0 40011e60: 32 80 00 0a bne,a 40011e88 <== ALWAYS TAKEN 40011e64: d2 02 00 00 ld [ %o0 ], %o1 40011e68: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011e6c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011e70: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011e74: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011e78: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011e7c: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011e80: 10 bf ff 86 b 40011c98 <== NOT EXECUTED 40011e84: 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++; 40011e88: 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 ); 40011e8c: 90 10 00 15 mov %l5, %o0 dest += to_copy; block++; my_length -= to_copy; 40011e90: b8 27 00 11 sub %i4, %l1, %i4 copied += to_copy; 40011e94: b0 06 00 11 add %i0, %l1, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 40011e98: aa 05 40 11 add %l5, %l1, %l5 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 ); 40011e9c: 40 00 05 3f call 40013398 40011ea0: 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 ) { 40011ea4: c2 05 00 00 ld [ %l4 ], %g1 40011ea8: 80 a7 00 01 cmp %i4, %g1 40011eac: 1a bf ff e9 bcc 40011e50 40011eb0: 90 10 00 10 mov %l0, %o0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 40011eb4: 80 a7 20 00 cmp %i4, 0 40011eb8: 02 80 00 16 be 40011f10 40011ebc: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40011ec0: 92 10 00 12 mov %l2, %o1 40011ec4: 90 10 00 10 mov %l0, %o0 40011ec8: 7f ff fc 34 call 40010f98 40011ecc: 94 10 20 00 clr %o2 assert( block_ptr ); 40011ed0: 80 a2 20 00 cmp %o0, 0 40011ed4: 32 80 00 0a bne,a 40011efc <== ALWAYS TAKEN 40011ed8: d2 02 00 00 ld [ %o0 ], %o1 40011edc: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011ee0: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011ee4: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011ee8: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011eec: 94 12 a3 58 or %o2, 0x358, %o2 <== NOT EXECUTED 40011ef0: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011ef4: 10 bf ff 69 b 40011c98 <== NOT EXECUTED 40011ef8: 92 10 22 b9 mov 0x2b9, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 40011efc: 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 ); 40011f00: 90 10 00 15 mov %l5, %o0 40011f04: 40 00 05 25 call 40013398 40011f08: 94 10 00 1c mov %i4, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 40011f0c: 90 07 bf f8 add %fp, -8, %o0 40011f10: 7f ff c6 80 call 40003910 40011f14: 92 10 20 00 clr %o1 40011f18: c2 07 bf f8 ld [ %fp + -8 ], %g1 40011f1c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return copied; } 40011f20: 81 c7 e0 08 ret 40011f24: 81 e8 00 00 restore =============================================================================== 4001131c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4001131c: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40011320: 80 a6 20 00 cmp %i0, 0 40011324: 32 80 00 0a bne,a 4001134c <== ALWAYS TAKEN 40011328: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4001132c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011330: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011334: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011338: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 4001133c: 94 12 a3 70 or %o2, 0x370, %o2 <== NOT EXECUTED 40011340: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 40011344: 10 80 00 0c b 40011374 <== NOT EXECUTED 40011348: 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 ); 4001134c: 80 a0 60 05 cmp %g1, 5 40011350: 02 80 00 0b be 4001137c <== ALWAYS TAKEN 40011354: 03 10 00 83 sethi %hi(0x40020c00), %g1 40011358: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 4001135c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011360: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011364: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011368: 94 12 a3 70 or %o2, 0x370, %o2 <== NOT EXECUTED 4001136c: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED 40011370: 92 10 21 f2 mov 0x1f2, %o1 <== NOT EXECUTED 40011374: 7f ff c8 47 call 40003490 <__assert_func> <== NOT EXECUTED 40011378: 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; 4001137c: e0 00 63 34 ld [ %g1 + 0x334 ], %l0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40011380: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40011384: 80 a0 60 00 cmp %g1, 0 40011388: 02 80 00 05 be 4001139c 4001138c: a1 34 20 02 srl %l0, 2, %l0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 40011390: 90 06 20 58 add %i0, 0x58, %o0 40011394: 7f ff ff b0 call 40011254 40011398: 92 10 00 10 mov %l0, %o1 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 4001139c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 400113a0: 80 a0 60 00 cmp %g1, 0 400113a4: 22 80 00 17 be,a 40011400 <== ALWAYS TAKEN 400113a8: 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; 400113b0: 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 400113b8: a4 14 a3 34 or %l2, 0x334, %l2 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 400113bc: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 400113c0: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 400113c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400113c8: 02 80 00 04 be 400113d8 <== NOT EXECUTED 400113cc: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 400113d0: 7f ff ff a1 call 40011254 <== NOT EXECUTED 400113d4: 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 400113ec: 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 ); 400113f0: 90 06 20 5c add %i0, 0x5c, %o0 <== NOT EXECUTED 400113f4: 7f ff ff 98 call 40011254 <== NOT EXECUTED 400113f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 400113fc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 <== NOT EXECUTED 40011400: 80 a0 60 00 cmp %g1, 0 40011404: 02 80 00 25 be 40011498 <== ALWAYS TAKEN 40011408: 29 10 00 83 sethi %hi(0x40020c00), %l4 4001140c: 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 40011414: a8 15 23 34 or %l4, 0x334, %l4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 40011418: ab 2c 60 02 sll %l1, 2, %l5 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4001141c: e4 00 40 15 ld [ %g1 + %l5 ], %l2 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40011420: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40011424: 02 80 00 1b be 40011490 <== NOT EXECUTED 40011428: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 4001142c: 10 80 00 09 b 40011450 <== NOT EXECUTED 40011430: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 4001143c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40011440: 7f ff ff 85 call 40011254 <== NOT EXECUTED 40011444: 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 40011460: 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( 40011464: 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 40011474: 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 40011488: 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( 4001148c: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 40011490: 7f ff ff 71 call 40011254 <== NOT EXECUTED 40011494: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 40011498: 81 c7 e0 08 ret 4001149c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400112c8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 400112c8: 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 ); 400112cc: 94 10 20 00 clr %o2 <== NOT EXECUTED 400112d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400112d4: 7f ff ff 31 call 40010f98 <== NOT EXECUTED 400112d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED assert( block_ptr ); 400112dc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 400112e0: 32 80 00 0a bne,a 40011308 <== NOT EXECUTED 400112e4: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED 400112e8: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 400112ec: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 400112f0: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 400112f4: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 400112f8: 94 12 a3 a8 or %o2, 0x3a8, %o2 <== NOT EXECUTED 400112fc: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011300: 7f ff c8 64 call 40003490 <__assert_func> <== NOT EXECUTED 40011304: 92 10 21 96 mov 0x196, %o1 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); } return 1; } 40011308: 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 ); 4001130c: 7f ff ff 0d call 40010f40 <== NOT EXECUTED 40011310: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } return 1; } 40011314: 81 c7 e0 08 ret <== NOT EXECUTED 40011318: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400118d0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 400118d0: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 400118d4: a0 96 20 00 orcc %i0, 0, %l0 400118d8: 32 80 00 0a bne,a 40011900 <== ALWAYS TAKEN 400118dc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 400118e0: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 400118e4: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 400118e8: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 400118ec: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 400118f0: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 400118f4: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED 400118f8: 10 80 00 8c b 40011b28 <== NOT EXECUTED 400118fc: 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 ); 40011900: 80 a0 60 05 cmp %g1, 5 40011904: 02 80 00 0a be 4001192c <== ALWAYS TAKEN 40011908: 80 a6 e0 00 cmp %i3, 0 4001190c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011910: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011914: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011918: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 4001191c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40011920: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED 40011924: 10 80 00 81 b 40011b28 <== NOT EXECUTED 40011928: 92 10 22 e7 mov 0x2e7, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001192c: 12 80 00 0a bne 40011954 <== ALWAYS TAKEN 40011930: 80 a7 20 00 cmp %i4, 0 40011934: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011938: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 4001193c: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011940: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011944: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40011948: 96 12 e2 90 or %o3, 0x290, %o3 <== NOT EXECUTED 4001194c: 10 80 00 77 b 40011b28 <== NOT EXECUTED 40011950: 92 10 22 ef mov 0x2ef, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 40011954: 32 80 00 06 bne,a 4001196c <== ALWAYS TAKEN 40011958: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 4001195c: 40 00 04 53 call 40012aa8 <__errno> <== NOT EXECUTED 40011960: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011964: 10 80 00 15 b 400119b8 <== NOT EXECUTED 40011968: 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 ) { 4001196c: 80 a0 60 00 cmp %g1, 0 40011970: 06 80 00 09 bl 40011994 <== NEVER TAKEN 40011974: 94 07 00 1a add %i4, %i2, %o2 40011978: 80 a0 60 00 cmp %g1, 0 4001197c: 12 80 00 12 bne 400119c4 <== NEVER TAKEN 40011980: 03 10 00 83 sethi %hi(0x40020c00), %g1 40011984: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40011988: 80 a0 40 0a cmp %g1, %o2 4001198c: 1a 80 00 0e bcc 400119c4 <== NEVER TAKEN 40011990: 03 10 00 83 sethi %hi(0x40020c00), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 40011994: 90 10 00 10 mov %l0, %o0 40011998: 7f ff ff 24 call 40011628 4001199c: 92 10 20 00 clr %o1 if ( status ) 400119a0: 80 a2 20 00 cmp %o0, 0 400119a4: 02 80 00 08 be 400119c4 <== ALWAYS TAKEN 400119a8: 03 10 00 83 sethi %hi(0x40020c00), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 400119ac: 40 00 04 3f call 40012aa8 <__errno> <== NOT EXECUTED 400119b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400119b4: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 400119b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400119bc: 81 c7 e0 08 ret <== NOT EXECUTED 400119c0: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400119c4: e2 00 63 34 ld [ %g1 + 0x334 ], %l1 400119c8: 92 10 00 1a mov %i2, %o1 400119cc: a7 3c 60 1f sra %l1, 0x1f, %l3 400119d0: 96 10 00 11 mov %l1, %o3 400119d4: 94 10 00 13 mov %l3, %o2 400119d8: 40 00 2b e2 call 4001c960 <__moddi3> 400119dc: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400119e0: 94 10 00 13 mov %l3, %o2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 400119e4: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 400119e8: 90 10 00 19 mov %i1, %o0 400119ec: 92 10 00 1a mov %i2, %o1 400119f0: 40 00 2a f5 call 4001c5c4 <__divdi3> 400119f4: 96 10 00 11 mov %l1, %o3 if ( start_offset ) { 400119f8: 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; 400119fc: a6 10 00 09 mov %o1, %l3 if ( start_offset ) { 40011a00: 80 a4 a0 00 cmp %l2, 0 40011a04: 02 80 00 1b be 40011a70 40011a08: 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 ); 40011a0c: 90 10 00 10 mov %l0, %o0 40011a10: 7f ff fd 62 call 40010f98 40011a14: 94 10 20 00 clr %o2 assert( block_ptr ); 40011a18: 80 a2 20 00 cmp %o0, 0 40011a1c: 32 80 00 0a bne,a 40011a44 <== ALWAYS TAKEN 40011a20: 94 24 40 12 sub %l1, %l2, %o2 40011a24: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011a28: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011a2c: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011a30: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011a34: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40011a38: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011a3c: 10 80 00 3b b 40011b28 <== NOT EXECUTED 40011a40: 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; 40011a44: 80 a2 80 1c cmp %o2, %i4 40011a48: 38 80 00 02 bgu,a 40011a50 40011a4c: 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 ); 40011a50: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 40011a54: 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 ); 40011a58: 90 02 00 12 add %o0, %l2, %o0 src += to_copy; block++; 40011a5c: a6 04 e0 01 inc %l3 my_length -= to_copy; 40011a60: b8 27 00 0a sub %i4, %o2, %i4 copied += to_copy; 40011a64: 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 ); 40011a68: 40 00 06 4c call 40013398 40011a6c: 92 10 00 1b mov %i3, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40011a70: 03 10 00 83 sethi %hi(0x40020c00), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40011a74: a4 10 63 34 or %g1, 0x334, %l2 ! 40020f34 40011a78: 10 80 00 17 b 40011ad4 40011a7c: e2 00 63 34 ld [ %g1 + 0x334 ], %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40011a80: 92 10 00 13 mov %l3, %o1 40011a84: 7f ff fd 45 call 40010f98 40011a88: 94 10 20 00 clr %o2 assert( block_ptr ); 40011a8c: 80 a2 20 00 cmp %o0, 0 40011a90: 32 80 00 0a bne,a 40011ab8 <== ALWAYS TAKEN 40011a94: d0 02 00 00 ld [ %o0 ], %o0 40011a98: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011a9c: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011aa0: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011aa4: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011aa8: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40011aac: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011ab0: 10 80 00 1e b 40011b28 <== NOT EXECUTED 40011ab4: 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 ); 40011ab8: 92 10 00 1a mov %i2, %o1 src += to_copy; block++; 40011abc: a6 04 e0 01 inc %l3 my_length -= to_copy; 40011ac0: 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( 40011ac4: 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; 40011ac8: 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 ); 40011acc: 40 00 06 33 call 40013398 40011ad0: 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 ) { 40011ad4: c2 04 80 00 ld [ %l2 ], %g1 40011ad8: 80 a7 00 01 cmp %i4, %g1 40011adc: 1a bf ff e9 bcc 40011a80 40011ae0: 90 10 00 10 mov %l0, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 40011ae4: 80 a7 20 00 cmp %i4, 0 40011ae8: 02 80 00 17 be 40011b44 40011aec: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40011af0: 92 10 00 13 mov %l3, %o1 40011af4: 90 10 00 10 mov %l0, %o0 40011af8: 7f ff fd 28 call 40010f98 40011afc: 94 10 20 00 clr %o2 assert( block_ptr ); 40011b00: 80 a2 20 00 cmp %o0, 0 40011b04: 32 80 00 0b bne,a 40011b30 <== ALWAYS TAKEN 40011b08: d0 02 00 00 ld [ %o0 ], %o0 40011b0c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011b10: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 40011b14: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011b18: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011b1c: 94 12 a3 40 or %o2, 0x340, %o2 <== NOT EXECUTED 40011b20: 96 12 e2 80 or %o3, 0x280, %o3 <== NOT EXECUTED 40011b24: 92 10 23 46 mov 0x346, %o1 <== NOT EXECUTED 40011b28: 7f ff c6 5a call 40003490 <__assert_func> <== NOT EXECUTED 40011b2c: 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; 40011b30: 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 ); 40011b34: 92 10 00 1a mov %i2, %o1 40011b38: 40 00 06 18 call 40013398 40011b3c: 94 10 00 1c mov %i4, %o2 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 40011b40: 90 07 bf f8 add %fp, -8, %o0 40011b44: 7f ff c7 73 call 40003910 40011b48: 92 10 20 00 clr %o1 40011b4c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40011b50: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 40011b54: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return copied; } 40011b58: 81 c7 e0 08 ret 40011b5c: 81 e8 00 00 restore =============================================================================== 40009d14 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009d14: 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 ); 40009d18: 40 00 10 fe call 4000e110 40009d1c: 90 10 00 18 mov %i0, %o0 40009d20: 96 07 bf fc add %fp, -4, %o3 40009d24: 92 10 00 08 mov %o0, %o1 40009d28: 94 07 bf b8 add %fp, -72, %o2 40009d2c: 7f ff ff 8a call 40009b54 40009d30: 90 10 00 18 mov %i0, %o0 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 40009d34: 03 00 00 3c sethi %hi(0xf000), %g1 40009d38: 05 00 00 10 sethi %hi(0x4000), %g2 40009d3c: 82 0e 40 01 and %i1, %g1, %g1 const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009d40: 96 10 00 19 mov %i1, %o3 IMFS_get_token( token, strlen( token ), new_name, &result ); /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 40009d44: 80 a0 40 02 cmp %g1, %g2 40009d48: 02 80 00 1a be 40009db0 40009d4c: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 40009d50: 05 00 00 20 sethi %hi(0x8000), %g2 40009d54: 80 a0 40 02 cmp %g1, %g2 40009d58: 02 80 00 17 be 40009db4 40009d5c: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 40009d60: 05 00 00 08 sethi %hi(0x2000), %g2 40009d64: 80 a0 40 02 cmp %g1, %g2 40009d68: 22 80 00 07 be,a 40009d84 40009d6c: f4 3f bf e0 std %i2, [ %fp + -32 ] 40009d70: 05 00 00 18 sethi %hi(0x6000), %g2 40009d74: 80 a0 40 02 cmp %g1, %g2 40009d78: 12 80 00 05 bne 40009d8c 40009d7c: 05 00 00 04 sethi %hi(0x1000), %g2 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 40009d80: f4 3f bf e0 std %i2, [ %fp + -32 ] 40009d84: 10 80 00 0c b 40009db4 40009d88: 92 10 20 02 mov 2, %o1 } else if (S_ISFIFO(mode)) 40009d8c: 80 a0 40 02 cmp %g1, %g2 40009d90: 02 80 00 09 be 40009db4 <== ALWAYS TAKEN 40009d94: 92 10 20 07 mov 7, %o1 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 40009d98: 40 00 0d 26 call 4000d230 <__errno> <== NOT EXECUTED 40009d9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009da0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40009da4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009da8: 81 c7 e0 08 ret <== NOT EXECUTED 40009dac: 81 e8 00 00 restore <== NOT EXECUTED 40009db0: 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( 40009db4: 94 07 bf b8 add %fp, -72, %o2 40009db8: 98 07 bf e0 add %fp, -32, %o4 40009dbc: 40 00 09 65 call 4000c350 40009dc0: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 40009dc4: 80 a2 20 00 cmp %o0, 0 40009dc8: 12 80 00 06 bne 40009de0 <== ALWAYS TAKEN 40009dcc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 40009dd0: 40 00 0d 18 call 4000d230 <__errno> <== NOT EXECUTED 40009dd4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009dd8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40009ddc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 40009de0: 81 c7 e0 08 ret 40009de4: 81 e8 00 00 restore =============================================================================== 4000306c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4000306c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40003070: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40003074: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 40003078: 80 a0 a0 01 cmp %g2, 1 4000307c: 22 80 00 08 be,a 4000309c <== ALWAYS TAKEN 40003080: f0 20 60 5c st %i0, [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40003084: 40 00 3e 89 call 40012aa8 <__errno> <== NOT EXECUTED 40003088: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000308c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40003090: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003094: 81 c7 e0 08 ret <== NOT EXECUTED 40003098: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 4000309c: 81 c7 e0 08 ret 400030a0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400043b8 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 400043b8: 9d e3 bf a0 save %sp, -96, %sp assert( the_jnode ); 400043bc: 80 a6 20 00 cmp %i0, 0 400043c0: 12 80 00 0a bne 400043e8 <== ALWAYS TAKEN 400043c4: 21 10 00 98 sethi %hi(0x40026000), %l0 400043c8: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 400043cc: 15 10 00 92 sethi %hi(0x40024800), %o2 <== NOT EXECUTED 400043d0: 17 10 00 91 sethi %hi(0x40024400), %o3 <== NOT EXECUTED 400043d4: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 400043d8: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 400043dc: 96 12 e2 c0 or %o3, 0x2c0, %o3 <== NOT EXECUTED 400043e0: 10 80 00 3b b 400044cc <== NOT EXECUTED 400043e4: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 400043e8: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 400043ec: 90 06 20 0c add %i0, 0xc, %o0 400043f0: 40 00 3b 4d call 40013124 400043f4: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 400043f8: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 400043fc: 82 02 bf ff add %o2, -1, %g1 40004400: 80 a0 60 06 cmp %g1, 6 40004404: 38 80 00 42 bgu,a 4000450c <== NEVER TAKEN 40004408: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 <== NOT EXECUTED 4000440c: 83 28 60 02 sll %g1, 2, %g1 40004410: 05 10 00 10 sethi %hi(0x40004000), %g2 40004414: 84 10 a3 60 or %g2, 0x360, %g2 ! 40004360 40004418: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000441c: 81 c0 40 00 jmp %g1 40004420: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40004424: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 40004428: 90 10 20 2f mov 0x2f, %o0 4000442c: 40 00 3a fa call 40013014 40004430: d2 00 60 08 ld [ %g1 + 8 ], %o1 break; 40004434: 10 80 00 3c b 40004524 40004438: 31 10 00 91 sethi %hi(0x40024400), %i0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4000443c: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 40004440: 13 10 00 91 sethi %hi(0x40024400), %o1 40004444: d6 06 20 54 ld [ %i0 + 0x54 ], %o3 40004448: d0 00 60 08 ld [ %g1 + 8 ], %o0 4000444c: d4 06 20 50 ld [ %i0 + 0x50 ], %o2 40004450: 10 80 00 08 b 40004470 40004454: 92 12 62 d0 or %o1, 0x2d0, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004458: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 <== NOT EXECUTED 4000445c: d6 06 20 58 ld [ %i0 + 0x58 ], %o3 <== NOT EXECUTED 40004460: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004464: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 <== NOT EXECUTED 40004468: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 4000446c: 92 12 62 e8 or %o1, 0x2e8, %o1 ! 400246e8 <__FUNCTION__.5614+0x2b8><== NOT EXECUTED 40004470: 40 00 3a cf call 40012fac 40004474: 31 10 00 91 sethi %hi(0x40024400), %i0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 40004478: 30 80 00 2b b,a 40004524 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4000447c: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 40004480: d4 06 20 54 ld [ %i0 + 0x54 ], %o2 40004484: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004488: 13 10 00 91 sethi %hi(0x40024400), %o1 4000448c: 40 00 3a c8 call 40012fac 40004490: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 400246f8 <__FUNCTION__.5614+0x2c8> (uint32_t)the_jnode->info.file.size ); #endif break; 40004494: 10 80 00 24 b 40004524 40004498: 31 10 00 91 sethi %hi(0x40024400), %i0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 4000449c: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 <== NOT EXECUTED 400044a0: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 400044a4: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400044a8: 40 00 3b 1f call 40013124 <== NOT EXECUTED 400044ac: 90 12 23 08 or %o0, 0x308, %o0 <== NOT EXECUTED assert(0); 400044b0: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 400044b4: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 400044b8: 15 10 00 92 sethi %hi(0x40024800), %o2 <== NOT EXECUTED 400044bc: 17 10 00 91 sethi %hi(0x40024400), %o3 <== NOT EXECUTED 400044c0: 90 12 22 70 or %o0, 0x270, %o0 <== NOT EXECUTED 400044c4: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 400044c8: 96 12 e3 20 or %o3, 0x320, %o3 <== NOT EXECUTED 400044cc: 40 00 02 54 call 40004e1c <__assert_func> <== NOT EXECUTED 400044d0: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 400044d4: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 <== NOT EXECUTED 400044d8: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 400044dc: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400044e0: 40 00 3b 11 call 40013124 <== NOT EXECUTED 400044e4: 90 12 23 08 or %o0, 0x308, %o0 <== NOT EXECUTED assert(0); 400044e8: 10 bf ff f3 b 400044b4 <== NOT EXECUTED 400044ec: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 400044f0: c2 04 23 f8 ld [ %l0 + 0x3f8 ], %g1 <== NOT EXECUTED 400044f4: 11 10 00 91 sethi %hi(0x40024400), %o0 <== NOT EXECUTED 400044f8: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400044fc: 40 00 3b 0a call 40013124 <== NOT EXECUTED 40004500: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED assert(0); 40004504: 10 bf ff ec b 400044b4 <== NOT EXECUTED 40004508: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4000450c: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40004510: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004514: 40 00 3a a6 call 40012fac <== NOT EXECUTED 40004518: 92 12 63 40 or %o1, 0x340, %o1 <== NOT EXECUTED assert(0); 4000451c: 10 bf ff e6 b 400044b4 <== NOT EXECUTED 40004520: 92 10 20 6c mov 0x6c, %o1 <== NOT EXECUTED break; } puts(""); 40004524: 40 00 41 f0 call 40014ce4 40004528: 91 ee 23 50 restore %i0, 0x350, %o0 =============================================================================== 400030b0 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 400030b0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400030b4: c2 06 00 00 ld [ %i0 ], %g1 if ( node->type != IMFS_SYM_LINK ) 400030b8: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 400030bc: 80 a0 a0 04 cmp %g2, 4 400030c0: 02 80 00 0a be 400030e8 <== ALWAYS TAKEN 400030c4: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 400030c8: 40 00 3e 78 call 40012aa8 <__errno> <== NOT EXECUTED 400030cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400030d0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400030d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400030d8: 81 c7 e0 08 ret <== NOT EXECUTED 400030dc: 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]; 400030e0: 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++ ) 400030e4: b0 06 20 01 inc %i0 400030e8: 80 a6 00 1a cmp %i0, %i2 400030ec: 1a 80 00 07 bcc 40003108 400030f0: 01 00 00 00 nop 400030f4: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 400030f8: c6 48 80 18 ldsb [ %g2 + %i0 ], %g3 400030fc: 80 a0 e0 00 cmp %g3, 0 40003100: 12 bf ff f8 bne 400030e0 40003104: c4 08 80 18 ldub [ %g2 + %i0 ], %g2 buf[i] = node->info.sym_link.name[i]; return i; } 40003108: 81 c7 e0 08 ret 4000310c: 81 e8 00 00 restore =============================================================================== 40003110 : 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 */ ) { 40003110: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 40003114: e0 06 40 00 ld [ %i1 ], %l0 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 40003118: 92 10 00 1b mov %i3, %o1 4000311c: 90 04 20 0c add %l0, 0xc, %o0 40003120: 40 00 42 36 call 400139f8 40003124: 94 10 20 20 mov 0x20, %o2 if ( the_jnode->Parent != NULL ) 40003128: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000312c: 80 a0 60 00 cmp %g1, 0 40003130: 22 80 00 05 be,a 40003144 <== NEVER TAKEN 40003134: 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 ); 40003138: 40 00 13 31 call 40007dfc <_Chain_Extract> 4000313c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 40003140: c2 06 80 00 ld [ %i2 ], %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 40003144: 92 10 00 10 mov %l0, %o1 40003148: 90 00 60 50 add %g1, 0x50, %o0 4000314c: 40 00 13 20 call 40007dcc <_Chain_Append> 40003150: c2 24 20 08 st %g1, [ %l0 + 8 ] rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 40003154: 90 07 bf f8 add %fp, -8, %o0 40003158: 40 00 01 ee call 40003910 4000315c: 92 10 20 00 clr %o1 40003160: c2 07 bf f8 ld [ %fp + -8 ], %g1 40003164: c2 24 20 48 st %g1, [ %l0 + 0x48 ] return 0; } 40003168: 81 c7 e0 08 ret 4000316c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40009df4 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40009df4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40009df8: 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 ) { 40009dfc: c2 04 20 08 ld [ %l0 + 8 ], %g1 40009e00: 80 a0 60 00 cmp %g1, 0 40009e04: 22 80 00 06 be,a 40009e1c <== NEVER TAKEN 40009e08: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 40009e0c: 40 00 03 82 call 4000ac14 <_Chain_Extract> 40009e10: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40009e14: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40009e18: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 40009e1c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40009e20: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40009e24: 90 07 bf f8 add %fp, -8, %o0 40009e28: 40 00 01 06 call 4000a240 40009e2c: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 40009e30: 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) ) { 40009e34: 90 10 00 10 mov %l0, %o0 40009e38: 40 00 01 3a call 4000a320 40009e3c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 40009e40: 80 a2 20 00 cmp %o0, 0 40009e44: 12 80 00 18 bne 40009ea4 <== NEVER TAKEN 40009e48: 01 00 00 00 nop 40009e4c: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 40009e50: 80 a0 60 00 cmp %g1, 0 40009e54: 12 80 00 14 bne 40009ea4 <== NEVER TAKEN 40009e58: 03 10 00 6a sethi %hi(0x4001a800), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40009e5c: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 4001aaf8 40009e60: c4 06 40 00 ld [ %i1 ], %g2 40009e64: c6 00 60 04 ld [ %g1 + 4 ], %g3 40009e68: 80 a0 c0 02 cmp %g3, %g2 40009e6c: 22 80 00 02 be,a 40009e74 <== NEVER TAKEN 40009e70: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 40009e74: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40009e78: 80 a0 60 04 cmp %g1, 4 40009e7c: 12 80 00 08 bne 40009e9c 40009e80: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 40009e84: d0 04 20 50 ld [ %l0 + 0x50 ], %o0 40009e88: 80 a2 20 00 cmp %o0, 0 40009e8c: 02 80 00 04 be 40009e9c <== NEVER TAKEN 40009e90: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 40009e94: 40 00 00 86 call 4000a0ac 40009e98: 01 00 00 00 nop } free( the_jnode ); 40009e9c: 40 00 00 84 call 4000a0ac 40009ea0: 90 10 00 10 mov %l0, %o0 } return 0; } 40009ea4: 81 c7 e0 08 ret 40009ea8: 91 e8 20 00 restore %g0, 0, %o0 40009eac: 40 00 9e f4 call 40031a7c <__end+0x1625c> <== NOT EXECUTED 40009eb0: 40 00 9f 18 call 40031b10 <__end+0x162f0> <== NOT EXECUTED 40009eb4: 40 00 9f 0c call 40031ae4 <__end+0x162c4> <== NOT EXECUTED 40009eb8: 40 00 9f 00 call 40031ab8 <__end+0x16298> <== NOT EXECUTED 40009ebc: 40 00 9f 00 call 40031abc <__end+0x1629c> <== NOT EXECUTED 40009ec0: 40 00 9f 0c call 40031af0 <__end+0x162d0> <== NOT EXECUTED =============================================================================== 40009ec4 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 40009ec4: 9d e3 bf a0 save %sp, -96, %sp IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 40009ec8: c2 06 00 00 ld [ %i0 ], %g1 switch ( the_jnode->type ) { 40009ecc: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 40009ed0: 84 00 bf fe add %g2, -2, %g2 40009ed4: 80 a0 a0 05 cmp %g2, 5 40009ed8: 18 80 00 10 bgu 40009f18 <== NEVER TAKEN 40009edc: 85 28 a0 02 sll %g2, 2, %g2 40009ee0: 07 10 00 27 sethi %hi(0x40009c00), %g3 40009ee4: 86 10 e2 ac or %g3, 0x2ac, %g3 ! 40009eac 40009ee8: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 40009eec: 81 c0 80 00 jmp %g2 40009ef0: 01 00 00 00 nop rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 40009ef4: 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; 40009ef8: 10 80 00 0e b 40009f30 40009efc: c4 3e 60 18 std %g2, [ %i1 + 0x18 ] case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 40009f00: c4 18 60 50 ldd [ %g1 + 0x50 ], %g2 break; 40009f04: 10 80 00 0b b 40009f30 40009f08: c4 3e 60 20 std %g2, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 40009f0c: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED break; 40009f10: 10 80 00 08 b 40009f30 <== NOT EXECUTED 40009f14: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009f18: 40 00 0c c6 call 4000d230 <__errno> <== NOT EXECUTED 40009f1c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009f20: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009f24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009f28: 81 c7 e0 08 ret <== NOT EXECUTED 40009f2c: 81 e8 00 00 restore <== NOT EXECUTED */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 40009f30: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 buf->st_nlink = the_jnode->st_nlink; 40009f34: c8 10 60 34 lduh [ %g1 + 0x34 ], %g4 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 40009f38: c6 26 60 0c st %g3, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 40009f3c: c6 00 60 38 ld [ %g1 + 0x38 ], %g3 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 40009f40: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 40009f44: c6 26 60 08 st %g3, [ %i1 + 8 ] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 40009f48: c6 00 60 40 ld [ %g1 + 0x40 ], %g3 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 40009f4c: c8 36 60 10 sth %g4, [ %i1 + 0x10 ] 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; 40009f50: c6 26 60 28 st %g3, [ %i1 + 0x28 ] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 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; 40009f54: c8 10 60 3c lduh [ %g1 + 0x3c ], %g4 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 40009f58: c6 00 60 44 ld [ %g1 + 0x44 ], %g3 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 40009f5c: c4 00 a0 34 ld [ %g2 + 0x34 ], %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; 40009f60: c8 36 60 12 sth %g4, [ %i1 + 0x12 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 40009f64: c6 26 60 30 st %g3, [ %i1 + 0x30 ] * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 40009f68: c4 00 80 00 ld [ %g2 ], %g2 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 40009f6c: c6 00 60 48 ld [ %g1 + 0x48 ], %g3 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; 40009f70: c2 10 60 3e lduh [ %g1 + 0x3e ], %g1 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 40009f74: c6 26 60 38 st %g3, [ %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; 40009f78: c2 36 60 14 sth %g1, [ %i1 + 0x14 ] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 40009f7c: c4 26 60 04 st %g2, [ %i1 + 4 ] 40009f80: 03 00 00 3f sethi %hi(0xfc00), %g1 40009f84: 82 10 63 fe or %g1, 0x3fe, %g1 ! fffe 40009f88: c2 26 40 00 st %g1, [ %i1 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 40009f8c: 81 c7 e0 08 ret 40009f90: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40003170 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40003170: 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 ); 40003174: 40 00 41 ec call 40013924 40003178: 90 10 00 1a mov %i2, %o0 4000317c: 96 07 bf fc add %fp, -4, %o3 40003180: 92 10 00 08 mov %o0, %o1 40003184: a0 07 bf b8 add %fp, -72, %l0 40003188: 90 10 00 1a mov %i2, %o0 4000318c: 40 00 30 1f call 4000f208 40003190: 94 10 00 10 mov %l0, %o2 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 40003194: 40 00 41 cf call 400138d0 40003198: 90 10 00 19 mov %i1, %o0 4000319c: d0 27 bf e0 st %o0, [ %fp + -32 ] if (info.sym_link.name == NULL) { 400031a0: 80 a2 20 00 cmp %o0, 0 400031a4: 12 80 00 08 bne 400031c4 <== ALWAYS TAKEN 400031a8: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one(ENOMEM); 400031ac: 40 00 3e 3f call 40012aa8 <__errno> <== NOT EXECUTED 400031b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031b4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400031b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031bc: 81 c7 e0 08 ret 400031c0: 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( 400031c4: 94 10 00 10 mov %l0, %o2 400031c8: 92 10 20 04 mov 4, %o1 400031cc: 17 00 00 28 sethi %hi(0xa000), %o3 400031d0: 98 07 bf e0 add %fp, -32, %o4 400031d4: 96 12 e1 ff or %o3, 0x1ff, %o3 400031d8: 40 00 2c cc call 4000e508 400031dc: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 400031e0: 80 a2 20 00 cmp %o0, 0 400031e4: 12 bf ff f6 bne 400031bc <== ALWAYS TAKEN 400031e8: d0 07 bf e0 ld [ %fp + -32 ], %o0 free(info.sym_link.name); 400031ec: 40 00 01 9f call 40003868 <== NOT EXECUTED 400031f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 400031f4: 40 00 3e 2d call 40012aa8 <__errno> <== NOT EXECUTED 400031f8: 01 00 00 00 nop <== NOT EXECUTED 400031fc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40003200: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40003204: 81 c7 e0 08 ret <== NOT EXECUTED 40003208: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000320c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 4000320c: 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; 40003210: 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 ) { 40003214: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40003218: 80 a0 60 03 cmp %g1, 3 4000321c: 12 80 00 29 bne 400032c0 40003220: a4 10 00 18 mov %i0, %l2 if ( !node->info.hard_link.link_node ) 40003224: e6 04 20 50 ld [ %l0 + 0x50 ], %l3 40003228: 80 a4 e0 00 cmp %l3, 0 4000322c: 12 80 00 08 bne 4000324c <== ALWAYS TAKEN 40003230: a2 07 bf e4 add %fp, -28, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); 40003234: 40 00 3e 1d call 40012aa8 <__errno> <== NOT EXECUTED 40003238: 01 00 00 00 nop <== NOT EXECUTED 4000323c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40003240: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003244: 10 80 00 24 b 400032d4 <== NOT EXECUTED 40003248: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 4000324c: 92 10 00 19 mov %i1, %o1 40003250: 94 10 20 14 mov 0x14, %o2 40003254: 40 00 40 51 call 40013398 40003258: 90 10 00 11 mov %l1, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 4000325c: 90 10 00 11 mov %l1, %o0 40003260: 40 00 2c f5 call 4000e634 40003264: 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) 40003268: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4000326c: c6 10 60 34 lduh [ %g1 + 0x34 ], %g3 40003270: 80 a0 e0 01 cmp %g3, 1 40003274: 12 80 00 0c bne 400032a4 40003278: 84 00 ff ff add %g3, -1, %g2 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 4000327c: c2 07 bf ec ld [ %fp + -20 ], %g1 40003280: 92 10 00 11 mov %l1, %o1 40003284: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40003288: 9f c0 40 00 call %g1 4000328c: 90 10 00 18 mov %i0, %o0 if ( result != 0 ) 40003290: 80 a2 20 00 cmp %o0, 0 40003294: 02 80 00 0b be 400032c0 40003298: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 4000329c: 81 c7 e0 08 ret 400032a0: 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 ); 400032a4: 90 07 bf f8 add %fp, -8, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 400032a8: c4 30 60 34 sth %g2, [ %g1 + 0x34 ] IMFS_update_ctime( node->info.hard_link.link_node ); 400032ac: 40 00 01 99 call 40003910 400032b0: 92 10 20 00 clr %o1 400032b4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400032b8: c4 07 bf f8 ld [ %fp + -8 ], %g2 400032bc: c4 20 60 48 st %g2, [ %g1 + 0x48 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 400032c0: c2 06 60 08 ld [ %i1 + 8 ], %g1 400032c4: 90 10 00 12 mov %l2, %o0 400032c8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 400032cc: 9f c0 40 00 call %g1 400032d0: 92 10 00 19 mov %i1, %o1 return result; } 400032d4: b0 10 00 08 mov %o0, %i0 400032d8: 81 c7 e0 08 ret 400032dc: 81 e8 00 00 restore =============================================================================== 400032e0 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 400032e0: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 400032e4: c2 06 20 08 ld [ %i0 + 8 ], %g1 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 400032e8: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 400032ec: 80 a0 a0 01 cmp %g2, 1 400032f0: 22 80 00 06 be,a 40003308 <== ALWAYS TAKEN 400032f4: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400032f8: 40 00 3d ec call 40012aa8 <__errno> <== NOT EXECUTED 400032fc: 01 00 00 00 nop <== NOT EXECUTED 40003300: 10 80 00 08 b 40003320 <== NOT EXECUTED 40003304: 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 ) 40003308: 80 a0 a0 00 cmp %g2, 0 4000330c: 32 80 00 08 bne,a 4000332c <== ALWAYS TAKEN 40003310: c0 20 60 5c clr [ %g1 + 0x5c ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40003314: 40 00 3d e5 call 40012aa8 <__errno> <== NOT EXECUTED 40003318: 01 00 00 00 nop <== NOT EXECUTED 4000331c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40003320: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003324: 81 c7 e0 08 ret <== NOT EXECUTED 40003328: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 4000332c: 81 c7 e0 08 ret 40003330: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4000223c : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 4000223c: 9d e3 bf a0 save %sp, -96, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 40002240: 03 10 00 6c sethi %hi(0x4001b000), %g1 40002244: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 4001b018 40002248: 80 a0 60 00 cmp %g1, 0 4000224c: 02 80 00 05 be 40002260 <== ALWAYS TAKEN 40002250: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 40002254: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40002258: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000225c: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 40002260: 40 00 20 d2 call 4000a5a8 40002264: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 40002268: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000226c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001b01c 40002270: 80 a0 60 00 cmp %g1, 0 40002274: 02 80 00 08 be 40002294 <== ALWAYS TAKEN 40002278: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 4000227c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 40002280: 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)( 40002284: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002288: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 4000228c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40002290: 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 ( 40002294: 03 10 00 6c sethi %hi(0x4001b000), %g1 40002298: c2 08 60 15 ldub [ %g1 + 0x15 ], %g1 ! 4001b015 4000229c: 80 a0 60 00 cmp %g1, 0 400022a0: 12 80 00 0c bne 400022d0 400022a4: 03 10 00 6c sethi %hi(0x4001b000), %g1 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 400022a8: 03 10 00 6a sethi %hi(0x4001a800), %g1 400022ac: c2 08 62 c0 ldub [ %g1 + 0x2c0 ], %g1 ! 4001aac0 400022b0: 80 a0 60 00 cmp %g1, 0 400022b4: 02 80 00 07 be 400022d0 400022b8: 03 10 00 6c sethi %hi(0x4001b000), %g1 ) { memset( heap_begin, 0, heap_size ); 400022bc: 90 10 00 18 mov %i0, %o0 400022c0: 92 10 20 00 clr %o1 400022c4: 40 00 2e 56 call 4000dc1c 400022c8: 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 ) { 400022cc: 03 10 00 6c sethi %hi(0x4001b000), %g1 400022d0: c2 08 60 15 ldub [ %g1 + 0x15 ], %g1 ! 4001b015 400022d4: 80 a0 60 00 cmp %g1, 0 400022d8: 12 80 00 0c bne 40002308 400022dc: 03 10 00 6a sethi %hi(0x4001a800), %g1 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 400022e0: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 ! 4001a9f0 400022e4: 92 10 00 18 mov %i0, %o1 400022e8: 94 10 00 19 mov %i1, %o2 400022ec: 40 00 10 3a call 400063d4 <_Heap_Initialize> 400022f0: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 400022f4: 80 a2 20 00 cmp %o0, 0 400022f8: 12 80 00 05 bne 4000230c <== ALWAYS TAKEN 400022fc: 33 10 00 6c sethi %hi(0x4001b000), %i1 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40002300: 40 00 0e 41 call 40005c04 <== NOT EXECUTED 40002304: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 40002308: 33 10 00 6c sethi %hi(0x4001b000), %i1 4000230c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002310: f0 06 61 b8 ld [ %i1 + 0x1b8 ], %i0 40002314: 40 00 13 3c call 40007004 <_Protected_heap_Get_size> 40002318: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 4000231c: 90 02 00 18 add %o0, %i0, %o0 40002320: d0 26 61 b8 st %o0, [ %i1 + 0x1b8 ] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 40002324: 81 c7 e0 08 ret 40002328: 81 e8 00 00 restore =============================================================================== 40001c2c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40001c2c: 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 ) 40001c30: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40001c34: 02 80 00 49 be 40001d58 <== NOT EXECUTED 40001c38: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40001c3c: e4 00 62 5c ld [ %g1 + 0x25c ], %l2 ! 4001b25c <== NOT EXECUTED 40001c40: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40001c44: 02 80 00 45 be 40001d58 <== NOT EXECUTED 40001c48: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40001c4c: 32 80 00 0a bne,a 40001c74 <== NOT EXECUTED 40001c50: e8 06 21 48 ld [ %i0 + 0x148 ], %l4 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 40001c54: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== NOT EXECUTED 40001c58: a2 14 63 f4 or %l1, 0x3f4, %l1 ! 4001b3f4 <== NOT EXECUTED 40001c5c: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 40001c60: a8 10 20 00 clr %l4 <== NOT EXECUTED 40001c64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001c68: 12 80 00 04 bne 40001c78 <== NOT EXECUTED 40001c6c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001c70: 30 80 00 41 b,a 40001d74 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 40001c74: a2 06 20 c0 add %i0, 0xc0, %l1 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 40001c78: ea 04 60 04 ld [ %l1 + 4 ], %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40001c7c: 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); 40001c80: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40001c84: a6 04 ff f0 add %l3, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40001c88: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40001c8c: 7f ff ff d8 call 40001bec <== NOT EXECUTED 40001c90: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ( high_water_mark ) 40001c94: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40001c98: 82 60 20 00 subx %g0, 0, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40001c9c: a0 05 40 13 add %l5, %l3, %l0 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40001ca0: 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 ); 40001ca4: 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 ) 40001ca8: 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 ) { 40001cac: 02 80 00 10 be 40001cec <== NOT EXECUTED 40001cb0: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED (*print_handler)( 40001cb4: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED 40001cb8: ec 00 62 58 ld [ %g1 + 0x258 ], %l6 <== NOT EXECUTED 40001cbc: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40001cc0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40001cc4: 40 00 0e 5e call 4000563c <== NOT EXECUTED 40001cc8: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40001ccc: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40001cd0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40001cd4: 13 10 00 66 sethi %hi(0x40019800), %o1 <== NOT EXECUTED 40001cd8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED 40001cdc: 9f c4 80 00 call %l2 <== NOT EXECUTED 40001ce0: 92 12 63 c8 or %o1, 0x3c8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 40001ce4: 10 80 00 08 b 40001d04 <== NOT EXECUTED 40001ce8: 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 ); 40001cec: d0 00 62 58 ld [ %g1 + 0x258 ], %o0 <== NOT EXECUTED 40001cf0: 13 10 00 66 sethi %hi(0x40019800), %o1 <== NOT EXECUTED 40001cf4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40001cf8: 9f c4 80 00 call %l2 <== NOT EXECUTED 40001cfc: 92 12 63 d8 or %o1, 0x3d8, %o1 <== NOT EXECUTED } (*print_handler)( 40001d00: d6 04 40 00 ld [ %l1 ], %o3 <== NOT EXECUTED 40001d04: d4 04 60 04 ld [ %l1 + 4 ], %o2 <== NOT EXECUTED 40001d08: 25 10 00 6c sethi %hi(0x4001b000), %l2 <== NOT EXECUTED 40001d0c: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== NOT EXECUTED 40001d10: c2 04 a2 5c ld [ %l2 + 0x25c ], %g1 <== NOT EXECUTED 40001d14: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 <== NOT EXECUTED 40001d18: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40001d1c: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED 40001d20: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 40001d24: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 40001d28: 13 10 00 66 sethi %hi(0x40019800), %o1 <== NOT EXECUTED 40001d2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d30: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 40019be8 <__FUNCTION__.5614+0x260><== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 40001d34: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40001d38: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 ! 4001b254 <== NOT EXECUTED 40001d3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d40: 12 80 00 08 bne 40001d60 <== NOT EXECUTED 40001d44: c2 04 a2 5c ld [ %l2 + 0x25c ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40001d48: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 <== NOT EXECUTED 40001d4c: 13 10 00 67 sethi %hi(0x40019c00), %o1 <== NOT EXECUTED 40001d50: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d54: 92 12 60 08 or %o1, 8, %o1 ! 40019c08 <__FUNCTION__.5614+0x280><== NOT EXECUTED 40001d58: 81 c7 e0 08 ret <== NOT EXECUTED 40001d5c: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40001d60: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 <== NOT EXECUTED 40001d64: 13 10 00 67 sethi %hi(0x40019c00), %o1 <== NOT EXECUTED 40001d68: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40001d6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d70: 92 12 60 18 or %o1, 0x18, %o1 <== NOT EXECUTED 40001d74: 81 c7 e0 08 ret <== NOT EXECUTED 40001d78: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40001f8c : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 40001f8c: 9d e3 bf a0 save %sp, -96, %sp static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 40001f90: 03 10 00 6c sethi %hi(0x4001b000), %g1 40001f94: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 ! 4001b254 40001f98: 80 a0 60 00 cmp %g1, 0 40001f9c: 12 80 00 21 bne 40002020 40001fa0: 07 10 00 6c sethi %hi(0x4001b000), %g3 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 40001fa4: 05 10 00 67 sethi %hi(0x40019c00), %g2 40001fa8: 86 10 e3 e4 or %g3, 0x3e4, %g3 40001fac: 84 10 a1 70 or %g2, 0x170, %g2 40001fb0: 88 08 60 03 and %g1, 3, %g4 40001fb4: 89 29 20 02 sll %g4, 2, %g4 40001fb8: da 00 80 04 ld [ %g2 + %g4 ], %o5 40001fbc: 89 28 60 02 sll %g1, 2, %g4 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 40001fc0: 82 00 60 01 inc %g1 40001fc4: 80 a0 60 04 cmp %g1, 4 40001fc8: 12 bf ff fa bne 40001fb0 40001fcc: da 20 c0 04 st %o5, [ %g3 + %g4 ] /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 40001fd0: 03 10 00 6d sethi %hi(0x4001b400), %g1 40001fd4: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 4001b5e0 <_CPU_Interrupt_stack_low> 40001fd8: 80 a0 60 00 cmp %g1, 0 40001fdc: 02 80 00 0e be 40002014 <== NEVER TAKEN 40001fe0: 05 10 00 6d sethi %hi(0x4001b400), %g2 40001fe4: c6 00 a1 2c ld [ %g2 + 0x12c ], %g3 ! 4001b52c <_CPU_Interrupt_stack_high> 40001fe8: 80 a0 e0 00 cmp %g3, 0 40001fec: 02 80 00 0a be 40002014 <== NEVER TAKEN 40001ff0: 86 20 c0 01 sub %g3, %g1, %g3 Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 40001ff4: 05 10 00 6c sethi %hi(0x4001b000), %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 40001ff8: c6 20 a3 f4 st %g3, [ %g2 + 0x3f4 ] ! 4001b3f4 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 40001ffc: 84 10 a3 f4 or %g2, 0x3f4, %g2 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 40002000: 90 10 00 01 mov %g1, %o0 40002004: 94 10 00 03 mov %g3, %o2 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 40002008: c2 20 a0 04 st %g1, [ %g2 + 4 ] Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 4000200c: 40 00 2f 97 call 4000de68 40002010: 92 10 20 a5 mov 0xa5, %o1 } #endif Stack_check_Initialized = 1; 40002014: 84 10 20 01 mov 1, %g2 40002018: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000201c: c4 20 62 54 st %g2, [ %g1 + 0x254 ] ! 4001b254 40002020: 81 c7 e0 08 ret 40002024: 81 e8 00 00 restore =============================================================================== 40001bec : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40001bec: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40001bf0: 84 0a 7f fc and %o1, -4, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 40001bf4: 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++) 40001bf8: 84 02 00 02 add %o0, %g2, %g2 <== NOT EXECUTED 40001bfc: 10 80 00 06 b 40001c14 <== NOT EXECUTED 40001c00: 82 10 61 a5 or %g1, 0x1a5, %g1 <== NOT EXECUTED if (*base != U32_PATTERN) 40001c04: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40001c08: 12 80 00 07 bne 40001c24 <== NOT EXECUTED 40001c0c: 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++) 40001c10: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40001c14: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 40001c18: 2a bf ff fb bcs,a 40001c04 <== NOT EXECUTED 40001c1c: c6 02 00 00 ld [ %o0 ], %g3 <== NOT EXECUTED 40001c20: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40001c24: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 40001df0 : * * 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) { 40001df0: 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"); 40001df4: 11 10 00 67 sethi %hi(0x40019c00), %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); 40001df8: e0 06 20 c4 ld [ %i0 + 0xc4 ], %l0 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 40001dfc: 40 00 04 b0 call 400030bc <== NOT EXECUTED 40001e00: 90 12 20 88 or %o0, 0x88, %o0 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 40001e04: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40001e08: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40001e0c: 40 00 04 ac call 400030bc <== NOT EXECUTED 40001e10: 90 12 20 98 or %o0, 0x98, %o0 ! 40019c98 <__FUNCTION__.5614+0x310><== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 40001e14: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED 40001e18: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40001e1c: 40 00 04 a8 call 400030bc <== NOT EXECUTED 40001e20: 90 12 20 b8 or %o0, 0xb8, %o0 ! 40019cb8 <__FUNCTION__.5614+0x330><== NOT EXECUTED printk( 40001e24: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED 40001e28: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40001e2c: 40 00 04 a4 call 400030bc <== NOT EXECUTED 40001e30: 90 12 20 d0 or %o0, 0xd0, %o0 ! 40019cd0 <__FUNCTION__.5614+0x348><== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 40001e34: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40001e38: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED 40001e3c: 40 00 0e 00 call 4000563c <== NOT EXECUTED 40001e40: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED 40001e44: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40001e48: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40001e4c: 40 00 04 9c call 400030bc <== NOT EXECUTED 40001e50: 90 12 20 e8 or %o0, 0xe8, %o0 ! 40019ce8 <__FUNCTION__.5614+0x360><== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 40001e54: d2 06 20 c0 ld [ %i0 + 0xc0 ], %o1 <== NOT EXECUTED 40001e58: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40001e5c: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40001e60: 96 02 80 09 add %o2, %o1, %o3 <== NOT EXECUTED 40001e64: 40 00 04 96 call 400030bc <== NOT EXECUTED 40001e68: 90 12 21 00 or %o0, 0x100, %o0 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 40001e6c: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40001e70: 12 80 00 07 bne 40001e8c <== NOT EXECUTED 40001e74: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED printk( 40001e78: 96 04 20 18 add %l0, 0x18, %o3 <== NOT EXECUTED 40001e7c: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED 40001e80: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED 40001e84: 40 00 04 8e call 400030bc <== NOT EXECUTED 40001e88: 94 04 20 08 add %l0, 8, %o2 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 40001e8c: 40 00 10 21 call 40005f10 <== NOT EXECUTED 40001e90: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED =============================================================================== 40015afc <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 40015afc: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40015b00: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 40015b04: a0 10 00 18 mov %i0, %l0 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40015b08: 80 a6 80 01 cmp %i2, %g1 40015b0c: 18 80 00 17 bgu 40015b68 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN 40015b10: b0 10 20 01 mov 1, %i0 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 40015b14: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40015b18: 80 a0 60 00 cmp %g1, 0 40015b1c: 02 80 00 0a be 40015b44 <_CORE_message_queue_Broadcast+0x48> 40015b20: a2 10 20 00 clr %l1 *count = 0; 40015b24: c0 27 40 00 clr [ %i5 ] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 40015b28: 81 c7 e0 08 ret 40015b2c: 91 e8 20 00 restore %g0, 0, %o0 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015b30: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 40015b34: 40 00 22 0d call 4001e368 40015b38: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40015b3c: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1 40015b40: f4 20 40 00 st %i2, [ %g1 ] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 40015b44: 40 00 09 e6 call 400182dc <_Thread_queue_Dequeue> 40015b48: 90 10 00 10 mov %l0, %o0 40015b4c: 92 10 00 19 mov %i1, %o1 40015b50: a4 10 00 08 mov %o0, %l2 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 40015b54: 80 a2 20 00 cmp %o0, 0 40015b58: 12 bf ff f6 bne 40015b30 <_CORE_message_queue_Broadcast+0x34> 40015b5c: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 40015b60: e2 27 40 00 st %l1, [ %i5 ] 40015b64: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40015b68: 81 c7 e0 08 ret 40015b6c: 81 e8 00 00 restore =============================================================================== 4000f64c <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 4000f64c: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 4000f650: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4000f654: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 4000f658: f6 26 20 4c st %i3, [ %i0 + 0x4c ] /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 4000f65c: 80 8e e0 03 btst 3, %i3 4000f660: 02 80 00 07 be 4000f67c <_CORE_message_queue_Initialize+0x30> 4000f664: a2 10 00 1b mov %i3, %l1 allocated_message_size += sizeof(uint32_t); 4000f668: a2 06 e0 04 add %i3, 4, %l1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 4000f66c: a2 0c 7f fc and %l1, -4, %l1 } if (allocated_message_size < maximum_message_size) 4000f670: 80 a4 40 1b cmp %l1, %i3 4000f674: 0a 80 00 23 bcs 4000f700 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN 4000f678: 01 00 00 00 nop /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 4000f67c: a0 04 60 10 add %l1, 0x10, %l0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 4000f680: 92 10 00 1a mov %i2, %o1 4000f684: 40 00 4a e1 call 40022208 <.umul> 4000f688: 90 10 00 10 mov %l0, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 4000f68c: 80 a2 00 11 cmp %o0, %l1 4000f690: 0a 80 00 1c bcs 4000f700 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN 4000f694: 01 00 00 00 nop return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4000f698: 40 00 0b 7d call 4001248c <_Workspace_Allocate> 4000f69c: 01 00 00 00 nop 4000f6a0: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4000f6a4: 80 a2 20 00 cmp %o0, 0 4000f6a8: 02 80 00 16 be 4000f700 <_CORE_message_queue_Initialize+0xb4> 4000f6ac: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4000f6b0: 90 06 20 60 add %i0, 0x60, %o0 4000f6b4: 94 10 00 1a mov %i2, %o2 4000f6b8: 40 00 13 56 call 40014410 <_Chain_Initialize> 4000f6bc: 96 10 00 10 mov %l0, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4000f6c0: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000f6c4: c0 26 20 54 clr [ %i0 + 0x54 ] 4000f6c8: 82 18 60 01 xor %g1, 1, %g1 4000f6cc: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000f6d0: 82 06 20 54 add %i0, 0x54, %g1 4000f6d4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000f6d8: 82 06 20 50 add %i0, 0x50, %g1 4000f6dc: 90 10 00 18 mov %i0, %o0 4000f6e0: c2 26 20 58 st %g1, [ %i0 + 0x58 ] 4000f6e4: 92 60 3f ff subx %g0, -1, %o1 4000f6e8: 94 10 20 80 mov 0x80, %o2 4000f6ec: 96 10 20 06 mov 6, %o3 4000f6f0: 40 00 08 5a call 40011858 <_Thread_queue_Initialize> 4000f6f4: b0 10 20 01 mov 1, %i0 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4000f6f8: 81 c7 e0 08 ret 4000f6fc: 81 e8 00 00 restore } 4000f700: 81 c7 e0 08 ret 4000f704: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4000f708 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4000f708: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4000f70c: 23 10 00 a7 sethi %hi(0x40029c00), %l1 4000f710: e0 04 62 7c ld [ %l1 + 0x27c ], %l0 ! 40029e7c <_Thread_Executing> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4000f714: a4 10 00 19 mov %i1, %l2 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4000f718: 7f ff de d4 call 40007268 4000f71c: c0 24 20 34 clr [ %l0 + 0x34 ] 4000f720: 82 10 00 08 mov %o0, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000f724: e6 06 20 50 ld [ %i0 + 0x50 ], %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f728: 84 06 20 54 add %i0, 0x54, %g2 4000f72c: 80 a4 c0 02 cmp %l3, %g2 4000f730: 02 80 00 15 be 4000f784 <_CORE_message_queue_Seize+0x7c> 4000f734: 86 06 20 50 add %i0, 0x50, %g3 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000f738: c4 04 c0 00 ld [ %l3 ], %g2 the_chain->first = new_first; 4000f73c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 4000f740: 80 a4 e0 00 cmp %l3, 0 4000f744: 02 80 00 10 be 4000f784 <_CORE_message_queue_Seize+0x7c> <== NEVER TAKEN 4000f748: c6 20 a0 04 st %g3, [ %g2 + 4 ] the_message_queue->number_of_pending_messages -= 1; 4000f74c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000f750: 82 00 7f ff add %g1, -1, %g1 4000f754: c2 26 20 48 st %g1, [ %i0 + 0x48 ] _ISR_Enable( level ); 4000f758: 7f ff de c8 call 40007278 4000f75c: b0 06 20 60 add %i0, 0x60, %i0 *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 4000f760: c2 04 62 7c ld [ %l1 + 0x27c ], %g1 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4000f764: d4 04 e0 08 ld [ %l3 + 8 ], %o2 _Thread_Executing->Wait.count = 4000f768: c0 20 60 24 clr [ %g1 + 0x24 ] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 4000f76c: d4 26 c0 00 st %o2, [ %i3 ] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4000f770: 90 10 00 1a mov %i2, %o0 4000f774: 40 00 1e 0b call 40016fa0 4000f778: 92 04 e0 0c add %l3, 0xc, %o1 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4000f77c: 7f ff ff 83 call 4000f588 <_Chain_Append> 4000f780: 93 e8 00 13 restore %g0, %l3, %o1 return; } #endif } if ( !wait ) { 4000f784: 80 8f 20 ff btst 0xff, %i4 4000f788: 12 80 00 08 bne 4000f7a8 <_CORE_message_queue_Seize+0xa0> 4000f78c: 84 10 20 01 mov 1, %g2 _ISR_Enable( level ); 4000f790: 7f ff de ba call 40007278 4000f794: 90 10 00 01 mov %g1, %o0 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4000f798: 82 10 20 04 mov 4, %g1 4000f79c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4000f7a0: 81 c7 e0 08 ret 4000f7a4: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4000f7a8: c4 26 20 30 st %g2, [ %i0 + 0x30 ] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4000f7ac: f6 24 20 28 st %i3, [ %l0 + 0x28 ] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 4000f7b0: e4 24 20 20 st %l2, [ %l0 + 0x20 ] executing->Wait.return_argument_second.mutable_object = buffer; 4000f7b4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4000f7b8: f0 24 20 44 st %i0, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4000f7bc: 90 10 00 01 mov %g1, %o0 4000f7c0: 7f ff de ae call 40007278 4000f7c4: 35 10 00 46 sethi %hi(0x40011800), %i2 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4000f7c8: b2 10 00 1d mov %i5, %i1 4000f7cc: 40 00 07 7e call 400115c4 <_Thread_queue_Enqueue_with_handler> 4000f7d0: 95 ee a1 24 restore %i2, 0x124, %o2 =============================================================================== 4000605c <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4000605c: 9d e3 bf a0 save %sp, -96, %sp _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 40006060: 03 10 00 6c sethi %hi(0x4001b000), %g1 40006064: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 4001b380 <_Thread_Dispatch_disable_level> 40006068: 80 a0 60 00 cmp %g1, 0 4000606c: 02 80 00 0d be 400060a0 <_CORE_mutex_Seize+0x44> 40006070: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006074: 80 8e a0 ff btst 0xff, %i2 40006078: 02 80 00 0b be 400060a4 <_CORE_mutex_Seize+0x48> <== NEVER TAKEN 4000607c: 90 10 00 18 mov %i0, %o0 40006080: 03 10 00 6d sethi %hi(0x4001b400), %g1 40006084: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current> 40006088: 80 a0 60 01 cmp %g1, 1 4000608c: 08 80 00 05 bleu 400060a0 <_CORE_mutex_Seize+0x44> 40006090: 90 10 20 00 clr %o0 40006094: 92 10 20 00 clr %o1 40006098: 40 00 01 b4 call 40006768 <_Internal_error_Occurred> 4000609c: 94 10 20 13 mov 0x13, %o2 400060a0: 90 10 00 18 mov %i0, %o0 400060a4: 40 00 13 04 call 4000acb4 <_CORE_mutex_Seize_interrupt_trylock> 400060a8: 92 07 a0 54 add %fp, 0x54, %o1 400060ac: 80 a2 20 00 cmp %o0, 0 400060b0: 02 80 00 09 be 400060d4 <_CORE_mutex_Seize+0x78> 400060b4: 80 8e a0 ff btst 0xff, %i2 400060b8: 12 80 00 09 bne 400060dc <_CORE_mutex_Seize+0x80> 400060bc: 35 10 00 6d sethi %hi(0x4001b400), %i2 400060c0: 7f ff ee fa call 40001ca8 400060c4: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 400060c8: c2 06 a0 3c ld [ %i2 + 0x3c ], %g1 400060cc: 84 10 20 01 mov 1, %g2 400060d0: c4 20 60 34 st %g2, [ %g1 + 0x34 ] 400060d4: 81 c7 e0 08 ret 400060d8: 81 e8 00 00 restore 400060dc: c4 06 a0 3c ld [ %i2 + 0x3c ], %g2 400060e0: 03 10 00 6c sethi %hi(0x4001b000), %g1 400060e4: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 ! 4001b380 <_Thread_Dispatch_disable_level> 400060e8: f2 20 a0 20 st %i1, [ %g2 + 0x20 ] 400060ec: f0 20 a0 44 st %i0, [ %g2 + 0x44 ] 400060f0: 84 00 e0 01 add %g3, 1, %g2 400060f4: c4 20 63 80 st %g2, [ %g1 + 0x380 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 400060f8: 82 10 20 01 mov 1, %g1 400060fc: c2 26 20 30 st %g1, [ %i0 + 0x30 ] 40006100: 7f ff ee ea call 40001ca8 40006104: d0 07 a0 54 ld [ %fp + 0x54 ], %o0 40006108: 90 10 00 18 mov %i0, %o0 4000610c: 7f ff ff bb call 40005ff8 <_CORE_mutex_Seize_interrupt_blocking> 40006110: 92 10 00 1b mov %i3, %o1 40006114: 81 c7 e0 08 ret 40006118: 81 e8 00 00 restore =============================================================================== 4000acb4 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 4000acb4: 9d e3 bf a0 save %sp, -96, %sp { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 4000acb8: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000acbc: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000acc0: c0 20 60 34 clr [ %g1 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000acc4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 4000acc8: 80 a0 a0 00 cmp %g2, 0 4000accc: 22 80 00 31 be,a 4000ad90 <_CORE_mutex_Seize_interrupt_trylock+0xdc> 4000acd0: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 the_mutex->lock = CORE_MUTEX_LOCKED; 4000acd4: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000acd8: c6 00 60 08 ld [ %g1 + 8 ], %g3 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000acdc: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000ace0: c6 26 20 60 st %g3, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000ace4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000ace8: 86 10 20 01 mov 1, %g3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000acec: 80 a0 a0 02 cmp %g2, 2 4000acf0: 02 80 00 05 be 4000ad04 <_CORE_mutex_Seize_interrupt_trylock+0x50> 4000acf4: c6 26 20 54 st %g3, [ %i0 + 0x54 ] 4000acf8: 80 a0 a0 03 cmp %g2, 3 4000acfc: 12 80 00 07 bne 4000ad18 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000ad00: 01 00 00 00 nop _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000ad04: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000ad08: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000ad0c: 84 00 e0 01 add %g3, 1, %g2 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000ad10: 02 80 00 03 be 4000ad1c <_CORE_mutex_Seize_interrupt_trylock+0x68> 4000ad14: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000ad18: 30 80 00 2d b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000ad1c: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000ad20: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 if ( current == ceiling ) { 4000ad24: 80 a0 c0 02 cmp %g3, %g2 4000ad28: 12 80 00 03 bne 4000ad34 <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000ad2c: 01 00 00 00 nop _ISR_Enable( *level_p ); 4000ad30: 30 80 00 27 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 4000ad34: 08 80 00 0f bleu 4000ad70 <_CORE_mutex_Seize_interrupt_trylock+0xbc> 4000ad38: 84 10 20 06 mov 6, %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ad3c: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000ad40: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level> 4000ad44: 84 00 a0 01 inc %g2 4000ad48: c4 20 63 80 st %g2, [ %g1 + 0x380 ] _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 4000ad4c: 7f ff db d7 call 40001ca8 4000ad50: d0 06 40 00 ld [ %i1 ], %o0 _Thread_Change_priority( 4000ad54: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000ad58: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000ad5c: 7f ff f0 c1 call 40007060 <_Thread_Change_priority> 4000ad60: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 4000ad64: 7f ff f2 2f call 40007620 <_Thread_Enable_dispatch> 4000ad68: b0 10 20 00 clr %i0 4000ad6c: 30 80 00 1b b,a 4000add8 <_CORE_mutex_Seize_interrupt_trylock+0x124> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000ad70: c4 20 60 34 st %g2, [ %g1 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ad74: 84 10 20 01 mov 1, %g2 the_mutex->nest_count = 0; /* undo locking above */ 4000ad78: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000ad7c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000ad80: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 4000ad84: 84 00 bf ff add %g2, -1, %g2 4000ad88: c4 20 60 1c st %g2, [ %g1 + 0x1c ] _ISR_Enable( *level_p ); 4000ad8c: 30 80 00 10 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000ad90: 80 a0 80 01 cmp %g2, %g1 4000ad94: 12 80 00 13 bne 4000ade0 <_CORE_mutex_Seize_interrupt_trylock+0x12c> 4000ad98: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000ad9c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000ada0: 80 a0 60 00 cmp %g1, 0 4000ada4: 22 80 00 07 be,a 4000adc0 <_CORE_mutex_Seize_interrupt_trylock+0x10c> 4000ada8: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000adac: 80 a0 60 01 cmp %g1, 1 4000adb0: 12 80 00 0c bne 4000ade0 <_CORE_mutex_Seize_interrupt_trylock+0x12c><== ALWAYS TAKEN 4000adb4: 82 10 20 02 mov 2, %g1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000adb8: 10 80 00 05 b 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118><== NOT EXECUTED 4000adbc: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000adc0: 82 00 60 01 inc %g1 4000adc4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( *level_p ); 4000adc8: 30 80 00 01 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 4000adcc: 7f ff db b7 call 40001ca8 4000add0: d0 06 40 00 ld [ %i1 ], %o0 4000add4: b0 10 20 00 clr %i0 4000add8: 81 c7 e0 08 ret 4000addc: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000ade0: 81 c7 e0 08 ret 4000ade4: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 400062c0 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 400062c0: 9d e3 bf a0 save %sp, -96, %sp 400062c4: a0 10 00 18 mov %i0, %l0 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 400062c8: b0 10 20 00 clr %i0 400062cc: 40 00 05 b9 call 400079b0 <_Thread_queue_Dequeue> 400062d0: 90 10 00 10 mov %l0, %o0 400062d4: 80 a2 20 00 cmp %o0, 0 400062d8: 12 80 00 0e bne 40006310 <_CORE_semaphore_Surrender+0x50> 400062dc: 01 00 00 00 nop if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 400062e0: 7f ff ee 6e call 40001c98 400062e4: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 400062e8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400062ec: c4 04 20 40 ld [ %l0 + 0x40 ], %g2 400062f0: 80 a0 40 02 cmp %g1, %g2 400062f4: 1a 80 00 05 bcc 40006308 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN 400062f8: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 400062fc: 82 00 60 01 inc %g1 40006300: b0 10 20 00 clr %i0 40006304: c2 24 20 48 st %g1, [ %l0 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 40006308: 7f ff ee 68 call 40001ca8 4000630c: 01 00 00 00 nop } return status; } 40006310: 81 c7 e0 08 ret 40006314: 81 e8 00 00 restore =============================================================================== 40004f58 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 40004f58: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 40004f5c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40004f60: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40004f64: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 40004f68: 7f ff f3 4c call 40001c98 40004f6c: e4 04 21 5c ld [ %l0 + 0x15c ], %l2 pending_events = api->pending_events; 40004f70: c2 04 80 00 ld [ %l2 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 40004f74: a2 8e 00 01 andcc %i0, %g1, %l1 40004f78: 02 80 00 0e be 40004fb0 <_Event_Seize+0x58> 40004f7c: 80 8e 60 01 btst 1, %i1 40004f80: 80 a4 40 18 cmp %l1, %i0 40004f84: 02 80 00 04 be 40004f94 <_Event_Seize+0x3c> 40004f88: 80 8e 60 02 btst 2, %i1 40004f8c: 02 80 00 09 be 40004fb0 <_Event_Seize+0x58> <== NEVER TAKEN 40004f90: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 40004f94: 82 28 40 11 andn %g1, %l1, %g1 40004f98: c2 24 80 00 st %g1, [ %l2 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 40004f9c: 7f ff f3 43 call 40001ca8 40004fa0: 01 00 00 00 nop 40004fa4: e2 26 c0 00 st %l1, [ %i3 ] 40004fa8: 81 c7 e0 08 ret 40004fac: 81 e8 00 00 restore *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 40004fb0: 22 80 00 09 be,a 40004fd4 <_Event_Seize+0x7c> 40004fb4: f2 24 20 30 st %i1, [ %l0 + 0x30 ] _ISR_Enable( level ); 40004fb8: 7f ff f3 3c call 40001ca8 40004fbc: 01 00 00 00 nop executing->Wait.return_code = RTEMS_UNSATISFIED; 40004fc0: 82 10 20 0d mov 0xd, %g1 ! d 40004fc4: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 40004fc8: e2 26 c0 00 st %l1, [ %i3 ] 40004fcc: 81 c7 e0 08 ret 40004fd0: 81 e8 00 00 restore * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in; 40004fd4: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 40004fd8: f6 24 20 28 st %i3, [ %l0 + 0x28 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40004fdc: 84 10 20 01 mov 1, %g2 40004fe0: 03 10 00 6d sethi %hi(0x4001b400), %g1 40004fe4: c4 20 62 08 st %g2, [ %g1 + 0x208 ] ! 4001b608 <_Event_Sync_state> _ISR_Enable( level ); 40004fe8: 7f ff f3 30 call 40001ca8 40004fec: 01 00 00 00 nop if ( ticks ) { 40004ff0: 80 a6 a0 00 cmp %i2, 0 40004ff4: 02 80 00 0f be 40005030 <_Event_Seize+0xd8> 40004ff8: 90 10 00 10 mov %l0, %o0 _Watchdog_Initialize( 40004ffc: c2 04 20 08 ld [ %l0 + 8 ], %g1 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005000: 11 10 00 6d sethi %hi(0x4001b400), %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40005004: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40005008: 03 10 00 14 sethi %hi(0x40005000), %g1 4000500c: 82 10 62 04 or %g1, 0x204, %g1 ! 40005204 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40005010: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40005014: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40005018: c0 24 20 6c clr [ %l0 + 0x6c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000501c: c2 24 20 64 st %g1, [ %l0 + 0x64 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005020: 90 12 20 5c or %o0, 0x5c, %o0 40005024: 40 00 0d ba call 4000870c <_Watchdog_Insert> 40005028: 92 04 20 48 add %l0, 0x48, %o1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4000502c: 90 10 00 10 mov %l0, %o0 40005030: 40 00 0b c5 call 40007f44 <_Thread_Set_state> 40005034: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 40005038: 7f ff f3 18 call 40001c98 4000503c: 01 00 00 00 nop sync_state = _Event_Sync_state; 40005040: 03 10 00 6d sethi %hi(0x4001b400), %g1 40005044: f0 00 62 08 ld [ %g1 + 0x208 ], %i0 ! 4001b608 <_Event_Sync_state> _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 40005048: c0 20 62 08 clr [ %g1 + 0x208 ] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4000504c: 80 a6 20 01 cmp %i0, 1 40005050: 12 80 00 04 bne 40005060 <_Event_Seize+0x108> 40005054: b2 10 00 10 mov %l0, %i1 _ISR_Enable( level ); 40005058: 7f ff f3 14 call 40001ca8 4000505c: 91 e8 00 08 restore %g0, %o0, %o0 * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 40005060: 40 00 07 eb call 4000700c <_Thread_blocking_operation_Cancel> 40005064: 95 e8 00 08 restore %g0, %o0, %o2 =============================================================================== 400050c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 400050c4: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 400050c8: e2 06 21 5c ld [ %i0 + 0x15c ], %l1 option_set = (rtems_option) the_thread->Wait.option; 400050cc: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 400050d0: 7f ff f2 f2 call 40001c98 400050d4: a0 10 00 18 mov %i0, %l0 400050d8: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 400050dc: c4 04 40 00 ld [ %l1 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 400050e0: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 400050e4: 82 88 c0 02 andcc %g3, %g2, %g1 400050e8: 12 80 00 03 bne 400050f4 <_Event_Surrender+0x30> 400050ec: 09 10 00 6d sethi %hi(0x4001b400), %g4 _ISR_Enable( level ); 400050f0: 30 80 00 42 b,a 400051f8 <_Event_Surrender+0x134> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 400050f4: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 ! 4001b418 <_ISR_Nest_level> 400050f8: 80 a1 20 00 cmp %g4, 0 400050fc: 22 80 00 1e be,a 40005174 <_Event_Surrender+0xb0> 40005100: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 40005104: 09 10 00 6d sethi %hi(0x4001b400), %g4 40005108: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 ! 4001b43c <_Thread_Executing> 4000510c: 80 a4 00 04 cmp %l0, %g4 40005110: 32 80 00 19 bne,a 40005174 <_Event_Surrender+0xb0> 40005114: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 40005118: 09 10 00 6d sethi %hi(0x4001b400), %g4 4000511c: da 01 22 08 ld [ %g4 + 0x208 ], %o5 ! 4001b608 <_Event_Sync_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 40005120: 80 a3 60 02 cmp %o5, 2 40005124: 02 80 00 07 be 40005140 <_Event_Surrender+0x7c> <== NEVER TAKEN 40005128: 80 a0 40 03 cmp %g1, %g3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4000512c: c8 01 22 08 ld [ %g4 + 0x208 ], %g4 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 40005130: 80 a1 20 01 cmp %g4, 1 40005134: 32 80 00 10 bne,a 40005174 <_Event_Surrender+0xb0> 40005138: c8 04 20 10 ld [ %l0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4000513c: 80 a0 40 03 cmp %g1, %g3 40005140: 02 80 00 04 be 40005150 <_Event_Surrender+0x8c> 40005144: 80 8c a0 02 btst 2, %l2 40005148: 02 80 00 0a be 40005170 <_Event_Surrender+0xac> <== NEVER TAKEN 4000514c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40005150: 84 28 80 01 andn %g2, %g1, %g2 40005154: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005158: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 4000515c: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005160: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40005164: 84 10 20 03 mov 3, %g2 40005168: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000516c: c4 20 62 08 st %g2, [ %g1 + 0x208 ] ! 4001b608 <_Event_Sync_state> } _ISR_Enable( level ); 40005170: 30 80 00 22 b,a 400051f8 <_Event_Surrender+0x134> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40005174: 80 89 21 00 btst 0x100, %g4 40005178: 02 80 00 20 be 400051f8 <_Event_Surrender+0x134> 4000517c: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40005180: 02 80 00 04 be 40005190 <_Event_Surrender+0xcc> 40005184: 80 8c a0 02 btst 2, %l2 40005188: 02 80 00 1c be 400051f8 <_Event_Surrender+0x134> <== NEVER TAKEN 4000518c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 40005190: 84 28 80 01 andn %g2, %g1, %g2 40005194: c4 24 40 00 st %g2, [ %l1 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40005198: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 4000519c: c0 24 20 24 clr [ %l0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400051a0: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 400051a4: 7f ff f2 c1 call 40001ca8 400051a8: 90 10 00 18 mov %i0, %o0 400051ac: 7f ff f2 bb call 40001c98 400051b0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400051b4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400051b8: 80 a0 60 02 cmp %g1, 2 400051bc: 02 80 00 06 be 400051d4 <_Event_Surrender+0x110> 400051c0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 400051c4: 7f ff f2 b9 call 40001ca8 400051c8: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400051cc: 10 80 00 08 b 400051ec <_Event_Surrender+0x128> 400051d0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 400051d4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 400051d8: 7f ff f2 b4 call 40001ca8 400051dc: 90 10 00 18 mov %i0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 400051e0: 40 00 0d a8 call 40008880 <_Watchdog_Remove> 400051e4: 90 04 20 48 add %l0, 0x48, %o0 400051e8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 400051ec: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 400051f0: 40 00 08 15 call 40007244 <_Thread_Clear_state> 400051f4: 91 e8 00 10 restore %g0, %l0, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 400051f8: 7f ff f2 ac call 40001ca8 400051fc: 81 e8 00 00 restore =============================================================================== 40005204 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005204: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 40005208: 90 10 00 18 mov %i0, %o0 4000520c: 40 00 09 12 call 40007654 <_Thread_Get> 40005210: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 40005214: c2 07 bf fc ld [ %fp + -4 ], %g1 40005218: 80 a0 60 00 cmp %g1, 0 4000521c: 12 80 00 1c bne 4000528c <_Event_Timeout+0x88> <== NEVER TAKEN 40005220: a0 10 00 08 mov %o0, %l0 * * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 40005224: 7f ff f2 9d call 40001c98 40005228: 01 00 00 00 nop return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 4000522c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40005230: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing> 40005234: 80 a4 00 01 cmp %l0, %g1 40005238: 12 80 00 09 bne 4000525c <_Event_Timeout+0x58> 4000523c: c0 24 20 24 clr [ %l0 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 40005240: 03 10 00 6d sethi %hi(0x4001b400), %g1 40005244: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 ! 4001b608 <_Event_Sync_state> 40005248: 80 a0 a0 01 cmp %g2, 1 4000524c: 32 80 00 05 bne,a 40005260 <_Event_Timeout+0x5c> 40005250: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40005254: 84 10 20 02 mov 2, %g2 40005258: c4 20 62 08 st %g2, [ %g1 + 0x208 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4000525c: 82 10 20 06 mov 6, %g1 40005260: c2 24 20 34 st %g1, [ %l0 + 0x34 ] _ISR_Enable( level ); 40005264: 7f ff f2 91 call 40001ca8 40005268: 01 00 00 00 nop 4000526c: 90 10 00 10 mov %l0, %o0 40005270: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40005274: 40 00 07 f4 call 40007244 <_Thread_Clear_state> 40005278: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000527c: 03 10 00 6c sethi %hi(0x4001b000), %g1 40005280: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level> 40005284: 84 00 bf ff add %g2, -1, %g2 40005288: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 4000528c: 81 c7 e0 08 ret 40005290: 81 e8 00 00 restore =============================================================================== 4000aee0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4000aee0: 9d e3 bf 90 save %sp, -112, %sp Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; 4000aee4: ac 06 60 04 add %i1, 4, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4000aee8: e4 06 20 08 ld [ %i0 + 8 ], %l2 uintptr_t const page_size = heap->page_size; uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 4000aeec: 80 a5 80 19 cmp %l6, %i1 4000aef0: 0a 80 00 6d bcs 4000b0a4 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000aef4: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4000aef8: 80 a6 e0 00 cmp %i3, 0 4000aefc: 02 80 00 08 be 4000af1c <_Heap_Allocate_aligned_with_boundary+0x3c> 4000af00: 82 10 20 04 mov 4, %g1 if ( boundary < alloc_size ) { 4000af04: 80 a6 c0 19 cmp %i3, %i1 4000af08: 0a 80 00 67 bcs 4000b0a4 <_Heap_Allocate_aligned_with_boundary+0x1c4> 4000af0c: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 4000af10: 22 80 00 03 be,a 4000af1c <_Heap_Allocate_aligned_with_boundary+0x3c> 4000af14: b4 10 00 14 mov %l4, %i2 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000af18: 82 10 20 04 mov 4, %g1 4000af1c: 82 20 40 19 sub %g1, %i1, %g1 if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4000af20: a2 10 20 00 clr %l1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000af24: c2 27 bf f4 st %g1, [ %fp + -12 ] /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4000af28: b8 10 3f f8 mov -8, %i4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000af2c: 82 05 20 07 add %l4, 7, %g1 4000af30: 10 80 00 4b b 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c> 4000af34: c2 27 bf f8 st %g1, [ %fp + -8 ] /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4000af38: 80 a4 c0 16 cmp %l3, %l6 4000af3c: 08 80 00 47 bleu 4000b058 <_Heap_Allocate_aligned_with_boundary+0x178> 4000af40: a2 04 60 01 inc %l1 if ( alignment == 0 ) { 4000af44: 80 a6 a0 00 cmp %i2, 0 4000af48: 12 80 00 04 bne 4000af58 <_Heap_Allocate_aligned_with_boundary+0x78> 4000af4c: aa 04 a0 08 add %l2, 8, %l5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4000af50: 10 80 00 3f b 4000b04c <_Heap_Allocate_aligned_with_boundary+0x16c> 4000af54: a0 10 00 15 mov %l5, %l0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000af58: c4 07 bf f4 ld [ %fp + -12 ], %g2 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 4000af5c: ee 06 20 14 ld [ %i0 + 0x14 ], %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4000af60: a6 0c ff fe and %l3, -2, %l3 4000af64: a6 04 80 13 add %l2, %l3, %l3 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 4000af68: a0 00 80 13 add %g2, %l3, %l0 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4000af6c: c4 07 bf f8 ld [ %fp + -8 ], %g2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4000af70: 90 10 00 10 mov %l0, %o0 4000af74: 82 20 80 17 sub %g2, %l7, %g1 4000af78: 92 10 00 1a mov %i2, %o1 4000af7c: 40 00 2e f1 call 40016b40 <.urem> 4000af80: a6 00 40 13 add %g1, %l3, %l3 4000af84: a0 24 00 08 sub %l0, %o0, %l0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4000af88: 80 a4 00 13 cmp %l0, %l3 4000af8c: 08 80 00 07 bleu 4000afa8 <_Heap_Allocate_aligned_with_boundary+0xc8> 4000af90: 80 a6 e0 00 cmp %i3, 0 4000af94: 90 10 00 13 mov %l3, %o0 4000af98: 40 00 2e ea call 40016b40 <.urem> 4000af9c: 92 10 00 1a mov %i2, %o1 4000afa0: a0 24 c0 08 sub %l3, %o0, %l0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4000afa4: 80 a6 e0 00 cmp %i3, 0 4000afa8: 02 80 00 1d be 4000b01c <_Heap_Allocate_aligned_with_boundary+0x13c> 4000afac: 80 a4 00 15 cmp %l0, %l5 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4000afb0: a6 04 00 19 add %l0, %i1, %l3 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4000afb4: 82 05 40 19 add %l5, %i1, %g1 4000afb8: 92 10 00 1b mov %i3, %o1 4000afbc: 90 10 00 13 mov %l3, %o0 4000afc0: 10 80 00 0b b 4000afec <_Heap_Allocate_aligned_with_boundary+0x10c> 4000afc4: c2 27 bf fc st %g1, [ %fp + -4 ] uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4000afc8: 80 a0 40 02 cmp %g1, %g2 4000afcc: 2a 80 00 24 bcs,a 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c> 4000afd0: e4 04 a0 08 ld [ %l2 + 8 ], %l2 4000afd4: 40 00 2e db call 40016b40 <.urem> 4000afd8: 01 00 00 00 nop 4000afdc: 92 10 00 1b mov %i3, %o1 4000afe0: a0 27 40 08 sub %i5, %o0, %l0 return 0; } alloc_begin = boundary_line - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4000afe4: a6 04 00 19 add %l0, %i1, %l3 4000afe8: 90 10 00 13 mov %l3, %o0 4000afec: 40 00 2e d5 call 40016b40 <.urem> 4000aff0: 01 00 00 00 nop 4000aff4: 92 10 00 1a mov %i2, %o1 4000aff8: 82 24 c0 08 sub %l3, %o0, %g1 while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; } alloc_begin = boundary_line - alloc_size; 4000affc: ba 20 40 19 sub %g1, %i1, %i5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4000b000: 80 a0 40 13 cmp %g1, %l3 4000b004: 1a 80 00 05 bcc 4000b018 <_Heap_Allocate_aligned_with_boundary+0x138> 4000b008: 90 10 00 1d mov %i5, %o0 4000b00c: 80 a4 00 01 cmp %l0, %g1 4000b010: 0a bf ff ee bcs 4000afc8 <_Heap_Allocate_aligned_with_boundary+0xe8> 4000b014: c4 07 bf fc ld [ %fp + -4 ], %g2 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4000b018: 80 a4 00 15 cmp %l0, %l5 4000b01c: 0a 80 00 0f bcs 4000b058 <_Heap_Allocate_aligned_with_boundary+0x178> 4000b020: a6 27 00 12 sub %i4, %l2, %l3 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4000b024: 90 10 00 10 mov %l0, %o0 4000b028: a6 04 c0 10 add %l3, %l0, %l3 4000b02c: 40 00 2e c5 call 40016b40 <.urem> 4000b030: 92 10 00 14 mov %l4, %o1 if ( free_size >= min_block_size || free_size == 0 ) { 4000b034: 90 a4 c0 08 subcc %l3, %o0, %o0 4000b038: 02 80 00 06 be 4000b050 <_Heap_Allocate_aligned_with_boundary+0x170> 4000b03c: 80 a4 20 00 cmp %l0, 0 4000b040: 80 a2 00 17 cmp %o0, %l7 4000b044: 2a 80 00 06 bcs,a 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c> 4000b048: e4 04 a0 08 ld [ %l2 + 8 ], %l2 boundary ); } } if ( alloc_begin != 0 ) { 4000b04c: 80 a4 20 00 cmp %l0, 0 4000b050: 32 80 00 08 bne,a 4000b070 <_Heap_Allocate_aligned_with_boundary+0x190><== ALWAYS TAKEN 4000b054: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 break; } block = block->next; 4000b058: e4 04 a0 08 ld [ %l2 + 8 ], %l2 if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 4000b05c: 80 a4 80 18 cmp %l2, %i0 4000b060: 32 bf ff b6 bne,a 4000af38 <_Heap_Allocate_aligned_with_boundary+0x58> 4000b064: e6 04 a0 04 ld [ %l2 + 4 ], %l3 4000b068: 10 80 00 09 b 4000b08c <_Heap_Allocate_aligned_with_boundary+0x1ac> 4000b06c: a0 10 20 00 clr %l0 if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000b070: 92 10 00 12 mov %l2, %o1 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000b074: 82 00 40 11 add %g1, %l1, %g1 block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000b078: 96 10 00 19 mov %i1, %o3 block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 4000b07c: c2 26 20 4c st %g1, [ %i0 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4000b080: 90 10 00 18 mov %i0, %o0 4000b084: 7f ff ed 68 call 40006624 <_Heap_Block_allocate> 4000b088: 94 10 00 10 mov %l0, %o2 uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 4000b08c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000b090: 80 a0 40 11 cmp %g1, %l1 4000b094: 2a 80 00 02 bcs,a 4000b09c <_Heap_Allocate_aligned_with_boundary+0x1bc> 4000b098: e2 26 20 44 st %l1, [ %i0 + 0x44 ] /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; 4000b09c: 81 c7 e0 08 ret 4000b0a0: 91 e8 00 10 restore %g0, %l0, %o0 } 4000b0a4: 81 c7 e0 08 ret 4000b0a8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400104dc <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 400104dc: 9d e3 bf a0 save %sp, -96, %sp Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 400104e0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 400104e4: a0 10 00 18 mov %i0, %l0 * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 400104e8: 80 a6 40 01 cmp %i1, %g1 400104ec: 1a 80 00 07 bcc 40010508 <_Heap_Extend+0x2c> 400104f0: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 400104f4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 400104f8: 80 a6 40 02 cmp %i1, %g2 400104fc: 1a 80 00 28 bcc 4001059c <_Heap_Extend+0xc0> 40010500: b0 10 20 01 mov 1, %i0 * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 40010504: 80 a6 40 01 cmp %i1, %g1 40010508: 12 80 00 25 bne 4001059c <_Heap_Extend+0xc0> 4001050c: b0 10 20 02 mov 2, %i0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 40010510: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 40010514: b4 06 40 1a add %i1, %i2, %i2 * block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end 40010518: b2 26 80 11 sub %i2, %l1, %i1 * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 4001051c: f4 24 20 1c st %i2, [ %l0 + 0x1c ] extend_size = new_heap_area_end 40010520: b2 06 7f f8 add %i1, -8, %i1 40010524: 7f ff cf 09 call 40004148 <.urem> 40010528: 90 10 00 19 mov %i1, %o0 4001052c: 90 26 40 08 sub %i1, %o0, %o0 - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 40010530: d0 26 c0 00 st %o0, [ %i3 ] if( extend_size >= heap->min_block_size ) { 40010534: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40010538: 80 a2 00 01 cmp %o0, %g1 4001053c: 0a 80 00 18 bcs 4001059c <_Heap_Extend+0xc0> <== NEVER TAKEN 40010540: b0 10 20 00 clr %i0 uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 40010544: c2 04 60 04 ld [ %l1 + 4 ], %g1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 40010548: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 4001054c: 82 08 60 01 and %g1, 1, %g1 40010550: 82 12 00 01 or %o0, %g1, %g1 40010554: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 40010558: 82 02 00 11 add %o0, %l1, %g1 4001055c: 84 20 80 01 sub %g2, %g1, %g2 40010560: 84 10 a0 01 or %g2, 1, %g2 40010564: c4 20 60 04 st %g2, [ %g1 + 4 ] heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 40010568: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4001056c: f2 04 20 2c ld [ %l0 + 0x2c ], %i1 ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 40010570: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 new_last_block->size_and_flag = ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 40010574: c2 24 20 24 st %g1, [ %l0 + 0x24 ] /* Statistics */ stats->size += extend_size; ++stats->used_blocks; 40010578: 82 00 e0 01 add %g3, 1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 4001057c: 90 06 40 08 add %i1, %o0, %o0 ++stats->used_blocks; 40010580: c2 24 20 40 st %g1, [ %l0 + 0x40 ] --stats->frees; /* Do not count subsequent call as actual free() */ 40010584: 82 00 bf ff add %g2, -1, %g1 | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size; 40010588: d0 24 20 2c st %o0, [ %l0 + 0x2c ] ++stats->used_blocks; --stats->frees; /* Do not count subsequent call as actual free() */ 4001058c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 40010590: 90 10 00 10 mov %l0, %o0 40010594: 7f ff ea fa call 4000b17c <_Heap_Free> 40010598: 92 04 60 08 add %l1, 8, %o1 } return HEAP_EXTEND_SUCCESSFUL; } 4001059c: 81 c7 e0 08 ret 400105a0: 81 e8 00 00 restore =============================================================================== 4000b0ac <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4000b0ac: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4000b0b0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4000b0b4: 40 00 2e a3 call 40016b40 <.urem> 4000b0b8: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4000b0bc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4000b0c0: b2 06 7f f8 add %i1, -8, %i1 4000b0c4: 90 26 40 08 sub %i1, %o0, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000b0c8: 80 a2 00 01 cmp %o0, %g1 4000b0cc: 0a 80 00 05 bcs 4000b0e0 <_Heap_Free+0x34> 4000b0d0: 84 10 20 00 clr %g2 4000b0d4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 4000b0d8: 80 a0 80 08 cmp %g2, %o0 4000b0dc: 84 60 3f ff subx %g0, -1, %g2 Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 4000b0e0: 80 a0 a0 00 cmp %g2, 0 4000b0e4: 02 80 00 6a be 4000b28c <_Heap_Free+0x1e0> 4000b0e8: 01 00 00 00 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4000b0ec: c8 02 20 04 ld [ %o0 + 4 ], %g4 4000b0f0: 86 09 3f fe and %g4, -2, %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4000b0f4: 84 02 00 03 add %o0, %g3, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000b0f8: 80 a0 80 01 cmp %g2, %g1 4000b0fc: 0a 80 00 05 bcs 4000b110 <_Heap_Free+0x64> <== NEVER TAKEN 4000b100: 9a 10 20 00 clr %o5 4000b104: da 06 20 24 ld [ %i0 + 0x24 ], %o5 4000b108: 80 a3 40 02 cmp %o5, %g2 4000b10c: 9a 60 3f ff subx %g0, -1, %o5 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4000b110: 80 a3 60 00 cmp %o5, 0 4000b114: 02 80 00 5e be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN 4000b118: 01 00 00 00 nop block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4000b11c: da 00 a0 04 ld [ %g2 + 4 ], %o5 _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4000b120: 80 8b 60 01 btst 1, %o5 4000b124: 02 80 00 5a be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN 4000b128: 9a 0b 7f fe and %o5, -2, %o5 return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4000b12c: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4000b130: 80 a0 80 09 cmp %g2, %o1 4000b134: 02 80 00 06 be 4000b14c <_Heap_Free+0xa0> 4000b138: 96 10 20 00 clr %o3 4000b13c: 98 00 80 0d add %g2, %o5, %o4 4000b140: d6 03 20 04 ld [ %o4 + 4 ], %o3 4000b144: 96 0a e0 01 and %o3, 1, %o3 4000b148: 96 1a e0 01 xor %o3, 1, %o3 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4000b14c: 80 89 20 01 btst 1, %g4 4000b150: 12 80 00 26 bne 4000b1e8 <_Heap_Free+0x13c> 4000b154: 80 a2 e0 00 cmp %o3, 0 uintptr_t const prev_size = block->prev_size; 4000b158: d8 02 00 00 ld [ %o0 ], %o4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4000b15c: 88 22 00 0c sub %o0, %o4, %g4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4000b160: 80 a1 00 01 cmp %g4, %g1 4000b164: 0a 80 00 04 bcs 4000b174 <_Heap_Free+0xc8> <== NEVER TAKEN 4000b168: 94 10 20 00 clr %o2 4000b16c: 80 a2 40 04 cmp %o1, %g4 4000b170: 94 60 3f ff subx %g0, -1, %o2 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 4000b174: 80 a2 a0 00 cmp %o2, 0 4000b178: 02 80 00 45 be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN 4000b17c: 01 00 00 00 nop return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4000b180: c2 01 20 04 ld [ %g4 + 4 ], %g1 4000b184: 80 88 60 01 btst 1, %g1 4000b188: 02 80 00 41 be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN 4000b18c: 80 a2 e0 00 cmp %o3, 0 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4000b190: 22 80 00 0f be,a 4000b1cc <_Heap_Free+0x120> 4000b194: 98 00 c0 0c add %g3, %o4, %o4 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4000b198: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000b19c: d6 00 a0 0c ld [ %g2 + 0xc ], %o3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4000b1a0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 4000b1a4: 82 00 7f ff add %g1, -1, %g1 4000b1a8: c2 26 20 38 st %g1, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4000b1ac: 9a 00 c0 0d add %g3, %o5, %o5 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 4000b1b0: d6 20 a0 0c st %o3, [ %g2 + 0xc ] 4000b1b4: 98 03 40 0c add %o5, %o4, %o4 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4000b1b8: c4 22 e0 08 st %g2, [ %o3 + 8 ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4000b1bc: d8 21 00 0c st %o4, [ %g4 + %o4 ] if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000b1c0: 98 13 20 01 or %o4, 1, %o4 4000b1c4: 10 80 00 27 b 4000b260 <_Heap_Free+0x1b4> 4000b1c8: d8 21 20 04 st %o4, [ %g4 + 4 ] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000b1cc: 82 13 20 01 or %o4, 1, %g1 4000b1d0: c2 21 20 04 st %g1, [ %g4 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000b1d4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 next_block->prev_size = size; 4000b1d8: d8 22 00 03 st %o4, [ %o0 + %g3 ] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000b1dc: 82 08 7f fe and %g1, -2, %g1 4000b1e0: 10 80 00 20 b 4000b260 <_Heap_Free+0x1b4> 4000b1e4: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4000b1e8: 02 80 00 0d be 4000b21c <_Heap_Free+0x170> 4000b1ec: 82 10 e0 01 or %g3, 1, %g1 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; 4000b1f0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4000b1f4: c4 00 a0 08 ld [ %g2 + 8 ], %g2 Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; 4000b1f8: c2 22 20 0c st %g1, [ %o0 + 0xc ] ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4000b1fc: c4 22 20 08 st %g2, [ %o0 + 8 ] new_block->prev = prev; next->prev = new_block; prev->next = new_block; 4000b200: d0 20 60 08 st %o0, [ %g1 + 8 ] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4000b204: d0 20 a0 0c st %o0, [ %g2 + 0xc ] uintptr_t const size = block_size + next_block_size; 4000b208: 82 03 40 03 add %o5, %g3, %g1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4000b20c: c2 22 00 01 st %g1, [ %o0 + %g1 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4000b210: 82 10 60 01 or %g1, 1, %g1 4000b214: 10 80 00 13 b 4000b260 <_Heap_Free+0x1b4> 4000b218: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4000b21c: c2 22 20 04 st %g1, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000b220: c2 00 a0 04 ld [ %g2 + 4 ], %g1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4000b224: c8 06 20 08 ld [ %i0 + 8 ], %g4 4000b228: 82 08 7f fe and %g1, -2, %g1 next_block->prev_size = block_size; 4000b22c: c6 22 00 03 st %g3, [ %o0 + %g3 ] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4000b230: c2 20 a0 04 st %g1, [ %g2 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4000b234: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 new_block->next = next; 4000b238: c8 22 20 08 st %g4, [ %o0 + 8 ] new_block->prev = block_before; 4000b23c: f0 22 20 0c st %i0, [ %o0 + 0xc ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4000b240: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4000b244: 82 00 60 01 inc %g1 block_before->next = new_block; next->prev = new_block; 4000b248: d0 21 20 0c st %o0, [ %g4 + 0xc ] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4000b24c: d0 26 20 08 st %o0, [ %i0 + 8 ] #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 4000b250: 80 a0 80 01 cmp %g2, %g1 4000b254: 1a 80 00 03 bcc 4000b260 <_Heap_Free+0x1b4> 4000b258: c2 26 20 38 st %g1, [ %i0 + 0x38 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4000b25c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 4000b260: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 4000b264: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 4000b268: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4000b26c: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; stats->free_size += block_size; 4000b270: 86 01 00 03 add %g4, %g3, %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4000b274: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; stats->free_size += block_size; 4000b278: c6 26 20 30 st %g3, [ %i0 + 0x30 ] } } /* Statistics */ --stats->used_blocks; ++stats->frees; 4000b27c: 82 00 60 01 inc %g1 4000b280: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; return( true ); 4000b284: 81 c7 e0 08 ret 4000b288: 91 e8 20 01 restore %g0, 1, %o0 } 4000b28c: 81 c7 e0 08 ret 4000b290: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4001933c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 4001933c: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 40019340: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40019344: 7f ff f5 ff call 40016b40 <.urem> 40019348: 90 10 00 19 mov %i1, %o0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4001934c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 40019350: 84 06 7f f8 add %i1, -8, %g2 40019354: 90 20 80 08 sub %g2, %o0, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40019358: 80 a2 00 01 cmp %o0, %g1 4001935c: 0a 80 00 05 bcs 40019370 <_Heap_Size_of_alloc_area+0x34> 40019360: 84 10 20 00 clr %g2 40019364: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 40019368: 80 a0 80 08 cmp %g2, %o0 4001936c: 84 60 3f ff subx %g0, -1, %g2 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 40019370: 80 a0 a0 00 cmp %g2, 0 40019374: 02 80 00 16 be 400193cc <_Heap_Size_of_alloc_area+0x90> 40019378: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4001937c: c4 02 20 04 ld [ %o0 + 4 ], %g2 40019380: 84 08 bf fe and %g2, -2, %g2 40019384: 84 02 00 02 add %o0, %g2, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40019388: 80 a0 80 01 cmp %g2, %g1 4001938c: 0a 80 00 05 bcs 400193a0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 40019390: 86 10 20 00 clr %g3 40019394: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40019398: 80 a0 40 02 cmp %g1, %g2 4001939c: 86 60 3f ff subx %g0, -1, %g3 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 400193a0: 80 a0 e0 00 cmp %g3, 0 400193a4: 02 80 00 0a be 400193cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 400193a8: 01 00 00 00 nop 400193ac: c2 00 a0 04 ld [ %g2 + 4 ], %g1 400193b0: 80 88 60 01 btst 1, %g1 400193b4: 02 80 00 06 be 400193cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN 400193b8: 84 20 80 19 sub %g2, %i1, %g2 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 400193bc: 84 00 a0 04 add %g2, 4, %g2 400193c0: c4 26 80 00 st %g2, [ %i2 ] return true; 400193c4: 81 c7 e0 08 ret 400193c8: 91 e8 20 01 restore %g0, 1, %o0 } 400193cc: 81 c7 e0 08 ret 400193d0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400075a4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 400075a4: 9d e3 bf 88 save %sp, -120, %sp uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 400075a8: 23 10 00 1e sethi %hi(0x40007800), %l1 400075ac: 80 8e a0 ff btst 0xff, %i2 400075b0: a2 14 62 7c or %l1, 0x27c, %l1 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 400075b4: e4 06 20 10 ld [ %i0 + 0x10 ], %l2 uintptr_t const min_block_size = heap->min_block_size; 400075b8: e6 06 20 14 ld [ %i0 + 0x14 ], %l3 Heap_Block *const last_block = heap->last_block; 400075bc: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 400075c0: 12 80 00 04 bne 400075d0 <_Heap_Walk+0x2c> 400075c4: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 400075c8: 23 10 00 1d sethi %hi(0x40007400), %l1 400075cc: a2 14 61 9c or %l1, 0x19c, %l1 ! 4000759c <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 400075d0: 03 10 00 76 sethi %hi(0x4001d800), %g1 400075d4: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 ! 4001dbe0 <_System_state_Current> 400075d8: 80 a0 60 03 cmp %g1, 3 400075dc: 12 80 01 1e bne 40007a54 <_Heap_Walk+0x4b0> 400075e0: 90 10 00 19 mov %i1, %o0 Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 400075e4: da 06 20 18 ld [ %i0 + 0x18 ], %o5 400075e8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 400075ec: c4 06 20 08 ld [ %i0 + 8 ], %g2 400075f0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400075f4: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 400075f8: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 400075fc: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007600: e0 23 a0 60 st %l0, [ %sp + 0x60 ] 40007604: e8 23 a0 64 st %l4, [ %sp + 0x64 ] 40007608: 92 10 20 00 clr %o1 4000760c: 15 10 00 6b sethi %hi(0x4001ac00), %o2 40007610: 96 10 00 12 mov %l2, %o3 40007614: 94 12 a3 60 or %o2, 0x360, %o2 40007618: 9f c4 40 00 call %l1 4000761c: 98 10 00 13 mov %l3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 40007620: 80 a4 a0 00 cmp %l2, 0 40007624: 12 80 00 07 bne 40007640 <_Heap_Walk+0x9c> 40007628: 80 8c a0 07 btst 7, %l2 (*printer)( source, true, "page size is zero\n" ); 4000762c: 15 10 00 6b sethi %hi(0x4001ac00), %o2 40007630: 90 10 00 19 mov %i1, %o0 40007634: 92 10 20 01 mov 1, %o1 40007638: 10 80 00 27 b 400076d4 <_Heap_Walk+0x130> 4000763c: 94 12 a3 f8 or %o2, 0x3f8, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 40007640: 22 80 00 08 be,a 40007660 <_Heap_Walk+0xbc> 40007644: 90 10 00 13 mov %l3, %o0 (*printer)( 40007648: 15 10 00 6c sethi %hi(0x4001b000), %o2 4000764c: 90 10 00 19 mov %i1, %o0 40007650: 96 10 00 12 mov %l2, %o3 40007654: 92 10 20 01 mov 1, %o1 40007658: 10 80 01 05 b 40007a6c <_Heap_Walk+0x4c8> 4000765c: 94 12 a0 10 or %o2, 0x10, %o2 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 40007660: 7f ff e9 1e call 40001ad8 <.urem> 40007664: 92 10 00 12 mov %l2, %o1 40007668: 80 a2 20 00 cmp %o0, 0 4000766c: 22 80 00 08 be,a 4000768c <_Heap_Walk+0xe8> 40007670: 90 04 20 08 add %l0, 8, %o0 (*printer)( 40007674: 15 10 00 6c sethi %hi(0x4001b000), %o2 40007678: 90 10 00 19 mov %i1, %o0 4000767c: 96 10 00 13 mov %l3, %o3 40007680: 92 10 20 01 mov 1, %o1 40007684: 10 80 00 fa b 40007a6c <_Heap_Walk+0x4c8> 40007688: 94 12 a0 30 or %o2, 0x30, %o2 ); return false; } if ( 4000768c: 7f ff e9 13 call 40001ad8 <.urem> 40007690: 92 10 00 12 mov %l2, %o1 40007694: 80 a2 20 00 cmp %o0, 0 40007698: 22 80 00 08 be,a 400076b8 <_Heap_Walk+0x114> 4000769c: c2 04 20 04 ld [ %l0 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 400076a0: 15 10 00 6c sethi %hi(0x4001b000), %o2 400076a4: 90 10 00 19 mov %i1, %o0 400076a8: 96 10 00 10 mov %l0, %o3 400076ac: 92 10 20 01 mov 1, %o1 400076b0: 10 80 00 ef b 40007a6c <_Heap_Walk+0x4c8> 400076b4: 94 12 a0 58 or %o2, 0x58, %o2 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 400076b8: 80 88 60 01 btst 1, %g1 400076bc: 32 80 00 09 bne,a 400076e0 <_Heap_Walk+0x13c> 400076c0: ea 04 00 00 ld [ %l0 ], %l5 (*printer)( 400076c4: 15 10 00 6c sethi %hi(0x4001b000), %o2 400076c8: 90 10 00 19 mov %i1, %o0 400076cc: 92 10 20 01 mov 1, %o1 400076d0: 94 12 a0 90 or %o2, 0x90, %o2 400076d4: 9f c4 40 00 call %l1 400076d8: b0 10 20 00 clr %i0 400076dc: 30 80 00 e6 b,a 40007a74 <_Heap_Walk+0x4d0> ); return false; } if ( first_block->prev_size != page_size ) { 400076e0: 80 a5 40 12 cmp %l5, %l2 400076e4: 22 80 00 09 be,a 40007708 <_Heap_Walk+0x164> 400076e8: c2 05 20 04 ld [ %l4 + 4 ], %g1 (*printer)( 400076ec: 15 10 00 6c sethi %hi(0x4001b000), %o2 400076f0: 90 10 00 19 mov %i1, %o0 400076f4: 96 10 00 15 mov %l5, %o3 400076f8: 98 10 00 12 mov %l2, %o4 400076fc: 92 10 20 01 mov 1, %o1 40007700: 10 80 00 88 b 40007920 <_Heap_Walk+0x37c> 40007704: 94 12 a0 c0 or %o2, 0xc0, %o2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 40007708: 82 08 7f fe and %g1, -2, %g1 4000770c: 82 05 00 01 add %l4, %g1, %g1 40007710: c2 00 60 04 ld [ %g1 + 4 ], %g1 40007714: 80 88 60 01 btst 1, %g1 40007718: 32 80 00 07 bne,a 40007734 <_Heap_Walk+0x190> 4000771c: d6 06 20 08 ld [ %i0 + 8 ], %o3 (*printer)( 40007720: 15 10 00 6c sethi %hi(0x4001b000), %o2 40007724: 90 10 00 19 mov %i1, %o0 40007728: 92 10 20 01 mov 1, %o1 4000772c: 10 bf ff ea b 400076d4 <_Heap_Walk+0x130> 40007730: 94 12 a0 f0 or %o2, 0xf0, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 40007734: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007738: a4 10 00 18 mov %i0, %l2 4000773c: 10 80 00 32 b 40007804 <_Heap_Walk+0x260> 40007740: ae 10 00 0b mov %o3, %l7 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40007744: 80 a0 80 17 cmp %g2, %l7 40007748: 18 80 00 05 bgu 4000775c <_Heap_Walk+0x1b8> 4000774c: 82 10 20 00 clr %g1 40007750: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40007754: 80 a0 40 17 cmp %g1, %l7 40007758: 82 60 3f ff subx %g0, -1, %g1 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 4000775c: 80 a0 60 00 cmp %g1, 0 40007760: 32 80 00 08 bne,a 40007780 <_Heap_Walk+0x1dc> 40007764: 90 05 e0 08 add %l7, 8, %o0 (*printer)( 40007768: 15 10 00 6c sethi %hi(0x4001b000), %o2 4000776c: 96 10 00 17 mov %l7, %o3 40007770: 90 10 00 19 mov %i1, %o0 40007774: 92 10 20 01 mov 1, %o1 40007778: 10 80 00 bd b 40007a6c <_Heap_Walk+0x4c8> 4000777c: 94 12 a1 08 or %o2, 0x108, %o2 ); return false; } if ( 40007780: 7f ff e8 d6 call 40001ad8 <.urem> 40007784: 92 10 00 16 mov %l6, %o1 40007788: 80 a2 20 00 cmp %o0, 0 4000778c: 22 80 00 08 be,a 400077ac <_Heap_Walk+0x208> 40007790: c2 05 e0 04 ld [ %l7 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 40007794: 15 10 00 6c sethi %hi(0x4001b000), %o2 40007798: 96 10 00 17 mov %l7, %o3 4000779c: 90 10 00 19 mov %i1, %o0 400077a0: 92 10 20 01 mov 1, %o1 400077a4: 10 80 00 b2 b 40007a6c <_Heap_Walk+0x4c8> 400077a8: 94 12 a1 28 or %o2, 0x128, %o2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 400077ac: 82 08 7f fe and %g1, -2, %g1 400077b0: 82 05 c0 01 add %l7, %g1, %g1 400077b4: c2 00 60 04 ld [ %g1 + 4 ], %g1 400077b8: 80 88 60 01 btst 1, %g1 400077bc: 22 80 00 08 be,a 400077dc <_Heap_Walk+0x238> 400077c0: d8 05 e0 0c ld [ %l7 + 0xc ], %o4 (*printer)( 400077c4: 15 10 00 6c sethi %hi(0x4001b000), %o2 400077c8: 96 10 00 17 mov %l7, %o3 400077cc: 90 10 00 19 mov %i1, %o0 400077d0: 92 10 20 01 mov 1, %o1 400077d4: 10 80 00 a6 b 40007a6c <_Heap_Walk+0x4c8> 400077d8: 94 12 a1 58 or %o2, 0x158, %o2 ); return false; } if ( free_block->prev != prev_block ) { 400077dc: 80 a3 00 12 cmp %o4, %l2 400077e0: 02 80 00 08 be 40007800 <_Heap_Walk+0x25c> 400077e4: a4 10 00 17 mov %l7, %l2 (*printer)( 400077e8: 15 10 00 6c sethi %hi(0x4001b000), %o2 400077ec: 96 10 00 17 mov %l7, %o3 400077f0: 90 10 00 19 mov %i1, %o0 400077f4: 92 10 20 01 mov 1, %o1 400077f8: 10 80 00 4a b 40007920 <_Heap_Walk+0x37c> 400077fc: 94 12 a1 78 or %o2, 0x178, %o2 return false; } prev_block = free_block; free_block = free_block->next; 40007800: ee 05 e0 08 ld [ %l7 + 8 ], %l7 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 40007804: 80 a5 c0 18 cmp %l7, %i0 40007808: 32 bf ff cf bne,a 40007744 <_Heap_Walk+0x1a0> 4000780c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007810: 10 80 00 89 b 40007a34 <_Heap_Walk+0x490> 40007814: 37 10 00 6c sethi %hi(0x4001b000), %i3 uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 40007818: 80 8d a0 01 btst 1, %l6 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4000781c: ac 0d bf fe and %l6, -2, %l6 40007820: 02 80 00 0a be 40007848 <_Heap_Walk+0x2a4> 40007824: a4 04 00 16 add %l0, %l6, %l2 (*printer)( 40007828: 90 10 00 19 mov %i1, %o0 4000782c: 92 10 20 00 clr %o1 40007830: 94 10 00 1a mov %i2, %o2 40007834: 96 10 00 10 mov %l0, %o3 40007838: 9f c4 40 00 call %l1 4000783c: 98 10 00 16 mov %l6, %o4 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 40007840: 10 80 00 0a b 40007868 <_Heap_Walk+0x2c4> 40007844: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007848: da 04 00 00 ld [ %l0 ], %o5 4000784c: 90 10 00 19 mov %i1, %o0 40007850: 92 10 20 00 clr %o1 40007854: 94 10 00 1b mov %i3, %o2 40007858: 96 10 00 10 mov %l0, %o3 4000785c: 9f c4 40 00 call %l1 40007860: 98 10 00 16 mov %l6, %o4 40007864: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40007868: 80 a0 80 12 cmp %g2, %l2 4000786c: 18 80 00 05 bgu 40007880 <_Heap_Walk+0x2dc> <== NEVER TAKEN 40007870: 82 10 20 00 clr %g1 40007874: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40007878: 80 a0 40 12 cmp %g1, %l2 4000787c: 82 60 3f ff subx %g0, -1, %g1 block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 40007880: 80 a0 60 00 cmp %g1, 0 40007884: 32 80 00 09 bne,a 400078a8 <_Heap_Walk+0x304> 40007888: 90 10 00 16 mov %l6, %o0 (*printer)( 4000788c: 15 10 00 6c sethi %hi(0x4001b000), %o2 40007890: 90 10 00 19 mov %i1, %o0 40007894: 96 10 00 10 mov %l0, %o3 40007898: 98 10 00 12 mov %l2, %o4 4000789c: 92 10 20 01 mov 1, %o1 400078a0: 10 80 00 20 b 40007920 <_Heap_Walk+0x37c> 400078a4: 94 12 a1 f0 or %o2, 0x1f0, %o2 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 400078a8: 7f ff e8 8c call 40001ad8 <.urem> 400078ac: 92 10 00 15 mov %l5, %o1 400078b0: 80 a2 20 00 cmp %o0, 0 400078b4: 02 80 00 09 be 400078d8 <_Heap_Walk+0x334> 400078b8: 80 a5 80 13 cmp %l6, %l3 (*printer)( 400078bc: 15 10 00 6c sethi %hi(0x4001b000), %o2 400078c0: 90 10 00 19 mov %i1, %o0 400078c4: 96 10 00 10 mov %l0, %o3 400078c8: 98 10 00 16 mov %l6, %o4 400078cc: 92 10 20 01 mov 1, %o1 400078d0: 10 80 00 14 b 40007920 <_Heap_Walk+0x37c> 400078d4: 94 12 a2 20 or %o2, 0x220, %o2 ); return false; } if ( block_size < min_block_size ) { 400078d8: 1a 80 00 0a bcc 40007900 <_Heap_Walk+0x35c> 400078dc: 80 a4 80 10 cmp %l2, %l0 (*printer)( 400078e0: 15 10 00 6c sethi %hi(0x4001b000), %o2 400078e4: 90 10 00 19 mov %i1, %o0 400078e8: 96 10 00 10 mov %l0, %o3 400078ec: 98 10 00 16 mov %l6, %o4 400078f0: 9a 10 00 13 mov %l3, %o5 400078f4: 92 10 20 01 mov 1, %o1 400078f8: 10 80 00 3b b 400079e4 <_Heap_Walk+0x440> 400078fc: 94 12 a2 50 or %o2, 0x250, %o2 ); return false; } if ( next_block_begin <= block_begin ) { 40007900: 38 80 00 0b bgu,a 4000792c <_Heap_Walk+0x388> 40007904: c2 04 a0 04 ld [ %l2 + 4 ], %g1 (*printer)( 40007908: 15 10 00 6c sethi %hi(0x4001b000), %o2 4000790c: 90 10 00 19 mov %i1, %o0 40007910: 96 10 00 10 mov %l0, %o3 40007914: 98 10 00 12 mov %l2, %o4 40007918: 92 10 20 01 mov 1, %o1 4000791c: 94 12 a2 80 or %o2, 0x280, %o2 40007920: 9f c4 40 00 call %l1 40007924: b0 10 20 00 clr %i0 40007928: 30 80 00 53 b,a 40007a74 <_Heap_Walk+0x4d0> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4000792c: 80 88 60 01 btst 1, %g1 40007930: 32 80 00 46 bne,a 40007a48 <_Heap_Walk+0x4a4> 40007934: a0 10 00 12 mov %l2, %l0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 40007938: fa 04 20 04 ld [ %l0 + 4 ], %i5 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 4000793c: d8 04 20 0c ld [ %l0 + 0xc ], %o4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007940: c2 06 20 08 ld [ %i0 + 8 ], %g1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 40007944: ac 0f 7f fe and %i5, -2, %l6 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007948: 1b 10 00 6c sethi %hi(0x4001b000), %o5 4000794c: 80 a3 00 01 cmp %o4, %g1 } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 40007950: c6 06 20 0c ld [ %i0 + 0xc ], %g3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 40007954: ae 04 00 16 add %l0, %l6, %l7 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 40007958: 02 80 00 07 be 40007974 <_Heap_Walk+0x3d0> 4000795c: 9a 13 62 b8 or %o5, 0x2b8, %o5 "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 40007960: 1b 10 00 6c sethi %hi(0x4001b000), %o5 40007964: 80 a3 00 18 cmp %o4, %i0 40007968: 02 80 00 03 be 40007974 <_Heap_Walk+0x3d0> 4000796c: 9a 13 62 d0 or %o5, 0x2d0, %o5 40007970: 9a 10 00 1c mov %i4, %o5 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 40007974: c4 04 20 08 ld [ %l0 + 8 ], %g2 40007978: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000797c: 80 a0 80 03 cmp %g2, %g3 40007980: 02 80 00 07 be 4000799c <_Heap_Walk+0x3f8> 40007984: 82 10 62 e0 or %g1, 0x2e0, %g1 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007988: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000798c: 80 a0 80 18 cmp %g2, %i0 40007990: 02 80 00 03 be 4000799c <_Heap_Walk+0x3f8> 40007994: 82 10 62 f0 or %g1, 0x2f0, %g1 40007998: 82 10 00 1c mov %i4, %g1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 4000799c: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 400079a0: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 400079a4: 90 10 00 19 mov %i1, %o0 400079a8: 92 10 20 00 clr %o1 400079ac: 15 10 00 6c sethi %hi(0x4001b000), %o2 400079b0: 96 10 00 10 mov %l0, %o3 400079b4: 9f c4 40 00 call %l1 400079b8: 94 12 a3 00 or %o2, 0x300, %o2 block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 400079bc: da 05 c0 00 ld [ %l7 ], %o5 400079c0: 80 a5 80 0d cmp %l6, %o5 400079c4: 02 80 00 0b be 400079f0 <_Heap_Walk+0x44c> 400079c8: 15 10 00 6c sethi %hi(0x4001b000), %o2 (*printer)( 400079cc: ee 23 a0 5c st %l7, [ %sp + 0x5c ] 400079d0: 90 10 00 19 mov %i1, %o0 400079d4: 96 10 00 10 mov %l0, %o3 400079d8: 98 10 00 16 mov %l6, %o4 400079dc: 92 10 20 01 mov 1, %o1 400079e0: 94 12 a3 30 or %o2, 0x330, %o2 400079e4: 9f c4 40 00 call %l1 400079e8: b0 10 20 00 clr %i0 400079ec: 30 80 00 22 b,a 40007a74 <_Heap_Walk+0x4d0> ); return false; } if ( !prev_used ) { 400079f0: 80 8f 60 01 btst 1, %i5 400079f4: 32 80 00 0b bne,a 40007a20 <_Heap_Walk+0x47c> 400079f8: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 400079fc: 15 10 00 6c sethi %hi(0x4001b000), %o2 40007a00: 90 10 00 19 mov %i1, %o0 40007a04: 96 10 00 10 mov %l0, %o3 40007a08: 92 10 20 01 mov 1, %o1 40007a0c: 10 80 00 18 b 40007a6c <_Heap_Walk+0x4c8> 40007a10: 94 12 a3 70 or %o2, 0x370, %o2 { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 40007a14: 22 80 00 0d be,a 40007a48 <_Heap_Walk+0x4a4> 40007a18: a0 10 00 12 mov %l2, %l0 return true; } free_block = free_block->next; 40007a1c: c2 00 60 08 ld [ %g1 + 8 ], %g1 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 40007a20: 80 a0 40 18 cmp %g1, %i0 40007a24: 12 bf ff fc bne 40007a14 <_Heap_Walk+0x470> 40007a28: 80 a0 40 10 cmp %g1, %l0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40007a2c: 10 80 00 0c b 40007a5c <_Heap_Walk+0x4b8> 40007a30: 15 10 00 6c sethi %hi(0x4001b000), %o2 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( 40007a34: 35 10 00 6c sethi %hi(0x4001b000), %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007a38: 39 10 00 6c sethi %hi(0x4001b000), %i4 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 40007a3c: b6 16 e1 c8 or %i3, 0x1c8, %i3 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { (*printer)( 40007a40: b4 16 a1 b0 or %i2, 0x1b0, %i2 " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 40007a44: b8 17 22 c8 or %i4, 0x2c8, %i4 if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 40007a48: 80 a4 00 14 cmp %l0, %l4 40007a4c: 32 bf ff 73 bne,a 40007818 <_Heap_Walk+0x274> 40007a50: ec 04 20 04 ld [ %l0 + 4 ], %l6 block = next_block; } return true; } 40007a54: 81 c7 e0 08 ret 40007a58: 91 e8 20 01 restore %g0, 1, %o0 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 40007a5c: 90 10 00 19 mov %i1, %o0 40007a60: 96 10 00 10 mov %l0, %o3 40007a64: 92 10 20 01 mov 1, %o1 40007a68: 94 12 a3 a0 or %o2, 0x3a0, %o2 40007a6c: 9f c4 40 00 call %l1 40007a70: b0 10 20 00 clr %i0 40007a74: 81 c7 e0 08 ret 40007a78: 81 e8 00 00 restore =============================================================================== 40006820 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006820: 9d e3 bf a0 save %sp, -96, %sp * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 40006824: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40006828: a0 10 00 18 mov %i0, %l0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 4000682c: 80 a0 60 00 cmp %g1, 0 40006830: 02 80 00 20 be 400068b0 <_Objects_Allocate+0x90> <== NEVER TAKEN 40006834: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006838: a2 04 20 20 add %l0, 0x20, %l1 4000683c: 40 00 11 00 call 4000ac3c <_Chain_Get> 40006840: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40006844: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40006848: 80 a0 60 00 cmp %g1, 0 4000684c: 02 80 00 19 be 400068b0 <_Objects_Allocate+0x90> 40006850: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 40006854: 80 a2 20 00 cmp %o0, 0 40006858: 32 80 00 0a bne,a 40006880 <_Objects_Allocate+0x60> 4000685c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 _Objects_Extend_information( information ); 40006860: 40 00 00 1e call 400068d8 <_Objects_Extend_information> 40006864: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40006868: 40 00 10 f5 call 4000ac3c <_Chain_Get> 4000686c: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40006870: b0 92 20 00 orcc %o0, 0, %i0 40006874: 02 80 00 0f be 400068b0 <_Objects_Allocate+0x90> 40006878: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4000687c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1 40006880: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40006884: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1 40006888: 40 00 40 02 call 40016890 <.udiv> 4000688c: 90 22 00 01 sub %o0, %g1, %o0 40006890: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40006894: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40006898: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 4000689c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 information->inactive--; 400068a0: 86 00 ff ff add %g3, -1, %g3 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 400068a4: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 400068a8: c6 34 20 2c sth %g3, [ %l0 + 0x2c ] block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 400068ac: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; } } return the_object; } 400068b0: 81 c7 e0 08 ret 400068b4: 81 e8 00 00 restore =============================================================================== 400068d8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400068d8: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 400068dc: e4 06 20 34 ld [ %i0 + 0x34 ], %l2 400068e0: 80 a4 a0 00 cmp %l2, 0 400068e4: 12 80 00 06 bne 400068fc <_Objects_Extend_information+0x24> 400068e8: e6 16 20 0a lduh [ %i0 + 0xa ], %l3 400068ec: a0 10 00 13 mov %l3, %l0 400068f0: a8 10 20 00 clr %l4 400068f4: 10 80 00 15 b 40006948 <_Objects_Extend_information+0x70> 400068f8: a2 10 20 00 clr %l1 block_count = 0; else { block_count = information->maximum / information->allocation_size; 400068fc: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1 40006900: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40006904: 40 00 3f e3 call 40016890 <.udiv> 40006908: 92 10 00 11 mov %l1, %o1 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4000690c: 82 10 00 11 mov %l1, %g1 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40006910: 91 2a 20 10 sll %o0, 0x10, %o0 40006914: a0 10 00 13 mov %l3, %l0 40006918: a9 32 20 10 srl %o0, 0x10, %l4 for ( ; block < block_count; block++ ) { 4000691c: 10 80 00 08 b 4000693c <_Objects_Extend_information+0x64> 40006920: a2 10 20 00 clr %l1 if ( information->object_blocks[ block ] == NULL ) 40006924: c4 04 80 02 ld [ %l2 + %g2 ], %g2 40006928: 80 a0 a0 00 cmp %g2, 0 4000692c: 22 80 00 08 be,a 4000694c <_Objects_Extend_information+0x74> 40006930: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 40006934: a0 04 00 01 add %l0, %g1, %l0 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006938: a2 04 60 01 inc %l1 4000693c: 80 a4 40 14 cmp %l1, %l4 40006940: 0a bf ff f9 bcs 40006924 <_Objects_Extend_information+0x4c> 40006944: 85 2c 60 02 sll %l1, 2, %g2 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006948: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 4000694c: ec 16 20 10 lduh [ %i0 + 0x10 ], %l6 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 40006950: 03 00 00 3f sethi %hi(0xfc00), %g1 else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 40006954: ac 02 00 16 add %o0, %l6, %l6 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 40006958: 82 10 63 ff or %g1, 0x3ff, %g1 4000695c: 80 a5 80 01 cmp %l6, %g1 40006960: 18 80 00 88 bgu 40006b80 <_Objects_Extend_information+0x2a8><== NEVER TAKEN 40006964: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 40006968: 40 00 3f 90 call 400167a8 <.umul> 4000696c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 40006970: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40006974: 80 a0 60 00 cmp %g1, 0 40006978: 02 80 00 09 be 4000699c <_Objects_Extend_information+0xc4> 4000697c: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 40006980: 40 00 08 21 call 40008a04 <_Workspace_Allocate> 40006984: 01 00 00 00 nop if ( !new_object_block ) 40006988: a4 92 20 00 orcc %o0, 0, %l2 4000698c: 32 80 00 08 bne,a 400069ac <_Objects_Extend_information+0xd4> 40006990: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006994: 81 c7 e0 08 ret 40006998: 81 e8 00 00 restore return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 4000699c: 40 00 08 0c call 400089cc <_Workspace_Allocate_or_fatal_error> 400069a0: 01 00 00 00 nop 400069a4: a4 10 00 08 mov %o0, %l2 } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 400069a8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400069ac: 80 a4 00 01 cmp %l0, %g1 400069b0: 2a 80 00 53 bcs,a 40006afc <_Objects_Extend_information+0x224> 400069b4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 400069b8: 82 05 80 13 add %l6, %l3, %g1 */ /* * Up the block count and maximum */ block_count++; 400069bc: ae 05 20 01 add %l4, 1, %l7 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 400069c0: 91 2d e0 01 sll %l7, 1, %o0 400069c4: 90 02 00 17 add %o0, %l7, %o0 400069c8: 90 00 40 08 add %g1, %o0, %o0 400069cc: 40 00 08 0e call 40008a04 <_Workspace_Allocate> 400069d0: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 400069d4: aa 92 20 00 orcc %o0, 0, %l5 400069d8: 32 80 00 06 bne,a 400069f0 <_Objects_Extend_information+0x118> 400069dc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 _Workspace_Free( new_object_block ); 400069e0: 40 00 08 12 call 40008a28 <_Workspace_Free> 400069e4: 90 10 00 12 mov %l2, %o0 return; 400069e8: 81 c7 e0 08 ret 400069ec: 81 e8 00 00 restore } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 400069f0: af 2d e0 02 sll %l7, 2, %l7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400069f4: 80 a0 40 13 cmp %g1, %l3 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 400069f8: ba 05 40 17 add %l5, %l7, %i5 400069fc: 82 10 20 00 clr %g1 40006a00: 08 80 00 14 bleu 40006a50 <_Objects_Extend_information+0x178> 40006a04: ae 07 40 17 add %i5, %l7, %l7 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 40006a08: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 40006a0c: b9 2d 20 02 sll %l4, 2, %i4 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 40006a10: 40 00 1c 44 call 4000db20 40006a14: 94 10 00 1c mov %i4, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006a18: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40006a1c: 94 10 00 1c mov %i4, %o2 40006a20: 40 00 1c 40 call 4000db20 40006a24: 90 10 00 1d mov %i5, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006a28: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006a2c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40006a30: a6 04 c0 01 add %l3, %g1, %l3 40006a34: 90 10 00 17 mov %l7, %o0 40006a38: 40 00 1c 3a call 4000db20 40006a3c: 95 2c e0 02 sll %l3, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006a40: 10 80 00 08 b 40006a60 <_Objects_Extend_information+0x188> 40006a44: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006a48: 82 00 60 01 inc %g1 local_table[ index ] = NULL; 40006a4c: c0 20 80 17 clr [ %g2 + %l7 ] } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006a50: 80 a0 40 13 cmp %g1, %l3 40006a54: 2a bf ff fd bcs,a 40006a48 <_Objects_Extend_information+0x170> 40006a58: 85 28 60 02 sll %g1, 2, %g2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006a5c: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40006a60: a9 2d 20 02 sll %l4, 2, %l4 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006a64: 85 2c 20 02 sll %l0, 2, %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40006a68: c0 27 40 14 clr [ %i5 + %l4 ] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40006a6c: c0 25 40 14 clr [ %l5 + %l4 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006a70: 86 04 00 03 add %l0, %g3, %g3 40006a74: 84 05 c0 02 add %l7, %g2, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40006a78: 10 80 00 04 b 40006a88 <_Objects_Extend_information+0x1b0> 40006a7c: 82 10 00 10 mov %l0, %g1 index < ( information->allocation_size + index_base ); index++ ) { 40006a80: 82 00 60 01 inc %g1 40006a84: 84 00 a0 04 add %g2, 4, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 40006a88: 80 a0 40 03 cmp %g1, %g3 40006a8c: 2a bf ff fd bcs,a 40006a80 <_Objects_Extend_information+0x1a8> 40006a90: c0 20 80 00 clr [ %g2 ] index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40006a94: 7f ff ec 81 call 40001c98 40006a98: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40006a9c: c8 06 00 00 ld [ %i0 ], %g4 40006aa0: c4 16 20 04 lduh [ %i0 + 4 ], %g2 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 40006aa4: ec 36 20 10 sth %l6, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40006aa8: ad 2d a0 10 sll %l6, 0x10, %l6 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40006aac: e6 06 20 34 ld [ %i0 + 0x34 ], %l3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40006ab0: 83 35 a0 10 srl %l6, 0x10, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40006ab4: fa 26 20 30 st %i5, [ %i0 + 0x30 ] information->local_table = local_table; 40006ab8: ee 26 20 1c st %l7, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40006abc: 89 29 20 18 sll %g4, 0x18, %g4 40006ac0: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40006ac4: ea 26 20 34 st %l5, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 40006ac8: 07 00 00 40 sethi %hi(0x10000), %g3 40006acc: ac 11 00 03 or %g4, %g3, %l6 40006ad0: ac 15 80 02 or %l6, %g2, %l6 40006ad4: ac 15 80 01 or %l6, %g1, %l6 40006ad8: ec 26 20 0c st %l6, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40006adc: 7f ff ec 73 call 40001ca8 40006ae0: 01 00 00 00 nop if ( old_tables ) 40006ae4: 80 a4 e0 00 cmp %l3, 0 40006ae8: 22 80 00 05 be,a 40006afc <_Objects_Extend_information+0x224> 40006aec: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 _Workspace_Free( old_tables ); 40006af0: 40 00 07 ce call 40008a28 <_Workspace_Free> 40006af4: 90 10 00 13 mov %l3, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40006af8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006afc: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 40006b00: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40006b04: 92 10 00 12 mov %l2, %o1 40006b08: 90 07 bf f4 add %fp, -12, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40006b0c: a3 2c 60 02 sll %l1, 2, %l1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006b10: a8 06 20 20 add %i0, 0x20, %l4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 40006b14: e4 20 40 11 st %l2, [ %g1 + %l1 ] */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 40006b18: 27 00 00 40 sethi %hi(0x10000), %l3 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006b1c: 40 00 10 58 call 4000ac7c <_Chain_Initialize> 40006b20: a4 10 00 08 mov %o0, %l2 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 40006b24: 30 80 00 0c b,a 40006b54 <_Objects_Extend_information+0x27c> the_object->id = _Objects_Build_id( 40006b28: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40006b2c: 83 28 60 18 sll %g1, 0x18, %g1 40006b30: 85 28 a0 1b sll %g2, 0x1b, %g2 40006b34: 82 10 40 13 or %g1, %l3, %g1 40006b38: 82 10 40 02 or %g1, %g2, %g1 40006b3c: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006b40: 92 10 00 08 mov %o0, %o1 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 40006b44: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40006b48: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006b4c: 7f ff fc ee call 40005f04 <_Chain_Append> 40006b50: 90 10 00 14 mov %l4, %o0 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 40006b54: 40 00 10 3a call 4000ac3c <_Chain_Get> 40006b58: 90 10 00 12 mov %l2, %o0 40006b5c: 80 a2 20 00 cmp %o0, 0 40006b60: 32 bf ff f2 bne,a 40006b28 <_Objects_Extend_information+0x250> 40006b64: c2 06 00 00 ld [ %i0 ], %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 40006b68: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006b6c: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 40006b70: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive = 40006b74: 82 01 00 01 add %g4, %g1, %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006b78: c8 20 80 11 st %g4, [ %g2 + %l1 ] information->inactive = 40006b7c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006b80: 81 c7 e0 08 ret 40006b84: 81 e8 00 00 restore =============================================================================== 40006c30 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006c30: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 40006c34: 80 a6 60 00 cmp %i1, 0 40006c38: 22 80 00 1a be,a 40006ca0 <_Objects_Get_information+0x70> 40006c3c: b0 10 20 00 clr %i0 /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40006c40: 40 00 11 95 call 4000b294 <_Objects_API_maximum_class> 40006c44: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 40006c48: 80 a2 20 00 cmp %o0, 0 40006c4c: 22 80 00 15 be,a 40006ca0 <_Objects_Get_information+0x70> 40006c50: b0 10 20 00 clr %i0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 40006c54: 80 a6 40 08 cmp %i1, %o0 40006c58: 38 80 00 12 bgu,a 40006ca0 <_Objects_Get_information+0x70> 40006c5c: b0 10 20 00 clr %i0 return NULL; if ( !_Objects_Information_table[ the_api ] ) 40006c60: b1 2e 20 02 sll %i0, 2, %i0 40006c64: 03 10 00 6c sethi %hi(0x4001b000), %g1 40006c68: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 4001b2e0 <_Objects_Information_table> 40006c6c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 40006c70: 80 a0 60 00 cmp %g1, 0 40006c74: 02 80 00 0b be 40006ca0 <_Objects_Get_information+0x70> <== NEVER TAKEN 40006c78: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40006c7c: b3 2e 60 02 sll %i1, 2, %i1 40006c80: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 40006c84: 80 a6 20 00 cmp %i0, 0 40006c88: 02 80 00 06 be 40006ca0 <_Objects_Get_information+0x70> <== NEVER TAKEN 40006c8c: 01 00 00 00 nop * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 40006c90: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006c94: 80 a0 60 00 cmp %g1, 0 40006c98: 22 80 00 02 be,a 40006ca0 <_Objects_Get_information+0x70> 40006c9c: b0 10 20 00 clr %i0 return NULL; #endif return info; } 40006ca0: 81 c7 e0 08 ret 40006ca4: 81 e8 00 00 restore =============================================================================== 4001750c <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 4001750c: c4 02 20 08 ld [ %o0 + 8 ], %g2 if ( information->maximum >= index ) { 40017510: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 40017514: 84 22 40 02 sub %o1, %g2, %g2 40017518: 84 00 a0 01 inc %g2 if ( information->maximum >= index ) { 4001751c: 80 a0 40 02 cmp %g1, %g2 40017520: 0a 80 00 09 bcs 40017544 <_Objects_Get_no_protection+0x38> 40017524: 85 28 a0 02 sll %g2, 2, %g2 if ( (the_object = information->local_table[ index ]) != NULL ) { 40017528: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4001752c: d0 00 40 02 ld [ %g1 + %g2 ], %o0 40017530: 80 a2 20 00 cmp %o0, 0 40017534: 02 80 00 05 be 40017548 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 40017538: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 4001753c: 81 c3 e0 08 retl 40017540: c0 22 80 00 clr [ %o2 ] /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 40017544: 82 10 20 01 mov 1, %g1 40017548: 90 10 20 00 clr %o0 return NULL; } 4001754c: 81 c3 e0 08 retl 40017550: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 400083a4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 400083a4: 9d e3 bf 98 save %sp, -104, %sp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400083a8: 92 96 20 00 orcc %i0, 0, %o1 400083ac: 12 80 00 06 bne 400083c4 <_Objects_Id_to_name+0x20> 400083b0: 83 32 60 18 srl %o1, 0x18, %g1 400083b4: 03 10 00 83 sethi %hi(0x40020c00), %g1 400083b8: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 40020cbc <_Thread_Executing> 400083bc: d2 00 60 08 ld [ %g1 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400083c0: 83 32 60 18 srl %o1, 0x18, %g1 400083c4: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 400083c8: 84 00 7f ff add %g1, -1, %g2 400083cc: 80 a0 a0 03 cmp %g2, 3 400083d0: 18 80 00 14 bgu 40008420 <_Objects_Id_to_name+0x7c> 400083d4: 83 28 60 02 sll %g1, 2, %g1 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 400083d8: 10 80 00 14 b 40008428 <_Objects_Id_to_name+0x84> 400083dc: 05 10 00 82 sethi %hi(0x40020800), %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 400083e0: 85 28 a0 02 sll %g2, 2, %g2 400083e4: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 400083e8: 80 a2 20 00 cmp %o0, 0 400083ec: 02 80 00 0d be 40008420 <_Objects_Id_to_name+0x7c> <== NEVER TAKEN 400083f0: 01 00 00 00 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 400083f4: 7f ff ff cf call 40008330 <_Objects_Get> 400083f8: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 400083fc: 80 a2 20 00 cmp %o0, 0 40008400: 02 80 00 08 be 40008420 <_Objects_Id_to_name+0x7c> 40008404: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 40008408: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000840c: b0 10 20 00 clr %i0 40008410: 40 00 02 30 call 40008cd0 <_Thread_Enable_dispatch> 40008414: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 40008418: 81 c7 e0 08 ret 4000841c: 81 e8 00 00 restore } 40008420: 81 c7 e0 08 ret 40008424: 91 e8 20 03 restore %g0, 3, %o0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 40008428: 84 10 a3 60 or %g2, 0x360, %g2 4000842c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40008430: 80 a0 60 00 cmp %g1, 0 40008434: 12 bf ff eb bne 400083e0 <_Objects_Id_to_name+0x3c> 40008438: 85 32 60 1b srl %o1, 0x1b, %g2 4000843c: 30 bf ff f9 b,a 40008420 <_Objects_Id_to_name+0x7c> =============================================================================== 40006d90 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 40006d90: 9d e3 bf a0 save %sp, -96, %sp information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 40006d94: 05 10 00 6c sethi %hi(0x4001b000), %g2 40006d98: 83 2e 60 02 sll %i1, 2, %g1 40006d9c: 84 10 a2 e0 or %g2, 0x2e0, %g2 40006da0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 40006da4: 85 2f 20 10 sll %i4, 0x10, %g2 40006da8: 85 30 a0 10 srl %g2, 0x10, %g2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 40006dac: 87 2e a0 02 sll %i2, 2, %g3 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 40006db0: c4 26 20 18 st %g2, [ %i0 + 0x18 ] information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 40006db4: f0 20 40 03 st %i0, [ %g1 + %g3 ] /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 40006db8: 85 36 e0 1f srl %i3, 0x1f, %g2 maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 40006dbc: 03 20 00 00 sethi %hi(0x80000000), %g1 uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 40006dc0: f2 26 00 00 st %i1, [ %i0 ] information->the_class = the_class; 40006dc4: f4 36 20 04 sth %i2, [ %i0 + 4 ] information->size = size; information->local_table = 0; 40006dc8: c0 26 20 1c clr [ %i0 + 0x1c ] information->inactive_per_block = 0; 40006dcc: c0 26 20 30 clr [ %i0 + 0x30 ] information->object_blocks = 0; 40006dd0: c0 26 20 34 clr [ %i0 + 0x34 ] information->inactive = 0; 40006dd4: c0 36 20 2c clrh [ %i0 + 0x2c ] /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 40006dd8: c0 36 20 10 clrh [ %i0 + 0x10 ] _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 40006ddc: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ] (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 40006de0: b6 2e c0 01 andn %i3, %g1, %i3 /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 40006de4: 80 a0 a0 00 cmp %g2, 0 40006de8: 02 80 00 09 be 40006e0c <_Objects_Initialize_information+0x7c> 40006dec: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 40006df0: 80 a6 e0 00 cmp %i3, 0 40006df4: 12 80 00 07 bne 40006e10 <_Objects_Initialize_information+0x80> 40006df8: 07 10 00 6c sethi %hi(0x4001b000), %g3 _Internal_error_Occurred( 40006dfc: 90 10 20 00 clr %o0 40006e00: 92 10 20 01 mov 1, %o1 40006e04: 7f ff fe 59 call 40006768 <_Internal_error_Occurred> 40006e08: 94 10 20 14 mov 0x14, %o2 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 40006e0c: 07 10 00 6c sethi %hi(0x4001b000), %g3 40006e10: 86 10 e1 28 or %g3, 0x128, %g3 ! 4001b128 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40006e14: 80 a0 00 1b cmp %g0, %i3 40006e18: b3 2e 60 18 sll %i1, 0x18, %i1 40006e1c: 84 40 20 00 addx %g0, 0, %g2 40006e20: b5 2e a0 1b sll %i2, 0x1b, %i2 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 40006e24: c6 26 20 1c st %g3, [ %i0 + 0x1c ] } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 40006e28: f6 36 20 14 sth %i3, [ %i0 + 0x14 ] /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 40006e2c: 07 00 00 40 sethi %hi(0x10000), %g3 40006e30: b2 16 40 03 or %i1, %g3, %i1 40006e34: b4 16 40 1a or %i1, %i2, %i2 40006e38: b4 16 80 02 or %i2, %g2, %i2 40006e3c: f4 26 20 08 st %i2, [ %i0 + 8 ] * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 40006e40: 84 00 60 04 add %g1, 4, %g2 /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 40006e44: 80 88 60 03 btst 3, %g1 40006e48: 12 80 00 03 bne 40006e54 <_Objects_Initialize_information+0xc4><== NEVER TAKEN 40006e4c: 84 08 bf fc and %g2, -4, %g2 40006e50: 84 10 00 01 mov %g1, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40006e54: 82 06 20 24 add %i0, 0x24, %g1 name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 40006e58: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] 40006e5c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] the_chain->permanent_null = NULL; 40006e60: c0 26 20 24 clr [ %i0 + 0x24 ] the_chain->last = _Chain_Head(the_chain); 40006e64: 82 06 20 20 add %i0, 0x20, %g1 _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 40006e68: 80 a6 e0 00 cmp %i3, 0 40006e6c: 02 80 00 04 be 40006e7c <_Objects_Initialize_information+0xec> 40006e70: c2 26 20 28 st %g1, [ %i0 + 0x28 ] /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 40006e74: 7f ff fe 99 call 400068d8 <_Objects_Extend_information> 40006e78: 81 e8 00 00 restore 40006e7c: 81 c7 e0 08 ret 40006e80: 81 e8 00 00 restore =============================================================================== 4000a9d4 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4000a9d4: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000a9d8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 if ( !api ) 4000a9dc: 80 a4 20 00 cmp %l0, 0 4000a9e0: 02 80 00 1d be 4000aa54 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN 4000a9e4: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4000a9e8: 7f ff dc ac call 40001c98 4000a9ec: 01 00 00 00 nop signal_set = asr->signals_posted; 4000a9f0: e6 04 20 14 ld [ %l0 + 0x14 ], %l3 asr->signals_posted = 0; 4000a9f4: c0 24 20 14 clr [ %l0 + 0x14 ] _ISR_Enable( level ); 4000a9f8: 7f ff dc ac call 40001ca8 4000a9fc: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4000aa00: 80 a4 e0 00 cmp %l3, 0 4000aa04: 02 80 00 14 be 4000aa54 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN 4000aa08: a2 07 bf fc add %fp, -4, %l1 return; asr->nest_level += 1; 4000aa0c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000aa10: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4000aa14: 82 00 60 01 inc %g1 4000aa18: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000aa1c: 94 10 00 11 mov %l1, %o2 4000aa20: 25 00 00 3f sethi %hi(0xfc00), %l2 4000aa24: 40 00 07 4c call 4000c754 4000aa28: 92 14 a3 ff or %l2, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 4000aa2c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000aa30: 9f c0 40 00 call %g1 4000aa34: 90 10 00 13 mov %l3, %o0 asr->nest_level -= 1; 4000aa38: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000aa3c: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000aa40: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000aa44: 92 14 a3 ff or %l2, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 4000aa48: c2 24 20 1c st %g1, [ %l0 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4000aa4c: 40 00 07 42 call 4000c754 4000aa50: 94 10 00 11 mov %l1, %o2 4000aa54: 81 c7 e0 08 ret 4000aa58: 81 e8 00 00 restore =============================================================================== 40006bd8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006bd8: 9d e3 bf 98 save %sp, -104, %sp 40006bdc: 11 10 00 84 sethi %hi(0x40021000), %o0 40006be0: 92 10 00 18 mov %i0, %o1 40006be4: 90 12 20 60 or %o0, 0x60, %o0 40006be8: 40 00 07 81 call 400089ec <_Objects_Get> 40006bec: 94 07 bf fc add %fp, -4, %o2 /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40006bf0: c2 07 bf fc ld [ %fp + -4 ], %g1 40006bf4: 80 a0 60 00 cmp %g1, 0 40006bf8: 12 80 00 26 bne 40006c90 <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN 40006bfc: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006c00: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006c04: 03 00 00 10 sethi %hi(0x4000), %g1 40006c08: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006c0c: 80 88 80 01 btst %g2, %g1 40006c10: 22 80 00 0c be,a 40006c40 <_Rate_monotonic_Timeout+0x68> 40006c14: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 the_thread->Wait.id == the_period->Object.id ) { 40006c18: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c1c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40006c20: 80 a0 80 01 cmp %g2, %g1 40006c24: 32 80 00 07 bne,a 40006c40 <_Rate_monotonic_Timeout+0x68> 40006c28: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006c2c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006c30: 40 00 08 b9 call 40008f14 <_Thread_Clear_state> 40006c34: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 40006c38: 10 80 00 08 b 40006c58 <_Rate_monotonic_Timeout+0x80> 40006c3c: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 40006c40: 80 a0 60 01 cmp %g1, 1 40006c44: 12 80 00 0e bne 40006c7c <_Rate_monotonic_Timeout+0xa4> 40006c48: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006c4c: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 40006c50: 90 10 00 10 mov %l0, %o0 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006c54: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 40006c58: 7f ff fe 3e call 40006550 <_Rate_monotonic_Initiate_statistics> 40006c5c: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006c60: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006c64: 92 04 20 10 add %l0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006c68: c2 24 20 1c st %g1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006c6c: 11 10 00 84 sethi %hi(0x40021000), %o0 40006c70: 40 00 0e ba call 4000a758 <_Watchdog_Insert> 40006c74: 90 12 22 ac or %o0, 0x2ac, %o0 ! 400212ac <_Watchdog_Ticks_chain> 40006c78: 30 80 00 02 b,a 40006c80 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006c7c: c2 24 20 38 st %g1, [ %l0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006c80: 03 10 00 84 sethi %hi(0x40021000), %g1 40006c84: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 400211d0 <_Thread_Dispatch_disable_level> 40006c88: 84 00 bf ff add %g2, -1, %g2 40006c8c: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] 40006c90: 81 c7 e0 08 ret 40006c94: 81 e8 00 00 restore =============================================================================== 400065e8 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 400065e8: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 400065ec: 03 10 00 84 sethi %hi(0x40021000), %g1 if ((!the_tod) || 400065f0: 80 a6 20 00 cmp %i0, 0 400065f4: 02 80 00 2d be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN 400065f8: d2 00 62 04 ld [ %g1 + 0x204 ], %o1 (the_tod->ticks >= ticks_per_second) || 400065fc: 11 00 03 d0 sethi %hi(0xf4000), %o0 40006600: 40 00 55 b8 call 4001bce0 <.udiv> 40006604: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 40006608: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000660c: 80 a0 40 08 cmp %g1, %o0 40006610: 1a 80 00 26 bcc 400066a8 <_TOD_Validate+0xc0> 40006614: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 40006618: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000661c: 80 a0 60 3b cmp %g1, 0x3b 40006620: 18 80 00 22 bgu 400066a8 <_TOD_Validate+0xc0> 40006624: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 40006628: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000662c: 80 a0 60 3b cmp %g1, 0x3b 40006630: 18 80 00 1e bgu 400066a8 <_TOD_Validate+0xc0> 40006634: 01 00 00 00 nop (the_tod->hour >= TOD_HOURS_PER_DAY) || 40006638: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000663c: 80 a0 60 17 cmp %g1, 0x17 40006640: 18 80 00 1a bgu 400066a8 <_TOD_Validate+0xc0> 40006644: 01 00 00 00 nop (the_tod->month == 0) || 40006648: c2 06 20 04 ld [ %i0 + 4 ], %g1 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 4000664c: 80 a0 60 00 cmp %g1, 0 40006650: 02 80 00 16 be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN 40006654: 80 a0 60 0c cmp %g1, 0xc 40006658: 18 80 00 14 bgu 400066a8 <_TOD_Validate+0xc0> 4000665c: 01 00 00 00 nop (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 40006660: c6 06 00 00 ld [ %i0 ], %g3 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 40006664: 80 a0 e7 c3 cmp %g3, 0x7c3 40006668: 08 80 00 10 bleu 400066a8 <_TOD_Validate+0xc0> 4000666c: 01 00 00 00 nop (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 40006670: c4 06 20 08 ld [ %i0 + 8 ], %g2 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 40006674: 80 a0 a0 00 cmp %g2, 0 40006678: 02 80 00 0c be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN 4000667c: 80 88 e0 03 btst 3, %g3 40006680: 07 10 00 7e sethi %hi(0x4001f800), %g3 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 40006684: 12 80 00 03 bne 40006690 <_TOD_Validate+0xa8> 40006688: 86 10 e3 1c or %g3, 0x31c, %g3 ! 4001fb1c <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4000668c: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 40006690: 83 28 60 02 sll %g1, 2, %g1 40006694: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 40006698: 80 a0 40 02 cmp %g1, %g2 4000669c: b0 60 3f ff subx %g0, -1, %i0 400066a0: 81 c7 e0 08 ret 400066a4: 81 e8 00 00 restore if ( the_tod->day > days_in_month ) return false; return true; } 400066a8: 81 c7 e0 08 ret 400066ac: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40007060 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 40007060: 9d e3 bf a0 save %sp, -96, %sp */ /* * Save original state */ original_state = the_thread->current_state; 40007064: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 40007068: 40 00 04 1a call 400080d0 <_Thread_Set_transient> 4000706c: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 40007070: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 40007074: a0 10 00 18 mov %i0, %l0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 40007078: 80 a0 40 19 cmp %g1, %i1 4000707c: 02 80 00 04 be 4000708c <_Thread_Change_priority+0x2c> 40007080: 92 10 00 19 mov %i1, %o1 _Thread_Set_priority( the_thread, new_priority ); 40007084: 40 00 03 96 call 40007edc <_Thread_Set_priority> 40007088: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000708c: 7f ff eb 03 call 40001c98 40007090: 01 00 00 00 nop 40007094: b0 10 00 08 mov %o0, %i0 /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 40007098: e4 04 20 10 ld [ %l0 + 0x10 ], %l2 if ( state != STATES_TRANSIENT ) { 4000709c: 80 a4 a0 04 cmp %l2, 4 400070a0: 02 80 00 10 be 400070e0 <_Thread_Change_priority+0x80> 400070a4: a2 0c 60 04 and %l1, 4, %l1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 400070a8: 80 a4 60 00 cmp %l1, 0 400070ac: 12 80 00 03 bne 400070b8 <_Thread_Change_priority+0x58> <== NEVER TAKEN 400070b0: 82 0c bf fb and %l2, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 400070b4: c2 24 20 10 st %g1, [ %l0 + 0x10 ] _ISR_Enable( level ); 400070b8: 7f ff ea fc call 40001ca8 400070bc: 90 10 00 18 mov %i0, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 400070c0: 03 00 00 ef sethi %hi(0x3bc00), %g1 400070c4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400070c8: 80 8c 80 01 btst %l2, %g1 400070cc: 02 80 00 5c be 4000723c <_Thread_Change_priority+0x1dc> 400070d0: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 400070d4: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 400070d8: 40 00 03 54 call 40007e28 <_Thread_queue_Requeue> 400070dc: 93 e8 00 10 restore %g0, %l0, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 400070e0: 80 a4 60 00 cmp %l1, 0 400070e4: 12 80 00 1c bne 40007154 <_Thread_Change_priority+0xf4> <== NEVER TAKEN 400070e8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 400070ec: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 400070f0: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 400070f4: c8 10 80 00 lduh [ %g2 ], %g4 _Priority_Major_bit_map |= the_priority_map->ready_major; 400070f8: 03 10 00 6d sethi %hi(0x4001b400), %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 400070fc: 86 11 00 03 or %g4, %g3, %g3 40007100: c6 30 80 00 sth %g3, [ %g2 ] _Priority_Major_bit_map |= the_priority_map->ready_major; 40007104: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40007108: c6 14 20 94 lduh [ %l0 + 0x94 ], %g3 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 4000710c: c0 24 20 10 clr [ %l0 + 0x10 ] 40007110: 84 10 c0 02 or %g3, %g2, %g2 40007114: c4 30 60 30 sth %g2, [ %g1 + 0x30 ] _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 40007118: 80 8e a0 ff btst 0xff, %i2 4000711c: 02 80 00 08 be 4000713c <_Thread_Change_priority+0xdc> 40007120: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40007124: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40007128: c2 24 20 04 st %g1, [ %l0 + 4 ] before_node = after_node->next; after_node->next = the_node; 4000712c: e0 20 40 00 st %l0, [ %g1 ] the_node->next = before_node; before_node->previous = the_node; 40007130: e0 20 a0 04 st %l0, [ %g2 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 40007134: 10 80 00 08 b 40007154 <_Thread_Change_priority+0xf4> 40007138: c4 24 00 00 st %g2, [ %l0 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000713c: 84 00 60 04 add %g1, 4, %g2 40007140: c4 24 00 00 st %g2, [ %l0 ] old_last_node = the_chain->last; 40007144: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 40007148: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000714c: c4 24 20 04 st %g2, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 40007150: e0 20 80 00 st %l0, [ %g2 ] _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 40007154: 7f ff ea d5 call 40001ca8 40007158: 90 10 00 18 mov %i0, %o0 4000715c: 7f ff ea cf call 40001c98 40007160: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 40007164: 03 10 00 6d sethi %hi(0x4001b400), %g1 40007168: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 ! 4001b430 <_Priority_Major_bit_map> */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) _Thread_Ready_chain[ _Priority_Get_highest() ].first; 4000716c: 03 10 00 6c sethi %hi(0x4001b000), %g1 40007170: 85 28 a0 10 sll %g2, 0x10, %g2 40007174: da 00 62 d4 ld [ %g1 + 0x2d4 ], %o5 40007178: 87 30 a0 10 srl %g2, 0x10, %g3 4000717c: 03 10 00 67 sethi %hi(0x40019c00), %g1 40007180: 80 a0 e0 ff cmp %g3, 0xff 40007184: 18 80 00 05 bgu 40007198 <_Thread_Change_priority+0x138> 40007188: 82 10 60 30 or %g1, 0x30, %g1 4000718c: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 40007190: 10 80 00 04 b 400071a0 <_Thread_Change_priority+0x140> 40007194: 84 00 a0 08 add %g2, 8, %g2 40007198: 85 30 a0 18 srl %g2, 0x18, %g2 4000719c: c4 08 40 02 ldub [ %g1 + %g2 ], %g2 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 400071a0: 83 28 a0 10 sll %g2, 0x10, %g1 400071a4: 07 10 00 6d sethi %hi(0x4001b400), %g3 400071a8: 83 30 60 0f srl %g1, 0xf, %g1 400071ac: 86 10 e0 b0 or %g3, 0xb0, %g3 400071b0: c6 10 c0 01 lduh [ %g3 + %g1 ], %g3 400071b4: 03 10 00 67 sethi %hi(0x40019c00), %g1 400071b8: 87 28 e0 10 sll %g3, 0x10, %g3 400071bc: 89 30 e0 10 srl %g3, 0x10, %g4 400071c0: 80 a1 20 ff cmp %g4, 0xff 400071c4: 18 80 00 05 bgu 400071d8 <_Thread_Change_priority+0x178> 400071c8: 82 10 60 30 or %g1, 0x30, %g1 400071cc: c2 08 40 04 ldub [ %g1 + %g4 ], %g1 400071d0: 10 80 00 04 b 400071e0 <_Thread_Change_priority+0x180> 400071d4: 82 00 60 08 add %g1, 8, %g1 400071d8: 87 30 e0 18 srl %g3, 0x18, %g3 400071dc: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 400071e0: 83 28 60 10 sll %g1, 0x10, %g1 400071e4: 83 30 60 10 srl %g1, 0x10, %g1 400071e8: 85 28 a0 10 sll %g2, 0x10, %g2 400071ec: 85 30 a0 0c srl %g2, 0xc, %g2 400071f0: 84 00 40 02 add %g1, %g2, %g2 400071f4: 83 28 a0 04 sll %g2, 4, %g1 400071f8: 85 28 a0 02 sll %g2, 2, %g2 400071fc: 84 20 40 02 sub %g1, %g2, %g2 40007200: c4 03 40 02 ld [ %o5 + %g2 ], %g2 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 40007204: 03 10 00 6d sethi %hi(0x4001b400), %g1 40007208: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing> * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 4000720c: 07 10 00 6d sethi %hi(0x4001b400), %g3 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 40007210: 80 a0 40 02 cmp %g1, %g2 40007214: 02 80 00 08 be 40007234 <_Thread_Change_priority+0x1d4> 40007218: c4 20 e0 0c st %g2, [ %g3 + 0xc ] _Thread_Executing->is_preemptible ) 4000721c: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 40007220: 80 a0 60 00 cmp %g1, 0 40007224: 02 80 00 04 be 40007234 <_Thread_Change_priority+0x1d4> 40007228: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 4000722c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40007230: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary> _ISR_Enable( level ); 40007234: 7f ff ea 9d call 40001ca8 40007238: 81 e8 00 00 restore 4000723c: 81 c7 e0 08 ret 40007240: 81 e8 00 00 restore =============================================================================== 40007244 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 40007244: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40007248: 7f ff ea 94 call 40001c98 4000724c: a0 10 00 18 mov %i0, %l0 40007250: b0 10 00 08 mov %o0, %i0 current_state = the_thread->current_state; 40007254: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & state ) { 40007258: 80 8e 40 01 btst %i1, %g1 4000725c: 02 80 00 2d be 40007310 <_Thread_Clear_state+0xcc> 40007260: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 40007264: b2 28 40 19 andn %g1, %i1, %i1 current_state = the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 40007268: 80 a6 60 00 cmp %i1, 0 4000726c: 12 80 00 29 bne 40007310 <_Thread_Clear_state+0xcc> 40007270: f2 24 20 10 st %i1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 40007274: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 40007278: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 4000727c: c8 10 80 00 lduh [ %g2 ], %g4 40007280: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 40007284: 86 11 00 03 or %g4, %g3, %g3 40007288: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000728c: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 40007290: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 40007294: c4 24 00 00 st %g2, [ %l0 ] 40007298: 07 10 00 6d sethi %hi(0x4001b400), %g3 old_last_node = the_chain->last; 4000729c: c4 00 60 08 ld [ %g1 + 8 ], %g2 400072a0: c8 10 e0 30 lduh [ %g3 + 0x30 ], %g4 the_chain->last = the_node; 400072a4: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400072a8: c4 24 20 04 st %g2, [ %l0 + 4 ] 400072ac: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 400072b0: e0 20 80 00 st %l0, [ %g2 ] 400072b4: c2 30 e0 30 sth %g1, [ %g3 + 0x30 ] _ISR_Flash( level ); 400072b8: 7f ff ea 7c call 40001ca8 400072bc: 01 00 00 00 nop 400072c0: 7f ff ea 76 call 40001c98 400072c4: 01 00 00 00 nop * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 400072c8: 05 10 00 6d sethi %hi(0x4001b400), %g2 400072cc: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 ! 4001b40c <_Thread_Heir> 400072d0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 400072d4: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 400072d8: 80 a0 40 03 cmp %g1, %g3 400072dc: 1a 80 00 0d bcc 40007310 <_Thread_Clear_state+0xcc> 400072e0: 07 10 00 6d sethi %hi(0x4001b400), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 400072e4: c6 00 e0 3c ld [ %g3 + 0x3c ], %g3 ! 4001b43c <_Thread_Executing> * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 400072e8: e0 20 a0 0c st %l0, [ %g2 + 0xc ] if ( _Thread_Executing->is_preemptible || 400072ec: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 400072f0: 80 a0 a0 00 cmp %g2, 0 400072f4: 12 80 00 05 bne 40007308 <_Thread_Clear_state+0xc4> 400072f8: 84 10 20 01 mov 1, %g2 400072fc: 80 a0 60 00 cmp %g1, 0 40007300: 12 80 00 04 bne 40007310 <_Thread_Clear_state+0xcc> <== ALWAYS TAKEN 40007304: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 40007308: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000730c: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary> } } } _ISR_Enable( level ); 40007310: 7f ff ea 66 call 40001ca8 40007314: 81 e8 00 00 restore =============================================================================== 4000749c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 4000749c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 400074a0: 90 10 00 18 mov %i0, %o0 400074a4: 40 00 00 6c call 40007654 <_Thread_Get> 400074a8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 400074ac: c2 07 bf fc ld [ %fp + -4 ], %g1 400074b0: 80 a0 60 00 cmp %g1, 0 400074b4: 12 80 00 08 bne 400074d4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 400074b8: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 400074bc: 7f ff ff 62 call 40007244 <_Thread_Clear_state> 400074c0: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 400074c4: 03 10 00 6c sethi %hi(0x4001b000), %g1 400074c8: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level> 400074cc: 84 00 bf ff add %g2, -1, %g2 400074d0: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 400074d4: 81 c7 e0 08 ret 400074d8: 81 e8 00 00 restore =============================================================================== 400074dc <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 400074dc: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 400074e0: 2d 10 00 6d sethi %hi(0x4001b400), %l6 _ISR_Disable( level ); 400074e4: 7f ff e9 ed call 40001c98 400074e8: e0 05 a0 3c ld [ %l6 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> while ( _Context_Switch_necessary == true ) { 400074ec: 2b 10 00 6d sethi %hi(0x4001b400), %l5 400074f0: 35 10 00 6c sethi %hi(0x4001b000), %i2 heir = _Thread_Heir; 400074f4: 37 10 00 6d sethi %hi(0x4001b400), %i3 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 400074f8: 39 10 00 6c sethi %hi(0x4001b000), %i4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 400074fc: 25 10 00 6d sethi %hi(0x4001b400), %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 40007500: 3b 10 00 6d sethi %hi(0x4001b400), %i5 _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; _Thread_Executing = heir; 40007504: ac 15 a0 3c or %l6, 0x3c, %l6 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 40007508: aa 15 60 4c or %l5, 0x4c, %l5 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 4000750c: b4 16 a3 80 or %i2, 0x380, %i2 ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; 40007510: b6 16 e0 0c or %i3, 0xc, %i3 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007514: b8 17 22 d8 or %i4, 0x2d8, %i4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 40007518: a4 14 a0 44 or %l2, 0x44, %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4000751c: ba 17 60 08 or %i5, 8, %i5 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 40007520: ae 10 20 01 mov 1, %l7 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 40007524: a8 07 bf f8 add %fp, -8, %l4 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 40007528: 10 80 00 29 b 400075cc <_Thread_Dispatch+0xf0> 4000752c: a6 07 bf f0 add %fp, -16, %l3 heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 40007530: ee 26 80 00 st %l7, [ %i2 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 40007534: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Context_Switch_necessary = false; 40007538: c0 2d 40 00 clrb [ %l5 ] _Thread_Executing = heir; #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 4000753c: 80 a0 60 01 cmp %g1, 1 40007540: 12 80 00 04 bne 40007550 <_Thread_Dispatch+0x74> 40007544: e2 25 80 00 st %l1, [ %l6 ] heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007548: c2 07 00 00 ld [ %i4 ], %g1 4000754c: c2 24 60 78 st %g1, [ %l1 + 0x78 ] _ISR_Enable( level ); 40007550: 7f ff e9 d6 call 40001ca8 40007554: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 40007558: 40 00 0e 43 call 4000ae64 <_TOD_Get_uptime> 4000755c: 90 10 00 14 mov %l4, %o0 _Timestamp_Subtract( 40007560: 90 10 00 12 mov %l2, %o0 40007564: 92 10 00 14 mov %l4, %o1 40007568: 40 00 03 a4 call 400083f8 <_Timespec_Subtract> 4000756c: 94 10 00 13 mov %l3, %o2 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 40007570: 92 10 00 13 mov %l3, %o1 40007574: 40 00 03 87 call 40008390 <_Timespec_Add_to> 40007578: 90 04 20 84 add %l0, 0x84, %o0 _Thread_Time_of_last_context_switch = uptime; 4000757c: c4 07 bf f8 ld [ %fp + -8 ], %g2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 40007580: c2 07 40 00 ld [ %i5 ], %g1 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 40007584: c4 24 80 00 st %g2, [ %l2 ] 40007588: c4 07 bf fc ld [ %fp + -4 ], %g2 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 4000758c: 90 10 00 10 mov %l0, %o0 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 40007590: c4 24 a0 04 st %g2, [ %l2 + 4 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 40007594: 80 a0 60 00 cmp %g1, 0 40007598: 02 80 00 06 be 400075b0 <_Thread_Dispatch+0xd4> <== NEVER TAKEN 4000759c: 92 10 00 11 mov %l1, %o1 executing->libc_reent = *_Thread_libc_reent; 400075a0: c4 00 40 00 ld [ %g1 ], %g2 400075a4: c4 24 21 58 st %g2, [ %l0 + 0x158 ] *_Thread_libc_reent = heir->libc_reent; 400075a8: c4 04 61 58 ld [ %l1 + 0x158 ], %g2 400075ac: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 400075b0: 40 00 04 47 call 400086cc <_User_extensions_Thread_switch> 400075b4: 01 00 00 00 nop if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 400075b8: 90 04 20 d0 add %l0, 0xd0, %o0 400075bc: 40 00 05 3b call 40008aa8 <_CPU_Context_switch> 400075c0: 92 04 60 d0 add %l1, 0xd0, %o1 #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 400075c4: 7f ff e9 b5 call 40001c98 400075c8: e0 05 80 00 ld [ %l6 ], %l0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 400075cc: c2 0d 40 00 ldub [ %l5 ], %g1 400075d0: 80 a0 60 00 cmp %g1, 0 400075d4: 32 bf ff d7 bne,a 40007530 <_Thread_Dispatch+0x54> 400075d8: e2 06 c0 00 ld [ %i3 ], %l1 executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 400075dc: 03 10 00 6c sethi %hi(0x4001b000), %g1 400075e0: c0 20 63 80 clr [ %g1 + 0x380 ] ! 4001b380 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 400075e4: 7f ff e9 b1 call 40001ca8 400075e8: 01 00 00 00 nop if ( _Thread_Do_post_task_switch_extension || 400075ec: 03 10 00 6d sethi %hi(0x4001b400), %g1 400075f0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001b420 <_Thread_Do_post_task_switch_extension> 400075f4: 80 a0 60 00 cmp %g1, 0 400075f8: 12 80 00 06 bne 40007610 <_Thread_Dispatch+0x134> <== NEVER TAKEN 400075fc: 01 00 00 00 nop executing->do_post_task_switch_extension ) { 40007600: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1 40007604: 80 a0 60 00 cmp %g1, 0 40007608: 02 80 00 04 be 40007618 <_Thread_Dispatch+0x13c> 4000760c: 01 00 00 00 nop executing->do_post_task_switch_extension = false; _API_extensions_Run_postswitch(); 40007610: 7f ff f9 eb call 40005dbc <_API_extensions_Run_postswitch> 40007614: c0 2c 20 74 clrb [ %l0 + 0x74 ] 40007618: 81 c7 e0 08 ret 4000761c: 81 e8 00 00 restore =============================================================================== 4000cb54 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000cb54: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000cb58: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000cb5c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000cb60: 80 a0 a0 00 cmp %g2, 0 4000cb64: 12 80 00 0b bne 4000cb90 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN 4000cb68: 84 10 20 01 mov 1, %g2 4000cb6c: 05 10 00 6d sethi %hi(0x4001b400), %g2 4000cb70: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 ! 4001b40c <_Thread_Heir> 4000cb74: 80 a0 40 02 cmp %g1, %g2 4000cb78: 02 80 00 0b be 4000cba4 <_Thread_Evaluate_mode+0x50> 4000cb7c: 01 00 00 00 nop ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 4000cb80: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1 4000cb84: 80 a0 60 00 cmp %g1, 0 4000cb88: 02 80 00 07 be 4000cba4 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN 4000cb8c: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 4000cb90: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000cb94: 90 10 20 01 mov 1, %o0 4000cb98: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] return true; 4000cb9c: 81 c3 e0 08 retl 4000cba0: 01 00 00 00 nop } return false; } 4000cba4: 81 c3 e0 08 retl 4000cba8: 90 10 20 00 clr %o0 ! 0 =============================================================================== 4000cbac <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000cbac: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4000cbb0: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000cbb4: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 4000cbb8: 3f 10 00 32 sethi %hi(0x4000c800), %i7 4000cbbc: be 17 e3 ac or %i7, 0x3ac, %i7 ! 4000cbac <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000cbc0: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 4000cbc4: 7f ff d4 39 call 40001ca8 4000cbc8: 91 2a 20 08 sll %o0, 8, %o0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4000cbcc: 03 10 00 6c sethi %hi(0x4001b000), %g1 doneConstructors = 1; 4000cbd0: 84 10 20 01 mov 1, %g2 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4000cbd4: e2 08 61 38 ldub [ %g1 + 0x138 ], %l1 /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4000cbd8: 90 10 00 10 mov %l0, %o0 4000cbdc: 7f ff ee 49 call 40008500 <_User_extensions_Thread_begin> 4000cbe0: c4 28 61 38 stb %g2, [ %g1 + 0x138 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000cbe4: 7f ff ea 8f call 40007620 <_Thread_Enable_dispatch> 4000cbe8: a3 2c 60 18 sll %l1, 0x18, %l1 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4000cbec: 80 a4 60 00 cmp %l1, 0 4000cbf0: 32 80 00 05 bne,a 4000cc04 <_Thread_Handler+0x58> 4000cbf4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 INIT_NAME (); 4000cbf8: 40 00 37 68 call 4001a998 <_init> 4000cbfc: 01 00 00 00 nop } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4000cc00: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000cc04: 80 a0 60 00 cmp %g1, 0 4000cc08: 12 80 00 06 bne 4000cc20 <_Thread_Handler+0x74> <== NEVER TAKEN 4000cc0c: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4000cc10: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 4000cc14: 9f c0 40 00 call %g1 4000cc18: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4000cc1c: d0 24 20 28 st %o0, [ %l0 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4000cc20: 7f ff ee 49 call 40008544 <_User_extensions_Thread_exitted> 4000cc24: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 4000cc28: 90 10 20 00 clr %o0 4000cc2c: 92 10 20 01 mov 1, %o1 4000cc30: 7f ff e6 ce call 40006768 <_Internal_error_Occurred> 4000cc34: 94 10 20 06 mov 6, %o2 =============================================================================== 40007700 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40007700: 9d e3 bf a0 save %sp, -96, %sp 40007704: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 40007708: c0 26 61 5c clr [ %i1 + 0x15c ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4000770c: e0 00 40 00 ld [ %g1 ], %l0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 40007710: c0 26 61 60 clr [ %i1 + 0x160 ] 40007714: c0 26 61 64 clr [ %i1 + 0x164 ] extensions_area = NULL; the_thread->libc_reent = NULL; 40007718: c0 26 61 58 clr [ %i1 + 0x158 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4000771c: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40007720: 90 10 00 19 mov %i1, %o0 40007724: 40 00 02 90 call 40008164 <_Thread_Stack_Allocate> 40007728: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 4000772c: 80 a2 00 1b cmp %o0, %i3 40007730: 0a 80 00 04 bcs 40007740 <_Thread_Initialize+0x40> 40007734: 80 a2 20 00 cmp %o0, 0 40007738: 32 80 00 04 bne,a 40007748 <_Thread_Initialize+0x48> <== ALWAYS TAKEN 4000773c: c4 06 60 c8 ld [ %i1 + 0xc8 ], %g2 40007740: 81 c7 e0 08 ret 40007744: 91 e8 20 00 restore %g0, 0, %o0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007748: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000774c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001b41c <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40007750: c4 26 60 c4 st %g2, [ %i1 + 0xc4 ] the_stack->size = size; 40007754: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007758: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 4000775c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40007760: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40007764: c0 26 60 6c clr [ %i1 + 0x6c ] 40007768: 80 a0 60 00 cmp %g1, 0 4000776c: 02 80 00 08 be 4000778c <_Thread_Initialize+0x8c> 40007770: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 40007774: 82 00 60 01 inc %g1 40007778: 40 00 04 a3 call 40008a04 <_Workspace_Allocate> 4000777c: 91 28 60 02 sll %g1, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 40007780: b6 92 20 00 orcc %o0, 0, %i3 40007784: 22 80 00 2d be,a 40007838 <_Thread_Initialize+0x138> 40007788: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 4000778c: 80 a6 e0 00 cmp %i3, 0 40007790: 02 80 00 0c be 400077c0 <_Thread_Initialize+0xc0> 40007794: f6 26 61 68 st %i3, [ %i1 + 0x168 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 40007798: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000779c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 ! 4001b41c <_Thread_Maximum_extensions> 400077a0: 10 80 00 05 b 400077b4 <_Thread_Initialize+0xb4> 400077a4: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 400077a8: 87 28 60 02 sll %g1, 2, %g3 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 400077ac: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 400077b0: c0 21 00 03 clr [ %g4 + %g3 ] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 400077b4: 80 a0 40 02 cmp %g1, %g2 400077b8: 28 bf ff fc bleu,a 400077a8 <_Thread_Initialize+0xa8> 400077bc: c8 06 61 68 ld [ %i1 + 0x168 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 400077c0: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 400077c4: 92 10 00 1d mov %i5, %o1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 400077c8: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ] the_thread->Start.budget_callout = budget_callout; 400077cc: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 400077d0: 90 10 00 19 mov %i1, %o0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 400077d4: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 400077d8: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400077dc: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 400077e0: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 400077e4: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; 400077e8: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 400077ec: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 400077f0: c0 26 60 1c clr [ %i1 + 0x1c ] #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 400077f4: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 400077f8: 40 00 01 b9 call 40007edc <_Thread_Set_priority> 400077fc: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007800: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 40007804: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 40007808: 83 28 60 02 sll %g1, 2, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000780c: e0 26 60 0c st %l0, [ %i1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007810: f2 20 80 01 st %i1, [ %g2 + %g1 ] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 40007814: c0 26 60 84 clr [ %i1 + 0x84 ] 40007818: c0 26 60 88 clr [ %i1 + 0x88 ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 4000781c: 90 10 00 19 mov %i1, %o0 40007820: 40 00 03 6d call 400085d4 <_User_extensions_Thread_create> 40007824: b0 10 20 01 mov 1, %i0 if ( extension_status ) 40007828: 80 8a 20 ff btst 0xff, %o0 4000782c: 12 80 00 22 bne 400078b4 <_Thread_Initialize+0x1b4> 40007830: 01 00 00 00 nop return true; failed: if ( the_thread->libc_reent ) 40007834: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 40007838: 80 a2 20 00 cmp %o0, 0 4000783c: 22 80 00 05 be,a 40007850 <_Thread_Initialize+0x150> 40007840: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( the_thread->libc_reent ); 40007844: 40 00 04 79 call 40008a28 <_Workspace_Free> 40007848: 01 00 00 00 nop for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 4000784c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 40007850: 80 a2 20 00 cmp %o0, 0 40007854: 22 80 00 05 be,a 40007868 <_Thread_Initialize+0x168> 40007858: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 4000785c: 40 00 04 73 call 40008a28 <_Workspace_Free> 40007860: 01 00 00 00 nop failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 40007864: d0 06 61 60 ld [ %i1 + 0x160 ], %o0 40007868: 80 a2 20 00 cmp %o0, 0 4000786c: 22 80 00 05 be,a 40007880 <_Thread_Initialize+0x180> <== ALWAYS TAKEN 40007870: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 _Workspace_Free( the_thread->API_Extensions[i] ); 40007874: 40 00 04 6d call 40008a28 <_Workspace_Free> <== NOT EXECUTED 40007878: 01 00 00 00 nop <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 4000787c: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 <== NOT EXECUTED 40007880: 80 a2 20 00 cmp %o0, 0 40007884: 02 80 00 05 be 40007898 <_Thread_Initialize+0x198> <== ALWAYS TAKEN 40007888: 80 a6 e0 00 cmp %i3, 0 _Workspace_Free( the_thread->API_Extensions[i] ); 4000788c: 40 00 04 67 call 40008a28 <_Workspace_Free> <== NOT EXECUTED 40007890: 01 00 00 00 nop <== NOT EXECUTED if ( extensions_area ) 40007894: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40007898: 02 80 00 05 be 400078ac <_Thread_Initialize+0x1ac> 4000789c: 90 10 00 19 mov %i1, %o0 (void) _Workspace_Free( extensions_area ); 400078a0: 40 00 04 62 call 40008a28 <_Workspace_Free> 400078a4: 90 10 00 1b mov %i3, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 400078a8: 90 10 00 19 mov %i1, %o0 400078ac: 40 00 02 45 call 400081c0 <_Thread_Stack_Free> 400078b0: b0 10 20 00 clr %i0 return false; } 400078b4: 81 c7 e0 08 ret 400078b8: 81 e8 00 00 restore =============================================================================== 4000b700 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000b700: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000b704: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000b708: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000b70c: 7f ff d9 63 call 40001c98 4000b710: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000b714: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000b718: c4 04 40 00 ld [ %l1 ], %g2 4000b71c: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000b720: 80 a0 80 01 cmp %g2, %g1 4000b724: 32 80 00 03 bne,a 4000b730 <_Thread_Reset_timeslice+0x30> 4000b728: c2 04 00 00 ld [ %l0 ], %g1 _ISR_Enable( level ); 4000b72c: 30 80 00 18 b,a 4000b78c <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000b730: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b734: 86 04 60 04 add %l1, 4, %g3 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000b738: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b73c: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000b740: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000b744: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000b748: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000b74c: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000b750: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000b754: 7f ff d9 55 call 40001ca8 4000b758: 01 00 00 00 nop 4000b75c: 7f ff d9 4f call 40001c98 4000b760: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000b764: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000b768: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4001b40c <_Thread_Heir> 4000b76c: 80 a4 00 02 cmp %l0, %g2 4000b770: 12 80 00 05 bne 4000b784 <_Thread_Reset_timeslice+0x84> <== NEVER TAKEN 4000b774: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; 4000b778: c4 04 40 00 ld [ %l1 ], %g2 4000b77c: c4 20 60 0c st %g2, [ %g1 + 0xc ] _Context_Switch_necessary = true; 4000b780: 84 10 20 01 mov 1, %g2 4000b784: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000b788: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary> _ISR_Enable( level ); 4000b78c: 7f ff d9 47 call 40001ca8 4000b790: 81 e8 00 00 restore =============================================================================== 4000c10c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000c10c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000c110: 7f ff d7 5e call 40001e88 4000c114: a0 10 00 18 mov %i0, %l0 4000c118: b0 10 00 08 mov %o0, %i0 _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 4000c11c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 4000c120: 80 88 60 02 btst 2, %g1 4000c124: 02 80 00 2c be 4000c1d4 <_Thread_Resume+0xc8> <== NEVER TAKEN 4000c128: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4000c12c: 80 a0 60 00 cmp %g1, 0 4000c130: 12 80 00 29 bne 4000c1d4 <_Thread_Resume+0xc8> 4000c134: c2 24 20 10 st %g1, [ %l0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000c138: c4 04 20 90 ld [ %l0 + 0x90 ], %g2 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4000c13c: c2 04 20 8c ld [ %l0 + 0x8c ], %g1 4000c140: c8 10 80 00 lduh [ %g2 ], %g4 4000c144: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3 4000c148: 86 11 00 03 or %g4, %g3, %g3 4000c14c: c6 30 80 00 sth %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c150: 84 00 60 04 add %g1, 4, %g2 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000c154: da 14 20 94 lduh [ %l0 + 0x94 ], %o5 4000c158: c4 24 00 00 st %g2, [ %l0 ] 4000c15c: 07 10 00 84 sethi %hi(0x40021000), %g3 old_last_node = the_chain->last; 4000c160: c4 00 60 08 ld [ %g1 + 8 ], %g2 4000c164: c8 10 e1 30 lduh [ %g3 + 0x130 ], %g4 the_chain->last = the_node; 4000c168: e0 20 60 08 st %l0, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c16c: c4 24 20 04 st %g2, [ %l0 + 4 ] 4000c170: 82 13 40 04 or %o5, %g4, %g1 Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000c174: e0 20 80 00 st %l0, [ %g2 ] 4000c178: c2 30 e1 30 sth %g1, [ %g3 + 0x130 ] _ISR_Flash( level ); 4000c17c: 7f ff d7 47 call 40001e98 4000c180: 01 00 00 00 nop 4000c184: 7f ff d7 41 call 40001e88 4000c188: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000c18c: 05 10 00 84 sethi %hi(0x40021000), %g2 4000c190: c6 00 a1 0c ld [ %g2 + 0x10c ], %g3 ! 4002110c <_Thread_Heir> 4000c194: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 4000c198: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 4000c19c: 80 a0 40 03 cmp %g1, %g3 4000c1a0: 1a 80 00 0d bcc 4000c1d4 <_Thread_Resume+0xc8> 4000c1a4: 07 10 00 84 sethi %hi(0x40021000), %g3 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000c1a8: c6 00 e1 3c ld [ %g3 + 0x13c ], %g3 ! 4002113c <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 4000c1ac: e0 20 a1 0c st %l0, [ %g2 + 0x10c ] if ( _Thread_Executing->is_preemptible || 4000c1b0: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2 4000c1b4: 80 a0 a0 00 cmp %g2, 0 4000c1b8: 12 80 00 05 bne 4000c1cc <_Thread_Resume+0xc0> 4000c1bc: 84 10 20 01 mov 1, %g2 4000c1c0: 80 a0 60 00 cmp %g1, 0 4000c1c4: 12 80 00 04 bne 4000c1d4 <_Thread_Resume+0xc8> <== ALWAYS TAKEN 4000c1c8: 01 00 00 00 nop the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 4000c1cc: 03 10 00 84 sethi %hi(0x40021000), %g1 4000c1d0: c4 28 61 4c stb %g2, [ %g1 + 0x14c ] ! 4002114c <_Context_Switch_necessary> } } } _ISR_Enable( level ); 4000c1d4: 7f ff d7 31 call 40001e98 4000c1d8: 81 e8 00 00 restore =============================================================================== 400082ec <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 400082ec: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 400082f0: 03 10 00 6d sethi %hi(0x4001b400), %g1 400082f4: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 400082f8: 7f ff e6 68 call 40001c98 400082fc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 40008300: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 40008304: c4 04 40 00 ld [ %l1 ], %g2 40008308: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000830c: 80 a0 80 01 cmp %g2, %g1 40008310: 02 80 00 17 be 4000836c <_Thread_Yield_processor+0x80> 40008314: 25 10 00 6d sethi %hi(0x4001b400), %l2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008318: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 4000831c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008320: 86 04 60 04 add %l1, 4, %g3 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 40008324: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40008328: c6 24 00 00 st %g3, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000832c: c4 20 60 04 st %g2, [ %g1 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 40008330: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 40008334: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40008338: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000833c: e0 20 40 00 st %l0, [ %g1 ] _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 40008340: 7f ff e6 5a call 40001ca8 40008344: 01 00 00 00 nop 40008348: 7f ff e6 54 call 40001c98 4000834c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 40008350: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 40008354: 80 a4 00 01 cmp %l0, %g1 40008358: 12 80 00 09 bne 4000837c <_Thread_Yield_processor+0x90> <== NEVER TAKEN 4000835c: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; 40008360: c2 04 40 00 ld [ %l1 ], %g1 40008364: 10 80 00 06 b 4000837c <_Thread_Yield_processor+0x90> 40008368: c2 24 a0 0c st %g1, [ %l2 + 0xc ] _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 4000836c: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 40008370: 80 a4 00 01 cmp %l0, %g1 40008374: 02 80 00 04 be 40008384 <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN 40008378: 84 10 20 01 mov 1, %g2 _Context_Switch_necessary = true; 4000837c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40008380: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary> _ISR_Enable( level ); 40008384: 7f ff e6 49 call 40001ca8 40008388: 81 e8 00 00 restore =============================================================================== 40007bd0 <_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 ) { 40007bd0: 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; 40007bd4: 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); 40007bd8: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40007bdc: 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); 40007be0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007be4: 82 06 60 38 add %i1, 0x38, %g1 40007be8: 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; 40007bec: 2d 10 00 6a sethi %hi(0x4001a800), %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 ]; 40007bf0: 83 34 20 06 srl %l0, 6, %g1 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007bf4: 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 ]; 40007bf8: 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; 40007bfc: ac 15 a2 94 or %l6, 0x294, %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 ]; 40007c00: 83 28 60 02 sll %g1, 2, %g1 block_state = the_thread_queue->state; 40007c04: 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 ]; 40007c08: a6 24 c0 01 sub %l3, %g1, %l3 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007c0c: 12 80 00 28 bne 40007cac <_Thread_queue_Enqueue_priority+0xdc> 40007c10: 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; 40007c14: ac 04 e0 04 add %l3, 4, %l6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40007c18: 7f ff e8 20 call 40001c98 40007c1c: 01 00 00 00 nop 40007c20: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->first; 40007c24: a8 10 3f ff mov -1, %l4 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40007c28: 10 80 00 10 b 40007c68 <_Thread_queue_Enqueue_priority+0x98> 40007c2c: e2 04 c0 00 ld [ %l3 ], %l1 search_priority = search_thread->current_priority; if ( priority <= search_priority ) 40007c30: 80 a4 00 14 cmp %l0, %l4 40007c34: 28 80 00 11 bleu,a 40007c78 <_Thread_queue_Enqueue_priority+0xa8> 40007c38: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 40007c3c: 7f ff e8 1b call 40001ca8 40007c40: 90 10 00 12 mov %l2, %o0 40007c44: 7f ff e8 15 call 40001c98 40007c48: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007c4c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007c50: 80 8d 40 01 btst %l5, %g1 40007c54: 32 80 00 05 bne,a 40007c68 <_Thread_queue_Enqueue_priority+0x98><== ALWAYS TAKEN 40007c58: e2 04 40 00 ld [ %l1 ], %l1 _ISR_Enable( level ); 40007c5c: 7f ff e8 13 call 40001ca8 <== NOT EXECUTED 40007c60: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_forward_search; 40007c64: 30 bf ff ed b,a 40007c18 <_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 ) ) { 40007c68: 80 a4 40 16 cmp %l1, %l6 40007c6c: 32 bf ff f1 bne,a 40007c30 <_Thread_queue_Enqueue_priority+0x60> 40007c70: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40007c74: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007c78: 80 a0 60 01 cmp %g1, 1 40007c7c: 12 80 00 3c bne 40007d6c <_Thread_queue_Enqueue_priority+0x19c> 40007c80: 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 ) 40007c84: 80 a4 00 14 cmp %l0, %l4 40007c88: 02 80 00 2e be 40007d40 <_Thread_queue_Enqueue_priority+0x170> 40007c8c: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40007c90: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007c94: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40007c98: 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; 40007c9c: 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; 40007ca0: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007ca4: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007ca8: 30 80 00 2d b,a 40007d5c <_Thread_queue_Enqueue_priority+0x18c> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 40007cac: 7f ff e7 fb call 40001c98 40007cb0: 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; 40007cb4: a8 05 20 01 inc %l4 _ISR_Disable( level ); 40007cb8: a4 10 00 08 mov %o0, %l2 search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40007cbc: 10 80 00 10 b 40007cfc <_Thread_queue_Enqueue_priority+0x12c> 40007cc0: e2 04 e0 08 ld [ %l3 + 8 ], %l1 search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40007cc4: 80 a4 00 14 cmp %l0, %l4 40007cc8: 3a 80 00 11 bcc,a 40007d0c <_Thread_queue_Enqueue_priority+0x13c> 40007ccc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40007cd0: 7f ff e7 f6 call 40001ca8 40007cd4: 90 10 00 12 mov %l2, %o0 40007cd8: 7f ff e7 f0 call 40001c98 40007cdc: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007ce0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007ce4: 80 8d 40 01 btst %l5, %g1 40007ce8: 32 80 00 05 bne,a 40007cfc <_Thread_queue_Enqueue_priority+0x12c><== ALWAYS TAKEN 40007cec: e2 04 60 04 ld [ %l1 + 4 ], %l1 _ISR_Enable( level ); 40007cf0: 7f ff e7 ee call 40001ca8 <== NOT EXECUTED 40007cf4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED goto restart_reverse_search; 40007cf8: 30 bf ff ed b,a 40007cac <_Thread_queue_Enqueue_priority+0xdc><== NOT EXECUTED 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 ) ) { 40007cfc: 80 a4 40 13 cmp %l1, %l3 40007d00: 32 bf ff f1 bne,a 40007cc4 <_Thread_queue_Enqueue_priority+0xf4> 40007d04: e8 04 60 14 ld [ %l1 + 0x14 ], %l4 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40007d08: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007d0c: 80 a0 60 01 cmp %g1, 1 40007d10: 12 80 00 17 bne 40007d6c <_Thread_queue_Enqueue_priority+0x19c> 40007d14: 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 ) 40007d18: 80 a4 00 14 cmp %l0, %l4 40007d1c: 02 80 00 09 be 40007d40 <_Thread_queue_Enqueue_priority+0x170> 40007d20: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40007d24: c2 04 40 00 ld [ %l1 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40007d28: 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; 40007d2c: 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; 40007d30: 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; 40007d34: f2 24 40 00 st %i1, [ %l1 ] next_node->previous = the_node; 40007d38: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d3c: 30 80 00 08 b,a 40007d5c <_Thread_queue_Enqueue_priority+0x18c> 40007d40: 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; 40007d44: c2 04 60 04 ld [ %l1 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007d48: e2 26 40 00 st %l1, [ %i1 ] the_node->previous = previous_node; 40007d4c: 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; 40007d50: 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; 40007d54: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007d58: f2 24 60 04 st %i1, [ %l1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d5c: 7f ff e7 d3 call 40001ca8 40007d60: b0 10 20 01 mov 1, %i0 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40007d64: 81 c7 e0 08 ret 40007d68: 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; 40007d6c: 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; 40007d70: d0 26 80 00 st %o0, [ %i2 ] return the_thread_queue->sync_state; } 40007d74: 81 c7 e0 08 ret 40007d78: 81 e8 00 00 restore =============================================================================== 40007e28 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 40007e28: 9d e3 bf 98 save %sp, -104, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 40007e2c: 80 a6 20 00 cmp %i0, 0 40007e30: 02 80 00 19 be 40007e94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 40007e34: 01 00 00 00 nop /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 40007e38: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 40007e3c: 80 a4 60 01 cmp %l1, 1 40007e40: 12 80 00 15 bne 40007e94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 40007e44: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40007e48: 7f ff e7 94 call 40001c98 40007e4c: 01 00 00 00 nop 40007e50: a0 10 00 08 mov %o0, %l0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 40007e54: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 40007e58: 03 00 00 ef sethi %hi(0x3bc00), %g1 40007e5c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40007e60: 80 88 80 01 btst %g2, %g1 40007e64: 02 80 00 0a be 40007e8c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 40007e68: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 40007e6c: 90 10 00 18 mov %i0, %o0 40007e70: 92 10 00 19 mov %i1, %o1 40007e74: 40 00 0d 81 call 4000b478 <_Thread_queue_Extract_priority_helper> 40007e78: e2 26 20 30 st %l1, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 40007e7c: 90 10 00 18 mov %i0, %o0 40007e80: 92 10 00 19 mov %i1, %o1 40007e84: 7f ff ff 53 call 40007bd0 <_Thread_queue_Enqueue_priority> 40007e88: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 40007e8c: 7f ff e7 87 call 40001ca8 40007e90: 90 10 00 10 mov %l0, %o0 40007e94: 81 c7 e0 08 ret 40007e98: 81 e8 00 00 restore =============================================================================== 40007e9c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 40007e9c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 40007ea0: 90 10 00 18 mov %i0, %o0 40007ea4: 7f ff fd ec call 40007654 <_Thread_Get> 40007ea8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 40007eac: c2 07 bf fc ld [ %fp + -4 ], %g1 40007eb0: 80 a0 60 00 cmp %g1, 0 40007eb4: 12 80 00 08 bne 40007ed4 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 40007eb8: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 40007ebc: 40 00 0d a7 call 4000b558 <_Thread_queue_Process_timeout> 40007ec0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007ec4: 03 10 00 6c sethi %hi(0x4001b000), %g1 40007ec8: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level> 40007ecc: 84 00 bf ff add %g2, -1, %g2 40007ed0: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40007ed4: 81 c7 e0 08 ret 40007ed8: 81 e8 00 00 restore =============================================================================== 40015048 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 40015048: 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; 4001504c: 35 10 00 ef sethi %hi(0x4003bc00), %i2 40015050: b2 07 bf f4 add %fp, -12, %i1 40015054: ac 07 bf f8 add %fp, -8, %l6 40015058: a2 07 bf e8 add %fp, -24, %l1 4001505c: 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(); 40015060: 37 10 00 ef sethi %hi(0x4003bc00), %i3 40015064: 2b 10 00 ef sethi %hi(0x4003bc00), %l5 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40015068: c0 27 bf f8 clr [ %fp + -8 ] 4001506c: c0 27 bf ec clr [ %fp + -20 ] the_chain->last = _Chain_Head(the_chain); 40015070: 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); 40015074: ec 27 bf f4 st %l6, [ %fp + -12 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015078: 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); 4001507c: 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; 40015080: b4 16 a3 44 or %i2, 0x344, %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(); 40015084: b6 16 e2 80 or %i3, 0x280, %i3 40015088: aa 15 61 f0 or %l5, 0x1f0, %l5 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 4001508c: 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 ); 40015090: 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 ); 40015094: 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 ); 40015098: 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; 4001509c: 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; 400150a0: 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; 400150a4: c2 06 80 00 ld [ %i2 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 400150a8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 400150ac: 94 10 00 11 mov %l1, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 400150b0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 400150b4: 92 20 40 09 sub %g1, %o1, %o1 400150b8: 40 00 10 f0 call 40019478 <_Watchdog_Adjust_to_chain> 400150bc: 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; 400150c0: 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(); 400150c4: 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 ) { 400150c8: 80 a4 00 0a cmp %l0, %o2 400150cc: 08 80 00 06 bleu 400150e4 <_Timer_server_Body+0x9c> 400150d0: 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 ); 400150d4: 90 10 00 12 mov %l2, %o0 400150d8: 40 00 10 e8 call 40019478 <_Watchdog_Adjust_to_chain> 400150dc: 94 10 00 11 mov %l1, %o2 400150e0: 30 80 00 06 b,a 400150f8 <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 400150e4: 1a 80 00 05 bcc 400150f8 <_Timer_server_Body+0xb0> 400150e8: 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 ); 400150ec: 90 10 00 12 mov %l2, %o0 400150f0: 40 00 10 bb call 400193dc <_Watchdog_Adjust> 400150f4: 92 10 20 01 mov 1, %o1 } watchdogs->last_snapshot = snapshot; 400150f8: 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 ); 400150fc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 40015100: 40 00 02 61 call 40015a84 <_Chain_Get> 40015104: 01 00 00 00 nop if ( timer == NULL ) { 40015108: 80 a2 20 00 cmp %o0, 0 4001510c: 02 80 00 0f be 40015148 <_Timer_server_Body+0x100> 40015110: 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 ) { 40015114: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40015118: 80 a0 60 01 cmp %g1, 1 4001511c: 12 80 00 05 bne 40015130 <_Timer_server_Body+0xe8> 40015120: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 40015124: 92 02 20 10 add %o0, 0x10, %o1 40015128: 10 80 00 05 b 4001513c <_Timer_server_Body+0xf4> 4001512c: 90 10 00 14 mov %l4, %o0 } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40015130: 12 bf ff f3 bne 400150fc <_Timer_server_Body+0xb4> <== NEVER TAKEN 40015134: 92 02 20 10 add %o0, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 40015138: 90 10 00 12 mov %l2, %o0 4001513c: 40 00 11 04 call 4001954c <_Watchdog_Insert> 40015140: 01 00 00 00 nop 40015144: 30 bf ff ee b,a 400150fc <_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 ); 40015148: 7f ff e5 03 call 4000e554 4001514c: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 40015150: c2 07 bf f4 ld [ %fp + -12 ], %g1 40015154: 80 a0 40 16 cmp %g1, %l6 40015158: 12 80 00 0a bne 40015180 <_Timer_server_Body+0x138> <== NEVER TAKEN 4001515c: 01 00 00 00 nop ts->insert_chain = NULL; 40015160: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 40015164: 7f ff e5 00 call 4000e564 40015168: 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 ) ) { 4001516c: c2 07 bf e8 ld [ %fp + -24 ], %g1 40015170: 80 a0 40 13 cmp %g1, %l3 40015174: 12 80 00 06 bne 4001518c <_Timer_server_Body+0x144> 40015178: 01 00 00 00 nop 4001517c: 30 80 00 1a b,a 400151e4 <_Timer_server_Body+0x19c> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 40015180: 7f ff e4 f9 call 4000e564 <== NOT EXECUTED 40015184: 01 00 00 00 nop <== NOT EXECUTED 40015188: 30 bf ff c7 b,a 400150a4 <_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 ); 4001518c: 7f ff e4 f2 call 4000e554 40015190: 01 00 00 00 nop 40015194: 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)); 40015198: 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)) 4001519c: 80 a4 00 13 cmp %l0, %l3 400151a0: 02 80 00 0e be 400151d8 <_Timer_server_Body+0x190> 400151a4: 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; 400151a8: c2 04 00 00 ld [ %l0 ], %g1 the_chain->first = new_first; 400151ac: c2 27 bf e8 st %g1, [ %fp + -24 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 400151b0: 02 80 00 0a be 400151d8 <_Timer_server_Body+0x190> <== NEVER TAKEN 400151b4: e2 20 60 04 st %l1, [ %g1 + 4 ] watchdog->state = WATCHDOG_INACTIVE; 400151b8: c0 24 20 08 clr [ %l0 + 8 ] _ISR_Enable( level ); 400151bc: 7f ff e4 ea call 4000e564 400151c0: 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 ); 400151c4: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 400151c8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 400151cc: 9f c0 40 00 call %g1 400151d0: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 } 400151d4: 30 bf ff ee b,a 4001518c <_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 ); 400151d8: 7f ff e4 e3 call 4000e564 400151dc: 90 10 00 02 mov %g2, %o0 400151e0: 30 bf ff b0 b,a 400150a0 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 400151e4: c0 2e 20 7c clrb [ %i0 + 0x7c ] 400151e8: c2 05 40 00 ld [ %l5 ], %g1 400151ec: 82 00 60 01 inc %g1 400151f0: c2 25 40 00 st %g1, [ %l5 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 400151f4: d0 06 00 00 ld [ %i0 ], %o0 400151f8: 40 00 0d ee call 400189b0 <_Thread_Set_state> 400151fc: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 40015200: 7f ff ff 68 call 40014fa0 <_Timer_server_Reset_interval_system_watchdog> 40015204: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 40015208: 7f ff ff 7b call 40014ff4 <_Timer_server_Reset_tod_system_watchdog> 4001520c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 40015210: 40 00 0b 39 call 40017ef4 <_Thread_Enable_dispatch> 40015214: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 40015218: 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; 4001521c: 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 ); 40015220: 40 00 11 28 call 400196c0 <_Watchdog_Remove> 40015224: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 40015228: 40 00 11 26 call 400196c0 <_Watchdog_Remove> 4001522c: 90 10 00 1d mov %i5, %o0 40015230: 30 bf ff 9c b,a 400150a0 <_Timer_server_Body+0x58> =============================================================================== 4000a3bc <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 4000a3bc: c6 02 00 00 ld [ %o0 ], %g3 4000a3c0: c4 02 40 00 ld [ %o1 ], %g2 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { 4000a3c4: 82 10 00 08 mov %o0, %g1 if ( lhs->tv_sec > rhs->tv_sec ) 4000a3c8: 80 a0 c0 02 cmp %g3, %g2 4000a3cc: 14 80 00 0b bg 4000a3f8 <_Timespec_Greater_than+0x3c> 4000a3d0: 90 10 20 01 mov 1, %o0 return true; if ( lhs->tv_sec < rhs->tv_sec ) 4000a3d4: 80 a0 c0 02 cmp %g3, %g2 4000a3d8: 06 80 00 08 bl 4000a3f8 <_Timespec_Greater_than+0x3c> <== NEVER TAKEN 4000a3dc: 90 10 20 00 clr %o0 #include #include #include bool _Timespec_Greater_than( 4000a3e0: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000a3e4: c2 02 60 04 ld [ %o1 + 4 ], %g1 4000a3e8: 80 a0 80 01 cmp %g2, %g1 4000a3ec: 14 80 00 03 bg 4000a3f8 <_Timespec_Greater_than+0x3c> 4000a3f0: 90 10 20 01 mov 1, %o0 4000a3f4: 90 10 20 00 clr %o0 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 4000a3f8: 81 c3 e0 08 retl =============================================================================== 4000a8ec <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000a8ec: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 4000a8f0: 7f ff e0 d4 call 40002c40 4000a8f4: a0 10 00 18 mov %i0, %l0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000a8f8: c2 06 00 00 ld [ %i0 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000a8fc: a2 06 20 04 add %i0, 4, %l1 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000a900: 80 a0 40 11 cmp %g1, %l1 4000a904: 02 80 00 1e be 4000a97c <_Watchdog_Adjust+0x90> 4000a908: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000a90c: 02 80 00 19 be 4000a970 <_Watchdog_Adjust+0x84> 4000a910: a4 10 20 01 mov 1, %l2 4000a914: 80 a6 60 01 cmp %i1, 1 4000a918: 12 80 00 19 bne 4000a97c <_Watchdog_Adjust+0x90> <== NEVER TAKEN 4000a91c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000a920: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 4000a924: 10 80 00 07 b 4000a940 <_Watchdog_Adjust+0x54> 4000a928: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 4000a92c: f2 00 60 10 ld [ %g1 + 0x10 ], %i1 4000a930: 80 a6 80 19 cmp %i2, %i1 4000a934: 3a 80 00 05 bcc,a 4000a948 <_Watchdog_Adjust+0x5c> 4000a938: e4 20 60 10 st %l2, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 4000a93c: b4 26 40 1a sub %i1, %i2, %i2 break; 4000a940: 10 80 00 0f b 4000a97c <_Watchdog_Adjust+0x90> 4000a944: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 4000a948: 7f ff e0 c2 call 40002c50 4000a94c: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000a950: 40 00 00 95 call 4000aba4 <_Watchdog_Tickle> 4000a954: 90 10 00 10 mov %l0, %o0 _ISR_Disable( level ); 4000a958: 7f ff e0 ba call 40002c40 4000a95c: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 4000a960: c2 04 00 00 ld [ %l0 ], %g1 4000a964: 80 a0 40 11 cmp %g1, %l1 4000a968: 02 80 00 05 be 4000a97c <_Watchdog_Adjust+0x90> 4000a96c: b4 26 80 19 sub %i2, %i1, %i2 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000a970: 80 a6 a0 00 cmp %i2, 0 4000a974: 32 bf ff ee bne,a 4000a92c <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 4000a978: c2 04 00 00 ld [ %l0 ], %g1 } break; } } _ISR_Enable( level ); 4000a97c: 7f ff e0 b5 call 40002c50 4000a980: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40008880 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 40008880: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 40008884: 7f ff e5 05 call 40001c98 40008888: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000888c: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 40008890: 80 a6 20 01 cmp %i0, 1 40008894: 22 80 00 1e be,a 4000890c <_Watchdog_Remove+0x8c> 40008898: c0 24 20 08 clr [ %l0 + 8 ] 4000889c: 0a 80 00 1d bcs 40008910 <_Watchdog_Remove+0x90> 400088a0: 03 10 00 6d sethi %hi(0x4001b400), %g1 400088a4: 80 a6 20 03 cmp %i0, 3 400088a8: 18 80 00 1a bgu 40008910 <_Watchdog_Remove+0x90> <== NEVER TAKEN 400088ac: 01 00 00 00 nop 400088b0: c2 04 00 00 ld [ %l0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 400088b4: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 400088b8: c4 00 40 00 ld [ %g1 ], %g2 400088bc: 80 a0 a0 00 cmp %g2, 0 400088c0: 22 80 00 07 be,a 400088dc <_Watchdog_Remove+0x5c> 400088c4: 03 10 00 6d sethi %hi(0x4001b400), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 400088c8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 4001b410 <_TOD_Now> 400088cc: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 400088d0: 84 00 c0 02 add %g3, %g2, %g2 400088d4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 400088d8: 03 10 00 6d sethi %hi(0x4001b400), %g1 400088dc: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 4001b4d0 <_Watchdog_Sync_count> 400088e0: 80 a0 60 00 cmp %g1, 0 400088e4: 22 80 00 07 be,a 40008900 <_Watchdog_Remove+0x80> 400088e8: c2 04 00 00 ld [ %l0 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 400088ec: 03 10 00 6d sethi %hi(0x4001b400), %g1 400088f0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 ! 4001b418 <_ISR_Nest_level> 400088f4: 03 10 00 6d sethi %hi(0x4001b400), %g1 400088f8: c4 20 60 38 st %g2, [ %g1 + 0x38 ] ! 4001b438 <_Watchdog_Sync_level> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 400088fc: c2 04 00 00 ld [ %l0 ], %g1 previous = the_node->previous; 40008900: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 40008904: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40008908: c4 20 60 04 st %g2, [ %g1 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000890c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40008910: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 ! 4001b4d4 <_Watchdog_Ticks_since_boot> 40008914: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _ISR_Enable( level ); 40008918: 7f ff e4 e4 call 40001ca8 4000891c: 01 00 00 00 nop return( previous_state ); } 40008920: 81 c7 e0 08 ret 40008924: 81 e8 00 00 restore =============================================================================== 4000a0b8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4000a0b8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4000a0bc: 7f ff e1 af call 40002778 4000a0c0: a0 10 00 18 mov %i0, %l0 4000a0c4: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 4000a0c8: 11 10 00 7c sethi %hi(0x4001f000), %o0 4000a0cc: 94 10 00 19 mov %i1, %o2 4000a0d0: 90 12 23 f8 or %o0, 0x3f8, %o0 4000a0d4: 7f ff e6 7c call 40003ac4 4000a0d8: 92 10 00 10 mov %l0, %o1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000a0dc: e2 06 40 00 ld [ %i1 ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000a0e0: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 4000a0e4: 80 a4 40 19 cmp %l1, %i1 4000a0e8: 02 80 00 0e be 4000a120 <_Watchdog_Report_chain+0x68> 4000a0ec: 11 10 00 7d sethi %hi(0x4001f400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4000a0f0: 92 10 00 11 mov %l1, %o1 4000a0f4: 40 00 00 10 call 4000a134 <_Watchdog_Report> 4000a0f8: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 4000a0fc: e2 04 40 00 ld [ %l1 ], %l1 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 4000a100: 80 a4 40 19 cmp %l1, %i1 4000a104: 12 bf ff fc bne 4000a0f4 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 4000a108: 92 10 00 11 mov %l1, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4000a10c: 92 10 00 10 mov %l0, %o1 4000a110: 11 10 00 7d sethi %hi(0x4001f400), %o0 4000a114: 7f ff e6 6c call 40003ac4 4000a118: 90 12 20 10 or %o0, 0x10, %o0 ! 4001f410 4000a11c: 30 80 00 03 b,a 4000a128 <_Watchdog_Report_chain+0x70> } else { printk( "Chain is empty\n" ); 4000a120: 7f ff e6 69 call 40003ac4 4000a124: 90 12 20 20 or %o0, 0x20, %o0 } _ISR_Enable( level ); 4000a128: 7f ff e1 98 call 40002788 4000a12c: 81 e8 00 00 restore =============================================================================== 400231a0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 400231a0: 81 c3 e0 08 retl <== NOT EXECUTED 400231a4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 40018b40 <_calloc_r>: struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 40018b40: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40018b44: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40018b48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40018b4c: 7f ff c5 12 call 40009f94 <== NOT EXECUTED 40018b50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40018e18 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 40018e18: 9d e3 bf a0 save %sp, -96, %sp 40018e1c: 40 00 06 e6 call 4001a9b4 <_fini> 40018e20: 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(); 40018e24: 7f ff ff e1 call 40018da8 40018e28: 01 00 00 00 nop rtems_shutdown_executive(status); 40018e2c: 40 00 00 4c call 40018f5c 40018e30: 90 10 00 18 mov %i0, %o0 40018e34: 30 80 00 00 b,a 40018e34 <_exit+0x1c> <== NOT EXECUTED =============================================================================== 40003390 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40003390: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40003394: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40003398: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4000339c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400033a0: 7f ff ff 7f call 4000319c <== NOT EXECUTED 400033a4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40023174 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 40023174: 81 c3 e0 08 retl <== NOT EXECUTED 40023178: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED =============================================================================== 4000a2a4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000a2a4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000a2a8: 7f ff ff e6 call 4000a240 <== NOT EXECUTED 4000a2ac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40023198 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 40023198: 81 c3 e0 08 retl <== NOT EXECUTED 4002319c: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 40003e9c <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 40003e9c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40003ea0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40003ea4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003ea8: 7f ff ff 61 call 40003c2c <== NOT EXECUTED 40003eac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40018f28 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 40018f28: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40018f2c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40018f30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40018f34: 40 00 00 17 call 40018f90 <== NOT EXECUTED 40018f38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40006780 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 40006780: 9d e3 bf 60 save %sp, -160, %sp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 40006784: 7f ff fa 9f call 40005200 40006788: 90 10 00 19 mov %i1, %o0 if ( old_parent_pathlen == 0 ) 4000678c: a0 92 20 00 orcc %o0, 0, %l0 40006790: 32 80 00 18 bne,a 400067f0 <_rename_r+0x70> 40006794: 90 10 00 19 mov %i1, %o0 rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 40006798: c2 4e 40 00 ldsb [ %i1 ], %g1 4000679c: 80 a0 60 5c cmp %g1, 0x5c 400067a0: 22 80 00 08 be,a 400067c0 <_rename_r+0x40> <== NEVER TAKEN 400067a4: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 400067a8: 80 a0 60 2f cmp %g1, 0x2f 400067ac: 22 80 00 05 be,a 400067c0 <_rename_r+0x40> <== NEVER TAKEN 400067b0: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 400067b4: 80 a0 60 00 cmp %g1, 0 400067b8: 12 80 00 06 bne 400067d0 <_rename_r+0x50> <== ALWAYS TAKEN 400067bc: 03 10 00 98 sethi %hi(0x40026000), %g1 400067c0: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 ! 40026398 <== NOT EXECUTED 400067c4: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 400067c8: 10 80 00 05 b 400067dc <_rename_r+0x5c> <== NOT EXECUTED 400067cc: 92 02 60 18 add %o1, 0x18, %o1 <== NOT EXECUTED 400067d0: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 400067d4: 90 07 bf d4 add %fp, -44, %o0 400067d8: 92 02 60 04 add %o1, 4, %o1 400067dc: 94 10 20 14 mov 0x14, %o2 400067e0: 40 00 35 ee call 40013f98 400067e4: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 400067e8: 10 80 00 0b b 40006814 <_rename_r+0x94> 400067ec: 94 10 20 14 mov 0x14, %o2 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, 400067f0: 92 10 00 10 mov %l0, %o1 400067f4: 94 10 20 02 mov 2, %o2 400067f8: 96 07 bf d4 add %fp, -44, %o3 400067fc: 7f ff fa cf call 40005338 40006800: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 40006804: 80 a2 20 00 cmp %o0, 0 40006808: 12 80 00 e3 bne 40006b94 <_rename_r+0x414> <== NEVER TAKEN 4000680c: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 40006810: 94 10 20 14 mov 0x14, %o2 40006814: a6 07 bf e8 add %fp, -24, %l3 40006818: a4 07 bf d4 add %fp, -44, %l2 4000681c: 90 10 00 13 mov %l3, %o0 40006820: 40 00 35 de call 40013f98 40006824: 92 10 00 12 mov %l2, %o1 name = old + old_parent_pathlen; 40006828: b2 06 40 10 add %i1, %l0, %i1 4000682c: f2 27 bf fc st %i1, [ %fp + -4 ] name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40006830: 40 00 3c 23 call 400158bc 40006834: 90 10 00 19 mov %i1, %o0 40006838: 92 10 00 08 mov %o0, %o1 4000683c: 7f ff fa 60 call 400051bc 40006840: 90 10 00 19 mov %i1, %o0 40006844: b2 06 40 08 add %i1, %o0, %i1 40006848: f2 27 bf fc st %i1, [ %fp + -4 ] result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000684c: 40 00 3c 1c call 400158bc 40006850: 90 10 00 19 mov %i1, %o0 40006854: 96 10 00 13 mov %l3, %o3 40006858: 92 10 00 08 mov %o0, %o1 4000685c: 94 10 20 00 clr %o2 40006860: 90 10 00 19 mov %i1, %o0 40006864: 7f ff fa 79 call 40005248 40006868: 98 10 20 00 clr %o4 0, &old_loc, false ); if ( result != 0 ) { 4000686c: 80 a2 20 00 cmp %o0, 0 40006870: 22 80 00 0e be,a 400068a8 <_rename_r+0x128> 40006874: c2 4e 80 00 ldsb [ %i2 ], %g1 if ( free_old_parentloc ) 40006878: 80 8c 60 ff btst 0xff, %l1 4000687c: 02 80 00 4e be 400069b4 <_rename_r+0x234> <== NEVER TAKEN 40006880: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &old_parent_loc ); 40006884: c2 07 bf e0 ld [ %fp + -32 ], %g1 40006888: 80 a0 60 00 cmp %g1, 0 4000688c: 02 80 00 c3 be 40006b98 <_rename_r+0x418> <== NEVER TAKEN 40006890: 01 00 00 00 nop 40006894: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006898: 80 a0 60 00 cmp %g1, 0 4000689c: 02 80 00 46 be 400069b4 <_rename_r+0x234> <== NEVER TAKEN 400068a0: 90 10 00 12 mov %l2, %o0 400068a4: 30 80 00 42 b,a 400069ac <_rename_r+0x22c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 400068a8: 80 a0 60 5c cmp %g1, 0x5c 400068ac: 22 80 00 08 be,a 400068cc <_rename_r+0x14c> <== NEVER TAKEN 400068b0: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 400068b4: 80 a0 60 2f cmp %g1, 0x2f 400068b8: 22 80 00 05 be,a 400068cc <_rename_r+0x14c> 400068bc: 03 10 00 98 sethi %hi(0x40026000), %g1 400068c0: 80 a0 60 00 cmp %g1, 0 400068c4: 12 80 00 09 bne 400068e8 <_rename_r+0x168> <== ALWAYS TAKEN 400068c8: 03 10 00 98 sethi %hi(0x40026000), %g1 400068cc: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 ! 40026398 400068d0: 90 07 bf c0 add %fp, -64, %o0 400068d4: 92 02 60 18 add %o1, 0x18, %o1 400068d8: 40 00 35 b0 call 40013f98 400068dc: 94 10 20 14 mov 0x14, %o2 400068e0: 10 80 00 08 b 40006900 <_rename_r+0x180> 400068e4: 90 10 20 01 mov 1, %o0 400068e8: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 400068ec: 90 07 bf c0 add %fp, -64, %o0 400068f0: 92 02 60 04 add %o1, 4, %o1 400068f4: 40 00 35 a9 call 40013f98 400068f8: 94 10 20 14 mov 0x14, %o2 400068fc: 90 10 20 00 clr %o0 if ( !new_parent_loc.ops->evalformake_h ) { 40006900: c2 07 bf cc ld [ %fp + -52 ], %g1 40006904: c2 00 60 04 ld [ %g1 + 4 ], %g1 40006908: 80 a0 60 00 cmp %g1, 0 4000690c: 02 80 00 5e be 40006a84 <_rename_r+0x304> 40006910: 94 07 bf fc add %fp, -4, %o2 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 ); 40006914: 90 06 80 08 add %i2, %o0, %o0 40006918: a0 07 bf c0 add %fp, -64, %l0 4000691c: 9f c0 40 00 call %g1 40006920: 92 10 00 10 mov %l0, %o1 if ( result != 0 ) { 40006924: 80 a2 20 00 cmp %o0, 0 40006928: 02 80 00 25 be 400069bc <_rename_r+0x23c> 4000692c: c2 07 bf d0 ld [ %fp + -48 ], %g1 rtems_filesystem_freenode( &new_parent_loc ); 40006930: c2 07 bf cc ld [ %fp + -52 ], %g1 40006934: 80 a0 60 00 cmp %g1, 0 40006938: 02 80 00 09 be 4000695c <_rename_r+0x1dc> <== NEVER TAKEN 4000693c: 80 8c 60 ff btst 0xff, %l1 40006940: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006944: 80 a0 60 00 cmp %g1, 0 40006948: 02 80 00 05 be 4000695c <_rename_r+0x1dc> <== NEVER TAKEN 4000694c: 80 8c 60 ff btst 0xff, %l1 40006950: 9f c0 40 00 call %g1 40006954: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 40006958: 80 8c 60 ff btst 0xff, %l1 4000695c: 02 80 00 0d be 40006990 <_rename_r+0x210> <== NEVER TAKEN 40006960: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 40006964: c2 07 bf e0 ld [ %fp + -32 ], %g1 40006968: 80 a0 60 00 cmp %g1, 0 4000696c: 22 80 00 09 be,a 40006990 <_rename_r+0x210> <== NEVER TAKEN 40006970: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006974: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006978: 80 a0 60 00 cmp %g1, 0 4000697c: 22 80 00 05 be,a 40006990 <_rename_r+0x210> <== NEVER TAKEN 40006980: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006984: 9f c0 40 00 call %g1 40006988: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 4000698c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006990: 80 a0 60 00 cmp %g1, 0 40006994: 02 80 00 08 be 400069b4 <_rename_r+0x234> <== NEVER TAKEN 40006998: b0 10 3f ff mov -1, %i0 4000699c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400069a0: 80 a0 60 00 cmp %g1, 0 400069a4: 02 80 00 04 be 400069b4 <_rename_r+0x234> <== NEVER TAKEN 400069a8: 90 07 bf e8 add %fp, -24, %o0 400069ac: 9f c0 40 00 call %g1 400069b0: b0 10 3f ff mov -1, %i0 400069b4: 81 c7 e0 08 ret 400069b8: 81 e8 00 00 restore /* * 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 ) { 400069bc: c6 07 bf e4 ld [ %fp + -28 ], %g3 400069c0: 80 a0 c0 01 cmp %g3, %g1 400069c4: 02 80 00 26 be 40006a5c <_rename_r+0x2dc> 400069c8: c4 07 bf cc ld [ %fp + -52 ], %g2 rtems_filesystem_freenode( &new_parent_loc ); 400069cc: 80 a0 a0 00 cmp %g2, 0 400069d0: 02 80 00 09 be 400069f4 <_rename_r+0x274> <== NEVER TAKEN 400069d4: 80 8c 60 ff btst 0xff, %l1 400069d8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 400069dc: 80 a0 60 00 cmp %g1, 0 400069e0: 02 80 00 05 be 400069f4 <_rename_r+0x274> <== NEVER TAKEN 400069e4: 80 8c 60 ff btst 0xff, %l1 400069e8: 9f c0 40 00 call %g1 400069ec: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 400069f0: 80 8c 60 ff btst 0xff, %l1 400069f4: 02 80 00 0d be 40006a28 <_rename_r+0x2a8> 400069f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 400069fc: c2 07 bf e0 ld [ %fp + -32 ], %g1 40006a00: 80 a0 60 00 cmp %g1, 0 40006a04: 22 80 00 09 be,a 40006a28 <_rename_r+0x2a8> <== NEVER TAKEN 40006a08: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006a0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006a10: 80 a0 60 00 cmp %g1, 0 40006a14: 22 80 00 05 be,a 40006a28 <_rename_r+0x2a8> <== NEVER TAKEN 40006a18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006a1c: 9f c0 40 00 call %g1 40006a20: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 40006a24: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006a28: 80 a0 60 00 cmp %g1, 0 40006a2c: 02 80 00 08 be 40006a4c <_rename_r+0x2cc> <== NEVER TAKEN 40006a30: 01 00 00 00 nop 40006a34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006a38: 80 a0 60 00 cmp %g1, 0 40006a3c: 02 80 00 04 be 40006a4c <_rename_r+0x2cc> <== NEVER TAKEN 40006a40: 01 00 00 00 nop 40006a44: 9f c0 40 00 call %g1 40006a48: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40006a4c: 40 00 2e c9 call 40012570 <__errno> 40006a50: b0 10 3f ff mov -1, %i0 40006a54: 10 80 00 26 b 40006aec <_rename_r+0x36c> 40006a58: 82 10 20 12 mov 0x12, %g1 } if ( !new_parent_loc.ops->rename_h ) { 40006a5c: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 40006a60: 80 a0 60 00 cmp %g1, 0 40006a64: 12 80 00 25 bne 40006af8 <_rename_r+0x378> 40006a68: d6 07 bf fc ld [ %fp + -4 ], %o3 rtems_filesystem_freenode( &new_parent_loc ); 40006a6c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40006a70: 80 a0 60 00 cmp %g1, 0 40006a74: 02 80 00 05 be 40006a88 <_rename_r+0x308> <== NEVER TAKEN 40006a78: 80 8c 60 ff btst 0xff, %l1 40006a7c: 9f c0 40 00 call %g1 40006a80: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 40006a84: 80 8c 60 ff btst 0xff, %l1 40006a88: 02 80 00 0d be 40006abc <_rename_r+0x33c> <== NEVER TAKEN 40006a8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 40006a90: c2 07 bf e0 ld [ %fp + -32 ], %g1 40006a94: 80 a0 60 00 cmp %g1, 0 40006a98: 22 80 00 09 be,a 40006abc <_rename_r+0x33c> <== NEVER TAKEN 40006a9c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006aa0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006aa4: 80 a0 60 00 cmp %g1, 0 40006aa8: 22 80 00 05 be,a 40006abc <_rename_r+0x33c> <== NEVER TAKEN 40006aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006ab0: 9f c0 40 00 call %g1 40006ab4: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 40006ab8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006abc: 80 a0 60 00 cmp %g1, 0 40006ac0: 02 80 00 08 be 40006ae0 <_rename_r+0x360> <== NEVER TAKEN 40006ac4: 01 00 00 00 nop 40006ac8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006acc: 80 a0 60 00 cmp %g1, 0 40006ad0: 02 80 00 04 be 40006ae0 <_rename_r+0x360> <== NEVER TAKEN 40006ad4: 01 00 00 00 nop 40006ad8: 9f c0 40 00 call %g1 40006adc: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006ae0: 40 00 2e a4 call 40012570 <__errno> 40006ae4: b0 10 3f ff mov -1, %i0 40006ae8: 82 10 20 86 mov 0x86, %g1 40006aec: c2 22 00 00 st %g1, [ %o0 ] 40006af0: 81 c7 e0 08 ret 40006af4: 81 e8 00 00 restore } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 40006af8: 90 07 bf d4 add %fp, -44, %o0 40006afc: 92 07 bf e8 add %fp, -24, %o1 40006b00: 9f c0 40 00 call %g1 40006b04: 94 10 00 10 mov %l0, %o2 rtems_filesystem_freenode( &new_parent_loc ); 40006b08: c2 07 bf cc ld [ %fp + -52 ], %g1 40006b0c: 80 a0 60 00 cmp %g1, 0 40006b10: 02 80 00 08 be 40006b30 <_rename_r+0x3b0> <== NEVER TAKEN 40006b14: b0 10 00 08 mov %o0, %i0 40006b18: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006b1c: 80 a0 60 00 cmp %g1, 0 40006b20: 02 80 00 05 be 40006b34 <_rename_r+0x3b4> <== NEVER TAKEN 40006b24: 80 8c 60 ff btst 0xff, %l1 40006b28: 9f c0 40 00 call %g1 40006b2c: 90 10 00 10 mov %l0, %o0 if ( free_old_parentloc ) 40006b30: 80 8c 60 ff btst 0xff, %l1 40006b34: 02 80 00 0d be 40006b68 <_rename_r+0x3e8> 40006b38: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_filesystem_freenode( &old_parent_loc ); 40006b3c: c2 07 bf e0 ld [ %fp + -32 ], %g1 40006b40: 80 a0 60 00 cmp %g1, 0 40006b44: 22 80 00 09 be,a 40006b68 <_rename_r+0x3e8> <== NEVER TAKEN 40006b48: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006b4c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006b50: 80 a0 60 00 cmp %g1, 0 40006b54: 22 80 00 05 be,a 40006b68 <_rename_r+0x3e8> <== NEVER TAKEN 40006b58: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006b5c: 9f c0 40 00 call %g1 40006b60: 90 07 bf d4 add %fp, -44, %o0 rtems_filesystem_freenode( &old_loc ); 40006b64: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006b68: 80 a0 60 00 cmp %g1, 0 40006b6c: 02 80 00 0b be 40006b98 <_rename_r+0x418> <== NEVER TAKEN 40006b70: 01 00 00 00 nop 40006b74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006b78: 80 a0 60 00 cmp %g1, 0 40006b7c: 02 80 00 07 be 40006b98 <_rename_r+0x418> <== NEVER TAKEN 40006b80: 01 00 00 00 nop 40006b84: 9f c0 40 00 call %g1 40006b88: 90 07 bf e8 add %fp, -24, %o0 40006b8c: 81 c7 e0 08 ret 40006b90: 81 e8 00 00 restore 40006b94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 40006b98: 81 c7 e0 08 ret <== NOT EXECUTED 40006b9c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40004b28 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40004b28: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40004b2c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40004b30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004b34: 7f ff ff c0 call 40004a34 <== NOT EXECUTED 40004b38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 4000d188 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4000d188: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000d18c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000d190: 7f ff ff 57 call 4000ceec <== NOT EXECUTED 4000d194: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40009f94 : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 40009f94: 9d e3 bf a0 save %sp, -96, %sp 40009f98: 03 10 00 6c sethi %hi(0x4001b000), %g1 40009f9c: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 40009fa0: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 length = nelem * elsize; 40009fa4: 92 10 00 18 mov %i0, %o1 ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 40009fa8: 84 00 a0 01 inc %g2 length = nelem * elsize; 40009fac: 90 10 00 19 mov %i1, %o0 40009fb0: 40 00 31 fe call 400167a8 <.umul> 40009fb4: c4 20 60 14 st %g2, [ %g1 + 0x14 ] cptr = malloc( length ); 40009fb8: 40 00 01 97 call 4000a614 40009fbc: a0 10 00 08 mov %o0, %l0 if ( cptr ) 40009fc0: b0 92 20 00 orcc %o0, 0, %i0 40009fc4: 02 80 00 04 be 40009fd4 <== NEVER TAKEN 40009fc8: 94 10 00 10 mov %l0, %o2 memset( cptr, '\0', length ); 40009fcc: 40 00 0f 14 call 4000dc1c 40009fd0: 92 10 20 00 clr %o1 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 40009fd4: 03 10 00 6c sethi %hi(0x4001b000), %g1 40009fd8: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 40009fdc: c4 00 60 04 ld [ %g1 + 4 ], %g2 40009fe0: 84 00 bf ff add %g2, -1, %g2 40009fe4: c4 20 60 04 st %g2, [ %g1 + 4 ] return cptr; } 40009fe8: 81 c7 e0 08 ret 40009fec: 81 e8 00 00 restore =============================================================================== 4000bdd8 : #include int chdir( const char *pathname ) { 4000bdd8: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 4000bddc: 80 a6 20 00 cmp %i0, 0 4000bde0: 12 80 00 06 bne 4000bdf8 4000bde4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 4000bde8: 40 00 0c 99 call 4000f04c <__errno> 4000bdec: 01 00 00 00 nop 4000bdf0: 10 80 00 2f b 4000beac 4000bdf4: 82 10 20 0e mov 0xe, %g1 ! e /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4000bdf8: 40 00 10 34 call 4000fec8 4000bdfc: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4000be00: a0 07 bf ec add %fp, -20, %l0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 4000be04: 92 10 00 08 mov %o0, %o1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4000be08: 94 10 20 01 mov 1, %o2 4000be0c: 90 10 00 18 mov %i0, %o0 4000be10: 96 10 00 10 mov %l0, %o3 4000be14: 98 10 20 01 mov 1, %o4 4000be18: 7f ff da f8 call 400029f8 4000be1c: b0 10 3f ff mov -1, %i0 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4000be20: 80 a2 20 00 cmp %o0, 0 4000be24: 12 80 00 37 bne 4000bf00 4000be28: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4000be2c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000be30: 80 a0 60 00 cmp %g1, 0 4000be34: 12 80 00 0c bne 4000be64 <== ALWAYS TAKEN 4000be38: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 4000be3c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000be40: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000be44: 02 80 00 04 be 4000be54 <== NOT EXECUTED 4000be48: 01 00 00 00 nop <== NOT EXECUTED 4000be4c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000be50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000be54: 40 00 0c 7e call 4000f04c <__errno> <== NOT EXECUTED 4000be58: 01 00 00 00 nop <== NOT EXECUTED 4000be5c: 10 80 00 14 b 4000beac <== NOT EXECUTED 4000be60: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000be64: 9f c0 40 00 call %g1 4000be68: 90 10 00 10 mov %l0, %o0 4000be6c: 80 a2 20 01 cmp %o0, 1 4000be70: 02 80 00 12 be 4000beb8 4000be74: 03 10 00 74 sethi %hi(0x4001d000), %g1 rtems_filesystem_freenode( &loc ); 4000be78: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000be7c: 80 a0 60 00 cmp %g1, 0 4000be80: 02 80 00 08 be 4000bea0 <== NEVER TAKEN 4000be84: 01 00 00 00 nop 4000be88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000be8c: 80 a0 60 00 cmp %g1, 0 4000be90: 02 80 00 04 be 4000bea0 <== NEVER TAKEN 4000be94: 01 00 00 00 nop 4000be98: 9f c0 40 00 call %g1 4000be9c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000bea0: 40 00 0c 6b call 4000f04c <__errno> 4000bea4: 01 00 00 00 nop 4000bea8: 82 10 20 14 mov 0x14, %g1 ! 14 4000beac: c2 22 00 00 st %g1, [ %o0 ] 4000beb0: 81 c7 e0 08 ret 4000beb4: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 4000beb8: d0 00 62 30 ld [ %g1 + 0x230 ], %o0 4000bebc: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 4000bec0: 80 a0 60 00 cmp %g1, 0 4000bec4: 22 80 00 09 be,a 4000bee8 <== NEVER TAKEN 4000bec8: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000becc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d01c <__clz_tab+0x5c> 4000bed0: 80 a0 60 00 cmp %g1, 0 4000bed4: 22 80 00 05 be,a 4000bee8 <== NEVER TAKEN 4000bed8: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 4000bedc: 9f c0 40 00 call %g1 4000bee0: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 4000bee4: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000bee8: d0 00 62 30 ld [ %g1 + 0x230 ], %o0 ! 4001d230 4000beec: 92 07 bf ec add %fp, -20, %o1 4000bef0: 90 02 20 04 add %o0, 4, %o0 4000bef4: 94 10 20 14 mov 0x14, %o2 4000bef8: 40 00 0e 91 call 4000f93c 4000befc: b0 10 20 00 clr %i0 return 0; } 4000bf00: 81 c7 e0 08 ret 4000bf04: 81 e8 00 00 restore =============================================================================== 40004400 : int chmod( const char *path, mode_t mode ) { 40004400: 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 ); 40004404: 40 00 3c 86 call 4001361c 40004408: 90 10 00 18 mov %i0, %o0 4000440c: a0 07 bf ec add %fp, -20, %l0 40004410: 92 10 00 08 mov %o0, %o1 40004414: 94 10 20 00 clr %o2 40004418: 90 10 00 18 mov %i0, %o0 4000441c: 96 10 00 10 mov %l0, %o3 40004420: 98 10 20 01 mov 1, %o4 40004424: 40 00 00 c5 call 40004738 40004428: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 4000442c: 80 a2 20 00 cmp %o0, 0 40004430: 12 80 00 24 bne 400044c0 40004434: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers ){ 40004438: 80 a0 60 00 cmp %g1, 0 4000443c: 32 80 00 10 bne,a 4000447c <== ALWAYS TAKEN 40004440: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40004444: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004448: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000444c: 02 80 00 08 be 4000446c <== NOT EXECUTED 40004450: 01 00 00 00 nop <== NOT EXECUTED 40004454: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40004458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000445c: 02 80 00 04 be 4000446c <== NOT EXECUTED 40004460: 01 00 00 00 nop <== NOT EXECUTED 40004464: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004468: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4000446c: 40 00 35 3f call 40011968 <__errno> <== NOT EXECUTED 40004470: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004474: 10 80 00 12 b 400044bc <== NOT EXECUTED 40004478: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4000447c: 80 a0 60 00 cmp %g1, 0 40004480: 12 80 00 12 bne 400044c8 <== ALWAYS TAKEN 40004484: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40004488: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000448c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004490: 02 80 00 08 be 400044b0 <== NOT EXECUTED 40004494: 01 00 00 00 nop <== NOT EXECUTED 40004498: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000449c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400044a0: 02 80 00 04 be 400044b0 <== NOT EXECUTED 400044a4: 01 00 00 00 nop <== NOT EXECUTED 400044a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400044ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400044b0: 40 00 35 2e call 40011968 <__errno> <== NOT EXECUTED 400044b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400044b8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400044bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400044c0: 81 c7 e0 08 ret 400044c4: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 400044c8: 9f c0 40 00 call %g1 400044cc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 400044d0: c2 07 bf f8 ld [ %fp + -8 ], %g1 400044d4: 80 a0 60 00 cmp %g1, 0 400044d8: 02 bf ff fa be 400044c0 <== NEVER TAKEN 400044dc: b0 10 00 08 mov %o0, %i0 400044e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400044e4: 80 a0 60 00 cmp %g1, 0 400044e8: 02 80 00 04 be 400044f8 <== NEVER TAKEN 400044ec: 01 00 00 00 nop 400044f0: 9f c0 40 00 call %g1 400044f4: 90 10 00 10 mov %l0, %o0 return result; } 400044f8: 81 c7 e0 08 ret 400044fc: 81 e8 00 00 restore =============================================================================== 40004500 : int chown( const char *path, uid_t owner, gid_t group ) { 40004500: 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 ) ) 40004504: 40 00 3c 46 call 4001361c 40004508: 90 10 00 18 mov %i0, %o0 4000450c: a0 07 bf ec add %fp, -20, %l0 40004510: 92 10 00 08 mov %o0, %o1 40004514: 94 10 20 00 clr %o2 40004518: 90 10 00 18 mov %i0, %o0 4000451c: 96 10 00 10 mov %l0, %o3 40004520: 98 10 20 01 mov 1, %o4 40004524: 40 00 00 85 call 40004738 40004528: b0 10 3f ff mov -1, %i0 4000452c: 80 a2 20 00 cmp %o0, 0 40004530: 12 80 00 10 bne 40004570 40004534: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->chown_h ) { 40004538: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4000453c: 80 a0 60 00 cmp %g1, 0 40004540: 12 80 00 0e bne 40004578 <== ALWAYS TAKEN 40004544: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40004548: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000454c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004550: 02 80 00 04 be 40004560 <== NOT EXECUTED 40004554: 01 00 00 00 nop <== NOT EXECUTED 40004558: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000455c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004560: 40 00 35 02 call 40011968 <__errno> <== NOT EXECUTED 40004564: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004568: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000456c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004570: 81 c7 e0 08 ret 40004574: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 40004578: 95 2e a0 10 sll %i2, 0x10, %o2 4000457c: 93 32 60 10 srl %o1, 0x10, %o1 40004580: 95 32 a0 10 srl %o2, 0x10, %o2 40004584: 9f c0 40 00 call %g1 40004588: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4000458c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40004590: 80 a0 60 00 cmp %g1, 0 40004594: 02 bf ff f7 be 40004570 <== NEVER TAKEN 40004598: b0 10 00 08 mov %o0, %i0 4000459c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400045a0: 80 a0 60 00 cmp %g1, 0 400045a4: 02 80 00 04 be 400045b4 <== NEVER TAKEN 400045a8: 01 00 00 00 nop 400045ac: 9f c0 40 00 call %g1 400045b0: 90 10 00 10 mov %l0, %o0 return result; } 400045b4: 81 c7 e0 08 ret 400045b8: 81 e8 00 00 restore =============================================================================== 400026c8 : #include int chroot( const char *pathname ) { 400026c8: 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) { 400026cc: 23 10 00 74 sethi %hi(0x4001d000), %l1 400026d0: e0 04 62 30 ld [ %l1 + 0x230 ], %l0 ! 4001d230 400026d4: 03 10 00 76 sethi %hi(0x4001d800), %g1 400026d8: 82 10 61 40 or %g1, 0x140, %g1 ! 4001d940 400026dc: 80 a4 00 01 cmp %l0, %g1 400026e0: 12 80 00 0e bne 40002718 <== NEVER TAKEN 400026e4: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 400026e8: 40 00 05 90 call 40003d28 400026ec: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 400026f0: c2 04 62 30 ld [ %l1 + 0x230 ], %g1 400026f4: 80 a0 40 10 cmp %g1, %l0 400026f8: 12 80 00 08 bne 40002718 <== ALWAYS TAKEN 400026fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002700: 40 00 32 53 call 4000f04c <__errno> <== NOT EXECUTED 40002704: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40002708: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000270c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002710: 81 c7 e0 08 ret <== NOT EXECUTED 40002714: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 40002718: 40 00 25 b0 call 4000bdd8 4000271c: 90 10 00 18 mov %i0, %o0 if (result) { 40002720: 80 a2 20 00 cmp %o0, 0 40002724: 12 80 00 0b bne 40002750 <== NEVER TAKEN 40002728: 11 10 00 70 sethi %hi(0x4001c000), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4000272c: 92 10 20 01 mov 1, %o1 40002730: 90 12 20 f8 or %o0, 0xf8, %o0 40002734: 94 10 20 00 clr %o2 40002738: 96 07 bf ec add %fp, -20, %o3 4000273c: 40 00 00 af call 400029f8 40002740: 98 10 20 00 clr %o4 40002744: 80 a2 20 00 cmp %o0, 0 40002748: 02 80 00 0a be 40002770 <== ALWAYS TAKEN 4000274c: 03 10 00 74 sethi %hi(0x4001d000), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 40002750: 40 00 32 3f call 4000f04c <__errno> <== NOT EXECUTED 40002754: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002758: 40 00 32 3d call 4000f04c <__errno> <== NOT EXECUTED 4000275c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40002760: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002764: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 40002768: 81 c7 e0 08 ret <== NOT EXECUTED 4000276c: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 40002770: d0 00 62 30 ld [ %g1 + 0x230 ], %o0 40002774: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 40002778: 80 a0 60 00 cmp %g1, 0 4000277c: 22 80 00 09 be,a 400027a0 <== NEVER TAKEN 40002780: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40002784: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001d01c <__clz_tab+0x5c> 40002788: 80 a0 60 00 cmp %g1, 0 4000278c: 22 80 00 05 be,a 400027a0 <== NEVER TAKEN 40002790: 03 10 00 74 sethi %hi(0x4001d000), %g1 <== NOT EXECUTED 40002794: 9f c0 40 00 call %g1 40002798: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_root = loc; 4000279c: 03 10 00 74 sethi %hi(0x4001d000), %g1 400027a0: d0 00 62 30 ld [ %g1 + 0x230 ], %o0 ! 4001d230 400027a4: 92 07 bf ec add %fp, -20, %o1 400027a8: 94 10 20 14 mov 0x14, %o2 400027ac: 90 02 20 18 add %o0, 0x18, %o0 400027b0: 40 00 34 63 call 4000f93c 400027b4: b0 10 20 00 clr %i0 return 0; } 400027b8: 81 c7 e0 08 ret 400027bc: 81 e8 00 00 restore =============================================================================== 40009ff0 : #include int close( int fd ) { 40009ff0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 40009ff4: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009ff8: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 4001a9e4 40009ffc: 80 a6 00 01 cmp %i0, %g1 4000a000: 1a 80 00 0b bcc 4000a02c 4000a004: 03 10 00 6c sethi %hi(0x4001b000), %g1 iop = rtems_libio_iop(fd); 4000a008: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001b1ac 4000a00c: 83 2e 20 06 sll %i0, 6, %g1 4000a010: b1 2e 20 03 sll %i0, 3, %i0 4000a014: b0 06 00 01 add %i0, %g1, %i0 4000a018: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 4000a01c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000a020: 80 88 61 00 btst 0x100, %g1 4000a024: 32 80 00 08 bne,a 4000a044 4000a028: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4000a02c: 40 00 0c 81 call 4000d230 <__errno> 4000a030: b0 10 3f ff mov -1, %i0 4000a034: 82 10 20 09 mov 9, %g1 4000a038: c2 22 00 00 st %g1, [ %o0 ] 4000a03c: 81 c7 e0 08 ret 4000a040: 81 e8 00 00 restore rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 4000a044: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000a048: 80 a0 60 00 cmp %g1, 0 4000a04c: 02 80 00 05 be 4000a060 <== NEVER TAKEN 4000a050: b0 10 20 00 clr %i0 rc = (*iop->handlers->close_h)( iop ); 4000a054: 9f c0 40 00 call %g1 4000a058: 90 10 00 10 mov %l0, %o0 4000a05c: b0 10 00 08 mov %o0, %i0 rtems_filesystem_freenode( &iop->pathinfo ); 4000a060: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 4000a064: 80 a0 60 00 cmp %g1, 0 4000a068: 02 80 00 08 be 4000a088 <== NEVER TAKEN 4000a06c: 01 00 00 00 nop 4000a070: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000a074: 80 a0 60 00 cmp %g1, 0 4000a078: 02 80 00 04 be 4000a088 4000a07c: 01 00 00 00 nop 4000a080: 9f c0 40 00 call %g1 4000a084: 90 04 20 1c add %l0, 0x1c, %o0 rtems_libio_free( iop ); 4000a088: 40 00 00 e4 call 4000a418 4000a08c: 90 10 00 10 mov %l0, %o0 return rc; } 4000a090: 81 c7 e0 08 ret 4000a094: 81 e8 00 00 restore =============================================================================== 40009068 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 40009068: 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; 4000906c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = 0; 40009070: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 40009074: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 40009078: d2 00 60 0c ld [ %g1 + 0xc ], %o1 4000907c: 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; 40009080: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; args.mode = 0; status = rtems_io_close( 40009084: 94 07 bf f4 add %fp, -12, %o2 40009088: 40 00 03 40 call 40009d88 4000908c: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) { 40009090: 80 a2 20 00 cmp %o0, 0 40009094: 02 80 00 05 be 400090a8 <== ALWAYS TAKEN 40009098: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000909c: 40 00 00 3c call 4000918c <== NOT EXECUTED 400090a0: 01 00 00 00 nop <== NOT EXECUTED 400090a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 400090a8: 81 c7 e0 08 ret 400090ac: 81 e8 00 00 restore =============================================================================== 400090bc : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 400090bc: 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; 400090c0: e0 06 c0 00 ld [ %i3 ], %l0 if (!device_name_table) 400090c4: 80 a4 20 00 cmp %l0, 0 400090c8: 02 80 00 05 be 400090dc <== NEVER TAKEN 400090cc: 27 10 00 39 sethi %hi(0x4000e400), %l3 400090d0: a2 10 20 00 clr %l1 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 400090d4: 10 80 00 24 b 40009164 400090d8: a6 14 e2 18 or %l3, 0x218, %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 ); 400090dc: 40 00 07 01 call 4000ace0 <__errno> <== NOT EXECUTED 400090e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400090e4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 400090e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400090ec: 81 c7 e0 08 ret <== NOT EXECUTED 400090f0: 81 e8 00 00 restore <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 400090f4: e4 04 00 00 ld [ %l0 ], %l2 400090f8: 80 a4 a0 00 cmp %l2, 0 400090fc: 02 80 00 19 be 40009160 40009100: a2 04 60 01 inc %l1 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 40009104: 92 10 00 12 mov %l2, %o1 40009108: 40 00 0a 97 call 4000bb64 4000910c: 94 10 00 19 mov %i1, %o2 40009110: 80 a2 20 00 cmp %o0, 0 40009114: 32 80 00 14 bne,a 40009164 <== NEVER TAKEN 40009118: a0 04 20 14 add %l0, 0x14, %l0 <== NOT EXECUTED continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4000911c: c2 4c 80 19 ldsb [ %l2 + %i1 ], %g1 40009120: 80 a0 60 00 cmp %g1, 0 40009124: 32 80 00 10 bne,a 40009164 40009128: a0 04 20 14 add %l0, 0x14, %l0 /* 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; 4000912c: 03 10 00 39 sethi %hi(0x4000e400), %g1 40009130: c2 00 63 94 ld [ %g1 + 0x394 ], %g1 ! 4000e794 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 40009134: e0 26 c0 00 st %l0, [ %i3 ] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 40009138: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000913c: 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; 40009140: 03 10 00 39 sethi %hi(0x4000e400), %g1 40009144: 82 10 63 48 or %g1, 0x348, %g1 ! 4000e748 40009148: c2 26 e0 08 st %g1, [ %i3 + 8 ] pathloc->ops = &devFS_ops; 4000914c: 03 10 00 39 sethi %hi(0x4000e400), %g1 40009150: 82 10 63 00 or %g1, 0x300, %g1 ! 4000e700 40009154: c2 26 e0 0c st %g1, [ %i3 + 0xc ] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 40009158: 81 c7 e0 08 ret 4000915c: 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++) { 40009160: a0 04 20 14 add %l0, 0x14, %l0 40009164: c2 04 c0 00 ld [ %l3 ], %g1 40009168: 80 a4 40 01 cmp %l1, %g1 4000916c: 0a bf ff e2 bcs 400090f4 40009170: 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 ); 40009174: 40 00 06 db call 4000ace0 <__errno> 40009178: b0 10 3f ff mov -1, %i0 4000917c: 82 10 20 02 mov 2, %g1 40009180: c2 22 00 00 st %g1, [ %o0 ] } 40009184: 81 c7 e0 08 ret 40009188: 81 e8 00 00 restore =============================================================================== 40001b58 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40001b58: 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( 40001b5c: 23 10 00 39 sethi %hi(0x4000e400), %l1 40001b60: c2 04 62 18 ld [ %l1 + 0x218 ], %g1 ! 4000e618 40001b64: 85 28 60 04 sll %g1, 4, %g2 40001b68: 83 28 60 02 sll %g1, 2, %g1 40001b6c: 40 00 1b c0 call 40008a6c <_Workspace_Allocate> 40001b70: 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) 40001b74: a0 92 20 00 orcc %o0, 0, %l0 40001b78: 12 80 00 08 bne 40001b98 <== ALWAYS TAKEN 40001b7c: c2 04 62 18 ld [ %l1 + 0x218 ], %g1 rtems_set_errno_and_return_minus_one( ENOMEM ); 40001b80: 40 00 24 58 call 4000ace0 <__errno> <== NOT EXECUTED 40001b84: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001b88: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40001b8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001b90: 81 c7 e0 08 ret <== NOT EXECUTED 40001b94: 81 e8 00 00 restore <== NOT EXECUTED memset( 40001b98: 92 10 20 00 clr %o1 40001b9c: 85 28 60 04 sll %g1, 4, %g2 40001ba0: 83 28 60 02 sll %g1, 2, %g1 40001ba4: 40 00 26 b0 call 4000b664 40001ba8: 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; 40001bac: 03 10 00 39 sethi %hi(0x4000e400), %g1 40001bb0: 82 10 63 48 or %g1, 0x348, %g1 ! 4000e748 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; 40001bb4: 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; 40001bb8: c2 26 20 24 st %g1, [ %i0 + 0x24 ] temp_mt_entry->mt_fs_root.ops = &devFS_ops; 40001bbc: 03 10 00 39 sethi %hi(0x4000e400), %g1 40001bc0: 82 10 63 00 or %g1, 0x300, %g1 ! 4000e700 40001bc4: 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; } 40001bc8: 81 c7 e0 08 ret 40001bcc: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40001d44 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 40001d44: 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; 40001d48: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.command = command; 40001d4c: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; status = rtems_io_control( 40001d50: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001d54: 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; 40001d58: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; 40001d5c: f4 27 bf f8 st %i2, [ %fp + -8 ] status = rtems_io_control( 40001d60: 40 00 10 08 call 40005d80 40001d64: 94 07 bf f0 add %fp, -16, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40001d68: 80 a2 20 00 cmp %o0, 0 40001d6c: 22 80 00 06 be,a 40001d84 <== ALWAYS TAKEN 40001d70: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 40001d74: 40 00 1d 06 call 4000918c <== NOT EXECUTED 40001d78: 01 00 00 00 nop <== NOT EXECUTED 40001d7c: 81 c7 e0 08 ret <== NOT EXECUTED 40001d80: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 40001d84: b0 10 00 08 mov %o0, %i0 40001d88: 81 c7 e0 08 ret 40001d8c: 81 e8 00 00 restore =============================================================================== 40001bd0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 40001bd0: 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') && 40001bd4: c2 4e 00 00 ldsb [ %i0 ], %g1 40001bd8: 80 a0 60 64 cmp %g1, 0x64 40001bdc: 12 80 00 0e bne 40001c14 <== NEVER TAKEN 40001be0: a0 10 00 18 mov %i0, %l0 40001be4: c2 4e 20 01 ldsb [ %i0 + 1 ], %g1 40001be8: 80 a0 60 65 cmp %g1, 0x65 40001bec: 12 80 00 0b bne 40001c18 <== NEVER TAKEN 40001bf0: 03 00 00 3c sethi %hi(0xf000), %g1 (path[2] == 'v') && (path[3] == '\0')) 40001bf4: c2 4e 20 02 ldsb [ %i0 + 2 ], %g1 40001bf8: 80 a0 60 76 cmp %g1, 0x76 40001bfc: 12 80 00 07 bne 40001c18 <== NEVER TAKEN 40001c00: 03 00 00 3c sethi %hi(0xf000), %g1 40001c04: c2 4e 20 03 ldsb [ %i0 + 3 ], %g1 40001c08: 80 a0 60 00 cmp %g1, 0 40001c0c: 02 80 00 4a be 40001d34 40001c10: b0 10 20 00 clr %i0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 40001c14: 03 00 00 3c sethi %hi(0xf000), %g1 40001c18: 05 00 00 08 sethi %hi(0x2000), %g2 40001c1c: 82 0e 40 01 and %i1, %g1, %g1 40001c20: 80 a0 40 02 cmp %g1, %g2 40001c24: 22 80 00 0a be,a 40001c4c <== ALWAYS TAKEN 40001c28: e2 07 00 00 ld [ %i4 ], %l1 40001c2c: 05 00 00 18 sethi %hi(0x6000), %g2 <== NOT EXECUTED 40001c30: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40001c34: 22 80 00 06 be,a 40001c4c <== NOT EXECUTED 40001c38: e2 07 00 00 ld [ %i4 ], %l1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40001c3c: 40 00 24 29 call 4000ace0 <__errno> <== NOT EXECUTED 40001c40: 01 00 00 00 nop <== NOT EXECUTED 40001c44: 10 80 00 28 b 40001ce4 <== NOT EXECUTED 40001c48: 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; if (!device_name_table) 40001c4c: 80 a4 60 00 cmp %l1, 0 40001c50: 02 80 00 08 be 40001c70 <== NEVER TAKEN 40001c54: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 40001c58: 2b 10 00 39 sethi %hi(0x4000e400), %l5 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) 40001c5c: 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++){ 40001c60: aa 15 62 18 or %l5, 0x218, %l5 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) 40001c64: a4 10 3f ff mov -1, %l2 40001c68: 10 80 00 15 b 40001cbc 40001c6c: a6 10 20 00 clr %l3 rtems_set_errno_and_return_minus_one( EFAULT ); 40001c70: 40 00 24 1c call 4000ace0 <__errno> <== NOT EXECUTED 40001c74: 01 00 00 00 nop <== NOT EXECUTED 40001c78: 10 80 00 1b b 40001ce4 <== NOT EXECUTED 40001c7c: 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) 40001c80: d2 05 00 00 ld [ %l4 ], %o1 40001c84: 80 a2 60 00 cmp %o1, 0 40001c88: 02 80 00 0b be 40001cb4 40001c8c: a8 05 20 14 add %l4, 0x14, %l4 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 40001c90: 40 00 27 2f call 4000b94c 40001c94: 01 00 00 00 nop 40001c98: 80 a2 20 00 cmp %o0, 0 40001c9c: 32 80 00 08 bne,a 40001cbc <== ALWAYS TAKEN 40001ca0: a6 04 e0 01 inc %l3 rtems_set_errno_and_return_minus_one( EEXIST ); 40001ca4: 40 00 24 0f call 4000ace0 <__errno> <== NOT EXECUTED 40001ca8: 01 00 00 00 nop <== NOT EXECUTED 40001cac: 10 80 00 0e b 40001ce4 <== NOT EXECUTED 40001cb0: 82 10 20 11 mov 0x11, %g1 ! 11 <== NOT EXECUTED 40001cb4: 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++){ 40001cb8: a6 04 e0 01 inc %l3 40001cbc: c2 05 40 00 ld [ %l5 ], %g1 40001cc0: 80 a4 c0 01 cmp %l3, %g1 40001cc4: 0a bf ff ef bcs 40001c80 40001cc8: 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) 40001ccc: 80 a4 bf ff cmp %l2, -1 40001cd0: 12 80 00 08 bne 40001cf0 <== ALWAYS TAKEN 40001cd4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 40001cd8: 40 00 24 02 call 4000ace0 <__errno> <== NOT EXECUTED 40001cdc: 01 00 00 00 nop <== NOT EXECUTED 40001ce0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40001ce4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001ce8: 81 c7 e0 08 ret <== NOT EXECUTED 40001cec: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED _ISR_Disable(level); 40001cf0: 7f ff ff 71 call 40001ab4 40001cf4: 01 00 00 00 nop 40001cf8: a6 10 00 08 mov %o0, %l3 device_name_table[slot].device_name = (char *)path; 40001cfc: 83 2c a0 04 sll %l2, 4, %g1 device_name_table[slot].device_name_length = strlen(path); 40001d00: 90 10 00 10 mov %l0, %o0 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 40001d04: a5 2c a0 02 sll %l2, 2, %l2 40001d08: a4 04 80 01 add %l2, %g1, %l2 40001d0c: e0 24 40 12 st %l0, [ %l1 + %l2 ] device_name_table[slot].device_name_length = strlen(path); 40001d10: 40 00 27 60 call 4000ba90 40001d14: 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; 40001d18: f2 24 60 10 st %i1, [ %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); 40001d1c: d0 24 60 04 st %o0, [ %l1 + 4 ] device_name_table[slot].major = major; 40001d20: f4 24 60 08 st %i2, [ %l1 + 8 ] device_name_table[slot].minor = minor; 40001d24: f6 24 60 0c st %i3, [ %l1 + 0xc ] device_name_table[slot].mode = mode; _ISR_Enable(level); 40001d28: b0 10 20 00 clr %i0 40001d2c: 7f ff ff 66 call 40001ac4 40001d30: 90 10 00 13 mov %l3, %o0 return 0; } 40001d34: 81 c7 e0 08 ret 40001d38: 81 e8 00 00 restore =============================================================================== 40001d90 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40001d90: 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; 40001d94: 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; 40001d98: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.flags = iop->flags; 40001d9c: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 40001da0: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 40001da4: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001da8: 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; 40001dac: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; args.mode = mode; status = rtems_io_open( 40001db0: 94 07 bf f4 add %fp, -12, %o2 40001db4: 40 00 10 3e call 40005eac 40001db8: b0 10 20 00 clr %i0 np->major, np->minor, (void *) &args ); if ( status ) 40001dbc: 80 a2 20 00 cmp %o0, 0 40001dc0: 02 80 00 05 be 40001dd4 <== ALWAYS TAKEN 40001dc4: 01 00 00 00 nop return rtems_deviceio_errno(status); 40001dc8: 40 00 1c f1 call 4000918c <== NOT EXECUTED 40001dcc: 01 00 00 00 nop <== NOT EXECUTED 40001dd0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 40001dd4: 81 c7 e0 08 ret 40001dd8: 81 e8 00 00 restore =============================================================================== 40001ddc : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40001ddc: 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; 40001de0: 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; 40001de4: 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; 40001de8: 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; 40001dec: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 40001df0: 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; 40001df4: 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( 40001df8: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED 40001dfc: 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; 40001e00: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; 40001e04: 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; 40001e08: 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( 40001e0c: 40 00 10 3e call 40005f04 <== NOT EXECUTED 40001e10: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 40001e14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40001e18: 22 80 00 06 be,a 40001e30 <== NOT EXECUTED 40001e1c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 40001e20: 40 00 1c db call 4000918c <== NOT EXECUTED 40001e24: 01 00 00 00 nop <== NOT EXECUTED 40001e28: 81 c7 e0 08 ret <== NOT EXECUTED 40001e2c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 40001e30: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40001e34: 81 c7 e0 08 ret <== NOT EXECUTED 40001e38: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40001e3c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 40001e3c: 9d e3 bf a0 save %sp, -96, %sp rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 40001e40: c2 06 00 00 ld [ %i0 ], %g1 if (!the_dev) 40001e44: 80 a0 60 00 cmp %g1, 0 40001e48: 32 80 00 08 bne,a 40001e68 <== ALWAYS TAKEN 40001e4c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 rtems_set_errno_and_return_minus_one( EFAULT ); 40001e50: 40 00 23 a4 call 4000ace0 <__errno> <== NOT EXECUTED 40001e54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001e58: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40001e5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001e60: 81 c7 e0 08 ret <== NOT EXECUTED 40001e64: 81 e8 00 00 restore <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 40001e68: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 40001e6c: c2 00 60 08 ld [ %g1 + 8 ], %g1 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 ); 40001e70: c4 26 60 1c st %g2, [ %i1 + 0x1c ] buf->st_mode = the_dev->mode; 40001e74: c6 26 60 0c st %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 ); 40001e78: c2 26 60 18 st %g1, [ %i1 + 0x18 ] buf->st_mode = the_dev->mode; return 0; } 40001e7c: 81 c7 e0 08 ret 40001e80: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40001e84 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 40001e84: 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; 40001e88: 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; 40001e8c: 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; 40001e90: 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; 40001e94: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; args.bytes_moved = 0; 40001e98: 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; 40001e9c: 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( 40001ea0: d2 00 60 0c ld [ %g1 + 0xc ], %o1 40001ea4: 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; 40001ea8: c4 3f bf e8 std %g2, [ %fp + -24 ] args.buffer = (void *) buffer; 40001eac: 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; 40001eb0: 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( 40001eb4: 40 00 10 2a call 40005f5c 40001eb8: 94 07 bf e0 add %fp, -32, %o2 np->major, np->minor, (void *) &args ); if ( status ) 40001ebc: 80 a2 20 00 cmp %o0, 0 40001ec0: 22 80 00 06 be,a 40001ed8 <== ALWAYS TAKEN 40001ec4: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 40001ec8: 40 00 1c b1 call 4000918c <== NOT EXECUTED 40001ecc: 01 00 00 00 nop <== NOT EXECUTED 40001ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40001ed4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 40001ed8: b0 10 00 08 mov %o0, %i0 40001edc: 81 c7 e0 08 ret 40001ee0: 81 e8 00 00 restore =============================================================================== 4000b8e8 : */ int device_close( rtems_libio_t *iop ) { 4000b8e8: 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; 4000b8ec: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000b8f0: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = 0; 4000b8f4: c0 27 bf f8 clr [ %fp + -8 ] args.mode = 0; 4000b8f8: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_close( 4000b8fc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000b900: 94 07 bf f4 add %fp, -12, %o2 4000b904: 40 00 03 ec call 4000c8b4 4000b908: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000b90c: 80 a2 20 00 cmp %o0, 0 4000b910: 02 80 00 05 be 4000b924 <== ALWAYS TAKEN 4000b914: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000b918: 40 00 05 56 call 4000ce70 <== NOT EXECUTED 4000b91c: 01 00 00 00 nop <== NOT EXECUTED 4000b920: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000b924: 81 c7 e0 08 ret 4000b928: 81 e8 00 00 restore =============================================================================== 4000b7e8 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000b7e8: 9d e3 bf 90 save %sp, -112, %sp args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000b7ec: 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; 4000b7f0: f2 27 bf f4 st %i1, [ %fp + -12 ] args.buffer = buffer; 4000b7f4: 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; 4000b7f8: f0 27 bf f0 st %i0, [ %fp + -16 ] args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000b7fc: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000b800: 40 00 04 43 call 4000c90c 4000b804: 94 07 bf f0 add %fp, -16, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000b808: 80 a2 20 00 cmp %o0, 0 4000b80c: 22 80 00 06 be,a 4000b824 <== ALWAYS TAKEN 4000b810: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000b814: 40 00 05 97 call 4000ce70 <== NOT EXECUTED 4000b818: 01 00 00 00 nop <== NOT EXECUTED 4000b81c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b820: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return args.ioctl_return; } 4000b824: b0 10 00 08 mov %o0, %i0 4000b828: 81 c7 e0 08 ret 4000b82c: 81 e8 00 00 restore =============================================================================== 4000b92c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000b92c: 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; 4000b930: 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; 4000b934: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; 4000b938: f0 27 bf f4 st %i0, [ %fp + -12 ] args.flags = iop->flags; 4000b93c: c4 27 bf f8 st %g2, [ %fp + -8 ] args.mode = mode; 4000b940: f6 27 bf fc st %i3, [ %fp + -4 ] status = rtems_io_open( 4000b944: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000b948: 94 07 bf f4 add %fp, -12, %o2 4000b94c: 40 00 04 06 call 4000c964 4000b950: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000b954: 80 a2 20 00 cmp %o0, 0 4000b958: 02 80 00 05 be 4000b96c <== ALWAYS TAKEN 4000b95c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000b960: 40 00 05 44 call 4000ce70 <== NOT EXECUTED 4000b964: 01 00 00 00 nop <== NOT EXECUTED 4000b968: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000b96c: 81 c7 e0 08 ret 4000b970: 81 e8 00 00 restore =============================================================================== 4000b88c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000b88c: 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; 4000b890: 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; 4000b894: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 4000b898: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 <== NOT EXECUTED args.buffer = buffer; 4000b89c: 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; 4000b8a0: d8 3f bf e8 std %o4, [ %fp + -24 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000b8a4: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED args.flags = iop->flags; 4000b8a8: 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; 4000b8ac: 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; 4000b8b0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED status = rtems_io_read( 4000b8b4: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 <== NOT EXECUTED 4000b8b8: 40 00 04 41 call 4000c9bc <== NOT EXECUTED 4000b8bc: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000b8c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b8c4: 22 80 00 06 be,a 4000b8dc <== NOT EXECUTED 4000b8c8: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000b8cc: 40 00 05 69 call 4000ce70 <== NOT EXECUTED 4000b8d0: 01 00 00 00 nop <== NOT EXECUTED 4000b8d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b8d8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000b8dc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000b8e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000b8e4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000b830 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000b830: 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; 4000b834: 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; 4000b838: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 args.iop = iop; args.offset = iop->offset; 4000b83c: d8 1e 20 10 ldd [ %i0 + 0x10 ], %o4 args.buffer = (void *) buffer; 4000b840: 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; 4000b844: d8 3f bf e8 std %o4, [ %fp + -24 ] args.buffer = (void *) buffer; args.count = count; 4000b848: f4 27 bf f4 st %i2, [ %fp + -12 ] args.flags = iop->flags; 4000b84c: 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; 4000b850: 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; 4000b854: c0 27 bf fc clr [ %fp + -4 ] status = rtems_io_write( 4000b858: d0 18 60 50 ldd [ %g1 + 0x50 ], %o0 4000b85c: 40 00 04 6e call 4000ca14 4000b860: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000b864: 80 a2 20 00 cmp %o0, 0 4000b868: 22 80 00 06 be,a 4000b880 <== ALWAYS TAKEN 4000b86c: d0 07 bf fc ld [ %fp + -4 ], %o0 return rtems_deviceio_errno(status); 4000b870: 40 00 05 80 call 4000ce70 <== NOT EXECUTED 4000b874: 01 00 00 00 nop <== NOT EXECUTED 4000b878: 81 c7 e0 08 ret <== NOT EXECUTED 4000b87c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000b880: b0 10 00 08 mov %o0, %i0 4000b884: 81 c7 e0 08 ret 4000b888: 81 e8 00 00 restore =============================================================================== 40003bc0 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40003bc0: 9d e3 bf a0 save %sp, -96, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40003bc4: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40003bc8: 80 a0 60 00 cmp %g1, 0 40003bcc: 02 80 00 1a be 40003c34 <== ALWAYS TAKEN 40003bd0: a0 10 00 18 mov %i0, %l0 rtems_interrupt_disable (level); 40003bd4: 7f ff f8 31 call 40001c98 <== NOT EXECUTED 40003bd8: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40003bdc: 10 80 00 0f b 40003c18 <== NOT EXECUTED 40003be0: a2 10 20 02 mov 2, %l1 ! 2 <== NOT EXECUTED tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 40003be4: 7f ff f8 31 call 40001ca8 <== NOT EXECUTED 40003be8: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003bec: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40003bf0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003bf4: 40 00 06 5d call 40005568 <== NOT EXECUTED 40003bf8: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003bfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003c00: 02 80 00 04 be 40003c10 <== NOT EXECUTED 40003c04: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003c08: 40 00 07 ff call 40005c04 <== NOT EXECUTED 40003c0c: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003c10: 7f ff f8 22 call 40001c98 <== NOT EXECUTED 40003c14: 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) { 40003c18: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 <== NOT EXECUTED 40003c1c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40003c20: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003c24: 32 bf ff f0 bne,a 40003be4 <== NOT EXECUTED 40003c28: 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); 40003c2c: 7f ff f8 1f call 40001ca8 <== NOT EXECUTED 40003c30: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003c34: 81 c7 e0 08 ret 40003c38: 81 e8 00 00 restore =============================================================================== 40002edc : int dup2( int fildes, int fildes2 ) { 40002edc: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40002ee0: a0 07 bf b8 add %fp, -72, %l0 40002ee4: 90 10 00 18 mov %i0, %o0 40002ee8: 40 00 01 dc call 40003658 40002eec: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40002ef0: 80 a2 3f ff cmp %o0, -1 40002ef4: 02 80 00 0e be 40002f2c <== NEVER TAKEN 40002ef8: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40002efc: 92 10 00 10 mov %l0, %o1 40002f00: 40 00 01 d6 call 40003658 40002f04: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40002f08: 80 a2 3f ff cmp %o0, -1 40002f0c: 02 80 00 07 be 40002f28 <== ALWAYS TAKEN 40002f10: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002f14: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002f18: 40 00 00 a1 call 4000319c <== NOT EXECUTED 40002f1c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002f20: 81 c7 e0 08 ret <== NOT EXECUTED 40002f24: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40002f28: 90 10 3f ff mov -1, %o0 } 40002f2c: b0 10 00 08 mov %o0, %i0 40002f30: 81 c7 e0 08 ret 40002f34: 81 e8 00 00 restore =============================================================================== 4000360c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4000360c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40003610: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003614: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003618: 02 80 00 1c be 40003688 <== NOT EXECUTED 4000361c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003620: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40003624: c4 00 63 54 ld [ %g1 + 0x354 ], %g2 ! 4001ab54 <__ctype_ptr__><== NOT EXECUTED 40003628: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED 4000362c: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40003630: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 40003634: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40003638: 02 80 00 15 be 4000368c <== NOT EXECUTED 4000363c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 40003640: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40003644: 02 80 00 12 be 4000368c <== NOT EXECUTED 40003648: 01 00 00 00 nop <== NOT EXECUTED 4000364c: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 40003650: 02 80 00 0f be 4000368c <== NOT EXECUTED 40003654: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 40003658: 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] = '^'; 4000365c: c2 2f bf f8 stb %g1, [ %fp + -8 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40003660: f0 2f bf f9 stb %i0, [ %fp + -7 ] <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 40003664: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 40003668: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000366c: 7f ff ff 39 call 40003350 <== NOT EXECUTED 40003670: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40003674: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003678: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 4000367c: 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')) { 40003680: 81 c7 e0 08 ret <== NOT EXECUTED 40003684: 81 e8 00 00 restore <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 40003688: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 4000368c: 7f ff ff 7d call 40003480 <== NOT EXECUTED 40003690: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003694: 81 c7 e0 08 ret <== NOT EXECUTED 40003698: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000294c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 4000294c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002950: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 ! 4001e96c <== NOT EXECUTED 40002954: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002958: 02 80 00 05 be 4000296c <== NOT EXECUTED 4000295c: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40002960: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002964: 40 00 33 10 call 4000f5a4 <== NOT EXECUTED 40002968: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000296c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 40002974 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40002974: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002978: d0 00 60 84 ld [ %g1 + 0x84 ], %o0 ! 4001e884 <== NOT EXECUTED 4000297c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002980: 02 80 00 05 be 40002994 <== NOT EXECUTED 40002984: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40002988: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000298c: 40 00 33 06 call 4000f5a4 <== NOT EXECUTED 40002990: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002994: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 4000369c : * 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) { 4000369c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->ccount == 0) 400036a0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 400036a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400036a8: 02 80 00 0a be 400036d0 <== NOT EXECUTED 400036ac: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 400036b0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400036b4: 02 80 00 7a be 4000389c <== NOT EXECUTED 400036b8: 25 10 00 6a sethi %hi(0x4001a800), %l2 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 400036bc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 400036c0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400036c4: 32 80 00 05 bne,a 400036d8 <== NOT EXECUTED 400036c8: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 400036cc: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 400036d0: 81 c7 e0 08 ret <== NOT EXECUTED 400036d4: 81 e8 00 00 restore <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 400036d8: 12 80 00 71 bne 4000389c <== NOT EXECUTED 400036dc: 25 10 00 6a sethi %hi(0x4001a800), %l2 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 400036e0: 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; 400036e4: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 400036e8: 7f ff ff c9 call 4000360c <== NOT EXECUTED 400036ec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 400036f0: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 400036f4: 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) 400036f8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400036fc: 02 bf ff f5 be 400036d0 <== NOT EXECUTED 40003700: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40003704: 30 80 00 0f b,a 40003740 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 40003708: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4000370c: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 40003710: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40003714: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003718: 02 80 00 5c be 40003888 <== NOT EXECUTED 4000371c: e2 08 80 03 ldub [ %g2 + %g3 ], %l1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40003720: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003724: 32 80 00 09 bne,a 40003748 <== NOT EXECUTED 40003728: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED 4000372c: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40003730: 32 80 00 06 bne,a 40003748 <== NOT EXECUTED 40003734: a2 0c 60 ff and %l1, 0xff, %l1 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 40003738: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 4000373c: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 40003740: 7f ff ff b3 call 4000360c <== NOT EXECUTED 40003744: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 40003748: 80 a4 60 09 cmp %l1, 9 <== NOT EXECUTED 4000374c: 32 80 00 2a bne,a 400037f4 <== NOT EXECUTED 40003750: 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) 40003754: 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; 40003758: 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)) { 4000375c: da 04 80 00 ld [ %l2 ], %o5 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003760: 10 80 00 13 b 400037ac <== NOT EXECUTED 40003764: 84 10 20 00 clr %g2 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { 40003768: c8 09 00 02 ldub [ %g4 + %g2 ], %g4 <== NOT EXECUTED 4000376c: 80 a1 20 09 cmp %g4, 9 <== NOT EXECUTED 40003770: 12 80 00 04 bne 40003780 <== NOT EXECUTED 40003774: 98 03 40 04 add %o5, %g4, %o4 <== NOT EXECUTED col = (col | 7) + 1; 40003778: 10 80 00 0b b 400037a4 <== NOT EXECUTED 4000377c: a2 14 60 07 or %l1, 7, %l1 <== NOT EXECUTED } else if (iscntrl (c)) { 40003780: c8 0b 20 01 ldub [ %o4 + 1 ], %g4 <== NOT EXECUTED 40003784: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 40003788: 22 80 00 08 be,a 400037a8 <== NOT EXECUTED 4000378c: a2 04 60 01 inc %l1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003790: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003794: 32 80 00 05 bne,a 400037a8 <== NOT EXECUTED 40003798: a2 04 60 02 add %l1, 2, %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4000379c: 10 80 00 04 b 400037ac <== NOT EXECUTED 400037a0: 84 00 a0 01 inc %g2 <== NOT EXECUTED else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 400037a4: a2 04 60 01 inc %l1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 400037a8: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 400037ac: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 400037b0: 32 bf ff ee bne,a 40003768 <== NOT EXECUTED 400037b4: c8 04 20 1c ld [ %l0 + 0x1c ], %g4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400037b8: 10 80 00 08 b 400037d8 <== NOT EXECUTED 400037bc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 400037c0: 7f ff fe e4 call 40003350 <== NOT EXECUTED 400037c4: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 400037c8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 400037cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400037d0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400037d4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 400037d8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 400037dc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 400037e0: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400037e4: 14 bf ff f7 bg 400037c0 <== NOT EXECUTED 400037e8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 400037ec: 10 80 00 28 b 4000388c <== NOT EXECUTED 400037f0: 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)) { 400037f4: a2 04 60 01 inc %l1 <== NOT EXECUTED 400037f8: c4 08 80 11 ldub [ %g2 + %l1 ], %g2 <== NOT EXECUTED 400037fc: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40003800: 22 80 00 10 be,a 40003840 <== NOT EXECUTED 40003804: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40003808: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 4000380c: 22 80 00 0d be,a 40003840 <== NOT EXECUTED 40003810: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40003814: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003818: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 4000381c: 7f ff fe cd call 40003350 <== NOT EXECUTED 40003820: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003824: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003828: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000382c: 22 80 00 05 be,a 40003840 <== NOT EXECUTED 40003830: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 40003834: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003838: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 4000383c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40003840: c2 08 40 11 ldub [ %g1 + %l1 ], %g1 <== NOT EXECUTED 40003844: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003848: 02 80 00 07 be 40003864 <== NOT EXECUTED 4000384c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003850: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003854: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003858: 02 80 00 0d be 4000388c <== NOT EXECUTED 4000385c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40003860: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003864: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003868: 7f ff fe ba call 40003350 <== NOT EXECUTED 4000386c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40003870: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003874: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003878: 02 80 00 05 be 4000388c <== NOT EXECUTED 4000387c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40003880: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003884: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 40003888: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000388c: 32 80 00 0a bne,a 400038b4 <== NOT EXECUTED 40003890: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 40003894: 81 c7 e0 08 ret <== NOT EXECUTED 40003898: 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); 4000389c: 27 10 00 66 sethi %hi(0x40019800), %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 400038a0: 29 10 00 66 sethi %hi(0x40019800), %l4 <== NOT EXECUTED 400038a4: a4 14 a3 54 or %l2, 0x354, %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); 400038a8: a6 14 e3 d8 or %l3, 0x3d8, %l3 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 400038ac: a8 15 23 d0 or %l4, 0x3d0, %l4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 400038b0: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 400038b4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400038b8: 32 bf ff 94 bne,a 40003708 <== NOT EXECUTED 400038bc: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED 400038c0: 81 c7 e0 08 ret <== NOT EXECUTED 400038c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000319c : int fcntl( int fd, int cmd, ... ) { 4000319c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 400031a0: 03 10 00 7a sethi %hi(0x4001e800), %g1 400031a4: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 4001ea04 ... ) { int ret; va_list ap; va_start( ap, cmd ); 400031a8: 84 07 a0 4c add %fp, 0x4c, %g2 400031ac: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400031b0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400031b4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400031b8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 400031bc: 80 a6 00 01 cmp %i0, %g1 400031c0: 1a 80 00 0c bcc 400031f0 <== NEVER TAKEN 400031c4: c4 27 bf fc st %g2, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 400031c8: 07 10 00 7c sethi %hi(0x4001f000), %g3 400031cc: c6 00 e1 d4 ld [ %g3 + 0x1d4 ], %g3 ! 4001f1d4 400031d0: 89 2e 20 06 sll %i0, 6, %g4 400031d4: a1 2e 20 03 sll %i0, 3, %l0 400031d8: a0 04 00 04 add %l0, %g4, %l0 400031dc: a0 00 c0 10 add %g3, %l0, %l0 rtems_libio_check_is_open(iop); 400031e0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 400031e4: 80 8a 21 00 btst 0x100, %o0 400031e8: 12 80 00 06 bne 40003200 <== ALWAYS TAKEN 400031ec: 80 a6 60 09 cmp %i1, 9 400031f0: 40 00 32 b1 call 4000fcb4 <__errno> <== NOT EXECUTED 400031f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031f8: 10 80 00 51 b 4000333c <== NOT EXECUTED 400031fc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40003200: 18 80 00 4c bgu 40003330 40003204: 89 2e 60 02 sll %i1, 2, %g4 40003208: 1b 10 00 0c sethi %hi(0x40003000), %o5 4000320c: 9a 13 61 74 or %o5, 0x174, %o5 ! 40003174 40003210: c8 03 40 04 ld [ %o5 + %g4 ], %g4 40003214: 81 c1 00 00 jmp %g4 40003218: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4000321c: c4 00 80 00 ld [ %g2 ], %g2 if ( fd2 ) 40003220: 80 a0 a0 00 cmp %g2, 0 40003224: 02 80 00 09 be 40003248 <== ALWAYS TAKEN 40003228: 80 a0 80 01 cmp %g2, %g1 diop = rtems_libio_iop( fd2 ); 4000322c: 1a 80 00 0c bcc 4000325c <== NOT EXECUTED 40003230: a2 10 20 00 clr %l1 <== NOT EXECUTED 40003234: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40003238: a3 28 a0 03 sll %g2, 3, %l1 <== NOT EXECUTED 4000323c: a2 04 40 01 add %l1, %g1, %l1 <== NOT EXECUTED 40003240: 10 80 00 07 b 4000325c <== NOT EXECUTED 40003244: a2 00 c0 11 add %g3, %l1, %l1 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40003248: 40 00 02 22 call 40003ad0 4000324c: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 40003250: a2 92 20 00 orcc %o0, 0, %l1 40003254: 02 80 00 4d be 40003388 <== NEVER TAKEN 40003258: 01 00 00 00 nop break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 4000325c: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 diop->flags = iop->flags; 40003260: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 40003264: c6 04 20 40 ld [ %l0 + 0x40 ], %g3 diop->file_info = iop->file_info; 40003268: c4 24 60 3c st %g2, [ %l1 + 0x3c ] diop->flags = iop->flags; 4000326c: c2 24 60 18 st %g1, [ %l1 + 0x18 ] ret = -1; break; } } diop->handlers = iop->handlers; 40003270: c6 24 60 40 st %g3, [ %l1 + 0x40 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40003274: 90 04 60 1c add %l1, 0x1c, %o0 40003278: 92 04 20 1c add %l0, 0x1c, %o1 4000327c: 40 00 37 37 call 40010f58 40003280: 94 10 20 14 mov 0x14, %o2 ret = (int) (diop - rtems_libio_iops); 40003284: 03 10 00 7c sethi %hi(0x4001f000), %g1 40003288: f0 00 61 d4 ld [ %g1 + 0x1d4 ], %i0 ! 4001f1d4 4000328c: a2 24 40 18 sub %l1, %i0, %l1 40003290: a3 3c 60 03 sra %l1, 3, %l1 40003294: 85 2c 60 06 sll %l1, 6, %g2 40003298: 83 2c 60 03 sll %l1, 3, %g1 4000329c: 82 20 80 01 sub %g2, %g1, %g1 400032a0: 85 28 60 06 sll %g1, 6, %g2 400032a4: 82 00 40 02 add %g1, %g2, %g1 400032a8: 82 00 40 11 add %g1, %l1, %g1 400032ac: b1 28 60 0f sll %g1, 0xf, %i0 400032b0: b0 26 00 01 sub %i0, %g1, %i0 400032b4: b1 2e 20 03 sll %i0, 3, %i0 400032b8: 10 80 00 24 b 40003348 400032bc: b0 06 00 11 add %i0, %l1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 400032c0: b1 32 20 0b srl %o0, 0xb, %i0 400032c4: 10 80 00 24 b 40003354 400032c8: 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 ) ) 400032cc: c2 00 80 00 ld [ %g2 ], %g1 400032d0: 80 a0 60 00 cmp %g1, 0 400032d4: 22 80 00 03 be,a 400032e0 <== NEVER TAKEN 400032d8: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED 400032dc: 90 12 28 00 or %o0, 0x800, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 400032e0: d0 24 20 18 st %o0, [ %l0 + 0x18 ] 400032e4: 10 80 00 1c b 40003354 400032e8: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 400032ec: 40 00 01 8e call 40003924 400032f0: 01 00 00 00 nop 400032f4: 10 80 00 15 b 40003348 400032f8: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 400032fc: d0 00 80 00 ld [ %g2 ], %o0 40003300: 40 00 02 28 call 40003ba0 40003304: 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); 40003308: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000330c: 90 0a 22 01 and %o0, 0x201, %o0 40003310: 82 08 7d fe and %g1, -514, %g1 40003314: 82 12 00 01 or %o0, %g1, %g1 40003318: 10 80 00 0f b 40003354 4000331c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40003320: 40 00 32 65 call 4000fcb4 <__errno> 40003324: b0 10 3f ff mov -1, %i0 40003328: 10 80 00 05 b 4000333c 4000332c: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 40003330: 40 00 32 61 call 4000fcb4 <__errno> 40003334: b0 10 3f ff mov -1, %i0 40003338: 82 10 20 16 mov 0x16, %g1 4000333c: c2 22 00 00 st %g1, [ %o0 ] 40003340: 81 c7 e0 08 ret 40003344: 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) { 40003348: 80 a6 20 00 cmp %i0, 0 4000334c: 06 80 00 0f bl 40003388 <== NEVER TAKEN 40003350: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 40003354: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40003358: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4000335c: 80 a0 60 00 cmp %g1, 0 40003360: 02 bf ff f8 be 40003340 <== NEVER TAKEN 40003364: 92 10 00 10 mov %l0, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40003368: 9f c0 40 00 call %g1 4000336c: 90 10 00 19 mov %i1, %o0 if (err) { 40003370: a0 92 20 00 orcc %o0, 0, %l0 40003374: 02 80 00 05 be 40003388 <== ALWAYS TAKEN 40003378: 01 00 00 00 nop errno = err; 4000337c: 40 00 32 4e call 4000fcb4 <__errno> <== NOT EXECUTED 40003380: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40003384: 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; } 40003388: 81 c7 e0 08 ret 4000338c: 81 e8 00 00 restore =============================================================================== 400033ac : #include int fdatasync( int fd ) { 400033ac: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400033b0: 03 10 00 7a sethi %hi(0x4001e800), %g1 400033b4: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 4001ea04 400033b8: 80 a6 00 01 cmp %i0, %g1 400033bc: 1a 80 00 0c bcc 400033ec 400033c0: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 400033c4: 03 10 00 7c sethi %hi(0x4001f000), %g1 400033c8: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 4001f1d4 400033cc: 83 2e 20 06 sll %i0, 6, %g1 400033d0: b1 2e 20 03 sll %i0, 3, %i0 400033d4: b0 06 00 01 add %i0, %g1, %i0 400033d8: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 400033dc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 400033e0: 80 88 61 00 btst 0x100, %g1 400033e4: 12 80 00 06 bne 400033fc <== ALWAYS TAKEN 400033e8: 80 88 60 04 btst 4, %g1 400033ec: 40 00 32 32 call 4000fcb4 <__errno> 400033f0: 01 00 00 00 nop 400033f4: 10 80 00 0f b 40003430 400033f8: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400033fc: 32 80 00 06 bne,a 40003414 40003400: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40003404: 40 00 32 2c call 4000fcb4 <__errno> 40003408: 01 00 00 00 nop 4000340c: 10 80 00 09 b 40003430 40003410: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 40003414: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40003418: 80 a0 60 00 cmp %g1, 0 4000341c: 12 80 00 08 bne 4000343c 40003420: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003424: 40 00 32 24 call 4000fcb4 <__errno> 40003428: 01 00 00 00 nop 4000342c: 82 10 20 86 mov 0x86, %g1 ! 86 40003430: c2 22 00 00 st %g1, [ %o0 ] 40003434: 10 80 00 04 b 40003444 40003438: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fdatasync_h)( iop ); 4000343c: 9f c0 40 00 call %g1 40003440: 01 00 00 00 nop } 40003444: 81 c7 e0 08 ret 40003448: 91 e8 00 08 restore %g0, %o0, %o0 4000344c: 40 00 35 08 call 4001086c <_fseek_r+0x260> <== NOT EXECUTED 40003450: 40 00 35 14 call 400108a0 <_fseek_r+0x294> <== NOT EXECUTED 40003454: 40 00 35 20 call 400108d4 <_fseek_r+0x2c8> <== NOT EXECUTED 40003458: 40 00 35 2c call 40010908 <_fseek_r+0x2fc> <== NOT EXECUTED 4000345c: 40 00 35 38 call 4001093c <_fseek_r+0x330> <== NOT EXECUTED 40003460: 40 00 35 44 call 40010970 <_fseek_r+0x364> <== NOT EXECUTED 40003464: 40 00 35 50 call 400109a4 <_fseek_r+0x398> <== NOT EXECUTED 40003468: 40 00 35 5c call 400109d8 <_fseek_r+0x3cc> <== NOT EXECUTED 4000346c: 40 00 35 68 call 40010a0c <_fseek_r+0x400> <== NOT EXECUTED 40003470: 40 00 35 74 call 40010a40 <_fseek_r+0x434> <== NOT EXECUTED 40003474: 40 00 35 80 call 40010a74 <_fseek_r+0x468> <== NOT EXECUTED 40003478: 40 00 35 8c call 40010aa8 <_fseek_r+0x49c> <== NOT EXECUTED =============================================================================== 4000bee8 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000bee8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000beec: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000bef0: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4001b134 <== NOT EXECUTED */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000bef4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 4000bef8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000befc: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bf00: 7f ff e5 9a call 40005568 <== NOT EXECUTED 4000bf04: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000bf08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bf0c: 12 80 00 de bne 4000c284 <== NOT EXECUTED 4000bf10: 01 00 00 00 nop <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 4000bf14: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (pipe == NULL) { 4000bf18: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000bf1c: 32 80 00 49 bne,a 4000c040 <== NOT EXECUTED 4000bf20: 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)); 4000bf24: 90 10 20 34 mov 0x34, %o0 <== NOT EXECUTED 4000bf28: 7f ff f9 bb call 4000a614 <== NOT EXECUTED 4000bf2c: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED if (pipe == NULL) 4000bf30: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4000bf34: 02 80 00 54 be 4000c084 <== NOT EXECUTED 4000bf38: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 4000bf3c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bf40: 40 00 07 37 call 4000dc1c <== NOT EXECUTED 4000bf44: 94 10 20 34 mov 0x34, %o2 <== NOT EXECUTED pipe->Size = PIPE_BUF; 4000bf48: 82 10 22 00 mov 0x200, %g1 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 4000bf4c: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED 4000bf50: 7f ff f9 b1 call 4000a614 <== NOT EXECUTED 4000bf54: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED if (! pipe->Buffer) 4000bf58: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bf5c: 02 80 00 34 be 4000c02c <== NOT EXECUTED 4000bf60: d0 24 80 00 st %o0, [ %l2 ] <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( 4000bf64: 27 10 00 6a sethi %hi(0x4001a800), %l3 <== NOT EXECUTED 4000bf68: d0 4c e3 40 ldsb [ %l3 + 0x340 ], %o0 ! 4001ab40 <== NOT EXECUTED 4000bf6c: 29 14 12 5c sethi %hi(0x50497000), %l4 <== NOT EXECUTED 4000bf70: 82 15 22 00 or %l4, 0x200, %g1 ! 50497200 <== NOT EXECUTED 4000bf74: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bf78: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000bf7c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bf80: 40 00 01 7c call 4000c570 <== NOT EXECUTED 4000bf84: 96 04 a0 2c add %l2, 0x2c, %o3 <== NOT EXECUTED 4000bf88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bf8c: 32 80 00 26 bne,a 4000c024 <== NOT EXECUTED 4000bf90: 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( 4000bf94: d0 4c e3 40 ldsb [ %l3 + 0x340 ], %o0 <== NOT EXECUTED 4000bf98: 03 14 12 5d sethi %hi(0x50497400), %g1 <== NOT EXECUTED 4000bf9c: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <== NOT EXECUTED 4000bfa0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bfa4: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 4000bfa8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bfac: 40 00 01 71 call 4000c570 <== NOT EXECUTED 4000bfb0: 96 04 a0 30 add %l2, 0x30, %o3 <== NOT EXECUTED 4000bfb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bfb8: 12 80 00 18 bne 4000c018 <== NOT EXECUTED 4000bfbc: 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( 4000bfc0: d0 4c e3 40 ldsb [ %l3 + 0x340 ], %o0 <== NOT EXECUTED 4000bfc4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000bfc8: 90 12 00 14 or %o0, %l4, %o0 <== NOT EXECUTED 4000bfcc: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4000bfd0: 96 10 20 00 clr %o3 <== NOT EXECUTED 4000bfd4: 7f ff e4 c3 call 400052e0 <== NOT EXECUTED 4000bfd8: 98 04 a0 28 add %l2, 0x28, %o4 <== NOT EXECUTED 4000bfdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bfe0: 12 80 00 0c bne 4000c010 <== NOT EXECUTED 4000bfe4: 01 00 00 00 nop <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4000bfe8: c2 0c e3 40 ldub [ %l3 + 0x340 ], %g1 <== NOT EXECUTED 4000bfec: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4000bff0: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4000bff4: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4000bff8: 80 a0 60 7a cmp %g1, 0x7a <== NOT EXECUTED 4000bffc: 12 80 00 10 bne 4000c03c <== NOT EXECUTED 4000c000: c4 2c e3 40 stb %g2, [ %l3 + 0x340 ] <== NOT EXECUTED c = 'a'; 4000c004: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 4000c008: 10 80 00 0d b 4000c03c <== NOT EXECUTED 4000c00c: c2 2c e3 40 stb %g1, [ %l3 + 0x340 ] <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4000c010: 40 00 01 86 call 4000c628 <== NOT EXECUTED 4000c014: d0 04 a0 30 ld [ %l2 + 0x30 ], %o0 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 4000c018: 40 00 01 84 call 4000c628 <== NOT EXECUTED 4000c01c: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 4000c020: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED 4000c024: 7f ff f8 22 call 4000a0ac <== NOT EXECUTED 4000c028: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED err_buf: free(pipe); 4000c02c: 7f ff f8 20 call 4000a0ac <== NOT EXECUTED 4000c030: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000c034: 10 80 00 15 b 4000c088 <== NOT EXECUTED 4000c038: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000c03c: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000c040: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c044: 7f ff e5 49 call 40005568 <== NOT EXECUTED 4000c048: 94 10 20 00 clr %o2 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000c04c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000c050: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000c054: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000c058: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4000c05c: b0 0e 20 04 and %i0, 4, %i0 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 4000c060: 12 80 00 09 bne 4000c084 <== NOT EXECUTED 4000c064: b0 06 3f fc add %i0, -4, %i0 <== NOT EXECUTED if (err) 4000c068: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000c06c: 22 80 00 06 be,a 4000c084 <== NOT EXECUTED 4000c070: e2 24 00 00 st %l1, [ %l0 ] <== NOT EXECUTED pipe_free(pipe); 4000c074: 7f ff ff 4d call 4000bda8 <== NOT EXECUTED 4000c078: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 4000c07c: 10 80 00 03 b 4000c088 <== NOT EXECUTED 4000c080: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000c084: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000c088: 7f ff e5 7f call 40005684 <== NOT EXECUTED 4000c08c: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4001b134 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) 4000c090: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000c094: 12 80 00 7c bne 4000c284 <== NOT EXECUTED 4000c098: 01 00 00 00 nop <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4000c09c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 <== NOT EXECUTED 4000c0a0: 82 08 a0 06 and %g2, 6, %g1 <== NOT EXECUTED 4000c0a4: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED 4000c0a8: 02 80 00 2e be 4000c160 <== NOT EXECUTED 4000c0ac: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED 4000c0b0: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 4000c0b4: 02 80 00 56 be 4000c20c <== NOT EXECUTED 4000c0b8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000c0bc: 12 80 00 6a bne 4000c264 <== NOT EXECUTED 4000c0c0: 01 00 00 00 nop <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000c0c4: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000c0c8: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000c0cc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4000c0d0: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000c0d4: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000c0d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c0dc: 12 80 00 05 bne 4000c0f0 <== NOT EXECUTED 4000c0e0: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000c0e4: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000c0e8: 40 00 01 6a call 4000c690 <== NOT EXECUTED 4000c0ec: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Writers == 0) { 4000c0f0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c0f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c0f8: 12 80 00 5b bne 4000c264 <== NOT EXECUTED 4000c0fc: 01 00 00 00 nop <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 4000c100: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED 4000c104: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000c108: 12 80 00 57 bne 4000c264 <== NOT EXECUTED 4000c10c: 01 00 00 00 nop <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 4000c110: e4 04 60 24 ld [ %l1 + 0x24 ], %l2 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4000c114: 7f ff e5 5c call 40005684 <== NOT EXECUTED 4000c118: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000c11c: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000c120: 40 00 01 73 call 4000c6ec <== NOT EXECUTED 4000c124: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c128: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c12c: 12 80 00 52 bne 4000c274 <== NOT EXECUTED 4000c130: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000c134: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000c138: 7f ff e5 0c call 40005568 <== NOT EXECUTED 4000c13c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c140: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c144: 32 80 00 4d bne,a 4000c278 <== NOT EXECUTED 4000c148: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 4000c14c: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 <== NOT EXECUTED 4000c150: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000c154: 02 bf ff f0 be 4000c114 <== NOT EXECUTED 4000c158: 01 00 00 00 nop <== NOT EXECUTED 4000c15c: 30 80 00 42 b,a 4000c264 <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4000c160: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000c164: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c168: 32 80 00 07 bne,a 4000c184 <== NOT EXECUTED 4000c16c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c170: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 4000c174: 22 80 00 04 be,a 4000c184 <== NOT EXECUTED 4000c178: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000c17c: 10 80 00 3f b 4000c278 <== NOT EXECUTED 4000c180: b0 10 3f fa mov -6, %i0 <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000c184: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000c188: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; 4000c18c: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000c190: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000c194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c198: 12 80 00 05 bne 4000c1ac <== NOT EXECUTED 4000c19c: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000c1a0: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000c1a4: 40 00 01 3b call 4000c690 <== NOT EXECUTED 4000c1a8: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED if (pipe->Readers == 0) { 4000c1ac: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 4000c1b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c1b4: 12 80 00 2c bne 4000c264 <== NOT EXECUTED 4000c1b8: 01 00 00 00 nop <== NOT EXECUTED prevCounter = pipe->readerCounter; 4000c1bc: e4 04 60 20 ld [ %l1 + 0x20 ], %l2 <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 4000c1c0: 7f ff e5 31 call 40005684 <== NOT EXECUTED 4000c1c4: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000c1c8: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000c1cc: 40 00 01 48 call 4000c6ec <== NOT EXECUTED 4000c1d0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000c1d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c1d8: 12 80 00 27 bne 4000c274 <== NOT EXECUTED 4000c1dc: 92 10 20 00 clr %o1 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 4000c1e0: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED 4000c1e4: 7f ff e4 e1 call 40005568 <== NOT EXECUTED 4000c1e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000c1ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c1f0: 32 80 00 22 bne,a 4000c278 <== NOT EXECUTED 4000c1f4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 4000c1f8: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 4000c1fc: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000c200: 02 bf ff f0 be 4000c1c0 <== NOT EXECUTED 4000c204: 01 00 00 00 nop <== NOT EXECUTED 4000c208: 30 80 00 17 b,a 4000c264 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4000c20c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000c210: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000c214: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4000c218: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Readers ++ == 0) 4000c21c: c6 24 60 10 st %g3, [ %l1 + 0x10 ] <== NOT EXECUTED 4000c220: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c224: 12 80 00 05 bne 4000c238 <== NOT EXECUTED 4000c228: c4 24 60 20 st %g2, [ %l1 + 0x20 ] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000c22c: d0 04 60 30 ld [ %l1 + 0x30 ], %o0 <== NOT EXECUTED 4000c230: 40 00 01 18 call 4000c690 <== NOT EXECUTED 4000c234: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4000c238: 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 ++; 4000c23c: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000c240: 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 ++; 4000c244: 84 00 a0 01 inc %g2 <== NOT EXECUTED if (pipe->Writers ++ == 0) 4000c248: c6 24 60 14 st %g3, [ %l1 + 0x14 ] <== NOT EXECUTED 4000c24c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c250: 12 80 00 05 bne 4000c264 <== NOT EXECUTED 4000c254: c4 24 60 24 st %g2, [ %l1 + 0x24 ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000c258: d0 04 60 2c ld [ %l1 + 0x2c ], %o0 <== NOT EXECUTED 4000c25c: 40 00 01 0d call 4000c690 <== NOT EXECUTED 4000c260: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 4000c264: 7f ff e5 08 call 40005684 <== NOT EXECUTED 4000c268: d0 04 60 28 ld [ %l1 + 0x28 ], %o0 <== NOT EXECUTED return 0; 4000c26c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c270: 81 e8 00 00 restore <== NOT EXECUTED 4000c274: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 4000c278: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000c27c: 7f ff fe d7 call 4000bdd8 <== NOT EXECUTED 4000c280: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED return err; } 4000c284: 81 c7 e0 08 ret <== NOT EXECUTED 4000c288: 81 e8 00 00 restore <== NOT EXECUTED 4000c28c: 40 00 c3 b0 call 4003d14c <__end+0x2192c> <== NOT EXECUTED 4000c290: 40 00 c3 d0 call 4003d1d0 <__end+0x219b0> <== NOT EXECUTED 4000c294: 40 00 c3 c8 call 4003d1b4 <__end+0x21994> <== NOT EXECUTED 4000c298: 40 00 c3 c8 call 4003d1b8 <__end+0x21998> <== NOT EXECUTED 4000c29c: 40 00 c3 f0 call 4003d25c <__end+0x21a3c> <== NOT EXECUTED 4000c2a0: 40 00 c3 e4 call 4003d230 <__end+0x21a10> <== NOT EXECUTED 4000c2a4: 40 00 c4 08 call 4003d2c4 <__end+0x21aa4> <== NOT EXECUTED =============================================================================== 40009034 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40009034: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 40009038: 05 10 00 9c sethi %hi(0x40027000), %g2 <== NOT EXECUTED 4000903c: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 <== NOT EXECUTED 40009040: 10 80 00 08 b 40009060 <== NOT EXECUTED 40009044: 84 10 a3 7c or %g2, 0x37c, %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 ) { 40009048: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 <== NOT EXECUTED 4000904c: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 40009050: 32 80 00 04 bne,a 40009060 <== NOT EXECUTED 40009054: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40009058: 81 c3 e0 08 retl <== NOT EXECUTED 4000905c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40009060: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009064: 32 bf ff f9 bne,a 40009048 <== NOT EXECUTED 40009068: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED return true; } } return false; } 4000906c: 81 c3 e0 08 retl <== NOT EXECUTED 40009070: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 4000347c : long fpathconf( int fd, int name ) { 4000347c: 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); 40003480: 03 10 00 7a sethi %hi(0x4001e800), %g1 40003484: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 4001ea04 40003488: 80 a6 00 01 cmp %i0, %g1 4000348c: 1a 80 00 0b bcc 400034b8 40003490: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop(fd); 40003494: 03 10 00 7c sethi %hi(0x4001f000), %g1 40003498: c2 00 61 d4 ld [ %g1 + 0x1d4 ], %g1 ! 4001f1d4 4000349c: b1 2e 20 03 sll %i0, 3, %i0 400034a0: b0 06 00 02 add %i0, %g2, %i0 400034a4: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 400034a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 400034ac: 80 88 61 00 btst 0x100, %g1 400034b0: 12 80 00 06 bne 400034c8 <== ALWAYS TAKEN 400034b4: 80 88 60 02 btst 2, %g1 400034b8: 40 00 31 ff call 4000fcb4 <__errno> 400034bc: 01 00 00 00 nop 400034c0: 10 80 00 07 b 400034dc 400034c4: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 400034c8: 12 80 00 08 bne 400034e8 <== ALWAYS TAKEN 400034cc: 80 a6 60 0b cmp %i1, 0xb 400034d0: 40 00 31 f9 call 4000fcb4 <__errno> <== NOT EXECUTED 400034d4: 01 00 00 00 nop <== NOT EXECUTED 400034d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400034dc: c2 22 00 00 st %g1, [ %o0 ] 400034e0: 81 c7 e0 08 ret 400034e4: 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 ) { 400034e8: 18 80 00 2c bgu 40003598 400034ec: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 400034f0: b3 2e 60 02 sll %i1, 2, %i1 400034f4: 05 10 00 0d sethi %hi(0x40003400), %g2 400034f8: 84 10 a0 4c or %g2, 0x4c, %g2 ! 4000344c 400034fc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 40003500: 81 c0 80 00 jmp %g2 40003504: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 40003508: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 break; 4000350c: 81 c7 e0 08 ret 40003510: 81 e8 00 00 restore case _PC_MAX_CANON: return_value = the_limits->max_canon; 40003514: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 break; 40003518: 81 c7 e0 08 ret 4000351c: 81 e8 00 00 restore case _PC_MAX_INPUT: return_value = the_limits->max_input; 40003520: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 break; 40003524: 81 c7 e0 08 ret 40003528: 81 e8 00 00 restore case _PC_NAME_MAX: return_value = the_limits->name_max; 4000352c: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 break; 40003530: 81 c7 e0 08 ret 40003534: 81 e8 00 00 restore case _PC_PATH_MAX: return_value = the_limits->path_max; 40003538: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 break; 4000353c: 81 c7 e0 08 ret 40003540: 81 e8 00 00 restore case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 40003544: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 break; 40003548: 81 c7 e0 08 ret 4000354c: 81 e8 00 00 restore case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 40003550: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 break; 40003554: 81 c7 e0 08 ret 40003558: 81 e8 00 00 restore case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4000355c: f0 00 60 58 ld [ %g1 + 0x58 ], %i0 break; 40003560: 81 c7 e0 08 ret 40003564: 81 e8 00 00 restore case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 40003568: f0 00 60 64 ld [ %g1 + 0x64 ], %i0 break; 4000356c: 81 c7 e0 08 ret 40003570: 81 e8 00 00 restore case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 40003574: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 break; 40003578: 81 c7 e0 08 ret 4000357c: 81 e8 00 00 restore case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40003580: f0 00 60 5c ld [ %g1 + 0x5c ], %i0 break; 40003584: 81 c7 e0 08 ret 40003588: 81 e8 00 00 restore case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 4000358c: f0 00 60 60 ld [ %g1 + 0x60 ], %i0 break; 40003590: 81 c7 e0 08 ret 40003594: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one( EINVAL ); 40003598: 40 00 31 c7 call 4000fcb4 <__errno> 4000359c: b0 10 3f ff mov -1, %i0 400035a0: 82 10 20 16 mov 0x16, %g1 400035a4: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 400035a8: 81 c7 e0 08 ret 400035ac: 81 e8 00 00 restore =============================================================================== 4000a0ac : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000a0ac: 9d e3 bf a0 save %sp, -96, %sp 4000a0b0: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a0b4: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 4000a0b8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 4000a0bc: b2 10 00 18 mov %i0, %i1 4000a0c0: 84 00 a0 01 inc %g2 if ( !ptr ) 4000a0c4: 80 a6 20 00 cmp %i0, 0 4000a0c8: 02 80 00 21 be 4000a14c 4000a0cc: 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()) && 4000a0d0: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000a0d4: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current> 4000a0d8: 80 a0 60 03 cmp %g1, 3 4000a0dc: 12 80 00 09 bne 4000a100 <== NEVER TAKEN 4000a0e0: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a0e4: 40 00 01 26 call 4000a57c 4000a0e8: 01 00 00 00 nop 4000a0ec: 80 8a 20 ff btst 0xff, %o0 4000a0f0: 12 80 00 04 bne 4000a100 <== ALWAYS TAKEN 4000a0f4: 03 10 00 6c sethi %hi(0x4001b000), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000a0f8: 40 00 01 33 call 4000a5c4 <== NOT EXECUTED 4000a0fc: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000a100: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4000a104: 80 a0 60 00 cmp %g1, 0 4000a108: 02 80 00 06 be 4000a120 <== ALWAYS TAKEN 4000a10c: 21 10 00 6a sethi %hi(0x4001a800), %l0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000a110: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000a114: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a118: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4000a11c: 21 10 00 6a sethi %hi(0x4001a800), %l0 <== NOT EXECUTED 4000a120: d0 04 21 f0 ld [ %l0 + 0x1f0 ], %o0 ! 4001a9f0 4000a124: 40 00 04 74 call 4000b2f4 <_Protected_heap_Free> 4000a128: 92 10 00 19 mov %i1, %o1 4000a12c: 80 8a 20 ff btst 0xff, %o0 4000a130: 12 80 00 07 bne 4000a14c <== ALWAYS TAKEN 4000a134: c2 04 21 f0 ld [ %l0 + 0x1f0 ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000a138: 31 10 00 67 sethi %hi(0x40019c00), %i0 <== NOT EXECUTED 4000a13c: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000a140: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000a144: 7f ff e2 f6 call 40002d1c <== NOT EXECUTED 4000a148: 91 ee 23 40 restore %i0, 0x340, %o0 <== NOT EXECUTED 4000a14c: 81 c7 e0 08 ret 4000a150: 81 e8 00 00 restore =============================================================================== 40003bf4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40003bf4: 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 40003bf8: 03 10 00 76 sethi %hi(0x4001d800), %g1 <== NOT EXECUTED 40003bfc: 82 10 61 40 or %g1, 0x140, %g1 ! 4001d940 <== NOT EXECUTED 40003c00: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40003c04: 02 80 00 18 be 40003c64 <== NOT EXECUTED 40003c08: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40003c0c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40003c10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c14: 22 80 00 09 be,a 40003c38 <== NOT EXECUTED 40003c18: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40003c1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003c20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c24: 22 80 00 05 be,a 40003c38 <== NOT EXECUTED 40003c28: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40003c2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003c30: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40003c34: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40003c38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c3c: 02 80 00 08 be 40003c5c <== NOT EXECUTED 40003c40: 01 00 00 00 nop <== NOT EXECUTED 40003c44: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003c48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c4c: 02 80 00 04 be 40003c5c <== NOT EXECUTED 40003c50: 01 00 00 00 nop <== NOT EXECUTED 40003c54: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003c58: 90 06 20 18 add %i0, 0x18, %o0 <== NOT EXECUTED free(env); 40003c5c: 7f ff fb 91 call 40002aa0 <== NOT EXECUTED 40003c60: 81 e8 00 00 restore <== NOT EXECUTED 40003c64: 81 c7 e0 08 ret <== NOT EXECUTED 40003c68: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40018b6c : int fstat( int fd, struct stat *sbuf ) { 40018b6c: 9d e3 bf a0 save %sp, -96, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40018b70: 80 a6 60 00 cmp %i1, 0 40018b74: 32 80 00 06 bne,a 40018b8c 40018b78: 03 10 00 6a sethi %hi(0x4001a800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 40018b7c: 7f ff d1 ad call 4000d230 <__errno> 40018b80: 01 00 00 00 nop 40018b84: 10 80 00 12 b 40018bcc 40018b88: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40018b8c: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 40018b90: 80 a6 00 01 cmp %i0, %g1 40018b94: 1a 80 00 0b bcc 40018bc0 40018b98: 03 10 00 6c sethi %hi(0x4001b000), %g1 40018b9c: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001b1ac 40018ba0: 85 2e 20 06 sll %i0, 6, %g2 40018ba4: b1 2e 20 03 sll %i0, 3, %i0 40018ba8: b0 06 00 02 add %i0, %g2, %i0 40018bac: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40018bb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40018bb4: 80 88 61 00 btst 0x100, %g1 40018bb8: 32 80 00 08 bne,a 40018bd8 <== ALWAYS TAKEN 40018bbc: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 40018bc0: 7f ff d1 9c call 4000d230 <__errno> 40018bc4: 01 00 00 00 nop 40018bc8: 82 10 20 09 mov 9, %g1 ! 9 40018bcc: c2 22 00 00 st %g1, [ %o0 ] 40018bd0: 10 80 00 15 b 40018c24 40018bd4: 90 10 3f ff mov -1, %o0 rtems_libio_check_is_open(iop); if ( !iop->handlers ) 40018bd8: 80 a0 60 00 cmp %g1, 0 40018bdc: 02 bf ff f9 be 40018bc0 <== NEVER TAKEN 40018be0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40018be4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40018be8: 80 a0 60 00 cmp %g1, 0 40018bec: 12 80 00 06 bne 40018c04 <== ALWAYS TAKEN 40018bf0: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018bf4: 7f ff d1 8f call 4000d230 <__errno> <== NOT EXECUTED 40018bf8: 01 00 00 00 nop <== NOT EXECUTED 40018bfc: 10 bf ff f4 b 40018bcc <== NOT EXECUTED 40018c00: 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) ); 40018c04: 94 10 20 48 mov 0x48, %o2 40018c08: 7f ff d4 05 call 4000dc1c 40018c0c: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40018c10: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 40018c14: 90 06 20 1c add %i0, 0x1c, %o0 40018c18: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40018c1c: 9f c0 40 00 call %g1 40018c20: 92 10 00 19 mov %i1, %o1 } 40018c24: 81 c7 e0 08 ret 40018c28: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40003730 : #include int fsync( int fd ) { 40003730: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40003734: 03 10 00 7a sethi %hi(0x4001e800), %g1 40003738: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 4001ea04 4000373c: 80 a6 00 01 cmp %i0, %g1 40003740: 1a 80 00 15 bcc 40003794 <== NEVER TAKEN 40003744: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 40003748: 03 10 00 7c sethi %hi(0x4001f000), %g1 4000374c: d0 00 61 d4 ld [ %g1 + 0x1d4 ], %o0 ! 4001f1d4 40003750: 83 2e 20 06 sll %i0, 6, %g1 40003754: b1 2e 20 03 sll %i0, 3, %i0 40003758: b0 06 00 01 add %i0, %g1, %i0 4000375c: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 40003760: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40003764: 80 88 61 00 btst 0x100, %g1 40003768: 02 80 00 0b be 40003794 <== NEVER TAKEN 4000376c: 80 88 60 04 btst 4, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40003770: 32 80 00 06 bne,a 40003788 40003774: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 40003778: 40 00 31 4f call 4000fcb4 <__errno> 4000377c: 01 00 00 00 nop 40003780: 10 80 00 0f b 400037bc 40003784: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 40003788: 80 a0 60 00 cmp %g1, 0 4000378c: 32 80 00 06 bne,a 400037a4 <== ALWAYS TAKEN 40003790: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 40003794: 40 00 31 48 call 4000fcb4 <__errno> <== NOT EXECUTED 40003798: 01 00 00 00 nop <== NOT EXECUTED 4000379c: 10 80 00 08 b 400037bc <== NOT EXECUTED 400037a0: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 400037a4: 80 a0 60 00 cmp %g1, 0 400037a8: 12 80 00 08 bne 400037c8 400037ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400037b0: 40 00 31 41 call 4000fcb4 <__errno> 400037b4: 01 00 00 00 nop 400037b8: 82 10 20 86 mov 0x86, %g1 ! 86 400037bc: c2 22 00 00 st %g1, [ %o0 ] 400037c0: 10 80 00 04 b 400037d0 400037c4: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 400037c8: 9f c0 40 00 call %g1 400037cc: 01 00 00 00 nop } 400037d0: 81 c7 e0 08 ret 400037d4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 4000a154 : int ftruncate( int fd, off_t length ) { 4000a154: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000a158: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a15c: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 4001a9e4 4000a160: 80 a6 00 01 cmp %i0, %g1 4000a164: 1a 80 00 0b bcc 4000a190 <== NEVER TAKEN 4000a168: 85 2e 20 06 sll %i0, 6, %g2 iop = rtems_libio_iop( fd ); 4000a16c: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a170: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001b1ac 4000a174: b1 2e 20 03 sll %i0, 3, %i0 4000a178: b0 06 00 02 add %i0, %g2, %i0 4000a17c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 4000a180: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000a184: 80 88 61 00 btst 0x100, %g1 4000a188: 12 80 00 06 bne 4000a1a0 <== ALWAYS TAKEN 4000a18c: a0 07 bf ec add %fp, -20, %l0 4000a190: 40 00 0c 28 call 4000d230 <__errno> <== NOT EXECUTED 4000a194: 01 00 00 00 nop <== NOT EXECUTED 4000a198: 10 80 00 22 b 4000a220 <== NOT EXECUTED 4000a19c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000a1a0: 92 06 20 1c add %i0, 0x1c, %o1 4000a1a4: 90 10 00 10 mov %l0, %o0 4000a1a8: 40 00 0e 5e call 4000db20 4000a1ac: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4000a1b0: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000a1b4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000a1b8: 80 a0 60 00 cmp %g1, 0 4000a1bc: 02 80 00 16 be 4000a214 <== NEVER TAKEN 4000a1c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000a1c4: 9f c0 40 00 call %g1 4000a1c8: 90 10 00 10 mov %l0, %o0 4000a1cc: 80 a2 20 01 cmp %o0, 1 4000a1d0: 32 80 00 06 bne,a 4000a1e8 4000a1d4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000a1d8: 40 00 0c 16 call 4000d230 <__errno> 4000a1dc: 01 00 00 00 nop 4000a1e0: 10 80 00 10 b 4000a220 4000a1e4: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000a1e8: 80 88 60 04 btst 4, %g1 4000a1ec: 32 80 00 06 bne,a 4000a204 <== ALWAYS TAKEN 4000a1f0: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000a1f4: 40 00 0c 0f call 4000d230 <__errno> <== NOT EXECUTED 4000a1f8: 01 00 00 00 nop <== NOT EXECUTED 4000a1fc: 10 80 00 09 b 4000a220 <== NOT EXECUTED 4000a200: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000a204: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000a208: 80 a0 60 00 cmp %g1, 0 4000a20c: 32 80 00 08 bne,a 4000a22c <== ALWAYS TAKEN 4000a210: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000a214: 40 00 0c 07 call 4000d230 <__errno> <== NOT EXECUTED 4000a218: 01 00 00 00 nop <== NOT EXECUTED 4000a21c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000a220: c2 22 00 00 st %g1, [ %o0 ] 4000a224: 10 80 00 05 b 4000a238 4000a228: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 4000a22c: 92 10 00 19 mov %i1, %o1 4000a230: 9f c0 40 00 call %g1 4000a234: 94 10 00 1a mov %i2, %o2 } 4000a238: 81 c7 e0 08 ret 4000a23c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 4001cb94 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4001cb94: 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 ); 4001cb98: 03 10 00 7f sethi %hi(0x4001fc00), %g1 4001cb9c: c2 00 61 c4 ld [ %g1 + 0x1c4 ], %g1 ! 4001fdc4 4001cba0: 80 a6 00 01 cmp %i0, %g1 4001cba4: 1a 80 00 08 bcc 4001cbc4 <== NEVER TAKEN 4001cba8: a0 10 20 00 clr %l0 4001cbac: 03 10 00 81 sethi %hi(0x40020400), %g1 4001cbb0: e0 00 62 ac ld [ %g1 + 0x2ac ], %l0 ! 400206ac 4001cbb4: 83 2e 20 06 sll %i0, 6, %g1 4001cbb8: b1 2e 20 03 sll %i0, 3, %i0 4001cbbc: b0 06 00 01 add %i0, %g1, %i0 4001cbc0: a0 04 00 18 add %l0, %i0, %l0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4001cbc4: a2 07 bf ec add %fp, -20, %l1 4001cbc8: 92 04 20 1c add %l0, 0x1c, %o1 4001cbcc: 90 10 00 11 mov %l1, %o0 4001cbd0: 7f ff ce 86 call 400105e8 4001cbd4: 94 10 20 14 mov 0x14, %o2 if ( !loc.ops->node_type_h ) 4001cbd8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4001cbdc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4001cbe0: 80 a0 60 00 cmp %g1, 0 4001cbe4: 02 80 00 11 be 4001cc28 <== NEVER TAKEN 4001cbe8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4001cbec: 9f c0 40 00 call %g1 4001cbf0: 90 10 00 11 mov %l1, %o0 4001cbf4: 80 a2 20 01 cmp %o0, 1 4001cbf8: 22 80 00 08 be,a 4001cc18 4001cbfc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4001cc00: 7f ff cc 3e call 4000fcf8 <__errno> 4001cc04: 01 00 00 00 nop 4001cc08: 82 10 20 14 mov 0x14, %g1 ! 14 4001cc0c: c2 22 00 00 st %g1, [ %o0 ] 4001cc10: 10 80 00 0d b 4001cc44 4001cc14: 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 ) 4001cc18: c2 00 60 08 ld [ %g1 + 8 ], %g1 4001cc1c: 80 a0 60 00 cmp %g1, 0 4001cc20: 32 80 00 06 bne,a 4001cc38 <== ALWAYS TAKEN 4001cc24: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001cc28: 7f ff cc 34 call 4000fcf8 <__errno> <== NOT EXECUTED 4001cc2c: 01 00 00 00 nop <== NOT EXECUTED 4001cc30: 10 bf ff f7 b 4001cc0c <== NOT EXECUTED 4001cc34: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4001cc38: 92 10 00 19 mov %i1, %o1 4001cc3c: 9f c0 40 00 call %g1 4001cc40: 94 10 00 1a mov %i2, %o2 } 4001cc44: 81 c7 e0 08 ret 4001cc48: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40002fa4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40002fa4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 40002fa8: 7f ff ff b6 call 40002e80 40002fac: 01 00 00 00 nop if ((fp = fopen("/etc/group", "r")) == NULL) { 40002fb0: 11 10 00 74 sethi %hi(0x4001d000), %o0 40002fb4: 13 10 00 74 sethi %hi(0x4001d000), %o1 40002fb8: 90 12 21 f8 or %o0, 0x1f8, %o0 40002fbc: 40 00 33 50 call 4000fcfc 40002fc0: 92 12 61 80 or %o1, 0x180, %o1 40002fc4: a0 92 20 00 orcc %o0, 0, %l0 40002fc8: 12 80 00 08 bne 40002fe8 <== ALWAYS TAKEN 40002fcc: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 40002fd0: 40 00 31 1d call 4000f444 <__errno> <== NOT EXECUTED 40002fd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fd8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40002fdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002fe0: 81 c7 e0 08 ret <== NOT EXECUTED 40002fe4: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40002fe8: 94 10 00 1b mov %i3, %o2 40002fec: 96 10 00 1c mov %i4, %o3 40002ff0: 7f ff fe ea call 40002b98 40002ff4: 90 10 00 10 mov %l0, %o0 40002ff8: 80 a2 20 00 cmp %o0, 0 40002ffc: 12 80 00 0a bne 40003024 <== ALWAYS TAKEN 40003000: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 40003004: 40 00 31 10 call 4000f444 <__errno> <== NOT EXECUTED 40003008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000300c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003010: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40003014: 40 00 31 64 call 4000f5a4 <== NOT EXECUTED 40003018: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 4000301c: 81 c7 e0 08 ret <== NOT EXECUTED 40003020: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40003024: 22 80 00 07 be,a 40003040 <== NEVER TAKEN 40003028: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 4000302c: d0 06 80 00 ld [ %i2 ], %o0 40003030: 40 00 38 e3 call 400113bc 40003034: 92 10 00 18 mov %i0, %o1 40003038: 10 80 00 04 b 40003048 4000303c: 80 a0 00 08 cmp %g0, %o0 } else { match = (grp->gr_gid == gid); 40003040: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40003044: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40003048: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 4000304c: 80 a0 60 00 cmp %g1, 0 40003050: 02 bf ff e6 be 40002fe8 40003054: 92 10 00 1a mov %i2, %o1 fclose(fp); 40003058: 90 10 00 10 mov %l0, %o0 4000305c: 40 00 31 52 call 4000f5a4 40003060: b0 10 20 00 clr %i0 *result = grp; 40003064: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 40003068: 81 c7 e0 08 ret 4000306c: 81 e8 00 00 restore =============================================================================== 40002cd4 : return NULL; return p; } struct group *getgrent(void) { 40002cd4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (group_fp == NULL) 40002cd8: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002cdc: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 ! 4001e96c <== NOT EXECUTED 40002ce0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002ce4: 22 80 00 0c be,a 40002d14 <== NOT EXECUTED 40002ce8: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 40002cec: 31 10 00 7a sethi %hi(0x4001e800), %i0 <== NOT EXECUTED 40002cf0: 15 10 00 7a sethi %hi(0x4001e800), %o2 <== NOT EXECUTED 40002cf4: 92 16 22 38 or %i0, 0x238, %o1 <== NOT EXECUTED 40002cf8: 94 12 a1 70 or %o2, 0x170, %o2 <== NOT EXECUTED 40002cfc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40002d00: 7f ff ff a6 call 40002b98 <== NOT EXECUTED 40002d04: b0 16 22 38 or %i0, 0x238, %i0 <== NOT EXECUTED 40002d08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002d0c: 22 80 00 02 be,a 40002d14 <== NOT EXECUTED 40002d10: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &grent; } 40002d14: 81 c7 e0 08 ret <== NOT EXECUTED 40002d18: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400030a4 : } struct group *getgrgid( gid_t gid ) { 400030a4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 400030a8: 13 10 00 7a sethi %hi(0x4001e800), %o1 <== NOT EXECUTED 400030ac: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 400030b0: 92 12 62 38 or %o1, 0x238, %o1 <== NOT EXECUTED 400030b4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 400030b8: 15 10 00 7a sethi %hi(0x4001e800), %o2 <== NOT EXECUTED 400030bc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400030c0: 94 12 a1 70 or %o2, 0x170, %o2 <== NOT EXECUTED 400030c4: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 400030c8: 7f ff ff ea call 40003070 <== NOT EXECUTED 400030cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400030d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400030d4: 22 80 00 02 be,a 400030dc <== NOT EXECUTED 400030d8: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 400030dc: 81 c7 e0 08 ret <== NOT EXECUTED 400030e0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003070 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40003070: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40003074: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40003078: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4000307c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40003080: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40003084: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40003088: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 4000308c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40003090: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003094: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003098: 7f ff ff c3 call 40002fa4 <== NOT EXECUTED 4000309c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40003110 : } struct group *getgrnam( const char *name ) { 40003110: 9d e3 bf 98 save %sp, -104, %sp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 40003114: 13 10 00 7a sethi %hi(0x4001e800), %o1 40003118: 90 10 00 18 mov %i0, %o0 4000311c: 92 12 62 38 or %o1, 0x238, %o1 40003120: 15 10 00 7a sethi %hi(0x4001e800), %o2 40003124: 96 10 20 c8 mov 0xc8, %o3 40003128: 94 12 a1 70 or %o2, 0x170, %o2 4000312c: 98 07 bf fc add %fp, -4, %o4 40003130: 7f ff ff ed call 400030e4 40003134: b0 10 20 00 clr %i0 40003138: 80 a2 20 00 cmp %o0, 0 4000313c: 22 80 00 02 be,a 40003144 <== ALWAYS TAKEN 40003140: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 40003144: 81 c7 e0 08 ret 40003148: 81 e8 00 00 restore =============================================================================== 4002316c : */ pid_t getpid( void ) { return _Objects_Local_node; } 4002316c: 81 c3 e0 08 retl <== NOT EXECUTED 40023170: 90 10 20 01 mov 1, %o0 ! 1 <== NOT EXECUTED =============================================================================== 40003198 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40003198: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; int match; init_etc_passwd_group(); 4000319c: 7f ff ff 39 call 40002e80 400031a0: 01 00 00 00 nop if ((fp = fopen("/etc/passwd", "r")) == NULL) { 400031a4: 11 10 00 74 sethi %hi(0x4001d000), %o0 400031a8: 13 10 00 74 sethi %hi(0x4001d000), %o1 400031ac: 90 12 21 70 or %o0, 0x170, %o0 400031b0: 40 00 32 d3 call 4000fcfc 400031b4: 92 12 61 80 or %o1, 0x180, %o1 400031b8: a0 92 20 00 orcc %o0, 0, %l0 400031bc: 12 80 00 08 bne 400031dc <== ALWAYS TAKEN 400031c0: 92 10 00 1a mov %i2, %o1 errno = EINVAL; 400031c4: 40 00 30 a0 call 4000f444 <__errno> <== NOT EXECUTED 400031c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400031d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031d4: 81 c7 e0 08 ret <== NOT EXECUTED 400031d8: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 400031dc: 94 10 00 1b mov %i3, %o2 400031e0: 96 10 00 1c mov %i4, %o3 400031e4: 7f ff fe ce call 40002d1c 400031e8: 90 10 00 10 mov %l0, %o0 400031ec: 80 a2 20 00 cmp %o0, 0 400031f0: 12 80 00 0a bne 40003218 <== ALWAYS TAKEN 400031f4: 80 a6 20 00 cmp %i0, 0 errno = EINVAL; 400031f8: 40 00 30 93 call 4000f444 <__errno> <== NOT EXECUTED 400031fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003200: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003204: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 40003208: 40 00 30 e7 call 4000f5a4 <== NOT EXECUTED 4000320c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return -1; 40003210: 81 c7 e0 08 ret <== NOT EXECUTED 40003214: 81 e8 00 00 restore <== NOT EXECUTED } if (name) { 40003218: 22 80 00 07 be,a 40003234 <== NEVER TAKEN 4000321c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 40003220: d0 06 80 00 ld [ %i2 ], %o0 40003224: 40 00 38 66 call 400113bc 40003228: 92 10 00 18 mov %i0, %o1 4000322c: 10 80 00 04 b 4000323c 40003230: 80 a0 00 08 cmp %g0, %o0 } else { match = (pwd->pw_uid == uid); 40003234: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 40003238: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000323c: 82 60 3f ff subx %g0, -1, %g1 } if (match) { 40003240: 80 a0 60 00 cmp %g1, 0 40003244: 02 bf ff e6 be 400031dc 40003248: 92 10 00 1a mov %i2, %o1 fclose(fp); 4000324c: 90 10 00 10 mov %l0, %o0 40003250: 40 00 30 d5 call 4000f5a4 40003254: b0 10 20 00 clr %i0 *result = pwd; 40003258: f4 27 40 00 st %i2, [ %i5 ] } } fclose(fp); errno = EINVAL; return -1; } 4000325c: 81 c7 e0 08 ret 40003260: 81 e8 00 00 restore =============================================================================== 40002e38 : return NULL; return p; } struct passwd *getpwent(void) { 40002e38: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (passwd_fp == NULL) 40002e3c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002e40: d0 00 60 84 ld [ %g1 + 0x84 ], %o0 ! 4001e884 <== NOT EXECUTED 40002e44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002e48: 22 80 00 0c be,a 40002e78 <== NOT EXECUTED 40002e4c: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 40002e50: 31 10 00 7a sethi %hi(0x4001e800), %i0 <== NOT EXECUTED 40002e54: 15 10 00 7a sethi %hi(0x4001e800), %o2 <== NOT EXECUTED 40002e58: 92 16 21 50 or %i0, 0x150, %o1 <== NOT EXECUTED 40002e5c: 94 12 a0 88 or %o2, 0x88, %o2 <== NOT EXECUTED 40002e60: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40002e64: 7f ff ff ae call 40002d1c <== NOT EXECUTED 40002e68: b0 16 21 50 or %i0, 0x150, %i0 <== NOT EXECUTED 40002e6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002e70: 22 80 00 02 be,a 40002e78 <== NOT EXECUTED 40002e74: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; return &pwent; } 40002e78: 81 c7 e0 08 ret <== NOT EXECUTED 40002e7c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003304 : } struct passwd *getpwnam( const char *name ) { 40003304: 9d e3 bf 98 save %sp, -104, %sp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 40003308: 13 10 00 7a sethi %hi(0x4001e800), %o1 4000330c: 90 10 00 18 mov %i0, %o0 40003310: 92 12 61 50 or %o1, 0x150, %o1 40003314: 15 10 00 7a sethi %hi(0x4001e800), %o2 40003318: 96 10 20 c8 mov 0xc8, %o3 4000331c: 94 12 a0 88 or %o2, 0x88, %o2 40003320: 98 07 bf fc add %fp, -4, %o4 40003324: 7f ff ff ed call 400032d8 40003328: b0 10 20 00 clr %i0 4000332c: 80 a2 20 00 cmp %o0, 0 40003330: 22 80 00 02 be,a 40003338 <== ALWAYS TAKEN 40003334: f0 07 bf fc ld [ %fp + -4 ], %i0 return NULL; return p; } 40003338: 81 c7 e0 08 ret 4000333c: 81 e8 00 00 restore =============================================================================== 40003298 : } struct passwd *getpwuid( uid_t uid ) { 40003298: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4000329c: 13 10 00 7a sethi %hi(0x4001e800), %o1 <== NOT EXECUTED 400032a0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 400032a4: 92 12 61 50 or %o1, 0x150, %o1 <== NOT EXECUTED 400032a8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 400032ac: 15 10 00 7a sethi %hi(0x4001e800), %o2 <== NOT EXECUTED 400032b0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400032b4: 94 12 a0 88 or %o2, 0x88, %o2 <== NOT EXECUTED 400032b8: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 400032bc: 7f ff ff ea call 40003264 <== NOT EXECUTED 400032c0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400032c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400032c8: 22 80 00 02 be,a 400032d0 <== NOT EXECUTED 400032cc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED return NULL; return p; } 400032d0: 81 c7 e0 08 ret <== NOT EXECUTED 400032d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003264 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40003264: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40003268: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4000326c: 91 2a 20 10 sll %o0, 0x10, %o0 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40003270: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40003274: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40003278: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4000327c: 93 32 20 10 srl %o0, 0x10, %o1 <== NOT EXECUTED 40003280: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED 40003284: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003288: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000328c: 7f ff ff c3 call 40003198 <== NOT EXECUTED 40003290: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 4000a240 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4000a240: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000a244: 80 a6 20 00 cmp %i0, 0 4000a248: 12 80 00 08 bne 4000a268 <== ALWAYS TAKEN 4000a24c: 01 00 00 00 nop errno = EFAULT; 4000a250: 40 00 0b f8 call 4000d230 <__errno> <== NOT EXECUTED 4000a254: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a258: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000a25c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return -1; 4000a260: 81 c7 e0 08 ret <== NOT EXECUTED 4000a264: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4000a268: 7f ff de 8c call 40001c98 4000a26c: 01 00 00 00 nop 4000a270: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000a274: 40 00 02 dd call 4000ade8 <_TOD_Get> 4000a278: 90 07 bf f8 add %fp, -8, %o0 _ISR_Enable(level); 4000a27c: 7f ff de 8b call 40001ca8 4000a280: 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; 4000a284: 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; 4000a288: c2 07 bf f8 ld [ %fp + -8 ], %g1 time->tv_usec = useconds; 4000a28c: 92 10 23 e8 mov 0x3e8, %o1 4000a290: 40 00 31 82 call 40016898 <.div> 4000a294: c2 26 00 00 st %g1, [ %i0 ] 4000a298: 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; } 4000a29c: 81 c7 e0 08 ret 4000a2a0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400122a0 : ) { IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 400122a0: c4 02 20 3c ld [ %o0 + 0x3c ], %g2 400122a4: c4 00 a0 4c ld [ %g2 + 0x4c ], %g2 400122a8: 80 a0 a0 01 cmp %g2, 1 400122ac: 12 80 00 05 bne 400122c0 <== NEVER TAKEN 400122b0: 82 10 3f ff mov -1, %g1 if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 400122b4: c0 22 20 10 clr [ %o0 + 0x10 ] 400122b8: c0 22 20 14 clr [ %o0 + 0x14 ] 400122bc: 82 10 20 00 clr %g1 return 0; } 400122c0: 81 c3 e0 08 retl 400122c4: 90 10 00 01 mov %g1, %o0 =============================================================================== 400124f0 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400124f0: 9d e3 be 88 save %sp, -376, %sp <== NOT EXECUTED int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 400124f4: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 <== NOT EXECUTED ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400124f8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400124fc: e2 04 a0 50 ld [ %l2 + 0x50 ], %l1 <== NOT EXECUTED 40012500: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40012504: a4 04 a0 54 add %l2, 0x54, %l2 <== NOT EXECUTED struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 40012508: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4001250c: 02 80 00 2f be 400125c8 <== NOT EXECUTED 40012510: b0 10 20 00 clr %i0 <== NOT EXECUTED /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 40012514: e8 04 20 14 ld [ %l0 + 0x14 ], %l4 <== NOT EXECUTED /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 40012518: 40 00 26 a0 call 4001bf98 <.udiv> <== NOT EXECUTED 4001251c: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED 40012520: 83 2a 20 05 sll %o0, 5, %g1 <== NOT EXECUTED 40012524: bb 2a 20 03 sll %o0, 3, %i5 <== NOT EXECUTED 40012528: a6 10 20 00 clr %l3 <== NOT EXECUTED 4001252c: ba 07 40 01 add %i5, %g1, %i5 <== NOT EXECUTED } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 40012530: ae 10 21 18 mov 0x118, %l7 <== NOT EXECUTED bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 40012534: 83 2f 60 03 sll %i5, 3, %g1 <== NOT EXECUTED tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 40012538: ac 07 be e8 add %fp, -280, %l6 <== NOT EXECUTED bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4001253c: ba 20 40 1d sub %g1, %i5, %i5 <== NOT EXECUTED tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 40012540: aa 07 be fc add %fp, -260, %l5 <== NOT EXECUTED /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 40012544: 10 80 00 1e b 400125bc <== NOT EXECUTED 40012548: ba 07 40 14 add %i5, %l4, %i5 <== NOT EXECUTED current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 4001254c: 02 80 00 1f be 400125c8 <== NOT EXECUTED 40012550: 80 a4 c0 14 cmp %l3, %l4 <== NOT EXECUTED /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 40012554: 26 80 00 19 bl,a 400125b8 <== NOT EXECUTED 40012558: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 4001255c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED tmp_dirent.d_namlen = strlen( the_jnode->name ); 40012560: b8 04 60 0c add %l1, 0xc, %i4 <== NOT EXECUTED if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 40012564: c2 27 be e8 st %g1, [ %fp + -280 ] <== NOT EXECUTED /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 40012568: 83 3c e0 1f sra %l3, 0x1f, %g1 <== NOT EXECUTED 4001256c: e6 27 be f4 st %l3, [ %fp + -268 ] <== NOT EXECUTED 40012570: c2 27 be f0 st %g1, [ %fp + -272 ] <== NOT EXECUTED tmp_dirent.d_reclen = sizeof( struct dirent ); 40012574: ee 37 be f8 sth %l7, [ %fp + -264 ] <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40012578: 40 00 04 eb call 40013924 <== NOT EXECUTED 4001257c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED strcpy( tmp_dirent.d_name, the_jnode->name ); 40012580: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40012584: d0 37 be fa sth %o0, [ %fp + -262 ] <== NOT EXECUTED strcpy( tmp_dirent.d_name, the_jnode->name ); 40012588: 40 00 04 af call 40013844 <== NOT EXECUTED 4001258c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED memcpy( 40012590: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 40012594: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40012598: 40 00 03 80 call 40013398 <== NOT EXECUTED 4001259c: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 400125a0: c4 1c 20 10 ldd [ %l0 + 0x10 ], %g2 <== NOT EXECUTED bytes_transferred = bytes_transferred + sizeof( struct dirent ); 400125a4: b0 06 21 18 add %i0, 0x118, %i0 <== NOT EXECUTED memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 400125a8: 86 80 e1 18 addcc %g3, 0x118, %g3 <== NOT EXECUTED 400125ac: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED 400125b0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] <== NOT EXECUTED bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 400125b4: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 400125b8: a6 04 e1 18 add %l3, 0x118, %l3 <== NOT EXECUTED /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 400125bc: 80 a4 c0 1d cmp %l3, %i5 <== NOT EXECUTED 400125c0: 06 bf ff e3 bl 4001254c <== NOT EXECUTED 400125c4: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED the_node = the_node->next; } /* Success */ return bytes_transferred; } 400125c8: 81 c7 e0 08 ret <== NOT EXECUTED 400125cc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400123fc : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400123fc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40012400: e0 06 40 00 ld [ %i1 ], %l0 40012404: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 40012408: 82 04 20 54 add %l0, 0x54, %g1 4001240c: 80 a0 80 01 cmp %g2, %g1 40012410: 22 80 00 06 be,a 40012428 40012414: 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 ); 40012418: 40 00 01 a4 call 40012aa8 <__errno> 4001241c: 01 00 00 00 nop 40012420: 10 80 00 0d b 40012454 40012424: 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 ) 40012428: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001242c: 80 a0 40 10 cmp %g1, %l0 40012430: 02 80 00 06 be 40012448 40012434: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40012438: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 4001243c: 80 a0 60 00 cmp %g1, 0 40012440: 22 80 00 08 be,a 40012460 <== ALWAYS TAKEN 40012444: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 40012448: 40 00 01 98 call 40012aa8 <__errno> 4001244c: 01 00 00 00 nop 40012450: 82 10 20 10 mov 0x10, %g1 ! 10 40012454: c2 22 00 00 st %g1, [ %o0 ] 40012458: 81 c7 e0 08 ret 4001245c: 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 ) { 40012460: 80 a0 60 00 cmp %g1, 0 40012464: 22 80 00 06 be,a 4001247c 40012468: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 4001246c: 7f ff d6 64 call 40007dfc <_Chain_Extract> 40012470: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40012474: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012478: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 4001247c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40012480: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40012484: 90 07 bf f8 add %fp, -8, %o0 40012488: 7f ff c5 22 call 40003910 4001248c: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 40012490: 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) ) { 40012494: 90 10 00 10 mov %l0, %o0 40012498: 7f ff f4 7f call 4000f694 4001249c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] 400124a0: 80 a2 20 00 cmp %o0, 0 400124a4: 12 80 00 11 bne 400124e8 400124a8: 01 00 00 00 nop 400124ac: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 400124b0: 80 a0 60 00 cmp %g1, 0 400124b4: 12 80 00 0d bne 400124e8 400124b8: 03 10 00 82 sethi %hi(0x40020800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 400124bc: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 400209c0 400124c0: c4 06 40 00 ld [ %i1 ], %g2 400124c4: c6 00 60 04 ld [ %g1 + 4 ], %g3 400124c8: 80 a0 c0 02 cmp %g3, %g2 400124cc: 22 80 00 02 be,a 400124d4 <== NEVER TAKEN 400124d0: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 400124d4: 90 10 00 10 mov %l0, %o0 400124d8: 7f ff c4 e4 call 40003868 400124dc: b0 10 20 00 clr %i0 400124e0: 81 c7 e0 08 ret 400124e4: 81 e8 00 00 restore } return 0; } 400124e8: 81 c7 e0 08 ret 400124ec: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40002e80 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 40002e80: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 40002e84: 03 10 00 7a sethi %hi(0x4001e800), %g1 40002e88: c4 48 60 80 ldsb [ %g1 + 0x80 ], %g2 ! 4001e880 40002e8c: 80 a0 a0 00 cmp %g2, 0 40002e90: 12 80 00 30 bne 40002f50 40002e94: 84 10 20 01 mov 1, %g2 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40002e98: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 40002e9c: c4 28 60 80 stb %g2, [ %g1 + 0x80 ] mkdir("/etc", 0777); 40002ea0: 11 10 00 74 sethi %hi(0x4001d000), %o0 40002ea4: 40 00 02 1e call 4000371c 40002ea8: 90 12 21 68 or %o0, 0x168, %o0 ! 4001d168 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 40002eac: 21 10 00 74 sethi %hi(0x4001d000), %l0 40002eb0: 13 10 00 74 sethi %hi(0x4001d000), %o1 40002eb4: 90 14 21 70 or %l0, 0x170, %o0 40002eb8: 40 00 33 91 call 4000fcfc 40002ebc: 92 12 61 80 or %o1, 0x180, %o1 40002ec0: 80 a2 20 00 cmp %o0, 0 40002ec4: 12 80 00 0d bne 40002ef8 <== NEVER TAKEN 40002ec8: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40002ecc: 90 14 21 70 or %l0, 0x170, %o0 40002ed0: 13 10 00 74 sethi %hi(0x4001d000), %o1 40002ed4: 40 00 33 8a call 4000fcfc 40002ed8: 92 12 61 88 or %o1, 0x188, %o1 ! 4001d188 40002edc: b0 92 20 00 orcc %o0, 0, %i0 40002ee0: 02 80 00 08 be 40002f00 <== NEVER TAKEN 40002ee4: 11 10 00 74 sethi %hi(0x4001d000), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 40002ee8: 92 10 00 18 mov %i0, %o1 40002eec: 40 00 33 b0 call 4000fdac 40002ef0: 90 12 21 90 or %o0, 0x190, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 40002ef4: 90 10 00 18 mov %i0, %o0 40002ef8: 40 00 31 ab call 4000f5a4 40002efc: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40002f00: 21 10 00 74 sethi %hi(0x4001d000), %l0 40002f04: 13 10 00 74 sethi %hi(0x4001d000), %o1 40002f08: 90 14 21 f8 or %l0, 0x1f8, %o0 40002f0c: 40 00 33 7c call 4000fcfc 40002f10: 92 12 61 80 or %o1, 0x180, %o1 40002f14: 80 a2 20 00 cmp %o0, 0 40002f18: 12 80 00 0c bne 40002f48 <== NEVER TAKEN 40002f1c: b0 10 00 08 mov %o0, %i0 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 40002f20: 90 14 21 f8 or %l0, 0x1f8, %o0 40002f24: 13 10 00 74 sethi %hi(0x4001d000), %o1 40002f28: 40 00 33 75 call 4000fcfc 40002f2c: 92 12 61 88 or %o1, 0x188, %o1 ! 4001d188 40002f30: b0 92 20 00 orcc %o0, 0, %i0 40002f34: 02 80 00 07 be 40002f50 <== NEVER TAKEN 40002f38: 11 10 00 74 sethi %hi(0x4001d000), %o0 fprintf( fp, "root:x:0:root\n" 40002f3c: 92 10 00 18 mov %i0, %o1 40002f40: 40 00 33 9b call 4000fdac 40002f44: 90 12 22 08 or %o0, 0x208, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 40002f48: 40 00 31 97 call 4000f5a4 40002f4c: 81 e8 00 00 restore 40002f50: 81 c7 e0 08 ret 40002f54: 81 e8 00 00 restore =============================================================================== 4000604c : int ioctl( int fd, ioctl_command_t command, ... ) { 4000604c: 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 ); 40006050: 03 10 00 83 sethi %hi(0x40020c00), %g1 40006054: c2 00 60 f4 ld [ %g1 + 0xf4 ], %g1 ! 40020cf4 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40006058: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000605c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40006060: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40006064: 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 ); 40006068: 80 a6 00 01 cmp %i0, %g1 4000606c: 1a 80 00 11 bcc 400060b0 40006070: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40006074: 03 10 00 85 sethi %hi(0x40021400), %g1 40006078: d0 00 61 98 ld [ %g1 + 0x198 ], %o0 ! 40021598 4000607c: 83 2e 20 06 sll %i0, 6, %g1 40006080: b1 2e 20 03 sll %i0, 3, %i0 40006084: b0 06 00 01 add %i0, %g1, %i0 40006088: 90 02 00 18 add %o0, %i0, %o0 rtems_libio_check_is_open(iop); 4000608c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 40006090: 80 88 61 00 btst 0x100, %g1 40006094: 02 80 00 07 be 400060b0 <== NEVER TAKEN 40006098: 84 07 a0 50 add %fp, 0x50, %g2 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4000609c: 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 *); 400060a0: c4 27 bf fc st %g2, [ %fp + -4 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 400060a4: 80 a0 60 00 cmp %g1, 0 400060a8: 12 80 00 06 bne 400060c0 <== ALWAYS TAKEN 400060ac: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); 400060b0: 40 00 33 74 call 40012e80 <__errno> 400060b4: 01 00 00 00 nop 400060b8: 10 80 00 09 b 400060dc 400060bc: 82 10 20 09 mov 9, %g1 ! 9 if ( !iop->handlers->ioctl_h ) 400060c0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400060c4: 80 a0 60 00 cmp %g1, 0 400060c8: 12 80 00 08 bne 400060e8 <== ALWAYS TAKEN 400060cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400060d0: 40 00 33 6c call 40012e80 <__errno> <== NOT EXECUTED 400060d4: 01 00 00 00 nop <== NOT EXECUTED 400060d8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400060dc: c2 22 00 00 st %g1, [ %o0 ] 400060e0: 10 80 00 04 b 400060f0 400060e4: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400060e8: 9f c0 40 00 call %g1 400060ec: 01 00 00 00 nop return rc; } 400060f0: 81 c7 e0 08 ret 400060f4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 400038c8 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 400038c8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 400038cc: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 <== NOT EXECUTED 400038d0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400038d4: 02 80 00 03 be 400038e0 <== NOT EXECUTED 400038d8: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 400038dc: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 400038e0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400038e4: 02 80 00 0c be 40003914 <== NOT EXECUTED 400038e8: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED c = tolower (c); 400038ec: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 400038f0: c4 00 a3 54 ld [ %g2 + 0x354 ], %g2 ! 4001ab54 <__ctype_ptr__><== NOT EXECUTED 400038f4: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 400038f8: 84 00 80 10 add %g2, %l0, %g2 <== NOT EXECUTED 400038fc: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 <== NOT EXECUTED 40003900: 84 08 a0 03 and %g2, 3, %g2 <== NOT EXECUTED 40003904: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40003908: 22 80 00 02 be,a 40003910 <== NOT EXECUTED 4000390c: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED if (c == '\r') { 40003910: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED 40003914: 80 a0 a0 0d cmp %g2, 0xd <== NOT EXECUTED 40003918: 12 80 00 09 bne 4000393c <== NOT EXECUTED 4000391c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 40003920: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 40003924: 12 80 00 5d bne 40003a98 <== NOT EXECUTED 40003928: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 4000392c: 32 80 00 0d bne,a 40003960 <== NOT EXECUTED 40003930: 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)) { 40003934: 10 80 00 0c b 40003964 <== NOT EXECUTED 40003938: 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)) { 4000393c: 12 80 00 07 bne 40003958 <== NOT EXECUTED 40003940: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003944: 80 88 60 40 btst 0x40, %g1 <== NOT EXECUTED 40003948: 32 80 00 06 bne,a 40003960 <== NOT EXECUTED 4000394c: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40003950: 10 80 00 05 b 40003964 <== NOT EXECUTED 40003954: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003958: 02 80 00 3c be 40003a48 <== NOT EXECUTED 4000395c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40003960: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40003964: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40003968: 02 80 00 38 be 40003a48 <== NOT EXECUTED 4000396c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40003970: c6 0e 60 43 ldub [ %i1 + 0x43 ], %g3 <== NOT EXECUTED 40003974: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED erase (tty, 0); 40003978: 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]) { 4000397c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003980: 02 80 00 08 be 400039a0 <== NOT EXECUTED 40003984: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40003988: c6 0e 60 44 ldub [ %i1 + 0x44 ], %g3 <== NOT EXECUTED 4000398c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003990: 32 80 00 07 bne,a 400039ac <== NOT EXECUTED 40003994: c6 0e 60 45 ldub [ %i1 + 0x45 ], %g3 <== NOT EXECUTED erase (tty, 1); 40003998: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000399c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400039a0: 7f ff ff 3f call 4000369c <== NOT EXECUTED 400039a4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400039a8: 30 80 00 3d b,a 40003a9c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 400039ac: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400039b0: 02 80 00 3b be 40003a9c <== NOT EXECUTED 400039b4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 400039b8: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED 400039bc: 32 80 00 0f bne,a 400039f8 <== NOT EXECUTED 400039c0: c6 0e 60 4c ldub [ %i1 + 0x4c ], %g3 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 400039c4: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED 400039c8: 22 80 00 06 be,a 400039e0 <== NOT EXECUTED 400039cc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 400039d0: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 400039d4: 7f ff ff 0e call 4000360c <== NOT EXECUTED 400039d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400039dc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 400039e0: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 400039e4: 86 10 20 0a mov 0xa, %g3 <== NOT EXECUTED 400039e8: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED 400039ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400039f0: 10 80 00 14 b 40003a40 <== NOT EXECUTED 400039f4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 400039f8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400039fc: 02 80 00 07 be 40003a18 <== NOT EXECUTED 40003a00: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 40003a04: c6 0e 60 51 ldub [ %i1 + 0x51 ], %g3 <== NOT EXECUTED 40003a08: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003a0c: 12 80 00 0f bne 40003a48 <== NOT EXECUTED 40003a10: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003a14: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003a18: 22 80 00 06 be,a 40003a30 <== NOT EXECUTED 40003a1c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003a20: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003a24: 7f ff fe fa call 4000360c <== NOT EXECUTED 40003a28: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003a2c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003a30: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003a34: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40003a38: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40003a3c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 40003a40: 81 c7 e0 08 ret <== NOT EXECUTED 40003a44: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40003a48: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 40003a4c: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 <== NOT EXECUTED 40003a50: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003a54: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003a58: 16 80 00 11 bge 40003a9c <== NOT EXECUTED 40003a5c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40003a60: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003a64: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003a68: 22 80 00 06 be,a 40003a80 <== NOT EXECUTED 40003a6c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003a70: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003a74: 7f ff fe e6 call 4000360c <== NOT EXECUTED 40003a78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003a7c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003a80: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003a84: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 40003a88: e0 28 c0 01 stb %l0, [ %g3 + %g1 ] <== NOT EXECUTED 40003a8c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40003a90: 81 c7 e0 08 ret <== NOT EXECUTED 40003a94: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40003a98: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 40003a9c: 81 c7 e0 08 ret <== NOT EXECUTED 40003aa0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40023190 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 40023190: 81 c3 e0 08 retl <== NOT EXECUTED 40023194: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED =============================================================================== 40018da8 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40018da8: 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())) 40018dac: 03 10 00 6d sethi %hi(0x4001b400), %g1 40018db0: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current> 40018db4: 80 a0 60 03 cmp %g1, 3 40018db8: 12 80 00 16 bne 40018e10 <== NEVER TAKEN 40018dbc: 03 10 00 69 sethi %hi(0x4001a400), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 40018dc0: 23 10 00 6a sethi %hi(0x4001a800), %l1 40018dc4: e0 00 60 d8 ld [ %g1 + 0xd8 ], %l0 40018dc8: c2 04 63 58 ld [ %l1 + 0x358 ], %g1 40018dcc: 80 a0 40 10 cmp %g1, %l0 40018dd0: 22 80 00 06 be,a 40018de8 40018dd4: 21 10 00 6a sethi %hi(0x4001a800), %l0 _wrapup_reent(_global_impure_ptr); 40018dd8: 40 00 01 83 call 400193e4 <_wrapup_reent> 40018ddc: 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; 40018de0: e0 24 63 58 st %l0, [ %l1 + 0x358 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40018de4: 21 10 00 6a sethi %hi(0x4001a800), %l0 40018de8: c2 04 23 58 ld [ %l0 + 0x358 ], %g1 ! 4001ab58 <_impure_ptr> 40018dec: 7f ff d1 69 call 4000d390 40018df0: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40018df4: c2 04 23 58 ld [ %l0 + 0x358 ], %g1 40018df8: 7f ff d1 66 call 4000d390 40018dfc: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40018e00: c2 04 23 58 ld [ %l0 + 0x358 ], %g1 40018e04: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40018e08: 7f ff d1 62 call 4000d390 40018e0c: 81 e8 00 00 restore 40018e10: 81 c7 e0 08 ret <== NOT EXECUTED 40018e14: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003c2c : int link( const char *existing, const char *new ) { 40003c2c: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 40003c30: 40 00 35 91 call 40011274 40003c34: 90 10 00 18 mov %i0, %o0 40003c38: 94 10 20 00 clr %o2 40003c3c: 92 10 00 08 mov %o0, %o1 40003c40: 96 07 bf e8 add %fp, -24, %o3 40003c44: 90 10 00 18 mov %i0, %o0 40003c48: 98 10 20 01 mov 1, %o4 40003c4c: 7f ff fe a5 call 400036e0 40003c50: b0 10 3f ff mov -1, %i0 0, &existing_loc, true ); if ( result != 0 ) 40003c54: 80 a2 20 00 cmp %o0, 0 40003c58: 12 80 00 8f bne 40003e94 40003c5c: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40003c60: c2 4e 40 00 ldsb [ %i1 ], %g1 40003c64: 80 a0 60 5c cmp %g1, 0x5c 40003c68: 22 80 00 08 be,a 40003c88 <== NEVER TAKEN 40003c6c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 <== NOT EXECUTED 40003c70: 80 a0 60 2f cmp %g1, 0x2f 40003c74: 22 80 00 05 be,a 40003c88 40003c78: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40003c7c: 80 a0 60 00 cmp %g1, 0 40003c80: 12 80 00 09 bne 40003ca4 <== ALWAYS TAKEN 40003c84: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40003c88: d2 00 63 64 ld [ %g1 + 0x364 ], %o1 ! 4001ff64 40003c8c: 90 07 bf d4 add %fp, -44, %o0 40003c90: 92 02 60 18 add %o1, 0x18, %o1 40003c94: 40 00 32 55 call 400105e8 40003c98: 94 10 20 14 mov 0x14, %o2 40003c9c: 10 80 00 08 b 40003cbc 40003ca0: 90 10 20 01 mov 1, %o0 40003ca4: d2 00 63 64 ld [ %g1 + 0x364 ], %o1 40003ca8: 90 07 bf d4 add %fp, -44, %o0 40003cac: 92 02 60 04 add %o1, 4, %o1 40003cb0: 40 00 32 4e call 400105e8 40003cb4: 94 10 20 14 mov 0x14, %o2 40003cb8: 90 10 20 00 clr %o0 if ( !parent_loc.ops->evalformake_h ) { 40003cbc: c2 07 bf e0 ld [ %fp + -32 ], %g1 40003cc0: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003cc4: 80 a0 60 00 cmp %g1, 0 40003cc8: 32 80 00 0b bne,a 40003cf4 <== ALWAYS TAKEN 40003ccc: 90 06 40 08 add %i1, %o0, %o0 rtems_filesystem_freenode( &existing_loc ); 40003cd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40003cd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cd8: 02 80 00 51 be 40003e1c <== NOT EXECUTED 40003cdc: 01 00 00 00 nop <== NOT EXECUTED 40003ce0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003ce4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ce8: 12 80 00 4b bne 40003e14 <== NOT EXECUTED 40003cec: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 40003cf0: 30 80 00 4b b,a 40003e1c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40003cf4: 94 07 bf fc add %fp, -4, %o2 40003cf8: b2 07 bf d4 add %fp, -44, %i1 40003cfc: 9f c0 40 00 call %g1 40003d00: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) { 40003d04: a0 92 20 00 orcc %o0, 0, %l0 40003d08: 02 80 00 11 be 40003d4c 40003d0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40003d10: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003d14: 80 a0 60 00 cmp %g1, 0 40003d18: 02 80 00 08 be 40003d38 <== NEVER TAKEN 40003d1c: 01 00 00 00 nop 40003d20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003d24: 80 a0 60 00 cmp %g1, 0 40003d28: 02 80 00 04 be 40003d38 <== NEVER TAKEN 40003d2c: 01 00 00 00 nop 40003d30: 9f c0 40 00 call %g1 40003d34: 90 07 bf e8 add %fp, -24, %o0 rtems_set_errno_and_return_minus_one( result ); 40003d38: 40 00 2f f0 call 4000fcf8 <__errno> 40003d3c: b0 10 3f ff mov -1, %i0 40003d40: e0 22 00 00 st %l0, [ %o0 ] 40003d44: 81 c7 e0 08 ret 40003d48: 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 ) { 40003d4c: c4 07 bf e4 ld [ %fp + -28 ], %g2 40003d50: 80 a0 80 01 cmp %g2, %g1 40003d54: 02 80 00 1a be 40003dbc 40003d58: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &existing_loc ); 40003d5c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003d60: 80 a0 60 00 cmp %g1, 0 40003d64: 22 80 00 09 be,a 40003d88 <== NEVER TAKEN 40003d68: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003d6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003d70: 80 a0 60 00 cmp %g1, 0 40003d74: 22 80 00 05 be,a 40003d88 <== NEVER TAKEN 40003d78: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003d7c: 9f c0 40 00 call %g1 40003d80: 90 07 bf e8 add %fp, -24, %o0 rtems_filesystem_freenode( &parent_loc ); 40003d84: c2 07 bf e0 ld [ %fp + -32 ], %g1 40003d88: 80 a0 60 00 cmp %g1, 0 40003d8c: 02 80 00 08 be 40003dac <== NEVER TAKEN 40003d90: 01 00 00 00 nop 40003d94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003d98: 80 a0 60 00 cmp %g1, 0 40003d9c: 02 80 00 04 be 40003dac <== NEVER TAKEN 40003da0: 01 00 00 00 nop 40003da4: 9f c0 40 00 call %g1 40003da8: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40003dac: 40 00 2f d3 call 4000fcf8 <__errno> 40003db0: b0 10 3f ff mov -1, %i0 40003db4: 10 80 00 1d b 40003e28 40003db8: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 40003dbc: c2 00 60 08 ld [ %g1 + 8 ], %g1 40003dc0: 80 a0 60 00 cmp %g1, 0 40003dc4: 12 80 00 1c bne 40003e34 <== ALWAYS TAKEN 40003dc8: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &existing_loc ); 40003dcc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40003dd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003dd4: 22 80 00 09 be,a 40003df8 <== NOT EXECUTED 40003dd8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003ddc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003de0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003de4: 22 80 00 05 be,a 40003df8 <== NOT EXECUTED 40003de8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003dec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003df0: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40003df4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003df8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003dfc: 02 80 00 08 be 40003e1c <== NOT EXECUTED 40003e00: 01 00 00 00 nop <== NOT EXECUTED 40003e04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003e08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e0c: 02 80 00 04 be 40003e1c <== NOT EXECUTED 40003e10: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40003e14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e18: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003e1c: 40 00 2f b7 call 4000fcf8 <__errno> <== NOT EXECUTED 40003e20: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40003e24: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003e28: c2 22 00 00 st %g1, [ %o0 ] 40003e2c: 81 c7 e0 08 ret 40003e30: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40003e34: 92 10 00 19 mov %i1, %o1 40003e38: b2 07 bf e8 add %fp, -24, %i1 40003e3c: 9f c0 40 00 call %g1 40003e40: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 40003e44: c2 07 bf f4 ld [ %fp + -12 ], %g1 40003e48: 80 a0 60 00 cmp %g1, 0 40003e4c: 02 80 00 08 be 40003e6c <== NEVER TAKEN 40003e50: b0 10 00 08 mov %o0, %i0 40003e54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003e58: 80 a0 60 00 cmp %g1, 0 40003e5c: 22 80 00 05 be,a 40003e70 <== NEVER TAKEN 40003e60: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40003e64: 9f c0 40 00 call %g1 40003e68: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 40003e6c: c2 07 bf e0 ld [ %fp + -32 ], %g1 40003e70: 80 a0 60 00 cmp %g1, 0 40003e74: 02 80 00 08 be 40003e94 <== NEVER TAKEN 40003e78: 01 00 00 00 nop 40003e7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003e80: 80 a0 60 00 cmp %g1, 0 40003e84: 02 80 00 04 be 40003e94 <== NEVER TAKEN 40003e88: 01 00 00 00 nop 40003e8c: 9f c0 40 00 call %g1 40003e90: 90 07 bf d4 add %fp, -44, %o0 return result; } 40003e94: 81 c7 e0 08 ret 40003e98: 81 e8 00 00 restore =============================================================================== 40018c58 : off_t lseek( int fd, off_t offset, int whence ) { 40018c58: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40018c5c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40018c60: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 4001a9e4 off_t lseek( int fd, off_t offset, int whence ) { 40018c64: 96 10 00 1b mov %i3, %o3 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40018c68: 80 a6 00 01 cmp %i0, %g1 off_t lseek( int fd, off_t offset, int whence ) { 40018c6c: 84 10 00 19 mov %i1, %g2 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40018c70: 1a 80 00 0c bcc 40018ca0 <== NEVER TAKEN 40018c74: 86 10 00 1a mov %i2, %g3 iop = rtems_libio_iop( fd ); 40018c78: 03 10 00 6c sethi %hi(0x4001b000), %g1 40018c7c: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001b1ac 40018c80: 83 2e 20 06 sll %i0, 6, %g1 40018c84: b1 2e 20 03 sll %i0, 3, %i0 40018c88: b0 06 00 01 add %i0, %g1, %i0 40018c8c: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open(iop); 40018c90: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40018c94: 80 88 61 00 btst 0x100, %g1 40018c98: 32 80 00 06 bne,a 40018cb0 <== ALWAYS TAKEN 40018c9c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40018ca0: 7f ff d1 64 call 4000d230 <__errno> <== NOT EXECUTED 40018ca4: 01 00 00 00 nop <== NOT EXECUTED 40018ca8: 10 80 00 1e b 40018d20 <== NOT EXECUTED 40018cac: 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 ) 40018cb0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40018cb4: 80 a0 60 00 cmp %g1, 0 40018cb8: 12 80 00 06 bne 40018cd0 <== ALWAYS TAKEN 40018cbc: 80 a6 e0 01 cmp %i3, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018cc0: 7f ff d1 5c call 4000d230 <__errno> <== NOT EXECUTED 40018cc4: 01 00 00 00 nop <== NOT EXECUTED 40018cc8: 10 80 00 16 b 40018d20 <== NOT EXECUTED 40018ccc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40018cd0: 02 80 00 09 be 40018cf4 40018cd4: e4 1c 20 10 ldd [ %l0 + 0x10 ], %l2 40018cd8: 80 a6 e0 02 cmp %i3, 2 40018cdc: 02 80 00 09 be 40018d00 40018ce0: 80 a6 e0 00 cmp %i3, 0 40018ce4: 12 80 00 0c bne 40018d14 40018ce8: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; break; 40018cec: 10 80 00 12 b 40018d34 40018cf0: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] case SEEK_CUR: iop->offset += offset; 40018cf4: 9a 86 80 13 addcc %i2, %l3, %o5 40018cf8: 10 80 00 05 b 40018d0c 40018cfc: 98 46 40 12 addx %i1, %l2, %o4 break; case SEEK_END: iop->offset = iop->size + offset; 40018d00: d8 1c 20 08 ldd [ %l0 + 8 ], %o4 40018d04: 9a 86 80 0d addcc %i2, %o5, %o5 40018d08: 98 46 40 0c addx %i1, %o4, %o4 break; 40018d0c: 10 80 00 0a b 40018d34 40018d10: d8 3c 20 10 std %o4, [ %l0 + 0x10 ] default: rtems_set_errno_and_return_minus_one( EINVAL ); 40018d14: 7f ff d1 47 call 4000d230 <__errno> 40018d18: 01 00 00 00 nop 40018d1c: 82 10 20 16 mov 0x16, %g1 ! 16 40018d20: c2 22 00 00 st %g1, [ %o0 ] 40018d24: 11 3f ff ff sethi %hi(0xfffffc00), %o0 40018d28: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 40018d2c: 10 80 00 0e b 40018d64 40018d30: 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 ); 40018d34: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40018d38: 92 10 00 02 mov %g2, %o1 40018d3c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40018d40: 94 10 00 03 mov %g3, %o2 40018d44: 9f c0 40 00 call %g1 40018d48: 90 10 00 10 mov %l0, %o0 if ( status == (off_t) -1 ) 40018d4c: 80 a2 3f ff cmp %o0, -1 40018d50: 12 80 00 06 bne 40018d68 40018d54: b2 10 00 09 mov %o1, %i1 40018d58: 80 a2 7f ff cmp %o1, -1 40018d5c: 22 80 00 03 be,a 40018d68 <== ALWAYS TAKEN 40018d60: e4 3c 20 10 std %l2, [ %l0 + 0x10 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40018d64: b2 10 00 09 mov %o1, %i1 40018d68: 81 c7 e0 08 ret 40018d6c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 4000a614 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000a614: 9d e3 bf a0 save %sp, -96, %sp 4000a618: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a61c: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 4000a620: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000a624: a0 10 00 18 mov %i0, %l0 4000a628: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000a62c: 7f ff ff ed call 4000a5e0 4000a630: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 4000a634: 80 a6 20 00 cmp %i0, 0 4000a638: 02 80 00 36 be 4000a710 <== NEVER TAKEN 4000a63c: 03 10 00 6d sethi %hi(0x4001b400), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000a640: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current> 4000a644: 80 a0 60 03 cmp %g1, 3 4000a648: 12 80 00 07 bne 4000a664 4000a64c: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a650: 7f ff ff cb call 4000a57c 4000a654: 01 00 00 00 nop 4000a658: 80 8a 20 ff btst 0xff, %o0 4000a65c: 02 80 00 2d be 4000a710 <== NEVER TAKEN 4000a660: 03 10 00 6a sethi %hi(0x4001a800), %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 ); 4000a664: d0 00 61 f0 ld [ %g1 + 0x1f0 ], %o0 ! 4001a9f0 4000a668: 92 10 00 10 mov %l0, %o1 4000a66c: 94 10 20 00 clr %o2 4000a670: 40 00 03 13 call 4000b2bc <_Protected_heap_Allocate_aligned_with_boundary> 4000a674: 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 ) { 4000a678: b0 92 20 00 orcc %o0, 0, %i0 4000a67c: 12 80 00 13 bne 4000a6c8 4000a680: a2 10 00 18 mov %i0, %l1 if (rtems_malloc_sbrk_helpers) 4000a684: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a688: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001b01c 4000a68c: 80 a0 60 00 cmp %g1, 0 4000a690: 02 80 00 08 be 4000a6b0 <== ALWAYS TAKEN 4000a694: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000a698: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000a69c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a6a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000a6a4: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4000a6a8: 12 80 00 09 bne 4000a6cc <== NOT EXECUTED 4000a6ac: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED errno = ENOMEM; 4000a6b0: 40 00 0a e0 call 4000d230 <__errno> 4000a6b4: 01 00 00 00 nop 4000a6b8: 82 10 20 0c mov 0xc, %g1 ! c 4000a6bc: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 4000a6c0: 81 c7 e0 08 ret 4000a6c4: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000a6c8: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a6cc: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001b020 4000a6d0: 80 a0 60 00 cmp %g1, 0 4000a6d4: 02 80 00 05 be 4000a6e8 <== ALWAYS TAKEN 4000a6d8: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000a6dc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 4000a6e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a6e4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000a6e8: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a6ec: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 4001b018 4000a6f0: 80 a0 60 00 cmp %g1, 0 4000a6f4: 02 bf ff f3 be 4000a6c0 <== ALWAYS TAKEN 4000a6f8: b0 10 00 11 mov %l1, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000a6fc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000a700: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a704: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000a708: 81 c7 e0 08 ret <== NOT EXECUTED 4000a70c: 81 e8 00 00 restore <== NOT EXECUTED 4000a710: 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; } 4000a714: 81 c7 e0 08 ret <== NOT EXECUTED 4000a718: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000a5c4 : 4000a5c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 4000a5c8: 11 10 00 6d sethi %hi(0x4001b400), %o0 <== NOT EXECUTED 4000a5cc: 90 12 21 fc or %o0, 0x1fc, %o0 ! 4001b5fc <== NOT EXECUTED 4000a5d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000a5d4: 7f ff ee 4c call 40005f04 <_Chain_Append> <== NOT EXECUTED 4000a5d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 4000a5e0 : void malloc_deferred_frees_process(void) { 4000a5e0: 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 ); 4000a5e4: 21 10 00 6d sethi %hi(0x4001b400), %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) 4000a5e8: 10 80 00 04 b 4000a5f8 4000a5ec: a0 14 21 fc or %l0, 0x1fc, %l0 ! 4001b5fc free(to_be_freed); 4000a5f0: 7f ff fe af call 4000a0ac <== NOT EXECUTED 4000a5f4: 01 00 00 00 nop <== NOT EXECUTED 4000a5f8: 40 00 01 91 call 4000ac3c <_Chain_Get> 4000a5fc: 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) 4000a600: 80 a2 20 00 cmp %o0, 0 4000a604: 12 bf ff fb bne 4000a5f0 <== NEVER TAKEN 4000a608: 01 00 00 00 nop free(to_be_freed); } 4000a60c: 81 c7 e0 08 ret 4000a610: 81 e8 00 00 restore =============================================================================== 4000a57c : rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 4000a57c: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a580: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 4001b380 <_Thread_Dispatch_disable_level> 4000a584: 80 a0 60 00 cmp %g1, 0 4000a588: 12 80 00 06 bne 4000a5a0 <== NEVER TAKEN 4000a58c: 90 10 20 00 clr %o0 return false; if ( _ISR_Nest_level > 0 ) 4000a590: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000a594: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 4001b418 <_ISR_Nest_level> #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 4000a598: 80 a0 00 01 cmp %g0, %g1 4000a59c: 90 60 3f ff subx %g0, -1, %o0 if ( _ISR_Nest_level > 0 ) return false; return true; } 4000a5a0: 81 c3 e0 08 retl =============================================================================== 40010f64 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 40010f64: 9d e3 bf a0 save %sp, -96, %sp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 40010f68: 03 10 00 83 sethi %hi(0x40020c00), %g1 40010f6c: d2 00 63 34 ld [ %g1 + 0x334 ], %o1 ! 40020f34 40010f70: 7f ff c9 9e call 400035e8 40010f74: 90 10 20 01 mov 1, %o0 if ( memory ) 40010f78: 80 a2 20 00 cmp %o0, 0 40010f7c: 02 80 00 05 be 40010f90 <== NEVER TAKEN 40010f80: 03 10 00 84 sethi %hi(0x40021000), %g1 memfile_blocks_allocated++; 40010f84: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 ! 400210dc 40010f88: 84 00 a0 01 inc %g2 40010f8c: c4 20 60 dc st %g2, [ %g1 + 0xdc ] return memory; } 40010f90: 81 c7 e0 08 ret 40010f94: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 400114a0 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 400114a0: 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) ) { 400114a4: 7f ff f8 7c call 4000f694 400114a8: 90 10 00 18 mov %i0, %o0 400114ac: 80 a2 20 00 cmp %o0, 0 400114b0: 12 80 00 13 bne 400114fc 400114b4: 01 00 00 00 nop 400114b8: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 400114bc: 80 a0 60 00 cmp %g1, 0 400114c0: 12 80 00 0f bne 400114fc <== NEVER TAKEN 400114c4: 03 10 00 82 sethi %hi(0x40020800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400114c8: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 400209c0 400114cc: c4 00 60 04 ld [ %g1 + 4 ], %g2 400114d0: 80 a0 80 18 cmp %g2, %i0 400114d4: 22 80 00 02 be,a 400114dc <== NEVER TAKEN 400114d8: 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) 400114dc: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 400114e0: 80 a0 60 06 cmp %g1, 6 400114e4: 02 80 00 04 be 400114f4 <== NEVER TAKEN 400114e8: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400114ec: 7f ff ff 8c call 4001131c 400114f0: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 400114f4: 7f ff c8 dd call 40003868 400114f8: 90 10 00 18 mov %i0, %o0 } return 0; } 400114fc: 81 c7 e0 08 ret 40011500: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 40011254 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40011254: 9d e3 bf a0 save %sp, -96, %sp /* * Perform internal consistency checks */ assert( block_table ); 40011258: 80 a6 20 00 cmp %i0, 0 4001125c: 32 80 00 0a bne,a 40011284 <== ALWAYS TAKEN 40011260: e0 06 00 00 ld [ %i0 ], %l0 40011264: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40011268: 15 10 00 7f sethi %hi(0x4001fc00), %o2 <== NOT EXECUTED 4001126c: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40011270: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 40011274: 94 12 a3 88 or %o2, 0x388, %o2 <== NOT EXECUTED 40011278: 96 12 e2 70 or %o3, 0x270, %o3 <== NOT EXECUTED 4001127c: 7f ff c8 85 call 40003490 <__assert_func> <== NOT EXECUTED 40011280: 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 40011288: a2 10 20 00 clr %l1 if ( b[i] ) { 4001128c: 80 a2 20 00 cmp %o0, 0 40011290: 02 80 00 05 be 400112a4 40011294: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40011298: 7f ff ff 2a call 40010f40 4001129c: 01 00 00 00 nop b[i] = 0; 400112a0: 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 400112b0: 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 ); 400112b4: 7f ff ff 23 call 40010f40 400112b8: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 400112bc: c0 26 00 00 clr [ %i0 ] } 400112c0: 81 c7 e0 08 ret 400112c4: 81 e8 00 00 restore =============================================================================== 400117b4 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400117b4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 400117b8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 400117bc: 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 ) 400117c0: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 400117c4: 80 a0 40 19 cmp %g1, %i1 400117c8: 06 80 00 09 bl 400117ec <== NEVER TAKEN 400117cc: 94 10 00 1a mov %i2, %o2 400117d0: 80 a0 40 19 cmp %g1, %i1 400117d4: 32 80 00 0a bne,a 400117fc <== NEVER TAKEN 400117d8: d2 24 20 50 st %o1, [ %l0 + 0x50 ] <== NOT EXECUTED 400117dc: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 400117e0: 80 a0 40 1a cmp %g1, %i2 400117e4: 3a 80 00 06 bcc,a 400117fc <== ALWAYS TAKEN 400117e8: d2 24 20 50 st %o1, [ %l0 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 400117ec: 7f ff ff 8f call 40011628 <== NOT EXECUTED 400117f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400117f4: 81 c7 e0 08 ret <== NOT EXECUTED 400117f8: 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; 400117fc: d4 24 20 54 st %o2, [ %l0 + 0x54 ] iop->size = the_jnode->info.file.size; 40011800: d2 26 20 08 st %o1, [ %i0 + 8 ] 40011804: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 40011808: 90 07 bf f8 add %fp, -8, %o0 4001180c: 7f ff c8 41 call 40003910 40011810: 92 10 20 00 clr %o1 40011814: c2 07 bf f8 ld [ %fp + -8 ], %g1 40011818: 90 10 20 00 clr %o0 4001181c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] return 0; } 40011820: b0 10 00 08 mov %o0, %i0 40011824: 81 c7 e0 08 ret 40011828: 81 e8 00 00 restore =============================================================================== 4001182c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4001182c: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40011830: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 40011834: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40011838: 80 a0 60 06 cmp %g1, 6 4001183c: 32 80 00 11 bne,a 40011880 <== ALWAYS TAKEN 40011840: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 40011844: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011848: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED 4001184c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40011850: 14 80 00 09 bg 40011874 <== NOT EXECUTED 40011854: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 <== NOT EXECUTED 40011858: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4001185c: 32 80 00 1a bne,a 400118c4 <== NOT EXECUTED 40011860: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40011864: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED 40011868: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 4001186c: 28 80 00 16 bleu,a 400118c4 <== NOT EXECUTED 40011870: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 40011874: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 40011878: 10 80 00 12 b 400118c0 <== NOT EXECUTED 4001187c: 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 )) 40011880: 90 10 00 10 mov %l0, %o0 40011884: 92 10 00 02 mov %g2, %o1 40011888: 7f ff ff 68 call 40011628 4001188c: 94 10 00 03 mov %g3, %o2 40011890: 80 a2 20 00 cmp %o0, 0 40011894: 22 80 00 0a be,a 400118bc <== ALWAYS TAKEN 40011898: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001189c: 40 00 04 83 call 40012aa8 <__errno> <== NOT EXECUTED 400118a0: 01 00 00 00 nop <== NOT EXECUTED 400118a4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400118a8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED 400118ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400118b0: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 400118b4: 10 80 00 04 b 400118c4 <== NOT EXECUTED 400118b8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 400118bc: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 400118c0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 } 400118c4: b2 10 00 03 mov %g3, %i1 400118c8: 81 c7 e0 08 ret 400118cc: 91 e8 00 02 restore %g0, %g2, %o0 =============================================================================== 40011b98 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40011b98: 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)) 40011b9c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40011ba0: 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)) 40011ba4: 80 88 62 04 btst 0x204, %g1 40011ba8: 02 80 00 19 be 40011c0c 40011bac: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 40011bb0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40011bb4: 80 a0 60 06 cmp %g1, 6 40011bb8: 32 80 00 16 bne,a 40011c10 <== ALWAYS TAKEN 40011bbc: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 40011bc0: d8 04 20 54 ld [ %l0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 40011bc4: d6 04 20 58 ld [ %l0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40011bc8: 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; 40011bcc: 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; 40011bd0: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED 40011bd4: 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; 40011bd8: 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; 40011bdc: 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) 40011be0: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 40011be4: 02 80 00 0a be 40011c0c <== NOT EXECUTED 40011be8: c2 24 20 4c st %g1, [ %l0 + 0x4c ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 40011bec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40011bf0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011bf4: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011bf8: 7f ff ff 36 call 400118d0 <== NOT EXECUTED 40011bfc: 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) 40011c00: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40011c04: 02 80 00 0a be 40011c2c <== NOT EXECUTED 40011c08: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40011c0c: c2 04 60 18 ld [ %l1 + 0x18 ], %g1 40011c10: 80 88 62 00 btst 0x200, %g1 40011c14: 02 80 00 04 be 40011c24 40011c18: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 40011c1c: c4 3c 60 10 std %g2, [ %l1 + 0x10 ] iop->size = the_jnode->info.file.size; 40011c20: c4 1c 20 50 ldd [ %l0 + 0x50 ], %g2 40011c24: b0 10 20 00 clr %i0 40011c28: c4 3c 60 08 std %g2, [ %l1 + 8 ] return 0; } 40011c2c: 81 c7 e0 08 ret 40011c30: 81 e8 00 00 restore =============================================================================== 40011504 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40011504: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40011508: 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 ) { 4001150c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40011510: 80 a0 60 00 cmp %g1, 0 40011514: 22 80 00 06 be,a 4001152c <== NEVER TAKEN 40011518: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 <== NOT EXECUTED 4001151c: 7f ff da 38 call 40007dfc <_Chain_Extract> 40011520: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40011524: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40011528: c2 14 20 34 lduh [ %l0 + 0x34 ], %g1 IMFS_update_ctime( the_jnode ); 4001152c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40011530: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40011534: 90 07 bf f8 add %fp, -8, %o0 40011538: 7f ff c8 f6 call 40003910 4001153c: c2 34 20 34 sth %g1, [ %l0 + 0x34 ] 40011540: c2 07 bf f8 ld [ %fp + -8 ], %g1 return memfile_check_rmnod( the_jnode ); 40011544: 90 10 00 10 mov %l0, %o0 40011548: 7f ff ff d6 call 400114a0 4001154c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] } 40011550: 81 c7 e0 08 ret 40011554: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40009000 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 40009000: 13 10 00 67 sethi %hi(0x40019c00), %o1 40009004: 15 10 00 67 sethi %hi(0x40019c00), %o2 40009008: 92 12 61 b4 or %o1, 0x1b4, %o1 4000900c: 94 12 a3 78 or %o2, 0x378, %o2 40009010: 96 10 00 0a mov %o2, %o3 40009014: 82 13 c0 00 mov %o7, %g1 40009018: 40 00 03 0b call 40009c44 4000901c: 9e 10 40 00 mov %g1, %o7 40009020: 01 00 00 00 nop <== NOT EXECUTED 40009024: 40 00 90 74 call 4002d1f4 <__end+0x119d4> <== NOT EXECUTED 40009028: 40 00 90 7c call 4002d218 <__end+0x119f8> <== NOT EXECUTED 4000902c: 40 00 90 88 call 4002d24c <__end+0x11a2c> <== NOT EXECUTED 40009030: 40 00 90 88 call 4002d250 <__end+0x11a30> <== NOT EXECUTED 40009034: 40 00 90 94 call 4002d284 <__end+0x11a64> <== NOT EXECUTED 40009038: 40 00 90 94 call 4002d288 <__end+0x11a68> <== NOT EXECUTED 4000903c: 40 00 90 9c call 4002d2ac <__end+0x11a8c> <== NOT EXECUTED =============================================================================== 4000234c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 4000234c: 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) ) ) 40002350: 03 00 00 3c sethi %hi(0xf000), %g1 40002354: 80 8e 40 01 btst %i1, %g1 40002358: 32 80 00 06 bne,a 40002370 <== ALWAYS TAKEN 4000235c: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40002360: 40 00 2b b4 call 4000d230 <__errno> <== NOT EXECUTED 40002364: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002368: 10 80 00 32 b 40002430 <== NOT EXECUTED 4000236c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002370: 80 a0 60 5c cmp %g1, 0x5c 40002374: 22 80 00 08 be,a 40002394 <== NEVER TAKEN 40002378: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000237c: 80 a0 60 2f cmp %g1, 0x2f 40002380: 22 80 00 05 be,a 40002394 40002384: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002388: 80 a0 60 00 cmp %g1, 0 4000238c: 12 80 00 09 bne 400023b0 <== ALWAYS TAKEN 40002390: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002394: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 ! 4001aaf8 40002398: 90 07 bf e8 add %fp, -24, %o0 4000239c: 92 02 60 18 add %o1, 0x18, %o1 400023a0: 40 00 2d e0 call 4000db20 400023a4: 94 10 20 14 mov 0x14, %o2 400023a8: 10 80 00 08 b 400023c8 400023ac: 90 10 20 01 mov 1, %o0 400023b0: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 400023b4: 90 07 bf e8 add %fp, -24, %o0 400023b8: 92 02 60 04 add %o1, 4, %o1 400023bc: 40 00 2d d9 call 4000db20 400023c0: 94 10 20 14 mov 0x14, %o2 400023c4: 90 10 20 00 clr %o0 if ( !temp_loc.ops->evalformake_h ) { 400023c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400023cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400023d0: 80 a0 60 00 cmp %g1, 0 400023d4: 02 80 00 14 be 40002424 <== NEVER TAKEN 400023d8: 90 06 00 08 add %i0, %o0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400023dc: a0 07 bf e8 add %fp, -24, %l0 400023e0: 94 07 bf fc add %fp, -4, %o2 400023e4: 92 10 00 10 mov %l0, %o1 400023e8: 9f c0 40 00 call %g1 400023ec: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400023f0: 80 a2 20 00 cmp %o0, 0 400023f4: 12 80 00 10 bne 40002434 400023f8: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !temp_loc.ops->mknod_h ) { 400023fc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40002400: 80 a0 60 00 cmp %g1, 0 40002404: 12 80 00 0e bne 4000243c <== ALWAYS TAKEN 40002408: d0 07 bf fc ld [ %fp + -4 ], %o0 rtems_filesystem_freenode( &temp_loc ); 4000240c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002410: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002414: 02 80 00 04 be 40002424 <== NOT EXECUTED 40002418: 01 00 00 00 nop <== NOT EXECUTED 4000241c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002420: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002424: 40 00 2b 83 call 4000d230 <__errno> <== NOT EXECUTED 40002428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000242c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002430: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002434: 81 c7 e0 08 ret 40002438: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 4000243c: 92 10 00 19 mov %i1, %o1 40002440: 94 10 00 1a mov %i2, %o2 40002444: 96 10 00 1b mov %i3, %o3 40002448: 9f c0 40 00 call %g1 4000244c: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 40002450: c2 07 bf f4 ld [ %fp + -12 ], %g1 40002454: 80 a0 60 00 cmp %g1, 0 40002458: 02 bf ff f7 be 40002434 <== NEVER TAKEN 4000245c: b0 10 00 08 mov %o0, %i0 40002460: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002464: 80 a0 60 00 cmp %g1, 0 40002468: 02 80 00 04 be 40002478 4000246c: 01 00 00 00 nop 40002470: 9f c0 40 00 call %g1 40002474: 90 10 00 10 mov %l0, %o0 return result; } 40002478: 81 c7 e0 08 ret 4000247c: 81 e8 00 00 restore =============================================================================== 400024a0 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 400024a0: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 400024a4: 80 a6 60 00 cmp %i1, 0 400024a8: 02 80 00 05 be 400024bc 400024ac: a0 10 00 18 mov %i0, %l0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 400024b0: 80 a6 a0 01 cmp %i2, 1 400024b4: 28 80 00 06 bleu,a 400024cc 400024b8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 400024bc: 40 00 2b 5d call 4000d230 <__errno> 400024c0: 01 00 00 00 nop 400024c4: 10 80 00 14 b 40002514 400024c8: 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; 400024cc: a4 10 20 00 clr %l2 errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 400024d0: 80 a0 60 00 cmp %g1, 0 400024d4: 02 80 00 4c be 40002604 <== NEVER TAKEN 400024d8: a6 10 20 00 clr %l3 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 400024dc: 80 a6 e0 00 cmp %i3, 0 400024e0: 02 80 00 05 be 400024f4 <== ALWAYS TAKEN 400024e4: 90 10 20 6c mov 0x6c, %o0 size += strlen( device ) + 1; 400024e8: 40 00 2f 0a call 4000e110 <== NOT EXECUTED 400024ec: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 400024f0: 90 02 20 6d add %o0, 0x6d, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 400024f4: 40 00 20 48 call 4000a614 400024f8: 01 00 00 00 nop if ( !temp_mt_entry ) { 400024fc: a2 92 20 00 orcc %o0, 0, %l1 40002500: 12 80 00 07 bne 4000251c <== ALWAYS TAKEN 40002504: a6 10 00 11 mov %l1, %l3 errno = ENOMEM; 40002508: 40 00 2b 4a call 4000d230 <__errno> <== NOT EXECUTED 4000250c: 01 00 00 00 nop <== NOT EXECUTED 40002510: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40002514: 10 80 00 75 b 400026e8 40002518: 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; 4000251c: f4 24 60 30 st %i2, [ %l1 + 0x30 ] if ( device ) { 40002520: 80 a6 e0 00 cmp %i3, 0 40002524: 02 80 00 08 be 40002544 <== ALWAYS TAKEN 40002528: e2 24 60 2c st %l1, [ %l1 + 0x2c ] temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 4000252c: 90 04 60 6c add %l1, 0x6c, %o0 <== NOT EXECUTED strcpy( temp_mt_entry->dev, device ); 40002530: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40002534: 40 00 2e d4 call 4000e084 <== NOT EXECUTED 40002538: 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 ) { 4000253c: 10 80 00 04 b 4000254c <== NOT EXECUTED 40002540: 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; 40002544: 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 ) { 40002548: 80 a7 20 00 cmp %i4, 0 4000254c: 22 80 00 39 be,a 40002630 40002550: c0 24 60 1c clr [ %l1 + 0x1c ] if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 40002554: 40 00 2e ef call 4000e110 40002558: 90 10 00 1c mov %i4, %o0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 4000255c: a4 07 bf ec add %fp, -20, %l2 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 40002560: 92 10 00 08 mov %o0, %o1 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 40002564: 94 10 20 07 mov 7, %o2 40002568: 90 10 00 1c mov %i4, %o0 4000256c: 96 10 00 12 mov %l2, %o3 40002570: 7f ff fe d9 call 400020d4 40002574: 98 10 20 01 mov 1, %o4 40002578: 80 a2 3f ff cmp %o0, -1 4000257c: 02 80 00 4b be 400026a8 <== NEVER TAKEN 40002580: c2 07 bf f8 ld [ %fp + -8 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 40002584: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40002588: 80 a0 60 00 cmp %g1, 0 4000258c: 02 80 00 1e be 40002604 <== NEVER TAKEN 40002590: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 40002594: 9f c0 40 00 call %g1 40002598: 90 10 00 12 mov %l2, %o0 4000259c: 80 a2 20 01 cmp %o0, 1 400025a0: 02 80 00 07 be 400025bc 400025a4: 03 10 00 6c sethi %hi(0x4001b000), %g1 errno = ENOTDIR; 400025a8: 40 00 2b 22 call 4000d230 <__errno> 400025ac: 01 00 00 00 nop 400025b0: 82 10 20 14 mov 0x14, %g1 ! 14 goto cleanup_and_bail; 400025b4: 10 80 00 3e b 400026ac 400025b8: 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; 400025bc: 05 10 00 6c sethi %hi(0x4001b000), %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 400025c0: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 400025c4: 84 10 a1 ec or %g2, 0x1ec, %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 ) 400025c8: 10 80 00 06 b 400025e0 400025cc: c6 07 bf ec ld [ %fp + -20 ], %g3 400025d0: 80 a1 00 03 cmp %g4, %g3 400025d4: 02 80 00 08 be 400025f4 400025d8: 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 ) { 400025dc: c2 00 40 00 ld [ %g1 ], %g1 400025e0: 80 a0 40 02 cmp %g1, %g2 400025e4: 32 bf ff fb bne,a 400025d0 400025e8: 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; 400025ec: 10 80 00 42 b 400026f4 400025f0: 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; 400025f4: 40 00 2b 0f call 4000d230 <__errno> 400025f8: a4 07 bf ec add %fp, -20, %l2 400025fc: 10 bf ff ee b 400025b4 40002600: 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; 40002604: 40 00 2b 0b call 4000d230 <__errno> <== NOT EXECUTED 40002608: 01 00 00 00 nop <== NOT EXECUTED 4000260c: 10 bf ff ea b 400025b4 <== NOT EXECUTED 40002610: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 40002614: 90 10 00 11 mov %l1, %o0 40002618: 9f c0 40 00 call %g1 4000261c: a4 07 bf ec add %fp, -20, %l2 40002620: 80 a2 20 00 cmp %o0, 0 40002624: 22 80 00 0b be,a 40002650 <== ALWAYS TAKEN 40002628: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000262c: 30 80 00 20 b,a 400026ac <== 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; 40002630: c0 24 60 24 clr [ %l1 + 0x24 ] temp_mt_entry->mt_fs_root.ops = NULL; 40002634: c0 24 60 28 clr [ %l1 + 0x28 ] temp_mt_entry->mt_point_node.node_access = NULL; 40002638: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000263c: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.ops = NULL; 40002640: c0 24 60 14 clr [ %l1 + 0x14 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 40002644: c0 24 60 18 clr [ %l1 + 0x18 ] 40002648: a4 10 20 00 clr %l2 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000264c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 40002650: 9f c0 40 00 call %g1 40002654: 90 10 00 11 mov %l1, %o0 40002658: 80 a2 20 00 cmp %o0, 0 4000265c: 02 80 00 0a be 40002684 <== ALWAYS TAKEN 40002660: 11 10 00 6c sethi %hi(0x4001b000), %o0 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 40002664: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40002668: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000266c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002670: 02 80 00 0f be 400026ac <== NOT EXECUTED 40002674: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 40002678: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000267c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40002680: 30 80 00 0b b,a 400026ac <== 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 ); 40002684: 92 10 00 11 mov %l1, %o1 40002688: 40 00 0e 1f call 40005f04 <_Chain_Append> 4000268c: 90 12 21 e8 or %o0, 0x1e8, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 40002690: 80 a4 20 00 cmp %l0, 0 40002694: 02 80 00 03 be 400026a0 <== NEVER TAKEN 40002698: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000269c: e2 24 00 00 st %l1, [ %l0 ] 400026a0: 81 c7 e0 08 ret 400026a4: 81 e8 00 00 restore 400026a8: a4 10 20 00 clr %l2 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 400026ac: 40 00 1e 80 call 4000a0ac 400026b0: 90 10 00 13 mov %l3, %o0 if ( loc_to_free ) 400026b4: 80 a4 a0 00 cmp %l2, 0 400026b8: 02 bf ff fa be 400026a0 <== NEVER TAKEN 400026bc: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 400026c0: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 400026c4: 80 a0 60 00 cmp %g1, 0 400026c8: 02 80 00 09 be 400026ec <== NEVER TAKEN 400026cc: 01 00 00 00 nop 400026d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400026d4: 80 a0 60 00 cmp %g1, 0 400026d8: 02 80 00 05 be 400026ec <== NEVER TAKEN 400026dc: 01 00 00 00 nop 400026e0: 9f c0 40 00 call %g1 400026e4: 90 10 00 12 mov %l2, %o0 400026e8: b0 10 3f ff mov -1, %i0 return -1; } 400026ec: 81 c7 e0 08 ret 400026f0: 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; 400026f4: c6 07 bf f4 ld [ %fp + -12 ], %g3 temp_mt_entry->mt_point_node.ops = loc.ops; 400026f8: 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; 400026fc: 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; 40002700: 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 ){ 40002704: 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; 40002708: 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 ){ 4000270c: 80 a0 60 00 cmp %g1, 0 40002710: 12 bf ff c1 bne 40002614 <== ALWAYS TAKEN 40002714: c4 24 60 14 st %g2, [ %l1 + 0x14 ] errno = ENOTSUP; 40002718: 10 bf ff bb b 40002604 <== NOT EXECUTED 4000271c: a4 07 bf ec add %fp, -20, %l2 <== NOT EXECUTED =============================================================================== 40002728 : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 40002728: 9d e3 bf a0 save %sp, -96, %sp /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 4000272c: 80 a6 00 19 cmp %i0, %i1 40002730: 32 80 00 04 bne,a 40002740 40002734: e0 06 61 58 ld [ %i1 + 0x158 ], %l0 ptr = _REENT; 40002738: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000273c: e0 00 63 58 ld [ %g1 + 0x358 ], %l0 ! 4001ab58 <_impure_ptr> } else { ptr = deleted_task->libc_reent; } if (ptr && ptr != _global_impure_ptr) { 40002740: 80 a4 20 00 cmp %l0, 0 40002744: 02 80 00 0b be 40002770 <== NEVER TAKEN 40002748: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000274c: c2 00 60 d8 ld [ %g1 + 0xd8 ], %g1 ! 4001a4d8 <_global_impure_ptr> 40002750: 80 a4 00 01 cmp %l0, %g1 40002754: 02 80 00 07 be 40002770 40002758: 13 10 00 09 sethi %hi(0x40002400), %o1 _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 4000275c: 90 10 00 10 mov %l0, %o0 40002760: 40 00 2c ce call 4000da98 <_fwalk> 40002764: 92 12 63 8c or %o1, 0x38c, %o1 #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 40002768: 40 00 18 b0 call 40008a28 <_Workspace_Free> 4000276c: 90 10 00 10 mov %l0, %o0 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 40002770: 80 a6 00 19 cmp %i0, %i1 40002774: 12 80 00 04 bne 40002784 40002778: c0 26 61 58 clr [ %i1 + 0x158 ] _REENT = 0; 4000277c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002780: c0 20 63 58 clr [ %g1 + 0x358 ] ! 4001ab58 <_impure_ptr> 40002784: 81 c7 e0 08 ret 40002788: 81 e8 00 00 restore =============================================================================== 4000278c : */ int newlib_free_buffers( FILE *fp ) { 4000278c: 9d e3 bf a0 save %sp, -96, %sp switch ( fileno(fp) ) { 40002790: 40 00 2b c2 call 4000d698 40002794: 90 10 00 18 mov %i0, %o0 40002798: 80 a2 20 02 cmp %o0, 2 4000279c: 18 80 00 0e bgu 400027d4 <== NEVER TAKEN 400027a0: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400027a4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 400027a8: 80 88 60 80 btst 0x80, %g1 400027ac: 02 80 00 0c be 400027dc <== ALWAYS TAKEN 400027b0: 01 00 00 00 nop free( fp->_bf._base ); 400027b4: 40 00 1e 3e call 4000a0ac <== NOT EXECUTED 400027b8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED fp->_flags &= ~__SMBF; 400027bc: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 400027c0: 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; 400027c4: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 400027c8: 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; 400027cc: 10 80 00 04 b 400027dc <== NOT EXECUTED 400027d0: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400027d4: 40 00 2a ef call 4000d390 <== NOT EXECUTED 400027d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400027dc: 81 c7 e0 08 ret 400027e0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 400028c0 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 400028c0: 9d e3 bf a0 save %sp, -96, %sp rtems_device_driver status; if ( !initialized ) { 400028c4: 03 10 00 80 sethi %hi(0x40020000), %g1 400028c8: c4 48 60 3c ldsb [ %g1 + 0x3c ], %g2 ! 4002003c 400028cc: 80 a0 a0 00 cmp %g2, 0 400028d0: 12 80 00 0e bne 40002908 400028d4: 84 10 20 01 mov 1, %g2 initialized = 1; status = rtems_io_register_name( 400028d8: 11 10 00 77 sethi %hi(0x4001dc00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400028dc: c4 28 60 3c stb %g2, [ %g1 + 0x3c ] status = rtems_io_register_name( 400028e0: 90 12 22 78 or %o0, 0x278, %o0 400028e4: 92 10 00 18 mov %i0, %o1 400028e8: 40 00 00 50 call 40002a28 400028ec: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 400028f0: 80 a2 20 00 cmp %o0, 0 400028f4: 02 80 00 04 be 40002904 <== ALWAYS TAKEN 400028f8: 03 10 00 80 sethi %hi(0x40020000), %g1 rtems_fatal_error_occurred(status); 400028fc: 40 00 10 7f call 40006af8 <== NOT EXECUTED 40002900: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 40002904: f0 20 61 e8 st %i0, [ %g1 + 0x1e8 ] } return RTEMS_SUCCESSFUL; } 40002908: 81 c7 e0 08 ret 4000290c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 4000289c : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 4000289c: 80 a2 a0 00 cmp %o2, 0 400028a0: 02 80 00 04 be 400028b0 <== ALWAYS TAKEN 400028a4: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 400028a8: c2 02 a0 14 ld [ %o2 + 0x14 ], %g1 <== NOT EXECUTED 400028ac: c2 22 a0 1c st %g1, [ %o2 + 0x1c ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 400028b0: 81 c3 e0 08 retl 400028b4: 90 10 20 00 clr %o0 =============================================================================== 40002a04 : int open( const char *pathname, int flags, ... ) { 40002a04: 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); 40002a08: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002a0c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40002a10: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40002a14: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40002a18: a2 06 60 01 add %i1, 1, %l1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002a1c: 80 8c 60 02 btst 2, %l1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40002a20: a2 0c 60 01 and %l1, 1, %l1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002a24: 02 80 00 03 be 40002a30 40002a28: a3 2c 60 02 sll %l1, 2, %l1 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002a2c: a2 14 60 02 or %l1, 2, %l1 va_start(ap, flags); mode = va_arg( ap, int ); 40002a30: 82 07 a0 50 add %fp, 0x50, %g1 40002a34: e4 07 a0 4c ld [ %fp + 0x4c ], %l2 40002a38: 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(); 40002a3c: 40 00 1e 8f call 4000a478 40002a40: a6 10 20 17 mov 0x17, %l3 if ( iop == 0 ) { 40002a44: a0 92 20 00 orcc %o0, 0, %l0 40002a48: 02 80 00 98 be 40002ca8 40002a4c: 01 00 00 00 nop /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 40002a50: 40 00 2d b0 call 4000e110 40002a54: 90 10 00 18 mov %i0, %o0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002a58: 94 10 00 11 mov %l1, %o2 pathname, strlen( pathname ), eval_flags, &loc, true ); 40002a5c: 92 10 00 08 mov %o0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002a60: a2 07 bf e8 add %fp, -24, %l1 40002a64: 90 10 00 18 mov %i0, %o0 40002a68: 96 10 00 11 mov %l1, %o3 40002a6c: 7f ff fd 9a call 400020d4 40002a70: 98 10 20 01 mov 1, %o4 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 40002a74: 80 a2 3f ff cmp %o0, -1 40002a78: 12 80 00 22 bne 40002b00 40002a7c: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 40002a80: 40 00 29 ec call 4000d230 <__errno> 40002a84: a8 10 20 00 clr %l4 40002a88: c2 02 00 00 ld [ %o0 ], %g1 40002a8c: 80 a0 60 02 cmp %g1, 2 40002a90: 12 80 00 3e bne 40002b88 40002a94: 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) ) { 40002a98: a8 10 20 00 clr %l4 40002a9c: 02 80 00 71 be 40002c60 40002aa0: 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 ); 40002aa4: 13 00 00 20 sethi %hi(0x8000), %o1 40002aa8: 90 10 00 18 mov %i0, %o0 40002aac: 92 14 80 09 or %l2, %o1, %o1 40002ab0: 94 10 20 00 clr %o2 40002ab4: 7f ff fe 26 call 4000234c 40002ab8: 96 10 20 00 clr %o3 if ( rc ) { 40002abc: 80 a2 20 00 cmp %o0, 0 40002ac0: 12 80 00 32 bne 40002b88 <== NEVER TAKEN 40002ac4: 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 ); 40002ac8: 40 00 2d 92 call 4000e110 40002acc: 90 10 00 18 mov %i0, %o0 40002ad0: 96 10 00 11 mov %l1, %o3 40002ad4: 92 10 00 08 mov %o0, %o1 40002ad8: 94 10 20 00 clr %o2 40002adc: 90 10 00 18 mov %i0, %o0 40002ae0: 98 10 20 01 mov 1, %o4 40002ae4: 7f ff fd 7c call 400020d4 40002ae8: a8 10 20 00 clr %l4 if ( status != 0 ) { /* The file did not exist */ 40002aec: 80 a2 20 00 cmp %o0, 0 40002af0: 12 80 00 5c bne 40002c60 <== NEVER TAKEN 40002af4: 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; 40002af8: 10 80 00 07 b 40002b14 40002afc: 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)) { 40002b00: a8 10 00 11 mov %l1, %l4 40002b04: 80 a0 6a 00 cmp %g1, 0xa00 40002b08: 02 80 00 56 be 40002c60 40002b0c: 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; 40002b10: c2 07 bf f0 ld [ %fp + -16 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002b14: 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; 40002b18: c2 24 20 40 st %g1, [ %l0 + 0x40 ] iop->file_info = loc.node_access; 40002b1c: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40002b20: 90 10 00 19 mov %i1, %o0 40002b24: 40 00 1e 89 call 4000a548 40002b28: c2 24 20 3c st %g1, [ %l0 + 0x3c ] 40002b2c: 90 12 00 11 or %o0, %l1, %o0 iop->pathinfo = loc; 40002b30: 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 ); 40002b34: d0 24 20 18 st %o0, [ %l0 + 0x18 ] iop->pathinfo = loc; 40002b38: a2 07 bf e8 add %fp, -24, %l1 40002b3c: 90 04 20 1c add %l0, 0x1c, %o0 40002b40: 40 00 2b f8 call 4000db20 40002b44: 92 10 00 11 mov %l1, %o1 if ( !iop->handlers || !iop->handlers->open_h ) { 40002b48: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40002b4c: 80 a0 60 00 cmp %g1, 0 40002b50: 22 80 00 6a be,a 40002cf8 <== NEVER TAKEN 40002b54: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 40002b58: c2 00 40 00 ld [ %g1 ], %g1 40002b5c: 80 a0 60 00 cmp %g1, 0 40002b60: 02 80 00 65 be 40002cf4 <== NEVER TAKEN 40002b64: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40002b68: 96 10 00 12 mov %l2, %o3 40002b6c: 90 10 00 10 mov %l0, %o0 40002b70: 9f c0 40 00 call %g1 40002b74: 94 10 00 19 mov %i1, %o2 if ( rc ) { 40002b78: 80 a2 20 00 cmp %o0, 0 40002b7c: 02 80 00 07 be 40002b98 40002b80: 80 8e 64 00 btst 0x400, %i1 rc = errno; 40002b84: a8 10 00 11 mov %l1, %l4 40002b88: 40 00 29 aa call 4000d230 <__errno> 40002b8c: 01 00 00 00 nop goto done; 40002b90: 10 80 00 31 b 40002c54 40002b94: e6 02 00 00 ld [ %o0 ], %l3 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40002b98: 02 80 00 49 be 40002cbc 40002b9c: 03 10 00 6c sethi %hi(0x4001b000), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40002ba0: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001b1ac 40002ba4: 92 10 20 00 clr %o1 40002ba8: 82 24 00 01 sub %l0, %g1, %g1 40002bac: 83 38 60 03 sra %g1, 3, %g1 40002bb0: 87 28 60 06 sll %g1, 6, %g3 40002bb4: 85 28 60 03 sll %g1, 3, %g2 40002bb8: 84 20 c0 02 sub %g3, %g2, %g2 40002bbc: 87 28 a0 06 sll %g2, 6, %g3 40002bc0: 84 00 80 03 add %g2, %g3, %g2 40002bc4: 84 00 80 01 add %g2, %g1, %g2 40002bc8: 91 28 a0 0f sll %g2, 0xf, %o0 40002bcc: 84 22 00 02 sub %o0, %g2, %g2 40002bd0: 94 10 20 00 clr %o2 40002bd4: 91 28 a0 03 sll %g2, 3, %o0 40002bd8: 40 00 1d 5f call 4000a154 40002bdc: 90 02 00 01 add %o0, %g1, %o0 if ( rc ) { 40002be0: a6 92 20 00 orcc %o0, 0, %l3 40002be4: 02 80 00 36 be 40002cbc <== ALWAYS TAKEN 40002be8: 03 10 00 6c sethi %hi(0x4001b000), %g1 if(errno) rc = errno; 40002bec: 40 00 29 91 call 4000d230 <__errno> <== NOT EXECUTED 40002bf0: 01 00 00 00 nop <== NOT EXECUTED 40002bf4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002bf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002bfc: 02 80 00 06 be 40002c14 <== NOT EXECUTED 40002c00: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40002c04: 40 00 29 8b call 4000d230 <__errno> <== NOT EXECUTED 40002c08: 01 00 00 00 nop <== NOT EXECUTED 40002c0c: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED close( iop - rtems_libio_iops ); 40002c10: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40002c14: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001b1ac <== NOT EXECUTED 40002c18: a8 10 20 00 clr %l4 <== NOT EXECUTED 40002c1c: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40002c20: 83 3c 20 03 sra %l0, 3, %g1 <== NOT EXECUTED 40002c24: 87 28 60 06 sll %g1, 6, %g3 <== NOT EXECUTED 40002c28: 85 28 60 03 sll %g1, 3, %g2 <== NOT EXECUTED 40002c2c: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED 40002c30: 87 28 a0 06 sll %g2, 6, %g3 <== NOT EXECUTED 40002c34: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED 40002c38: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40002c3c: 91 28 a0 0f sll %g2, 0xf, %o0 <== NOT EXECUTED 40002c40: 84 22 00 02 sub %o0, %g2, %g2 <== NOT EXECUTED 40002c44: a0 10 20 00 clr %l0 <== NOT EXECUTED 40002c48: 91 28 a0 03 sll %g2, 3, %o0 <== NOT EXECUTED 40002c4c: 40 00 1c e9 call 40009ff0 <== NOT EXECUTED 40002c50: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002c54: 80 a4 e0 00 cmp %l3, 0 40002c58: 02 80 00 19 be 40002cbc <== NEVER TAKEN 40002c5c: 03 10 00 6c sethi %hi(0x4001b000), %g1 if ( iop ) 40002c60: 80 a4 20 00 cmp %l0, 0 40002c64: 02 80 00 05 be 40002c78 <== NEVER TAKEN 40002c68: 80 a5 20 00 cmp %l4, 0 rtems_libio_free( iop ); 40002c6c: 40 00 1d eb call 4000a418 40002c70: 90 10 00 10 mov %l0, %o0 if ( loc_to_free ) 40002c74: 80 a5 20 00 cmp %l4, 0 40002c78: 02 80 00 0c be 40002ca8 40002c7c: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40002c80: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40002c84: 80 a0 60 00 cmp %g1, 0 40002c88: 02 80 00 08 be 40002ca8 <== NEVER TAKEN 40002c8c: 01 00 00 00 nop 40002c90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40002c94: 80 a0 60 00 cmp %g1, 0 40002c98: 02 80 00 04 be 40002ca8 <== NEVER TAKEN 40002c9c: 01 00 00 00 nop 40002ca0: 9f c0 40 00 call %g1 40002ca4: 90 10 00 14 mov %l4, %o0 rtems_set_errno_and_return_minus_one( rc ); 40002ca8: 40 00 29 62 call 4000d230 <__errno> 40002cac: b0 10 3f ff mov -1, %i0 40002cb0: e6 22 00 00 st %l3, [ %o0 ] 40002cb4: 81 c7 e0 08 ret 40002cb8: 81 e8 00 00 restore } return iop - rtems_libio_iops; 40002cbc: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 40002cc0: a0 24 00 01 sub %l0, %g1, %l0 40002cc4: a1 3c 20 03 sra %l0, 3, %l0 40002cc8: 85 2c 20 06 sll %l0, 6, %g2 40002ccc: 83 2c 20 03 sll %l0, 3, %g1 40002cd0: 82 20 80 01 sub %g2, %g1, %g1 40002cd4: 85 28 60 06 sll %g1, 6, %g2 40002cd8: 82 00 40 02 add %g1, %g2, %g1 40002cdc: 82 00 40 10 add %g1, %l0, %g1 40002ce0: b1 28 60 0f sll %g1, 0xf, %i0 40002ce4: b0 26 00 01 sub %i0, %g1, %i0 40002ce8: b1 2e 20 03 sll %i0, 3, %i0 } 40002cec: 81 c7 e0 08 ret 40002cf0: 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; 40002cf4: a8 07 bf e8 add %fp, -24, %l4 <== NOT EXECUTED 40002cf8: 10 bf ff da b 40002c60 <== NOT EXECUTED 40002cfc: a6 10 20 86 mov 0x86, %l3 <== NOT EXECUTED =============================================================================== 40002990 : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 40002990: 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) { 40002994: 21 10 00 66 sethi %hi(0x40019800), %l0 40002998: 92 10 20 00 clr %o1 4000299c: 90 14 23 a8 or %l0, 0x3a8, %o0 400029a0: 40 00 00 19 call 40002a04 400029a4: 94 10 20 00 clr %o2 400029a8: 80 a2 3f ff cmp %o0, -1 400029ac: 02 80 00 14 be 400029fc 400029b0: 90 14 23 a8 or %l0, 0x3a8, %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) 400029b4: 92 10 20 01 mov 1, %o1 400029b8: 40 00 00 13 call 40002a04 400029bc: 94 10 20 00 clr %o2 400029c0: 80 a2 3f ff cmp %o0, -1 400029c4: 32 80 00 05 bne,a 400029d8 <== ALWAYS TAKEN 400029c8: 90 14 23 a8 or %l0, 0x3a8, %o0 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 400029cc: 11 15 55 11 sethi %hi(0x55544400), %o0 <== NOT EXECUTED 400029d0: 10 80 00 09 b 400029f4 <== NOT EXECUTED 400029d4: 90 12 20 31 or %o0, 0x31, %o0 ! 55544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 400029d8: 92 10 20 01 mov 1, %o1 400029dc: 40 00 00 0a call 40002a04 400029e0: 94 10 20 00 clr %o2 400029e4: 80 a2 3f ff cmp %o0, -1 400029e8: 12 80 00 05 bne 400029fc <== ALWAYS TAKEN 400029ec: 11 15 55 11 sethi %hi(0x55544400), %o0 rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 400029f0: 90 12 20 32 or %o0, 0x32, %o0 ! 55544432 <== NOT EXECUTED 400029f4: 40 00 0c 84 call 40005c04 <== NOT EXECUTED 400029f8: 01 00 00 00 nop <== NOT EXECUTED 400029fc: 81 c7 e0 08 ret 40002a00: 81 e8 00 00 restore =============================================================================== 40003480 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40003480: 9d e3 bf a0 save %sp, -96, %sp int i; if (tty->termios.c_oflag & OPOST) { 40003484: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40003488: 80 88 60 01 btst 1, %g1 4000348c: 02 80 00 5a be 400035f4 <== NEVER TAKEN 40003490: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40003494: 84 0e 20 ff and %i0, 0xff, %g2 40003498: 80 a0 a0 09 cmp %g2, 9 4000349c: 22 80 00 2b be,a 40003548 400034a0: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 400034a4: 18 80 00 07 bgu 400034c0 <== ALWAYS TAKEN 400034a8: 80 a0 a0 0a cmp %g2, 0xa 400034ac: 80 a0 a0 08 cmp %g2, 8 <== NOT EXECUTED 400034b0: 12 80 00 3a bne 40003598 <== NOT EXECUTED 400034b4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 400034b8: 10 80 00 33 b 40003584 <== NOT EXECUTED 400034bc: 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) { 400034c0: 02 80 00 06 be 400034d8 400034c4: 80 a0 a0 0d cmp %g2, 0xd 400034c8: 32 80 00 34 bne,a 40003598 <== ALWAYS TAKEN 400034cc: 80 88 60 02 btst 2, %g1 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400034d0: 10 80 00 10 b 40003510 <== NOT EXECUTED 400034d4: 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) 400034d8: 80 88 60 20 btst 0x20, %g1 400034dc: 32 80 00 02 bne,a 400034e4 <== NEVER TAKEN 400034e0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 400034e4: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 400034e8: 80 88 60 04 btst 4, %g1 400034ec: 02 80 00 43 be 400035f8 <== NEVER TAKEN 400034f0: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 400034f4: 11 10 00 66 sethi %hi(0x40019800), %o0 400034f8: 92 10 20 01 mov 1, %o1 400034fc: 90 12 23 b8 or %o0, 0x3b8, %o0 40003500: 7f ff ff 94 call 40003350 40003504: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 40003508: 10 80 00 3b b 400035f4 4000350c: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003510: 02 80 00 06 be 40003528 <== NOT EXECUTED 40003514: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003518: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED 4000351c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003520: 02 80 00 17 be 4000357c <== NOT EXECUTED 40003524: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40003528: 22 80 00 33 be,a 400035f4 <== NOT EXECUTED 4000352c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40003530: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40003534: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003538: 02 80 00 2f be 400035f4 <== NOT EXECUTED 4000353c: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; break; 40003540: 10 80 00 2d b 400035f4 <== NOT EXECUTED 40003544: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003548: 07 00 00 06 sethi %hi(0x1800), %g3 4000354c: 82 08 40 03 and %g1, %g3, %g1 40003550: 80 a0 40 03 cmp %g1, %g3 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40003554: 82 08 a0 07 and %g2, 7, %g1 40003558: 92 10 20 08 mov 8, %o1 4000355c: 92 22 40 01 sub %o1, %g1, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40003560: 12 80 00 24 bne 400035f0 <== NEVER TAKEN 40003564: 82 02 40 02 add %o1, %g2, %g1 tty->column += i; 40003568: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 4000356c: 94 10 00 19 mov %i1, %o2 40003570: 11 10 00 66 sethi %hi(0x40019800), %o0 40003574: 7f ff ff 77 call 40003350 40003578: 90 12 23 c0 or %o0, 0x3c0, %o0 ! 40019bc0 <__FUNCTION__.5614+0x2b8> return; 4000357c: 81 c7 e0 08 ret 40003580: 81 e8 00 00 restore } tty->column += i; break; case '\b': if (tty->column > 0) 40003584: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003588: 04 80 00 1b ble 400035f4 <== NOT EXECUTED 4000358c: 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++; 40003590: 10 80 00 19 b 400035f4 <== NOT EXECUTED 40003594: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40003598: 02 80 00 0d be 400035cc <== ALWAYS TAKEN 4000359c: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 c = toupper(c); 400035a0: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 400035a4: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 4001ab54 <__ctype_ptr__><== NOT EXECUTED 400035a8: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 400035ac: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 400035b0: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED 400035b4: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 400035b8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400035bc: 22 80 00 02 be,a 400035c4 <== NOT EXECUTED 400035c0: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 400035c4: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 400035c8: c2 0f a0 44 ldub [ %fp + 0x44 ], %g1 <== NOT EXECUTED 400035cc: 05 10 00 6a sethi %hi(0x4001a800), %g2 400035d0: c4 00 a3 54 ld [ %g2 + 0x354 ], %g2 ! 4001ab54 <__ctype_ptr__> 400035d4: 82 00 80 01 add %g2, %g1, %g1 400035d8: c2 08 60 01 ldub [ %g1 + 1 ], %g1 400035dc: 80 88 60 20 btst 0x20, %g1 400035e0: 12 80 00 06 bne 400035f8 <== NEVER TAKEN 400035e4: 94 10 00 19 mov %i1, %o2 tty->column++; 400035e8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 400035ec: 82 00 60 01 inc %g1 400035f0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 400035f4: 94 10 00 19 mov %i1, %o2 400035f8: 90 07 a0 44 add %fp, 0x44, %o0 400035fc: 7f ff ff 55 call 40003350 40003600: 92 10 20 01 mov 1, %o1 40003604: 81 c7 e0 08 ret 40003608: 81 e8 00 00 restore =============================================================================== 4000ccc4 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 4000ccc4: 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) 4000ccc8: 23 10 00 68 sethi %hi(0x4001a000), %l1 4000cccc: a0 07 bf dc add %fp, -36, %l0 4000ccd0: 92 10 20 03 mov 3, %o1 4000ccd4: 90 14 61 18 or %l1, 0x118, %o0 4000ccd8: 94 10 20 07 mov 7, %o2 4000ccdc: 96 10 00 10 mov %l0, %o3 4000cce0: 7f ff d4 fd call 400020d4 4000cce4: 98 10 20 01 mov 1, %o4 4000cce8: 80 a2 20 00 cmp %o0, 0 4000ccec: 02 80 00 10 be 4000cd2c <== NEVER TAKEN 4000ccf0: c2 07 bf e8 ld [ %fp + -24 ], %g1 != 0) { if (errno != ENOENT) 4000ccf4: 40 00 01 4f call 4000d230 <__errno> 4000ccf8: 01 00 00 00 nop 4000ccfc: c2 02 00 00 ld [ %o0 ], %g1 4000cd00: 80 a0 60 02 cmp %g1, 2 4000cd04: 32 80 00 59 bne,a 4000ce68 <== NEVER TAKEN 4000cd08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 4000cd0c: 90 14 61 18 or %l1, 0x118, %o0 4000cd10: 7f ff d5 87 call 4000232c 4000cd14: 92 10 23 ff mov 0x3ff, %o1 4000cd18: 80 a2 20 00 cmp %o0, 0 4000cd1c: 02 80 00 0e be 4000cd54 <== ALWAYS TAKEN 4000cd20: 03 10 00 6c sethi %hi(0x4001b000), %g1 } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 4000cd24: 81 c7 e0 08 ret <== NOT EXECUTED 4000cd28: 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); 4000cd2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cd30: 22 80 00 09 be,a 4000cd54 <== NOT EXECUTED 4000cd34: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000cd38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001b01c <== NOT EXECUTED 4000cd3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000cd40: 22 80 00 05 be,a 4000cd54 <== NOT EXECUTED 4000cd44: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000cd48: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000cd4c: 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 ++); 4000cd50: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000cd54: c4 10 61 3a lduh [ %g1 + 0x13a ], %g2 ! 4001b13a else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000cd58: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000cd5c: 95 28 a0 10 sll %g2, 0x10, %o2 4000cd60: 84 00 a0 01 inc %g2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000cd64: 86 10 e2 69 or %g3, 0x269, %g3 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000cd68: c4 30 61 3a sth %g2, [ %g1 + 0x13a ] else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000cd6c: 05 0b dd 1b sethi %hi(0x2f746c00), %g2 4000cd70: 03 00 00 19 sethi %hi(0x6400), %g1 4000cd74: 84 10 a1 70 or %g2, 0x170, %g2 4000cd78: 82 10 62 6f or %g1, 0x26f, %g1 4000cd7c: a0 07 bf f0 add %fp, -16, %l0 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000cd80: 95 32 a0 10 srl %o2, 0x10, %o2 else rtems_filesystem_freenode(&loc); /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 4000cd84: c4 3f bf f0 std %g2, [ %fp + -16 ] 4000cd88: c2 34 20 08 sth %g1, [ %l0 + 8 ] sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 4000cd8c: 90 07 bf fa add %fp, -6, %o0 4000cd90: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000cd94: 40 00 04 13 call 4000dde0 4000cd98: 92 12 61 20 or %o1, 0x120, %o1 ! 4001a120 <__FUNCTION__.5895+0x30> /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 4000cd9c: 90 10 00 10 mov %l0, %o0 4000cda0: 40 00 00 4b call 4000cecc 4000cda4: 92 10 21 80 mov 0x180, %o1 4000cda8: 80 a2 20 00 cmp %o0, 0 4000cdac: 02 80 00 05 be 4000cdc0 <== ALWAYS TAKEN 4000cdb0: 90 10 00 10 mov %l0, %o0 if (errno != EEXIST){ 4000cdb4: 40 00 01 1f call 4000d230 <__errno> <== NOT EXECUTED 4000cdb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cdbc: 30 80 00 2b b,a 4000ce68 <== 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); 4000cdc0: 7f ff d7 11 call 40002a04 4000cdc4: 13 00 00 10 sethi %hi(0x4000), %o1 if (filsdes[0] < 0) { 4000cdc8: 80 a2 20 00 cmp %o0, 0 4000cdcc: 16 80 00 07 bge 4000cde8 <== NEVER TAKEN 4000cdd0: d0 26 00 00 st %o0, [ %i0 ] err = errno; 4000cdd4: 40 00 01 17 call 4000d230 <__errno> 4000cdd8: 01 00 00 00 nop 4000cddc: 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); 4000cde0: 10 80 00 1d b 4000ce54 4000cde4: 90 10 00 10 mov %l0, %o0 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 4000cde8: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000cdec: c4 00 61 e4 ld [ %g1 + 0x1e4 ], %g2 ! 4001a9e4 <== NOT EXECUTED 4000cdf0: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 4000cdf4: 1a 80 00 08 bcc 4000ce14 <== NOT EXECUTED 4000cdf8: 82 10 20 00 clr %g1 <== NOT EXECUTED 4000cdfc: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000ce00: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001b1ac <== NOT EXECUTED 4000ce04: 85 2a 20 06 sll %o0, 6, %g2 <== NOT EXECUTED 4000ce08: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED 4000ce0c: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 4000ce10: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4000ce14: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ce18: 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; 4000ce1c: 84 08 bf fe and %g2, -2, %g2 <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 4000ce20: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000ce24: 7f ff d6 f8 call 40002a04 <== NOT EXECUTED 4000ce28: c4 20 60 18 st %g2, [ %g1 + 0x18 ] <== NOT EXECUTED 4000ce2c: d0 26 20 04 st %o0, [ %i0 + 4 ] <== NOT EXECUTED if (filsdes[1] < 0) { 4000ce30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ce34: 16 80 00 07 bge 4000ce50 <== NOT EXECUTED 4000ce38: a2 10 20 00 clr %l1 <== NOT EXECUTED err = errno; 4000ce3c: 40 00 00 fd call 4000d230 <__errno> <== NOT EXECUTED 4000ce40: 01 00 00 00 nop <== NOT EXECUTED 4000ce44: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED close(filsdes[0]); 4000ce48: 7f ff f4 6a call 40009ff0 <== NOT EXECUTED 4000ce4c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED } unlink(fifopath); 4000ce50: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4000ce54: 40 00 00 26 call 4000ceec 4000ce58: b0 10 3f ff mov -1, %i0 } rtems_set_errno_and_return_minus_one(err); 4000ce5c: 40 00 00 f5 call 4000d230 <__errno> 4000ce60: 01 00 00 00 nop 4000ce64: e2 22 00 00 st %l1, [ %o0 ] } 4000ce68: 81 c7 e0 08 ret 4000ce6c: 81 e8 00 00 restore =============================================================================== 4000bda8 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { 4000bda8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); 4000bdac: 40 00 02 1f call 4000c628 <== NOT EXECUTED 4000bdb0: d0 06 20 2c ld [ %i0 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4000bdb4: 40 00 02 1d call 4000c628 <== NOT EXECUTED 4000bdb8: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4000bdbc: 7f ff e5 bd call 400054b0 <== NOT EXECUTED 4000bdc0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 4000bdc4: 7f ff f8 ba call 4000a0ac <== NOT EXECUTED 4000bdc8: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED free(pipe); 4000bdcc: 7f ff f8 b8 call 4000a0ac <== NOT EXECUTED 4000bdd0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000b9e8 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000b9e8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if (cmd == FIONREAD) { 4000b9ec: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 4000b9f0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED if (cmd == FIONREAD) { 4000b9f4: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 4000b9f8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000b9fc: 12 80 00 12 bne 4000ba44 <== NOT EXECUTED 4000ba00: b0 10 3f ea mov -22, %i0 <== NOT EXECUTED if (buffer == NULL) 4000ba04: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000ba08: 02 80 00 0f be 4000ba44 <== NOT EXECUTED 4000ba0c: b0 10 3f f2 mov -14, %i0 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 4000ba10: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000ba14: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ba18: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ba1c: 7f ff e6 d3 call 40005568 <== NOT EXECUTED 4000ba20: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000ba24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ba28: 12 80 00 07 bne 4000ba44 <== NOT EXECUTED 4000ba2c: 01 00 00 00 nop <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000ba30: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000ba34: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; 4000ba38: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000ba3c: 7f ff e7 12 call 40005684 <== NOT EXECUTED 4000ba40: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } return -EINVAL; } 4000ba44: 81 c7 e0 08 ret <== NOT EXECUTED 4000ba48: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000b974 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } 4000b974: 81 c3 e0 08 retl <== NOT EXECUTED 4000b978: 90 10 3f e3 mov -29, %o0 <== NOT EXECUTED =============================================================================== 4000bc0c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000bc0c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000bc10: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 4000bc14: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 4000bc18: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bc1c: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bc20: 7f ff e6 52 call 40005568 <== NOT EXECUTED 4000bc24: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000bc28: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bc2c: 02 80 00 54 be 4000bd7c <== NOT EXECUTED 4000bc30: a6 07 bf fc add %fp, -4, %l3 <== NOT EXECUTED 4000bc34: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc38: 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) 4000bc3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bc40: 02 80 00 53 be 4000bd8c <== NOT EXECUTED 4000bc44: a2 10 20 00 clr %l1 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 4000bc48: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED 4000bc4c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000bc50: 22 80 00 04 be,a 4000bc60 <== NOT EXECUTED 4000bc54: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000bc58: 10 80 00 4d b 4000bd8c <== NOT EXECUTED 4000bc5c: 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); 4000bc60: 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 ++; 4000bc64: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000bc68: 7f ff e6 87 call 40005684 <== NOT EXECUTED 4000bc6c: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 4000bc70: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000bc74: 40 00 02 9e call 4000c6ec <== NOT EXECUTED 4000bc78: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bc7c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000bc80: 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)) 4000bc84: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000bc88: 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)) 4000bc8c: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000bc90: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000bc94: 7f ff e6 35 call 40005568 <== NOT EXECUTED 4000bc98: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000bc9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bca0: 22 80 00 04 be,a 4000bcb0 <== NOT EXECUTED 4000bca4: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 <== NOT EXECUTED 4000bca8: 10 80 00 3b b 4000bd94 <== NOT EXECUTED 4000bcac: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 4000bcb0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 4000bcb4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000bcb8: 12 80 00 35 bne 4000bd8c <== NOT EXECUTED 4000bcbc: c2 24 20 18 st %g1, [ %l0 + 0x18 ] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 4000bcc0: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000bcc4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000bcc8: 22 bf ff dd be,a 4000bc3c <== NOT EXECUTED 4000bccc: 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); 4000bcd0: 82 26 80 18 sub %i2, %i0, %g1 <== NOT EXECUTED 4000bcd4: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000bcd8: 38 80 00 02 bgu,a 4000bce0 <== NOT EXECUTED 4000bcdc: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 4000bce0: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000bce4: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000bce8: 90 06 40 18 add %i1, %i0, %o0 <== NOT EXECUTED 4000bcec: a4 24 80 01 sub %l2, %g1, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000bcf0: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000bcf4: 04 80 00 0a ble 4000bd1c <== NOT EXECUTED 4000bcf8: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 4000bcfc: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000bd00: 40 00 07 88 call 4000db20 <== NOT EXECUTED 4000bd04: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 4000bd08: 90 06 00 12 add %i0, %l2, %o0 <== NOT EXECUTED 4000bd0c: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 4000bd10: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000bd14: 10 80 00 04 b 4000bd24 <== NOT EXECUTED 4000bd18: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 4000bd1c: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 4000bd20: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000bd24: 40 00 07 7f call 4000db20 <== NOT EXECUTED 4000bd28: 01 00 00 00 nop <== NOT EXECUTED pipe->Start += chunk; 4000bd2c: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000bd30: 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; 4000bd34: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED pipe->Start %= pipe->Size; 4000bd38: 40 00 2b 82 call 40016b40 <.urem> <== NOT EXECUTED 4000bd3c: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000bd40: 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; 4000bd44: d0 24 20 08 st %o0, [ %l0 + 8 ] <== NOT EXECUTED pipe->Length -= chunk; 4000bd48: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 4000bd4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bd50: 12 80 00 03 bne 4000bd5c <== NOT EXECUTED 4000bd54: c2 24 20 0c st %g1, [ %l0 + 0xc ] <== NOT EXECUTED pipe->Start = 0; 4000bd58: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED if (pipe->waitingWriters > 0) 4000bd5c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000bd60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bd64: 22 80 00 06 be,a 4000bd7c <== NOT EXECUTED 4000bd68: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 4000bd6c: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000bd70: 40 00 02 48 call 4000c690 <== NOT EXECUTED 4000bd74: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED read += chunk; 4000bd78: 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) { 4000bd7c: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000bd80: 2a bf ff d1 bcs,a 4000bcc4 <== NOT EXECUTED 4000bd84: e2 04 20 0c ld [ %l0 + 0xc ], %l1 <== NOT EXECUTED 4000bd88: a2 10 20 00 clr %l1 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 4000bd8c: 7f ff e6 3e call 40005684 <== NOT EXECUTED 4000bd90: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED out_nolock: if (read > 0) 4000bd94: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000bd98: 24 80 00 02 ble,a 4000bda0 <== NOT EXECUTED 4000bd9c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return read; return ret; } 4000bda0: 81 c7 e0 08 ret <== NOT EXECUTED 4000bda4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000bdd8 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 4000bdd8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED pipe_control_t *pipe = *pipep; 4000bddc: e0 06 00 00 ld [ %i0 ], %l0 <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 4000bde0: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bde4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000bde8: 7f ff e5 e0 call 40005568 <== NOT EXECUTED 4000bdec: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 4000bdf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bdf4: 12 80 00 17 bne 4000be50 <== NOT EXECUTED 4000bdf8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 4000bdfc: e2 06 60 18 ld [ %i1 + 0x18 ], %l1 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 4000be00: 80 8c 60 02 btst 2, %l1 <== NOT EXECUTED 4000be04: 02 80 00 05 be 4000be18 <== NOT EXECUTED 4000be08: a2 0c 60 06 and %l1, 6, %l1 <== NOT EXECUTED pipe->Readers --; 4000be0c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000be10: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000be14: c2 24 20 10 st %g1, [ %l0 + 0x10 ] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 4000be18: 80 8c 60 04 btst 4, %l1 <== NOT EXECUTED 4000be1c: 02 80 00 06 be 4000be34 <== NOT EXECUTED 4000be20: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED pipe->Writers --; 4000be24: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000be28: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000be2c: c2 24 20 14 st %g1, [ %l0 + 0x14 ] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 4000be30: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000be34: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4001b134 <== NOT EXECUTED 4000be38: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000be3c: 7f ff e5 cb call 40005568 <== NOT EXECUTED 4000be40: 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) 4000be44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000be48: 02 80 00 04 be 4000be58 <== NOT EXECUTED 4000be4c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred(sc); 4000be50: 7f ff e7 6d call 40005c04 <== NOT EXECUTED 4000be54: 01 00 00 00 nop <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000be58: 7f ff e6 0b call 40005684 <== NOT EXECUTED 4000be5c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 4000be60: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000be64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000be68: 12 80 00 0a bne 4000be90 <== NOT EXECUTED 4000be6c: 80 a4 60 04 cmp %l1, 4 <== NOT EXECUTED 4000be70: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED 4000be74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000be78: 12 80 00 06 bne 4000be90 <== NOT EXECUTED 4000be7c: 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); 4000be80: 7f ff ff ca call 4000bda8 <== NOT EXECUTED 4000be84: 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) { 4000be88: 10 80 00 12 b 4000bed0 <== NOT EXECUTED 4000be8c: 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) 4000be90: 02 80 00 07 be 4000beac <== NOT EXECUTED 4000be94: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED 4000be98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000be9c: 12 80 00 04 bne 4000beac <== NOT EXECUTED 4000bea0: 80 a4 60 02 cmp %l1, 2 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 4000bea4: 10 80 00 09 b 4000bec8 <== NOT EXECUTED 4000bea8: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 4000beac: 02 80 00 0a be 4000bed4 <== NOT EXECUTED 4000beb0: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000beb4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 <== NOT EXECUTED 4000beb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bebc: 12 80 00 06 bne 4000bed4 <== NOT EXECUTED 4000bec0: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000bec4: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000bec8: 40 00 01 f2 call 4000c690 <== NOT EXECUTED 4000becc: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 4000bed0: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000bed4: d0 00 61 34 ld [ %g1 + 0x134 ], %o0 ! 4001b134 <== NOT EXECUTED 4000bed8: 7f ff e5 eb call 40005684 <== NOT EXECUTED 4000bedc: b0 10 20 00 clr %i0 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 4000bee0: 81 c7 e0 08 ret <== NOT EXECUTED 4000bee4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000ba4c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 4000ba4c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4000ba50: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 4000ba54: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4000ba58: 02 80 00 6b be 4000bc04 <== NOT EXECUTED 4000ba5c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) 4000ba60: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED 4000ba64: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000ba68: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000ba6c: 7f ff e6 bf call 40005568 <== NOT EXECUTED 4000ba70: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED 4000ba74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000ba78: 12 80 00 63 bne 4000bc04 <== NOT EXECUTED 4000ba7c: a2 10 3f e0 mov -32, %l1 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 4000ba80: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000ba84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ba88: 02 80 00 5a be 4000bbf0 <== NOT EXECUTED 4000ba8c: 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; 4000ba90: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000ba94: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED 4000ba98: 08 80 00 04 bleu 4000baa8 <== NOT EXECUTED 4000ba9c: a6 10 00 1a mov %i2, %l3 <== NOT EXECUTED 4000baa0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED 4000baa4: 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); 4000baa8: 10 80 00 4e b 4000bbe0 <== NOT EXECUTED 4000baac: 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)) { 4000bab0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000bab4: 22 80 00 04 be,a 4000bac4 <== NOT EXECUTED 4000bab8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000babc: 10 80 00 4d b 4000bbf0 <== NOT EXECUTED 4000bac0: 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); 4000bac4: 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 ++; 4000bac8: 82 00 60 01 inc %g1 <== NOT EXECUTED PIPE_UNLOCK(pipe); 4000bacc: 7f ff e6 ee call 40005684 <== NOT EXECUTED 4000bad0: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 4000bad4: d0 04 20 30 ld [ %l0 + 0x30 ], %o0 <== NOT EXECUTED 4000bad8: 40 00 03 05 call 4000c6ec <== NOT EXECUTED 4000badc: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000bae0: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000bae4: 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)) 4000bae8: a2 40 3f ff addx %g0, -1, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000baec: 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)) 4000baf0: a2 0c 60 04 and %l1, 4, %l1 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 4000baf4: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000baf8: 7f ff e6 9c call 40005568 <== NOT EXECUTED 4000bafc: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED 4000bb00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bb04: 22 80 00 04 be,a 4000bb14 <== NOT EXECUTED 4000bb08: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 4000bb0c: 10 80 00 3b b 4000bbf8 <== NOT EXECUTED 4000bb10: a2 10 3f fc mov -4, %l1 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; if (ret != 0) 4000bb14: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 4000bb18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (ret != 0) 4000bb1c: 12 80 00 35 bne 4000bbf0 <== NOT EXECUTED 4000bb20: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 4000bb24: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000bb28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bb2c: 32 80 00 04 bne,a 4000bb3c <== NOT EXECUTED 4000bb30: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000bb34: 10 80 00 2f b 4000bbf0 <== NOT EXECUTED 4000bb38: 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) { 4000bb3c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 4000bb40: a2 24 80 01 sub %l2, %g1, %l1 <== NOT EXECUTED 4000bb44: 80 a4 40 13 cmp %l1, %l3 <== NOT EXECUTED 4000bb48: 2a bf ff da bcs,a 4000bab0 <== NOT EXECUTED 4000bb4c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 4000bb50: 84 26 80 18 sub %i2, %i0, %g2 <== NOT EXECUTED 4000bb54: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000bb58: 38 80 00 02 bgu,a 4000bb60 <== NOT EXECUTED 4000bb5c: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 4000bb60: d0 04 20 08 ld [ %l0 + 8 ], %o0 <== NOT EXECUTED 4000bb64: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 4000bb68: 40 00 2b f6 call 40016b40 <.urem> <== NOT EXECUTED 4000bb6c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000bb70: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000bb74: a4 24 80 08 sub %l2, %o0, %l2 <== NOT EXECUTED if (chunk > chunk1) { 4000bb78: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 4000bb7c: 04 80 00 0a ble 4000bba4 <== NOT EXECUTED 4000bb80: 92 06 40 18 add %i1, %i0, %o1 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 4000bb84: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000bb88: 40 00 07 e6 call 4000db20 <== NOT EXECUTED 4000bb8c: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 4000bb90: 92 04 80 18 add %l2, %i0, %o1 <== NOT EXECUTED 4000bb94: d0 04 00 00 ld [ %l0 ], %o0 <== NOT EXECUTED 4000bb98: 94 24 40 12 sub %l1, %l2, %o2 <== NOT EXECUTED 4000bb9c: 10 80 00 04 b 4000bbac <== NOT EXECUTED 4000bba0: 92 06 40 09 add %i1, %o1, %o1 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 4000bba4: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED 4000bba8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000bbac: 40 00 07 dd call 4000db20 <== NOT EXECUTED 4000bbb0: 01 00 00 00 nop <== NOT EXECUTED pipe->Length += chunk; 4000bbb4: c4 04 20 0c ld [ %l0 + 0xc ], %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000bbb8: 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; 4000bbbc: 84 00 80 11 add %g2, %l1, %g2 <== NOT EXECUTED if (pipe->waitingReaders > 0) 4000bbc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bbc4: 02 80 00 05 be 4000bbd8 <== NOT EXECUTED 4000bbc8: c4 24 20 0c st %g2, [ %l0 + 0xc ] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 4000bbcc: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 <== NOT EXECUTED 4000bbd0: 40 00 02 b0 call 4000c690 <== NOT EXECUTED 4000bbd4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED written += chunk; 4000bbd8: b0 06 00 11 add %i0, %l1, %i0 <== NOT EXECUTED 4000bbdc: 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) { 4000bbe0: 80 a6 00 1a cmp %i0, %i2 <== NOT EXECUTED 4000bbe4: 2a bf ff d6 bcs,a 4000bb3c <== NOT EXECUTED 4000bbe8: e4 04 20 04 ld [ %l0 + 4 ], %l2 <== NOT EXECUTED 4000bbec: 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); 4000bbf0: 7f ff e6 a5 call 40005684 <== NOT EXECUTED 4000bbf4: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 4000bbf8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000bbfc: 24 80 00 02 ble,a 4000bc04 <== NOT EXECUTED 4000bc00: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED return written; return ret; } 4000bc04: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc08: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40007268 : ) { /* * Update call statistics */ MSBUMP(memalign_calls, 1); 40007268: 05 10 00 94 sethi %hi(0x40025000), %g2 4000726c: 84 10 a3 18 or %g2, 0x318, %g2 ! 40025318 40007270: c6 00 a0 08 ld [ %g2 + 8 ], %g3 40007274: 86 00 e0 01 inc %g3 40007278: c6 20 a0 08 st %g3, [ %g2 + 8 ] if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 4000727c: 84 02 7f ff add %o1, -1, %g2 40007280: 80 88 80 09 btst %g2, %o1 40007284: 12 80 00 04 bne 40007294 <== NEVER TAKEN 40007288: 80 a2 60 03 cmp %o1, 3 4000728c: 18 80 00 04 bgu 4000729c 40007290: 01 00 00 00 nop /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 40007294: 81 c3 e0 08 retl 40007298: 90 10 20 16 mov 0x16, %o0 ! 16 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 4000729c: 82 13 c0 00 mov %o7, %g1 400072a0: 40 00 00 6a call 40007448 400072a4: 9e 10 40 00 mov %g1, %o7 =============================================================================== 40018e38 : ssize_t read( int fd, void *buffer, size_t count ) { 40018e38: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40018e3c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40018e40: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 4001a9e4 ssize_t read( int fd, void *buffer, size_t count ) { 40018e44: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40018e48: 80 a6 00 01 cmp %i0, %g1 40018e4c: 1a 80 00 0c bcc 40018e7c <== NEVER TAKEN 40018e50: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40018e54: 03 10 00 6c sethi %hi(0x4001b000), %g1 40018e58: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001b1ac 40018e5c: 83 2e 20 06 sll %i0, 6, %g1 40018e60: b1 2e 20 03 sll %i0, 3, %i0 40018e64: b0 06 00 01 add %i0, %g1, %i0 40018e68: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 40018e6c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40018e70: 80 88 61 00 btst 0x100, %g1 40018e74: 12 80 00 06 bne 40018e8c 40018e78: 80 a6 60 00 cmp %i1, 0 40018e7c: 7f ff d0 ed call 4000d230 <__errno> 40018e80: 01 00 00 00 nop 40018e84: 10 80 00 14 b 40018ed4 40018e88: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_buffer( buffer ); 40018e8c: 02 80 00 07 be 40018ea8 <== NEVER TAKEN 40018e90: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40018e94: 02 80 00 1c be 40018f04 <== NEVER TAKEN 40018e98: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40018e9c: 80 88 60 02 btst 2, %g1 40018ea0: 32 80 00 06 bne,a 40018eb8 <== ALWAYS TAKEN 40018ea4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40018ea8: 7f ff d0 e2 call 4000d230 <__errno> <== NOT EXECUTED 40018eac: 01 00 00 00 nop <== NOT EXECUTED 40018eb0: 10 80 00 09 b 40018ed4 <== NOT EXECUTED 40018eb4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40018eb8: c2 00 60 08 ld [ %g1 + 8 ], %g1 40018ebc: 80 a0 60 00 cmp %g1, 0 40018ec0: 12 80 00 08 bne 40018ee0 <== ALWAYS TAKEN 40018ec4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40018ec8: 7f ff d0 da call 4000d230 <__errno> <== NOT EXECUTED 40018ecc: 01 00 00 00 nop <== NOT EXECUTED 40018ed0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40018ed4: c2 22 00 00 st %g1, [ %o0 ] 40018ed8: 10 80 00 0b b 40018f04 40018edc: 90 10 3f ff mov -1, %o0 rc = (*iop->handlers->read_h)( iop, buffer, count ); 40018ee0: 9f c0 40 00 call %g1 40018ee4: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 40018ee8: 80 a2 20 00 cmp %o0, 0 40018eec: 04 80 00 06 ble 40018f04 40018ef0: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 40018ef4: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 40018ef8: 86 83 40 08 addcc %o5, %o0, %g3 40018efc: 84 43 00 02 addx %o4, %g2, %g2 40018f00: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 40018f04: 81 c7 e0 08 ret 40018f08: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40005a04 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40005a04: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40005a08: 80 a6 60 00 cmp %i1, 0 40005a0c: 12 80 00 06 bne 40005a24 <== ALWAYS TAKEN 40005a10: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 40005a14: 40 00 2f d5 call 40011968 <__errno> <== NOT EXECUTED 40005a18: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40005a1c: 10 80 00 32 b 40005ae4 <== NOT EXECUTED 40005a20: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 40005a24: 40 00 36 fe call 4001361c 40005a28: 90 10 00 18 mov %i0, %o0 40005a2c: a0 07 bf ec add %fp, -20, %l0 40005a30: 92 10 00 08 mov %o0, %o1 40005a34: 94 10 20 00 clr %o2 40005a38: 90 10 00 18 mov %i0, %o0 40005a3c: 96 10 00 10 mov %l0, %o3 40005a40: 98 10 20 00 clr %o4 40005a44: 7f ff fb 3d call 40004738 40005a48: b0 10 3f ff mov -1, %i0 0, &loc, false ); if ( result != 0 ) 40005a4c: 80 a2 20 00 cmp %o0, 0 40005a50: 12 80 00 26 bne 40005ae8 <== NEVER TAKEN 40005a54: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40005a58: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40005a5c: 80 a0 60 00 cmp %g1, 0 40005a60: 22 80 00 19 be,a 40005ac4 <== NEVER TAKEN 40005a64: 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 ){ 40005a68: 9f c0 40 00 call %g1 40005a6c: 90 10 00 10 mov %l0, %o0 40005a70: 80 a2 20 04 cmp %o0, 4 40005a74: 02 80 00 0f be 40005ab0 40005a78: c4 07 bf f8 ld [ %fp + -8 ], %g2 rtems_filesystem_freenode( &loc ); 40005a7c: 80 a0 a0 00 cmp %g2, 0 40005a80: 02 80 00 08 be 40005aa0 <== NEVER TAKEN 40005a84: 01 00 00 00 nop 40005a88: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40005a8c: 80 a0 60 00 cmp %g1, 0 40005a90: 02 80 00 04 be 40005aa0 <== NEVER TAKEN 40005a94: 01 00 00 00 nop 40005a98: 9f c0 40 00 call %g1 40005a9c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40005aa0: 40 00 2f b2 call 40011968 <__errno> 40005aa4: b0 10 3f ff mov -1, %i0 40005aa8: 10 80 00 0f b 40005ae4 40005aac: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40005ab0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 40005ab4: 80 a0 60 00 cmp %g1, 0 40005ab8: 12 80 00 0e bne 40005af0 <== ALWAYS TAKEN 40005abc: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40005ac0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40005ac4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005ac8: 02 80 00 04 be 40005ad8 <== NOT EXECUTED 40005acc: 01 00 00 00 nop <== NOT EXECUTED 40005ad0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005ad4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40005ad8: 40 00 2f a4 call 40011968 <__errno> <== NOT EXECUTED 40005adc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005ae0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40005ae4: c2 22 00 00 st %g1, [ %o0 ] 40005ae8: 81 c7 e0 08 ret 40005aec: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40005af0: 94 10 00 1a mov %i2, %o2 40005af4: 9f c0 40 00 call %g1 40005af8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40005afc: c2 07 bf f8 ld [ %fp + -8 ], %g1 40005b00: 80 a0 60 00 cmp %g1, 0 40005b04: 02 bf ff f9 be 40005ae8 <== NEVER TAKEN 40005b08: b0 10 00 08 mov %o0, %i0 40005b0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40005b10: 80 a0 60 00 cmp %g1, 0 40005b14: 02 80 00 04 be 40005b24 <== NEVER TAKEN 40005b18: 01 00 00 00 nop 40005b1c: 9f c0 40 00 call %g1 40005b20: 90 10 00 10 mov %l0, %o0 return result; } 40005b24: 81 c7 e0 08 ret 40005b28: 81 e8 00 00 restore =============================================================================== 40004340 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 40004340: 9d e3 bf a0 save %sp, -96, %sp int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 40004344: 03 10 00 7d sethi %hi(0x4001f400), %g1 40004348: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 4001f564 4000434c: 80 a6 00 01 cmp %i0, %g1 40004350: 1a 80 00 0c bcc 40004380 <== NEVER TAKEN 40004354: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 40004358: 03 10 00 81 sethi %hi(0x40020400), %g1 4000435c: e4 00 61 04 ld [ %g1 + 0x104 ], %l2 ! 40020504 40004360: 83 2e 20 06 sll %i0, 6, %g1 40004364: b1 2e 20 03 sll %i0, 3, %i0 40004368: b0 06 00 01 add %i0, %g1, %i0 4000436c: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 40004370: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 40004374: 80 88 61 00 btst 0x100, %g1 40004378: 12 80 00 06 bne 40004390 <== ALWAYS TAKEN 4000437c: 80 88 60 02 btst 2, %g1 40004380: 40 00 2d 72 call 4000f948 <__errno> <== NOT EXECUTED 40004384: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004388: 10 80 00 1d b 400043fc <== NOT EXECUTED 4000438c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40004390: 02 80 00 18 be 400043f0 <== NEVER TAKEN 40004394: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 40004398: 02 80 00 16 be 400043f0 4000439c: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 400043a0: 04 80 00 14 ble 400043f0 400043a4: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 400043a8: 14 80 00 12 bg 400043f0 <== NEVER TAKEN 400043ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 400043b0: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400043b4: c2 00 60 08 ld [ %g1 + 8 ], %g1 400043b8: 80 a0 60 00 cmp %g1, 0 400043bc: 12 80 00 06 bne 400043d4 <== ALWAYS TAKEN 400043c0: 88 10 20 00 clr %g4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 400043c4: 40 00 2d 61 call 4000f948 <__errno> <== NOT EXECUTED 400043c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400043cc: 10 80 00 0c b 400043fc <== NOT EXECUTED 400043d0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400043d4: 82 10 00 19 mov %i1, %g1 400043d8: 86 10 20 00 clr %g3 400043dc: 84 10 20 01 mov 1, %g2 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 400043e0: da 00 40 00 ld [ %g1 ], %o5 400043e4: 80 a3 60 00 cmp %o5, 0 400043e8: 12 80 00 08 bne 40004408 400043ec: 88 01 20 01 inc %g4 rtems_set_errno_and_return_minus_one( EINVAL ); 400043f0: 40 00 2d 56 call 4000f948 <__errno> 400043f4: b0 10 3f ff mov -1, %i0 400043f8: 82 10 20 16 mov 0x16, %g1 400043fc: c2 22 00 00 st %g1, [ %o0 ] 40004400: 81 c7 e0 08 ret 40004404: 81 e8 00 00 restore if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 40004408: d8 00 60 04 ld [ %g1 + 4 ], %o4 4000440c: 9a 00 c0 0c add %g3, %o4, %o5 if ( total < old ) 40004410: 80 a3 40 03 cmp %o5, %g3 40004414: 06 bf ff f7 bl 400043f0 40004418: 82 00 60 08 add %g1, 8, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 4000441c: 80 a0 00 0c cmp %g0, %o4 40004420: 86 40 3f ff addx %g0, -1, %g3 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 40004424: 80 a1 00 1a cmp %g4, %i2 40004428: 16 80 00 04 bge 40004438 4000442c: 84 08 80 03 and %g2, %g3, %g2 40004430: 10 bf ff ec b 400043e0 40004434: 86 10 00 0d mov %o5, %g3 /* * A readv with all zeros logically has no effect. Even though * OpenGroup didn't address this case as they did with writev(), * we will handle it the same way for symmetry. */ if ( all_zeros == true ) { 40004438: 80 88 a0 ff btst 0xff, %g2 4000443c: a6 10 20 00 clr %l3 40004440: 12 bf ff f0 bne 40004400 40004444: 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 ); 40004448: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 4000444c: d2 06 40 00 ld [ %i1 ], %o1 40004450: c2 00 60 08 ld [ %g1 + 8 ], %g1 40004454: d4 06 60 04 ld [ %i1 + 4 ], %o2 40004458: 9f c0 40 00 call %g1 4000445c: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 40004460: 80 a2 20 00 cmp %o0, 0 40004464: 16 80 00 04 bge 40004474 <== ALWAYS TAKEN 40004468: 01 00 00 00 nop 4000446c: 81 c7 e0 08 ret <== NOT EXECUTED 40004470: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 40004474: 02 80 00 07 be 40004490 <== NEVER TAKEN 40004478: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 4000447c: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 40004480: 86 80 c0 08 addcc %g3, %o0, %g3 total += bytes; 40004484: b0 06 00 08 add %i0, %o0, %i0 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 40004488: 84 40 80 10 addx %g2, %l0, %g2 4000448c: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] total += bytes; } if (bytes != iov[ v ].iov_len) 40004490: c2 06 60 04 ld [ %i1 + 4 ], %g1 40004494: 80 a2 00 01 cmp %o0, %g1 40004498: 12 bf ff da bne 40004400 <== NEVER TAKEN 4000449c: a6 04 e0 01 inc %l3 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 400044a0: 80 a4 c0 1a cmp %l3, %i2 400044a4: 06 bf ff e9 bl 40004448 400044a8: b2 06 60 08 add %i1, 8, %i1 if (bytes != iov[ v ].iov_len) break; } return total; } 400044ac: 81 c7 e0 08 ret 400044b0: 81 e8 00 00 restore =============================================================================== 40018f90 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40018f90: 9d e3 bf 98 save %sp, -104, %sp 40018f94: 03 10 00 6c sethi %hi(0x4001b000), %g1 40018f98: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 40018f9c: 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())) { 40018fa0: 05 10 00 6d sethi %hi(0x4001b400), %g2 40018fa4: c4 00 a1 20 ld [ %g2 + 0x120 ], %g2 ! 4001b520 <_System_state_Current> { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 40018fa8: 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())) { 40018fac: 80 a0 a0 03 cmp %g2, 3 40018fb0: 12 80 00 0c bne 40018fe0 <== NEVER TAKEN 40018fb4: c6 20 60 10 st %g3, [ %g1 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 40018fb8: 03 10 00 6c sethi %hi(0x4001b000), %g1 40018fbc: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 4001b380 <_Thread_Dispatch_disable_level> 40018fc0: 80 a0 60 00 cmp %g1, 0 40018fc4: 32 80 00 13 bne,a 40019010 <== NEVER TAKEN 40018fc8: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 40018fcc: 03 10 00 6d sethi %hi(0x4001b400), %g1 40018fd0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 ! 4001b418 <_ISR_Nest_level> 40018fd4: 80 a0 60 00 cmp %g1, 0 40018fd8: 32 80 00 0e bne,a 40019010 <== NEVER TAKEN 40018fdc: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 40018fe0: 80 a6 20 00 cmp %i0, 0 40018fe4: 12 80 00 06 bne 40018ffc 40018fe8: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 40018fec: 7f ff c5 8a call 4000a614 40018ff0: 90 10 00 19 mov %i1, %o0 40018ff4: 81 c7 e0 08 ret 40018ff8: 91 e8 00 08 restore %g0, %o0, %o0 if ( !size ) { 40018ffc: 12 80 00 07 bne 40019018 <== ALWAYS TAKEN 40019000: 21 10 00 6a sethi %hi(0x4001a800), %l0 free( ptr ); 40019004: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019008: 7f ff c4 29 call 4000a0ac <== NOT EXECUTED 4001900c: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; 40019010: 81 c7 e0 08 ret <== NOT EXECUTED 40019014: 81 e8 00 00 restore <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 40019018: d0 04 21 f0 ld [ %l0 + 0x1f0 ], %o0 4001901c: 92 10 00 18 mov %i0, %o1 40019020: 40 00 00 60 call 400191a0 <_Protected_heap_Get_block_size> 40019024: 94 07 bf fc add %fp, -4, %o2 40019028: 80 8a 20 ff btst 0xff, %o0 4001902c: 12 80 00 08 bne 4001904c 40019030: d0 04 21 f0 ld [ %l0 + 0x1f0 ], %o0 errno = EINVAL; 40019034: 7f ff d0 7f call 4000d230 <__errno> 40019038: b0 10 20 00 clr %i0 4001903c: 82 10 20 16 mov 0x16, %g1 40019040: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 40019044: 81 c7 e0 08 ret 40019048: 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 ) ) { 4001904c: 92 10 00 18 mov %i0, %o1 40019050: 40 00 00 61 call 400191d4 <_Protected_heap_Resize_block> 40019054: 94 10 00 19 mov %i1, %o2 40019058: 80 8a 20 ff btst 0xff, %o0 4001905c: 12 80 00 1a bne 400190c4 40019060: 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 ); 40019064: 7f ff c5 6c call 4000a614 40019068: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001906c: 03 10 00 6c sethi %hi(0x4001b000), %g1 40019070: 82 10 61 b8 or %g1, 0x1b8, %g1 ! 4001b1b8 40019074: 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 ); 40019078: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 4001907c: 84 00 bf ff add %g2, -1, %g2 if ( !new_area ) { 40019080: 80 a2 20 00 cmp %o0, 0 40019084: 02 80 00 0f be 400190c0 40019088: c4 20 60 04 st %g2, [ %g1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001908c: c2 07 bf fc ld [ %fp + -4 ], %g1 40019090: 80 a6 40 01 cmp %i1, %g1 40019094: 08 80 00 03 bleu 400190a0 <== NEVER TAKEN 40019098: 94 10 00 19 mov %i1, %o2 4001909c: 94 10 00 01 mov %g1, %o2 400190a0: 92 10 00 18 mov %i0, %o1 400190a4: 7f ff d2 9f call 4000db20 400190a8: 90 10 00 10 mov %l0, %o0 free( ptr ); 400190ac: 90 10 00 18 mov %i0, %o0 400190b0: 7f ff c3 ff call 4000a0ac 400190b4: b0 10 00 10 mov %l0, %i0 return new_area; 400190b8: 81 c7 e0 08 ret 400190bc: 81 e8 00 00 restore 400190c0: b0 10 20 00 clr %i0 } 400190c4: 81 c7 e0 08 ret 400190c8: 81 e8 00 00 restore =============================================================================== 40006ba0 : #include int rmdir( const char *pathname ) { 40006ba0: 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 ); 40006ba4: 7f ff f9 97 call 40005200 40006ba8: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 40006bac: a6 92 20 00 orcc %o0, 0, %l3 40006bb0: 32 80 00 18 bne,a 40006c10 40006bb4: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 40006bb8: c2 4e 00 00 ldsb [ %i0 ], %g1 40006bbc: 80 a0 60 5c cmp %g1, 0x5c 40006bc0: 22 80 00 08 be,a 40006be0 <== NEVER TAKEN 40006bc4: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 40006bc8: 80 a0 60 2f cmp %g1, 0x2f 40006bcc: 22 80 00 05 be,a 40006be0 <== ALWAYS TAKEN 40006bd0: 03 10 00 98 sethi %hi(0x40026000), %g1 40006bd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006bd8: 12 80 00 06 bne 40006bf0 <== NOT EXECUTED 40006bdc: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 40006be0: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 ! 40026398 40006be4: 90 07 bf ec add %fp, -20, %o0 40006be8: 10 80 00 05 b 40006bfc 40006bec: 92 02 60 18 add %o1, 0x18, %o1 40006bf0: d2 00 63 98 ld [ %g1 + 0x398 ], %o1 <== NOT EXECUTED 40006bf4: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED 40006bf8: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED 40006bfc: 94 10 20 14 mov 0x14, %o2 40006c00: 40 00 34 e6 call 40013f98 40006c04: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40006c08: 10 80 00 0b b 40006c34 40006c0c: 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, 40006c10: 92 10 00 13 mov %l3, %o1 40006c14: 94 10 20 02 mov 2, %o2 40006c18: 96 07 bf ec add %fp, -20, %o3 40006c1c: 7f ff f9 c7 call 40005338 40006c20: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 40006c24: 80 a2 20 00 cmp %o0, 0 40006c28: 12 80 00 89 bne 40006e4c <== NEVER TAKEN 40006c2c: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 40006c30: 94 10 20 14 mov 0x14, %o2 40006c34: a0 07 bf d8 add %fp, -40, %l0 40006c38: a4 07 bf ec add %fp, -20, %l2 40006c3c: 90 10 00 10 mov %l0, %o0 40006c40: 40 00 34 d6 call 40013f98 40006c44: 92 10 00 12 mov %l2, %o1 name = pathname + parentpathlen; 40006c48: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 40006c4c: 40 00 3b 1c call 400158bc 40006c50: 90 10 00 18 mov %i0, %o0 40006c54: 92 10 00 08 mov %o0, %o1 40006c58: 7f ff f9 59 call 400051bc 40006c5c: 90 10 00 18 mov %i0, %o0 40006c60: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 40006c64: 40 00 3b 16 call 400158bc 40006c68: 90 10 00 18 mov %i0, %o0 40006c6c: 94 10 20 00 clr %o2 40006c70: 92 10 00 08 mov %o0, %o1 40006c74: 96 10 00 10 mov %l0, %o3 40006c78: 90 10 00 18 mov %i0, %o0 40006c7c: 7f ff f9 73 call 40005248 40006c80: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 40006c84: 80 a2 20 00 cmp %o0, 0 40006c88: 02 80 00 11 be 40006ccc 40006c8c: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 40006c90: 80 8c 60 ff btst 0xff, %l1 40006c94: 02 80 00 0c be 40006cc4 <== ALWAYS TAKEN 40006c98: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 40006c9c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40006ca0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006ca4: 02 80 00 6b be 40006e50 <== NOT EXECUTED 40006ca8: 01 00 00 00 nop <== NOT EXECUTED 40006cac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006cb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006cb4: 02 80 00 04 be 40006cc4 <== NOT EXECUTED 40006cb8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40006cbc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006cc0: 01 00 00 00 nop <== NOT EXECUTED 40006cc4: 81 c7 e0 08 ret 40006cc8: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40006ccc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40006cd0: 80 a0 60 00 cmp %g1, 0 40006cd4: 12 80 00 04 bne 40006ce4 <== ALWAYS TAKEN 40006cd8: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40006cdc: 10 80 00 2b b 40006d88 <== NOT EXECUTED 40006ce0: 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 ){ 40006ce4: 9f c0 40 00 call %g1 40006ce8: 90 10 00 10 mov %l0, %o0 40006cec: 80 a2 20 01 cmp %o0, 1 40006cf0: 02 80 00 1d be 40006d64 40006cf4: c2 07 bf e0 ld [ %fp + -32 ], %g1 rtems_filesystem_freenode( &loc ); 40006cf8: c2 07 bf e4 ld [ %fp + -28 ], %g1 40006cfc: 80 a0 60 00 cmp %g1, 0 40006d00: 02 80 00 09 be 40006d24 <== NEVER TAKEN 40006d04: 80 8c 60 ff btst 0xff, %l1 40006d08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d0c: 80 a0 60 00 cmp %g1, 0 40006d10: 02 80 00 05 be 40006d24 <== NEVER TAKEN 40006d14: 80 8c 60 ff btst 0xff, %l1 40006d18: 9f c0 40 00 call %g1 40006d1c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40006d20: 80 8c 60 ff btst 0xff, %l1 40006d24: 02 80 00 0c be 40006d54 <== NEVER TAKEN 40006d28: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 40006d2c: c2 07 bf f8 ld [ %fp + -8 ], %g1 40006d30: 80 a0 60 00 cmp %g1, 0 40006d34: 02 80 00 08 be 40006d54 <== NEVER TAKEN 40006d38: 01 00 00 00 nop 40006d3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006d40: 80 a0 60 00 cmp %g1, 0 40006d44: 02 80 00 04 be 40006d54 <== NEVER TAKEN 40006d48: 01 00 00 00 nop 40006d4c: 9f c0 40 00 call %g1 40006d50: 90 07 bf ec add %fp, -20, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40006d54: 40 00 2e 07 call 40012570 <__errno> 40006d58: b0 10 3f ff mov -1, %i0 40006d5c: 10 80 00 1f b 40006dd8 40006d60: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40006d64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40006d68: 80 a0 60 00 cmp %g1, 0 40006d6c: 12 80 00 1e bne 40006de4 <== ALWAYS TAKEN 40006d70: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 40006d74: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED 40006d78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006d7c: 02 80 00 09 be 40006da0 <== NOT EXECUTED 40006d80: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40006d84: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006d88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006d8c: 02 80 00 05 be 40006da0 <== NOT EXECUTED 40006d90: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40006d94: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006d98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 40006d9c: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 40006da0: 02 80 00 0b be 40006dcc <== NOT EXECUTED 40006da4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 40006da8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dac: 02 80 00 08 be 40006dcc <== NOT EXECUTED 40006db0: 01 00 00 00 nop <== NOT EXECUTED 40006db4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006dbc: 02 80 00 04 be 40006dcc <== NOT EXECUTED 40006dc0: 01 00 00 00 nop <== NOT EXECUTED 40006dc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006dc8: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006dcc: 40 00 2d e9 call 40012570 <__errno> <== NOT EXECUTED 40006dd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006dd4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006dd8: c2 22 00 00 st %g1, [ %o0 ] 40006ddc: 81 c7 e0 08 ret 40006de0: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 40006de4: 9f c0 40 00 call %g1 40006de8: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 40006dec: c2 07 bf e4 ld [ %fp + -28 ], %g1 40006df0: 80 a0 60 00 cmp %g1, 0 40006df4: 02 80 00 08 be 40006e14 <== NEVER TAKEN 40006df8: b0 10 00 08 mov %o0, %i0 40006dfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006e00: 80 a0 60 00 cmp %g1, 0 40006e04: 02 80 00 05 be 40006e18 <== NEVER TAKEN 40006e08: 80 8c 60 ff btst 0xff, %l1 40006e0c: 9f c0 40 00 call %g1 40006e10: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 40006e14: 80 8c 60 ff btst 0xff, %l1 40006e18: 02 bf ff ab be 40006cc4 40006e1c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 40006e20: 80 a0 60 00 cmp %g1, 0 40006e24: 02 80 00 0b be 40006e50 <== NEVER TAKEN 40006e28: 01 00 00 00 nop 40006e2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006e30: 80 a0 60 00 cmp %g1, 0 40006e34: 02 80 00 07 be 40006e50 <== NEVER TAKEN 40006e38: 01 00 00 00 nop 40006e3c: 9f c0 40 00 call %g1 40006e40: 90 07 bf ec add %fp, -20, %o0 40006e44: 81 c7 e0 08 ret 40006e48: 81 e8 00 00 restore 40006e4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 40006e50: 81 c7 e0 08 ret <== NOT EXECUTED 40006e54: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40013d1c : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 40013d1c: 11 10 00 98 sethi %hi(0x40026000), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40013d20: 81 c3 e0 08 retl <== NOT EXECUTED 40013d24: 90 12 22 68 or %o0, 0x268, %o0 ! 40026268 <== NOT EXECUTED =============================================================================== 40010cec : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40010cec: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40010cf0: 90 10 00 18 mov %i0, %o0 40010cf4: 40 00 00 0b call 40010d20 40010cf8: 92 10 00 19 mov %i1, %o1 if (nap) 40010cfc: 80 a2 20 00 cmp %o0, 0 40010d00: 02 80 00 05 be 40010d14 <== NEVER TAKEN 40010d04: 01 00 00 00 nop return nap->name; return rtems_assoc_name_bad(local_value); } 40010d08: f0 02 00 00 ld [ %o0 ], %i0 40010d0c: 81 c7 e0 08 ret 40010d10: 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); 40010d14: 40 00 0c 02 call 40013d1c <== NOT EXECUTED 40010d18: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED =============================================================================== 4000d1b0 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000d1b0: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000d1b4: d0 06 00 00 ld [ %i0 ], %o0 4000d1b8: 80 a2 20 00 cmp %o0, 0 4000d1bc: 02 80 00 0e be 4000d1f4 <== NEVER TAKEN 4000d1c0: 82 10 20 00 clr %g1 4000d1c4: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000d1c8: 40 00 03 81 call 4000dfcc 4000d1cc: 92 12 62 40 or %o1, 0x240, %o1 ! 4001a240 4000d1d0: 80 a2 20 00 cmp %o0, 0 4000d1d4: 02 80 00 07 be 4000d1f0 <== NEVER TAKEN 4000d1d8: 82 10 00 18 mov %i0, %g1 default_ap = ap++; 4000d1dc: 10 80 00 06 b 4000d1f4 4000d1e0: 82 10 20 00 clr %g1 for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000d1e4: 80 a0 80 19 cmp %g2, %i1 4000d1e8: 02 80 00 08 be 4000d208 4000d1ec: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000d1f0: b0 06 20 0c add %i0, 0xc, %i0 4000d1f4: c4 06 00 00 ld [ %i0 ], %g2 4000d1f8: 80 a0 a0 00 cmp %g2, 0 4000d1fc: 32 bf ff fa bne,a 4000d1e4 4000d200: c4 06 20 04 ld [ %i0 + 4 ], %g2 4000d204: b0 10 00 01 mov %g1, %i0 if (ap->local_value == local_value) return ap; return default_ap; } 4000d208: 81 c7 e0 08 ret 4000d20c: 81 e8 00 00 restore =============================================================================== 4000c510 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000c510: 9d e3 bf a0 save %sp, -96, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000c514: d0 06 00 00 ld [ %i0 ], %o0 4000c518: 80 a2 20 00 cmp %o0, 0 4000c51c: 02 80 00 0e be 4000c554 <== NEVER TAKEN 4000c520: 82 10 20 00 clr %g1 4000c524: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000c528: 40 00 06 a9 call 4000dfcc 4000c52c: 92 12 61 08 or %o1, 0x108, %o1 ! 4001a108 <__FUNCTION__.5895+0x18> 4000c530: 80 a2 20 00 cmp %o0, 0 4000c534: 02 80 00 07 be 4000c550 <== NEVER TAKEN 4000c538: 82 10 00 18 mov %i0, %g1 default_ap = ap++; 4000c53c: 10 80 00 06 b 4000c554 4000c540: 82 10 20 00 clr %g1 for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000c544: 80 a0 80 19 cmp %g2, %i1 4000c548: 02 80 00 08 be 4000c568 4000c54c: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000c550: b0 06 20 0c add %i0, 0xc, %i0 4000c554: c4 06 00 00 ld [ %i0 ], %g2 4000c558: 80 a0 a0 00 cmp %g2, 0 4000c55c: 32 bf ff fa bne,a 4000c544 4000c560: c4 06 20 08 ld [ %i0 + 8 ], %g2 4000c564: b0 10 00 01 mov %g1, %i0 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000c568: 81 c7 e0 08 ret 4000c56c: 81 e8 00 00 restore =============================================================================== 4000cea4 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000cea4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000cea8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ceac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ceb0: 40 00 00 c0 call 4000d1b0 <== NOT EXECUTED 4000ceb4: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000ceb8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cebc: 32 80 00 02 bne,a 4000cec4 <== NOT EXECUTED 4000cec0: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000cec4: 81 c7 e0 08 ret <== NOT EXECUTED 4000cec8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40002108 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 40002108: 9d e3 bf a0 save %sp, -96, %sp const char *p; if ( !name ) 4000210c: 90 96 20 00 orcc %i0, 0, %o0 40002110: 22 80 00 26 be,a 400021a8 40002114: b2 10 20 00 clr %i1 return NULL; if ( !value ) 40002118: 80 a6 60 00 cmp %i1, 0 4000211c: 22 80 00 24 be,a 400021ac 40002120: b0 10 00 19 mov %i1, %i0 return NULL; if ( !length ) 40002124: 80 a6 a0 00 cmp %i2, 0 40002128: 22 80 00 20 be,a 400021a8 4000212c: b2 10 20 00 clr %i1 return NULL; value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); 40002130: 40 00 00 21 call 400021b4 40002134: c0 2e 40 00 clrb [ %i1 ] if ( !p ) 40002138: 80 a2 20 00 cmp %o0, 0 4000213c: 02 80 00 1a be 400021a4 40002140: b4 06 bf ff add %i2, -1, %i2 40002144: 84 10 20 00 clr %g2 40002148: 10 80 00 0e b 40002180 4000214c: 82 10 20 00 clr %g1 int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 40002154: 80 88 a0 01 btst 1, %g2 quotes++; 40002158: 10 80 00 07 b 40002174 4000215c: 84 00 a0 01 inc %g2 } else if ( ((quotes % 2) == 0) && *p == ' ' ) 40002160: 32 80 00 06 bne,a 40002178 40002164: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] 40002168: 80 a0 e0 20 cmp %g3, 0x20 4000216c: 02 80 00 10 be 400021ac 40002170: b0 10 00 19 mov %i1, %i0 break; value[i++] = *p++; 40002174: c8 2e 40 01 stb %g4, [ %i1 + %g1 ] 40002178: 82 00 60 01 inc %g1 value[i] = '\0'; 4000217c: c0 2e 40 01 clrb [ %i1 + %g1 ] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 4000218c: c8 0a 00 01 ldub [ %o0 + %g1 ], %g4 40002190: 80 a0 40 1a cmp %g1, %i2 40002194: 0a bf ff ef bcs 40002150 <== ALWAYS TAKEN 40002198: 80 a0 e0 22 cmp %g3, 0x22 return NULL; copy_string( p, value, length ); return value; } 4000219c: 81 c7 e0 08 ret <== NOT EXECUTED 400021a0: 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 ) { 400021e4: 9d e3 bf a0 save %sp, -96, %sp const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 400021e8: 94 10 00 1a mov %i2, %o2 400021ec: 90 10 00 18 mov %i0, %o0 400021f0: 7f ff ff c6 call 40002108 400021f4: 92 10 00 19 mov %i1, %o1 if ( !p ) 400021f8: a2 92 20 00 orcc %o0, 0, %l1 400021fc: 22 80 00 1e be,a 40002274 40002200: b2 10 20 00 clr %i1 return NULL; rhs = &p[strlen(name)]; 40002204: 40 00 30 0f call 4000e240 40002208: 90 10 00 18 mov %i0, %o0 if ( *rhs != '=' ) 4000220c: c2 4c 40 08 ldsb [ %l1 + %o0 ], %g1 40002210: 80 a0 60 3d cmp %g1, 0x3d 40002214: 12 80 00 17 bne 40002270 <== NEVER TAKEN 40002218: a2 04 40 08 add %l1, %o0, %l1 return NULL; rhs++; if ( *rhs == '\"' ) 4000221c: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1 40002220: 80 a0 60 22 cmp %g1, 0x22 40002224: 12 80 00 03 bne 40002230 40002228: 84 04 60 01 add %l1, 1, %g2 rhs++; 4000222c: 84 04 60 02 add %l1, 2, %g2 40002230: 10 80 00 05 b 40002244 40002234: 82 10 00 19 mov %i1, %g1 for ( d=value ; *rhs ; ) *d++ = *rhs++; 40002238: c8 28 40 00 stb %g4, [ %g1 ] 4000223c: 84 00 a0 01 inc %g2 40002240: 82 00 60 01 inc %g1 return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 40002244: c6 48 80 00 ldsb [ %g2 ], %g3 40002248: 80 a0 e0 00 cmp %g3, 0 4000224c: 12 bf ff fb bne 40002238 40002250: c8 08 80 00 ldub [ %g2 ], %g4 *d++ = *rhs++; if ( *(d-1) == '\"' ) 40002254: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 40002258: 80 a0 e0 22 cmp %g3, 0x22 4000225c: 12 80 00 03 bne 40002268 40002260: 84 00 7f ff add %g1, -1, %g2 40002264: 82 10 00 02 mov %g2, %g1 d--; *d = '\0'; return value; 40002268: 10 80 00 03 b 40002274 4000226c: c0 28 40 00 clrb [ %g1 ] 40002270: b2 10 20 00 clr %i1 <== NOT EXECUTED } 40002274: 81 c7 e0 08 ret 40002278: 91 e8 00 19 restore %g0, %i1, %o0 =============================================================================== 40002c60 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002c60: 9d e3 bf 60 save %sp, -160, %sp Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40002c64: 80 a6 60 00 cmp %i1, 0 40002c68: 02 80 00 69 be 40002e0c <== NEVER TAKEN 40002c6c: 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 ); 40002c70: 40 00 14 60 call 40007df0 <_TOD_Get_uptime> 40002c74: 90 10 00 17 mov %l7, %o0 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40002c78: 92 10 00 17 mov %l7, %o1 40002c7c: ba 07 bf e8 add %fp, -24, %i5 40002c80: 11 10 00 a6 sethi %hi(0x40029800), %o0 40002c84: 94 10 00 1d mov %i5, %o2 40002c88: 40 00 1e 45 call 4000a59c <_Timespec_Subtract> 40002c8c: 90 12 23 8c or %o0, 0x38c, %o0 } } } #endif (*print)( 40002c90: 90 10 00 18 mov %i0, %o0 40002c94: 13 10 00 7c sethi %hi(0x4001f000), %o1 40002c98: 21 10 00 a6 sethi %hi(0x40029800), %l0 40002c9c: 92 12 62 a0 or %o1, 0x2a0, %o1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002ca0: 39 10 00 7d sethi %hi(0x4001f400), %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 ) { 40002ca4: 2d 10 00 a6 sethi %hi(0x40029800), %l6 /* * Print the information */ (*print)( context, 40002ca8: 37 10 00 7d sethi %hi(0x4001f400), %i3 } } } #endif (*print)( 40002cac: 9f c6 40 00 call %i1 40002cb0: 35 10 00 a6 sethi %hi(0x40029800), %i2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002cb4: a8 07 bf c8 add %fp, -56, %l4 } } } #endif (*print)( 40002cb8: a0 14 20 34 or %l0, 0x34, %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40002cbc: b8 17 20 18 or %i4, 0x18, %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 ) { 40002cc0: ac 15 a1 8c or %l6, 0x18c, %l6 /* * Print the information */ (*print)( context, 40002cc4: b6 16 e0 30 or %i3, 0x30, %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( 40002cc8: b4 16 a1 94 or %i2, 0x194, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40002ccc: 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 ] ) 40002cd0: c2 04 00 00 ld [ %l0 ], %g1 40002cd4: 80 a0 60 00 cmp %g1, 0 40002cd8: 22 80 00 3f be,a 40002dd4 40002cdc: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002ce0: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 40002ce4: a2 10 20 01 mov 1, %l1 40002ce8: 80 a4 a0 00 cmp %l2, 0 40002cec: 12 80 00 33 bne 40002db8 <== ALWAYS TAKEN 40002cf0: aa 07 bf d8 add %fp, -40, %l5 for ( i=1 ; i <= information->maximum ; i++ ) { 40002cf4: 10 80 00 38 b 40002dd4 <== NOT EXECUTED 40002cf8: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40002cfc: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 40002d00: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !the_thread ) 40002d04: 80 a0 60 00 cmp %g1, 0 40002d08: 02 80 00 2c be 40002db8 <== NEVER TAKEN 40002d0c: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002d10: d0 00 60 08 ld [ %g1 + 8 ], %o0 40002d14: 40 00 0f 66 call 40006aac 40002d18: c2 27 bf c4 st %g1, [ %fp + -60 ] (*print)( 40002d1c: c2 07 bf c4 ld [ %fp + -60 ], %g1 40002d20: 90 10 00 18 mov %i0, %o0 40002d24: d4 00 60 08 ld [ %g1 + 8 ], %o2 40002d28: 92 10 00 1c mov %i4, %o1 40002d2c: 9f c6 40 00 call %i1 40002d30: 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; 40002d34: c2 07 bf c4 ld [ %fp + -60 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002d38: 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; 40002d3c: c6 00 60 84 ld [ %g1 + 0x84 ], %g3 40002d40: c6 27 bf e0 st %g3, [ %fp + -32 ] 40002d44: c6 00 60 88 ld [ %g1 + 0x88 ], %g3 40002d48: c6 27 bf e4 st %g3, [ %fp + -28 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002d4c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40002d50: c2 00 60 08 ld [ %g1 + 8 ], %g1 40002d54: 80 a0 80 01 cmp %g2, %g1 40002d58: 12 80 00 0a bne 40002d80 40002d5c: 94 07 bf fc add %fp, -4, %o2 Timestamp_Control used; _Timestamp_Subtract( 40002d60: 90 10 00 1a mov %i2, %o0 40002d64: 92 10 00 17 mov %l7, %o1 40002d68: 40 00 1e 0d call 4000a59c <_Timespec_Subtract> 40002d6c: 94 10 00 15 mov %l5, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 40002d70: 90 10 00 13 mov %l3, %o0 40002d74: 40 00 1d 5e call 4000a2ec <_Timespec_Add_to> 40002d78: 92 10 00 15 mov %l5, %o1 }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 40002d7c: 94 07 bf fc add %fp, -4, %o2 40002d80: 96 07 bf f8 add %fp, -8, %o3 40002d84: 90 10 00 13 mov %l3, %o0 40002d88: 40 00 1d 73 call 4000a354 <_Timespec_Divide> 40002d8c: 92 10 00 1d mov %i5, %o1 /* * Print the information */ (*print)( context, 40002d90: d0 07 bf e4 ld [ %fp + -28 ], %o0 40002d94: 40 00 63 d3 call 4001bce0 <.udiv> 40002d98: 92 10 23 e8 mov 0x3e8, %o1 40002d9c: d4 07 bf e0 ld [ %fp + -32 ], %o2 40002da0: d8 07 bf fc ld [ %fp + -4 ], %o4 40002da4: da 07 bf f8 ld [ %fp + -8 ], %o5 40002da8: 96 10 00 08 mov %o0, %o3 40002dac: 92 10 00 1b mov %i3, %o1 40002db0: 9f c6 40 00 call %i1 40002db4: 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++ ) { 40002db8: 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 ); 40002dbc: 94 10 00 14 mov %l4, %o2 40002dc0: 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++ ) { 40002dc4: 80 a4 40 01 cmp %l1, %g1 40002dc8: 08 bf ff cd bleu 40002cfc 40002dcc: 85 2c 60 02 sll %l1, 2, %g2 40002dd0: a0 04 20 04 add %l0, 4, %l0 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 40002dd4: 03 10 00 a6 sethi %hi(0x40029800), %g1 40002dd8: 82 10 60 44 or %g1, 0x44, %g1 ! 40029844 <_Objects_Information_table+0x14> 40002ddc: 80 a4 00 01 cmp %l0, %g1 40002de0: 32 bf ff bd bne,a 40002cd4 40002de4: c2 04 00 00 ld [ %l0 ], %g1 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 40002de8: d0 07 bf ec ld [ %fp + -20 ], %o0 40002dec: 40 00 63 bd call 4001bce0 <.udiv> 40002df0: 92 10 23 e8 mov 0x3e8, %o1 40002df4: d4 07 bf e8 ld [ %fp + -24 ], %o2 40002df8: 96 10 00 08 mov %o0, %o3 40002dfc: 13 10 00 7d sethi %hi(0x4001f400), %o1 40002e00: 90 10 00 18 mov %i0, %o0 40002e04: 9f c6 40 00 call %i1 40002e08: 92 12 60 48 or %o1, 0x48, %o1 40002e0c: 81 c7 e0 08 ret 40002e10: 81 e8 00 00 restore =============================================================================== 4000ce70 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 4000ce70: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000ce74: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED 4000ce78: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ce7c: 40 00 00 0a call 4000cea4 <== NOT EXECUTED 4000ce80: 90 12 21 b8 or %o0, 0x1b8, %o0 <== NOT EXECUTED 4000ce84: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000ce88: 02 80 00 05 be 4000ce9c <== NOT EXECUTED 4000ce8c: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000ce90: 40 00 00 e8 call 4000d230 <__errno> <== NOT EXECUTED 4000ce94: 01 00 00 00 nop <== NOT EXECUTED 4000ce98: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000ce9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000cea0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40007534 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 40007534: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40007538: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 4000753c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007540: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007544: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40007548: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 4000754c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40007550: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40007554: 7f ff ff 7d call 40007348 <== NOT EXECUTED 40007558: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 4000755c: 81 c7 e0 08 ret <== NOT EXECUTED 40007560: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 40001f9c : } int rtems_filesystem_dirname( const char *pathname ) { 40001f9c: 9d e3 bf a0 save %sp, -96, %sp int len = strlen( pathname ); 40001fa0: 40 00 30 5c call 4000e110 40001fa4: 90 10 00 18 mov %i0, %o0 while ( len ) { 40001fa8: 10 80 00 0a b 40001fd0 40001fac: b0 06 00 08 add %i0, %o0, %i0 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 40001fb0: 80 a0 60 5c cmp %g1, 0x5c 40001fb4: 02 80 00 0a be 40001fdc <== NEVER TAKEN 40001fb8: 90 02 3f ff add %o0, -1, %o0 40001fbc: 80 a0 60 2f cmp %g1, 0x2f 40001fc0: 02 80 00 07 be 40001fdc 40001fc4: 80 a0 60 00 cmp %g1, 0 40001fc8: 02 80 00 05 be 40001fdc <== NEVER TAKEN 40001fcc: b0 06 3f ff add %i0, -1, %i0 const char *pathname ) { int len = strlen( pathname ); while ( len ) { 40001fd0: 80 a2 20 00 cmp %o0, 0 40001fd4: 32 bf ff f7 bne,a 40001fb0 40001fd8: c2 4e 3f ff ldsb [ %i0 + -1 ], %g1 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 40001fdc: 81 c7 e0 08 ret 40001fe0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 400020d4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400020d4: 9d e3 bf a0 save %sp, -96, %sp /* * Verify Input parameters. */ if ( !pathname ) 400020d8: 80 a6 20 00 cmp %i0, 0 400020dc: 12 80 00 06 bne 400020f4 <== ALWAYS TAKEN 400020e0: 80 a6 e0 00 cmp %i3, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 400020e4: 40 00 2c 53 call 4000d230 <__errno> <== NOT EXECUTED 400020e8: 01 00 00 00 nop <== NOT EXECUTED 400020ec: 10 80 00 07 b 40002108 <== NOT EXECUTED 400020f0: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED if ( !pathloc ) 400020f4: 32 80 00 08 bne,a 40002114 <== ALWAYS TAKEN 400020f8: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400020fc: 40 00 2c 4d call 4000d230 <__errno> <== NOT EXECUTED 40002100: 01 00 00 00 nop <== NOT EXECUTED 40002104: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 40002108: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 4000210c: 81 c7 e0 08 ret <== NOT EXECUTED 40002110: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40002114: 80 a0 60 5c cmp %g1, 0x5c 40002118: 22 80 00 08 be,a 40002138 <== NEVER TAKEN 4000211c: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40002120: 80 a0 60 2f cmp %g1, 0x2f 40002124: 22 80 00 05 be,a 40002138 40002128: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000212c: 80 a0 60 00 cmp %g1, 0 40002130: 12 80 00 09 bne 40002154 <== ALWAYS TAKEN 40002134: 03 10 00 6a sethi %hi(0x4001a800), %g1 40002138: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 ! 4001aaf8 4000213c: 90 10 00 1b mov %i3, %o0 40002140: 92 02 60 18 add %o1, 0x18, %o1 40002144: 40 00 2e 77 call 4000db20 40002148: 94 10 20 14 mov 0x14, %o2 4000214c: 10 80 00 08 b 4000216c 40002150: 82 10 20 01 mov 1, %g1 40002154: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 40002158: 90 10 00 1b mov %i3, %o0 4000215c: 92 02 60 04 add %o1, 4, %o1 40002160: 40 00 2e 70 call 4000db20 40002164: 94 10 20 14 mov 0x14, %o2 40002168: 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], 4000216c: b2 26 40 01 sub %i1, %g1, %i1 40002170: 7f ff ff 9d call 40001fe4 40002174: 91 ee 00 01 restore %i0, %g1, %o0 =============================================================================== 40001fe4 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40001fe4: 9d e3 bf a0 save %sp, -96, %sp 40001fe8: 90 10 00 18 mov %i0, %o0 /* * Verify Input parameters. */ if ( !pathname ) 40001fec: 80 a6 20 00 cmp %i0, 0 40001ff0: 12 80 00 06 bne 40002008 <== ALWAYS TAKEN 40001ff4: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EFAULT ); 40001ff8: 40 00 2c 8e call 4000d230 <__errno> <== NOT EXECUTED 40001ffc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002000: 10 80 00 2d b 400020b4 <== NOT EXECUTED 40002004: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED if ( !pathloc ) 40002008: 80 a6 e0 00 cmp %i3, 0 4000200c: 32 80 00 06 bne,a 40002024 <== ALWAYS TAKEN 40002010: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40002014: 40 00 2c 87 call 4000d230 <__errno> <== NOT EXECUTED 40002018: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000201c: 10 80 00 26 b 400020b4 <== NOT EXECUTED 40002020: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 40002024: c2 00 40 00 ld [ %g1 ], %g1 40002028: 80 a0 60 00 cmp %g1, 0 4000202c: 02 80 00 1f be 400020a8 <== NEVER TAKEN 40002030: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 40002034: 9f c0 40 00 call %g1 40002038: 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 ) { 4000203c: b0 92 20 00 orcc %o0, 0, %i0 40002040: 12 80 00 1e bne 400020b8 40002044: 80 a7 20 00 cmp %i4, 0 40002048: 02 80 00 21 be 400020cc 4000204c: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002050: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 40002054: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40002058: 80 a0 60 00 cmp %g1, 0 4000205c: 22 80 00 0e be,a 40002094 <== NEVER TAKEN 40002060: 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 ); 40002064: 9f c0 40 00 call %g1 40002068: 90 10 00 1b mov %i3, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4000206c: 90 02 3f fd add %o0, -3, %o0 40002070: 80 a2 20 01 cmp %o0, 1 40002074: 18 80 00 16 bgu 400020cc 40002078: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 4000207c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 40002080: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40002084: 80 a0 60 00 cmp %g1, 0 40002088: 12 80 00 0e bne 400020c0 <== ALWAYS TAKEN 4000208c: 90 10 00 1b mov %i3, %o0 rtems_filesystem_freenode( pathloc ); 40002090: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40002094: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002098: 02 80 00 04 be 400020a8 <== NOT EXECUTED 4000209c: 01 00 00 00 nop <== NOT EXECUTED 400020a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400020a4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400020a8: 40 00 2c 62 call 4000d230 <__errno> <== NOT EXECUTED 400020ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400020b0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400020b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400020b8: 81 c7 e0 08 ret 400020bc: 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 ); 400020c0: 9f c0 40 00 call %g1 400020c4: 92 10 00 1a mov %i2, %o1 400020c8: b0 10 00 08 mov %o0, %i0 } } return result; } 400020cc: 81 c7 e0 08 ret 400020d0: 81 e8 00 00 restore =============================================================================== 40001e48 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40001e48: 9d e3 bf 88 save %sp, -120, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40001e4c: 23 10 00 6a sethi %hi(0x4001a800), %l1 40001e50: c2 04 62 f8 ld [ %l1 + 0x2f8 ], %g1 ! 4001aaf8 40001e54: 84 10 20 12 mov 0x12, %g2 init_fs_mount_table(); 40001e58: 40 00 01 8a call 40002480 40001e5c: c4 20 60 2c st %g2, [ %g1 + 0x2c ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40001e60: 03 10 00 65 sethi %hi(0x40019400), %g1 40001e64: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 40019740 rtems_fatal_error_occurred( 0xABCD0001 ); 40001e68: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40001e6c: 80 a0 60 00 cmp %g1, 0 40001e70: 02 80 00 0f be 40001eac <== NEVER TAKEN 40001e74: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 40001e78: 03 10 00 6a sethi %hi(0x4001a800), %g1 40001e7c: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 4001a9ec status = mount( 40001e80: 90 07 bf fc add %fp, -4, %o0 40001e84: d8 00 60 0c ld [ %g1 + 0xc ], %o4 40001e88: d2 00 40 00 ld [ %g1 ], %o1 40001e8c: d4 00 60 04 ld [ %g1 + 4 ], %o2 40001e90: 40 00 01 84 call 400024a0 40001e94: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 40001e98: 80 a2 3f ff cmp %o0, -1 40001e9c: 32 80 00 06 bne,a 40001eb4 <== ALWAYS TAKEN 40001ea0: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 40001ea4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40001ea8: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 40001eac: 40 00 0f 56 call 40005c04 <== NOT EXECUTED 40001eb0: 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; 40001eb4: 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; 40001eb8: c0 32 20 30 clrh [ %o0 + 0x30 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40001ebc: 92 02 60 1c add %o1, 0x1c, %o1 40001ec0: 94 10 20 14 mov 0x14, %o2 40001ec4: 40 00 2f 17 call 4000db20 40001ec8: 90 02 20 18 add %o0, 0x18, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001ecc: a0 07 bf e8 add %fp, -24, %l0 40001ed0: 98 10 20 00 clr %o4 40001ed4: 96 10 00 10 mov %l0, %o3 40001ed8: 25 10 00 66 sethi %hi(0x40019800), %l2 40001edc: 92 10 20 01 mov 1, %o1 40001ee0: 94 10 20 00 clr %o2 40001ee4: 40 00 00 7c call 400020d4 40001ee8: 90 14 a3 90 or %l2, 0x390, %o0 rtems_filesystem_root = loc; 40001eec: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0 40001ef0: 92 10 00 10 mov %l0, %o1 40001ef4: 94 10 20 14 mov 0x14, %o2 40001ef8: 40 00 2f 0a call 4000db20 40001efc: 90 02 20 18 add %o0, 0x18, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40001f00: 96 10 00 10 mov %l0, %o3 40001f04: 98 10 20 00 clr %o4 40001f08: 92 10 20 01 mov 1, %o1 40001f0c: 94 10 20 00 clr %o2 40001f10: 40 00 00 71 call 400020d4 40001f14: 90 14 a3 90 or %l2, 0x390, %o0 rtems_filesystem_current = loc; 40001f18: d0 04 62 f8 ld [ %l1 + 0x2f8 ], %o0 40001f1c: 92 10 00 10 mov %l0, %o1 40001f20: 94 10 20 14 mov 0x14, %o2 40001f24: 40 00 2e ff call 4000db20 40001f28: 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); 40001f2c: 92 10 21 ff mov 0x1ff, %o1 40001f30: 11 10 00 66 sethi %hi(0x40019800), %o0 40001f34: 40 00 00 fe call 4000232c 40001f38: 90 12 23 98 or %o0, 0x398, %o0 ! 40019b98 <__FUNCTION__.5614+0x290> if ( status != 0 ) 40001f3c: 80 a2 20 00 cmp %o0, 0 40001f40: 02 80 00 04 be 40001f50 <== ALWAYS TAKEN 40001f44: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 40001f48: 10 bf ff d9 b 40001eac <== NOT EXECUTED 40001f4c: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 40001f50: 81 c7 e0 08 ret 40001f54: 81 e8 00 00 restore =============================================================================== 4000901c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 4000901c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40009020: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 40009024: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 40009028: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 4000902c: 81 c3 e0 08 retl <== NOT EXECUTED 40009030: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 40001f58 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 40001f58: 82 10 00 08 mov %o0, %g1 40001f5c: 90 10 20 00 clr %o0 /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 40001f60: 80 a2 40 08 cmp %o1, %o0 40001f64: 02 80 00 0c be 40001f94 <== NEVER TAKEN 40001f68: c4 08 40 08 ldub [ %g1 + %o0 ], %g2 40001f6c: 85 28 a0 18 sll %g2, 0x18, %g2 40001f70: 85 38 a0 18 sra %g2, 0x18, %g2 40001f74: 80 a0 a0 00 cmp %g2, 0 40001f78: 02 80 00 07 be 40001f94 <== NEVER TAKEN 40001f7c: 80 a0 a0 5c cmp %g2, 0x5c 40001f80: 22 bf ff f8 be,a 40001f60 <== NEVER TAKEN 40001f84: 90 02 20 01 inc %o0 <== NOT EXECUTED 40001f88: 80 a0 a0 2f cmp %g2, 0x2f 40001f8c: 22 bf ff f5 be,a 40001f60 40001f90: 90 02 20 01 inc %o0 pathname++; pathnamelen--; stripped++; } return stripped; } 40001f94: 81 c3 e0 08 retl =============================================================================== 40001cb8 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001cb8: 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 ); 40001cbc: 40 00 31 15 call 4000e110 <== NOT EXECUTED 40001cc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001cc4: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40001cc8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED 40001ccc: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001cd0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001cd4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40001cd8: 40 00 00 ff call 400020d4 <== NOT EXECUTED 40001cdc: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001ce0: 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 ); 40001ce4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001ce8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40001cec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001cf0: 12 80 00 0e bne 40001d28 <== NOT EXECUTED 40001cf4: e4 07 bf ec ld [ %fp + -20 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001cf8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001cfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d00: 02 80 00 04 be 40001d10 <== NOT EXECUTED 40001d04: 01 00 00 00 nop <== NOT EXECUTED 40001d08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001d10: 40 00 2d 48 call 4000d230 <__errno> <== NOT EXECUTED 40001d14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001d18: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001d1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001d20: 81 c7 e0 08 ret <== NOT EXECUTED 40001d24: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40001d28: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d2c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001d30: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40001d34: 12 80 00 05 bne 40001d48 <== NOT EXECUTED 40001d38: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40001d3c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40001d40: 22 80 00 0d be,a 40001d74 <== NOT EXECUTED 40001d44: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d4c: 02 80 00 1c be 40001dbc <== NOT EXECUTED 40001d50: 01 00 00 00 nop <== NOT EXECUTED 40001d54: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001d58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d5c: 02 80 00 18 be 40001dbc <== NOT EXECUTED 40001d60: 01 00 00 00 nop <== NOT EXECUTED 40001d64: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d68: 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 ); 40001d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40001d70: 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 ); 40001d74: 40 00 30 e7 call 4000e110 <== NOT EXECUTED 40001d78: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d7c: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001d80: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001d84: 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; 40001d88: c4 26 60 08 st %g2, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001d8c: c4 04 a0 54 ld [ %l2 + 0x54 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d94: 02 80 00 0c be 40001dc4 <== NOT EXECUTED 40001d98: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40001d9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001da0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001da4: 02 80 00 08 be 40001dc4 <== NOT EXECUTED 40001da8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40001dac: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001db0: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001db4: 81 c7 e0 08 ret <== NOT EXECUTED 40001db8: 81 e8 00 00 restore <== NOT EXECUTED 40001dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40001dc0: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 40001dc4: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40001dc8: 81 c7 e0 08 ret <== NOT EXECUTED 40001dcc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400083f4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 400083f4: 9d e3 bf a0 save %sp, -96, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 400083f8: 80 a6 20 00 cmp %i0, 0 400083fc: 02 80 00 1d be 40008470 <== NEVER TAKEN 40008400: 21 10 00 a6 sethi %hi(0x40029800), %l0 40008404: a0 14 20 34 or %l0, 0x34, %l0 ! 40029834 <_Objects_Information_table+0x4> #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 40008408: a6 04 20 10 add %l0, 0x10, %l3 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 4000840c: c2 04 00 00 ld [ %l0 ], %g1 40008410: 80 a0 60 00 cmp %g1, 0 40008414: 22 80 00 14 be,a 40008464 40008418: a0 04 20 04 add %l0, 4, %l0 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4000841c: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( !information ) 40008420: 80 a4 a0 00 cmp %l2, 0 40008424: 12 80 00 0b bne 40008450 40008428: a2 10 20 01 mov 1, %l1 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 4000842c: 10 80 00 0e b 40008464 40008430: a0 04 20 04 add %l0, 4, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40008434: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 40008438: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !the_thread ) 4000843c: 80 a2 20 00 cmp %o0, 0 40008440: 02 80 00 04 be 40008450 <== NEVER TAKEN 40008444: a2 04 60 01 inc %l1 continue; (*routine)(the_thread); 40008448: 9f c6 00 00 call %i0 4000844c: 01 00 00 00 nop information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 40008450: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 40008454: 80 a4 40 01 cmp %l1, %g1 40008458: 08 bf ff f7 bleu 40008434 4000845c: 85 2c 60 02 sll %l1, 2, %g2 40008460: a0 04 20 04 add %l0, 4, %l0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 40008464: 80 a4 00 13 cmp %l0, %l3 40008468: 32 bf ff ea bne,a 40008410 4000846c: c2 04 00 00 ld [ %l0 ], %g1 40008470: 81 c7 e0 08 ret 40008474: 81 e8 00 00 restore =============================================================================== 4000a478 : * 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 ) { 4000a478: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000a47c: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a480: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0 ! 4001b1b4 4000a484: 92 10 20 00 clr %o1 4000a488: 7f ff ec 38 call 40005568 4000a48c: 94 10 20 00 clr %o2 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 4000a490: 21 10 00 6c sethi %hi(0x4001b000), %l0 4000a494: c2 04 21 b0 ld [ %l0 + 0x1b0 ], %g1 ! 4001b1b0 4000a498: 80 a0 60 00 cmp %g1, 0 4000a49c: 02 80 00 26 be 4000a534 4000a4a0: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000a4a4: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000a4a8: c4 00 a1 ac ld [ %g2 + 0x1ac ], %g2 ! 4001b1ac 4000a4ac: 92 10 20 01 mov 1, %o1 4000a4b0: 82 20 40 02 sub %g1, %g2, %g1 4000a4b4: 83 38 60 03 sra %g1, 3, %g1 4000a4b8: 87 28 60 06 sll %g1, 6, %g3 4000a4bc: 85 28 60 03 sll %g1, 3, %g2 4000a4c0: 84 20 c0 02 sub %g3, %g2, %g2 4000a4c4: 87 28 a0 06 sll %g2, 6, %g3 4000a4c8: 84 00 80 03 add %g2, %g3, %g2 4000a4cc: 84 00 80 01 add %g2, %g1, %g2 4000a4d0: 87 28 a0 0f sll %g2, 0xf, %g3 4000a4d4: 84 20 c0 02 sub %g3, %g2, %g2 4000a4d8: 07 13 10 92 sethi %hi(0x4c424800), %g3 4000a4dc: 85 28 a0 03 sll %g2, 3, %g2 4000a4e0: 86 10 e1 00 or %g3, 0x100, %g3 4000a4e4: 82 00 80 01 add %g2, %g1, %g1 4000a4e8: 94 10 20 54 mov 0x54, %o2 4000a4ec: 96 10 20 00 clr %o3 4000a4f0: 90 10 40 03 or %g1, %g3, %o0 4000a4f4: 7f ff eb 7b call 400052e0 4000a4f8: 98 07 bf fc add %fp, -4, %o4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 4000a4fc: 80 a2 20 00 cmp %o0, 0 4000a500: 32 80 00 0d bne,a 4000a534 <== NEVER TAKEN 4000a504: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000a508: f0 04 21 b0 ld [ %l0 + 0x1b0 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000a50c: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000a510: e2 06 20 38 ld [ %i0 + 0x38 ], %l1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000a514: 90 10 00 18 mov %i0, %o0 4000a518: 40 00 0d c1 call 4000dc1c 4000a51c: 94 10 20 48 mov 0x48, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000a520: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_libio_iop_freelist = next; 4000a524: e2 24 21 b0 st %l1, [ %l0 + 0x1b0 ] 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; 4000a528: 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; 4000a52c: 82 10 21 00 mov 0x100, %g1 4000a530: c2 26 20 18 st %g1, [ %i0 + 0x18 ] } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4000a534: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a538: 7f ff ec 53 call 40005684 4000a53c: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0 ! 4001b1b4 iop = 0; done: rtems_libio_unlock(); return iop; } 4000a540: 81 c7 e0 08 ret 4000a544: 81 e8 00 00 restore =============================================================================== 4000a418 : */ void rtems_libio_free( rtems_libio_t *iop ) { 4000a418: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000a41c: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a420: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0 ! 4001b1b4 4000a424: 92 10 20 00 clr %o1 4000a428: 7f ff ec 50 call 40005568 4000a42c: 94 10 20 00 clr %o2 rtems_libio_lock(); if (iop->sem) 4000a430: d0 06 20 30 ld [ %i0 + 0x30 ], %o0 4000a434: 80 a2 20 00 cmp %o0, 0 4000a438: 02 80 00 04 be 4000a448 <== NEVER TAKEN 4000a43c: a0 10 00 18 mov %i0, %l0 rtems_semaphore_delete(iop->sem); 4000a440: 7f ff ec 1c call 400054b0 4000a444: 01 00 00 00 nop iop->flags &= ~LIBIO_FLAGS_OPEN; 4000a448: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4000a44c: 07 10 00 6c sethi %hi(0x4001b000), %g3 iop->data1 = rtems_libio_iop_freelist; 4000a450: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000a454: f0 00 e1 b4 ld [ %g3 + 0x1b4 ], %i0 4000a458: c6 00 61 b0 ld [ %g1 + 0x1b0 ], %g3 rtems_libio_iop_freelist = iop; 4000a45c: e0 20 61 b0 st %l0, [ %g1 + 0x1b0 ] rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4000a460: 82 08 be ff and %g2, -257, %g1 iop->data1 = rtems_libio_iop_freelist; 4000a464: c6 24 20 38 st %g3, [ %l0 + 0x38 ] rtems_libio_lock(); if (iop->sem) rtems_semaphore_delete(iop->sem); iop->flags &= ~LIBIO_FLAGS_OPEN; 4000a468: c2 24 20 18 st %g1, [ %l0 + 0x18 ] 4000a46c: 7f ff ec 86 call 40005684 4000a470: 81 e8 00 00 restore =============================================================================== 4000217c : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 4000217c: 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) 40002180: 21 10 00 6a sethi %hi(0x4001a800), %l0 40002184: d0 04 21 e4 ld [ %l0 + 0x1e4 ], %o0 ! 4001a9e4 40002188: 80 a2 20 00 cmp %o0, 0 4000218c: 22 80 00 18 be,a 400021ec <== NEVER TAKEN 40002190: 11 13 10 92 sethi %hi(0x4c424800), %o0 <== NOT EXECUTED { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 40002194: 40 00 1f 80 call 40009f94 40002198: 92 10 20 48 mov 0x48, %o1 4000219c: 03 10 00 6c sethi %hi(0x4001b000), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 400021a0: 80 a2 20 00 cmp %o0, 0 400021a4: 12 80 00 04 bne 400021b4 <== ALWAYS TAKEN 400021a8: d0 20 61 ac st %o0, [ %g1 + 0x1ac ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 400021ac: 10 80 00 1a b 40002214 <== NOT EXECUTED 400021b0: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 400021b4: 05 10 00 6c sethi %hi(0x4001b000), %g2 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 400021b8: c8 04 21 e4 ld [ %l0 + 0x1e4 ], %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; 400021bc: d0 20 a1 b0 st %o0, [ %g2 + 0x1b0 ] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 400021c0: 82 10 00 08 mov %o0, %g1 400021c4: 10 80 00 03 b 400021d0 400021c8: 84 10 20 00 clr %g2 iop->data1 = iop + 1; 400021cc: 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++) 400021d0: 84 00 a0 01 inc %g2 iop->data1 = iop + 1; 400021d4: 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++) 400021d8: 80 a0 80 04 cmp %g2, %g4 400021dc: 0a bf ff fc bcs 400021cc 400021e0: 82 00 60 48 add %g1, 0x48, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 400021e4: c0 20 e0 38 clr [ %g3 + 0x38 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 400021e8: 11 13 10 92 sethi %hi(0x4c424800), %o0 400021ec: 92 10 20 01 mov 1, %o1 400021f0: 90 12 21 4f or %o0, 0x14f, %o0 400021f4: 94 10 20 54 mov 0x54, %o2 400021f8: 96 10 20 00 clr %o3 400021fc: 19 10 00 6c sethi %hi(0x4001b000), %o4 40002200: 40 00 0c 38 call 400052e0 40002204: 98 13 21 b4 or %o4, 0x1b4, %o4 ! 4001b1b4 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40002208: 80 a2 20 00 cmp %o0, 0 4000220c: 02 80 00 04 be 4000221c <== ALWAYS TAKEN 40002210: 03 10 00 6a sethi %hi(0x4001a800), %g1 rtems_fatal_error_occurred( rc ); 40002214: 40 00 0e 7c call 40005c04 <== NOT EXECUTED 40002218: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 4000221c: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 40002220: 80 a0 60 00 cmp %g1, 0 40002224: 02 80 00 04 be 40002234 <== NEVER TAKEN 40002228: 01 00 00 00 nop (* rtems_fs_init_helper)(); 4000222c: 9f c0 40 00 call %g1 40002230: 01 00 00 00 nop 40002234: 81 c7 e0 08 ret 40002238: 81 e8 00 00 restore =============================================================================== 40003d28 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 40003d28: 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); 40003d2c: 90 10 20 00 clr %o0 40003d30: 92 10 20 00 clr %o1 40003d34: 40 00 0b 53 call 40006a80 40003d38: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40003d3c: b0 92 20 00 orcc %o0, 0, %i0 40003d40: 12 80 00 19 bne 40003da4 <== NEVER TAKEN 40003d44: 21 10 00 74 sethi %hi(0x4001d000), %l0 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 40003d48: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 ! 4001d230 40003d4c: 03 10 00 76 sethi %hi(0x4001d800), %g1 40003d50: 82 10 61 40 or %g1, 0x140, %g1 ! 4001d940 40003d54: 80 a0 80 01 cmp %g2, %g1 40003d58: 12 80 00 15 bne 40003dac 40003d5c: a4 14 22 30 or %l0, 0x230, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 40003d60: 7f ff fc db call 400030cc 40003d64: 90 10 20 48 mov 0x48, %o0 if (!tmp) 40003d68: a2 92 20 00 orcc %o0, 0, %l1 40003d6c: 12 80 00 04 bne 40003d7c <== ALWAYS TAKEN 40003d70: 92 10 00 12 mov %l2, %o1 40003d74: 81 c7 e0 08 ret <== NOT EXECUTED 40003d78: 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); 40003d7c: 90 10 20 00 clr %o0 40003d80: 15 10 00 0e sethi %hi(0x40003800), %o2 40003d84: 40 00 0b 95 call 40006bd8 40003d88: 94 12 a3 f4 or %o2, 0x3f4, %o2 ! 40003bf4 if (sc != RTEMS_SUCCESSFUL) { 40003d8c: 82 92 20 00 orcc %o0, 0, %g1 40003d90: 22 80 00 07 be,a 40003dac <== ALWAYS TAKEN 40003d94: e2 24 22 30 st %l1, [ %l0 + 0x230 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40003d98: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003d9c: 7f ff fb 41 call 40002aa0 <== NOT EXECUTED 40003da0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return sc; 40003da4: 81 c7 e0 08 ret <== NOT EXECUTED 40003da8: 81 e8 00 00 restore <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 40003dac: 23 10 00 74 sethi %hi(0x4001d000), %l1 40003db0: e0 04 62 30 ld [ %l1 + 0x230 ], %l0 ! 4001d230 40003db4: 94 10 20 48 mov 0x48, %o2 40003db8: 90 10 00 10 mov %l0, %o0 40003dbc: 13 10 00 76 sethi %hi(0x4001d800), %o1 40003dc0: 40 00 2e df call 4000f93c 40003dc4: 92 12 61 40 or %o1, 0x140, %o1 ! 4001d940 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40003dc8: 03 10 00 76 sethi %hi(0x4001d800), %g1 40003dcc: d2 00 61 28 ld [ %g1 + 0x128 ], %o1 ! 4001d928 } 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*/ 40003dd0: c2 07 bf fc ld [ %fp + -4 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40003dd4: 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*/ 40003dd8: c2 24 00 00 st %g1, [ %l0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40003ddc: 90 04 20 18 add %l0, 0x18, %o0 40003de0: 40 00 2e d7 call 4000f93c 40003de4: 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); 40003de8: a0 07 bf e8 add %fp, -24, %l0 40003dec: 98 10 20 00 clr %o4 40003df0: 96 10 00 10 mov %l0, %o3 40003df4: 25 10 00 70 sethi %hi(0x4001c000), %l2 40003df8: 92 10 20 01 mov 1, %o1 40003dfc: 94 10 20 00 clr %o2 40003e00: 7f ff fa fe call 400029f8 40003e04: 90 14 a1 f0 or %l2, 0x1f0, %o0 rtems_filesystem_root = loc; 40003e08: d0 04 62 30 ld [ %l1 + 0x230 ], %o0 40003e0c: 92 10 00 10 mov %l0, %o1 40003e10: 94 10 20 14 mov 0x14, %o2 40003e14: 40 00 2e ca call 4000f93c 40003e18: 90 02 20 18 add %o0, 0x18, %o0 rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 40003e1c: 92 10 20 01 mov 1, %o1 40003e20: 94 10 20 00 clr %o2 40003e24: 90 14 a1 f0 or %l2, 0x1f0, %o0 40003e28: 96 10 00 10 mov %l0, %o3 40003e2c: 7f ff fa f3 call 400029f8 40003e30: 98 10 20 00 clr %o4 rtems_filesystem_current = loc; 40003e34: d0 04 62 30 ld [ %l1 + 0x230 ], %o0 40003e38: 92 10 00 10 mov %l0, %o1 40003e3c: 90 02 20 04 add %o0, 4, %o0 40003e40: 40 00 2e bf call 4000f93c 40003e44: 94 10 20 14 mov 0x14, %o2 return RTEMS_SUCCESSFUL; } 40003e48: 81 c7 e0 08 ret 40003e4c: 81 e8 00 00 restore =============================================================================== 40003c6c : * 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) { 40003c6c: 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); 40003c70: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003c74: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003c78: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED 40003c7c: 40 00 0b 81 call 40006a80 <== NOT EXECUTED 40003c80: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40003c84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003c88: 12 80 00 26 bne 40003d20 <== NOT EXECUTED 40003c8c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 40003c90: 13 10 00 74 sethi %hi(0x4001d000), %o1 <== NOT EXECUTED 40003c94: e0 02 62 30 ld [ %o1 + 0x230 ], %l0 ! 4001d230 <== NOT EXECUTED 40003c98: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40003c9c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40003ca0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003ca4: 12 80 00 09 bne 40003cc8 <== NOT EXECUTED 40003ca8: 92 12 62 30 or %o1, 0x230, %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); 40003cac: 40 00 0b f7 call 40006c88 <== NOT EXECUTED 40003cb0: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40003cb4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40003cb8: 12 80 00 1a bne 40003d20 <== NOT EXECUTED 40003cbc: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40003cc0: 7f ff ff cd call 40003bf4 <== NOT EXECUTED 40003cc4: 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, 40003cc8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003ccc: 21 10 00 74 sethi %hi(0x4001d000), %l0 <== NOT EXECUTED 40003cd0: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 40003cd4: a2 14 22 30 or %l0, 0x230, %l1 <== NOT EXECUTED 40003cd8: 40 00 0c 12 call 40006d20 <== NOT EXECUTED 40003cdc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40003ce0: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40003ce4: 12 80 00 0c bne 40003d14 <== NOT EXECUTED 40003ce8: 07 10 00 76 sethi %hi(0x4001d800), %g3 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 40003cec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40003cf0: 15 10 00 0e sethi %hi(0x40003800), %o2 <== NOT EXECUTED 40003cf4: 40 00 0b b9 call 40006bd8 <== NOT EXECUTED 40003cf8: 94 12 a3 f4 or %o2, 0x3f4, %o2 ! 40003bf4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003cfc: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 40003d00: 12 80 00 05 bne 40003d14 <== NOT EXECUTED 40003d04: 07 10 00 76 sethi %hi(0x4001d800), %g3 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40003d08: 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; 40003d0c: 10 80 00 05 b 40003d20 <== NOT EXECUTED 40003d10: c4 24 22 30 st %g2, [ %l0 + 0x230 ] <== NOT EXECUTED bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40003d14: 05 10 00 74 sethi %hi(0x4001d000), %g2 <== NOT EXECUTED 40003d18: 86 10 e1 40 or %g3, 0x140, %g3 <== NOT EXECUTED 40003d1c: c6 20 a2 30 st %g3, [ %g2 + 0x230 ] <== NOT EXECUTED return sc; } 40003d20: 81 c7 e0 08 ret <== NOT EXECUTED 40003d24: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED =============================================================================== 4000a2cc : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4000a2cc: 84 0a 20 06 and %o0, 6, %g2 4000a2d0: 80 a0 a0 06 cmp %g2, 6 4000a2d4: 02 80 00 07 be 4000a2f0 <== NEVER TAKEN 4000a2d8: 82 10 20 02 mov 2, %g1 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000a2dc: 82 0a 20 02 and %o0, 2, %g1 4000a2e0: 80 a0 00 01 cmp %g0, %g1 4000a2e4: 83 32 20 02 srl %o0, 2, %g1 4000a2e8: 84 60 3f ff subx %g0, -1, %g2 4000a2ec: 82 08 80 01 and %g2, %g1, %g1 fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 4000a2f0: 80 8a 20 01 btst 1, %o0 4000a2f4: 02 80 00 04 be 4000a304 4000a2f8: 80 8a 22 00 btst 0x200, %o0 fcntl_flags |= O_NONBLOCK; 4000a2fc: 05 00 00 10 sethi %hi(0x4000), %g2 4000a300: 82 10 40 02 or %g1, %g2, %g1 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4000a304: 32 80 00 02 bne,a 4000a30c 4000a308: 82 10 60 08 or %g1, 8, %g1 fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4000a30c: 80 8a 24 00 btst 0x400, %o0 4000a310: 32 80 00 02 bne,a 4000a318 4000a314: 82 10 62 00 or %g1, 0x200, %g1 fcntl_flags |= O_CREAT; } return fcntl_flags; } 4000a318: 81 c3 e0 08 retl 4000a31c: 90 10 00 01 mov %g1, %o0 =============================================================================== 4000f8f0 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 4000f8f0: 9d e3 bf a0 save %sp, -96, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 4000f8f4: a0 96 20 00 orcc %i0, 0, %l0 4000f8f8: 02 80 00 20 be 4000f978 4000f8fc: 03 10 00 85 sethi %hi(0x40021400), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000f900: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 400214d0 <_System_state_Current> 4000f904: 80 a0 60 03 cmp %g1, 3 4000f908: 12 80 00 07 bne 4000f924 <== NEVER TAKEN 4000f90c: c0 24 00 00 clr [ %l0 ] 4000f910: 7f ff d0 53 call 40003a5c 4000f914: 01 00 00 00 nop 4000f918: 80 8a 20 ff btst 0xff, %o0 4000f91c: 02 80 00 18 be 4000f97c <== NEVER TAKEN 4000f920: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000f924: 7f ff d0 67 call 40003ac0 4000f928: b0 10 20 0c mov 0xc, %i0 uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 4000f92c: 03 10 00 82 sethi %hi(0x40020800), %g1 4000f930: d0 00 60 d0 ld [ %g1 + 0xd0 ], %o0 ! 400208d0 4000f934: 94 10 00 19 mov %i1, %o2 4000f938: 92 10 00 1a mov %i2, %o1 4000f93c: 7f ff e5 4d call 40008e70 <_Protected_heap_Allocate_aligned_with_boundary> 4000f940: 96 10 20 00 clr %o3 return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 4000f944: b2 92 20 00 orcc %o0, 0, %i1 4000f948: 02 80 00 0d be 4000f97c 4000f94c: 03 10 00 83 sethi %hi(0x40020c00), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 4000f950: c2 00 63 18 ld [ %g1 + 0x318 ], %g1 ! 40020f18 4000f954: 80 a0 60 00 cmp %g1, 0 4000f958: 22 80 00 06 be,a 4000f970 <== ALWAYS TAKEN 4000f95c: f2 24 00 00 st %i1, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 4000f960: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000f964: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000f968: 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; 4000f96c: f2 24 00 00 st %i1, [ %l0 ] <== NOT EXECUTED return 0; 4000f970: 81 c7 e0 08 ret 4000f974: 91 e8 20 00 restore %g0, 0, %o0 4000f978: b0 10 20 16 mov 0x16, %i0 } 4000f97c: 81 c7 e0 08 ret 4000f980: 81 e8 00 00 restore =============================================================================== 40007500 : void rtems_panic( const char *printf_format, ... ) { 40007500: 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); 40007504: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40007508: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 4000750c: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40007510: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40007514: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40007518: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 4000751c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40007520: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007524: 7f ff ff 89 call 40007348 <== NOT EXECUTED 40007528: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED va_end(arglist); } 4000752c: 81 c7 e0 08 ret <== NOT EXECUTED 40007530: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400128c0 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 400128c0: 9d e3 bf a0 save %sp, -96, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 400128c4: a0 96 20 00 orcc %i0, 0, %l0 400128c8: 02 80 00 1c be 40012938 400128cc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 400128d0: 80 a6 60 00 cmp %i1, 0 400128d4: 02 80 00 34 be 400129a4 400128d8: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 400128dc: 02 80 00 32 be 400129a4 <== NEVER TAKEN 400128e0: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 400128e4: 02 80 00 32 be 400129ac 400128e8: 80 a6 a0 00 cmp %i2, 0 400128ec: 02 80 00 30 be 400129ac 400128f0: 80 a6 80 1b cmp %i2, %i3 400128f4: 0a 80 00 2e bcs 400129ac 400128f8: 80 8e e0 07 btst 7, %i3 400128fc: 12 80 00 2c bne 400129ac 40012900: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 40012904: 12 80 00 28 bne 400129a4 40012908: 03 10 00 ef sethi %hi(0x4003bc00), %g1 4001290c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 4003bdf0 <_Thread_Dispatch_disable_level> 40012910: 84 00 a0 01 inc %g2 40012914: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 40012918: 25 10 00 ee sethi %hi(0x4003b800), %l2 4001291c: 40 00 11 bd call 40017010 <_Objects_Allocate> 40012920: 90 14 a3 f8 or %l2, 0x3f8, %o0 ! 4003bbf8 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 40012924: a2 92 20 00 orcc %o0, 0, %l1 40012928: 32 80 00 06 bne,a 40012940 4001292c: f4 24 60 14 st %i2, [ %l1 + 0x14 ] _Thread_Enable_dispatch(); 40012930: 40 00 15 71 call 40017ef4 <_Thread_Enable_dispatch> 40012934: b0 10 20 05 mov 5, %i0 return RTEMS_TOO_MANY; 40012938: 81 c7 e0 08 ret 4001293c: 81 e8 00 00 restore the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 40012940: 90 10 00 1a mov %i2, %o0 40012944: 92 10 00 1b mov %i3, %o1 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 40012948: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 4001294c: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; the_partition->buffer_size = buffer_size; 40012950: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 40012954: 40 00 5f 00 call 4002a554 <.udiv> 40012958: c0 24 60 20 clr [ %l1 + 0x20 ] 4001295c: 92 10 00 19 mov %i1, %o1 40012960: 94 10 00 08 mov %o0, %o2 40012964: 96 10 00 1b mov %i3, %o3 40012968: b4 04 60 24 add %l1, 0x24, %i2 4001296c: 40 00 0c 56 call 40015ac4 <_Chain_Initialize> 40012970: 90 10 00 1a mov %i2, %o0 40012974: c2 14 60 0a lduh [ %l1 + 0xa ], %g1 40012978: c6 04 60 08 ld [ %l1 + 8 ], %g3 4001297c: a4 14 a3 f8 or %l2, 0x3f8, %l2 40012980: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40012984: e0 24 60 0c st %l0, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40012988: 83 28 60 02 sll %g1, 2, %g1 &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 4001298c: c6 27 40 00 st %g3, [ %i5 ] 40012990: e2 20 80 01 st %l1, [ %g2 + %g1 ] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40012994: 40 00 15 58 call 40017ef4 <_Thread_Enable_dispatch> 40012998: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 4001299c: 81 c7 e0 08 ret 400129a0: 81 e8 00 00 restore 400129a4: 81 c7 e0 08 ret 400129a8: 91 e8 20 09 restore %g0, 9, %o0 400129ac: b0 10 20 08 mov 8, %i0 } 400129b0: 81 c7 e0 08 ret 400129b4: 81 e8 00 00 restore =============================================================================== 4000b97c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 4000b97c: 9d e3 bf a0 save %sp, -96, %sp if (!rtems_pipe_configured) 4000b980: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000b984: c2 08 60 14 ldub [ %g1 + 0x14 ], %g1 ! 4001b014 4000b988: 80 a0 60 00 cmp %g1, 0 4000b98c: 02 80 00 15 be 4000b9e0 <== ALWAYS TAKEN 4000b990: 19 10 00 6c sethi %hi(0x4001b000), %o4 return; if (rtems_pipe_semaphore) 4000b994: c2 03 21 34 ld [ %o4 + 0x134 ], %g1 ! 4001b134 <== NOT EXECUTED 4000b998: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000b99c: 12 80 00 11 bne 4000b9e0 <== NOT EXECUTED 4000b9a0: 98 13 21 34 or %o4, 0x134, %o4 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( 4000b9a4: 11 14 12 54 sethi %hi(0x50495000), %o0 <== NOT EXECUTED 4000b9a8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000b9ac: 90 12 20 45 or %o0, 0x45, %o0 <== NOT EXECUTED 4000b9b0: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED 4000b9b4: 7f ff e6 4b call 400052e0 <== NOT EXECUTED 4000b9b8: 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) 4000b9bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000b9c0: 02 80 00 04 be 4000b9d0 <== NOT EXECUTED 4000b9c4: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 4000b9c8: 7f ff e8 8f call 40005c04 <== NOT EXECUTED 4000b9cc: 01 00 00 00 nop <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 4000b9d0: 7f ff e5 24 call 40004e60 <== NOT EXECUTED 4000b9d4: 01 00 00 00 nop <== NOT EXECUTED rtems_pipe_no = now; 4000b9d8: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000b9dc: d0 30 61 3a sth %o0, [ %g1 + 0x13a ] ! 4001b13a <== NOT EXECUTED 4000b9e0: 81 c7 e0 08 ret 4000b9e4: 81 e8 00 00 restore =============================================================================== 40006760 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 40006760: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40006764: 11 10 00 84 sethi %hi(0x40021000), %o0 40006768: 92 10 00 18 mov %i0, %o1 4000676c: 90 12 20 60 or %o0, 0x60, %o0 40006770: 40 00 08 9f call 400089ec <_Objects_Get> 40006774: 94 07 bf fc add %fp, -4, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40006778: c2 07 bf fc ld [ %fp + -4 ], %g1 4000677c: 80 a0 60 00 cmp %g1, 0 40006780: 12 80 00 63 bne 4000690c 40006784: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006788: 25 10 00 84 sethi %hi(0x40021000), %l2 4000678c: c4 02 20 40 ld [ %o0 + 0x40 ], %g2 40006790: c2 04 a2 8c ld [ %l2 + 0x28c ], %g1 40006794: 80 a0 80 01 cmp %g2, %g1 40006798: 02 80 00 06 be 400067b0 4000679c: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 400067a0: 40 00 0a d4 call 400092f0 <_Thread_Enable_dispatch> 400067a4: b0 10 20 17 mov 0x17, %i0 return RTEMS_NOT_OWNER_OF_RESOURCE; 400067a8: 81 c7 e0 08 ret 400067ac: 81 e8 00 00 restore } if ( length == RTEMS_PERIOD_STATUS ) { 400067b0: 12 80 00 0b bne 400067dc 400067b4: 01 00 00 00 nop switch ( the_period->state ) { 400067b8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400067bc: 80 a0 60 04 cmp %g1, 4 400067c0: 18 80 00 4f bgu 400068fc <== NEVER TAKEN 400067c4: b0 10 20 00 clr %i0 400067c8: 83 28 60 02 sll %g1, 2, %g1 400067cc: 05 10 00 7c sethi %hi(0x4001f000), %g2 400067d0: 84 10 a0 58 or %g2, 0x58, %g2 ! 4001f058 400067d4: 10 80 00 4a b 400068fc 400067d8: f0 00 80 01 ld [ %g2 + %g1 ], %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 400067dc: 7f ff f0 d9 call 40002b40 400067e0: 01 00 00 00 nop 400067e4: a6 10 00 08 mov %o0, %l3 switch ( the_period->state ) { 400067e8: e2 04 20 38 ld [ %l0 + 0x38 ], %l1 400067ec: 80 a4 60 02 cmp %l1, 2 400067f0: 02 80 00 1a be 40006858 400067f4: 80 a4 60 04 cmp %l1, 4 400067f8: 02 80 00 34 be 400068c8 400067fc: 80 a4 60 00 cmp %l1, 0 40006800: 12 80 00 43 bne 4000690c <== NEVER TAKEN 40006804: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 40006808: 7f ff f0 d2 call 40002b50 4000680c: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40006810: 7f ff ff 50 call 40006550 <_Rate_monotonic_Initiate_statistics> 40006814: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40006818: 82 10 20 02 mov 2, %g1 4000681c: c2 24 20 38 st %g1, [ %l0 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006820: 03 10 00 1a sethi %hi(0x40006800), %g1 40006824: 82 10 63 d8 or %g1, 0x3d8, %g1 ! 40006bd8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 40006828: f0 24 20 30 st %i0, [ %l0 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000682c: 92 04 20 10 add %l0, 0x10, %o1 40006830: 11 10 00 84 sethi %hi(0x40021000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006834: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006838: 90 12 22 ac or %o0, 0x2ac, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000683c: c0 24 20 18 clr [ %l0 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40006840: c0 24 20 34 clr [ %l0 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40006844: f2 24 20 3c st %i1, [ %l0 + 0x3c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006848: c2 24 20 2c st %g1, [ %l0 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000684c: 40 00 0f c3 call 4000a758 <_Watchdog_Insert> 40006850: b0 10 20 00 clr %i0 40006854: 30 80 00 2a b,a 400068fc case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 40006858: 7f ff ff 84 call 40006668 <_Rate_monotonic_Update_statistics> 4000685c: 90 10 00 10 mov %l0, %o0 /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 40006860: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40006864: f2 24 20 3c st %i1, [ %l0 + 0x3c ] /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 40006868: c2 24 20 38 st %g1, [ %l0 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 4000686c: 7f ff f0 b9 call 40002b50 40006870: 90 10 00 13 mov %l3, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40006874: c2 04 a2 8c ld [ %l2 + 0x28c ], %g1 40006878: c4 04 20 08 ld [ %l0 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 4000687c: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 40006880: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006884: 40 00 0c fa call 40009c6c <_Thread_Set_state> 40006888: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 4000688c: 7f ff f0 ad call 40002b40 40006890: 01 00 00 00 nop local_state = the_period->state; 40006894: e6 04 20 38 ld [ %l0 + 0x38 ], %l3 the_period->state = RATE_MONOTONIC_ACTIVE; 40006898: e2 24 20 38 st %l1, [ %l0 + 0x38 ] _ISR_Enable( level ); 4000689c: 7f ff f0 ad call 40002b50 400068a0: 01 00 00 00 nop /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 400068a4: 80 a4 e0 03 cmp %l3, 3 400068a8: 12 80 00 04 bne 400068b8 400068ac: d0 04 a2 8c ld [ %l2 + 0x28c ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 400068b0: 40 00 09 99 call 40008f14 <_Thread_Clear_state> 400068b4: 13 00 00 10 sethi %hi(0x4000), %o1 _Thread_Enable_dispatch(); 400068b8: 40 00 0a 8e call 400092f0 <_Thread_Enable_dispatch> 400068bc: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; 400068c0: 81 c7 e0 08 ret 400068c4: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 400068c8: 7f ff ff 68 call 40006668 <_Rate_monotonic_Update_statistics> 400068cc: 90 10 00 10 mov %l0, %o0 _ISR_Enable( level ); 400068d0: 7f ff f0 a0 call 40002b50 400068d4: 90 10 00 13 mov %l3, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 400068d8: 82 10 20 02 mov 2, %g1 400068dc: 92 04 20 10 add %l0, 0x10, %o1 400068e0: 11 10 00 84 sethi %hi(0x40021000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400068e4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400068e8: 90 12 22 ac or %o0, 0x2ac, %o0 the_period->next_length = length; 400068ec: f2 24 20 3c st %i1, [ %l0 + 0x3c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 400068f0: c2 24 20 38 st %g1, [ %l0 + 0x38 ] 400068f4: 40 00 0f 99 call 4000a758 <_Watchdog_Insert> 400068f8: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 400068fc: 40 00 0a 7d call 400092f0 <_Thread_Enable_dispatch> 40006900: 01 00 00 00 nop return RTEMS_TIMEOUT; 40006904: 81 c7 e0 08 ret 40006908: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000690c: 81 c7 e0 08 ret 40006910: 91 e8 20 04 restore %g0, 4, %o0 =============================================================================== 40006914 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40006914: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40006918: 80 a6 60 00 cmp %i1, 0 4000691c: 02 80 00 7a be 40006b04 <== NEVER TAKEN 40006920: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40006924: 13 10 00 7c sethi %hi(0x4001f000), %o1 40006928: 9f c6 40 00 call %i1 4000692c: 92 12 60 70 or %o1, 0x70, %o1 ! 4001f070 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 40006930: 90 10 00 18 mov %i0, %o0 40006934: 13 10 00 7c sethi %hi(0x4001f000), %o1 40006938: 9f c6 40 00 call %i1 4000693c: 92 12 60 90 or %o1, 0x90, %o1 ! 4001f090 (*print)( context, "--- Wall times are in seconds ---\n" ); 40006940: 90 10 00 18 mov %i0, %o0 40006944: 13 10 00 7c sethi %hi(0x4001f000), %o1 40006948: 9f c6 40 00 call %i1 4000694c: 92 12 60 b8 or %o1, 0xb8, %o1 ! 4001f0b8 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40006950: 90 10 00 18 mov %i0, %o0 40006954: 13 10 00 7c sethi %hi(0x4001f000), %o1 40006958: 9f c6 40 00 call %i1 4000695c: 92 12 60 e0 or %o1, 0xe0, %o1 ! 4001f0e0 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 40006960: 90 10 00 18 mov %i0, %o0 40006964: 13 10 00 7c sethi %hi(0x4001f000), %o1 40006968: 9f c6 40 00 call %i1 4000696c: 92 12 61 30 or %o1, 0x130, %o1 ! 4001f130 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40006970: 03 10 00 84 sethi %hi(0x40021000), %g1 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40006974: 2d 10 00 7c sethi %hi(0x4001f000), %l6 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40006978: 82 10 60 60 or %g1, 0x60, %g1 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 4000697c: 2b 10 00 7c sethi %hi(0x4001f000), %l5 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 40006980: 29 10 00 7c sethi %hi(0x4001f000), %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40006984: 27 10 00 7c sethi %hi(0x4001f000), %l3 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40006988: ba 07 bf a0 add %fp, -96, %i5 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 4000698c: ae 10 00 01 mov %g1, %l7 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40006990: ac 15 a1 80 or %l6, 0x180, %l6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 40006994: aa 15 61 a0 or %l5, 0x1a0, %l5 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 40006998: a8 15 21 c0 or %l4, 0x1c0, %l4 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 4000699c: a6 14 e1 98 or %l3, 0x198, %l3 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 400069a0: e0 00 60 08 ld [ %g1 + 8 ], %l0 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400069a4: b8 07 bf d8 add %fp, -40, %i4 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 400069a8: a4 07 bf f8 add %fp, -8, %l2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 400069ac: b4 07 bf b8 add %fp, -72, %i2 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 400069b0: 10 80 00 51 b 40006af4 400069b4: a2 07 bf f0 add %fp, -16, %l1 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 400069b8: 40 00 17 d9 call 4000c91c 400069bc: 92 10 00 1d mov %i5, %o1 if ( status != RTEMS_SUCCESSFUL ) 400069c0: 80 a2 20 00 cmp %o0, 0 400069c4: 32 80 00 4c bne,a 40006af4 400069c8: a0 04 20 01 inc %l0 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400069cc: 92 10 00 1c mov %i4, %o1 400069d0: 40 00 18 00 call 4000c9d0 400069d4: 90 10 00 10 mov %l0, %o0 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 400069d8: d0 07 bf d8 ld [ %fp + -40 ], %o0 400069dc: 94 10 00 12 mov %l2, %o2 400069e0: 40 00 00 ae call 40006c98 400069e4: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400069e8: d8 1f bf a0 ldd [ %fp + -96 ], %o4 400069ec: 92 10 00 16 mov %l6, %o1 400069f0: 94 10 00 10 mov %l0, %o2 400069f4: 90 10 00 18 mov %i0, %o0 400069f8: 9f c6 40 00 call %i1 400069fc: 96 10 00 12 mov %l2, %o3 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40006a00: c2 07 bf a0 ld [ %fp + -96 ], %g1 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 40006a04: 94 10 00 11 mov %l1, %o2 40006a08: 90 10 00 1a mov %i2, %o0 ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40006a0c: 80 a0 60 00 cmp %g1, 0 40006a10: 12 80 00 06 bne 40006a28 40006a14: 92 10 00 13 mov %l3, %o1 (*print)( context, "\n" ); 40006a18: 9f c6 40 00 call %i1 40006a1c: 90 10 00 18 mov %i0, %o0 continue; 40006a20: 10 80 00 35 b 40006af4 40006a24: a0 04 20 01 inc %l0 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 40006a28: 40 00 0e 22 call 4000a2b0 <_Timespec_Divide_by_integer> 40006a2c: 92 10 00 01 mov %g1, %o1 (*print)( context, 40006a30: d0 07 bf ac ld [ %fp + -84 ], %o0 40006a34: 40 00 52 d1 call 4001b578 <.div> 40006a38: 92 10 23 e8 mov 0x3e8, %o1 40006a3c: 96 10 00 08 mov %o0, %o3 40006a40: d0 07 bf b4 ld [ %fp + -76 ], %o0 40006a44: d6 27 bf 9c st %o3, [ %fp + -100 ] 40006a48: 40 00 52 cc call 4001b578 <.div> 40006a4c: 92 10 23 e8 mov 0x3e8, %o1 40006a50: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006a54: b6 10 00 08 mov %o0, %i3 40006a58: d0 07 bf f4 ld [ %fp + -12 ], %o0 40006a5c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40006a60: 40 00 52 c6 call 4001b578 <.div> 40006a64: 92 10 23 e8 mov 0x3e8, %o1 40006a68: d8 07 bf b0 ld [ %fp + -80 ], %o4 40006a6c: d6 07 bf 9c ld [ %fp + -100 ], %o3 40006a70: d4 07 bf a8 ld [ %fp + -88 ], %o2 40006a74: 9a 10 00 1b mov %i3, %o5 40006a78: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40006a7c: 92 10 00 15 mov %l5, %o1 40006a80: 9f c6 40 00 call %i1 40006a84: 90 10 00 18 mov %i0, %o0 struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 40006a88: d2 07 bf a0 ld [ %fp + -96 ], %o1 40006a8c: 94 10 00 11 mov %l1, %o2 40006a90: 40 00 0e 08 call 4000a2b0 <_Timespec_Divide_by_integer> 40006a94: 90 07 bf d0 add %fp, -48, %o0 (*print)( context, 40006a98: d0 07 bf c4 ld [ %fp + -60 ], %o0 40006a9c: 40 00 52 b7 call 4001b578 <.div> 40006aa0: 92 10 23 e8 mov 0x3e8, %o1 40006aa4: 96 10 00 08 mov %o0, %o3 40006aa8: d0 07 bf cc ld [ %fp + -52 ], %o0 40006aac: d6 27 bf 9c st %o3, [ %fp + -100 ] 40006ab0: 40 00 52 b2 call 4001b578 <.div> 40006ab4: 92 10 23 e8 mov 0x3e8, %o1 40006ab8: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006abc: b6 10 00 08 mov %o0, %i3 40006ac0: d0 07 bf f4 ld [ %fp + -12 ], %o0 40006ac4: 92 10 23 e8 mov 0x3e8, %o1 40006ac8: 40 00 52 ac call 4001b578 <.div> 40006acc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40006ad0: d4 07 bf c0 ld [ %fp + -64 ], %o2 40006ad4: d6 07 bf 9c ld [ %fp + -100 ], %o3 40006ad8: d8 07 bf c8 ld [ %fp + -56 ], %o4 40006adc: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40006ae0: 9a 10 00 1b mov %i3, %o5 40006ae4: 90 10 00 18 mov %i0, %o0 40006ae8: 9f c6 40 00 call %i1 40006aec: 92 10 00 14 mov %l4, %o1 * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { 40006af0: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40006af4: c2 05 e0 0c ld [ %l7 + 0xc ], %g1 40006af8: 80 a4 00 01 cmp %l0, %g1 40006afc: 08 bf ff af bleu 400069b8 40006b00: 90 10 00 10 mov %l0, %o0 40006b04: 81 c7 e0 08 ret 40006b08: 81 e8 00 00 restore =============================================================================== 40013ea8 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 40013ea8: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 40013eac: 82 10 20 0a mov 0xa, %g1 40013eb0: 80 a6 60 00 cmp %i1, 0 40013eb4: 02 80 00 2a be 40013f5c 40013eb8: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 40013ebc: 40 00 10 31 call 40017f80 <_Thread_Get> 40013ec0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 40013ec4: c4 07 bf fc ld [ %fp + -4 ], %g2 ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 40013ec8: a0 10 00 08 mov %o0, %l0 switch ( location ) { 40013ecc: 80 a0 a0 00 cmp %g2, 0 40013ed0: 12 80 00 23 bne 40013f5c 40013ed4: 82 10 20 04 mov 4, %g1 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 40013ed8: d2 02 21 5c ld [ %o0 + 0x15c ], %o1 asr = &api->Signal; 40013edc: c2 02 60 0c ld [ %o1 + 0xc ], %g1 40013ee0: 80 a0 60 00 cmp %g1, 0 40013ee4: 02 80 00 1b be 40013f50 40013ee8: 01 00 00 00 nop if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 40013eec: c2 0a 60 08 ldub [ %o1 + 8 ], %g1 40013ef0: 80 a0 60 00 cmp %g1, 0 40013ef4: 02 80 00 11 be 40013f38 40013ef8: 90 10 00 19 mov %i1, %o0 _ASR_Post_signals( signal_set, &asr->signals_posted ); 40013efc: 7f ff ff e2 call 40013e84 <_ASR_Post_signals> 40013f00: 92 02 60 14 add %o1, 0x14, %o1 the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40013f04: 03 10 00 ef sethi %hi(0x4003bc00), %g1 40013f08: c4 00 62 88 ld [ %g1 + 0x288 ], %g2 ! 4003be88 <_ISR_Nest_level> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 40013f0c: 82 10 20 01 mov 1, %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40013f10: 80 a0 a0 00 cmp %g2, 0 40013f14: 02 80 00 0b be 40013f40 40013f18: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 40013f1c: 05 10 00 ef sethi %hi(0x4003bc00), %g2 40013f20: c4 00 a2 ac ld [ %g2 + 0x2ac ], %g2 ! 4003beac <_Thread_Executing> 40013f24: 80 a4 00 02 cmp %l0, %g2 40013f28: 12 80 00 06 bne 40013f40 <== NEVER TAKEN 40013f2c: 05 10 00 ef sethi %hi(0x4003bc00), %g2 _ISR_Signals_to_thread_executing = true; 40013f30: 10 80 00 04 b 40013f40 40013f34: c2 28 a3 48 stb %g1, [ %g2 + 0x348 ] ! 4003bf48 <_ISR_Signals_to_thread_executing> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); 40013f38: 7f ff ff d3 call 40013e84 <_ASR_Post_signals> 40013f3c: 92 02 60 18 add %o1, 0x18, %o1 } _Thread_Enable_dispatch(); 40013f40: 40 00 0f ed call 40017ef4 <_Thread_Enable_dispatch> 40013f44: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 40013f48: 10 80 00 05 b 40013f5c 40013f4c: 82 10 20 00 clr %g1 ! 0 } _Thread_Enable_dispatch(); 40013f50: 40 00 0f e9 call 40017ef4 <_Thread_Enable_dispatch> 40013f54: 01 00 00 00 nop 40013f58: 82 10 20 0b mov 0xb, %g1 ! b case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40013f5c: 81 c7 e0 08 ret 40013f60: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 40001bbc : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 40001bbc: 9d e3 bf a0 save %sp, -96, %sp Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 40001bc0: c2 06 20 08 ld [ %i0 + 8 ], %g1 40001bc4: 80 a0 60 00 cmp %g1, 0 40001bc8: 02 80 00 07 be 40001be4 <== NEVER TAKEN 40001bcc: 13 10 00 6c sethi %hi(0x4001b000), %o1 return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 40001bd0: d0 06 20 c4 ld [ %i0 + 0xc4 ], %o0 40001bd4: 90 02 20 08 add %o0, 8, %o0 40001bd8: 92 12 63 e4 or %o1, 0x3e4, %o1 40001bdc: 40 00 30 64 call 4000dd6c 40001be0: 94 10 20 10 mov 0x10, %o2 40001be4: 81 c7 e0 08 ret 40001be8: 81 e8 00 00 restore =============================================================================== 40002028 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 40002028: 9d e3 bf a0 save %sp, -96, %sp Stack_check_Initialize(); 4000202c: 7f ff ff d8 call 40001f8c 40002030: 01 00 00 00 nop if (the_thread) 40002034: 80 a6 60 00 cmp %i1, 0 40002038: 02 80 00 06 be 40002050 <== NEVER TAKEN 4000203c: 01 00 00 00 nop Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 40002040: d4 06 60 c0 ld [ %i1 + 0xc0 ], %o2 40002044: d0 06 60 c4 ld [ %i1 + 0xc4 ], %o0 40002048: 40 00 2f 88 call 4000de68 4000204c: 92 10 20 a5 mov 0xa5, %o1 return true; } 40002050: 81 c7 e0 08 ret 40002054: 91 e8 20 01 restore %g0, 1, %o0 =============================================================================== 40001e98 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 40001e98: 9d e3 bf a0 save %sp, -96, %sp Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 40001e9c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40001ea0: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 4001b68c <_Thread_Executing> ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40001ea4: d0 00 60 c4 ld [ %g1 + 0xc4 ], %o0 40001ea8: 80 a7 80 08 cmp %fp, %o0 40001eac: 0a 80 00 06 bcs 40001ec4 <== NEVER TAKEN 40001eb0: a0 10 20 00 clr %l0 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 40001eb4: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 40001eb8: 82 02 00 01 add %o0, %g1, %g1 40001ebc: 80 a0 40 1e cmp %g1, %fp 40001ec0: 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 ) { 40001ec4: 03 10 00 6c sethi %hi(0x4001b000), %g1 40001ec8: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 ! 4001b254 40001ecc: 80 a0 60 00 cmp %g1, 0 40001ed0: 02 80 00 09 be 40001ef4 <== NEVER TAKEN 40001ed4: 92 10 20 01 mov 1, %o1 pattern_ok = (!memcmp( 40001ed8: 90 02 20 08 add %o0, 8, %o0 40001edc: 13 10 00 6c sethi %hi(0x4001b000), %o1 40001ee0: 94 10 20 10 mov 0x10, %o2 40001ee4: 40 00 2f 71 call 4000dca8 40001ee8: 92 12 63 e4 or %o1, 0x3e4, %o1 40001eec: 80 a0 00 08 cmp %g0, %o0 40001ef0: 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 ) 40001ef4: 80 8c 20 ff btst 0xff, %l0 40001ef8: 02 80 00 04 be 40001f08 <== NEVER TAKEN 40001efc: 80 8a 60 ff btst 0xff, %o1 40001f00: 12 80 00 07 bne 40001f1c <== ALWAYS TAKEN 40001f04: 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 ); 40001f08: 03 10 00 6d sethi %hi(0x4001b400), %g1 <== NOT EXECUTED 40001f0c: d0 00 62 8c ld [ %g1 + 0x28c ], %o0 ! 4001b68c <_Thread_Executing><== NOT EXECUTED 40001f10: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 40001f14: 7f ff ff b7 call 40001df0 <== NOT EXECUTED 40001f18: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40001f1c: 81 c7 e0 08 ret 40001f20: 81 e8 00 00 restore =============================================================================== 40001dd4 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40001dd4: 13 10 00 0c sethi %hi(0x40003000), %o1 <== NOT EXECUTED 40001dd8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40001ddc: 92 12 60 ec or %o1, 0xec, %o1 <== NOT EXECUTED 40001de0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40001de4: 7f ff ff e6 call 40001d7c <== NOT EXECUTED 40001de8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40001d7c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40001d7c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED print_context = context; 40001d80: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== NOT EXECUTED print_handler = print; 40001d84: 21 10 00 6c sethi %hi(0x4001b000), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 40001d88: f0 24 62 58 st %i0, [ %l1 + 0x258 ] <== NOT EXECUTED print_handler = print; 40001d8c: f2 24 22 5c st %i1, [ %l0 + 0x25c ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40001d90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d94: 13 10 00 67 sethi %hi(0x40019c00), %o1 <== NOT EXECUTED 40001d98: 9f c6 40 00 call %i1 <== NOT EXECUTED 40001d9c: 92 12 60 20 or %o1, 0x20, %o1 ! 40019c20 <__FUNCTION__.5614+0x298><== NOT EXECUTED (*print)( context, 40001da0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001da4: 13 10 00 67 sethi %hi(0x40019c00), %o1 <== NOT EXECUTED 40001da8: 9f c6 40 00 call %i1 <== NOT EXECUTED 40001dac: 92 12 60 38 or %o1, 0x38, %o1 ! 40019c38 <__FUNCTION__.5614+0x2b0><== 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 ); 40001db0: 11 10 00 07 sethi %hi(0x40001c00), %o0 <== NOT EXECUTED 40001db4: 40 00 13 3c call 40006aa4 <== NOT EXECUTED 40001db8: 90 12 20 2c or %o0, 0x2c, %o0 ! 40001c2c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 40001dbc: 7f ff ff 9c call 40001c2c <== NOT EXECUTED 40001dc0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40001dc4: c0 24 62 58 clr [ %l1 + 0x258 ] <== NOT EXECUTED print_handler = NULL; 40001dc8: c0 24 22 5c clr [ %l0 + 0x25c ] <== NOT EXECUTED } 40001dcc: 81 c7 e0 08 ret <== NOT EXECUTED 40001dd0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40001f24 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 40001f24: 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; 40001f28: d0 06 20 c4 ld [ %i0 + 0xc4 ], %o0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 40001f2c: 80 a7 80 08 cmp %fp, %o0 40001f30: 0a 80 00 06 bcs 40001f48 <== NEVER TAKEN 40001f34: a0 10 20 00 clr %l0 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 40001f38: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 40001f3c: 82 02 00 01 add %o0, %g1, %g1 40001f40: 80 a0 40 1e cmp %g1, %fp 40001f44: 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, 40001f48: 90 02 20 08 add %o0, 8, %o0 40001f4c: 13 10 00 6c sethi %hi(0x4001b000), %o1 40001f50: 94 10 20 10 mov 0x10, %o2 40001f54: 40 00 2f 55 call 4000dca8 40001f58: 92 12 63 e4 or %o1, 0x3e4, %o1 40001f5c: 80 a0 00 08 cmp %g0, %o0 40001f60: b2 60 3f ff subx %g0, -1, %i1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 40001f64: 80 8c 20 ff btst 0xff, %l0 40001f68: 02 80 00 04 be 40001f78 <== NEVER TAKEN 40001f6c: 80 a6 60 00 cmp %i1, 0 40001f70: 12 80 00 05 bne 40001f84 <== ALWAYS TAKEN 40001f74: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 40001f78: b2 0e 60 01 and %i1, 1, %i1 <== NOT EXECUTED 40001f7c: 7f ff ff 9d call 40001df0 <== NOT EXECUTED 40001f80: 81 e8 00 00 restore <== NOT EXECUTED 40001f84: 81 c7 e0 08 ret 40001f88: 81 e8 00 00 restore =============================================================================== 4000c008 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c008: 9d e3 bf 98 save %sp, -104, %sp 4000c00c: a4 10 00 18 mov %i0, %l2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c010: 80 a6 60 00 cmp %i1, 0 4000c014: 02 80 00 24 be 4000c0a4 4000c018: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c01c: 40 00 08 a7 call 4000e2b8 <__errno> 4000c020: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c024: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c028: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c02c: c0 26 40 00 clr [ %i1 ] 4000c030: c0 26 60 04 clr [ %i1 + 4 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c034: 40 00 14 1d call 400110a8 4000c038: 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 ) 4000c03c: 80 a6 a0 00 cmp %i2, 0 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c040: 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 ) 4000c044: 02 80 00 04 be 4000c054 4000c048: a2 10 00 09 mov %o1, %l1 *endptr = end; 4000c04c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c050: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c054: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c058: 80 a0 40 12 cmp %g1, %l2 4000c05c: 02 80 00 12 be 4000c0a4 4000c060: 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)) 4000c064: 03 10 00 79 sethi %hi(0x4001e400), %g1 4000c068: d4 18 61 c8 ldd [ %g1 + 0x1c8 ], %o2 ! 4001e5c8 <_CPU_Trap_slot_template+0x14> 4000c06c: 90 10 00 10 mov %l0, %o0 4000c070: 40 00 3c 26 call 4001b108 <__gtdf2> 4000c074: 92 10 00 11 mov %l1, %o1 4000c078: 80 a2 20 00 cmp %o0, 0 4000c07c: 24 80 00 09 ble,a 4000c0a0 4000c080: e0 3e 40 00 std %l0, [ %i1 ] 4000c084: 40 00 08 8d call 4000e2b8 <__errno> 4000c088: b0 10 20 0a mov 0xa, %i0 4000c08c: c2 02 00 00 ld [ %o0 ], %g1 4000c090: 80 a0 60 22 cmp %g1, 0x22 4000c094: 02 80 00 04 be 4000c0a4 <== ALWAYS TAKEN 4000c098: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c09c: e0 3e 40 00 std %l0, [ %i1 ] <== NOT EXECUTED 4000c0a0: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c0a4: 81 c7 e0 08 ret 4000c0a8: 81 e8 00 00 restore =============================================================================== 4000c0ac : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c0ac: 9d e3 bf 98 save %sp, -104, %sp 4000c0b0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c0b4: 80 a6 60 00 cmp %i1, 0 4000c0b8: 02 80 00 21 be 4000c13c 4000c0bc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c0c0: 40 00 08 7e call 4000e2b8 <__errno> 4000c0c4: 01 00 00 00 nop *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c0c8: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c0cc: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c0d0: c0 26 40 00 clr [ %i1 ] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); 4000c0d4: 40 00 13 e2 call 4001105c 4000c0d8: 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 ) 4000c0dc: 80 a6 a0 00 cmp %i2, 0 4000c0e0: 02 80 00 04 be 4000c0f0 4000c0e4: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c0e8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c0ec: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c0f0: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c0f4: 80 a0 40 10 cmp %g1, %l0 4000c0f8: 02 80 00 11 be 4000c13c 4000c0fc: 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)) 4000c100: 90 10 00 11 mov %l1, %o0 4000c104: 13 1f df ff sethi %hi(0x7f7ffc00), %o1 4000c108: 40 00 39 5d call 4001a67c <__gtsf2> 4000c10c: 92 12 63 ff or %o1, 0x3ff, %o1 ! 7f7fffff 4000c110: 80 a2 20 00 cmp %o0, 0 4000c114: 24 80 00 09 ble,a 4000c138 4000c118: e2 26 40 00 st %l1, [ %i1 ] 4000c11c: 40 00 08 67 call 4000e2b8 <__errno> 4000c120: b0 10 20 0a mov 0xa, %i0 4000c124: c2 02 00 00 ld [ %o0 ], %g1 4000c128: 80 a0 60 22 cmp %g1, 0x22 4000c12c: 02 80 00 04 be 4000c13c <== ALWAYS TAKEN 4000c130: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c134: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c138: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c13c: 81 c7 e0 08 ret 4000c140: 81 e8 00 00 restore =============================================================================== 4000c144 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c144: 9d e3 bf 98 save %sp, -104, %sp 4000c148: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c14c: 80 a6 60 00 cmp %i1, 0 4000c150: 02 80 00 20 be 4000c1d0 4000c154: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c158: 40 00 08 58 call 4000e2b8 <__errno> 4000c15c: 01 00 00 00 nop 4000c160: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c164: 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 ); 4000c168: 94 10 00 1b mov %i3, %o2 4000c16c: 90 10 00 10 mov %l0, %o0 4000c170: 40 00 14 59 call 400112d4 4000c174: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c178: 80 a6 a0 00 cmp %i2, 0 4000c17c: 02 80 00 04 be 4000c18c 4000c180: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c184: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c188: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c18c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c190: 80 a0 40 10 cmp %g1, %l0 4000c194: 02 80 00 0f be 4000c1d0 4000c198: 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)) 4000c19c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000c1a0: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000c1a4: 80 a4 40 01 cmp %l1, %g1 4000c1a8: 32 80 00 09 bne,a 4000c1cc 4000c1ac: e2 26 40 00 st %l1, [ %i1 ] 4000c1b0: 40 00 08 42 call 4000e2b8 <__errno> 4000c1b4: b0 10 20 0a mov 0xa, %i0 4000c1b8: c2 02 00 00 ld [ %o0 ], %g1 4000c1bc: 80 a0 60 22 cmp %g1, 0x22 4000c1c0: 02 80 00 04 be 4000c1d0 <== ALWAYS TAKEN 4000c1c4: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c1c8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c1cc: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c1d0: 81 c7 e0 08 ret 4000c1d4: 81 e8 00 00 restore =============================================================================== 4000c29c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c29c: 9d e3 bf 98 save %sp, -104, %sp 4000c2a0: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c2a4: 80 a6 60 00 cmp %i1, 0 4000c2a8: 02 80 00 23 be 4000c334 4000c2ac: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c2b0: 40 00 08 02 call 4000e2b8 <__errno> 4000c2b4: 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 ); 4000c2b8: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c2bc: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c2c0: 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 ); 4000c2c4: 90 10 00 10 mov %l0, %o0 4000c2c8: 40 00 14 03 call 400112d4 4000c2cc: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c2d0: 80 a6 a0 00 cmp %i2, 0 4000c2d4: 02 80 00 04 be 4000c2e4 4000c2d8: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c2dc: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c2e0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c2e4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c2e8: 80 a0 40 10 cmp %g1, %l0 4000c2ec: 02 80 00 12 be 4000c334 4000c2f0: 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)) 4000c2f4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000c2f8: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000c2fc: 80 a4 40 01 cmp %l1, %g1 4000c300: 02 80 00 05 be 4000c314 4000c304: 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)) 4000c308: 80 a4 40 01 cmp %l1, %g1 4000c30c: 32 80 00 09 bne,a 4000c330 4000c310: e2 26 40 00 st %l1, [ %i1 ] 4000c314: 40 00 07 e9 call 4000e2b8 <__errno> 4000c318: 01 00 00 00 nop 4000c31c: c2 02 00 00 ld [ %o0 ], %g1 4000c320: 80 a0 60 22 cmp %g1, 0x22 4000c324: 22 80 00 04 be,a 4000c334 <== ALWAYS TAKEN 4000c328: b0 10 20 0a mov 0xa, %i0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c32c: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c330: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c334: 81 c7 e0 08 ret 4000c338: 81 e8 00 00 restore =============================================================================== 4000c1d8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c1d8: 9d e3 bf 98 save %sp, -104, %sp 4000c1dc: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c1e0: 80 a6 60 00 cmp %i1, 0 4000c1e4: 02 80 00 2c be 4000c294 4000c1e8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c1ec: 40 00 08 33 call 4000e2b8 <__errno> 4000c1f0: 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 ); 4000c1f4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c1f8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c1fc: c0 26 40 00 clr [ %i1 ] 4000c200: 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 ); 4000c204: 90 10 00 10 mov %l0, %o0 4000c208: 40 00 14 3d call 400112fc 4000c20c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c210: 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 ); 4000c214: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c218: 02 80 00 04 be 4000c228 4000c21c: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000c220: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c224: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c228: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c22c: 80 a0 40 10 cmp %g1, %l0 4000c230: 02 80 00 19 be 4000c294 4000c234: 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)) 4000c238: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 4000c23c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 4000c240: 80 a4 40 01 cmp %l1, %g1 4000c244: 12 80 00 05 bne 4000c258 4000c248: 03 20 00 00 sethi %hi(0x80000000), %g1 4000c24c: 80 a4 bf ff cmp %l2, -1 4000c250: 02 80 00 08 be 4000c270 <== ALWAYS TAKEN 4000c254: 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)) 4000c258: 80 a4 40 01 cmp %l1, %g1 4000c25c: 32 80 00 0c bne,a 4000c28c 4000c260: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000c264: 80 a4 a0 00 cmp %l2, 0 4000c268: 32 80 00 09 bne,a 4000c28c <== NEVER TAKEN 4000c26c: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000c270: 40 00 08 12 call 4000e2b8 <__errno> 4000c274: 01 00 00 00 nop 4000c278: c2 02 00 00 ld [ %o0 ], %g1 4000c27c: 80 a0 60 22 cmp %g1, 0x22 4000c280: 22 80 00 05 be,a 4000c294 <== ALWAYS TAKEN 4000c284: b0 10 20 0a mov 0xa, %i0 #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c288: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000c28c: e2 26 40 00 st %l1, [ %i1 ] 4000c290: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c294: 81 c7 e0 08 ret 4000c298: 81 e8 00 00 restore =============================================================================== 4000c33c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c33c: 9d e3 bf 98 save %sp, -104, %sp 4000c340: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c344: 80 a6 60 00 cmp %i1, 0 4000c348: 02 80 00 1e be 4000c3c0 4000c34c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c350: 40 00 07 da call 4000e2b8 <__errno> 4000c354: 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 ); 4000c358: 92 07 bf fc add %fp, -4, %o1 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c35c: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c360: 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 ); 4000c364: 90 10 00 10 mov %l0, %o0 4000c368: 40 00 15 13 call 400117b4 4000c36c: 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 ) 4000c370: 80 a6 a0 00 cmp %i2, 0 4000c374: 02 80 00 04 be 4000c384 4000c378: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c37c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c380: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c384: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c388: 80 a0 40 10 cmp %g1, %l0 4000c38c: 02 80 00 0d be 4000c3c0 4000c390: 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)) 4000c394: 80 a4 7f ff cmp %l1, -1 4000c398: 32 80 00 09 bne,a 4000c3bc <== ALWAYS TAKEN 4000c39c: e2 26 40 00 st %l1, [ %i1 ] 4000c3a0: 40 00 07 c6 call 4000e2b8 <__errno> <== NOT EXECUTED 4000c3a4: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 4000c3a8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4000c3ac: 80 a0 60 22 cmp %g1, 0x22 <== NOT EXECUTED 4000c3b0: 02 80 00 04 be 4000c3c0 <== NOT EXECUTED 4000c3b4: 01 00 00 00 nop <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; 4000c3b8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c3bc: b0 10 20 00 clr %i0 #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; } 4000c3c0: 81 c7 e0 08 ret 4000c3c4: 81 e8 00 00 restore =============================================================================== 4000c42c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c42c: 9d e3 bf 98 save %sp, -104, %sp 4000c430: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c434: 80 a6 60 00 cmp %i1, 0 4000c438: 02 80 00 1e be 4000c4b0 4000c43c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c440: 40 00 07 9e call 4000e2b8 <__errno> 4000c444: 01 00 00 00 nop 4000c448: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c44c: 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 ); 4000c450: 94 10 00 1b mov %i3, %o2 4000c454: 90 10 00 10 mov %l0, %o0 4000c458: 40 00 14 d7 call 400117b4 4000c45c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c460: 80 a6 a0 00 cmp %i2, 0 4000c464: 02 80 00 04 be 4000c474 4000c468: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c46c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c470: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c474: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c478: 80 a0 40 10 cmp %g1, %l0 4000c47c: 02 80 00 0d be 4000c4b0 4000c480: 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)) 4000c484: 80 a4 7f ff cmp %l1, -1 4000c488: 32 80 00 09 bne,a 4000c4ac 4000c48c: e2 26 40 00 st %l1, [ %i1 ] 4000c490: 40 00 07 8a call 4000e2b8 <__errno> 4000c494: b0 10 20 0a mov 0xa, %i0 4000c498: c2 02 00 00 ld [ %o0 ], %g1 4000c49c: 80 a0 60 22 cmp %g1, 0x22 4000c4a0: 02 80 00 04 be 4000c4b0 <== ALWAYS TAKEN 4000c4a4: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c4a8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c4ac: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c4b0: 81 c7 e0 08 ret 4000c4b4: 81 e8 00 00 restore =============================================================================== 4000c55c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c55c: 9d e3 bf 98 save %sp, -104, %sp 4000c560: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c564: 80 a6 60 00 cmp %i1, 0 4000c568: 02 80 00 1e be 4000c5e0 4000c56c: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c570: 40 00 07 52 call 4000e2b8 <__errno> 4000c574: 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 ); 4000c578: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c57c: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c580: 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 ); 4000c584: 90 10 00 10 mov %l0, %o0 4000c588: 40 00 14 8b call 400117b4 4000c58c: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c590: 80 a6 a0 00 cmp %i2, 0 4000c594: 02 80 00 04 be 4000c5a4 4000c598: a2 10 00 08 mov %o0, %l1 *endptr = end; 4000c59c: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c5a0: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c5a4: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c5a8: 80 a0 40 10 cmp %g1, %l0 4000c5ac: 02 80 00 0d be 4000c5e0 4000c5b0: 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)) 4000c5b4: 80 a4 7f ff cmp %l1, -1 4000c5b8: 32 80 00 09 bne,a 4000c5dc 4000c5bc: e2 26 40 00 st %l1, [ %i1 ] 4000c5c0: 40 00 07 3e call 4000e2b8 <__errno> 4000c5c4: b0 10 20 0a mov 0xa, %i0 4000c5c8: c2 02 00 00 ld [ %o0 ], %g1 4000c5cc: 80 a0 60 22 cmp %g1, 0x22 4000c5d0: 02 80 00 04 be 4000c5e0 <== ALWAYS TAKEN 4000c5d4: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c5d8: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 4000c5dc: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c5e0: 81 c7 e0 08 ret 4000c5e4: 81 e8 00 00 restore =============================================================================== 4000c4b8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 4000c4b8: 9d e3 bf 98 save %sp, -104, %sp 4000c4bc: a0 10 00 18 mov %i0, %l0 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 4000c4c0: 80 a6 60 00 cmp %i1, 0 4000c4c4: 02 80 00 24 be 4000c554 4000c4c8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; errno = 0; 4000c4cc: 40 00 07 7b call 4000e2b8 <__errno> 4000c4d0: 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 ); 4000c4d4: 94 10 00 1b mov %i3, %o2 char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; 4000c4d8: c0 22 00 00 clr [ %o0 ] *n = 0; 4000c4dc: c0 26 40 00 clr [ %i1 ] 4000c4e0: 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 ); 4000c4e4: 90 10 00 10 mov %l0, %o0 4000c4e8: 40 00 14 bd call 400117dc 4000c4ec: 92 07 bf fc add %fp, -4, %o1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c4f0: 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 ); 4000c4f4: a2 10 00 08 mov %o0, %l1 #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 4000c4f8: 02 80 00 04 be 4000c508 4000c4fc: a4 10 00 09 mov %o1, %l2 *endptr = end; 4000c500: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c504: c2 26 80 00 st %g1, [ %i2 ] /* nothing was converted */ if ( end == s ) 4000c508: c2 07 bf fc ld [ %fp + -4 ], %g1 4000c50c: 80 a0 40 10 cmp %g1, %l0 4000c510: 02 80 00 11 be 4000c554 4000c514: 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)) 4000c518: 80 a4 7f ff cmp %l1, -1 4000c51c: 32 80 00 0c bne,a 4000c54c 4000c520: e4 26 60 04 st %l2, [ %i1 + 4 ] 4000c524: 80 a4 bf ff cmp %l2, -1 4000c528: 32 80 00 09 bne,a 4000c54c <== NEVER TAKEN 4000c52c: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000c530: 40 00 07 62 call 4000e2b8 <__errno> 4000c534: b0 10 20 0a mov 0xa, %i0 4000c538: c2 02 00 00 ld [ %o0 ], %g1 4000c53c: 80 a0 60 22 cmp %g1, 0x22 4000c540: 02 80 00 05 be 4000c554 <== ALWAYS TAKEN 4000c544: 01 00 00 00 nop #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; #else *n = (STRING_TO_TYPE) result; 4000c548: e4 26 60 04 st %l2, [ %i1 + 4 ] <== NOT EXECUTED 4000c54c: e2 26 40 00 st %l1, [ %i1 ] 4000c550: b0 10 20 00 clr %i0 #endif return RTEMS_SUCCESSFUL; } 4000c554: 81 c7 e0 08 ret 4000c558: 81 e8 00 00 restore =============================================================================== 4000c754 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4000c754: 9d e3 bf a0 save %sp, -96, %sp ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4000c758: 80 a6 a0 00 cmp %i2, 0 4000c75c: 02 80 00 54 be 4000c8ac 4000c760: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4000c764: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000c768: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing> api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000c76c: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4000c770: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000c774: 80 a0 00 02 cmp %g0, %g2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4000c778: e2 04 21 5c ld [ %l0 + 0x15c ], %l1 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4000c77c: a4 60 3f ff subx %g0, -1, %l2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4000c780: 80 a0 60 00 cmp %g1, 0 4000c784: 02 80 00 03 be 4000c790 4000c788: a5 2c a0 08 sll %l2, 8, %l2 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4000c78c: a4 14 a2 00 or %l2, 0x200, %l2 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000c790: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 4000c794: 80 a0 00 01 cmp %g0, %g1 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 4000c798: 7f ff f1 cd call 40008ecc <_CPU_ISR_Get_level> 4000c79c: a6 60 3f ff subx %g0, -1, %l3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000c7a0: a7 2c e0 0a sll %l3, 0xa, %l3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4000c7a4: a6 14 c0 08 or %l3, %o0, %l3 old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 4000c7a8: a4 14 c0 12 or %l3, %l2, %l2 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4000c7ac: 80 8e 61 00 btst 0x100, %i1 4000c7b0: 02 80 00 06 be 4000c7c8 4000c7b4: e4 26 80 00 st %l2, [ %i2 ] executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4000c7b8: 83 36 20 08 srl %i0, 8, %g1 4000c7bc: 82 18 60 01 xor %g1, 1, %g1 4000c7c0: 82 08 60 01 and %g1, 1, %g1 4000c7c4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ] if ( mask & RTEMS_TIMESLICE_MASK ) { 4000c7c8: 80 8e 62 00 btst 0x200, %i1 4000c7cc: 02 80 00 0b be 4000c7f8 4000c7d0: 80 8e 60 0f btst 0xf, %i1 if ( _Modes_Is_timeslice(mode_set) ) { 4000c7d4: 80 8e 22 00 btst 0x200, %i0 4000c7d8: 22 80 00 07 be,a 4000c7f4 4000c7dc: c0 24 20 7c clr [ %l0 + 0x7c ] executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000c7e0: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000c7e4: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 4001b2d8 <_Thread_Ticks_per_timeslice> 4000c7e8: c2 24 20 78 st %g1, [ %l0 + 0x78 ] if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4000c7ec: 82 10 20 01 mov 1, %g1 4000c7f0: c2 24 20 7c st %g1, [ %l0 + 0x7c ] /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4000c7f4: 80 8e 60 0f btst 0xf, %i1 4000c7f8: 02 80 00 06 be 4000c810 4000c7fc: 80 8e 64 00 btst 0x400, %i1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4000c800: 90 0e 20 0f and %i0, 0xf, %o0 4000c804: 7f ff d5 29 call 40001ca8 4000c808: 91 2a 20 08 sll %o0, 8, %o0 */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4000c80c: 80 8e 64 00 btst 0x400, %i1 4000c810: 22 80 00 18 be,a 4000c870 4000c814: a0 10 20 00 clr %l0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000c818: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4000c81c: b1 36 20 0a srl %i0, 0xa, %i0 4000c820: b0 1e 20 01 xor %i0, 1, %i0 4000c824: b0 0e 20 01 and %i0, 1, %i0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 4000c828: 80 a6 00 01 cmp %i0, %g1 4000c82c: 22 80 00 11 be,a 4000c870 4000c830: a0 10 20 00 clr %l0 ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4000c834: 7f ff d5 19 call 40001c98 4000c838: f0 2c 60 08 stb %i0, [ %l1 + 8 ] _signals = information->signals_pending; 4000c83c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 information->signals_pending = information->signals_posted; 4000c840: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 information->signals_posted = _signals; 4000c844: c4 24 60 14 st %g2, [ %l1 + 0x14 ] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; 4000c848: c2 24 60 18 st %g1, [ %l1 + 0x18 ] information->signals_posted = _signals; _ISR_Enable( _level ); 4000c84c: 7f ff d5 17 call 40001ca8 4000c850: 01 00 00 00 nop 4000c854: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 4000c858: 80 a0 60 00 cmp %g1, 0 4000c85c: 22 80 00 05 be,a 4000c870 4000c860: a0 10 20 00 clr %l0 if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 4000c864: 82 10 20 01 mov 1, %g1 4000c868: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ] 4000c86c: a0 10 20 01 mov 1, %l0 } } } if ( _System_state_Is_up( _System_state_Get() ) ) 4000c870: 03 10 00 6d sethi %hi(0x4001b400), %g1 4000c874: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current> 4000c878: 80 a0 60 03 cmp %g1, 3 4000c87c: 12 80 00 0c bne 4000c8ac <== NEVER TAKEN 4000c880: 82 10 20 00 clr %g1 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 4000c884: 40 00 00 b4 call 4000cb54 <_Thread_Evaluate_mode> 4000c888: 01 00 00 00 nop 4000c88c: 80 8a 20 ff btst 0xff, %o0 4000c890: 12 80 00 04 bne 4000c8a0 4000c894: 80 8c 20 ff btst 0xff, %l0 4000c898: 02 80 00 05 be 4000c8ac 4000c89c: 82 10 20 00 clr %g1 _Thread_Dispatch(); 4000c8a0: 7f ff eb 0f call 400074dc <_Thread_Dispatch> 4000c8a4: 01 00 00 00 nop 4000c8a8: 82 10 20 00 clr %g1 ! 0 return RTEMS_SUCCESSFUL; } 4000c8ac: 81 c7 e0 08 ret 4000c8b0: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 4000aac0 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000aac0: 9d e3 bf 98 save %sp, -104, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000aac4: 80 a6 60 00 cmp %i1, 0 4000aac8: 02 80 00 07 be 4000aae4 4000aacc: 90 10 00 18 mov %i0, %o0 4000aad0: 03 10 00 85 sethi %hi(0x40021400), %g1 4000aad4: c2 08 60 c4 ldub [ %g1 + 0xc4 ], %g1 ! 400214c4 4000aad8: 80 a6 40 01 cmp %i1, %g1 4000aadc: 18 80 00 1c bgu 4000ab4c 4000aae0: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000aae4: 80 a6 a0 00 cmp %i2, 0 4000aae8: 02 80 00 19 be 4000ab4c 4000aaec: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4000aaf0: 40 00 08 14 call 4000cb40 <_Thread_Get> 4000aaf4: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 4000aaf8: c2 07 bf fc ld [ %fp + -4 ], %g1 4000aafc: 80 a0 60 00 cmp %g1, 0 4000ab00: 12 80 00 13 bne 4000ab4c 4000ab04: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4000ab08: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000ab0c: 80 a6 60 00 cmp %i1, 0 4000ab10: 02 80 00 0d be 4000ab44 4000ab14: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000ab18: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000ab1c: 80 a0 60 00 cmp %g1, 0 4000ab20: 02 80 00 06 be 4000ab38 4000ab24: f2 22 20 18 st %i1, [ %o0 + 0x18 ] the_thread->current_priority > new_priority ) 4000ab28: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000ab2c: 80 a0 40 19 cmp %g1, %i1 4000ab30: 08 80 00 05 bleu 4000ab44 <== ALWAYS TAKEN 4000ab34: 01 00 00 00 nop _Thread_Change_priority( the_thread, new_priority, false ); 4000ab38: 92 10 00 19 mov %i1, %o1 4000ab3c: 40 00 06 6e call 4000c4f4 <_Thread_Change_priority> 4000ab40: 94 10 20 00 clr %o2 } _Thread_Enable_dispatch(); 4000ab44: 40 00 07 dc call 4000cab4 <_Thread_Enable_dispatch> 4000ab48: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4000ab4c: 81 c7 e0 08 ret 4000ab50: 81 e8 00 00 restore =============================================================================== 40004270 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 40004270: 82 10 00 08 mov %o0, %g1 int baud_index; switch (termios_baud) { 40004274: 80 a2 20 09 cmp %o0, 9 40004278: 02 80 00 19 be 400042dc <== NEVER TAKEN 4000427c: 90 10 20 09 mov 9, %o0 40004280: 80 a0 60 09 cmp %g1, 9 40004284: 14 80 00 25 bg 40004318 <== NEVER TAKEN 40004288: 80 a0 60 0e cmp %g1, 0xe 4000428c: 80 a0 60 04 cmp %g1, 4 40004290: 02 80 00 13 be 400042dc <== NEVER TAKEN 40004294: 90 10 20 04 mov 4, %o0 40004298: 80 a0 60 04 cmp %g1, 4 4000429c: 14 80 00 12 bg 400042e4 <== NEVER TAKEN 400042a0: 80 a0 60 06 cmp %g1, 6 400042a4: 80 a0 60 01 cmp %g1, 1 400042a8: 02 80 00 0d be 400042dc <== NEVER TAKEN 400042ac: 90 10 20 01 mov 1, %o0 400042b0: 80 a0 60 01 cmp %g1, 1 400042b4: 34 80 00 05 bg,a 400042c8 <== NEVER TAKEN 400042b8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400042bc: 80 a0 60 00 cmp %g1, 0 400042c0: 10 80 00 3f b 400043bc 400042c4: 90 10 20 00 clr %o0 400042c8: 02 80 00 05 be 400042dc <== NOT EXECUTED 400042cc: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 400042d0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 400042d4: 12 80 00 3c bne 400043c4 <== NOT EXECUTED 400042d8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED 400042dc: 81 c3 e0 08 retl <== NOT EXECUTED 400042e0: 01 00 00 00 nop <== NOT EXECUTED 400042e4: 02 bf ff fe be 400042dc <== NOT EXECUTED 400042e8: 90 10 20 06 mov 6, %o0 ! 6 <== NOT EXECUTED 400042ec: 80 a0 60 06 cmp %g1, 6 <== NOT EXECUTED 400042f0: 06 bf ff fb bl 400042dc <== NOT EXECUTED 400042f4: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED 400042f8: 80 a0 60 07 cmp %g1, 7 <== NOT EXECUTED 400042fc: 02 bf ff f8 be 400042dc <== NOT EXECUTED 40004300: 90 10 20 07 mov 7, %o0 <== NOT EXECUTED 40004304: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 40004308: 12 80 00 2f bne 400043c4 <== NOT EXECUTED 4000430c: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED 40004310: 81 c3 e0 08 retl <== NOT EXECUTED 40004314: 01 00 00 00 nop <== NOT EXECUTED 40004318: 02 bf ff f1 be 400042dc <== NOT EXECUTED 4000431c: 90 10 20 0e mov 0xe, %o0 ! e <== NOT EXECUTED 40004320: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED 40004324: 14 80 00 10 bg 40004364 <== NOT EXECUTED 40004328: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 4000432c: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 40004330: 02 bf ff eb be 400042dc <== NOT EXECUTED 40004334: 90 10 20 0b mov 0xb, %o0 <== NOT EXECUTED 40004338: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED 4000433c: 06 bf ff e8 bl 400042dc <== NOT EXECUTED 40004340: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40004344: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED 40004348: 02 bf ff e5 be 400042dc <== NOT EXECUTED 4000434c: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED 40004350: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 40004354: 12 80 00 1c bne 400043c4 <== NOT EXECUTED 40004358: 90 10 20 0d mov 0xd, %o0 <== NOT EXECUTED 4000435c: 81 c3 e0 08 retl <== NOT EXECUTED 40004360: 01 00 00 00 nop <== NOT EXECUTED 40004364: 86 10 a0 02 or %g2, 2, %g3 <== NOT EXECUTED 40004368: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000436c: 02 bf ff dc be 400042dc <== NOT EXECUTED 40004370: 90 10 20 11 mov 0x11, %o0 <== NOT EXECUTED 40004374: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40004378: 34 80 00 0b bg,a 400043a4 <== NOT EXECUTED 4000437c: 86 10 a0 03 or %g2, 3, %g3 <== NOT EXECUTED 40004380: 80 a0 60 0f cmp %g1, 0xf <== NOT EXECUTED 40004384: 02 bf ff d6 be 400042dc <== NOT EXECUTED 40004388: 90 10 20 0f mov 0xf, %o0 <== NOT EXECUTED 4000438c: 84 10 a0 01 or %g2, 1, %g2 <== NOT EXECUTED 40004390: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004394: 12 80 00 0c bne 400043c4 <== NOT EXECUTED 40004398: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED 4000439c: 81 c3 e0 08 retl <== NOT EXECUTED 400043a0: 01 00 00 00 nop <== NOT EXECUTED 400043a4: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400043a8: 02 bf ff cd be 400042dc <== NOT EXECUTED 400043ac: 90 10 20 12 mov 0x12, %o0 <== NOT EXECUTED 400043b0: 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; 400043b4: 90 10 20 13 mov 0x13, %o0 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 400043b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400043bc: 02 80 00 03 be 400043c8 <== NEVER TAKEN 400043c0: 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; 400043c4: 90 10 3f ff mov -1, %o0 ! ffffffff default: baud_index = -1; break; } return baud_index; } 400043c8: 81 c3 e0 08 retl =============================================================================== 400043d0 : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 400043d0: 82 10 00 08 mov %o0, %g1 int32_t baud; switch (termios_baud) { 400043d4: 80 a2 20 09 cmp %o0, 9 400043d8: 02 80 00 19 be 4000443c 400043dc: 90 10 24 b0 mov 0x4b0, %o0 400043e0: 80 a0 60 09 cmp %g1, 9 400043e4: 14 80 00 25 bg 40004478 400043e8: 11 00 00 12 sethi %hi(0x4800), %o0 400043ec: 80 a0 60 04 cmp %g1, 4 400043f0: 02 80 00 13 be 4000443c 400043f4: 90 10 20 86 mov 0x86, %o0 400043f8: 80 a0 60 04 cmp %g1, 4 400043fc: 14 80 00 12 bg 40004444 40004400: 80 a0 60 06 cmp %g1, 6 40004404: 80 a0 60 01 cmp %g1, 1 40004408: 02 80 00 0d be 4000443c 4000440c: 90 10 20 32 mov 0x32, %o0 40004410: 80 a0 60 01 cmp %g1, 1 40004414: 34 80 00 05 bg,a 40004428 40004418: 80 a0 60 02 cmp %g1, 2 4000441c: 80 a0 60 00 cmp %g1, 0 40004420: 10 80 00 45 b 40004534 40004424: 90 10 20 00 clr %o0 40004428: 02 80 00 05 be 4000443c 4000442c: 90 10 20 4b mov 0x4b, %o0 40004430: 80 a0 60 03 cmp %g1, 3 40004434: 12 80 00 42 bne 4000453c <== NEVER TAKEN 40004438: 90 10 20 6e mov 0x6e, %o0 4000443c: 81 c3 e0 08 retl 40004440: 01 00 00 00 nop 40004444: 02 bf ff fe be 4000443c 40004448: 90 10 20 c8 mov 0xc8, %o0 ! c8 4000444c: 80 a0 60 06 cmp %g1, 6 40004450: 06 bf ff fb bl 4000443c 40004454: 90 10 20 96 mov 0x96, %o0 40004458: 80 a0 60 07 cmp %g1, 7 4000445c: 02 bf ff f8 be 4000443c 40004460: 90 10 21 2c mov 0x12c, %o0 40004464: 80 a0 60 08 cmp %g1, 8 40004468: 12 80 00 35 bne 4000453c <== NEVER TAKEN 4000446c: 90 10 22 58 mov 0x258, %o0 40004470: 81 c3 e0 08 retl 40004474: 01 00 00 00 nop 40004478: 80 a0 60 0e cmp %g1, 0xe 4000447c: 02 bf ff f0 be 4000443c 40004480: 90 12 23 00 or %o0, 0x300, %o0 40004484: 80 a0 60 0e cmp %g1, 0xe 40004488: 14 80 00 12 bg 400044d0 4000448c: 05 00 00 04 sethi %hi(0x1000), %g2 40004490: 80 a0 60 0b cmp %g1, 0xb 40004494: 02 bf ff ea be 4000443c 40004498: 90 10 29 60 mov 0x960, %o0 4000449c: 80 a0 60 0b cmp %g1, 0xb 400044a0: 06 bf ff e7 bl 4000443c 400044a4: 90 10 27 08 mov 0x708, %o0 case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 400044a8: 90 02 28 f8 add %o0, 0x8f8, %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 400044ac: 80 a0 60 0c cmp %g1, 0xc 400044b0: 02 bf ff e3 be 4000443c 400044b4: 90 12 22 c0 or %o0, 0x2c0, %o0 case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 400044b8: 11 00 00 09 sethi %hi(0x2400), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 400044bc: 80 a0 60 0d cmp %g1, 0xd 400044c0: 12 80 00 1f bne 4000453c <== NEVER TAKEN 400044c4: 90 12 21 80 or %o0, 0x180, %o0 400044c8: 81 c3 e0 08 retl 400044cc: 01 00 00 00 nop case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 400044d0: 11 00 00 70 sethi %hi(0x1c000), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 400044d4: 86 10 a0 02 or %g2, 2, %g3 400044d8: 80 a0 40 03 cmp %g1, %g3 400044dc: 02 bf ff d8 be 4000443c 400044e0: 90 12 22 00 or %o0, 0x200, %o0 400044e4: 80 a0 40 03 cmp %g1, %g3 400044e8: 34 80 00 0d bg,a 4000451c 400044ec: 86 10 a0 03 or %g2, 3, %g3 case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 400044f0: 11 00 00 25 sethi %hi(0x9400), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 400044f4: 80 a0 60 0f cmp %g1, 0xf 400044f8: 02 bf ff d1 be 4000443c 400044fc: 90 12 22 00 or %o0, 0x200, %o0 40004500: 84 10 a0 01 or %g2, 1, %g2 case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 40004504: 11 00 00 38 sethi %hi(0xe000), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 40004508: 80 a0 40 02 cmp %g1, %g2 4000450c: 12 80 00 0c bne 4000453c <== NEVER TAKEN 40004510: 90 12 21 00 or %o0, 0x100, %o0 40004514: 81 c3 e0 08 retl 40004518: 01 00 00 00 nop 4000451c: 80 a0 40 03 cmp %g1, %g3 40004520: 02 bf ff c7 be 4000443c 40004524: 11 00 00 e1 sethi %hi(0x38400), %o0 40004528: 84 10 a0 04 or %g2, 4, %g2 case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 4000452c: 11 00 01 c2 sethi %hi(0x70800), %o0 int termios_baud ) { int32_t baud; switch (termios_baud) { 40004530: 80 a0 40 02 cmp %g1, %g2 40004534: 02 80 00 03 be 40004540 40004538: 01 00 00 00 nop case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 4000453c: 90 10 3f ff mov -1, %o0 ! ffffffff default: baud = -1; break; } return baud; } 40004540: 81 c3 e0 08 retl =============================================================================== 40002d98 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40002d98: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40002d9c: d0 20 62 e8 st %o0, [ %g1 + 0x2e8 ] ! 4001aae8 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40002da0: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40002da4: 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; 40002da8: d2 20 62 ec st %o1, [ %g1 + 0x2ec ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40002dac: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40002db0: 81 c3 e0 08 retl <== NOT EXECUTED 40002db4: d4 20 62 f0 st %o2, [ %g1 + 0x2f0 ] ! 4001aaf0 <== NOT EXECUTED =============================================================================== 400043f4 : } } rtems_status_code rtems_termios_close (void *arg) { 400043f4: 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); 400043f8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400043fc: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 ! 4001b1f4 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004400: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004404: 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; 40004408: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000440c: 40 00 04 57 call 40005568 40004410: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40004414: 80 a2 20 00 cmp %o0, 0 40004418: 12 80 00 2c bne 400044c8 <== NEVER TAKEN 4000441c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 40004420: c2 04 20 08 ld [ %l0 + 8 ], %g1 40004424: 82 00 7f ff add %g1, -1, %g1 40004428: 80 a0 60 00 cmp %g1, 0 4000442c: 12 80 00 5e bne 400045a4 40004430: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 40004434: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40004438: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000443c: 85 28 a0 05 sll %g2, 5, %g2 40004440: 82 10 60 24 or %g1, 0x24, %g1 40004444: 82 00 40 02 add %g1, %g2, %g1 40004448: c2 00 60 04 ld [ %g1 + 4 ], %g1 4000444c: 80 a0 60 00 cmp %g1, 0 40004450: 22 80 00 06 be,a 40004468 <== ALWAYS TAKEN 40004454: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004458: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000445c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 40004460: 10 80 00 0b b 4000448c <== NOT EXECUTED 40004464: 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); 40004468: 92 10 20 00 clr %o1 4000446c: 40 00 04 3f call 40005568 40004470: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40004474: 80 a2 20 00 cmp %o0, 0 40004478: 12 80 00 14 bne 400044c8 <== NEVER TAKEN 4000447c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); } drainOutput (tty); 40004480: 7f ff fd d0 call 40003bc0 40004484: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40004488: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 4000448c: 80 a0 60 02 cmp %g1, 2 40004490: 32 80 00 10 bne,a 400044d0 <== ALWAYS TAKEN 40004494: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40004498: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 4000449c: 40 00 02 f4 call 4000506c <== NOT EXECUTED 400044a0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400044a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400044a8: 12 80 00 08 bne 400044c8 <== NOT EXECUTED 400044ac: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 400044b0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 400044b4: 40 00 02 ee call 4000506c <== NOT EXECUTED 400044b8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400044bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400044c0: 22 80 00 04 be,a 400044d0 <== NOT EXECUTED 400044c4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400044c8: 40 00 05 cf call 40005c04 <== NOT EXECUTED 400044cc: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 400044d0: 80 a0 60 00 cmp %g1, 0 400044d4: 22 80 00 07 be,a 400044f0 <== ALWAYS TAKEN 400044d8: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 400044dc: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 400044e0: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 400044e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400044e8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 400044ec: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 400044f0: 80 a0 a0 00 cmp %g2, 0 400044f4: 12 80 00 08 bne 40004514 400044f8: c2 04 20 04 ld [ %l0 + 4 ], %g1 rtems_termios_ttyTail = tty->back; 400044fc: 05 10 00 6c sethi %hi(0x4001b000), %g2 if ( rtems_termios_ttyTail != NULL ) { 40004500: 80 a0 60 00 cmp %g1, 0 40004504: 02 80 00 05 be 40004518 <== ALWAYS TAKEN 40004508: c2 20 a1 f8 st %g1, [ %g2 + 0x1f8 ] rtems_termios_ttyTail->forw = NULL; 4000450c: 10 80 00 03 b 40004518 <== NOT EXECUTED 40004510: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 40004514: c2 20 a0 04 st %g1, [ %g2 + 4 ] } if (tty->back == NULL) { 40004518: c4 04 20 04 ld [ %l0 + 4 ], %g2 4000451c: 80 a0 a0 00 cmp %g2, 0 40004520: 12 80 00 08 bne 40004540 <== NEVER TAKEN 40004524: c2 04 00 00 ld [ %l0 ], %g1 rtems_termios_ttyHead = tty->forw; 40004528: 05 10 00 6c sethi %hi(0x4001b000), %g2 if ( rtems_termios_ttyHead != NULL ) { 4000452c: 80 a0 60 00 cmp %g1, 0 40004530: 02 80 00 05 be 40004544 40004534: c2 20 a1 fc st %g1, [ %g2 + 0x1fc ] rtems_termios_ttyHead->back = NULL; 40004538: 10 80 00 03 b 40004544 4000453c: c0 20 60 04 clr [ %g1 + 4 ] } } else { tty->back->forw = tty->forw; 40004540: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40004544: 40 00 03 db call 400054b0 40004548: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 4000454c: 40 00 03 d9 call 400054b0 40004550: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40004554: 40 00 03 d7 call 400054b0 40004558: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 4000455c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40004560: 80 a0 60 00 cmp %g1, 0 40004564: 02 80 00 06 be 4000457c <== NEVER TAKEN 40004568: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 4000456c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004570: 80 a0 60 02 cmp %g1, 2 40004574: 12 80 00 04 bne 40004584 <== ALWAYS TAKEN 40004578: 01 00 00 00 nop rtems_semaphore_delete (tty->rawInBuf.Semaphore); 4000457c: 40 00 03 cd call 400054b0 <== NOT EXECUTED 40004580: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 40004584: 40 00 16 ca call 4000a0ac 40004588: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 4000458c: 40 00 16 c8 call 4000a0ac 40004590: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40004594: 40 00 16 c6 call 4000a0ac 40004598: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 4000459c: 40 00 16 c4 call 4000a0ac 400045a0: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 400045a4: 03 10 00 6c sethi %hi(0x4001b000), %g1 400045a8: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 ! 4001b1f4 400045ac: 40 00 04 36 call 40005684 400045b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 400045b4: 81 c7 e0 08 ret 400045b8: 81 e8 00 00 restore =============================================================================== 40002fb8 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40002fb8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40002fbc: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40002fc0: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40002fc4: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED 40002fc8: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40002fcc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002fd0: 12 80 00 0a bne 40002ff8 <== NOT EXECUTED 40002fd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 40002fd8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 40002fdc: 40 00 08 24 call 4000506c <== NOT EXECUTED 40002fe0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40002fe4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002fe8: 02 80 00 11 be 4000302c <== NOT EXECUTED 40002fec: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40002ff0: 40 00 0b 05 call 40005c04 <== NOT EXECUTED 40002ff4: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40002ff8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40002ffc: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40003000: 12 80 00 09 bne 40003024 <== NOT EXECUTED 40003004: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40003008: c2 00 60 d8 ld [ %g1 + 0xd8 ], %g1 ! 4001b0d8 <== NOT EXECUTED 4000300c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003010: 02 80 00 07 be 4000302c <== NOT EXECUTED 40003014: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40003018: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000301c: 01 00 00 00 nop <== NOT EXECUTED 40003020: 30 80 00 03 b,a 4000302c <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 40003024: 7f ff ff 6b call 40002dd0 <== NOT EXECUTED 40003028: 81 e8 00 00 restore <== NOT EXECUTED } } 4000302c: 81 c7 e0 08 ret <== NOT EXECUTED 40003030: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003034 : * 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) { 40003034: 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) { 40003038: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 4000303c: 25 10 00 6c sethi %hi(0x4001b000), %l2 <== NOT EXECUTED 40003040: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003044: a4 14 a0 24 or %l2, 0x24, %l2 <== NOT EXECUTED 40003048: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 4000304c: 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) { 40003050: 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) { 40003054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003058: 12 80 00 11 bne 4000309c <== NOT EXECUTED 4000305c: 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, 40003060: 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); 40003064: a8 06 20 30 add %i0, 0x30, %l4 <== NOT EXECUTED 40003068: a4 10 20 00 clr %l2 <== NOT EXECUTED 4000306c: 10 80 00 ad b 40003320 <== NOT EXECUTED 40003070: 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++; 40003074: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003078: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 4000307c: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40003080: c2 04 80 01 ld [ %l2 + %g1 ], %g1 <== NOT EXECUTED 40003084: 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++; 40003088: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 4000308c: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 40003090: a2 04 7f ff add %l1, -1, %l1 <== NOT EXECUTED 40003094: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003098: 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--) { 4000309c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400030a0: 32 bf ff f5 bne,a 40003074 <== NOT EXECUTED 400030a4: 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 )) { 400030a8: c2 04 20 e4 ld [ %l0 + 0xe4 ], %g1 <== NOT EXECUTED 400030ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400030b0: 12 80 00 a6 bne 40003348 <== NOT EXECUTED 400030b4: 01 00 00 00 nop <== NOT EXECUTED 400030b8: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 400030bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400030c0: 02 80 00 a2 be 40003348 <== NOT EXECUTED 400030c4: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400030c8: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 400030cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400030d0: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 400030d4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400030d8: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED 400030dc: 81 c7 e0 08 ret <== NOT EXECUTED 400030e0: 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) { 400030e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400030e8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400030ec: 02 80 00 1b be 40003158 <== NOT EXECUTED 400030f0: 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]) { 400030f4: c4 0c 20 4a ldub [ %l0 + 0x4a ], %g2 <== NOT EXECUTED 400030f8: 83 2c e0 18 sll %l3, 0x18, %g1 <== NOT EXECUTED 400030fc: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40003100: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003104: 12 80 00 0e bne 4000313c <== NOT EXECUTED 40003108: c4 0c 20 49 ldub [ %l0 + 0x49 ], %g2 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 4000310c: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 40003110: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003114: 12 80 00 05 bne 40003128 <== NOT EXECUTED 40003118: 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; 4000311c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003120: 10 80 00 04 b 40003130 <== NOT EXECUTED 40003124: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40003128: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 4000312c: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40003130: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40003134: 10 80 00 0c b 40003164 <== NOT EXECUTED 40003138: 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]) { 4000313c: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED 40003140: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003144: 12 80 00 06 bne 4000315c <== NOT EXECUTED 40003148: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4000314c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003150: 10 bf ff f8 b 40003130 <== NOT EXECUTED 40003154: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 40003158: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 4000315c: 02 80 00 1c be 400031cc <== NOT EXECUTED 40003160: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40003164: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003168: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 4000316c: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 40003170: 32 80 00 6b bne,a 4000331c <== NOT EXECUTED 40003174: b2 06 60 01 inc %i1 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40003178: 7f ff fa c8 call 40001c98 <== NOT EXECUTED 4000317c: 01 00 00 00 nop <== NOT EXECUTED 40003180: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40003184: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003188: 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; 4000318c: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 40003190: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003198: 02 80 00 09 be 400031bc <== NOT EXECUTED 4000319c: 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); 400031a0: 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, 400031a4: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 400031a8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400031ac: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400031b0: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 400031b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400031b8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 400031bc: 7f ff fa bb call 40001ca8 <== NOT EXECUTED 400031c0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400031c4: 10 80 00 56 b 4000331c <== NOT EXECUTED 400031c8: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 400031cc: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED 400031d0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400031d4: 40 00 4e 5b call 40016b40 <.urem> <== NOT EXECUTED 400031d8: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 400031dc: 7f ff fa af call 40001c98 <== NOT EXECUTED 400031e0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED 400031e4: ac 10 00 08 mov %o0, %l6 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400031e8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 400031ec: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 400031f0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400031f4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400031f8: 40 00 4e 52 call 40016b40 <.urem> <== NOT EXECUTED 400031fc: 90 02 00 11 add %o0, %l1, %o0 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 40003200: c2 04 20 c0 ld [ %l0 + 0xc0 ], %g1 <== NOT EXECUTED 40003204: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003208: 08 80 00 2d bleu 400032bc <== NOT EXECUTED 4000320c: 01 00 00 00 nop <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 40003210: 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) 40003214: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40003218: 12 80 00 29 bne 400032bc <== NOT EXECUTED 4000321c: 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; 40003220: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003224: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 40003228: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 4000322c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003230: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 40003234: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 40003238: 12 80 00 13 bne 40003284 <== NOT EXECUTED 4000323c: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 40003240: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003244: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003248: 12 80 00 06 bne 40003260 <== NOT EXECUTED 4000324c: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 40003250: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40003254: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003258: 12 80 00 19 bne 400032bc <== NOT EXECUTED 4000325c: 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; 40003260: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003264: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003268: 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; 4000326c: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003270: 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; 40003274: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40003278: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000327c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40003280: 30 80 00 0f b,a 400032bc <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 40003284: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003288: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 4000328c: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40003290: 12 80 00 0b bne 400032bc <== NOT EXECUTED 40003294: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40003298: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000329c: 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; 400032a0: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED 400032a4: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 400032a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032ac: 02 80 00 04 be 400032bc <== NOT EXECUTED 400032b0: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 400032b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032b8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 400032bc: 7f ff fa 7b call 40001ca8 <== NOT EXECUTED 400032c0: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 400032c4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 400032c8: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 400032cc: 32 80 00 04 bne,a 400032dc <== NOT EXECUTED 400032d0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 400032d4: 10 80 00 11 b 40003318 <== NOT EXECUTED 400032d8: b0 06 20 01 inc %i0 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 400032dc: 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 )) { 400032e0: 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; 400032e4: 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 )) { 400032e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032ec: 32 80 00 0c bne,a 4000331c <== NOT EXECUTED 400032f0: b2 06 60 01 inc %i1 <== NOT EXECUTED 400032f4: c2 04 20 dc ld [ %l0 + 0xdc ], %g1 <== NOT EXECUTED 400032f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032fc: 22 80 00 08 be,a 4000331c <== NOT EXECUTED 40003300: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003304: d2 04 20 e0 ld [ %l0 + 0xe0 ], %o1 <== NOT EXECUTED 40003308: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000330c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003310: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003314: c2 24 20 e4 st %g1, [ %l0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003318: b2 06 60 01 inc %i1 <== NOT EXECUTED 4000331c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003320: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40003324: 12 bf ff 70 bne 400030e4 <== NOT EXECUTED 40003328: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 4000332c: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40003330: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40003334: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40003338: 40 00 08 d3 call 40005684 <== NOT EXECUTED 4000333c: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED return dropped; 40003340: 81 c7 e0 08 ret <== NOT EXECUTED 40003344: 81 e8 00 00 restore <== NOT EXECUTED } 40003348: 81 c7 e0 08 ret <== NOT EXECUTED 4000334c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40002d4c : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40002d4c: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40002d50: 19 10 00 6c sethi %hi(0x4001b000), %o4 40002d54: c2 03 21 f4 ld [ %o4 + 0x1f4 ], %g1 ! 4001b1f4 40002d58: 80 a0 60 00 cmp %g1, 0 40002d5c: 12 80 00 0d bne 40002d90 40002d60: 98 13 21 f4 or %o4, 0x1f4, %o4 sc = rtems_semaphore_create ( 40002d64: 11 15 14 9b sethi %hi(0x54526c00), %o0 40002d68: 92 10 20 01 mov 1, %o1 40002d6c: 90 12 21 69 or %o0, 0x169, %o0 40002d70: 94 10 20 54 mov 0x54, %o2 40002d74: 40 00 09 5b call 400052e0 40002d78: 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) 40002d7c: 80 a2 20 00 cmp %o0, 0 40002d80: 02 80 00 04 be 40002d90 <== ALWAYS TAKEN 40002d84: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40002d88: 40 00 0b 9f call 40005c04 <== NOT EXECUTED 40002d8c: 01 00 00 00 nop <== NOT EXECUTED 40002d90: 81 c7 e0 08 ret 40002d94: 81 e8 00 00 restore =============================================================================== 40003ff0 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40003ff0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003ff4: c2 06 00 00 ld [ %i0 ], %g1 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40003ff8: 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; 40003ffc: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40004000: 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); 40004004: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 40004008: 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); 4000400c: 92 10 20 00 clr %o1 40004010: 40 00 05 56 call 40005568 40004014: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) { 40004018: b0 92 20 00 orcc %o0, 0, %i0 4000401c: 22 80 00 05 be,a 40004030 <== ALWAYS TAKEN 40004020: c2 04 60 04 ld [ %l1 + 4 ], %g1 args->ioctl_return = sc; 40004024: f0 24 60 0c st %i0, [ %l1 + 0xc ] <== NOT EXECUTED return sc; 40004028: 81 c7 e0 08 ret <== NOT EXECUTED 4000402c: 81 e8 00 00 restore <== NOT EXECUTED } switch (args->command) { 40004030: 80 a0 60 04 cmp %g1, 4 40004034: 22 80 00 bd be,a 40004328 <== NEVER TAKEN 40004038: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 4000403c: 18 80 00 0b bgu 40004068 <== NEVER TAKEN 40004040: 05 10 01 19 sethi %hi(0x40046400), %g2 40004044: 80 a0 60 02 cmp %g1, 2 40004048: 22 80 00 2c be,a 400040f8 4000404c: d2 04 60 08 ld [ %l1 + 8 ], %o1 40004050: 18 80 00 af bgu 4000430c 40004054: 80 a0 60 01 cmp %g1, 1 40004058: 32 80 00 17 bne,a 400040b4 <== NEVER TAKEN 4000405c: 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; 40004060: 10 80 00 22 b 400040e8 40004064: 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) { 40004068: 84 10 a2 7f or %g2, 0x27f, %g2 <== NOT EXECUTED 4000406c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004070: 02 80 00 cf be 400043ac <== NOT EXECUTED 40004074: 01 00 00 00 nop <== NOT EXECUTED 40004078: 18 80 00 07 bgu 40004094 <== NOT EXECUTED 4000407c: 05 10 01 1d sethi %hi(0x40047400), %g2 <== NOT EXECUTED 40004080: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40004084: 32 80 00 0c bne,a 400040b4 <== NOT EXECUTED 40004088: 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; 4000408c: 10 80 00 a3 b 40004318 <== NOT EXECUTED 40004090: 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) { 40004094: 84 10 a0 1a or %g2, 0x1a, %g2 <== NOT EXECUTED 40004098: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000409c: 02 80 00 c0 be 4000439c <== NOT EXECUTED 400040a0: 05 20 01 1d sethi %hi(0x80047400), %g2 <== NOT EXECUTED 400040a4: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <== NOT EXECUTED 400040a8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400040ac: 02 80 00 a3 be 40004338 <== NOT EXECUTED 400040b0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 400040b4: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 400040b8: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 400040bc: 82 10 60 24 or %g1, 0x24, %g1 <== NOT EXECUTED 400040c0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 400040c4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 400040c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400040cc: 02 80 00 c5 be 400043e0 <== NOT EXECUTED 400040d0: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 400040d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400040d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400040dc: 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); 400040e0: 10 80 00 c0 b 400043e0 <== NOT EXECUTED 400040e4: 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; 400040e8: 92 04 20 30 add %l0, 0x30, %o1 400040ec: 40 00 26 8d call 4000db20 400040f0: 94 10 20 24 mov 0x24, %o2 break; 400040f4: 30 80 00 bb b,a 400043e0 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 400040f8: 90 04 20 30 add %l0, 0x30, %o0 400040fc: 40 00 26 89 call 4000db20 40004100: 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) && 40004104: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40004108: 80 88 62 00 btst 0x200, %g1 4000410c: 02 80 00 20 be 4000418c 40004110: 01 00 00 00 nop 40004114: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 40004118: 80 88 64 00 btst 0x400, %g1 4000411c: 12 80 00 1c bne 4000418c <== ALWAYS TAKEN 40004120: 01 00 00 00 nop !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40004124: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004128: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 4000412c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40004130: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004134: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004138: 02 80 00 15 be 4000418c <== NOT EXECUTED 4000413c: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40004140: 7f ff f6 d6 call 40001c98 <== NOT EXECUTED 40004144: 01 00 00 00 nop <== NOT EXECUTED 40004148: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 4000414c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004150: 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; 40004154: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED 40004158: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4000415c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004160: 02 80 00 09 be 40004184 <== NOT EXECUTED 40004164: 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); 40004168: 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, 4000416c: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40004170: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40004174: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40004178: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 4000417c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004180: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004184: 7f ff f6 c9 call 40001ca8 <== NOT EXECUTED 40004188: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 4000418c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40004190: 80 88 64 00 btst 0x400, %g1 40004194: 02 80 00 0c be 400041c4 <== ALWAYS TAKEN 40004198: 03 00 00 04 sethi %hi(0x1000), %g1 4000419c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 400041a0: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400041a4: 12 80 00 08 bne 400041c4 <== NOT EXECUTED 400041a8: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400041ac: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041b0: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400041b4: 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); 400041b8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041bc: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 400041c0: 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) && 400041c4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 400041c8: 80 88 61 00 btst 0x100, %g1 400041cc: 02 80 00 16 be 40004224 <== ALWAYS TAKEN 400041d0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 400041d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400041d8: 06 80 00 14 bl 40004228 <== NOT EXECUTED 400041dc: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 400041e0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041e4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 400041e8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 400041ec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400041f0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 400041f4: 02 80 00 08 be 40004214 <== NOT EXECUTED 400041f8: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 400041fc: 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) && 40004200: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004204: 02 80 00 04 be 40004214 <== NOT EXECUTED 40004208: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 4000420c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004210: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 40004214: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004218: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 4000421c: 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) { 40004220: c2 04 20 38 ld [ %l0 + 0x38 ], %g1 <== NOT EXECUTED 40004224: 80 a0 60 00 cmp %g1, 0 40004228: 36 80 00 06 bge,a 40004240 <== ALWAYS TAKEN 4000422c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 tty->flow_ctrl |= FL_MDRTS; 40004230: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004234: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40004238: 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) { 4000423c: c4 04 20 30 ld [ %l0 + 0x30 ], %g2 <== NOT EXECUTED 40004240: 03 00 00 04 sethi %hi(0x1000), %g1 40004244: 80 88 80 01 btst %g2, %g1 40004248: 22 80 00 06 be,a 40004260 <== ALWAYS TAKEN 4000424c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 tty->flow_ctrl |= FL_MDXOF; 40004250: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40004254: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 40004258: 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) { 4000425c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 <== NOT EXECUTED 40004260: 80 88 64 00 btst 0x400, %g1 40004264: 22 80 00 06 be,a 4000427c <== NEVER TAKEN 40004268: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 4000426c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40004270: 82 10 62 00 or %g1, 0x200, %g1 40004274: 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) { 40004278: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 4000427c: 80 88 60 02 btst 2, %g1 40004280: 32 80 00 17 bne,a 400042dc <== ALWAYS TAKEN 40004284: 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; 40004288: 40 00 02 ee call 40004e40 <== NOT EXECUTED 4000428c: 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] * 40004290: 40 00 49 46 call 400167a8 <.umul> <== NOT EXECUTED 40004294: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40004298: 40 00 49 7e call 40016890 <.udiv> <== NOT EXECUTED 4000429c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 400042a0: 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] * 400042a4: d0 24 20 54 st %o0, [ %l0 + 0x54 ] <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 400042a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042ac: 02 80 00 08 be 400042cc <== NOT EXECUTED 400042b0: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 400042b4: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 400042b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042bc: 12 80 00 09 bne 400042e0 <== NOT EXECUTED 400042c0: d0 24 20 70 st %o0, [ %l0 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 400042c4: 10 80 00 0a b 400042ec <== NOT EXECUTED 400042c8: d0 24 20 74 st %o0, [ %l0 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 400042cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042d0: 02 80 00 06 be 400042e8 <== NOT EXECUTED 400042d4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 400042d8: c0 24 20 6c clr [ %l0 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 400042dc: c0 24 20 70 clr [ %l0 + 0x70 ] tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 400042e0: 10 80 00 03 b 400042ec 400042e4: c0 24 20 74 clr [ %l0 + 0x74 ] } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 400042e8: c2 24 20 6c st %g1, [ %l0 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 400042ec: c2 04 20 a8 ld [ %l0 + 0xa8 ], %g1 400042f0: 80 a0 60 00 cmp %g1, 0 400042f4: 02 80 00 3b be 400043e0 <== NEVER TAKEN 400042f8: 01 00 00 00 nop (*tty->device.setAttributes)(tty->minor, &tty->termios); 400042fc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 40004300: 9f c0 40 00 call %g1 40004304: 92 04 20 30 add %l0, 0x30, %o1 40004308: 30 80 00 36 b,a 400043e0 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 4000430c: 7f ff fe 2d call 40003bc0 40004310: 90 10 00 10 mov %l0, %o0 break; 40004314: 30 80 00 33 b,a 400043e0 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40004318: c2 24 20 d4 st %g1, [ %l0 + 0xd4 ] <== NOT EXECUTED 4000431c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 40004320: 10 80 00 30 b 400043e0 <== NOT EXECUTED 40004324: c2 24 20 d8 st %g1, [ %l0 + 0xd8 ] <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 40004328: c2 24 20 dc st %g1, [ %l0 + 0xdc ] <== NOT EXECUTED 4000432c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 <== NOT EXECUTED break; 40004330: 10 80 00 2c b 400043e0 <== NOT EXECUTED 40004334: 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) { 40004338: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000433c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004340: 82 10 60 24 or %g1, 0x24, %g1 <== NOT EXECUTED 40004344: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40004348: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000434c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004350: 22 80 00 06 be,a 40004368 <== NOT EXECUTED 40004354: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40004358: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000435c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004360: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40004364: 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) { 40004368: 07 10 00 6c sethi %hi(0x4001b000), %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); 4000436c: 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) { 40004370: 86 10 e0 24 or %g3, 0x24, %g3 <== NOT EXECUTED 40004374: 83 28 a0 05 sll %g2, 5, %g1 <== NOT EXECUTED 40004378: 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); 4000437c: 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) { 40004380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004384: 02 80 00 17 be 400043e0 <== NOT EXECUTED 40004388: c0 24 20 d0 clr [ %l0 + 0xd0 ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4000438c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004390: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004394: 10 80 00 13 b 400043e0 <== NOT EXECUTED 40004398: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 4000439c: c2 04 60 08 ld [ %l1 + 8 ], %g1 <== NOT EXECUTED 400043a0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED break; 400043a4: 10 80 00 0f b 400043e0 <== NOT EXECUTED 400043a8: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 400043ac: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 400043b0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 400043b4: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED 400043b8: 3c 80 00 05 bpos,a 400043cc <== NOT EXECUTED 400043bc: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 400043c0: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 400043c4: 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; 400043c8: c8 04 20 20 ld [ %l0 + 0x20 ], %g4 <== NOT EXECUTED 400043cc: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 400043d0: c4 04 60 08 ld [ %l1 + 8 ], %g2 <== NOT EXECUTED 400043d4: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED 400043d8: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 400043dc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 400043e0: 40 00 04 a9 call 40005684 400043e4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 args->ioctl_return = sc; 400043e8: f0 24 60 0c st %i0, [ %l1 + 0xc ] return sc; } 400043ec: 81 c7 e0 08 ret 400043f0: 81 e8 00 00 restore =============================================================================== 40004594 : #include int rtems_termios_number_to_baud( int32_t baud ) { 40004594: 82 10 00 08 mov %o0, %g1 int termios_baud; switch (baud) { 40004598: 80 a2 24 b0 cmp %o0, 0x4b0 4000459c: 02 80 00 19 be 40004600 400045a0: 90 10 20 09 mov 9, %o0 400045a4: 80 a0 64 b0 cmp %g1, 0x4b0 400045a8: 14 80 00 29 bg 4000464c 400045ac: 05 00 00 12 sethi %hi(0x4800), %g2 400045b0: 80 a0 60 86 cmp %g1, 0x86 400045b4: 02 80 00 13 be 40004600 400045b8: 90 10 20 04 mov 4, %o0 400045bc: 80 a0 60 86 cmp %g1, 0x86 400045c0: 14 80 00 12 bg 40004608 400045c4: 80 a0 60 c8 cmp %g1, 0xc8 400045c8: 80 a0 60 32 cmp %g1, 0x32 400045cc: 02 80 00 0d be 40004600 400045d0: 90 10 20 01 mov 1, %o0 400045d4: 80 a0 60 32 cmp %g1, 0x32 400045d8: 34 80 00 05 bg,a 400045ec 400045dc: 80 a0 60 4b cmp %g1, 0x4b 400045e0: 80 a0 60 00 cmp %g1, 0 400045e4: 10 80 00 52 b 4000472c 400045e8: 90 10 20 00 clr %o0 400045ec: 02 80 00 05 be 40004600 400045f0: 90 10 20 02 mov 2, %o0 400045f4: 80 a0 60 6e cmp %g1, 0x6e 400045f8: 12 80 00 4f bne 40004734 <== NEVER TAKEN 400045fc: 90 10 20 03 mov 3, %o0 40004600: 81 c3 e0 08 retl 40004604: 01 00 00 00 nop 40004608: 02 bf ff fe be 40004600 4000460c: 90 10 20 06 mov 6, %o0 ! 6 40004610: 80 a0 60 c8 cmp %g1, 0xc8 40004614: 14 80 00 07 bg 40004630 40004618: 80 a0 61 2c cmp %g1, 0x12c 4000461c: 80 a0 60 96 cmp %g1, 0x96 40004620: 12 80 00 45 bne 40004734 <== NEVER TAKEN 40004624: 90 10 20 05 mov 5, %o0 40004628: 81 c3 e0 08 retl 4000462c: 01 00 00 00 nop 40004630: 02 bf ff f4 be 40004600 40004634: 90 10 20 07 mov 7, %o0 ! 7 40004638: 80 a0 62 58 cmp %g1, 0x258 4000463c: 12 80 00 3e bne 40004734 <== NEVER TAKEN 40004640: 90 10 20 08 mov 8, %o0 40004644: 81 c3 e0 08 retl 40004648: 01 00 00 00 nop 4000464c: 84 10 a3 00 or %g2, 0x300, %g2 40004650: 80 a0 40 02 cmp %g1, %g2 40004654: 02 bf ff eb be 40004600 40004658: 90 10 20 0e mov 0xe, %o0 4000465c: 80 a0 40 02 cmp %g1, %g2 40004660: 14 80 00 18 bg 400046c0 40004664: 07 00 00 70 sethi %hi(0x1c000), %g3 40004668: 80 a0 69 60 cmp %g1, 0x960 4000466c: 02 bf ff e5 be 40004600 40004670: 90 10 20 0b mov 0xb, %o0 40004674: 80 a0 69 60 cmp %g1, 0x960 40004678: 34 80 00 07 bg,a 40004694 4000467c: 05 00 00 04 sethi %hi(0x1000), %g2 40004680: 80 a0 67 08 cmp %g1, 0x708 40004684: 12 80 00 2c bne 40004734 <== NEVER TAKEN 40004688: 90 10 20 0a mov 0xa, %o0 4000468c: 81 c3 e0 08 retl 40004690: 01 00 00 00 nop 40004694: 84 10 a2 c0 or %g2, 0x2c0, %g2 40004698: 80 a0 40 02 cmp %g1, %g2 4000469c: 02 bf ff d9 be 40004600 400046a0: 90 10 20 0c mov 0xc, %o0 400046a4: 05 00 00 09 sethi %hi(0x2400), %g2 400046a8: 84 10 a1 80 or %g2, 0x180, %g2 ! 2580 400046ac: 80 a0 40 02 cmp %g1, %g2 400046b0: 12 80 00 21 bne 40004734 400046b4: 90 10 20 0d mov 0xd, %o0 400046b8: 81 c3 e0 08 retl 400046bc: 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; 400046c0: 05 00 00 04 sethi %hi(0x1000), %g2 int32_t baud ) { int termios_baud; switch (baud) { 400046c4: 86 10 e2 00 or %g3, 0x200, %g3 400046c8: 80 a0 40 03 cmp %g1, %g3 400046cc: 02 bf ff cd be 40004600 400046d0: 90 10 a0 02 or %g2, 2, %o0 400046d4: 80 a0 40 03 cmp %g1, %g3 400046d8: 14 80 00 0f bg 40004714 400046dc: 07 00 00 e1 sethi %hi(0x38400), %g3 400046e0: 07 00 00 25 sethi %hi(0x9400), %g3 400046e4: 86 10 e2 00 or %g3, 0x200, %g3 ! 9600 400046e8: 80 a0 40 03 cmp %g1, %g3 400046ec: 02 bf ff c5 be 40004600 400046f0: 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; 400046f4: 90 10 a0 01 or %g2, 1, %o0 int32_t baud ) { int termios_baud; switch (baud) { 400046f8: 05 00 00 38 sethi %hi(0xe000), %g2 400046fc: 84 10 a1 00 or %g2, 0x100, %g2 ! e100 40004700: 80 a0 40 02 cmp %g1, %g2 40004704: 32 bf ff bf bne,a 40004600 <== NEVER TAKEN 40004708: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000470c: 81 c3 e0 08 retl 40004710: 01 00 00 00 nop 40004714: 80 a0 40 03 cmp %g1, %g3 40004718: 02 bf ff ba be 40004600 4000471c: 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; 40004720: 90 10 a0 04 or %g2, 4, %o0 int32_t baud ) { int termios_baud; switch (baud) { 40004724: 05 00 01 c2 sethi %hi(0x70800), %g2 40004728: 80 a0 40 02 cmp %g1, %g2 4000472c: 02 80 00 03 be 40004738 40004730: 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; 40004734: 90 10 3f ff mov -1, %o0 ! ffffffff default: termios_baud = -1; break; } return termios_baud; } 40004738: 81 c3 e0 08 retl =============================================================================== 400045bc : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 400045bc: 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, 400045c0: 03 10 00 6c sethi %hi(0x4001b000), %g1 400045c4: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 ! 4001b1f4 400045c8: 92 10 20 00 clr %o1 400045cc: 40 00 03 e7 call 40005568 400045d0: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400045d4: a0 92 20 00 orcc %o0, 0, %l0 400045d8: 12 80 01 05 bne 400049ec <== NEVER TAKEN 400045dc: 03 10 00 6c sethi %hi(0x4001b000), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 400045e0: 10 80 00 0a b 40004608 400045e4: e4 00 61 fc ld [ %g1 + 0x1fc ], %l2 ! 4001b1fc if ((tty->major == major) && (tty->minor == minor)) 400045e8: 80 a0 40 18 cmp %g1, %i0 400045ec: 32 80 00 07 bne,a 40004608 400045f0: e4 04 80 00 ld [ %l2 ], %l2 400045f4: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 400045f8: 80 a0 40 19 cmp %g1, %i1 400045fc: 22 80 00 d6 be,a 40004954 <== ALWAYS TAKEN 40004600: 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) { 40004604: e4 04 80 00 ld [ %l2 ], %l2 <== NOT EXECUTED 40004608: 80 a4 a0 00 cmp %l2, 0 4000460c: 32 bf ff f7 bne,a 400045e8 40004610: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004614: 10 80 00 f8 b 400049f4 40004618: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 4000461c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40004620: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 4001aaec 40004624: c2 24 a0 64 st %g1, [ %l2 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40004628: d0 04 a0 64 ld [ %l2 + 0x64 ], %o0 4000462c: 40 00 17 fa call 4000a614 40004630: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40004634: 80 a2 20 00 cmp %o0, 0 40004638: 12 80 00 08 bne 40004658 <== ALWAYS TAKEN 4000463c: d0 24 a0 58 st %o0, [ %l2 + 0x58 ] free(tty); 40004640: 40 00 16 9b call 4000a0ac <== NOT EXECUTED 40004644: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40004648: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 4000464c: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED 40004650: 10 80 00 e5 b 400049e4 <== NOT EXECUTED 40004654: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40004658: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000465c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 4001aaf0 40004660: c2 24 a0 88 st %g1, [ %l2 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40004664: d0 04 a0 88 ld [ %l2 + 0x88 ], %o0 40004668: 40 00 17 eb call 4000a614 4000466c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40004670: 80 a2 20 00 cmp %o0, 0 40004674: 12 80 00 05 bne 40004688 <== ALWAYS TAKEN 40004678: d0 24 a0 7c st %o0, [ %l2 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 4000467c: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40004680: 10 80 00 0c b 400046b0 <== NOT EXECUTED 40004684: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40004688: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000468c: 40 00 17 e2 call 4000a614 40004690: d0 00 62 e8 ld [ %g1 + 0x2e8 ], %o0 ! 4001aae8 if (tty->cbuf == NULL) { 40004694: 80 a2 20 00 cmp %o0, 0 40004698: 12 80 00 0c bne 400046c8 <== ALWAYS TAKEN 4000469c: d0 24 a0 1c st %o0, [ %l2 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 400046a0: d0 04 a0 7c ld [ %l2 + 0x7c ], %o0 <== NOT EXECUTED 400046a4: 40 00 16 82 call 4000a0ac <== NOT EXECUTED 400046a8: a0 10 20 1a mov 0x1a, %l0 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 400046ac: d0 04 a0 58 ld [ %l2 + 0x58 ], %o0 <== NOT EXECUTED 400046b0: 40 00 16 7f call 4000a0ac <== NOT EXECUTED 400046b4: 01 00 00 00 nop <== NOT EXECUTED free(tty); 400046b8: 40 00 16 7d call 4000a0ac <== NOT EXECUTED 400046bc: 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); 400046c0: 10 80 00 c8 b 400049e0 <== NOT EXECUTED 400046c4: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 400046c8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400046cc: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 4001b1fc return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 400046d0: c0 24 a0 d4 clr [ %l2 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 400046d4: c0 24 a0 d8 clr [ %l2 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 400046d8: c0 24 a0 dc clr [ %l2 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 400046dc: c0 24 a0 e0 clr [ %l2 + 0xe0 ] tty->tty_rcvwakeup = 0; 400046e0: c0 24 a0 e4 clr [ %l2 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 400046e4: c2 24 80 00 st %g1, [ %l2 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 400046e8: 80 a0 60 00 cmp %g1, 0 400046ec: 02 80 00 03 be 400046f8 400046f0: c0 24 a0 04 clr [ %l2 + 4 ] rtems_termios_ttyHead->back = tty; 400046f4: e4 20 60 04 st %l2, [ %g1 + 4 ] rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 400046f8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400046fc: c4 00 61 f8 ld [ %g1 + 0x1f8 ], %g2 ! 4001b1f8 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 40004700: 07 10 00 6c sethi %hi(0x4001b000), %g3 if (rtems_termios_ttyTail == NULL) 40004704: 80 a0 a0 00 cmp %g2, 0 40004708: 12 80 00 03 bne 40004714 4000470c: e2 20 e1 fc st %l1, [ %g3 + 0x1fc ] rtems_termios_ttyTail = tty; 40004710: e2 20 61 f8 st %l1, [ %g1 + 0x1f8 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40004714: 27 10 00 6a sethi %hi(0x4001a800), %l3 40004718: d0 4c e2 f4 ldsb [ %l3 + 0x2f4 ], %o0 ! 4001aaf4 4000471c: 03 15 14 9a sethi %hi(0x54526800), %g1 40004720: 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; 40004724: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 40004728: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 4000472c: 90 12 00 01 or %o0, %g1, %o0 40004730: 92 10 20 01 mov 1, %o1 40004734: 94 10 20 54 mov 0x54, %o2 40004738: 96 10 20 00 clr %o3 4000473c: 40 00 02 e9 call 400052e0 40004740: 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) 40004744: 80 a2 20 00 cmp %o0, 0 40004748: 12 80 00 a3 bne 400049d4 <== NEVER TAKEN 4000474c: 03 15 14 9b sethi %hi(0x54526c00), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40004750: d0 4c e2 f4 ldsb [ %l3 + 0x2f4 ], %o0 40004754: 82 10 63 00 or %g1, 0x300, %g1 40004758: 92 10 20 01 mov 1, %o1 4000475c: 90 12 00 01 or %o0, %g1, %o0 40004760: 94 10 20 54 mov 0x54, %o2 40004764: 96 10 20 00 clr %o3 40004768: 40 00 02 de call 400052e0 4000476c: 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) 40004770: 80 a2 20 00 cmp %o0, 0 40004774: 12 80 00 98 bne 400049d4 <== NEVER TAKEN 40004778: 03 15 14 9e sethi %hi(0x54527800), %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4000477c: d0 4c e2 f4 ldsb [ %l3 + 0x2f4 ], %o0 40004780: 92 10 20 00 clr %o1 40004784: 90 12 00 01 or %o0, %g1, %o0 40004788: 94 10 20 20 mov 0x20, %o2 4000478c: 96 10 20 00 clr %o3 40004790: 40 00 02 d4 call 400052e0 40004794: 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) 40004798: 80 a2 20 00 cmp %o0, 0 4000479c: 12 80 00 8e bne 400049d4 <== NEVER TAKEN 400047a0: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 400047a4: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 400047a8: 90 04 60 98 add %l1, 0x98, %o0 400047ac: 40 00 24 dd call 4000db20 400047b0: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400047b4: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 400047b8: 80 a0 60 02 cmp %g1, 2 400047bc: 32 80 00 1a bne,a 40004824 <== ALWAYS TAKEN 400047c0: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 sc = rtems_task_create ( 400047c4: d0 4c e2 f4 ldsb [ %l3 + 0x2f4 ], %o0 <== NOT EXECUTED 400047c8: 03 15 1e 15 sethi %hi(0x54785400), %g1 <== NOT EXECUTED 400047cc: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 400047d0: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 400047d4: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 400047d8: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 400047dc: 98 10 20 00 clr %o4 <== NOT EXECUTED 400047e0: 40 00 03 d5 call 40005734 <== NOT EXECUTED 400047e4: 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) 400047e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400047ec: 12 80 00 7a bne 400049d4 <== NOT EXECUTED 400047f0: 03 14 9e 15 sethi %hi(0x52785400), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 400047f4: d0 4c e2 f4 ldsb [ %l3 + 0x2f4 ], %o0 <== NOT EXECUTED 400047f8: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 400047fc: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40004800: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004804: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004808: 98 10 20 00 clr %o4 <== NOT EXECUTED 4000480c: 40 00 03 ca call 40005734 <== NOT EXECUTED 40004810: 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) 40004814: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004818: 12 80 00 6f bne 400049d4 <== NOT EXECUTED 4000481c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40004820: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 40004824: 80 a0 60 00 cmp %g1, 0 40004828: 02 80 00 07 be 40004844 <== NEVER TAKEN 4000482c: 03 10 00 6a sethi %hi(0x4001a800), %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 40004830: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004834: 80 a0 60 02 cmp %g1, 2 40004838: 12 80 00 0f bne 40004874 <== ALWAYS TAKEN 4000483c: 84 10 20 03 mov 3, %g2 sc = rtems_semaphore_create ( 40004840: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40004844: d0 48 62 f4 ldsb [ %g1 + 0x2f4 ], %o0 ! 4001aaf4 <== NOT EXECUTED 40004848: 03 15 14 9c sethi %hi(0x54527000), %g1 <== NOT EXECUTED 4000484c: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <== NOT EXECUTED 40004850: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004854: 90 12 00 01 or %o0, %g1, %o0 <== NOT EXECUTED 40004858: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 4000485c: 96 10 20 00 clr %o3 <== NOT EXECUTED 40004860: 40 00 02 a0 call 400052e0 <== NOT EXECUTED 40004864: 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) 40004868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000486c: 12 80 00 5a bne 400049d4 <== NOT EXECUTED 40004870: 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'; 40004874: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004878: 84 10 20 1c mov 0x1c, %g2 4000487c: c4 2c 60 42 stb %g2, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40004880: 84 10 20 7f mov 0x7f, %g2 40004884: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004888: 84 10 20 15 mov 0x15, %g2 4000488c: c4 2c 60 44 stb %g2, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40004890: 84 10 20 04 mov 4, %g2 40004894: 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'; 40004898: 84 10 20 11 mov 0x11, %g2 4000489c: c4 2c 60 49 stb %g2, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 400048a0: 84 10 20 13 mov 0x13, %g2 400048a4: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 400048a8: 84 10 20 1a mov 0x1a, %g2 400048ac: c4 2c 60 4b stb %g2, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 400048b0: 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; 400048b4: 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'; 400048b8: 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; 400048bc: 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'; 400048c0: 84 10 20 0f mov 0xf, %g2 400048c4: c4 2c 60 4e stb %g2, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 400048c8: 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; 400048cc: 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'; 400048d0: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 400048d4: 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'; 400048d8: c0 2c 60 4c clrb [ %l1 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 400048dc: 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') 400048e0: 03 10 00 6a sethi %hi(0x4001a800), %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'; 400048e4: 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') 400048e8: c4 08 62 f4 ldub [ %g1 + 0x2f4 ], %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; 400048ec: c8 24 60 bc st %g4, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 400048f0: 09 00 00 09 sethi %hi(0x2400), %g4 400048f4: 88 11 21 02 or %g4, 0x102, %g4 ! 2502 400048f8: c8 24 60 30 st %g4, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 400048fc: 09 00 00 06 sethi %hi(0x1800), %g4 40004900: 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; 40004904: 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; 40004908: c8 24 60 34 st %g4, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 4000490c: 88 10 28 bd mov 0x8bd, %g4 40004910: c8 24 60 38 st %g4, [ %l1 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40004914: 09 00 00 20 sethi %hi(0x8000), %g4 40004918: 88 11 22 3b or %g4, 0x23b, %g4 ! 823b 4000491c: 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; 40004920: 89 28 e0 01 sll %g3, 1, %g4 40004924: 86 01 00 03 add %g4, %g3, %g3 40004928: 87 30 e0 02 srl %g3, 2, %g3 4000492c: c6 24 60 c0 st %g3, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40004930: 86 00 a0 01 add %g2, 1, %g3 40004934: 85 28 a0 18 sll %g2, 0x18, %g2 40004938: 85 38 a0 18 sra %g2, 0x18, %g2 4000493c: 80 a0 a0 7a cmp %g2, 0x7a 40004940: 12 80 00 04 bne 40004950 <== ALWAYS TAKEN 40004944: c6 28 62 f4 stb %g3, [ %g1 + 0x2f4 ] c = 'a'; 40004948: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 4000494c: c4 28 62 f4 stb %g2, [ %g1 + 0x2f4 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 40004950: c2 04 a0 08 ld [ %l2 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40004954: c6 06 80 00 ld [ %i2 ], %g3 if (!tty->refcount++) { 40004958: 84 00 60 01 add %g1, 1, %g2 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 4000495c: e4 20 e0 38 st %l2, [ %g3 + 0x38 ] if (!tty->refcount++) { 40004960: 80 a0 60 00 cmp %g1, 0 40004964: 12 80 00 1e bne 400049dc 40004968: c4 24 a0 08 st %g2, [ %l2 + 8 ] if (tty->device.firstOpen) 4000496c: c2 04 a0 98 ld [ %l2 + 0x98 ], %g1 40004970: 80 a0 60 00 cmp %g1, 0 40004974: 02 80 00 05 be 40004988 <== ALWAYS TAKEN 40004978: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 4000497c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004980: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004984: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004988: c2 04 a0 b4 ld [ %l2 + 0xb4 ], %g1 4000498c: 80 a0 60 02 cmp %g1, 2 40004990: 12 80 00 14 bne 400049e0 <== ALWAYS TAKEN 40004994: 03 10 00 6c sethi %hi(0x4001b000), %g1 sc = rtems_task_start(tty->rxTaskId, 40004998: d0 04 a0 c4 ld [ %l2 + 0xc4 ], %o0 <== NOT EXECUTED 4000499c: 13 10 00 12 sethi %hi(0x40004800), %o1 <== NOT EXECUTED 400049a0: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 400049a4: 40 00 04 0a call 400059cc <== NOT EXECUTED 400049a8: 92 12 62 8c or %o1, 0x28c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 400049ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400049b0: 12 80 00 09 bne 400049d4 <== NOT EXECUTED 400049b4: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 400049b8: d0 04 a0 c8 ld [ %l2 + 0xc8 ], %o0 <== NOT EXECUTED 400049bc: 13 10 00 12 sethi %hi(0x40004800), %o1 <== NOT EXECUTED 400049c0: 40 00 04 03 call 400059cc <== NOT EXECUTED 400049c4: 92 12 62 10 or %o1, 0x210, %o1 ! 40004a10 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 400049c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400049cc: 02 80 00 05 be 400049e0 <== NOT EXECUTED 400049d0: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400049d4: 40 00 04 8c call 40005c04 <== NOT EXECUTED 400049d8: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 400049dc: 03 10 00 6c sethi %hi(0x4001b000), %g1 400049e0: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 ! 4001b1f4 400049e4: 40 00 03 28 call 40005684 400049e8: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 400049ec: 81 c7 e0 08 ret 400049f0: 91 e8 00 10 restore %g0, %l0, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 400049f4: 40 00 15 68 call 40009f94 400049f8: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 400049fc: a4 92 20 00 orcc %o0, 0, %l2 40004a00: 12 bf ff 07 bne 4000461c <== ALWAYS TAKEN 40004a04: 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); 40004a08: 10 bf ff 11 b 4000464c <== NOT EXECUTED 40004a0c: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED =============================================================================== 40003350 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40003350: 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) { 40003354: 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) { 40003358: 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) { 4000335c: 80 a0 60 00 cmp %g1, 0 40003360: 12 80 00 08 bne 40003380 <== NEVER TAKEN 40003364: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 40003368: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 4000336c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40003370: 9f c0 40 00 call %g1 40003374: 94 10 00 19 mov %i1, %o2 return; 40003378: 81 c7 e0 08 ret 4000337c: 81 e8 00 00 restore } newHead = tty->rawOutBuf.Head; 40003380: 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; 40003384: 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) { 40003388: 10 80 00 39 b 4000346c <== NOT EXECUTED 4000338c: 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; 40003390: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40003394: 40 00 4d eb call 40016b40 <.urem> <== NOT EXECUTED 40003398: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 4000339c: 7f ff fa 3f call 40001c98 <== NOT EXECUTED 400033a0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400033a4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 400033a8: 30 80 00 0f b,a 400033e4 <== NOT EXECUTED tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 400033ac: 7f ff fa 3f call 40001ca8 <== NOT EXECUTED 400033b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 400033b4: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400033b8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400033bc: 40 00 08 6b call 40005568 <== NOT EXECUTED 400033c0: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400033c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400033c8: 02 80 00 04 be 400033d8 <== NOT EXECUTED 400033cc: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400033d0: 40 00 0a 0d call 40005c04 <== NOT EXECUTED 400033d4: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 400033d8: 7f ff fa 30 call 40001c98 <== NOT EXECUTED 400033dc: 01 00 00 00 nop <== NOT EXECUTED 400033e0: 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) { 400033e4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400033e8: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400033ec: 22 bf ff f0 be,a 400033ac <== NOT EXECUTED 400033f0: 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++; 400033f4: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1 <== NOT EXECUTED 400033f8: c6 0c 40 00 ldub [ %l1 ], %g3 <== NOT EXECUTED 400033fc: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2 <== NOT EXECUTED 40003400: c6 28 80 01 stb %g3, [ %g2 + %g1 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 40003404: 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; 40003408: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 4000340c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003410: 32 80 00 14 bne,a 40003460 <== NOT EXECUTED 40003414: a2 04 60 01 inc %l1 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 40003418: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 4000341c: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40003420: 12 80 00 0b bne 4000344c <== NOT EXECUTED 40003424: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 40003428: 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, 4000342c: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1 <== NOT EXECUTED 40003430: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 <== NOT EXECUTED 40003434: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 40003438: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 4000343c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003440: 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; 40003444: 10 80 00 06 b 4000345c <== NOT EXECUTED 40003448: 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; 4000344c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40003450: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40003454: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40003458: 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++; 4000345c: 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); 40003460: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003464: 7f ff fa 11 call 40001ca8 <== NOT EXECUTED 40003468: 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) { 4000346c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003470: 12 bf ff c8 bne 40003390 <== NOT EXECUTED 40003474: 01 00 00 00 nop <== NOT EXECUTED 40003478: 81 c7 e0 08 ret <== NOT EXECUTED 4000347c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003c3c : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003c3c: 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; 40003c40: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40003c44: 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; 40003c48: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40003c4c: 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); 40003c50: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003c54: 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); 40003c58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003c5c: 40 00 06 43 call 40005568 <== NOT EXECUTED 40003c60: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003c64: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003c68: 12 80 00 10 bne 40003ca8 <== NOT EXECUTED 40003c6c: 05 10 00 6c sethi %hi(0x4001b000), %g2 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40003c70: c2 04 20 cc ld [ %l0 + 0xcc ], %g1 <== NOT EXECUTED 40003c74: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40003c78: 84 10 a0 24 or %g2, 0x24, %g2 <== NOT EXECUTED 40003c7c: 82 00 60 08 add %g1, 8, %g1 <== NOT EXECUTED 40003c80: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40003c84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c88: 02 80 00 0a be 40003cb0 <== NOT EXECUTED 40003c8c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40003c90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003c94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003c98: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003c9c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40003ca0: 40 00 06 79 call 40005684 <== NOT EXECUTED 40003ca4: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED return sc; 40003ca8: 81 c7 e0 08 ret <== NOT EXECUTED 40003cac: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->cindex == tty->ccount) { 40003cb0: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40003cb4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003cb8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003cbc: 12 80 00 be bne 40003fb4 <== NOT EXECUTED 40003cc0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40003cc4: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 <== NOT EXECUTED if (tty->device.pollRead != NULL 40003cc8: 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; 40003ccc: 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; 40003cd0: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40003cd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cd8: 02 80 00 4c be 40003e08 <== NOT EXECUTED 40003cdc: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 40003ce0: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40003ce4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ce8: 12 80 00 49 bne 40003e0c <== NOT EXECUTED 40003cec: 2f 10 00 6a sethi %hi(0x4001a800), %l7 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40003cf0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003cf4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003cf8: 02 80 00 13 be 40003d44 <== NOT EXECUTED 40003cfc: 01 00 00 00 nop <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003d00: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003d04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d08: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003d0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003d10: 16 80 00 06 bge 40003d28 <== NOT EXECUTED 40003d14: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40003d18: 40 00 07 49 call 40005a3c <== NOT EXECUTED 40003d1c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003d20: 10 bf ff f9 b 40003d04 <== NOT EXECUTED 40003d24: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40003d28: 7f ff ff 5f call 40003aa4 <== NOT EXECUTED 40003d2c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003d30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003d34: 22 bf ff f4 be,a 40003d04 <== NOT EXECUTED 40003d38: 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)) { 40003d3c: 10 80 00 9e b 40003fb4 <== NOT EXECUTED 40003d40: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 40003d44: 40 00 04 47 call 40004e60 <== NOT EXECUTED 40003d48: 01 00 00 00 nop <== NOT EXECUTED 40003d4c: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003d50: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003d54: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003d58: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003d5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003d60: 36 80 00 1c bge,a 40003dd0 <== NOT EXECUTED 40003d64: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40003d68: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40003d6c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003d70: 02 80 00 0a be 40003d98 <== NOT EXECUTED 40003d74: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40003d78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d7c: 02 80 00 11 be 40003dc0 <== NOT EXECUTED 40003d80: 01 00 00 00 nop <== NOT EXECUTED 40003d84: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003d88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d8c: 02 80 00 0d be 40003dc0 <== NOT EXECUTED 40003d90: 01 00 00 00 nop <== NOT EXECUTED 40003d94: 30 80 00 04 b,a 40003da4 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40003d98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d9c: 02 80 00 86 be 40003fb4 <== NOT EXECUTED 40003da0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 40003da4: 40 00 04 2f call 40004e60 <== NOT EXECUTED 40003da8: 01 00 00 00 nop <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40003dac: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 40003db0: 90 22 00 13 sub %o0, %l3, %o0 <== NOT EXECUTED 40003db4: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003db8: 18 80 00 7f bgu 40003fb4 <== NOT EXECUTED 40003dbc: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 40003dc0: 40 00 07 1f call 40005a3c <== NOT EXECUTED 40003dc4: 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); 40003dc8: 10 bf ff e3 b 40003d54 <== NOT EXECUTED 40003dcc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 40003dd0: 7f ff ff 35 call 40003aa4 <== NOT EXECUTED 40003dd4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40003dd8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40003ddc: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003de0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003de4: 16 80 00 73 bge 40003fb0 <== NOT EXECUTED 40003de8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40003dec: 22 bf ff da be,a 40003d54 <== NOT EXECUTED 40003df0: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003df4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40003df8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003dfc: 22 bf ff d6 be,a 40003d54 <== NOT EXECUTED 40003e00: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003e04: 30 bf ff d0 b,a 40003d44 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003e08: 2f 10 00 6a sethi %hi(0x4001a800), %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; 40003e0c: 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) && 40003e10: ae 15 e2 e8 or %l7, 0x2e8, %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, 40003e14: ac 04 20 49 add %l0, 0x49, %l6 <== NOT EXECUTED 40003e18: 10 80 00 4b b 40003f44 <== NOT EXECUTED 40003e1c: 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; 40003e20: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40003e24: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003e28: 40 00 4b 46 call 40016b40 <.urem> <== NOT EXECUTED 40003e2c: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40003e30: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED 40003e34: e8 08 40 08 ldub [ %g1 + %o0 ], %l4 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40003e38: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40003e3c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003e40: c4 04 20 64 ld [ %l0 + 0x64 ], %g2 <== NOT EXECUTED 40003e44: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003e48: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED 40003e4c: 40 00 4b 3d call 40016b40 <.urem> <== NOT EXECUTED 40003e50: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED 40003e54: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40003e58: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003e5c: 3a 80 00 27 bcc,a 40003ef8 <== NOT EXECUTED 40003e60: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40003e64: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003e68: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40003e6c: 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)) 40003e70: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003e74: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40003e78: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 40003e7c: 12 80 00 11 bne 40003ec0 <== NOT EXECUTED 40003e80: 01 00 00 00 nop <== NOT EXECUTED 40003e84: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40003e88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e8c: 22 80 00 07 be,a 40003ea8 <== NOT EXECUTED 40003e90: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 40003e94: 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)) 40003e98: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003e9c: 02 80 00 09 be 40003ec0 <== NOT EXECUTED 40003ea0: 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, 40003ea4: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003ea8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40003eac: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40003eb0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003eb4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40003eb8: 10 80 00 10 b 40003ef8 <== NOT EXECUTED 40003ebc: 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) { 40003ec0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003ec4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40003ec8: 22 80 00 0c be,a 40003ef8 <== NOT EXECUTED 40003ecc: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40003ed0: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40003ed4: 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; 40003ed8: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED 40003edc: c4 24 20 b8 st %g2, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40003ee0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ee4: 22 80 00 05 be,a 40003ef8 <== NOT EXECUTED 40003ee8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40003eec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003ef0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40003ef4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003ef8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003efc: 02 80 00 09 be 40003f20 <== NOT EXECUTED 40003f00: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40003f04: 7f ff fe e8 call 40003aa4 <== NOT EXECUTED 40003f08: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003f0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f10: 32 80 00 0c bne,a 40003f40 <== NOT EXECUTED 40003f14: 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; 40003f18: 10 80 00 0b b 40003f44 <== NOT EXECUTED 40003f1c: 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); 40003f20: 7f ff fe e1 call 40003aa4 <== NOT EXECUTED 40003f24: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40003f28: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40003f2c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003f30: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f34: 26 80 00 04 bl,a 40003f44 <== NOT EXECUTED 40003f38: e8 04 20 70 ld [ %l0 + 0x70 ], %l4 <== NOT EXECUTED 40003f3c: a6 10 20 00 clr %l3 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40003f40: 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) && 40003f44: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40003f48: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003f4c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f50: 02 80 00 08 be 40003f70 <== NOT EXECUTED 40003f54: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003f58: c2 05 c0 00 ld [ %l7 ], %g1 <== NOT EXECUTED 40003f5c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003f60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003f64: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f68: 06 bf ff ae bl 40003e20 <== NOT EXECUTED 40003f6c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40003f70: 02 80 00 11 be 40003fb4 <== NOT EXECUTED 40003f74: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40003f78: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40003f7c: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 40003f80: 40 00 05 7a call 40005568 <== NOT EXECUTED 40003f84: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40003f88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f8c: 02 bf ff ee be 40003f44 <== NOT EXECUTED 40003f90: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40003f94: 30 80 00 08 b,a 40003fb4 <== 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++]; 40003f98: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 <== NOT EXECUTED count--; 40003f9c: 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++]; 40003fa0: c2 08 80 01 ldub [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40003fa4: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 40003fa8: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 40003fac: 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)) { 40003fb0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40003fb4: 22 80 00 08 be,a 40003fd4 <== NOT EXECUTED 40003fb8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 40003fbc: c2 04 20 24 ld [ %l0 + 0x24 ], %g1 <== NOT EXECUTED 40003fc0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003fc4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003fc8: 06 bf ff f4 bl 40003f98 <== NOT EXECUTED 40003fcc: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40003fd0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40003fd4: 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; 40003fd8: a4 20 40 12 sub %g1, %l2, %l2 <== NOT EXECUTED 40003fdc: e4 24 60 1c st %l2, [ %l1 + 0x1c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003fe0: 40 00 05 a9 call 40005684 <== NOT EXECUTED 40003fe4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40003fe8: 81 c7 e0 08 ret <== NOT EXECUTED 40003fec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40002dd0 : * 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) { 40002dd0: 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)) 40002dd4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002dd8: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40002ddc: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40002de0: 12 80 00 10 bne 40002e20 <== NOT EXECUTED 40002de4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40002de8: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40002dec: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40002df0: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40002df4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002df8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 40002dfc: 7f ff fb a7 call 40001c98 <== NOT EXECUTED 40002e00: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40002e04: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002e08: 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--; 40002e0c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002e10: 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--; 40002e14: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002e18: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002e1c: 30 80 00 12 b,a 40002e64 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40002e20: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002e24: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40002e28: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002e2c: 12 80 00 12 bne 40002e74 <== NOT EXECUTED 40002e30: 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, 40002e34: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40002e38: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40002e3c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002e40: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 40002e44: 7f ff fb 95 call 40001c98 <== NOT EXECUTED 40002e48: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40002e4c: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002e50: 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--; 40002e54: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002e58: 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--; 40002e5c: c4 26 20 90 st %g2, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002e60: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002e64: 7f ff fb 91 call 40001ca8 <== NOT EXECUTED 40002e68: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40002e6c: 81 c7 e0 08 ret <== NOT EXECUTED 40002e70: 81 e8 00 00 restore <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40002e74: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40002e78: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40002e7c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40002e80: 12 80 00 0a bne 40002ea8 <== NOT EXECUTED 40002e84: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40002e88: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40002e8c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002e90: 12 bf ff f7 bne 40002e6c <== NOT EXECUTED 40002e94: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40002e98: 40 00 09 fb call 40005684 <== NOT EXECUTED 40002e9c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 <== NOT EXECUTED 40002ea0: 81 c7 e0 08 ret <== NOT EXECUTED 40002ea4: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 40002ea8: 7f ff fb 7c call 40001c98 <== NOT EXECUTED 40002eac: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40002eb0: e2 06 20 90 ld [ %i0 + 0x90 ], %l1 <== NOT EXECUTED tty->t_dqlen = 0; 40002eb4: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002eb8: 7f ff fb 7c call 40001ca8 <== NOT EXECUTED 40002ebc: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40002ec0: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40002ec4: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40002ec8: 40 00 4f 1e call 40016b40 <.urem> <== NOT EXECUTED 40002ecc: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40002ed0: 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; 40002ed4: d0 24 20 84 st %o0, [ %l0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40002ed8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002edc: 12 80 00 04 bne 40002eec <== NOT EXECUTED 40002ee0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40002ee4: 40 00 09 e8 call 40005684 <== NOT EXECUTED 40002ee8: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 40002eec: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40002ef0: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40002ef4: 12 80 00 0b bne 40002f20 <== NOT EXECUTED 40002ef8: 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) { 40002efc: c2 04 20 d4 ld [ %l0 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40002f00: 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) { 40002f04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f08: 02 80 00 29 be 40002fac <== NOT EXECUTED 40002f0c: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40002f10: d2 04 20 d8 ld [ %l0 + 0xd8 ], %o1 <== NOT EXECUTED 40002f14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f18: 90 04 20 30 add %l0, 0x30, %o0 <== NOT EXECUTED 40002f1c: 30 80 00 24 b,a 40002fac <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 40002f20: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40002f24: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40002f28: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40002f2c: 12 80 00 0c bne 40002f5c <== NOT EXECUTED 40002f30: 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); 40002f34: 7f ff fb 59 call 40001c98 <== NOT EXECUTED 40002f38: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40002f3c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40002f40: 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; 40002f44: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40002f48: 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; 40002f4c: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40002f50: 7f ff fb 56 call 40001ca8 <== NOT EXECUTED 40002f54: b0 10 20 00 clr %i0 <== NOT EXECUTED 40002f58: 30 80 00 15 b,a 40002fac <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40002f5c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED 40002f60: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40002f64: 08 80 00 04 bleu 40002f74 <== NOT EXECUTED 40002f68: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40002f6c: f0 04 20 88 ld [ %l0 + 0x88 ], %i0 <== NOT EXECUTED 40002f70: 30 80 00 02 b,a 40002f78 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 40002f74: 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)) { 40002f78: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40002f7c: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40002f80: 02 80 00 03 be 40002f8c <== NOT EXECUTED 40002f84: b0 26 00 11 sub %i0, %l1, %i0 <== NOT EXECUTED 40002f88: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40002f8c: d2 04 20 7c ld [ %l0 + 0x7c ], %o1 <== NOT EXECUTED 40002f90: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40002f94: 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*/ 40002f98: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40002f9c: 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*/ 40002fa0: c4 24 20 94 st %g2, [ %l0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40002fa4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002fa8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40002fac: e2 24 20 84 st %l1, [ %l0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40002fb0: 81 c7 e0 08 ret <== NOT EXECUTED 40002fb4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40004a8c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40004a8c: 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 | 40004a90: 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 ( 40004a94: 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 | 40004a98: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40004a9c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004aa0: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004aa4: 40 00 01 10 call 40004ee4 <== NOT EXECUTED 40004aa8: 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) { 40004aac: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004ab0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004ab4: 22 80 00 07 be,a 40004ad0 <== NOT EXECUTED 40004ab8: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40004abc: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004ac0: 40 00 03 6a call 40005868 <== NOT EXECUTED 40004ac4: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004ac8: 10 bf ff f5 b 40004a9c <== NOT EXECUTED 40004acc: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40004ad0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004ad4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40004ad8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40004adc: 02 bf ff ef be 40004a98 <== NOT EXECUTED 40004ae0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40004ae4: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40004ae8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004aec: 7f ff f9 52 call 40003034 <== NOT EXECUTED 40004af0: 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 | 40004af4: 10 bf ff ea b 40004a9c <== NOT EXECUTED 40004af8: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED =============================================================================== 40002db8 : 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); 40002db8: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40002dbc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40002dc0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002dc4: 40 00 08 aa call 4000506c <== NOT EXECUTED 40002dc8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 40004a10 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40004a10: 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) { 40004a14: 23 10 00 6c sethi %hi(0x4001b000), %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004a18: 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) { 40004a1c: a2 14 60 24 or %l1, 0x24, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004a20: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004a24: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004a28: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004a2c: 40 00 01 2e call 40004ee4 <== NOT EXECUTED 40004a30: 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) { 40004a34: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 40004a38: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004a3c: 02 80 00 07 be 40004a58 <== NOT EXECUTED 40004a40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40004a44: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004a48: 40 00 03 88 call 40005868 <== NOT EXECUTED 40004a4c: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004a50: 10 bf ff f5 b 40004a24 <== NOT EXECUTED 40004a54: 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) { 40004a58: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004a5c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004a60: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40004a64: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40004a68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a6c: 02 80 00 04 be 40004a7c <== NOT EXECUTED 40004a70: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40004a74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004a78: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40004a7c: 7f ff f8 d5 call 40002dd0 <== NOT EXECUTED 40004a80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004a84: 10 bf ff e8 b 40004a24 <== NOT EXECUTED 40004a88: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED =============================================================================== 40003af4 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003af4: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003af8: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003afc: a2 10 00 18 mov %i0, %l1 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003b00: e0 00 60 38 ld [ %g1 + 0x38 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003b04: 92 10 20 00 clr %o1 40003b08: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 40003b0c: 40 00 06 97 call 40005568 40003b10: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40003b14: b0 92 20 00 orcc %o0, 0, %i0 40003b18: 12 80 00 0f bne 40003b54 <== NEVER TAKEN 40003b1c: 03 10 00 6c sethi %hi(0x4001b000), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40003b20: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40003b24: 85 28 a0 05 sll %g2, 5, %g2 40003b28: 82 10 60 24 or %g1, 0x24, %g1 40003b2c: 82 00 40 02 add %g1, %g2, %g1 40003b30: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40003b34: 80 a0 60 00 cmp %g1, 0 40003b38: 02 80 00 09 be 40003b5c <== ALWAYS TAKEN 40003b3c: 92 10 00 11 mov %l1, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40003b40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003b44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003b48: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003b4c: 40 00 06 ce call 40005684 <== NOT EXECUTED 40003b50: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 <== NOT EXECUTED return sc; 40003b54: 81 c7 e0 08 ret <== NOT EXECUTED 40003b58: 81 e8 00 00 restore <== NOT EXECUTED } if (tty->termios.c_oflag & OPOST) { 40003b5c: c2 04 20 34 ld [ %l0 + 0x34 ], %g1 40003b60: d2 04 60 14 ld [ %l1 + 0x14 ], %o1 40003b64: 80 88 60 01 btst 1, %g1 40003b68: 02 80 00 0e be 40003ba0 <== NEVER TAKEN 40003b6c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 uint32_t count = args->count; 40003b70: a6 10 00 09 mov %o1, %l3 char *buffer = args->buffer; while (count--) 40003b74: 10 80 00 06 b 40003b8c 40003b78: a4 10 00 08 mov %o0, %l2 oproc (*buffer++, tty); 40003b7c: a6 04 ff ff add %l3, -1, %l3 40003b80: a4 04 a0 01 inc %l2 40003b84: 7f ff fe 3f call 40003480 40003b88: 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--) 40003b8c: 80 a4 e0 00 cmp %l3, 0 40003b90: 32 bf ff fb bne,a 40003b7c 40003b94: 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; 40003b98: 10 80 00 05 b 40003bac 40003b9c: 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); 40003ba0: 7f ff fd ec call 40003350 <== NOT EXECUTED 40003ba4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40003ba8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 40003bac: c2 24 60 1c st %g1, [ %l1 + 0x1c ] } rtems_semaphore_release (tty->osem); 40003bb0: 40 00 06 b5 call 40005684 40003bb4: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 return sc; } 40003bb8: 81 c7 e0 08 ret 40003bbc: 81 e8 00 00 restore =============================================================================== 40014860 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 40014860: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40014864: 11 10 00 f0 sethi %hi(0x4003c000), %o0 40014868: 92 10 00 18 mov %i0, %o1 4001486c: 90 12 20 c4 or %o0, 0xc4, %o0 40014870: 40 00 0b 39 call 40017554 <_Objects_Get> 40014874: 94 07 bf fc add %fp, -4, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014878: c2 07 bf fc ld [ %fp + -4 ], %g1 4001487c: 80 a0 60 00 cmp %g1, 0 40014880: 12 80 00 0a bne 400148a8 40014884: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 40014888: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4001488c: 80 a0 60 04 cmp %g1, 4 40014890: 02 80 00 04 be 400148a0 <== NEVER TAKEN 40014894: 01 00 00 00 nop (void) _Watchdog_Remove( &the_timer->Ticker ); 40014898: 40 00 13 8a call 400196c0 <_Watchdog_Remove> 4001489c: 90 02 20 10 add %o0, 0x10, %o0 _Thread_Enable_dispatch(); 400148a0: 40 00 0d 95 call 40017ef4 <_Thread_Enable_dispatch> 400148a4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400148a8: 81 c7 e0 08 ret 400148ac: 81 e8 00 00 restore =============================================================================== 40014d50 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 40014d50: 9d e3 bf 98 save %sp, -104, %sp Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 40014d54: 03 10 00 f0 sethi %hi(0x4003c000), %g1 40014d58: e0 00 61 04 ld [ %g1 + 0x104 ], %l0 ! 4003c104 <_Timer_server> rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 40014d5c: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 40014d60: 80 a4 20 00 cmp %l0, 0 40014d64: 02 80 00 32 be 40014e2c 40014d68: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 40014d6c: 03 10 00 ef sethi %hi(0x4003bc00), %g1 40014d70: c2 08 62 04 ldub [ %g1 + 0x204 ], %g1 ! 4003be04 <_TOD_Is_set> 40014d74: 80 a0 60 00 cmp %g1, 0 40014d78: 02 80 00 2d be 40014e2c <== NEVER TAKEN 40014d7c: b0 10 20 0b mov 0xb, %i0 return RTEMS_NOT_DEFINED; if ( !routine ) 40014d80: 80 a6 a0 00 cmp %i2, 0 40014d84: 02 80 00 2a be 40014e2c 40014d88: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 40014d8c: 7f ff f4 0d call 40011dc0 <_TOD_Validate> 40014d90: 90 10 00 19 mov %i1, %o0 40014d94: 80 8a 20 ff btst 0xff, %o0 40014d98: 22 80 00 25 be,a 40014e2c 40014d9c: b0 10 20 14 mov 0x14, %i0 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 40014da0: 7f ff f3 d4 call 40011cf0 <_TOD_To_seconds> 40014da4: 90 10 00 19 mov %i1, %o0 if ( seconds <= _TOD_Seconds_since_epoch() ) 40014da8: 27 10 00 ef sethi %hi(0x4003bc00), %l3 40014dac: c2 04 e2 80 ld [ %l3 + 0x280 ], %g1 ! 4003be80 <_TOD_Now> 40014db0: 80 a2 00 01 cmp %o0, %g1 40014db4: 08 80 00 20 bleu 40014e34 40014db8: a4 10 00 08 mov %o0, %l2 40014dbc: 11 10 00 f0 sethi %hi(0x4003c000), %o0 40014dc0: 92 10 00 11 mov %l1, %o1 40014dc4: 90 12 20 c4 or %o0, 0xc4, %o0 40014dc8: 40 00 09 e3 call 40017554 <_Objects_Get> 40014dcc: 94 07 bf fc add %fp, -4, %o2 return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014dd0: c2 07 bf fc ld [ %fp + -4 ], %g1 40014dd4: b2 10 00 08 mov %o0, %i1 40014dd8: 80 a0 60 00 cmp %g1, 0 40014ddc: 12 80 00 14 bne 40014e2c 40014de0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40014de4: 40 00 12 37 call 400196c0 <_Watchdog_Remove> 40014de8: 90 02 20 10 add %o0, 0x10, %o0 the_watchdog->routine = routine; the_watchdog->id = id; 40014dec: e2 26 60 30 st %l1, [ %i1 + 0x30 ] the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 40014df0: c4 04 e2 80 ld [ %l3 + 0x280 ], %g2 (*timer_server->schedule_operation)( timer_server, the_timer ); 40014df4: c2 04 20 04 ld [ %l0 + 4 ], %g1 40014df8: 90 10 00 10 mov %l0, %o0 40014dfc: 92 10 00 19 mov %i1, %o1 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 40014e00: a4 24 80 02 sub %l2, %g2, %l2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 40014e04: 84 10 20 03 mov 3, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40014e08: f4 26 60 2c st %i2, [ %i1 + 0x2c ] 40014e0c: c4 26 60 38 st %g2, [ %i1 + 0x38 ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40014e10: f6 26 60 34 st %i3, [ %i1 + 0x34 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 40014e14: e4 26 60 1c st %l2, [ %i1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40014e18: c0 26 60 18 clr [ %i1 + 0x18 ] (*timer_server->schedule_operation)( timer_server, the_timer ); 40014e1c: 9f c0 40 00 call %g1 40014e20: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 40014e24: 40 00 0c 34 call 40017ef4 <_Thread_Enable_dispatch> 40014e28: 01 00 00 00 nop return RTEMS_SUCCESSFUL; 40014e2c: 81 c7 e0 08 ret 40014e30: 81 e8 00 00 restore 40014e34: b0 10 20 14 mov 0x14, %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40014e38: 81 c7 e0 08 ret 40014e3c: 81 e8 00 00 restore =============================================================================== 40007348 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 40007348: 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) 4000734c: 2b 08 00 00 sethi %hi(0x20000000), %l5 <== NOT EXECUTED 40007350: aa 8e 00 15 andcc %i0, %l5, %l5 <== NOT EXECUTED 40007354: 02 80 00 11 be 40007398 <== NOT EXECUTED 40007358: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED { if (rtems_panic_in_progress++) 4000735c: 05 10 00 9a sethi %hi(0x40026800), %g2 <== NOT EXECUTED 40007360: c2 00 a1 fc ld [ %g2 + 0x1fc ], %g1 ! 400269fc <== NOT EXECUTED 40007364: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40007368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000736c: 02 80 00 06 be 40007384 <== NOT EXECUTED 40007370: c6 20 a1 fc st %g3, [ %g2 + 0x1fc ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007374: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED 40007378: c4 00 63 e0 ld [ %g1 + 0x3e0 ], %g2 ! 40026be0 <_Thread_Dispatch_disable_level><== NOT EXECUTED 4000737c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40007380: c4 20 63 e0 st %g2, [ %g1 + 0x3e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40007384: 03 10 00 9a sethi %hi(0x40026800), %g1 <== NOT EXECUTED 40007388: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 400269fc <== NOT EXECUTED 4000738c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007390: 34 80 00 5a bg,a 400074f8 <== NOT EXECUTED 40007394: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40007398: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 4000739c: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 400262a8 <_impure_ptr><== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 400073a0: 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 */ 400073a4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 400073a8: 40 00 34 68 call 40014548 <== NOT EXECUTED 400073ac: a2 10 20 00 clr %l1 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 400073b0: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 400073b4: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400073b8: 02 80 00 05 be 400073cc <== NOT EXECUTED 400073bc: a6 2c 00 13 andn %l0, %l3, %l3 <== NOT EXECUTED local_errno = errno; 400073c0: 40 00 33 58 call 40014120 <__errno> <== NOT EXECUTED 400073c4: 01 00 00 00 nop <== NOT EXECUTED 400073c8: 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); 400073cc: 29 10 00 98 sethi %hi(0x40026000), %l4 <== NOT EXECUTED 400073d0: c2 05 22 a8 ld [ %l4 + 0x2a8 ], %g1 ! 400262a8 <_impure_ptr><== NOT EXECUTED 400073d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400073d8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400073dc: 40 00 4c 21 call 4001a460 <== NOT EXECUTED 400073e0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400073e4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400073e8: 02 80 00 0c be 40007418 <== NOT EXECUTED 400073ec: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 400073f0: c2 05 22 a8 ld [ %l4 + 0x2a8 ], %g1 <== NOT EXECUTED 400073f4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 400073f8: 7f ff ff cd call 4000732c <== NOT EXECUTED 400073fc: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40007400: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007404: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007408: 92 12 60 18 or %o1, 0x18, %o1 <== NOT EXECUTED 4000740c: 40 00 35 23 call 40014898 <== NOT EXECUTED 40007410: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40007414: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED if (local_errno) 40007418: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000741c: 22 80 00 1c be,a 4000748c <== NOT EXECUTED 40007420: 27 10 00 98 sethi %hi(0x40026000), %l3 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40007424: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40007428: 04 80 00 11 ble 4000746c <== NOT EXECUTED 4000742c: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED 40007430: 40 00 38 6d call 400155e4 <== NOT EXECUTED 40007434: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007438: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 4000743c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007440: 02 80 00 0b be 4000746c <== NOT EXECUTED 40007444: 03 10 00 98 sethi %hi(0x40026000), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40007448: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 400262a8 <_impure_ptr><== NOT EXECUTED 4000744c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40007450: 40 00 38 65 call 400155e4 <== NOT EXECUTED 40007454: e6 00 60 0c ld [ %g1 + 0xc ], %l3 <== NOT EXECUTED 40007458: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 4000745c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007460: 92 12 60 28 or %o1, 0x28, %o1 <== NOT EXECUTED 40007464: 10 80 00 07 b 40007480 <== NOT EXECUTED 40007468: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 4000746c: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 <== NOT EXECUTED 40007470: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007474: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007478: 92 12 60 38 or %o1, 0x38, %o1 <== NOT EXECUTED 4000747c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40007480: 40 00 35 06 call 40014898 <== NOT EXECUTED 40007484: 27 10 00 98 sethi %hi(0x40026000), %l3 <== NOT EXECUTED 40007488: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 4000748c: c2 04 e2 a8 ld [ %l3 + 0x2a8 ], %g1 <== NOT EXECUTED 40007490: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 40007494: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40007498: 40 00 35 00 call 40014898 <== NOT EXECUTED 4000749c: 92 12 60 50 or %o1, 0x50, %o1 <== NOT EXECUTED (void) fflush(stderr); 400074a0: c2 04 e2 a8 ld [ %l3 + 0x2a8 ], %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"); 400074a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED (void) fflush(stderr); 400074a8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400074ac: 40 00 34 27 call 40014548 <== NOT EXECUTED 400074b0: b0 06 00 12 add %i0, %l2, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 400074b4: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 400074b8: 80 8c 00 01 btst %l0, %g1 <== NOT EXECUTED 400074bc: 02 80 00 0f be 400074f8 <== NOT EXECUTED 400074c0: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 400074c4: 22 80 00 08 be,a 400074e4 <== NOT EXECUTED 400074c8: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 400074cc: 13 10 00 91 sethi %hi(0x40024400), %o1 <== NOT EXECUTED 400074d0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400074d4: 40 00 00 18 call 40007534 <== NOT EXECUTED 400074d8: 92 12 60 58 or %o1, 0x58, %o1 <== NOT EXECUTED _exit(local_errno); 400074dc: 40 00 02 e5 call 40008070 <_exit> <== NOT EXECUTED 400074e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 400074e4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400074e8: 40 00 00 13 call 40007534 <== NOT EXECUTED 400074ec: 92 12 60 70 or %o1, 0x70, %o1 <== NOT EXECUTED abort(); 400074f0: 40 00 32 fe call 400140e8 <== NOT EXECUTED 400074f4: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 400074f8: 81 c7 e0 08 ret <== NOT EXECUTED 400074fc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000299c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4000299c: 9d e3 bf a0 save %sp, -96, %sp 400029a0: 27 1f ff ff sethi %hi(0x7ffffc00), %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400029a4: 2b 10 00 78 sethi %hi(0x4001e000), %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400029a8: 29 10 00 78 sethi %hi(0x4001e000), %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400029ac: a6 14 e3 ff or %l3, 0x3ff, %l3 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400029b0: aa 15 63 a8 or %l5, 0x3a8, %l5 limit++; continue; } sign = 1; } if (!isdigit(c)) 400029b4: a8 15 23 a4 or %l4, 0x3a4, %l4 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 400029b8: a2 10 20 00 clr %l1 400029bc: a0 10 20 00 clr %l0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 400029c0: c2 06 20 04 ld [ %i0 + 4 ], %g1 400029c4: 82 00 7f ff add %g1, -1, %g1 400029c8: 80 a0 60 00 cmp %g1, 0 400029cc: 16 80 00 07 bge 400029e8 <== ALWAYS TAKEN 400029d0: c2 26 20 04 st %g1, [ %i0 + 4 ] 400029d4: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 400029d8: 40 00 39 dc call 40011148 <__srget_r> <== NOT EXECUTED 400029dc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400029e0: 10 80 00 06 b 400029f8 <== NOT EXECUTED 400029e4: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 400029e8: c2 06 00 00 ld [ %i0 ], %g1 400029ec: 84 00 60 01 add %g1, 1, %g2 400029f0: e4 08 40 00 ldub [ %g1 ], %l2 400029f4: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') 400029f8: 80 a4 a0 3a cmp %l2, 0x3a 400029fc: 02 80 00 22 be 40002a84 40002a00: 80 a4 60 00 cmp %l1, 0 break; if (sign == 0) { 40002a04: 32 80 00 09 bne,a 40002a28 <== NEVER TAKEN 40002a08: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40002a0c: 80 a4 a0 2d cmp %l2, 0x2d 40002a10: 12 80 00 05 bne 40002a24 <== ALWAYS TAKEN 40002a14: a2 10 20 01 mov 1, %l1 sign = -1; limit++; 40002a18: a6 04 e0 01 inc %l3 <== NOT EXECUTED continue; 40002a1c: 10 bf ff e9 b 400029c0 <== NOT EXECUTED 40002a20: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } sign = 1; } if (!isdigit(c)) 40002a24: c2 05 00 00 ld [ %l4 ], %g1 40002a28: 82 00 40 12 add %g1, %l2, %g1 40002a2c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 40002a30: 80 88 60 04 btst 4, %g1 40002a34: 02 80 00 1c be 40002aa4 <== NEVER TAKEN 40002a38: 90 10 00 13 mov %l3, %o0 return 0; d = c - '0'; if ((i > (limit / 10)) 40002a3c: 40 00 5a af call 400194f8 <.udiv> 40002a40: 92 10 20 0a mov 0xa, %o1 40002a44: 80 a4 00 08 cmp %l0, %o0 40002a48: 18 80 00 17 bgu 40002aa4 <== NEVER TAKEN 40002a4c: 01 00 00 00 nop 40002a50: 12 80 00 08 bne 40002a70 <== ALWAYS TAKEN 40002a54: a4 04 bf d0 add %l2, -48, %l2 40002a58: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40002a5c: 40 00 5b 53 call 400197a8 <.urem> <== NOT EXECUTED 40002a60: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40002a64: 80 a4 80 08 cmp %l2, %o0 <== NOT EXECUTED 40002a68: 18 80 00 0f bgu 40002aa4 <== NOT EXECUTED 40002a6c: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40002a70: 83 2c 20 03 sll %l0, 3, %g1 40002a74: a1 2c 20 01 sll %l0, 1, %l0 40002a78: a0 04 00 01 add %l0, %g1, %l0 40002a7c: 10 bf ff d1 b 400029c0 40002a80: a0 04 80 10 add %l2, %l0, %l0 } if (sign == 0) 40002a84: 02 80 00 08 be 40002aa4 <== NEVER TAKEN 40002a88: 90 10 00 11 mov %l1, %o0 return 0; *val = i * sign; 40002a8c: 92 10 00 10 mov %l0, %o1 40002a90: 40 00 5a 60 call 40019410 <.umul> 40002a94: b0 10 20 01 mov 1, %i0 40002a98: d0 26 40 00 st %o0, [ %i1 ] return 1; 40002a9c: 81 c7 e0 08 ret 40002aa0: 81 e8 00 00 restore } 40002aa4: 81 c7 e0 08 ret <== NOT EXECUTED 40002aa8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40002aac : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40002aac: 9d e3 bf a0 save %sp, -96, %sp int c; *name = *bufp; 40002ab0: c2 06 80 00 ld [ %i2 ], %g1 for (;;) { c = getc(fp); 40002ab4: 21 10 00 78 sethi %hi(0x4001e000), %l0 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 40002ab8: c2 26 40 00 st %g1, [ %i1 ] for (;;) { c = getc(fp); 40002abc: a0 14 23 a8 or %l0, 0x3a8, %l0 40002ac0: c2 06 20 04 ld [ %i0 + 4 ], %g1 40002ac4: 82 00 7f ff add %g1, -1, %g1 40002ac8: 80 a0 60 00 cmp %g1, 0 40002acc: 16 80 00 07 bge 40002ae8 40002ad0: c2 26 20 04 st %g1, [ %i0 + 4 ] 40002ad4: d0 04 00 00 ld [ %l0 ], %o0 40002ad8: 40 00 39 9c call 40011148 <__srget_r> 40002adc: 92 10 00 18 mov %i0, %o1 if (c == ':') { 40002ae0: 10 80 00 07 b 40002afc 40002ae4: 80 a2 20 3a cmp %o0, 0x3a { int c; *name = *bufp; for (;;) { c = getc(fp); 40002ae8: c2 06 00 00 ld [ %i0 ], %g1 40002aec: 84 00 60 01 add %g1, 1, %g2 40002af0: d0 08 40 00 ldub [ %g1 ], %o0 40002af4: c4 26 00 00 st %g2, [ %i0 ] if (c == ':') { 40002af8: 80 a2 20 3a cmp %o0, 0x3a 40002afc: 12 80 00 07 bne 40002b18 40002b00: 80 a2 20 0a cmp %o0, 0xa if (nlFlag) 40002b04: 80 a7 20 00 cmp %i4, 0 40002b08: 22 80 00 1a be,a 40002b70 <== ALWAYS TAKEN 40002b0c: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40002b10: 81 c7 e0 08 ret <== NOT EXECUTED 40002b14: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 40002b18: 12 80 00 07 bne 40002b34 40002b1c: 80 a2 3f ff cmp %o0, -1 if (!nlFlag) 40002b20: 80 a7 20 00 cmp %i4, 0 40002b24: 32 80 00 13 bne,a 40002b70 <== ALWAYS TAKEN 40002b28: c2 06 80 00 ld [ %i2 ], %g1 --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 40002b2c: 81 c7 e0 08 ret <== NOT EXECUTED 40002b30: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 40002b34: 22 80 00 17 be,a 40002b90 <== NEVER TAKEN 40002b38: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 40002b3c: c2 06 c0 00 ld [ %i3 ], %g1 40002b40: 80 a0 60 01 cmp %g1, 1 40002b44: 28 80 00 13 bleu,a 40002b90 <== NEVER TAKEN 40002b48: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 40002b4c: c2 06 80 00 ld [ %i2 ], %g1 40002b50: d0 28 40 00 stb %o0, [ %g1 ] ++(*bufp); 40002b54: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40002b58: c2 06 c0 00 ld [ %i3 ], %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40002b5c: 84 00 a0 01 inc %g2 --(*nleft); 40002b60: 82 00 7f ff add %g1, -1, %g1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40002b64: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); } 40002b68: 10 bf ff d6 b 40002ac0 40002b6c: c2 26 c0 00 st %g1, [ %i3 ] **bufp = '\0'; 40002b70: c0 28 40 00 clrb [ %g1 ] ++(*bufp); 40002b74: c4 06 80 00 ld [ %i2 ], %g2 --(*nleft); 40002b78: c2 06 c0 00 ld [ %i3 ], %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40002b7c: 84 00 a0 01 inc %g2 --(*nleft); 40002b80: 82 00 7f ff add %g1, -1, %g1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40002b84: c4 26 80 00 st %g2, [ %i2 ] --(*nleft); 40002b88: c2 26 c0 00 st %g1, [ %i3 ] 40002b8c: b0 10 20 01 mov 1, %i0 return 1; } 40002b90: 81 c7 e0 08 ret 40002b94: 81 e8 00 00 restore =============================================================================== 40002b98 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40002b98: 9d e3 bf 98 save %sp, -104, %sp int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40002b9c: 98 10 20 00 clr %o4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40002ba0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002ba4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40002ba8: a2 07 a0 4c add %fp, 0x4c, %l1 40002bac: a0 07 a0 50 add %fp, 0x50, %l0 40002bb0: 90 10 00 18 mov %i0, %o0 40002bb4: 92 10 00 19 mov %i1, %o1 40002bb8: 94 10 00 11 mov %l1, %o2 40002bbc: 7f ff ff bc call 40002aac 40002bc0: 96 10 00 10 mov %l0, %o3 40002bc4: 80 a2 20 00 cmp %o0, 0 40002bc8: 02 80 00 41 be 40002ccc <== NEVER TAKEN 40002bcc: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 40002bd0: 92 06 60 04 add %i1, 4, %o1 40002bd4: 94 10 00 11 mov %l1, %o2 40002bd8: 96 10 00 10 mov %l0, %o3 40002bdc: 7f ff ff b4 call 40002aac 40002be0: 98 10 20 00 clr %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40002be4: 80 a2 20 00 cmp %o0, 0 40002be8: 02 80 00 39 be 40002ccc <== NEVER TAKEN 40002bec: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 40002bf0: 7f ff ff 6b call 4000299c 40002bf4: 92 07 bf fc add %fp, -4, %o1 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40002bf8: 80 a2 20 00 cmp %o0, 0 40002bfc: 02 80 00 34 be 40002ccc <== NEVER TAKEN 40002c00: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 40002c04: 94 10 00 11 mov %l1, %o2 40002c08: 96 10 00 10 mov %l0, %o3 40002c0c: 92 07 bf f8 add %fp, -8, %o1 40002c10: 7f ff ff a7 call 40002aac 40002c14: 98 10 20 01 mov 1, %o4 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40002c18: 80 a2 20 00 cmp %o0, 0 40002c1c: 02 80 00 2c be 40002ccc <== NEVER TAKEN 40002c20: c2 07 bf fc ld [ %fp + -4 ], %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40002c24: 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; 40002c28: c2 36 60 08 sth %g1, [ %i1 + 8 ] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40002c2c: 84 10 00 03 mov %g3, %g2 40002c30: 10 80 00 05 b 40002c44 40002c34: 82 10 20 01 mov 1, %g1 if(*cp == ',') memcount++; 40002c38: 88 19 20 2c xor %g4, 0x2c, %g4 40002c3c: 80 a0 00 04 cmp %g0, %g4 40002c40: 82 60 7f ff subx %g1, -1, %g1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40002c44: c8 48 80 00 ldsb [ %g2 ], %g4 40002c48: 80 a1 20 00 cmp %g4, 0 40002c4c: 12 bf ff fb bne 40002c38 40002c50: 84 00 a0 01 inc %g2 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 40002c54: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 40002c58: 83 28 60 02 sll %g1, 2, %g1 40002c5c: 82 00 60 13 add %g1, 0x13, %g1 40002c60: 80 a0 80 01 cmp %g2, %g1 40002c64: 0a 80 00 1a bcs 40002ccc <== NEVER TAKEN 40002c68: 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; 40002c6c: 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); 40002c70: 82 00 60 0f add %g1, 0xf, %g1 40002c74: 82 08 7f f0 and %g1, -16, %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40002c78: 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); 40002c7c: c2 26 60 0c st %g1, [ %i1 + 0xc ] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 40002c80: 10 80 00 09 b 40002ca4 40002c84: c2 07 bf f8 ld [ %fp + -8 ], %g1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 40002c88: 32 80 00 08 bne,a 40002ca8 <== ALWAYS TAKEN 40002c8c: 82 00 60 01 inc %g1 *cp = '\0'; 40002c90: c0 28 7f ff clrb [ %g1 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 40002c94: c8 06 60 0c ld [ %i1 + 0xc ], %g4 <== NOT EXECUTED 40002c98: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40002c9c: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40002ca0: c2 21 00 03 st %g1, [ %g4 + %g3 ] <== NOT EXECUTED 40002ca4: 82 00 60 01 inc %g1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40002ca8: c6 48 7f ff ldsb [ %g1 + -1 ], %g3 40002cac: 80 a0 e0 00 cmp %g3, 0 40002cb0: 32 bf ff f6 bne,a 40002c88 40002cb4: 80 a0 e0 2c cmp %g3, 0x2c if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40002cb8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 40002cbc: 85 28 a0 02 sll %g2, 2, %g2 40002cc0: c0 20 40 02 clr [ %g1 + %g2 ] return 1; 40002cc4: 81 c7 e0 08 ret 40002cc8: 91 e8 20 01 restore %g0, 1, %o0 } 40002ccc: 81 c7 e0 08 ret <== NOT EXECUTED 40002cd0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40002d1c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40002d1c: 9d e3 bf 98 save %sp, -104, %sp int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002d20: 98 10 20 00 clr %o4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40002d24: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002d28: f6 27 a0 50 st %i3, [ %fp + 0x50 ] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002d2c: a2 07 a0 4c add %fp, 0x4c, %l1 40002d30: a0 07 a0 50 add %fp, 0x50, %l0 40002d34: 90 10 00 18 mov %i0, %o0 40002d38: 92 10 00 19 mov %i1, %o1 40002d3c: 94 10 00 11 mov %l1, %o2 40002d40: 7f ff ff 5b call 40002aac 40002d44: 96 10 00 10 mov %l0, %o3 40002d48: 80 a2 20 00 cmp %o0, 0 40002d4c: 02 80 00 39 be 40002e30 <== NEVER TAKEN 40002d50: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 40002d54: 92 06 60 04 add %i1, 4, %o1 40002d58: 94 10 00 11 mov %l1, %o2 40002d5c: 96 10 00 10 mov %l0, %o3 40002d60: 7f ff ff 53 call 40002aac 40002d64: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002d68: 80 a2 20 00 cmp %o0, 0 40002d6c: 02 80 00 31 be 40002e30 <== NEVER TAKEN 40002d70: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 40002d74: 7f ff ff 0a call 4000299c 40002d78: 92 07 bf fc add %fp, -4, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002d7c: 80 a2 20 00 cmp %o0, 0 40002d80: 02 80 00 2c be 40002e30 <== NEVER TAKEN 40002d84: 90 10 00 18 mov %i0, %o0 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 40002d88: 7f ff ff 05 call 4000299c 40002d8c: 92 07 bf f8 add %fp, -8, %o1 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002d90: 80 a2 20 00 cmp %o0, 0 40002d94: 02 80 00 27 be 40002e30 <== NEVER TAKEN 40002d98: 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) 40002d9c: 92 06 60 0c add %i1, 0xc, %o1 40002da0: 94 10 00 11 mov %l1, %o2 40002da4: 96 10 00 10 mov %l0, %o3 40002da8: 7f ff ff 41 call 40002aac 40002dac: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002db0: 80 a2 20 00 cmp %o0, 0 40002db4: 02 80 00 1f be 40002e30 <== NEVER TAKEN 40002db8: 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) 40002dbc: 92 06 60 10 add %i1, 0x10, %o1 40002dc0: 94 10 00 11 mov %l1, %o2 40002dc4: 96 10 00 10 mov %l0, %o3 40002dc8: 7f ff ff 39 call 40002aac 40002dcc: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002dd0: 80 a2 20 00 cmp %o0, 0 40002dd4: 02 80 00 17 be 40002e30 <== NEVER TAKEN 40002dd8: 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) 40002ddc: 92 06 60 14 add %i1, 0x14, %o1 40002de0: 94 10 00 11 mov %l1, %o2 40002de4: 96 10 00 10 mov %l0, %o3 40002de8: 7f ff ff 31 call 40002aac 40002dec: 98 10 20 00 clr %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002df0: 80 a2 20 00 cmp %o0, 0 40002df4: 02 80 00 0f be 40002e30 <== NEVER TAKEN 40002df8: 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)) 40002dfc: 94 10 00 11 mov %l1, %o2 40002e00: 96 10 00 10 mov %l0, %o3 40002e04: 92 06 60 18 add %i1, 0x18, %o1 40002e08: 7f ff ff 29 call 40002aac 40002e0c: 98 10 20 01 mov 1, %o4 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40002e10: 80 a2 20 00 cmp %o0, 0 40002e14: 02 80 00 07 be 40002e30 <== NEVER TAKEN 40002e18: 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; 40002e1c: c2 36 60 08 sth %g1, [ %i1 + 8 ] pwd->pw_gid = pwgid; 40002e20: c2 07 bf f8 ld [ %fp + -8 ], %g1 40002e24: c2 36 60 0a sth %g1, [ %i1 + 0xa ] return 1; 40002e28: 81 c7 e0 08 ret 40002e2c: 91 e8 20 01 restore %g0, 1, %o0 } 40002e30: 81 c7 e0 08 ret <== NOT EXECUTED 40002e34: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 40002f58 : return NULL; return &grent; } void setgrent(void) { 40002f58: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40002f5c: 7f ff ff c9 call 40002e80 <== NOT EXECUTED 40002f60: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 40002f64: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002f68: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 ! 4001e96c <== NOT EXECUTED 40002f6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002f70: 22 80 00 05 be,a 40002f84 <== NOT EXECUTED 40002f74: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED fclose(group_fp); 40002f78: 40 00 31 8b call 4000f5a4 <== NOT EXECUTED 40002f7c: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40002f80: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED 40002f84: 13 10 00 74 sethi %hi(0x4001d000), %o1 <== NOT EXECUTED 40002f88: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED 40002f8c: 40 00 33 5c call 4000fcfc <== NOT EXECUTED 40002f90: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 40002f94: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40002f98: d0 20 61 6c st %o0, [ %g1 + 0x16c ] ! 4001e96c <== NOT EXECUTED } 40002f9c: 81 c7 e0 08 ret <== NOT EXECUTED 40002fa0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000314c : return NULL; return &pwent; } void setpwent(void) { 4000314c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED init_etc_passwd_group(); 40003150: 7f ff ff 4c call 40002e80 <== NOT EXECUTED 40003154: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 40003158: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000315c: d0 00 60 84 ld [ %g1 + 0x84 ], %o0 ! 4001e884 <== NOT EXECUTED 40003160: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003164: 22 80 00 05 be,a 40003178 <== NOT EXECUTED 40003168: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED fclose(passwd_fp); 4000316c: 40 00 31 0e call 4000f5a4 <== NOT EXECUTED 40003170: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 40003174: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED 40003178: 13 10 00 74 sethi %hi(0x4001d000), %o1 <== NOT EXECUTED 4000317c: 90 12 21 70 or %o0, 0x170, %o0 <== NOT EXECUTED 40003180: 40 00 32 df call 4000fcfc <== NOT EXECUTED 40003184: 92 12 61 80 or %o1, 0x180, %o1 <== NOT EXECUTED 40003188: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000318c: d0 20 60 84 st %o0, [ %g1 + 0x84 ] ! 4001e884 <== NOT EXECUTED } 40003190: 81 c7 e0 08 ret <== NOT EXECUTED 40003194: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40003aa4 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40003aa4: 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)) { 40003aa8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003aac: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40003ab0: 02 80 00 0e be 40003ae8 <== NOT EXECUTED 40003ab4: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003ab8: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 40003abc: 94 10 20 00 clr %o2 <== NOT EXECUTED 40003ac0: 40 00 06 aa call 40005568 <== NOT EXECUTED 40003ac4: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40003ac8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003acc: 7f ff ff 7f call 400038c8 <== NOT EXECUTED 40003ad0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003ad4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003ad8: 40 00 06 eb call 40005684 <== NOT EXECUTED 40003adc: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40003ae0: 81 c7 e0 08 ret <== NOT EXECUTED 40003ae4: 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); 40003ae8: 7f ff ff 78 call 400038c8 <== NOT EXECUTED 40003aec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40004a34 : int _STAT_NAME( const char *path, struct stat *buf ) { 40004a34: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40004a38: 80 a6 60 00 cmp %i1, 0 40004a3c: 12 80 00 06 bne 40004a54 40004a40: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 40004a44: 40 00 2c 9c call 4000fcb4 <__errno> 40004a48: b0 10 3f ff mov -1, %i0 ! ffffffff 40004a4c: 10 80 00 20 b 40004acc 40004a50: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, strlen( path ), 40004a54: 40 00 33 80 call 40011854 40004a58: 90 10 00 18 mov %i0, %o0 40004a5c: a0 07 bf ec add %fp, -20, %l0 40004a60: 92 10 00 08 mov %o0, %o1 40004a64: 94 10 20 00 clr %o2 40004a68: 90 10 00 18 mov %i0, %o0 40004a6c: 96 10 00 10 mov %l0, %o3 40004a70: 98 10 20 01 mov 1, %o4 40004a74: 7f ff f9 96 call 400030cc 40004a78: b0 10 3f ff mov -1, %i0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 40004a7c: 80 a2 20 00 cmp %o0, 0 40004a80: 12 80 00 14 bne 40004ad0 40004a84: c2 07 bf f4 ld [ %fp + -12 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40004a88: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40004a8c: 80 a0 60 00 cmp %g1, 0 40004a90: 12 80 00 12 bne 40004ad8 <== ALWAYS TAKEN 40004a94: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 40004a98: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 40004a9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004aa0: 02 80 00 08 be 40004ac0 <== NOT EXECUTED 40004aa4: 01 00 00 00 nop <== NOT EXECUTED 40004aa8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40004aac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004ab0: 02 80 00 04 be 40004ac0 <== NOT EXECUTED 40004ab4: 01 00 00 00 nop <== NOT EXECUTED 40004ab8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004abc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004ac0: 40 00 2c 7d call 4000fcb4 <__errno> <== NOT EXECUTED 40004ac4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004ac8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40004acc: c2 22 00 00 st %g1, [ %o0 ] 40004ad0: 81 c7 e0 08 ret 40004ad4: 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) ); 40004ad8: 94 10 20 48 mov 0x48, %o2 40004adc: 40 00 31 5e call 40011054 40004ae0: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40004ae4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40004ae8: 92 10 00 19 mov %i1, %o1 40004aec: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40004af0: 9f c0 40 00 call %g1 40004af4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40004af8: c2 07 bf f8 ld [ %fp + -8 ], %g1 40004afc: 80 a0 60 00 cmp %g1, 0 40004b00: 02 bf ff f4 be 40004ad0 <== NEVER TAKEN 40004b04: b0 10 00 08 mov %o0, %i0 40004b08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004b0c: 80 a0 60 00 cmp %g1, 0 40004b10: 02 80 00 04 be 40004b20 <== NEVER TAKEN 40004b14: 01 00 00 00 nop 40004b18: 9f c0 40 00 call %g1 40004b1c: 90 10 00 10 mov %l0, %o0 return status; } 40004b20: 81 c7 e0 08 ret 40004b24: 81 e8 00 00 restore =============================================================================== 40004c70 : int symlink( const char *actualpath, const char *sympath ) { 40004c70: 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 ); 40004c74: c2 4e 40 00 ldsb [ %i1 ], %g1 40004c78: 80 a0 60 5c cmp %g1, 0x5c 40004c7c: 02 80 00 08 be 40004c9c <== NEVER TAKEN 40004c80: a0 10 00 18 mov %i0, %l0 40004c84: 80 a0 60 2f cmp %g1, 0x2f 40004c88: 22 80 00 06 be,a 40004ca0 40004c8c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40004c90: 80 a0 60 00 cmp %g1, 0 40004c94: 12 80 00 0a bne 40004cbc <== ALWAYS TAKEN 40004c98: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40004c9c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 <== NOT EXECUTED 40004ca0: d2 00 63 64 ld [ %g1 + 0x364 ], %o1 ! 4001ff64 40004ca4: 90 07 bf e8 add %fp, -24, %o0 40004ca8: 92 02 60 18 add %o1, 0x18, %o1 40004cac: 40 00 2e 4f call 400105e8 40004cb0: 94 10 20 14 mov 0x14, %o2 40004cb4: 10 80 00 08 b 40004cd4 40004cb8: 90 10 20 01 mov 1, %o0 40004cbc: d2 00 63 64 ld [ %g1 + 0x364 ], %o1 40004cc0: 90 07 bf e8 add %fp, -24, %o0 40004cc4: 92 02 60 04 add %o1, 4, %o1 40004cc8: 40 00 2e 48 call 400105e8 40004ccc: 94 10 20 14 mov 0x14, %o2 40004cd0: 90 10 20 00 clr %o0 if ( !loc.ops->evalformake_h ) { 40004cd4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40004cd8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40004cdc: 80 a0 60 00 cmp %g1, 0 40004ce0: 02 80 00 14 be 40004d30 <== NEVER TAKEN 40004ce4: 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 ); 40004ce8: 94 07 bf fc add %fp, -4, %o2 40004cec: b2 07 bf e8 add %fp, -24, %i1 if ( result != 0 ) 40004cf0: 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 ); 40004cf4: 9f c0 40 00 call %g1 40004cf8: 92 10 00 19 mov %i1, %o1 if ( result != 0 ) 40004cfc: 80 a2 20 00 cmp %o0, 0 40004d00: 12 80 00 10 bne 40004d40 40004d04: c4 07 bf f4 ld [ %fp + -12 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40004d08: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 40004d0c: 80 a0 60 00 cmp %g1, 0 40004d10: 12 80 00 0e bne 40004d48 <== ALWAYS TAKEN 40004d14: d4 07 bf fc ld [ %fp + -4 ], %o2 rtems_filesystem_freenode( &loc ); 40004d18: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40004d1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004d20: 02 80 00 04 be 40004d30 <== NOT EXECUTED 40004d24: 01 00 00 00 nop <== NOT EXECUTED 40004d28: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004d2c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004d30: 40 00 2b f2 call 4000fcf8 <__errno> <== NOT EXECUTED 40004d34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004d38: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40004d3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004d40: 81 c7 e0 08 ret 40004d44: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40004d48: 92 10 00 10 mov %l0, %o1 40004d4c: 9f c0 40 00 call %g1 40004d50: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40004d54: c2 07 bf f4 ld [ %fp + -12 ], %g1 40004d58: 80 a0 60 00 cmp %g1, 0 40004d5c: 02 bf ff f9 be 40004d40 <== NEVER TAKEN 40004d60: b0 10 00 08 mov %o0, %i0 40004d64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004d68: 80 a0 60 00 cmp %g1, 0 40004d6c: 02 80 00 04 be 40004d7c <== NEVER TAKEN 40004d70: 01 00 00 00 nop 40004d74: 9f c0 40 00 call %g1 40004d78: 90 10 00 19 mov %i1, %o0 return result; } 40004d7c: 81 c7 e0 08 ret 40004d80: 81 e8 00 00 restore =============================================================================== 40004b40 : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 40004b40: 9d e3 bf a0 save %sp, -96, %sp /* * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; 40004b44: c4 06 21 58 ld [ %i0 + 0x158 ], %g2 if ( this_reent ) { 40004b48: 80 a0 a0 00 cmp %g2, 0 40004b4c: 02 80 00 0b be 40004b78 <== NEVER TAKEN 40004b50: 21 10 00 7d sethi %hi(0x4001f400), %l0 current_reent = _Thread_Executing->libc_reent; 40004b54: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 ! 4001f46c <_Thread_Executing> _Thread_Executing->libc_reent = this_reent; _fwalk (t->libc_reent, sync_wrapper); 40004b58: 13 10 00 12 sethi %hi(0x40004800), %o1 * The sync_wrapper() function will operate on the current thread's * reent structure so we will temporarily use that. */ this_reent = t->libc_reent; if ( this_reent ) { current_reent = _Thread_Executing->libc_reent; 40004b5c: e2 00 61 58 ld [ %g1 + 0x158 ], %l1 _Thread_Executing->libc_reent = this_reent; 40004b60: c4 20 61 58 st %g2, [ %g1 + 0x158 ] _fwalk (t->libc_reent, sync_wrapper); 40004b64: d0 06 21 58 ld [ %i0 + 0x158 ], %o0 40004b68: 40 00 30 44 call 40010c78 <_fwalk> 40004b6c: 92 12 63 a8 or %o1, 0x3a8, %o1 _Thread_Executing->libc_reent = current_reent; 40004b70: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 40004b74: e2 20 61 58 st %l1, [ %g1 + 0x158 ] 40004b78: 81 c7 e0 08 ret 40004b7c: 81 e8 00 00 restore =============================================================================== 40004218 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40004218: 9d e3 bf a0 save %sp, -96, %sp switch (opt) { 4000421c: 80 a6 60 00 cmp %i1, 0 40004220: 02 80 00 10 be 40004260 <== ALWAYS TAKEN 40004224: 80 a6 60 01 cmp %i1, 1 40004228: 02 80 00 08 be 40004248 <== NOT EXECUTED 4000422c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004230: 40 00 2a 05 call 4000ea44 <__errno> <== NOT EXECUTED 40004234: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004238: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000423c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004240: 81 c7 e0 08 ret <== NOT EXECUTED 40004244: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40004248: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 4000424c: 40 00 1e e9 call 4000bdf0 <== NOT EXECUTED 40004250: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004254: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004258: 26 80 00 04 bl,a 40004268 <== NOT EXECUTED 4000425c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40004260: 40 00 1e e4 call 4000bdf0 40004264: 93 e8 20 02 restore %g0, 2, %o1 } } 40004268: 81 c7 e0 08 ret <== NOT EXECUTED 4000426c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 4000ceec : #include int unlink( const char *path ) { 4000ceec: 9d e3 bf 78 save %sp, -136, %sp /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 4000cef0: 7f ff d4 2b call 40001f9c 4000cef4: 90 10 00 18 mov %i0, %o0 if ( parentpathlen == 0 ) 4000cef8: a6 92 20 00 orcc %o0, 0, %l3 4000cefc: 32 80 00 18 bne,a 4000cf5c 4000cf00: 90 10 00 18 mov %i0, %o0 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 4000cf04: c2 4e 00 00 ldsb [ %i0 ], %g1 4000cf08: 80 a0 60 5c cmp %g1, 0x5c 4000cf0c: 22 80 00 08 be,a 4000cf2c <== NEVER TAKEN 4000cf10: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000cf14: 80 a0 60 2f cmp %g1, 0x2f 4000cf18: 22 80 00 05 be,a 4000cf2c 4000cf1c: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cf20: 80 a0 60 00 cmp %g1, 0 4000cf24: 12 80 00 06 bne 4000cf3c <== ALWAYS TAKEN 4000cf28: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cf2c: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 ! 4001aaf8 4000cf30: 90 07 bf ec add %fp, -20, %o0 4000cf34: 10 80 00 05 b 4000cf48 4000cf38: 92 02 60 18 add %o1, 0x18, %o1 4000cf3c: d2 00 62 f8 ld [ %g1 + 0x2f8 ], %o1 4000cf40: 90 07 bf ec add %fp, -20, %o0 4000cf44: 92 02 60 04 add %o1, 4, %o1 4000cf48: 94 10 20 14 mov 0x14, %o2 4000cf4c: 40 00 02 f5 call 4000db20 4000cf50: a2 10 20 00 clr %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000cf54: 10 80 00 0b b 4000cf80 4000cf58: 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, 4000cf5c: 92 10 00 13 mov %l3, %o1 4000cf60: 94 10 20 02 mov 2, %o2 4000cf64: 96 07 bf ec add %fp, -20, %o3 4000cf68: 7f ff d4 5b call 400020d4 4000cf6c: 98 10 20 00 clr %o4 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 4000cf70: 80 a2 20 00 cmp %o0, 0 4000cf74: 12 80 00 82 bne 4000d17c <== NEVER TAKEN 4000cf78: a2 10 20 01 mov 1, %l1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 4000cf7c: 94 10 20 14 mov 0x14, %o2 4000cf80: a0 07 bf d8 add %fp, -40, %l0 4000cf84: a4 07 bf ec add %fp, -20, %l2 4000cf88: 90 10 00 10 mov %l0, %o0 4000cf8c: 40 00 02 e5 call 4000db20 4000cf90: 92 10 00 12 mov %l2, %o1 name = path + parentpathlen; 4000cf94: b0 06 00 13 add %i0, %l3, %i0 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 4000cf98: 40 00 04 5e call 4000e110 4000cf9c: 90 10 00 18 mov %i0, %o0 4000cfa0: 92 10 00 08 mov %o0, %o1 4000cfa4: 7f ff d3 ed call 40001f58 4000cfa8: 90 10 00 18 mov %i0, %o0 4000cfac: b0 06 00 08 add %i0, %o0, %i0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 4000cfb0: 40 00 04 58 call 4000e110 4000cfb4: 90 10 00 18 mov %i0, %o0 4000cfb8: 94 10 20 00 clr %o2 4000cfbc: 92 10 00 08 mov %o0, %o1 4000cfc0: 96 10 00 10 mov %l0, %o3 4000cfc4: 90 10 00 18 mov %i0, %o0 4000cfc8: 7f ff d4 07 call 40001fe4 4000cfcc: 98 10 20 00 clr %o4 0, &loc, false ); if ( result != 0 ) { 4000cfd0: 80 a2 20 00 cmp %o0, 0 4000cfd4: 02 80 00 11 be 4000d018 4000cfd8: c4 07 bf e4 ld [ %fp + -28 ], %g2 if ( free_parentloc ) 4000cfdc: 80 8c 60 ff btst 0xff, %l1 4000cfe0: 02 80 00 0c be 4000d010 <== NEVER TAKEN 4000cfe4: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( &parentloc ); 4000cfe8: c2 07 bf f8 ld [ %fp + -8 ], %g1 4000cfec: 80 a0 60 00 cmp %g1, 0 4000cff0: 02 80 00 64 be 4000d180 <== NEVER TAKEN 4000cff4: 01 00 00 00 nop 4000cff8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000cffc: 80 a0 60 00 cmp %g1, 0 4000d000: 02 80 00 04 be 4000d010 <== NEVER TAKEN 4000d004: 90 10 00 12 mov %l2, %o0 4000d008: 9f c0 40 00 call %g1 4000d00c: 01 00 00 00 nop 4000d010: 81 c7 e0 08 ret 4000d014: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 4000d018: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000d01c: 80 a0 60 00 cmp %g1, 0 4000d020: 22 80 00 26 be,a 4000d0b8 <== NEVER TAKEN 4000d024: 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 ) { 4000d028: 9f c0 40 00 call %g1 4000d02c: 90 10 00 10 mov %l0, %o0 4000d030: 80 a2 20 01 cmp %o0, 1 4000d034: 12 80 00 1c bne 4000d0a4 4000d038: c4 07 bf e4 ld [ %fp + -28 ], %g2 rtems_filesystem_freenode( &loc ); 4000d03c: 80 a0 a0 00 cmp %g2, 0 4000d040: 02 80 00 09 be 4000d064 <== NEVER TAKEN 4000d044: 80 8c 60 ff btst 0xff, %l1 4000d048: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000d04c: 80 a0 60 00 cmp %g1, 0 4000d050: 02 80 00 05 be 4000d064 <== NEVER TAKEN 4000d054: 80 8c 60 ff btst 0xff, %l1 4000d058: 9f c0 40 00 call %g1 4000d05c: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000d060: 80 8c 60 ff btst 0xff, %l1 4000d064: 02 80 00 0c be 4000d094 <== ALWAYS TAKEN 4000d068: 01 00 00 00 nop rtems_filesystem_freenode( &parentloc ); 4000d06c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 4000d070: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d074: 02 80 00 08 be 4000d094 <== NOT EXECUTED 4000d078: 01 00 00 00 nop <== NOT EXECUTED 4000d07c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000d080: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d084: 02 80 00 04 be 4000d094 <== NOT EXECUTED 4000d088: 01 00 00 00 nop <== NOT EXECUTED 4000d08c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d090: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 4000d094: 40 00 00 67 call 4000d230 <__errno> 4000d098: b0 10 3f ff mov -1, %i0 4000d09c: 10 80 00 1b b 4000d108 4000d0a0: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 4000d0a4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000d0a8: 80 a0 60 00 cmp %g1, 0 4000d0ac: 12 80 00 1a bne 4000d114 <== ALWAYS TAKEN 4000d0b0: 90 10 00 12 mov %l2, %o0 rtems_filesystem_freenode( &loc ); 4000d0b4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000d0b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d0bc: 02 80 00 05 be 4000d0d0 <== NOT EXECUTED 4000d0c0: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000d0c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d0c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( free_parentloc ) 4000d0cc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 4000d0d0: 02 80 00 0b be 4000d0fc <== NOT EXECUTED 4000d0d4: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 4000d0d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d0dc: 02 80 00 08 be 4000d0fc <== NOT EXECUTED 4000d0e0: 01 00 00 00 nop <== NOT EXECUTED 4000d0e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000d0e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d0ec: 02 80 00 04 be 4000d0fc <== NOT EXECUTED 4000d0f0: 01 00 00 00 nop <== NOT EXECUTED 4000d0f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d0f8: 90 07 bf ec add %fp, -20, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000d0fc: 40 00 00 4d call 4000d230 <__errno> <== NOT EXECUTED 4000d100: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000d104: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000d108: c2 22 00 00 st %g1, [ %o0 ] 4000d10c: 81 c7 e0 08 ret 4000d110: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 4000d114: 9f c0 40 00 call %g1 4000d118: 92 10 00 10 mov %l0, %o1 rtems_filesystem_freenode( &loc ); 4000d11c: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000d120: 80 a0 60 00 cmp %g1, 0 4000d124: 02 80 00 08 be 4000d144 <== NEVER TAKEN 4000d128: b0 10 00 08 mov %o0, %i0 4000d12c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000d130: 80 a0 60 00 cmp %g1, 0 4000d134: 02 80 00 05 be 4000d148 <== NEVER TAKEN 4000d138: 80 8c 60 ff btst 0xff, %l1 4000d13c: 9f c0 40 00 call %g1 4000d140: 90 10 00 10 mov %l0, %o0 if ( free_parentloc ) 4000d144: 80 8c 60 ff btst 0xff, %l1 4000d148: 02 bf ff b2 be 4000d010 4000d14c: c2 07 bf f8 ld [ %fp + -8 ], %g1 rtems_filesystem_freenode( &parentloc ); 4000d150: 80 a0 60 00 cmp %g1, 0 4000d154: 02 80 00 0b be 4000d180 <== NEVER TAKEN 4000d158: 01 00 00 00 nop 4000d15c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000d160: 80 a0 60 00 cmp %g1, 0 4000d164: 02 80 00 07 be 4000d180 <== NEVER TAKEN 4000d168: 01 00 00 00 nop 4000d16c: 9f c0 40 00 call %g1 4000d170: 90 07 bf ec add %fp, -20, %o0 4000d174: 81 c7 e0 08 ret 4000d178: 81 e8 00 00 restore 4000d17c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return result; } 4000d180: 81 c7 e0 08 ret <== NOT EXECUTED 4000d184: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 40009074 : */ int unmount( const char *path ) { 40009074: 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 ) ) 40009078: 40 00 32 11 call 400158bc 4000907c: 90 10 00 18 mov %i0, %o0 40009080: a0 07 bf ec add %fp, -20, %l0 40009084: 92 10 00 08 mov %o0, %o1 40009088: 94 10 20 00 clr %o2 4000908c: 90 10 00 18 mov %i0, %o0 40009090: 96 10 00 10 mov %l0, %o3 40009094: 7f ff f0 a9 call 40005338 40009098: 98 10 20 01 mov 1, %o4 4000909c: 80 a2 20 00 cmp %o0, 0 400090a0: 12 80 00 6a bne 40009248 400090a4: 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; 400090a8: c4 07 bf ec ld [ %fp + -20 ], %g2 400090ac: c6 04 60 1c ld [ %l1 + 0x1c ], %g3 400090b0: 80 a0 c0 02 cmp %g3, %g2 400090b4: 02 80 00 0f be 400090f0 400090b8: 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 ); 400090bc: 80 a0 60 00 cmp %g1, 0 400090c0: 02 80 00 08 be 400090e0 <== NEVER TAKEN 400090c4: 01 00 00 00 nop 400090c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400090cc: 80 a0 60 00 cmp %g1, 0 400090d0: 02 80 00 04 be 400090e0 <== NEVER TAKEN 400090d4: 01 00 00 00 nop 400090d8: 9f c0 40 00 call %g1 400090dc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 400090e0: 40 00 25 24 call 40012570 <__errno> 400090e4: 01 00 00 00 nop 400090e8: 10 80 00 21 b 4000916c 400090ec: 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 ); 400090f0: 80 a0 60 00 cmp %g1, 0 400090f4: 22 80 00 09 be,a 40009118 <== NEVER TAKEN 400090f8: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 400090fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009100: 80 a0 60 00 cmp %g1, 0 40009104: 22 80 00 05 be,a 40009118 <== NEVER TAKEN 40009108: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 4000910c: 9f c0 40 00 call %g1 40009110: 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; 40009114: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 40009118: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4000911c: 80 a0 60 00 cmp %g1, 0 40009120: 02 80 00 07 be 4000913c <== NEVER TAKEN 40009124: 01 00 00 00 nop fs_root_loc = &mt_entry->mt_fs_root; 40009128: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 4000912c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40009130: 80 a0 60 00 cmp %g1, 0 40009134: 32 80 00 06 bne,a 4000914c <== ALWAYS TAKEN 40009138: 03 10 00 98 sethi %hi(0x40026000), %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 ); 4000913c: 40 00 25 0d call 40012570 <__errno> <== NOT EXECUTED 40009140: 01 00 00 00 nop <== NOT EXECUTED 40009144: 10 80 00 0a b 4000916c <== NOT EXECUTED 40009148: 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 ) 4000914c: c2 00 63 98 ld [ %g1 + 0x398 ], %g1 40009150: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40009154: 80 a0 40 11 cmp %g1, %l1 40009158: 12 80 00 08 bne 40009178 4000915c: 03 10 00 9c sethi %hi(0x40027000), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 40009160: 40 00 25 04 call 40012570 <__errno> 40009164: 01 00 00 00 nop 40009168: 82 10 20 10 mov 0x10, %g1 ! 10 4000916c: c2 22 00 00 st %g1, [ %o0 ] 40009170: 81 c7 e0 08 ret 40009174: 91 e8 3f ff restore %g0, -1, %o0 40009178: 05 10 00 9c sethi %hi(0x40027000), %g2 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000917c: c2 00 63 78 ld [ %g1 + 0x378 ], %g1 40009180: 10 80 00 07 b 4000919c 40009184: 84 10 a3 7c or %g2, 0x37c, %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; 40009188: c6 04 60 2c ld [ %l1 + 0x2c ], %g3 4000918c: 80 a1 00 03 cmp %g4, %g3 40009190: 02 bf ff f4 be 40009160 40009194: 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 ) { 40009198: c2 00 40 00 ld [ %g1 ], %g1 4000919c: 80 a0 40 02 cmp %g1, %g2 400091a0: 32 bf ff fa bne,a 40009188 400091a4: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 400091a8: 30 80 00 2a b,a 40009250 * 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 ) 400091ac: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400091b0: 9f c0 40 00 call %g1 400091b4: 90 10 00 11 mov %l1, %o0 400091b8: 80 a2 20 00 cmp %o0, 0 400091bc: 12 80 00 23 bne 40009248 <== NEVER TAKEN 400091c0: 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){ 400091c4: c2 04 60 28 ld [ %l1 + 0x28 ], %g1 400091c8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 400091cc: 9f c0 40 00 call %g1 400091d0: 90 10 00 11 mov %l1, %o0 400091d4: 80 a2 20 00 cmp %o0, 0 400091d8: 02 80 00 0b be 40009204 <== ALWAYS TAKEN 400091dc: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 400091e0: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 <== NOT EXECUTED 400091e4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 400091e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400091ec: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400091f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400091f4: 02 80 00 15 be 40009248 <== NOT EXECUTED 400091f8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 400091fc: 40 00 05 02 call 4000a604 <== NOT EXECUTED 40009200: 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 ); 40009204: 40 00 05 cc call 4000a934 <_Chain_Extract> 40009208: 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 ); 4000920c: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 40009210: 80 a0 60 00 cmp %g1, 0 40009214: 02 80 00 09 be 40009238 <== NEVER TAKEN 40009218: 90 10 00 11 mov %l1, %o0 4000921c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40009220: 80 a0 60 00 cmp %g1, 0 40009224: 02 80 00 05 be 40009238 <== NEVER TAKEN 40009228: 01 00 00 00 nop 4000922c: 9f c0 40 00 call %g1 40009230: 90 04 60 08 add %l1, 8, %o0 free( mt_entry ); 40009234: 90 10 00 11 mov %l1, %o0 40009238: 7f ff f0 6a call 400053e0 4000923c: b0 10 20 00 clr %i0 return 0; 40009240: 81 c7 e0 08 ret 40009244: 81 e8 00 00 restore } 40009248: 81 c7 e0 08 ret 4000924c: 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 ) 40009250: 7f ff f1 15 call 400056a4 40009254: 90 10 00 11 mov %l1, %o0 40009258: 80 a2 20 01 cmp %o0, 1 4000925c: 32 bf ff d4 bne,a 400091ac 40009260: c2 04 60 14 ld [ %l1 + 0x14 ], %g1 40009264: 30 bf ff bf b,a 40009160 =============================================================================== 40006990 : int utime( const char *path, const struct utimbuf *times ) { 40006990: 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 ) ) 40006994: 40 00 2b b0 call 40011854 40006998: 90 10 00 18 mov %i0, %o0 4000699c: a0 07 bf ec add %fp, -20, %l0 400069a0: 92 10 00 08 mov %o0, %o1 400069a4: 94 10 20 00 clr %o2 400069a8: 90 10 00 18 mov %i0, %o0 400069ac: 96 10 00 10 mov %l0, %o3 400069b0: 98 10 20 01 mov 1, %o4 400069b4: 7f ff f1 c6 call 400030cc 400069b8: b0 10 3f ff mov -1, %i0 400069bc: 80 a2 20 00 cmp %o0, 0 400069c0: 12 80 00 10 bne 40006a00 400069c4: c4 07 bf f8 ld [ %fp + -8 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 400069c8: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 400069cc: 80 a0 60 00 cmp %g1, 0 400069d0: 32 80 00 0e bne,a 40006a08 <== ALWAYS TAKEN 400069d4: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 400069d8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400069dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400069e0: 02 80 00 04 be 400069f0 <== NOT EXECUTED 400069e4: 01 00 00 00 nop <== NOT EXECUTED 400069e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400069ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400069f0: 40 00 24 b1 call 4000fcb4 <__errno> <== NOT EXECUTED 400069f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400069f8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400069fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006a00: 81 c7 e0 08 ret 40006a04: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40006a08: d2 06 40 00 ld [ %i1 ], %o1 40006a0c: 9f c0 40 00 call %g1 40006a10: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40006a14: c2 07 bf f8 ld [ %fp + -8 ], %g1 40006a18: 80 a0 60 00 cmp %g1, 0 40006a1c: 02 bf ff f9 be 40006a00 <== NEVER TAKEN 40006a20: b0 10 00 08 mov %o0, %i0 40006a24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006a28: 80 a0 60 00 cmp %g1, 0 40006a2c: 02 80 00 04 be 40006a3c <== NEVER TAKEN 40006a30: 01 00 00 00 nop 40006a34: 9f c0 40 00 call %g1 40006a38: 90 10 00 10 mov %l0, %o0 return result; } 40006a3c: 81 c7 e0 08 ret 40006a40: 81 e8 00 00 restore =============================================================================== 40004afc : */ void vprintk( const char *fmt, va_list ap ) { 40004afc: 9d e3 bf 88 save %sp, -120, %sp unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 40004b00: 23 10 00 6a sethi %hi(0x4001a800), %l1 for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40004b04: 39 10 00 66 sethi %hi(0x40019800), %i4 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004b08: 3b 10 00 66 sethi %hi(0x40019800), %i5 unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 40004b0c: a2 14 62 dc or %l1, 0x2dc, %l1 for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40004b10: b8 17 23 e8 or %i4, 0x3e8, %i4 unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 40004b14: ba 17 63 e0 or %i5, 0x3e0, %i5 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40004b18: 10 80 00 c4 b 40004e28 40004b1c: ac 07 bf e8 add %fp, -24, %l6 bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 40004b20: 32 80 00 88 bne,a 40004d40 40004b24: c2 04 40 00 ld [ %l1 ], %g1 BSP_output_char(*fmt); continue; } fmt++; 40004b28: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40004b2c: c2 4e 00 00 ldsb [ %i0 ], %g1 40004b30: 80 a0 60 30 cmp %g1, 0x30 40004b34: 12 80 00 05 bne 40004b48 40004b38: b6 10 20 20 mov 0x20, %i3 lead = '0'; fmt++; 40004b3c: b0 06 20 01 inc %i0 40004b40: b6 10 20 30 mov 0x30, %i3 } if (*fmt == '-' ) { 40004b44: c2 4e 00 00 ldsb [ %i0 ], %g1 40004b48: 80 a0 60 2d cmp %g1, 0x2d 40004b4c: 12 80 00 04 bne 40004b5c 40004b50: a8 10 20 00 clr %l4 minus = true; fmt++; 40004b54: b0 06 20 01 inc %i0 40004b58: a8 10 20 01 mov 1, %l4 40004b5c: 10 80 00 08 b 40004b7c 40004b60: a0 10 20 00 clr %l0 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 40004b64: 83 38 60 18 sra %g1, 0x18, %g1 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 40004b68: a1 2c 20 01 sll %l0, 1, %l0 width += ((unsigned) *fmt - '0'); 40004b6c: 82 00 7f d0 add %g1, -48, %g1 if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 40004b70: a0 04 00 02 add %l0, %g2, %l0 width += ((unsigned) *fmt - '0'); fmt++; 40004b74: b0 06 20 01 inc %i0 minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += ((unsigned) *fmt - '0'); 40004b78: a0 00 40 10 add %g1, %l0, %l0 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004b7c: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 40004b80: 85 2c 20 03 sll %l0, 3, %g2 } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004b84: 82 02 3f d0 add %o0, -48, %g1 40004b88: 82 08 60 ff and %g1, 0xff, %g1 40004b8c: 80 a0 60 09 cmp %g1, 9 40004b90: 08 bf ff f5 bleu 40004b64 40004b94: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40004b98: 83 38 60 18 sra %g1, 0x18, %g1 40004b9c: 80 a0 60 6c cmp %g1, 0x6c 40004ba0: 12 80 00 05 bne 40004bb4 40004ba4: 83 2a 20 18 sll %o0, 0x18, %g1 lflag = true; c = *++fmt; 40004ba8: b0 06 20 01 inc %i0 40004bac: d0 0e 00 00 ldub [ %i0 ], %o0 } if ( c == 'c' ) { 40004bb0: 83 2a 20 18 sll %o0, 0x18, %g1 40004bb4: 83 38 60 18 sra %g1, 0x18, %g1 40004bb8: 80 a0 60 63 cmp %g1, 0x63 40004bbc: 12 80 00 08 bne 40004bdc 40004bc0: 80 a0 60 73 cmp %g1, 0x73 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 40004bc4: d0 06 40 00 ld [ %i1 ], %o0 BSP_output_char(chr); 40004bc8: c2 04 40 00 ld [ %l1 ], %g1 40004bcc: 91 2a 20 18 sll %o0, 0x18, %o0 lflag = true; c = *++fmt; } if ( c == 'c' ) { /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 40004bd0: b2 06 60 04 add %i1, 4, %i1 BSP_output_char(chr); 40004bd4: 10 80 00 5b b 40004d40 40004bd8: 91 3a 20 18 sra %o0, 0x18, %o0 continue; } if ( c == 's' ) { 40004bdc: 12 80 00 33 bne 40004ca8 40004be0: 80 a0 60 4f cmp %g1, 0x4f unsigned i, len; char *s, *str; str = va_arg(ap, char *); 40004be4: e6 06 40 00 ld [ %i1 ], %l3 if ( str == NULL ) { 40004be8: 80 a4 e0 00 cmp %l3, 0 40004bec: 12 80 00 03 bne 40004bf8 40004bf0: b2 06 60 04 add %i1, 4, %i1 40004bf4: a6 10 00 1d mov %i5, %l3 40004bf8: a4 10 20 00 clr %l2 str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 40004bfc: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1 40004c00: 80 a0 60 00 cmp %g1, 0 40004c04: 32 bf ff fe bne,a 40004bfc 40004c08: a4 04 a0 01 inc %l2 ; /* leading spaces */ if ( !minus ) 40004c0c: 80 8d 20 ff btst 0xff, %l4 40004c10: 02 80 00 07 be 40004c2c 40004c14: aa 10 00 12 mov %l2, %l5 for ( i=len ; i 40004c1c: 80 a4 20 00 cmp %l0, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40004c34: c2 04 40 00 ld [ %l1 ], %g1 BSP_output_char(' '); /* no width option */ if (width == 0) { 40004c38: 80 a4 20 00 cmp %l0, 0 40004c3c: 22 80 00 02 be,a 40004c44 40004c40: a0 10 00 12 mov %l2, %l0 width = len; } /* output the string */ for ( i=0 ; i 40004c4c: 80 8d 20 ff btst 0xff, %l4 40004c50: 10 80 00 06 b 40004c68 40004c54: d0 4c c0 00 ldsb [ %l3 ], %o0 BSP_output_char(*str); 40004c58: c2 04 40 00 ld [ %l1 ], %g1 40004c5c: 9f c0 40 00 call %g1 40004c60: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40004c70: a6 04 e0 01 inc %l3 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40004c74: 80 8d 20 ff btst 0xff, %l4 40004c78: 12 80 00 08 bne 40004c98 40004c7c: 80 a4 80 10 cmp %l2, %l0 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40004c80: 10 80 00 6a b 40004e28 40004c84: b0 06 20 01 inc %i0 for ( i=0 ; i 40004c9c: c2 04 40 00 ld [ %l1 ], %g1 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40004ca0: 10 80 00 62 b 40004e28 40004ca4: b0 06 20 01 inc %i0 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 40004ca8: 22 80 00 2a be,a 40004d50 40004cac: 82 10 20 00 clr %g1 40004cb0: 80 a0 60 6f cmp %g1, 0x6f 40004cb4: 22 80 00 27 be,a 40004d50 <== NEVER TAKEN 40004cb8: 82 10 20 00 clr %g1 <== NOT EXECUTED base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 40004cbc: 80 a0 60 49 cmp %g1, 0x49 40004cc0: 22 80 00 26 be,a 40004d58 40004cc4: 82 10 20 01 mov 1, %g1 40004cc8: 80 a0 60 69 cmp %g1, 0x69 40004ccc: 22 80 00 23 be,a 40004d58 40004cd0: 82 10 20 01 mov 1, %g1 40004cd4: 80 a0 60 44 cmp %g1, 0x44 40004cd8: 22 80 00 20 be,a 40004d58 40004cdc: 82 10 20 01 mov 1, %g1 40004ce0: 80 a0 60 64 cmp %g1, 0x64 40004ce4: 22 80 00 1d be,a 40004d58 40004ce8: 82 10 20 01 mov 1, %g1 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 40004cec: 80 a0 60 55 cmp %g1, 0x55 40004cf0: 22 80 00 1a be,a 40004d58 40004cf4: 82 10 20 00 clr %g1 40004cf8: 80 a0 60 75 cmp %g1, 0x75 40004cfc: 32 80 00 04 bne,a 40004d0c 40004d00: 91 2a 20 18 sll %o0, 0x18, %o0 40004d04: 10 80 00 15 b 40004d58 40004d08: 82 10 20 00 clr %g1 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 40004d0c: 91 3a 20 18 sra %o0, 0x18, %o0 40004d10: 80 a2 20 58 cmp %o0, 0x58 40004d14: 02 80 00 06 be 40004d2c 40004d18: 82 10 20 00 clr %g1 40004d1c: 80 a2 20 78 cmp %o0, 0x78 40004d20: 12 80 00 05 bne 40004d34 40004d24: 80 a2 20 70 cmp %o0, 0x70 40004d28: 82 10 20 00 clr %g1 40004d2c: 10 80 00 0c b 40004d5c 40004d30: a4 10 20 10 mov 0x10, %l2 base = 16; sign = false; } else if ( c == 'p' ) { 40004d34: 02 80 00 0a be 40004d5c 40004d38: a4 10 20 10 mov 0x10, %l2 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 40004d3c: c2 04 40 00 ld [ %l1 ], %g1 40004d40: 9f c0 40 00 call %g1 40004d44: b0 06 20 01 inc %i0 continue; 40004d48: 10 80 00 39 b 40004e2c 40004d4c: d0 4e 00 00 ldsb [ %i0 ], %o0 40004d50: 10 80 00 03 b 40004d5c 40004d54: a4 10 20 08 mov 8, %l2 40004d58: a4 10 20 0a mov 0xa, %l2 } printNum( 40004d5c: e8 06 40 00 ld [ %i1 ], %l4 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40004d60: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); continue; } printNum( lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 40004d64: b2 06 60 04 add %i1, 4, %i1 unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 40004d68: 02 80 00 0d be 40004d9c 40004d6c: b6 0e e0 30 and %i3, 0x30, %i3 40004d70: 80 a5 20 00 cmp %l4, 0 40004d74: 36 80 00 12 bge,a 40004dbc 40004d78: a6 10 20 00 clr %l3 BSP_output_char('-'); 40004d7c: c2 04 40 00 ld [ %l1 ], %g1 40004d80: 9f c0 40 00 call %g1 40004d84: 90 10 20 2d mov 0x2d, %o0 unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; 40004d88: 82 1c 20 00 xor %l0, 0, %g1 unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); unsigned_num = (unsigned long) -num; 40004d8c: a8 20 00 14 neg %l4 if (maxwidth) maxwidth--; 40004d90: 80 a0 00 01 cmp %g0, %g1 40004d94: 82 40 20 00 addx %g0, 0, %g1 40004d98: a0 24 00 01 sub %l0, %g1, %l0 } else { unsigned_num = (unsigned long) num; 40004d9c: 10 80 00 08 b 40004dbc 40004da0: a6 10 20 00 clr %l3 } count = 0; while ((n = unsigned_num / base) > 0) { toPrint[count++] = (char) (unsigned_num - (n * base)); 40004da4: 40 00 46 81 call 400167a8 <.umul> 40004da8: 92 10 00 12 mov %l2, %o1 40004dac: 90 25 00 08 sub %l4, %o0, %o0 40004db0: a8 10 00 17 mov %l7, %l4 40004db4: d0 2d 80 13 stb %o0, [ %l6 + %l3 ] 40004db8: a6 10 00 15 mov %l5, %l3 } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 40004dbc: 90 10 00 14 mov %l4, %o0 40004dc0: 92 10 00 12 mov %l2, %o1 40004dc4: 40 00 46 b3 call 40016890 <.udiv> 40004dc8: aa 04 e0 01 add %l3, 1, %l5 40004dcc: ae 92 20 00 orcc %o0, 0, %l7 40004dd0: 12 bf ff f5 bne 40004da4 40004dd4: 82 07 80 13 add %fp, %l3, %g1 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 40004dd8: 10 80 00 05 b 40004dec 40004ddc: e8 28 7f e8 stb %l4, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) 40004de0: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 40004de4: 9f c0 40 00 call %g1 40004de8: 90 10 00 1b mov %i3, %o0 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 40004dec: 80 a4 00 15 cmp %l0, %l5 40004df0: 38 bf ff fc bgu,a 40004de0 40004df4: c2 04 40 00 ld [ %l1 ], %g1 40004df8: a6 05 80 13 add %l6, %l3, %l3 40004dfc: 10 80 00 07 b 40004e18 40004e00: a0 10 20 00 clr %l0 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40004e04: c2 04 40 00 ld [ %l1 ], %g1 40004e08: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0 40004e0c: 9f c0 40 00 call %g1 40004e10: a0 04 20 01 inc %l0 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 40004e14: a6 04 ff ff add %l3, -1, %l3 40004e18: 80 a4 00 15 cmp %l0, %l5 40004e1c: 2a bf ff fa bcs,a 40004e04 40004e20: c4 4c c0 00 ldsb [ %l3 ], %g2 void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 40004e24: b0 06 20 01 inc %i0 40004e28: d0 4e 00 00 ldsb [ %i0 ], %o0 40004e2c: 80 a2 20 00 cmp %o0, 0 40004e30: 12 bf ff 3c bne 40004b20 40004e34: 80 a2 20 25 cmp %o0, 0x25 sign, width, lead ); } } 40004e38: 81 c7 e0 08 ret 40004e3c: 81 e8 00 00 restore =============================================================================== 400190cc : ssize_t write( int fd, const void *buffer, size_t count ) { 400190cc: 9d e3 bf a0 save %sp, -96, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400190d0: 03 10 00 6a sethi %hi(0x4001a800), %g1 400190d4: c2 00 61 e4 ld [ %g1 + 0x1e4 ], %g1 ! 4001a9e4 ssize_t write( int fd, const void *buffer, size_t count ) { 400190d8: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400190dc: 80 a6 00 01 cmp %i0, %g1 400190e0: 1a 80 00 0c bcc 40019110 <== NEVER TAKEN 400190e4: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400190e8: 03 10 00 6c sethi %hi(0x4001b000), %g1 400190ec: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001b1ac 400190f0: 83 2e 20 06 sll %i0, 6, %g1 400190f4: b1 2e 20 03 sll %i0, 3, %i0 400190f8: b0 06 00 01 add %i0, %g1, %i0 400190fc: a0 04 00 18 add %l0, %i0, %l0 rtems_libio_check_is_open( iop ); 40019100: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40019104: 80 88 61 00 btst 0x100, %g1 40019108: 12 80 00 06 bne 40019120 <== ALWAYS TAKEN 4001910c: 80 a6 60 00 cmp %i1, 0 40019110: 7f ff d0 48 call 4000d230 <__errno> <== NOT EXECUTED 40019114: 01 00 00 00 nop <== NOT EXECUTED 40019118: 10 80 00 14 b 40019168 <== NOT EXECUTED 4001911c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 40019120: 02 80 00 07 be 4001913c <== NEVER TAKEN 40019124: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40019128: 02 80 00 1c be 40019198 4001912c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40019130: 80 88 60 04 btst 4, %g1 40019134: 32 80 00 06 bne,a 4001914c <== ALWAYS TAKEN 40019138: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4001913c: 7f ff d0 3d call 4000d230 <__errno> <== NOT EXECUTED 40019140: 01 00 00 00 nop <== NOT EXECUTED 40019144: 10 80 00 09 b 40019168 <== NOT EXECUTED 40019148: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 4001914c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40019150: 80 a0 60 00 cmp %g1, 0 40019154: 12 80 00 08 bne 40019174 <== ALWAYS TAKEN 40019158: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001915c: 7f ff d0 35 call 4000d230 <__errno> <== NOT EXECUTED 40019160: 01 00 00 00 nop <== NOT EXECUTED 40019164: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40019168: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001916c: 10 80 00 0b b 40019198 <== NOT EXECUTED 40019170: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 40019174: 9f c0 40 00 call %g1 40019178: 90 10 00 10 mov %l0, %o0 if ( rc > 0 ) 4001917c: 80 a2 20 00 cmp %o0, 0 40019180: 04 80 00 06 ble 40019198 <== NEVER TAKEN 40019184: 85 3a 20 1f sra %o0, 0x1f, %g2 iop->offset += rc; 40019188: d8 1c 20 10 ldd [ %l0 + 0x10 ], %o4 4001918c: 86 83 40 08 addcc %o5, %o0, %g3 40019190: 84 43 00 02 addx %o4, %g2, %g2 40019194: c4 3c 20 10 std %g2, [ %l0 + 0x10 ] return rc; } 40019198: 81 c7 e0 08 ret 4001919c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 40006858 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 40006858: 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 ); 4000685c: 03 10 00 7d sethi %hi(0x4001f400), %g1 40006860: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 4001f564 40006864: 80 a6 00 01 cmp %i0, %g1 40006868: 1a 80 00 0c bcc 40006898 <== NEVER TAKEN 4000686c: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 40006870: 03 10 00 81 sethi %hi(0x40020400), %g1 40006874: e4 00 61 04 ld [ %g1 + 0x104 ], %l2 ! 40020504 40006878: 83 2e 20 06 sll %i0, 6, %g1 4000687c: b1 2e 20 03 sll %i0, 3, %i0 40006880: b0 06 00 01 add %i0, %g1, %i0 40006884: a4 04 80 18 add %l2, %i0, %l2 rtems_libio_check_is_open( iop ); 40006888: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1 4000688c: 80 88 61 00 btst 0x100, %g1 40006890: 12 80 00 06 bne 400068a8 40006894: 80 88 60 04 btst 4, %g1 40006898: 40 00 24 2c call 4000f948 <__errno> 4000689c: b0 10 3f ff mov -1, %i0 400068a0: 10 80 00 1f b 4000691c 400068a4: 82 10 20 09 mov 9, %g1 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400068a8: 02 80 00 1a be 40006910 <== NEVER TAKEN 400068ac: 80 a6 60 00 cmp %i1, 0 /* * Argument validation on IO vector */ if ( !iov ) 400068b0: 02 80 00 18 be 40006910 400068b4: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 400068b8: 04 80 00 16 ble 40006910 400068bc: 80 a6 a4 00 cmp %i2, 0x400 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 400068c0: 14 80 00 14 bg 40006910 <== NEVER TAKEN 400068c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 400068c8: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 400068cc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 400068d0: 80 a0 60 00 cmp %g1, 0 400068d4: 12 80 00 06 bne 400068ec <== ALWAYS TAKEN 400068d8: 19 00 00 1f sethi %hi(0x7c00), %o4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 400068dc: 40 00 24 1b call 4000f948 <__errno> <== NOT EXECUTED 400068e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400068e4: 10 80 00 0e b 4000691c <== NOT EXECUTED 400068e8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400068ec: 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 ) 400068f0: 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 ); 400068f4: 84 10 20 01 mov 1, %g2 400068f8: 88 10 20 00 clr %g4 400068fc: 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 ) 40006900: da 00 40 00 ld [ %g1 ], %o5 40006904: 80 a3 60 00 cmp %o5, 0 40006908: 12 80 00 08 bne 40006928 4000690c: 88 01 20 01 inc %g4 rtems_set_errno_and_return_minus_one( EINVAL ); 40006910: 40 00 24 0e call 4000f948 <__errno> 40006914: b0 10 3f ff mov -1, %i0 40006918: 82 10 20 16 mov 0x16, %g1 4000691c: c2 22 00 00 st %g1, [ %o0 ] 40006920: 81 c7 e0 08 ret 40006924: 81 e8 00 00 restore if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 40006928: da 00 60 04 ld [ %g1 + 4 ], %o5 * 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++ ) { 4000692c: 82 00 60 08 add %g1, 8, %g1 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 ) 40006930: 80 a0 00 0d cmp %g0, %o5 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 40006934: 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 ) 40006938: 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 ) 4000693c: 80 a3 40 0c cmp %o5, %o4 40006940: 14 bf ff f4 bg 40006910 <== NEVER TAKEN 40006944: 84 08 80 0b and %g2, %o3, %g2 40006948: 80 a3 40 03 cmp %o5, %g3 4000694c: 06 bf ff f1 bl 40006910 40006950: 80 a1 00 1a cmp %g4, %i2 * 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++ ) { 40006954: 06 bf ff eb bl 40006900 40006958: 86 10 00 0d mov %o5, %g3 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 4000695c: 80 88 a0 ff btst 0xff, %g2 40006960: a6 10 20 00 clr %l3 40006964: 12 bf ff ef bne 40006920 40006968: b0 10 20 00 clr %i0 /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 4000696c: d4 06 60 04 ld [ %i1 + 4 ], %o2 40006970: 80 a2 a0 00 cmp %o2, 0 40006974: 02 80 00 17 be 400069d0 <== NEVER TAKEN 40006978: a6 04 e0 01 inc %l3 continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 4000697c: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 40006980: d2 06 40 00 ld [ %i1 ], %o1 40006984: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40006988: 9f c0 40 00 call %g1 4000698c: 90 10 00 12 mov %l2, %o0 if ( bytes < 0 ) 40006990: 80 a2 20 00 cmp %o0, 0 40006994: 16 80 00 04 bge 400069a4 <== ALWAYS TAKEN 40006998: 01 00 00 00 nop 4000699c: 81 c7 e0 08 ret <== NOT EXECUTED 400069a0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; if ( bytes > 0 ) { 400069a4: 02 80 00 07 be 400069c0 <== NEVER TAKEN 400069a8: a1 3a 20 1f sra %o0, 0x1f, %l0 iop->offset += bytes; 400069ac: c4 1c a0 10 ldd [ %l2 + 0x10 ], %g2 400069b0: 86 80 c0 08 addcc %g3, %o0, %g3 total += bytes; 400069b4: b0 06 00 08 add %i0, %o0, %i0 if ( bytes < 0 ) return -1; if ( bytes > 0 ) { iop->offset += bytes; 400069b8: 84 40 80 10 addx %g2, %l0, %g2 400069bc: c4 3c a0 10 std %g2, [ %l2 + 0x10 ] total += bytes; } if (bytes != iov[ v ].iov_len) 400069c0: c2 06 60 04 ld [ %i1 + 4 ], %g1 400069c4: 80 a2 00 01 cmp %o0, %g1 400069c8: 12 80 00 05 bne 400069dc <== NEVER TAKEN 400069cc: 01 00 00 00 nop } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 400069d0: 80 a4 c0 1a cmp %l3, %i2 400069d4: 06 bf ff e6 bl 4000696c 400069d8: b2 06 60 08 add %i1, 8, %i1 if (bytes != iov[ v ].iov_len) break; } return total; } 400069dc: 81 c7 e0 08 ret 400069e0: 81 e8 00 00 restore