=============================================================================== 0200b764 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 200b764: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200b768: 40 00 02 4e call 200c0a0 200b76c: fa 06 20 08 ld [ %i0 + 8 ], %i5 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200b770: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 200b774: 91 2a 20 10 sll %o0, 0x10, %o0 200b778: 91 32 20 10 srl %o0, 0x10, %o0 200b77c: 80 a2 00 01 cmp %o0, %g1 200b780: 02 80 00 0a be 200b7a8 200b784: 80 a2 20 00 cmp %o0, 0 200b788: 22 80 00 09 be,a 200b7ac <== NEVER TAKEN 200b78c: f2 37 60 3c sth %i1, [ %i5 + 0x3c ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 200b790: 40 00 10 a2 call 200fa18 <__errno> 200b794: b0 10 3f ff mov -1, %i0 200b798: 82 10 20 01 mov 1, %g1 200b79c: c2 22 00 00 st %g1, [ %o0 ] 200b7a0: 81 c7 e0 08 ret 200b7a4: 81 e8 00 00 restore #endif jnode->st_uid = owner; 200b7a8: f2 37 60 3c sth %i1, [ %i5 + 0x3c ] jnode->st_gid = group; 200b7ac: f4 37 60 3e sth %i2, [ %i5 + 0x3e ] IMFS_update_ctime( jnode ); 200b7b0: 90 07 bf f8 add %fp, -8, %o0 200b7b4: 7f ff e0 34 call 2003884 200b7b8: 92 10 20 00 clr %o1 200b7bc: c2 07 bf f8 ld [ %fp + -8 ], %g1 200b7c0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return 0; } 200b7c4: 81 c7 e0 08 ret 200b7c8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200589c : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 200589c: 9d e3 bf a0 save %sp, -96, %sp the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 20058a0: 35 00 80 88 sethi %hi(0x2022000), %i2 20058a4: 39 00 80 91 sethi %hi(0x2024400), %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20058a8: 21 00 80 88 sethi %hi(0x2022000), %l0 return; } puts(""); 20058ac: 23 00 80 88 sethi %hi(0x2022000), %l1 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 20058b0: 25 00 80 88 sethi %hi(0x2022000), %l2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20058b4: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 20058b8: b4 16 a2 98 or %i2, 0x298, %i2 20058bc: b8 17 20 08 or %i4, 8, %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20058c0: a0 14 23 08 or %l0, 0x308, %l0 return; } puts(""); 20058c4: a2 14 62 30 or %l1, 0x230, %l1 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 20058c8: 10 80 00 4d b 20059fc 20058cc: a4 14 a2 f0 or %l2, 0x2f0, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 20058d0: 90 10 00 1a mov %i2, %o0 20058d4: 40 00 39 33 call 2013da0 20058d8: b6 06 e0 01 inc %i3 20058dc: 10 80 00 03 b 20058e8 20058e0: c2 07 00 00 ld [ %i4 ], %g1 20058e4: c2 07 00 00 ld [ %i4 ], %g1 !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++ ) 20058e8: 80 a6 c0 19 cmp %i3, %i1 20058ec: 04 bf ff f9 ble 20058d0 20058f0: d2 00 60 08 ld [ %g1 + 8 ], %o1 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 20058f4: 40 00 39 2b call 2013da0 20058f8: 90 07 60 0c add %i5, 0xc, %o0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 20058fc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2005900: d4 00 40 00 ld [ %g1 ], %o2 switch( IMFS_type( the_jnode ) ) { 2005904: 80 a2 a0 06 cmp %o2, 6 2005908: 38 80 00 2d bgu,a 20059bc <== NEVER TAKEN 200590c: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 2005910: 95 2a a0 02 sll %o2, 2, %o2 2005914: 03 00 80 16 sethi %hi(0x2005800), %g1 2005918: 82 10 60 80 or %g1, 0x80, %g1 ! 2005880 200591c: c2 00 40 0a ld [ %g1 + %o2 ], %g1 2005920: 81 c0 40 00 jmp %g1 2005924: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2005928: c2 07 00 00 ld [ %i4 ], %g1 200592c: 90 10 20 2f mov 0x2f, %o0 2005930: 40 00 38 e8 call 2013cd0 2005934: d2 00 60 08 ld [ %g1 + 8 ], %o1 2005938: 30 80 00 26 b,a 20059d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 200593c: c2 07 00 00 ld [ %i4 ], %g1 2005940: 13 00 80 88 sethi %hi(0x2022000), %o1 2005944: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005948: 92 12 62 a0 or %o1, 0x2a0, %o1 200594c: 10 80 00 08 b 200596c 2005950: d4 1f 60 50 ldd [ %i5 + 0x50 ], %o2 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2005954: c2 07 00 00 ld [ %i4 ], %g1 2005958: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 200595c: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005960: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 2005964: 13 00 80 88 sethi %hi(0x2022000), %o1 2005968: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 20222b8 200596c: 40 00 38 bd call 2013c60 2005970: 01 00 00 00 nop 2005974: 30 80 00 17 b,a 20059d0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2005978: c2 07 00 00 ld [ %i4 ], %g1 200597c: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005980: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005984: 13 00 80 88 sethi %hi(0x2022000), %o1 2005988: 40 00 38 b6 call 2013c60 200598c: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 20222c8 2005990: 30 80 00 10 b,a 20059d0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005994: 11 00 80 88 sethi %hi(0x2022000), %o0 2005998: c2 07 00 00 ld [ %i4 ], %g1 200599c: 10 80 00 04 b 20059ac 20059a0: 90 12 22 d8 or %o0, 0x2d8, %o0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 20059a4: c2 07 00 00 ld [ %i4 ], %g1 20059a8: 90 10 00 12 mov %l2, %o0 20059ac: 40 00 38 fd call 2013da0 20059b0: d2 00 60 08 ld [ %g1 + 8 ], %o1 } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 20059b4: 10 80 00 0a b 20059dc 20059b8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20059bc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20059c0: 40 00 38 a8 call 2013c60 <== NOT EXECUTED 20059c4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20059c8: 10 80 00 05 b 20059dc <== NOT EXECUTED 20059cc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED return; } puts(""); 20059d0: 40 00 3f d9 call 2015934 20059d4: 90 10 00 11 mov %l1, %o0 20059d8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 20059dc: c2 00 40 00 ld [ %g1 ], %g1 20059e0: 80 a0 60 00 cmp %g1, 0 20059e4: 32 80 00 06 bne,a 20059fc 20059e8: fa 07 40 00 ld [ %i5 ], %i5 IMFS_dump_directory( the_jnode, level + 1 ); 20059ec: 90 10 00 1d mov %i5, %o0 20059f0: 7f ff ff ab call 200589c 20059f4: 92 06 60 01 add %i1, 1, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 20059f8: fa 07 40 00 ld [ %i5 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 20059fc: 82 06 20 54 add %i0, 0x54, %g1 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 2005a00: 80 a7 40 01 cmp %i5, %g1 2005a04: 12 bf ff b8 bne 20058e4 2005a08: b6 10 20 00 clr %i3 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2005a0c: 81 c7 e0 08 ret 2005a10: 81 e8 00 00 restore =============================================================================== 0200b908 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b908: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; 200b90c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200b910: 90 10 00 18 mov %i0, %o0 200b914: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200b918: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200b91c: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 200b920: 40 00 02 f0 call 200c4e0 200b924: 92 10 20 01 mov 1, %o1 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200b928: 80 8a 20 ff btst 0xff, %o0 200b92c: 12 80 00 04 bne 200b93c 200b930: 80 a6 e0 01 cmp %i3, 1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b934: 81 c7 e0 08 ret 200b938: 91 e8 20 01 restore %g0, 1, %o0 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 200b93c: 12 80 00 06 bne 200b954 200b940: 82 10 20 00 clr %g1 200b944: c2 4e 80 00 ldsb [ %i2 ], %g1 200b948: 82 18 60 2e xor %g1, 0x2e, %g1 200b94c: 80 a0 00 01 cmp %g0, %g1 200b950: 82 60 3f ff subx %g0, -1, %g1 IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 200b954: 80 a0 60 00 cmp %g1, 0 200b958: 12 80 00 2b bne 200ba04 200b95c: 80 a6 e0 02 cmp %i3, 2 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200b960: 12 80 00 0b bne 200b98c 200b964: 80 a0 60 00 cmp %g1, 0 200b968: c4 4e 80 00 ldsb [ %i2 ], %g2 200b96c: 80 a0 a0 2e cmp %g2, 0x2e 200b970: 12 80 00 07 bne 200b98c 200b974: 80 a0 60 00 cmp %g1, 0 200b978: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200b97c: 82 18 60 2e xor %g1, 0x2e, %g1 200b980: 80 a0 00 01 cmp %g0, %g1 200b984: 82 60 3f ff subx %g0, -1, %g1 return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { 200b988: 80 a0 60 00 cmp %g1, 0 200b98c: 22 80 00 04 be,a 200b99c 200b990: fa 07 20 50 ld [ %i4 + 0x50 ], %i5 return dir->Parent; 200b994: 10 80 00 17 b 200b9f0 200b998: fa 07 20 08 ld [ %i4 + 8 ], %i5 } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); 200b99c: 10 80 00 10 b 200b9dc 200b9a0: b2 07 20 54 add %i4, 0x54, %i1 while ( current != tail ) { IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 200b9a4: 92 10 00 1a mov %i2, %o1 200b9a8: 40 00 15 cb call 20110d4 200b9ac: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200b9b0: 80 a2 20 00 cmp %o0, 0 200b9b4: 12 80 00 06 bne 200b9cc 200b9b8: 82 10 20 00 clr %g1 200b9bc: 82 07 40 1b add %i5, %i3, %g1 200b9c0: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200b9c4: 80 a0 00 01 cmp %g0, %g1 200b9c8: 82 60 3f ff subx %g0, -1, %g1 if ( match ) { 200b9cc: 80 a0 60 00 cmp %g1, 0 200b9d0: 12 80 00 09 bne 200b9f4 200b9d4: 80 a7 60 00 cmp %i5, 0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 200b9d8: fa 07 40 00 ld [ %i5 ], %i5 } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { 200b9dc: 80 a7 40 19 cmp %i5, %i1 200b9e0: 12 bf ff f1 bne 200b9a4 200b9e4: 90 07 60 0c add %i5, 0xc, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 200b9e8: 81 c7 e0 08 ret 200b9ec: 91 e8 20 02 restore %g0, 2, %o0 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 200b9f0: 80 a7 60 00 cmp %i5, 0 200b9f4: 32 80 00 06 bne,a 200ba0c 200b9f8: c2 06 20 04 ld [ %i0 + 4 ], %g1 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 200b9fc: 81 c7 e0 08 ret 200ba00: 91 e8 20 02 restore %g0, 2, %o0 IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 200ba04: ba 10 00 1c mov %i4, %i5 if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 200ba08: c2 06 20 04 ld [ %i0 + 4 ], %g1 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 200ba0c: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200ba10: 80 a0 00 01 cmp %g0, %g1 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 200ba14: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200ba18: 84 60 3f ff subx %g0, -1, %g2 200ba1c: c2 00 40 00 ld [ %g1 ], %g1 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 200ba20: c0 26 20 0c clr [ %i0 + 0xc ] bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 200ba24: 80 a0 60 02 cmp %g1, 2 200ba28: 12 80 00 0a bne 200ba50 200ba2c: 88 10 00 02 mov %g2, %g4 200ba30: 80 a0 a0 00 cmp %g2, 0 200ba34: 22 80 00 2b be,a 200bae0 200ba38: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 200ba3c: 80 88 e0 08 btst 8, %g3 200ba40: 22 80 00 29 be,a 200bae4 200ba44: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 entry = entry->info.hard_link.link_node; 200ba48: 10 80 00 26 b 200bae0 200ba4c: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200ba50: 80 a0 60 03 cmp %g1, 3 200ba54: 12 80 00 10 bne 200ba94 200ba58: 80 a0 60 00 cmp %g1, 0 200ba5c: 80 a0 a0 00 cmp %g2, 0 200ba60: 02 80 00 04 be 200ba70 200ba64: 80 88 e0 10 btst 0x10, %g3 200ba68: 22 80 00 1f be,a 200bae4 200ba6c: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 const char *target = entry->info.sym_link.name; 200ba70: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 200ba74: 40 00 15 66 call 201100c 200ba78: 90 10 00 1d mov %i5, %o0 200ba7c: 92 10 00 1d mov %i5, %o1 200ba80: 94 10 00 08 mov %o0, %o2 200ba84: 7f ff e4 7a call 2004c6c 200ba88: 90 10 00 18 mov %i0, %o0 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200ba8c: 81 c7 e0 08 ret 200ba90: 91 e8 20 01 restore %g0, 1, %o0 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 200ba94: 32 80 00 14 bne,a 200bae4 200ba98: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 if ( node->info.directory.mt_fs != NULL ) { 200ba9c: d2 07 60 5c ld [ %i5 + 0x5c ], %o1 200baa0: 80 a2 60 00 cmp %o1, 0 200baa4: 02 80 00 0f be 200bae0 200baa8: 90 10 00 18 mov %i0, %o0 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200baac: d4 07 60 30 ld [ %i5 + 0x30 ], %o2 200bab0: d6 17 60 3c lduh [ %i5 + 0x3c ], %o3 200bab4: d8 17 60 3e lduh [ %i5 + 0x3e ], %o4 { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root; 200bab8: b8 02 60 24 add %o1, 0x24, %i4 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200babc: 40 00 02 89 call 200c4e0 200bac0: 92 10 20 01 mov 1, %o1 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200bac4: 80 8a 20 ff btst 0xff, %o0 200bac8: 02 80 00 04 be 200bad8 <== NEVER TAKEN 200bacc: 90 10 00 18 mov %i0, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200bad0: 7f ff e4 4e call 2004c08 200bad4: 92 10 00 1c mov %i4, %o1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200bad8: 81 c7 e0 08 ret 200badc: 91 e8 20 01 restore %g0, 1, %o0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 200bae0: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 200bae4: 82 00 7f ff add %g1, -1, %g1 200bae8: c2 37 20 34 sth %g1, [ %i4 + 0x34 ] ++entry->reference_count; 200baec: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1 200baf0: 82 00 60 01 inc %g1 200baf4: c2 37 60 34 sth %g1, [ %i5 + 0x34 ] static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 200baf8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 currentloc->node_access = entry; 200bafc: fa 26 20 20 st %i5, [ %i0 + 0x20 ] 200bb00: c2 00 60 04 ld [ %g1 + 4 ], %g1 200bb04: c2 26 20 28 st %g1, [ %i0 + 0x28 ] void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200bb08: b0 09 20 ff and %g4, 0xff, %i0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200bb0c: 81 c7 e0 08 ret 200bb10: 81 e8 00 00 restore =============================================================================== 0200bb2c : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 200bb2c: 9d e3 bf 98 save %sp, -104, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 200bb30: 40 00 01 5c call 200c0a0 200bb34: fa 06 20 08 ld [ %i0 + 8 ], %i5 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200bb38: c2 17 60 3c lduh [ %i5 + 0x3c ], %g1 200bb3c: 91 2a 20 10 sll %o0, 0x10, %o0 200bb40: 91 32 20 10 srl %o0, 0x10, %o0 200bb44: 80 a2 00 01 cmp %o0, %g1 200bb48: 02 80 00 0a be 200bb70 200bb4c: 80 a2 20 00 cmp %o0, 0 200bb50: 22 80 00 09 be,a 200bb74 <== NEVER TAKEN 200bb54: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 200bb58: 40 00 0f b0 call 200fa18 <__errno> 200bb5c: b0 10 3f ff mov -1, %i0 200bb60: 82 10 20 01 mov 1, %g1 200bb64: c2 22 00 00 st %g1, [ %o0 ] 200bb68: 81 c7 e0 08 ret 200bb6c: 81 e8 00 00 restore /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 200bb70: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 200bb74: 90 07 bf f8 add %fp, -8, %o0 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 200bb78: 82 08 70 00 and %g1, -4096, %g1 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 200bb7c: 92 10 20 00 clr %o1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 200bb80: b2 0e 6f ff and %i1, 0xfff, %i1 200bb84: b2 16 40 01 or %i1, %g1, %i1 IMFS_update_ctime( jnode ); 200bb88: 7f ff df 3f call 2003884 200bb8c: f2 27 60 30 st %i1, [ %i5 + 0x30 ] 200bb90: c2 07 bf f8 ld [ %fp + -8 ], %g1 200bb94: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return 0; } 200bb98: 81 c7 e0 08 ret 200bb9c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02003a9c : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 2003a9c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2003aa0: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 2003aa4: 96 10 00 18 mov %i0, %o3 2003aa8: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 2003aac: 92 10 00 19 mov %i1, %o1 2003ab0: 40 00 2a 60 call 200e430 2003ab4: 94 10 00 1a mov %i2, %o2 if (err > 0) { 2003ab8: b0 92 20 00 orcc %o0, 0, %i0 2003abc: 04 80 00 09 ble 2003ae0 2003ac0: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 2003ac4: 40 00 04 15 call 2004b18 2003ac8: 92 10 20 00 clr %o1 2003acc: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003ad0: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2003ad4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003ad8: 81 c7 e0 08 ret 2003adc: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003ae0: 80 a6 20 00 cmp %i0, 0 2003ae4: 02 80 00 06 be 2003afc <== NEVER TAKEN 2003ae8: 01 00 00 00 nop 2003aec: 40 00 37 b2 call 20119b4 <__errno> 2003af0: b0 20 00 18 neg %i0 2003af4: f0 22 00 00 st %i0, [ %o0 ] 2003af8: b0 10 3f ff mov -1, %i0 } 2003afc: 81 c7 e0 08 ret 2003b00: 81 e8 00 00 restore =============================================================================== 0200bba0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200bba0: 9d e3 bf 88 save %sp, -120, %sp /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 200bba4: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 200bba8: b8 07 bf e8 add %fp, -24, %i4 200bbac: 92 10 00 1b mov %i3, %o1 200bbb0: 90 10 00 1c mov %i4, %o0 200bbb4: 40 00 11 e0 call 2010334 200bbb8: 94 10 20 18 mov 0x18, %o2 jnode = (IMFS_jnode_t *)loc.node_access; 200bbbc: fa 07 bf f0 ld [ %fp + -16 ], %i5 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200bbc0: c0 26 e0 08 clr [ %i3 + 8 ] 200bbc4: b6 10 00 1c mov %i4, %i3 200bbc8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 do { next = jnode->Parent; 200bbcc: f8 07 60 08 ld [ %i5 + 8 ], %i4 200bbd0: c4 00 60 04 ld [ %g1 + 4 ], %g2 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200bbd4: c2 00 40 00 ld [ %g1 ], %g1 temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 200bbd8: fa 27 bf f0 st %i5, [ %fp + -16 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200bbdc: 80 a0 60 00 cmp %g1, 0 200bbe0: 12 80 00 07 bne 200bbfc 200bbe4: c4 27 bf f8 st %g2, [ %fp + -8 ] 200bbe8: c4 07 60 50 ld [ %i5 + 0x50 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200bbec: 82 07 60 54 add %i5, 0x54, %g1 200bbf0: 80 a0 80 01 cmp %g2, %g1 200bbf4: 32 80 00 10 bne,a 200bc34 200bbf8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 result = IMFS_rmnod( NULL, &loc ); 200bbfc: 90 10 20 00 clr %o0 200bc00: 7f ff dd a8 call 20032a0 200bc04: 92 10 00 1b mov %i3, %o1 if ( result != 0 ) 200bc08: 80 a2 20 00 cmp %o0, 0 200bc0c: 02 80 00 04 be 200bc1c <== ALWAYS TAKEN 200bc10: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 rtems_fatal_error_occurred( 0xdeadbeef ); 200bc14: 7f ff f1 02 call 200801c <== NOT EXECUTED 200bc18: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED IMFS_node_destroy( jnode ); 200bc1c: 7f ff dc cf call 2002f58 200bc20: 90 10 00 1d mov %i5, %o0 jnode = next; } if ( jnode != NULL ) { 200bc24: 80 a7 20 00 cmp %i4, 0 200bc28: 02 80 00 0e be 200bc60 200bc2c: ba 10 00 1c mov %i4, %i5 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 200bc30: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if ( IMFS_is_directory( jnode ) ) { 200bc34: c2 00 40 00 ld [ %g1 ], %g1 200bc38: 80 a0 60 00 cmp %g1, 0 200bc3c: 32 bf ff e4 bne,a 200bbcc <== NEVER TAKEN 200bc40: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200bc44: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200bc48: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200bc4c: 80 a0 40 02 cmp %g1, %g2 200bc50: 02 bf ff de be 200bbc8 200bc54: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200bc58: 12 bf ff dc bne 200bbc8 <== ALWAYS TAKEN 200bc5c: ba 10 00 01 mov %g1, %i5 200bc60: 81 c7 e0 08 ret 200bc64: 81 e8 00 00 restore =============================================================================== 02002e4c : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 2002e4c: 9d e3 bf a0 save %sp, -96, %sp static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 2002e50: 90 10 20 01 mov 1, %o0 2002e54: 40 00 01 ae call 200350c 2002e58: 92 10 20 24 mov 0x24, %o1 if ( fs_info != NULL ) { 2002e5c: ba 92 20 00 orcc %o0, 0, %i5 2002e60: 02 80 00 24 be 2002ef0 2002e64: 03 00 80 75 sethi %hi(0x201d400), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e68: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 201d5dc memcpy( 2002e6c: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e70: c4 27 40 00 st %g2, [ %i5 ] 2002e74: 84 00 a0 01 inc %g2 memcpy( 2002e78: 94 10 20 1c mov 0x1c, %o2 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e7c: c4 20 61 dc st %g2, [ %g1 + 0x1dc ] memcpy( 2002e80: 40 00 35 2d call 2010334 2002e84: 90 07 60 08 add %i5, 8, %o0 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 2002e88: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002e8c: 90 10 00 1d mov %i5, %o0 2002e90: 15 00 80 6c sethi %hi(0x201b000), %o2 2002e94: 96 10 20 00 clr %o3 2002e98: 94 12 a1 00 or %o2, 0x100, %o2 2002e9c: 19 00 00 10 sethi %hi(0x4000), %o4 2002ea0: 9a 10 20 00 clr %o5 2002ea4: 40 00 22 4a call 200b7cc 2002ea8: 98 13 21 ed or %o4, 0x1ed, %o4 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 2002eac: 80 a2 20 00 cmp %o0, 0 2002eb0: 02 80 00 10 be 2002ef0 <== NEVER TAKEN 2002eb4: 03 00 80 6e sethi %hi(0x201b800), %g1 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 2002eb8: c4 02 20 4c ld [ %o0 + 0x4c ], %g2 mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 2002ebc: 82 10 61 ec or %g1, 0x1ec, %g1 2002ec0: c4 00 a0 04 ld [ %g2 + 4 ], %g2 2002ec4: c2 26 20 2c st %g1, [ %i0 + 0x2c ] mt_entry->mt_fs_root->location.node_access = root_node; 2002ec8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 2002ecc: fa 26 20 08 st %i5, [ %i0 + 8 ] mt_entry->ops = op_table; 2002ed0: f2 26 20 0c st %i1, [ %i0 + 0xc ] 2002ed4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 2002ed8: d0 20 60 08 st %o0, [ %g1 + 8 ] errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002edc: 86 10 20 06 mov 6, %g3 2002ee0: 03 00 80 73 sethi %hi(0x201cc00), %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002ee4: 84 10 20 10 mov 0x10, %g2 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002ee8: 10 80 00 08 b 2002f08 2002eec: c2 00 62 2c ld [ %g1 + 0x22c ], %g1 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002ef0: 40 00 32 ca call 200fa18 <__errno> 2002ef4: b0 10 3f ff mov -1, %i0 2002ef8: 82 10 20 0c mov 0xc, %g1 2002efc: c2 22 00 00 st %g1, [ %o0 ] 2002f00: 81 c7 e0 08 ret 2002f04: 81 e8 00 00 restore /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 2002f08: 80 a0 80 01 cmp %g2, %g1 2002f0c: 22 80 00 09 be,a 2002f30 2002f10: 05 00 80 75 sethi %hi(0x201d400), %g2 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002f14: 34 80 00 06 bg,a 2002f2c 2002f18: 82 10 20 80 mov 0x80, %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002f1c: 86 80 ff ff addcc %g3, -1, %g3 2002f20: 12 bf ff fa bne 2002f08 <== ALWAYS TAKEN 2002f24: 85 28 a0 01 sll %g2, 1, %g2 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 2002f28: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002f2c: 05 00 80 75 sethi %hi(0x201d400), %g2 2002f30: c2 20 a1 d8 st %g1, [ %g2 + 0x1d8 ] ! 201d5d8 2002f34: b0 10 20 00 clr %i0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 2002f38: 81 c7 e0 08 ret 2002f3c: 81 e8 00 00 restore =============================================================================== 02004a78 : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 2004a78: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 2004a7c: 03 00 80 85 sethi %hi(0x2021400), %g1 2004a80: c2 00 62 70 ld [ %g1 + 0x270 ], %g1 ! 2021670 switch (mode & S_IFMT) { 2004a84: 05 00 00 08 sethi %hi(0x2000), %g2 void *context ) { int rv = 0; mode &= ~rtems_filesystem_umask; 2004a88: c2 00 60 08 ld [ %g1 + 8 ], %g1 2004a8c: b2 2e 40 01 andn %i1, %g1, %i1 switch (mode & S_IFMT) { 2004a90: 03 00 00 3c sethi %hi(0xf000), %g1 2004a94: 82 0e 40 01 and %i1, %g1, %g1 2004a98: 80 a0 40 02 cmp %g1, %g2 2004a9c: 22 80 00 3a be,a 2004b84 2004aa0: c2 06 80 00 ld [ %i2 ], %g1 2004aa4: 38 80 00 04 bgu,a 2004ab4 <== ALWAYS TAKEN 2004aa8: 05 00 00 18 sethi %hi(0x6000), %g2 2004aac: 10 80 00 05 b 2004ac0 <== NOT EXECUTED 2004ab0: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 2004ab4: 80 a0 40 02 cmp %g1, %g2 2004ab8: 02 80 00 32 be 2004b80 2004abc: 05 00 00 20 sethi %hi(0x8000), %g2 2004ac0: 80 a0 40 02 cmp %g1, %g2 2004ac4: 22 80 00 30 be,a 2004b84 <== NEVER TAKEN 2004ac8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2004acc: 30 80 00 27 b,a 2004b68 if ( node_control->imfs_type == IMFS_GENERIC ) { rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 2004ad0: 94 10 20 78 mov 0x78, %o2 2004ad4: 40 00 08 10 call 2006b14 2004ad8: 90 07 bf c8 add %fp, -56, %o0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 2004adc: 7f ff ff d5 call 2004a30 2004ae0: ba 10 00 08 mov %o0, %i5 2004ae4: 80 8a 20 ff btst 0xff, %o0 2004ae8: 02 80 00 19 be 2004b4c 2004aec: 90 07 bf c8 add %fp, -56, %o0 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 2004af0: d4 1f bf d0 ldd [ %fp + -48 ], %o2 if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 2004af4: f6 27 bf b0 st %i3, [ %fp + -80 ] new_node = IMFS_create_node_with_control( 2004af8: 90 10 00 1d mov %i5, %o0 2004afc: 92 10 00 1a mov %i2, %o1 2004b00: 98 10 00 19 mov %i1, %o4 2004b04: 9a 07 bf b0 add %fp, -80, %o5 2004b08: 40 00 2d 3f call 2010004 2004b0c: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 2004b10: 80 a2 20 00 cmp %o0, 0 2004b14: 02 80 00 11 be 2004b58 2004b18: 92 10 20 00 clr %o1 IMFS_jnode_t *parent = currentloc->node_access; 2004b1c: fa 07 60 08 ld [ %i5 + 8 ], %i5 IMFS_update_ctime( parent ); 2004b20: 40 00 02 93 call 200556c 2004b24: 90 07 bf a8 add %fp, -88, %o0 2004b28: c2 07 bf a8 ld [ %fp + -88 ], %g1 IMFS_update_mtime( parent ); 2004b2c: 90 07 bf a8 add %fp, -88, %o0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 2004b30: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 2004b34: 40 00 02 8e call 200556c 2004b38: 92 10 20 00 clr %o1 2004b3c: c2 07 bf a8 ld [ %fp + -88 ], %g1 2004b40: b0 10 20 00 clr %i0 2004b44: 10 80 00 05 b 2004b58 2004b48: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 2004b4c: 92 10 20 86 mov 0x86, %o1 2004b50: 40 00 07 5b call 20068bc 2004b54: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2004b58: 40 00 08 2b call 2006c04 2004b5c: 90 07 bf c8 add %fp, -56, %o0 2004b60: 81 c7 e0 08 ret 2004b64: 81 e8 00 00 restore } else { errno = EINVAL; 2004b68: 40 00 3d 73 call 2014134 <__errno> 2004b6c: b0 10 3f ff mov -1, %i0 2004b70: 82 10 20 16 mov 0x16, %g1 2004b74: c2 22 00 00 st %g1, [ %o0 ] 2004b78: 81 c7 e0 08 ret 2004b7c: 81 e8 00 00 restore rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 2004b80: c2 06 80 00 ld [ %i2 ], %g1 2004b84: 80 a0 60 07 cmp %g1, 7 2004b88: 02 bf ff d2 be 2004ad0 2004b8c: 92 10 00 18 mov %i0, %o1 2004b90: 30 bf ff f6 b,a 2004b68 =============================================================================== 0200e3cc : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 200e3cc: 9d e3 bf a0 save %sp, -96, %sp IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 200e3d0: 94 10 20 01 mov 1, %o2 200e3d4: 90 10 00 18 mov %i0, %o0 200e3d8: 7f ff fe d6 call 200df30 200e3dc: 92 10 00 19 mov %i1, %o1 if ( *block_entry_ptr ) 200e3e0: c2 02 00 00 ld [ %o0 ], %g1 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 200e3e4: ba 10 00 08 mov %o0, %i5 if ( *block_entry_ptr ) 200e3e8: 80 a0 60 00 cmp %g1, 0 200e3ec: 12 80 00 08 bne 200e40c 200e3f0: b0 10 20 00 clr %i0 return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 200e3f4: 7f ff fe c2 call 200defc 200e3f8: 01 00 00 00 nop if ( !memory ) 200e3fc: 80 a2 20 00 cmp %o0, 0 200e400: 22 80 00 03 be,a 200e40c <== NEVER TAKEN 200e404: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 200e408: d0 27 40 00 st %o0, [ %i5 ] return 0; 200e40c: 81 c7 e0 08 ret 200e410: 81 e8 00 00 restore =============================================================================== 0200e5e0 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 200e5e0: 9d e3 bf 98 save %sp, -104, %sp IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200e5e4: 03 00 80 75 sethi %hi(0x201d400), %g1 200e5e8: fa 00 61 d8 ld [ %g1 + 0x1d8 ], %i5 ! 201d5d8 200e5ec: b9 37 60 02 srl %i5, 2, %i4 200e5f0: 92 10 00 1c mov %i4, %o1 200e5f4: 40 00 28 6f call 20187b0 <.umul> 200e5f8: 90 07 20 01 add %i4, 1, %o0 200e5fc: 92 10 00 1c mov %i4, %o1 200e600: 40 00 28 6c call 20187b0 <.umul> 200e604: 90 02 20 01 inc %o0 200e608: 92 10 00 1d mov %i5, %o1 200e60c: 40 00 28 69 call 20187b0 <.umul> 200e610: 90 02 3f ff add %o0, -1, %o0 200e614: 82 10 20 00 clr %g1 200e618: 80 a0 40 1a cmp %g1, %i2 200e61c: 34 80 00 0b bg,a 200e648 <== NEVER TAKEN 200e620: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 <== NOT EXECUTED 200e624: 80 a0 40 1a cmp %g1, %i2 200e628: 12 80 00 04 bne 200e638 <== NEVER TAKEN 200e62c: 80 a2 00 1b cmp %o0, %i3 200e630: 38 80 00 06 bgu,a 200e648 200e634: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EFBIG ); 200e638: 40 00 04 f8 call 200fa18 <__errno> 200e63c: 01 00 00 00 nop 200e640: 10 80 00 3c b 200e730 200e644: 82 10 20 1b mov 0x1b, %g1 ! 1b /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200e648: 80 a6 80 1c cmp %i2, %i4 200e64c: 14 80 00 07 bg 200e668 <== NEVER TAKEN 200e650: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200e654: 80 a6 80 1c cmp %i2, %i4 200e658: 12 80 00 48 bne 200e778 <== NEVER TAKEN 200e65c: 80 a6 c0 10 cmp %i3, %l0 200e660: 08 80 00 46 bleu 200e778 <== NEVER TAKEN 200e664: 01 00 00 00 nop return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e668: a3 3f 60 1f sra %i5, 0x1f, %l1 200e66c: 96 10 00 1d mov %i5, %o3 200e670: 94 10 00 11 mov %l1, %o2 200e674: 90 10 00 1a mov %i2, %o0 200e678: 40 00 29 e0 call 2018df8 <__divdi3> 200e67c: 92 10 00 1b mov %i3, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e680: 94 10 00 11 mov %l1, %o2 200e684: 90 10 00 1c mov %i4, %o0 200e688: 96 10 00 1d mov %i5, %o3 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e68c: a4 10 00 09 mov %o1, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e690: 40 00 29 da call 2018df8 <__divdi3> 200e694: 92 10 00 10 mov %l0, %o1 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200e698: a2 10 20 00 clr %l1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 200e69c: 90 10 00 09 mov %o1, %o0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e6a0: b8 10 00 09 mov %o1, %i4 * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 200e6a4: 27 00 80 75 sethi %hi(0x201d400), %l3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 200e6a8: 40 00 28 42 call 20187b0 <.umul> 200e6ac: 92 10 00 1d mov %i5, %o1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200e6b0: 10 80 00 23 b 200e73c 200e6b4: a0 24 00 08 sub %l0, %o0, %l0 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 200e6b8: 7f ff ff 45 call 200e3cc 200e6bc: 92 10 00 1d mov %i5, %o1 200e6c0: 80 a2 20 00 cmp %o0, 0 200e6c4: 12 80 00 15 bne 200e718 <== NEVER TAKEN 200e6c8: 80 a6 60 00 cmp %i1, 0 if ( zero_fill ) { 200e6cc: 22 80 00 1c be,a 200e73c 200e6d0: a2 04 60 01 inc %l1 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 200e6d4: e8 04 e1 d8 ld [ %l3 + 0x1d8 ], %l4 block_p *block_ptr = 200e6d8: 92 10 00 1d mov %i5, %o1 200e6dc: 94 10 20 00 clr %o2 200e6e0: 7f ff fe 14 call 200df30 200e6e4: 90 10 00 18 mov %i0, %o0 IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 200e6e8: d0 02 00 00 ld [ %o0 ], %o0 * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 200e6ec: a8 25 00 10 sub %l4, %l0, %l4 block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 200e6f0: 90 02 00 10 add %o0, %l0, %o0 200e6f4: 92 10 20 00 clr %o1 200e6f8: 94 10 00 14 mov %l4, %o2 200e6fc: 40 00 07 4b call 2010428 200e700: a0 10 20 00 clr %l0 200e704: 10 80 00 0e b 200e73c 200e708: a2 04 60 01 inc %l1 offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 200e70c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200e710: 7f ff ff a8 call 200e5b0 <== NOT EXECUTED 200e714: ba 07 7f ff add %i5, -1, %i5 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 200e718: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 200e71c: 1a bf ff fc bcc 200e70c <== NOT EXECUTED 200e720: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200e724: 40 00 04 bd call 200fa18 <__errno> <== NOT EXECUTED 200e728: 01 00 00 00 nop <== NOT EXECUTED 200e72c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 200e730: c2 22 00 00 st %g1, [ %o0 ] 200e734: 81 c7 e0 08 ret 200e738: 91 e8 3f ff restore %g0, -1, %o0 * * This routine insures that the in-memory file is of the length * specified. If necessary, it will allocate memory blocks to * extend the file. */ MEMFILE_STATIC int IMFS_memfile_extend( 200e73c: ba 04 40 1c add %l1, %i4, %i5 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200e740: 80 a7 40 12 cmp %i5, %l2 200e744: 08 bf ff dd bleu 200e6b8 200e748: 90 10 00 18 mov %i0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 200e74c: 92 10 20 00 clr %o1 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200e750: f4 3e 20 50 std %i2, [ %i0 + 0x50 ] IMFS_update_ctime(the_jnode); 200e754: 7f ff d4 4c call 2003884 200e758: 90 07 bf f8 add %fp, -8, %o0 200e75c: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200e760: 90 07 bf f8 add %fp, -8, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 200e764: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200e768: 7f ff d4 47 call 2003884 200e76c: 92 10 20 00 clr %o1 200e770: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e774: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 200e778: 81 c7 e0 08 ret 200e77c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200df30 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200df30: 9d e3 bf a0 save %sp, -96, %sp my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 200df34: 03 00 80 75 sethi %hi(0x201d400), %g1 200df38: fa 00 61 d8 ld [ %g1 + 0x1d8 ], %i5 ! 201d5d8 200df3c: bb 37 60 02 srl %i5, 2, %i5 200df40: 82 07 7f ff add %i5, -1, %g1 200df44: 80 a6 40 01 cmp %i1, %g1 200df48: 18 80 00 18 bgu 200dfa8 200df4c: 90 07 60 01 add %i5, 1, %o0 p = info->indirect; if ( malloc_it ) { 200df50: 80 a6 a0 00 cmp %i2, 0 200df54: 02 80 00 10 be 200df94 200df58: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200df5c: 80 a0 60 00 cmp %g1, 0 200df60: 32 80 00 0a bne,a 200df88 200df64: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 200df68: 7f ff ff e5 call 200defc 200df6c: 01 00 00 00 nop if ( !p ) 200df70: 80 a2 20 00 cmp %o0, 0 200df74: 32 80 00 04 bne,a 200df84 <== ALWAYS TAKEN 200df78: d0 26 20 58 st %o0, [ %i0 + 0x58 ] return 0; 200df7c: 81 c7 e0 08 ret <== NOT EXECUTED 200df80: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; 200df84: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 200df88: b3 2e 60 02 sll %i1, 2, %i1 200df8c: 81 c7 e0 08 ret 200df90: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200df94: 80 a0 60 00 cmp %g1, 0 200df98: 02 bf ff f9 be 200df7c <== NEVER TAKEN 200df9c: b3 2e 60 02 sll %i1, 2, %i1 return 0; return &info->indirect[ my_block ]; 200dfa0: 81 c7 e0 08 ret 200dfa4: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200dfa8: 40 00 2a 02 call 20187b0 <.umul> 200dfac: 92 10 00 1d mov %i5, %o1 200dfb0: 82 02 3f ff add %o0, -1, %g1 200dfb4: 80 a6 40 01 cmp %i1, %g1 200dfb8: 18 80 00 2c bgu 200e068 200dfbc: b8 10 00 08 mov %o0, %i4 my_block -= FIRST_DOUBLY_INDIRECT; 200dfc0: b2 26 40 1d sub %i1, %i5, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200dfc4: 92 10 00 1d mov %i5, %o1 200dfc8: 40 00 2a e0 call 2018b48 <.urem> 200dfcc: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200dfd0: 92 10 00 1d mov %i5, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200dfd4: b8 10 00 08 mov %o0, %i4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200dfd8: 40 00 2a 30 call 2018898 <.udiv> 200dfdc: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200dfe0: 80 a6 a0 00 cmp %i2, 0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200dfe4: ba 10 00 08 mov %o0, %i5 p = info->doubly_indirect; if ( malloc_it ) { 200dfe8: 02 80 00 17 be 200e044 200dfec: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200dff0: 80 a2 20 00 cmp %o0, 0 200dff4: 12 80 00 08 bne 200e014 200dff8: bb 2f 60 02 sll %i5, 2, %i5 p = memfile_alloc_block(); 200dffc: 7f ff ff c0 call 200defc 200e000: 01 00 00 00 nop if ( !p ) 200e004: 80 a2 20 00 cmp %o0, 0 200e008: 02 bf ff dd be 200df7c <== NEVER TAKEN 200e00c: 01 00 00 00 nop return 0; info->doubly_indirect = p; 200e010: d0 26 20 5c st %o0, [ %i0 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200e014: b6 02 00 1d add %o0, %i5, %i3 200e018: d0 02 00 1d ld [ %o0 + %i5 ], %o0 if ( !p1 ) { 200e01c: 80 a2 20 00 cmp %o0, 0 200e020: 12 80 00 4a bne 200e148 200e024: b1 2f 20 02 sll %i4, 2, %i0 p1 = memfile_alloc_block(); 200e028: 7f ff ff b5 call 200defc 200e02c: 01 00 00 00 nop if ( !p1 ) 200e030: 80 a2 20 00 cmp %o0, 0 200e034: 02 bf ff d2 be 200df7c <== NEVER TAKEN 200e038: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200e03c: 10 80 00 43 b 200e148 200e040: d0 26 c0 00 st %o0, [ %i3 ] } return (block_p *)&p1[ singly ]; } if ( !p ) 200e044: 80 a2 20 00 cmp %o0, 0 200e048: 02 bf ff cd be 200df7c <== NEVER TAKEN 200e04c: bb 2f 60 02 sll %i5, 2, %i5 return 0; p = (block_p *)p[ doubly ]; 200e050: c2 02 00 1d ld [ %o0 + %i5 ], %g1 if ( !p ) 200e054: 80 a0 60 00 cmp %g1, 0 200e058: 02 bf ff c9 be 200df7c <== NEVER TAKEN 200e05c: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200e060: 10 80 00 48 b 200e180 200e064: b1 2f 20 02 sll %i4, 2, %i0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200e068: 90 02 20 01 inc %o0 200e06c: 40 00 29 d1 call 20187b0 <.umul> 200e070: 92 10 00 1d mov %i5, %o1 200e074: 90 02 3f ff add %o0, -1, %o0 200e078: 80 a6 40 08 cmp %i1, %o0 200e07c: 18 bf ff c0 bgu 200df7c <== NEVER TAKEN 200e080: b2 26 40 1c sub %i1, %i4, %i1 my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e084: 92 10 00 1d mov %i5, %o1 200e088: 40 00 2a b0 call 2018b48 <.urem> 200e08c: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e090: 92 10 00 1d mov %i5, %o1 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e094: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e098: 40 00 2a 00 call 2018898 <.udiv> 200e09c: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200e0a0: 92 10 00 1d mov %i5, %o1 200e0a4: 40 00 29 fd call 2018898 <.udiv> 200e0a8: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e0ac: 92 10 00 1d mov %i5, %o1 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; 200e0b0: b8 10 00 08 mov %o0, %i4 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e0b4: 40 00 2a a5 call 2018b48 <.urem> 200e0b8: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200e0bc: 80 a6 a0 00 cmp %i2, 0 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; 200e0c0: ba 10 00 08 mov %o0, %i5 p = info->triply_indirect; if ( malloc_it ) { 200e0c4: 02 80 00 23 be 200e150 200e0c8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 if ( !p ) { 200e0cc: 80 a2 20 00 cmp %o0, 0 200e0d0: 12 80 00 08 bne 200e0f0 200e0d4: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200e0d8: 7f ff ff 89 call 200defc 200e0dc: 01 00 00 00 nop if ( !p ) 200e0e0: 80 a2 20 00 cmp %o0, 0 200e0e4: 02 bf ff a6 be 200df7c <== NEVER TAKEN 200e0e8: 01 00 00 00 nop return 0; info->triply_indirect = p; 200e0ec: d0 26 20 60 st %o0, [ %i0 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200e0f0: b4 02 00 1c add %o0, %i4, %i2 200e0f4: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200e0f8: 80 a2 20 00 cmp %o0, 0 200e0fc: 12 80 00 08 bne 200e11c 200e100: bb 2f 60 02 sll %i5, 2, %i5 p1 = memfile_alloc_block(); 200e104: 7f ff ff 7e call 200defc 200e108: 01 00 00 00 nop if ( !p1 ) 200e10c: 80 a2 20 00 cmp %o0, 0 200e110: 02 bf ff 9b be 200df7c <== NEVER TAKEN 200e114: 01 00 00 00 nop return 0; p[ triply ] = (block_p) p1; 200e118: d0 26 80 00 st %o0, [ %i2 ] } p2 = (block_p *)p1[ doubly ]; 200e11c: b8 02 00 1d add %o0, %i5, %i4 200e120: d0 02 00 1d ld [ %o0 + %i5 ], %o0 if ( !p2 ) { 200e124: 80 a2 20 00 cmp %o0, 0 200e128: 12 80 00 08 bne 200e148 200e12c: b1 2e e0 02 sll %i3, 2, %i0 p2 = memfile_alloc_block(); 200e130: 7f ff ff 73 call 200defc 200e134: 01 00 00 00 nop if ( !p2 ) 200e138: 80 a2 20 00 cmp %o0, 0 200e13c: 02 bf ff 90 be 200df7c <== NEVER TAKEN 200e140: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200e144: d0 27 00 00 st %o0, [ %i4 ] } return (block_p *)&p2[ singly ]; 200e148: 81 c7 e0 08 ret 200e14c: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200e150: 80 a2 20 00 cmp %o0, 0 200e154: 02 bf ff 8a be 200df7c <== NEVER TAKEN 200e158: b9 2f 20 02 sll %i4, 2, %i4 return 0; p1 = (block_p *) p[ triply ]; 200e15c: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p1 ) 200e160: 80 a0 60 00 cmp %g1, 0 200e164: 02 bf ff 86 be 200df7c <== NEVER TAKEN 200e168: bb 2f 60 02 sll %i5, 2, %i5 return 0; p2 = (block_p *)p1[ doubly ]; 200e16c: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p2 ) 200e170: 80 a0 60 00 cmp %g1, 0 200e174: 02 bf ff 82 be 200df7c <== NEVER TAKEN 200e178: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200e17c: b1 2e e0 02 sll %i3, 2, %i0 /* * This means the requested block number is out of range. */ return 0; } 200e180: 81 c7 e0 08 ret 200e184: 91 e8 40 18 restore %g1, %i0, %o0 =============================================================================== 0200e188 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e188: 9d e3 bf 98 save %sp, -104, %sp rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 200e18c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200e190: ba 10 00 18 mov %i0, %i5 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 200e194: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e198: a0 10 00 19 mov %i1, %l0 200e19c: a2 10 00 1a mov %i2, %l1 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { 200e1a0: 80 a0 60 05 cmp %g1, 5 200e1a4: 12 80 00 17 bne 200e200 200e1a8: a4 10 00 1b mov %i3, %l2 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200e1ac: f4 1e 20 50 ldd [ %i0 + 0x50 ], %i2 200e1b0: 82 10 20 00 clr %g1 200e1b4: 86 a6 c0 11 subcc %i3, %l1, %g3 200e1b8: 84 66 80 19 subx %i2, %i1, %g2 200e1bc: 80 a0 40 02 cmp %g1, %g2 200e1c0: 14 80 00 07 bg 200e1dc <== NEVER TAKEN 200e1c4: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200e1c8: 80 a0 40 02 cmp %g1, %g2 200e1cc: 12 80 00 06 bne 200e1e4 <== NEVER TAKEN 200e1d0: 80 a7 00 03 cmp %i4, %g3 200e1d4: 28 80 00 05 bleu,a 200e1e8 <== NEVER TAKEN 200e1d8: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200e1dc: 10 80 00 03 b 200e1e8 200e1e0: b0 26 c0 11 sub %i3, %l1, %i0 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 200e1e4: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200e1e8: 90 10 00 12 mov %l2, %o0 200e1ec: 92 02 40 11 add %o1, %l1, %o1 200e1f0: 40 00 08 51 call 2010334 200e1f4: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 200e1f8: 10 80 00 5d b 200e36c 200e1fc: 90 07 bf f8 add %fp, -8, %o0 /* * 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 ) 200e200: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 200e204: 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; 200e208: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200e20c: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200e210: 80 a1 00 03 cmp %g4, %g3 200e214: 14 80 00 08 bg 200e234 <== NEVER TAKEN 200e218: b6 07 00 1a add %i4, %i2, %i3 200e21c: 80 a1 00 03 cmp %g4, %g3 200e220: 32 80 00 07 bne,a 200e23c <== NEVER TAKEN 200e224: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200e228: 80 a6 c0 02 cmp %i3, %g2 200e22c: 28 80 00 04 bleu,a 200e23c 200e230: 03 00 80 75 sethi %hi(0x201d400), %g1 my_length = the_jnode->info.file.size - start; 200e234: 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; 200e238: 03 00 80 75 sethi %hi(0x201d400), %g1 200e23c: f6 00 61 d8 ld [ %g1 + 0x1d8 ], %i3 ! 201d5d8 200e240: 90 10 00 10 mov %l0, %o0 200e244: b5 3e e0 1f sra %i3, 0x1f, %i2 200e248: 96 10 00 1b mov %i3, %o3 200e24c: 94 10 00 1a mov %i2, %o2 200e250: 40 00 2b d5 call 20191a4 <__moddi3> 200e254: 92 10 00 11 mov %l1, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e258: 94 10 00 1a mov %i2, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e25c: a6 10 00 09 mov %o1, %l3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e260: 90 10 00 10 mov %l0, %o0 200e264: 92 10 00 11 mov %l1, %o1 200e268: 40 00 2a e4 call 2018df8 <__divdi3> 200e26c: 96 10 00 1b mov %i3, %o3 if ( start_offset ) { 200e270: 80 a4 e0 00 cmp %l3, 0 200e274: 02 80 00 18 be 200e2d4 200e278: b4 10 00 09 mov %o1, %i2 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200e27c: b6 26 c0 13 sub %i3, %l3, %i3 200e280: 80 a7 00 1b cmp %i4, %i3 200e284: 08 80 00 03 bleu 200e290 200e288: b2 10 00 1c mov %i4, %i1 200e28c: b2 10 00 1b mov %i3, %i1 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e290: 90 10 00 1d mov %i5, %o0 200e294: 92 10 00 1a mov %i2, %o1 200e298: 94 10 20 00 clr %o2 200e29c: 7f ff ff 25 call 200df30 200e2a0: b0 10 20 00 clr %i0 if ( !block_ptr ) 200e2a4: 80 a2 20 00 cmp %o0, 0 200e2a8: 02 80 00 35 be 200e37c <== NEVER TAKEN 200e2ac: 94 10 00 19 mov %i1, %o2 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200e2b0: d2 02 00 00 ld [ %o0 ], %o1 200e2b4: 90 10 00 12 mov %l2, %o0 200e2b8: 92 02 40 13 add %o1, %l3, %o1 200e2bc: 40 00 08 1e call 2010334 200e2c0: a4 04 80 19 add %l2, %i1, %l2 dest += to_copy; block++; 200e2c4: b4 06 a0 01 inc %i2 my_length -= to_copy; 200e2c8: b8 27 00 19 sub %i4, %i1, %i4 copied += to_copy; 200e2cc: 10 80 00 03 b 200e2d8 200e2d0: b0 10 00 19 mov %i1, %i0 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 200e2d4: b0 10 20 00 clr %i0 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e2d8: 03 00 80 75 sethi %hi(0x201d400), %g1 * is considered an error. Read from an offset for more bytes than * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( 200e2dc: a4 24 80 18 sub %l2, %i0, %l2 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e2e0: f6 00 61 d8 ld [ %g1 + 0x1d8 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e2e4: 10 80 00 0f b 200e320 200e2e8: a0 10 00 01 mov %g1, %l0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e2ec: 90 10 00 1d mov %i5, %o0 200e2f0: 92 10 00 1a mov %i2, %o1 200e2f4: 7f ff ff 0f call 200df30 200e2f8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e2fc: 82 92 20 00 orcc %o0, 0, %g1 200e300: 02 80 00 1f be 200e37c <== NEVER TAKEN 200e304: 90 10 00 19 mov %i1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200e308: d2 00 40 00 ld [ %g1 ], %o1 200e30c: 94 10 00 1b mov %i3, %o2 200e310: 40 00 08 09 call 2010334 200e314: b4 06 a0 01 inc %i2 dest += to_copy; block++; my_length -= to_copy; 200e318: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200e31c: b0 06 00 1b add %i0, %i3, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e320: c2 04 21 d8 ld [ %l0 + 0x1d8 ], %g1 200e324: 80 a7 00 01 cmp %i4, %g1 200e328: 1a bf ff f1 bcc 200e2ec 200e32c: b2 04 80 18 add %l2, %i0, %i1 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200e330: 80 a7 20 00 cmp %i4, 0 200e334: 02 80 00 0e be 200e36c 200e338: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e33c: 90 10 00 1d mov %i5, %o0 200e340: 92 10 00 1a mov %i2, %o1 200e344: 7f ff fe fb call 200df30 200e348: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e34c: 82 92 20 00 orcc %o0, 0, %g1 200e350: 02 80 00 0b be 200e37c <== NEVER TAKEN 200e354: 90 10 00 19 mov %i1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200e358: d2 00 40 00 ld [ %g1 ], %o1 200e35c: 94 10 00 1c mov %i4, %o2 200e360: 40 00 07 f5 call 2010334 200e364: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200e368: 90 07 bf f8 add %fp, -8, %o0 200e36c: 7f ff d5 46 call 2003884 200e370: 92 10 20 00 clr %o1 200e374: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e378: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200e37c: 81 c7 e0 08 ret 200e380: 81 e8 00 00 restore =============================================================================== 0200e484 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200e484: 9d e3 bf a0 save %sp, -96, %sp /* * 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; 200e488: 03 00 80 75 sethi %hi(0x201d400), %g1 200e48c: fa 00 61 d8 ld [ %g1 + 0x1d8 ], %i5 ! 201d5d8 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200e490: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200e494: 80 a0 60 00 cmp %g1, 0 200e498: 02 80 00 05 be 200e4ac 200e49c: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200e4a0: 90 06 20 58 add %i0, 0x58, %o0 200e4a4: 7f ff ff e5 call 200e438 200e4a8: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200e4ac: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200e4b0: b8 10 20 00 clr %i4 200e4b4: 80 a0 60 00 cmp %g1, 0 200e4b8: 12 80 00 0d bne 200e4ec 200e4bc: 37 00 80 75 sethi %hi(0x201d400), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200e4c0: 10 80 00 15 b 200e514 200e4c4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( 200e4c8: 83 2f 20 02 sll %i4, 2, %g1 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 200e4cc: 90 00 80 01 add %g2, %g1, %o0 200e4d0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200e4d4: 80 a0 60 00 cmp %g1, 0 200e4d8: 22 80 00 05 be,a 200e4ec <== NEVER TAKEN 200e4dc: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200e4e0: 7f ff ff d6 call 200e438 200e4e4: 92 10 00 1d mov %i5, %o1 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 200e4fc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2 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 ); 200e500: 90 06 20 5c add %i0, 0x5c, %o0 200e504: 7f ff ff cd call 200e438 200e508: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200e50c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200e510: b8 10 20 00 clr %i4 200e514: 80 a0 60 00 cmp %g1, 0 200e518: 12 80 00 1c bne 200e588 200e51c: 33 00 80 75 sethi %hi(0x201d400), %i1 200e520: 81 c7 e0 08 ret 200e524: 81 e8 00 00 restore * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( 200e528: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200e52c: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200e530: 80 a6 e0 00 cmp %i3, 0 200e534: 02 80 00 1b be 200e5a0 <== NEVER TAKEN 200e538: 90 06 20 60 add %i0, 0x60, %o0 200e53c: 10 80 00 09 b 200e560 200e540: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200e54c: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200e550: 7f ff ff ba call 200e438 200e554: 92 10 00 1d mov %i5, %o1 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j 200e570: c2 06 c0 00 ld [ %i3 ], %g1 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200e574: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200e578: 92 10 00 1d mov %i5, %o1 200e57c: 90 02 00 10 add %o0, %l0, %o0 200e580: 7f ff ff ae call 200e438 200e584: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200e598: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 200e59c: 90 06 20 60 add %i0, 0x60, %o0 200e5a0: 7f ff ff a6 call 200e438 200e5a4: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200e5a8: 81 c7 e0 08 ret 200e5ac: 81 e8 00 00 restore =============================================================================== 0200e5b0 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 200e5b0: 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 ); 200e5b4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200e5b8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200e5bc: 7f ff fe 5d call 200df30 <== NOT EXECUTED 200e5c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200e5c4: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 200e5c8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); return 1; } 200e5cc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; memfile_free_block( ptr ); 200e5d0: 7f ff ff 91 call 200e414 <== NOT EXECUTED 200e5d4: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED return 1; } 200e5d8: 81 c7 e0 08 ret <== NOT EXECUTED 200e5dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200e780 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200e780: 9d e3 bf 98 save %sp, -104, %sp * 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 + my_length; if ( last_byte > the_jnode->info.file.size ) { 200e784: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200e788: 86 10 20 00 clr %g3 /* * 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 + my_length; 200e78c: 96 07 00 1a add %i4, %i2, %o3 if ( last_byte > the_jnode->info.file.size ) { 200e790: 80 a0 c0 01 cmp %g3, %g1 200e794: 14 80 00 1b bg 200e800 <== NEVER TAKEN 200e798: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200e79c: 80 a0 c0 01 cmp %g3, %g1 200e7a0: 32 80 00 06 bne,a 200e7b8 <== NEVER TAKEN 200e7a4: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200e7a8: 80 a2 c0 02 cmp %o3, %g2 200e7ac: 18 80 00 16 bgu 200e804 200e7b0: 80 a6 40 01 cmp %i1, %g1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7b4: 03 00 80 75 sethi %hi(0x201d400), %g1 200e7b8: fa 00 61 d8 ld [ %g1 + 0x1d8 ], %i5 ! 201d5d8 200e7bc: 92 10 00 1a mov %i2, %o1 200e7c0: a3 3f 60 1f sra %i5, 0x1f, %l1 200e7c4: 96 10 00 1d mov %i5, %o3 200e7c8: 94 10 00 11 mov %l1, %o2 200e7cc: 40 00 2a 76 call 20191a4 <__moddi3> 200e7d0: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7d4: 90 10 00 19 mov %i1, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7d8: a0 10 00 09 mov %o1, %l0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7dc: 94 10 00 11 mov %l1, %o2 200e7e0: 92 10 00 1a mov %i2, %o1 200e7e4: 40 00 29 85 call 2018df8 <__divdi3> 200e7e8: 96 10 00 1d mov %i5, %o3 if ( start_offset ) { 200e7ec: 80 a4 20 00 cmp %l0, 0 200e7f0: 12 80 00 17 bne 200e84c 200e7f4: b4 10 00 09 mov %o1, %i2 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 200e7f8: 10 80 00 28 b 200e898 200e7fc: ba 10 20 00 clr %i5 * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 200e800: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200e804: 14 80 00 09 bg 200e828 <== NEVER TAKEN 200e808: 92 10 20 01 mov 1, %o1 200e80c: 80 a6 40 01 cmp %i1, %g1 200e810: 32 80 00 06 bne,a 200e828 <== NEVER TAKEN 200e814: 92 10 20 00 clr %o1 <== NOT EXECUTED 200e818: 80 a6 80 02 cmp %i2, %g2 200e81c: 18 80 00 04 bgu 200e82c 200e820: 90 10 00 18 mov %i0, %o0 200e824: 92 10 20 00 clr %o1 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 200e828: 90 10 00 18 mov %i0, %o0 200e82c: 92 0a 60 01 and %o1, 1, %o1 200e830: 7f ff ff 6c call 200e5e0 200e834: 94 10 20 00 clr %o2 if ( status ) 200e838: 82 92 20 00 orcc %o0, 0, %g1 200e83c: 22 bf ff df be,a 200e7b8 200e840: 03 00 80 75 sethi %hi(0x201d400), %g1 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200e844: 81 c7 e0 08 ret 200e848: 91 e8 00 01 restore %g0, %g1, %o0 * Phase 1: possibly the last part of one block */ 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; 200e84c: ba 27 40 10 sub %i5, %l0, %i5 200e850: 80 a7 40 1c cmp %i5, %i4 200e854: 38 80 00 02 bgu,a 200e85c 200e858: ba 10 00 1c mov %i4, %i5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e85c: 90 10 00 18 mov %i0, %o0 200e860: 92 10 00 1a mov %i2, %o1 200e864: 7f ff fd b3 call 200df30 200e868: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e86c: 80 a2 20 00 cmp %o0, 0 200e870: 02 80 00 36 be 200e948 <== NEVER TAKEN 200e874: 82 10 20 00 clr %g1 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200e878: d0 02 00 00 ld [ %o0 ], %o0 200e87c: 92 10 00 1b mov %i3, %o1 200e880: 90 02 00 10 add %o0, %l0, %o0 200e884: 94 10 00 1d mov %i5, %o2 200e888: 40 00 06 ab call 2010334 200e88c: b6 06 c0 1d add %i3, %i5, %i3 src += to_copy; block++; 200e890: b4 06 a0 01 inc %i2 my_length -= to_copy; 200e894: b8 27 00 1d sub %i4, %i5, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e898: 03 00 80 75 sethi %hi(0x201d400), %g1 * IMFS_memfile_write * * 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( 200e89c: b6 26 c0 1d sub %i3, %i5, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e8a0: f2 00 61 d8 ld [ %g1 + 0x1d8 ], %i1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e8a4: 10 80 00 0f b 200e8e0 200e8a8: a2 10 00 01 mov %g1, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e8ac: 90 10 00 18 mov %i0, %o0 200e8b0: 92 10 00 1a mov %i2, %o1 200e8b4: 7f ff fd 9f call 200df30 200e8b8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e8bc: 80 a2 20 00 cmp %o0, 0 200e8c0: 02 80 00 21 be 200e944 <== NEVER TAKEN 200e8c4: 94 10 00 19 mov %i1, %o2 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 ); 200e8c8: d0 02 00 00 ld [ %o0 ], %o0 200e8cc: 92 10 00 10 mov %l0, %o1 200e8d0: 40 00 06 99 call 2010334 200e8d4: b4 06 a0 01 inc %i2 src += to_copy; block++; my_length -= to_copy; 200e8d8: b8 27 00 19 sub %i4, %i1, %i4 * IMFS_memfile_write * * 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( 200e8dc: ba 07 40 19 add %i5, %i1, %i5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e8e0: c2 04 61 d8 ld [ %l1 + 0x1d8 ], %g1 200e8e4: 80 a7 00 01 cmp %i4, %g1 200e8e8: 1a bf ff f1 bcc 200e8ac 200e8ec: a0 06 c0 1d add %i3, %i5, %l0 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 200e8f0: 80 a7 20 00 cmp %i4, 0 200e8f4: 02 80 00 0f be 200e930 200e8f8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e8fc: 90 10 00 18 mov %i0, %o0 200e900: 92 10 00 1a mov %i2, %o1 200e904: 7f ff fd 8b call 200df30 200e908: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e90c: 80 a2 20 00 cmp %o0, 0 200e910: 02 80 00 0e be 200e948 <== NEVER TAKEN 200e914: 82 10 00 1d mov %i5, %g1 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 ); 200e918: d0 02 00 00 ld [ %o0 ], %o0 200e91c: 92 10 00 10 mov %l0, %o1 200e920: 94 10 00 1c mov %i4, %o2 200e924: 40 00 06 84 call 2010334 200e928: ba 07 40 1c add %i5, %i4, %i5 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200e92c: 90 07 bf f8 add %fp, -8, %o0 200e930: 7f ff d3 d5 call 2003884 200e934: 92 10 20 00 clr %o1 200e938: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e93c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] 200e940: c2 26 20 48 st %g1, [ %i0 + 0x48 ] */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 200e944: 82 10 00 1d mov %i5, %g1 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200e948: b0 10 00 01 mov %g1, %i0 200e94c: 81 c7 e0 08 ret 200e950: 81 e8 00 00 restore =============================================================================== 02003040 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003040: 9d e3 bf 80 save %sp, -128, %sp dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2003044: 05 00 00 3c sethi %hi(0xf000), %g2 2003048: 07 00 00 10 sethi %hi(0x4000), %g3 200304c: 84 0e c0 02 and %i3, %g2, %g2 2003050: 80 a0 80 03 cmp %g2, %g3 2003054: 02 80 00 12 be 200309c 2003058: 07 00 00 20 sethi %hi(0x8000), %g3 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 200305c: 80 a0 80 03 cmp %g2, %g3 2003060: 02 80 00 11 be 20030a4 2003064: 09 00 00 2c sethi %hi(0xb000), %g4 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2003068: 07 00 00 08 sethi %hi(0x2000), %g3 200306c: 88 0e c0 04 and %i3, %g4, %g4 2003070: 80 a1 00 03 cmp %g4, %g3 2003074: 12 80 00 05 bne 2003088 2003078: 07 00 00 04 sethi %hi(0x1000), %g3 *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 200307c: f8 3f bf e8 std %i4, [ %fp + -24 ] if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; 2003080: 10 80 00 0a b 20030a8 2003084: 82 10 20 01 mov 1, %g1 rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 2003088: 80 a0 80 03 cmp %g2, %g3 200308c: 32 80 00 08 bne,a 20030ac <== NEVER TAKEN 2003090: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED *type = IMFS_FIFO; 2003094: 10 80 00 05 b 20030a8 2003098: 82 10 20 06 mov 6, %g1 IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 200309c: 10 80 00 03 b 20030a8 20030a0: 82 10 20 00 clr %g1 20030a4: 82 10 20 04 mov 4, %g1 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 20030a8: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 20030ac: 82 00 60 02 add %g1, 2, %g1 20030b0: c4 00 a0 08 ld [ %g2 + 8 ], %g2 20030b4: 83 28 60 02 sll %g1, 2, %g1 20030b8: d2 00 80 01 ld [ %g2 + %g1 ], %o1 20030bc: 90 10 00 18 mov %i0, %o0 20030c0: 94 10 00 19 mov %i1, %o2 20030c4: 96 10 00 1a mov %i2, %o3 20030c8: 98 10 00 1b mov %i3, %o4 20030cc: 40 00 21 f3 call 200b898 20030d0: 9a 07 bf e8 add %fp, -24, %o5 IMFS_jnode_t *new_node; get_type_and_info_by_mode_and_dev( mode, dev, &type, &info ); new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { 20030d4: 80 a2 20 00 cmp %o0, 0 20030d8: 02 80 00 0e be 2003110 20030dc: 90 07 bf e0 add %fp, -32, %o0 IMFS_jnode_t *parent = parentloc->node_access; 20030e0: fa 06 20 08 ld [ %i0 + 8 ], %i5 IMFS_update_ctime( parent ); 20030e4: 40 00 01 e8 call 2003884 20030e8: 92 10 20 00 clr %o1 20030ec: c2 07 bf e0 ld [ %fp + -32 ], %g1 IMFS_update_mtime( parent ); 20030f0: 90 07 bf e0 add %fp, -32, %o0 new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); 20030f4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 20030f8: 40 00 01 e3 call 2003884 20030fc: 92 10 20 00 clr %o1 2003100: c2 07 bf e0 ld [ %fp + -32 ], %g1 2003104: c2 27 60 44 st %g1, [ %i5 + 0x44 ] size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 2003108: 81 c7 e0 08 ret 200310c: 91 e8 20 00 restore %g0, 0, %o0 } else { rv = -1; } return rv; } 2003110: 81 c7 e0 08 ret 2003114: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02003118 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003118: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 200311c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2003120: c2 00 60 08 ld [ %g1 + 8 ], %g1 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 2003124: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003128: c4 00 80 00 ld [ %g2 ], %g2 200312c: 80 a0 a0 00 cmp %g2, 0 2003130: 12 80 00 0d bne 2003164 2003134: 01 00 00 00 nop if ( node->info.directory.mt_fs == NULL ) { 2003138: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 200313c: 80 a0 a0 00 cmp %g2, 0 2003140: 12 80 00 05 bne 2003154 <== NEVER TAKEN 2003144: 01 00 00 00 nop node->info.directory.mt_fs = mt_entry; 2003148: f0 20 60 5c st %i0, [ %g1 + 0x5c ] #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 200314c: 81 c7 e0 08 ret 2003150: 91 e8 20 00 restore %g0, 0, %o0 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 2003154: 40 00 32 31 call 200fa18 <__errno> <== NOT EXECUTED 2003158: 01 00 00 00 nop <== NOT EXECUTED 200315c: 10 80 00 05 b 2003170 <== NOT EXECUTED 2003160: 82 10 20 10 mov 0x10, %g1 ! 10 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2003164: 40 00 32 2d call 200fa18 <__errno> 2003168: 01 00 00 00 nop 200316c: 82 10 20 14 mov 0x14, %g1 ! 14 2003170: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2003174: 81 c7 e0 08 ret 2003178: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200bce8 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 200bce8: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200bcec: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200bcf0: 82 06 20 54 add %i0, 0x54, %g1 200bcf4: 80 a0 80 01 cmp %g2, %g1 200bcf8: 02 80 00 06 be 200bd10 200bcfc: 80 a6 00 19 cmp %i0, %i1 errno = ENOTEMPTY; 200bd00: 40 00 0f 46 call 200fa18 <__errno> 200bd04: 01 00 00 00 nop 200bd08: 10 80 00 0b b 200bd34 200bd0c: 82 10 20 5a mov 0x5a, %g1 ! 5a node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 200bd10: 02 80 00 06 be 200bd28 200bd14: 01 00 00 00 nop 200bd18: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200bd1c: 80 a0 60 00 cmp %g1, 0 200bd20: 02 80 00 07 be 200bd3c <== ALWAYS TAKEN 200bd24: 01 00 00 00 nop errno = EBUSY; 200bd28: 40 00 0f 3c call 200fa18 <__errno> 200bd2c: 01 00 00 00 nop 200bd30: 82 10 20 10 mov 0x10, %g1 ! 10 200bd34: c2 22 00 00 st %g1, [ %o0 ] node = NULL; 200bd38: b0 10 20 00 clr %i0 } return node; } 200bd3c: 81 c7 e0 08 ret 200bd40: 81 e8 00 00 restore =============================================================================== 0200317c : rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { const IMFS_jnode_t *node = loc->node_access; 200317c: c4 02 20 08 ld [ %o0 + 8 ], %g2 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 2003180: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 2003184: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 2003188: 80 a0 60 02 cmp %g1, 2 200318c: 02 80 00 06 be 20031a4 2003190: 80 a0 60 05 cmp %g1, 5 2003194: 12 80 00 08 bne 20031b4 <== ALWAYS TAKEN 2003198: 90 10 20 04 mov 4, %o0 200319c: 81 c3 e0 08 retl <== NOT EXECUTED 20031a0: 01 00 00 00 nop <== NOT EXECUTED 20031a4: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 20031a8: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; 20031ac: 81 c3 e0 08 retl 20031b0: d0 00 40 00 ld [ %g1 ], %o0 type = imfs_type; break; } return type; } 20031b4: 81 c3 e0 08 retl 20031b8: 90 10 00 01 mov %g1, %o0 =============================================================================== 020031f8 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 20031f8: 9d e3 bf 98 save %sp, -104, %sp int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 20031fc: fa 06 60 08 ld [ %i1 + 8 ], %i5 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 2003200: c2 07 60 08 ld [ %i5 + 8 ], %g1 2003204: 80 a0 60 00 cmp %g1, 0 2003208: 02 80 00 20 be 2003288 <== NEVER TAKEN 200320c: f4 06 a0 08 ld [ %i2 + 8 ], %i2 if ( namelen < IMFS_NAME_MAX ) { 2003210: 80 a7 20 1f cmp %i4, 0x1f 2003214: 18 80 00 19 bgu 2003278 <== NEVER TAKEN 2003218: 94 10 00 1c mov %i4, %o2 memcpy( node->name, name, namelen ); 200321c: 92 10 00 1b mov %i3, %o1 2003220: 40 00 34 45 call 2010334 2003224: 90 07 60 0c add %i5, 0xc, %o0 node->name [namelen] = '\0'; 2003228: b8 07 40 1c add %i5, %i4, %i4 200322c: c0 2f 20 0c clrb [ %i4 + 0xc ] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2003230: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 2003234: c2 07 60 04 ld [ %i5 + 4 ], %g1 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 2003238: 90 07 bf f8 add %fp, -8, %o0 next->previous = previous; 200323c: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2003240: c4 20 40 00 st %g2, [ %g1 ] static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 2003244: f4 27 60 08 st %i2, [ %i5 + 8 ] Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2003248: c2 06 a0 58 ld [ %i2 + 0x58 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 200324c: 84 06 a0 54 add %i2, 0x54, %g2 Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 2003250: fa 26 a0 58 st %i5, [ %i2 + 0x58 ] ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; 2003254: c4 27 40 00 st %g2, [ %i5 ] tail->previous = the_node; old_last->next = the_node; 2003258: fa 20 40 00 st %i5, [ %g1 ] the_node->previous = old_last; 200325c: c2 27 60 04 st %g1, [ %i5 + 4 ] 2003260: 40 00 01 89 call 2003884 2003264: 92 10 20 00 clr %o1 2003268: c2 07 bf f8 ld [ %fp + -8 ], %g1 200326c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 2003270: 81 c7 e0 08 ret 2003274: 91 e8 20 00 restore %g0, 0, %o0 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 2003278: 40 00 31 e8 call 200fa18 <__errno> <== NOT EXECUTED 200327c: 01 00 00 00 nop <== NOT EXECUTED 2003280: 10 80 00 05 b 2003294 <== NOT EXECUTED 2003284: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 2003288: 40 00 31 e4 call 200fa18 <__errno> <== NOT EXECUTED 200328c: 01 00 00 00 nop <== NOT EXECUTED 2003290: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003294: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 2003298: 81 c7 e0 08 ret <== NOT EXECUTED 200329c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02003380 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003380: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 2003384: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2003388: c2 00 60 08 ld [ %g1 + 8 ], %g1 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 200338c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003390: c4 00 80 00 ld [ %g2 ], %g2 2003394: 80 a0 a0 00 cmp %g2, 0 2003398: 12 80 00 0d bne 20033cc <== NEVER TAKEN 200339c: 01 00 00 00 nop if ( node->info.directory.mt_fs == mt_entry ) { 20033a0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 20033a4: 80 a0 80 18 cmp %g2, %i0 20033a8: 12 80 00 05 bne 20033bc <== NEVER TAKEN 20033ac: 01 00 00 00 nop node->info.directory.mt_fs = NULL; 20033b0: c0 20 60 5c clr [ %g1 + 0x5c ] #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 20033b4: 81 c7 e0 08 ret 20033b8: 91 e8 20 00 restore %g0, 0, %o0 if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 20033bc: 40 00 31 97 call 200fa18 <__errno> <== NOT EXECUTED 20033c0: 01 00 00 00 nop <== NOT EXECUTED 20033c4: 10 80 00 05 b 20033d8 <== NOT EXECUTED 20033c8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 20033cc: 40 00 31 93 call 200fa18 <__errno> <== NOT EXECUTED 20033d0: 01 00 00 00 nop <== NOT EXECUTED 20033d4: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 20033d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20033dc: 81 c7 e0 08 ret <== NOT EXECUTED 20033e0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 020222b4 : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 20222b4: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 20222b8: 80 a6 3f ff cmp %i0, -1 20222bc: 32 80 00 0a bne,a 20222e4 20222c0: e0 06 21 40 ld [ %i0 + 0x140 ], %l0 if (!Stack_check_Interrupt_stack.area) 20222c4: 3b 00 81 8a sethi %hi(0x2062800), %i5 20222c8: ba 17 61 c8 or %i5, 0x1c8, %i5 ! 20629c8 20222cc: c2 07 60 04 ld [ %i5 + 4 ], %g1 20222d0: 80 a0 60 00 cmp %g1, 0 20222d4: 02 80 00 4c be 2022404 <== NEVER TAKEN 20222d8: a0 10 20 00 clr %l0 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 20222dc: 10 80 00 04 b 20222ec 20222e0: b0 10 20 00 clr %i0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 20222e4: ba 06 20 b4 add %i0, 0xb4, %i5 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 20222e8: c2 07 60 04 ld [ %i5 + 4 ], %g1 size = Stack_check_usable_stack_size(stack); 20222ec: f2 07 40 00 ld [ %i5 ], %i1 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 20222f0: 84 00 60 10 add %g1, 0x10, %g2 size = Stack_check_usable_stack_size(stack); 20222f4: b2 06 7f f0 add %i1, -16, %i1 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 20222f8: 82 00 60 20 add %g1, 0x20, %g1 for (ebase = base + length; base < ebase; base++) 20222fc: 86 0e 7f fc and %i1, -4, %g3 if (*base != U32_PATTERN) 2022300: 09 29 69 69 sethi %hi(0xa5a5a400), %g4 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2022304: 86 00 40 03 add %g1, %g3, %g3 if (*base != U32_PATTERN) 2022308: 10 80 00 06 b 2022320 202230c: 88 11 21 a5 or %g4, 0x1a5, %g4 2022310: 80 a7 00 04 cmp %i4, %g4 2022314: 12 80 00 08 bne 2022334 2022318: 80 a0 60 00 cmp %g1, 0 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 202231c: 82 00 60 04 add %g1, 4, %g1 2022320: 80 a0 40 03 cmp %g1, %g3 2022324: 2a bf ff fb bcs,a 2022310 <== ALWAYS TAKEN 2022328: f8 00 40 00 ld [ %g1 ], %i4 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 ); else used = 0; 202232c: 10 80 00 06 b 2022344 <== NOT EXECUTED 2022330: b8 10 20 00 clr %i4 <== 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 ) 2022334: 02 80 00 04 be 2022344 <== NEVER TAKEN 2022338: b8 10 20 00 clr %i4 used = Stack_check_Calculate_used( low, size, high_water_mark ); 202233c: b8 00 80 19 add %g2, %i1, %i4 2022340: b8 27 00 01 sub %i4, %g1, %i4 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2022344: 80 a6 20 00 cmp %i0, 0 2022348: 02 80 00 12 be 2022390 202234c: 03 00 81 85 sethi %hi(0x2061400), %g1 #endif { (*print_handler)( 2022350: f6 06 20 08 ld [ %i0 + 8 ], %i3 2022354: f4 00 62 c8 ld [ %g1 + 0x2c8 ], %i2 2022358: 03 00 81 85 sethi %hi(0x2061400), %g1 202235c: e2 00 62 c4 ld [ %g1 + 0x2c4 ], %l1 ! 20616c4 2022360: 94 07 bf f8 add %fp, -8, %o2 2022364: 90 10 00 1b mov %i3, %o0 2022368: 7f ff b3 24 call 200eff8 202236c: 92 10 20 05 mov 5, %o1 2022370: 13 00 81 61 sethi %hi(0x2058400), %o1 2022374: 96 10 00 08 mov %o0, %o3 2022378: 92 12 61 b8 or %o1, 0x1b8, %o1 202237c: 90 10 00 11 mov %l1, %o0 2022380: 9f c6 80 00 call %i2 2022384: 94 10 00 1b mov %i3, %o2 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2022388: 10 80 00 0a b 20223b0 202238c: d4 07 60 04 ld [ %i5 + 4 ], %o2 rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 2022390: 05 00 81 85 sethi %hi(0x2061400), %g2 2022394: c2 00 62 c8 ld [ %g1 + 0x2c8 ], %g1 2022398: d0 00 a2 c4 ld [ %g2 + 0x2c4 ], %o0 202239c: 13 00 81 61 sethi %hi(0x2058400), %o1 20223a0: 94 10 3f ff mov -1, %o2 20223a4: 9f c0 40 00 call %g1 20223a8: 92 12 61 c8 or %o1, 0x1c8, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20223ac: d4 07 60 04 ld [ %i5 + 4 ], %o2 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20223b0: 35 00 81 85 sethi %hi(0x2061400), %i2 20223b4: 37 00 81 85 sethi %hi(0x2061400), %i3 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20223b8: d6 07 40 00 ld [ %i5 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20223bc: c2 06 a2 c8 ld [ %i2 + 0x2c8 ], %g1 20223c0: d0 06 e2 c4 ld [ %i3 + 0x2c4 ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20223c4: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20223c8: 13 00 81 61 sethi %hi(0x2058400), %o1 20223cc: 96 02 80 0b add %o2, %o3, %o3 20223d0: 92 12 61 d8 or %o1, 0x1d8, %o1 20223d4: 98 10 00 10 mov %l0, %o4 20223d8: 9f c0 40 00 call %g1 20223dc: 9a 10 00 19 mov %i1, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20223e0: 03 00 81 85 sethi %hi(0x2061400), %g1 20223e4: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 20616c0 (*print_handler)( print_context, "Unavailable\n" ); 20223e8: d0 06 e2 c4 ld [ %i3 + 0x2c4 ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20223ec: 80 a0 60 00 cmp %g1, 0 20223f0: 12 80 00 07 bne 202240c <== ALWAYS TAKEN 20223f4: c2 06 a2 c8 ld [ %i2 + 0x2c8 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 20223f8: 13 00 81 61 sethi %hi(0x2058400), %o1 <== NOT EXECUTED 20223fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2022400: 92 12 61 f8 or %o1, 0x1f8, %o1 ! 20585f8 <== NOT EXECUTED 2022404: 81 c7 e0 08 ret <== NOT EXECUTED 2022408: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 202240c: 13 00 81 61 sethi %hi(0x2058400), %o1 2022410: 94 10 00 1c mov %i4, %o2 2022414: 9f c0 40 00 call %g1 2022418: 92 12 62 08 or %o1, 0x208, %o1 202241c: 81 c7 e0 08 ret 2022420: 81 e8 00 00 restore =============================================================================== 0202250c : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 202250c: 9d e3 bf 80 save %sp, -128, %sp Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 2022510: 11 00 81 61 sethi %hi(0x2058400), %o0 ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; 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(stack); 2022514: fa 06 20 b8 ld [ %i0 + 0xb8 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2022518: 7f ff 87 b8 call 20043f8 202251c: 90 12 22 10 or %o0, 0x210, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2022520: 92 10 00 18 mov %i0, %o1 2022524: 11 00 81 61 sethi %hi(0x2058400), %o0 2022528: 7f ff 87 b4 call 20043f8 202252c: 90 12 22 20 or %o0, 0x220, %o0 ! 2058620 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2022530: d2 06 20 08 ld [ %i0 + 8 ], %o1 2022534: 11 00 81 61 sethi %hi(0x2058400), %o0 2022538: 7f ff 87 b0 call 20043f8 202253c: 90 12 22 40 or %o0, 0x240, %o0 ! 2058640 printk( 2022540: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2022544: 11 00 81 61 sethi %hi(0x2058400), %o0 2022548: 7f ff 87 ac call 20043f8 202254c: 90 12 22 58 or %o0, 0x258, %o0 ! 2058658 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2022550: d0 06 20 08 ld [ %i0 + 8 ], %o0 2022554: 94 07 bf e0 add %fp, -32, %o2 2022558: 7f ff b2 a8 call 200eff8 202255c: 92 10 20 20 mov 0x20, %o1 2022560: 92 10 00 08 mov %o0, %o1 2022564: 11 00 81 61 sethi %hi(0x2058400), %o0 2022568: 7f ff 87 a4 call 20043f8 202256c: 90 12 22 70 or %o0, 0x270, %o0 ! 2058670 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2022570: d4 06 20 b8 ld [ %i0 + 0xb8 ], %o2 2022574: d2 06 20 b4 ld [ %i0 + 0xb4 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 2022578: 11 00 81 61 sethi %hi(0x2058400), %o0 202257c: 96 02 80 09 add %o2, %o1, %o3 2022580: 7f ff 87 9e call 20043f8 2022584: 90 12 22 88 or %o0, 0x288, %o0 "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) { 2022588: 80 a6 60 00 cmp %i1, 0 202258c: 12 80 00 07 bne 20225a8 <== NEVER TAKEN 2022590: 11 00 81 61 sethi %hi(0x2058400), %o0 printk( 2022594: 92 10 20 10 mov 0x10, %o1 2022598: 90 12 22 b8 or %o0, 0x2b8, %o0 202259c: 94 07 60 08 add %i5, 8, %o2 20225a0: 7f ff 87 96 call 20043f8 20225a4: 96 07 60 18 add %i5, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 20225a8: 7f ff 95 e8 call 2007d48 20225ac: 90 10 20 81 mov 0x81, %o0 =============================================================================== 0200a954 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200a954: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 200a958: 03 00 80 84 sethi %hi(0x2021000), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 200a95c: 7f ff e4 a1 call 2003be0 200a960: fa 00 61 2c ld [ %g1 + 0x12c ], %i5 ! 202112c <_Per_CPU_Information+0xc> 200a964: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 200a968: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200a96c: 80 a0 60 00 cmp %g1, 0 200a970: 12 80 00 08 bne 200a990 <_CORE_RWLock_Release+0x3c> 200a974: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 200a978: 7f ff e4 9e call 2003bf0 200a97c: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200a980: 82 10 20 02 mov 2, %g1 200a984: c2 27 60 34 st %g1, [ %i5 + 0x34 ] 200a988: 81 c7 e0 08 ret 200a98c: 81 e8 00 00 restore return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 200a990: 32 80 00 0b bne,a 200a9bc <_CORE_RWLock_Release+0x68> 200a994: c0 27 60 34 clr [ %i5 + 0x34 ] the_rwlock->number_of_readers -= 1; 200a998: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a99c: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 200a9a0: 80 a0 60 00 cmp %g1, 0 200a9a4: 02 80 00 05 be 200a9b8 <_CORE_RWLock_Release+0x64> 200a9a8: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 200a9ac: 7f ff e4 91 call 2003bf0 200a9b0: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 200a9b4: 30 80 00 24 b,a 200aa44 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 200a9b8: c0 27 60 34 clr [ %i5 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 200a9bc: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 200a9c0: 7f ff e4 8c call 2003bf0 200a9c4: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 200a9c8: 40 00 07 9d call 200c83c <_Thread_queue_Dequeue> 200a9cc: 90 10 00 18 mov %i0, %o0 if ( next ) { 200a9d0: 80 a2 20 00 cmp %o0, 0 200a9d4: 22 80 00 1c be,a 200aa44 <_CORE_RWLock_Release+0xf0> 200a9d8: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 200a9dc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 200a9e0: 80 a0 60 01 cmp %g1, 1 200a9e4: 32 80 00 05 bne,a 200a9f8 <_CORE_RWLock_Release+0xa4> 200a9e8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 200a9ec: 82 10 20 02 mov 2, %g1 return CORE_RWLOCK_SUCCESSFUL; 200a9f0: 10 80 00 14 b 200aa40 <_CORE_RWLock_Release+0xec> 200a9f4: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200a9f8: 82 00 60 01 inc %g1 200a9fc: c2 26 20 48 st %g1, [ %i0 + 0x48 ] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200aa00: 82 10 20 01 mov 1, %g1 200aa04: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 200aa08: 40 00 08 c9 call 200cd2c <_Thread_queue_First> 200aa0c: 90 10 00 18 mov %i0, %o0 if ( !next || 200aa10: 92 92 20 00 orcc %o0, 0, %o1 200aa14: 22 80 00 0c be,a 200aa44 <_CORE_RWLock_Release+0xf0> 200aa18: b0 10 20 00 clr %i0 200aa1c: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 200aa20: 80 a0 60 01 cmp %g1, 1 200aa24: 02 80 00 07 be 200aa40 <_CORE_RWLock_Release+0xec> <== NEVER TAKEN 200aa28: 90 10 00 18 mov %i0, %o0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 200aa2c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200aa30: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 200aa34: 40 00 08 6f call 200cbf0 <_Thread_queue_Extract> 200aa38: c2 26 20 48 st %g1, [ %i0 + 0x48 ] } 200aa3c: 30 bf ff f3 b,a 200aa08 <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200aa40: b0 10 20 00 clr %i0 200aa44: 81 c7 e0 08 ret 200aa48: 81 e8 00 00 restore =============================================================================== 0200aa4c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 200aa4c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200aa50: 90 10 00 18 mov %i0, %o0 200aa54: 40 00 06 a2 call 200c4dc <_Thread_Get> 200aa58: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200aa5c: c2 07 bf fc ld [ %fp + -4 ], %g1 200aa60: 80 a0 60 00 cmp %g1, 0 200aa64: 12 80 00 09 bne 200aa88 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 200aa68: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200aa6c: 40 00 08 ed call 200ce20 <_Thread_queue_Process_timeout> 200aa70: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200aa74: 03 00 80 82 sethi %hi(0x2020800), %g1 200aa78: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 2020bf0 <_Thread_Dispatch_disable_level> 200aa7c: 84 00 bf ff add %g2, -1, %g2 200aa80: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ] return _Thread_Dispatch_disable_level; 200aa84: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 200aa88: 81 c7 e0 08 ret 200aa8c: 81 e8 00 00 restore =============================================================================== 020110e4 <_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 ) { 20110e4: 9d e3 bf a0 save %sp, -96, %sp size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 20110e8: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 20110ec: c0 26 20 48 clr [ %i0 + 0x48 ] the_message_queue->maximum_message_size = maximum_message_size; 20110f0: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 20110f4: c0 26 20 60 clr [ %i0 + 0x60 ] /* * 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)) { 20110f8: 80 8e e0 03 btst 3, %i3 20110fc: 02 80 00 09 be 2011120 <_CORE_message_queue_Initialize+0x3c> 2011100: c0 26 20 64 clr [ %i0 + 0x64 ] allocated_message_size += sizeof(uint32_t); 2011104: 96 06 e0 04 add %i3, 4, %o3 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2011108: 96 0a ff fc and %o3, -4, %o3 } if (allocated_message_size < maximum_message_size) 201110c: 80 a2 c0 1b cmp %o3, %i3 2011110: 3a 80 00 06 bcc,a 2011128 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN 2011114: ba 02 e0 14 add %o3, 0x14, %i5 return false; 2011118: 10 80 00 24 b 20111a8 <_CORE_message_queue_Initialize+0xc4> 201111c: b0 10 20 00 clr %i0 /* * 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)) { 2011120: 96 10 00 1b mov %i3, %o3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 2011124: ba 02 e0 14 add %o3, 0x14, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2011128: 90 10 20 00 clr %o0 201112c: 92 10 00 1a mov %i2, %o1 2011130: 94 10 20 00 clr %o2 2011134: 40 00 43 75 call 2021f08 <__muldi3> 2011138: 96 10 00 1d mov %i5, %o3 if ( x > SIZE_MAX ) 201113c: 80 a2 20 00 cmp %o0, 0 2011140: 34 80 00 1a bg,a 20111a8 <_CORE_message_queue_Initialize+0xc4> 2011144: b0 10 20 00 clr %i0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 2011148: 40 00 0c 1c call 20141b8 <_Workspace_Allocate> 201114c: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2011150: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2011154: 80 a2 20 00 cmp %o0, 0 2011158: 02 bf ff f0 be 2011118 <_CORE_message_queue_Initialize+0x34> 201115c: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2011160: 90 06 20 68 add %i0, 0x68, %o0 2011164: 94 10 00 1a mov %i2, %o2 2011168: 7f ff ff d1 call 20110ac <_Chain_Initialize> 201116c: 96 10 00 1d mov %i5, %o3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2011170: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 2011174: c2 26 20 58 st %g1, [ %i0 + 0x58 ] */ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority( CORE_message_queue_Attributes *the_attribute ) { return 2011178: c2 06 40 00 ld [ %i1 ], %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 201117c: 84 06 20 54 add %i0, 0x54, %g2 2011180: 82 18 60 01 xor %g1, 1, %g1 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 2011184: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 2011188: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 201118c: c0 26 20 54 clr [ %i0 + 0x54 ] 2011190: 90 10 00 18 mov %i0, %o0 2011194: 92 60 3f ff subx %g0, -1, %o1 2011198: 94 10 20 80 mov 0x80, %o2 201119c: 96 10 20 06 mov 6, %o3 20111a0: 40 00 09 da call 2013908 <_Thread_queue_Initialize> 20111a4: b0 10 20 01 mov 1, %i0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 20111a8: b0 0e 20 01 and %i0, 1, %i0 20111ac: 81 c7 e0 08 ret 20111b0: 81 e8 00 00 restore =============================================================================== 020087a0 <_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 ) { 20087a0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 20087a4: 90 10 00 18 mov %i0, %o0 20087a8: 40 00 07 6e call 200a560 <_Thread_queue_Dequeue> 20087ac: ba 10 00 18 mov %i0, %i5 20087b0: 80 a2 20 00 cmp %o0, 0 20087b4: 12 80 00 0e bne 20087ec <_CORE_semaphore_Surrender+0x4c> 20087b8: b0 10 20 00 clr %i0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 20087bc: 7f ff e7 c2 call 20026c4 20087c0: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20087c4: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 20087c8: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 20087cc: 80 a0 40 02 cmp %g1, %g2 20087d0: 1a 80 00 05 bcc 20087e4 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 20087d4: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20087d8: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 20087dc: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20087e0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20087e4: 7f ff e7 bc call 20026d4 20087e8: 01 00 00 00 nop } return status; } 20087ec: 81 c7 e0 08 ret 20087f0: 81 e8 00 00 restore =============================================================================== 02007488 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2007488: 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 ]; 200748c: f8 06 21 58 ld [ %i0 + 0x158 ], %i4 option_set = (rtems_option) the_thread->Wait.option; 2007490: f6 06 20 30 ld [ %i0 + 0x30 ], %i3 _ISR_Disable( level ); 2007494: 7f ff ec 8c call 20026c4 2007498: ba 10 00 18 mov %i0, %i5 200749c: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 20074a0: c4 07 00 00 ld [ %i4 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 20074a4: c6 07 60 24 ld [ %i5 + 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 ) ) { 20074a8: 82 88 c0 02 andcc %g3, %g2, %g1 20074ac: 02 80 00 42 be 20075b4 <_Event_Surrender+0x12c> 20074b0: 09 00 80 78 sethi %hi(0x201e000), %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() && 20074b4: 88 11 20 20 or %g4, 0x20, %g4 ! 201e020 <_Per_CPU_Information> 20074b8: f4 01 20 08 ld [ %g4 + 8 ], %i2 20074bc: 80 a6 a0 00 cmp %i2, 0 20074c0: 22 80 00 1d be,a 2007534 <_Event_Surrender+0xac> 20074c4: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 20074c8: c8 01 20 0c ld [ %g4 + 0xc ], %g4 20074cc: 80 a7 40 04 cmp %i5, %g4 20074d0: 32 80 00 19 bne,a 2007534 <_Event_Surrender+0xac> 20074d4: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 20074d8: 09 00 80 79 sethi %hi(0x201e400), %g4 20074dc: f4 01 20 20 ld [ %g4 + 0x20 ], %i2 ! 201e420 <_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() && _Thread_Is_executing( the_thread ) && 20074e0: 80 a6 a0 02 cmp %i2, 2 20074e4: 02 80 00 07 be 2007500 <_Event_Surrender+0x78> <== NEVER TAKEN 20074e8: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 20074ec: c8 01 20 20 ld [ %g4 + 0x20 ], %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() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 20074f0: 80 a1 20 01 cmp %g4, 1 20074f4: 32 80 00 10 bne,a 2007534 <_Event_Surrender+0xac> 20074f8: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 20074fc: 80 a0 40 03 cmp %g1, %g3 2007500: 02 80 00 04 be 2007510 <_Event_Surrender+0x88> 2007504: 80 8e e0 02 btst 2, %i3 2007508: 02 80 00 2b be 20075b4 <_Event_Surrender+0x12c> <== NEVER TAKEN 200750c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 2007510: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2007514: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007518: c4 07 60 28 ld [ %i5 + 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; 200751c: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007520: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2007524: 84 10 20 03 mov 3, %g2 2007528: 03 00 80 79 sethi %hi(0x201e400), %g1 200752c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] ! 201e420 <_Event_Sync_state> 2007530: 30 80 00 21 b,a 20075b4 <_Event_Surrender+0x12c> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2007534: 80 89 21 00 btst 0x100, %g4 2007538: 02 80 00 1f be 20075b4 <_Event_Surrender+0x12c> 200753c: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2007540: 02 80 00 04 be 2007550 <_Event_Surrender+0xc8> 2007544: 80 8e e0 02 btst 2, %i3 2007548: 02 80 00 1b be 20075b4 <_Event_Surrender+0x12c> <== NEVER TAKEN 200754c: 01 00 00 00 nop 2007550: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2007554: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007558: c4 07 60 28 ld [ %i5 + 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; 200755c: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007560: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 2007564: 7f ff ec 5c call 20026d4 2007568: 90 10 00 18 mov %i0, %o0 200756c: 7f ff ec 56 call 20026c4 2007570: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2007574: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 2007578: 80 a0 60 02 cmp %g1, 2 200757c: 02 80 00 06 be 2007594 <_Event_Surrender+0x10c> 2007580: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2007584: 7f ff ec 54 call 20026d4 2007588: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 200758c: 10 80 00 08 b 20075ac <_Event_Surrender+0x124> 2007590: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2007594: c2 27 60 50 st %g1, [ %i5 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2007598: 7f ff ec 4f call 20026d4 200759c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 20075a0: 40 00 0e ae call 200b058 <_Watchdog_Remove> 20075a4: 90 07 60 48 add %i5, 0x48, %o0 20075a8: b2 16 63 f8 or %i1, 0x3f8, %i1 20075ac: 40 00 0a 28 call 2009e4c <_Thread_Clear_state> 20075b0: 91 e8 00 1d restore %g0, %i5, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 20075b4: 7f ff ec 48 call 20026d4 20075b8: 81 e8 00 00 restore =============================================================================== 020075bc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20075bc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20075c0: 90 10 00 18 mov %i0, %o0 20075c4: 40 00 0b 0f call 200a200 <_Thread_Get> 20075c8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20075cc: c2 07 bf fc ld [ %fp + -4 ], %g1 20075d0: 80 a0 60 00 cmp %g1, 0 20075d4: 12 80 00 1d bne 2007648 <_Event_Timeout+0x8c> <== NEVER TAKEN 20075d8: ba 10 00 08 mov %o0, %i5 * * 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 ); 20075dc: 7f ff ec 3a call 20026c4 20075e0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 20075e4: 03 00 80 78 sethi %hi(0x201e000), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 20075e8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 ! 201e02c <_Per_CPU_Information+0xc> 20075ec: 80 a7 40 01 cmp %i5, %g1 20075f0: 12 80 00 09 bne 2007614 <_Event_Timeout+0x58> 20075f4: c0 27 60 24 clr [ %i5 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 20075f8: 03 00 80 79 sethi %hi(0x201e400), %g1 20075fc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 201e420 <_Event_Sync_state> 2007600: 80 a0 a0 01 cmp %g2, 1 2007604: 32 80 00 05 bne,a 2007618 <_Event_Timeout+0x5c> 2007608: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200760c: 84 10 20 02 mov 2, %g2 2007610: c4 20 60 20 st %g2, [ %g1 + 0x20 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2007614: 82 10 20 06 mov 6, %g1 2007618: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 200761c: 7f ff ec 2e call 20026d4 2007620: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007624: 90 10 00 1d mov %i5, %o0 2007628: 13 04 00 ff sethi %hi(0x1003fc00), %o1 200762c: 40 00 0a 08 call 2009e4c <_Thread_Clear_state> 2007630: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2007634: 03 00 80 76 sethi %hi(0x201d800), %g1 2007638: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 200763c: 84 00 bf ff add %g2, -1, %g2 2007640: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 2007644: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 2007648: 81 c7 e0 08 ret 200764c: 81 e8 00 00 restore =============================================================================== 0200d758 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200d758: 9d e3 bf 90 save %sp, -112, %sp Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 200d75c: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200d760: c0 27 bf fc clr [ %fp + -4 ] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 200d764: ba 06 40 1a add %i1, %i2, %i5 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 200d768: ea 06 20 20 ld [ %i0 + 0x20 ], %l5 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 200d76c: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 uintptr_t const min_block_size = heap->min_block_size; 200d770: d6 06 20 14 ld [ %i0 + 0x14 ], %o3 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 200d774: 80 a7 40 19 cmp %i5, %i1 200d778: 1a 80 00 04 bcc 200d788 <_Heap_Extend+0x30> 200d77c: e6 06 20 30 ld [ %i0 + 0x30 ], %l3 return false; 200d780: 10 80 00 a2 b 200da08 <_Heap_Extend+0x2b0> 200d784: b0 10 20 00 clr %i0 } extend_area_ok = _Heap_Get_first_and_last_block( 200d788: 90 10 00 19 mov %i1, %o0 200d78c: 92 10 00 1a mov %i2, %o1 200d790: 94 10 00 16 mov %l6, %o2 200d794: 98 07 bf f8 add %fp, -8, %o4 200d798: 7f ff ec 9e call 2008a10 <_Heap_Get_first_and_last_block> 200d79c: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200d7a0: 80 8a 20 ff btst 0xff, %o0 200d7a4: 02 bf ff f7 be 200d780 <_Heap_Extend+0x28> 200d7a8: a4 10 20 00 clr %l2 200d7ac: b4 10 00 15 mov %l5, %i2 200d7b0: a8 10 20 00 clr %l4 200d7b4: b8 10 20 00 clr %i4 200d7b8: a2 10 20 00 clr %l1 200d7bc: ee 06 20 18 ld [ %i0 + 0x18 ], %l7 } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; uintptr_t const sub_area_end = start_block->prev_size; 200d7c0: e0 06 80 00 ld [ %i2 ], %l0 200d7c4: 92 10 00 16 mov %l6, %o1 200d7c8: 82 04 3f f8 add %l0, -8, %g1 200d7cc: 90 10 00 10 mov %l0, %o0 200d7d0: 40 00 2d 82 call 2018dd8 <.urem> 200d7d4: c2 27 bf f4 st %g1, [ %fp + -12 ] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200d7d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 200d7dc: 80 a5 c0 1d cmp %l7, %i5 200d7e0: 1a 80 00 05 bcc 200d7f4 <_Heap_Extend+0x9c> 200d7e4: 90 20 40 08 sub %g1, %o0, %o0 200d7e8: 80 a6 40 10 cmp %i1, %l0 200d7ec: 2a 80 00 87 bcs,a 200da08 <_Heap_Extend+0x2b0> 200d7f0: b0 10 20 00 clr %i0 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 200d7f4: 80 a7 40 17 cmp %i5, %l7 200d7f8: 02 80 00 06 be 200d810 <_Heap_Extend+0xb8> 200d7fc: 80 a7 40 10 cmp %i5, %l0 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200d800: 2a 80 00 05 bcs,a 200d814 <_Heap_Extend+0xbc> 200d804: a8 10 00 1a mov %i2, %l4 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200d808: 10 80 00 04 b 200d818 <_Heap_Extend+0xc0> 200d80c: 80 a4 00 19 cmp %l0, %i1 200d810: a2 10 00 1a mov %i2, %l1 200d814: 80 a4 00 19 cmp %l0, %i1 200d818: 12 80 00 05 bne 200d82c <_Heap_Extend+0xd4> 200d81c: 80 a4 00 19 cmp %l0, %i1 start_block->prev_size = extend_area_end; 200d820: fa 26 80 00 st %i5, [ %i2 ] 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 ) 200d824: 10 80 00 04 b 200d834 <_Heap_Extend+0xdc> 200d828: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200d82c: 2a 80 00 02 bcs,a 200d834 <_Heap_Extend+0xdc> 200d830: a4 10 00 08 mov %o0, %l2 - 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; 200d834: f4 02 20 04 ld [ %o0 + 4 ], %i2 200d838: b4 0e bf fe and %i2, -2, %i2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200d83c: b4 02 00 1a add %o0, %i2, %i2 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200d840: 80 a6 80 15 cmp %i2, %l5 200d844: 12 bf ff df bne 200d7c0 <_Heap_Extend+0x68> 200d848: ae 10 00 1a mov %i2, %l7 if ( extend_area_begin < heap->area_begin ) { 200d84c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200d850: 80 a6 40 01 cmp %i1, %g1 200d854: 3a 80 00 04 bcc,a 200d864 <_Heap_Extend+0x10c> 200d858: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200d85c: 10 80 00 05 b 200d870 <_Heap_Extend+0x118> 200d860: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200d864: 80 a0 40 1d cmp %g1, %i5 200d868: 2a 80 00 02 bcs,a 200d870 <_Heap_Extend+0x118> 200d86c: fa 26 20 1c st %i5, [ %i0 + 0x1c ] heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 200d870: c4 07 bf f8 ld [ %fp + -8 ], %g2 200d874: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200d878: fa 20 80 00 st %i5, [ %g2 ] heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 200d87c: 86 20 40 02 sub %g1, %g2, %g3 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200d880: 88 10 e0 01 or %g3, 1, %g4 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 200d884: c6 20 40 00 st %g3, [ %g1 ] extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = 200d888: c8 20 a0 04 st %g4, [ %g2 + 4 ] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 200d88c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200d890: 80 a0 c0 02 cmp %g3, %g2 200d894: 08 80 00 04 bleu 200d8a4 <_Heap_Extend+0x14c> 200d898: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200d89c: 10 80 00 06 b 200d8b4 <_Heap_Extend+0x15c> 200d8a0: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200d8a4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200d8a8: 80 a0 80 01 cmp %g2, %g1 200d8ac: 2a 80 00 02 bcs,a 200d8b4 <_Heap_Extend+0x15c> 200d8b0: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200d8b4: 80 a4 60 00 cmp %l1, 0 200d8b8: 02 80 00 14 be 200d908 <_Heap_Extend+0x1b0> 200d8bc: b2 06 60 08 add %i1, 8, %i1 Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 200d8c0: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 200d8c4: 92 10 00 1a mov %i2, %o1 200d8c8: 40 00 2d 44 call 2018dd8 <.urem> 200d8cc: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200d8d0: 80 a2 20 00 cmp %o0, 0 200d8d4: 02 80 00 04 be 200d8e4 <_Heap_Extend+0x18c> 200d8d8: c2 04 40 00 ld [ %l1 ], %g1 return value - remainder + alignment; 200d8dc: b2 06 40 1a add %i1, %i2, %i1 200d8e0: b2 26 40 08 sub %i1, %o0, %i1 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = 200d8e4: 92 06 7f f8 add %i1, -8, %o1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 200d8e8: c2 26 7f f8 st %g1, [ %i1 + -8 ] uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 200d8ec: 82 24 40 09 sub %l1, %o1, %g1 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 200d8f0: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200d8f4: 90 10 00 18 mov %i0, %o0 200d8f8: 7f ff ff 8e call 200d730 <_Heap_Free_block> 200d8fc: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d900: 10 80 00 08 b 200d920 <_Heap_Extend+0x1c8> 200d904: 80 a7 20 00 cmp %i4, 0 heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 200d908: 80 a5 20 00 cmp %l4, 0 200d90c: 02 80 00 04 be 200d91c <_Heap_Extend+0x1c4> 200d910: a8 25 00 01 sub %l4, %g1, %l4 { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 200d914: a8 15 20 01 or %l4, 1, %l4 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = 200d918: e8 20 60 04 st %l4, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d91c: 80 a7 20 00 cmp %i4, 0 200d920: 02 80 00 15 be 200d974 <_Heap_Extend+0x21c> 200d924: ba 07 7f f8 add %i5, -8, %i5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d928: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 200d92c: ba 27 40 1c sub %i5, %i4, %i5 200d930: 40 00 2d 2a call 2018dd8 <.urem> 200d934: 90 10 00 1d mov %i5, %o0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 200d938: c4 07 20 04 ld [ %i4 + 4 ], %g2 200d93c: 90 27 40 08 sub %i5, %o0, %o0 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200d940: 82 02 00 1c add %o0, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200d944: 84 20 80 08 sub %g2, %o0, %g2 | HEAP_PREV_BLOCK_USED; 200d948: 84 10 a0 01 or %g2, 1, %g2 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200d94c: c4 20 60 04 st %g2, [ %g1 + 4 ] RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d950: c2 07 20 04 ld [ %i4 + 4 ], %g1 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 200d954: 92 10 00 1c mov %i4, %o1 200d958: 82 08 60 01 and %g1, 1, %g1 block->size_and_flag = size | flag; 200d95c: 90 12 00 01 or %o0, %g1, %o0 200d960: d0 27 20 04 st %o0, [ %i4 + 4 ] 200d964: 7f ff ff 73 call 200d730 <_Heap_Free_block> 200d968: 90 10 00 18 mov %i0, %o0 extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d96c: 10 80 00 0f b 200d9a8 <_Heap_Extend+0x250> 200d970: 80 a7 20 00 cmp %i4, 0 ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 200d974: 80 a4 a0 00 cmp %l2, 0 200d978: 02 80 00 0b be 200d9a4 <_Heap_Extend+0x24c> 200d97c: c6 07 bf f8 ld [ %fp + -8 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d980: c4 04 a0 04 ld [ %l2 + 4 ], %g2 _Heap_Link_above( 200d984: c2 07 bf fc ld [ %fp + -4 ], %g1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 200d988: 86 20 c0 12 sub %g3, %l2, %g3 200d98c: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d990: 84 10 c0 02 or %g3, %g2, %g2 200d994: c4 24 a0 04 st %g2, [ %l2 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200d998: c4 00 60 04 ld [ %g1 + 4 ], %g2 200d99c: 84 10 a0 01 or %g2, 1, %g2 200d9a0: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d9a4: 80 a7 20 00 cmp %i4, 0 200d9a8: 32 80 00 09 bne,a 200d9cc <_Heap_Extend+0x274> 200d9ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d9b0: 80 a4 60 00 cmp %l1, 0 200d9b4: 32 80 00 06 bne,a 200d9cc <_Heap_Extend+0x274> 200d9b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200d9bc: d2 07 bf f8 ld [ %fp + -8 ], %o1 200d9c0: 7f ff ff 5c call 200d730 <_Heap_Free_block> 200d9c4: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 200d9c8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200d9cc: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d9d0: c4 00 60 04 ld [ %g1 + 4 ], %g2 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200d9d4: 86 20 c0 01 sub %g3, %g1, %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d9d8: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d9dc: 84 10 c0 02 or %g3, %g2, %g2 200d9e0: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200d9e4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) 200d9e8: 80 a6 e0 00 cmp %i3, 0 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200d9ec: a6 20 40 13 sub %g1, %l3, %l3 /* Statistics */ stats->size += extended_size; 200d9f0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 200d9f4: 82 00 40 13 add %g1, %l3, %g1 if ( extended_size_ptr != NULL ) 200d9f8: 02 80 00 03 be 200da04 <_Heap_Extend+0x2ac> <== NEVER TAKEN 200d9fc: c2 26 20 2c st %g1, [ %i0 + 0x2c ] *extended_size_ptr = extended_size; 200da00: e6 26 c0 00 st %l3, [ %i3 ] return true; 200da04: b0 10 20 01 mov 1, %i0 } 200da08: b0 0e 20 01 and %i0, 1, %i0 200da0c: 81 c7 e0 08 ret 200da10: 81 e8 00 00 restore =============================================================================== 0200d784 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200d784: 9d e3 bf a0 save %sp, -96, %sp /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 200d788: 80 a6 60 00 cmp %i1, 0 200d78c: 02 80 00 7a be 200d974 <_Heap_Free+0x1f0> 200d790: 88 10 20 01 mov 1, %g4 200d794: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200d798: 40 00 2c ec call 2018b48 <.urem> 200d79c: 90 10 00 19 mov %i1, %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 200d7a0: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d7a4: ba 06 7f f8 add %i1, -8, %i5 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200d7a8: 90 27 40 08 sub %i5, %o0, %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; 200d7ac: 80 a2 00 1b cmp %o0, %i3 200d7b0: 0a 80 00 05 bcs 200d7c4 <_Heap_Free+0x40> 200d7b4: 82 10 20 00 clr %g1 200d7b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d7bc: 80 a0 40 08 cmp %g1, %o0 200d7c0: 82 60 3f ff subx %g0, -1, %g1 } alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { 200d7c4: 80 a0 60 00 cmp %g1, 0 200d7c8: 02 80 00 6b be 200d974 <_Heap_Free+0x1f0> 200d7cc: 88 10 20 00 clr %g4 - 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; 200d7d0: f8 02 20 04 ld [ %o0 + 4 ], %i4 200d7d4: 84 0f 3f fe and %i4, -2, %g2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200d7d8: 82 02 00 02 add %o0, %g2, %g1 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; 200d7dc: 80 a0 40 1b cmp %g1, %i3 200d7e0: 0a 80 00 05 bcs 200d7f4 <_Heap_Free+0x70> <== NEVER TAKEN 200d7e4: 86 10 20 00 clr %g3 200d7e8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200d7ec: 80 a0 c0 01 cmp %g3, %g1 200d7f0: 86 60 3f ff subx %g0, -1, %g3 _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 200d7f4: 80 a0 e0 00 cmp %g3, 0 200d7f8: 02 80 00 5f be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN 200d7fc: 88 10 20 00 clr %g4 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; 200d800: fa 00 60 04 ld [ %g1 + 4 ], %i5 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200d804: 80 8f 60 01 btst 1, %i5 200d808: 22 80 00 5c be,a 200d978 <_Heap_Free+0x1f4> <== NEVER TAKEN 200d80c: b0 09 20 01 and %g4, 1, %i0 <== NOT EXECUTED if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 200d810: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200d814: 80 a0 40 04 cmp %g1, %g4 200d818: 02 80 00 07 be 200d834 <_Heap_Free+0xb0> 200d81c: ba 0f 7f fe and %i5, -2, %i5 200d820: 86 00 40 1d add %g1, %i5, %g3 200d824: f4 00 e0 04 ld [ %g3 + 4 ], %i2 200d828: b4 1e a0 01 xor %i2, 1, %i2 200d82c: 10 80 00 03 b 200d838 <_Heap_Free+0xb4> 200d830: b4 0e a0 01 and %i2, 1, %i2 200d834: b4 10 20 00 clr %i2 if ( !_Heap_Is_prev_used( block ) ) { 200d838: 80 8f 20 01 btst 1, %i4 200d83c: 12 80 00 26 bne 200d8d4 <_Heap_Free+0x150> 200d840: 80 8e a0 ff btst 0xff, %i2 uintptr_t const prev_size = block->prev_size; 200d844: f8 02 00 00 ld [ %o0 ], %i4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200d848: 86 22 00 1c sub %o0, %i4, %g3 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; 200d84c: 80 a0 c0 1b cmp %g3, %i3 200d850: 0a 80 00 04 bcs 200d860 <_Heap_Free+0xdc> <== NEVER TAKEN 200d854: b2 10 20 00 clr %i1 200d858: 80 a1 00 03 cmp %g4, %g3 200d85c: b2 60 3f ff subx %g0, -1, %i1 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 200d860: 80 a6 60 00 cmp %i1, 0 200d864: 02 80 00 44 be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN 200d868: 88 10 20 00 clr %g4 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; 200d86c: f6 00 e0 04 ld [ %g3 + 4 ], %i3 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) ) { 200d870: 80 8e e0 01 btst 1, %i3 200d874: 02 80 00 40 be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN 200d878: 80 8e a0 ff btst 0xff, %i2 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200d87c: 22 80 00 0f be,a 200d8b8 <_Heap_Free+0x134> 200d880: b8 00 80 1c add %g2, %i4, %i4 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200d884: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200d888: c2 00 60 0c ld [ %g1 + 0xc ], %g1 uintptr_t const size = block_size + prev_size + next_block_size; 200d88c: ba 00 80 1d add %g2, %i5, %i5 prev->next = next; 200d890: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200d894: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200d898: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200d89c: b8 07 40 1c add %i5, %i4, %i4 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200d8a0: 82 00 7f ff add %g1, -1, %g1 200d8a4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 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; 200d8a8: f8 20 c0 1c st %i4, [ %g3 + %i4 ] 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; 200d8ac: 82 17 20 01 or %i4, 1, %g1 200d8b0: 10 80 00 27 b 200d94c <_Heap_Free+0x1c8> 200d8b4: c2 20 e0 04 st %g1, [ %g3 + 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; 200d8b8: 88 17 20 01 or %i4, 1, %g4 200d8bc: c8 20 e0 04 st %g4, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d8c0: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200d8c4: f8 22 00 02 st %i4, [ %o0 + %g2 ] _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; 200d8c8: 86 08 ff fe and %g3, -2, %g3 200d8cc: 10 80 00 20 b 200d94c <_Heap_Free+0x1c8> 200d8d0: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200d8d4: 22 80 00 0d be,a 200d908 <_Heap_Free+0x184> 200d8d8: c6 06 20 08 ld [ %i0 + 8 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200d8dc: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200d8e0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200d8e4: c8 22 20 08 st %g4, [ %o0 + 8 ] new_block->prev = prev; 200d8e8: c2 22 20 0c st %g1, [ %o0 + 0xc ] uintptr_t const size = block_size + next_block_size; 200d8ec: 86 07 40 02 add %i5, %g2, %g3 next->prev = new_block; prev->next = new_block; 200d8f0: 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; 200d8f4: d0 21 20 0c st %o0, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200d8f8: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200d8fc: c6 22 00 03 st %g3, [ %o0 + %g3 ] 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; 200d900: 10 80 00 13 b 200d94c <_Heap_Free+0x1c8> 200d904: c2 22 20 04 st %g1, [ %o0 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200d908: f0 22 20 0c st %i0, [ %o0 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200d90c: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200d910: d0 20 e0 0c st %o0, [ %g3 + 0xc ] 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; 200d914: 86 10 a0 01 or %g2, 1, %g3 200d918: c6 22 20 04 st %g3, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d91c: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200d920: c4 22 00 02 st %g2, [ %o0 + %g2 ] } 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; 200d924: 86 08 ff fe and %g3, -2, %g3 200d928: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200d92c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200d930: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 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; 200d934: 82 00 60 01 inc %g1 { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 200d938: d0 26 20 08 st %o0, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200d93c: 80 a0 c0 01 cmp %g3, %g1 200d940: 1a 80 00 03 bcc 200d94c <_Heap_Free+0x1c8> 200d944: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200d948: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200d94c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200d950: 82 00 7f ff add %g1, -1, %g1 200d954: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200d958: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200d95c: 82 00 60 01 inc %g1 200d960: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200d964: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200d968: 84 00 40 02 add %g1, %g2, %g2 200d96c: c4 26 20 30 st %g2, [ %i0 + 0x30 ] * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 200d970: 88 10 20 01 mov 1, %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200d974: b0 09 20 01 and %g4, 1, %i0 200d978: 81 c7 e0 08 ret 200d97c: 81 e8 00 00 restore =============================================================================== 0201214c <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 201214c: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; 2012150: 90 10 20 00 clr %o0 Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { Heap_Block *current = heap->first_block; 2012154: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 2012158: 10 80 00 0a b 2012180 <_Heap_Iterate+0x34> 201215c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); 2012160: 90 10 00 01 mov %g1, %o0 2012164: 92 0a 7f fe and %o1, -2, %o1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2012168: ba 00 40 09 add %g1, %o1, %i5 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; 201216c: d4 07 60 04 ld [ %i5 + 4 ], %o2 2012170: 96 10 00 1a mov %i2, %o3 2012174: 9f c6 40 00 call %i1 2012178: 94 0a a0 01 and %o2, 1, %o2 201217c: 82 10 00 1d mov %i5, %g1 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 2012180: 80 a0 40 1c cmp %g1, %i4 2012184: 02 80 00 05 be 2012198 <_Heap_Iterate+0x4c> 2012188: 90 1a 20 01 xor %o0, 1, %o0 201218c: 80 8a 20 ff btst 0xff, %o0 2012190: 32 bf ff f4 bne,a 2012160 <_Heap_Iterate+0x14> <== ALWAYS TAKEN 2012194: d2 00 60 04 ld [ %g1 + 4 ], %o1 2012198: 81 c7 e0 08 ret 201219c: 81 e8 00 00 restore =============================================================================== 0200daa8 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200daa8: 9d e3 bf a0 save %sp, -96, %sp RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200daac: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200dab0: 40 00 2c 26 call 2018b48 <.urem> 200dab4: 90 10 00 19 mov %i1, %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 200dab8: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200dabc: ba 06 7f f8 add %i1, -8, %i5 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200dac0: 90 27 40 08 sub %i5, %o0, %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; 200dac4: 80 a2 00 04 cmp %o0, %g4 200dac8: 0a 80 00 05 bcs 200dadc <_Heap_Size_of_alloc_area+0x34> 200dacc: 82 10 20 00 clr %g1 200dad0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200dad4: 80 a0 40 08 cmp %g1, %o0 200dad8: 82 60 3f ff subx %g0, -1, %g1 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 ) ) { 200dadc: 80 a0 60 00 cmp %g1, 0 200dae0: 02 80 00 15 be 200db34 <_Heap_Size_of_alloc_area+0x8c> 200dae4: 86 10 20 00 clr %g3 - 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; 200dae8: c2 02 20 04 ld [ %o0 + 4 ], %g1 200daec: 82 08 7f fe and %g1, -2, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200daf0: 82 02 00 01 add %o0, %g1, %g1 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; 200daf4: 80 a0 40 04 cmp %g1, %g4 200daf8: 0a 80 00 05 bcs 200db0c <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 200dafc: 84 10 20 00 clr %g2 200db00: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200db04: 80 a0 80 01 cmp %g2, %g1 200db08: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 200db0c: 80 a0 a0 00 cmp %g2, 0 200db10: 02 80 00 09 be 200db34 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200db14: 86 10 20 00 clr %g3 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; 200db18: c4 00 60 04 ld [ %g1 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200db1c: 80 88 a0 01 btst 1, %g2 200db20: 02 80 00 05 be 200db34 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200db24: 82 20 40 19 sub %g1, %i1, %g1 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200db28: 86 10 20 01 mov 1, %g3 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 200db2c: 82 00 60 04 add %g1, 4, %g1 200db30: c2 26 80 00 st %g1, [ %i2 ] return true; } 200db34: b0 08 e0 01 and %g3, 1, %i0 200db38: 81 c7 e0 08 ret 200db3c: 81 e8 00 00 restore =============================================================================== 020098d8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 20098d8: 9d e3 bf 80 save %sp, -128, %sp 20098dc: ac 10 00 19 mov %i1, %l6 uintptr_t const page_size = heap->page_size; 20098e0: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 20098e4: f6 06 20 14 ld [ %i0 + 0x14 ], %i3 Heap_Block *const first_block = heap->first_block; 20098e8: f2 06 20 20 ld [ %i0 + 0x20 ], %i1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 20098ec: 80 a6 a0 00 cmp %i2, 0 20098f0: 02 80 00 05 be 2009904 <_Heap_Walk+0x2c> 20098f4: e0 06 20 24 ld [ %i0 + 0x24 ], %l0 20098f8: 3b 00 80 26 sethi %hi(0x2009800), %i5 20098fc: 10 80 00 04 b 200990c <_Heap_Walk+0x34> 2009900: ba 17 60 88 or %i5, 0x88, %i5 ! 2009888 <_Heap_Walk_print> 2009904: 3b 00 80 26 sethi %hi(0x2009800), %i5 2009908: ba 17 60 80 or %i5, 0x80, %i5 ! 2009880 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 200990c: 05 00 80 80 sethi %hi(0x2020000), %g2 2009910: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 ! 2020010 <_System_state_Current> 2009914: 80 a0 a0 03 cmp %g2, 3 2009918: 22 80 00 04 be,a 2009928 <_Heap_Walk+0x50> 200991c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 return true; 2009920: 10 80 01 2a b 2009dc8 <_Heap_Walk+0x4f0> 2009924: b0 10 20 01 mov 1, %i0 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)( 2009928: da 06 20 18 ld [ %i0 + 0x18 ], %o5 200992c: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 2009930: f2 23 a0 60 st %i1, [ %sp + 0x60 ] 2009934: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 2009938: c4 06 20 08 ld [ %i0 + 8 ], %g2 200993c: 90 10 00 16 mov %l6, %o0 2009940: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2009944: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2009948: 92 10 20 00 clr %o1 200994c: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2009950: 15 00 80 72 sethi %hi(0x201c800), %o2 2009954: 96 10 00 1c mov %i4, %o3 2009958: 94 12 a0 f8 or %o2, 0xf8, %o2 200995c: 9f c7 40 00 call %i5 2009960: 98 10 00 1b mov %i3, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2009964: 80 a7 20 00 cmp %i4, 0 2009968: 12 80 00 07 bne 2009984 <_Heap_Walk+0xac> 200996c: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 2009970: 15 00 80 72 sethi %hi(0x201c800), %o2 2009974: 90 10 00 16 mov %l6, %o0 2009978: 92 10 20 01 mov 1, %o1 200997c: 10 80 00 37 b 2009a58 <_Heap_Walk+0x180> 2009980: 94 12 a1 90 or %o2, 0x190, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009984: 22 80 00 08 be,a 20099a4 <_Heap_Walk+0xcc> 2009988: 90 10 00 1b mov %i3, %o0 (*printer)( 200998c: 15 00 80 72 sethi %hi(0x201c800), %o2 2009990: 90 10 00 16 mov %l6, %o0 2009994: 92 10 20 01 mov 1, %o1 2009998: 94 12 a1 a8 or %o2, 0x1a8, %o2 200999c: 10 80 01 12 b 2009de4 <_Heap_Walk+0x50c> 20099a0: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20099a4: 7f ff e0 78 call 2001b84 <.urem> 20099a8: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20099ac: 80 a2 20 00 cmp %o0, 0 20099b0: 22 80 00 08 be,a 20099d0 <_Heap_Walk+0xf8> 20099b4: 90 06 60 08 add %i1, 8, %o0 (*printer)( 20099b8: 15 00 80 72 sethi %hi(0x201c800), %o2 20099bc: 90 10 00 16 mov %l6, %o0 20099c0: 92 10 20 01 mov 1, %o1 20099c4: 94 12 a1 c8 or %o2, 0x1c8, %o2 20099c8: 10 80 01 07 b 2009de4 <_Heap_Walk+0x50c> 20099cc: 96 10 00 1b mov %i3, %o3 20099d0: 7f ff e0 6d call 2001b84 <.urem> 20099d4: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 20099d8: 80 a2 20 00 cmp %o0, 0 20099dc: 22 80 00 07 be,a 20099f8 <_Heap_Walk+0x120> 20099e0: c4 06 60 04 ld [ %i1 + 4 ], %g2 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20099e4: 15 00 80 72 sethi %hi(0x201c800), %o2 20099e8: 90 10 00 16 mov %l6, %o0 20099ec: 92 10 20 01 mov 1, %o1 20099f0: 10 80 00 fc b 2009de0 <_Heap_Walk+0x508> 20099f4: 94 12 a1 f0 or %o2, 0x1f0, %o2 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 20099f8: 80 88 a0 01 btst 1, %g2 20099fc: 32 80 00 07 bne,a 2009a18 <_Heap_Walk+0x140> 2009a00: f4 04 20 04 ld [ %l0 + 4 ], %i2 (*printer)( 2009a04: 15 00 80 72 sethi %hi(0x201c800), %o2 2009a08: 90 10 00 16 mov %l6, %o0 2009a0c: 92 10 20 01 mov 1, %o1 2009a10: 10 80 00 12 b 2009a58 <_Heap_Walk+0x180> 2009a14: 94 12 a2 28 or %o2, 0x228, %o2 - 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; 2009a18: b4 0e bf fe and %i2, -2, %i2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2009a1c: b4 04 00 1a add %l0, %i2, %i2 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; 2009a20: c4 06 a0 04 ld [ %i2 + 4 ], %g2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2009a24: 80 88 a0 01 btst 1, %g2 2009a28: 12 80 00 07 bne 2009a44 <_Heap_Walk+0x16c> 2009a2c: 80 a6 80 19 cmp %i2, %i1 (*printer)( 2009a30: 15 00 80 72 sethi %hi(0x201c800), %o2 2009a34: 90 10 00 16 mov %l6, %o0 2009a38: 92 10 20 01 mov 1, %o1 2009a3c: 10 80 00 07 b 2009a58 <_Heap_Walk+0x180> 2009a40: 94 12 a2 58 or %o2, 0x258, %o2 ); return false; } if ( 2009a44: 02 80 00 0a be 2009a6c <_Heap_Walk+0x194> 2009a48: 15 00 80 72 sethi %hi(0x201c800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2009a4c: 90 10 00 16 mov %l6, %o0 2009a50: 92 10 20 01 mov 1, %o1 2009a54: 94 12 a2 70 or %o2, 0x270, %o2 2009a58: 9f c7 40 00 call %i5 2009a5c: b0 10 20 00 clr %i0 2009a60: b0 0e 20 ff and %i0, 0xff, %i0 2009a64: 81 c7 e0 08 ret 2009a68: 81 e8 00 00 restore int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2009a6c: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2009a70: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2009a74: 10 80 00 30 b 2009b34 <_Heap_Walk+0x25c> 2009a78: b2 10 00 18 mov %i0, %i1 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; 2009a7c: 80 a0 c0 0b cmp %g3, %o3 2009a80: 18 80 00 05 bgu 2009a94 <_Heap_Walk+0x1bc> 2009a84: 84 10 20 00 clr %g2 2009a88: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2009a8c: 80 a0 80 0b cmp %g2, %o3 2009a90: 84 60 3f ff subx %g0, -1, %g2 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 ) ) { 2009a94: 80 a0 a0 00 cmp %g2, 0 2009a98: 32 80 00 07 bne,a 2009ab4 <_Heap_Walk+0x1dc> 2009a9c: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 2009aa0: 15 00 80 72 sethi %hi(0x201c800), %o2 2009aa4: 90 10 00 16 mov %l6, %o0 2009aa8: 92 10 20 01 mov 1, %o1 2009aac: 10 80 00 ce b 2009de4 <_Heap_Walk+0x50c> 2009ab0: 94 12 a2 a0 or %o2, 0x2a0, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009ab4: d6 27 bf fc st %o3, [ %fp + -4 ] 2009ab8: 7f ff e0 33 call 2001b84 <.urem> 2009abc: 92 10 00 11 mov %l1, %o1 ); return false; } if ( 2009ac0: 80 a2 20 00 cmp %o0, 0 2009ac4: 02 80 00 07 be 2009ae0 <_Heap_Walk+0x208> 2009ac8: d6 07 bf fc ld [ %fp + -4 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2009acc: 15 00 80 72 sethi %hi(0x201c800), %o2 2009ad0: 90 10 00 16 mov %l6, %o0 2009ad4: 92 10 20 01 mov 1, %o1 2009ad8: 10 80 00 c3 b 2009de4 <_Heap_Walk+0x50c> 2009adc: 94 12 a2 c0 or %o2, 0x2c0, %o2 - 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; 2009ae0: c4 02 e0 04 ld [ %o3 + 4 ], %g2 2009ae4: 84 08 bf fe and %g2, -2, %g2 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; 2009ae8: 84 02 c0 02 add %o3, %g2, %g2 2009aec: c4 00 a0 04 ld [ %g2 + 4 ], %g2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2009af0: 80 88 a0 01 btst 1, %g2 2009af4: 22 80 00 07 be,a 2009b10 <_Heap_Walk+0x238> 2009af8: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2009afc: 15 00 80 72 sethi %hi(0x201c800), %o2 2009b00: 90 10 00 16 mov %l6, %o0 2009b04: 92 10 20 01 mov 1, %o1 2009b08: 10 80 00 b7 b 2009de4 <_Heap_Walk+0x50c> 2009b0c: 94 12 a2 f0 or %o2, 0x2f0, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2009b10: 80 a3 00 19 cmp %o4, %i1 2009b14: 02 80 00 07 be 2009b30 <_Heap_Walk+0x258> 2009b18: b2 10 00 0b mov %o3, %i1 (*printer)( 2009b1c: 15 00 80 72 sethi %hi(0x201c800), %o2 2009b20: 90 10 00 16 mov %l6, %o0 2009b24: 92 10 20 01 mov 1, %o1 2009b28: 10 80 00 4d b 2009c5c <_Heap_Walk+0x384> 2009b2c: 94 12 a3 10 or %o2, 0x310, %o2 return false; } prev_block = free_block; free_block = free_block->next; 2009b30: d6 02 e0 08 ld [ %o3 + 8 ], %o3 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 ) { 2009b34: 80 a2 c0 18 cmp %o3, %i0 2009b38: 32 bf ff d1 bne,a 2009a7c <_Heap_Walk+0x1a4> 2009b3c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 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)( 2009b40: 2b 00 80 73 sethi %hi(0x201cc00), %l5 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 ) { 2009b44: b2 10 00 1a mov %i2, %i1 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)( 2009b48: aa 15 60 10 or %l5, 0x10, %l5 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009b4c: 23 00 80 73 sethi %hi(0x201cc00), %l1 2009b50: 2f 00 80 72 sethi %hi(0x201c800), %l7 - 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; 2009b54: e4 06 60 04 ld [ %i1 + 4 ], %l2 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; 2009b58: d8 06 20 20 ld [ %i0 + 0x20 ], %o4 uintptr_t const block_begin = (uintptr_t) block; 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; bool const is_not_last_block = block != last_block; 2009b5c: 9e 1e 40 10 xor %i1, %l0, %o7 2009b60: 80 a0 00 0f cmp %g0, %o7 - 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; 2009b64: a8 0c bf fe and %l2, -2, %l4 2009b68: 9a 40 20 00 addx %g0, 0, %o5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2009b6c: a6 06 40 14 add %i1, %l4, %l3 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; 2009b70: a4 0c a0 01 and %l2, 1, %l2 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; 2009b74: 80 a3 00 13 cmp %o4, %l3 2009b78: 18 80 00 05 bgu 2009b8c <_Heap_Walk+0x2b4> <== NEVER TAKEN 2009b7c: 9e 10 20 00 clr %o7 2009b80: de 06 20 24 ld [ %i0 + 0x24 ], %o7 2009b84: 80 a3 c0 13 cmp %o7, %l3 2009b88: 9e 60 3f ff subx %g0, -1, %o7 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 2009b8c: 80 a3 e0 00 cmp %o7, 0 2009b90: 32 80 00 07 bne,a 2009bac <_Heap_Walk+0x2d4> 2009b94: da 27 bf f8 st %o5, [ %fp + -8 ] (*printer)( 2009b98: 15 00 80 72 sethi %hi(0x201c800), %o2 2009b9c: 90 10 00 16 mov %l6, %o0 2009ba0: 92 10 20 01 mov 1, %o1 2009ba4: 10 80 00 2c b 2009c54 <_Heap_Walk+0x37c> 2009ba8: 94 12 a3 48 or %o2, 0x348, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009bac: 90 10 00 14 mov %l4, %o0 2009bb0: 7f ff df f5 call 2001b84 <.urem> 2009bb4: 92 10 00 1c mov %i4, %o1 2009bb8: da 07 bf f8 ld [ %fp + -8 ], %o5 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 2009bbc: 80 a2 20 00 cmp %o0, 0 2009bc0: 02 80 00 0c be 2009bf0 <_Heap_Walk+0x318> 2009bc4: 9e 0b 60 ff and %o5, 0xff, %o7 2009bc8: 80 a3 e0 00 cmp %o7, 0 2009bcc: 02 80 00 19 be 2009c30 <_Heap_Walk+0x358> 2009bd0: 80 a6 40 13 cmp %i1, %l3 (*printer)( 2009bd4: 15 00 80 72 sethi %hi(0x201c800), %o2 2009bd8: 90 10 00 16 mov %l6, %o0 2009bdc: 92 10 20 01 mov 1, %o1 2009be0: 94 12 a3 78 or %o2, 0x378, %o2 2009be4: 96 10 00 19 mov %i1, %o3 2009be8: 10 80 00 1d b 2009c5c <_Heap_Walk+0x384> 2009bec: 98 10 00 14 mov %l4, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2009bf0: 80 a3 e0 00 cmp %o7, 0 2009bf4: 02 80 00 0f be 2009c30 <_Heap_Walk+0x358> 2009bf8: 80 a6 40 13 cmp %i1, %l3 2009bfc: 80 a5 00 1b cmp %l4, %i3 2009c00: 1a 80 00 0c bcc 2009c30 <_Heap_Walk+0x358> 2009c04: 80 a6 40 13 cmp %i1, %l3 (*printer)( 2009c08: 90 10 00 16 mov %l6, %o0 2009c0c: 92 10 20 01 mov 1, %o1 2009c10: 15 00 80 72 sethi %hi(0x201c800), %o2 2009c14: 96 10 00 19 mov %i1, %o3 2009c18: 94 12 a3 a8 or %o2, 0x3a8, %o2 2009c1c: 98 10 00 14 mov %l4, %o4 2009c20: 9f c7 40 00 call %i5 2009c24: 9a 10 00 1b mov %i3, %o5 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2009c28: 10 80 00 68 b 2009dc8 <_Heap_Walk+0x4f0> 2009c2c: b0 10 20 00 clr %i0 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2009c30: 2a 80 00 10 bcs,a 2009c70 <_Heap_Walk+0x398> 2009c34: de 04 e0 04 ld [ %l3 + 4 ], %o7 2009c38: 80 8b 60 ff btst 0xff, %o5 2009c3c: 22 80 00 0d be,a 2009c70 <_Heap_Walk+0x398> 2009c40: de 04 e0 04 ld [ %l3 + 4 ], %o7 (*printer)( 2009c44: 15 00 80 72 sethi %hi(0x201c800), %o2 2009c48: 90 10 00 16 mov %l6, %o0 2009c4c: 92 10 20 01 mov 1, %o1 2009c50: 94 12 a3 d8 or %o2, 0x3d8, %o2 2009c54: 96 10 00 19 mov %i1, %o3 2009c58: 98 10 00 13 mov %l3, %o4 2009c5c: 9f c7 40 00 call %i5 2009c60: b0 10 20 00 clr %i0 2009c64: b0 0e 20 ff and %i0, 0xff, %i0 2009c68: 81 c7 e0 08 ret 2009c6c: 81 e8 00 00 restore ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2009c70: 80 8b e0 01 btst 1, %o7 2009c74: 12 80 00 3f bne 2009d70 <_Heap_Walk+0x498> 2009c78: 90 10 00 16 mov %l6, %o0 false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 2009c7c: da 06 60 0c ld [ %i1 + 0xc ], %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)( 2009c80: d8 06 20 08 ld [ %i0 + 8 ], %o4 2009c84: 80 a3 40 0c cmp %o5, %o4 2009c88: 02 80 00 08 be 2009ca8 <_Heap_Walk+0x3d0> 2009c8c: de 06 20 0c ld [ %i0 + 0xc ], %o7 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2009c90: 80 a3 40 18 cmp %o5, %i0 2009c94: 12 80 00 07 bne 2009cb0 <_Heap_Walk+0x3d8> 2009c98: 96 14 60 80 or %l1, 0x80, %o3 2009c9c: 17 00 80 72 sethi %hi(0x201c800), %o3 2009ca0: 10 80 00 04 b 2009cb0 <_Heap_Walk+0x3d8> 2009ca4: 96 12 e0 c8 or %o3, 0xc8, %o3 ! 201c8c8 <__log2table+0x130> 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)( 2009ca8: 03 00 80 72 sethi %hi(0x201c800), %g1 2009cac: 96 10 60 b8 or %g1, 0xb8, %o3 ! 201c8b8 <__log2table+0x120> block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 2009cb0: d8 06 60 08 ld [ %i1 + 8 ], %o4 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)( 2009cb4: 80 a3 00 0f cmp %o4, %o7 2009cb8: 02 80 00 06 be 2009cd0 <_Heap_Walk+0x3f8> 2009cbc: 80 a3 00 18 cmp %o4, %i0 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009cc0: 12 80 00 06 bne 2009cd8 <_Heap_Walk+0x400> 2009cc4: 9e 14 60 80 or %l1, 0x80, %o7 2009cc8: 10 80 00 04 b 2009cd8 <_Heap_Walk+0x400> 2009ccc: 9e 15 e0 e8 or %l7, 0xe8, %o7 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)( 2009cd0: 03 00 80 72 sethi %hi(0x201c800), %g1 2009cd4: 9e 10 60 d8 or %g1, 0xd8, %o7 ! 201c8d8 <__log2table+0x140> 2009cd8: d6 23 a0 5c st %o3, [ %sp + 0x5c ] 2009cdc: d8 23 a0 60 st %o4, [ %sp + 0x60 ] 2009ce0: de 23 a0 64 st %o7, [ %sp + 0x64 ] 2009ce4: 90 10 00 16 mov %l6, %o0 2009ce8: 92 10 20 00 clr %o1 2009cec: 94 10 00 15 mov %l5, %o2 2009cf0: 96 10 00 19 mov %i1, %o3 2009cf4: 9f c7 40 00 call %i5 2009cf8: 98 10 00 14 mov %l4, %o4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2009cfc: da 04 c0 00 ld [ %l3 ], %o5 2009d00: 80 a5 00 0d cmp %l4, %o5 2009d04: 02 80 00 0c be 2009d34 <_Heap_Walk+0x45c> 2009d08: 80 a4 a0 00 cmp %l2, 0 (*printer)( 2009d0c: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2009d10: 90 10 00 16 mov %l6, %o0 2009d14: 92 10 20 01 mov 1, %o1 2009d18: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009d1c: 96 10 00 19 mov %i1, %o3 2009d20: 94 12 a0 48 or %o2, 0x48, %o2 2009d24: 9f c7 40 00 call %i5 2009d28: 98 10 00 14 mov %l4, %o4 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2009d2c: 10 bf ff ce b 2009c64 <_Heap_Walk+0x38c> 2009d30: b0 10 20 00 clr %i0 ); return false; } if ( !prev_used ) { 2009d34: 32 80 00 0a bne,a 2009d5c <_Heap_Walk+0x484> 2009d38: c6 06 20 08 ld [ %i0 + 8 ], %g3 (*printer)( 2009d3c: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009d40: 90 10 00 16 mov %l6, %o0 2009d44: 92 10 20 01 mov 1, %o1 2009d48: 10 80 00 26 b 2009de0 <_Heap_Walk+0x508> 2009d4c: 94 12 a0 88 or %o2, 0x88, %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 ) { 2009d50: 22 80 00 19 be,a 2009db4 <_Heap_Walk+0x4dc> 2009d54: b2 10 00 13 mov %l3, %i1 return true; } free_block = free_block->next; 2009d58: c6 00 e0 08 ld [ %g3 + 8 ], %g3 ) { 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 ) { 2009d5c: 80 a0 c0 18 cmp %g3, %i0 2009d60: 12 bf ff fc bne 2009d50 <_Heap_Walk+0x478> 2009d64: 80 a0 c0 19 cmp %g3, %i1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009d68: 10 80 00 1b b 2009dd4 <_Heap_Walk+0x4fc> 2009d6c: 15 00 80 73 sethi %hi(0x201cc00), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2009d70: 80 a4 a0 00 cmp %l2, 0 2009d74: 02 80 00 09 be 2009d98 <_Heap_Walk+0x4c0> 2009d78: 92 10 20 00 clr %o1 (*printer)( 2009d7c: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009d80: 96 10 00 19 mov %i1, %o3 2009d84: 94 12 a0 b8 or %o2, 0xb8, %o2 2009d88: 9f c7 40 00 call %i5 2009d8c: 98 10 00 14 mov %l4, %o4 2009d90: 10 80 00 09 b 2009db4 <_Heap_Walk+0x4dc> 2009d94: b2 10 00 13 mov %l3, %i1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009d98: da 06 40 00 ld [ %i1 ], %o5 2009d9c: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009da0: 96 10 00 19 mov %i1, %o3 2009da4: 94 12 a0 d0 or %o2, 0xd0, %o2 2009da8: 9f c7 40 00 call %i5 2009dac: 98 10 00 14 mov %l4, %o4 2009db0: b2 10 00 13 mov %l3, %i1 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009db4: 80 a4 c0 1a cmp %l3, %i2 2009db8: 32 bf ff 68 bne,a 2009b58 <_Heap_Walk+0x280> 2009dbc: e4 06 60 04 ld [ %i1 + 4 ], %l2 2009dc0: 10 80 00 02 b 2009dc8 <_Heap_Walk+0x4f0> 2009dc4: b0 10 20 01 mov 1, %i0 2009dc8: b0 0e 20 ff and %i0, 0xff, %i0 2009dcc: 81 c7 e0 08 ret 2009dd0: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009dd4: 90 10 00 16 mov %l6, %o0 2009dd8: 92 10 20 01 mov 1, %o1 2009ddc: 94 12 a0 f8 or %o2, 0xf8, %o2 2009de0: 96 10 00 19 mov %i1, %o3 2009de4: 9f c7 40 00 call %i5 2009de8: b0 10 20 00 clr %i0 2009dec: b0 0e 20 ff and %i0, 0xff, %i0 2009df0: 81 c7 e0 08 ret 2009df4: 81 e8 00 00 restore =============================================================================== 02008d7c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008d7c: 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 ) 2008d80: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008d84: 80 a0 60 00 cmp %g1, 0 2008d88: 12 80 00 04 bne 2008d98 <_Objects_Allocate+0x1c> <== ALWAYS TAKEN 2008d8c: ba 10 00 18 mov %i0, %i5 return NULL; 2008d90: 81 c7 e0 08 ret 2008d94: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 2008d98: b8 06 20 20 add %i0, 0x20, %i4 2008d9c: 7f ff fd 83 call 20083a8 <_Chain_Get> 2008da0: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2008da4: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2008da8: 80 a0 60 00 cmp %g1, 0 2008dac: 02 80 00 1d be 2008e20 <_Objects_Allocate+0xa4> 2008db0: 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 ) { 2008db4: 80 a2 20 00 cmp %o0, 0 2008db8: 32 80 00 0a bne,a 2008de0 <_Objects_Allocate+0x64> 2008dbc: c4 07 60 08 ld [ %i5 + 8 ], %g2 _Objects_Extend_information( information ); 2008dc0: 40 00 00 21 call 2008e44 <_Objects_Extend_information> 2008dc4: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008dc8: 7f ff fd 78 call 20083a8 <_Chain_Get> 2008dcc: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2008dd0: b0 92 20 00 orcc %o0, 0, %i0 2008dd4: 02 bf ff ef be 2008d90 <_Objects_Allocate+0x14> 2008dd8: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008ddc: c4 07 60 08 ld [ %i5 + 8 ], %g2 2008de0: d0 06 20 08 ld [ %i0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008de4: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008de8: 03 00 00 3f sethi %hi(0xfc00), %g1 2008dec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2008df0: 90 0a 00 01 and %o0, %g1, %o0 2008df4: 82 08 80 01 and %g2, %g1, %g1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008df8: 40 00 3e a8 call 2018898 <.udiv> 2008dfc: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2008e00: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2008e04: 91 2a 20 02 sll %o0, 2, %o0 2008e08: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2008e0c: 84 00 bf ff add %g2, -1, %g2 2008e10: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2008e14: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 2008e18: 82 00 7f ff add %g1, -1, %g1 2008e1c: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2008e20: 81 c7 e0 08 ret 2008e24: 81 e8 00 00 restore =============================================================================== 0200918c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 200918c: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2009190: 80 a6 60 00 cmp %i1, 0 2009194: 12 80 00 04 bne 20091a4 <_Objects_Get_information+0x18> 2009198: 01 00 00 00 nop return NULL; 200919c: 81 c7 e0 08 ret 20091a0: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 20091a4: 40 00 12 67 call 200db40 <_Objects_API_maximum_class> 20091a8: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 20091ac: 80 a2 20 00 cmp %o0, 0 20091b0: 02 bf ff fb be 200919c <_Objects_Get_information+0x10> 20091b4: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 20091b8: 18 bf ff f9 bgu 200919c <_Objects_Get_information+0x10> 20091bc: 03 00 80 76 sethi %hi(0x201d800), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 20091c0: b1 2e 20 02 sll %i0, 2, %i0 20091c4: 82 10 62 54 or %g1, 0x254, %g1 20091c8: c2 00 40 18 ld [ %g1 + %i0 ], %g1 20091cc: 80 a0 60 00 cmp %g1, 0 20091d0: 02 bf ff f3 be 200919c <_Objects_Get_information+0x10> <== NEVER TAKEN 20091d4: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20091d8: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 20091dc: 80 a6 20 00 cmp %i0, 0 20091e0: 02 bf ff ef be 200919c <_Objects_Get_information+0x10> <== NEVER TAKEN 20091e4: 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 ) 20091e8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20091ec: 80 a0 60 00 cmp %g1, 0 20091f0: 02 bf ff eb be 200919c <_Objects_Get_information+0x10> 20091f4: 01 00 00 00 nop return NULL; #endif return info; } 20091f8: 81 c7 e0 08 ret 20091fc: 81 e8 00 00 restore =============================================================================== 0201b510 <_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; 201b510: c2 02 20 08 ld [ %o0 + 8 ], %g1 201b514: 92 22 40 01 sub %o1, %g1, %o1 if ( information->maximum >= index ) { 201b518: 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; 201b51c: 92 02 60 01 inc %o1 if ( information->maximum >= index ) { 201b520: 80 a0 40 09 cmp %g1, %o1 201b524: 0a 80 00 09 bcs 201b548 <_Objects_Get_no_protection+0x38> 201b528: 93 2a 60 02 sll %o1, 2, %o1 if ( (the_object = information->local_table[ index ]) != NULL ) { 201b52c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 201b530: d0 00 40 09 ld [ %g1 + %o1 ], %o0 201b534: 80 a2 20 00 cmp %o0, 0 201b538: 02 80 00 05 be 201b54c <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 201b53c: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 201b540: 81 c3 e0 08 retl 201b544: 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; 201b548: 82 10 20 01 mov 1, %g1 return NULL; 201b54c: 90 10 20 00 clr %o0 } 201b550: 81 c3 e0 08 retl 201b554: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 0200d290 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200d290: 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; 200d294: 80 a6 20 00 cmp %i0, 0 200d298: 12 80 00 06 bne 200d2b0 <_Objects_Id_to_name+0x20> 200d29c: 83 36 20 18 srl %i0, 0x18, %g1 200d2a0: 03 00 80 b8 sethi %hi(0x202e000), %g1 200d2a4: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 202e2fc <_Per_CPU_Information+0xc> 200d2a8: f0 00 60 08 ld [ %g1 + 8 ], %i0 200d2ac: 83 36 20 18 srl %i0, 0x18, %g1 200d2b0: 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 ) 200d2b4: 84 00 7f ff add %g1, -1, %g2 200d2b8: 80 a0 a0 02 cmp %g2, 2 200d2bc: 08 80 00 18 bleu 200d31c <_Objects_Id_to_name+0x8c> 200d2c0: 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; 200d2c4: 81 c7 e0 08 ret 200d2c8: 91 e8 20 03 restore %g0, 3, %o0 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 200d2cc: 85 28 a0 02 sll %g2, 2, %g2 200d2d0: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200d2d4: 80 a2 20 00 cmp %o0, 0 200d2d8: 02 bf ff fb be 200d2c4 <_Objects_Id_to_name+0x34> <== NEVER TAKEN 200d2dc: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 200d2e0: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 200d2e4: 80 a0 60 00 cmp %g1, 0 200d2e8: 12 bf ff f7 bne 200d2c4 <_Objects_Id_to_name+0x34> <== NEVER TAKEN 200d2ec: 92 10 00 18 mov %i0, %o1 return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 200d2f0: 7f ff ff ca call 200d218 <_Objects_Get> 200d2f4: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200d2f8: 80 a2 20 00 cmp %o0, 0 200d2fc: 02 bf ff f2 be 200d2c4 <_Objects_Id_to_name+0x34> 200d300: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200d304: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200d308: b0 10 20 00 clr %i0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 200d30c: 40 00 03 c3 call 200e218 <_Thread_Enable_dispatch> 200d310: c2 26 40 00 st %g1, [ %i1 ] 200d314: 81 c7 e0 08 ret 200d318: 81 e8 00 00 restore the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 200d31c: 05 00 80 b7 sethi %hi(0x202dc00), %g2 200d320: 84 10 a0 e4 or %g2, 0xe4, %g2 ! 202dce4 <_Objects_Information_table> 200d324: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d328: 80 a0 60 00 cmp %g1, 0 200d32c: 12 bf ff e8 bne 200d2cc <_Objects_Id_to_name+0x3c> 200d330: 85 36 20 1b srl %i0, 0x1b, %g2 200d334: 30 bf ff e4 b,a 200d2c4 <_Objects_Id_to_name+0x34> =============================================================================== 0200f0c4 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200f0c4: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 200f0c8: c2 06 20 08 ld [ %i0 + 8 ], %g1 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 200f0cc: 39 00 00 3f sethi %hi(0xfc00), %i4 200f0d0: b5 30 60 18 srl %g1, 0x18, %i2 200f0d4: b8 17 23 ff or %i4, 0x3ff, %i4 200f0d8: b4 0e a0 07 and %i2, 7, %i2 200f0dc: b8 08 40 1c and %g1, %i4, %i4 200f0e0: b4 06 a0 04 add %i2, 4, %i2 200f0e4: b9 2f 20 02 sll %i4, 2, %i4 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200f0e8: 37 00 80 77 sethi %hi(0x201dc00), %i3 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 200f0ec: b5 2e a0 02 sll %i2, 2, %i2 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200f0f0: 82 16 e2 f8 or %i3, 0x2f8, %g1 done = true; for ( index = 1 ; index <= max ; ++index ) { 200f0f4: ba 10 20 01 mov 1, %i5 */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 200f0f8: 84 10 20 01 mov 1, %g2 for ( index = 1 ; index <= max ; ++index ) { 200f0fc: 10 80 00 18 b 200f15c <_POSIX_Keys_Run_destructors+0x98> 200f100: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 200f104: 86 16 e2 f8 or %i3, 0x2f8, %g3 Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200f108: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 200f10c: 83 28 60 02 sll %g1, 2, %g1 200f110: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 200f114: 80 a0 60 00 cmp %g1, 0 200f118: 22 80 00 11 be,a 200f15c <_POSIX_Keys_Run_destructors+0x98> 200f11c: ba 07 60 01 inc %i5 200f120: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200f124: 80 a0 e0 00 cmp %g3, 0 200f128: 02 80 00 0c be 200f158 <_POSIX_Keys_Run_destructors+0x94> 200f12c: 86 00 40 1a add %g1, %i2, %g3 void *value = key->Values [ thread_api ][ thread_index ]; 200f130: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200f134: d0 00 c0 1c ld [ %g3 + %i4 ], %o0 if ( value != NULL ) { 200f138: 80 a2 20 00 cmp %o0, 0 200f13c: 22 80 00 08 be,a 200f15c <_POSIX_Keys_Run_destructors+0x98><== ALWAYS TAKEN 200f140: ba 07 60 01 inc %i5 key->Values [ thread_api ][ thread_index ] = NULL; 200f144: c0 20 c0 1c clr [ %g3 + %i4 ] <== NOT EXECUTED (*key->destructor)( value ); 200f148: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200f14c: 9f c0 40 00 call %g1 <== NOT EXECUTED 200f150: 01 00 00 00 nop <== NOT EXECUTED done = false; 200f154: 84 10 20 00 clr %g2 ! 0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 200f158: ba 07 60 01 inc %i5 200f15c: 83 2f 60 10 sll %i5, 0x10, %g1 200f160: 83 30 60 10 srl %g1, 0x10, %g1 200f164: 80 a0 40 19 cmp %g1, %i1 200f168: 08 bf ff e7 bleu 200f104 <_POSIX_Keys_Run_destructors+0x40> 200f16c: 80 88 a0 ff btst 0xff, %g2 * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 200f170: 02 bf ff e1 be 200f0f4 <_POSIX_Keys_Run_destructors+0x30> <== NEVER TAKEN 200f174: 82 16 e2 f8 or %i3, 0x2f8, %g1 done = false; } } } } } 200f178: 81 c7 e0 08 ret 200f17c: 81 e8 00 00 restore =============================================================================== 0200ca64 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200ca64: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 200ca68: 11 00 80 ab sethi %hi(0x202ac00), %o0 200ca6c: 92 10 00 18 mov %i0, %o1 200ca70: 90 12 21 3c or %o0, 0x13c, %o0 200ca74: 40 00 0c bc call 200fd64 <_Objects_Get> 200ca78: 94 07 bf f8 add %fp, -8, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200ca7c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ca80: 80 a0 60 00 cmp %g1, 0 200ca84: 12 80 00 40 bne 200cb84 <_POSIX_Message_queue_Receive_support+0x120> 200ca88: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200ca8c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200ca90: 84 08 60 03 and %g1, 3, %g2 200ca94: 80 a0 a0 01 cmp %g2, 1 200ca98: 32 80 00 05 bne,a 200caac <_POSIX_Message_queue_Receive_support+0x48> 200ca9c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 _Thread_Enable_dispatch(); 200caa0: 40 00 10 83 call 2010cac <_Thread_Enable_dispatch> 200caa4: 01 00 00 00 nop 200caa8: 30 80 00 37 b,a 200cb84 <_POSIX_Message_queue_Receive_support+0x120> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200caac: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200cab0: 80 a6 80 02 cmp %i2, %g2 200cab4: 1a 80 00 08 bcc 200cad4 <_POSIX_Message_queue_Receive_support+0x70> 200cab8: 84 10 3f ff mov -1, %g2 _Thread_Enable_dispatch(); 200cabc: 40 00 10 7c call 2010cac <_Thread_Enable_dispatch> 200cac0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200cac4: 40 00 28 7f call 2016cc0 <__errno> 200cac8: 01 00 00 00 nop 200cacc: 10 80 00 31 b 200cb90 <_POSIX_Message_queue_Receive_support+0x12c> 200cad0: 82 10 20 7a mov 0x7a, %g1 ! 7a /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200cad4: c4 27 bf fc st %g2, [ %fp + -4 ] /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200cad8: 80 a7 20 00 cmp %i4, 0 200cadc: 02 80 00 05 be 200caf0 <_POSIX_Message_queue_Receive_support+0x8c> 200cae0: 98 10 20 00 clr %o4 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 200cae4: 99 30 60 0e srl %g1, 0xe, %o4 200cae8: 98 1b 20 01 xor %o4, 1, %o4 200caec: 98 0b 20 01 and %o4, 1, %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200caf0: 90 02 20 1c add %o0, 0x1c, %o0 200caf4: 92 10 00 18 mov %i0, %o1 200caf8: 94 10 00 19 mov %i1, %o2 200cafc: 96 07 bf fc add %fp, -4, %o3 200cb00: 98 0b 20 01 and %o4, 1, %o4 200cb04: 40 00 08 6d call 200ecb8 <_CORE_message_queue_Seize> 200cb08: 9a 10 00 1d mov %i5, %o5 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200cb0c: 40 00 10 68 call 2010cac <_Thread_Enable_dispatch> 200cb10: 01 00 00 00 nop if (msg_prio) { 200cb14: 80 a6 e0 00 cmp %i3, 0 200cb18: 02 80 00 08 be 200cb38 <_POSIX_Message_queue_Receive_support+0xd4><== NEVER TAKEN 200cb1c: 03 00 80 ab sethi %hi(0x202ac00), %g1 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200cb20: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 202adbc <_Per_CPU_Information+0xc> RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); 200cb24: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 200cb28: 83 38 a0 1f sra %g2, 0x1f, %g1 200cb2c: 84 18 40 02 xor %g1, %g2, %g2 200cb30: 82 20 80 01 sub %g2, %g1, %g1 timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 200cb34: c2 26 c0 00 st %g1, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200cb38: 3b 00 80 ab sethi %hi(0x202ac00), %i5 200cb3c: ba 17 61 b0 or %i5, 0x1b0, %i5 ! 202adb0 <_Per_CPU_Information> 200cb40: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cb44: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200cb48: 80 a0 60 00 cmp %g1, 0 200cb4c: 12 80 00 05 bne 200cb60 <_POSIX_Message_queue_Receive_support+0xfc> 200cb50: 01 00 00 00 nop return length_out; 200cb54: f0 07 bf fc ld [ %fp + -4 ], %i0 200cb58: 81 c7 e0 08 ret 200cb5c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( 200cb60: 40 00 28 58 call 2016cc0 <__errno> 200cb64: b0 10 3f ff mov -1, %i0 200cb68: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cb6c: b8 10 00 08 mov %o0, %i4 200cb70: 40 00 00 96 call 200cdc8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200cb74: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200cb78: d0 27 00 00 st %o0, [ %i4 ] 200cb7c: 81 c7 e0 08 ret 200cb80: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200cb84: 40 00 28 4f call 2016cc0 <__errno> 200cb88: 01 00 00 00 nop 200cb8c: 82 10 20 09 mov 9, %g1 ! 9 200cb90: c2 22 00 00 st %g1, [ %o0 ] 200cb94: b0 10 3f ff mov -1, %i0 } 200cb98: 81 c7 e0 08 ret 200cb9c: 81 e8 00 00 restore =============================================================================== 0200ee20 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200ee20: 9d e3 bf a0 save %sp, -96, %sp POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 200ee24: 80 a6 a0 00 cmp %i2, 0 200ee28: 22 80 00 06 be,a 200ee40 <_POSIX_Semaphore_Create_support+0x20> 200ee2c: 03 00 80 89 sethi %hi(0x2022400), %g1 rtems_set_errno_and_return_minus_one( ENOSYS ); 200ee30: 40 00 0a d2 call 2011978 <__errno> 200ee34: 01 00 00 00 nop 200ee38: 10 80 00 11 b 200ee7c <_POSIX_Semaphore_Create_support+0x5c> 200ee3c: 82 10 20 58 mov 0x58, %g1 ! 58 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200ee40: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 200ee44: 84 00 a0 01 inc %g2 200ee48: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ] return _Thread_Dispatch_disable_level; 200ee4c: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200ee50: 21 00 80 8a sethi %hi(0x2022800), %l0 200ee54: 7f ff ee ee call 200aa0c <_Objects_Allocate> 200ee58: 90 14 20 e0 or %l0, 0xe0, %o0 ! 20228e0 <_POSIX_Semaphore_Information> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200ee5c: ba 92 20 00 orcc %o0, 0, %i5 200ee60: 12 80 00 0a bne 200ee88 <_POSIX_Semaphore_Create_support+0x68> 200ee64: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200ee68: 7f ff f4 0c call 200be98 <_Thread_Enable_dispatch> 200ee6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 200ee70: 40 00 0a c2 call 2011978 <__errno> 200ee74: 01 00 00 00 nop 200ee78: 82 10 20 1c mov 0x1c, %g1 ! 1c 200ee7c: c2 22 00 00 st %g1, [ %o0 ] 200ee80: 81 c7 e0 08 ret 200ee84: 91 e8 3f ff restore %g0, -1, %o0 /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { 200ee88: 02 80 00 10 be 200eec8 <_POSIX_Semaphore_Create_support+0xa8> 200ee8c: 90 10 00 18 mov %i0, %o0 name = _Workspace_String_duplicate( name_arg, name_len ); 200ee90: 40 00 04 78 call 2010070 <_Workspace_String_duplicate> 200ee94: 92 10 00 19 mov %i1, %o1 if ( !name ) { 200ee98: b4 92 20 00 orcc %o0, 0, %i2 200ee9c: 12 80 00 0d bne 200eed0 <_POSIX_Semaphore_Create_support+0xb0><== ALWAYS TAKEN 200eea0: 80 a6 a0 00 cmp %i2, 0 RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 200eea4: 90 14 20 e0 or %l0, 0xe0, %o0 <== NOT EXECUTED 200eea8: 7f ff ef b0 call 200ad68 <_Objects_Free> <== NOT EXECUTED 200eeac: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200eeb0: 7f ff f3 fa call 200be98 <_Thread_Enable_dispatch> <== NOT EXECUTED 200eeb4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 200eeb8: 40 00 0a b0 call 2011978 <__errno> <== NOT EXECUTED 200eebc: 01 00 00 00 nop <== NOT EXECUTED 200eec0: 10 bf ff ef b 200ee7c <_POSIX_Semaphore_Create_support+0x5c><== NOT EXECUTED 200eec4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } } else { name = NULL; 200eec8: b4 10 20 00 clr %i2 } the_semaphore->process_shared = pshared; if ( name ) { 200eecc: 80 a6 a0 00 cmp %i2, 0 200eed0: 02 80 00 08 be 200eef0 <_POSIX_Semaphore_Create_support+0xd0> 200eed4: c0 27 60 10 clr [ %i5 + 0x10 ] the_semaphore->named = true; 200eed8: 82 10 20 01 mov 1, %g1 200eedc: c2 2f 60 14 stb %g1, [ %i5 + 0x14 ] the_semaphore->open_count = 1; 200eee0: 82 10 20 01 mov 1, %g1 200eee4: c2 27 60 18 st %g1, [ %i5 + 0x18 ] the_semaphore->linked = true; 200eee8: 10 80 00 05 b 200eefc <_POSIX_Semaphore_Create_support+0xdc> 200eeec: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ] } else { the_semaphore->named = false; 200eef0: c0 2f 60 14 clrb [ %i5 + 0x14 ] the_semaphore->open_count = 0; 200eef4: c0 27 60 18 clr [ %i5 + 0x18 ] the_semaphore->linked = false; 200eef8: c0 2f 60 15 clrb [ %i5 + 0x15 ] the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200eefc: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200ef00: 90 07 60 1c add %i5, 0x1c, %o0 the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200ef04: c2 27 60 5c st %g1, [ %i5 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200ef08: 92 07 60 5c add %i5, 0x5c, %o1 200ef0c: 94 10 00 1b mov %i3, %o2 200ef10: 7f ff ed 33 call 200a3dc <_CORE_semaphore_Initialize> 200ef14: c0 27 60 60 clr [ %i5 + 0x60 ] Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 200ef18: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ef1c: 05 00 80 8a sethi %hi(0x2022800), %g2 200ef20: c4 00 a0 fc ld [ %g2 + 0xfc ], %g2 ! 20228fc <_POSIX_Semaphore_Information+0x1c> 200ef24: 83 28 60 02 sll %g1, 2, %g1 200ef28: fa 20 80 01 st %i5, [ %g2 + %g1 ] the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 200ef2c: f4 27 60 0c st %i2, [ %i5 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 200ef30: fa 27 00 00 st %i5, [ %i4 ] _Thread_Enable_dispatch(); 200ef34: 7f ff f3 d9 call 200be98 <_Thread_Enable_dispatch> 200ef38: b0 10 20 00 clr %i0 return 0; } 200ef3c: 81 c7 e0 08 ret 200ef40: 81 e8 00 00 restore =============================================================================== 0200c8d8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200c8d8: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200c8dc: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200c8e0: 80 a0 a0 00 cmp %g2, 0 200c8e4: 12 80 00 13 bne 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58><== NEVER TAKEN 200c8e8: 01 00 00 00 nop 200c8ec: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200c8f0: 80 a0 a0 01 cmp %g2, 1 200c8f4: 12 80 00 0f bne 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200c8f8: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200c8fc: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 200c900: 80 a0 60 00 cmp %g1, 0 200c904: 02 80 00 0b be 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200c908: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200c90c: 03 00 80 77 sethi %hi(0x201dc00), %g1 200c910: c4 00 63 50 ld [ %g1 + 0x350 ], %g2 ! 201df50 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200c914: 92 10 3f ff mov -1, %o1 200c918: 84 00 bf ff add %g2, -1, %g2 200c91c: c4 20 63 50 st %g2, [ %g1 + 0x350 ] return _Thread_Dispatch_disable_level; 200c920: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 200c924: 82 13 c0 00 mov %o7, %g1 200c928: 40 00 01 b5 call 200cffc <_POSIX_Thread_Exit> 200c92c: 9e 10 40 00 mov %g1, %o7 } else _Thread_Enable_dispatch(); 200c930: 82 13 c0 00 mov %o7, %g1 200c934: 7f ff f6 58 call 200a294 <_Thread_Enable_dispatch> 200c938: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200dc80 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200dc80: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200dc84: 7f ff ff f4 call 200dc54 <_POSIX_Priority_Is_valid> 200dc88: d0 06 40 00 ld [ %i1 ], %o0 200dc8c: 80 8a 20 ff btst 0xff, %o0 200dc90: 32 80 00 04 bne,a 200dca0 <_POSIX_Thread_Translate_sched_param+0x20><== ALWAYS TAKEN 200dc94: c0 26 80 00 clr [ %i2 ] return EINVAL; 200dc98: 81 c7 e0 08 ret 200dc9c: 91 e8 20 16 restore %g0, 0x16, %o0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200dca0: 80 a6 20 00 cmp %i0, 0 200dca4: 12 80 00 06 bne 200dcbc <_POSIX_Thread_Translate_sched_param+0x3c> 200dca8: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200dcac: 82 10 20 01 mov 1, %g1 200dcb0: c2 26 80 00 st %g1, [ %i2 ] return 0; 200dcb4: 81 c7 e0 08 ret 200dcb8: 81 e8 00 00 restore } if ( policy == SCHED_FIFO ) { 200dcbc: 80 a6 20 01 cmp %i0, 1 200dcc0: 02 80 00 29 be 200dd64 <_POSIX_Thread_Translate_sched_param+0xe4> 200dcc4: 80 a6 20 02 cmp %i0, 2 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200dcc8: 12 80 00 04 bne 200dcd8 <_POSIX_Thread_Translate_sched_param+0x58> 200dccc: 80 a6 20 04 cmp %i0, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200dcd0: 10 80 00 25 b 200dd64 <_POSIX_Thread_Translate_sched_param+0xe4> 200dcd4: f0 26 80 00 st %i0, [ %i2 ] return 0; } if ( policy == SCHED_SPORADIC ) { 200dcd8: 12 bf ff f0 bne 200dc98 <_POSIX_Thread_Translate_sched_param+0x18> 200dcdc: 01 00 00 00 nop if ( (param->sched_ss_repl_period.tv_sec == 0) && 200dce0: c2 06 60 08 ld [ %i1 + 8 ], %g1 200dce4: 80 a0 60 00 cmp %g1, 0 200dce8: 32 80 00 07 bne,a 200dd04 <_POSIX_Thread_Translate_sched_param+0x84> 200dcec: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dcf0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200dcf4: 80 a0 60 00 cmp %g1, 0 200dcf8: 02 bf ff e8 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18> 200dcfc: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200dd00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dd04: 80 a0 60 00 cmp %g1, 0 200dd08: 12 80 00 06 bne 200dd20 <_POSIX_Thread_Translate_sched_param+0xa0> 200dd0c: 01 00 00 00 nop 200dd10: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200dd14: 80 a0 60 00 cmp %g1, 0 200dd18: 02 bf ff e0 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18> 200dd1c: 01 00 00 00 nop (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200dd20: 7f ff f7 6d call 200bad4 <_Timespec_To_ticks> 200dd24: 90 06 60 08 add %i1, 8, %o0 200dd28: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200dd2c: 7f ff f7 6a call 200bad4 <_Timespec_To_ticks> 200dd30: 90 06 60 10 add %i1, 0x10, %o0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200dd34: 80 a7 40 08 cmp %i5, %o0 200dd38: 0a bf ff d8 bcs 200dc98 <_POSIX_Thread_Translate_sched_param+0x18> 200dd3c: 01 00 00 00 nop _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 200dd40: 7f ff ff c5 call 200dc54 <_POSIX_Priority_Is_valid> 200dd44: d0 06 60 04 ld [ %i1 + 4 ], %o0 200dd48: 80 8a 20 ff btst 0xff, %o0 200dd4c: 02 bf ff d3 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18> 200dd50: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200dd54: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200dd58: 03 00 80 1f sethi %hi(0x2007c00), %g1 200dd5c: 82 10 62 14 or %g1, 0x214, %g1 ! 2007e14 <_POSIX_Threads_Sporadic_budget_callout> 200dd60: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200dd64: 81 c7 e0 08 ret 200dd68: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200cc30 <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200cc30: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 200cc34: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200cc38: 40 00 09 09 call 200f05c <_POSIX_Threads_cancel_run> 200cc3c: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200cc40: 90 10 00 19 mov %i1, %o0 200cc44: 40 00 09 20 call 200f0c4 <_POSIX_Keys_Run_destructors> 200cc48: ba 06 20 44 add %i0, 0x44, %i5 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200cc4c: 10 80 00 03 b 200cc58 <_POSIX_Threads_Delete_extension+0x28> 200cc50: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200cc54: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200cc58: 7f ff f6 42 call 200a560 <_Thread_queue_Dequeue> 200cc5c: 90 10 00 1d mov %i5, %o0 200cc60: 80 a2 20 00 cmp %o0, 0 200cc64: 32 bf ff fc bne,a 200cc54 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200cc68: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200cc6c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200cc70: 80 a0 60 04 cmp %g1, 4 200cc74: 32 80 00 05 bne,a 200cc88 <_POSIX_Threads_Delete_extension+0x58> 200cc78: c0 26 61 5c clr [ %i1 + 0x15c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 200cc7c: 7f ff f8 f7 call 200b058 <_Watchdog_Remove> 200cc80: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200cc84: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200cc88: 7f ff f9 6d call 200b23c <_Workspace_Free> 200cc8c: 81 e8 00 00 restore =============================================================================== 02007b70 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 2007b70: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 2007b74: 03 00 80 86 sethi %hi(0x2021800), %g1 2007b78: 82 10 62 60 or %g1, 0x260, %g1 ! 2021a60 maximum = Configuration_POSIX_API.number_of_initialization_threads; 2007b7c: f6 00 60 30 ld [ %g1 + 0x30 ], %i3 if ( !user_threads || maximum == 0 ) 2007b80: 80 a6 e0 00 cmp %i3, 0 2007b84: 02 80 00 1d be 2007bf8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2007b88: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 2007b8c: 80 a7 60 00 cmp %i5, 0 2007b90: 02 80 00 1a be 2007bf8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2007b94: b8 10 20 00 clr %i4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2007b98: 40 00 18 75 call 200dd6c 2007b9c: 90 07 bf c0 add %fp, -64, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 2007ba0: 92 10 20 02 mov 2, %o1 2007ba4: 40 00 18 7e call 200dd9c 2007ba8: 90 07 bf c0 add %fp, -64, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2007bac: d2 07 60 04 ld [ %i5 + 4 ], %o1 2007bb0: 40 00 18 8a call 200ddd8 2007bb4: 90 07 bf c0 add %fp, -64, %o0 status = pthread_create( 2007bb8: d4 07 40 00 ld [ %i5 ], %o2 2007bbc: 90 07 bf bc add %fp, -68, %o0 2007bc0: 92 07 bf c0 add %fp, -64, %o1 2007bc4: 96 10 20 00 clr %o3 2007bc8: 7f ff ff 16 call 2007820 2007bcc: ba 07 60 08 add %i5, 8, %i5 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2007bd0: 80 a2 20 00 cmp %o0, 0 2007bd4: 02 80 00 05 be 2007be8 <_POSIX_Threads_Initialize_user_threads_body+0x78> 2007bd8: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2007bdc: 90 10 20 02 mov 2, %o0 2007be0: 40 00 07 f9 call 2009bc4 <_Internal_error_Occurred> 2007be4: 92 10 20 01 mov 1, %o1 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 2007be8: b8 07 20 01 inc %i4 2007bec: 80 a7 00 1b cmp %i4, %i3 2007bf0: 12 bf ff ea bne 2007b98 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN 2007bf4: 01 00 00 00 nop 2007bf8: 81 c7 e0 08 ret 2007bfc: 81 e8 00 00 restore =============================================================================== 0200cd84 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200cd84: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200cd88: fa 06 61 5c ld [ %i1 + 0x15c ], %i5 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200cd8c: 40 00 04 30 call 200de4c <_Timespec_To_ticks> 200cd90: 90 07 60 98 add %i5, 0x98, %o0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200cd94: 03 00 80 73 sethi %hi(0x201cc00), %g1 200cd98: d2 08 61 48 ldub [ %g1 + 0x148 ], %o1 ! 201cd48 200cd9c: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 the_thread->cpu_time_budget = ticks; 200cda0: d0 26 60 74 st %o0, [ %i1 + 0x74 ] 200cda4: 92 22 40 01 sub %o1, %g1, %o1 */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200cda8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200cdac: 80 a0 60 00 cmp %g1, 0 200cdb0: 12 80 00 09 bne 200cdd4 <_POSIX_Threads_Sporadic_budget_TSR+0x50><== NEVER TAKEN 200cdb4: d2 26 60 18 st %o1, [ %i1 + 0x18 ] /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 200cdb8: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200cdbc: 80 a0 40 09 cmp %g1, %o1 200cdc0: 08 80 00 06 bleu 200cdd8 <_POSIX_Threads_Sporadic_budget_TSR+0x54> 200cdc4: 90 07 60 90 add %i5, 0x90, %o0 _Thread_Change_priority( the_thread, new_priority, true ); 200cdc8: 90 10 00 19 mov %i1, %o0 200cdcc: 7f ff f3 db call 2009d38 <_Thread_Change_priority> 200cdd0: 94 10 20 01 mov 1, %o2 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200cdd4: 90 07 60 90 add %i5, 0x90, %o0 200cdd8: 40 00 04 1d call 200de4c <_Timespec_To_ticks> 200cddc: 31 00 80 76 sethi %hi(0x201d800), %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200cde0: b0 16 23 98 or %i0, 0x398, %i0 ! 201db98 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200cde4: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200cde8: 7f ff f8 44 call 200aef8 <_Watchdog_Insert> 200cdec: 93 ef 60 a8 restore %i5, 0xa8, %o1 =============================================================================== 0200cdf0 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200cdf0: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 200cdf4: 86 10 3f ff mov -1, %g3 200cdf8: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 200cdfc: c6 22 20 74 st %g3, [ %o0 + 0x74 ] 200ce00: 07 00 80 73 sethi %hi(0x201cc00), %g3 200ce04: d2 08 e1 48 ldub [ %g3 + 0x148 ], %o1 ! 201cd48 200ce08: 92 22 40 02 sub %o1, %g2, %o1 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200ce0c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200ce10: 80 a0 a0 00 cmp %g2, 0 200ce14: 12 80 00 09 bne 200ce38 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200ce18: d2 22 20 18 st %o1, [ %o0 + 0x18 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 200ce1c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200ce20: 80 a0 40 09 cmp %g1, %o1 200ce24: 1a 80 00 05 bcc 200ce38 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200ce28: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 200ce2c: 82 13 c0 00 mov %o7, %g1 200ce30: 7f ff f3 c2 call 2009d38 <_Thread_Change_priority> 200ce34: 9e 10 40 00 mov %g1, %o7 200ce38: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02007614 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 2007614: 9d e3 bf 98 save %sp, -104, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 2007618: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 200761c: 82 00 60 01 inc %g1 2007620: c2 26 60 68 st %g1, [ %i1 + 0x68 ] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007624: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 2007628: 80 a0 60 00 cmp %g1, 0 200762c: 32 80 00 07 bne,a 2007648 <_POSIX_Timer_TSR+0x34> 2007630: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2007634: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 2007638: 80 a0 60 00 cmp %g1, 0 200763c: 02 80 00 1e be 20076b4 <_POSIX_Timer_TSR+0xa0> <== NEVER TAKEN 2007640: 82 10 20 04 mov 4, %g1 ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 2007644: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2007648: d4 06 60 08 ld [ %i1 + 8 ], %o2 200764c: 90 06 60 10 add %i1, 0x10, %o0 2007650: 17 00 80 1d sethi %hi(0x2007400), %o3 2007654: 98 10 00 19 mov %i1, %o4 2007658: 40 00 18 0b call 200d684 <_POSIX_Timer_Insert_helper> 200765c: 96 12 e2 14 or %o3, 0x214, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2007660: 80 8a 20 ff btst 0xff, %o0 2007664: 02 80 00 19 be 20076c8 <_POSIX_Timer_TSR+0xb4> <== NEVER TAKEN 2007668: 01 00 00 00 nop struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 200766c: 40 00 05 da call 2008dd4 <_TOD_Get_as_timestamp> 2007670: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007674: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007678: 94 10 20 00 clr %o2 200767c: 90 10 00 1c mov %i4, %o0 2007680: 92 10 00 1d mov %i5, %o1 2007684: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007688: 40 00 48 c9 call 20199ac <__divdi3> 200768c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007690: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007694: d2 26 60 6c st %o1, [ %i1 + 0x6c ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007698: 94 10 20 00 clr %o2 200769c: 92 10 00 1d mov %i5, %o1 20076a0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20076a4: 40 00 49 ad call 2019d58 <__moddi3> 20076a8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 20076ac: 82 10 20 03 mov 3, %g1 20076b0: d2 26 60 70 st %o1, [ %i1 + 0x70 ] /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 20076b4: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 20076b8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 20076bc: 40 00 16 e5 call 200d250 20076c0: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 20076c4: c0 26 60 68 clr [ %i1 + 0x68 ] 20076c8: 81 c7 e0 08 ret 20076cc: 81 e8 00 00 restore =============================================================================== 0200f180 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200f180: 9d e3 bf 68 save %sp, -152, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200f184: 98 10 20 01 mov 1, %o4 200f188: 90 10 00 18 mov %i0, %o0 200f18c: 92 10 00 19 mov %i1, %o1 200f190: 94 07 bf cc add %fp, -52, %o2 200f194: 40 00 00 2e call 200f24c <_POSIX_signals_Clear_signals> 200f198: 96 10 00 1a mov %i2, %o3 200f19c: 80 8a 20 ff btst 0xff, %o0 200f1a0: 02 80 00 28 be 200f240 <_POSIX_signals_Check_signal+0xc0> 200f1a4: 82 10 20 00 clr %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200f1a8: 85 2e 60 02 sll %i1, 2, %g2 200f1ac: 35 00 80 78 sethi %hi(0x201e000), %i2 200f1b0: b7 2e 60 04 sll %i1, 4, %i3 200f1b4: b4 16 a0 80 or %i2, 0x80, %i2 200f1b8: b6 26 c0 02 sub %i3, %g2, %i3 200f1bc: 84 06 80 1b add %i2, %i3, %g2 200f1c0: fa 00 a0 08 ld [ %g2 + 8 ], %i5 200f1c4: 80 a7 60 01 cmp %i5, 1 200f1c8: 02 80 00 1e be 200f240 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN 200f1cc: 90 07 bf d8 add %fp, -40, %o0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200f1d0: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200f1d4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200f1d8: 82 10 40 1c or %g1, %i4, %g1 200f1dc: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ] /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200f1e0: 03 00 80 78 sethi %hi(0x201e000), %g1 200f1e4: d2 00 60 2c ld [ %g1 + 0x2c ], %o1 ! 201e02c <_Per_CPU_Information+0xc> 200f1e8: 94 10 20 28 mov 0x28, %o2 200f1ec: 40 00 04 52 call 2010334 200f1f0: 92 02 60 20 add %o1, 0x20, %o1 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200f1f4: c2 06 80 1b ld [ %i2 + %i3 ], %g1 200f1f8: 80 a0 60 02 cmp %g1, 2 200f1fc: 12 80 00 07 bne 200f218 <_POSIX_signals_Check_signal+0x98> 200f200: 90 10 00 19 mov %i1, %o0 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200f204: 92 07 bf cc add %fp, -52, %o1 200f208: 9f c7 40 00 call %i5 200f20c: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200f210: 10 80 00 05 b 200f224 <_POSIX_signals_Check_signal+0xa4> 200f214: 03 00 80 78 sethi %hi(0x201e000), %g1 default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200f218: 9f c7 40 00 call %i5 200f21c: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 200f220: 03 00 80 78 sethi %hi(0x201e000), %g1 200f224: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 201e02c <_Per_CPU_Information+0xc> 200f228: 92 07 bf d8 add %fp, -40, %o1 200f22c: 90 02 20 20 add %o0, 0x20, %o0 200f230: 40 00 04 41 call 2010334 200f234: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 200f238: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200f23c: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ] return true; } 200f240: b0 08 60 01 and %g1, 1, %i0 200f244: 81 c7 e0 08 ret 200f248: 81 e8 00 00 restore =============================================================================== 0200f974 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200f974: 9d e3 bf a0 save %sp, -96, %sp 200f978: 82 06 3f ff add %i0, -1, %g1 200f97c: ba 10 20 01 mov 1, %i5 clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200f980: 7f ff cb 51 call 20026c4 200f984: bb 2f 40 01 sll %i5, %g1, %i5 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200f988: 05 00 80 78 sethi %hi(0x201e000), %g2 200f98c: 83 2e 20 02 sll %i0, 2, %g1 200f990: 84 10 a0 80 or %g2, 0x80, %g2 200f994: b1 2e 20 04 sll %i0, 4, %i0 200f998: 82 26 00 01 sub %i0, %g1, %g1 200f99c: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200f9a0: 80 a0 a0 02 cmp %g2, 2 200f9a4: 32 80 00 0c bne,a 200f9d4 <_POSIX_signals_Clear_process_signals+0x60> 200f9a8: 03 00 80 78 sethi %hi(0x201e000), %g1 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200f9ac: 05 00 80 78 sethi %hi(0x201e000), %g2 200f9b0: 84 10 a2 78 or %g2, 0x278, %g2 ! 201e278 <_POSIX_signals_Siginfo> 200f9b4: 86 00 40 02 add %g1, %g2, %g3 200f9b8: c2 00 40 02 ld [ %g1 + %g2 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200f9bc: 86 00 e0 04 add %g3, 4, %g3 200f9c0: 80 a0 40 03 cmp %g1, %g3 200f9c4: 02 80 00 04 be 200f9d4 <_POSIX_signals_Clear_process_signals+0x60><== ALWAYS TAKEN 200f9c8: 03 00 80 78 sethi %hi(0x201e000), %g1 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 200f9cc: 7f ff cb 42 call 20026d4 200f9d0: 91 e8 00 08 restore %g0, %o0, %o0 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200f9d4: c4 00 62 74 ld [ %g1 + 0x274 ], %g2 200f9d8: ba 28 80 1d andn %g2, %i5, %i5 200f9dc: 10 bf ff fc b 200f9cc <_POSIX_signals_Clear_process_signals+0x58> 200f9e0: fa 20 62 74 st %i5, [ %g1 + 0x274 ] =============================================================================== 0200840c <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200840c: 82 10 20 1b mov 0x1b, %g1 2008410: 84 10 20 01 mov 1, %g2 #include #include #include #include static int _POSIX_signals_Get_lowest( 2008414: 86 00 7f ff add %g1, -1, %g3 2008418: 87 28 80 03 sll %g2, %g3, %g3 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 200841c: 80 88 c0 08 btst %g3, %o0 2008420: 12 80 00 11 bne 2008464 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN 2008424: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2008428: 82 00 60 01 inc %g1 200842c: 80 a0 60 20 cmp %g1, 0x20 2008430: 12 bf ff fa bne 2008418 <_POSIX_signals_Get_lowest+0xc> 2008434: 86 00 7f ff add %g1, -1, %g3 2008438: 82 10 20 01 mov 1, %g1 200843c: 84 10 20 01 mov 1, %g2 #include #include #include #include static int _POSIX_signals_Get_lowest( 2008440: 86 00 7f ff add %g1, -1, %g3 2008444: 87 28 80 03 sll %g2, %g3, %g3 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 2008448: 80 88 c0 08 btst %g3, %o0 200844c: 12 80 00 06 bne 2008464 <_POSIX_signals_Get_lowest+0x58> 2008450: 01 00 00 00 nop */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2008454: 82 00 60 01 inc %g1 2008458: 80 a0 60 1b cmp %g1, 0x1b 200845c: 12 bf ff fa bne 2008444 <_POSIX_signals_Get_lowest+0x38> <== ALWAYS TAKEN 2008460: 86 00 7f ff add %g1, -1, %g3 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2008464: 81 c3 e0 08 retl 2008468: 90 10 00 01 mov %g1, %o0 =============================================================================== 0201a654 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 201a654: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201a658: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201a65c: 3b 04 00 20 sethi %hi(0x10008000), %i5 201a660: 84 06 7f ff add %i1, -1, %g2 201a664: 86 10 20 01 mov 1, %g3 201a668: b8 08 40 1d and %g1, %i5, %i4 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 201a66c: c8 06 21 5c ld [ %i0 + 0x15c ], %g4 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201a670: 80 a7 00 1d cmp %i4, %i5 201a674: 12 80 00 1e bne 201a6ec <_POSIX_signals_Unblock_thread+0x98> 201a678: 85 28 c0 02 sll %g3, %g2, %g2 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 201a67c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201a680: 80 88 80 01 btst %g2, %g1 201a684: 12 80 00 08 bne 201a6a4 <_POSIX_signals_Unblock_thread+0x50> 201a688: 82 10 20 04 mov 4, %g1 201a68c: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 201a690: 80 a8 80 01 andncc %g2, %g1, %g0 201a694: 32 80 00 04 bne,a 201a6a4 <_POSIX_signals_Unblock_thread+0x50> 201a698: 82 10 20 04 mov 4, %g1 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 201a69c: 10 80 00 3d b 201a790 <_POSIX_signals_Unblock_thread+0x13c> 201a6a0: b0 10 20 00 clr %i0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 201a6a4: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 201a6a8: 80 a6 a0 00 cmp %i2, 0 201a6ac: 12 80 00 07 bne 201a6c8 <_POSIX_signals_Unblock_thread+0x74> 201a6b0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 201a6b4: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 201a6b8: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; 201a6bc: c2 22 20 04 st %g1, [ %o0 + 4 ] the_info->si_value.sival_int = 0; 201a6c0: 10 80 00 05 b 201a6d4 <_POSIX_signals_Unblock_thread+0x80> 201a6c4: c0 22 20 08 clr [ %o0 + 8 ] } else { *the_info = *info; 201a6c8: 92 10 00 1a mov %i2, %o1 201a6cc: 7f ff d7 1a call 2010334 201a6d0: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 201a6d4: 90 10 00 18 mov %i0, %o0 201a6d8: 7f ff c0 8f call 200a914 <_Thread_queue_Extract_with_proxy> 201a6dc: b0 10 20 01 mov 1, %i0 201a6e0: b0 0e 20 01 and %i0, 1, %i0 201a6e4: 81 c7 e0 08 ret 201a6e8: 81 e8 00 00 restore } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 201a6ec: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4 201a6f0: 80 a8 80 04 andncc %g2, %g4, %g0 201a6f4: 02 80 00 26 be 201a78c <_POSIX_signals_Unblock_thread+0x138> 201a6f8: 05 04 00 00 sethi %hi(0x10000000), %g2 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 201a6fc: 80 88 40 02 btst %g1, %g2 201a700: 02 80 00 17 be 201a75c <_POSIX_signals_Unblock_thread+0x108> 201a704: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 201a708: 84 10 20 04 mov 4, %g2 201a70c: c4 26 20 34 st %g2, [ %i0 + 0x34 ] /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 201a710: 05 00 00 ef sethi %hi(0x3bc00), %g2 201a714: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 201a718: 80 88 40 02 btst %g1, %g2 201a71c: 02 80 00 06 be 201a734 <_POSIX_signals_Unblock_thread+0xe0> 201a720: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); 201a724: 7f ff c0 7c call 200a914 <_Thread_queue_Extract_with_proxy> 201a728: 90 10 00 18 mov %i0, %o0 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 201a72c: 10 80 00 19 b 201a790 <_POSIX_signals_Unblock_thread+0x13c> 201a730: b0 10 20 00 clr %i0 * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 201a734: 22 80 00 17 be,a 201a790 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN 201a738: b0 10 20 00 clr %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 201a73c: 7f ff c2 47 call 200b058 <_Watchdog_Remove> 201a740: 90 06 20 48 add %i0, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 201a744: 90 10 00 18 mov %i0, %o0 201a748: 13 04 00 ff sethi %hi(0x1003fc00), %o1 201a74c: 7f ff bd c0 call 2009e4c <_Thread_Clear_state> 201a750: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 201a754: 10 80 00 0f b 201a790 <_POSIX_signals_Unblock_thread+0x13c> 201a758: b0 10 20 00 clr %i0 else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 201a75c: 32 80 00 0d bne,a 201a790 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN 201a760: b0 10 20 00 clr %i0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201a764: 03 00 80 78 sethi %hi(0x201e000), %g1 201a768: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information> 201a76c: c4 00 60 08 ld [ %g1 + 8 ], %g2 201a770: 80 a0 a0 00 cmp %g2, 0 201a774: 22 80 00 07 be,a 201a790 <_POSIX_signals_Unblock_thread+0x13c> 201a778: b0 10 20 00 clr %i0 201a77c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 201a780: 80 a6 00 02 cmp %i0, %g2 201a784: 22 80 00 02 be,a 201a78c <_POSIX_signals_Unblock_thread+0x138><== ALWAYS TAKEN 201a788: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] _Thread_Dispatch_necessary = true; } } return false; 201a78c: b0 10 20 00 clr %i0 } 201a790: b0 0e 20 01 and %i0, 1, %i0 201a794: 81 c7 e0 08 ret 201a798: 81 e8 00 00 restore =============================================================================== 0200a3a0 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a3a0: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200a3a4: 80 a6 60 00 cmp %i1, 0 200a3a8: 02 80 00 69 be 200a54c <_RBTree_Extract_unprotected+0x1ac> 200a3ac: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200a3b0: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a3b4: 80 a6 40 01 cmp %i1, %g1 200a3b8: 32 80 00 07 bne,a 200a3d4 <_RBTree_Extract_unprotected+0x34> 200a3bc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); 200a3c0: 90 10 00 19 mov %i1, %o0 200a3c4: 40 00 01 31 call 200a888 <_RBTree_Next_unprotected> 200a3c8: 92 10 20 01 mov 1, %o1 RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 200a3cc: d0 26 20 08 st %o0, [ %i0 + 8 ] } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 200a3d0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a3d4: 80 a6 40 01 cmp %i1, %g1 200a3d8: 32 80 00 07 bne,a 200a3f4 <_RBTree_Extract_unprotected+0x54> 200a3dc: fa 06 60 04 ld [ %i1 + 4 ], %i5 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); 200a3e0: 90 10 00 19 mov %i1, %o0 200a3e4: 40 00 01 29 call 200a888 <_RBTree_Next_unprotected> 200a3e8: 92 10 20 00 clr %o1 RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 200a3ec: d0 26 20 0c st %o0, [ %i0 + 0xc ] * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 200a3f0: fa 06 60 04 ld [ %i1 + 4 ], %i5 200a3f4: 80 a7 60 00 cmp %i5, 0 200a3f8: 02 80 00 36 be 200a4d0 <_RBTree_Extract_unprotected+0x130> 200a3fc: f8 06 60 08 ld [ %i1 + 8 ], %i4 200a400: 80 a7 20 00 cmp %i4, 0 200a404: 32 80 00 05 bne,a 200a418 <_RBTree_Extract_unprotected+0x78> 200a408: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a40c: 10 80 00 35 b 200a4e0 <_RBTree_Extract_unprotected+0x140> 200a410: b8 10 00 1d mov %i5, %i4 target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 200a414: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a418: 80 a0 60 00 cmp %g1, 0 200a41c: 32 bf ff fe bne,a 200a414 <_RBTree_Extract_unprotected+0x74> 200a420: ba 10 00 01 mov %g1, %i5 * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 200a424: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200a428: 80 a7 20 00 cmp %i4, 0 200a42c: 02 80 00 05 be 200a440 <_RBTree_Extract_unprotected+0xa0> 200a430: 01 00 00 00 nop leaf->parent = target->parent; 200a434: c2 07 40 00 ld [ %i5 ], %g1 200a438: 10 80 00 04 b 200a448 <_RBTree_Extract_unprotected+0xa8> 200a43c: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200a440: 7f ff ff 73 call 200a20c <_RBTree_Extract_validate_unprotected> 200a444: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200a448: c4 07 40 00 ld [ %i5 ], %g2 leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; 200a44c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 200a450: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a454: 86 1f 40 03 xor %i5, %g3, %g3 200a458: 80 a0 00 03 cmp %g0, %g3 200a45c: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 200a460: 87 28 e0 02 sll %g3, 2, %g3 200a464: 84 00 80 03 add %g2, %g3, %g2 200a468: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200a46c: c4 06 40 00 ld [ %i1 ], %g2 200a470: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a474: 86 1e 40 03 xor %i1, %g3, %g3 200a478: 80 a0 00 03 cmp %g0, %g3 200a47c: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 200a480: 87 28 e0 02 sll %g3, 2, %g3 200a484: 84 00 80 03 add %g2, %g3, %g2 200a488: fa 20 a0 04 st %i5, [ %g2 + 4 ] /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 200a48c: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a490: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200a494: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a498: 80 a0 a0 00 cmp %g2, 0 200a49c: 32 80 00 02 bne,a 200a4a4 <_RBTree_Extract_unprotected+0x104><== ALWAYS TAKEN 200a4a0: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200a4a4: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a4a8: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200a4ac: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a4b0: 80 a0 a0 00 cmp %g2, 0 200a4b4: 32 80 00 02 bne,a 200a4bc <_RBTree_Extract_unprotected+0x11c> 200a4b8: fa 20 80 00 st %i5, [ %g2 ] /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 200a4bc: c4 06 40 00 ld [ %i1 ], %g2 200a4c0: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200a4c4: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200a4c8: 10 80 00 14 b 200a518 <_RBTree_Extract_unprotected+0x178> 200a4cc: c4 27 60 0c st %g2, [ %i5 + 0xc ] * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { 200a4d0: 80 a7 20 00 cmp %i4, 0 200a4d4: 32 80 00 04 bne,a 200a4e4 <_RBTree_Extract_unprotected+0x144> 200a4d8: c2 06 40 00 ld [ %i1 ], %g1 200a4dc: 30 80 00 04 b,a 200a4ec <_RBTree_Extract_unprotected+0x14c> leaf->parent = the_node->parent; 200a4e0: c2 06 40 00 ld [ %i1 ], %g1 200a4e4: 10 80 00 04 b 200a4f4 <_RBTree_Extract_unprotected+0x154> 200a4e8: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 200a4ec: 7f ff ff 48 call 200a20c <_RBTree_Extract_validate_unprotected> 200a4f0: 90 10 00 19 mov %i1, %o0 } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200a4f4: c4 06 40 00 ld [ %i1 ], %g2 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 200a4f8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200a4fc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a500: 86 1e 40 03 xor %i1, %g3, %g3 200a504: 80 a0 00 03 cmp %g0, %g3 200a508: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 200a50c: 87 28 e0 02 sll %g3, 2, %g3 200a510: 84 00 80 03 add %g2, %g3, %g2 200a514: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 200a518: 80 a0 60 00 cmp %g1, 0 200a51c: 32 80 00 06 bne,a 200a534 <_RBTree_Extract_unprotected+0x194> 200a520: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200a524: 80 a7 20 00 cmp %i4, 0 200a528: 32 80 00 02 bne,a 200a530 <_RBTree_Extract_unprotected+0x190> 200a52c: c0 27 20 0c clr [ %i4 + 0xc ] /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 200a530: c2 06 20 04 ld [ %i0 + 4 ], %g1 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 200a534: c0 26 60 08 clr [ %i1 + 8 ] 200a538: c0 26 60 04 clr [ %i1 + 4 ] 200a53c: 80 a0 60 00 cmp %g1, 0 200a540: 02 80 00 03 be 200a54c <_RBTree_Extract_unprotected+0x1ac> 200a544: c0 26 40 00 clr [ %i1 ] 200a548: c0 20 60 0c clr [ %g1 + 0xc ] 200a54c: 81 c7 e0 08 ret 200a550: 81 e8 00 00 restore =============================================================================== 0200b594 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200b594: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200b598: 80 a6 20 00 cmp %i0, 0 200b59c: 02 80 00 10 be 200b5dc <_RBTree_Initialize+0x48> <== NEVER TAKEN 200b5a0: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200b5a4: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200b5a8: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200b5ac: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200b5b0: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200b5b4: f2 26 20 10 st %i1, [ %i0 + 0x10 ] /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 200b5b8: 10 80 00 06 b 200b5d0 <_RBTree_Initialize+0x3c> 200b5bc: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert_unprotected(the_rbtree, next); 200b5c0: 90 10 00 18 mov %i0, %o0 200b5c4: 7f ff ff 2e call 200b27c <_RBTree_Insert_unprotected> 200b5c8: b4 06 80 1c add %i2, %i4, %i2 200b5cc: b6 06 ff ff add %i3, -1, %i3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 200b5d0: 80 a6 e0 00 cmp %i3, 0 200b5d4: 12 bf ff fb bne 200b5c0 <_RBTree_Initialize+0x2c> 200b5d8: 92 10 00 1a mov %i2, %o1 200b5dc: 81 c7 e0 08 ret 200b5e0: 81 e8 00 00 restore =============================================================================== 0200a5f4 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a5f4: 9d e3 bf a0 save %sp, -96, %sp if(!the_node) return (RBTree_Node*)-1; 200a5f8: 80 a6 60 00 cmp %i1, 0 200a5fc: 02 80 00 7c be 200a7ec <_RBTree_Insert_unprotected+0x1f8> 200a600: ba 10 00 18 mov %i0, %i5 RBTree_Node *iter_node = the_rbtree->root; 200a604: f0 06 20 04 ld [ %i0 + 4 ], %i0 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200a608: b6 96 20 00 orcc %i0, 0, %i3 200a60c: 32 80 00 0c bne,a 200a63c <_RBTree_Insert_unprotected+0x48> 200a610: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200a614: c0 26 60 0c clr [ %i1 + 0xc ] the_rbtree->root = the_node; 200a618: f2 27 60 04 st %i1, [ %i5 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200a61c: f2 27 60 0c st %i1, [ %i5 + 0xc ] 200a620: f2 27 60 08 st %i1, [ %i5 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200a624: fa 26 40 00 st %i5, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a628: c0 26 60 08 clr [ %i1 + 8 ] 200a62c: c0 26 60 04 clr [ %i1 + 4 ] 200a630: 81 c7 e0 08 ret 200a634: 81 e8 00 00 restore } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); 200a638: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a63c: 90 10 00 19 mov %i1, %o0 200a640: 9f c0 40 00 call %g1 200a644: 92 10 00 18 mov %i0, %o1 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200a648: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1 200a64c: 80 a0 60 00 cmp %g1, 0 200a650: 02 80 00 05 be 200a664 <_RBTree_Insert_unprotected+0x70> 200a654: b8 38 00 08 xnor %g0, %o0, %i4 200a658: 80 a2 20 00 cmp %o0, 0 200a65c: 02 80 00 65 be 200a7f0 <_RBTree_Insert_unprotected+0x1fc> 200a660: 01 00 00 00 nop return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a664: b9 37 20 1f srl %i4, 0x1f, %i4 if (!iter_node->child[dir]) { 200a668: 83 2f 20 02 sll %i4, 2, %g1 200a66c: 82 06 00 01 add %i0, %g1, %g1 200a670: f0 00 60 04 ld [ %g1 + 4 ], %i0 200a674: 80 a6 20 00 cmp %i0, 0 200a678: 32 bf ff f0 bne,a 200a638 <_RBTree_Insert_unprotected+0x44> 200a67c: b6 10 00 18 mov %i0, %i3 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a680: c0 26 60 08 clr [ %i1 + 8 ] 200a684: c0 26 60 04 clr [ %i1 + 4 ] the_node->color = RBT_RED; 200a688: 84 10 20 01 mov 1, %g2 iter_node->child[dir] = the_node; 200a68c: f2 20 60 04 st %i1, [ %g1 + 4 ] if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; 200a690: c4 26 60 0c st %g2, [ %i1 + 0xc ] iter_node->child[dir] = the_node; the_node->parent = iter_node; 200a694: f6 26 40 00 st %i3, [ %i1 ] /* update min/max */ compare_result = the_rbtree->compare_function( 200a698: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200a69c: b6 07 20 02 add %i4, 2, %i3 200a6a0: 85 2e e0 02 sll %i3, 2, %g2 200a6a4: d2 07 40 02 ld [ %i5 + %g2 ], %o1 200a6a8: 9f c0 40 00 call %g1 200a6ac: 90 10 00 19 mov %i1, %o0 the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 200a6b0: 80 a7 20 00 cmp %i4, 0 200a6b4: 12 80 00 06 bne 200a6cc <_RBTree_Insert_unprotected+0xd8> 200a6b8: 80 a2 20 00 cmp %o0, 0 200a6bc: 36 80 00 3c bge,a 200a7ac <_RBTree_Insert_unprotected+0x1b8> 200a6c0: d0 06 40 00 ld [ %i1 ], %o0 (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; 200a6c4: 10 80 00 04 b 200a6d4 <_RBTree_Insert_unprotected+0xe0> 200a6c8: b7 2e e0 02 sll %i3, 2, %i3 compare_result = the_rbtree->compare_function( the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || (dir && _RBTree_Is_greater(compare_result)) ) { 200a6cc: 04 80 00 37 ble 200a7a8 <_RBTree_Insert_unprotected+0x1b4> 200a6d0: b7 2e e0 02 sll %i3, 2, %i3 the_rbtree->first[dir] = the_node; 200a6d4: 10 80 00 35 b 200a7a8 <_RBTree_Insert_unprotected+0x1b4> 200a6d8: f2 27 40 1b st %i1, [ %i5 + %i3 ] const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; 200a6dc: 02 80 00 13 be 200a728 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN 200a6e0: 82 10 20 00 clr %g1 if(!(the_node->parent->parent->parent)) return NULL; 200a6e4: c2 07 40 00 ld [ %i5 ], %g1 200a6e8: 80 a0 60 00 cmp %g1, 0 200a6ec: 02 80 00 0f be 200a728 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN 200a6f0: 82 10 20 00 clr %g1 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 200a6f4: c2 07 60 04 ld [ %i5 + 4 ], %g1 200a6f8: 80 a2 00 01 cmp %o0, %g1 200a6fc: 22 80 00 02 be,a 200a704 <_RBTree_Insert_unprotected+0x110> 200a700: c2 07 60 08 ld [ %i5 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a704: 80 a0 60 00 cmp %g1, 0 200a708: 02 80 00 09 be 200a72c <_RBTree_Insert_unprotected+0x138> 200a70c: 84 10 20 00 clr %g2 200a710: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a714: 80 a0 a0 01 cmp %g2, 1 200a718: 32 80 00 05 bne,a 200a72c <_RBTree_Insert_unprotected+0x138> 200a71c: 84 10 20 00 clr %g2 200a720: 10 80 00 03 b 200a72c <_RBTree_Insert_unprotected+0x138> 200a724: 84 10 20 01 mov 1, %g2 200a728: 84 10 20 00 clr %g2 <== NOT EXECUTED while (_RBTree_Is_red(_RBTree_Parent(the_node))) { u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { 200a72c: 80 a0 a0 00 cmp %g2, 0 200a730: 22 80 00 08 be,a 200a750 <_RBTree_Insert_unprotected+0x15c> 200a734: c2 07 60 04 ld [ %i5 + 4 ], %g1 the_node->parent->color = RBT_BLACK; 200a738: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 200a73c: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a740: b2 10 00 1d mov %i5, %i1 200a744: 82 10 20 01 mov 1, %g1 200a748: 10 80 00 18 b 200a7a8 <_RBTree_Insert_unprotected+0x1b4> 200a74c: c2 27 60 0c st %g1, [ %i5 + 0xc ] the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 200a750: 82 1a 00 01 xor %o0, %g1, %g1 200a754: 80 a0 00 01 cmp %g0, %g1 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 200a758: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 200a75c: b8 40 20 00 addx %g0, 0, %i4 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 200a760: 82 1e 40 01 xor %i1, %g1, %g1 200a764: 80 a0 00 01 cmp %g0, %g1 200a768: 82 40 20 00 addx %g0, 0, %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 200a76c: 80 a0 40 1c cmp %g1, %i4 200a770: 22 80 00 08 be,a 200a790 <_RBTree_Insert_unprotected+0x19c> 200a774: c2 06 40 00 ld [ %i1 ], %g1 _RBTree_Rotate(the_node->parent, pdir); 200a778: 7f ff ff 80 call 200a578 <_RBTree_Rotate> 200a77c: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200a780: 83 2f 20 02 sll %i4, 2, %g1 200a784: b2 06 40 01 add %i1, %g1, %i1 200a788: f2 06 60 04 ld [ %i1 + 4 ], %i1 } the_node->parent->color = RBT_BLACK; 200a78c: c2 06 40 00 ld [ %i1 ], %g1 g->color = RBT_RED; 200a790: 92 10 20 01 mov 1, %o1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 200a794: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a798: d2 27 60 0c st %o1, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200a79c: 90 10 00 1d mov %i5, %o0 200a7a0: 7f ff ff 76 call 200a578 <_RBTree_Rotate> 200a7a4: 92 22 40 1c sub %o1, %i4, %o1 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200a7a8: d0 06 40 00 ld [ %i1 ], %o0 200a7ac: fa 02 00 00 ld [ %o0 ], %i5 200a7b0: 80 a7 60 00 cmp %i5, 0 200a7b4: 22 80 00 06 be,a 200a7cc <_RBTree_Insert_unprotected+0x1d8> 200a7b8: 82 10 20 00 clr %g1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a7bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a7c0: 82 18 60 01 xor %g1, 1, %g1 200a7c4: 80 a0 00 01 cmp %g0, %g1 200a7c8: 82 60 3f ff subx %g0, -1, %g1 RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { 200a7cc: 80 a0 60 00 cmp %g1, 0 200a7d0: 12 bf ff c3 bne 200a6dc <_RBTree_Insert_unprotected+0xe8> 200a7d4: 80 a7 60 00 cmp %i5, 0 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200a7d8: 12 80 00 06 bne 200a7f0 <_RBTree_Insert_unprotected+0x1fc> 200a7dc: 01 00 00 00 nop 200a7e0: c0 26 60 0c clr [ %i1 + 0xc ] 200a7e4: 81 c7 e0 08 ret 200a7e8: 81 e8 00 00 restore RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; 200a7ec: b0 10 3f ff mov -1, %i0 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200a7f0: 81 c7 e0 08 ret 200a7f4: 81 e8 00 00 restore =============================================================================== 0200a828 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200a828: 9d e3 bf a0 save %sp, -96, %sp RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; 200a82c: b8 10 20 00 clr %i4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a830: 80 a0 00 19 cmp %g0, %i1 200a834: 82 60 3f ff subx %g0, -1, %g1 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200a838: 82 00 60 02 add %g1, 2, %g1 200a83c: 83 28 60 02 sll %g1, 2, %g1 while ( !stop && current != NULL ) { 200a840: 10 80 00 0a b 200a868 <_RBTree_Iterate_unprotected+0x40> 200a844: fa 06 00 01 ld [ %i0 + %g1 ], %i5 stop = (*visitor)( current, dir, visitor_arg ); 200a848: 92 10 00 19 mov %i1, %o1 200a84c: 9f c6 80 00 call %i2 200a850: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( current, dir ); 200a854: 92 10 00 19 mov %i1, %o1 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); 200a858: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( current, dir ); 200a85c: 40 00 00 0b call 200a888 <_RBTree_Next_unprotected> 200a860: 90 10 00 1d mov %i5, %o0 200a864: ba 10 00 08 mov %o0, %i5 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 200a868: 80 a7 60 00 cmp %i5, 0 200a86c: 02 80 00 05 be 200a880 <_RBTree_Iterate_unprotected+0x58> 200a870: b8 1f 20 01 xor %i4, 1, %i4 200a874: 80 8f 20 ff btst 0xff, %i4 200a878: 12 bf ff f4 bne 200a848 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN 200a87c: 90 10 00 1d mov %i5, %o0 200a880: 81 c7 e0 08 ret 200a884: 81 e8 00 00 restore =============================================================================== 0200a190 <_RBTree_Rotate>: RBTree_Node *the_node, RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; 200a190: 80 a2 20 00 cmp %o0, 0 200a194: 02 80 00 1c be 200a204 <_RBTree_Rotate+0x74> <== NEVER TAKEN 200a198: 80 a0 00 09 cmp %g0, %o1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a19c: 86 60 3f ff subx %g0, -1, %g3 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a1a0: 87 28 e0 02 sll %g3, 2, %g3 200a1a4: 86 02 00 03 add %o0, %g3, %g3 200a1a8: c2 00 e0 04 ld [ %g3 + 4 ], %g1 200a1ac: 80 a0 60 00 cmp %g1, 0 200a1b0: 02 80 00 15 be 200a204 <_RBTree_Rotate+0x74> <== NEVER TAKEN 200a1b4: 93 2a 60 02 sll %o1, 2, %o1 c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a1b8: 84 00 40 09 add %g1, %o1, %g2 200a1bc: c8 00 a0 04 ld [ %g2 + 4 ], %g4 200a1c0: c8 20 e0 04 st %g4, [ %g3 + 4 ] if (c->child[dir]) 200a1c4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200a1c8: 80 a0 a0 00 cmp %g2, 0 200a1cc: 32 80 00 02 bne,a 200a1d4 <_RBTree_Rotate+0x44> 200a1d0: d0 20 80 00 st %o0, [ %g2 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a1d4: c4 02 00 00 ld [ %o0 ], %g2 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200a1d8: 92 00 40 09 add %g1, %o1, %o1 200a1dc: d0 22 60 04 st %o0, [ %o1 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a1e0: c6 00 a0 04 ld [ %g2 + 4 ], %g3 c->parent = the_node->parent; 200a1e4: c4 20 40 00 st %g2, [ %g1 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a1e8: 86 1a 00 03 xor %o0, %g3, %g3 c->parent = the_node->parent; the_node->parent = c; 200a1ec: c2 22 00 00 st %g1, [ %o0 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a1f0: 80 a0 00 03 cmp %g0, %g3 200a1f4: 86 40 20 00 addx %g0, 0, %g3 200a1f8: 87 28 e0 02 sll %g3, 2, %g3 200a1fc: 86 00 80 03 add %g2, %g3, %g3 200a200: c2 20 e0 04 st %g1, [ %g3 + 4 ] 200a204: 81 c3 e0 08 retl =============================================================================== 0200a140 <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 200a140: 80 a2 20 00 cmp %o0, 0 200a144: 02 80 00 10 be 200a184 <_RBTree_Sibling+0x44> <== NEVER TAKEN 200a148: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 200a14c: c4 02 00 00 ld [ %o0 ], %g2 200a150: 80 a0 a0 00 cmp %g2, 0 200a154: 22 80 00 0d be,a 200a188 <_RBTree_Sibling+0x48> <== NEVER TAKEN 200a158: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED if(!(the_node->parent->parent)) return NULL; 200a15c: c2 00 80 00 ld [ %g2 ], %g1 200a160: 80 a0 60 00 cmp %g1, 0 200a164: 02 80 00 08 be 200a184 <_RBTree_Sibling+0x44> 200a168: 82 10 20 00 clr %g1 if(the_node == the_node->parent->child[RBT_LEFT]) 200a16c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200a170: 80 a2 00 01 cmp %o0, %g1 200a174: 22 80 00 04 be,a 200a184 <_RBTree_Sibling+0x44> 200a178: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; 200a17c: 81 c3 e0 08 retl 200a180: 90 10 00 01 mov %g1, %o0 else return the_node->parent->child[RBT_LEFT]; } 200a184: 90 10 00 01 mov %g1, %o0 200a188: 81 c3 e0 08 retl =============================================================================== 02032cb4 <_Rate_monotonic_Get_status>: bool _Rate_monotonic_Get_status( Rate_monotonic_Control *the_period, Rate_monotonic_Period_time_t *wall_since_last_period, Thread_CPU_usage_t *cpu_since_last_period ) { 2032cb4: 9d e3 bf 98 save %sp, -104, %sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 2032cb8: f6 06 20 40 ld [ %i0 + 0x40 ], %i3 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2032cbc: 7f ff 72 0c call 200f4ec <_TOD_Get_uptime> 2032cc0: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2032cc4: c4 1e 20 50 ldd [ %i0 + 0x50 ], %g2 _Timestamp_Subtract( 2032cc8: d8 1f bf f8 ldd [ %fp + -8 ], %o4 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 2032ccc: 82 10 20 01 mov 1, %g1 2032cd0: 86 a3 40 03 subcc %o5, %g3, %g3 2032cd4: 84 63 00 02 subx %o4, %g2, %g2 2032cd8: c4 3e 40 00 std %g2, [ %i1 ] * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2032cdc: 05 00 81 89 sethi %hi(0x2062400), %g2 2032ce0: 84 10 a0 90 or %g2, 0x90, %g2 ! 2062490 <_Per_CPU_Information> 2032ce4: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 2032ce8: 80 a6 c0 03 cmp %i3, %g3 2032cec: 12 80 00 15 bne 2032d40 <_Rate_monotonic_Get_status+0x8c> 2032cf0: f8 1e e0 80 ldd [ %i3 + 0x80 ], %i4 2032cf4: c4 18 a0 20 ldd [ %g2 + 0x20 ], %g2 2032cf8: 9a a3 40 03 subcc %o5, %g3, %o5 2032cfc: 98 63 00 02 subx %o4, %g2, %o4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2032d00: c4 1e 20 48 ldd [ %i0 + 0x48 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2032d04: ba 87 40 0d addcc %i5, %o5, %i5 2032d08: b8 47 00 0c addx %i4, %o4, %i4 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 2032d0c: 80 a0 80 1c cmp %g2, %i4 2032d10: 34 80 00 0c bg,a 2032d40 <_Rate_monotonic_Get_status+0x8c><== NEVER TAKEN 2032d14: 82 10 20 00 clr %g1 <== NOT EXECUTED 2032d18: 32 80 00 06 bne,a 2032d30 <_Rate_monotonic_Get_status+0x7c> 2032d1c: 86 a7 40 03 subcc %i5, %g3, %g3 2032d20: 80 a0 c0 1d cmp %g3, %i5 2032d24: 18 80 00 06 bgu 2032d3c <_Rate_monotonic_Get_status+0x88> 2032d28: 86 a7 40 03 subcc %i5, %g3, %g3 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 2032d2c: 82 10 20 01 mov 1, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2032d30: 84 67 00 02 subx %i4, %g2, %g2 2032d34: 10 80 00 03 b 2032d40 <_Rate_monotonic_Get_status+0x8c> 2032d38: c4 3e 80 00 std %g2, [ %i2 ] /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) return false; 2032d3c: 82 10 20 00 clr %g1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 2032d40: b0 08 60 01 and %g1, 1, %i0 2032d44: 81 c7 e0 08 ret 2032d48: 81 e8 00 00 restore =============================================================================== 020330ac <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20330ac: 9d e3 bf 98 save %sp, -104, %sp 20330b0: 11 00 81 8a sethi %hi(0x2062800), %o0 20330b4: 92 10 00 18 mov %i0, %o1 20330b8: 90 12 22 50 or %o0, 0x250, %o0 20330bc: 7f ff 57 b9 call 2008fa0 <_Objects_Get> 20330c0: 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 ) { 20330c4: c2 07 bf fc ld [ %fp + -4 ], %g1 20330c8: 80 a0 60 00 cmp %g1, 0 20330cc: 12 80 00 25 bne 2033160 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 20330d0: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 20330d4: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 20330d8: 03 00 00 10 sethi %hi(0x4000), %g1 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 20330dc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 20330e0: 80 88 80 01 btst %g2, %g1 20330e4: 22 80 00 0b be,a 2033110 <_Rate_monotonic_Timeout+0x64> 20330e8: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 20330ec: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 20330f0: c2 07 60 08 ld [ %i5 + 8 ], %g1 20330f4: 80 a0 80 01 cmp %g2, %g1 20330f8: 32 80 00 06 bne,a 2033110 <_Rate_monotonic_Timeout+0x64> 20330fc: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2033100: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2033104: 7f ff 5a 73 call 2009ad0 <_Thread_Clear_state> 2033108: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 203310c: 30 80 00 06 b,a 2033124 <_Rate_monotonic_Timeout+0x78> _Thread_Unblock( the_thread ); _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 ) { 2033110: 80 a0 60 01 cmp %g1, 1 2033114: 12 80 00 0d bne 2033148 <_Rate_monotonic_Timeout+0x9c> 2033118: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 203311c: 82 10 20 03 mov 3, %g1 2033120: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2033124: 7f ff ff 53 call 2032e70 <_Rate_monotonic_Initiate_statistics> 2033128: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203312c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2033130: 11 00 81 88 sethi %hi(0x2062000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2033134: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2033138: 90 12 20 08 or %o0, 8, %o0 203313c: 7f ff 5e 90 call 200ab7c <_Watchdog_Insert> 2033140: 92 07 60 10 add %i5, 0x10, %o1 2033144: 30 80 00 02 b,a 203314c <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2033148: c2 27 60 38 st %g1, [ %i5 + 0x38 ] * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 203314c: 03 00 81 87 sethi %hi(0x2061c00), %g1 2033150: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 2061f60 <_Thread_Dispatch_disable_level> 2033154: 84 00 bf ff add %g2, -1, %g2 2033158: c4 20 63 60 st %g2, [ %g1 + 0x360 ] return _Thread_Dispatch_disable_level; 203315c: c2 00 63 60 ld [ %g1 + 0x360 ], %g1 2033160: 81 c7 e0 08 ret 2033164: 81 e8 00 00 restore =============================================================================== 02032d4c <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 2032d4c: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2032d50: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 2032d54: 82 00 60 01 inc %g1 2032d58: c2 26 20 58 st %g1, [ %i0 + 0x58 ] if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2032d5c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2032d60: 80 a0 60 04 cmp %g1, 4 2032d64: 12 80 00 05 bne 2032d78 <_Rate_monotonic_Update_statistics+0x2c> 2032d68: 90 10 00 18 mov %i0, %o0 stats->missed_count++; 2032d6c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 2032d70: 82 00 60 01 inc %g1 2032d74: c2 26 20 5c st %g1, [ %i0 + 0x5c ] /* * Grab status for time statistics. */ valid_status = 2032d78: 92 07 bf f8 add %fp, -8, %o1 2032d7c: 7f ff ff ce call 2032cb4 <_Rate_monotonic_Get_status> 2032d80: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 2032d84: 80 8a 20 ff btst 0xff, %o0 2032d88: 02 80 00 38 be 2032e68 <_Rate_monotonic_Update_statistics+0x11c> 2032d8c: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2032d90: f8 1e 20 70 ldd [ %i0 + 0x70 ], %i4 * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 2032d94: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2032d98: ba 87 40 03 addcc %i5, %g3, %i5 2032d9c: b8 47 00 02 addx %i4, %g2, %i4 2032da0: 80 a0 40 02 cmp %g1, %g2 2032da4: 14 80 00 09 bg 2032dc8 <_Rate_monotonic_Update_statistics+0x7c> 2032da8: f8 3e 20 70 std %i4, [ %i0 + 0x70 ] 2032dac: 80 a0 40 02 cmp %g1, %g2 2032db0: 32 80 00 08 bne,a 2032dd0 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN 2032db4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 2032db8: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 2032dbc: 80 a0 40 03 cmp %g1, %g3 2032dc0: 28 80 00 04 bleu,a 2032dd0 <_Rate_monotonic_Update_statistics+0x84> 2032dc4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 2032dc8: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2032dcc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 2032dd0: 80 a0 40 02 cmp %g1, %g2 2032dd4: 26 80 00 0a bl,a 2032dfc <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 2032dd8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 2032ddc: 80 a0 40 02 cmp %g1, %g2 2032de0: 32 80 00 08 bne,a 2032e00 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 2032de4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 2032de8: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 2032dec: 80 a0 40 03 cmp %g1, %g3 2032df0: 3a 80 00 04 bcc,a 2032e00 <_Rate_monotonic_Update_statistics+0xb4> 2032df4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 2032df8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 2032dfc: c4 1f bf f8 ldd [ %fp + -8 ], %g2 2032e00: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 2032e04: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2032e08: ba 87 40 03 addcc %i5, %g3, %i5 2032e0c: b8 47 00 02 addx %i4, %g2, %i4 2032e10: 80 a0 40 02 cmp %g1, %g2 2032e14: 14 80 00 09 bg 2032e38 <_Rate_monotonic_Update_statistics+0xec> 2032e18: f8 3e 20 88 std %i4, [ %i0 + 0x88 ] 2032e1c: 80 a0 40 02 cmp %g1, %g2 2032e20: 32 80 00 08 bne,a 2032e40 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN 2032e24: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2032e28: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 2032e2c: 80 a0 40 03 cmp %g1, %g3 2032e30: 28 80 00 04 bleu,a 2032e40 <_Rate_monotonic_Update_statistics+0xf4> 2032e34: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; 2032e38: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2032e3c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2032e40: 80 a0 40 02 cmp %g1, %g2 2032e44: 26 80 00 09 bl,a 2032e68 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 2032e48: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 2032e4c: 80 a0 40 02 cmp %g1, %g2 2032e50: 12 80 00 06 bne 2032e68 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 2032e54: 01 00 00 00 nop 2032e58: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2032e5c: 80 a0 40 03 cmp %g1, %g3 2032e60: 2a 80 00 02 bcs,a 2032e68 <_Rate_monotonic_Update_statistics+0x11c> 2032e64: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 2032e68: 81 c7 e0 08 ret 2032e6c: 81 e8 00 00 restore =============================================================================== 0200b50c <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200b50c: 9d e3 bf 98 save %sp, -104, %sp Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200b510: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200b514: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b518: 80 a0 40 09 cmp %g1, %o1 200b51c: 32 80 00 02 bne,a 200b524 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200b520: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200b524: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200b528: 80 a0 40 09 cmp %g1, %o1 200b52c: 02 80 00 04 be 200b53c <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200b530: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200b534: 40 00 01 8e call 200bb6c <_Thread_Change_priority> 200b538: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200b53c: fa 06 20 88 ld [ %i0 + 0x88 ], %i5 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200b540: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b544: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200b548: 80 a0 a0 00 cmp %g2, 0 200b54c: 02 80 00 09 be 200b570 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200b550: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200b554: d0 00 40 00 ld [ %g1 ], %o0 200b558: 7f ff ff d7 call 200b4b4 <_Scheduler_CBS_Get_server_id> 200b55c: 92 07 bf fc add %fp, -4, %o1 sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 200b560: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b564: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200b568: 9f c0 40 00 call %g1 200b56c: d0 07 bf fc ld [ %fp + -4 ], %o0 200b570: 81 c7 e0 08 ret 200b574: 81 e8 00 00 restore =============================================================================== 0200b114 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b114: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b118: c2 06 20 04 ld [ %i0 + 4 ], %g1 200b11c: 80 a0 60 00 cmp %g1, 0 200b120: 04 80 00 1d ble 200b194 <_Scheduler_CBS_Create_server+0x80> 200b124: 01 00 00 00 nop 200b128: c2 06 00 00 ld [ %i0 ], %g1 200b12c: 80 a0 60 00 cmp %g1, 0 200b130: 04 80 00 19 ble 200b194 <_Scheduler_CBS_Create_server+0x80> 200b134: 03 00 80 81 sethi %hi(0x2020400), %g1 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b138: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 20204bc <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list[i] ) 200b13c: 03 00 80 85 sethi %hi(0x2021400), %g1 200b140: c6 00 63 88 ld [ %g1 + 0x388 ], %g3 ! 2021788 <_Scheduler_CBS_Server_list> 200b144: 10 80 00 07 b 200b160 <_Scheduler_CBS_Create_server+0x4c> 200b148: 82 10 20 00 clr %g1 200b14c: c8 00 c0 1c ld [ %g3 + %i4 ], %g4 200b150: 80 a1 20 00 cmp %g4, 0 200b154: 02 80 00 14 be 200b1a4 <_Scheduler_CBS_Create_server+0x90> 200b158: 3b 00 80 85 sethi %hi(0x2021400), %i5 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b15c: 82 00 60 01 inc %g1 200b160: 80 a0 40 02 cmp %g1, %g2 200b164: 12 bf ff fa bne 200b14c <_Scheduler_CBS_Create_server+0x38> 200b168: b9 28 60 02 sll %g1, 2, %i4 if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 200b16c: 81 c7 e0 08 ret 200b170: 91 e8 3f e6 restore %g0, -26, %o0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b174: c4 20 60 04 st %g2, [ %g1 + 4 ] 200b178: c4 06 20 04 ld [ %i0 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200b17c: f2 20 60 0c st %i1, [ %g1 + 0xc ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b180: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200b184: 84 10 3f ff mov -1, %g2 200b188: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200b18c: 81 c7 e0 08 ret 200b190: 91 e8 20 00 restore %g0, 0, %o0 if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 200b194: 81 c7 e0 08 ret 200b198: 91 e8 3f ee restore %g0, -18, %o0 *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200b19c: 81 c7 e0 08 ret <== NOT EXECUTED 200b1a0: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 200b1a4: f6 07 63 88 ld [ %i5 + 0x388 ], %i3 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200b1a8: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200b1ac: 40 00 07 a9 call 200d050 <_Workspace_Allocate> 200b1b0: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200b1b4: c2 06 80 00 ld [ %i2 ], %g1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 200b1b8: d0 26 c0 1c st %o0, [ %i3 + %i4 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200b1bc: c4 07 63 88 ld [ %i5 + 0x388 ], %g2 200b1c0: 83 28 60 02 sll %g1, 2, %g1 200b1c4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200b1c8: 80 a0 60 00 cmp %g1, 0 200b1cc: 32 bf ff ea bne,a 200b174 <_Scheduler_CBS_Create_server+0x60><== ALWAYS TAKEN 200b1d0: c4 06 00 00 ld [ %i0 ], %g2 200b1d4: 30 bf ff f2 b,a 200b19c <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED =============================================================================== 0200b24c <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200b24c: 9d e3 bf 98 save %sp, -104, %sp Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 200b250: 90 10 00 19 mov %i1, %o0 200b254: 40 00 03 78 call 200c034 <_Thread_Get> 200b258: 92 07 bf fc add %fp, -4, %o1 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200b25c: ba 92 20 00 orcc %o0, 0, %i5 200b260: 02 80 00 05 be 200b274 <_Scheduler_CBS_Detach_thread+0x28> 200b264: 03 00 80 81 sethi %hi(0x2020400), %g1 _Thread_Enable_dispatch(); 200b268: 40 00 03 66 call 200c000 <_Thread_Enable_dispatch> 200b26c: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b270: 03 00 80 81 sethi %hi(0x2020400), %g1 200b274: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20204bc <_Scheduler_CBS_Maximum_servers> 200b278: 80 a6 00 01 cmp %i0, %g1 200b27c: 1a 80 00 1b bcc 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c> 200b280: 80 a7 60 00 cmp %i5, 0 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b284: 02 80 00 19 be 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c> 200b288: 03 00 80 85 sethi %hi(0x2021400), %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b28c: c2 00 63 88 ld [ %g1 + 0x388 ], %g1 ! 2021788 <_Scheduler_CBS_Server_list> 200b290: b1 2e 20 02 sll %i0, 2, %i0 200b294: c2 00 40 18 ld [ %g1 + %i0 ], %g1 200b298: 80 a0 60 00 cmp %g1, 0 200b29c: 02 80 00 11 be 200b2e0 <_Scheduler_CBS_Detach_thread+0x94> 200b2a0: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 200b2a4: c4 00 40 00 ld [ %g1 ], %g2 200b2a8: 80 a0 80 19 cmp %g2, %i1 200b2ac: 12 80 00 0f bne 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b2b0: 84 10 3f ff mov -1, %g2 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b2b4: c4 20 40 00 st %g2, [ %g1 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b2b8: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 200b2bc: c0 20 60 18 clr [ %g1 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b2c0: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 200b2c4: c2 27 60 78 st %g1, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b2c8: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 200b2cc: c2 27 60 7c st %g1, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b2d0: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 200b2d4: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] return SCHEDULER_CBS_OK; 200b2d8: 81 c7 e0 08 ret 200b2dc: 91 e8 20 00 restore %g0, 0, %o0 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 200b2e0: 81 c7 e0 08 ret 200b2e4: 91 e8 3f e7 restore %g0, -25, %o0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 200b2e8: 81 c7 e0 08 ret 200b2ec: 91 e8 3f ee restore %g0, -18, %o0 =============================================================================== 0200b578 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200b578: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); 200b57c: 3b 00 80 81 sethi %hi(0x2020400), %i5 200b580: d0 07 60 bc ld [ %i5 + 0xbc ], %o0 ! 20204bc <_Scheduler_CBS_Maximum_servers> } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200b584: 40 00 06 b3 call 200d050 <_Workspace_Allocate> 200b588: 91 2a 20 02 sll %o0, 2, %o0 200b58c: 05 00 80 85 sethi %hi(0x2021400), %g2 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200b590: 80 a2 20 00 cmp %o0, 0 200b594: 02 80 00 0d be 200b5c8 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN 200b598: d0 20 a3 88 st %o0, [ %g2 + 0x388 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b59c: c6 07 60 bc ld [ %i5 + 0xbc ], %g3 200b5a0: 10 80 00 05 b 200b5b4 <_Scheduler_CBS_Initialize+0x3c> 200b5a4: 82 10 20 00 clr %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b5a8: 89 28 60 02 sll %g1, 2, %g4 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b5ac: 82 00 60 01 inc %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b5b0: c0 27 40 04 clr [ %i5 + %g4 ] unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b5b4: 80 a0 40 03 cmp %g1, %g3 200b5b8: 12 bf ff fc bne 200b5a8 <_Scheduler_CBS_Initialize+0x30> 200b5bc: fa 00 a3 88 ld [ %g2 + 0x388 ], %i5 _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200b5c0: 81 c7 e0 08 ret 200b5c4: 91 e8 20 00 restore %g0, 0, %o0 } 200b5c8: 81 c7 e0 08 ret <== NOT EXECUTED 200b5cc: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED =============================================================================== 0200a1c0 <_Scheduler_CBS_Release_job>: { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 200a1c0: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 200a1c4: 80 a2 60 00 cmp %o1, 0 200a1c8: 02 80 00 10 be 200a208 <_Scheduler_CBS_Release_job+0x48> 200a1cc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 200a1d0: 80 a0 60 00 cmp %g1, 0 200a1d4: 02 80 00 08 be 200a1f4 <_Scheduler_CBS_Release_job+0x34> 200a1d8: 05 00 80 7d sethi %hi(0x201f400), %g2 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 200a1dc: d2 00 a3 e8 ld [ %g2 + 0x3e8 ], %o1 ! 201f7e8 <_Watchdog_Ticks_since_boot> 200a1e0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a1e4: 92 02 40 02 add %o1, %g2, %o1 200a1e8: 05 20 00 00 sethi %hi(0x80000000), %g2 200a1ec: 10 80 00 0a b 200a214 <_Scheduler_CBS_Release_job+0x54> 200a1f0: 92 2a 40 02 andn %o1, %g2, %o1 & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 200a1f4: c2 00 a3 e8 ld [ %g2 + 0x3e8 ], %g1 200a1f8: 92 02 40 01 add %o1, %g1, %o1 200a1fc: 03 20 00 00 sethi %hi(0x80000000), %g1 200a200: 10 80 00 07 b 200a21c <_Scheduler_CBS_Release_job+0x5c> 200a204: 92 2a 40 01 andn %o1, %g1, %o1 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) 200a208: 80 a0 60 00 cmp %g1, 0 200a20c: 02 80 00 04 be 200a21c <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN 200a210: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; 200a214: c2 00 60 08 ld [ %g1 + 8 ], %g1 200a218: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 200a21c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 200a220: 94 10 20 01 mov 1, %o2 200a224: 82 13 c0 00 mov %o7, %g1 200a228: 40 00 01 31 call 200a6ec <_Thread_Change_priority> 200a22c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200a230 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a230: 9d e3 bf a0 save %sp, -96, %sp Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 200a234: 40 00 00 57 call 200a390 <_Scheduler_EDF_Enqueue> 200a238: 90 10 00 18 mov %i0, %o0 /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 200a23c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a240: fa 00 60 18 ld [ %g1 + 0x18 ], %i5 * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { 200a244: 80 a7 60 00 cmp %i5, 0 200a248: 02 80 00 18 be 200a2a8 <_Scheduler_CBS_Unblock+0x78> 200a24c: 03 00 80 7d sethi %hi(0x201f400), %g1 time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a250: d2 07 60 04 ld [ %i5 + 4 ], %o1 */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - 200a254: d0 00 63 e8 ld [ %g1 + 0x3e8 ], %o0 200a258: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a25c: 40 00 3f c1 call 201a160 <.umul> 200a260: 90 27 00 08 sub %i4, %o0, %o0 200a264: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a268: b6 10 00 08 mov %o0, %i3 200a26c: 40 00 3f bd call 201a160 <.umul> 200a270: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a274: 80 a6 c0 08 cmp %i3, %o0 200a278: 24 80 00 0d ble,a 200a2ac <_Scheduler_CBS_Unblock+0x7c> 200a27c: 3b 00 80 7f sethi %hi(0x201fc00), %i5 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a280: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a284: 80 a7 00 09 cmp %i4, %o1 200a288: 32 80 00 02 bne,a 200a290 <_Scheduler_CBS_Unblock+0x60> 200a28c: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a290: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a294: 80 a0 40 09 cmp %g1, %o1 200a298: 02 80 00 04 be 200a2a8 <_Scheduler_CBS_Unblock+0x78> 200a29c: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200a2a0: 40 00 01 13 call 200a6ec <_Thread_Change_priority> 200a2a4: 94 10 20 01 mov 1, %o2 * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, 200a2a8: 3b 00 80 7f sethi %hi(0x201fc00), %i5 200a2ac: ba 17 60 20 or %i5, 0x20, %i5 ! 201fc20 <_Per_CPU_Information> 200a2b0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a2b4: 03 00 80 7a sethi %hi(0x201e800), %g1 200a2b8: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a2bc: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 200a2c0: 9f c0 40 00 call %g1 200a2c4: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 200a2c8: 80 a2 20 00 cmp %o0, 0 200a2cc: 04 80 00 0f ble 200a308 <_Scheduler_CBS_Unblock+0xd8> 200a2d0: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a2d4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 200a2d8: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a2dc: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a2e0: 80 a0 60 00 cmp %g1, 0 200a2e4: 12 80 00 06 bne 200a2fc <_Scheduler_CBS_Unblock+0xcc> 200a2e8: 84 10 20 01 mov 1, %g2 200a2ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a2f0: 80 a0 60 00 cmp %g1, 0 200a2f4: 12 80 00 05 bne 200a308 <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN 200a2f8: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a2fc: 03 00 80 7f sethi %hi(0x201fc00), %g1 200a300: 82 10 60 20 or %g1, 0x20, %g1 ! 201fc20 <_Per_CPU_Information> 200a304: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a308: 81 c7 e0 08 ret 200a30c: 81 e8 00 00 restore =============================================================================== 0200a310 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 200a310: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 200a314: 40 00 06 57 call 200bc70 <_Workspace_Allocate> 200a318: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 200a31c: 80 a2 20 00 cmp %o0, 0 200a320: 02 80 00 05 be 200a334 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 200a324: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 200a328: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 200a32c: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 200a330: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 200a334: 81 c7 e0 08 ret 200a338: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a388 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a388: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a38c: 7f ff ff ad call 200a240 <_Scheduler_EDF_Enqueue> 200a390: 90 10 00 18 mov %i0, %o0 * 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 ( _Scheduler_Is_priority_lower_than( 200a394: 3b 00 80 7e sethi %hi(0x201f800), %i5 200a398: ba 17 63 70 or %i5, 0x370, %i5 ! 201fb70 <_Per_CPU_Information> 200a39c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a3a0: 03 00 80 7a sethi %hi(0x201e800), %g1 200a3a4: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 200a3a8: c2 00 61 00 ld [ %g1 + 0x100 ], %g1 200a3ac: 9f c0 40 00 call %g1 200a3b0: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a3b4: 80 a2 20 00 cmp %o0, 0 200a3b8: 16 80 00 0f bge 200a3f4 <_Scheduler_EDF_Unblock+0x6c> 200a3bc: 01 00 00 00 nop _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a3c0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 200a3c4: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a3c8: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a3cc: 80 a0 60 00 cmp %g1, 0 200a3d0: 12 80 00 06 bne 200a3e8 <_Scheduler_EDF_Unblock+0x60> 200a3d4: 84 10 20 01 mov 1, %g2 200a3d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a3dc: 80 a0 60 00 cmp %g1, 0 200a3e0: 12 80 00 05 bne 200a3f4 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN 200a3e4: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a3e8: 03 00 80 7e sethi %hi(0x201f800), %g1 200a3ec: 82 10 63 70 or %g1, 0x370, %g1 ! 201fb70 <_Per_CPU_Information> 200a3f0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a3f4: 81 c7 e0 08 ret 200a3f8: 81 e8 00 00 restore =============================================================================== 02009a7c <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 2009a7c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *executing; executing = _Thread_Executing; 2009a80: 03 00 80 78 sethi %hi(0x201e000), %g1 2009a84: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 ! 201e02c <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2009a88: c2 0f 60 70 ldub [ %i5 + 0x70 ], %g1 2009a8c: 80 a0 60 00 cmp %g1, 0 2009a90: 02 80 00 25 be 2009b24 <_Scheduler_priority_Tick+0xa8> 2009a94: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2009a98: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2009a9c: 80 a0 60 00 cmp %g1, 0 2009aa0: 12 80 00 21 bne 2009b24 <_Scheduler_priority_Tick+0xa8> 2009aa4: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2009aa8: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2009aac: 80 a0 60 01 cmp %g1, 1 2009ab0: 0a 80 00 14 bcs 2009b00 <_Scheduler_priority_Tick+0x84> 2009ab4: 80 a0 60 02 cmp %g1, 2 2009ab8: 28 80 00 07 bleu,a 2009ad4 <_Scheduler_priority_Tick+0x58> 2009abc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 2009ac0: 80 a0 60 03 cmp %g1, 3 2009ac4: 12 80 00 18 bne 2009b24 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN 2009ac8: 01 00 00 00 nop } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2009acc: 10 80 00 0f b 2009b08 <_Scheduler_priority_Tick+0x8c> 2009ad0: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 2009ad4: 82 00 7f ff add %g1, -1, %g1 2009ad8: 80 a0 60 00 cmp %g1, 0 2009adc: 14 80 00 09 bg 2009b00 <_Scheduler_priority_Tick+0x84> 2009ae0: c2 27 60 74 st %g1, [ %i5 + 0x74 ] * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 2009ae4: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009ae8: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 201cdfc <_Scheduler+0xc> 2009aec: 9f c0 40 00 call %g1 2009af0: 01 00 00 00 nop * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009af4: 03 00 80 76 sethi %hi(0x201d800), %g1 2009af8: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 201da50 <_Thread_Ticks_per_timeslice> 2009afc: c2 27 60 74 st %g1, [ %i5 + 0x74 ] 2009b00: 81 c7 e0 08 ret 2009b04: 81 e8 00 00 restore } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2009b08: 82 00 7f ff add %g1, -1, %g1 2009b0c: 80 a0 60 00 cmp %g1, 0 2009b10: 12 bf ff fc bne 2009b00 <_Scheduler_priority_Tick+0x84> 2009b14: c2 27 60 74 st %g1, [ %i5 + 0x74 ] (*executing->budget_callout)( executing ); 2009b18: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 2009b1c: 9f c0 40 00 call %g1 2009b20: 90 10 00 1d mov %i5, %o0 2009b24: 81 c7 e0 08 ret 2009b28: 81 e8 00 00 restore =============================================================================== 020086ac <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 20086ac: 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 / 20086b0: 03 00 80 7d sethi %hi(0x201f400), %g1 20086b4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 ! 201f41c 20086b8: 11 00 03 d0 sethi %hi(0xf4000), %o0 20086bc: 40 00 48 90 call 201a8fc <.udiv> 20086c0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 20086c4: 80 a6 20 00 cmp %i0, 0 20086c8: 02 80 00 28 be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN 20086cc: 84 10 20 00 clr %g2 20086d0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20086d4: 80 a0 40 08 cmp %g1, %o0 20086d8: 3a 80 00 25 bcc,a 200876c <_TOD_Validate+0xc0> 20086dc: b0 08 a0 01 and %g2, 1, %i0 (the_tod->ticks >= ticks_per_second) || 20086e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20086e4: 80 a0 60 3b cmp %g1, 0x3b 20086e8: 38 80 00 21 bgu,a 200876c <_TOD_Validate+0xc0> 20086ec: b0 08 a0 01 and %g2, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20086f0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20086f4: 80 a0 60 3b cmp %g1, 0x3b 20086f8: 38 80 00 1d bgu,a 200876c <_TOD_Validate+0xc0> 20086fc: b0 08 a0 01 and %g2, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2008700: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008704: 80 a0 60 17 cmp %g1, 0x17 2008708: 38 80 00 19 bgu,a 200876c <_TOD_Validate+0xc0> 200870c: b0 08 a0 01 and %g2, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 2008710: c2 06 20 04 ld [ %i0 + 4 ], %g1 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 2008714: 80 a0 60 00 cmp %g1, 0 2008718: 02 80 00 14 be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN 200871c: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 2008720: 38 80 00 13 bgu,a 200876c <_TOD_Validate+0xc0> 2008724: b0 08 a0 01 and %g2, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2008728: c8 06 00 00 ld [ %i0 ], %g4 (the_tod->ticks >= ticks_per_second) || (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) || 200872c: 80 a1 27 c3 cmp %g4, 0x7c3 2008730: 28 80 00 0f bleu,a 200876c <_TOD_Validate+0xc0> 2008734: b0 08 a0 01 and %g2, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 2008738: c6 06 20 08 ld [ %i0 + 8 ], %g3 (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) || 200873c: 80 a0 e0 00 cmp %g3, 0 2008740: 02 80 00 0a be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN 2008744: 80 89 20 03 btst 3, %g4 2008748: 05 00 80 77 sethi %hi(0x201dc00), %g2 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 200874c: 12 80 00 03 bne 2008758 <_TOD_Validate+0xac> 2008750: 84 10 a2 58 or %g2, 0x258, %g2 ! 201de58 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2008754: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2008758: 83 28 60 02 sll %g1, 2, %g1 200875c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( the_tod->day > days_in_month ) 2008760: 80 a0 40 03 cmp %g1, %g3 2008764: 84 60 3f ff subx %g0, -1, %g2 return false; return true; } 2008768: b0 08 a0 01 and %g2, 1, %i0 200876c: 81 c7 e0 08 ret 2008770: 81 e8 00 00 restore =============================================================================== 02009d38 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2009d38: 9d e3 bf a0 save %sp, -96, %sp 2009d3c: ba 10 00 18 mov %i0, %i5 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2009d40: f0 06 20 10 ld [ %i0 + 0x10 ], %i0 /* * 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 ); 2009d44: 40 00 03 6a call 200aaec <_Thread_Set_transient> 2009d48: 90 10 00 1d mov %i5, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2009d4c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 2009d50: 80 a0 40 19 cmp %g1, %i1 2009d54: 02 80 00 04 be 2009d64 <_Thread_Change_priority+0x2c> 2009d58: 90 10 00 1d mov %i5, %o0 _Thread_Set_priority( the_thread, new_priority ); 2009d5c: 40 00 03 4b call 200aa88 <_Thread_Set_priority> 2009d60: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 2009d64: 7f ff e2 58 call 20026c4 2009d68: 01 00 00 00 nop 2009d6c: b6 10 00 08 mov %o0, %i3 /* * 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; 2009d70: f8 07 60 10 ld [ %i5 + 0x10 ], %i4 if ( state != STATES_TRANSIENT ) { 2009d74: 80 a7 20 04 cmp %i4, 4 2009d78: 02 80 00 10 be 2009db8 <_Thread_Change_priority+0x80> 2009d7c: 82 0e 20 04 and %i0, 4, %g1 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2009d80: 80 a0 60 00 cmp %g1, 0 2009d84: 12 80 00 03 bne 2009d90 <_Thread_Change_priority+0x58> <== NEVER TAKEN 2009d88: 82 0f 3f fb and %i4, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2009d8c: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2009d90: 7f ff e2 51 call 20026d4 2009d94: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2009d98: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009d9c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009da0: 80 8f 00 01 btst %i4, %g1 2009da4: 02 80 00 28 be 2009e44 <_Thread_Change_priority+0x10c> 2009da8: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2009dac: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2009db0: 40 00 03 08 call 200a9d0 <_Thread_queue_Requeue> 2009db4: 93 e8 00 1d restore %g0, %i5, %o1 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 2009db8: 80 a0 60 00 cmp %g1, 0 2009dbc: 12 80 00 0b bne 2009de8 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2009dc0: 03 00 80 73 sethi %hi(0x201cc00), %g1 * 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 ); 2009dc4: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2009dc8: 80 a6 a0 00 cmp %i2, 0 2009dcc: 02 80 00 04 be 2009ddc <_Thread_Change_priority+0xa4> 2009dd0: 82 10 61 f0 or %g1, 0x1f0, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2009dd4: 10 80 00 03 b 2009de0 <_Thread_Change_priority+0xa8> 2009dd8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2009ddc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2009de0: 9f c0 40 00 call %g1 2009de4: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2009de8: 7f ff e2 3b call 20026d4 2009dec: 90 10 00 1b mov %i3, %o0 2009df0: 7f ff e2 35 call 20026c4 2009df4: 01 00 00 00 nop 2009df8: b0 10 00 08 mov %o0, %i0 * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 2009dfc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009e00: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 201cdf8 <_Scheduler+0x8> 2009e04: 9f c0 40 00 call %g1 2009e08: 01 00 00 00 nop * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 2009e0c: 03 00 80 78 sethi %hi(0x201e000), %g1 2009e10: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information> 2009e14: c4 00 60 0c ld [ %g1 + 0xc ], %g2 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 2009e18: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009e1c: 80 a0 80 03 cmp %g2, %g3 2009e20: 02 80 00 07 be 2009e3c <_Thread_Change_priority+0x104> 2009e24: 01 00 00 00 nop 2009e28: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 2009e2c: 80 a0 a0 00 cmp %g2, 0 2009e30: 02 80 00 03 be 2009e3c <_Thread_Change_priority+0x104> 2009e34: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2009e38: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2009e3c: 7f ff e2 26 call 20026d4 2009e40: 81 e8 00 00 restore 2009e44: 81 c7 e0 08 ret 2009e48: 81 e8 00 00 restore =============================================================================== 0200a038 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a038: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a03c: 90 10 00 18 mov %i0, %o0 200a040: 40 00 00 70 call 200a200 <_Thread_Get> 200a044: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a048: c2 07 bf fc ld [ %fp + -4 ], %g1 200a04c: 80 a0 60 00 cmp %g1, 0 200a050: 12 80 00 09 bne 200a074 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 200a054: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 200a058: 7f ff ff 7d call 2009e4c <_Thread_Clear_state> 200a05c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200a060: 03 00 80 76 sethi %hi(0x201d800), %g1 200a064: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 200a068: 84 00 bf ff add %g2, -1, %g2 200a06c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 200a070: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 200a074: 81 c7 e0 08 ret 200a078: 81 e8 00 00 restore =============================================================================== 0200a07c <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 200a07c: 9d e3 bf 98 save %sp, -104, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200a080: 03 00 80 76 sethi %hi(0x201d800), %g1 200a084: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 200a088: 84 00 a0 01 inc %g2 200a08c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 200a090: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 200a094: 21 00 80 78 sethi %hi(0x201e000), %l0 200a098: 82 14 20 20 or %l0, 0x20, %g1 ! 201e020 <_Per_CPU_Information> _ISR_Disable( level ); 200a09c: 7f ff e1 8a call 20026c4 200a0a0: f2 00 60 0c ld [ %g1 + 0xc ], %i1 #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; 200a0a4: 25 00 80 76 sethi %hi(0x201d800), %l2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a0a8: 27 00 80 76 sethi %hi(0x201d800), %l3 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 200a0ac: 10 80 00 42 b 200a1b4 <_Thread_Dispatch+0x138> 200a0b0: 23 00 80 76 sethi %hi(0x201d800), %l1 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 200a0b4: c0 28 60 18 clrb [ %g1 + 0x18 ] /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 200a0b8: 80 a6 00 19 cmp %i0, %i1 200a0bc: 12 80 00 0d bne 200a0f0 <_Thread_Dispatch+0x74> 200a0c0: f0 20 60 0c st %i0, [ %g1 + 0xc ] _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 200a0c4: 7f ff e1 84 call 20026d4 200a0c8: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200a0cc: 03 00 80 76 sethi %hi(0x201d800), %g1 200a0d0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 200a0d4: 84 00 bf ff add %g2, -1, %g2 200a0d8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 200a0dc: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 200a0e0: 7f ff f8 5d call 2008254 <_API_extensions_Run_postswitch> 200a0e4: 01 00 00 00 nop 200a0e8: 81 c7 e0 08 ret 200a0ec: 81 e8 00 00 restore */ #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 ) 200a0f0: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 200a0f4: 80 a0 60 01 cmp %g1, 1 200a0f8: 12 80 00 03 bne 200a104 <_Thread_Dispatch+0x88> 200a0fc: c2 04 a2 50 ld [ %l2 + 0x250 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a100: c2 26 20 74 st %g1, [ %i0 + 0x74 ] _ISR_Enable( level ); 200a104: 7f ff e1 74 call 20026d4 200a108: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 200a10c: 40 00 0d 1a call 200d574 <_TOD_Get_uptime> 200a110: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_Subtract( 200a114: c4 1f bf f8 ldd [ %fp + -8 ], %g2 200a118: 82 14 20 20 or %l0, 0x20, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a11c: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4 200a120: b6 a0 c0 1d subcc %g3, %i5, %i3 200a124: b4 60 80 1c subx %g2, %i4, %i2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a128: f8 1e 60 80 ldd [ %i1 + 0x80 ], %i4 200a12c: ba 87 40 1b addcc %i5, %i3, %i5 200a130: b8 47 00 1a addx %i4, %i2, %i4 200a134: f8 3e 60 80 std %i4, [ %i1 + 0x80 ] &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 200a138: c4 38 60 20 std %g2, [ %g1 + 0x20 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a13c: c2 04 e3 6c ld [ %l3 + 0x36c ], %g1 200a140: 80 a0 60 00 cmp %g1, 0 200a144: 02 80 00 06 be 200a15c <_Thread_Dispatch+0xe0> <== NEVER TAKEN 200a148: 90 10 00 19 mov %i1, %o0 executing->libc_reent = *_Thread_libc_reent; 200a14c: c4 00 40 00 ld [ %g1 ], %g2 200a150: c4 26 61 54 st %g2, [ %i1 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 200a154: c4 06 21 54 ld [ %i0 + 0x154 ], %g2 200a158: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 200a15c: 40 00 03 58 call 200aebc <_User_extensions_Thread_switch> 200a160: 92 10 00 18 mov %i0, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 200a164: 90 06 60 c8 add %i1, 0xc8, %o0 200a168: 40 00 04 83 call 200b374 <_CPU_Context_switch> 200a16c: 92 06 20 c8 add %i0, 0xc8, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200a170: c2 06 61 50 ld [ %i1 + 0x150 ], %g1 200a174: 80 a0 60 00 cmp %g1, 0 200a178: 02 80 00 0c be 200a1a8 <_Thread_Dispatch+0x12c> 200a17c: d0 04 63 68 ld [ %l1 + 0x368 ], %o0 200a180: 80 a6 40 08 cmp %i1, %o0 200a184: 02 80 00 09 be 200a1a8 <_Thread_Dispatch+0x12c> 200a188: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200a18c: 02 80 00 04 be 200a19c <_Thread_Dispatch+0x120> 200a190: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200a194: 40 00 04 3e call 200b28c <_CPU_Context_save_fp> 200a198: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 200a19c: 40 00 04 59 call 200b300 <_CPU_Context_restore_fp> 200a1a0: 90 06 61 50 add %i1, 0x150, %o0 _Thread_Allocated_fp = executing; 200a1a4: f2 24 63 68 st %i1, [ %l1 + 0x368 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 200a1a8: 82 14 20 20 or %l0, 0x20, %g1 _ISR_Disable( level ); 200a1ac: 7f ff e1 46 call 20026c4 200a1b0: f2 00 60 0c ld [ %g1 + 0xc ], %i1 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 200a1b4: 82 14 20 20 or %l0, 0x20, %g1 200a1b8: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 200a1bc: 80 a0 a0 00 cmp %g2, 0 200a1c0: 32 bf ff bd bne,a 200a0b4 <_Thread_Dispatch+0x38> 200a1c4: f0 00 60 10 ld [ %g1 + 0x10 ], %i0 200a1c8: 30 bf ff bf b,a 200a0c4 <_Thread_Dispatch+0x48> =============================================================================== 0200f7cc <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200f7cc: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200f7d0: 03 00 80 78 sethi %hi(0x201e000), %g1 200f7d4: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 ! 201e02c <_Per_CPU_Information+0xc> /* * 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(); 200f7d8: 3f 00 80 3d sethi %hi(0x200f400), %i7 200f7dc: be 17 e3 cc or %i7, 0x3cc, %i7 ! 200f7cc <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200f7e0: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 200f7e4: 7f ff cb bc call 20026d4 200f7e8: 91 2a 20 08 sll %o0, 8, %o0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200f7ec: 03 00 80 75 sethi %hi(0x201d400), %g1 doneConstructors = true; 200f7f0: 84 10 20 01 mov 1, %g2 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200f7f4: f8 08 62 f0 ldub [ %g1 + 0x2f0 ], %i4 doneConstructors = true; 200f7f8: c4 28 62 f0 stb %g2, [ %g1 + 0x2f0 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200f7fc: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200f800: 80 a0 60 00 cmp %g1, 0 200f804: 02 80 00 0c be 200f834 <_Thread_Handler+0x68> 200f808: 03 00 80 76 sethi %hi(0x201d800), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200f80c: d0 00 63 68 ld [ %g1 + 0x368 ], %o0 ! 201db68 <_Thread_Allocated_fp> 200f810: 80 a7 40 08 cmp %i5, %o0 200f814: 02 80 00 08 be 200f834 <_Thread_Handler+0x68> 200f818: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200f81c: 22 80 00 06 be,a 200f834 <_Thread_Handler+0x68> 200f820: fa 20 63 68 st %i5, [ %g1 + 0x368 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200f824: 7f ff ee 9a call 200b28c <_CPU_Context_save_fp> 200f828: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200f82c: 03 00 80 76 sethi %hi(0x201d800), %g1 200f830: fa 20 63 68 st %i5, [ %g1 + 0x368 ] ! 201db68 <_Thread_Allocated_fp> /* * 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 ); 200f834: 7f ff ed 2d call 200ace8 <_User_extensions_Thread_begin> 200f838: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200f83c: 7f ff ea 64 call 200a1cc <_Thread_Enable_dispatch> 200f840: 01 00 00 00 nop /* * _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 (doCons) /* && (volatile void *)_init) */ { 200f844: 80 8f 20 ff btst 0xff, %i4 200f848: 32 80 00 05 bne,a 200f85c <_Thread_Handler+0x90> 200f84c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 INIT_NAME (); 200f850: 40 00 35 1a call 201ccb8 <_init> 200f854: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f858: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200f85c: 80 a0 60 00 cmp %g1, 0 200f860: 12 80 00 05 bne 200f874 <_Thread_Handler+0xa8> 200f864: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200f868: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200f86c: 10 80 00 06 b 200f884 <_Thread_Handler+0xb8> 200f870: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 200f874: 12 80 00 07 bne 200f890 <_Thread_Handler+0xc4> <== NEVER TAKEN 200f878: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200f87c: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200f880: d0 07 60 94 ld [ %i5 + 0x94 ], %o0 200f884: 9f c0 40 00 call %g1 200f888: 01 00 00 00 nop executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 200f88c: d0 27 60 28 st %o0, [ %i5 + 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 ); 200f890: 7f ff ed 27 call 200ad2c <_User_extensions_Thread_exitted> 200f894: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200f898: 90 10 20 00 clr %o0 200f89c: 92 10 20 01 mov 1, %o1 200f8a0: 7f ff e5 0b call 2008ccc <_Internal_error_Occurred> 200f8a4: 94 10 20 05 mov 5, %o2 =============================================================================== 0200a4b0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 200a4b0: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200a4b4: 03 00 80 73 sethi %hi(0x201cc00), %g1 200a4b8: 82 10 60 fc or %g1, 0xfc, %g1 ! 201ccfc #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a4bc: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 * Output parameters: NONE */ void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200a4c0: fa 00 60 18 ld [ %g1 + 0x18 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200a4c4: f8 00 60 0c ld [ %g1 + 0xc ], %i4 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a4c8: 80 a0 e0 00 cmp %g3, 0 200a4cc: 02 80 00 06 be 200a4e4 <_Thread_Handler_initialization+0x34> 200a4d0: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 200a4d4: c6 00 60 30 ld [ %g1 + 0x30 ], %g3 200a4d8: 80 a0 e0 00 cmp %g3, 0 200a4dc: 12 80 00 06 bne 200a4f4 <_Thread_Handler_initialization+0x44><== ALWAYS TAKEN 200a4e0: 80 a0 a0 00 cmp %g2, 0 rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200a4e4: 90 10 20 00 clr %o0 200a4e8: 92 10 20 01 mov 1, %o1 200a4ec: 7f ff f9 f8 call 2008ccc <_Internal_error_Occurred> 200a4f0: 94 10 20 0e mov 0xe, %o2 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200a4f4: 22 80 00 05 be,a 200a508 <_Thread_Handler_initialization+0x58> 200a4f8: 03 00 80 78 sethi %hi(0x201e000), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200a4fc: 9f c0 80 00 call %g2 200a500: d0 00 60 08 ld [ %g1 + 8 ], %o0 ! 201e008 <_RTEMS_Objects+0x1c> _Thread_Dispatch_necessary = false; 200a504: 03 00 80 78 sethi %hi(0x201e000), %g1 200a508: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information> 200a50c: c0 28 60 18 clrb [ %g1 + 0x18 ] _Thread_Executing = NULL; 200a510: c0 20 60 0c clr [ %g1 + 0xc ] _Thread_Heir = NULL; 200a514: c0 20 60 10 clr [ %g1 + 0x10 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200a518: 03 00 80 76 sethi %hi(0x201d800), %g1 200a51c: c0 20 63 68 clr [ %g1 + 0x368 ] ! 201db68 <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200a520: 03 00 80 76 sethi %hi(0x201d800), %g1 200a524: f8 20 63 70 st %i4, [ %g1 + 0x370 ] ! 201db70 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200a528: 03 00 80 76 sethi %hi(0x201d800), %g1 200a52c: fa 20 62 50 st %i5, [ %g1 + 0x250 ] ! 201da50 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200a530: 82 10 20 08 mov 8, %g1 200a534: 11 00 80 76 sethi %hi(0x201d800), %o0 200a538: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200a53c: 90 12 23 f0 or %o0, 0x3f0, %o0 200a540: 92 10 20 01 mov 1, %o1 200a544: 94 10 20 01 mov 1, %o2 200a548: 96 10 20 01 mov 1, %o3 200a54c: 98 10 21 68 mov 0x168, %o4 200a550: 7f ff fb 67 call 20092ec <_Objects_Initialize_information> 200a554: 9a 10 20 00 clr %o5 200a558: 81 c7 e0 08 ret 200a55c: 81 e8 00 00 restore =============================================================================== 0200a2b4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a2b4: 9d e3 bf a0 save %sp, -96, %sp 200a2b8: 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; 200a2bc: c0 26 61 58 clr [ %i1 + 0x158 ] 200a2c0: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a2c4: c0 26 61 54 clr [ %i1 + 0x154 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a2c8: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 200a2cc: e2 00 40 00 ld [ %g1 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 200a2d0: 80 a6 a0 00 cmp %i2, 0 200a2d4: 12 80 00 0d bne 200a308 <_Thread_Initialize+0x54> 200a2d8: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200a2dc: 90 10 00 19 mov %i1, %o0 200a2e0: 40 00 02 12 call 200ab28 <_Thread_Stack_Allocate> 200a2e4: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a2e8: 80 a2 00 1b cmp %o0, %i3 200a2ec: 0a 80 00 6d bcs 200a4a0 <_Thread_Initialize+0x1ec> 200a2f0: 80 a2 20 00 cmp %o0, 0 200a2f4: 02 80 00 6b be 200a4a0 <_Thread_Initialize+0x1ec> <== NEVER TAKEN 200a2f8: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 200a2fc: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2 the_thread->Start.core_allocated_stack = true; 200a300: 10 80 00 04 b 200a310 <_Thread_Initialize+0x5c> 200a304: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 200a308: c0 2e 60 b0 clrb [ %i1 + 0xb0 ] 200a30c: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a310: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ] the_stack->size = size; 200a314: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200a318: 80 a7 20 00 cmp %i4, 0 200a31c: 02 80 00 07 be 200a338 <_Thread_Initialize+0x84> 200a320: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200a324: 40 00 03 be call 200b21c <_Workspace_Allocate> 200a328: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a32c: b6 92 20 00 orcc %o0, 0, %i3 200a330: 22 80 00 4d be,a 200a464 <_Thread_Initialize+0x1b0> 200a334: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a338: 03 00 80 76 sethi %hi(0x201d800), %g1 200a33c: d0 00 63 70 ld [ %g1 + 0x370 ], %o0 ! 201db70 <_Thread_Maximum_extensions> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 200a340: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 200a344: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a348: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a34c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a350: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 200a354: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a358: 80 a2 20 00 cmp %o0, 0 200a35c: 02 80 00 08 be 200a37c <_Thread_Initialize+0xc8> 200a360: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 200a364: 90 02 20 01 inc %o0 200a368: 40 00 03 ad call 200b21c <_Workspace_Allocate> 200a36c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200a370: b8 92 20 00 orcc %o0, 0, %i4 200a374: 02 80 00 3d be 200a468 <_Thread_Initialize+0x1b4> 200a378: b4 10 20 00 clr %i2 * 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 ) { 200a37c: 80 a7 20 00 cmp %i4, 0 200a380: 12 80 00 0a bne 200a3a8 <_Thread_Initialize+0xf4> 200a384: f8 26 61 60 st %i4, [ %i1 + 0x160 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a388: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a38c: e4 2e 60 9c stb %l2, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 200a390: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 200a394: 80 a4 20 02 cmp %l0, 2 200a398: 12 80 00 12 bne 200a3e0 <_Thread_Initialize+0x12c> 200a39c: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a3a0: 10 80 00 0e b 200a3d8 <_Thread_Initialize+0x124> 200a3a4: 03 00 80 76 sethi %hi(0x201d800), %g1 * 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++ ) 200a3a8: 03 00 80 76 sethi %hi(0x201d800), %g1 200a3ac: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 201db70 <_Thread_Maximum_extensions> 200a3b0: 10 80 00 05 b 200a3c4 <_Thread_Initialize+0x110> 200a3b4: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 200a3b8: 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++ ) 200a3bc: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 200a3c0: 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++ ) 200a3c4: 80 a0 40 02 cmp %g1, %g2 200a3c8: 28 bf ff fc bleu,a 200a3b8 <_Thread_Initialize+0x104> 200a3cc: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a3d0: 10 bf ff ef b 200a38c <_Thread_Initialize+0xd8> 200a3d4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a3d8: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 200a3dc: c2 26 60 74 st %g1, [ %i1 + 0x74 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a3e0: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 200a3e4: c0 26 60 44 clr [ %i1 + 0x44 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a3e8: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 200a3ec: 82 10 20 01 mov 1, %g1 200a3f0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a3f4: 03 00 80 73 sethi %hi(0x201cc00), %g1 200a3f8: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 201ce08 <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 200a3fc: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 200a400: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a404: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a408: 9f c0 40 00 call %g1 200a40c: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a410: b4 92 20 00 orcc %o0, 0, %i2 200a414: 02 80 00 15 be 200a468 <_Thread_Initialize+0x1b4> 200a418: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 200a41c: 40 00 01 9b call 200aa88 <_Thread_Set_priority> 200a420: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a424: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200a428: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200a42c: c0 26 60 80 clr [ %i1 + 0x80 ] 200a430: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a434: 83 28 60 02 sll %g1, 2, %g1 200a438: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a43c: e2 26 60 0c st %l1, [ %i1 + 0xc ] * 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 ); 200a440: 90 10 00 19 mov %i1, %o0 200a444: 40 00 02 5d call 200adb8 <_User_extensions_Thread_create> 200a448: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200a44c: 80 8a 20 ff btst 0xff, %o0 200a450: 02 80 00 06 be 200a468 <_Thread_Initialize+0x1b4> 200a454: 01 00 00 00 nop 200a458: b0 0e 20 01 and %i0, 1, %i0 200a45c: 81 c7 e0 08 ret 200a460: 81 e8 00 00 restore size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 200a464: b4 10 20 00 clr %i2 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 200a468: 40 00 03 75 call 200b23c <_Workspace_Free> 200a46c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a470: 40 00 03 73 call 200b23c <_Workspace_Free> 200a474: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 200a478: 40 00 03 71 call 200b23c <_Workspace_Free> 200a47c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 200a480: 40 00 03 6f call 200b23c <_Workspace_Free> 200a484: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a488: 40 00 03 6d call 200b23c <_Workspace_Free> 200a48c: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a490: 40 00 03 6b call 200b23c <_Workspace_Free> 200a494: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 200a498: 40 00 01 b4 call 200ab68 <_Thread_Stack_Free> 200a49c: 90 10 00 19 mov %i1, %o0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 200a4a0: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 200a4a4: b0 0e 20 01 and %i0, 1, %i0 200a4a8: 81 c7 e0 08 ret 200a4ac: 81 e8 00 00 restore =============================================================================== 0200ab68 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200ab68: 9d e3 bf a0 save %sp, -96, %sp #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200ab6c: c4 0e 20 b0 ldub [ %i0 + 0xb0 ], %g2 void _Thread_Stack_Free( Thread_Control *the_thread ) { rtems_stack_free_hook stack_free_hook = 200ab70: 03 00 80 73 sethi %hi(0x201cc00), %g1 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200ab74: 80 a0 a0 00 cmp %g2, 0 200ab78: 02 80 00 04 be 200ab88 <_Thread_Stack_Free+0x20> <== NEVER TAKEN 200ab7c: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 200ab80: 9f c0 40 00 call %g1 200ab84: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0 200ab88: 81 c7 e0 08 ret 200ab8c: 81 e8 00 00 restore =============================================================================== 0200a9d0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200a9d0: 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 ) 200a9d4: 80 a6 20 00 cmp %i0, 0 200a9d8: 02 80 00 19 be 200aa3c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a9dc: 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 ) { 200a9e0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 200a9e4: 80 a7 60 01 cmp %i5, 1 200a9e8: 12 80 00 15 bne 200aa3c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a9ec: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200a9f0: 7f ff df 35 call 20026c4 200a9f4: 01 00 00 00 nop 200a9f8: b8 10 00 08 mov %o0, %i4 200a9fc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200aa00: 03 00 00 ef sethi %hi(0x3bc00), %g1 200aa04: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200aa08: 80 88 80 01 btst %g2, %g1 200aa0c: 02 80 00 0a be 200aa34 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 200aa10: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200aa14: 92 10 00 19 mov %i1, %o1 200aa18: 94 10 20 01 mov 1, %o2 200aa1c: 40 00 0c b1 call 200dce0 <_Thread_queue_Extract_priority_helper> 200aa20: fa 26 20 30 st %i5, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200aa24: 90 10 00 18 mov %i0, %o0 200aa28: 92 10 00 19 mov %i1, %o1 200aa2c: 7f ff ff 50 call 200a76c <_Thread_queue_Enqueue_priority> 200aa30: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200aa34: 7f ff df 28 call 20026d4 200aa38: 90 10 00 1c mov %i4, %o0 200aa3c: 81 c7 e0 08 ret 200aa40: 81 e8 00 00 restore =============================================================================== 0200aa44 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200aa44: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200aa48: 90 10 00 18 mov %i0, %o0 200aa4c: 7f ff fd ed call 200a200 <_Thread_Get> 200aa50: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200aa54: c2 07 bf fc ld [ %fp + -4 ], %g1 200aa58: 80 a0 60 00 cmp %g1, 0 200aa5c: 12 80 00 09 bne 200aa80 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200aa60: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200aa64: 40 00 0c d6 call 200ddbc <_Thread_queue_Process_timeout> 200aa68: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200aa6c: 03 00 80 76 sethi %hi(0x201d800), %g1 200aa70: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 200aa74: 84 00 bf ff add %g2, -1, %g2 200aa78: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 200aa7c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 200aa80: 81 c7 e0 08 ret 200aa84: 81 e8 00 00 restore =============================================================================== 02018c9c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2018c9c: 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; 2018ca0: 27 00 80 f3 sethi %hi(0x203cc00), %l3 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2018ca4: a4 07 bf e8 add %fp, -24, %l2 2018ca8: aa 07 bf ec add %fp, -20, %l5 2018cac: b8 07 bf f4 add %fp, -12, %i4 2018cb0: b2 07 bf f8 add %fp, -8, %i1 2018cb4: ea 27 bf e8 st %l5, [ %fp + -24 ] head->previous = NULL; 2018cb8: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2018cbc: e4 27 bf f0 st %l2, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2018cc0: f2 27 bf f4 st %i1, [ %fp + -12 ] head->previous = NULL; 2018cc4: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2018cc8: f8 27 bf fc st %i4, [ %fp + -4 ] */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018ccc: b4 06 20 30 add %i0, 0x30, %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(); 2018cd0: 29 00 80 f3 sethi %hi(0x203cc00), %l4 /* * 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 ); 2018cd4: b6 06 20 68 add %i0, 0x68, %i3 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2018cd8: a2 06 20 08 add %i0, 8, %l1 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2018cdc: a0 06 20 40 add %i0, 0x40, %l0 { /* * 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; 2018ce0: e4 26 20 78 st %l2, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2018ce4: c2 04 e2 78 ld [ %l3 + 0x278 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2018ce8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018cec: 90 10 00 1a mov %i2, %o0 2018cf0: 92 20 40 09 sub %g1, %o1, %o1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2018cf4: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018cf8: 40 00 11 97 call 201d354 <_Watchdog_Adjust_to_chain> 2018cfc: 94 10 00 1c mov %i4, %o2 2018d00: d0 1d 20 c8 ldd [ %l4 + 0xc8 ], %o0 2018d04: 94 10 20 00 clr %o2 2018d08: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018d0c: 40 00 4f 42 call 202ca14 <__divdi3> 2018d10: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 2018d14: d4 06 20 74 ld [ %i0 + 0x74 ], %o2 /* * 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 ) { 2018d18: 80 a2 40 0a cmp %o1, %o2 2018d1c: 08 80 00 07 bleu 2018d38 <_Timer_server_Body+0x9c> 2018d20: ba 10 00 09 mov %o1, %i5 /* * 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 ); 2018d24: 92 22 40 0a sub %o1, %o2, %o1 2018d28: 90 10 00 1b mov %i3, %o0 2018d2c: 40 00 11 8a call 201d354 <_Watchdog_Adjust_to_chain> 2018d30: 94 10 00 1c mov %i4, %o2 2018d34: 30 80 00 06 b,a 2018d4c <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 2018d38: 1a 80 00 05 bcc 2018d4c <_Timer_server_Body+0xb0> 2018d3c: 90 10 00 1b mov %i3, %o0 /* * 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 ); 2018d40: 92 10 20 01 mov 1, %o1 2018d44: 40 00 11 5c call 201d2b4 <_Watchdog_Adjust> 2018d48: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2018d4c: fa 26 20 74 st %i5, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2018d50: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2018d54: 40 00 02 8c call 2019784 <_Chain_Get> 2018d58: 01 00 00 00 nop if ( timer == NULL ) { 2018d5c: 92 92 20 00 orcc %o0, 0, %o1 2018d60: 02 80 00 0c be 2018d90 <_Timer_server_Body+0xf4> 2018d64: 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 ) { 2018d68: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2018d6c: 80 a0 60 01 cmp %g1, 1 2018d70: 02 80 00 05 be 2018d84 <_Timer_server_Body+0xe8> 2018d74: 90 10 00 1a mov %i2, %o0 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2018d78: 80 a0 60 03 cmp %g1, 3 2018d7c: 12 bf ff f5 bne 2018d50 <_Timer_server_Body+0xb4> <== NEVER TAKEN 2018d80: 90 10 00 1b mov %i3, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2018d84: 40 00 11 a6 call 201d41c <_Watchdog_Insert> 2018d88: 92 02 60 10 add %o1, 0x10, %o1 2018d8c: 30 bf ff f1 b,a 2018d50 <_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 ); 2018d90: 7f ff de 98 call 20107f0 2018d94: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2018d98: c2 07 bf e8 ld [ %fp + -24 ], %g1 2018d9c: 80 a0 40 15 cmp %g1, %l5 2018da0: 12 80 00 0a bne 2018dc8 <_Timer_server_Body+0x12c> <== NEVER TAKEN 2018da4: 01 00 00 00 nop ts->insert_chain = NULL; 2018da8: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2018dac: 7f ff de 95 call 2010800 2018db0: 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 ) ) { 2018db4: c2 07 bf f4 ld [ %fp + -12 ], %g1 2018db8: 80 a0 40 19 cmp %g1, %i1 2018dbc: 12 80 00 06 bne 2018dd4 <_Timer_server_Body+0x138> 2018dc0: 01 00 00 00 nop 2018dc4: 30 80 00 18 b,a 2018e24 <_Timer_server_Body+0x188> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2018dc8: 7f ff de 8e call 2010800 <== NOT EXECUTED 2018dcc: 01 00 00 00 nop <== NOT EXECUTED 2018dd0: 30 bf ff c5 b,a 2018ce4 <_Timer_server_Body+0x48> <== 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 ); 2018dd4: 7f ff de 87 call 20107f0 2018dd8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2018ddc: fa 07 bf f4 ld [ %fp + -12 ], %i5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2018de0: 80 a7 40 19 cmp %i5, %i1 2018de4: 02 80 00 0d be 2018e18 <_Timer_server_Body+0x17c> 2018de8: 01 00 00 00 nop Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 2018dec: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 2018df0: f8 20 60 04 st %i4, [ %g1 + 4 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 2018df4: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 2018df8: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 2018dfc: 7f ff de 81 call 2010800 2018e00: 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 ); 2018e04: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 2018e08: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 2018e0c: 9f c0 40 00 call %g1 2018e10: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 2018e14: 30 bf ff f0 b,a 2018dd4 <_Timer_server_Body+0x138> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 2018e18: 7f ff de 7a call 2010800 2018e1c: 01 00 00 00 nop 2018e20: 30 bf ff b0 b,a 2018ce0 <_Timer_server_Body+0x44> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2018e24: c0 2e 20 7c clrb [ %i0 + 0x7c ] 2018e28: 7f ff ff 19 call 2018a8c <_Thread_Dispatch_increment_disable_level> 2018e2c: 01 00 00 00 nop /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2018e30: d0 06 00 00 ld [ %i0 ], %o0 2018e34: 40 00 0f f9 call 201ce18 <_Thread_Set_state> 2018e38: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2018e3c: 7f ff ff 1b call 2018aa8 <_Timer_server_Reset_interval_system_watchdog> 2018e40: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2018e44: 7f ff ff 2d call 2018af8 <_Timer_server_Reset_tod_system_watchdog> 2018e48: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2018e4c: 40 00 0d 99 call 201c4b0 <_Thread_Enable_dispatch> 2018e50: 01 00 00 00 nop ts->active = true; 2018e54: 82 10 20 01 mov 1, %g1 ! 1 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2018e58: 90 10 00 11 mov %l1, %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; 2018e5c: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2018e60: 40 00 11 c7 call 201d57c <_Watchdog_Remove> 2018e64: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2018e68: 40 00 11 c5 call 201d57c <_Watchdog_Remove> 2018e6c: 90 10 00 10 mov %l0, %o0 2018e70: 30 bf ff 9c b,a 2018ce0 <_Timer_server_Body+0x44> =============================================================================== 02018b48 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2018b48: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2018b4c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2018b50: 80 a0 60 00 cmp %g1, 0 2018b54: 12 80 00 4f bne 2018c90 <_Timer_server_Schedule_operation_method+0x148> 2018b58: ba 10 00 19 mov %i1, %i5 #if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ ) void _Thread_Disable_dispatch( void ); #else RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void ) { _Thread_Dispatch_increment_disable_level(); 2018b5c: 7f ff ff cc call 2018a8c <_Thread_Dispatch_increment_disable_level> 2018b60: 01 00 00 00 nop * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2018b64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2018b68: 80 a0 60 01 cmp %g1, 1 2018b6c: 12 80 00 1f bne 2018be8 <_Timer_server_Schedule_operation_method+0xa0> 2018b70: 80 a0 60 03 cmp %g1, 3 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2018b74: 7f ff df 1f call 20107f0 2018b78: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2018b7c: 03 00 80 f3 sethi %hi(0x203cc00), %g1 2018b80: c4 00 62 78 ld [ %g1 + 0x278 ], %g2 ! 203ce78 <_Watchdog_Ticks_since_boot> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2018b84: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2018b88: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2018b8c: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2018b90: 80 a0 40 03 cmp %g1, %g3 2018b94: 02 80 00 08 be 2018bb4 <_Timer_server_Schedule_operation_method+0x6c> 2018b98: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2018b9c: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 if (delta_interval > delta) { 2018ba0: 80 a7 00 04 cmp %i4, %g4 2018ba4: 08 80 00 03 bleu 2018bb0 <_Timer_server_Schedule_operation_method+0x68> 2018ba8: 86 10 20 00 clr %g3 delta_interval -= delta; 2018bac: 86 27 00 04 sub %i4, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2018bb0: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2018bb4: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2018bb8: 7f ff df 12 call 2010800 2018bbc: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2018bc0: 90 06 20 30 add %i0, 0x30, %o0 2018bc4: 40 00 12 16 call 201d41c <_Watchdog_Insert> 2018bc8: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018bcc: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018bd0: 80 a0 60 00 cmp %g1, 0 2018bd4: 12 80 00 2d bne 2018c88 <_Timer_server_Schedule_operation_method+0x140> 2018bd8: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 2018bdc: 7f ff ff b3 call 2018aa8 <_Timer_server_Reset_interval_system_watchdog> 2018be0: 90 10 00 18 mov %i0, %o0 2018be4: 30 80 00 29 b,a 2018c88 <_Timer_server_Schedule_operation_method+0x140> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2018be8: 12 80 00 28 bne 2018c88 <_Timer_server_Schedule_operation_method+0x140> 2018bec: 01 00 00 00 nop /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2018bf0: 7f ff df 00 call 20107f0 2018bf4: 01 00 00 00 nop 2018bf8: b8 10 00 08 mov %o0, %i4 2018bfc: 03 00 80 f3 sethi %hi(0x203cc00), %g1 2018c00: d0 18 60 c8 ldd [ %g1 + 0xc8 ], %o0 ! 203ccc8 <_TOD> 2018c04: 94 10 20 00 clr %o2 2018c08: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018c0c: 40 00 4f 82 call 202ca14 <__divdi3> 2018c10: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2018c14: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2018c18: c4 06 20 74 ld [ %i0 + 0x74 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2018c1c: 86 06 20 6c add %i0, 0x6c, %g3 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2018c20: 80 a0 40 03 cmp %g1, %g3 2018c24: 02 80 00 0d be 2018c58 <_Timer_server_Schedule_operation_method+0x110> 2018c28: 80 a2 40 02 cmp %o1, %g2 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 2018c2c: 08 80 00 08 bleu 2018c4c <_Timer_server_Schedule_operation_method+0x104> 2018c30: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2018c34: 88 22 40 02 sub %o1, %g2, %g4 if (delta_interval > delta) { 2018c38: 80 a0 c0 04 cmp %g3, %g4 2018c3c: 08 80 00 06 bleu 2018c54 <_Timer_server_Schedule_operation_method+0x10c><== NEVER TAKEN 2018c40: 84 10 20 00 clr %g2 delta_interval -= delta; 2018c44: 10 80 00 04 b 2018c54 <_Timer_server_Schedule_operation_method+0x10c> 2018c48: 84 20 c0 04 sub %g3, %g4, %g2 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2018c4c: 84 00 c0 02 add %g3, %g2, %g2 delta_interval += delta; 2018c50: 84 20 80 09 sub %g2, %o1, %g2 } first_watchdog->delta_interval = delta_interval; 2018c54: c4 20 60 10 st %g2, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2018c58: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 2018c5c: 7f ff de e9 call 2010800 2018c60: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2018c64: 90 06 20 68 add %i0, 0x68, %o0 2018c68: 40 00 11 ed call 201d41c <_Watchdog_Insert> 2018c6c: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018c70: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018c74: 80 a0 60 00 cmp %g1, 0 2018c78: 12 80 00 04 bne 2018c88 <_Timer_server_Schedule_operation_method+0x140> 2018c7c: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2018c80: 7f ff ff 9e call 2018af8 <_Timer_server_Reset_tod_system_watchdog> 2018c84: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2018c88: 40 00 0e 0a call 201c4b0 <_Thread_Enable_dispatch> 2018c8c: 81 e8 00 00 restore * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 2018c90: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2018c94: 40 00 02 b0 call 2019754 <_Chain_Append> 2018c98: 81 e8 00 00 restore =============================================================================== 0200c814 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 200c814: 82 10 00 08 mov %o0, %g1 uint32_t seconds = add->tv_sec; 200c818: d0 02 40 00 ld [ %o1 ], %o0 /* Add the basics */ time->tv_sec += add->tv_sec; 200c81c: c4 00 40 00 ld [ %g1 ], %g2 time->tv_nsec += add->tv_nsec; 200c820: c6 00 60 04 ld [ %g1 + 4 ], %g3 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200c824: 84 00 80 08 add %g2, %o0, %g2 200c828: c4 20 40 00 st %g2, [ %g1 ] time->tv_nsec += add->tv_nsec; 200c82c: c4 02 60 04 ld [ %o1 + 4 ], %g2 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c830: 09 31 19 4d sethi %hi(0xc4653400), %g4 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200c834: 84 00 c0 02 add %g3, %g2, %g2 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c838: 88 11 22 00 or %g4, 0x200, %g4 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c83c: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200c840: c4 20 60 04 st %g2, [ %g1 + 4 ] /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c844: 10 80 00 07 b 200c860 <_Timespec_Add_to+0x4c> 200c848: 86 10 e1 ff or %g3, 0x1ff, %g3 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c84c: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED time->tv_sec++; 200c850: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED seconds++; 200c854: 90 02 20 01 inc %o0 <== NOT EXECUTED time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 200c858: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200c85c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c860: c4 00 60 04 ld [ %g1 + 4 ], %g2 200c864: 80 a0 80 03 cmp %g2, %g3 200c868: 18 bf ff f9 bgu 200c84c <_Timespec_Add_to+0x38> <== NEVER TAKEN 200c86c: 84 00 80 04 add %g2, %g4, %g2 time->tv_sec++; seconds++; } return seconds; } 200c870: 81 c3 e0 08 retl =============================================================================== 0200a5bc <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a5bc: 9d e3 bf a0 save %sp, -96, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5c0: c6 06 40 00 ld [ %i1 ], %g3 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a5c4: 88 10 00 19 mov %i1, %g4 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5c8: 85 38 e0 1f sra %g3, 0x1f, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5cc: de 06 00 00 ld [ %i0 ], %o7 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5d0: b3 28 a0 03 sll %g2, 3, %i1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 200a5d4: c2 06 20 04 ld [ %i0 + 4 ], %g1 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5d8: b1 30 e0 1d srl %g3, 0x1d, %i0 200a5dc: bb 28 e0 03 sll %g3, 3, %i5 200a5e0: b8 16 00 19 or %i0, %i1, %i4 200a5e4: 9b 37 60 1b srl %i5, 0x1b, %o5 200a5e8: b1 2f 20 05 sll %i4, 5, %i0 200a5ec: b3 2f 60 05 sll %i5, 5, %i1 200a5f0: b0 13 40 18 or %o5, %i0, %i0 200a5f4: ba a6 40 1d subcc %i1, %i5, %i5 200a5f8: b8 66 00 1c subx %i0, %i4, %i4 200a5fc: 9b 37 60 1a srl %i5, 0x1a, %o5 200a600: b1 2f 20 06 sll %i4, 6, %i0 200a604: b3 2f 60 06 sll %i5, 6, %i1 200a608: b0 13 40 18 or %o5, %i0, %i0 200a60c: b2 a6 40 1d subcc %i1, %i5, %i1 200a610: b0 66 00 1c subx %i0, %i4, %i0 200a614: 86 86 40 03 addcc %i1, %g3, %g3 200a618: 84 46 00 02 addx %i0, %g2, %g2 200a61c: bb 30 e0 1e srl %g3, 0x1e, %i5 200a620: b1 28 a0 02 sll %g2, 2, %i0 200a624: b3 28 e0 02 sll %g3, 2, %i1 200a628: b0 17 40 18 or %i5, %i0, %i0 200a62c: 86 80 c0 19 addcc %g3, %i1, %g3 200a630: 84 40 80 18 addx %g2, %i0, %g2 200a634: bb 30 e0 1e srl %g3, 0x1e, %i5 200a638: b1 28 a0 02 sll %g2, 2, %i0 200a63c: b3 28 e0 02 sll %g3, 2, %i1 200a640: b0 17 40 18 or %i5, %i0, %i0 200a644: b2 80 c0 19 addcc %g3, %i1, %i1 right += rhs->tv_nsec; 200a648: d6 01 20 04 ld [ %g4 + 4 ], %o3 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a64c: b0 40 80 18 addx %g2, %i0, %i0 200a650: 85 36 60 1e srl %i1, 0x1e, %g2 200a654: bb 2e 60 02 sll %i1, 2, %i5 200a658: b9 2e 20 02 sll %i0, 2, %i4 200a65c: 86 86 40 1d addcc %i1, %i5, %g3 200a660: b8 10 80 1c or %g2, %i4, %i4 200a664: 84 46 00 1c addx %i0, %i4, %g2 right += rhs->tv_nsec; 200a668: 95 3a e0 1f sra %o3, 0x1f, %o2 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a66c: b3 30 e0 17 srl %g3, 0x17, %i1 200a670: b9 28 a0 09 sll %g2, 9, %i4 200a674: bb 28 e0 09 sll %g3, 9, %i5 200a678: 84 16 40 1c or %i1, %i4, %g2 right += rhs->tv_nsec; 200a67c: 96 87 40 0b addcc %i5, %o3, %o3 200a680: 94 40 80 0a addx %g2, %o2, %o2 if ( right == 0 ) { 200a684: 80 92 80 0b orcc %o2, %o3, %g0 200a688: 32 80 00 06 bne,a 200a6a0 <_Timespec_Divide+0xe4> <== NEVER TAKEN 200a68c: b9 3b e0 1f sra %o7, 0x1f, %i4 <== NOT EXECUTED *ival_percentage = 0; 200a690: c0 26 80 00 clr [ %i2 ] *fval_percentage = 0; 200a694: c0 26 c0 00 clr [ %i3 ] return; 200a698: 81 c7 e0 08 ret 200a69c: 81 e8 00 00 restore /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a6a0: 85 2f 20 03 sll %i4, 3, %g2 <== NOT EXECUTED 200a6a4: b3 2b e0 03 sll %o7, 3, %i1 <== NOT EXECUTED 200a6a8: 87 33 e0 1d srl %o7, 0x1d, %g3 <== NOT EXECUTED 200a6ac: b0 10 c0 02 or %g3, %g2, %i0 <== NOT EXECUTED 200a6b0: 85 36 60 1b srl %i1, 0x1b, %g2 <== NOT EXECUTED 200a6b4: 99 2e 20 05 sll %i0, 5, %o4 <== NOT EXECUTED 200a6b8: 9b 2e 60 05 sll %i1, 5, %o5 <== NOT EXECUTED 200a6bc: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED 200a6c0: b2 a3 40 19 subcc %o5, %i1, %i1 <== NOT EXECUTED 200a6c4: 85 36 60 1a srl %i1, 0x1a, %g2 <== NOT EXECUTED 200a6c8: b0 63 00 18 subx %o4, %i0, %i0 <== NOT EXECUTED 200a6cc: 9b 2e 60 06 sll %i1, 6, %o5 <== NOT EXECUTED 200a6d0: 99 2e 20 06 sll %i0, 6, %o4 <== NOT EXECUTED 200a6d4: 9a a3 40 19 subcc %o5, %i1, %o5 <== NOT EXECUTED 200a6d8: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED 200a6dc: 98 63 00 18 subx %o4, %i0, %o4 <== NOT EXECUTED 200a6e0: ba 83 40 0f addcc %o5, %o7, %i5 <== NOT EXECUTED 200a6e4: 85 37 60 1e srl %i5, 0x1e, %g2 <== NOT EXECUTED 200a6e8: b8 43 00 1c addx %o4, %i4, %i4 <== NOT EXECUTED 200a6ec: 9b 2f 60 02 sll %i5, 2, %o5 <== NOT EXECUTED 200a6f0: 99 2f 20 02 sll %i4, 2, %o4 <== NOT EXECUTED 200a6f4: ba 87 40 0d addcc %i5, %o5, %i5 <== NOT EXECUTED 200a6f8: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED 200a6fc: 85 37 60 1e srl %i5, 0x1e, %g2 <== NOT EXECUTED 200a700: b8 47 00 0c addx %i4, %o4, %i4 <== NOT EXECUTED 200a704: 9b 2f 60 02 sll %i5, 2, %o5 <== NOT EXECUTED 200a708: 99 2f 20 02 sll %i4, 2, %o4 <== NOT EXECUTED 200a70c: 9a 87 40 0d addcc %i5, %o5, %o5 <== NOT EXECUTED 200a710: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED 200a714: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED 200a718: 98 47 00 0c addx %i4, %o4, %o4 <== NOT EXECUTED 200a71c: b3 2b 60 02 sll %o5, 2, %i1 <== NOT EXECUTED 200a720: b1 2b 20 02 sll %o4, 2, %i0 <== NOT EXECUTED 200a724: 86 83 40 19 addcc %o5, %i1, %g3 <== NOT EXECUTED 200a728: b0 10 80 18 or %g2, %i0, %i0 <== NOT EXECUTED 200a72c: 84 43 00 18 addx %o4, %i0, %g2 <== NOT EXECUTED 200a730: 89 28 e0 09 sll %g3, 9, %g4 <== NOT EXECUTED 200a734: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED left += lhs->tv_nsec; 200a738: 92 81 00 01 addcc %g4, %g1, %o1 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a73c: bb 28 a0 09 sll %g2, 9, %i5 <== NOT EXECUTED left += lhs->tv_nsec; 200a740: 91 38 60 1f sra %g1, 0x1f, %o0 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a744: 84 17 00 1d or %i4, %i5, %g2 <== NOT EXECUTED left += lhs->tv_nsec; 200a748: 90 40 80 08 addx %g2, %o0, %o0 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a74c: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED 200a750: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED 200a754: 85 32 60 1e srl %o1, 0x1e, %g2 <== NOT EXECUTED 200a758: b8 10 80 01 or %g2, %g1, %i4 <== NOT EXECUTED 200a75c: 83 37 60 1b srl %i5, 0x1b, %g1 <== NOT EXECUTED 200a760: 9b 2f 60 05 sll %i5, 5, %o5 <== NOT EXECUTED 200a764: 99 2f 20 05 sll %i4, 5, %o4 <== NOT EXECUTED 200a768: ba a3 40 1d subcc %o5, %i5, %i5 <== NOT EXECUTED 200a76c: 98 10 40 0c or %g1, %o4, %o4 <== NOT EXECUTED 200a770: b8 63 00 1c subx %o4, %i4, %i4 <== NOT EXECUTED 200a774: 92 87 40 09 addcc %i5, %o1, %o1 <== NOT EXECUTED 200a778: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a77c: 90 47 00 08 addx %i4, %o0, %o0 <== NOT EXECUTED 200a780: b3 2a 60 02 sll %o1, 2, %i1 <== NOT EXECUTED 200a784: b1 2a 20 02 sll %o0, 2, %i0 <== NOT EXECUTED 200a788: 92 82 40 19 addcc %o1, %i1, %o1 <== NOT EXECUTED 200a78c: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED 200a790: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a794: 90 42 00 18 addx %o0, %i0, %o0 <== NOT EXECUTED 200a798: b3 2a 60 02 sll %o1, 2, %i1 <== NOT EXECUTED 200a79c: b1 2a 20 02 sll %o0, 2, %i0 <== NOT EXECUTED 200a7a0: 92 82 40 19 addcc %o1, %i1, %o1 <== NOT EXECUTED 200a7a4: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED 200a7a8: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200a7ac: 90 42 00 18 addx %o0, %i0, %o0 <== NOT EXECUTED 200a7b0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200a7b4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200a7b8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200a7bc: 40 00 3a 5c call 201912c <__udivdi3> <== NOT EXECUTED 200a7c0: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a7c4: 94 10 20 00 clr %o2 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a7c8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 200a7cc: ba 10 00 09 mov %o1, %i5 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a7d0: 40 00 3a 57 call 201912c <__udivdi3> <== NOT EXECUTED 200a7d4: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200a7d8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a7dc: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200a7e0: 94 10 20 00 clr %o2 <== NOT EXECUTED 200a7e4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED 200a7e8: 40 00 3b 25 call 201947c <__umoddi3> <== NOT EXECUTED 200a7ec: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200a7f0: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED 200a7f4: 81 c7 e0 08 ret <== NOT EXECUTED 200a7f8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c57c <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c57c: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c580: d4 1e 40 00 ldd [ %i1 ], %o2 200c584: 80 92 80 0b orcc %o2, %o3, %g0 200c588: 32 80 00 06 bne,a 200c5a0 <_Timestamp64_Divide+0x24> <== ALWAYS TAKEN 200c58c: f8 1e 00 00 ldd [ %i0 ], %i4 *_ival_percentage = 0; 200c590: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *_fval_percentage = 0; 200c594: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200c598: 81 c7 e0 08 ret <== NOT EXECUTED 200c59c: 81 e8 00 00 restore <== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 200c5a0: 83 2f 20 02 sll %i4, 2, %g1 200c5a4: 89 37 60 1e srl %i5, 0x1e, %g4 200c5a8: 87 2f 60 02 sll %i5, 2, %g3 200c5ac: 84 11 00 01 or %g4, %g1, %g2 200c5b0: 83 30 e0 1b srl %g3, 0x1b, %g1 200c5b4: b1 28 a0 05 sll %g2, 5, %i0 200c5b8: b3 28 e0 05 sll %g3, 5, %i1 200c5bc: b0 10 40 18 or %g1, %i0, %i0 200c5c0: 92 a6 40 03 subcc %i1, %g3, %o1 200c5c4: 90 66 00 02 subx %i0, %g2, %o0 200c5c8: 92 82 40 1d addcc %o1, %i5, %o1 200c5cc: 83 32 60 1e srl %o1, 0x1e, %g1 200c5d0: 90 42 00 1c addx %o0, %i4, %o0 200c5d4: bb 2a 60 02 sll %o1, 2, %i5 200c5d8: b9 2a 20 02 sll %o0, 2, %i4 200c5dc: 92 82 40 1d addcc %o1, %i5, %o1 200c5e0: b8 10 40 1c or %g1, %i4, %i4 200c5e4: 83 32 60 1e srl %o1, 0x1e, %g1 200c5e8: 90 42 00 1c addx %o0, %i4, %o0 200c5ec: bb 2a 60 02 sll %o1, 2, %i5 200c5f0: b9 2a 20 02 sll %o0, 2, %i4 200c5f4: 92 82 40 1d addcc %o1, %i5, %o1 200c5f8: b8 10 40 1c or %g1, %i4, %i4 200c5fc: 87 32 60 1b srl %o1, 0x1b, %g3 200c600: 90 42 00 1c addx %o0, %i4, %o0 200c604: 83 2a 60 05 sll %o1, 5, %g1 200c608: 85 2a 20 05 sll %o0, 5, %g2 200c60c: 92 10 00 01 mov %g1, %o1 200c610: 40 00 3a 13 call 201ae5c <__divdi3> 200c614: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200c618: 94 10 20 00 clr %o2 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 200c61c: b8 10 00 08 mov %o0, %i4 200c620: ba 10 00 09 mov %o1, %i5 *_ival_percentage = answer / 1000; 200c624: 40 00 3a 0e call 201ae5c <__divdi3> 200c628: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200c62c: 90 10 00 1c mov %i4, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200c630: d2 26 80 00 st %o1, [ %i2 ] *_fval_percentage = answer % 1000; 200c634: 94 10 20 00 clr %o2 200c638: 92 10 00 1d mov %i5, %o1 200c63c: 40 00 3a f3 call 201b208 <__moddi3> 200c640: 96 10 23 e8 mov 0x3e8, %o3 200c644: d2 26 c0 00 st %o1, [ %i3 ] 200c648: 81 c7 e0 08 ret 200c64c: 81 e8 00 00 restore =============================================================================== 0200ac30 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200ac30: 9d e3 bf a0 save %sp, -96, %sp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 200ac34: 03 00 80 73 sethi %hi(0x201cc00), %g1 200ac38: 82 10 60 fc or %g1, 0xfc, %g1 ! 201ccfc ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ac3c: 05 00 80 77 sethi %hi(0x201dc00), %g2 initial_extensions = Configuration.User_extension_table; 200ac40: f4 00 60 48 ld [ %g1 + 0x48 ], %i2 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 200ac44: f8 00 60 44 ld [ %g1 + 0x44 ], %i4 200ac48: 82 10 a0 c8 or %g2, 0xc8, %g1 200ac4c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200ac50: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200ac54: c2 20 60 08 st %g1, [ %g1 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ac58: c6 20 a0 c8 st %g3, [ %g2 + 0xc8 ] 200ac5c: 05 00 80 76 sethi %hi(0x201d800), %g2 200ac60: 82 10 a2 f4 or %g2, 0x2f4, %g1 ! 201daf4 <_User_extensions_Switches_list> 200ac64: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200ac68: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ac6c: c6 20 a2 f4 st %g3, [ %g2 + 0x2f4 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200ac70: 80 a6 a0 00 cmp %i2, 0 200ac74: 02 80 00 1b be 200ace0 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200ac78: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200ac7c: 83 2f 20 02 sll %i4, 2, %g1 200ac80: b7 2f 20 04 sll %i4, 4, %i3 200ac84: b6 26 c0 01 sub %i3, %g1, %i3 200ac88: b6 06 c0 1c add %i3, %i4, %i3 200ac8c: b7 2e e0 02 sll %i3, 2, %i3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200ac90: 40 00 01 71 call 200b254 <_Workspace_Allocate_or_fatal_error> 200ac94: 90 10 00 1b mov %i3, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200ac98: 94 10 00 1b mov %i3, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200ac9c: ba 10 00 08 mov %o0, %i5 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200aca0: 92 10 20 00 clr %o1 200aca4: 40 00 15 e1 call 2010428 200aca8: b6 10 20 00 clr %i3 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200acac: 10 80 00 0b b 200acd8 <_User_extensions_Handler_initialization+0xa8> 200acb0: 80 a6 c0 1c cmp %i3, %i4 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 200acb4: 90 07 60 14 add %i5, 0x14, %o0 200acb8: 92 06 80 09 add %i2, %o1, %o1 200acbc: 40 00 15 9e call 2010334 200acc0: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 200acc4: 90 10 00 1d mov %i5, %o0 200acc8: 40 00 0c 7d call 200debc <_User_extensions_Add_set> 200accc: b6 06 e0 01 inc %i3 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200acd0: ba 07 60 34 add %i5, 0x34, %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200acd4: 80 a6 c0 1c cmp %i3, %i4 200acd8: 12 bf ff f7 bne 200acb4 <_User_extensions_Handler_initialization+0x84> 200acdc: 93 2e e0 05 sll %i3, 5, %o1 200ace0: 81 c7 e0 08 ret 200ace4: 81 e8 00 00 restore =============================================================================== 0200c958 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c958: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c95c: 7f ff da ec call 200350c 200c960: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c964: c2 06 00 00 ld [ %i0 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c968: b8 06 20 04 add %i0, 4, %i4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200c96c: 80 a0 40 1c cmp %g1, %i4 200c970: 02 80 00 20 be 200c9f0 <_Watchdog_Adjust+0x98> 200c974: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c978: 02 80 00 1b be 200c9e4 <_Watchdog_Adjust+0x8c> 200c97c: b6 10 20 01 mov 1, %i3 200c980: 80 a6 60 01 cmp %i1, 1 200c984: 12 80 00 1b bne 200c9f0 <_Watchdog_Adjust+0x98> <== NEVER TAKEN 200c988: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c98c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c990: 10 80 00 07 b 200c9ac <_Watchdog_Adjust+0x54> 200c994: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200c998: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c99c: 80 a6 80 02 cmp %i2, %g2 200c9a0: 3a 80 00 05 bcc,a 200c9b4 <_Watchdog_Adjust+0x5c> 200c9a4: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200c9a8: b4 20 80 1a sub %g2, %i2, %i2 break; 200c9ac: 10 80 00 11 b 200c9f0 <_Watchdog_Adjust+0x98> 200c9b0: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200c9b4: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200c9b8: 7f ff da d9 call 200351c 200c9bc: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c9c0: 40 00 00 90 call 200cc00 <_Watchdog_Tickle> 200c9c4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200c9c8: 7f ff da d1 call 200350c 200c9cc: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200c9d0: c2 06 00 00 ld [ %i0 ], %g1 200c9d4: 80 a0 40 1c cmp %g1, %i4 200c9d8: 12 80 00 04 bne 200c9e8 <_Watchdog_Adjust+0x90> 200c9dc: 80 a6 a0 00 cmp %i2, 0 200c9e0: 30 80 00 04 b,a 200c9f0 <_Watchdog_Adjust+0x98> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c9e4: 80 a6 a0 00 cmp %i2, 0 200c9e8: 32 bf ff ec bne,a 200c998 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200c9ec: c2 06 00 00 ld [ %i0 ], %g1 } break; } } _ISR_Enable( level ); 200c9f0: 7f ff da cb call 200351c 200c9f4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200b058 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200b058: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200b05c: 7f ff dd 9a call 20026c4 200b060: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 200b064: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 200b068: 80 a6 20 01 cmp %i0, 1 200b06c: 22 80 00 1e be,a 200b0e4 <_Watchdog_Remove+0x8c> 200b070: c0 27 60 08 clr [ %i5 + 8 ] 200b074: 0a 80 00 1d bcs 200b0e8 <_Watchdog_Remove+0x90> 200b078: 03 00 80 76 sethi %hi(0x201d800), %g1 200b07c: 80 a6 20 03 cmp %i0, 3 200b080: 18 80 00 1a bgu 200b0e8 <_Watchdog_Remove+0x90> <== NEVER TAKEN 200b084: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 200b088: 10 80 00 02 b 200b090 <_Watchdog_Remove+0x38> 200b08c: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200b090: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200b094: c4 00 40 00 ld [ %g1 ], %g2 200b098: 80 a0 a0 00 cmp %g2, 0 200b09c: 02 80 00 07 be 200b0b8 <_Watchdog_Remove+0x60> 200b0a0: 05 00 80 76 sethi %hi(0x201d800), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200b0a4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200b0a8: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200b0ac: 84 00 c0 02 add %g3, %g2, %g2 200b0b0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200b0b4: 05 00 80 76 sethi %hi(0x201d800), %g2 200b0b8: c4 00 a3 e4 ld [ %g2 + 0x3e4 ], %g2 ! 201dbe4 <_Watchdog_Sync_count> 200b0bc: 80 a0 a0 00 cmp %g2, 0 200b0c0: 22 80 00 07 be,a 200b0dc <_Watchdog_Remove+0x84> 200b0c4: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200b0c8: 05 00 80 78 sethi %hi(0x201e000), %g2 200b0cc: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 ! 201e028 <_Per_CPU_Information+0x8> 200b0d0: 05 00 80 76 sethi %hi(0x201d800), %g2 200b0d4: c6 20 a3 84 st %g3, [ %g2 + 0x384 ] ! 201db84 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200b0d8: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 200b0dc: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200b0e0: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b0e4: 03 00 80 76 sethi %hi(0x201d800), %g1 200b0e8: c2 00 63 e8 ld [ %g1 + 0x3e8 ], %g1 ! 201dbe8 <_Watchdog_Ticks_since_boot> 200b0ec: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 200b0f0: 7f ff dd 79 call 20026d4 200b0f4: 01 00 00 00 nop return( previous_state ); } 200b0f8: 81 c7 e0 08 ret 200b0fc: 81 e8 00 00 restore =============================================================================== 0200c2c8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c2c8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c2cc: 7f ff db 6d call 2003080 200c2d0: b8 10 00 18 mov %i0, %i4 200c2d4: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200c2d8: 11 00 80 76 sethi %hi(0x201d800), %o0 200c2dc: 94 10 00 19 mov %i1, %o2 200c2e0: 90 12 20 60 or %o0, 0x60, %o0 200c2e4: 7f ff e3 51 call 2005028 200c2e8: 92 10 00 1c mov %i4, %o1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c2ec: fa 06 40 00 ld [ %i1 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c2f0: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200c2f4: 80 a7 40 19 cmp %i5, %i1 200c2f8: 12 80 00 04 bne 200c308 <_Watchdog_Report_chain+0x40> 200c2fc: 92 10 00 1d mov %i5, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200c300: 10 80 00 0d b 200c334 <_Watchdog_Report_chain+0x6c> 200c304: 11 00 80 76 sethi %hi(0x201d800), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c308: 40 00 00 0f call 200c344 <_Watchdog_Report> 200c30c: 90 10 20 00 clr %o0 _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 200c310: fa 07 40 00 ld [ %i5 ], %i5 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 200c314: 80 a7 40 19 cmp %i5, %i1 200c318: 12 bf ff fc bne 200c308 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200c31c: 92 10 00 1d mov %i5, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c320: 11 00 80 76 sethi %hi(0x201d800), %o0 200c324: 92 10 00 1c mov %i4, %o1 200c328: 7f ff e3 40 call 2005028 200c32c: 90 12 20 78 or %o0, 0x78, %o0 200c330: 30 80 00 03 b,a 200c33c <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200c334: 7f ff e3 3d call 2005028 200c338: 90 12 20 88 or %o0, 0x88, %o0 } _ISR_Enable( level ); 200c33c: 7f ff db 55 call 2003090 200c340: 81 e8 00 00 restore =============================================================================== 02011b64 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2011b64: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t cmpltd = 0; 2011b68: ba 10 20 00 clr %i5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2011b6c: 10 80 00 18 b 2011bcc <_fat_block_read+0x68> 2011b70: c0 27 bf fc clr [ %fp + -4 ] { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2011b74: 92 10 00 19 mov %i1, %o1 2011b78: 94 10 20 01 mov 1, %o2 2011b7c: 7f ff ff 25 call 2011810 2011b80: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2011b84: 80 a2 20 00 cmp %o0, 0 2011b88: 32 80 00 16 bne,a 2011be0 <_fat_block_read+0x7c> <== NEVER TAKEN 2011b8c: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2011b90: e0 16 00 00 lduh [ %i0 ], %l0 2011b94: a0 24 00 1a sub %l0, %i2, %l0 2011b98: 80 a4 00 1b cmp %l0, %i3 2011b9c: 38 80 00 02 bgu,a 2011ba4 <_fat_block_read+0x40> 2011ba0: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2011ba4: c2 07 bf fc ld [ %fp + -4 ], %g1 2011ba8: 90 07 00 1d add %i4, %i5, %o0 2011bac: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2011bb0: 94 10 00 10 mov %l0, %o2 2011bb4: 92 02 40 1a add %o1, %i2, %o1 2011bb8: 40 00 23 cf call 201aaf4 2011bbc: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2011bc0: ba 04 00 1d add %l0, %i5, %i5 blk++; 2011bc4: b2 06 60 01 inc %i1 ofs = 0; 2011bc8: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2011bcc: 80 a6 e0 00 cmp %i3, 0 2011bd0: 12 bf ff e9 bne 2011b74 <_fat_block_read+0x10> 2011bd4: 90 10 00 18 mov %i0, %o0 cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2011bd8: 81 c7 e0 08 ret 2011bdc: 91 e8 00 1d restore %g0, %i5, %o0 2011be0: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED 2011be4: 81 c7 e0 08 ret <== NOT EXECUTED 2011be8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011bec <_fat_block_write>: fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2011bec: 9d e3 bf 98 save %sp, -104, %sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2011bf0: a2 10 20 01 mov 1, %l1 2011bf4: a0 10 00 18 mov %i0, %l0 int rc = RC_OK; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2011bf8: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2011bfc: 10 80 00 1b b 2011c68 <_fat_block_write+0x7c> 2011c00: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2011c04: ba 20 40 1a sub %g1, %i2, %i5 2011c08: 80 a7 40 1b cmp %i5, %i3 2011c0c: 38 80 00 02 bgu,a 2011c14 <_fat_block_write+0x28> 2011c10: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2011c14: 90 10 00 10 mov %l0, %o0 2011c18: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2011c1c: 80 a7 40 01 cmp %i5, %g1 2011c20: 02 80 00 03 be 2011c2c <_fat_block_write+0x40> 2011c24: 94 10 20 02 mov 2, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2011c28: 94 10 20 01 mov 1, %o2 2011c2c: 7f ff fe f9 call 2011810 2011c30: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2011c34: 80 a2 20 00 cmp %o0, 0 2011c38: 12 80 00 11 bne 2011c7c <_fat_block_write+0x90> <== NEVER TAKEN 2011c3c: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2011c40: 92 07 00 18 add %i4, %i0, %o1 2011c44: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2011c48: 94 10 00 1d mov %i5, %o2 2011c4c: 90 02 00 1a add %o0, %i2, %o0 2011c50: 40 00 23 a9 call 201aaf4 2011c54: b6 26 c0 1d sub %i3, %i5, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2011c58: b0 07 40 18 add %i5, %i0, %i0 2011c5c: e2 2c 20 7c stb %l1, [ %l0 + 0x7c ] blk++; 2011c60: b2 06 60 01 inc %i1 ofs = 0; 2011c64: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2011c68: 80 a6 e0 00 cmp %i3, 0 2011c6c: 32 bf ff e6 bne,a 2011c04 <_fat_block_write+0x18> 2011c70: c2 14 00 00 lduh [ %l0 ], %g1 2011c74: 81 c7 e0 08 ret 2011c78: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2011c7c: 81 c7 e0 08 ret <== NOT EXECUTED 2011c80: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02011c84 <_fat_block_zero>: _fat_block_zero( fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count) { 2011c84: 9d e3 bf 98 save %sp, -104, %sp 2011c88: b8 10 20 01 mov 1, %i4 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2011c8c: 10 80 00 1a b 2011cf4 <_fat_block_zero+0x70> 2011c90: c0 27 bf fc clr [ %fp + -4 ] { c = MIN(count, (fs_info->vol.bps - ofs)); 2011c94: ba 20 40 1a sub %g1, %i2, %i5 2011c98: 80 a7 40 1b cmp %i5, %i3 2011c9c: 38 80 00 02 bgu,a 2011ca4 <_fat_block_zero+0x20> <== NEVER TAKEN 2011ca0: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2011ca4: 90 10 00 18 mov %i0, %o0 2011ca8: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2011cac: 80 a7 40 01 cmp %i5, %g1 2011cb0: 02 80 00 03 be 2011cbc <_fat_block_zero+0x38> 2011cb4: 94 10 20 02 mov 2, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2011cb8: 94 10 20 01 mov 1, %o2 2011cbc: 7f ff fe d5 call 2011810 2011cc0: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2011cc4: 80 a2 20 00 cmp %o0, 0 2011cc8: 12 80 00 10 bne 2011d08 <_fat_block_zero+0x84> <== NEVER TAKEN 2011ccc: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memset((block->buffer + ofs), 0, c); 2011cd0: 92 10 20 00 clr %o1 2011cd4: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2011cd8: 94 10 00 1d mov %i5, %o2 2011cdc: 90 02 00 1a add %o0, %i2, %o0 2011ce0: 40 00 23 c2 call 201abe8 2011ce4: b6 26 c0 1d sub %i3, %i5, %i3 fat_buf_mark_modified(fs_info); count -= c; blk++; 2011ce8: b2 06 60 01 inc %i1 2011cec: f8 2e 20 7c stb %i4, [ %i0 + 0x7c ] ofs = 0; 2011cf0: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2011cf4: 80 a6 e0 00 cmp %i3, 0 2011cf8: 32 bf ff e7 bne,a 2011c94 <_fat_block_zero+0x10> 2011cfc: c2 16 00 00 lduh [ %i0 ], %g1 count -= c; blk++; ofs = 0; } return 0; 2011d00: 81 c7 e0 08 ret 2011d04: 91 e8 20 00 restore %g0, 0, %o0 } 2011d08: 81 c7 e0 08 ret <== NOT EXECUTED 2011d0c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02003f80 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2003f80: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2003f84: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2003f88: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003f8c: 7f ff ff e9 call 2003f30 <== NOT EXECUTED 2003f90: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004820 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2004820: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2004824: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2004828: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200482c: 7f ff ff e9 call 20047d0 <== NOT EXECUTED 2004830: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02007968 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 2007968: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 200796c: 3b 00 80 7f sethi %hi(0x201fc00), %i5 2007970: 40 00 04 68 call 2008b10 2007974: 90 17 62 bc or %i5, 0x2bc, %o0 ! 201febc if (fcntl (fildes, F_GETFD) < 0) { 2007978: 90 10 00 18 mov %i0, %o0 200797c: 40 00 1a ae call 200e434 2007980: 92 10 20 01 mov 1, %o1 2007984: 80 a2 20 00 cmp %o0, 0 2007988: 16 80 00 08 bge 20079a8 200798c: 80 a6 60 00 cmp %i1, 0 pthread_mutex_unlock(&aio_request_queue.mutex); 2007990: 40 00 04 81 call 2008b94 2007994: 90 17 62 bc or %i5, 0x2bc, %o0 rtems_set_errno_and_return_minus_one (EBADF); 2007998: 40 00 28 e6 call 2011d30 <__errno> 200799c: 01 00 00 00 nop 20079a0: 10 80 00 54 b 2007af0 20079a4: 82 10 20 09 mov 9, %g1 ! 9 } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 20079a8: 32 80 00 35 bne,a 2007a7c 20079ac: f8 06 40 00 ld [ %i1 ], %i4 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 20079b0: 11 00 80 7f sethi %hi(0x201fc00), %o0 20079b4: 92 10 00 18 mov %i0, %o1 20079b8: 90 12 23 04 or %o0, 0x304, %o0 20079bc: 40 00 01 71 call 2007f80 20079c0: 94 10 20 00 clr %o2 if (r_chain == NULL) { 20079c4: b8 92 20 00 orcc %o0, 0, %i4 20079c8: 12 80 00 20 bne 2007a48 20079cc: b6 07 20 1c add %i4, 0x1c, %i3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20079d0: ba 17 62 bc or %i5, 0x2bc, %i5 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 20079d4: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 20079d8: 82 07 60 58 add %i5, 0x58, %g1 20079dc: 80 a0 80 01 cmp %g2, %g1 20079e0: 02 80 00 08 be 2007a00 <== NEVER TAKEN 20079e4: 92 10 00 18 mov %i0, %o1 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 20079e8: 90 07 60 54 add %i5, 0x54, %o0 20079ec: 40 00 01 65 call 2007f80 20079f0: 94 10 20 00 clr %o2 if (r_chain == NULL) { 20079f4: b8 92 20 00 orcc %o0, 0, %i4 20079f8: 12 80 00 08 bne 2007a18 20079fc: 01 00 00 00 nop pthread_mutex_unlock(&aio_request_queue.mutex); 2007a00: 11 00 80 7f sethi %hi(0x201fc00), %o0 return AIO_ALLDONE; 2007a04: b0 10 20 02 mov 2, %i0 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); 2007a08: 40 00 04 63 call 2008b94 2007a0c: 90 12 22 bc or %o0, 0x2bc, %o0 return AIO_ALLDONE; 2007a10: 81 c7 e0 08 ret 2007a14: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2007a18: 40 00 0a cb call 200a544 <_Chain_Extract> 2007a1c: b6 07 20 1c add %i4, 0x1c, %i3 } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007a20: 40 00 01 80 call 2008020 2007a24: 90 10 00 1c mov %i4, %o0 pthread_mutex_destroy (&r_chain->mutex); 2007a28: 40 00 03 8c call 2008858 2007a2c: 90 10 00 1b mov %i3, %o0 pthread_cond_destroy (&r_chain->mutex); 2007a30: 40 00 02 ac call 20084e0 2007a34: 90 10 00 1b mov %i3, %o0 free (r_chain); 2007a38: 7f ff f0 ca call 2003d60 2007a3c: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007a40: 10 80 00 0b b 2007a6c 2007a44: 90 10 00 1d mov %i5, %o0 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007a48: 40 00 04 32 call 2008b10 2007a4c: 90 10 00 1b mov %i3, %o0 2007a50: 40 00 0a bd call 200a544 <_Chain_Extract> 2007a54: 90 10 00 1c mov %i4, %o0 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007a58: 40 00 01 72 call 2008020 2007a5c: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 2007a60: 40 00 04 4d call 2008b94 2007a64: 90 10 00 1b mov %i3, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007a68: 90 17 62 bc or %i5, 0x2bc, %o0 2007a6c: 40 00 04 4a call 2008b94 2007a70: b0 10 20 00 clr %i0 return AIO_CANCELED; 2007a74: 81 c7 e0 08 ret 2007a78: 81 e8 00 00 restore } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 2007a7c: 80 a7 00 18 cmp %i4, %i0 2007a80: 12 80 00 17 bne 2007adc 2007a84: 90 17 62 bc or %i5, 0x2bc, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2007a88: 11 00 80 7f sethi %hi(0x201fc00), %o0 2007a8c: 92 10 00 1c mov %i4, %o1 2007a90: 90 12 23 04 or %o0, 0x304, %o0 2007a94: 40 00 01 3b call 2007f80 2007a98: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007a9c: b6 92 20 00 orcc %o0, 0, %i3 2007aa0: 32 80 00 1c bne,a 2007b10 2007aa4: b8 06 e0 1c add %i3, 0x1c, %i4 2007aa8: ba 17 62 bc or %i5, 0x2bc, %i5 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2007aac: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 2007ab0: 82 07 60 58 add %i5, 0x58, %g1 2007ab4: 80 a0 80 01 cmp %g2, %g1 2007ab8: 02 bf ff d2 be 2007a00 <== NEVER TAKEN 2007abc: 92 10 00 1c mov %i4, %o1 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 2007ac0: 90 07 60 54 add %i5, 0x54, %o0 2007ac4: 40 00 01 2f call 2007f80 2007ac8: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007acc: 80 a2 20 00 cmp %o0, 0 2007ad0: 12 80 00 0b bne 2007afc 2007ad4: 90 02 20 08 add %o0, 8, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007ad8: 90 10 00 1d mov %i5, %o0 2007adc: 40 00 04 2e call 2008b94 2007ae0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one (EINVAL); 2007ae4: 40 00 28 93 call 2011d30 <__errno> 2007ae8: 01 00 00 00 nop 2007aec: 82 10 20 16 mov 0x16, %g1 ! 16 2007af0: c2 22 00 00 st %g1, [ %o0 ] 2007af4: 81 c7 e0 08 ret 2007af8: 91 e8 3f ff restore %g0, -1, %o0 } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007afc: 40 00 01 5d call 2008070 2007b00: 92 10 00 19 mov %i1, %o1 2007b04: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007b08: 10 80 00 0b b 2007b34 2007b0c: 90 10 00 1d mov %i5, %o0 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007b10: 40 00 04 00 call 2008b10 2007b14: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007b18: 92 10 00 19 mov %i1, %o1 2007b1c: 40 00 01 55 call 2008070 2007b20: 90 06 e0 08 add %i3, 8, %o0 2007b24: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 2007b28: 40 00 04 1b call 2008b94 2007b2c: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007b30: 90 17 62 bc or %i5, 0x2bc, %o0 2007b34: 40 00 04 18 call 2008b94 2007b38: 01 00 00 00 nop return result; } return AIO_ALLDONE; } 2007b3c: 81 c7 e0 08 ret 2007b40: 81 e8 00 00 restore =============================================================================== 02007b4c : int aio_fsync( int op, struct aiocb *aiocbp ) { 2007b4c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 2007b50: 03 00 00 08 sethi %hi(0x2000), %g1 2007b54: 80 a6 00 01 cmp %i0, %g1 2007b58: 12 80 00 10 bne 2007b98 2007b5c: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2007b60: d0 06 40 00 ld [ %i1 ], %o0 2007b64: 40 00 1a 34 call 200e434 2007b68: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2007b6c: 90 0a 20 03 and %o0, 3, %o0 2007b70: 90 02 3f ff add %o0, -1, %o0 2007b74: 80 a2 20 01 cmp %o0, 1 2007b78: 18 80 00 08 bgu 2007b98 2007b7c: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2007b80: 7f ff f1 ad call 2004234 2007b84: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2007b88: b0 92 20 00 orcc %o0, 0, %i0 2007b8c: 32 80 00 09 bne,a 2007bb0 <== ALWAYS TAKEN 2007b90: f2 26 20 14 st %i1, [ %i0 + 0x14 ] rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2007b94: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 2007b98: 82 10 3f ff mov -1, %g1 2007b9c: fa 26 60 34 st %i5, [ %i1 + 0x34 ] 2007ba0: 40 00 28 64 call 2011d30 <__errno> 2007ba4: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 2007ba8: 10 80 00 06 b 2007bc0 2007bac: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; 2007bb0: 82 10 20 03 mov 3, %g1 2007bb4: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 2007bb8: 40 00 01 4e call 20080f0 2007bbc: 81 e8 00 00 restore } 2007bc0: 81 c7 e0 08 ret 2007bc4: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02008308 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 2008308: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 200830c: d0 06 00 00 ld [ %i0 ], %o0 2008310: 92 10 20 03 mov 3, %o1 2008314: 40 00 18 48 call 200e434 2008318: ba 10 00 18 mov %i0, %i5 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 200831c: 80 8a 20 01 btst 1, %o0 2008320: 12 80 00 11 bne 2008364 2008324: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 2008328: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200832c: 80 a0 60 00 cmp %g1, 0 2008330: 22 80 00 04 be,a 2008340 2008334: c2 06 20 08 ld [ %i0 + 8 ], %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 2008338: 10 80 00 0b b 2008364 200833c: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 2008340: 80 a0 60 00 cmp %g1, 0 2008344: 06 80 00 08 bl 2008364 2008348: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 200834c: 7f ff ef ba call 2004234 2008350: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2008354: b0 92 20 00 orcc %o0, 0, %i0 2008358: 32 80 00 09 bne,a 200837c <== ALWAYS TAKEN 200835c: fa 26 20 14 st %i5, [ %i0 + 0x14 ] rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2008360: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED 2008364: 82 10 3f ff mov -1, %g1 2008368: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 200836c: 40 00 26 71 call 2011d30 <__errno> 2008370: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 2008374: 10 80 00 06 b 200838c 2008378: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; 200837c: 82 10 20 01 mov 1, %g1 2008380: c2 27 60 30 st %g1, [ %i5 + 0x30 ] return rtems_aio_enqueue (req); 2008384: 7f ff ff 5b call 20080f0 2008388: 81 e8 00 00 restore } 200838c: 81 c7 e0 08 ret 2008390: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200839c : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 200839c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 20083a0: d0 06 00 00 ld [ %i0 ], %o0 20083a4: 40 00 18 24 call 200e434 20083a8: 92 10 20 03 mov 3, %o1 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 20083ac: ba 10 00 18 mov %i0, %i5 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 20083b0: 90 0a 20 03 and %o0, 3, %o0 20083b4: 90 02 3f ff add %o0, -1, %o0 20083b8: 80 a2 20 01 cmp %o0, 1 20083bc: 18 80 00 11 bgu 2008400 20083c0: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 20083c4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20083c8: 80 a0 60 00 cmp %g1, 0 20083cc: 22 80 00 04 be,a 20083dc 20083d0: c2 06 20 08 ld [ %i0 + 8 ], %g1 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 20083d4: 10 80 00 0b b 2008400 20083d8: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 20083dc: 80 a0 60 00 cmp %g1, 0 20083e0: 06 80 00 08 bl 2008400 20083e4: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 20083e8: 7f ff ef 93 call 2004234 20083ec: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 20083f0: b0 92 20 00 orcc %o0, 0, %i0 20083f4: 32 80 00 09 bne,a 2008418 <== ALWAYS TAKEN 20083f8: fa 26 20 14 st %i5, [ %i0 + 0x14 ] rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 20083fc: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED 2008400: 82 10 3f ff mov -1, %g1 2008404: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 2008408: 40 00 26 4a call 2011d30 <__errno> 200840c: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 2008410: 10 80 00 06 b 2008428 2008414: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; 2008418: 82 10 20 02 mov 2, %g1 200841c: c2 27 60 30 st %g1, [ %i5 + 0x30 ] return rtems_aio_enqueue (req); 2008420: 7f ff ff 34 call 20080f0 2008424: 81 e8 00 00 restore } 2008428: 81 c7 e0 08 ret 200842c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02004684 : speed_t cfgetispeed( const struct termios *tp ) { return (tp->c_cflag / (CIBAUD / CBAUD)) & CBAUD; 2004684: d0 12 20 08 lduh [ %o0 + 8 ], %o0 <== NOT EXECUTED } 2004688: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 200468c: 82 10 60 0f or %g1, 0xf, %g1 ! 100f <== NOT EXECUTED 2004690: 81 c3 e0 08 retl <== NOT EXECUTED 2004694: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED =============================================================================== 02004698 : speed_t cfgetospeed( const struct termios *tp ) { return tp->c_cflag & CBAUD; 2004698: d0 02 20 08 ld [ %o0 + 8 ], %o0 <== NOT EXECUTED } 200469c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 20046a0: 82 10 60 0f or %g1, 0xf, %g1 ! 100f <== NOT EXECUTED 20046a4: 81 c3 e0 08 retl <== NOT EXECUTED 20046a8: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED =============================================================================== 020046ac : int cfsetispeed( struct termios *tp, speed_t speed ) { 20046ac: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if ( speed & ~CBAUD ) 20046b0: 03 3f ff fb sethi %hi(0xffffec00), %g1 <== NOT EXECUTED 20046b4: 82 10 63 f0 or %g1, 0x3f0, %g1 ! ffffeff0 <== NOT EXECUTED 20046b8: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 20046bc: 22 80 00 08 be,a 20046dc <== NOT EXECUTED 20046c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20046c4: 40 00 32 4c call 2010ff4 <__errno> <== NOT EXECUTED 20046c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20046cc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20046d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20046d4: 81 c7 e0 08 ret <== NOT EXECUTED 20046d8: 81 e8 00 00 restore <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CIBAUD) | (speed * (CIBAUD / CBAUD)); 20046dc: 05 04 03 c0 sethi %hi(0x100f0000), %g2 <== NOT EXECUTED 20046e0: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED 20046e4: 82 28 40 02 andn %g1, %g2, %g1 <== NOT EXECUTED 20046e8: b2 16 40 01 or %i1, %g1, %i1 <== NOT EXECUTED 20046ec: f2 26 20 08 st %i1, [ %i0 + 8 ] <== NOT EXECUTED return 0; } 20046f0: 81 c7 e0 08 ret <== NOT EXECUTED 20046f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 020046f8 : int cfsetospeed( struct termios *tp, speed_t speed ) { 20046f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED if ( speed & ~CBAUD ) 20046fc: 03 3f ff fb sethi %hi(0xffffec00), %g1 <== NOT EXECUTED 2004700: 82 10 63 f0 or %g1, 0x3f0, %g1 ! ffffeff0 <== NOT EXECUTED 2004704: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 2004708: 22 80 00 08 be,a 2004728 <== NOT EXECUTED 200470c: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2004710: 40 00 32 39 call 2010ff4 <__errno> <== NOT EXECUTED 2004714: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004718: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200471c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004720: 81 c7 e0 08 ret <== NOT EXECUTED 2004724: 81 e8 00 00 restore <== NOT EXECUTED tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed; 2004728: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED 200472c: b2 16 40 01 or %i1, %g1, %i1 <== NOT EXECUTED 2004730: f2 26 20 08 st %i1, [ %i0 + 8 ] <== NOT EXECUTED return 0; } 2004734: 81 c7 e0 08 ret <== NOT EXECUTED 2004738: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02003bb0 : #include #include int chroot( const char *path ) { 2003bb0: 9d e3 bf 48 save %sp, -184, %sp /* * We use the global environment for path evaluation. This makes it possible * to escape from a chroot environment referencing an unmounted file system. */ rtems_filesystem_eval_path_start_with_root_and_current( 2003bb4: 94 10 20 19 mov 0x19, %o2 2003bb8: 92 10 00 18 mov %i0, %o1 2003bbc: 90 07 bf c8 add %fp, -56, %o0 2003bc0: 17 00 80 4a sethi %hi(0x2012800), %o3 2003bc4: 96 12 e0 04 or %o3, 4, %o3 ! 2012804 2003bc8: 40 00 04 cc call 2004ef8 2003bcc: 98 02 ff fc add %o3, -4, %o4 2003bd0: 90 07 bf b0 add %fp, -80, %o0 2003bd4: 40 00 05 e3 call 2005360 2003bd8: 92 07 bf e0 add %fp, -32, %o1 &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); 2003bdc: 40 00 06 5a call 2005544 2003be0: 90 07 bf b0 add %fp, -80, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 2003be4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2003be8: 39 00 80 48 sethi %hi(0x2012000), %i4 2003bec: b8 17 20 74 or %i4, 0x74, %i4 ! 2012074 2003bf0: 80 a0 40 1c cmp %g1, %i4 2003bf4: 02 80 00 29 be 2003c98 2003bf8: d0 27 bf ac st %o0, [ %fp + -84 ] rtems_filesystem_global_location_t *new_root_loc = 2003bfc: 40 00 06 1f call 2005478 2003c00: 90 07 bf ac add %fp, -84, %o0 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( 2003c04: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2003c08: c2 00 60 0c ld [ %g1 + 0xc ], %g1 rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); new_current_loc = rtems_filesystem_location_transform_to_global( &loc ); if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { rtems_filesystem_global_location_t *new_root_loc = rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = 2003c0c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2003c10: 9f c0 40 00 call %g1 2003c14: ba 10 00 08 mov %o0, %i5 (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 2003c18: 80 a2 20 00 cmp %o0, 0 2003c1c: 32 80 00 17 bne,a 2003c78 2003c20: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 sc = rtems_libio_set_private_env(); 2003c24: 40 00 03 32 call 20048ec 2003c28: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 2003c2c: 80 a2 20 00 cmp %o0, 0 2003c30: 12 80 00 0c bne 2003c60 2003c34: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( 2003c38: 39 00 80 49 sethi %hi(0x2012400), %i4 2003c3c: d0 07 23 fc ld [ %i4 + 0x3fc ], %o0 ! 20127fc 2003c40: 92 10 00 1d mov %i5, %o1 2003c44: 40 00 06 04 call 2005454 2003c48: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 2003c4c: d0 07 23 fc ld [ %i4 + 0x3fc ], %o0 2003c50: d2 07 bf ac ld [ %fp + -84 ], %o1 2003c54: 40 00 06 00 call 2005454 2003c58: b0 10 20 00 clr %i0 2003c5c: 30 80 00 10 b,a 2003c9c &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 2003c60: 02 80 00 18 be 2003cc0 <== NEVER TAKEN 2003c64: 01 00 00 00 nop errno = ENOMEM; 2003c68: 40 00 20 93 call 200beb4 <__errno> 2003c6c: 01 00 00 00 nop 2003c70: 10 80 00 08 b 2003c90 2003c74: 82 10 20 0c mov 0xc, %g1 ! c static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 2003c78: 80 a0 40 1c cmp %g1, %i4 2003c7c: 02 80 00 11 be 2003cc0 <== NEVER TAKEN 2003c80: 01 00 00 00 nop errno = eno; 2003c84: 40 00 20 8c call 200beb4 <__errno> 2003c88: 01 00 00 00 nop 2003c8c: 82 10 20 14 mov 0x14, %g1 ! 14 2003c90: 10 80 00 0c b 2003cc0 2003c94: c2 22 00 00 st %g1, [ %o0 ] if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); } } else { rv = -1; 2003c98: b0 10 3f ff mov -1, %i0 } rtems_filesystem_eval_path_cleanup( &ctx ); 2003c9c: 40 00 04 dd call 2005010 2003ca0: 90 07 bf c8 add %fp, -56, %o0 if ( rv != 0 ) { 2003ca4: 80 a6 20 00 cmp %i0, 0 2003ca8: 02 80 00 0a be 2003cd0 2003cac: 01 00 00 00 nop rtems_filesystem_global_location_release( new_current_loc ); 2003cb0: 40 00 05 d1 call 20053f4 2003cb4: d0 07 bf ac ld [ %fp + -84 ], %o0 2003cb8: 81 c7 e0 08 ret 2003cbc: 81 e8 00 00 restore rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 2003cc0: 40 00 05 cd call 20053f4 2003cc4: 90 10 00 1d mov %i5, %o0 } } else { rv = -1; 2003cc8: 10 bf ff f5 b 2003c9c 2003ccc: b0 10 3f ff mov -1, %i0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 2003cd0: 81 c7 e0 08 ret 2003cd4: 81 e8 00 00 restore =============================================================================== 02007584 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 2007584: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2007588: 80 a6 60 00 cmp %i1, 0 200758c: 02 80 00 24 be 200761c 2007590: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2007594: 12 80 00 14 bne 20075e4 2007598: 80 a6 20 04 cmp %i0, 4 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 200759c: 40 00 08 19 call 2009600 <_TOD_Get_as_timestamp> 20075a0: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 20075a4: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 20075a8: 94 10 20 00 clr %o2 20075ac: 90 10 00 1c mov %i4, %o0 20075b0: 92 10 00 1d mov %i5, %o1 20075b4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20075b8: 40 00 53 ae call 201c470 <__divdi3> 20075bc: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 20075c0: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 20075c4: d2 26 40 00 st %o1, [ %i1 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 20075c8: 94 10 20 00 clr %o2 20075cc: 92 10 00 1d mov %i5, %o1 20075d0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20075d4: 40 00 54 92 call 201c81c <__moddi3> 20075d8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 20075dc: 10 80 00 06 b 20075f4 20075e0: d2 26 60 04 st %o1, [ %i1 + 4 ] _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 20075e4: 12 80 00 06 bne 20075fc <== ALWAYS TAKEN 20075e8: 80 a6 20 02 cmp %i0, 2 _TOD_Get_uptime_as_timespec( tp ); 20075ec: 40 00 08 18 call 200964c <_TOD_Get_uptime_as_timespec> 20075f0: 90 10 00 19 mov %i1, %o0 return 0; 20075f4: 81 c7 e0 08 ret 20075f8: 91 e8 20 00 restore %g0, 0, %o0 } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 20075fc: 02 bf ff fc be 20075ec 2007600: 80 a6 20 03 cmp %i0, 3 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2007604: 12 80 00 06 bne 200761c 2007608: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 200760c: 40 00 25 3a call 2010af4 <__errno> 2007610: 01 00 00 00 nop 2007614: 10 80 00 05 b 2007628 2007618: 82 10 20 58 mov 0x58, %g1 ! 58 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 200761c: 40 00 25 36 call 2010af4 <__errno> 2007620: 01 00 00 00 nop 2007624: 82 10 20 16 mov 0x16, %g1 ! 16 2007628: c2 22 00 00 st %g1, [ %o0 ] return 0; } 200762c: 81 c7 e0 08 ret 2007630: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02025620 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2025620: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2025624: 80 a6 60 00 cmp %i1, 0 2025628: 02 80 00 4c be 2025758 <== NEVER TAKEN 202562c: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2025630: 12 80 00 42 bne 2025738 2025634: 80 a6 20 02 cmp %i0, 2 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 2025638: c4 06 40 00 ld [ %i1 ], %g2 202563c: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2025640: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 2025644: 80 a0 80 01 cmp %g2, %g1 2025648: 08 80 00 44 bleu 2025758 202564c: 03 00 81 87 sethi %hi(0x2061c00), %g1 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2025650: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 2061f60 <_Thread_Dispatch_disable_level> 2025654: 84 00 a0 01 inc %g2 2025658: c4 20 63 60 st %g2, [ %g1 + 0x360 ] return _Thread_Dispatch_disable_level; 202565c: c2 00 63 60 ld [ %g1 + 0x360 ], %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 2025660: c6 06 40 00 ld [ %i1 ], %g3 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 2025664: 90 07 bf f8 add %fp, -8, %o0 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 2025668: 85 38 e0 1f sra %g3, 0x1f, %g2 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 202566c: 83 28 a0 03 sll %g2, 3, %g1 2025670: bb 28 e0 03 sll %g3, 3, %i5 2025674: 89 30 e0 1d srl %g3, 0x1d, %g4 2025678: b7 2f 60 05 sll %i5, 5, %i3 202567c: b8 11 00 01 or %g4, %g1, %i4 2025680: 83 37 60 1b srl %i5, 0x1b, %g1 2025684: b5 2f 20 05 sll %i4, 5, %i2 2025688: ba a6 c0 1d subcc %i3, %i5, %i5 202568c: b4 10 40 1a or %g1, %i2, %i2 2025690: b7 2f 60 06 sll %i5, 6, %i3 2025694: b8 66 80 1c subx %i2, %i4, %i4 2025698: 83 37 60 1a srl %i5, 0x1a, %g1 202569c: b6 a6 c0 1d subcc %i3, %i5, %i3 20256a0: b5 2f 20 06 sll %i4, 6, %i2 20256a4: b4 10 40 1a or %g1, %i2, %i2 20256a8: b4 66 80 1c subx %i2, %i4, %i2 20256ac: 86 86 c0 03 addcc %i3, %g3, %g3 20256b0: 83 30 e0 1e srl %g3, 0x1e, %g1 20256b4: b7 28 e0 02 sll %g3, 2, %i3 20256b8: 84 46 80 02 addx %i2, %g2, %g2 20256bc: 86 80 c0 1b addcc %g3, %i3, %g3 20256c0: b5 28 a0 02 sll %g2, 2, %i2 20256c4: b7 28 e0 02 sll %g3, 2, %i3 20256c8: b4 10 40 1a or %g1, %i2, %i2 20256cc: 83 30 e0 1e srl %g3, 0x1e, %g1 20256d0: 84 40 80 1a addx %g2, %i2, %g2 20256d4: b6 80 c0 1b addcc %g3, %i3, %i3 20256d8: bb 2e e0 02 sll %i3, 2, %i5 20256dc: b5 28 a0 02 sll %g2, 2, %i2 20256e0: b4 10 40 1a or %g1, %i2, %i2 20256e4: 83 36 e0 1e srl %i3, 0x1e, %g1 20256e8: b4 40 80 1a addx %g2, %i2, %i2 20256ec: 86 86 c0 1d addcc %i3, %i5, %g3 20256f0: b9 2e a0 02 sll %i2, 2, %i4 20256f4: bb 30 e0 17 srl %g3, 0x17, %i5 20256f8: b8 10 40 1c or %g1, %i4, %i4 20256fc: 84 46 80 1c addx %i2, %i4, %g2 2025700: 89 28 a0 09 sll %g2, 9, %g4 2025704: 84 17 40 04 or %i5, %g4, %g2 2025708: fa 06 60 04 ld [ %i1 + 4 ], %i5 202570c: 83 28 e0 09 sll %g3, 9, %g1 2025710: b9 3f 60 1f sra %i5, 0x1f, %i4 2025714: 86 80 40 1d addcc %g1, %i5, %g3 2025718: 84 40 80 1c addx %g2, %i4, %g2 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 202571c: b0 10 20 00 clr %i0 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 2025720: 40 00 04 82 call 2026928 <_TOD_Set_with_timestamp> 2025724: c4 3f bf f8 std %g2, [ %fp + -8 ] if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 2025728: 7f ff 91 ca call 2009e50 <_Thread_Enable_dispatch> 202572c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 2025730: 81 c7 e0 08 ret 2025734: 81 e8 00 00 restore _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 2025738: 02 80 00 04 be 2025748 202573c: 80 a6 20 03 cmp %i0, 3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2025740: 12 80 00 06 bne 2025758 2025744: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 2025748: 40 00 44 0d call 203677c <__errno> 202574c: 01 00 00 00 nop 2025750: 10 80 00 05 b 2025764 2025754: 82 10 20 58 mov 0x58, %g1 ! 58 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 2025758: 40 00 44 09 call 203677c <__errno> 202575c: 01 00 00 00 nop 2025760: 82 10 20 16 mov 0x16, %g1 ! 16 2025764: c2 22 00 00 st %g1, [ %o0 ] return 0; } 2025768: 81 c7 e0 08 ret 202576c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02003844 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 2003844: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 2003848: 03 00 80 85 sethi %hi(0x2021400), %g1 200384c: e0 00 63 70 ld [ %g1 + 0x370 ], %l0 ! 2021770 2003850: 80 a6 00 10 cmp %i0, %l0 2003854: 0a 80 00 16 bcs 20038ac 2003858: 03 00 80 85 sethi %hi(0x2021400), %g1 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 200385c: bb 2c 20 01 sll %l0, 1, %i5 if (major >= new_size) { 2003860: 80 a6 00 1d cmp %i0, %i5 2003864: 0a 80 00 03 bcs 2003870 <== NEVER TAKEN 2003868: d0 00 63 74 ld [ %g1 + 0x374 ], %o0 new_size = major + 1; 200386c: ba 06 20 01 add %i0, 1, %i5 } table = realloc(table, new_size * sizeof(*table)); 2003870: 40 00 08 93 call 2005abc 2003874: 93 2f 60 03 sll %i5, 3, %o1 if (table == NULL) { 2003878: a2 92 20 00 orcc %o0, 0, %l1 200387c: 02 80 00 58 be 20039dc <== ALWAYS TAKEN 2003880: 94 27 40 10 sub %i5, %l0, %o2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003884: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED 2003888: 92 10 20 00 clr %o1 <== NOT EXECUTED 200388c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED 2003890: 40 00 43 47 call 20145ac <== NOT EXECUTED 2003894: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 2003898: 03 00 80 85 sethi %hi(0x2021400), %g1 <== NOT EXECUTED 200389c: e2 20 63 74 st %l1, [ %g1 + 0x374 ] ! 2021774 <== NOT EXECUTED disktab_size = new_size; 20038a0: 03 00 80 85 sethi %hi(0x2021400), %g1 <== NOT EXECUTED 20038a4: fa 20 63 70 st %i5, [ %g1 + 0x370 ] ! 2021770 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20038a8: 03 00 80 85 sethi %hi(0x2021400), %g1 <== NOT EXECUTED 20038ac: e4 00 63 74 ld [ %g1 + 0x374 ], %l2 ! 2021774 20038b0: a3 2e 20 03 sll %i0, 3, %l1 20038b4: d0 04 80 11 ld [ %l2 + %l1 ], %o0 20038b8: a8 04 80 11 add %l2, %l1, %l4 20038bc: 80 a2 20 00 cmp %o0, 0 20038c0: 02 80 00 05 be 20038d4 20038c4: e0 05 20 04 ld [ %l4 + 4 ], %l0 20038c8: 80 a6 40 10 cmp %i1, %l0 20038cc: 2a 80 00 16 bcs,a 2003924 20038d0: e2 04 80 11 ld [ %l2 + %l1 ], %l1 rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 20038d4: 80 a4 20 00 cmp %l0, 0 20038d8: 02 80 00 03 be 20038e4 20038dc: ba 10 20 08 mov 8, %i5 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 20038e0: bb 2c 20 01 sll %l0, 1, %i5 } if (minor >= new_size) { 20038e4: 80 a6 40 1d cmp %i1, %i5 20038e8: 3a 80 00 02 bcc,a 20038f0 20038ec: ba 06 60 01 add %i1, 1, %i5 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 20038f0: 40 00 08 73 call 2005abc 20038f4: 93 2f 60 02 sll %i5, 2, %o1 if (table == NULL) { 20038f8: a6 92 20 00 orcc %o0, 0, %l3 20038fc: 02 80 00 38 be 20039dc 2003900: 94 27 40 10 sub %i5, %l0, %o2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003904: 91 2c 20 02 sll %l0, 2, %o0 2003908: 92 10 20 00 clr %o1 200390c: 90 04 c0 08 add %l3, %o0, %o0 2003910: 40 00 43 27 call 20145ac 2003914: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2003918: e6 24 80 11 st %l3, [ %l2 + %l1 ] disktab [major].size = new_size; 200391c: fa 25 20 04 st %i5, [ %l4 + 4 ] } return disktab [major].minor + minor; 2003920: e2 04 80 11 ld [ %l2 + %l1 ], %l1 2003924: a1 2e 60 02 sll %i1, 2, %l0 2003928: 82 04 40 10 add %l1, %l0, %g1 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 200392c: 80 a0 60 00 cmp %g1, 0 2003930: 32 80 00 04 bne,a 2003940 <== ALWAYS TAKEN 2003934: c4 04 40 10 ld [ %l1 + %l0 ], %g2 return RTEMS_NO_MEMORY; 2003938: 10 80 00 2a b 20039e0 <== NOT EXECUTED 200393c: 82 10 20 1a mov 0x1a, %g1 <== NOT EXECUTED } if (*dd_entry != NULL) { 2003940: 80 a0 a0 00 cmp %g2, 0 2003944: 12 80 00 27 bne 20039e0 2003948: 82 10 20 0c mov 0xc, %g1 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 200394c: 40 00 05 95 call 2004fa0 2003950: 90 10 20 78 mov 0x78, %o0 if (dd == NULL) { 2003954: ba 92 20 00 orcc %o0, 0, %i5 2003958: 02 80 00 21 be 20039dc <== NEVER TAKEN 200395c: 80 a6 a0 00 cmp %i2, 0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2003960: 02 80 00 11 be 20039a4 2003964: a4 10 20 00 clr %l2 alloc_name = strdup(name); 2003968: 40 00 44 6a call 2014b10 200396c: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2003970: a4 92 20 00 orcc %o0, 0, %l2 2003974: 12 80 00 11 bne 20039b8 <== ALWAYS TAKEN 2003978: b4 10 00 08 mov %o0, %i2 free(dd); 200397c: 40 00 04 33 call 2004a48 <== NOT EXECUTED 2003980: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; 2003984: 10 80 00 17 b 20039e0 <== NOT EXECUTED 2003988: 82 10 20 1a mov 0x1a, %g1 <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 200398c: 40 00 04 2f call 2004a48 <== NOT EXECUTED 2003990: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED free(dd); 2003994: 40 00 04 2d call 2004a48 <== NOT EXECUTED 2003998: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 200399c: 10 80 00 11 b 20039e0 <== NOT EXECUTED 20039a0: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED } } *dd_entry = dd; 20039a4: fa 24 40 10 st %i5, [ %l1 + %l0 ] *dd_ptr = dd; 20039a8: fa 26 c0 00 st %i5, [ %i3 ] *alloc_name_ptr = alloc_name; 20039ac: e4 27 00 00 st %l2, [ %i4 ] return RTEMS_SUCCESSFUL; 20039b0: 10 80 00 0c b 20039e0 20039b4: 82 10 20 00 clr %g1 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 20039b8: 13 00 00 18 sethi %hi(0x6000), %o1 20039bc: 94 10 00 18 mov %i0, %o2 20039c0: 92 12 61 ff or %o1, 0x1ff, %o1 20039c4: 40 00 05 ea call 200516c 20039c8: 96 10 00 19 mov %i1, %o3 20039cc: 80 a2 20 00 cmp %o0, 0 20039d0: 36 bf ff f6 bge,a 20039a8 <== ALWAYS TAKEN 20039d4: fa 24 40 10 st %i5, [ %l1 + %l0 ] 20039d8: 30 bf ff ed b,a 200398c <== NOT EXECUTED rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; 20039dc: 82 10 20 1a mov 0x1a, %g1 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 20039e0: 81 c7 e0 08 ret 20039e4: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 02004b2c : * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 2004b2c: 9d e3 bf 98 save %sp, -104, %sp return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004b30: 90 10 20 01 mov 1, %o0 * RTEMS_SUCCESSFUL, if success; * RTEMS_NO_MEMOTY, if cannot allocate memory for part_desc_t strucure; * RTEMS_INTERNAL_ERROR, if other error occurs. */ static rtems_status_code data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) 2004b34: b8 10 00 18 mov %i0, %i4 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 2004b38: c0 26 40 00 clr [ %i1 ] if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004b3c: 92 10 20 28 mov 0x28, %o1 2004b40: 40 00 03 08 call 2005760 2004b44: b0 10 20 1a mov 0x1a, %i0 2004b48: 80 a2 20 00 cmp %o0, 0 2004b4c: 02 80 00 27 be 2004be8 <== NEVER TAKEN 2004b50: ba 10 00 08 mov %o0, %i5 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004b54: c2 0f 00 00 ldub [ %i4 ], %g1 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 2004b58: 92 07 20 08 add %i4, 8, %o1 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004b5c: c2 2a 00 00 stb %g1, [ %o0 ] part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004b60: f6 0f 20 04 ldub [ %i4 + 4 ], %i3 /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 2004b64: 94 10 20 04 mov 4, %o2 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004b68: f6 2a 20 01 stb %i3, [ %o0 + 1 ] /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); 2004b6c: 40 00 43 20 call 20157ec 2004b70: 90 07 bf fc add %fp, -4, %o0 part_desc->start = LE_TO_CPU_U32(temp); 2004b74: 7f ff ff ac call 2004a24 2004b78: d0 07 bf fc ld [ %fp + -4 ], %o0 memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004b7c: 92 07 20 0c add %i4, 0xc, %o1 /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); 2004b80: d0 27 60 04 st %o0, [ %i5 + 4 ] memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004b84: 94 10 20 04 mov 4, %o2 2004b88: 40 00 43 19 call 20157ec 2004b8c: 90 07 bf fc add %fp, -4, %o0 part_desc->size = LE_TO_CPU_U32(temp); 2004b90: 7f ff ff a5 call 2004a24 2004b94: d0 07 bf fc ld [ %fp + -4 ], %o0 2004b98: d0 27 60 08 st %o0, [ %i5 + 8 ] * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004b9c: 82 0e e0 7f and %i3, 0x7f, %g1 2004ba0: 80 a0 60 05 cmp %g1, 5 2004ba4: 02 80 00 0c be 2004bd4 2004ba8: b8 10 00 08 mov %o0, %i4 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 2004bac: 11 00 80 91 sethi %hi(0x2024400), %o0 2004bb0: 92 0e e0 ff and %i3, 0xff, %o1 2004bb4: 90 12 21 40 or %o0, 0x140, %o0 2004bb8: 40 00 42 9f call 2015634 2004bbc: 94 10 20 06 mov 6, %o2 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004bc0: 80 a2 20 00 cmp %o0, 0 2004bc4: 02 80 00 06 be 2004bdc 2004bc8: 80 a7 20 00 cmp %i4, 0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 2004bcc: 02 80 00 04 be 2004bdc <== NEVER TAKEN 2004bd0: 01 00 00 00 nop *new_part_desc = part_desc; 2004bd4: 10 80 00 04 b 2004be4 2004bd8: fa 26 40 00 st %i5, [ %i1 ] } else { /* empty partition */ free(part_desc); 2004bdc: 40 00 03 b6 call 2005ab4 2004be0: 90 10 00 1d mov %i5, %o0 } return RTEMS_SUCCESSFUL; 2004be4: b0 10 20 00 clr %i0 } 2004be8: 81 c7 e0 08 ret 2004bec: 81 e8 00 00 restore =============================================================================== 02002c5c : #endif #include "devfs.h" void devFS_Show(void) { 2002c5c: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002c60: 03 00 80 69 sethi %hi(0x201a400), %g1 2002c64: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 ! 201a434 if (rootloc->mt_entry->ops == &devFS_ops) { 2002c68: 05 00 80 62 sethi %hi(0x2018800), %g2 2002c6c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2002c70: 84 10 a0 44 or %g2, 0x44, %g2 2002c74: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2002c78: c6 00 60 0c ld [ %g1 + 0xc ], %g3 2002c7c: 80 a0 c0 02 cmp %g3, %g2 2002c80: 12 80 00 25 bne 2002d14 <== NEVER TAKEN 2002c84: 33 00 80 62 sethi %hi(0x2018800), %i1 static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 2002c88: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002c8c: 31 00 80 62 sethi %hi(0x2018800), %i0 } printk( 2002c90: 21 00 80 62 sethi %hi(0x2018800), %l0 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 2002c94: f4 00 60 04 ld [ %g1 + 4 ], %i2 2002c98: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002c9c: b6 10 20 00 clr %i3 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002ca0: b2 16 60 98 or %i1, 0x98, %i1 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002ca4: b0 16 20 a0 or %i0, 0xa0, %i0 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002ca8: 10 80 00 18 b 2002d08 2002cac: a0 14 20 a8 or %l0, 0xa8, %l0 devFS_node *current = nodes + i; if (current->name != NULL) { 2002cb0: 80 a0 60 00 cmp %g1, 0 2002cb4: 22 80 00 14 be,a 2002d04 2002cb8: b6 06 e0 01 inc %i3 size_t j = 0; size_t m = current->namelen; 2002cbc: e2 07 60 04 ld [ %i5 + 4 ], %l1 printk("/"); 2002cc0: 90 10 00 19 mov %i1, %o0 2002cc4: 40 00 04 a7 call 2003f60 2002cc8: b8 10 20 00 clr %i4 for (j = 0; j < m; ++j) { 2002ccc: 10 80 00 07 b 2002ce8 2002cd0: 80 a7 00 11 cmp %i4, %l1 printk("%c", current->name [j]); 2002cd4: 90 10 00 18 mov %i0, %o0 2002cd8: d2 48 40 1c ldsb [ %g1 + %i4 ], %o1 2002cdc: 40 00 04 a1 call 2003f60 2002ce0: b8 07 20 01 inc %i4 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 2002ce4: 80 a7 00 11 cmp %i4, %l1 2002ce8: 32 bf ff fb bne,a 2002cd4 2002cec: c2 07 40 00 ld [ %i5 ], %g1 printk("%c", current->name [j]); } printk( 2002cf0: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002cf4: d4 07 60 0c ld [ %i5 + 0xc ], %o2 2002cf8: 40 00 04 9a call 2003f60 2002cfc: 90 10 00 10 mov %l0, %o0 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002d00: b6 06 e0 01 inc %i3 2002d04: ba 07 60 14 add %i5, 0x14, %i5 2002d08: 80 a6 c0 1a cmp %i3, %i2 2002d0c: 32 bf ff e9 bne,a 2002cb0 2002d10: c2 07 40 00 ld [ %i5 ], %g1 2002d14: 81 c7 e0 08 ret 2002d18: 81 e8 00 00 restore =============================================================================== 0200bd4c : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200bd4c: 9d e3 bf a0 save %sp, -96, %sp static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 200bd50: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 static inline const char *rtems_filesystem_eval_path_get_path( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->path; 200bd54: f2 06 00 00 ld [ %i0 ], %i1 200bd58: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 static inline size_t rtems_filesystem_eval_path_get_pathlen( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->pathlen; 200bd5c: f6 06 20 04 ld [ %i0 + 4 ], %i3 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 200bd60: e2 00 60 04 ld [ %g1 + 4 ], %l1 200bd64: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200bd68: b8 10 20 00 clr %i4 devFS_node *free_node = NULL; 200bd6c: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200bd70: 10 80 00 12 b 200bdb8 200bd74: b4 10 20 00 clr %i2 devFS_node *current = nodes + i; if (current->name != NULL) { 200bd78: 80 a2 20 00 cmp %o0, 0 200bd7c: 02 80 00 0c be 200bdac 200bd80: a0 10 00 1d mov %i5, %l0 if ( 200bd84: c4 07 60 04 ld [ %i5 + 4 ], %g2 200bd88: 80 a0 80 1b cmp %g2, %i3 200bd8c: 12 80 00 08 bne 200bdac 200bd90: a0 10 00 01 mov %g1, %l0 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200bd94: 92 10 00 19 mov %i1, %o1 200bd98: 40 00 0d ec call 200f548 200bd9c: 94 10 00 1b mov %i3, %o2 200bda0: 80 a2 20 00 cmp %o0, 0 200bda4: 22 80 00 02 be,a 200bdac 200bda8: b8 10 00 1d mov %i5, %i4 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200bdac: b4 06 a0 01 inc %i2 200bdb0: ba 07 60 14 add %i5, 0x14, %i5 200bdb4: 82 10 00 10 mov %l0, %g1 200bdb8: 80 a7 20 00 cmp %i4, 0 200bdbc: 02 80 00 0a be 200bde4 200bdc0: 80 a6 80 11 cmp %i2, %l1 200bdc4: 80 a0 60 00 cmp %g1, 0 200bdc8: 02 80 00 07 be 200bde4 200bdcc: 80 a6 80 11 cmp %i2, %l1 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 200bdd0: 80 a7 20 00 cmp %i4, 0 200bdd4: 12 80 00 08 bne 200bdf4 200bdd8: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 200bddc: 10 80 00 0b b 200be08 200bde0: 80 88 a0 20 btst 0x20, %g2 size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200bde4: 32 bf ff e5 bne,a 200bd78 200bde8: d0 07 40 00 ld [ %i5 ], %o0 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 200bdec: 10 bf ff fa b 200bdd4 200bdf0: 80 a7 20 00 cmp %i4, 0 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200bdf4: 80 88 a0 40 btst 0x40, %g2 200bdf8: 12 80 00 12 bne 200be40 200bdfc: b2 10 20 11 mov 0x11, %i1 currentloc->node_access = node; 200be00: 10 80 00 0a b 200be28 200be04: f8 26 20 20 st %i4, [ %i0 + 0x20 ] rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 200be08: 02 80 00 0d be 200be3c <== NEVER TAKEN 200be0c: 80 a0 60 00 cmp %g1, 0 if (free_node != NULL) { 200be10: 02 80 00 09 be 200be34 200be14: 84 10 21 ff mov 0x1ff, %g2 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200be18: c4 20 60 10 st %g2, [ %g1 + 0x10 ] currentloc->node_access = free_node; 200be1c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200be20: f2 26 20 08 st %i1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200be24: f6 26 20 0c st %i3, [ %i0 + 0xc ] static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 200be28: c0 26 20 04 clr [ %i0 + 4 ] 200be2c: 81 c7 e0 08 ret 200be30: 81 e8 00 00 restore rtems_filesystem_eval_path_get_path(ctx), rtems_filesystem_eval_path_get_pathlen(ctx) ); rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); 200be34: 10 80 00 03 b 200be40 200be38: b2 10 20 1c mov 0x1c, %i1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200be3c: b2 10 20 02 mov 2, %i1 <== NOT EXECUTED 200be40: 7f ff e4 1f call 2004ebc 200be44: 81 e8 00 00 restore =============================================================================== 0200381c : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 200381c: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 2003820: 80 a6 a0 03 cmp %i2, 3 2003824: 12 80 00 0e bne 200385c 2003828: 05 00 00 2c sethi %hi(0xb000), %g2 200382c: c2 4e 40 00 ldsb [ %i1 ], %g1 2003830: 80 a0 60 64 cmp %g1, 0x64 2003834: 12 80 00 0b bne 2003860 <== NEVER TAKEN 2003838: 03 00 00 08 sethi %hi(0x2000), %g1 200383c: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1 2003840: 80 a0 60 65 cmp %g1, 0x65 2003844: 12 80 00 07 bne 2003860 <== NEVER TAKEN 2003848: 03 00 00 08 sethi %hi(0x2000), %g1 200384c: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1 2003850: 80 a0 60 76 cmp %g1, 0x76 2003854: 02 80 00 1b be 20038c0 <== ALWAYS TAKEN 2003858: 03 00 00 3c sethi %hi(0xf000), %g1 if (S_ISBLK(mode) || S_ISCHR(mode)) { 200385c: 03 00 00 08 sethi %hi(0x2000), %g1 2003860: 84 0e c0 02 and %i3, %g2, %g2 2003864: 80 a0 80 01 cmp %g2, %g1 2003868: 12 80 00 1b bne 20038d4 200386c: 01 00 00 00 nop char *dupname = malloc(namelen); 2003870: 40 00 01 f8 call 2004050 2003874: 90 10 00 1a mov %i2, %o0 if (dupname != NULL) { 2003878: 84 92 20 00 orcc %o0, 0, %g2 200387c: 02 80 00 0d be 20038b0 2003880: 92 10 00 19 mov %i1, %o1 devFS_node *node = parentloc->node_access; 2003884: c2 06 20 08 ld [ %i0 + 8 ], %g1 node->name = dupname; 2003888: c4 20 40 00 st %g2, [ %g1 ] node->namelen = namelen; 200388c: f4 20 60 04 st %i2, [ %g1 + 4 ] node->major = rtems_filesystem_dev_major_t(dev); 2003890: f8 20 60 08 st %i4, [ %g1 + 8 ] node->minor = rtems_filesystem_dev_minor_t(dev); 2003894: fa 20 60 0c st %i5, [ %g1 + 0xc ] node->mode = mode; 2003898: f6 20 60 10 st %i3, [ %g1 + 0x10 ] memcpy(dupname, name, namelen); 200389c: 94 10 00 1a mov %i2, %o2 20038a0: 40 00 2f 54 call 200f5f0 20038a4: b0 10 20 00 clr %i0 20038a8: 81 c7 e0 08 ret 20038ac: 81 e8 00 00 restore } else { errno = ENOMEM; 20038b0: 40 00 2b 55 call 200e604 <__errno> 20038b4: 01 00 00 00 nop 20038b8: 10 80 00 0a b 20038e0 20038bc: 82 10 20 0c mov 0xc, %g1 ! c } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 20038c0: b6 0e c0 01 and %i3, %g1, %i3 20038c4: 03 00 00 10 sethi %hi(0x4000), %g1 20038c8: 80 a6 c0 01 cmp %i3, %g1 20038cc: 02 bf ff f7 be 20038a8 <== ALWAYS TAKEN 20038d0: b0 10 20 00 clr %i0 errno = ENOTSUP; 20038d4: 40 00 2b 4c call 200e604 <__errno> 20038d8: 01 00 00 00 nop 20038dc: 82 10 20 86 mov 0x86, %g1 ! 86 20038e0: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 20038e4: b0 10 3f ff mov -1, %i0 } } return rv; } 20038e8: 81 c7 e0 08 ret 20038ec: 81 e8 00 00 restore =============================================================================== 020037d4 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 20037d4: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 20037d8: 03 00 80 85 sethi %hi(0x2021400), %g1 20037dc: d0 00 63 6c ld [ %g1 + 0x36c ], %o0 ! 202176c 20037e0: 92 10 20 00 clr %o1 20037e4: 94 10 20 00 clr %o2 20037e8: 40 00 15 48 call 2008d08 20037ec: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 20037f0: 80 a2 20 00 cmp %o0, 0 20037f4: 12 80 00 05 bne 2003808 <== NEVER TAKEN 20037f8: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 20037fc: 03 00 80 85 sethi %hi(0x2021400), %g1 return RTEMS_SUCCESSFUL; 2003800: b0 10 20 00 clr %i0 { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 2003804: c4 28 63 68 stb %g2, [ %g1 + 0x368 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 2003808: 81 c7 e0 08 ret 200380c: 81 e8 00 00 restore =============================================================================== 02003810 : static void disk_unlock(void) { 2003810: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 2003814: 03 00 80 85 sethi %hi(0x2021400), %g1 2003818: c0 28 63 68 clrb [ %g1 + 0x368 ] ! 2021768 sc = rtems_semaphore_release(diskdevs_mutex); 200381c: 03 00 80 85 sethi %hi(0x2021400), %g1 2003820: 40 00 15 84 call 2008e30 2003824: d0 00 63 6c ld [ %g1 + 0x36c ], %o0 ! 202176c if (sc != RTEMS_SUCCESSFUL) { 2003828: 80 a2 20 00 cmp %o0, 0 200382c: 02 80 00 04 be 200383c <== ALWAYS TAKEN 2003830: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2003834: 40 00 16 e2 call 20093bc <== NOT EXECUTED 2003838: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED 200383c: 81 c7 e0 08 ret 2003840: 81 e8 00 00 restore =============================================================================== 020053a4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 20053a4: 9d e3 bf a0 save %sp, -96, %sp { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 20053a8: 7f ff f4 c7 call 20026c4 20053ac: 01 00 00 00 nop while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 20053b0: 10 80 00 0f b 20053ec 20053b4: b8 10 20 02 mov 2, %i4 ! 2 rtems_interrupt_enable (level); 20053b8: 7f ff f4 c7 call 20026d4 <== NOT EXECUTED 20053bc: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 20053c0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 20053c4: 92 10 20 00 clr %o1 <== NOT EXECUTED 20053c8: 40 00 09 50 call 2007908 <== NOT EXECUTED 20053cc: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 20053d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20053d4: 02 80 00 04 be 20053e4 <== NOT EXECUTED 20053d8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20053dc: 40 00 0b 10 call 200801c <== NOT EXECUTED 20053e0: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 20053e4: 7f ff f4 b8 call 20026c4 <== NOT EXECUTED 20053e8: 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) { 20053ec: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 20053f0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 20053f4: 80 a0 80 01 cmp %g2, %g1 20053f8: 32 bf ff f0 bne,a 20053b8 <== NEVER TAKEN 20053fc: f8 26 20 94 st %i4, [ %i0 + 0x94 ] <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 2005400: 7f ff f4 b5 call 20026d4 2005404: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003c68 : int dup2( int fildes, int fildes2 ) { 2003c68: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003c6c: 90 10 00 18 mov %i0, %o0 2003c70: 40 00 01 e3 call 20043fc 2003c74: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003c78: 80 a2 3f ff cmp %o0, -1 2003c7c: 12 80 00 04 bne 2003c8c 2003c80: 90 10 00 19 mov %i1, %o0 return -1; 2003c84: 81 c7 e0 08 ret 2003c88: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003c8c: 40 00 01 dc call 20043fc 2003c90: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003c94: 80 a2 3f ff cmp %o0, -1 2003c98: 02 bf ff fb be 2003c84 <== NEVER TAKEN 2003c9c: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2003ca0: 92 10 20 00 clr %o1 2003ca4: 40 00 00 b0 call 2003f64 2003ca8: 94 10 00 19 mov %i1, %o2 } 2003cac: 81 c7 e0 08 ret 2003cb0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02006104 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2006104: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 2006108: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 200610c: 80 88 62 00 btst 0x200, %g1 2006110: 02 80 00 19 be 2006174 <== NEVER TAKEN 2006114: 03 00 80 74 sethi %hi(0x201d000), %g1 iscntrl(c) && (c != '\t') && (c != '\n')) { 2006118: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201d070 <__ctype_ptr__> 200611c: 82 00 40 18 add %g1, %i0, %g1 2006120: c2 08 60 01 ldub [ %g1 + 1 ], %g1 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 2006124: 80 88 60 20 btst 0x20, %g1 2006128: 02 80 00 14 be 2006178 200612c: 90 10 00 18 mov %i0, %o0 iscntrl(c) && (c != '\t') && (c != '\n')) { 2006130: 82 06 3f f7 add %i0, -9, %g1 2006134: 82 08 60 ff and %g1, 0xff, %g1 2006138: 80 a0 60 01 cmp %g1, 1 200613c: 08 80 00 0f bleu 2006178 2006140: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2006144: b0 1e 20 40 xor %i0, 0x40, %i0 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2006148: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 200614c: f0 2f bf f9 stb %i0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2006150: 90 07 bf f8 add %fp, -8, %o0 2006154: 92 10 20 02 mov 2, %o1 2006158: 7f ff ff 43 call 2005e64 200615c: 94 10 00 19 mov %i1, %o2 tty->column += 2; 2006160: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 2006164: 82 00 60 02 add %g1, 2, %g1 2006168: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 200616c: 81 c7 e0 08 ret 2006170: 81 e8 00 00 restore } else { oproc (c, tty); 2006174: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006178: 7f ff ff 84 call 2005f88 200617c: 92 10 00 19 mov %i1, %o1 2006180: 81 c7 e0 08 ret 2006184: 81 e8 00 00 restore =============================================================================== 02024608 : } void endgrent(void) { if (group_fp != NULL) 2024608: 03 00 81 86 sethi %hi(0x2061800), %g1 202460c: d0 00 60 a8 ld [ %g1 + 0xa8 ], %o0 ! 20618a8 2024610: 80 a2 20 00 cmp %o0, 0 2024614: 02 80 00 05 be 2024628 <== NEVER TAKEN 2024618: 01 00 00 00 nop fclose(group_fp); 202461c: 82 13 c0 00 mov %o7, %g1 2024620: 40 00 48 a9 call 20368c4 2024624: 9e 10 40 00 mov %g1, %o7 2024628: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02024464 : } void endpwent(void) { if (passwd_fp != NULL) 2024464: 03 00 81 85 sethi %hi(0x2061400), %g1 2024468: d0 00 63 c8 ld [ %g1 + 0x3c8 ], %o0 ! 20617c8 202446c: 80 a2 20 00 cmp %o0, 0 2024470: 02 80 00 05 be 2024484 <== NEVER TAKEN 2024474: 01 00 00 00 nop fclose(passwd_fp); 2024478: 82 13 c0 00 mov %o7, %g1 202447c: 40 00 49 12 call 20368c4 2024480: 9e 10 40 00 mov %g1, %o7 2024484: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02006188 : * Erase a character or line * 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) 2006188: 9d e3 bf a0 save %sp, -96, %sp 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); 200618c: 35 00 80 6d sethi %hi(0x201b400), %i2 * Erase a character or line * 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) 2006190: ba 10 00 18 mov %i0, %i5 2006194: 37 00 80 74 sethi %hi(0x201d000), %i3 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2006198: 31 00 80 6d sethi %hi(0x201b400), %i0 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); 200619c: b4 16 a3 90 or %i2, 0x390, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20061a0: 10 80 00 62 b 2006328 20061a4: b0 16 23 88 or %i0, 0x388, %i0 } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 20061a8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 20061ac: 86 00 ff ff add %g3, -1, %g3 20061b0: c6 27 60 20 st %g3, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 20061b4: 80 88 60 08 btst 8, %g1 20061b8: 02 80 00 59 be 200631c <== NEVER TAKEN 20061bc: f8 09 00 03 ldub [ %g4 + %g3 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 20061c0: 80 a6 60 00 cmp %i1, 0 20061c4: 32 80 00 08 bne,a 20061e4 20061c8: b8 0f 20 ff and %i4, 0xff, %i4 20061cc: 80 88 60 10 btst 0x10, %g1 20061d0: 32 80 00 05 bne,a 20061e4 <== ALWAYS TAKEN 20061d4: b8 0f 20 ff and %i4, 0xff, %i4 echo (tty->termios.c_cc[VERASE], tty); 20061d8: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED 20061dc: 7f ff ff ca call 2006104 <== NOT EXECUTED 20061e0: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED } else if (c == '\t') { 20061e4: 80 a7 20 09 cmp %i4, 9 20061e8: 32 80 00 28 bne,a 2006288 20061ec: c4 06 e0 70 ld [ %i3 + 0x70 ], %g2 int col = tty->read_start_column; 20061f0: f8 07 60 2c ld [ %i5 + 0x2c ], %i4 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 20061f4: da 06 e0 70 ld [ %i3 + 0x70 ], %o5 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; int i = 0; 20061f8: 84 10 20 00 clr %g2 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 20061fc: 10 80 00 12 b 2006244 2006200: 82 08 62 00 and %g1, 0x200, %g1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 2006204: 80 a3 e0 09 cmp %o7, 9 2006208: 12 80 00 04 bne 2006218 200620c: 84 00 a0 01 inc %g2 col = (col | 7) + 1; 2006210: 10 80 00 0c b 2006240 2006214: b8 17 20 07 or %i4, 7, %i4 } else if (iscntrl (c)) { 2006218: 9e 03 40 0f add %o5, %o7, %o7 200621c: de 0b e0 01 ldub [ %o7 + 1 ], %o7 2006220: 80 8b e0 20 btst 0x20, %o7 2006224: 22 80 00 08 be,a 2006244 <== ALWAYS TAKEN 2006228: b8 07 20 01 inc %i4 if (tty->termios.c_lflag & ECHOCTL) 200622c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006230: 32 80 00 05 bne,a 2006244 <== NOT EXECUTED 2006234: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2006238: 10 80 00 04 b 2006248 <== NOT EXECUTED 200623c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 2006240: b8 07 20 01 inc %i4 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2006244: 80 a0 80 03 cmp %g2, %g3 2006248: 32 bf ff ef bne,a 2006204 200624c: de 09 00 02 ldub [ %g4 + %g2 ], %o7 } /* * Back up over the tab */ while (tty->column > col) { 2006250: 10 80 00 09 b 2006274 2006254: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 rtems_termios_puts ("\b", 1, tty); 2006258: 92 10 20 01 mov 1, %o1 200625c: 7f ff ff 02 call 2005e64 2006260: 94 10 00 1d mov %i5, %o2 tty->column--; 2006264: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006268: 82 00 7f ff add %g1, -1, %g1 200626c: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } /* * Back up over the tab */ while (tty->column > col) { 2006270: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006274: 80 a0 40 1c cmp %g1, %i4 2006278: 14 bf ff f8 bg 2006258 200627c: 90 10 00 18 mov %i0, %o0 if (tty->column) tty->column--; } } } if (!lineFlag) 2006280: 10 80 00 28 b 2006320 2006284: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006288: b8 07 20 01 inc %i4 200628c: c4 08 80 1c ldub [ %g2 + %i4 ], %g2 2006290: 80 88 a0 20 btst 0x20, %g2 2006294: 22 80 00 10 be,a 20062d4 <== ALWAYS TAKEN 2006298: c2 06 e0 70 ld [ %i3 + 0x70 ], %g1 200629c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20062a0: 02 80 00 0d be 20062d4 <== NOT EXECUTED 20062a4: c2 06 e0 70 ld [ %i3 + 0x70 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 20062a8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 20062ac: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20062b0: 7f ff fe ed call 2005e64 <== NOT EXECUTED 20062b4: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 20062b8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 20062bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20062c0: 22 80 00 05 be,a 20062d4 <== NOT EXECUTED 20062c4: c2 06 e0 70 ld [ %i3 + 0x70 ], %g1 <== NOT EXECUTED tty->column--; 20062c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20062cc: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 20062d0: c2 06 e0 70 ld [ %i3 + 0x70 ], %g1 <== NOT EXECUTED 20062d4: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 20062d8: 80 88 60 20 btst 0x20, %g1 20062dc: 02 80 00 07 be 20062f8 <== ALWAYS TAKEN 20062e0: 90 10 00 1a mov %i2, %o0 20062e4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 20062e8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20062ec: 02 80 00 0d be 2006320 <== NOT EXECUTED 20062f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 20062f4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 20062f8: 92 10 20 03 mov 3, %o1 20062fc: 7f ff fe da call 2005e64 2006300: 94 10 00 1d mov %i5, %o2 if (tty->column) 2006304: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006308: 80 a0 60 00 cmp %g1, 0 200630c: 02 80 00 05 be 2006320 <== NEVER TAKEN 2006310: 80 a6 60 00 cmp %i1, 0 tty->column--; 2006314: 82 00 7f ff add %g1, -1, %g1 2006318: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } } } if (!lineFlag) 200631c: 80 a6 60 00 cmp %i1, 0 2006320: 02 80 00 06 be 2006338 2006324: 01 00 00 00 nop echo ('\n', tty); return; } } while (tty->ccount) { 2006328: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 200632c: 80 a0 e0 00 cmp %g3, 0 2006330: 32 bf ff 9e bne,a 20061a8 2006334: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 2006338: 81 c7 e0 08 ret 200633c: 81 e8 00 00 restore =============================================================================== 020049bc : size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { 20049bc: 9d e3 bf 98 save %sp, -104, %sp memset(ctx, 0, sizeof(*ctx)); 20049c0: 92 10 20 00 clr %o1 20049c4: 90 10 00 18 mov %i0, %o0 20049c8: 40 00 2e 98 call 2010428 20049cc: 94 10 20 38 mov 0x38, %o2 ctx->path = path; 20049d0: f2 26 00 00 st %i1, [ %i0 ] ctx->pathlen = pathlen; 20049d4: f4 26 20 04 st %i2, [ %i0 + 4 ] rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { if (ctx->pathlen > 0) { 20049d8: 80 a6 a0 00 cmp %i2, 0 20049dc: 02 80 00 19 be 2004a40 20049e0: f6 26 20 10 st %i3, [ %i0 + 0x10 ] char c = ctx->path [0]; 20049e4: f6 0e 40 00 ldub [ %i1 ], %i3 ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); 20049e8: 40 00 01 79 call 2004fcc 20049ec: 90 10 00 1c mov %i4, %o0 gid_t node_gid ); static inline bool rtems_filesystem_is_delimiter(char c) { return c == '/' || c == '\\'; 20049f0: 83 2e e0 18 sll %i3, 0x18, %g1 20049f4: 83 38 60 18 sra %g1, 0x18, %g1 if (rtems_filesystem_is_delimiter(c)) { 20049f8: 80 a0 60 5c cmp %g1, 0x5c 20049fc: 02 80 00 05 be 2004a10 <== NEVER TAKEN 2004a00: d0 26 20 30 st %o0, [ %i0 + 0x30 ] 2004a04: 80 a0 60 2f cmp %g1, 0x2f 2004a08: 12 80 00 0a bne 2004a30 2004a0c: 90 10 00 1d mov %i5, %o0 ++ctx->path; 2004a10: c2 06 00 00 ld [ %i0 ], %g1 --ctx->pathlen; ctx->startloc = rtems_filesystem_global_location_obtain( 2004a14: 90 06 20 30 add %i0, 0x30, %o0 char c = ctx->path [0]; ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); if (rtems_filesystem_is_delimiter(c)) { ++ctx->path; 2004a18: 82 00 60 01 inc %g1 2004a1c: c2 26 00 00 st %g1, [ %i0 ] --ctx->pathlen; 2004a20: c2 06 20 04 ld [ %i0 + 4 ], %g1 2004a24: 82 00 7f ff add %g1, -1, %g1 2004a28: 10 80 00 02 b 2004a30 2004a2c: c2 26 20 04 st %g1, [ %i0 + 4 ] ctx->startloc = rtems_filesystem_global_location_obtain( &ctx->rootloc ); } else { ctx->startloc = rtems_filesystem_global_location_obtain( 2004a30: 40 00 01 67 call 2004fcc 2004a34: 01 00 00 00 nop 2004a38: 10 80 00 0d b 2004a6c 2004a3c: d0 26 20 34 st %o0, [ %i0 + 0x34 ] ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; 2004a40: c0 27 bf fc clr [ %fp + -4 ] return rtems_filesystem_global_location_obtain( &global_loc ); 2004a44: 40 00 01 62 call 2004fcc 2004a48: 90 07 bf fc add %fp, -4, %o0 ); static inline rtems_filesystem_global_location_t * rtems_filesystem_global_location_obtain_null(void) { rtems_filesystem_global_location_t *global_loc = NULL; 2004a4c: c0 27 bf fc clr [ %fp + -4 ] global_current_ptr ); } } else { ctx->rootloc = rtems_filesystem_global_location_obtain_null(); 2004a50: d0 26 20 30 st %o0, [ %i0 + 0x30 ] return rtems_filesystem_global_location_obtain( &global_loc ); 2004a54: 40 00 01 5e call 2004fcc 2004a58: 90 07 bf fc add %fp, -4, %o0 ctx->startloc = rtems_filesystem_global_location_obtain_null(); errno = ENOENT; 2004a5c: 40 00 2b ef call 200fa18 <__errno> 2004a60: d0 26 20 34 st %o0, [ %i0 + 0x34 ] 2004a64: 82 10 20 02 mov 2, %g1 2004a68: c2 22 00 00 st %g1, [ %o0 ] static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 2004a6c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2004a70: d0 00 60 14 ld [ %g1 + 0x14 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 2004a74: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2004a78: c2 00 40 00 ld [ %g1 ], %g1 2004a7c: 9f c0 40 00 call %g1 2004a80: ba 06 20 18 add %i0, 0x18, %i5 set_startloc(ctx, global_root_ptr, global_current_ptr); rtems_filesystem_instance_lock(&ctx->startloc->location); rtems_filesystem_location_clone( 2004a84: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2004a88: 40 00 1d 39 call 200bf6c 2004a8c: 90 10 00 1d mov %i5, %o0 &ctx->currentloc, &ctx->startloc->location ); rtems_filesystem_eval_path_continue(ctx); 2004a90: 90 10 00 18 mov %i0, %o0 2004a94: 7f ff ff b0 call 2004954 2004a98: b0 10 00 1d mov %i5, %i0 return &ctx->currentloc; } 2004a9c: 81 c7 e0 08 ret 2004aa0: 81 e8 00 00 restore =============================================================================== 02011810 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 2011810: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2011814: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 2011818: 80 a0 60 00 cmp %g1, 0 201181c: 32 80 00 14 bne,a 201186c 2011820: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2011824: 92 10 00 19 mov %i1, %o1 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 2011828: 80 a6 a0 01 cmp %i2, 1 201182c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2011830: 12 80 00 06 bne 2011848 2011834: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2011838: 7f ff f9 ce call 200ff70 201183c: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2011840: 10 80 00 05 b 2011854 2011844: 80 a2 20 00 cmp %o0, 0 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 2011848: 7f ff f9 99 call 200feac 201184c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2011850: 80 a2 20 00 cmp %o0, 0 2011854: 12 80 00 60 bne 20119d4 <== NEVER TAKEN 2011858: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 201185c: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.modified = 0; 2011860: c0 2e 20 7c clrb [ %i0 + 0x7c ] fs_info->c.state = FAT_CACHE_ACTUAL; 2011864: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2011868: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 201186c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2011870: 80 a0 40 02 cmp %g1, %g2 2011874: 0a 80 00 05 bcs 2011888 <== NEVER TAKEN 2011878: ba 10 20 00 clr %i5 201187c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2011880: 80 a0 40 02 cmp %g1, %g2 2011884: ba 40 20 00 addx %g0, 0, %i5 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2011888: 80 a0 40 19 cmp %g1, %i1 201188c: 22 80 00 5b be,a 20119f8 2011890: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (fs_info->c.modified) 2011894: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2011898: 80 a0 60 00 cmp %g1, 0 201189c: 02 80 00 3b be 2011988 20118a0: 80 8f 60 ff btst 0xff, %i5 { if (sec_of_fat && !fs_info->vol.mirror) 20118a4: 02 80 00 0b be 20118d0 20118a8: 01 00 00 00 nop 20118ac: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 20118b0: 80 a0 60 00 cmp %g1, 0 20118b4: 12 80 00 07 bne 20118d0 <== NEVER TAKEN 20118b8: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 20118bc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 20118c0: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 20118c4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 20118c8: 40 00 24 8b call 201aaf4 20118cc: d4 16 00 00 lduh [ %i0 ], %o2 fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 20118d0: 7f ff fa 5a call 2010238 20118d4: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 20118d8: c0 2e 20 7d clrb [ %i0 + 0x7d ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 20118dc: 80 a2 20 00 cmp %o0, 0 20118e0: 12 80 00 3d bne 20119d4 <== NEVER TAKEN 20118e4: c0 2e 20 7c clrb [ %i0 + 0x7c ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 20118e8: 80 8f 60 ff btst 0xff, %i5 20118ec: 02 80 00 2d be 20119a0 20118f0: 92 10 00 19 mov %i1, %o1 20118f4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 20118f8: 80 a0 60 00 cmp %g1, 0 20118fc: 02 80 00 1c be 201196c <== ALWAYS TAKEN 2011900: ba 10 20 01 mov 1, %i5 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 2011904: 10 80 00 28 b 20119a4 <== NOT EXECUTED 2011908: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 201190c: 40 00 45 c9 call 2023030 <.umul> 2011910: f8 06 20 58 ld [ %i0 + 0x58 ], %i4 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 2011914: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 2011918: 94 07 bf fc add %fp, -4, %o2 201191c: 92 02 00 09 add %o0, %o1, %o1 2011920: 7f ff f9 63 call 200feac 2011924: 90 10 00 1c mov %i4, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2011928: 80 a2 20 00 cmp %o0, 0 201192c: 22 80 00 03 be,a 2011938 <== ALWAYS TAKEN 2011930: c2 07 bf fc ld [ %fp + -4 ], %g1 2011934: 30 80 00 0a b,a 201195c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2011938: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 201193c: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2011940: 40 00 24 6d call 201aaf4 2011944: d4 16 00 00 lduh [ %i0 ], %o2 sc = rtems_bdbuf_release_modified(b); 2011948: 7f ff fa 3c call 2010238 201194c: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2011950: 80 a2 20 00 cmp %o0, 0 2011954: 22 80 00 06 be,a 201196c <== ALWAYS TAKEN 2011958: ba 07 60 01 inc %i5 rtems_set_errno_and_return_minus_one(ENOMEM); 201195c: 40 00 21 b1 call 201a020 <__errno> <== NOT EXECUTED 2011960: 01 00 00 00 nop <== NOT EXECUTED 2011964: 10 80 00 1f b 20119e0 <== NOT EXECUTED 2011968: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 201196c: c4 0e 20 09 ldub [ %i0 + 9 ], %g2 2011970: 90 0f 60 ff and %i5, 0xff, %o0 2011974: 80 a2 00 02 cmp %o0, %g2 2011978: 2a bf ff e5 bcs,a 201190c 201197c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2011980: 10 80 00 08 b 20119a0 2011984: 92 10 00 19 mov %i1, %o1 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2011988: 7f ff f9 f7 call 2010164 201198c: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2011990: 80 a2 20 00 cmp %o0, 0 2011994: 12 80 00 10 bne 20119d4 <== NEVER TAKEN 2011998: c0 2e 20 7d clrb [ %i0 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 201199c: 92 10 00 19 mov %i1, %o1 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 20119a0: 80 a6 a0 01 cmp %i2, 1 20119a4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 20119a8: 12 80 00 06 bne 20119c0 20119ac: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 20119b0: 7f ff f9 70 call 200ff70 20119b4: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 20119b8: 10 80 00 05 b 20119cc 20119bc: 80 a2 20 00 cmp %o0, 0 } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 20119c0: 7f ff f9 3b call 200feac 20119c4: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 20119c8: 80 a2 20 00 cmp %o0, 0 20119cc: 02 80 00 08 be 20119ec <== ALWAYS TAKEN 20119d0: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 20119d4: 40 00 21 93 call 201a020 <__errno> <== NOT EXECUTED 20119d8: 01 00 00 00 nop <== NOT EXECUTED 20119dc: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20119e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20119e4: 81 c7 e0 08 ret <== NOT EXECUTED 20119e8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 20119ec: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.state = FAT_CACHE_ACTUAL; 20119f0: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } *buf = fs_info->c.buf; 20119f4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 20119f8: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 20119fc: 81 c7 e0 08 ret 2011a00: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02011a04 : int fat_buf_release(fat_fs_info_t *fs_info) { 2011a04: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2011a08: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2011a0c: ba 10 00 18 mov %i0, %i5 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2011a10: 80 a0 60 00 cmp %g1, 0 2011a14: 02 80 00 52 be 2011b5c 2011a18: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2011a1c: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2011a20: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 2011a24: 80 a0 40 02 cmp %g1, %g2 2011a28: 0a 80 00 05 bcs 2011a3c <== NEVER TAKEN 2011a2c: b8 10 20 00 clr %i4 2011a30: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 2011a34: 80 a0 40 02 cmp %g1, %g2 2011a38: b8 40 20 00 addx %g0, 0, %i4 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 2011a3c: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1 2011a40: 80 a0 60 00 cmp %g1, 0 2011a44: 02 80 00 39 be 2011b28 2011a48: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2011a4c: 02 80 00 0b be 2011a78 2011a50: 01 00 00 00 nop 2011a54: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2011a58: 80 a0 60 00 cmp %g1, 0 2011a5c: 12 80 00 07 bne 2011a78 <== NEVER TAKEN 2011a60: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2011a64: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2011a68: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 2011a6c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2011a70: 40 00 24 21 call 201aaf4 2011a74: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2011a78: 7f ff f9 f0 call 2010238 2011a7c: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2011a80: 80 a2 20 00 cmp %o0, 0 2011a84: 12 80 00 2e bne 2011b3c <== NEVER TAKEN 2011a88: 80 8f 20 ff btst 0xff, %i4 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2011a8c: 02 80 00 32 be 2011b54 2011a90: c0 2f 60 7c clrb [ %i5 + 0x7c ] 2011a94: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2011a98: 80 a0 60 00 cmp %g1, 0 2011a9c: 22 80 00 1c be,a 2011b0c <== ALWAYS TAKEN 2011aa0: b8 10 20 01 mov 1, %i4 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2011aa4: 10 80 00 2d b 2011b58 <== NOT EXECUTED 2011aa8: c0 2f 60 7d clrb [ %i5 + 0x7d ] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2011aac: 40 00 45 61 call 2023030 <.umul> 2011ab0: f6 07 60 58 ld [ %i5 + 0x58 ], %i3 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 2011ab4: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 2011ab8: 94 07 bf fc add %fp, -4, %o2 2011abc: 92 02 00 09 add %o0, %o1, %o1 2011ac0: 7f ff f8 fb call 200feac 2011ac4: 90 10 00 1b mov %i3, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2011ac8: 80 a2 20 00 cmp %o0, 0 2011acc: 22 80 00 03 be,a 2011ad8 <== ALWAYS TAKEN 2011ad0: c2 07 bf fc ld [ %fp + -4 ], %g1 2011ad4: 30 80 00 0a b,a 2011afc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2011ad8: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 2011adc: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2011ae0: 40 00 24 05 call 201aaf4 2011ae4: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(b); 2011ae8: 7f ff f9 d4 call 2010238 2011aec: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2011af0: 80 a2 20 00 cmp %o0, 0 2011af4: 22 80 00 06 be,a 2011b0c <== ALWAYS TAKEN 2011af8: b8 07 20 01 inc %i4 rtems_set_errno_and_return_minus_one(ENOMEM); 2011afc: 40 00 21 49 call 201a020 <__errno> <== NOT EXECUTED 2011b00: 01 00 00 00 nop <== NOT EXECUTED 2011b04: 10 80 00 11 b 2011b48 <== NOT EXECUTED 2011b08: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2011b0c: c4 0f 60 09 ldub [ %i5 + 9 ], %g2 2011b10: 90 0f 20 ff and %i4, 0xff, %o0 2011b14: 80 a2 00 02 cmp %o0, %g2 2011b18: 2a bf ff e5 bcs,a 2011aac 2011b1c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2011b20: 10 80 00 0e b 2011b58 2011b24: c0 2f 60 7d clrb [ %i5 + 0x7d ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2011b28: 7f ff f9 8f call 2010164 2011b2c: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2011b30: 80 a2 20 00 cmp %o0, 0 2011b34: 22 80 00 09 be,a 2011b58 <== ALWAYS TAKEN 2011b38: c0 2f 60 7d clrb [ %i5 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); 2011b3c: 40 00 21 39 call 201a020 <__errno> <== NOT EXECUTED 2011b40: 01 00 00 00 nop <== NOT EXECUTED 2011b44: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2011b48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011b4c: 81 c7 e0 08 ret <== NOT EXECUTED 2011b50: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2011b54: c0 2f 60 7d clrb [ %i5 + 0x7d ] return RC_OK; 2011b58: b0 10 20 00 clr %i0 } 2011b5c: 81 c7 e0 08 ret 2011b60: 81 e8 00 00 restore =============================================================================== 02010b84 : fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2010b84: 80 a2 60 00 cmp %o1, 0 2010b88: 32 80 00 08 bne,a 2010ba8 2010b8c: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2010b90: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 2010b94: 80 88 60 03 btst 3, %g1 2010b98: 22 80 00 04 be,a 2010ba8 <== NEVER TAKEN 2010b9c: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2010ba0: 81 c3 e0 08 retl 2010ba4: d0 02 20 1c ld [ %o0 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2010ba8: 92 02 7f fe add %o1, -2, %o1 2010bac: 93 2a 40 01 sll %o1, %g1, %o1 2010bb0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 fs_info->vol.data_fsec); } 2010bb4: 81 c3 e0 08 retl 2010bb8: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02011d1c : fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2011d1c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2011d20: 12 80 00 08 bne 2011d40 <== NOT EXECUTED 2011d24: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED 2011d28: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 <== NOT EXECUTED 2011d2c: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2011d30: 22 80 00 05 be,a 2011d44 <== NOT EXECUTED 2011d34: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011d38: 10 80 00 07 b 2011d54 <== NOT EXECUTED 2011d3c: d2 02 20 1c ld [ %o0 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011d40: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED 2011d44: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED 2011d48: 93 2a 40 01 sll %o1, %g1, %o1 <== NOT EXECUTED 2011d4c: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 <== NOT EXECUTED 2011d50: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_read(fs_info, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2011d54: d6 0a 20 04 ldub [ %o0 + 4 ], %o3 <== NOT EXECUTED 2011d58: c2 0a 20 02 ldub [ %o0 + 2 ], %g1 <== NOT EXECUTED { uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_read(fs_info, fsec, 0, 2011d5c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2011d60: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2011d64: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2011d68: 7f ff ff 7f call 2011b64 <_fat_block_read> <== NOT EXECUTED 2011d6c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02011d70 : fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2011d70: 80 a2 60 00 cmp %o1, 0 2011d74: 12 80 00 08 bne 2011d94 <== ALWAYS TAKEN 2011d78: 98 10 00 0a mov %o2, %o4 2011d7c: c2 0a 20 0a ldub [ %o0 + 0xa ], %g1 <== NOT EXECUTED 2011d80: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2011d84: 22 80 00 05 be,a 2011d98 <== NOT EXECUTED 2011d88: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011d8c: 10 80 00 07 b 2011da8 <== NOT EXECUTED 2011d90: d2 02 20 1c ld [ %o0 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011d94: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011d98: 92 02 7f fe add %o1, -2, %o1 2011d9c: 93 2a 40 01 sll %o1, %g1, %o1 2011da0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2011da4: 92 02 40 01 add %o1, %g1, %o1 uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_write(fs_info, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2011da8: d6 0a 20 04 ldub [ %o0 + 4 ], %o3 2011dac: c2 0a 20 02 ldub [ %o0 + 2 ], %g1 { uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(fs_info, cln); return _fat_block_write(fs_info, fsec, 0, 2011db0: 94 10 20 00 clr %o2 2011db4: 97 2a c0 01 sll %o3, %g1, %o3 2011db8: 82 13 c0 00 mov %o7, %g1 2011dbc: 7f ff ff 8c call 2011bec <_fat_block_write> 2011dc0: 9e 10 40 00 mov %g1, %o7 =============================================================================== 02011f74 : fat_fat32_update_fsinfo_sector( fat_fs_info_t *fs_info, uint32_t free_count, uint32_t next_free ) { 2011f74: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 2011f78: 7f ff fe 1a call 20117e0 <== NOT EXECUTED 2011f7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2011f80: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2011f84: 7f ff fe 17 call 20117e0 <== NOT EXECUTED 2011f88: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(fs_info, 2011f8c: d2 16 20 3c lduh [ %i0 + 0x3c ], %o1 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); 2011f90: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(fs_info, 2011f94: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2011f98: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2011f9c: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2011fa0: 7f ff ff 13 call 2011bec <_fat_block_write> <== NOT EXECUTED 2011fa4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(fs_info, 2011fa8: d2 16 20 3c lduh [ %i0 + 0x3c ], %o1 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(fs_info, 2011fac: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(fs_info, 2011fb0: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2011fb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011fb8: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2011fbc: 7f ff ff 0c call 2011bec <_fat_block_write> <== NOT EXECUTED 2011fc0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 2011fc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011fc8: 06 80 00 04 bl 2011fd8 <== NOT EXECUTED 2011fcc: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 2011fd0: 16 80 00 03 bge 2011fdc <== NOT EXECUTED 2011fd4: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 2011fd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2011fdc: 81 c7 e0 08 ret <== NOT EXECUTED 2011fe0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020110f0 : int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 20110f0: 9d e3 bf a0 save %sp, -96, %sp /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 20110f4: c2 06 60 08 ld [ %i1 + 8 ], %g1 20110f8: 80 a0 60 01 cmp %g1, 1 20110fc: 08 80 00 05 bleu 2011110 2011100: 82 00 7f ff add %g1, -1, %g1 { fat_fd->links_num--; return rc; 2011104: 90 10 20 00 clr %o0 2011108: 10 80 00 25 b 201119c 201110c: c2 26 60 08 st %g1, [ %i1 + 8 ] } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 2011110: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2011114: 80 88 60 01 btst 1, %g1 2011118: 02 80 00 14 be 2011168 201111c: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(fs_info, fat_fd, 0); 2011120: 92 10 00 19 mov %i1, %o1 2011124: 7f ff ff ae call 2010fdc 2011128: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 201112c: 80 a2 20 00 cmp %o0, 0 2011130: 12 80 00 1b bne 201119c <== NEVER TAKEN 2011134: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2011138: 40 00 0e 15 call 201498c <_Chain_Extract> 201113c: 90 10 00 19 mov %i1, %o0 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) 2011140: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2011144: 40 00 03 88 call 2011f64 2011148: 90 10 00 18 mov %i0, %o0 201114c: 80 8a 20 ff btst 0xff, %o0 2011150: 02 80 00 0f be 201118c <== ALWAYS TAKEN 2011154: 01 00 00 00 nop fat_free_unique_ino(fs_info, fat_fd->ino); 2011158: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 201115c: 40 00 03 77 call 2011f38 <== NOT EXECUTED 2011160: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2011164: 30 80 00 0a b,a 201118c <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 2011168: 40 00 03 7f call 2011f64 201116c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2011170: 80 8a 20 ff btst 0xff, %o0 2011174: 02 80 00 04 be 2011184 <== ALWAYS TAKEN 2011178: 01 00 00 00 nop { fat_fd->links_num = 0; 201117c: 10 80 00 06 b 2011194 <== NOT EXECUTED 2011180: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 2011184: 40 00 0e 02 call 201498c <_Chain_Extract> 2011188: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 201118c: 7f ff cd 1c call 20045fc 2011190: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2011194: 40 00 02 1c call 2011a04 2011198: 81 e8 00 00 restore return rc; } 201119c: 81 c7 e0 08 ret 20111a0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02011274 : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 2011274: 9d e3 bf 90 save %sp, -112, %sp uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 2011278: f6 27 00 00 st %i3, [ %i4 ] if (new_length <= fat_fd->fat_file_size) 201127c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t new_length, uint32_t *a_length ) { int rc = RC_OK; uint32_t chain = 0; 2011280: c0 27 bf f0 clr [ %fp + -16 ] uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 2011284: c0 27 bf f8 clr [ %fp + -8 ] uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 2011288: 80 a6 c0 01 cmp %i3, %g1 201128c: 18 80 00 04 bgu 201129c 2011290: ba 10 00 18 mov %i0, %i5 return RC_OK; 2011294: 81 c7 e0 08 ret 2011298: 91 e8 20 00 restore %g0, 0, %o0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201129c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 20112a0: 80 a0 a0 01 cmp %g2, 1 20112a4: 32 80 00 0b bne,a 20112d0 <== ALWAYS TAKEN 20112a8: e0 17 60 06 lduh [ %i5 + 6 ], %l0 20112ac: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED 20112b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20112b4: 32 80 00 07 bne,a 20112d0 <== NOT EXECUTED 20112b8: e0 17 60 06 lduh [ %i5 + 6 ], %l0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20112bc: c4 0e 20 0a ldub [ %i0 + 0xa ], %g2 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20112c0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 20112c4: 22 80 00 03 be,a 20112d0 <== NOT EXECUTED 20112c8: e0 17 60 06 lduh [ %i5 + 6 ], %l0 <== NOT EXECUTED 20112cc: 30 80 00 39 b,a 20113b0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 20112d0: 84 04 3f ff add %l0, -1, %g2 20112d4: a4 08 80 01 and %g2, %g1, %l2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 20112d8: a0 24 00 12 sub %l0, %l2, %l0 20112dc: a0 0c 00 02 and %l0, %g2, %l0 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 20112e0: 84 26 c0 01 sub %i3, %g1, %g2 if (bytes2add > bytes_remain) 20112e4: 80 a0 80 10 cmp %g2, %l0 20112e8: 08 80 00 03 bleu 20112f4 20112ec: a2 10 20 00 clr %l1 bytes2add -= bytes_remain; 20112f0: a2 20 80 10 sub %g2, %l0, %l1 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { 20112f4: 80 a4 20 00 cmp %l0, 0 20112f8: 02 80 00 1c be 2011368 20112fc: 80 a4 60 00 cmp %l1, 0 2011300: 80 a6 a0 00 cmp %i2, 0 2011304: 02 80 00 19 be 2011368 2011308: 80 a4 60 00 cmp %l1, 0 uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; 201130c: d4 0f 60 08 ldub [ %i5 + 8 ], %o2 uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; uint32_t sec; uint32_t byte; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 2011310: 90 10 00 1d mov %i5, %o0 2011314: 92 10 00 19 mov %i1, %o1 2011318: 95 30 40 0a srl %g1, %o2, %o2 201131c: 7f ff fe 39 call 2010c00 2011320: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2011324: b0 92 60 00 orcc %o1, 0, %i0 2011328: 12 80 00 26 bne 20113c0 <== NEVER TAKEN 201132c: d2 07 bf fc ld [ %fp + -4 ], %o1 return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 2011330: 7f ff fe 15 call 2010b84 2011334: 90 10 00 1d mov %i5, %o0 sec += ofs >> fs_info->vol.sec_log2; 2011338: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 201133c: d4 17 40 00 lduh [ %i5 ], %o2 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += ofs >> fs_info->vol.sec_log2; 2011340: 93 34 80 09 srl %l2, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2011344: 94 02 bf ff add %o2, -1, %o2 rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += ofs >> fs_info->vol.sec_log2; 2011348: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); rc = _fat_block_zero(fs_info, sec, byte, bytes_remain); 201134c: 94 0c 80 0a and %l2, %o2, %o2 2011350: 90 10 00 1d mov %i5, %o0 2011354: 40 00 02 4c call 2011c84 <_fat_block_zero> 2011358: 96 10 00 10 mov %l0, %o3 if (rc != RC_OK) 201135c: b0 92 20 00 orcc %o0, 0, %i0 2011360: 12 80 00 18 bne 20113c0 <== NEVER TAKEN 2011364: 80 a4 60 00 cmp %l1, 0 /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 2011368: 02 bf ff cb be 2011294 201136c: a4 04 7f ff add %l1, -1, %l2 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2011370: c2 0f 60 08 ldub [ %i5 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 2011374: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2011378: a5 34 80 01 srl %l2, %g1, %l2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 201137c: 92 07 bf f0 add %fp, -16, %o1 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2011380: a4 04 a0 01 inc %l2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 2011384: 96 07 bf fc add %fp, -4, %o3 2011388: 94 10 00 12 mov %l2, %o2 201138c: 98 07 bf f8 add %fp, -8, %o4 2011390: 40 00 1c 6e call 2018548 2011394: 9a 10 00 1a mov %i2, %o5 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 2011398: b0 92 20 00 orcc %o0, 0, %i0 201139c: 12 80 00 09 bne 20113c0 <== NEVER TAKEN 20113a0: c2 07 bf fc ld [ %fp + -4 ], %g1 return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 20113a4: 80 94 00 01 orcc %l0, %g1, %g0 20113a8: 12 80 00 08 bne 20113c8 <== ALWAYS TAKEN 20113ac: 80 a4 80 01 cmp %l2, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 20113b0: 40 00 23 1c call 201a020 <__errno> <== NOT EXECUTED 20113b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20113b8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 20113bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20113c0: 81 c7 e0 08 ret <== NOT EXECUTED 20113c4: 81 e8 00 00 restore <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20113c8: 02 80 00 09 be 20113ec <== ALWAYS TAKEN 20113cc: 82 24 80 01 sub %l2, %g1, %g1 { new_length -= bytes2add & (fs_info->vol.bpc - 1); 20113d0: c4 17 60 06 lduh [ %i5 + 6 ], %g2 <== NOT EXECUTED 20113d4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 20113d8: a2 0c 40 02 and %l1, %g2, %l1 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 20113dc: c4 0f 60 08 ldub [ %i5 + 8 ], %g2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); 20113e0: b6 26 c0 11 sub %i3, %l1, %i3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 20113e4: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED 20113e8: b6 26 c0 01 sub %i3, %g1, %i3 <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 20113ec: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20113f0: 80 a2 e0 00 cmp %o3, 0 20113f4: 32 80 00 07 bne,a 2011410 20113f8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20113fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 2011400: c0 26 60 34 clr [ %i1 + 0x34 ] } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 2011404: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 2011408: 10 80 00 1d b 201147c 201140c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2011410: 80 a0 7f ff cmp %g1, -1 2011414: 22 80 00 04 be,a 2011424 <== NEVER TAKEN 2011418: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 201141c: 10 80 00 0c b 201144c 2011420: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 2011424: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2011428: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 201142c: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2011430: 7f ff ff 5d call 20111a4 <== NOT EXECUTED 2011434: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2011438: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 201143c: 02 80 00 05 be 2011450 <== NOT EXECUTED 2011440: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(fs_info, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(fs_info, chain); 2011444: 10 80 00 1f b 20114c0 <== NOT EXECUTED 2011448: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 201144c: d2 07 bf f4 ld [ %fp + -12 ], %o1 2011450: d4 07 bf f0 ld [ %fp + -16 ], %o2 2011454: 40 00 1b 5f call 20181d0 2011458: 90 10 00 1d mov %i5, %o0 201145c: b4 10 00 08 mov %o0, %i2 if ( rc != RC_OK ) 2011460: 80 a6 a0 00 cmp %i2, 0 2011464: 02 80 00 04 be 2011474 <== ALWAYS TAKEN 2011468: 90 10 00 1d mov %i5, %o0 if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(fs_info, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(fs_info, chain); 201146c: 10 80 00 16 b 20114c4 <== NOT EXECUTED 2011470: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); 2011474: 40 00 01 64 call 2011a04 2011478: 01 00 00 00 nop } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 201147c: c2 07 bf fc ld [ %fp + -4 ], %g1 2011480: 80 a0 60 00 cmp %g1, 0 2011484: 22 80 00 14 be,a 20114d4 <== NEVER TAKEN 2011488: f6 27 00 00 st %i3, [ %i4 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 201148c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2011490: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2011494: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2011498: 80 a0 60 00 cmp %g1, 0 201149c: 32 80 00 0e bne,a 20114d4 20114a0: f6 27 00 00 st %i3, [ %i4 ] { rc = fat_init_clusters_chain(fs_info, chain); 20114a4: d2 07 bf f0 ld [ %fp + -16 ], %o1 20114a8: 40 00 02 47 call 2011dc4 20114ac: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20114b0: b4 92 20 00 orcc %o0, 0, %i2 20114b4: 22 80 00 08 be,a 20114d4 <== ALWAYS TAKEN 20114b8: f6 27 00 00 st %i3, [ %i4 ] { fat_free_fat_clusters_chain(fs_info, chain); 20114bc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20114c0: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20114c4: 40 00 1b f2 call 201848c <== NOT EXECUTED 20114c8: b0 10 00 1a mov %i2, %i0 <== NOT EXECUTED 20114cc: 81 c7 e0 08 ret <== NOT EXECUTED 20114d0: 81 e8 00 00 restore <== NOT EXECUTED } } } *a_length = new_length; fat_fd->fat_file_size = new_length; 20114d4: f6 26 60 18 st %i3, [ %i1 + 0x18 ] return RC_OK; } 20114d8: 81 c7 e0 08 ret 20114dc: 81 e8 00 00 restore =============================================================================== 020111a4 : fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 20111a4: 9d e3 bf 98 save %sp, -104, %sp uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 20111a8: 82 07 a0 50 add %fp, 0x50, %g1 20111ac: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20111b0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20111b4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] fat_file_fd_t *fat_fd, int cmd, ...) { int rc = RC_OK; uint32_t cur_cln = 0; 20111b8: c0 27 bf f8 clr [ %fp + -8 ] uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 20111bc: 80 a6 a0 01 cmp %i2, 1 20111c0: 12 80 00 26 bne 2011258 <== NEVER TAKEN 20111c4: c2 27 bf fc st %g1, [ %fp + -4 ] { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 20111c8: 82 07 a0 58 add %fp, 0x58, %g1 20111cc: c2 27 bf fc st %g1, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 20111d0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20111d4: 80 a6 c0 01 cmp %i3, %g1 20111d8: 0a 80 00 06 bcs 20111f0 <== ALWAYS TAKEN 20111dc: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 20111e0: 40 00 23 90 call 201a020 <__errno> <== NOT EXECUTED 20111e4: 01 00 00 00 nop <== NOT EXECUTED 20111e8: 10 80 00 1f b 2011264 <== NOT EXECUTED 20111ec: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20111f0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20111f4: 80 a0 60 01 cmp %g1, 1 20111f8: 32 80 00 0d bne,a 201122c 20111fc: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 2011200: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2011204: 80 a0 60 00 cmp %g1, 0 2011208: 32 80 00 09 bne,a 201122c <== NEVER TAKEN 201120c: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011210: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011214: 80 88 60 03 btst 3, %g1 2011218: 22 80 00 05 be,a 201122c <== NEVER TAKEN 201121c: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 2011220: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 2011224: 81 c7 e0 08 ret 2011228: 91 e8 20 00 restore %g0, 0, %o0 } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 201122c: 90 10 00 18 mov %i0, %o0 2011230: 92 10 00 19 mov %i1, %o1 2011234: 95 36 c0 0a srl %i3, %o2, %o2 2011238: 7f ff fe 72 call 2010c00 201123c: 96 07 bf f8 add %fp, -8, %o3 if ( rc != RC_OK ) 2011240: b0 92 60 00 orcc %o1, 0, %i0 2011244: 12 80 00 03 bne 2011250 <== NEVER TAKEN 2011248: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; 201124c: c2 27 40 00 st %g1, [ %i5 ] break; 2011250: 81 c7 e0 08 ret 2011254: 81 e8 00 00 restore default: errno = EINVAL; 2011258: 40 00 23 72 call 201a020 <__errno> <== NOT EXECUTED 201125c: 01 00 00 00 nop <== NOT EXECUTED 2011260: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2011264: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 2011268: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED break; } va_end(ap); return rc; } 201126c: 81 c7 e0 08 ret <== NOT EXECUTED 2011270: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02010c00 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2010c00: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2010c04: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 2010c08: 80 a6 80 01 cmp %i2, %g1 2010c0c: 12 80 00 05 bne 2010c20 2010c10: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2010c14: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2010c18: 10 80 00 1b b 2010c84 2010c1c: c2 26 c0 00 st %g1, [ %i3 ] { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2010c20: 28 80 00 06 bleu,a 2010c38 2010c24: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 { cur_cln = fat_fd->map.disk_cln; 2010c28: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 count = file_cln - fat_fd->map.file_cln; 2010c2c: b8 26 80 01 sub %i2, %g1, %i4 uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2010c30: 10 80 00 04 b 2010c40 2010c34: c4 27 bf fc st %g2, [ %fp + -4 ] count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2010c38: b8 10 00 1a mov %i2, %i4 2010c3c: c2 27 bf fc st %g1, [ %fp + -4 ] count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2010c40: 10 80 00 0b b 2010c6c 2010c44: ba 10 20 00 clr %i5 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2010c48: 90 10 00 18 mov %i0, %o0 2010c4c: 40 00 1c ea call 2017ff4 2010c50: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2010c54: 80 a2 20 00 cmp %o0, 0 2010c58: 22 80 00 05 be,a 2010c6c <== ALWAYS TAKEN 2010c5c: ba 07 60 01 inc %i5 return rc; 2010c60: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 2010c64: 10 80 00 0a b 2010c8c <== NOT EXECUTED 2010c68: 85 3a 20 1f sra %o0, 0x1f, %g2 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2010c6c: 80 a7 40 1c cmp %i5, %i4 2010c70: 12 bf ff f6 bne 2010c48 2010c74: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2010c78: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.disk_cln = cur_cln; 2010c7c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] *disk_cln = cur_cln; 2010c80: d2 26 c0 00 st %o1, [ %i3 ] } return RC_OK; 2010c84: 84 10 20 00 clr %g2 2010c88: 86 10 20 00 clr %g3 } 2010c8c: b0 10 00 02 mov %g2, %i0 2010c90: 81 c7 e0 08 ret 2010c94: 93 e8 00 03 restore %g0, %g3, %o1 =============================================================================== 02010c98 : fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2010c98: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 2010c9c: 90 10 00 18 mov %i0, %o0 2010ca0: 7f ff ff c7 call 2010bbc 2010ca4: 92 10 00 19 mov %i1, %o1 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 2010ca8: 82 0a 20 01 and %o0, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2010cac: 85 28 60 02 sll %g1, 2, %g2 2010cb0: b7 28 60 04 sll %g1, 4, %i3 2010cb4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2010cb8: b6 26 c0 02 sub %i3, %g2, %i3 int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 2010cbc: b8 10 00 08 mov %o0, %i4 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2010cc0: a0 00 40 1b add %g1, %i3, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2010cc4: fa 00 40 1b ld [ %g1 + %i3 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 2010cc8: 10 80 00 0c b 2010cf8 2010ccc: a0 04 20 04 add %l0, 4, %l0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); 2010cd0: 7f ff ff bb call 2010bbc 2010cd4: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2010cd8: 80 a7 00 08 cmp %i4, %o0 2010cdc: 32 80 00 07 bne,a 2010cf8 2010ce0: fa 07 40 00 ld [ %i5 ], %i5 rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2010ce4: c2 07 60 08 ld [ %i5 + 8 ], %g1 /* access "valid" hash table */ rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 2010ce8: fa 26 80 00 st %i5, [ %i2 ] lfat_fd->links_num++; 2010cec: 82 00 60 01 inc %g1 2010cf0: 10 80 00 42 b 2010df8 2010cf4: c2 27 60 08 st %g1, [ %i5 + 8 ] ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2010cf8: 80 a7 40 10 cmp %i5, %l0 2010cfc: 12 bf ff f5 bne 2010cd0 2010d00: 90 10 00 18 mov %i0, %o0 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2010d04: 10 80 00 3f b 2010e00 2010d08: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); 2010d0c: 7f ff ff ac call 2010bbc <== NOT EXECUTED 2010d10: 92 07 60 20 add %i5, 0x20, %o1 <== NOT EXECUTED if ( (key1) == ck) 2010d14: 80 a7 00 08 cmp %i4, %o0 <== NOT EXECUTED 2010d18: 32 80 00 0a bne,a 2010d40 <== NOT EXECUTED 2010d1c: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2010d20: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2010d24: 22 80 00 0b be,a 2010d50 <== NOT EXECUTED 2010d28: a0 10 20 00 clr %l0 <== NOT EXECUTED 2010d2c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2010d30: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED 2010d34: 22 80 00 07 be,a 2010d50 <== NOT EXECUTED 2010d38: a0 10 20 00 clr %l0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2010d3c: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2010d40: 80 a7 40 10 cmp %i5, %l0 2010d44: 12 bf ff f2 bne 2010d0c <== NEVER TAKEN 2010d48: 90 10 00 18 mov %i0, %o0 2010d4c: a0 10 3f ff mov -1, %l0 } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2010d50: 7f ff cf c1 call 2004c54 2010d54: 90 10 20 44 mov 0x44, %o0 2010d58: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 2010d5c: 80 a2 20 00 cmp %o0, 0 2010d60: 02 80 00 1c be 2010dd0 <== NEVER TAKEN 2010d64: ba 10 00 08 mov %o0, %i5 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2010d68: 92 10 20 00 clr %o1 2010d6c: 40 00 27 9f call 201abe8 2010d70: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2010d74: 82 10 20 01 mov 1, %g1 2010d78: c2 27 60 08 st %g1, [ %i5 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2010d7c: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2010d80: 90 07 60 20 add %i5, 0x20, %o0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 2010d84: 82 08 7f fe and %g1, -2, %g1 2010d88: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2010d8c: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2010d90: 92 10 00 19 mov %i1, %o1 memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2010d94: c2 27 60 3c st %g1, [ %i5 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2010d98: 40 00 27 57 call 201aaf4 2010d9c: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2010da0: 80 a4 20 00 cmp %l0, 0 2010da4: 02 80 00 04 be 2010db4 <== NEVER TAKEN 2010da8: 01 00 00 00 nop lfat_fd->ino = key; 2010dac: 10 80 00 0f b 2010de8 2010db0: f8 27 60 0c st %i4, [ %i5 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(fs_info); 2010db4: 40 00 04 31 call 2011e78 <== NOT EXECUTED 2010db8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2010dbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2010dc0: 12 80 00 0a bne 2010de8 <== NOT EXECUTED 2010dc4: d0 27 60 0c st %o0, [ %i5 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 2010dc8: 7f ff ce 0d call 20045fc <== NOT EXECUTED 2010dcc: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 2010dd0: 40 00 24 94 call 201a020 <__errno> <== NOT EXECUTED 2010dd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2010dd8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2010ddc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2010de0: 81 c7 e0 08 ret <== NOT EXECUTED 2010de4: 81 e8 00 00 restore <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 2010de8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2010dec: 92 10 00 1d mov %i5, %o1 2010df0: 7f ff e2 9f call 200986c <_Chain_Append> 2010df4: 90 02 00 1b add %o0, %i3, %o0 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2010df8: 81 c7 e0 08 ret 2010dfc: 91 e8 20 00 restore %g0, 0, %o0 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2010e00: a0 00 40 1b add %g1, %i3, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2010e04: fa 00 40 1b ld [ %g1 + %i3 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 2010e08: 10 bf ff ce b 2010d40 2010e0c: a0 04 20 04 add %l0, 4, %l0 =============================================================================== 02010e24 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2010e24: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 2010e28: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2010e2c: ba 10 00 18 mov %i0, %i5 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 2010e30: 80 a6 e0 00 cmp %i3, 0 2010e34: 02 80 00 68 be 2010fd4 <== NEVER TAKEN 2010e38: 90 10 20 00 clr %o0 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 2010e3c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2010e40: 80 a6 80 01 cmp %i2, %g1 2010e44: 1a 80 00 64 bcc 2010fd4 2010e48: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2010e4c: 38 80 00 07 bgu,a 2010e68 <== NEVER TAKEN 2010e50: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2010e54: 84 20 40 1b sub %g1, %i3, %g2 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2010e58: 80 a6 80 02 cmp %i2, %g2 2010e5c: 28 80 00 04 bleu,a 2010e6c 2010e60: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2010e64: b6 20 40 1a sub %g1, %i2, %i3 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2010e68: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2010e6c: 80 a0 60 01 cmp %g1, 1 2010e70: 32 80 00 1c bne,a 2010ee0 2010e74: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 2010e78: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2010e7c: 80 a0 60 00 cmp %g1, 0 2010e80: 32 80 00 18 bne,a 2010ee0 <== NEVER TAKEN 2010e84: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2010e88: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2010e8c: 80 88 60 03 btst 3, %g1 2010e90: 22 80 00 14 be,a 2010ee0 <== NEVER TAKEN 2010e94: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 2010e98: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2010e9c: 7f ff ff 3a call 2010b84 2010ea0: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 2010ea4: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2010ea8: d4 17 40 00 lduh [ %i5 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 2010eac: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2010eb0: 94 02 bf ff add %o2, -1, %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 2010eb4: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 2010eb8: 94 0e 80 0a and %i2, %o2, %o2 2010ebc: 90 10 00 1d mov %i5, %o0 2010ec0: 96 10 00 1b mov %i3, %o3 2010ec4: 40 00 03 28 call 2011b64 <_fat_block_read> 2010ec8: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2010ecc: 80 a2 20 00 cmp %o0, 0 2010ed0: 16 80 00 41 bge 2010fd4 <== ALWAYS TAKEN 2010ed4: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 2010ed8: 10 80 00 3f b 2010fd4 <== NOT EXECUTED 2010edc: 90 10 3f ff mov -1, %o0 ! ffffffff <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2010ee0: f0 17 60 06 lduh [ %i5 + 6 ], %i0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2010ee4: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 2010ee8: a6 07 bf fc add %fp, -4, %l3 2010eec: 90 10 00 1d mov %i5, %o0 2010ef0: 92 10 00 19 mov %i1, %o1 2010ef4: 94 10 00 12 mov %l2, %o2 2010ef8: 7f ff ff 42 call 2010c00 2010efc: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2010f00: 90 92 60 00 orcc %o1, 0, %o0 2010f04: 12 80 00 34 bne 2010fd4 <== NEVER TAKEN 2010f08: a0 10 20 00 clr %l0 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2010f0c: b1 2e 20 10 sll %i0, 0x10, %i0 2010f10: b1 36 20 10 srl %i0, 0x10, %i0 2010f14: b0 06 3f ff add %i0, -1, %i0 2010f18: b4 0e 80 18 and %i2, %i0, %i2 2010f1c: b0 10 20 00 clr %i0 2010f20: 10 80 00 20 b 2010fa0 2010f24: a2 10 00 1a mov %i2, %l1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2010f28: a0 24 00 11 sub %l0, %l1, %l0 2010f2c: 80 a4 00 1b cmp %l0, %i3 2010f30: 38 80 00 02 bgu,a 2010f38 2010f34: a0 10 00 1b mov %i3, %l0 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 2010f38: d2 07 bf fc ld [ %fp + -4 ], %o1 2010f3c: 7f ff ff 12 call 2010b84 2010f40: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 2010f44: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2010f48: d4 17 40 00 lduh [ %i5 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2010f4c: 93 34 40 09 srl %l1, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2010f50: 94 02 bf ff add %o2, -1, %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2010f54: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 2010f58: 94 0c 40 0a and %l1, %o2, %o2 2010f5c: 90 10 00 1d mov %i5, %o0 2010f60: 96 10 00 10 mov %l0, %o3 2010f64: 40 00 03 00 call 2011b64 <_fat_block_read> 2010f68: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2010f6c: 80 a2 20 00 cmp %o0, 0 2010f70: 06 80 00 18 bl 2010fd0 <== NEVER TAKEN 2010f74: b6 26 c0 10 sub %i3, %l0, %i3 return -1; count -= c; cmpltd += c; 2010f78: b0 06 00 10 add %i0, %l0, %i0 save_cln = cur_cln; 2010f7c: e0 07 bf fc ld [ %fp + -4 ], %l0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2010f80: 90 10 00 1d mov %i5, %o0 2010f84: 92 10 00 10 mov %l0, %o1 2010f88: 94 10 00 13 mov %l3, %o2 2010f8c: 40 00 1c 1a call 2017ff4 2010f90: a2 10 20 00 clr %l1 if ( rc != RC_OK ) 2010f94: 80 a2 20 00 cmp %o0, 0 2010f98: 12 80 00 0f bne 2010fd4 <== NEVER TAKEN 2010f9c: 01 00 00 00 nop rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2010fa0: 80 a6 e0 00 cmp %i3, 0 2010fa4: 32 bf ff e1 bne,a 2010f28 2010fa8: e0 17 60 06 lduh [ %i5 + 6 ], %l0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2010fac: c2 0f 60 08 ldub [ %i5 + 8 ], %g1 2010fb0: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2010fb4: e0 26 60 38 st %l0, [ %i1 + 0x38 ] } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2010fb8: b4 06 80 18 add %i2, %i0, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 2010fbc: 90 10 00 18 mov %i0, %o0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 2010fc0: b5 36 80 01 srl %i2, %g1, %i2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2010fc4: a4 06 80 12 add %i2, %l2, %l2 2010fc8: 10 80 00 03 b 2010fd4 2010fcc: e4 26 60 34 st %l2, [ %i1 + 0x34 ] sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 2010fd0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 2010fd4: 81 c7 e0 08 ret 2010fd8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02011734 : int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 2011734: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 2011738: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 201173c: c2 27 bf fc st %g1, [ %fp + -4 ] uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011740: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2011744: 80 a0 60 01 cmp %g1, 1 2011748: 12 80 00 0d bne 201177c <== ALWAYS TAKEN 201174c: ba 10 00 18 mov %i0, %i5 2011750: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2011754: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2011758: 32 80 00 0a bne,a 2011780 <== NOT EXECUTED 201175c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011760: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011764: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2011768: 22 80 00 06 be,a 2011780 <== NOT EXECUTED 201176c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2011770: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 2011774: 10 80 00 18 b 20117d4 <== NOT EXECUTED 2011778: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 201177c: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2011780: 10 80 00 0d b 20117b4 2011784: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2011788: 92 10 00 1c mov %i4, %o1 201178c: 40 00 1a 1a call 2017ff4 2011790: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2011794: b0 92 20 00 orcc %o0, 0, %i0 2011798: 12 80 00 10 bne 20117d8 <== NEVER TAKEN 201179c: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 20117a0: c2 17 60 06 lduh [ %i5 + 6 ], %g1 20117a4: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 20117a8: 82 00 80 01 add %g2, %g1, %g1 20117ac: c2 26 60 18 st %g1, [ %i1 + 0x18 ] fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; 20117b0: 82 10 00 1c mov %i4, %g1 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20117b4: f8 07 bf fc ld [ %fp + -4 ], %i4 20117b8: c6 07 60 0c ld [ %i5 + 0xc ], %g3 20117bc: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 20117c0: 86 0f 00 03 and %i4, %g3, %g3 20117c4: 80 a0 c0 02 cmp %g3, %g2 20117c8: 0a bf ff f0 bcs 2011788 20117cc: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 20117d0: c2 26 60 3c st %g1, [ %i1 + 0x3c ] 20117d4: b0 10 20 00 clr %i0 return rc; } 20117d8: 81 c7 e0 08 ret 20117dc: 81 e8 00 00 restore =============================================================================== 02010fdc : fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2010fdc: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 2010fe0: 82 10 3f ff mov -1, %g1 2010fe4: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2010fe8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2010fec: 80 a6 80 01 cmp %i2, %g1 2010ff0: 0a 80 00 04 bcs 2011000 2010ff4: c0 27 bf f8 clr [ %fp + -8 ] return rc; 2010ff8: 10 80 00 3b b 20110e4 2010ffc: 92 10 20 00 clr %o1 assert(fat_fd->fat_file_size); 2011000: 80 a0 60 00 cmp %g1, 0 2011004: 32 80 00 0a bne,a 201102c <== ALWAYS TAKEN 2011008: c4 0e 20 08 ldub [ %i0 + 8 ], %g2 201100c: 11 00 80 98 sethi %hi(0x2026000), %o0 <== NOT EXECUTED 2011010: 15 00 80 98 sethi %hi(0x2026000), %o2 <== NOT EXECUTED 2011014: 17 00 80 98 sethi %hi(0x2026000), %o3 <== NOT EXECUTED 2011018: 90 12 22 28 or %o0, 0x228, %o0 <== NOT EXECUTED 201101c: 92 10 22 7d mov 0x27d, %o1 <== NOT EXECUTED 2011020: 94 12 a2 88 or %o2, 0x288, %o2 <== NOT EXECUTED 2011024: 40 00 07 ed call 2012fd8 <__assert_func> <== NOT EXECUTED 2011028: 96 12 e2 70 or %o3, 0x270, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 201102c: c6 16 20 06 lduh [ %i0 + 6 ], %g3 2011030: 86 00 ff ff add %g3, -1, %g3 2011034: b4 00 c0 1a add %g3, %i2, %i2 2011038: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 201103c: 85 2e 80 02 sll %i2, %g2, %g2 2011040: 80 a0 80 01 cmp %g2, %g1 2011044: 1a bf ff ed bcc 2010ff8 2011048: 80 a6 a0 00 cmp %i2, 0 return RC_OK; if (cl_start != 0) 201104c: 12 80 00 0b bne 2011078 2011050: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 2011054: 92 10 00 19 mov %i1, %o1 2011058: 94 10 00 1a mov %i2, %o2 201105c: 7f ff fe e9 call 2010c00 2011060: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 2011064: 80 a2 60 00 cmp %o1, 0 2011068: 32 80 00 20 bne,a 20110e8 <== NEVER TAKEN 201106c: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 2011070: 10 80 00 0b b 201109c 2011074: d2 07 bf f8 ld [ %fp + -8 ], %o1 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 2011078: 92 10 00 19 mov %i1, %o1 201107c: 94 06 bf ff add %i2, -1, %o2 2011080: 7f ff fe e0 call 2010c00 2011084: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2011088: 80 a2 60 00 cmp %o1, 0 201108c: 02 bf ff f2 be 2011054 <== ALWAYS TAKEN 2011090: 90 10 00 18 mov %i0, %o0 fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 2011094: 81 c7 e0 08 ret <== NOT EXECUTED 2011098: 91 e8 00 09 restore %g0, %o1, %o0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 201109c: 40 00 1c fc call 201848c 20110a0: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 20110a4: 92 92 20 00 orcc %o0, 0, %o1 20110a8: 12 80 00 0f bne 20110e4 <== NEVER TAKEN 20110ac: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20110b0: 02 80 00 0d be 20110e4 20110b4: 92 10 20 00 clr %o1 { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 20110b8: d2 07 bf fc ld [ %fp + -4 ], %o1 20110bc: 90 10 00 18 mov %i0, %o0 20110c0: 40 00 1c 44 call 20181d0 20110c4: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 20110c8: 92 92 20 00 orcc %o0, 0, %o1 20110cc: 12 80 00 06 bne 20110e4 <== NEVER TAKEN 20110d0: c2 07 bf fc ld [ %fp + -4 ], %g1 return rc; fat_fd->map.file_cln = cl_start - 1; 20110d4: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = new_last_cln; 20110d8: c2 26 60 38 st %g1, [ %i1 + 0x38 ] if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 20110dc: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 20110e0: c2 26 60 3c st %g1, [ %i1 + 0x3c ] } return RC_OK; } 20110e4: b0 10 00 09 mov %o1, %i0 20110e8: 81 c7 e0 08 ret 20110ec: 81 e8 00 00 restore =============================================================================== 020114e0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20114e0: 9d e3 bf 98 save %sp, -104, %sp int rc = 0; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 20114e4: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 20114e8: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20114ec: ba 10 00 18 mov %i0, %i5 uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 20114f0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 if ( count == 0 ) 20114f4: 80 a6 e0 00 cmp %i3, 0 20114f8: 02 80 00 79 be 20116dc <== NEVER TAKEN 20114fc: 90 10 20 00 clr %o0 return cmpltd; if (start >= fat_fd->size_limit) 2011500: f0 06 60 14 ld [ %i1 + 0x14 ], %i0 2011504: 80 a6 80 18 cmp %i2, %i0 2011508: 2a 80 00 07 bcs,a 2011524 <== ALWAYS TAKEN 201150c: b0 26 00 1a sub %i0, %i2, %i0 rtems_set_errno_and_return_minus_one(EFBIG); 2011510: 40 00 22 c4 call 201a020 <__errno> <== NOT EXECUTED 2011514: 01 00 00 00 nop <== NOT EXECUTED 2011518: 82 10 20 1b mov 0x1b, %g1 ! 1b <== NOT EXECUTED 201151c: 10 80 00 6f b 20116d8 <== NOT EXECUTED 2011520: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011524: 80 a6 00 1b cmp %i0, %i3 2011528: 38 80 00 02 bgu,a 2011530 <== ALWAYS TAKEN 201152c: b0 10 00 1b mov %i3, %i0 uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 2011530: 80 a0 40 1a cmp %g1, %i2 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 2011534: b6 06 00 1a add %i0, %i2, %i3 2011538: 94 40 20 00 addx %g0, 0, %o2 201153c: 90 10 00 1d mov %i5, %o0 2011540: 92 10 00 19 mov %i1, %o1 2011544: 96 10 00 1b mov %i3, %o3 2011548: 7f ff ff 4b call 2011274 201154c: 98 07 bf fc add %fp, -4, %o4 if (rc != RC_OK) 2011550: 80 a2 20 00 cmp %o0, 0 2011554: 12 80 00 62 bne 20116dc <== NEVER TAKEN 2011558: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 201155c: 80 a0 40 1b cmp %g1, %i3 2011560: 32 80 00 02 bne,a 2011568 <== NEVER TAKEN 2011564: b0 20 40 1a sub %g1, %i2, %i0 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2011568: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 201156c: 80 a0 60 01 cmp %g1, 1 2011570: 32 80 00 1c bne,a 20115e0 2011574: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 2011578: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 201157c: 80 a0 60 00 cmp %g1, 0 2011580: 32 80 00 18 bne,a 20115e0 <== NEVER TAKEN 2011584: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2011588: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 201158c: 80 88 60 03 btst 3, %g1 2011590: 22 80 00 14 be,a 20115e0 <== NEVER TAKEN 2011594: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 2011598: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 201159c: 7f ff fd 7a call 2010b84 20115a0: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 20115a4: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20115a8: d4 17 40 00 lduh [ %i5 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20115ac: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20115b0: 94 02 bf ff add %o2, -1, %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20115b4: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, count, buf); 20115b8: 94 0e 80 0a and %i2, %o2, %o2 20115bc: 90 10 00 1d mov %i5, %o0 20115c0: 96 10 00 18 mov %i0, %o3 20115c4: 40 00 01 8a call 2011bec <_fat_block_write> 20115c8: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20115cc: 80 a2 20 00 cmp %o0, 0 20115d0: 16 80 00 43 bge 20116dc <== ALWAYS TAKEN 20115d4: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20115d8: 10 80 00 41 b 20116dc <== NOT EXECUTED 20115dc: 90 10 3f ff mov -1, %o0 ! ffffffff <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20115e0: f6 17 60 06 lduh [ %i5 + 6 ], %i3 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20115e4: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 20115e8: a6 07 bf f8 add %fp, -8, %l3 20115ec: 90 10 00 1d mov %i5, %o0 20115f0: 92 10 00 19 mov %i1, %o1 20115f4: 94 10 00 12 mov %l2, %o2 20115f8: 7f ff fd 82 call 2010c00 20115fc: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2011600: 90 92 60 00 orcc %o1, 0, %o0 2011604: 12 80 00 36 bne 20116dc <== NEVER TAKEN 2011608: b7 2e e0 10 sll %i3, 0x10, %i3 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 201160c: b7 36 e0 10 srl %i3, 0x10, %i3 2011610: b6 06 ff ff add %i3, -1, %i3 2011614: a0 10 20 00 clr %l0 2011618: b4 0e 80 1b and %i2, %i3, %i2 201161c: b6 10 20 00 clr %i3 2011620: 10 80 00 22 b 20116a8 2011624: a2 10 00 1a mov %i2, %l1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2011628: a0 24 00 11 sub %l0, %l1, %l0 201162c: 80 a4 00 18 cmp %l0, %i0 2011630: 38 80 00 02 bgu,a 2011638 2011634: a0 10 00 18 mov %i0, %l0 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 2011638: d2 07 bf f8 ld [ %fp + -8 ], %o1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 201163c: e0 27 bf fc st %l0, [ %fp + -4 ] sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 2011640: 7f ff fd 51 call 2010b84 2011644: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 2011648: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 201164c: d4 17 40 00 lduh [ %i5 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2011650: 93 34 40 09 srl %l1, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2011654: 94 02 bf ff add %o2, -1, %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2011658: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); 201165c: 94 0c 40 0a and %l1, %o2, %o2 2011660: 90 10 00 1d mov %i5, %o0 2011664: 96 10 00 10 mov %l0, %o3 2011668: 40 00 01 61 call 2011bec <_fat_block_write> 201166c: 98 07 00 1b add %i4, %i3, %o4 if ( ret < 0 ) 2011670: 80 a2 20 00 cmp %o0, 0 2011674: 06 80 00 19 bl 20116d8 <== NEVER TAKEN 2011678: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 201167c: e0 07 bf f8 ld [ %fp + -8 ], %l0 ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2011680: b0 26 00 01 sub %i0, %g1, %i0 cmpltd += c; 2011684: b6 06 c0 01 add %i3, %g1, %i3 save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2011688: 90 10 00 1d mov %i5, %o0 201168c: 92 10 00 10 mov %l0, %o1 2011690: 94 10 00 13 mov %l3, %o2 2011694: 40 00 1a 58 call 2017ff4 2011698: a2 10 20 00 clr %l1 if ( rc != RC_OK ) 201169c: 80 a2 20 00 cmp %o0, 0 20116a0: 12 80 00 0f bne 20116dc <== NEVER TAKEN 20116a4: 01 00 00 00 nop rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20116a8: 80 a6 20 00 cmp %i0, 0 20116ac: 32 bf ff df bne,a 2011628 20116b0: e0 17 60 06 lduh [ %i5 + 6 ], %l0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20116b4: c2 0f 60 08 ldub [ %i5 + 8 ], %g1 20116b8: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20116bc: e0 26 60 38 st %l0, [ %i1 + 0x38 ] } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20116c0: b4 06 80 1b add %i2, %i3, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 20116c4: 90 10 00 1b mov %i3, %o0 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 20116c8: b5 36 80 01 srl %i2, %g1, %i2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 20116cc: a4 06 80 12 add %i2, %l2, %l2 20116d0: 10 80 00 03 b 20116dc 20116d4: e4 26 60 34 st %l2, [ %i1 + 0x34 ] sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20116d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 20116dc: 81 c7 e0 08 ret 20116e0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201848c : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 201848c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 2018490: b8 10 20 00 clr %i4 int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 2018494: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 2018498: c0 27 bf fc clr [ %fp + -4 ] fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; 201849c: b6 10 00 19 mov %i1, %i3 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20184a0: 10 80 00 19 b 2018504 20184a4: b4 10 20 00 clr %i2 { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 20184a8: 92 10 00 1b mov %i3, %o1 20184ac: 7f ff fe d2 call 2017ff4 20184b0: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 20184b4: b0 92 20 00 orcc %o0, 0, %i0 20184b8: 02 80 00 0b be 20184e4 <== ALWAYS TAKEN 20184bc: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20184c0: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED 20184c4: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 20184c8: 02 80 00 03 be 20184d4 <== NOT EXECUTED 20184cc: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 20184d0: f8 27 60 40 st %i4, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 20184d4: 7f ff e5 4c call 2011a04 <== NOT EXECUTED 20184d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20184dc: 81 c7 e0 08 ret <== NOT EXECUTED 20184e0: 81 e8 00 00 restore <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 20184e4: 92 10 00 1b mov %i3, %o1 20184e8: 7f ff ff 3a call 20181d0 20184ec: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 20184f0: 80 a2 20 00 cmp %o0, 0 20184f4: 32 80 00 02 bne,a 20184fc <== NEVER TAKEN 20184f8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 20184fc: f6 07 bf fc ld [ %fp + -4 ], %i3 rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 2018500: b8 07 20 01 inc %i4 int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2018504: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2018508: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 201850c: 84 0e c0 02 and %i3, %g2, %g2 2018510: 80 a0 80 01 cmp %g2, %g1 2018514: 0a bf ff e5 bcs 20184a8 2018518: 90 10 00 1d mov %i5, %o0 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 201851c: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 2018520: 80 a0 7f ff cmp %g1, -1 2018524: 02 80 00 05 be 2018538 <== ALWAYS TAKEN 2018528: f2 27 60 44 st %i1, [ %i5 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 201852c: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED 2018530: f8 27 60 40 st %i4, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2018534: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2018538: 7f ff e5 33 call 2011a04 201853c: b0 10 00 1a mov %i2, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2018540: 81 c7 e0 08 ret 2018544: 81 e8 00 00 restore =============================================================================== 02011f38 : fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2011f38: c2 02 20 74 ld [ %o0 + 0x74 ], %g1 <== NOT EXECUTED 2011f3c: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 <== NOT EXECUTED 2011f40: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2011f44: 92 22 40 01 sub %o1, %g1, %o1 <== NOT EXECUTED 2011f48: 83 32 60 03 srl %o1, 3, %g1 <== NOT EXECUTED 2011f4c: 92 0a 60 07 and %o1, 7, %o1 <== NOT EXECUTED 2011f50: 93 28 c0 09 sll %g3, %o1, %o1 <== NOT EXECUTED 2011f54: c6 08 80 01 ldub [ %g2 + %g1 ], %g3 <== NOT EXECUTED 2011f58: 92 28 c0 09 andn %g3, %o1, %o1 <== NOT EXECUTED 2011f5c: 81 c3 e0 08 retl <== NOT EXECUTED 2011f60: d2 28 80 01 stb %o1, [ %g2 + %g1 ] <== NOT EXECUTED =============================================================================== 02017ff4 : fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 2017ff4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; rtems_bdbuf_buffer *block0 = NULL; 2017ff8: c0 27 bf fc clr [ %fp + -4 ] uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2017ffc: 80 a6 60 01 cmp %i1, 1 2018000: 08 80 00 6b bleu 20181ac <== NEVER TAKEN 2018004: ba 10 00 18 mov %i0, %i5 2018008: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 201800c: 82 00 60 01 inc %g1 2018010: 80 a6 40 01 cmp %i1, %g1 2018014: 28 80 00 03 bleu,a 2018020 <== ALWAYS TAKEN 2018018: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 201801c: 30 80 00 64 b,a 20181ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2018020: 86 08 60 01 and %g1, 1, %g3 2018024: 80 88 e0 ff btst 0xff, %g3 2018028: 02 80 00 05 be 201803c <== NEVER TAKEN 201802c: 88 08 60 02 and %g1, 2, %g4 2018030: 85 36 60 01 srl %i1, 1, %g2 2018034: 10 80 00 06 b 201804c 2018038: 84 00 80 19 add %g2, %i1, %g2 201803c: 80 89 20 ff btst 0xff, %g4 <== NOT EXECUTED 2018040: 02 80 00 03 be 201804c <== NOT EXECUTED 2018044: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED 2018048: 85 2e 60 01 sll %i1, 1, %g2 <== NOT EXECUTED 201804c: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 2018050: c8 07 60 4c ld [ %i5 + 0x4c ], %g4 2018054: 85 30 80 1b srl %g2, %i3, %g2 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2018058: 80 88 e0 ff btst 0xff, %g3 201805c: 02 80 00 05 be 2018070 <== NEVER TAKEN 2018060: b6 00 80 04 add %g2, %g4, %i3 2018064: b9 36 60 01 srl %i1, 1, %i4 2018068: 10 80 00 07 b 2018084 201806c: b8 07 00 19 add %i4, %i1, %i4 2018070: 82 08 60 02 and %g1, 2, %g1 <== NOT EXECUTED 2018074: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 2018078: 02 80 00 03 be 2018084 <== NOT EXECUTED 201807c: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2018080: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2018084: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2018088: 90 10 00 1d mov %i5, %o0 201808c: 92 10 00 1b mov %i3, %o1 2018090: 94 10 20 01 mov 1, %o2 2018094: 7f ff e5 df call 2011810 2018098: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201809c: b0 92 20 00 orcc %o0, 0, %i0 20180a0: 12 80 00 3a bne 2018188 <== NEVER TAKEN 20180a4: 83 2c 20 10 sll %l0, 0x10, %g1 return rc; switch ( fs_info->vol.type ) 20180a8: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 20180ac: 80 a0 a0 02 cmp %g2, 2 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 20180b0: 83 30 60 10 srl %g1, 0x10, %g1 20180b4: 82 00 7f ff add %g1, -1, %g1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 20180b8: 02 80 00 29 be 201815c <== NEVER TAKEN 20180bc: 82 0f 00 01 and %i4, %g1, %g1 20180c0: 80 a0 a0 04 cmp %g2, 4 20180c4: 02 80 00 33 be 2018190 <== NEVER TAKEN 20180c8: 80 a0 a0 01 cmp %g2, 1 20180cc: 12 80 00 38 bne 20181ac <== NEVER TAKEN 20180d0: c4 07 bf fc ld [ %fp + -4 ], %g2 /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) 20180d4: c8 17 40 00 lduh [ %i5 ], %g4 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 20180d8: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 if ( ofs == (fs_info->vol.bps - 1) ) 20180dc: 88 01 3f ff add %g4, -1, %g4 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 20180e0: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 20180e4: 80 a0 40 04 cmp %g1, %g4 20180e8: 12 80 00 11 bne 201812c <== ALWAYS TAKEN 20180ec: c4 26 80 00 st %g2, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 20180f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20180f4: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 20180f8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20180fc: 7f ff e5 c5 call 2011810 <== NOT EXECUTED 2018100: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2018104: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2018108: 12 80 00 2f bne 20181c4 <== NOT EXECUTED 201810c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 2018110: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 2018114: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2018118: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 201811c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 2018120: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2018124: 10 80 00 07 b 2018140 <== NOT EXECUTED 2018128: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 201812c: 82 00 c0 01 add %g3, %g1, %g1 2018130: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2018134: 83 28 60 08 sll %g1, 8, %g1 2018138: 84 10 40 02 or %g1, %g2, %g2 201813c: c4 26 80 00 st %g2, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2018140: 80 8e 60 01 btst 1, %i1 2018144: 02 80 00 04 be 2018154 2018148: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 201814c: 10 80 00 0e b 2018184 2018150: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2018154: 10 80 00 0c b 2018184 2018158: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201815c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2018160: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 2018164: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2018168: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 201816c: c2 10 80 01 lduh [ %g2 + %g1 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2018170: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2018174: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2018178: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 201817c: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2018180: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2018184: c2 26 80 00 st %g1, [ %i2 ] break; 2018188: 81 c7 e0 08 ret 201818c: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 2018190: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED 2018194: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 2018198: 7f ff ff 8b call 2017fc4 <== NOT EXECUTED 201819c: d0 00 80 01 ld [ %g2 + %g1 ], %o0 <== NOT EXECUTED 20181a0: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 20181a4: 81 c7 e0 08 ret <== NOT EXECUTED 20181a8: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 20181ac: 40 00 07 9d call 201a020 <__errno> <== NOT EXECUTED 20181b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20181b4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20181b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20181bc: 81 c7 e0 08 ret <== NOT EXECUTED 20181c0: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) 20181c4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 20181c8: 81 c7 e0 08 ret <== NOT EXECUTED 20181cc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011e78 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 2011e78: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 2011e7c: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED fat_get_unique_ino(fat_fs_info_t *fs_info) { uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2011e80: 10 80 00 2b b 2011f2c <== NOT EXECUTED 2011e84: b8 17 23 ff or %i4, 0x3ff, %i4 ! fffffff <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 2011e88: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 <== NOT EXECUTED 2011e8c: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2011e90: b6 00 c0 02 add %g3, %g2, %i3 <== NOT EXECUTED 2011e94: f4 08 c0 02 ldub [ %g3 + %g2 ], %i2 <== NOT EXECUTED 2011e98: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2011e9c: ba 08 60 07 and %g1, 7, %i5 <== NOT EXECUTED 2011ea0: 85 38 80 1d sra %g2, %i5, %g2 <== NOT EXECUTED 2011ea4: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2011ea8: 12 80 00 0a bne 2011ed0 <== NOT EXECUTED 2011eac: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2011eb0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2011eb4: bb 28 40 1d sll %g1, %i5, %i5 <== NOT EXECUTED 2011eb8: ba 17 40 1a or %i5, %i2, %i5 <== NOT EXECUTED 2011ebc: fa 2e c0 00 stb %i5, [ %i3 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2011ec0: c4 06 20 6c ld [ %i0 + 0x6c ], %g2 <== NOT EXECUTED 2011ec4: c2 06 20 74 ld [ %i0 + 0x74 ], %g1 <== NOT EXECUTED 2011ec8: 81 c7 e0 08 ret <== NOT EXECUTED 2011ecc: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2011ed0: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED 2011ed4: 3a 80 00 03 bcc,a 2011ee0 <== NOT EXECUTED 2011ed8: c0 26 20 6c clr [ %i0 + 0x6c ] <== NOT EXECUTED 2011edc: c2 26 20 6c st %g1, [ %i0 + 0x6c ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2011ee0: 92 02 60 01 inc %o1 <== NOT EXECUTED 2011ee4: 80 a2 40 04 cmp %o1, %g4 <== NOT EXECUTED 2011ee8: 32 bf ff e8 bne,a 2011e88 <== NOT EXECUTED 2011eec: c6 06 20 68 ld [ %i0 + 0x68 ], %g3 <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 2011ef0: c2 06 20 74 ld [ %i0 + 0x74 ], %g1 <== NOT EXECUTED 2011ef4: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2011ef8: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2011efc: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2011f00: 2a 80 00 04 bcs,a 2011f10 <== NOT EXECUTED 2011f04: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2011f08: 81 c7 e0 08 ret <== NOT EXECUTED 2011f0c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 2011f10: 7f ff ce 2a call 20057b8 <== NOT EXECUTED 2011f14: d2 26 20 70 st %o1, [ %i0 + 0x70 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2011f18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2011f1c: 02 bf ff fb be 2011f08 <== NOT EXECUTED 2011f20: d0 26 20 68 st %o0, [ %i0 + 0x68 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2011f24: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED 2011f28: c2 26 20 6c st %g1, [ %i0 + 0x6c ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2011f2c: c8 06 20 70 ld [ %i0 + 0x70 ], %g4 <== NOT EXECUTED 2011f30: 10 bf ff ed b 2011ee4 <== NOT EXECUTED 2011f34: 92 10 20 00 clr %o1 <== NOT EXECUTED =============================================================================== 02011dc4 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 2011dc4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2011dc8: d0 16 20 06 lduh [ %i0 + 6 ], %o0 uint32_t start_cln ) { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 2011dcc: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2011dd0: 92 10 20 01 mov 1, %o1 2011dd4: 7f ff c9 35 call 20042a8 2011dd8: ba 10 00 18 mov %i0, %i5 if ( buf == NULL ) 2011ddc: b8 92 20 00 orcc %o0, 0, %i4 2011de0: 12 80 00 1b bne 2011e4c <== ALWAYS TAKEN 2011de4: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2011de8: 40 00 20 8e call 201a020 <__errno> <== NOT EXECUTED 2011dec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2011df0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2011df4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011df8: 81 c7 e0 08 ret <== NOT EXECUTED 2011dfc: 81 e8 00 00 restore <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(fs_info, cur_cln, buf); 2011e00: 7f ff ff dc call 2011d70 2011e04: 94 10 00 1c mov %i4, %o2 if ( ret == -1 ) 2011e08: 80 a2 3f ff cmp %o0, -1 2011e0c: 12 80 00 06 bne 2011e24 <== ALWAYS TAKEN 2011e10: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2011e14: 7f ff c9 fa call 20045fc <== NOT EXECUTED 2011e18: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return -1; 2011e1c: 81 c7 e0 08 ret <== NOT EXECUTED 2011e20: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2011e24: 90 10 00 1d mov %i5, %o0 2011e28: 40 00 18 73 call 2017ff4 2011e2c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2011e30: b0 92 20 00 orcc %o0, 0, %i0 2011e34: 02 80 00 06 be 2011e4c <== ALWAYS TAKEN 2011e38: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2011e3c: 7f ff c9 f0 call 20045fc <== NOT EXECUTED 2011e40: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2011e44: 81 c7 e0 08 ret <== NOT EXECUTED 2011e48: 81 e8 00 00 restore <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2011e4c: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2011e50: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2011e54: 84 0a 40 02 and %o1, %g2, %g2 2011e58: 80 a0 80 01 cmp %g2, %g1 2011e5c: 0a bf ff e9 bcs 2011e00 2011e60: 90 10 00 1d mov %i5, %o0 free(buf); return rc; } } free(buf); 2011e64: 90 10 00 1c mov %i4, %o0 2011e68: 7f ff c9 e5 call 20045fc 2011e6c: b0 10 20 00 clr %i0 return rc; } 2011e70: 81 c7 e0 08 ret 2011e74: 81 e8 00 00 restore =============================================================================== 020120fc : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 20120fc: 9d e3 bf 10 save %sp, -240, %sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 2012100: 92 10 20 02 mov 2, %o1 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 2012104: a0 10 00 18 mov %i0, %l0 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 2012108: c0 27 bf a4 clr [ %fp + -92 ] vol->fd = open(device, O_RDWR); 201210c: 7f ff cd 10 call 200554c 2012110: 90 10 00 19 mov %i1, %o0 if (vol->fd < 0) 2012114: 80 a2 20 00 cmp %o0, 0 2012118: 06 80 00 09 bl 201213c <== NEVER TAKEN 201211c: d0 24 20 54 st %o0, [ %l0 + 0x54 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 2012120: 40 00 04 3f call 201321c 2012124: 92 07 bf b8 add %fp, -72, %o1 if (rc != 0) 2012128: 80 a2 20 00 cmp %o0, 0 201212c: 02 80 00 08 be 201214c <== ALWAYS TAKEN 2012130: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 { close(vol->fd); 2012134: 7f ff c8 74 call 2004304 <== NOT EXECUTED 2012138: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 201213c: 40 00 1f b9 call 201a020 <__errno> <== NOT EXECUTED 2012140: 01 00 00 00 nop <== NOT EXECUTED 2012144: 10 80 01 c3 b 2012850 <== NOT EXECUTED 2012148: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 201214c: c6 07 bf c4 ld [ %fp + -60 ], %g3 2012150: 05 00 00 3c sethi %hi(0xf000), %g2 2012154: 86 08 c0 02 and %g3, %g2, %g3 2012158: 05 00 00 18 sethi %hi(0x6000), %g2 201215c: 80 a0 c0 02 cmp %g3, %g2 2012160: 12 bf ff f5 bne 2012134 <== NEVER TAKEN 2012164: 13 10 01 10 sethi %hi(0x40044000), %o1 static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 2012168: 94 06 20 58 add %i0, 0x58, %o2 201216c: 7f ff c9 95 call 20047c0 2012170: 92 12 62 09 or %o1, 0x209, %o1 rtems_set_errno_and_return_minus_one(ENXIO); } /* check that device is registred as block device and lock it */ rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd); if (rc != 0) { 2012174: ba 92 20 00 orcc %o0, 0, %i5 2012178: 22 80 00 04 be,a 2012188 <== ALWAYS TAKEN 201217c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 close(vol->fd); 2012180: 10 bf ff ed b 2012134 <== NOT EXECUTED 2012184: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 2012188: 92 10 20 00 clr %o1 201218c: 7f ff f7 79 call 200ff70 2012190: 94 07 bf a4 add %fp, -92, %o2 if (sc != RTEMS_SUCCESSFUL) 2012194: 80 a2 20 00 cmp %o0, 0 2012198: 22 80 00 03 be,a 20121a4 <== ALWAYS TAKEN 201219c: d0 07 bf a4 ld [ %fp + -92 ], %o0 20121a0: 30 80 00 32 b,a 2012268 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 20121a4: de 02 20 1c ld [ %o0 + 0x1c ], %o7 20121a8: c2 0b e0 20 ldub [ %o7 + 0x20 ], %g1 20121ac: c4 0b e0 0b ldub [ %o7 + 0xb ], %g2 20121b0: c2 2f bf 99 stb %g1, [ %fp + -103 ] 20121b4: c2 0b e0 21 ldub [ %o7 + 0x21 ], %g1 20121b8: d6 0b e0 0c ldub [ %o7 + 0xc ], %o3 20121bc: c2 2f bf 9a stb %g1, [ %fp + -102 ] 20121c0: c2 0b e0 23 ldub [ %o7 + 0x23 ], %g1 20121c4: da 0b e0 0e ldub [ %o7 + 0xe ], %o5 20121c8: c2 2f bf 8f stb %g1, [ %fp + -113 ] 20121cc: c2 0b e0 2c ldub [ %o7 + 0x2c ], %g1 20121d0: d8 0b e0 0f ldub [ %o7 + 0xf ], %o4 20121d4: c2 2f bf 9f stb %g1, [ %fp + -97 ] 20121d8: c2 0b e0 2d ldub [ %o7 + 0x2d ], %g1 20121dc: c6 0b e0 11 ldub [ %o7 + 0x11 ], %g3 20121e0: c2 2f bf 9e stb %g1, [ %fp + -98 ] 20121e4: c2 0b e0 2e ldub [ %o7 + 0x2e ], %g1 20121e8: c8 0b e0 12 ldub [ %o7 + 0x12 ], %g4 20121ec: c2 2f bf 9d stb %g1, [ %fp + -99 ] 20121f0: c2 0b e0 2f ldub [ %o7 + 0x2f ], %g1 20121f4: f8 0b e0 0d ldub [ %o7 + 0xd ], %i4 20121f8: f4 0b e0 10 ldub [ %o7 + 0x10 ], %i2 20121fc: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 2012200: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2012204: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 2012208: f0 0b e0 17 ldub [ %o7 + 0x17 ], %i0 201220c: f2 0b e0 22 ldub [ %o7 + 0x22 ], %i1 2012210: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 2012214: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 2012218: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 201221c: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2012220: f6 0b e0 28 ldub [ %o7 + 0x28 ], %i3 2012224: c2 2f bf 97 stb %g1, [ %fp + -105 ] 2012228: c2 0b e0 30 ldub [ %o7 + 0x30 ], %g1 201222c: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 2012230: c2 2f bf 9c stb %g1, [ %fp + -100 ] sc = rtems_bdbuf_release( block); 2012234: c4 3f bf 80 std %g2, [ %fp + -128 ] 2012238: c8 27 bf 7c st %g4, [ %fp + -132 ] 201223c: d6 27 bf 78 st %o3, [ %fp + -136 ] 2012240: d8 3f bf 70 std %o4, [ %fp + -144 ] { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2012244: de 2f bf 9b stb %o7, [ %fp + -101 ] sc = rtems_bdbuf_release( block); 2012248: 7f ff f7 c7 call 2010164 201224c: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012250: c4 1f bf 80 ldd [ %fp + -128 ], %g2 2012254: 80 a2 20 00 cmp %o0, 0 2012258: c8 07 bf 7c ld [ %fp + -132 ], %g4 201225c: d6 07 bf 78 ld [ %fp + -136 ], %o3 2012260: 02 80 00 08 be 2012280 <== ALWAYS TAKEN 2012264: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { close(vol->fd); 2012268: 7f ff c8 27 call 2004304 <== NOT EXECUTED 201226c: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2012270: 40 00 1f 6c call 201a020 <__errno> <== NOT EXECUTED 2012274: 01 00 00 00 nop <== NOT EXECUTED 2012278: 10 80 01 76 b 2012850 <== NOT EXECUTED 201227c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 2012280: 96 0a e0 ff and %o3, 0xff, %o3 2012284: 84 08 a0 ff and %g2, 0xff, %g2 2012288: 97 2a e0 08 sll %o3, 8, %o3 201228c: 84 12 c0 02 or %o3, %g2, %g2 if ( (vol->bps != 512) && 2012290: 9f 28 a0 10 sll %g2, 0x10, %o7 2012294: 9f 33 e0 10 srl %o7, 0x10, %o7 2012298: 80 a3 e4 00 cmp %o7, 0x400 201229c: 02 80 00 0c be 20122cc <== NEVER TAKEN 20122a0: c4 34 00 00 sth %g2, [ %l0 ] 20122a4: 80 a3 e2 00 cmp %o7, 0x200 20122a8: 22 80 00 0a be,a 20122d0 <== ALWAYS TAKEN 20122ac: 9f 28 a0 10 sll %g2, 0x10, %o7 (vol->bps != 1024) && 20122b0: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 20122b4: 02 80 00 06 be 20122cc <== NOT EXECUTED 20122b8: 17 00 00 04 sethi %hi(0x1000), %o3 <== NOT EXECUTED (vol->bps != 2048) && 20122bc: 80 a3 c0 0b cmp %o7, %o3 <== NOT EXECUTED 20122c0: 02 80 00 04 be 20122d0 <== NOT EXECUTED 20122c4: 9f 28 a0 10 sll %g2, 0x10, %o7 <== NOT EXECUTED 20122c8: 30 80 00 d1 b,a 201260c <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 20122cc: 9f 28 a0 10 sll %g2, 0x10, %o7 <== NOT EXECUTED 20122d0: c0 2c 20 03 clrb [ %l0 + 3 ] 20122d4: 10 80 00 05 b 20122e8 20122d8: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 20122dc: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 20122e0: 96 02 e0 01 inc %o3 <== NOT EXECUTED 20122e4: d6 2c 20 03 stb %o3, [ %l0 + 3 ] <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 20122e8: 80 8b e0 01 btst 1, %o7 20122ec: 22 bf ff fc be,a 20122dc <== NEVER TAKEN 20122f0: d6 0c 20 03 ldub [ %l0 + 3 ], %o3 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 20122f4: 85 28 a0 10 sll %g2, 0x10, %g2 20122f8: c0 2c 20 02 clrb [ %l0 + 2 ] 20122fc: 93 30 a0 10 srl %g2, 0x10, %o1 2012300: 10 80 00 05 b 2012314 2012304: 84 10 00 09 mov %o1, %g2 i >>= 1, vol->sec_log2++); 2012308: 85 38 a0 01 sra %g2, 1, %g2 201230c: 9e 03 e0 01 inc %o7 2012310: de 2c 20 02 stb %o7, [ %l0 + 2 ] rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2012314: 80 88 a0 01 btst 1, %g2 2012318: 22 bf ff fc be,a 2012308 201231c: de 0c 20 02 ldub [ %l0 + 2 ], %o7 vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 2012320: 9e 8f 20 ff andcc %i4, 0xff, %o7 2012324: 02 80 00 ba be 201260c <== NEVER TAKEN 2012328: f8 2c 20 04 stb %i4, [ %l0 + 4 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 201232c: 10 80 00 05 b 2012340 2012330: c0 2c 20 05 clrb [ %l0 + 5 ] i >>= 1, vol->spc_log2++); 2012334: 84 00 a0 01 inc %g2 2012338: 9f 3b e0 01 sra %o7, 1, %o7 201233c: c4 2c 20 05 stb %g2, [ %l0 + 5 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2012340: 80 8b e0 01 btst 1, %o7 2012344: 02 bf ff fc be 2012334 2012348: c4 0c 20 05 ldub [ %l0 + 5 ], %g2 i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 201234c: 85 2a 40 02 sll %o1, %g2, %g2 2012350: 97 28 a0 10 sll %g2, 0x10, %o3 2012354: 1f 20 00 00 sethi %hi(0x80000000), %o7 2012358: 80 a2 c0 0f cmp %o3, %o7 201235c: 18 80 00 ac bgu 201260c <== NEVER TAKEN 2012360: c4 34 20 06 sth %g2, [ %l0 + 6 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2012364: 1f 00 00 3f sethi %hi(0xfc00), %o7 2012368: c0 2c 20 08 clrb [ %l0 + 8 ] 201236c: 9e 13 e3 ff or %o7, 0x3ff, %o7 2012370: 10 80 00 05 b 2012384 2012374: 84 08 80 0f and %g2, %o7, %g2 i >>= 1, vol->bpc_log2++); 2012378: 85 38 a0 01 sra %g2, 1, %g2 201237c: 9e 03 e0 01 inc %o7 2012380: de 2c 20 08 stb %o7, [ %l0 + 8 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2012384: 80 88 a0 01 btst 1, %g2 2012388: 22 bf ff fc be,a 2012378 201238c: de 0c 20 08 ldub [ %l0 + 8 ], %o7 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2012390: 84 02 7f ff add %o1, -1, %g2 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2012394: 98 0b 20 ff and %o4, 0xff, %o4 2012398: 9a 0b 60 ff and %o5, 0xff, %o5 201239c: 99 2b 20 08 sll %o4, 8, %o4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20123a0: 88 09 20 ff and %g4, 0xff, %g4 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20123a4: 9a 13 00 0d or %o4, %o5, %o5 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 20123a8: 89 29 20 08 sll %g4, 8, %g4 20123ac: 86 08 e0 ff and %g3, 0xff, %g3 20123b0: 86 11 00 03 or %g4, %g3, %g3 20123b4: c6 34 20 20 sth %g3, [ %l0 + 0x20 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 20123b8: 87 28 e0 10 sll %g3, 0x10, %g3 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20123bc: da 34 20 14 sth %o5, [ %l0 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 20123c0: 91 30 e0 0b srl %g3, 0xb, %o0 20123c4: da 27 bf 74 st %o5, [ %fp + -140 ] 20123c8: 90 02 00 02 add %o0, %g2, %o0 20123cc: 40 00 43 55 call 2023120 <.div> 20123d0: f4 2c 20 09 stb %i2, [ %l0 + 9 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 20123d4: c6 0c 20 02 ldub [ %l0 + 2 ], %g3 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 20123d8: d0 24 20 24 st %o0, [ %l0 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 20123dc: 87 2a 00 03 sll %o0, %g3, %g3 20123e0: c6 24 20 28 st %g3, [ %l0 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 20123e4: b0 0e 20 ff and %i0, 0xff, %i0 20123e8: ae 0d e0 ff and %l7, 0xff, %l7 20123ec: b1 2e 20 08 sll %i0, 8, %i0 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 20123f0: 84 10 00 08 mov %o0, %g2 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 20123f4: ae 16 00 17 or %i0, %l7, %l7 20123f8: af 2d e0 10 sll %l7, 0x10, %l7 20123fc: 80 a5 e0 00 cmp %l7, 0 2012400: 02 80 00 05 be 2012414 <== NEVER TAKEN 2012404: da 07 bf 74 ld [ %fp + -140 ], %o5 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2012408: af 35 e0 10 srl %l7, 0x10, %l7 201240c: 10 80 00 0c b 201243c 2012410: ee 24 20 18 st %l7, [ %l0 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2012414: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2012418: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 201241c: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 2012420: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2012424: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2012428: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 201242c: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 2012430: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 2012434: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 2012438: e6 24 20 18 st %l3, [ %l0 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 201243c: d2 04 20 18 ld [ %l0 + 0x18 ], %o1 2012440: 9b 2b 60 10 sll %o5, 0x10, %o5 2012444: c4 27 bf 80 st %g2, [ %fp + -128 ] 2012448: b1 33 60 10 srl %o5, 0x10, %i0 201244c: 40 00 42 f9 call 2023030 <.umul> 2012450: 90 0e a0 ff and %i2, 0xff, %o0 2012454: c4 07 bf 80 ld [ %fp + -128 ], %g2 2012458: 90 06 00 08 add %i0, %o0, %o0 201245c: 84 00 80 08 add %g2, %o0, %g2 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 2012460: d0 24 20 1c st %o0, [ %l0 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2012464: a4 0c a0 ff and %l2, 0xff, %l2 2012468: a2 0c 60 ff and %l1, 0xff, %l1 201246c: a5 2c a0 08 sll %l2, 8, %l2 2012470: a2 14 80 11 or %l2, %l1, %l1 2012474: a3 2c 60 10 sll %l1, 0x10, %l1 2012478: 80 a4 60 00 cmp %l1, 0 201247c: 02 80 00 05 be 2012490 <== NEVER TAKEN 2012480: c4 24 20 30 st %g2, [ %l0 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2012484: a3 34 60 10 srl %l1, 0x10, %l1 2012488: 10 80 00 0d b 20124bc 201248c: e2 24 20 2c st %l1, [ %l0 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2012490: c8 0f bf 99 ldub [ %fp + -103 ], %g4 <== NOT EXECUTED 2012494: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 2012498: c2 0f bf 8f ldub [ %fp + -113 ], %g1 <== NOT EXECUTED 201249c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 20124a0: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED 20124a4: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED 20124a8: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED 20124ac: 86 10 c0 04 or %g3, %g4, %g3 <== NOT EXECUTED 20124b0: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED 20124b4: 86 10 c0 04 or %g3, %g4, %g3 <== NOT EXECUTED 20124b8: c6 24 20 2c st %g3, [ %l0 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 20124bc: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 20124c0: 92 0f 20 ff and %i4, 0xff, %o1 20124c4: 40 00 43 15 call 2023118 <.udiv> 20124c8: 90 22 00 02 sub %o0, %g2, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 20124cc: 80 a2 2f f4 cmp %o0, 0xff4 20124d0: 18 80 00 08 bgu 20124f0 <== NEVER TAKEN 20124d4: d0 24 20 34 st %o0, [ %l0 + 0x34 ] { vol->type = FAT_FAT12; 20124d8: 84 10 20 01 mov 1, %g2 20124dc: c4 2c 20 0a stb %g2, [ %l0 + 0xa ] vol->mask = FAT_FAT12_MASK; 20124e0: 84 10 2f ff mov 0xfff, %g2 20124e4: c4 24 20 0c st %g2, [ %l0 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 20124e8: 10 80 00 0f b 2012524 20124ec: 84 10 2f f8 mov 0xff8, %g2 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 20124f0: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 20124f4: 86 10 a3 f4 or %g2, 0x3f4, %g3 ! fff4 <== NOT EXECUTED 20124f8: 80 a2 00 03 cmp %o0, %g3 <== NOT EXECUTED 20124fc: 38 80 00 05 bgu,a 2012510 <== NOT EXECUTED 2012500: 84 10 20 04 mov 4, %g2 <== NOT EXECUTED { vol->type = FAT_FAT16; 2012504: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED 2012508: 10 80 00 04 b 2012518 <== NOT EXECUTED 201250c: c6 2c 20 0a stb %g3, [ %l0 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2012510: c4 2c 20 0a stb %g2, [ %l0 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2012514: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED 2012518: 86 10 a3 ff or %g2, 0x3ff, %g3 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 201251c: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2012520: c6 24 20 0c st %g3, [ %l0 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2012524: c4 24 20 10 st %g2, [ %l0 + 0x10 ] } } if (vol->type == FAT_FAT32) 2012528: c4 0c 20 0a ldub [ %l0 + 0xa ], %g2 201252c: 80 a0 a0 04 cmp %g2, 4 2012530: 12 80 00 6e bne 20126e8 <== ALWAYS TAKEN 2012534: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2012538: c6 0f bf 9e ldub [ %fp + -98 ], %g3 <== NOT EXECUTED 201253c: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 2012540: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2012544: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2012548: c2 0f bf 97 ldub [ %fp + -105 ], %g1 <== NOT EXECUTED 201254c: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 2012550: c6 0f bf 9f ldub [ %fp + -97 ], %g3 <== NOT EXECUTED 2012554: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2012558: 87 28 60 18 sll %g1, 0x18, %g3 <== NOT EXECUTED 201255c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2012560: c4 24 20 38 st %g2, [ %l0 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2012564: 84 0e ff 80 and %i3, -128, %g2 <== NOT EXECUTED if (vol->mirror) 2012568: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED 201256c: 02 80 00 05 be 2012580 <== NOT EXECUTED 2012570: c4 2c 20 48 stb %g2, [ %l0 + 0x48 ] <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 2012574: b6 0e e0 0f and %i3, 0xf, %i3 <== NOT EXECUTED 2012578: 10 80 00 03 b 2012584 <== NOT EXECUTED 201257c: f6 2c 20 50 stb %i3, [ %l0 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 2012580: c0 2c 20 50 clrb [ %l0 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 2012584: d2 0f bf 9b ldub [ %fp + -101 ], %o1 <== NOT EXECUTED 2012588: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 201258c: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 2012590: 92 12 40 02 or %o1, %g2, %o1 <== NOT EXECUTED 2012594: d2 34 20 3c sth %o1, [ %l0 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 2012598: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 201259c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 20125a0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20125a4: 32 80 00 03 bne,a 20125b0 <== NOT EXECUTED 20125a8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20125ac: 30 80 00 18 b,a 201260c <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 20125b0: 94 10 20 00 clr %o2 <== NOT EXECUTED 20125b4: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 20125b8: 7f ff fd 6b call 2011b64 <_fat_block_read> <== NOT EXECUTED 20125bc: 98 07 bf a8 add %fp, -88, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 20125c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20125c4: 06 80 00 22 bl 201264c <== NOT EXECUTED 20125c8: c4 0f bf aa ldub [ %fp + -86 ], %g2 <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 20125cc: c6 0f bf a9 ldub [ %fp + -87 ], %g3 <== NOT EXECUTED 20125d0: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 20125d4: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 20125d8: 86 10 c0 02 or %g3, %g2, %g3 <== NOT EXECUTED 20125dc: c4 0f bf a8 ldub [ %fp + -88 ], %g2 <== NOT EXECUTED 20125e0: 86 10 c0 02 or %g3, %g2, %g3 <== NOT EXECUTED 20125e4: c4 0f bf ab ldub [ %fp + -85 ], %g2 <== NOT EXECUTED 20125e8: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20125ec: 86 10 c0 02 or %g3, %g2, %g3 <== NOT EXECUTED 20125f0: 05 10 58 54 sethi %hi(0x41615000), %g2 <== NOT EXECUTED 20125f4: 84 10 a2 52 or %g2, 0x252, %g2 ! 41615252 <== NOT EXECUTED 20125f8: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 20125fc: 02 80 00 0a be 2012624 <== NOT EXECUTED 2012600: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); 2012604: 7f ff fd c3 call 2011d10 <_fat_block_release> <== NOT EXECUTED 2012608: 01 00 00 00 nop <== NOT EXECUTED close(vol->fd); 201260c: 7f ff c7 3e call 2004304 <== NOT EXECUTED 2012610: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2012614: 40 00 1e 83 call 201a020 <__errno> <== NOT EXECUTED 2012618: 01 00 00 00 nop <== NOT EXECUTED 201261c: 10 80 00 8d b 2012850 <== NOT EXECUTED 2012620: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 2012624: d2 14 20 3c lduh [ %l0 + 0x3c ], %o1 <== NOT EXECUTED 2012628: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 201262c: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2012630: 7f ff fd 4d call 2011b64 <_fat_block_read> <== NOT EXECUTED 2012634: 98 07 bf a8 add %fp, -88, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2012638: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 201263c: 16 80 00 08 bge 201265c <== NOT EXECUTED 2012640: c6 0f bf ad ldub [ %fp + -83 ], %g3 <== NOT EXECUTED { _fat_block_release(fs_info); 2012644: 7f ff fd b3 call 2011d10 <_fat_block_release> <== NOT EXECUTED 2012648: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED close(vol->fd); 201264c: 7f ff c7 2e call 2004304 <== NOT EXECUTED 2012650: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED { close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 2012654: 10 80 00 81 b 2012858 <== NOT EXECUTED 2012658: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 201265c: c4 0f bf ae ldub [ %fp + -82 ], %g2 <== NOT EXECUTED 2012660: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2012664: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2012668: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 201266c: c6 0f bf ac ldub [ %fp + -84 ], %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF, 2012670: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2012674: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2012678: c6 0f bf af ldub [ %fp + -81 ], %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF, 201267c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2012680: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED 2012684: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2012688: c6 0f bf b1 ldub [ %fp + -79 ], %g3 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 201268c: c4 24 20 40 st %g2, [ %l0 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2012690: c4 0f bf b2 ldub [ %fp + -78 ], %g2 <== NOT EXECUTED 2012694: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2012698: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 201269c: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 20126a0: c6 0f bf b0 ldub [ %fp + -80 ], %g3 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF, 20126a4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20126a8: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 20126ac: c6 0f bf b3 ldub [ %fp + -77 ], %g3 <== NOT EXECUTED 20126b0: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED 20126b4: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info, 0xFFFFFFFF, 20126b8: 7f ff fe 2f call 2011f74 <== NOT EXECUTED 20126bc: c4 24 20 44 st %g2, [ %l0 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 20126c0: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 20126c4: 02 80 00 0e be 20126fc <== NOT EXECUTED 20126c8: 01 00 00 00 nop <== NOT EXECUTED { _fat_block_release(fs_info); 20126cc: 7f ff fd 91 call 2011d10 <_fat_block_release> <== NOT EXECUTED 20126d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED close(vol->fd); 20126d4: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED 20126d8: 7f ff c7 0b call 2004304 <== NOT EXECUTED 20126dc: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 20126e0: 81 c7 e0 08 ret <== NOT EXECUTED 20126e4: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 20126e8: c0 24 20 38 clr [ %l0 + 0x38 ] vol->mirror = 0; 20126ec: c0 2c 20 48 clrb [ %l0 + 0x48 ] vol->afat = 0; 20126f0: c0 2c 20 50 clrb [ %l0 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 20126f4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 20126f8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } _fat_block_release(fs_info); 20126fc: 7f ff fd 85 call 2011d10 <_fat_block_release> 2012700: 90 10 00 10 mov %l0, %o0 vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2012704: d2 04 20 18 ld [ %l0 + 0x18 ], %o1 2012708: 40 00 42 4a call 2023030 <.umul> 201270c: d0 0c 20 50 ldub [ %l0 + 0x50 ], %o0 2012710: c4 14 20 14 lduh [ %l0 + 0x14 ], %g2 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2012714: 92 10 20 0c mov 0xc, %o1 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2012718: 90 02 00 02 add %o0, %g2, %o0 201271c: d0 24 20 4c st %o0, [ %l0 + 0x4c ] /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2012720: 7f ff c6 e2 call 20042a8 2012724: 90 10 20 02 mov 2, %o0 if ( fs_info->vhash == NULL ) 2012728: 80 a2 20 00 cmp %o0, 0 201272c: 02 80 00 12 be 2012774 <== NEVER TAKEN 2012730: d0 24 20 60 st %o0, [ %l0 + 0x60 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2012734: 84 02 20 04 add %o0, 4, %g2 2012738: 86 02 20 10 add %o0, 0x10, %g3 head->next = tail; 201273c: c4 22 00 00 st %g2, [ %o0 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2012740: 84 02 20 0c add %o0, 0xc, %g2 head->next = tail; head->previous = NULL; 2012744: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2012748: d0 22 20 08 st %o0, [ %o0 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 201274c: c6 22 20 0c st %g3, [ %o0 + 0xc ] head->previous = NULL; 2012750: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2012754: c4 22 20 14 st %g2, [ %o0 + 0x14 ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2012758: 92 10 20 0c mov 0xc, %o1 201275c: 7f ff c6 d3 call 20042a8 2012760: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2012764: 80 a2 20 00 cmp %o0, 0 2012768: 12 80 00 06 bne 2012780 <== ALWAYS TAKEN 201276c: d0 24 20 64 st %o0, [ %l0 + 0x64 ] 2012770: 30 80 00 1c b,a 20127e0 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { close(vol->fd); 2012774: 7f ff c6 e4 call 2004304 <== NOT EXECUTED 2012778: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED 201277c: 30 80 00 32 b,a 2012844 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2012780: 84 02 20 04 add %o0, 4, %g2 head->next = tail; 2012784: c4 22 00 00 st %g2, [ %o0 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 2012788: 84 02 20 0c add %o0, 0xc, %g2 head->next = tail; head->previous = NULL; 201278c: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2012790: c4 22 20 14 st %g2, [ %o0 + 0x14 ] 2012794: d0 22 20 08 st %o0, [ %o0 + 8 ] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 2012798: c0 22 20 10 clr [ %o0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 201279c: 86 02 20 10 add %o0, 0x10, %g3 rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 20127a0: 84 10 21 00 mov 0x100, %g2 head->next = tail; 20127a4: c6 22 20 0c st %g3, [ %o0 + 0xc ] 20127a8: c4 24 20 70 st %g2, [ %l0 + 0x70 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20127ac: c6 04 20 2c ld [ %l0 + 0x2c ], %g3 20127b0: c4 0c 20 03 ldub [ %l0 + 3 ], %g2 fs_info->index = 0; 20127b4: c0 24 20 6c clr [ %l0 + 0x6c ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20127b8: 85 28 c0 02 sll %g3, %g2, %g2 20127bc: 85 28 a0 04 sll %g2, 4, %g2 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20127c0: 90 10 21 00 mov 0x100, %o0 } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 20127c4: c4 24 20 74 st %g2, [ %l0 + 0x74 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 20127c8: 7f ff c6 b8 call 20042a8 20127cc: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 20127d0: 80 a2 20 00 cmp %o0, 0 20127d4: 12 80 00 0d bne 2012808 <== ALWAYS TAKEN 20127d8: d0 24 20 68 st %o0, [ %l0 + 0x68 ] 20127dc: 30 80 00 05 b,a 20127f0 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { close(vol->fd); 20127e0: 7f ff c6 c9 call 2004304 <== NOT EXECUTED 20127e4: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20127e8: 10 80 00 15 b 201283c <== NOT EXECUTED 20127ec: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { close(vol->fd); 20127f0: 7f ff c6 c5 call 2004304 <== NOT EXECUTED 20127f4: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20127f8: 7f ff c7 81 call 20045fc <== NOT EXECUTED 20127fc: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2012800: 10 80 00 0f b 201283c <== NOT EXECUTED 2012804: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2012808: d0 14 00 00 lduh [ %l0 ], %o0 201280c: 7f ff c6 a7 call 20042a8 2012810: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 2012814: 80 a2 20 00 cmp %o0, 0 2012818: 12 80 00 10 bne 2012858 <== ALWAYS TAKEN 201281c: d0 24 20 84 st %o0, [ %l0 + 0x84 ] { close(vol->fd); 2012820: 7f ff c6 b9 call 2004304 <== NOT EXECUTED 2012824: d0 04 20 54 ld [ %l0 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2012828: 7f ff c7 75 call 20045fc <== NOT EXECUTED 201282c: d0 04 20 60 ld [ %l0 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2012830: 7f ff c7 73 call 20045fc <== NOT EXECUTED 2012834: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED free(fs_info->uino); 2012838: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 201283c: 7f ff c7 70 call 20045fc <== NOT EXECUTED 2012840: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2012844: 40 00 1d f7 call 201a020 <__errno> <== NOT EXECUTED 2012848: 01 00 00 00 nop <== NOT EXECUTED 201284c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2012850: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012854: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED } return RC_OK; } 2012858: b0 10 00 1d mov %i5, %i0 201285c: 81 c7 e0 08 ret 2012860: 81 e8 00 00 restore =============================================================================== 02018548 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 2018548: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 201854c: e8 06 20 34 ld [ %i0 + 0x34 ], %l4 bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 2018550: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; 2018554: c0 26 c0 00 clr [ %i3 ] if (count == 0) 2018558: 80 a6 a0 00 cmp %i2, 0 201855c: 02 80 00 87 be 2018778 <== NEVER TAKEN 2018560: a2 10 20 00 clr %l1 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2018564: e0 06 20 44 ld [ %i0 + 0x44 ], %l0 2018568: 80 a4 3f ff cmp %l0, -1 201856c: 22 80 00 02 be,a 2018574 2018570: a0 10 20 02 mov 2, %l0 { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2018574: a8 05 20 02 add %l4, 2, %l4 2018578: a6 10 20 02 mov 2, %l3 201857c: 10 80 00 64 b 201870c 2018580: a4 10 20 00 clr %l2 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 2018584: 92 10 00 10 mov %l0, %o1 2018588: 7f ff fe 9b call 2017ff4 201858c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2018590: a2 92 20 00 orcc %o0, 0, %l1 2018594: 02 80 00 0b be 20185c0 <== ALWAYS TAKEN 2018598: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 201859c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 20185a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20185a4: 22 80 00 76 be,a 201877c <== NOT EXECUTED 20185a8: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 20185ac: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 20185b0: 7f ff ff b7 call 201848c <== NOT EXECUTED 20185b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 20185b8: 81 c7 e0 08 ret <== NOT EXECUTED 20185bc: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED if (*cls_added != 0) fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 20185c0: 80 a0 60 00 cmp %g1, 0 20185c4: 32 80 00 4e bne,a 20186fc 20185c8: a0 04 20 01 inc %l0 /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 20185cc: c2 06 c0 00 ld [ %i3 ], %g1 20185d0: 80 a0 60 00 cmp %g1, 0 20185d4: 12 80 00 0e bne 201860c 20185d8: 90 10 00 18 mov %i0, %o0 { *chain = cl4find; 20185dc: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 20185e0: 92 10 00 10 mov %l0, %o1 20185e4: 7f ff fe fb call 20181d0 20185e8: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 20185ec: 80 a2 20 00 cmp %o0, 0 20185f0: 32 80 00 62 bne,a 2018778 <== NEVER TAKEN 20185f4: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) { 20185f8: 80 a7 60 00 cmp %i5, 0 20185fc: 22 80 00 18 be,a 201865c 2018600: c2 06 c0 00 ld [ %i3 ], %g1 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2018604: 10 80 00 1c b 2018674 2018608: 80 a4 20 00 cmp %l0, 0 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 201860c: 92 10 00 10 mov %l0, %o1 2018610: 7f ff fe f0 call 20181d0 2018614: 94 10 3f ff mov -1, %o2 2018618: aa 10 00 08 mov %o0, %l5 if ( rc != RC_OK ) 201861c: 80 a5 60 00 cmp %l5, 0 2018620: 02 80 00 07 be 201863c <== ALWAYS TAKEN 2018624: 90 10 00 18 mov %i0, %o0 { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 2018628: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201862c: 7f ff ff 98 call 201848c <== NOT EXECUTED 2018630: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 2018634: 81 c7 e0 08 ret <== NOT EXECUTED 2018638: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 201863c: 92 10 00 12 mov %l2, %o1 2018640: 7f ff fe e4 call 20181d0 2018644: 94 10 00 10 mov %l0, %o2 if ( rc != RC_OK ) 2018648: a4 92 20 00 orcc %o0, 0, %l2 201864c: 02 bf ff ec be 20185fc <== ALWAYS TAKEN 2018650: 80 a7 60 00 cmp %i5, 0 return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 2018654: 10 80 00 3e b 201874c <== NOT EXECUTED 2018658: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) goto cleanup; } save_cln = cl4find; (*cls_added)++; 201865c: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 2018660: 80 a0 40 1a cmp %g1, %i2 2018664: 02 80 00 19 be 20186c8 2018668: c2 26 c0 00 st %g1, [ %i3 ] 201866c: 10 80 00 23 b 20186f8 2018670: a4 10 00 10 mov %l0, %l2 2018674: 32 80 00 08 bne,a 2018694 <== ALWAYS TAKEN 2018678: c2 0e 20 05 ldub [ %i0 + 5 ], %g1 201867c: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 <== NOT EXECUTED 2018680: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2018684: 22 80 00 04 be,a 2018694 <== NOT EXECUTED 2018688: c2 0e 20 05 ldub [ %i0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 201868c: 10 80 00 06 b 20186a4 <== NOT EXECUTED 2018690: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2018694: 92 04 3f fe add %l0, -2, %o1 2018698: 93 2a 40 01 sll %o1, %g1, %o1 201869c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 20186a0: 92 02 40 01 add %o1, %g1, %o1 if (zero_fill) { uint32_t sec = fat_cluster_num_to_sector_num(fs_info, cl4find); rc = _fat_block_zero(fs_info, sec, 0, fs_info->vol.bpc); 20186a4: d6 16 20 06 lduh [ %i0 + 6 ], %o3 20186a8: 90 10 00 18 mov %i0, %o0 20186ac: 7f ff e5 76 call 2011c84 <_fat_block_zero> 20186b0: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 20186b4: a4 92 20 00 orcc %o0, 0, %l2 20186b8: 22 bf ff e9 be,a 201865c <== ALWAYS TAKEN 20186bc: c2 06 c0 00 ld [ %i3 ], %g1 return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 20186c0: 10 80 00 23 b 201874c <== NOT EXECUTED 20186c4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 20186c8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 20186cc: 80 a0 7f ff cmp %g1, -1 20186d0: 02 80 00 05 be 20186e4 <== ALWAYS TAKEN 20186d4: e0 26 20 44 st %l0, [ %i0 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 20186d8: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 20186dc: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20186e0: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 20186e4: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 20186e8: 7f ff e4 c7 call 2011a04 20186ec: 90 10 00 18 mov %i0, %o0 fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 20186f0: 81 c7 e0 08 ret 20186f4: 91 e8 00 11 restore %g0, %l1, %o0 fat_buf_release(fs_info); return rc; } } i++; cl4find++; 20186f8: a0 04 20 01 inc %l0 if (cl4find >= data_cls_val) 20186fc: 80 a4 00 14 cmp %l0, %l4 2018700: 0a 80 00 03 bcs 201870c <== ALWAYS TAKEN 2018704: a6 04 e0 01 inc %l3 cl4find = 2; 2018708: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 201870c: 80 a4 c0 14 cmp %l3, %l4 2018710: 0a bf ff 9d bcs 2018584 <== ALWAYS TAKEN 2018714: 90 10 00 18 mov %i0, %o0 if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2018718: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 201871c: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2018720: 02 80 00 05 be 2018734 <== NOT EXECUTED 2018724: e4 26 20 44 st %l2, [ %i0 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 2018728: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 201872c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2018730: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2018734: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 2018738: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201873c: 7f ff e4 b2 call 2011a04 <== NOT EXECUTED 2018740: a2 10 20 00 clr %l1 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 2018744: 81 c7 e0 08 ret <== NOT EXECUTED 2018748: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 201874c: 7f ff ff 50 call 201848c <== NOT EXECUTED 2018750: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 2018754: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2018758: 94 10 20 00 clr %o2 <== NOT EXECUTED 201875c: 7f ff fe 9d call 20181d0 <== NOT EXECUTED 2018760: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 2018764: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2018768: 7f ff e4 a7 call 2011a04 <== NOT EXECUTED 201876c: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return rc; } 2018770: 81 c7 e0 08 ret <== NOT EXECUTED 2018774: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED 2018778: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 201877c: 81 c7 e0 08 ret <== NOT EXECUTED 2018780: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020181d0 : fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 20181d0: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 20181d4: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 20181d8: 80 a6 60 01 cmp %i1, 1 20181dc: 08 80 00 a6 bleu 2018474 <== NEVER TAKEN 20181e0: ba 10 00 18 mov %i0, %i5 20181e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20181e8: 82 00 60 01 inc %g1 20181ec: 80 a6 40 01 cmp %i1, %g1 20181f0: 28 80 00 03 bleu,a 20181fc <== ALWAYS TAKEN 20181f4: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 20181f8: 30 80 00 9f b,a 2018474 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 20181fc: 84 08 60 01 and %g1, 1, %g2 2018200: 80 88 a0 ff btst 0xff, %g2 2018204: 02 80 00 05 be 2018218 <== NEVER TAKEN 2018208: 86 08 60 02 and %g1, 2, %g3 201820c: a1 36 60 01 srl %i1, 1, %l0 2018210: 10 80 00 06 b 2018228 2018214: a0 04 00 19 add %l0, %i1, %l0 2018218: 80 88 e0 ff btst 0xff, %g3 <== NOT EXECUTED 201821c: 02 80 00 03 be 2018228 <== NOT EXECUTED 2018220: a1 2e 60 02 sll %i1, 2, %l0 <== NOT EXECUTED 2018224: a1 2e 60 01 sll %i1, 1, %l0 <== NOT EXECUTED 2018228: c6 0f 60 02 ldub [ %i5 + 2 ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 201822c: 80 88 a0 ff btst 0xff, %g2 /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2018230: a1 34 00 03 srl %l0, %g3, %l0 2018234: c6 07 60 4c ld [ %i5 + 0x4c ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2018238: 02 80 00 05 be 201824c <== NEVER TAKEN 201823c: a0 04 00 03 add %l0, %g3, %l0 2018240: b7 36 60 01 srl %i1, 1, %i3 2018244: 10 80 00 07 b 2018260 2018248: b6 06 c0 19 add %i3, %i1, %i3 201824c: 82 08 60 02 and %g1, 2, %g1 <== NOT EXECUTED 2018250: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 2018254: 02 80 00 03 be 2018260 <== NOT EXECUTED 2018258: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 201825c: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 2018260: f8 17 40 00 lduh [ %i5 ], %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2018264: 90 10 00 1d mov %i5, %o0 2018268: 92 10 00 10 mov %l0, %o1 201826c: 94 10 20 01 mov 1, %o2 2018270: 7f ff e5 68 call 2011810 2018274: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2018278: b0 92 20 00 orcc %o0, 0, %i0 201827c: 12 80 00 56 bne 20183d4 <== NEVER TAKEN 2018280: b9 2f 20 10 sll %i4, 0x10, %i4 if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2018284: b9 37 20 10 srl %i4, 0x10, %i4 2018288: b8 07 3f ff add %i4, -1, %i4 201828c: b8 0e c0 1c and %i3, %i4, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2018290: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3 2018294: 80 a6 e0 02 cmp %i3, 2 2018298: 02 80 00 5f be 2018414 <== NEVER TAKEN 201829c: 80 a6 e0 04 cmp %i3, 4 20182a0: 02 80 00 68 be 2018440 <== NEVER TAKEN 20182a4: 80 a6 e0 01 cmp %i3, 1 20182a8: 12 80 00 73 bne 2018474 <== NEVER TAKEN 20182ac: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 20182b0: 02 80 00 29 be 2018354 20182b4: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 20182b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 20182bc: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 20182c0: 84 08 a0 0f and %g2, 0xf, %g2 20182c4: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 20182c8: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 20182cc: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 20182d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 20182d4: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 20182d8: 84 10 c0 02 or %g3, %g2, %g2 20182dc: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 20182e0: c2 17 40 00 lduh [ %i5 ], %g1 20182e4: 82 00 7f ff add %g1, -1, %g1 20182e8: 80 a7 00 01 cmp %i4, %g1 20182ec: 12 80 00 11 bne 2018330 <== ALWAYS TAKEN 20182f0: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 20182f4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20182f8: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 20182fc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2018300: 7f ff e5 44 call 2011810 <== NOT EXECUTED 2018304: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2018308: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 201830c: 12 80 00 32 bne 20183d4 <== NOT EXECUTED 2018310: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2018314: b5 2e a0 14 sll %i2, 0x14, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 2018318: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201831c: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 2018320: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2018324: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2018328: 10 80 00 27 b 20183c4 <== NOT EXECUTED 201832c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2018330: c2 07 bf fc ld [ %fp + -4 ], %g1 2018334: b8 07 20 01 inc %i4 2018338: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 201833c: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2018340: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2018344: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2018348: b5 36 a0 18 srl %i2, 0x18, %i2 else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 201834c: 10 80 00 2d b 2018400 2018350: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2018354: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2018358: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 201835c: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2018360: c2 07 bf fc ld [ %fp + -4 ], %g1 2018364: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 2018368: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 201836c: 84 10 80 1a or %g2, %i2, %g2 2018370: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2018374: c2 17 40 00 lduh [ %i5 ], %g1 2018378: 82 00 7f ff add %g1, -1, %g1 201837c: 80 a7 00 01 cmp %i4, %g1 2018380: 12 80 00 17 bne 20183dc <== ALWAYS TAKEN 2018384: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2018388: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201838c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 2018390: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2018394: 7f ff e5 1f call 2011810 <== NOT EXECUTED 2018398: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 201839c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20183a0: 12 80 00 0d bne 20183d4 <== NOT EXECUTED 20183a4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 20183a8: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 20183ac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 20183b0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20183b4: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 20183b8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 20183bc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 20183c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 20183c4: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 20183c8: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 20183cc: f4 28 40 00 stb %i2, [ %g1 ] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 20183d0: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED 20183d4: 81 c7 e0 08 ret <== NOT EXECUTED 20183d8: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 20183dc: c2 07 bf fc ld [ %fp + -4 ], %g1 20183e0: b8 07 20 01 inc %i4 20183e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 20183e8: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 20183ec: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 20183f0: 84 08 bf f0 and %g2, -16, %g2 20183f4: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 20183f8: c2 07 bf fc ld [ %fp + -4 ], %g1 20183fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 2018400: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2018404: b4 10 80 1a or %g2, %i2, %i2 2018408: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 201840c: 81 c7 e0 08 ret 2018410: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2018414: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED break; } return RC_OK; } 2018418: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 201841c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED break; } return RC_OK; } 2018420: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED 2018424: 84 0e 80 02 and %i2, %g2, %g2 <== NOT EXECUTED } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = (uint16_t )(CT_LE_W(in_val)); 2018428: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED 201842c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2018430: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2018434: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2018438: 10 80 00 0b b 2018464 <== NOT EXECUTED 201843c: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 2018440: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 2018444: 7f ff fe e0 call 2017fc4 <== NOT EXECUTED 2018448: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 201844c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2018450: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2018454: c4 00 40 1c ld [ %g1 + %i4 ], %g2 <== NOT EXECUTED 2018458: 84 08 a0 f0 and %g2, 0xf0, %g2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 201845c: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 2018460: d0 20 40 1c st %o0, [ %g1 + %i4 ] <== NOT EXECUTED 2018464: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2018468: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 201846c: 81 c7 e0 08 ret <== NOT EXECUTED 2018470: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2018474: 40 00 06 eb call 201a020 <__errno> <== NOT EXECUTED 2018478: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 201847c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2018480: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2018484: 81 c7 e0 08 ret <== NOT EXECUTED 2018488: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02011fe4 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 2011fe4: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; int i = 0; if (fs_info->vol.type & FAT_FAT32) 2011fe8: c2 0e 20 0a ldub [ %i0 + 0xa ], %g1 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 2011fec: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; int i = 0; if (fs_info->vol.type & FAT_FAT32) 2011ff0: 82 08 60 04 and %g1, 4, %g1 2011ff4: 80 88 60 ff btst 0xff, %g1 2011ff8: 02 80 00 09 be 201201c <== ALWAYS TAKEN 2011ffc: b0 10 20 00 clr %i0 { rc = fat_fat32_update_fsinfo_sector(fs_info, fs_info->vol.free_cls, 2012000: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2012004: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED 2012008: 7f ff ff db call 2011f74 <== NOT EXECUTED 201200c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2012010: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2012014: 32 80 00 02 bne,a 201201c <== NOT EXECUTED 2012018: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 201201c: 7f ff fe 7a call 2011a04 2012020: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 2012024: 7f ff f8 f3 call 20103f0 2012028: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 201202c: 80 a2 20 00 cmp %o0, 0 2012030: 32 80 00 02 bne,a 2012038 <== NEVER TAKEN 2012034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rc = -1; 2012038: b8 10 20 00 clr %i4 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 201203c: f6 07 60 60 ld [ %i5 + 0x60 ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 2012040: 10 80 00 04 b 2012050 2012044: b6 06 c0 1c add %i3, %i4, %i3 free(node); 2012048: 7f ff c9 6d call 20045fc <== NOT EXECUTED 201204c: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 2012050: 7f ff de 13 call 200989c <_Chain_Get> 2012054: 90 10 00 1b mov %i3, %o0 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 2012058: 80 a2 20 00 cmp %o0, 0 201205c: 12 bf ff fb bne 2012048 <== NEVER TAKEN 2012060: 01 00 00 00 nop 2012064: b8 07 20 0c add %i4, 0xc, %i4 fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 2012068: 80 a7 20 18 cmp %i4, 0x18 201206c: 32 bf ff f5 bne,a 2012040 2012070: f6 07 60 60 ld [ %i5 + 0x60 ], %i3 2012074: b8 10 20 00 clr %i4 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 2012078: f6 07 60 64 ld [ %i5 + 0x64 ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 201207c: 10 80 00 04 b 201208c 2012080: b6 06 c0 1c add %i3, %i4, %i3 free(node); 2012084: 7f ff c9 5e call 20045fc <== NOT EXECUTED 2012088: 01 00 00 00 nop <== NOT EXECUTED 201208c: 7f ff de 04 call 200989c <_Chain_Get> 2012090: 90 10 00 1b mov %i3, %o0 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 2012094: 80 a2 20 00 cmp %o0, 0 2012098: 12 bf ff fb bne 2012084 <== NEVER TAKEN 201209c: 01 00 00 00 nop 20120a0: b8 07 20 0c add %i4, 0xc, %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 20120a4: 80 a7 20 18 cmp %i4, 0x18 20120a8: 32 bf ff f5 bne,a 201207c 20120ac: f6 07 60 64 ld [ %i5 + 0x64 ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 20120b0: 7f ff c9 53 call 20045fc 20120b4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 free(fs_info->rhash); 20120b8: 7f ff c9 51 call 20045fc 20120bc: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 free(fs_info->uino); 20120c0: 7f ff c9 4f call 20045fc 20120c4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 free(fs_info->sec_buf); 20120c8: 7f ff c9 4d call 20045fc 20120cc: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 close(fs_info->vol.fd); 20120d0: 7f ff c8 8d call 2004304 20120d4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 if (rc) 20120d8: 80 a6 20 00 cmp %i0, 0 20120dc: 02 80 00 06 be 20120f4 <== ALWAYS TAKEN 20120e0: 01 00 00 00 nop errno = EIO; 20120e4: 40 00 1f cf call 201a020 <__errno> <== NOT EXECUTED 20120e8: 01 00 00 00 nop <== NOT EXECUTED 20120ec: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20120f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 20120f4: 81 c7 e0 08 ret 20120f8: 81 e8 00 00 restore =============================================================================== 02032528 : #include #include int fchdir( int fd ) { 2032528: 9d e3 bf 40 save %sp, -192, %sp st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); 203252c: 03 00 81 76 sethi %hi(0x205d800), %g1 2032530: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 ! 205db3c int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 2032534: c0 27 bf c4 clr [ %fp + -60 ] st.st_uid = 0; 2032538: c0 37 bf ca clrh [ %fp + -54 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 203253c: 80 a6 00 01 cmp %i0, %g1 2032540: 1a 80 00 0c bcc 2032570 2032544: c0 37 bf cc clrh [ %fp + -52 ] iop = rtems_libio_iop( fd ); 2032548: 83 2e 20 03 sll %i0, 3, %g1 203254c: b1 2e 20 06 sll %i0, 6, %i0 2032550: b0 26 00 01 sub %i0, %g1, %i0 2032554: 03 00 81 87 sethi %hi(0x2061c00), %g1 2032558: fa 00 61 c0 ld [ %g1 + 0x1c0 ], %i5 ! 2061dc0 203255c: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 2032560: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2032564: 80 88 61 00 btst 0x100, %g1 2032568: 32 80 00 08 bne,a 2032588 203256c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 2032570: 40 00 10 83 call 203677c <__errno> 2032574: b0 10 3f ff mov -1, %i0 2032578: 82 10 20 09 mov 9, %g1 203257c: c2 22 00 00 st %g1, [ %o0 ] 2032580: 81 c7 e0 08 ret 2032584: 81 e8 00 00 restore const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 2032588: c2 02 20 0c ld [ %o0 + 0xc ], %g1 203258c: c2 00 40 00 ld [ %g1 ], %g1 2032590: 9f c0 40 00 call %g1 2032594: b8 07 60 14 add %i5, 0x14, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 2032598: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 203259c: 90 10 00 1c mov %i4, %o0 20325a0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 20325a4: 9f c0 40 00 call %g1 20325a8: 92 07 bf b8 add %fp, -72, %o1 if ( rv == 0 ) { 20325ac: b0 92 20 00 orcc %o0, 0, %i0 20325b0: 32 80 00 13 bne,a 20325fc <== NEVER TAKEN 20325b4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED bool access_ok = rtems_filesystem_check_access( 20325b8: d2 07 bf c4 ld [ %fp + -60 ], %o1 20325bc: d4 17 bf ca lduh [ %fp + -54 ], %o2 20325c0: d6 17 bf cc lduh [ %fp + -52 ], %o3 20325c4: 7f ff 6f 85 call 200e3d8 20325c8: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 20325cc: 80 8a 20 ff btst 0xff, %o0 20325d0: 02 80 00 06 be 20325e8 20325d4: 90 07 bf a0 add %fp, -96, %o0 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 20325d8: 7f ff 6e 40 call 200ded8 20325dc: 92 10 00 1c mov %i4, %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 20325e0: 10 80 00 07 b 20325fc 20325e4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 } else { errno = EACCES; 20325e8: 40 00 10 65 call 203677c <__errno> 20325ec: b0 10 3f ff mov -1, %i0 20325f0: 82 10 20 0d mov 0xd, %g1 20325f4: c2 22 00 00 st %g1, [ %o0 ] 20325f8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 20325fc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2032600: c2 00 60 04 ld [ %g1 + 4 ], %g1 2032604: 9f c0 40 00 call %g1 2032608: 01 00 00 00 nop rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 203260c: 80 a6 20 00 cmp %i0, 0 2032610: 12 80 00 05 bne 2032624 2032614: 01 00 00 00 nop rv = rtems_filesystem_chdir( &loc ); 2032618: 7f ff c4 32 call 20236e0 203261c: 90 07 bf a0 add %fp, -96, %o0 2032620: b0 10 00 08 mov %o0, %i0 } return rv; } 2032624: 81 c7 e0 08 ret 2032628: 81 e8 00 00 restore =============================================================================== 020239c8 : #include #include int fchmod( int fd, mode_t mode ) { 20239c8: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20239cc: 03 00 81 76 sethi %hi(0x205d800), %g1 20239d0: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 ! 205db3c 20239d4: 80 a6 00 01 cmp %i0, %g1 20239d8: 2a 80 00 03 bcs,a 20239e4 20239dc: 83 2e 20 03 sll %i0, 3, %g1 20239e0: 30 80 00 0a b,a 2023a08 iop = rtems_libio_iop( fd ); 20239e4: b1 2e 20 06 sll %i0, 6, %i0 20239e8: b0 26 00 01 sub %i0, %g1, %i0 20239ec: 03 00 81 87 sethi %hi(0x2061c00), %g1 20239f0: fa 00 61 c0 ld [ %g1 + 0x1c0 ], %i5 ! 2061dc0 20239f4: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 20239f8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20239fc: 80 88 61 00 btst 0x100, %g1 2023a00: 32 80 00 06 bne,a 2023a18 2023a04: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 2023a08: 40 00 4b 5d call 203677c <__errno> 2023a0c: 01 00 00 00 nop 2023a10: 10 80 00 1b b 2023a7c 2023a14: 82 10 20 09 mov 9, %g1 ! 9 if (iop->pathinfo.mt_entry->writeable) { 2023a18: c2 0a 20 29 ldub [ %o0 + 0x29 ], %g1 2023a1c: 80 a0 60 00 cmp %g1, 0 2023a20: 02 80 00 14 be 2023a70 <== NEVER TAKEN 2023a24: 01 00 00 00 nop const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 2023a28: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023a2c: c2 00 40 00 ld [ %g1 ], %g1 2023a30: 9f c0 40 00 call %g1 2023a34: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 2023a38: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2023a3c: 90 07 60 14 add %i5, 0x14, %o0 2023a40: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2023a44: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 2023a48: 9f c0 40 00 call %g1 2023a4c: 92 10 00 19 mov %i1, %o1 2023a50: b0 10 00 08 mov %o0, %i0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 2023a54: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 2023a58: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023a5c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2023a60: 9f c0 40 00 call %g1 2023a64: 01 00 00 00 nop 2023a68: 81 c7 e0 08 ret 2023a6c: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 2023a70: 40 00 4b 43 call 203677c <__errno> <== NOT EXECUTED 2023a74: 01 00 00 00 nop <== NOT EXECUTED 2023a78: 82 10 20 1e mov 0x1e, %g1 ! 1e <== NOT EXECUTED 2023a7c: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2023a80: 81 c7 e0 08 ret 2023a84: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02023a88 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 2023a88: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2023a8c: 03 00 81 76 sethi %hi(0x205d800), %g1 2023a90: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 ! 205db3c 2023a94: 80 a6 00 01 cmp %i0, %g1 2023a98: 2a 80 00 03 bcs,a 2023aa4 2023a9c: 83 2e 20 03 sll %i0, 3, %g1 2023aa0: 30 80 00 0a b,a 2023ac8 iop = rtems_libio_iop( fd ); 2023aa4: b1 2e 20 06 sll %i0, 6, %i0 2023aa8: b0 26 00 01 sub %i0, %g1, %i0 2023aac: 03 00 81 87 sethi %hi(0x2061c00), %g1 2023ab0: fa 00 61 c0 ld [ %g1 + 0x1c0 ], %i5 ! 2061dc0 2023ab4: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2023ab8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2023abc: 80 88 61 00 btst 0x100, %g1 2023ac0: 32 80 00 06 bne,a 2023ad8 2023ac4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 2023ac8: 40 00 4b 2d call 203677c <__errno> 2023acc: 01 00 00 00 nop 2023ad0: 10 80 00 1c b 2023b40 2023ad4: 82 10 20 09 mov 9, %g1 ! 9 if (iop->pathinfo.mt_entry->writeable) { 2023ad8: c2 0a 20 29 ldub [ %o0 + 0x29 ], %g1 2023adc: 80 a0 60 00 cmp %g1, 0 2023ae0: 02 80 00 15 be 2023b34 <== NEVER TAKEN 2023ae4: 01 00 00 00 nop const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 2023ae8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023aec: c2 00 40 00 ld [ %g1 ], %g1 2023af0: 9f c0 40 00 call %g1 2023af4: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 2023af8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2023afc: 90 07 60 14 add %i5, 0x14, %o0 2023b00: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2023b04: 92 10 00 19 mov %i1, %o1 2023b08: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2023b0c: 9f c0 40 00 call %g1 2023b10: 94 10 00 1a mov %i2, %o2 2023b14: b0 10 00 08 mov %o0, %i0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 2023b18: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 2023b1c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023b20: c2 00 60 04 ld [ %g1 + 4 ], %g1 2023b24: 9f c0 40 00 call %g1 2023b28: 01 00 00 00 nop 2023b2c: 81 c7 e0 08 ret 2023b30: 81 e8 00 00 restore owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 2023b34: 40 00 4b 12 call 203677c <__errno> <== NOT EXECUTED 2023b38: 01 00 00 00 nop <== NOT EXECUTED 2023b3c: 82 10 20 1e mov 0x1e, %g1 ! 1e <== NOT EXECUTED 2023b40: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2023b44: 81 c7 e0 08 ret 2023b48: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0202f908 : int fcntl( int fd, int cmd, ... ) { 202f908: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202f90c: 05 00 80 d7 sethi %hi(0x2035c00), %g2 202f910: c4 00 a2 f8 ld [ %g2 + 0x2f8 ], %g2 ! 2035ef8 ... ) { int ret; va_list ap; va_start( ap, cmd ); 202f914: 82 07 a0 4c add %fp, 0x4c, %g1 202f918: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 202f91c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 202f920: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 202f924: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202f928: 80 a6 00 02 cmp %i0, %g2 202f92c: 1a 80 00 0c bcc 202f95c 202f930: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 202f934: 85 2e 20 03 sll %i0, 3, %g2 202f938: b1 2e 20 06 sll %i0, 6, %i0 202f93c: b0 26 00 02 sub %i0, %g2, %i0 202f940: 05 00 81 1a sethi %hi(0x2046800), %g2 202f944: fa 00 a3 74 ld [ %g2 + 0x374 ], %i5 ! 2046b74 202f948: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202f94c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 202f950: 80 8a 21 00 btst 0x100, %o0 202f954: 12 80 00 06 bne 202f96c 202f958: 80 a6 60 09 cmp %i1, 9 202f95c: 7f ff c4 98 call 2020bbc <__errno> 202f960: 01 00 00 00 nop 202f964: 10 80 00 5d b 202fad8 202f968: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 202f96c: 18 80 00 58 bgu 202facc 202f970: 85 2e 60 02 sll %i1, 2, %g2 202f974: 07 00 80 be sethi %hi(0x202f800), %g3 202f978: 86 10 e0 e0 or %g3, 0xe0, %g3 ! 202f8e0 <_calloc_r+0x14> 202f97c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 202f980: 81 c0 80 00 jmp %g2 202f984: 01 00 00 00 nop /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 202f988: 7f ff 63 20 call 2008608 202f98c: 01 00 00 00 nop if (diop != NULL) { 202f990: b8 92 20 00 orcc %o0, 0, %i4 202f994: 02 80 00 62 be 202fb1c 202f998: b0 10 3f ff mov -1, %i0 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 202f99c: 7f ff 63 05 call 20085b0 202f9a0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 202f9a4: f4 07 20 10 ld [ %i4 + 0x10 ], %i2 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 202f9a8: b6 0a 3d ff and %o0, -513, %i3 diop->flags |= rtems_libio_fcntl_flags( oflag ); 202f9ac: 7f ff 62 f4 call 200857c 202f9b0: 90 10 00 1b mov %i3, %o0 202f9b4: 90 12 00 1a or %o0, %i2, %o0 202f9b8: d0 27 20 10 st %o0, [ %i4 + 0x10 ] static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 202f9bc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 202f9c0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 202f9c4: c2 00 40 00 ld [ %g1 ], %g1 202f9c8: 9f c0 40 00 call %g1 202f9cc: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 202f9d0: 92 07 60 14 add %i5, 0x14, %o1 202f9d4: 7f ff 9c e6 call 2016d6c 202f9d8: 90 07 20 14 add %i4, 0x14, %o0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 202f9dc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 202f9e0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 202f9e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 202f9e8: 9f c0 40 00 call %g1 202f9ec: 01 00 00 00 nop /* * XXX: We call the open handler here to have a proper open and close pair. * * FIXME: What to do with the path? */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); 202f9f0: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 202f9f4: 90 10 00 1c mov %i4, %o0 202f9f8: c2 00 40 00 ld [ %g1 ], %g1 202f9fc: 92 10 20 00 clr %o1 202fa00: 94 10 00 1b mov %i3, %o2 202fa04: 9f c0 40 00 call %g1 202fa08: 96 10 20 00 clr %o3 if ( rv == 0 ) { 202fa0c: b0 92 20 00 orcc %o0, 0, %i0 202fa10: 12 80 00 11 bne 202fa54 <== NEVER TAKEN 202fa14: 03 00 81 1a sethi %hi(0x2046800), %g1 rv = diop - rtems_libio_iops; 202fa18: f0 00 63 74 ld [ %g1 + 0x374 ], %i0 ! 2046b74 202fa1c: b8 27 00 18 sub %i4, %i0, %i4 202fa20: b9 3f 20 03 sra %i4, 3, %i4 202fa24: 85 2f 20 03 sll %i4, 3, %g2 202fa28: 83 2f 20 06 sll %i4, 6, %g1 202fa2c: 82 00 80 01 add %g2, %g1, %g1 202fa30: 85 28 60 06 sll %g1, 6, %g2 202fa34: 82 00 40 02 add %g1, %g2, %g1 202fa38: 82 00 40 1c add %g1, %i4, %g1 202fa3c: b1 28 60 0f sll %g1, 0xf, %i0 202fa40: 82 00 40 18 add %g1, %i0, %g1 202fa44: 83 28 60 03 sll %g1, 3, %g1 202fa48: b8 00 40 1c add %g1, %i4, %i4 202fa4c: 10 80 00 25 b 202fae0 202fa50: b0 20 00 1c neg %i4, %i0 } else { rtems_libio_free( diop ); 202fa54: 7f ff 63 04 call 2008664 <== NOT EXECUTED 202fa58: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 202fa5c: 10 80 00 22 b 202fae4 <== NOT EXECUTED 202fa60: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 202fa64: b1 32 20 0b srl %o0, 0xb, %i0 202fa68: 10 80 00 21 b 202faec 202fa6c: 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 ) ) 202fa70: c2 00 40 00 ld [ %g1 ], %g1 202fa74: 80 a0 60 00 cmp %g1, 0 202fa78: 22 80 00 0e be,a 202fab0 202fa7c: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 202fa80: 10 80 00 0c b 202fab0 202fa84: 90 12 28 00 or %o0, 0x800, %o0 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 202fa88: 7f ff 62 ca call 20085b0 202fa8c: 01 00 00 00 nop 202fa90: 10 80 00 14 b 202fae0 202fa94: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 202fa98: 7f ff 62 b9 call 200857c 202fa9c: d0 00 40 00 ld [ %g1 ], %o0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 202faa0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 202faa4: 90 0a 22 01 and %o0, 0x201, %o0 202faa8: 82 08 7d fe and %g1, -514, %g1 202faac: 90 12 00 01 or %o0, %g1, %o0 202fab0: d0 27 60 10 st %o0, [ %i5 + 0x10 ] { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 202fab4: 10 80 00 0e b 202faec 202fab8: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 202fabc: 7f ff c4 40 call 2020bbc <__errno> 202fac0: 01 00 00 00 nop 202fac4: 10 80 00 05 b 202fad8 202fac8: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 202facc: 7f ff c4 3c call 2020bbc <__errno> 202fad0: 01 00 00 00 nop 202fad4: 82 10 20 16 mov 0x16, %g1 ! 16 202fad8: 10 80 00 10 b 202fb18 202fadc: c2 22 00 00 st %g1, [ %o0 ] /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 202fae0: 80 a6 20 00 cmp %i0, 0 202fae4: 06 80 00 0e bl 202fb1c <== NEVER TAKEN 202fae8: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 202faec: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 202faf0: 90 10 00 1d mov %i5, %o0 202faf4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 202faf8: 9f c0 40 00 call %g1 202fafc: 92 10 00 19 mov %i1, %o1 if (err) { 202fb00: ba 92 20 00 orcc %o0, 0, %i5 202fb04: 02 80 00 06 be 202fb1c <== ALWAYS TAKEN 202fb08: 01 00 00 00 nop errno = err; 202fb0c: 7f ff c4 2c call 2020bbc <__errno> <== NOT EXECUTED 202fb10: 01 00 00 00 nop <== NOT EXECUTED 202fb14: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202fb18: b0 10 3f ff mov -1, %i0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 202fb1c: 81 c7 e0 08 ret 202fb20: 81 e8 00 00 restore =============================================================================== 0200de3c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200de3c: 9d e3 bf 98 save %sp, -104, %sp static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200de40: 3b 00 80 8d sethi %hi(0x2023400), %i5 200de44: c2 07 61 80 ld [ %i5 + 0x180 ], %g1 ! 2023580 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200de48: b6 10 00 18 mov %i0, %i3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200de4c: 80 a0 60 00 cmp %g1, 0 200de50: 02 80 00 0c be 200de80 200de54: b8 17 61 80 or %i5, 0x180, %i4 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200de58: 03 00 80 8d sethi %hi(0x2023400), %g1 200de5c: d0 00 61 80 ld [ %g1 + 0x180 ], %o0 ! 2023580 200de60: 92 10 20 00 clr %o1 200de64: 7f ff ec cb call 2009190 200de68: 94 10 20 00 clr %o2 } if (sc == RTEMS_SUCCESSFUL) { 200de6c: 80 a2 20 00 cmp %o0, 0 200de70: 22 80 01 00 be,a 200e270 <== ALWAYS TAKEN 200de74: fa 06 c0 00 ld [ %i3 ], %i5 return 0; } else { return -ENOMEM; 200de78: 81 c7 e0 08 ret <== NOT EXECUTED 200de7c: 91 e8 3f f4 restore %g0, -12, %o0 <== NOT EXECUTED */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200de80: 03 00 80 8d sethi %hi(0x2023400), %g1 200de84: d0 00 63 ec ld [ %g1 + 0x3ec ], %o0 ! 20237ec 200de88: 92 10 20 00 clr %o1 200de8c: 7f ff ec c1 call 2009190 200de90: 94 10 20 00 clr %o2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200de94: c2 07 61 80 ld [ %i5 + 0x180 ], %g1 200de98: 80 a0 60 00 cmp %g1, 0 200de9c: 12 80 00 0a bne 200dec4 <== NEVER TAKEN 200dea0: ba 10 20 00 clr %i5 sc = rtems_semaphore_create( 200dea4: 11 14 12 54 sethi %hi(0x50495000), %o0 200dea8: 92 10 20 01 mov 1, %o1 200deac: 90 12 20 45 or %o0, 0x45, %o0 200deb0: 94 10 20 54 mov 0x54, %o2 200deb4: 96 10 20 00 clr %o3 200deb8: 7f ff ec 18 call 2008f18 200debc: 98 10 00 1c mov %i4, %o4 200dec0: ba 10 00 08 mov %o0, %i5 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200dec4: 03 00 80 8d sethi %hi(0x2023400), %g1 200dec8: 7f ff ec fc call 20092b8 200decc: d0 00 63 ec ld [ %g1 + 0x3ec ], %o0 ! 20237ec } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ded0: 80 a7 60 00 cmp %i5, 0 200ded4: 02 bf ff e1 be 200de58 200ded8: b0 10 3f f4 mov -12, %i0 200dedc: 81 c7 e0 08 ret 200dee0: 81 e8 00 00 restore { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200dee4: 7f ff dc 08 call 2004f04 200dee8: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200deec: ba 92 20 00 orcc %o0, 0, %i5 200def0: 02 80 00 e4 be 200e280 <== NEVER TAKEN 200def4: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200def8: 40 00 13 47 call 2012c14 200defc: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200df00: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200df04: 90 10 22 00 mov 0x200, %o0 200df08: 7f ff db ff call 2004f04 200df0c: c2 27 60 04 st %g1, [ %i5 + 4 ] if (! pipe->Buffer) 200df10: 80 a2 20 00 cmp %o0, 0 200df14: 02 80 00 40 be 200e014 <== NEVER TAKEN 200df18: d0 27 40 00 st %o0, [ %i5 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200df1c: 39 00 80 8b sethi %hi(0x2022c00), %i4 200df20: d0 4f 22 30 ldsb [ %i4 + 0x230 ], %o0 ! 2022e30 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200df24: 35 14 12 5c sethi %hi(0x50497000), %i2 200df28: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200df2c: 92 10 20 00 clr %o1 200df30: 90 12 00 01 or %o0, %g1, %o0 200df34: 94 10 20 00 clr %o2 200df38: 40 00 05 ea call 200f6e0 200df3c: 96 07 60 2c add %i5, 0x2c, %o3 200df40: 80 a2 20 00 cmp %o0, 0 200df44: 12 80 00 32 bne 200e00c 200df48: d0 4f 22 30 ldsb [ %i4 + 0x230 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200df4c: 03 14 12 5d sethi %hi(0x50497400), %g1 200df50: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200df54: 92 10 20 00 clr %o1 200df58: 90 12 00 01 or %o0, %g1, %o0 200df5c: 94 10 20 00 clr %o2 200df60: 40 00 05 e0 call 200f6e0 200df64: 96 07 60 30 add %i5, 0x30, %o3 200df68: 80 a2 20 00 cmp %o0, 0 200df6c: 12 80 00 26 bne 200e004 200df70: d0 4f 22 30 ldsb [ %i4 + 0x230 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200df74: b4 16 a3 00 or %i2, 0x300, %i2 200df78: 92 10 20 01 mov 1, %o1 200df7c: 90 12 00 1a or %o0, %i2, %o0 200df80: 94 10 20 10 mov 0x10, %o2 200df84: 96 10 20 00 clr %o3 200df88: 7f ff eb e4 call 2008f18 200df8c: 98 07 60 28 add %i5, 0x28, %o4 200df90: 80 a2 20 00 cmp %o0, 0 200df94: 12 80 00 1a bne 200dffc 200df98: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200df9c: d2 07 60 2c ld [ %i5 + 0x2c ], %o1 200dfa0: 31 00 80 90 sethi %hi(0x2024000), %i0 200dfa4: 7f ff f2 e9 call 200ab48 <_Objects_Get> 200dfa8: 90 16 22 b0 or %i0, 0x2b0, %o0 ! 20242b0 <_Barrier_Information> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200dfac: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200dfb0: 35 04 00 00 sethi %hi(0x10000000), %i2 200dfb4: 82 10 40 1a or %g1, %i2, %g1 _Thread_Enable_dispatch(); 200dfb8: 7f ff f6 90 call 200b9f8 <_Thread_Enable_dispatch> 200dfbc: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200dfc0: d2 07 60 30 ld [ %i5 + 0x30 ], %o1 200dfc4: 94 07 bf fc add %fp, -4, %o2 200dfc8: 7f ff f2 e0 call 200ab48 <_Objects_Get> 200dfcc: 90 16 22 b0 or %i0, 0x2b0, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200dfd0: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200dfd4: b4 10 40 1a or %g1, %i2, %i2 _Thread_Enable_dispatch(); 200dfd8: 7f ff f6 88 call 200b9f8 <_Thread_Enable_dispatch> 200dfdc: f4 22 20 4c st %i2, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200dfe0: c2 0f 22 30 ldub [ %i4 + 0x230 ], %g1 200dfe4: c4 4f 22 30 ldsb [ %i4 + 0x230 ], %g2 200dfe8: 80 a0 a0 7a cmp %g2, 0x7a 200dfec: 12 80 00 a7 bne 200e288 200dff0: 82 00 60 01 inc %g1 c = 'a'; 200dff4: 10 80 00 a5 b 200e288 200dff8: 82 10 20 61 mov 0x61, %g1 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200dffc: 40 00 05 e9 call 200f7a0 200e000: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200e004: 40 00 05 e7 call 200f7a0 200e008: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200e00c: 7f ff da 95 call 2004a60 200e010: d0 07 40 00 ld [ %i5 ], %o0 err_buf: free(pipe); 200e014: 7f ff da 93 call 2004a60 200e018: 90 10 00 1d mov %i5, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200e01c: 10 80 00 13 b 200e068 200e020: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e024: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e028: 92 10 20 00 clr %o1 200e02c: 7f ff ec 59 call 2009190 200e030: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200e034: c2 06 c0 00 ld [ %i3 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e038: 80 a0 00 08 cmp %g0, %o0 200e03c: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200e040: 80 a0 60 00 cmp %g1, 0 200e044: 12 80 00 09 bne 200e068 200e048: b0 0e 3f fc and %i0, -4, %i0 if (err) 200e04c: 80 a6 20 00 cmp %i0, 0 200e050: 22 80 00 06 be,a 200e068 <== ALWAYS TAKEN 200e054: fa 26 c0 00 st %i5, [ %i3 ] pipe_free(pipe); 200e058: 7f ff ff 41 call 200dd5c <== NOT EXECUTED 200e05c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200e060: 10 80 00 03 b 200e06c <== NOT EXECUTED 200e064: 03 00 80 8d sethi %hi(0x2023400), %g1 <== NOT EXECUTED 200e068: 03 00 80 8d sethi %hi(0x2023400), %g1 200e06c: 7f ff ec 93 call 20092b8 200e070: d0 00 61 80 ld [ %g1 + 0x180 ], %o0 ! 2023580 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200e074: 80 a6 20 00 cmp %i0, 0 200e078: 12 80 00 86 bne 200e290 200e07c: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200e080: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200e084: 82 08 60 06 and %g1, 6, %g1 200e088: 80 a0 60 04 cmp %g1, 4 200e08c: 02 80 00 2e be 200e144 200e090: fa 06 c0 00 ld [ %i3 ], %i5 200e094: 80 a0 60 06 cmp %g1, 6 200e098: 02 80 00 56 be 200e1f0 200e09c: 80 a0 60 02 cmp %g1, 2 200e0a0: 12 80 00 6a bne 200e248 <== NEVER TAKEN 200e0a4: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200e0a8: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200e0ac: 82 00 60 01 inc %g1 200e0b0: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (pipe->Readers ++ == 0) 200e0b4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200e0b8: 84 00 60 01 add %g1, 1, %g2 200e0bc: 80 a0 60 00 cmp %g1, 0 200e0c0: 12 80 00 05 bne 200e0d4 <== NEVER TAKEN 200e0c4: c4 27 60 10 st %g2, [ %i5 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200e0c8: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200e0cc: 40 00 05 de call 200f844 200e0d0: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200e0d4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200e0d8: 80 a0 60 00 cmp %g1, 0 200e0dc: 12 80 00 5b bne 200e248 200e0e0: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200e0e4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200e0e8: 80 88 60 01 btst 1, %g1 200e0ec: 12 80 00 57 bne 200e248 200e0f0: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200e0f4: f8 07 60 24 ld [ %i5 + 0x24 ], %i4 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200e0f8: 7f ff ec 70 call 20092b8 200e0fc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200e100: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e104: 40 00 05 e6 call 200f89c 200e108: 92 10 20 00 clr %o1 200e10c: 80 a2 20 00 cmp %o0, 0 200e110: 12 80 00 52 bne 200e258 <== NEVER TAKEN 200e114: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200e118: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e11c: 7f ff ec 1d call 2009190 200e120: 94 10 20 00 clr %o2 200e124: 80 a2 20 00 cmp %o0, 0 200e128: 32 80 00 4d bne,a 200e25c <== NEVER TAKEN 200e12c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200e130: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200e134: 80 a7 00 01 cmp %i4, %g1 200e138: 02 bf ff f0 be 200e0f8 <== NEVER TAKEN 200e13c: 01 00 00 00 nop 200e140: 30 80 00 42 b,a 200e248 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200e144: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200e148: 82 00 60 01 inc %g1 200e14c: c2 27 60 24 st %g1, [ %i5 + 0x24 ] if (pipe->Writers ++ == 0) 200e150: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200e154: 84 00 60 01 add %g1, 1, %g2 200e158: 80 a0 60 00 cmp %g1, 0 200e15c: 12 80 00 05 bne 200e170 <== NEVER TAKEN 200e160: c4 27 60 14 st %g2, [ %i5 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200e164: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e168: 40 00 05 b7 call 200f844 200e16c: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200e170: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200e174: 80 a0 60 00 cmp %g1, 0 200e178: 12 80 00 34 bne 200e248 200e17c: 01 00 00 00 nop 200e180: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200e184: 80 88 60 01 btst 1, %g1 200e188: 22 80 00 07 be,a 200e1a4 200e18c: f8 07 60 20 ld [ %i5 + 0x20 ], %i4 PIPE_UNLOCK(pipe); 200e190: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e194: 7f ff ec 49 call 20092b8 200e198: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200e19c: 10 80 00 31 b 200e260 200e1a0: 90 10 00 1b mov %i3, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200e1a4: 7f ff ec 45 call 20092b8 200e1a8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200e1ac: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200e1b0: 40 00 05 bb call 200f89c 200e1b4: 92 10 20 00 clr %o1 200e1b8: 80 a2 20 00 cmp %o0, 0 200e1bc: 12 80 00 27 bne 200e258 <== NEVER TAKEN 200e1c0: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200e1c4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e1c8: 7f ff eb f2 call 2009190 200e1cc: 94 10 20 00 clr %o2 200e1d0: 80 a2 20 00 cmp %o0, 0 200e1d4: 32 80 00 22 bne,a 200e25c <== NEVER TAKEN 200e1d8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200e1dc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200e1e0: 80 a7 00 01 cmp %i4, %g1 200e1e4: 02 bf ff f0 be 200e1a4 <== NEVER TAKEN 200e1e8: 01 00 00 00 nop 200e1ec: 30 80 00 17 b,a 200e248 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200e1f0: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200e1f4: 82 00 60 01 inc %g1 200e1f8: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (pipe->Readers ++ == 0) 200e1fc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200e200: 84 00 60 01 add %g1, 1, %g2 200e204: 80 a0 60 00 cmp %g1, 0 200e208: 12 80 00 05 bne 200e21c <== NEVER TAKEN 200e20c: c4 27 60 10 st %g2, [ %i5 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200e210: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200e214: 40 00 05 8c call 200f844 200e218: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; 200e21c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200e220: 82 00 60 01 inc %g1 200e224: c2 27 60 24 st %g1, [ %i5 + 0x24 ] if (pipe->Writers ++ == 0) 200e228: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200e22c: 84 00 60 01 add %g1, 1, %g2 200e230: 80 a0 60 00 cmp %g1, 0 200e234: 12 80 00 05 bne 200e248 <== NEVER TAKEN 200e238: c4 27 60 14 st %g2, [ %i5 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200e23c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e240: 40 00 05 81 call 200f844 200e244: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200e248: 7f ff ec 1c call 20092b8 200e24c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 return 0; 200e250: 81 c7 e0 08 ret 200e254: 81 e8 00 00 restore /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 200e258: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200e25c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200e260: 7f ff fe ca call 200dd88 200e264: 92 10 00 19 mov %i1, %o1 return err; 200e268: 81 c7 e0 08 ret 200e26c: 81 e8 00 00 restore err = pipe_lock(); if (err) return err; pipe = *pipep; if (pipe == NULL) { 200e270: 80 a7 60 00 cmp %i5, 0 200e274: 32 bf ff 6d bne,a 200e028 200e278: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e27c: 30 bf ff 1a b,a 200dee4 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200e280: 10 bf ff 7a b 200e068 <== NOT EXECUTED 200e284: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200e288: 10 bf ff 67 b 200e024 200e28c: c2 2f 22 30 stb %g1, [ %i4 + 0x230 ] return 0; out_error: pipe_release(pipep, iop); return err; } 200e290: 81 c7 e0 08 ret 200e294: 81 e8 00 00 restore =============================================================================== 020099d0 : long fpathconf( int fd, int name ) { 20099d0: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 20099d4: 03 00 80 49 sethi %hi(0x2012400), %g1 20099d8: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 20127f4 20099dc: 80 a6 00 01 cmp %i0, %g1 20099e0: 2a 80 00 03 bcs,a 20099ec <== NEVER TAKEN 20099e4: 83 2e 20 03 sll %i0, 3, %g1 <== NOT EXECUTED 20099e8: 30 80 00 0a b,a 2009a10 iop = rtems_libio_iop(fd); 20099ec: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED 20099f0: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 20099f4: 03 00 80 4c sethi %hi(0x2013000), %g1 <== NOT EXECUTED 20099f8: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1 ! 20130e4 <== NOT EXECUTED 20099fc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2009a00: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2009a04: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2009a08: 32 80 00 06 bne,a 2009a20 <== NOT EXECUTED 2009a0c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 <== NOT EXECUTED 2009a10: 40 00 09 29 call 200beb4 <__errno> 2009a14: 01 00 00 00 nop 2009a18: 10 80 00 32 b 2009ae0 2009a1c: 82 10 20 09 mov 9, %g1 ! 9 * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009a20: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED 2009a24: 18 80 00 2c bgu 2009ad4 <== NOT EXECUTED 2009a28: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 <== NOT EXECUTED 2009a2c: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 2009a30: 05 00 80 26 sethi %hi(0x2009800), %g2 <== NOT EXECUTED 2009a34: 84 10 a1 a0 or %g2, 0x1a0, %g2 ! 20099a0 <_close_r+0x10> <== NOT EXECUTED 2009a38: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED 2009a3c: 81 c0 80 00 jmp %g2 <== NOT EXECUTED 2009a40: 01 00 00 00 nop <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 2009a44: f0 00 40 00 ld [ %g1 ], %i0 <== NOT EXECUTED break; 2009a48: 81 c7 e0 08 ret <== NOT EXECUTED 2009a4c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_CANON: return_value = the_limits->max_canon; 2009a50: f0 00 60 04 ld [ %g1 + 4 ], %i0 <== NOT EXECUTED break; 2009a54: 81 c7 e0 08 ret <== NOT EXECUTED 2009a58: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_INPUT: return_value = the_limits->max_input; 2009a5c: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED break; 2009a60: 81 c7 e0 08 ret <== NOT EXECUTED 2009a64: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NAME_MAX: return_value = the_limits->name_max; 2009a68: f0 00 60 0c ld [ %g1 + 0xc ], %i0 <== NOT EXECUTED break; 2009a6c: 81 c7 e0 08 ret <== NOT EXECUTED 2009a70: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PATH_MAX: return_value = the_limits->path_max; 2009a74: f0 00 60 10 ld [ %g1 + 0x10 ], %i0 <== NOT EXECUTED break; 2009a78: 81 c7 e0 08 ret <== NOT EXECUTED 2009a7c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2009a80: f0 00 60 14 ld [ %g1 + 0x14 ], %i0 <== NOT EXECUTED break; 2009a84: 81 c7 e0 08 ret <== NOT EXECUTED 2009a88: 81 e8 00 00 restore <== NOT EXECUTED case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2009a8c: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 <== NOT EXECUTED break; 2009a90: 81 c7 e0 08 ret <== NOT EXECUTED 2009a94: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2009a98: f0 00 60 20 ld [ %g1 + 0x20 ], %i0 <== NOT EXECUTED break; 2009a9c: 81 c7 e0 08 ret <== NOT EXECUTED 2009aa0: 81 e8 00 00 restore <== NOT EXECUTED case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009aa4: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED break; 2009aa8: 81 c7 e0 08 ret <== NOT EXECUTED 2009aac: 81 e8 00 00 restore <== NOT EXECUTED case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2009ab0: f0 00 60 18 ld [ %g1 + 0x18 ], %i0 <== NOT EXECUTED break; 2009ab4: 81 c7 e0 08 ret <== NOT EXECUTED 2009ab8: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2009abc: f0 00 60 24 ld [ %g1 + 0x24 ], %i0 <== NOT EXECUTED break; 2009ac0: 81 c7 e0 08 ret <== NOT EXECUTED 2009ac4: 81 e8 00 00 restore <== NOT EXECUTED case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2009ac8: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED break; 2009acc: 81 c7 e0 08 ret <== NOT EXECUTED 2009ad0: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 2009ad4: 40 00 08 f8 call 200beb4 <__errno> <== NOT EXECUTED 2009ad8: 01 00 00 00 nop <== NOT EXECUTED 2009adc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2009ae0: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2009ae4: 81 c7 e0 08 ret 2009ae8: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 020037dc : #include void free( void *ptr ) { 20037dc: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 20037e0: 03 00 80 76 sethi %hi(0x201d800), %g1 20037e4: 82 10 61 68 or %g1, 0x168, %g1 ! 201d968 20037e8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 20037ec: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 20037f0: 84 00 a0 01 inc %g2 if ( !ptr ) 20037f4: 80 a6 20 00 cmp %i0, 0 20037f8: 02 80 00 21 be 200387c 20037fc: c4 20 60 0c st %g2, [ %g1 + 0xc ] return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 2003800: 03 00 80 77 sethi %hi(0x201dc00), %g1 2003804: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 201dc30 <_System_state_Current> 2003808: 80 a0 60 03 cmp %g1, 3 200380c: 12 80 00 09 bne 2003830 <== NEVER TAKEN 2003810: 03 00 80 75 sethi %hi(0x201d400), %g1 !malloc_is_system_state_OK() ) { 2003814: 40 00 00 7c call 2003a04 2003818: 01 00 00 00 nop return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 200381c: 80 8a 20 ff btst 0xff, %o0 2003820: 12 80 00 04 bne 2003830 2003824: 03 00 80 75 sethi %hi(0x201d400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 2003828: 40 00 00 97 call 2003a84 200382c: 81 e8 00 00 restore } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003830: c2 00 61 a4 ld [ %g1 + 0x1a4 ], %g1 2003834: 80 a0 60 00 cmp %g1, 0 2003838: 02 80 00 06 be 2003850 200383c: 3b 00 80 73 sethi %hi(0x201cc00), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003840: c2 00 60 08 ld [ %g1 + 8 ], %g1 2003844: 9f c0 40 00 call %g1 2003848: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 200384c: 3b 00 80 73 sethi %hi(0x201cc00), %i5 2003850: d0 07 61 ec ld [ %i5 + 0x1ec ], %o0 ! 201cdec 2003854: 40 00 17 53 call 20095a0 <_Protected_heap_Free> 2003858: 92 10 00 19 mov %i1, %o1 200385c: 80 8a 20 ff btst 0xff, %o0 2003860: 12 80 00 07 bne 200387c 2003864: c2 07 61 ec ld [ %i5 + 0x1ec ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 2003868: 31 00 80 6d sethi %hi(0x201b400), %i0 200386c: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2003870: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2003874: 40 00 03 7e call 200466c 2003878: 91 ee 22 e0 restore %i0, 0x2e0, %o0 200387c: 81 c7 e0 08 ret 2003880: 81 e8 00 00 restore =============================================================================== 0201a03c : int fstat( int fd, struct stat *sbuf ) { 201a03c: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 201a040: 80 a6 60 00 cmp %i1, 0 201a044: 32 80 00 06 bne,a 201a05c <== ALWAYS TAKEN 201a048: 03 00 80 73 sethi %hi(0x201cc00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 201a04c: 7f ff d6 73 call 200fa18 <__errno> <== NOT EXECUTED 201a050: 01 00 00 00 nop <== NOT EXECUTED 201a054: 10 80 00 12 b 201a09c <== NOT EXECUTED 201a058: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 201a05c: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 201a060: 80 a6 00 01 cmp %i0, %g1 201a064: 1a 80 00 0b bcc 201a090 201a068: 83 2e 20 03 sll %i0, 3, %g1 201a06c: b1 2e 20 06 sll %i0, 6, %i0 201a070: b0 26 00 01 sub %i0, %g1, %i0 201a074: 03 00 80 76 sethi %hi(0x201d800), %g1 201a078: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 ! 201d950 201a07c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 201a080: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201a084: 80 88 61 00 btst 0x100, %g1 201a088: 12 80 00 08 bne 201a0a8 201a08c: 94 10 20 48 mov 0x48, %o2 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 201a090: 7f ff d6 62 call 200fa18 <__errno> 201a094: 01 00 00 00 nop 201a098: 82 10 20 09 mov 9, %g1 ! 9 201a09c: c2 22 00 00 st %g1, [ %o0 ] 201a0a0: 81 c7 e0 08 ret 201a0a4: 91 e8 3f ff restore %g0, -1, %o0 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 201a0a8: 90 10 00 19 mov %i1, %o0 201a0ac: 7f ff d8 df call 2010428 201a0b0: 92 10 20 00 clr %o1 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 201a0b4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 201a0b8: 90 06 20 14 add %i0, 0x14, %o0 201a0bc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201a0c0: 9f c0 40 00 call %g1 201a0c4: 92 10 00 19 mov %i1, %o1 } 201a0c8: 81 c7 e0 08 ret 201a0cc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020036e8 : rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 20036e8: 03 00 80 85 sethi %hi(0x2021400), %g1 20036ec: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 ! 2021770 20036f0: 80 a2 00 01 cmp %o0, %g1 20036f4: 1a 80 00 1e bcc 200376c <== NEVER TAKEN 20036f8: 03 00 80 85 sethi %hi(0x2021400), %g1 20036fc: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 2021774 2003700: 80 a0 60 00 cmp %g1, 0 2003704: 22 80 00 1b be,a 2003770 <== NEVER TAKEN 2003708: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_disk_device_table *dtab = disktab + major; 200370c: 91 2a 20 03 sll %o0, 3, %o0 2003710: 84 00 40 08 add %g1, %o0, %g2 if (minor < dtab->size && dtab->minor != NULL) { 2003714: c4 00 a0 04 ld [ %g2 + 4 ], %g2 2003718: 80 a2 40 02 cmp %o1, %g2 200371c: 3a 80 00 15 bcc,a 2003770 <== NEVER TAKEN 2003720: 90 10 20 00 clr %o0 <== NOT EXECUTED 2003724: c2 00 40 08 ld [ %g1 + %o0 ], %g1 2003728: 80 a0 60 00 cmp %g1, 0 200372c: 02 80 00 10 be 200376c <== NEVER TAKEN 2003730: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; if (dd != NULL && !lookup_only) { 2003734: 80 a2 a0 01 cmp %o2, 1 2003738: 02 80 00 0e be 2003770 200373c: d0 00 40 09 ld [ %g1 + %o1 ], %o0 2003740: 80 a2 20 00 cmp %o0, 0 2003744: 02 80 00 0b be 2003770 <== NEVER TAKEN 2003748: 01 00 00 00 nop if (!dd->deleted) { 200374c: c2 0a 20 40 ldub [ %o0 + 0x40 ], %g1 2003750: 80 a0 60 00 cmp %g1, 0 2003754: 32 80 00 07 bne,a 2003770 2003758: 90 10 20 00 clr %o0 ++dd->uses; 200375c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2003760: 82 00 60 01 inc %g1 2003764: 81 c3 e0 08 retl 2003768: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return dd; } } return NULL; 200376c: 90 10 20 00 clr %o0 <== NOT EXECUTED } 2003770: 81 c3 e0 08 retl =============================================================================== 02004ad4 : * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, 2004ad4: 9d e3 bf a0 save %sp, -96, %sp new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 2004ad8: 40 00 05 9d call 200614c 2004adc: 90 10 22 04 mov 0x204, %o0 if (s == NULL) { return RTEMS_NO_MEMORY; 2004ae0: 82 10 20 1a mov 0x1a, %g1 if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) 2004ae4: 80 a2 20 00 cmp %o0, 0 2004ae8: 02 80 00 0f be 2004b24 <== NEVER TAKEN 2004aec: ba 10 00 08 mov %o0, %i5 { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 2004af0: 90 10 00 18 mov %i0, %o0 2004af4: 92 07 60 04 add %i5, 4, %o1 2004af8: 40 00 08 5c call 2006c68 2004afc: 94 10 22 00 mov 0x200, %o2 if (n != RTEMS_IDE_SECTOR_SIZE) 2004b00: 80 a2 22 00 cmp %o0, 0x200 2004b04: 22 80 00 06 be,a 2004b1c <== ALWAYS TAKEN 2004b08: f2 27 40 00 st %i1, [ %i5 ] { free(s); 2004b0c: 40 00 03 ea call 2005ab4 <== NOT EXECUTED 2004b10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return RTEMS_IO_ERROR; 2004b14: 10 80 00 04 b 2004b24 <== NOT EXECUTED 2004b18: 82 10 20 1b mov 0x1b, %g1 <== NOT EXECUTED } s->sector_num = sector_num; *sector = s; 2004b1c: fa 26 80 00 st %i5, [ %i2 ] return RTEMS_SUCCESSFUL; 2004b20: 82 10 20 00 clr %g1 } 2004b24: 81 c7 e0 08 ret 2004b28: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0202fb4c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202fb4c: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 202fb50: 03 00 80 d7 sethi %hi(0x2035c00), %g1 202fb54: c2 00 62 f8 ld [ %g1 + 0x2f8 ], %g1 ! 2035ef8 202fb58: 80 a6 00 01 cmp %i0, %g1 202fb5c: 1a 80 00 08 bcc 202fb7c <== NEVER TAKEN 202fb60: ba 10 20 00 clr %i5 202fb64: 83 2e 20 03 sll %i0, 3, %g1 202fb68: b1 2e 20 06 sll %i0, 6, %i0 202fb6c: b0 26 00 01 sub %i0, %g1, %i0 202fb70: 03 00 81 1a sethi %hi(0x2046800), %g1 202fb74: fa 00 63 74 ld [ %g1 + 0x374 ], %i5 ! 2046b74 202fb78: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 202fb7c: 7f ff 69 85 call 200a190 202fb80: 90 07 60 14 add %i5, 0x14, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 202fb84: 80 a2 20 00 cmp %o0, 0 202fb88: 22 80 00 08 be,a 202fba8 202fb8c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 202fb90: 7f ff c4 0b call 2020bbc <__errno> 202fb94: b0 10 3f ff mov -1, %i0 202fb98: 82 10 20 14 mov 0x14, %g1 202fb9c: c2 22 00 00 st %g1, [ %o0 ] 202fba0: 81 c7 e0 08 ret 202fba4: 81 e8 00 00 restore /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); 202fba8: 90 10 00 1d mov %i5, %o0 202fbac: c2 00 60 08 ld [ %g1 + 8 ], %g1 202fbb0: 92 10 00 19 mov %i1, %o1 202fbb4: 9f c0 40 00 call %g1 202fbb8: 94 10 00 1a mov %i2, %o2 } 202fbbc: 81 c7 e0 08 ret 202fbc0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020240b4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 20240b4: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 20240b8: 03 00 81 85 sethi %hi(0x2061400), %g1 20240bc: c4 48 62 e0 ldsb [ %g1 + 0x2e0 ], %g2 ! 20616e0 20240c0: 80 a0 a0 00 cmp %g2, 0 20240c4: 12 80 00 2f bne 2024180 20240c8: 84 10 20 01 mov 1, %g2 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 20240cc: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 20240d0: c4 28 62 e0 stb %g2, [ %g1 + 0x2e0 ] mkdir("/etc", 0777); 20240d4: 11 00 81 62 sethi %hi(0x2058800), %o0 20240d8: 7f ff 7e 4f call 2003a14 20240dc: 90 12 21 f0 or %o0, 0x1f0, %o0 ! 20589f0 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 20240e0: 3b 00 81 62 sethi %hi(0x2058800), %i5 20240e4: 13 00 81 74 sethi %hi(0x205d000), %o1 20240e8: 90 17 61 f8 or %i5, 0x1f8, %o0 20240ec: 40 00 4c 4a call 2037214 20240f0: 92 12 63 00 or %o1, 0x300, %o1 20240f4: 80 a2 20 00 cmp %o0, 0 20240f8: 22 80 00 03 be,a 2024104 20240fc: 90 17 61 f8 or %i5, 0x1f8, %o0 2024100: 30 80 00 0b b,a 202412c fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 2024104: 13 00 81 5a sethi %hi(0x2056800), %o1 2024108: 40 00 4c 43 call 2037214 202410c: 92 12 61 c8 or %o1, 0x1c8, %o1 ! 20569c8 2024110: ba 92 20 00 orcc %o0, 0, %i5 2024114: 02 80 00 08 be 2024134 <== NEVER TAKEN 2024118: 11 00 81 62 sethi %hi(0x2058800), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 202411c: 92 10 00 1d mov %i5, %o1 2024120: 40 00 4c a0 call 20373a0 2024124: 90 12 22 08 or %o0, 0x208, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 2024128: 90 10 00 1d mov %i5, %o0 202412c: 40 00 49 e6 call 20368c4 2024130: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2024134: 3b 00 81 62 sethi %hi(0x2058800), %i5 2024138: 13 00 81 74 sethi %hi(0x205d000), %o1 202413c: 90 17 62 70 or %i5, 0x270, %o0 2024140: 40 00 4c 35 call 2037214 2024144: 92 12 63 00 or %o1, 0x300, %o1 2024148: b0 92 20 00 orcc %o0, 0, %i0 202414c: 12 80 00 0b bne 2024178 2024150: 90 17 62 70 or %i5, 0x270, %o0 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2024154: 13 00 81 5a sethi %hi(0x2056800), %o1 2024158: 40 00 4c 2f call 2037214 202415c: 92 12 61 c8 or %o1, 0x1c8, %o1 ! 20569c8 2024160: b0 92 20 00 orcc %o0, 0, %i0 2024164: 02 80 00 07 be 2024180 <== NEVER TAKEN 2024168: 11 00 81 62 sethi %hi(0x2058800), %o0 fprintf( fp, "root:x:0:root\n" 202416c: 92 10 00 18 mov %i0, %o1 2024170: 40 00 4c 8c call 20373a0 2024174: 90 12 22 80 or %o0, 0x280, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2024178: 40 00 49 d3 call 20368c4 202417c: 81 e8 00 00 restore 2024180: 81 c7 e0 08 ret 2024184: 81 e8 00 00 restore =============================================================================== 02006340 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2006340: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 2006344: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 2006348: 80 88 60 20 btst 0x20, %g1 200634c: 32 80 00 02 bne,a 2006354 <== NEVER TAKEN 2006350: b0 0e 20 7f and %i0, 0x7f, %i0 <== NOT EXECUTED c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 2006354: 80 88 62 00 btst 0x200, %g1 2006358: 02 80 00 0c be 2006388 200635c: 80 a6 20 0d cmp %i0, 0xd c = tolower (c); 2006360: 05 00 80 74 sethi %hi(0x201d000), %g2 2006364: c4 00 a0 70 ld [ %g2 + 0x70 ], %g2 ! 201d070 <__ctype_ptr__> 2006368: 84 00 80 18 add %g2, %i0, %g2 200636c: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 2006370: 84 08 a0 03 and %g2, 3, %g2 2006374: 80 a0 a0 01 cmp %g2, 1 2006378: 22 80 00 02 be,a 2006380 200637c: b0 06 20 20 add %i0, 0x20, %i0 2006380: b0 0e 20 ff and %i0, 0xff, %i0 if (c == '\r') { 2006384: 80 a6 20 0d cmp %i0, 0xd 2006388: 12 80 00 0b bne 20063b4 200638c: 80 a6 20 0a cmp %i0, 0xa if (tty->termios.c_iflag & IGNCR) 2006390: 80 88 60 80 btst 0x80, %g1 2006394: 02 80 00 04 be 20063a4 <== ALWAYS TAKEN 2006398: 80 88 61 00 btst 0x100, %g1 if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 200639c: 81 c7 e0 08 ret <== NOT EXECUTED 20063a0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 20063a4: 32 80 00 0d bne,a 20063d8 <== ALWAYS TAKEN 20063a8: b0 10 20 0a mov 0xa, %i0 c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 20063ac: 10 80 00 0c b 20063dc <== NOT EXECUTED 20063b0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED if (c == '\r') { 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)) { 20063b4: 12 80 00 07 bne 20063d0 20063b8: 80 a6 20 00 cmp %i0, 0 20063bc: 80 88 60 40 btst 0x40, %g1 20063c0: 32 80 00 06 bne,a 20063d8 <== NEVER TAKEN 20063c4: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 20063c8: 10 80 00 05 b 20063dc 20063cc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20063d0: 02 80 00 51 be 2006514 <== NEVER TAKEN 20063d4: 03 00 80 73 sethi %hi(0x201cc00), %g1 20063d8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20063dc: 80 88 60 02 btst 2, %g1 20063e0: 22 80 00 4d be,a 2006514 20063e4: 03 00 80 73 sethi %hi(0x201cc00), %g1 if (c == tty->termios.c_cc[VERASE]) { 20063e8: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 20063ec: 80 a0 80 18 cmp %g2, %i0 20063f0: 32 80 00 08 bne,a 2006410 20063f4: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 20063f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20063fc: 80 a0 60 00 cmp %g1, 0 2006400: 02 80 00 57 be 200655c 2006404: 90 10 00 19 mov %i1, %o0 2006408: 10 80 00 1d b 200647c 200640c: 92 10 20 00 clr %o1 if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2006410: 80 a0 80 18 cmp %g2, %i0 2006414: 32 80 00 1d bne,a 2006488 2006418: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 200641c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2006420: 80 a0 a0 00 cmp %g2, 0 2006424: 02 80 00 4e be 200655c <== NEVER TAKEN 2006428: 80 88 60 08 btst 8, %g1 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 200642c: 12 80 00 04 bne 200643c <== ALWAYS TAKEN 2006430: 90 10 00 19 mov %i1, %o0 tty->ccount = 0; 2006434: 10 80 00 4a b 200655c <== NOT EXECUTED 2006438: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 200643c: 80 88 60 10 btst 0x10, %g1 2006440: 12 80 00 0f bne 200647c <== ALWAYS TAKEN 2006444: 92 10 20 01 mov 1, %o1 tty->ccount = 0; 2006448: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 200644c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006450: 7f ff ff 2d call 2006104 <== NOT EXECUTED 2006454: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2006458: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 200645c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2006460: 22 80 00 42 be,a 2006568 <== NOT EXECUTED 2006464: b0 10 20 00 clr %i0 <== NOT EXECUTED echo ('\n', tty); 2006468: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 200646c: 7f ff ff 26 call 2006104 <== NOT EXECUTED 2006470: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 2006474: 81 c7 e0 08 ret <== NOT EXECUTED 2006478: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 200647c: 7f ff ff 43 call 2006188 2006480: b0 10 20 00 clr %i0 2006484: 30 80 00 39 b,a 2006568 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2006488: 80 a0 80 18 cmp %g2, %i0 200648c: 02 80 00 36 be 2006564 <== NEVER TAKEN 2006490: 80 a6 20 0a cmp %i0, 0xa return 1; } else if (c == '\n') { 2006494: 32 80 00 0d bne,a 20064c8 2006498: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 if (tty->termios.c_lflag & (ECHO | ECHONL)) 200649c: 80 88 60 48 btst 0x48, %g1 20064a0: 22 80 00 06 be,a 20064b8 <== NEVER TAKEN 20064a4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20064a8: 90 10 20 0a mov 0xa, %o0 20064ac: 7f ff ff 16 call 2006104 20064b0: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 20064b4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20064b8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 20064bc: 86 10 20 0a mov 0xa, %g3 20064c0: 10 80 00 12 b 2006508 20064c4: c6 28 80 01 stb %g3, [ %g2 + %g1 ] return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 20064c8: 80 a0 80 18 cmp %g2, %i0 20064cc: 02 80 00 07 be 20064e8 <== NEVER TAKEN 20064d0: 80 88 60 08 btst 8, %g1 20064d4: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 20064d8: 80 a0 80 18 cmp %g2, %i0 20064dc: 32 80 00 0e bne,a 2006514 <== ALWAYS TAKEN 20064e0: 03 00 80 73 sethi %hi(0x201cc00), %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 20064e4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 20064e8: 22 80 00 06 be,a 2006500 <== NOT EXECUTED 20064ec: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20064f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20064f4: 7f ff ff 04 call 2006104 <== NOT EXECUTED 20064f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 20064fc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2006500: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2006504: f0 28 80 01 stb %i0, [ %g2 + %g1 ] <== NOT EXECUTED 2006508: 82 00 60 01 inc %g1 200650c: 10 80 00 16 b 2006564 2006510: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2006514: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2006518: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 200651c: 82 00 7f ff add %g1, -1, %g1 2006520: 80 a0 80 01 cmp %g2, %g1 2006524: 3a 80 00 11 bcc,a 2006568 <== NEVER TAKEN 2006528: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 200652c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2006530: 80 88 60 08 btst 8, %g1 2006534: 22 80 00 06 be,a 200654c <== NEVER TAKEN 2006538: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 200653c: 90 10 00 18 mov %i0, %o0 2006540: 7f ff fe f1 call 2006104 2006544: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2006548: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 200654c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 2006550: f0 28 80 01 stb %i0, [ %g2 + %g1 ] 2006554: 82 00 60 01 inc %g1 2006558: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } return 0; 200655c: 81 c7 e0 08 ret 2006560: 91 e8 20 00 restore %g0, 0, %o0 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 2006564: b0 10 20 01 mov 1, %i0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 2006568: 81 c7 e0 08 ret 200656c: 81 e8 00 00 restore =============================================================================== 0201a340 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201a340: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 201a344: 7f ff ff 68 call 201a0e4 201a348: 01 00 00 00 nop 201a34c: 80 a6 00 08 cmp %i0, %o0 201a350: 02 80 00 06 be 201a368 201a354: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 201a358: 7f ff d5 b0 call 200fa18 <__errno> 201a35c: 01 00 00 00 nop 201a360: 10 80 00 a4 b 201a5f0 201a364: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 201a368: 32 80 00 03 bne,a 201a374 201a36c: ba 06 7f ff add %i1, -1, %i5 201a370: 30 80 00 04 b,a 201a380 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 201a374: 80 a7 60 1f cmp %i5, 0x1f 201a378: 28 80 00 06 bleu,a 201a390 201a37c: 83 2e 60 02 sll %i1, 2, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 201a380: 7f ff d5 a6 call 200fa18 <__errno> 201a384: 01 00 00 00 nop 201a388: 10 80 00 9a b 201a5f0 201a38c: 82 10 20 16 mov 0x16, %g1 ! 16 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 201a390: 85 2e 60 04 sll %i1, 4, %g2 201a394: 84 20 80 01 sub %g2, %g1, %g2 201a398: 03 00 80 78 sethi %hi(0x201e000), %g1 201a39c: 82 10 60 80 or %g1, 0x80, %g1 ! 201e080 <_POSIX_signals_Vectors> 201a3a0: 82 00 40 02 add %g1, %g2, %g1 201a3a4: c2 00 60 08 ld [ %g1 + 8 ], %g1 201a3a8: 80 a0 60 01 cmp %g1, 1 201a3ac: 02 80 00 9d be 201a620 201a3b0: 80 a6 60 04 cmp %i1, 4 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 201a3b4: 02 80 00 06 be 201a3cc 201a3b8: 80 a6 60 08 cmp %i1, 8 201a3bc: 02 80 00 04 be 201a3cc 201a3c0: 80 a6 60 0b cmp %i1, 0xb 201a3c4: 12 80 00 08 bne 201a3e4 201a3c8: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 201a3cc: 40 00 01 2d call 201a880 201a3d0: 01 00 00 00 nop 201a3d4: 40 00 00 f2 call 201a79c 201a3d8: 92 10 00 19 mov %i1, %o1 201a3dc: 81 c7 e0 08 ret 201a3e0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201a3e4: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 201a3e8: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !value ) { 201a3ec: 80 a6 a0 00 cmp %i2, 0 201a3f0: 12 80 00 04 bne 201a400 201a3f4: bb 28 40 1d sll %g1, %i5, %i5 siginfo->si_value.sival_int = 0; 201a3f8: 10 80 00 04 b 201a408 201a3fc: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 201a400: c2 06 80 00 ld [ %i2 ], %g1 201a404: c2 27 bf fc st %g1, [ %fp + -4 ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 201a408: 03 00 80 76 sethi %hi(0x201d800), %g1 201a40c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level> 201a410: 84 00 a0 01 inc %g2 201a414: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] return _Thread_Dispatch_disable_level; 201a418: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 201a41c: 03 00 80 78 sethi %hi(0x201e000), %g1 201a420: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 201e02c <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201a424: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 201a428: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2 201a42c: 80 af 40 02 andncc %i5, %g2, %g0 201a430: 12 80 00 52 bne 201a578 201a434: 03 00 80 78 sethi %hi(0x201e000), %g1 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201a438: 05 00 80 78 sethi %hi(0x201e000), %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 201a43c: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 201a440: 10 80 00 0a b 201a468 201a444: 84 10 a2 10 or %g2, 0x210, %g2 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 201a448: 80 8f 40 04 btst %i5, %g4 201a44c: 12 80 00 4a bne 201a574 201a450: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 201a454: c6 00 e0 d0 ld [ %g3 + 0xd0 ], %g3 201a458: 80 af 40 03 andncc %i5, %g3, %g0 201a45c: 12 80 00 47 bne 201a578 201a460: 90 10 00 01 mov %g1, %o0 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 201a464: c2 00 40 00 ld [ %g1 ], %g1 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201a468: 80 a0 40 02 cmp %g1, %g2 201a46c: 32 bf ff f7 bne,a 201a448 201a470: c8 00 60 30 ld [ %g1 + 0x30 ], %g4 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201a474: 03 00 80 73 sethi %hi(0x201cc00), %g1 201a478: c6 08 61 48 ldub [ %g1 + 0x148 ], %g3 ! 201cd48 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201a47c: b8 10 20 02 mov 2, %i4 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201a480: 86 00 e0 01 inc %g3 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 201a484: 82 10 20 00 clr %g1 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 201a488: 1b 00 80 76 sethi %hi(0x201d800), %o5 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 201a48c: 35 04 00 00 sethi %hi(0x10000000), %i2 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201a490: 85 2f 20 02 sll %i4, 2, %g2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 201a494: 88 13 62 54 or %o5, 0x254, %g4 201a498: c4 01 00 02 ld [ %g4 + %g2 ], %g2 201a49c: 80 a0 a0 00 cmp %g2, 0 201a4a0: 22 80 00 2f be,a 201a55c <== NEVER TAKEN 201a4a4: b8 07 20 01 inc %i4 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 201a4a8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a4ac: b6 10 20 01 mov 1, %i3 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 201a4b0: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a4b4: 10 80 00 26 b 201a54c 201a4b8: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3 the_thread = (Thread_Control *) object_table[ index ]; 201a4bc: c4 02 c0 02 ld [ %o3 + %g2 ], %g2 if ( !the_thread ) 201a4c0: 80 a0 a0 00 cmp %g2, 0 201a4c4: 22 80 00 22 be,a 201a54c 201a4c8: b6 06 e0 01 inc %i3 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 201a4cc: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 201a4d0: 80 a1 00 03 cmp %g4, %g3 201a4d4: 38 80 00 1e bgu,a 201a54c 201a4d8: b6 06 e0 01 inc %i3 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 201a4dc: f0 00 a1 5c ld [ %g2 + 0x15c ], %i0 201a4e0: f0 06 20 d0 ld [ %i0 + 0xd0 ], %i0 201a4e4: 80 af 40 18 andncc %i5, %i0, %g0 201a4e8: 22 80 00 19 be,a 201a54c 201a4ec: b6 06 e0 01 inc %i3 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 201a4f0: 80 a1 00 03 cmp %g4, %g3 201a4f4: 2a 80 00 14 bcs,a 201a544 201a4f8: 86 10 00 04 mov %g4, %g3 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 201a4fc: 80 a0 60 00 cmp %g1, 0 201a500: 22 80 00 13 be,a 201a54c <== NEVER TAKEN 201a504: b6 06 e0 01 inc %i3 <== NOT EXECUTED 201a508: de 00 60 10 ld [ %g1 + 0x10 ], %o7 201a50c: 80 a3 e0 00 cmp %o7, 0 201a510: 22 80 00 0f be,a 201a54c <== NEVER TAKEN 201a514: b6 06 e0 01 inc %i3 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201a518: f0 00 a0 10 ld [ %g2 + 0x10 ], %i0 201a51c: 80 a6 20 00 cmp %i0, 0 201a520: 22 80 00 09 be,a 201a544 201a524: 86 10 00 04 mov %g4, %g3 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 201a528: 80 8b c0 1a btst %o7, %i2 201a52c: 32 80 00 08 bne,a 201a54c 201a530: b6 06 e0 01 inc %i3 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 201a534: 80 8e 00 1a btst %i0, %i2 201a538: 22 80 00 05 be,a 201a54c 201a53c: b6 06 e0 01 inc %i3 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201a540: 86 10 00 04 mov %g4, %g3 201a544: 82 10 00 02 mov %g2, %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a548: b6 06 e0 01 inc %i3 201a54c: 80 a6 c0 0c cmp %i3, %o4 201a550: 08 bf ff db bleu 201a4bc 201a554: 85 2e e0 02 sll %i3, 2, %g2 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201a558: b8 07 20 01 inc %i4 201a55c: 80 a7 20 04 cmp %i4, 4 201a560: 12 bf ff cd bne 201a494 201a564: 85 2f 20 02 sll %i4, 2, %g2 } } } } if ( interested ) { 201a568: 80 a0 60 00 cmp %g1, 0 201a56c: 02 80 00 0c be 201a59c 201a570: 01 00 00 00 nop /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 201a574: 90 10 00 01 mov %g1, %o0 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 201a578: 92 10 00 19 mov %i1, %o1 201a57c: 40 00 00 36 call 201a654 <_POSIX_signals_Unblock_thread> 201a580: 94 07 bf f4 add %fp, -12, %o2 201a584: 80 8a 20 ff btst 0xff, %o0 201a588: 02 80 00 05 be 201a59c 201a58c: 01 00 00 00 nop _Thread_Enable_dispatch(); 201a590: 7f ff bf 0f call 200a1cc <_Thread_Enable_dispatch> 201a594: b0 10 20 00 clr %i0 ! 0 201a598: 30 80 00 23 b,a 201a624 /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 201a59c: 40 00 00 24 call 201a62c <_POSIX_signals_Set_process_signals> 201a5a0: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 201a5a4: 83 2e 60 02 sll %i1, 2, %g1 201a5a8: b3 2e 60 04 sll %i1, 4, %i1 201a5ac: b2 26 40 01 sub %i1, %g1, %i1 201a5b0: 03 00 80 78 sethi %hi(0x201e000), %g1 201a5b4: 82 10 60 80 or %g1, 0x80, %g1 ! 201e080 <_POSIX_signals_Vectors> 201a5b8: c2 00 40 19 ld [ %g1 + %i1 ], %g1 201a5bc: 80 a0 60 02 cmp %g1, 2 201a5c0: 12 bf ff f4 bne 201a590 201a5c4: 11 00 80 78 sethi %hi(0x201e000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 201a5c8: 7f ff b7 78 call 20083a8 <_Chain_Get> 201a5cc: 90 12 22 00 or %o0, 0x200, %o0 ! 201e200 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 201a5d0: ba 92 20 00 orcc %o0, 0, %i5 201a5d4: 12 80 00 0a bne 201a5fc 201a5d8: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 201a5dc: 7f ff be fc call 200a1cc <_Thread_Enable_dispatch> 201a5e0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 201a5e4: 7f ff d5 0d call 200fa18 <__errno> 201a5e8: 01 00 00 00 nop 201a5ec: 82 10 20 0b mov 0xb, %g1 ! b 201a5f0: c2 22 00 00 st %g1, [ %o0 ] 201a5f4: 81 c7 e0 08 ret 201a5f8: 91 e8 3f ff restore %g0, -1, %o0 } psiginfo->Info = *siginfo; 201a5fc: 90 07 60 08 add %i5, 8, %o0 201a600: 7f ff d7 4d call 2010334 201a604: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201a608: 11 00 80 78 sethi %hi(0x201e000), %o0 201a60c: 92 10 00 1d mov %i5, %o1 201a610: 90 12 22 78 or %o0, 0x278, %o0 201a614: 7f ff b7 59 call 2008378 <_Chain_Append> 201a618: 90 02 00 19 add %o0, %i1, %o0 201a61c: 30 bf ff dd b,a 201a590 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 201a620: b0 10 20 00 clr %i0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 201a624: 81 c7 e0 08 ret 201a628: 81 e8 00 00 restore =============================================================================== 020040b4 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 20040b4: 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())) 20040b8: 03 00 80 77 sethi %hi(0x201dc00), %g1 20040bc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 201dc30 <_System_state_Current> 20040c0: 80 a0 60 03 cmp %g1, 3 20040c4: 12 80 00 16 bne 200411c <== NEVER TAKEN 20040c8: 03 00 80 70 sethi %hi(0x201c000), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 20040cc: 39 00 80 74 sethi %hi(0x201d000), %i4 20040d0: fa 00 62 78 ld [ %g1 + 0x278 ], %i5 20040d4: c2 07 20 78 ld [ %i4 + 0x78 ], %g1 20040d8: 80 a0 40 1d cmp %g1, %i5 20040dc: 22 80 00 06 be,a 20040f4 20040e0: 3b 00 80 74 sethi %hi(0x201d000), %i5 _wrapup_reent(_global_impure_ptr); 20040e4: 40 00 31 72 call 20106ac <_wrapup_reent> 20040e8: 90 10 00 1d mov %i5, %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; 20040ec: fa 27 20 78 st %i5, [ %i4 + 0x78 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20040f0: 3b 00 80 74 sethi %hi(0x201d000), %i5 20040f4: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 ! 201d078 <_impure_ptr> 20040f8: 40 00 2e 9a call 200fb60 20040fc: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 2004100: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2004104: 40 00 2e 97 call 200fb60 2004108: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 200410c: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2004110: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2004114: 40 00 2e 93 call 200fb60 2004118: 81 e8 00 00 restore 200411c: 81 c7 e0 08 ret <== NOT EXECUTED 2004120: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003b80 : #include "malloc_p.h" void *malloc( size_t size ) { 2003b80: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 2003b84: 03 00 80 76 sethi %hi(0x201d800), %g1 2003b88: 82 10 61 68 or %g1, 0x168, %g1 ! 201d968 2003b8c: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 2003b90: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 2003b94: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003b98: 7f ff ff ae call 2003a50 2003b9c: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 2003ba0: 80 a6 20 00 cmp %i0, 0 2003ba4: 12 80 00 04 bne 2003bb4 2003ba8: 03 00 80 77 sethi %hi(0x201dc00), %g1 if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 2003bac: 81 c7 e0 08 ret 2003bb0: 91 e8 20 00 restore %g0, 0, %o0 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003bb4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2003bb8: 80 a0 60 03 cmp %g1, 3 2003bbc: 02 80 00 0c be 2003bec 2003bc0: 03 00 80 73 sethi %hi(0x201cc00), %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 ); 2003bc4: d0 00 61 ec ld [ %g1 + 0x1ec ], %o0 ! 201cdec 2003bc8: 92 10 00 1d mov %i5, %o1 2003bcc: 94 10 20 00 clr %o2 2003bd0: 40 00 16 66 call 2009568 <_Protected_heap_Allocate_aligned_with_boundary> 2003bd4: 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 ) { 2003bd8: 80 a2 20 00 cmp %o0, 0 2003bdc: 02 80 00 0b be 2003c08 2003be0: b0 10 00 08 mov %o0, %i0 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003be4: 10 80 00 19 b 2003c48 2003be8: 03 00 80 75 sethi %hi(0x201d400), %g1 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 2003bec: 7f ff ff 86 call 2003a04 2003bf0: 01 00 00 00 nop return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003bf4: 80 8a 20 ff btst 0xff, %o0 2003bf8: 12 bf ff f3 bne 2003bc4 <== ALWAYS TAKEN 2003bfc: 03 00 80 73 sethi %hi(0x201cc00), %g1 if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 2003c00: 81 c7 e0 08 ret <== NOT EXECUTED 2003c04: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 2003c08: 03 00 80 75 sethi %hi(0x201d400), %g1 2003c0c: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 201d5a0 2003c10: 80 a0 60 00 cmp %g1, 0 2003c14: 32 80 00 08 bne,a 2003c34 2003c18: c2 00 60 04 ld [ %g1 + 4 ], %g1 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; 2003c1c: 40 00 2f 7f call 200fa18 <__errno> 2003c20: 01 00 00 00 nop 2003c24: 82 10 20 0c mov 0xc, %g1 ! c 2003c28: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2003c2c: 81 c7 e0 08 ret 2003c30: 91 e8 20 00 restore %g0, 0, %o0 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2003c34: 9f c0 40 00 call %g1 2003c38: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 2003c3c: b0 92 20 00 orcc %o0, 0, %i0 2003c40: 02 bf ff f7 be 2003c1c 2003c44: 03 00 80 75 sethi %hi(0x201d400), %g1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003c48: c2 00 61 9c ld [ %g1 + 0x19c ], %g1 ! 201d59c 2003c4c: 80 a0 60 00 cmp %g1, 0 2003c50: 02 80 00 04 be 2003c60 2003c54: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003c58: 9f c0 40 00 call %g1 2003c5c: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003c60: 03 00 80 75 sethi %hi(0x201d400), %g1 2003c64: c2 00 61 a4 ld [ %g1 + 0x1a4 ], %g1 ! 201d5a4 2003c68: 80 a0 60 00 cmp %g1, 0 2003c6c: 02 80 00 05 be 2003c80 2003c70: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003c74: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003c78: 9f c0 40 00 call %g1 2003c7c: 90 10 00 18 mov %i0, %o0 return return_this; } 2003c80: 81 c7 e0 08 ret 2003c84: 81 e8 00 00 restore =============================================================================== 02003c04 : } static void *malloc_sbrk_extend_and_allocate( size_t size ) { 2003c04: 9d e3 bf a0 save %sp, -96, %sp * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 2003c08: 03 00 80 77 sethi %hi(0x201dc00), %g1 2003c0c: fa 00 60 e8 ld [ %g1 + 0xe8 ], %i5 ! 201dce8 if ( sbrk_amount == 0 ) 2003c10: 80 a7 60 00 cmp %i5, 0 2003c14: 02 80 00 22 be 2003c9c <== NEVER TAKEN 2003c18: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 2003c1c: 92 10 00 1d mov %i5, %o1 2003c20: 40 00 53 c2 call 2018b28 <.udiv> 2003c24: 90 06 00 1d add %i0, %i5, %o0 2003c28: 40 00 53 86 call 2018a40 <.umul> 2003c2c: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 2003c30: 7f ff f6 22 call 20014b8 2003c34: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 2003c38: 80 a2 3f ff cmp %o0, -1 2003c3c: 02 80 00 18 be 2003c9c 2003c40: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 2003c44: 39 00 80 73 sethi %hi(0x201cc00), %i4 2003c48: d0 07 23 dc ld [ %i4 + 0x3dc ], %o0 ! 201cfdc 2003c4c: 40 00 16 31 call 2009510 <_Protected_heap_Extend> 2003c50: 94 10 00 1d mov %i5, %o2 2003c54: 80 8a 20 ff btst 0xff, %o0 2003c58: 12 80 00 0a bne 2003c80 2003c5c: 03 00 80 77 sethi %hi(0x201dc00), %g1 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 2003c60: 7f ff f6 16 call 20014b8 2003c64: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 2003c68: 40 00 30 10 call 200fca8 <__errno> 2003c6c: b0 10 20 00 clr %i0 2003c70: 82 10 20 0c mov 0xc, %g1 2003c74: c2 22 00 00 st %g1, [ %o0 ] 2003c78: 81 c7 e0 08 ret 2003c7c: 81 e8 00 00 restore 2003c80: f0 07 23 dc ld [ %i4 + 0x3dc ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2003c84: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 2003c88: b4 10 20 00 clr %i2 2003c8c: ba 07 40 02 add %i5, %g2, %i5 2003c90: fa 20 60 b8 st %i5, [ %g1 + 0xb8 ] 2003c94: 40 00 16 11 call 20094d8 <_Protected_heap_Allocate_aligned_with_boundary> 2003c98: 97 e8 20 00 restore %g0, 0, %o3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 2003c9c: b0 10 20 00 clr %i0 2003ca0: 81 c7 e0 08 ret 2003ca4: 81 e8 00 00 restore =============================================================================== 02003ca8 : static void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2003ca8: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2003cac: 03 00 80 77 sethi %hi(0x201dc00), %g1 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 2003cb0: 80 a6 20 00 cmp %i0, 0 2003cb4: 12 80 00 0e bne 2003cec 2003cb8: f2 20 60 e8 st %i1, [ %g1 + 0xe8 ] uaddress = (uintptr_t)sbrk(length); 2003cbc: 7f ff f5 ff call 20014b8 2003cc0: 90 10 00 19 mov %i1, %o0 if (uaddress == (uintptr_t) -1) { 2003cc4: 80 a2 3f ff cmp %o0, -1 2003cc8: 12 80 00 04 bne 2003cd8 <== NEVER TAKEN 2003ccc: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003cd0: 40 00 10 d9 call 2008034 2003cd4: 90 10 20 1a mov 0x1a, %o0 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003cd8: 22 80 00 05 be,a 2003cec <== NOT EXECUTED 2003cdc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 2003ce0: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003ce4: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED * adjust the length by whatever we aligned by */ length -= uaddress - old_address; } starting_address = (void *)uaddress; 2003ce8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return starting_address; } 2003cec: 81 c7 e0 08 ret 2003cf0: 81 e8 00 00 restore =============================================================================== 0200defc : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 200defc: 9d e3 bf a0 save %sp, -96, %sp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200df00: 03 00 80 75 sethi %hi(0x201d400), %g1 200df04: d2 00 61 d8 ld [ %g1 + 0x1d8 ], %o1 ! 201d5d8 200df08: 7f ff d5 81 call 200350c 200df0c: 90 10 20 01 mov 1, %o0 if ( memory ) 200df10: b0 92 20 00 orcc %o0, 0, %i0 200df14: 02 80 00 05 be 200df28 <== NEVER TAKEN 200df18: 03 00 80 75 sethi %hi(0x201d400), %g1 memfile_blocks_allocated++; 200df1c: c4 00 62 ec ld [ %g1 + 0x2ec ], %g2 ! 201d6ec 200df20: 84 00 a0 01 inc %g2 200df24: c4 20 62 ec st %g2, [ %g1 + 0x2ec ] return memory; } 200df28: 81 c7 e0 08 ret 200df2c: 81 e8 00 00 restore =============================================================================== 0200ea2c : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200ea2c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200ea30: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 * 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 ) 200ea34: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200ea38: 80 a0 40 19 cmp %g1, %i1 200ea3c: 06 80 00 09 bl 200ea60 <== NEVER TAKEN 200ea40: 90 10 00 1d mov %i5, %o0 200ea44: 32 80 00 0d bne,a 200ea78 <== NEVER TAKEN 200ea48: f2 27 60 50 st %i1, [ %i5 + 0x50 ] <== NOT EXECUTED 200ea4c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200ea50: 80 a0 40 1a cmp %g1, %i2 200ea54: 3a 80 00 09 bcc,a 200ea78 200ea58: f2 27 60 50 st %i1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, true, length ); 200ea5c: 90 10 00 1d mov %i5, %o0 200ea60: 92 10 20 01 mov 1, %o1 200ea64: 94 10 00 19 mov %i1, %o2 200ea68: 7f ff fe de call 200e5e0 200ea6c: 96 10 00 1a mov %i2, %o3 200ea70: 81 c7 e0 08 ret 200ea74: 91 e8 00 08 restore %g0, %o0, %o0 /* * 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; 200ea78: f4 27 60 54 st %i2, [ %i5 + 0x54 ] IMFS_update_atime( the_jnode ); 200ea7c: 90 07 bf f8 add %fp, -8, %o0 200ea80: 7f ff d3 81 call 2003884 200ea84: 92 10 20 00 clr %o1 200ea88: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ea8c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200ea90: 81 c7 e0 08 ret 200ea94: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200e9b0 : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200e9b0: 9d e3 bf a0 save %sp, -96, %sp the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 200e9b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200e9b8: 80 88 60 04 btst 4, %g1 200e9bc: 12 80 00 04 bne 200e9cc 200e9c0: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 200e9c4: 81 c7 e0 08 ret 200e9c8: 91 e8 20 00 restore %g0, 0, %o0 200e9cc: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 200e9d0: c2 00 40 00 ld [ %g1 ], %g1 200e9d4: 80 a0 60 05 cmp %g1, 5 200e9d8: 12 bf ff fb bne 200e9c4 <== ALWAYS TAKEN 200e9dc: 03 00 80 6e sethi %hi(0x201b800), %g1 uint32_t count = the_jnode->info.linearfile.size; 200e9e0: d8 02 20 54 ld [ %o0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200e9e4: d6 02 20 58 ld [ %o0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 200e9e8: c0 22 20 50 clr [ %o0 + 0x50 ] <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 200e9ec: 82 10 63 0c or %g1, 0x30c, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200e9f0: c0 22 20 54 clr [ %o0 + 0x54 ] <== NOT EXECUTED if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 200e9f4: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 200e9f8: c0 22 20 58 clr [ %o0 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200e9fc: c0 22 20 5c clr [ %o0 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200ea00: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200ea04: 02 bf ff f0 be 200e9c4 <== NOT EXECUTED 200ea08: c0 22 20 60 clr [ %o0 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200ea0c: 92 10 20 00 clr %o1 <== NOT EXECUTED 200ea10: 7f ff ff 5c call 200e780 <== NOT EXECUTED 200ea14: 94 10 20 00 clr %o2 <== NOT EXECUTED return -1; 200ea18: 90 38 00 08 xnor %g0, %o0, %o0 <== NOT EXECUTED 200ea1c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200ea20: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED } return 0; } 200ea24: 81 c7 e0 08 ret <== NOT EXECUTED 200ea28: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003da8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003da8: 9d e3 bf 50 save %sp, -176, %sp int rv = 0; if ( 2003dac: 80 a6 e0 01 cmp %i3, 1 2003db0: 18 80 00 b2 bgu 2004078 2003db4: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 2003db8: 40 00 21 4e call 200c2f0 2003dbc: 90 10 00 1a mov %i2, %o0 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 2003dc0: a6 92 20 00 orcc %o0, 0, %l3 2003dc4: 02 80 00 ad be 2004078 2003dc8: a2 96 60 00 orcc %i1, 0, %l1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2003dcc: 12 80 00 04 bne 2003ddc 2003dd0: 01 00 00 00 nop 2003dd4: 23 00 80 6d sethi %hi(0x201b400), %l1 2003dd8: a2 14 63 18 or %l1, 0x318, %l1 ! 201b718 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003ddc: 40 00 34 8c call 201100c 2003de0: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003de4: 80 a6 20 00 cmp %i0, 0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003de8: ba 10 00 08 mov %o0, %i5 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003dec: 02 80 00 06 be 2003e04 2003df0: aa 02 20 01 add %o0, 1, %l5 2003df4: 40 00 34 86 call 201100c 2003df8: 90 10 00 18 mov %i0, %o0 2003dfc: 10 80 00 03 b 2003e08 2003e00: a0 02 20 01 add %o0, 1, %l0 2003e04: a0 10 20 00 clr %l0 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003e08: ba 07 60 65 add %i5, 0x65, %i5 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 2003e0c: 40 00 34 80 call 201100c 2003e10: 90 10 00 11 mov %l1, %o0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003e14: 92 07 40 10 add %i5, %l0, %o1 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 2003e18: a8 02 20 01 add %o0, 1, %l4 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003e1c: 90 10 20 01 mov 1, %o0 2003e20: 7f ff fd bb call 200350c 2003e24: 92 02 40 14 add %o1, %l4, %o1 if ( mt_entry != NULL ) { 2003e28: ba 92 20 00 orcc %o0, 0, %i5 2003e2c: 02 80 00 9b be 2004098 <== NEVER TAKEN 2003e30: a4 07 60 64 add %i5, 0x64, %l2 rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 2003e34: 92 10 00 1a mov %i2, %o1 2003e38: 94 10 00 15 mov %l5, %o2 2003e3c: 40 00 31 3e call 2010334 2003e40: 90 10 00 12 mov %l2, %o0 mt_entry->type = str; str += filesystemtype_size; 2003e44: b4 04 80 15 add %l2, %l5, %i2 memcpy( str, source_or_null, source_size ); 2003e48: 92 10 00 18 mov %i0, %o1 2003e4c: 94 10 00 10 mov %l0, %o2 (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 2003e50: e4 27 60 34 st %l2, [ %i5 + 0x34 ] str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 2003e54: 40 00 31 38 call 2010334 2003e58: 90 10 00 1a mov %i2, %o0 mt_entry->dev = str; str += source_size; 2003e5c: a0 06 80 10 add %i2, %l0, %l0 memcpy( str, target, target_size ); 2003e60: 92 10 00 11 mov %l1, %o1 2003e64: 94 10 00 14 mov %l4, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003e68: f4 27 60 38 st %i2, [ %i5 + 0x38 ] str += source_size; memcpy( str, target, target_size ); 2003e6c: 40 00 31 32 call 2010334 2003e70: 90 10 00 10 mov %l0, %o0 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003e74: 82 10 20 01 mov 1, %g1 2003e78: c2 2f 60 28 stb %g1, [ %i5 + 0x28 ] mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 2003e7c: 03 00 80 6d sethi %hi(0x201b400), %g1 2003e80: 82 10 63 1c or %g1, 0x31c, %g1 ! 201b71c 2003e84: c2 27 60 2c st %g1, [ %i5 + 0x2c ] mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003e88: 82 10 20 01 mov 1, %g1 + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = 2003e8c: ac 07 60 40 add %i5, 0x40, %l6 mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003e90: c2 27 60 58 st %g1, [ %i5 + 0x58 ] void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 2003e94: 90 07 60 14 add %i5, 0x14, %o0 2003e98: 92 10 00 16 mov %l6, %o1 2003e9c: 94 10 20 01 mov 1, %o2 2003ea0: 96 10 20 24 mov 0x24, %o3 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2003ea4: e0 27 60 30 st %l0, [ %i5 + 0x30 ] str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 2003ea8: ec 27 60 24 st %l6, [ %i5 + 0x24 ] 2003eac: 40 00 11 4e call 20083e4 <_Chain_Initialize> 2003eb0: fa 27 60 54 st %i5, [ %i5 + 0x54 ] filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003eb4: b6 0e e0 01 and %i3, 1, %i3 rv = (*fsmount_me_h)( mt_entry, data ); 2003eb8: 90 10 00 1d mov %i5, %o0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003ebc: f6 2f 60 29 stb %i3, [ %i5 + 0x29 ] rv = (*fsmount_me_h)( mt_entry, data ); 2003ec0: 9f c4 c0 00 call %l3 2003ec4: 92 10 00 1c mov %i4, %o1 if ( rv == 0 ) { 2003ec8: b0 92 20 00 orcc %o0, 0, %i0 2003ecc: 12 80 00 6f bne 2004088 2003ed0: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 2003ed4: 02 80 00 38 be 2003fb4 2003ed8: 92 10 00 19 mov %i1, %o1 { int rv = 0; rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_PERMS_RWX | RTEMS_FS_FOLLOW_LINK; rtems_filesystem_location_info_t *currentloc = 2003edc: 94 10 20 1f mov 0x1f, %o2 2003ee0: 40 00 02 fb call 2004acc 2003ee4: 90 07 bf c8 add %fp, -56, %o0 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 2003ee8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 return (*mt_entry->ops->are_nodes_equal_h)( 2003eec: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2003ef0: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 2003ef4: 9f c0 80 00 call %g2 2003ef8: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_root( currentloc ) ) { 2003efc: 80 8a 20 ff btst 0xff, %o0 2003f00: 12 80 00 22 bne 2003f88 2003f04: 92 07 bf e0 add %fp, -32, %o1 static inline void rtems_filesystem_eval_path_extract_currentloc( rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *get ) { rtems_filesystem_location_copy_and_detach( 2003f08: 40 00 03 eb call 2004eb4 2003f0c: 90 07 bf b0 add %fp, -80, %o0 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 2003f10: 40 00 04 62 call 2005098 2003f14: 90 07 bf b0 add %fp, -80, %o0 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 2003f18: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); mt_entry->mt_point_node = mt_point_node; 2003f1c: d0 27 60 20 st %o0, [ %i5 + 0x20 ] rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 2003f20: c2 00 60 0c ld [ %g1 + 0xc ], %g1 if ( !rtems_filesystem_location_is_root( currentloc ) ) { rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 2003f24: b8 10 00 08 mov %o0, %i4 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 2003f28: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2003f2c: 9f c0 40 00 call %g1 2003f30: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 2003f34: b0 92 20 00 orcc %o0, 0, %i0 2003f38: 12 80 00 11 bne 2003f7c 2003f3c: 92 10 20 00 clr %o1 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2003f40: 39 00 80 76 sethi %hi(0x201d800), %i4 2003f44: d0 07 21 58 ld [ %i4 + 0x158 ], %o0 ! 201d958 2003f48: 40 00 0e 70 call 2007908 2003f4c: 94 10 20 00 clr %o2 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2003f50: 03 00 80 73 sethi %hi(0x201cc00), %g1 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003f54: d0 07 21 58 ld [ %i4 + 0x158 ], %o0 2003f58: 82 10 62 f8 or %g1, 0x2f8, %g1 2003f5c: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003f60: 86 00 60 04 add %g1, 4, %g3 2003f64: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003f68: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2003f6c: fa 20 80 00 st %i5, [ %g2 ] 2003f70: 40 00 0e b0 call 2007a30 2003f74: c4 27 60 04 st %g2, [ %i5 + 4 ] 2003f78: 30 80 00 08 b,a 2003f98 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 2003f7c: 40 00 03 f3 call 2004f48 2003f80: 90 10 00 1c mov %i4, %o0 2003f84: 30 80 00 05 b,a 2003f98 } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 2003f88: 90 07 bf c8 add %fp, -56, %o0 2003f8c: 92 10 20 10 mov 0x10, %o1 2003f90: 40 00 02 39 call 2004874 2003f94: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2003f98: 40 00 03 09 call 2004bbc 2003f9c: 90 07 bf c8 add %fp, -56, %o0 rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 2003fa0: 80 a6 20 00 cmp %i0, 0 2003fa4: 02 80 00 42 be 20040ac 2003fa8: 01 00 00 00 nop (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 2003fac: 10 80 00 2f b 2004068 2003fb0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2003fb4: 03 00 80 76 sethi %hi(0x201d800), %g1 2003fb8: d0 00 61 58 ld [ %g1 + 0x158 ], %o0 ! 201d958 2003fbc: 92 10 20 00 clr %o1 2003fc0: 40 00 0e 52 call 2007908 2003fc4: 94 10 20 00 clr %o2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2003fc8: 05 00 80 73 sethi %hi(0x201cc00), %g2 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 2003fcc: c6 00 a2 f8 ld [ %g2 + 0x2f8 ], %g3 ! 201cef8 2003fd0: 82 10 a2 f8 or %g2, 0x2f8, %g1 2003fd4: 84 00 60 04 add %g1, 4, %g2 2003fd8: 80 a0 c0 02 cmp %g3, %g2 2003fdc: 12 80 00 08 bne 2003ffc <== NEVER TAKEN 2003fe0: 01 00 00 00 nop Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2003fe4: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003fe8: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003fec: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2003ff0: fa 20 80 00 st %i5, [ %g2 ] the_node->previous = old_last; 2003ff4: 10 80 00 06 b 200400c 2003ff8: c4 27 60 04 st %g2, [ %i5 + 4 ] rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 2003ffc: 40 00 2e 87 call 200fa18 <__errno> <== NOT EXECUTED 2004000: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004004: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2004008: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200400c: 03 00 80 76 sethi %hi(0x201d800), %g1 2004010: 40 00 0e 88 call 2007a30 2004014: d0 00 61 58 ld [ %g1 + 0x158 ], %o0 ! 201d958 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { 2004018: 80 a6 20 00 cmp %i0, 0 200401c: 32 80 00 13 bne,a 2004068 <== NEVER TAKEN 2004020: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 2004024: ba 07 60 24 add %i5, 0x24, %i5 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 2004028: 40 00 03 e9 call 2004fcc 200402c: 90 10 00 1d mov %i5, %o0 2004030: b6 10 00 08 mov %o0, %i3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 2004034: 40 00 03 e6 call 2004fcc 2004038: 90 10 00 1d mov %i5, %o0 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 200403c: 3b 00 80 73 sethi %hi(0x201cc00), %i5 rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 2004040: b8 10 00 08 mov %o0, %i4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2004044: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 2004048: 92 10 00 1b mov %i3, %o1 200404c: 40 00 03 d7 call 2004fa8 2004050: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 2004054: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 2004058: 40 00 03 d4 call 2004fa8 200405c: 92 10 00 1c mov %i4, %o1 2004060: 81 c7 e0 08 ret 2004064: 81 e8 00 00 restore } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 2004068: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 200406c: 9f c0 40 00 call %g1 2004070: 90 10 00 1d mov %i5, %o0 2004074: 30 80 00 05 b,a 2004088 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 2004078: 40 00 2e 68 call 200fa18 <__errno> 200407c: 01 00 00 00 nop 2004080: 10 80 00 09 b 20040a4 2004084: 82 10 20 16 mov 0x16, %g1 ! 16 (*mt_entry->ops->fsunmount_me_h)( mt_entry ); } } if ( rv != 0 ) { free( mt_entry ); 2004088: 7f ff fd d5 call 20037dc 200408c: 90 10 00 1d mov %i5, %o0 2004090: 81 c7 e0 08 ret 2004094: 81 e8 00 00 restore } } else { errno = ENOMEM; 2004098: 40 00 2e 60 call 200fa18 <__errno> <== NOT EXECUTED 200409c: 01 00 00 00 nop <== NOT EXECUTED 20040a0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20040a4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 20040a8: b0 10 3f ff mov -1, %i0 errno = EINVAL; rv = -1; } return rv; } 20040ac: 81 c7 e0 08 ret 20040b0: 81 e8 00 00 restore =============================================================================== 02008ae8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2008ae8: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 2008aec: 90 96 60 00 orcc %i1, 0, %o0 2008af0: 02 80 00 09 be 2008b14 2008af4: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2008af8: 40 00 02 e2 call 2009680 2008afc: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 2008b00: 80 a2 20 00 cmp %o0, 0 2008b04: 12 80 00 09 bne 2008b28 <== NEVER TAKEN 2008b08: 01 00 00 00 nop rv = mount( 2008b0c: 40 00 00 09 call 2008b30 2008b10: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 2008b14: 40 00 60 2a call 2020bbc <__errno> 2008b18: 01 00 00 00 nop 2008b1c: 82 10 20 16 mov 0x16, %g1 ! 16 2008b20: c2 22 00 00 st %g1, [ %o0 ] const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2008b24: 90 10 3f ff mov -1, %o0 } else { errno = EINVAL; } return rv; } 2008b28: 81 c7 e0 08 ret 2008b2c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02015ffc : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2015ffc: 9d e3 bf 00 save %sp, -256, %sp int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 2016000: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 2016004: 92 10 20 00 clr %o1 mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 2016008: f8 00 60 08 ld [ %g1 + 8 ], %i4 fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 201600c: 82 10 3f ff mov -1, %g1 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 2016010: 94 10 20 20 mov 0x20, %o2 2016014: c2 27 bf 78 st %g1, [ %fp + -136 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2016018: c2 27 bf 7c st %g1, [ %fp + -132 ] const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 201601c: e0 06 20 08 ld [ %i0 + 8 ], %l0 fat_file_fd_t *fat_fd = NULL; 2016020: c0 27 bf 6c clr [ %fp + -148 ] time_t time_ret = 0; uint16_t time_val = 0; 2016024: c0 37 bf 68 clrh [ %fp + -152 ] uint16_t date = 0; 2016028: c0 37 bf 6a clrh [ %fp + -150 ] static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 201602c: c0 27 bf 70 clr [ %fp + -144 ] dir_pos->sname.ofs = 0; 2016030: c0 27 bf 74 clr [ %fp + -140 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 2016034: 40 00 12 ed call 201abe8 2016038: 90 07 bf 80 add %fp, -128, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 201603c: 90 07 bf c0 add %fp, -64, %o0 2016040: 92 10 20 00 clr %o1 2016044: 40 00 12 e9 call 201abe8 2016048: 94 10 20 40 mov 0x40, %o2 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 201604c: 80 a6 e1 04 cmp %i3, 0x104 2016050: 24 80 00 06 ble,a 2016068 <== ALWAYS TAKEN 2016054: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 2016058: 40 00 0f f2 call 201a020 <__errno> <== NOT EXECUTED 201605c: 01 00 00 00 nop <== NOT EXECUTED 2016060: 10 80 00 0c b 2016090 <== NOT EXECUTED 2016064: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 2016068: 92 10 00 1b mov %i3, %o1 201606c: 94 07 bf 80 add %fp, -128, %o2 2016070: 40 00 01 45 call 2016584 2016074: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 2016078: a4 92 20 00 orcc %o0, 0, %l2 201607c: 32 80 00 08 bne,a 201609c <== ALWAYS TAKEN 2016080: c0 2f bf 8c clrb [ %fp + -116 ] rtems_set_errno_and_return_minus_one(EINVAL); 2016084: 40 00 0f e7 call 201a020 <__errno> <== NOT EXECUTED 2016088: 01 00 00 00 nop <== NOT EXECUTED 201608c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2016090: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2016094: 10 80 00 ce b 20163cc <== NOT EXECUTED 2016098: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 201609c: 40 00 16 c8 call 201bbbc