=============================================================================== 02005690 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2005690: 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, "...." ); 2005694: 35 00 80 82 sethi %hi(0x2020800), %i2 2005698: 39 00 80 8a sethi %hi(0x2022800), %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 200569c: 21 00 80 83 sethi %hi(0x2020c00), %l0 return; } puts(""); 20056a0: 23 00 80 82 sethi %hi(0x2020800), %l1 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 20056a4: 25 00 80 82 sethi %hi(0x2020800), %l2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20056a8: 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, "...." ); 20056ac: b4 16 a3 90 or %i2, 0x390, %i2 20056b0: b8 17 22 b8 or %i4, 0x2b8, %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20056b4: a0 14 20 00 mov %l0, %l0 return; } puts(""); 20056b8: a2 14 63 28 or %l1, 0x328, %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 ); 20056bc: 10 80 00 4d b 20057f0 20056c0: a4 14 a3 e8 or %l2, 0x3e8, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 20056c4: 90 10 00 1a mov %i2, %o0 20056c8: 40 00 35 87 call 2012ce4 20056cc: b6 06 e0 01 inc %i3 20056d0: 10 80 00 03 b 20056dc 20056d4: c2 07 00 00 ld [ %i4 ], %g1 20056d8: 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++ ) 20056dc: 80 a6 c0 19 cmp %i3, %i1 20056e0: 04 bf ff f9 ble 20056c4 20056e4: d2 00 60 08 ld [ %g1 + 8 ], %o1 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 20056e8: 40 00 35 7f call 2012ce4 20056ec: 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; 20056f0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 20056f4: d4 00 40 00 ld [ %g1 ], %o2 switch( IMFS_type( the_jnode ) ) { 20056f8: 80 a2 a0 06 cmp %o2, 6 20056fc: 38 80 00 2d bgu,a 20057b0 <== NEVER TAKEN 2005700: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 2005704: 95 2a a0 02 sll %o2, 2, %o2 2005708: 03 00 80 15 sethi %hi(0x2005400), %g1 200570c: 82 10 62 74 or %g1, 0x274, %g1 ! 2005674 2005710: c2 00 40 0a ld [ %g1 + %o2 ], %g1 2005714: 81 c0 40 00 jmp %g1 2005718: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 200571c: c2 07 00 00 ld [ %i4 ], %g1 2005720: 90 10 20 2f mov 0x2f, %o0 2005724: 40 00 35 3c call 2012c14 2005728: d2 00 60 08 ld [ %g1 + 8 ], %o1 200572c: 30 80 00 26 b,a 20057c4 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2005730: c2 07 00 00 ld [ %i4 ], %g1 2005734: 13 00 80 82 sethi %hi(0x2020800), %o1 2005738: d0 00 60 08 ld [ %g1 + 8 ], %o0 200573c: 92 12 63 98 or %o1, 0x398, %o1 2005740: 10 80 00 08 b 2005760 2005744: 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)", 2005748: c2 07 00 00 ld [ %i4 ], %g1 200574c: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005750: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005754: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 2005758: 13 00 80 82 sethi %hi(0x2020800), %o1 200575c: 92 12 63 b0 or %o1, 0x3b0, %o1 ! 2020bb0 2005760: 40 00 35 11 call 2012ba4 2005764: 01 00 00 00 nop 2005768: 30 80 00 17 b,a 20057c4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 200576c: c2 07 00 00 ld [ %i4 ], %g1 2005770: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005774: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005778: 13 00 80 82 sethi %hi(0x2020800), %o1 200577c: 40 00 35 0a call 2012ba4 2005780: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 2020bc0 2005784: 30 80 00 10 b,a 20057c4 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005788: 11 00 80 82 sethi %hi(0x2020800), %o0 200578c: c2 07 00 00 ld [ %i4 ], %g1 2005790: 10 80 00 04 b 20057a0 2005794: 90 12 23 d0 or %o0, 0x3d0, %o0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005798: c2 07 00 00 ld [ %i4 ], %g1 200579c: 90 10 00 12 mov %l2, %o0 20057a0: 40 00 35 51 call 2012ce4 20057a4: 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; 20057a8: 10 80 00 0a b 20057d0 20057ac: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20057b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20057b4: 40 00 34 fc call 2012ba4 <== NOT EXECUTED 20057b8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20057bc: 10 80 00 05 b 20057d0 <== NOT EXECUTED 20057c0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED return; } puts(""); 20057c4: 40 00 3c 2f call 2014880 20057c8: 90 10 00 11 mov %l1, %o0 20057cc: 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 ) ) 20057d0: c2 00 40 00 ld [ %g1 ], %g1 20057d4: 80 a0 60 00 cmp %g1, 0 20057d8: 32 80 00 06 bne,a 20057f0 20057dc: fa 07 40 00 ld [ %i5 ], %i5 IMFS_dump_directory( the_jnode, level + 1 ); 20057e0: 90 10 00 1d mov %i5, %o0 20057e4: 7f ff ff ab call 2005690 20057e8: 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 ) { 20057ec: 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 )); 20057f0: 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 ); 20057f4: 80 a7 40 01 cmp %i5, %g1 20057f8: 12 bf ff b8 bne 20056d8 20057fc: 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 ); } } 2005800: 81 c7 e0 08 ret 2005804: 81 e8 00 00 restore =============================================================================== 0200b674 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b674: 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; 200b678: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200b67c: 90 10 00 18 mov %i0, %o0 200b680: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200b684: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200b688: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 200b68c: 40 00 02 dc call 200c1fc 200b690: 92 10 20 01 mov 1, %o1 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200b694: 80 8a 20 ff btst 0xff, %o0 200b698: 12 80 00 04 bne 200b6a8 200b69c: 80 a6 e0 01 cmp %i3, 1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b6a0: 81 c7 e0 08 ret 200b6a4: 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] == '.'; 200b6a8: 12 80 00 06 bne 200b6c0 200b6ac: 82 10 20 00 clr %g1 200b6b0: c2 4e 80 00 ldsb [ %i2 ], %g1 200b6b4: 82 18 60 2e xor %g1, 0x2e, %g1 200b6b8: 80 a0 00 01 cmp %g0, %g1 200b6bc: 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 ) ) { 200b6c0: 80 a0 60 00 cmp %g1, 0 200b6c4: 12 80 00 2b bne 200b770 200b6c8: 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] == '.'; 200b6cc: 12 80 00 0b bne 200b6f8 200b6d0: 80 a0 60 00 cmp %g1, 0 200b6d4: c4 4e 80 00 ldsb [ %i2 ], %g2 200b6d8: 80 a0 a0 2e cmp %g2, 0x2e 200b6dc: 12 80 00 07 bne 200b6f8 200b6e0: 80 a0 60 00 cmp %g1, 0 200b6e4: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200b6e8: 82 18 60 2e xor %g1, 0x2e, %g1 200b6ec: 80 a0 00 01 cmp %g0, %g1 200b6f0: 82 60 3f ff subx %g0, -1, %g1 return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { 200b6f4: 80 a0 60 00 cmp %g1, 0 200b6f8: 22 80 00 04 be,a 200b708 200b6fc: fa 07 20 50 ld [ %i4 + 0x50 ], %i5 return dir->Parent; 200b700: 10 80 00 17 b 200b75c 200b704: 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 ); 200b708: 10 80 00 10 b 200b748 200b70c: 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 200b710: 92 10 00 1a mov %i2, %o1 200b714: 40 00 12 26 call 200ffac 200b718: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200b71c: 80 a2 20 00 cmp %o0, 0 200b720: 12 80 00 06 bne 200b738 200b724: 82 10 20 00 clr %g1 200b728: 82 07 40 1b add %i5, %i3, %g1 200b72c: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200b730: 80 a0 00 01 cmp %g0, %g1 200b734: 82 60 3f ff subx %g0, -1, %g1 if ( match ) { 200b738: 80 a0 60 00 cmp %g1, 0 200b73c: 12 80 00 09 bne 200b760 200b740: 80 a7 60 00 cmp %i5, 0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 200b744: 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 ) { 200b748: 80 a7 40 19 cmp %i5, %i1 200b74c: 12 bf ff f1 bne 200b710 200b750: 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; 200b754: 81 c7 e0 08 ret 200b758: 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 ) { 200b75c: 80 a7 60 00 cmp %i5, 0 200b760: 32 80 00 06 bne,a 200b778 200b764: 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; 200b768: 81 c7 e0 08 ret 200b76c: 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 ) ) { 200b770: 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 ); 200b774: 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; 200b778: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200b77c: 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; 200b780: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200b784: 84 60 3f ff subx %g0, -1, %g2 200b788: 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; 200b78c: 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)) { 200b790: 80 a0 60 02 cmp %g1, 2 200b794: 12 80 00 0a bne 200b7bc 200b798: 88 10 00 02 mov %g2, %g4 200b79c: 80 a0 a0 00 cmp %g2, 0 200b7a0: 22 80 00 2b be,a 200b84c 200b7a4: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 200b7a8: 80 88 e0 08 btst 8, %g3 200b7ac: 22 80 00 29 be,a 200b850 200b7b0: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 entry = entry->info.hard_link.link_node; 200b7b4: 10 80 00 26 b 200b84c 200b7b8: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200b7bc: 80 a0 60 03 cmp %g1, 3 200b7c0: 12 80 00 10 bne 200b800 200b7c4: 80 a0 60 00 cmp %g1, 0 200b7c8: 80 a0 a0 00 cmp %g2, 0 200b7cc: 02 80 00 04 be 200b7dc 200b7d0: 80 88 e0 10 btst 0x10, %g3 200b7d4: 22 80 00 1f be,a 200b850 200b7d8: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 const char *target = entry->info.sym_link.name; 200b7dc: fa 07 60 50 ld [ %i5 + 0x50 ], %i5 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 200b7e0: 40 00 11 c1 call 200fee4 200b7e4: 90 10 00 1d mov %i5, %o0 200b7e8: 92 10 00 1d mov %i5, %o1 200b7ec: 94 10 00 08 mov %o0, %o2 200b7f0: 7f ff e4 80 call 20049f0 200b7f4: 90 10 00 18 mov %i0, %o0 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b7f8: 81 c7 e0 08 ret 200b7fc: 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 ) { 200b800: 32 80 00 14 bne,a 200b850 200b804: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 if ( node->info.directory.mt_fs != NULL ) { 200b808: d2 07 60 5c ld [ %i5 + 0x5c ], %o1 200b80c: 80 a2 60 00 cmp %o1, 0 200b810: 02 80 00 0f be 200b84c 200b814: 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( 200b818: d4 07 60 30 ld [ %i5 + 0x30 ], %o2 200b81c: d6 17 60 3c lduh [ %i5 + 0x3c ], %o3 200b820: 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; 200b824: 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( 200b828: 40 00 02 75 call 200c1fc 200b82c: 92 10 20 01 mov 1, %o1 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200b830: 80 8a 20 ff btst 0xff, %o0 200b834: 02 80 00 04 be 200b844 <== NEVER TAKEN 200b838: 90 10 00 18 mov %i0, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200b83c: 7f ff e4 54 call 200498c 200b840: 92 10 00 1c mov %i4, %o1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b844: 81 c7 e0 08 ret 200b848: 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; 200b84c: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 200b850: 82 00 7f ff add %g1, -1, %g1 200b854: c2 37 20 34 sth %g1, [ %i4 + 0x34 ] ++entry->reference_count; 200b858: c2 17 60 34 lduh [ %i5 + 0x34 ], %g1 200b85c: 82 00 60 01 inc %g1 200b860: 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; 200b864: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 currentloc->node_access = entry; 200b868: fa 26 20 20 st %i5, [ %i0 + 0x20 ] 200b86c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200b870: c2 26 20 28 st %g1, [ %i0 + 0x28 ] void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b874: b0 09 20 ff and %g4, 0xff, %i0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200b878: 81 c7 e0 08 ret 200b87c: 81 e8 00 00 restore =============================================================================== 0200374c : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200374c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2003750: fa 06 20 1c ld [ %i0 + 0x1c ], %i5 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 2003754: 96 10 00 18 mov %i0, %o3 2003758: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 200375c: 92 10 00 19 mov %i1, %o1 2003760: 40 00 2a 4b call 200e08c 2003764: 94 10 00 1a mov %i2, %o2 if (err > 0) { 2003768: b0 92 20 00 orcc %o0, 0, %i0 200376c: 04 80 00 09 ble 2003790 2003770: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 2003774: 40 00 04 0a call 200479c 2003778: 92 10 20 00 clr %o1 200377c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003780: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2003784: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003788: 81 c7 e0 08 ret 200378c: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003790: 80 a6 20 00 cmp %i0, 0 2003794: 02 80 00 06 be 20037ac <== NEVER TAKEN 2003798: 01 00 00 00 nop 200379c: 40 00 32 a0 call 201021c <__errno> 20037a0: b0 20 00 18 neg %i0 20037a4: f0 22 00 00 st %i0, [ %o0 ] 20037a8: b0 10 3f ff mov -1, %i0 } 20037ac: 81 c7 e0 08 ret 20037b0: 81 e8 00 00 restore =============================================================================== 0200b8d0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200b8d0: 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; 200b8d4: f6 06 20 24 ld [ %i0 + 0x24 ], %i3 200b8d8: b8 07 bf e8 add %fp, -24, %i4 200b8dc: 92 10 00 1b mov %i3, %o1 200b8e0: 90 10 00 1c mov %i4, %o0 200b8e4: 40 00 0e 4a call 200f20c 200b8e8: 94 10 20 18 mov 0x18, %o2 jnode = (IMFS_jnode_t *)loc.node_access; 200b8ec: 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; 200b8f0: c0 26 e0 08 clr [ %i3 + 8 ] 200b8f4: b6 10 00 1c mov %i4, %i3 200b8f8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 do { next = jnode->Parent; 200b8fc: f8 07 60 08 ld [ %i5 + 8 ], %i4 200b900: 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 ) ) { 200b904: 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; 200b908: fa 27 bf f0 st %i5, [ %fp + -16 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200b90c: 80 a0 60 00 cmp %g1, 0 200b910: 12 80 00 07 bne 200b92c 200b914: c4 27 bf f8 st %g2, [ %fp + -8 ] 200b918: 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 ); 200b91c: 82 07 60 54 add %i5, 0x54, %g1 200b920: 80 a0 80 01 cmp %g2, %g1 200b924: 32 80 00 10 bne,a 200b964 200b928: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 result = IMFS_rmnod( NULL, &loc ); 200b92c: 90 10 20 00 clr %o0 200b930: 7f ff dd d4 call 2003080 200b934: 92 10 00 1b mov %i3, %o1 if ( result != 0 ) 200b938: 80 a2 20 00 cmp %o0, 0 200b93c: 02 80 00 04 be 200b94c <== ALWAYS TAKEN 200b940: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 rtems_fatal_error_occurred( 0xdeadbeef ); 200b944: 7f ff f1 3b call 2007e30 <== NOT EXECUTED 200b948: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED IMFS_node_destroy( jnode ); 200b94c: 7f ff dc fb call 2002d38 200b950: 90 10 00 1d mov %i5, %o0 jnode = next; } if ( jnode != NULL ) { 200b954: 80 a7 20 00 cmp %i4, 0 200b958: 02 80 00 0e be 200b990 200b95c: 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; 200b960: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if ( IMFS_is_directory( jnode ) ) { 200b964: c2 00 40 00 ld [ %g1 ], %g1 200b968: 80 a0 60 00 cmp %g1, 0 200b96c: 32 bf ff e4 bne,a 200b8fc <== NEVER TAKEN 200b970: 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; 200b974: 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 ); 200b978: 84 07 60 54 add %i5, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200b97c: 80 a0 40 02 cmp %g1, %g2 200b980: 02 bf ff de be 200b8f8 200b984: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200b988: 12 bf ff dc bne 200b8f8 <== ALWAYS TAKEN 200b98c: ba 10 00 01 mov %g1, %i5 200b990: 81 c7 e0 08 ret 200b994: 81 e8 00 00 restore =============================================================================== 02002c2c : 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] ) { 2002c2c: 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 ) ); 2002c30: 90 10 20 01 mov 1, %o0 2002c34: 40 00 01 ac call 20032e4 2002c38: 92 10 20 24 mov 0x24, %o1 if ( fs_info != NULL ) { 2002c3c: ba 92 20 00 orcc %o0, 0, %i5 2002c40: 02 80 00 24 be 2002cd0 2002c44: 03 00 80 6f sethi %hi(0x201bc00), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002c48: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 201bc64 memcpy( 2002c4c: 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++; 2002c50: c4 27 40 00 st %g2, [ %i5 ] 2002c54: 84 00 a0 01 inc %g2 memcpy( 2002c58: 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++; 2002c5c: c4 20 60 64 st %g2, [ %g1 + 0x64 ] memcpy( 2002c60: 40 00 31 6b call 200f20c 2002c64: 90 07 60 08 add %i5, 8, %o0 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 2002c68: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002c6c: 90 10 00 1d mov %i5, %o0 2002c70: 15 00 80 66 sethi %hi(0x2019800), %o2 2002c74: 96 10 20 00 clr %o3 2002c78: 94 12 a2 28 or %o2, 0x228, %o2 2002c7c: 19 00 00 10 sethi %hi(0x4000), %o4 2002c80: 9a 10 20 00 clr %o5 2002c84: 40 00 22 30 call 200b544 2002c88: 98 13 21 ed or %o4, 0x1ed, %o4 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 2002c8c: 80 a2 20 00 cmp %o0, 0 2002c90: 02 80 00 10 be 2002cd0 <== NEVER TAKEN 2002c94: 03 00 80 68 sethi %hi(0x201a000), %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; 2002c98: 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; 2002c9c: 82 10 63 0c or %g1, 0x30c, %g1 2002ca0: c4 00 a0 04 ld [ %g2 + 4 ], %g2 2002ca4: c2 26 20 2c st %g1, [ %i0 + 0x2c ] mt_entry->mt_fs_root->location.node_access = root_node; 2002ca8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 2002cac: fa 26 20 08 st %i5, [ %i0 + 8 ] mt_entry->ops = op_table; 2002cb0: f2 26 20 0c st %i1, [ %i0 + 0xc ] 2002cb4: 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; 2002cb8: d0 20 60 08 st %o0, [ %g1 + 8 ] errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002cbc: 86 10 20 06 mov 6, %g3 2002cc0: 03 00 80 6d sethi %hi(0x201b400), %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002cc4: 84 10 20 10 mov 0x10, %g2 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002cc8: 10 80 00 08 b 2002ce8 2002ccc: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002cd0: 40 00 2e fe call 200e8c8 <__errno> 2002cd4: b0 10 3f ff mov -1, %i0 2002cd8: 82 10 20 0c mov 0xc, %g1 2002cdc: c2 22 00 00 st %g1, [ %o0 ] 2002ce0: 81 c7 e0 08 ret 2002ce4: 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) { 2002ce8: 80 a0 80 01 cmp %g2, %g1 2002cec: 22 80 00 09 be,a 2002d10 2002cf0: 05 00 80 6f sethi %hi(0x201bc00), %g2 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002cf4: 34 80 00 06 bg,a 2002d0c 2002cf8: 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) { 2002cfc: 86 80 ff ff addcc %g3, -1, %g3 2002d00: 12 bf ff fa bne 2002ce8 <== ALWAYS TAKEN 2002d04: 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); 2002d08: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002d0c: 05 00 80 6f sethi %hi(0x201bc00), %g2 2002d10: c2 20 a0 60 st %g1, [ %g2 + 0x60 ] ! 201bc60 2002d14: b0 10 20 00 clr %i0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 2002d18: 81 c7 e0 08 ret 2002d1c: 81 e8 00 00 restore =============================================================================== 02004874 : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 2004874: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 2004878: 03 00 80 7f sethi %hi(0x201fc00), %g1 200487c: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 201ffd4 switch (mode & S_IFMT) { 2004880: 05 00 00 08 sethi %hi(0x2000), %g2 void *context ) { int rv = 0; mode &= ~rtems_filesystem_umask; 2004884: c2 00 60 08 ld [ %g1 + 8 ], %g1 2004888: b2 2e 40 01 andn %i1, %g1, %i1 switch (mode & S_IFMT) { 200488c: 03 00 00 3c sethi %hi(0xf000), %g1 2004890: 82 0e 40 01 and %i1, %g1, %g1 2004894: 80 a0 40 02 cmp %g1, %g2 2004898: 22 80 00 3a be,a 2004980 200489c: c2 06 80 00 ld [ %i2 ], %g1 20048a0: 38 80 00 04 bgu,a 20048b0 <== ALWAYS TAKEN 20048a4: 05 00 00 18 sethi %hi(0x6000), %g2 20048a8: 10 80 00 05 b 20048bc <== NOT EXECUTED 20048ac: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 20048b0: 80 a0 40 02 cmp %g1, %g2 20048b4: 02 80 00 32 be 200497c 20048b8: 05 00 00 20 sethi %hi(0x8000), %g2 20048bc: 80 a0 40 02 cmp %g1, %g2 20048c0: 22 80 00 30 be,a 2004980 <== NEVER TAKEN 20048c4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20048c8: 30 80 00 27 b,a 2004964 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 = 20048cc: 94 10 20 78 mov 0x78, %o2 20048d0: 40 00 07 fa call 20068b8 20048d4: 90 07 bf c8 add %fp, -56, %o0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 20048d8: 7f ff ff d5 call 200482c 20048dc: ba 10 00 08 mov %o0, %i5 20048e0: 80 8a 20 ff btst 0xff, %o0 20048e4: 02 80 00 19 be 2004948 20048e8: 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( 20048ec: 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; 20048f0: f6 27 bf b0 st %i3, [ %fp + -80 ] new_node = IMFS_create_node_with_control( 20048f4: 90 10 00 1d mov %i5, %o0 20048f8: 92 10 00 1a mov %i2, %o1 20048fc: 98 10 00 19 mov %i1, %o4 2004900: 9a 07 bf b0 add %fp, -80, %o5 2004904: 40 00 2d 32 call 200fdcc 2004908: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 200490c: 80 a2 20 00 cmp %o0, 0 2004910: 02 80 00 11 be 2004954 2004914: 92 10 20 00 clr %o1 IMFS_jnode_t *parent = currentloc->node_access; 2004918: fa 07 60 08 ld [ %i5 + 8 ], %i5 IMFS_update_ctime( parent ); 200491c: 40 00 02 90 call 200535c 2004920: 90 07 bf a8 add %fp, -88, %o0 2004924: c2 07 bf a8 ld [ %fp + -88 ], %g1 IMFS_update_mtime( parent ); 2004928: 90 07 bf a8 add %fp, -88, %o0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 200492c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 2004930: 40 00 02 8b call 200535c 2004934: 92 10 20 00 clr %o1 2004938: c2 07 bf a8 ld [ %fp + -88 ], %g1 200493c: b0 10 20 00 clr %i0 2004940: 10 80 00 05 b 2004954 2004944: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 2004948: 92 10 20 86 mov 0x86, %o1 200494c: 40 00 07 45 call 2006660 2004950: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2004954: 40 00 08 15 call 20069a8 2004958: 90 07 bf c8 add %fp, -56, %o0 200495c: 81 c7 e0 08 ret 2004960: 81 e8 00 00 restore } else { errno = EINVAL; 2004964: 40 00 3a 3a call 201324c <__errno> 2004968: b0 10 3f ff mov -1, %i0 200496c: 82 10 20 16 mov 0x16, %g1 2004970: c2 22 00 00 st %g1, [ %o0 ] 2004974: 81 c7 e0 08 ret 2004978: 81 e8 00 00 restore rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 200497c: c2 06 80 00 ld [ %i2 ], %g1 2004980: 80 a0 60 07 cmp %g1, 7 2004984: 02 bf ff d2 be 20048cc 2004988: 92 10 00 18 mov %i0, %o1 200498c: 30 bf ff f6 b,a 2004964 =============================================================================== 0200d87c : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 200d87c: 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 ); 200d880: 94 10 20 01 mov 1, %o2 200d884: 90 10 00 18 mov %i0, %o0 200d888: 7f ff fe d7 call 200d3e4 200d88c: 92 10 00 19 mov %i1, %o1 if ( *block_entry_ptr ) 200d890: 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 ); 200d894: ba 10 00 08 mov %o0, %i5 if ( *block_entry_ptr ) 200d898: 80 a0 60 00 cmp %g1, 0 200d89c: 12 80 00 08 bne 200d8bc 200d8a0: b0 10 20 00 clr %i0 return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 200d8a4: 7f ff fe c3 call 200d3b0 200d8a8: 01 00 00 00 nop if ( !memory ) 200d8ac: 80 a2 20 00 cmp %o0, 0 200d8b0: 22 80 00 03 be,a 200d8bc <== NEVER TAKEN 200d8b4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; *block_entry_ptr = memory; 200d8b8: d0 27 40 00 st %o0, [ %i5 ] return 0; 200d8bc: 81 c7 e0 08 ret 200d8c0: 81 e8 00 00 restore =============================================================================== 0200da90 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 200da90: 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 ) 200da94: 03 00 80 6f sethi %hi(0x201bc00), %g1 200da98: fa 00 60 60 ld [ %g1 + 0x60 ], %i5 ! 201bc60 200da9c: b9 37 60 02 srl %i5, 2, %i4 200daa0: 92 10 00 1c mov %i4, %o1 200daa4: 40 00 26 ee call 201765c <.umul> 200daa8: 90 07 20 01 add %i4, 1, %o0 200daac: 92 10 00 1c mov %i4, %o1 200dab0: 40 00 26 eb call 201765c <.umul> 200dab4: 90 02 20 01 inc %o0 200dab8: 92 10 00 1d mov %i5, %o1 200dabc: 40 00 26 e8 call 201765c <.umul> 200dac0: 90 02 3f ff add %o0, -1, %o0 200dac4: 82 10 20 00 clr %g1 200dac8: 80 a0 40 1a cmp %g1, %i2 200dacc: 34 80 00 0b bg,a 200daf8 <== NEVER TAKEN 200dad0: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 <== NOT EXECUTED 200dad4: 80 a0 40 1a cmp %g1, %i2 200dad8: 12 80 00 04 bne 200dae8 <== NEVER TAKEN 200dadc: 80 a2 00 1b cmp %o0, %i3 200dae0: 38 80 00 06 bgu,a 200daf8 200dae4: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EFBIG ); 200dae8: 40 00 03 78 call 200e8c8 <__errno> 200daec: 01 00 00 00 nop 200daf0: 10 80 00 3c b 200dbe0 200daf4: 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 ) 200daf8: 80 a6 80 1c cmp %i2, %i4 200dafc: 14 80 00 07 bg 200db18 <== NEVER TAKEN 200db00: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200db04: 80 a6 80 1c cmp %i2, %i4 200db08: 12 80 00 48 bne 200dc28 <== NEVER TAKEN 200db0c: 80 a6 c0 10 cmp %i3, %l0 200db10: 08 80 00 46 bleu 200dc28 <== NEVER TAKEN 200db14: 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; 200db18: a3 3f 60 1f sra %i5, 0x1f, %l1 200db1c: 96 10 00 1d mov %i5, %o3 200db20: 94 10 00 11 mov %l1, %o2 200db24: 90 10 00 1a mov %i2, %o0 200db28: 40 00 28 5f call 2017ca4 <__divdi3> 200db2c: 92 10 00 1b mov %i3, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200db30: 94 10 00 11 mov %l1, %o2 200db34: 90 10 00 1c mov %i4, %o0 200db38: 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; 200db3c: a4 10 00 09 mov %o1, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200db40: 40 00 28 59 call 2017ca4 <__divdi3> 200db44: 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++ ) { 200db48: 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; 200db4c: 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; 200db50: 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; 200db54: 27 00 80 6f sethi %hi(0x201bc00), %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; 200db58: 40 00 26 c1 call 201765c <.umul> 200db5c: 92 10 00 1d mov %i5, %o1 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200db60: 10 80 00 23 b 200dbec 200db64: a0 24 00 08 sub %l0, %o0, %l0 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 200db68: 7f ff ff 45 call 200d87c 200db6c: 92 10 00 1d mov %i5, %o1 200db70: 80 a2 20 00 cmp %o0, 0 200db74: 12 80 00 15 bne 200dbc8 <== NEVER TAKEN 200db78: 80 a6 60 00 cmp %i1, 0 if ( zero_fill ) { 200db7c: 22 80 00 1c be,a 200dbec 200db80: a2 04 60 01 inc %l1 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 200db84: e8 04 e0 60 ld [ %l3 + 0x60 ], %l4 block_p *block_ptr = 200db88: 92 10 00 1d mov %i5, %o1 200db8c: 94 10 20 00 clr %o2 200db90: 7f ff fe 15 call 200d3e4 200db94: 90 10 00 18 mov %i0, %o0 IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 200db98: 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; 200db9c: 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); 200dba0: 90 02 00 10 add %o0, %l0, %o0 200dba4: 92 10 20 00 clr %o1 200dba8: 94 10 00 14 mov %l4, %o2 200dbac: 40 00 05 d5 call 200f300 200dbb0: a0 10 20 00 clr %l0 200dbb4: 10 80 00 0e b 200dbec 200dbb8: a2 04 60 01 inc %l1 offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 200dbbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200dbc0: 7f ff ff a8 call 200da60 <== NOT EXECUTED 200dbc4: ba 07 7f ff add %i5, -1, %i5 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 200dbc8: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 200dbcc: 1a bf ff fc bcc 200dbbc <== NOT EXECUTED 200dbd0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200dbd4: 40 00 03 3d call 200e8c8 <__errno> <== NOT EXECUTED 200dbd8: 01 00 00 00 nop <== NOT EXECUTED 200dbdc: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 200dbe0: c2 22 00 00 st %g1, [ %o0 ] 200dbe4: 81 c7 e0 08 ret 200dbe8: 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( 200dbec: 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++ ) { 200dbf0: 80 a7 40 12 cmp %i5, %l2 200dbf4: 08 bf ff dd bleu 200db68 200dbf8: 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); 200dbfc: 92 10 20 00 clr %o1 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200dc00: f4 3e 20 50 std %i2, [ %i0 + 0x50 ] IMFS_update_ctime(the_jnode); 200dc04: 7f ff d6 95 call 2003658 200dc08: 90 07 bf f8 add %fp, -8, %o0 200dc0c: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200dc10: 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); 200dc14: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200dc18: 7f ff d6 90 call 2003658 200dc1c: 92 10 20 00 clr %o1 200dc20: c2 07 bf f8 ld [ %fp + -8 ], %g1 200dc24: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 200dc28: 81 c7 e0 08 ret 200dc2c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d3e4 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200d3e4: 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 ) { 200d3e8: 03 00 80 6f sethi %hi(0x201bc00), %g1 200d3ec: fa 00 60 60 ld [ %g1 + 0x60 ], %i5 ! 201bc60 200d3f0: bb 37 60 02 srl %i5, 2, %i5 200d3f4: 82 07 7f ff add %i5, -1, %g1 200d3f8: 80 a6 40 01 cmp %i1, %g1 200d3fc: 18 80 00 18 bgu 200d45c 200d400: 90 07 60 01 add %i5, 1, %o0 p = info->indirect; if ( malloc_it ) { 200d404: 80 a6 a0 00 cmp %i2, 0 200d408: 02 80 00 10 be 200d448 200d40c: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200d410: 80 a0 60 00 cmp %g1, 0 200d414: 32 80 00 0a bne,a 200d43c 200d418: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 p = memfile_alloc_block(); 200d41c: 7f ff ff e5 call 200d3b0 200d420: 01 00 00 00 nop if ( !p ) 200d424: 80 a2 20 00 cmp %o0, 0 200d428: 32 80 00 04 bne,a 200d438 <== ALWAYS TAKEN 200d42c: d0 26 20 58 st %o0, [ %i0 + 0x58 ] return 0; 200d430: 81 c7 e0 08 ret <== NOT EXECUTED 200d434: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; 200d438: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 200d43c: b3 2e 60 02 sll %i1, 2, %i1 200d440: 81 c7 e0 08 ret 200d444: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200d448: 80 a0 60 00 cmp %g1, 0 200d44c: 02 bf ff f9 be 200d430 <== NEVER TAKEN 200d450: b3 2e 60 02 sll %i1, 2, %i1 return 0; return &info->indirect[ my_block ]; 200d454: 81 c7 e0 08 ret 200d458: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200d45c: 40 00 28 80 call 201765c <.umul> 200d460: 92 10 00 1d mov %i5, %o1 200d464: 82 02 3f ff add %o0, -1, %g1 200d468: 80 a6 40 01 cmp %i1, %g1 200d46c: 18 80 00 2c bgu 200d51c 200d470: b8 10 00 08 mov %o0, %i4 my_block -= FIRST_DOUBLY_INDIRECT; 200d474: b2 26 40 1d sub %i1, %i5, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d478: 92 10 00 1d mov %i5, %o1 200d47c: 40 00 29 5e call 20179f4 <.urem> 200d480: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d484: 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; 200d488: b8 10 00 08 mov %o0, %i4 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d48c: 40 00 28 ae call 2017744 <.udiv> 200d490: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200d494: 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; 200d498: ba 10 00 08 mov %o0, %i5 p = info->doubly_indirect; if ( malloc_it ) { 200d49c: 02 80 00 17 be 200d4f8 200d4a0: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200d4a4: 80 a2 20 00 cmp %o0, 0 200d4a8: 12 80 00 08 bne 200d4c8 200d4ac: bb 2f 60 02 sll %i5, 2, %i5 p = memfile_alloc_block(); 200d4b0: 7f ff ff c0 call 200d3b0 200d4b4: 01 00 00 00 nop if ( !p ) 200d4b8: 80 a2 20 00 cmp %o0, 0 200d4bc: 02 bf ff dd be 200d430 <== NEVER TAKEN 200d4c0: 01 00 00 00 nop return 0; info->doubly_indirect = p; 200d4c4: d0 26 20 5c st %o0, [ %i0 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200d4c8: b6 02 00 1d add %o0, %i5, %i3 200d4cc: d0 02 00 1d ld [ %o0 + %i5 ], %o0 if ( !p1 ) { 200d4d0: 80 a2 20 00 cmp %o0, 0 200d4d4: 12 80 00 4a bne 200d5fc 200d4d8: b1 2f 20 02 sll %i4, 2, %i0 p1 = memfile_alloc_block(); 200d4dc: 7f ff ff b5 call 200d3b0 200d4e0: 01 00 00 00 nop if ( !p1 ) 200d4e4: 80 a2 20 00 cmp %o0, 0 200d4e8: 02 bf ff d2 be 200d430 <== NEVER TAKEN 200d4ec: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200d4f0: 10 80 00 43 b 200d5fc 200d4f4: d0 26 c0 00 st %o0, [ %i3 ] } return (block_p *)&p1[ singly ]; } if ( !p ) 200d4f8: 80 a2 20 00 cmp %o0, 0 200d4fc: 02 bf ff cd be 200d430 <== NEVER TAKEN 200d500: bb 2f 60 02 sll %i5, 2, %i5 return 0; p = (block_p *)p[ doubly ]; 200d504: c2 02 00 1d ld [ %o0 + %i5 ], %g1 if ( !p ) 200d508: 80 a0 60 00 cmp %g1, 0 200d50c: 02 bf ff c9 be 200d430 <== NEVER TAKEN 200d510: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200d514: 10 80 00 48 b 200d634 200d518: b1 2f 20 02 sll %i4, 2, %i0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200d51c: 90 02 20 01 inc %o0 200d520: 40 00 28 4f call 201765c <.umul> 200d524: 92 10 00 1d mov %i5, %o1 200d528: 90 02 3f ff add %o0, -1, %o0 200d52c: 80 a6 40 08 cmp %i1, %o0 200d530: 18 bf ff c0 bgu 200d430 <== NEVER TAKEN 200d534: b2 26 40 1c sub %i1, %i4, %i1 my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d538: 92 10 00 1d mov %i5, %o1 200d53c: 40 00 29 2e call 20179f4 <.urem> 200d540: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d544: 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; 200d548: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d54c: 40 00 28 7e call 2017744 <.udiv> 200d550: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200d554: 92 10 00 1d mov %i5, %o1 200d558: 40 00 28 7b call 2017744 <.udiv> 200d55c: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d560: 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; 200d564: b8 10 00 08 mov %o0, %i4 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d568: 40 00 29 23 call 20179f4 <.urem> 200d56c: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200d570: 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; 200d574: ba 10 00 08 mov %o0, %i5 p = info->triply_indirect; if ( malloc_it ) { 200d578: 02 80 00 23 be 200d604 200d57c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 if ( !p ) { 200d580: 80 a2 20 00 cmp %o0, 0 200d584: 12 80 00 08 bne 200d5a4 200d588: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200d58c: 7f ff ff 89 call 200d3b0 200d590: 01 00 00 00 nop if ( !p ) 200d594: 80 a2 20 00 cmp %o0, 0 200d598: 02 bf ff a6 be 200d430 <== NEVER TAKEN 200d59c: 01 00 00 00 nop return 0; info->triply_indirect = p; 200d5a0: d0 26 20 60 st %o0, [ %i0 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200d5a4: b4 02 00 1c add %o0, %i4, %i2 200d5a8: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200d5ac: 80 a2 20 00 cmp %o0, 0 200d5b0: 12 80 00 08 bne 200d5d0 200d5b4: bb 2f 60 02 sll %i5, 2, %i5 p1 = memfile_alloc_block(); 200d5b8: 7f ff ff 7e call 200d3b0 200d5bc: 01 00 00 00 nop if ( !p1 ) 200d5c0: 80 a2 20 00 cmp %o0, 0 200d5c4: 02 bf ff 9b be 200d430 <== NEVER TAKEN 200d5c8: 01 00 00 00 nop return 0; p[ triply ] = (block_p) p1; 200d5cc: d0 26 80 00 st %o0, [ %i2 ] } p2 = (block_p *)p1[ doubly ]; 200d5d0: b8 02 00 1d add %o0, %i5, %i4 200d5d4: d0 02 00 1d ld [ %o0 + %i5 ], %o0 if ( !p2 ) { 200d5d8: 80 a2 20 00 cmp %o0, 0 200d5dc: 12 80 00 08 bne 200d5fc 200d5e0: b1 2e e0 02 sll %i3, 2, %i0 p2 = memfile_alloc_block(); 200d5e4: 7f ff ff 73 call 200d3b0 200d5e8: 01 00 00 00 nop if ( !p2 ) 200d5ec: 80 a2 20 00 cmp %o0, 0 200d5f0: 02 bf ff 90 be 200d430 <== NEVER TAKEN 200d5f4: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200d5f8: d0 27 00 00 st %o0, [ %i4 ] } return (block_p *)&p2[ singly ]; 200d5fc: 81 c7 e0 08 ret 200d600: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200d604: 80 a2 20 00 cmp %o0, 0 200d608: 02 bf ff 8a be 200d430 <== NEVER TAKEN 200d60c: b9 2f 20 02 sll %i4, 2, %i4 return 0; p1 = (block_p *) p[ triply ]; 200d610: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p1 ) 200d614: 80 a0 60 00 cmp %g1, 0 200d618: 02 bf ff 86 be 200d430 <== NEVER TAKEN 200d61c: bb 2f 60 02 sll %i5, 2, %i5 return 0; p2 = (block_p *)p1[ doubly ]; 200d620: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p2 ) 200d624: 80 a0 60 00 cmp %g1, 0 200d628: 02 bf ff 82 be 200d430 <== NEVER TAKEN 200d62c: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200d630: b1 2e e0 02 sll %i3, 2, %i0 /* * This means the requested block number is out of range. */ return 0; } 200d634: 81 c7 e0 08 ret 200d638: 91 e8 40 18 restore %g1, %i0, %o0 =============================================================================== 0200d63c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d63c: 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; 200d640: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200d644: 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 ) { 200d648: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d64c: a0 10 00 19 mov %i1, %l0 200d650: 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 ) { 200d654: 80 a0 60 05 cmp %g1, 5 200d658: 12 80 00 17 bne 200d6b4 200d65c: 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)) 200d660: f4 1e 20 50 ldd [ %i0 + 0x50 ], %i2 200d664: 82 10 20 00 clr %g1 200d668: 86 a6 c0 11 subcc %i3, %l1, %g3 200d66c: 84 66 80 19 subx %i2, %i1, %g2 200d670: 80 a0 40 02 cmp %g1, %g2 200d674: 14 80 00 07 bg 200d690 <== NEVER TAKEN 200d678: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200d67c: 80 a0 40 02 cmp %g1, %g2 200d680: 12 80 00 06 bne 200d698 <== NEVER TAKEN 200d684: 80 a7 00 03 cmp %i4, %g3 200d688: 28 80 00 05 bleu,a 200d69c <== NEVER TAKEN 200d68c: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200d690: 10 80 00 03 b 200d69c 200d694: 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; 200d698: 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); 200d69c: 90 10 00 12 mov %l2, %o0 200d6a0: 92 02 40 11 add %o1, %l1, %o1 200d6a4: 40 00 06 da call 200f20c 200d6a8: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 200d6ac: 10 80 00 5d b 200d820 200d6b0: 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 ) 200d6b4: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 200d6b8: 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; 200d6bc: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200d6c0: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200d6c4: 80 a1 00 03 cmp %g4, %g3 200d6c8: 14 80 00 08 bg 200d6e8 <== NEVER TAKEN 200d6cc: b6 07 00 1a add %i4, %i2, %i3 200d6d0: 80 a1 00 03 cmp %g4, %g3 200d6d4: 32 80 00 07 bne,a 200d6f0 <== NEVER TAKEN 200d6d8: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED 200d6dc: 80 a6 c0 02 cmp %i3, %g2 200d6e0: 28 80 00 04 bleu,a 200d6f0 200d6e4: 03 00 80 6f sethi %hi(0x201bc00), %g1 my_length = the_jnode->info.file.size - start; 200d6e8: 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; 200d6ec: 03 00 80 6f sethi %hi(0x201bc00), %g1 200d6f0: f6 00 60 60 ld [ %g1 + 0x60 ], %i3 ! 201bc60 200d6f4: 90 10 00 10 mov %l0, %o0 200d6f8: b5 3e e0 1f sra %i3, 0x1f, %i2 200d6fc: 96 10 00 1b mov %i3, %o3 200d700: 94 10 00 1a mov %i2, %o2 200d704: 40 00 2a 53 call 2018050 <__moddi3> 200d708: 92 10 00 11 mov %l1, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d70c: 94 10 00 1a mov %i2, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d710: a6 10 00 09 mov %o1, %l3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d714: 90 10 00 10 mov %l0, %o0 200d718: 92 10 00 11 mov %l1, %o1 200d71c: 40 00 29 62 call 2017ca4 <__divdi3> 200d720: 96 10 00 1b mov %i3, %o3 if ( start_offset ) { 200d724: 80 a4 e0 00 cmp %l3, 0 200d728: 02 80 00 18 be 200d788 200d72c: b4 10 00 09 mov %o1, %i2 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200d730: b6 26 c0 13 sub %i3, %l3, %i3 200d734: 80 a7 00 1b cmp %i4, %i3 200d738: 08 80 00 03 bleu 200d744 200d73c: b2 10 00 1c mov %i4, %i1 200d740: 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 ); 200d744: 90 10 00 1d mov %i5, %o0 200d748: 92 10 00 1a mov %i2, %o1 200d74c: 94 10 20 00 clr %o2 200d750: 7f ff ff 25 call 200d3e4 200d754: b0 10 20 00 clr %i0 if ( !block_ptr ) 200d758: 80 a2 20 00 cmp %o0, 0 200d75c: 02 80 00 35 be 200d830 <== NEVER TAKEN 200d760: 94 10 00 19 mov %i1, %o2 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200d764: d2 02 00 00 ld [ %o0 ], %o1 200d768: 90 10 00 12 mov %l2, %o0 200d76c: 92 02 40 13 add %o1, %l3, %o1 200d770: 40 00 06 a7 call 200f20c 200d774: a4 04 80 19 add %l2, %i1, %l2 dest += to_copy; block++; 200d778: b4 06 a0 01 inc %i2 my_length -= to_copy; 200d77c: b8 27 00 19 sub %i4, %i1, %i4 copied += to_copy; 200d780: 10 80 00 03 b 200d78c 200d784: 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; 200d788: b0 10 20 00 clr %i0 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d78c: 03 00 80 6f sethi %hi(0x201bc00), %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( 200d790: a4 24 80 18 sub %l2, %i0, %l2 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d794: f6 00 60 60 ld [ %g1 + 0x60 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d798: 10 80 00 0f b 200d7d4 200d79c: a0 10 00 01 mov %g1, %l0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d7a0: 90 10 00 1d mov %i5, %o0 200d7a4: 92 10 00 1a mov %i2, %o1 200d7a8: 7f ff ff 0f call 200d3e4 200d7ac: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d7b0: 82 92 20 00 orcc %o0, 0, %g1 200d7b4: 02 80 00 1f be 200d830 <== NEVER TAKEN 200d7b8: 90 10 00 19 mov %i1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200d7bc: d2 00 40 00 ld [ %g1 ], %o1 200d7c0: 94 10 00 1b mov %i3, %o2 200d7c4: 40 00 06 92 call 200f20c 200d7c8: b4 06 a0 01 inc %i2 dest += to_copy; block++; my_length -= to_copy; 200d7cc: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200d7d0: 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 ) { 200d7d4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 200d7d8: 80 a7 00 01 cmp %i4, %g1 200d7dc: 1a bf ff f1 bcc 200d7a0 200d7e0: 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 ) { 200d7e4: 80 a7 20 00 cmp %i4, 0 200d7e8: 02 80 00 0e be 200d820 200d7ec: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d7f0: 90 10 00 1d mov %i5, %o0 200d7f4: 92 10 00 1a mov %i2, %o1 200d7f8: 7f ff fe fb call 200d3e4 200d7fc: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d800: 82 92 20 00 orcc %o0, 0, %g1 200d804: 02 80 00 0b be 200d830 <== NEVER TAKEN 200d808: 90 10 00 19 mov %i1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200d80c: d2 00 40 00 ld [ %g1 ], %o1 200d810: 94 10 00 1c mov %i4, %o2 200d814: 40 00 06 7e call 200f20c 200d818: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200d81c: 90 07 bf f8 add %fp, -8, %o0 200d820: 7f ff d7 8e call 2003658 200d824: 92 10 20 00 clr %o1 200d828: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d82c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200d830: 81 c7 e0 08 ret 200d834: 81 e8 00 00 restore =============================================================================== 0200d934 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200d934: 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; 200d938: 03 00 80 6f sethi %hi(0x201bc00), %g1 200d93c: fa 00 60 60 ld [ %g1 + 0x60 ], %i5 ! 201bc60 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200d940: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200d944: 80 a0 60 00 cmp %g1, 0 200d948: 02 80 00 05 be 200d95c 200d94c: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200d950: 90 06 20 58 add %i0, 0x58, %o0 200d954: 7f ff ff e5 call 200d8e8 200d958: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200d95c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200d960: b8 10 20 00 clr %i4 200d964: 80 a0 60 00 cmp %g1, 0 200d968: 12 80 00 0d bne 200d99c 200d96c: 37 00 80 6f sethi %hi(0x201bc00), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200d970: 10 80 00 15 b 200d9c4 200d974: 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( 200d978: 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] ) { 200d97c: 90 00 80 01 add %g2, %g1, %o0 200d980: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d984: 80 a0 60 00 cmp %g1, 0 200d988: 22 80 00 05 be,a 200d99c <== NEVER TAKEN 200d98c: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200d990: 7f ff ff d6 call 200d8e8 200d994: 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 200d9ac: 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 ); 200d9b0: 90 06 20 5c add %i0, 0x5c, %o0 200d9b4: 7f ff ff cd call 200d8e8 200d9b8: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200d9bc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200d9c0: b8 10 20 00 clr %i4 200d9c4: 80 a0 60 00 cmp %g1, 0 200d9c8: 12 80 00 1c bne 200da38 200d9cc: 33 00 80 6f sethi %hi(0x201bc00), %i1 200d9d0: 81 c7 e0 08 ret 200d9d4: 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( 200d9d8: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200d9dc: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200d9e0: 80 a6 e0 00 cmp %i3, 0 200d9e4: 02 80 00 1b be 200da50 <== NEVER TAKEN 200d9e8: 90 06 20 60 add %i0, 0x60, %o0 200d9ec: 10 80 00 09 b 200da10 200d9f0: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200d9fc: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200da00: 7f ff ff ba call 200d8e8 200da04: 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 200da20: 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( 200da24: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200da28: 92 10 00 1d mov %i5, %o1 200da2c: 90 02 00 10 add %o0, %l0, %o0 200da30: 7f ff ff ae call 200d8e8 200da34: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200da48: 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( 200da4c: 90 06 20 60 add %i0, 0x60, %o0 200da50: 7f ff ff a6 call 200d8e8 200da54: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200da58: 81 c7 e0 08 ret 200da5c: 81 e8 00 00 restore =============================================================================== 0200da60 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 200da60: 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 ); 200da64: 94 10 20 00 clr %o2 <== NOT EXECUTED 200da68: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200da6c: 7f ff fe 5e call 200d3e4 <== NOT EXECUTED 200da70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200da74: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 200da78: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED *block_ptr = 0; memfile_free_block( ptr ); return 1; } 200da7c: 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 ); 200da80: 7f ff ff 91 call 200d8c4 <== NOT EXECUTED 200da84: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED return 1; } 200da88: 81 c7 e0 08 ret <== NOT EXECUTED 200da8c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200dc30 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200dc30: 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 ) { 200dc34: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200dc38: 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; 200dc3c: 96 07 00 1a add %i4, %i2, %o3 if ( last_byte > the_jnode->info.file.size ) { 200dc40: 80 a0 c0 01 cmp %g3, %g1 200dc44: 14 80 00 1b bg 200dcb0 <== NEVER TAKEN 200dc48: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200dc4c: 80 a0 c0 01 cmp %g3, %g1 200dc50: 32 80 00 06 bne,a 200dc68 <== NEVER TAKEN 200dc54: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED 200dc58: 80 a2 c0 02 cmp %o3, %g2 200dc5c: 18 80 00 16 bgu 200dcb4 200dc60: 80 a6 40 01 cmp %i1, %g1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200dc64: 03 00 80 6f sethi %hi(0x201bc00), %g1 200dc68: fa 00 60 60 ld [ %g1 + 0x60 ], %i5 ! 201bc60 200dc6c: 92 10 00 1a mov %i2, %o1 200dc70: a3 3f 60 1f sra %i5, 0x1f, %l1 200dc74: 96 10 00 1d mov %i5, %o3 200dc78: 94 10 00 11 mov %l1, %o2 200dc7c: 40 00 28 f5 call 2018050 <__moddi3> 200dc80: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200dc84: 90 10 00 19 mov %i1, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200dc88: a0 10 00 09 mov %o1, %l0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200dc8c: 94 10 00 11 mov %l1, %o2 200dc90: 92 10 00 1a mov %i2, %o1 200dc94: 40 00 28 04 call 2017ca4 <__divdi3> 200dc98: 96 10 00 1d mov %i5, %o3 if ( start_offset ) { 200dc9c: 80 a4 20 00 cmp %l0, 0 200dca0: 12 80 00 17 bne 200dcfc 200dca4: b4 10 00 09 mov %o1, %i2 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 200dca8: 10 80 00 28 b 200dd48 200dcac: 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; 200dcb0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 200dcb4: 14 80 00 09 bg 200dcd8 <== NEVER TAKEN 200dcb8: 92 10 20 01 mov 1, %o1 200dcbc: 80 a6 40 01 cmp %i1, %g1 200dcc0: 32 80 00 06 bne,a 200dcd8 <== NEVER TAKEN 200dcc4: 92 10 20 00 clr %o1 <== NOT EXECUTED 200dcc8: 80 a6 80 02 cmp %i2, %g2 200dccc: 18 80 00 04 bgu 200dcdc 200dcd0: 90 10 00 18 mov %i0, %o0 200dcd4: 92 10 20 00 clr %o1 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 200dcd8: 90 10 00 18 mov %i0, %o0 200dcdc: 92 0a 60 01 and %o1, 1, %o1 200dce0: 7f ff ff 6c call 200da90 200dce4: 94 10 20 00 clr %o2 if ( status ) 200dce8: 82 92 20 00 orcc %o0, 0, %g1 200dcec: 22 bf ff df be,a 200dc68 200dcf0: 03 00 80 6f sethi %hi(0x201bc00), %g1 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200dcf4: 81 c7 e0 08 ret 200dcf8: 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; 200dcfc: ba 27 40 10 sub %i5, %l0, %i5 200dd00: 80 a7 40 1c cmp %i5, %i4 200dd04: 38 80 00 02 bgu,a 200dd0c 200dd08: 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 ); 200dd0c: 90 10 00 18 mov %i0, %o0 200dd10: 92 10 00 1a mov %i2, %o1 200dd14: 7f ff fd b4 call 200d3e4 200dd18: 94 10 20 00 clr %o2 if ( !block_ptr ) 200dd1c: 80 a2 20 00 cmp %o0, 0 200dd20: 02 80 00 36 be 200ddf8 <== NEVER TAKEN 200dd24: 82 10 20 00 clr %g1 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200dd28: d0 02 00 00 ld [ %o0 ], %o0 200dd2c: 92 10 00 1b mov %i3, %o1 200dd30: 90 02 00 10 add %o0, %l0, %o0 200dd34: 94 10 00 1d mov %i5, %o2 200dd38: 40 00 05 35 call 200f20c 200dd3c: b6 06 c0 1d add %i3, %i5, %i3 src += to_copy; block++; 200dd40: b4 06 a0 01 inc %i2 my_length -= to_copy; 200dd44: b8 27 00 1d sub %i4, %i5, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200dd48: 03 00 80 6f sethi %hi(0x201bc00), %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( 200dd4c: b6 26 c0 1d sub %i3, %i5, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200dd50: f2 00 60 60 ld [ %g1 + 0x60 ], %i1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200dd54: 10 80 00 0f b 200dd90 200dd58: a2 10 00 01 mov %g1, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200dd5c: 90 10 00 18 mov %i0, %o0 200dd60: 92 10 00 1a mov %i2, %o1 200dd64: 7f ff fd a0 call 200d3e4 200dd68: 94 10 20 00 clr %o2 if ( !block_ptr ) 200dd6c: 80 a2 20 00 cmp %o0, 0 200dd70: 02 80 00 21 be 200ddf4 <== NEVER TAKEN 200dd74: 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 ); 200dd78: d0 02 00 00 ld [ %o0 ], %o0 200dd7c: 92 10 00 10 mov %l0, %o1 200dd80: 40 00 05 23 call 200f20c 200dd84: b4 06 a0 01 inc %i2 src += to_copy; block++; my_length -= to_copy; 200dd88: 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( 200dd8c: 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 ) { 200dd90: c2 04 60 60 ld [ %l1 + 0x60 ], %g1 200dd94: 80 a7 00 01 cmp %i4, %g1 200dd98: 1a bf ff f1 bcc 200dd5c 200dd9c: 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 ) { 200dda0: 80 a7 20 00 cmp %i4, 0 200dda4: 02 80 00 0f be 200dde0 200dda8: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ddac: 90 10 00 18 mov %i0, %o0 200ddb0: 92 10 00 1a mov %i2, %o1 200ddb4: 7f ff fd 8c call 200d3e4 200ddb8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ddbc: 80 a2 20 00 cmp %o0, 0 200ddc0: 02 80 00 0e be 200ddf8 <== NEVER TAKEN 200ddc4: 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 ); 200ddc8: d0 02 00 00 ld [ %o0 ], %o0 200ddcc: 92 10 00 10 mov %l0, %o1 200ddd0: 94 10 00 1c mov %i4, %o2 200ddd4: 40 00 05 0e call 200f20c 200ddd8: ba 07 40 1c add %i5, %i4, %i5 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200dddc: 90 07 bf f8 add %fp, -8, %o0 200dde0: 7f ff d6 1e call 2003658 200dde4: 92 10 20 00 clr %o1 200dde8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ddec: c2 26 20 44 st %g1, [ %i0 + 0x44 ] 200ddf0: 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 ) 200ddf4: 82 10 00 1d mov %i5, %g1 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200ddf8: b0 10 00 01 mov %g1, %i0 200ddfc: 81 c7 e0 08 ret 200de00: 81 e8 00 00 restore =============================================================================== 02002e20 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2002e20: 9d e3 bf 80 save %sp, -128, %sp dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2002e24: 05 00 00 3c sethi %hi(0xf000), %g2 2002e28: 07 00 00 10 sethi %hi(0x4000), %g3 2002e2c: 84 0e c0 02 and %i3, %g2, %g2 2002e30: 80 a0 80 03 cmp %g2, %g3 2002e34: 02 80 00 12 be 2002e7c 2002e38: 07 00 00 20 sethi %hi(0x8000), %g3 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 2002e3c: 80 a0 80 03 cmp %g2, %g3 2002e40: 02 80 00 11 be 2002e84 2002e44: 09 00 00 2c sethi %hi(0xb000), %g4 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2002e48: 07 00 00 08 sethi %hi(0x2000), %g3 2002e4c: 88 0e c0 04 and %i3, %g4, %g4 2002e50: 80 a1 00 03 cmp %g4, %g3 2002e54: 12 80 00 05 bne 2002e68 2002e58: 07 00 00 04 sethi %hi(0x1000), %g3 *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 2002e5c: 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; 2002e60: 10 80 00 0a b 2002e88 2002e64: 82 10 20 01 mov 1, %g1 rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 2002e68: 80 a0 80 03 cmp %g2, %g3 2002e6c: 32 80 00 08 bne,a 2002e8c <== NEVER TAKEN 2002e70: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED *type = IMFS_FIFO; 2002e74: 10 80 00 05 b 2002e88 2002e78: 82 10 20 06 mov 6, %g1 IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 2002e7c: 10 80 00 03 b 2002e88 2002e80: 82 10 20 00 clr %g1 2002e84: 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 = 2002e88: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 2002e8c: 82 00 60 02 add %g1, 2, %g1 2002e90: c4 00 a0 08 ld [ %g2 + 8 ], %g2 2002e94: 83 28 60 02 sll %g1, 2, %g1 2002e98: d2 00 80 01 ld [ %g2 + %g1 ], %o1 2002e9c: 90 10 00 18 mov %i0, %o0 2002ea0: 94 10 00 19 mov %i1, %o2 2002ea4: 96 10 00 1a mov %i2, %o3 2002ea8: 98 10 00 1b mov %i3, %o4 2002eac: 40 00 21 d6 call 200b604 2002eb0: 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 ) { 2002eb4: 80 a2 20 00 cmp %o0, 0 2002eb8: 02 80 00 0e be 2002ef0 2002ebc: 90 07 bf e0 add %fp, -32, %o0 IMFS_jnode_t *parent = parentloc->node_access; 2002ec0: fa 06 20 08 ld [ %i0 + 8 ], %i5 IMFS_update_ctime( parent ); 2002ec4: 40 00 01 e5 call 2003658 2002ec8: 92 10 20 00 clr %o1 2002ecc: c2 07 bf e0 ld [ %fp + -32 ], %g1 IMFS_update_mtime( parent ); 2002ed0: 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 ); 2002ed4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 2002ed8: 40 00 01 e0 call 2003658 2002edc: 92 10 20 00 clr %o1 2002ee0: c2 07 bf e0 ld [ %fp + -32 ], %g1 2002ee4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 2002ee8: 81 c7 e0 08 ret 2002eec: 91 e8 20 00 restore %g0, 0, %o0 } else { rv = -1; } return rv; } 2002ef0: 81 c7 e0 08 ret 2002ef4: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02002ef8 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2002ef8: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 2002efc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2002f00: 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; 2002f04: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2002f08: c4 00 80 00 ld [ %g2 ], %g2 2002f0c: 80 a0 a0 00 cmp %g2, 0 2002f10: 12 80 00 0d bne 2002f44 2002f14: 01 00 00 00 nop if ( node->info.directory.mt_fs == NULL ) { 2002f18: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2002f1c: 80 a0 a0 00 cmp %g2, 0 2002f20: 12 80 00 05 bne 2002f34 <== NEVER TAKEN 2002f24: 01 00 00 00 nop node->info.directory.mt_fs = mt_entry; 2002f28: 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; 2002f2c: 81 c7 e0 08 ret 2002f30: 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; 2002f34: 40 00 2e 65 call 200e8c8 <__errno> <== NOT EXECUTED 2002f38: 01 00 00 00 nop <== NOT EXECUTED 2002f3c: 10 80 00 05 b 2002f50 <== NOT EXECUTED 2002f40: 82 10 20 10 mov 0x10, %g1 ! 10 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2002f44: 40 00 2e 61 call 200e8c8 <__errno> 2002f48: 01 00 00 00 nop 2002f4c: 82 10 20 14 mov 0x14, %g1 ! 14 2002f50: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2002f54: 81 c7 e0 08 ret 2002f58: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200ba18 : } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 200ba18: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200ba1c: 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 ); 200ba20: 82 06 20 54 add %i0, 0x54, %g1 200ba24: 80 a0 80 01 cmp %g2, %g1 200ba28: 22 80 00 06 be,a 200ba40 200ba2c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 errno = ENOTEMPTY; 200ba30: 40 00 0b a6 call 200e8c8 <__errno> 200ba34: 01 00 00 00 nop 200ba38: 10 80 00 08 b 200ba58 200ba3c: 82 10 20 5a mov 0x5a, %g1 ! 5a node = NULL; } else if ( IMFS_is_mount_point( node ) ) { 200ba40: 80 a0 60 00 cmp %g1, 0 200ba44: 02 80 00 07 be 200ba60 <== ALWAYS TAKEN 200ba48: 01 00 00 00 nop errno = EBUSY; 200ba4c: 40 00 0b 9f call 200e8c8 <__errno> <== NOT EXECUTED 200ba50: 01 00 00 00 nop <== NOT EXECUTED 200ba54: 82 10 20 10 mov 0x10, %g1 ! 10 <== NOT EXECUTED 200ba58: c2 22 00 00 st %g1, [ %o0 ] 200ba5c: b0 10 20 00 clr %i0 node = NULL; } return node; } 200ba60: 81 c7 e0 08 ret 200ba64: 81 e8 00 00 restore =============================================================================== 02002f5c : rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { const IMFS_jnode_t *node = loc->node_access; 2002f5c: 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; 2002f60: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 2002f64: 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 ) { 2002f68: 80 a0 60 02 cmp %g1, 2 2002f6c: 02 80 00 06 be 2002f84 2002f70: 80 a0 60 05 cmp %g1, 5 2002f74: 12 80 00 08 bne 2002f94 <== ALWAYS TAKEN 2002f78: 90 10 20 04 mov 4, %o0 2002f7c: 81 c3 e0 08 retl <== NOT EXECUTED 2002f80: 01 00 00 00 nop <== NOT EXECUTED 2002f84: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 2002f88: c2 00 60 4c ld [ %g1 + 0x4c ], %g1 case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; 2002f8c: 81 c3 e0 08 retl 2002f90: d0 00 40 00 ld [ %g1 ], %o0 type = imfs_type; break; } return type; } 2002f94: 81 c3 e0 08 retl 2002f98: 90 10 00 01 mov %g1, %o0 =============================================================================== 02002fd8 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 2002fd8: 9d e3 bf 98 save %sp, -104, %sp int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 2002fdc: 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 ) { 2002fe0: c2 07 60 08 ld [ %i5 + 8 ], %g1 2002fe4: 80 a0 60 00 cmp %g1, 0 2002fe8: 02 80 00 20 be 2003068 <== NEVER TAKEN 2002fec: f4 06 a0 08 ld [ %i2 + 8 ], %i2 if ( namelen < IMFS_NAME_MAX ) { 2002ff0: 80 a7 20 1f cmp %i4, 0x1f 2002ff4: 18 80 00 19 bgu 2003058 <== NEVER TAKEN 2002ff8: 94 10 00 1c mov %i4, %o2 memcpy( node->name, name, namelen ); 2002ffc: 92 10 00 1b mov %i3, %o1 2003000: 40 00 30 83 call 200f20c 2003004: 90 07 60 0c add %i5, 0xc, %o0 node->name [namelen] = '\0'; 2003008: b8 07 40 1c add %i5, %i4, %i4 200300c: c0 2f 20 0c clrb [ %i4 + 0xc ] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2003010: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 2003014: c2 07 60 04 ld [ %i5 + 4 ], %g1 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 2003018: 90 07 bf f8 add %fp, -8, %o0 next->previous = previous; 200301c: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2003020: 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; 2003024: 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; 2003028: 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 ); 200302c: 84 06 a0 54 add %i2, 0x54, %g2 Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 2003030: 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; 2003034: c4 27 40 00 st %g2, [ %i5 ] tail->previous = the_node; old_last->next = the_node; 2003038: fa 20 40 00 st %i5, [ %g1 ] the_node->previous = old_last; 200303c: c2 27 60 04 st %g1, [ %i5 + 4 ] 2003040: 40 00 01 86 call 2003658 2003044: 92 10 20 00 clr %o1 2003048: c2 07 bf f8 ld [ %fp + -8 ], %g1 200304c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 2003050: 81 c7 e0 08 ret 2003054: 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; 2003058: 40 00 2e 1c call 200e8c8 <__errno> <== NOT EXECUTED 200305c: 01 00 00 00 nop <== NOT EXECUTED 2003060: 10 80 00 05 b 2003074 <== NOT EXECUTED 2003064: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 2003068: 40 00 2e 18 call 200e8c8 <__errno> <== NOT EXECUTED 200306c: 01 00 00 00 nop <== NOT EXECUTED 2003070: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2003074: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 2003078: 81 c7 e0 08 ret <== NOT EXECUTED 200307c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02003158 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003158: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 200315c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2003160: 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; 2003164: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003168: c4 00 80 00 ld [ %g2 ], %g2 200316c: 80 a0 a0 00 cmp %g2, 0 2003170: 12 80 00 0d bne 20031a4 <== NEVER TAKEN 2003174: 01 00 00 00 nop if ( node->info.directory.mt_fs == mt_entry ) { 2003178: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 200317c: 80 a0 80 18 cmp %g2, %i0 2003180: 12 80 00 05 bne 2003194 <== NEVER TAKEN 2003184: 01 00 00 00 nop node->info.directory.mt_fs = NULL; 2003188: c0 20 60 5c clr [ %g1 + 0x5c ] #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 200318c: 81 c7 e0 08 ret 2003190: 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; 2003194: 40 00 2d cd call 200e8c8 <__errno> <== NOT EXECUTED 2003198: 01 00 00 00 nop <== NOT EXECUTED 200319c: 10 80 00 05 b 20031b0 <== NOT EXECUTED 20031a0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 20031a4: 40 00 2d c9 call 200e8c8 <__errno> <== NOT EXECUTED 20031a8: 01 00 00 00 nop <== NOT EXECUTED 20031ac: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 20031b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20031b4: 81 c7 e0 08 ret <== NOT EXECUTED 20031b8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02003844 : void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 2003844: 9d e3 bf a0 save %sp, -96, %sp Heap_Control *heap = RTEMS_Malloc_Heap; 2003848: 03 00 80 6d sethi %hi(0x201b400), %g1 200384c: f6 00 60 e0 ld [ %g1 + 0xe0 ], %i3 ! 201b4e0 if ( !rtems_configuration_get_unified_work_area() ) { 2003850: 03 00 80 65 sethi %hi(0x2019400), %g1 2003854: c2 08 60 a9 ldub [ %g1 + 0xa9 ], %g1 ! 20194a9 2003858: 80 a0 60 00 cmp %g1, 0 200385c: 12 80 00 1b bne 20038c8 2003860: 03 00 80 6f sethi %hi(0x201bc00), %g1 2003864: 3b 00 80 22 sethi %hi(0x2008800), %i5 2003868: b8 10 20 00 clr %i4 200386c: 10 80 00 0b b 2003898 2003870: ba 17 60 40 or %i5, 0x40, %i5 uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { const Heap_Area *area = &areas [i]; uintptr_t space_available = (*init_or_extend)( 2003874: d4 06 20 04 ld [ %i0 + 4 ], %o2 2003878: 90 10 00 1b mov %i3, %o0 200387c: 9f c7 40 00 call %i5 2003880: 96 10 20 08 mov 8, %o3 area->begin, area->size, page_size ); if ( space_available > 0 ) { 2003884: 80 a2 20 00 cmp %o0, 0 2003888: 32 80 00 02 bne,a 2003890 <== ALWAYS TAKEN 200388c: ba 10 00 1a mov %i2, %i5 if ( !rtems_configuration_get_unified_work_area() ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { 2003890: b8 07 20 01 inc %i4 2003894: b0 06 20 08 add %i0, 8, %i0 2003898: 80 a7 00 19 cmp %i4, %i1 200389c: 32 bf ff f6 bne,a 2003874 20038a0: d2 06 00 00 ld [ %i0 ], %o1 if ( space_available > 0 ) { init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { 20038a4: 03 00 80 22 sethi %hi(0x2008800), %g1 20038a8: 82 10 60 40 or %g1, 0x40, %g1 ! 2008840 <_Heap_Initialize> 20038ac: 80 a7 40 01 cmp %i5, %g1 20038b0: 12 80 00 06 bne 20038c8 20038b4: 03 00 80 6f sethi %hi(0x201bc00), %g1 _Internal_error_Occurred( 20038b8: 90 10 20 00 clr %o0 20038bc: 92 10 20 01 mov 1, %o1 20038c0: 40 00 14 73 call 2008a8c <_Internal_error_Occurred> 20038c4: 94 10 20 17 mov 0x17, %o2 } /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 20038c8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 20038cc: 80 a0 60 00 cmp %g1, 0 20038d0: 02 80 00 05 be 20038e4 20038d4: 3b 00 80 6f sethi %hi(0x201bc00), %i5 (*rtems_malloc_statistics_helpers->initialize)(); 20038d8: c2 00 40 00 ld [ %g1 ], %g1 20038dc: 9f c0 40 00 call %g1 20038e0: 01 00 00 00 nop } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 20038e4: f8 07 62 f8 ld [ %i5 + 0x2f8 ], %i4 20038e8: 40 00 16 b8 call 20093c8 <_Protected_heap_Get_size> 20038ec: 90 10 00 1b mov %i3, %o0 20038f0: 90 02 00 1c add %o0, %i4, %o0 20038f4: d0 27 62 f8 st %o0, [ %i5 + 0x2f8 ] 20038f8: 81 c7 e0 08 ret 20038fc: 81 e8 00 00 restore =============================================================================== 02021b80 : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2021b80: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 2021b84: 80 a6 3f ff cmp %i0, -1 2021b88: 32 80 00 0a bne,a 2021bb0 2021b8c: e0 06 21 38 ld [ %i0 + 0x138 ], %l0 if (!Stack_check_Interrupt_stack.area) 2021b90: 3b 00 81 83 sethi %hi(0x2060c00), %i5 2021b94: ba 17 62 3c or %i5, 0x23c, %i5 ! 2060e3c 2021b98: c2 07 60 04 ld [ %i5 + 4 ], %g1 2021b9c: 80 a0 60 00 cmp %g1, 0 2021ba0: 02 80 00 4c be 2021cd0 <== NEVER TAKEN 2021ba4: a0 10 20 00 clr %l0 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 2021ba8: 10 80 00 04 b 2021bb8 2021bac: b0 10 20 00 clr %i0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 2021bb0: ba 06 20 b0 add %i0, 0xb0, %i5 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2021bb4: c2 07 60 04 ld [ %i5 + 4 ], %g1 size = Stack_check_usable_stack_size(stack); 2021bb8: 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); 2021bbc: 84 00 60 10 add %g1, 0x10, %g2 size = Stack_check_usable_stack_size(stack); 2021bc0: 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; 2021bc4: 82 00 60 20 add %g1, 0x20, %g1 for (ebase = base + length; base < ebase; base++) 2021bc8: 86 0e 7f fc and %i1, -4, %g3 if (*base != U32_PATTERN) 2021bcc: 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++) 2021bd0: 86 00 40 03 add %g1, %g3, %g3 if (*base != U32_PATTERN) 2021bd4: 10 80 00 06 b 2021bec 2021bd8: 88 11 21 a5 or %g4, 0x1a5, %g4 2021bdc: 80 a7 00 04 cmp %i4, %g4 2021be0: 12 80 00 08 bne 2021c00 2021be4: 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++) 2021be8: 82 00 60 04 add %g1, 4, %g1 2021bec: 80 a0 40 03 cmp %g1, %g3 2021bf0: 2a bf ff fb bcs,a 2021bdc <== ALWAYS TAKEN 2021bf4: 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; 2021bf8: 10 80 00 06 b 2021c10 <== NOT EXECUTED 2021bfc: 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 ) 2021c00: 02 80 00 04 be 2021c10 <== NEVER TAKEN 2021c04: b8 10 20 00 clr %i4 used = Stack_check_Calculate_used( low, size, high_water_mark ); 2021c08: b8 00 80 19 add %g2, %i1, %i4 2021c0c: b8 27 00 01 sub %i4, %g1, %i4 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2021c10: 80 a6 20 00 cmp %i0, 0 2021c14: 02 80 00 12 be 2021c5c 2021c18: 03 00 81 80 sethi %hi(0x2060000), %g1 #endif { (*print_handler)( 2021c1c: f6 06 20 08 ld [ %i0 + 8 ], %i3 2021c20: f4 00 62 f0 ld [ %g1 + 0x2f0 ], %i2 2021c24: 03 00 81 80 sethi %hi(0x2060000), %g1 2021c28: e2 00 62 ec ld [ %g1 + 0x2ec ], %l1 ! 20602ec 2021c2c: 94 07 bf f8 add %fp, -8, %o2 2021c30: 90 10 00 1b mov %i3, %o0 2021c34: 7f ff b2 71 call 200e5f8 2021c38: 92 10 20 05 mov 5, %o1 2021c3c: 13 00 81 5c sethi %hi(0x2057000), %o1 2021c40: 96 10 00 08 mov %o0, %o3 2021c44: 92 12 62 b8 or %o1, 0x2b8, %o1 2021c48: 90 10 00 11 mov %l1, %o0 2021c4c: 9f c6 80 00 call %i2 2021c50: 94 10 00 1b mov %i3, %o2 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2021c54: 10 80 00 0a b 2021c7c 2021c58: 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 ); 2021c5c: 05 00 81 80 sethi %hi(0x2060000), %g2 2021c60: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 2021c64: d0 00 a2 ec ld [ %g2 + 0x2ec ], %o0 2021c68: 13 00 81 5c sethi %hi(0x2057000), %o1 2021c6c: 94 10 3f ff mov -1, %o2 2021c70: 9f c0 40 00 call %g1 2021c74: 92 12 62 c8 or %o1, 0x2c8, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2021c78: d4 07 60 04 ld [ %i5 + 4 ], %o2 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2021c7c: 35 00 81 80 sethi %hi(0x2060000), %i2 2021c80: 37 00 81 80 sethi %hi(0x2060000), %i3 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2021c84: d6 07 40 00 ld [ %i5 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2021c88: c2 06 a2 f0 ld [ %i2 + 0x2f0 ], %g1 2021c8c: d0 06 e2 ec ld [ %i3 + 0x2ec ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2021c90: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2021c94: 13 00 81 5c sethi %hi(0x2057000), %o1 2021c98: 96 02 80 0b add %o2, %o3, %o3 2021c9c: 92 12 62 d8 or %o1, 0x2d8, %o1 2021ca0: 98 10 00 10 mov %l0, %o4 2021ca4: 9f c0 40 00 call %g1 2021ca8: 9a 10 00 19 mov %i1, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2021cac: 03 00 81 80 sethi %hi(0x2060000), %g1 2021cb0: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 20602e8 (*print_handler)( print_context, "Unavailable\n" ); 2021cb4: d0 06 e2 ec ld [ %i3 + 0x2ec ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2021cb8: 80 a0 60 00 cmp %g1, 0 2021cbc: 12 80 00 07 bne 2021cd8 <== ALWAYS TAKEN 2021cc0: c2 06 a2 f0 ld [ %i2 + 0x2f0 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 2021cc4: 13 00 81 5c sethi %hi(0x2057000), %o1 <== NOT EXECUTED 2021cc8: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021ccc: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 20572f8 <== NOT EXECUTED 2021cd0: 81 c7 e0 08 ret <== NOT EXECUTED 2021cd4: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2021cd8: 13 00 81 5c sethi %hi(0x2057000), %o1 2021cdc: 94 10 00 1c mov %i4, %o2 2021ce0: 9f c0 40 00 call %g1 2021ce4: 92 12 63 08 or %o1, 0x308, %o1 2021ce8: 81 c7 e0 08 ret 2021cec: 81 e8 00 00 restore =============================================================================== 02021dd8 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2021dd8: 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"); 2021ddc: 11 00 81 5c sethi %hi(0x2057000), %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); 2021de0: fa 06 20 b4 ld [ %i0 + 0xb4 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2021de4: 7f ff 88 e4 call 2004174 2021de8: 90 12 23 10 or %o0, 0x310, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2021dec: 92 10 00 18 mov %i0, %o1 2021df0: 11 00 81 5c sethi %hi(0x2057000), %o0 2021df4: 7f ff 88 e0 call 2004174 2021df8: 90 12 23 20 or %o0, 0x320, %o0 ! 2057320 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2021dfc: d2 06 20 08 ld [ %i0 + 8 ], %o1 2021e00: 11 00 81 5c sethi %hi(0x2057000), %o0 2021e04: 7f ff 88 dc call 2004174 2021e08: 90 12 23 40 or %o0, 0x340, %o0 ! 2057340 printk( 2021e0c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2021e10: 11 00 81 5c sethi %hi(0x2057000), %o0 2021e14: 7f ff 88 d8 call 2004174 2021e18: 90 12 23 58 or %o0, 0x358, %o0 ! 2057358 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2021e1c: d0 06 20 08 ld [ %i0 + 8 ], %o0 2021e20: 94 07 bf e0 add %fp, -32, %o2 2021e24: 7f ff b1 f5 call 200e5f8 2021e28: 92 10 20 20 mov 0x20, %o1 2021e2c: 92 10 00 08 mov %o0, %o1 2021e30: 11 00 81 5c sethi %hi(0x2057000), %o0 2021e34: 7f ff 88 d0 call 2004174 2021e38: 90 12 23 70 or %o0, 0x370, %o0 ! 2057370 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2021e3c: d4 06 20 b4 ld [ %i0 + 0xb4 ], %o2 2021e40: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 2021e44: 11 00 81 5c sethi %hi(0x2057000), %o0 2021e48: 96 02 80 09 add %o2, %o1, %o3 2021e4c: 7f ff 88 ca call 2004174 2021e50: 90 12 23 88 or %o0, 0x388, %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) { 2021e54: 80 a6 60 00 cmp %i1, 0 2021e58: 32 80 00 09 bne,a 2021e7c <== NEVER TAKEN 2021e5c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 <== NOT EXECUTED printk( 2021e60: 11 00 81 5c sethi %hi(0x2057000), %o0 2021e64: 92 10 20 10 mov 0x10, %o1 2021e68: 90 12 23 b8 or %o0, 0x3b8, %o0 2021e6c: 94 07 60 08 add %i5, 8, %o2 2021e70: 7f ff 88 c1 call 2004174 2021e74: 96 07 60 18 add %i5, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 2021e78: d2 06 20 0c ld [ %i0 + 0xc ], %o1 2021e7c: 7f ff 97 32 call 2007b44 2021e80: 90 10 20 09 mov 9, %o0 =============================================================================== 02010f4c <_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 ) { 2010f4c: 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; 2010f50: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 2010f54: c0 26 20 48 clr [ %i0 + 0x48 ] /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 2010f58: 80 8e e0 03 btst 3, %i3 2010f5c: 02 80 00 09 be 2010f80 <_CORE_message_queue_Initialize+0x34> 2010f60: f6 26 20 4c st %i3, [ %i0 + 0x4c ] allocated_message_size += sizeof(uintptr_t); 2010f64: 96 06 e0 04 add %i3, 4, %o3 allocated_message_size &= ~(sizeof(uintptr_t) - 1); 2010f68: 96 0a ff fc and %o3, -4, %o3 /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) 2010f6c: 80 a2 c0 1b cmp %o3, %i3 2010f70: 3a 80 00 06 bcc,a 2010f88 <_CORE_message_queue_Initialize+0x3c> 2010f74: ba 02 e0 10 add %o3, 0x10, %i5 return false; 2010f78: 10 80 00 24 b 2011008 <_CORE_message_queue_Initialize+0xbc> 2010f7c: b0 10 20 00 clr %i0 /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 2010f80: 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( 2010f84: ba 02 e0 10 add %o3, 0x10, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2010f88: 90 10 20 00 clr %o0 2010f8c: 92 10 00 1a mov %i2, %o1 2010f90: 94 10 20 00 clr %o2 2010f94: 40 00 3f b2 call 2020e5c <__muldi3> 2010f98: 96 10 00 1d mov %i5, %o3 if ( x > SIZE_MAX ) 2010f9c: 80 a2 20 00 cmp %o0, 0 2010fa0: 34 80 00 1a bg,a 2011008 <_CORE_message_queue_Initialize+0xbc> 2010fa4: 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 ); 2010fa8: 40 00 0b ec call 2013f58 <_Workspace_Allocate> 2010fac: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2010fb0: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2010fb4: 80 a2 20 00 cmp %o0, 0 2010fb8: 02 bf ff f0 be 2010f78 <_CORE_message_queue_Initialize+0x2c><== NEVER TAKEN 2010fbc: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2010fc0: 90 06 20 60 add %i0, 0x60, %o0 2010fc4: 94 10 00 1a mov %i2, %o2 2010fc8: 7f ff ff d3 call 2010f14 <_Chain_Initialize> 2010fcc: 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 ); 2010fd0: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 2010fd4: c2 26 20 58 st %g1, [ %i0 + 0x58 ] */ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority( CORE_message_queue_Attributes *the_attribute ) { return 2010fd8: 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 ); 2010fdc: 84 06 20 54 add %i0, 0x54, %g2 2010fe0: 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( 2010fe4: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 2010fe8: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 2010fec: c0 26 20 54 clr [ %i0 + 0x54 ] 2010ff0: 90 10 00 18 mov %i0, %o0 2010ff4: 92 60 3f ff subx %g0, -1, %o1 2010ff8: 94 10 20 80 mov 0x80, %o2 2010ffc: 96 10 20 06 mov 6, %o3 2011000: 40 00 09 ad call 20136b4 <_Thread_queue_Initialize> 2011004: b0 10 20 01 mov 1, %i0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2011008: b0 0e 20 01 and %i0, 1, %i0 201100c: 81 c7 e0 08 ret 2011010: 81 e8 00 00 restore =============================================================================== 02008568 <_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 ) { 2008568: 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)) ) { 200856c: 90 10 00 18 mov %i0, %o0 2008570: 40 00 07 6c call 200a320 <_Thread_queue_Dequeue> 2008574: ba 10 00 18 mov %i0, %i5 2008578: 80 a2 20 00 cmp %o0, 0 200857c: 12 80 00 0e bne 20085b4 <_CORE_semaphore_Surrender+0x4c> 2008580: 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 ); 2008584: 7f ff e8 10 call 20025c4 2008588: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 200858c: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2008590: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2008594: 80 a0 40 02 cmp %g1, %g2 2008598: 1a 80 00 05 bcc 20085ac <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 200859c: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20085a0: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 20085a4: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20085a8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20085ac: 7f ff e8 0a call 20025d4 20085b0: 01 00 00 00 nop } return status; } 20085b4: 81 c7 e0 08 ret 20085b8: 81 e8 00 00 restore =============================================================================== 02007260 <_Event_Surrender>: rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 2007260: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; 2007264: e0 06 20 30 ld [ %i0 + 0x30 ], %l0 _ISR_Disable( level ); 2007268: 7f ff ec d7 call 20025c4 200726c: ba 10 00 18 mov %i0, %i5 2007270: b0 10 00 08 mov %o0, %i0 RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; 2007274: c2 06 80 00 ld [ %i2 ], %g1 2007278: b2 16 40 01 or %i1, %g1, %i1 200727c: f2 26 80 00 st %i1, [ %i2 ] _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; 2007280: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2007284: 82 8e 40 02 andcc %i1, %g2, %g1 2007288: 02 80 00 3d be 200737c <_Event_Surrender+0x11c> 200728c: 07 00 80 70 sethi %hi(0x201c000), %g3 /* * 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() && 2007290: 86 10 e2 90 or %g3, 0x290, %g3 ! 201c290 <_Per_CPU_Information> 2007294: c8 00 e0 08 ld [ %g3 + 8 ], %g4 2007298: 80 a1 20 00 cmp %g4, 0 200729c: 22 80 00 18 be,a 20072fc <_Event_Surrender+0x9c> 20072a0: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 20072a4: c6 00 e0 10 ld [ %g3 + 0x10 ], %g3 20072a8: 80 a7 40 03 cmp %i5, %g3 20072ac: 32 80 00 14 bne,a 20072fc <_Event_Surrender+0x9c> 20072b0: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 20072b4: c6 06 c0 00 ld [ %i3 ], %g3 20072b8: 86 00 ff ff add %g3, -1, %g3 /* * 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 ) && 20072bc: 80 a0 e0 01 cmp %g3, 1 20072c0: 38 80 00 0f bgu,a 20072fc <_Event_Surrender+0x9c> 20072c4: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 20072c8: 80 a0 40 02 cmp %g1, %g2 20072cc: 02 80 00 04 be 20072dc <_Event_Surrender+0x7c> 20072d0: 80 8c 20 02 btst 2, %l0 20072d4: 02 80 00 2a be 200737c <_Event_Surrender+0x11c> <== NEVER TAKEN 20072d8: 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) ); 20072dc: b2 2e 40 01 andn %i1, %g1, %i1 event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20072e0: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( 20072e4: f2 26 80 00 st %i1, [ %i2 ] pending_events, seized_events ); the_thread->Wait.count = 0; 20072e8: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20072ec: c2 20 80 00 st %g1, [ %g2 ] *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 20072f0: 82 10 20 03 mov 3, %g1 20072f4: 10 80 00 22 b 200737c <_Event_Surrender+0x11c> 20072f8: c2 26 c0 00 st %g1, [ %i3 ] } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { 20072fc: 80 8f 00 03 btst %i4, %g3 2007300: 02 80 00 1f be 200737c <_Event_Surrender+0x11c> 2007304: 80 a0 40 02 cmp %g1, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2007308: 02 80 00 04 be 2007318 <_Event_Surrender+0xb8> 200730c: 80 8c 20 02 btst 2, %l0 2007310: 02 80 00 1b be 200737c <_Event_Surrender+0x11c> <== NEVER TAKEN 2007314: 01 00 00 00 nop event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007318: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 200731c: b2 2e 40 01 andn %i1, %g1, %i1 /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( 2007320: f2 26 80 00 st %i1, [ %i2 ] pending_events, seized_events ); the_thread->Wait.count = 0; 2007324: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007328: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 200732c: 7f ff ec aa call 20025d4 2007330: 90 10 00 18 mov %i0, %o0 2007334: 7f ff ec a4 call 20025c4 2007338: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200733c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 2007340: 80 a0 60 02 cmp %g1, 2 2007344: 02 80 00 06 be 200735c <_Event_Surrender+0xfc> 2007348: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200734c: 7f ff ec a2 call 20025d4 2007350: 33 04 01 ff sethi %hi(0x1007fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007354: 10 80 00 08 b 2007374 <_Event_Surrender+0x114> 2007358: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1007fff8 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 200735c: c2 27 60 50 st %g1, [ %i5 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2007360: 7f ff ec 9d call 20025d4 2007364: 33 04 01 ff sethi %hi(0x1007fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 2007368: 40 00 0e 81 call 200ad6c <_Watchdog_Remove> 200736c: 90 07 60 48 add %i5, 0x48, %o0 2007370: b2 16 63 f8 or %i1, 0x3f8, %i1 2007374: 40 00 0a 22 call 2009bfc <_Thread_Clear_state> 2007378: 91 e8 00 1d restore %g0, %i5, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200737c: 7f ff ec 96 call 20025d4 2007380: 81 e8 00 00 restore =============================================================================== 02007384 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { 2007384: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); 2007388: 90 10 00 18 mov %i0, %o0 200738c: 40 00 0b 16 call 2009fe4 <_Thread_Get> 2007390: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2007394: c2 07 bf fc ld [ %fp + -4 ], %g1 2007398: 80 a0 60 00 cmp %g1, 0 200739c: 12 80 00 1b bne 2007408 <_Event_Timeout+0x84> <== NEVER TAKEN 20073a0: 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 ); 20073a4: 7f ff ec 88 call 20025c4 20073a8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 20073ac: 03 00 80 70 sethi %hi(0x201c000), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 20073b0: c2 00 62 a0 ld [ %g1 + 0x2a0 ], %g1 ! 201c2a0 <_Per_CPU_Information+0x10> 20073b4: 80 a7 40 01 cmp %i5, %g1 20073b8: 12 80 00 08 bne 20073d8 <_Event_Timeout+0x54> 20073bc: c0 27 60 24 clr [ %i5 + 0x24 ] if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 20073c0: c2 06 40 00 ld [ %i1 ], %g1 20073c4: 80 a0 60 01 cmp %g1, 1 20073c8: 12 80 00 05 bne 20073dc <_Event_Timeout+0x58> 20073cc: 82 10 20 06 mov 6, %g1 *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20073d0: 82 10 20 02 mov 2, %g1 20073d4: c2 26 40 00 st %g1, [ %i1 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20073d8: 82 10 20 06 mov 6, %g1 20073dc: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 20073e0: 7f ff ec 7d call 20025d4 20073e4: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20073e8: 90 10 00 1d mov %i5, %o0 20073ec: 13 04 01 ff sethi %hi(0x1007fc00), %o1 20073f0: 40 00 0a 03 call 2009bfc <_Thread_Clear_state> 20073f4: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 20073f8: 03 00 80 70 sethi %hi(0x201c000), %g1 20073fc: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 201c080 <_Thread_Dispatch_disable_level> --level; 2007400: 84 00 bf ff add %g2, -1, %g2 _Thread_Dispatch_disable_level = level; 2007404: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 2007408: 81 c7 e0 08 ret 200740c: 81 e8 00 00 restore =============================================================================== 0200cca8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200cca8: 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 ) { 200ccac: 80 a6 60 00 cmp %i1, 0 200ccb0: 02 80 00 7a be 200ce98 <_Heap_Free+0x1f0> 200ccb4: 88 10 20 01 mov 1, %g4 200ccb8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200ccbc: 40 00 2b 4e call 20179f4 <.urem> 200ccc0: 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 200ccc4: 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); 200ccc8: 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); 200cccc: 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; 200ccd0: 80 a2 00 1b cmp %o0, %i3 200ccd4: 0a 80 00 05 bcs 200cce8 <_Heap_Free+0x40> 200ccd8: 82 10 20 00 clr %g1 200ccdc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200cce0: 80 a0 40 08 cmp %g1, %o0 200cce4: 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 ) ) { 200cce8: 80 a0 60 00 cmp %g1, 0 200ccec: 02 80 00 6b be 200ce98 <_Heap_Free+0x1f0> 200ccf0: 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; 200ccf4: f8 02 20 04 ld [ %o0 + 4 ], %i4 200ccf8: 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); 200ccfc: 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; 200cd00: 80 a0 40 1b cmp %g1, %i3 200cd04: 0a 80 00 05 bcs 200cd18 <_Heap_Free+0x70> <== NEVER TAKEN 200cd08: 86 10 20 00 clr %g3 200cd0c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200cd10: 80 a0 c0 01 cmp %g3, %g1 200cd14: 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 ) ) { 200cd18: 80 a0 e0 00 cmp %g3, 0 200cd1c: 02 80 00 5f be 200ce98 <_Heap_Free+0x1f0> <== NEVER TAKEN 200cd20: 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; 200cd24: fa 00 60 04 ld [ %g1 + 4 ], %i5 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200cd28: 80 8f 60 01 btst 1, %i5 200cd2c: 22 80 00 5c be,a 200ce9c <_Heap_Free+0x1f4> <== NEVER TAKEN 200cd30: 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 200cd34: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200cd38: 80 a0 40 04 cmp %g1, %g4 200cd3c: 02 80 00 07 be 200cd58 <_Heap_Free+0xb0> 200cd40: ba 0f 7f fe and %i5, -2, %i5 200cd44: 86 00 40 1d add %g1, %i5, %g3 200cd48: f4 00 e0 04 ld [ %g3 + 4 ], %i2 200cd4c: b4 1e a0 01 xor %i2, 1, %i2 200cd50: 10 80 00 03 b 200cd5c <_Heap_Free+0xb4> 200cd54: b4 0e a0 01 and %i2, 1, %i2 200cd58: b4 10 20 00 clr %i2 if ( !_Heap_Is_prev_used( block ) ) { 200cd5c: 80 8f 20 01 btst 1, %i4 200cd60: 12 80 00 26 bne 200cdf8 <_Heap_Free+0x150> 200cd64: 80 8e a0 ff btst 0xff, %i2 uintptr_t const prev_size = block->prev_size; 200cd68: 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); 200cd6c: 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; 200cd70: 80 a0 c0 1b cmp %g3, %i3 200cd74: 0a 80 00 04 bcs 200cd84 <_Heap_Free+0xdc> <== NEVER TAKEN 200cd78: b2 10 20 00 clr %i1 200cd7c: 80 a1 00 03 cmp %g4, %g3 200cd80: 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 ) ) { 200cd84: 80 a6 60 00 cmp %i1, 0 200cd88: 02 80 00 44 be 200ce98 <_Heap_Free+0x1f0> <== NEVER TAKEN 200cd8c: 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; 200cd90: 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) ) { 200cd94: 80 8e e0 01 btst 1, %i3 200cd98: 02 80 00 40 be 200ce98 <_Heap_Free+0x1f0> <== NEVER TAKEN 200cd9c: 80 8e a0 ff btst 0xff, %i2 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200cda0: 22 80 00 0f be,a 200cddc <_Heap_Free+0x134> 200cda4: 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; 200cda8: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200cdac: c2 00 60 0c ld [ %g1 + 0xc ], %g1 uintptr_t const size = block_size + prev_size + next_block_size; 200cdb0: ba 00 80 1d add %g2, %i5, %i5 prev->next = next; 200cdb4: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200cdb8: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200cdbc: 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; 200cdc0: b8 07 40 1c add %i5, %i4, %i4 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200cdc4: 82 00 7f ff add %g1, -1, %g1 200cdc8: 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; 200cdcc: 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; 200cdd0: 82 17 20 01 or %i4, 1, %g1 200cdd4: 10 80 00 27 b 200ce70 <_Heap_Free+0x1c8> 200cdd8: 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; 200cddc: 88 17 20 01 or %i4, 1, %g4 200cde0: c8 20 e0 04 st %g4, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200cde4: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200cde8: 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; 200cdec: 86 08 ff fe and %g3, -2, %g3 200cdf0: 10 80 00 20 b 200ce70 <_Heap_Free+0x1c8> 200cdf4: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200cdf8: 22 80 00 0d be,a 200ce2c <_Heap_Free+0x184> 200cdfc: 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; 200ce00: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200ce04: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200ce08: c8 22 20 08 st %g4, [ %o0 + 8 ] new_block->prev = prev; 200ce0c: c2 22 20 0c st %g1, [ %o0 + 0xc ] uintptr_t const size = block_size + next_block_size; 200ce10: 86 07 40 02 add %i5, %g2, %g3 next->prev = new_block; prev->next = new_block; 200ce14: 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; 200ce18: d0 21 20 0c st %o0, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200ce1c: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200ce20: 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; 200ce24: 10 80 00 13 b 200ce70 <_Heap_Free+0x1c8> 200ce28: c2 22 20 04 st %g1, [ %o0 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200ce2c: f0 22 20 0c st %i0, [ %o0 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200ce30: c6 22 20 08 st %g3, [ %o0 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200ce34: 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; 200ce38: 86 10 a0 01 or %g2, 1, %g3 200ce3c: c6 22 20 04 st %g3, [ %o0 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200ce40: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200ce44: 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; 200ce48: 86 08 ff fe and %g3, -2, %g3 200ce4c: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200ce50: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200ce54: 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; 200ce58: 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; 200ce5c: d0 26 20 08 st %o0, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200ce60: 80 a0 c0 01 cmp %g3, %g1 200ce64: 1a 80 00 03 bcc 200ce70 <_Heap_Free+0x1c8> 200ce68: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200ce6c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200ce70: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 200ce74: 82 00 7f ff add %g1, -1, %g1 200ce78: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200ce7c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200ce80: 82 00 60 01 inc %g1 200ce84: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200ce88: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200ce8c: 84 00 40 02 add %g1, %g2, %g2 200ce90: 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; 200ce94: 88 10 20 01 mov 1, %g4 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 200ce98: b0 09 20 01 and %g4, 1, %i0 200ce9c: 81 c7 e0 08 ret 200cea0: 81 e8 00 00 restore =============================================================================== 0200a6e0 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 200a6e0: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 200a6e4: b6 10 20 00 clr %i3 Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 200a6e8: ba 10 00 18 mov %i0, %i5 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 200a6ec: 10 80 00 11 b 200a730 <_Heap_Greedy_allocate+0x50> 200a6f0: b8 10 20 00 clr %i4 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 200a6f4: d2 06 40 01 ld [ %i1 + %g1 ], %o1 200a6f8: 90 10 00 1d mov %i5, %o0 200a6fc: 94 10 20 00 clr %o2 200a700: 40 00 1b 80 call 2011500 <_Heap_Allocate_aligned_with_boundary> 200a704: 96 10 20 00 clr %o3 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { 200a708: 82 92 20 00 orcc %o0, 0, %g1 200a70c: 22 80 00 09 be,a 200a730 <_Heap_Greedy_allocate+0x50> <== NEVER TAKEN 200a710: b6 06 e0 01 inc %i3 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200a714: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 200a718: 40 00 47 3f call 201c414 <.urem> 200a71c: b0 00 7f f8 add %g1, -8, %i0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200a720: 90 26 00 08 sub %i0, %o0, %o0 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; 200a724: f8 22 20 08 st %i4, [ %o0 + 8 ] 200a728: b8 10 00 08 mov %o0, %i4 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 200a72c: b6 06 e0 01 inc %i3 200a730: 80 a6 c0 1a cmp %i3, %i2 200a734: 12 bf ff f0 bne 200a6f4 <_Heap_Greedy_allocate+0x14> 200a738: 83 2e e0 02 sll %i3, 2, %g1 200a73c: 10 80 00 0a b 200a764 <_Heap_Greedy_allocate+0x84> 200a740: b0 10 20 00 clr %i0 allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { _Heap_Block_allocate( 200a744: 90 10 00 1d mov %i5, %o0 } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 200a748: 96 0a ff fe and %o3, -2, %o3 200a74c: 92 10 00 1b mov %i3, %o1 200a750: 94 06 e0 08 add %i3, 8, %o2 200a754: 40 00 00 cb call 200aa80 <_Heap_Block_allocate> 200a758: 96 02 ff f8 add %o3, -8, %o3 current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 200a75c: f0 26 e0 08 st %i0, [ %i3 + 8 ] 200a760: b0 10 00 1b mov %i3, %i0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200a764: f6 07 60 08 ld [ %i5 + 8 ], %i3 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 200a768: 80 a6 c0 1d cmp %i3, %i5 200a76c: 32 bf ff f6 bne,a 200a744 <_Heap_Greedy_allocate+0x64> 200a770: d6 06 e0 04 ld [ %i3 + 4 ], %o3 current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 200a774: 10 80 00 07 b 200a790 <_Heap_Greedy_allocate+0xb0> 200a778: 80 a7 20 00 cmp %i4, 0 current = allocated_blocks; allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 200a77c: 92 07 20 08 add %i4, 8, %o1 200a780: 90 10 00 1d mov %i5, %o0 200a784: 40 00 1b d0 call 20116c4 <_Heap_Free> 200a788: b8 10 00 1b mov %i3, %i4 current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 200a78c: 80 a7 20 00 cmp %i4, 0 200a790: 32 bf ff fb bne,a 200a77c <_Heap_Greedy_allocate+0x9c> 200a794: f6 07 20 08 ld [ %i4 + 8 ], %i3 allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } 200a798: 81 c7 e0 08 ret 200a79c: 81 e8 00 00 restore =============================================================================== 02011848 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 2011848: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; 201184c: 90 10 20 00 clr %o0 Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { Heap_Block *current = heap->first_block; 2011850: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 2011854: 10 80 00 0a b 201187c <_Heap_Iterate+0x34> 2011858: 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 ); 201185c: 90 10 00 01 mov %g1, %o0 2011860: 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); 2011864: 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; 2011868: d4 07 60 04 ld [ %i5 + 4 ], %o2 201186c: 96 10 00 1a mov %i2, %o3 2011870: 9f c6 40 00 call %i1 2011874: 94 0a a0 01 and %o2, 1, %o2 2011878: 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 ) { 201187c: 80 a0 40 1c cmp %g1, %i4 2011880: 02 80 00 05 be 2011894 <_Heap_Iterate+0x4c> 2011884: 90 1a 20 01 xor %o0, 1, %o0 2011888: 80 8a 20 ff btst 0xff, %o0 201188c: 32 bf ff f4 bne,a 201185c <_Heap_Iterate+0x14> <== ALWAYS TAKEN 2011890: d2 00 60 04 ld [ %g1 + 4 ], %o1 2011894: 81 c7 e0 08 ret 2011898: 81 e8 00 00 restore =============================================================================== 0200cfcc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200cfcc: 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); 200cfd0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200cfd4: 40 00 2a 88 call 20179f4 <.urem> 200cfd8: 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 200cfdc: 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); 200cfe0: 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); 200cfe4: 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; 200cfe8: 80 a2 00 04 cmp %o0, %g4 200cfec: 0a 80 00 05 bcs 200d000 <_Heap_Size_of_alloc_area+0x34> 200cff0: 82 10 20 00 clr %g1 200cff4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200cff8: 80 a0 40 08 cmp %g1, %o0 200cffc: 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 ) ) { 200d000: 80 a0 60 00 cmp %g1, 0 200d004: 02 80 00 15 be 200d058 <_Heap_Size_of_alloc_area+0x8c> 200d008: 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; 200d00c: c2 02 20 04 ld [ %o0 + 4 ], %g1 200d010: 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); 200d014: 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; 200d018: 80 a0 40 04 cmp %g1, %g4 200d01c: 0a 80 00 05 bcs 200d030 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 200d020: 84 10 20 00 clr %g2 200d024: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200d028: 80 a0 80 01 cmp %g2, %g1 200d02c: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 200d030: 80 a0 a0 00 cmp %g2, 0 200d034: 02 80 00 09 be 200d058 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200d038: 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; 200d03c: c4 00 60 04 ld [ %g1 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200d040: 80 88 a0 01 btst 1, %g2 200d044: 02 80 00 05 be 200d058 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200d048: 82 20 40 19 sub %g1, %i1, %g1 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200d04c: 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; 200d050: 82 00 60 04 add %g1, 4, %g1 200d054: c2 26 80 00 st %g1, [ %i2 ] return true; } 200d058: b0 08 e0 01 and %g3, 1, %i0 200d05c: 81 c7 e0 08 ret 200d060: 81 e8 00 00 restore =============================================================================== 02009698 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2009698: 9d e3 bf 80 save %sp, -128, %sp 200969c: ac 10 00 19 mov %i1, %l6 uintptr_t const page_size = heap->page_size; 20096a0: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 20096a4: f6 06 20 14 ld [ %i0 + 0x14 ], %i3 Heap_Block *const first_block = heap->first_block; 20096a8: 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; 20096ac: 80 a6 a0 00 cmp %i2, 0 20096b0: 02 80 00 05 be 20096c4 <_Heap_Walk+0x2c> 20096b4: e0 06 20 24 ld [ %i0 + 0x24 ], %l0 20096b8: 3b 00 80 25 sethi %hi(0x2009400), %i5 20096bc: 10 80 00 04 b 20096cc <_Heap_Walk+0x34> 20096c0: ba 17 62 48 or %i5, 0x248, %i5 ! 2009648 <_Heap_Walk_print> 20096c4: 3b 00 80 25 sethi %hi(0x2009400), %i5 20096c8: ba 17 62 40 or %i5, 0x240, %i5 ! 2009640 <_Heap_Walk_print_nothing> if ( !_System_state_Is_up( _System_state_Get() ) ) { 20096cc: 05 00 80 79 sethi %hi(0x201e400), %g2 20096d0: c4 00 a2 6c ld [ %g2 + 0x26c ], %g2 ! 201e66c <_System_state_Current> 20096d4: 80 a0 a0 03 cmp %g2, 3 20096d8: 22 80 00 04 be,a 20096e8 <_Heap_Walk+0x50> 20096dc: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 return true; 20096e0: 10 80 01 2a b 2009b88 <_Heap_Walk+0x4f0> 20096e4: 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)( 20096e8: da 06 20 18 ld [ %i0 + 0x18 ], %o5 20096ec: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 20096f0: f2 23 a0 60 st %i1, [ %sp + 0x60 ] 20096f4: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 20096f8: c4 06 20 08 ld [ %i0 + 8 ], %g2 20096fc: 90 10 00 16 mov %l6, %o0 2009700: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2009704: c4 06 20 0c ld [ %i0 + 0xc ], %g2 2009708: 92 10 20 00 clr %o1 200970c: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2009710: 15 00 80 6c sethi %hi(0x201b000), %o2 2009714: 96 10 00 1c mov %i4, %o3 2009718: 94 12 a2 18 or %o2, 0x218, %o2 200971c: 9f c7 40 00 call %i5 2009720: 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 ) { 2009724: 80 a7 20 00 cmp %i4, 0 2009728: 12 80 00 07 bne 2009744 <_Heap_Walk+0xac> 200972c: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 2009730: 15 00 80 6c sethi %hi(0x201b000), %o2 2009734: 90 10 00 16 mov %l6, %o0 2009738: 92 10 20 01 mov 1, %o1 200973c: 10 80 00 37 b 2009818 <_Heap_Walk+0x180> 2009740: 94 12 a2 b0 or %o2, 0x2b0, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009744: 22 80 00 08 be,a 2009764 <_Heap_Walk+0xcc> 2009748: 90 10 00 1b mov %i3, %o0 (*printer)( 200974c: 15 00 80 6c sethi %hi(0x201b000), %o2 2009750: 90 10 00 16 mov %l6, %o0 2009754: 92 10 20 01 mov 1, %o1 2009758: 94 12 a2 c8 or %o2, 0x2c8, %o2 200975c: 10 80 01 12 b 2009ba4 <_Heap_Walk+0x50c> 2009760: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009764: 7f ff e1 08 call 2001b84 <.urem> 2009768: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 200976c: 80 a2 20 00 cmp %o0, 0 2009770: 22 80 00 08 be,a 2009790 <_Heap_Walk+0xf8> 2009774: 90 06 60 08 add %i1, 8, %o0 (*printer)( 2009778: 15 00 80 6c sethi %hi(0x201b000), %o2 200977c: 90 10 00 16 mov %l6, %o0 2009780: 92 10 20 01 mov 1, %o1 2009784: 94 12 a2 e8 or %o2, 0x2e8, %o2 2009788: 10 80 01 07 b 2009ba4 <_Heap_Walk+0x50c> 200978c: 96 10 00 1b mov %i3, %o3 2009790: 7f ff e0 fd call 2001b84 <.urem> 2009794: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 2009798: 80 a2 20 00 cmp %o0, 0 200979c: 22 80 00 07 be,a 20097b8 <_Heap_Walk+0x120> 20097a0: c4 06 60 04 ld [ %i1 + 4 ], %g2 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 20097a4: 15 00 80 6c sethi %hi(0x201b000), %o2 20097a8: 90 10 00 16 mov %l6, %o0 20097ac: 92 10 20 01 mov 1, %o1 20097b0: 10 80 00 fc b 2009ba0 <_Heap_Walk+0x508> 20097b4: 94 12 a3 10 or %o2, 0x310, %o2 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 20097b8: 80 88 a0 01 btst 1, %g2 20097bc: 32 80 00 07 bne,a 20097d8 <_Heap_Walk+0x140> 20097c0: f4 04 20 04 ld [ %l0 + 4 ], %i2 (*printer)( 20097c4: 15 00 80 6c sethi %hi(0x201b000), %o2 20097c8: 90 10 00 16 mov %l6, %o0 20097cc: 92 10 20 01 mov 1, %o1 20097d0: 10 80 00 12 b 2009818 <_Heap_Walk+0x180> 20097d4: 94 12 a3 48 or %o2, 0x348, %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; 20097d8: 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); 20097dc: 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; 20097e0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20097e4: 80 88 a0 01 btst 1, %g2 20097e8: 12 80 00 07 bne 2009804 <_Heap_Walk+0x16c> 20097ec: 80 a6 80 19 cmp %i2, %i1 (*printer)( 20097f0: 15 00 80 6c sethi %hi(0x201b000), %o2 20097f4: 90 10 00 16 mov %l6, %o0 20097f8: 92 10 20 01 mov 1, %o1 20097fc: 10 80 00 07 b 2009818 <_Heap_Walk+0x180> 2009800: 94 12 a3 78 or %o2, 0x378, %o2 ); return false; } if ( 2009804: 02 80 00 0a be 200982c <_Heap_Walk+0x194> 2009808: 15 00 80 6c sethi %hi(0x201b000), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 200980c: 90 10 00 16 mov %l6, %o0 2009810: 92 10 20 01 mov 1, %o1 2009814: 94 12 a3 90 or %o2, 0x390, %o2 2009818: 9f c7 40 00 call %i5 200981c: b0 10 20 00 clr %i0 2009820: b0 0e 20 ff and %i0, 0xff, %i0 2009824: 81 c7 e0 08 ret 2009828: 81 e8 00 00 restore int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 200982c: 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; 2009830: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2009834: 10 80 00 30 b 20098f4 <_Heap_Walk+0x25c> 2009838: 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; 200983c: 80 a0 c0 0b cmp %g3, %o3 2009840: 18 80 00 05 bgu 2009854 <_Heap_Walk+0x1bc> 2009844: 84 10 20 00 clr %g2 2009848: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200984c: 80 a0 80 0b cmp %g2, %o3 2009850: 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 ) ) { 2009854: 80 a0 a0 00 cmp %g2, 0 2009858: 32 80 00 07 bne,a 2009874 <_Heap_Walk+0x1dc> 200985c: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 2009860: 15 00 80 6c sethi %hi(0x201b000), %o2 2009864: 90 10 00 16 mov %l6, %o0 2009868: 92 10 20 01 mov 1, %o1 200986c: 10 80 00 ce b 2009ba4 <_Heap_Walk+0x50c> 2009870: 94 12 a3 c0 or %o2, 0x3c0, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009874: d6 27 bf fc st %o3, [ %fp + -4 ] 2009878: 7f ff e0 c3 call 2001b84 <.urem> 200987c: 92 10 00 11 mov %l1, %o1 ); return false; } if ( 2009880: 80 a2 20 00 cmp %o0, 0 2009884: 02 80 00 07 be 20098a0 <_Heap_Walk+0x208> 2009888: d6 07 bf fc ld [ %fp + -4 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 200988c: 15 00 80 6c sethi %hi(0x201b000), %o2 2009890: 90 10 00 16 mov %l6, %o0 2009894: 92 10 20 01 mov 1, %o1 2009898: 10 80 00 c3 b 2009ba4 <_Heap_Walk+0x50c> 200989c: 94 12 a3 e0 or %o2, 0x3e0, %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; 20098a0: c4 02 e0 04 ld [ %o3 + 4 ], %g2 20098a4: 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; 20098a8: 84 02 c0 02 add %o3, %g2, %g2 20098ac: c4 00 a0 04 ld [ %g2 + 4 ], %g2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 20098b0: 80 88 a0 01 btst 1, %g2 20098b4: 22 80 00 07 be,a 20098d0 <_Heap_Walk+0x238> 20098b8: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 20098bc: 15 00 80 6d sethi %hi(0x201b400), %o2 20098c0: 90 10 00 16 mov %l6, %o0 20098c4: 92 10 20 01 mov 1, %o1 20098c8: 10 80 00 b7 b 2009ba4 <_Heap_Walk+0x50c> 20098cc: 94 12 a0 10 or %o2, 0x10, %o2 ); return false; } if ( free_block->prev != prev_block ) { 20098d0: 80 a3 00 19 cmp %o4, %i1 20098d4: 02 80 00 07 be 20098f0 <_Heap_Walk+0x258> 20098d8: b2 10 00 0b mov %o3, %i1 (*printer)( 20098dc: 15 00 80 6d sethi %hi(0x201b400), %o2 20098e0: 90 10 00 16 mov %l6, %o0 20098e4: 92 10 20 01 mov 1, %o1 20098e8: 10 80 00 4d b 2009a1c <_Heap_Walk+0x384> 20098ec: 94 12 a0 30 or %o2, 0x30, %o2 return false; } prev_block = free_block; free_block = free_block->next; 20098f0: 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 ) { 20098f4: 80 a2 c0 18 cmp %o3, %i0 20098f8: 32 bf ff d1 bne,a 200983c <_Heap_Walk+0x1a4> 20098fc: 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)( 2009900: 2b 00 80 6d sethi %hi(0x201b400), %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 ) { 2009904: 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)( 2009908: aa 15 61 30 or %l5, 0x130, %l5 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200990c: 23 00 80 6d sethi %hi(0x201b400), %l1 2009910: 2f 00 80 6c sethi %hi(0x201b000), %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; 2009914: 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; 2009918: 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; 200991c: 9e 1e 40 10 xor %i1, %l0, %o7 2009920: 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; 2009924: a8 0c bf fe and %l2, -2, %l4 2009928: 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); 200992c: 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; 2009930: 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; 2009934: 80 a3 00 13 cmp %o4, %l3 2009938: 18 80 00 05 bgu 200994c <_Heap_Walk+0x2b4> <== NEVER TAKEN 200993c: 9e 10 20 00 clr %o7 2009940: de 06 20 24 ld [ %i0 + 0x24 ], %o7 2009944: 80 a3 c0 13 cmp %o7, %l3 2009948: 9e 60 3f ff subx %g0, -1, %o7 if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 200994c: 80 a3 e0 00 cmp %o7, 0 2009950: 32 80 00 07 bne,a 200996c <_Heap_Walk+0x2d4> 2009954: da 27 bf f8 st %o5, [ %fp + -8 ] (*printer)( 2009958: 15 00 80 6d sethi %hi(0x201b400), %o2 200995c: 90 10 00 16 mov %l6, %o0 2009960: 92 10 20 01 mov 1, %o1 2009964: 10 80 00 2c b 2009a14 <_Heap_Walk+0x37c> 2009968: 94 12 a0 68 or %o2, 0x68, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200996c: 90 10 00 14 mov %l4, %o0 2009970: 7f ff e0 85 call 2001b84 <.urem> 2009974: 92 10 00 1c mov %i4, %o1 2009978: da 07 bf f8 ld [ %fp + -8 ], %o5 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 200997c: 80 a2 20 00 cmp %o0, 0 2009980: 02 80 00 0c be 20099b0 <_Heap_Walk+0x318> 2009984: 9e 0b 60 ff and %o5, 0xff, %o7 2009988: 80 a3 e0 00 cmp %o7, 0 200998c: 02 80 00 19 be 20099f0 <_Heap_Walk+0x358> 2009990: 80 a6 40 13 cmp %i1, %l3 (*printer)( 2009994: 15 00 80 6d sethi %hi(0x201b400), %o2 2009998: 90 10 00 16 mov %l6, %o0 200999c: 92 10 20 01 mov 1, %o1 20099a0: 94 12 a0 98 or %o2, 0x98, %o2 20099a4: 96 10 00 19 mov %i1, %o3 20099a8: 10 80 00 1d b 2009a1c <_Heap_Walk+0x384> 20099ac: 98 10 00 14 mov %l4, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 20099b0: 80 a3 e0 00 cmp %o7, 0 20099b4: 02 80 00 0f be 20099f0 <_Heap_Walk+0x358> 20099b8: 80 a6 40 13 cmp %i1, %l3 20099bc: 80 a5 00 1b cmp %l4, %i3 20099c0: 1a 80 00 0c bcc 20099f0 <_Heap_Walk+0x358> 20099c4: 80 a6 40 13 cmp %i1, %l3 (*printer)( 20099c8: 90 10 00 16 mov %l6, %o0 20099cc: 92 10 20 01 mov 1, %o1 20099d0: 15 00 80 6d sethi %hi(0x201b400), %o2 20099d4: 96 10 00 19 mov %i1, %o3 20099d8: 94 12 a0 c8 or %o2, 0xc8, %o2 20099dc: 98 10 00 14 mov %l4, %o4 20099e0: 9f c7 40 00 call %i5 20099e4: 9a 10 00 1b mov %i3, %o5 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 20099e8: 10 80 00 68 b 2009b88 <_Heap_Walk+0x4f0> 20099ec: b0 10 20 00 clr %i0 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 20099f0: 2a 80 00 10 bcs,a 2009a30 <_Heap_Walk+0x398> 20099f4: de 04 e0 04 ld [ %l3 + 4 ], %o7 20099f8: 80 8b 60 ff btst 0xff, %o5 20099fc: 22 80 00 0d be,a 2009a30 <_Heap_Walk+0x398> 2009a00: de 04 e0 04 ld [ %l3 + 4 ], %o7 (*printer)( 2009a04: 15 00 80 6d sethi %hi(0x201b400), %o2 2009a08: 90 10 00 16 mov %l6, %o0 2009a0c: 92 10 20 01 mov 1, %o1 2009a10: 94 12 a0 f8 or %o2, 0xf8, %o2 2009a14: 96 10 00 19 mov %i1, %o3 2009a18: 98 10 00 13 mov %l3, %o4 2009a1c: 9f c7 40 00 call %i5 2009a20: b0 10 20 00 clr %i0 2009a24: b0 0e 20 ff and %i0, 0xff, %i0 2009a28: 81 c7 e0 08 ret 2009a2c: 81 e8 00 00 restore ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2009a30: 80 8b e0 01 btst 1, %o7 2009a34: 12 80 00 3f bne 2009b30 <_Heap_Walk+0x498> 2009a38: 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 ? 2009a3c: 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)( 2009a40: d8 06 20 08 ld [ %i0 + 8 ], %o4 2009a44: 80 a3 40 0c cmp %o5, %o4 2009a48: 02 80 00 08 be 2009a68 <_Heap_Walk+0x3d0> 2009a4c: 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)" : ""), 2009a50: 80 a3 40 18 cmp %o5, %i0 2009a54: 12 80 00 07 bne 2009a70 <_Heap_Walk+0x3d8> 2009a58: 96 14 61 a0 or %l1, 0x1a0, %o3 2009a5c: 17 00 80 6c sethi %hi(0x201b000), %o3 2009a60: 10 80 00 04 b 2009a70 <_Heap_Walk+0x3d8> 2009a64: 96 12 e1 e8 or %o3, 0x1e8, %o3 ! 201b1e8 <__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)( 2009a68: 03 00 80 6c sethi %hi(0x201b000), %g1 2009a6c: 96 10 61 d8 or %g1, 0x1d8, %o3 ! 201b1d8 <__log2table+0x120> block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 2009a70: 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)( 2009a74: 80 a3 00 0f cmp %o4, %o7 2009a78: 02 80 00 06 be 2009a90 <_Heap_Walk+0x3f8> 2009a7c: 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)" : "") 2009a80: 12 80 00 06 bne 2009a98 <_Heap_Walk+0x400> 2009a84: 9e 14 61 a0 or %l1, 0x1a0, %o7 2009a88: 10 80 00 04 b 2009a98 <_Heap_Walk+0x400> 2009a8c: 9e 15 e2 08 or %l7, 0x208, %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)( 2009a90: 03 00 80 6c sethi %hi(0x201b000), %g1 2009a94: 9e 10 61 f8 or %g1, 0x1f8, %o7 ! 201b1f8 <__log2table+0x140> 2009a98: d6 23 a0 5c st %o3, [ %sp + 0x5c ] 2009a9c: d8 23 a0 60 st %o4, [ %sp + 0x60 ] 2009aa0: de 23 a0 64 st %o7, [ %sp + 0x64 ] 2009aa4: 90 10 00 16 mov %l6, %o0 2009aa8: 92 10 20 00 clr %o1 2009aac: 94 10 00 15 mov %l5, %o2 2009ab0: 96 10 00 19 mov %i1, %o3 2009ab4: 9f c7 40 00 call %i5 2009ab8: 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 ) { 2009abc: da 04 c0 00 ld [ %l3 ], %o5 2009ac0: 80 a5 00 0d cmp %l4, %o5 2009ac4: 02 80 00 0c be 2009af4 <_Heap_Walk+0x45c> 2009ac8: 80 a4 a0 00 cmp %l2, 0 (*printer)( 2009acc: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2009ad0: 90 10 00 16 mov %l6, %o0 2009ad4: 92 10 20 01 mov 1, %o1 2009ad8: 15 00 80 6d sethi %hi(0x201b400), %o2 2009adc: 96 10 00 19 mov %i1, %o3 2009ae0: 94 12 a1 68 or %o2, 0x168, %o2 2009ae4: 9f c7 40 00 call %i5 2009ae8: 98 10 00 14 mov %l4, %o4 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 2009aec: 10 bf ff ce b 2009a24 <_Heap_Walk+0x38c> 2009af0: b0 10 20 00 clr %i0 ); return false; } if ( !prev_used ) { 2009af4: 32 80 00 0a bne,a 2009b1c <_Heap_Walk+0x484> 2009af8: c6 06 20 08 ld [ %i0 + 8 ], %g3 (*printer)( 2009afc: 15 00 80 6d sethi %hi(0x201b400), %o2 2009b00: 90 10 00 16 mov %l6, %o0 2009b04: 92 10 20 01 mov 1, %o1 2009b08: 10 80 00 26 b 2009ba0 <_Heap_Walk+0x508> 2009b0c: 94 12 a1 a8 or %o2, 0x1a8, %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 ) { 2009b10: 22 80 00 19 be,a 2009b74 <_Heap_Walk+0x4dc> 2009b14: b2 10 00 13 mov %l3, %i1 return true; } free_block = free_block->next; 2009b18: 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 ) { 2009b1c: 80 a0 c0 18 cmp %g3, %i0 2009b20: 12 bf ff fc bne 2009b10 <_Heap_Walk+0x478> 2009b24: 80 a0 c0 19 cmp %g3, %i1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009b28: 10 80 00 1b b 2009b94 <_Heap_Walk+0x4fc> 2009b2c: 15 00 80 6d sethi %hi(0x201b400), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2009b30: 80 a4 a0 00 cmp %l2, 0 2009b34: 02 80 00 09 be 2009b58 <_Heap_Walk+0x4c0> 2009b38: 92 10 20 00 clr %o1 (*printer)( 2009b3c: 15 00 80 6d sethi %hi(0x201b400), %o2 2009b40: 96 10 00 19 mov %i1, %o3 2009b44: 94 12 a1 d8 or %o2, 0x1d8, %o2 2009b48: 9f c7 40 00 call %i5 2009b4c: 98 10 00 14 mov %l4, %o4 2009b50: 10 80 00 09 b 2009b74 <_Heap_Walk+0x4dc> 2009b54: b2 10 00 13 mov %l3, %i1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009b58: da 06 40 00 ld [ %i1 ], %o5 2009b5c: 15 00 80 6d sethi %hi(0x201b400), %o2 2009b60: 96 10 00 19 mov %i1, %o3 2009b64: 94 12 a1 f0 or %o2, 0x1f0, %o2 2009b68: 9f c7 40 00 call %i5 2009b6c: 98 10 00 14 mov %l4, %o4 2009b70: b2 10 00 13 mov %l3, %i1 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009b74: 80 a4 c0 1a cmp %l3, %i2 2009b78: 32 bf ff 68 bne,a 2009918 <_Heap_Walk+0x280> 2009b7c: e4 06 60 04 ld [ %i1 + 4 ], %l2 2009b80: 10 80 00 02 b 2009b88 <_Heap_Walk+0x4f0> 2009b84: b0 10 20 01 mov 1, %i0 2009b88: b0 0e 20 ff and %i0, 0xff, %i0 2009b8c: 81 c7 e0 08 ret 2009b90: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009b94: 90 10 00 16 mov %l6, %o0 2009b98: 92 10 20 01 mov 1, %o1 2009b9c: 94 12 a2 18 or %o2, 0x218, %o2 2009ba0: 96 10 00 19 mov %i1, %o3 2009ba4: 9f c7 40 00 call %i5 2009ba8: b0 10 20 00 clr %i0 2009bac: b0 0e 20 ff and %i0, 0xff, %i0 2009bb0: 81 c7 e0 08 ret 2009bb4: 81 e8 00 00 restore =============================================================================== 02008a8c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 2008a8c: 9d e3 bf 90 save %sp, -112, %sp Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 2008a90: 13 00 80 2a sethi %hi(0x200a800), %o1 2008a94: 90 07 bf f4 add %fp, -12, %o0 2008a98: 92 12 62 e0 or %o1, 0x2e0, %o1 Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; 2008a9c: f0 27 bf f4 st %i0, [ %fp + -12 ] 2008aa0: f2 2f bf f8 stb %i1, [ %fp + -8 ] _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 2008aa4: 40 00 08 1a call 200ab0c <_User_extensions_Iterate> 2008aa8: f4 27 bf fc st %i2, [ %fp + -4 ] _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; 2008aac: 05 00 80 70 sethi %hi(0x201c000), %g2 <== NOT EXECUTED 2008ab0: 82 10 a2 80 or %g2, 0x280, %g1 ! 201c280 <_Internal_errors_What_happened><== NOT EXECUTED 2008ab4: f0 20 a2 80 st %i0, [ %g2 + 0x280 ] <== NOT EXECUTED _Internal_errors_What_happened.is_internal = is_internal; 2008ab8: f2 28 60 04 stb %i1, [ %g1 + 4 ] <== NOT EXECUTED _Internal_errors_What_happened.the_error = the_error; 2008abc: f4 20 60 08 st %i2, [ %g1 + 8 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 2008ac0: 84 10 20 05 mov 5, %g2 <== NOT EXECUTED 2008ac4: 03 00 80 70 sethi %hi(0x201c000), %g1 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 2008ac8: 7f ff e6 bf call 20025c4 <== NOT EXECUTED 2008acc: c4 20 62 8c st %g2, [ %g1 + 0x28c ] ! 201c28c <_System_state_Current><== NOT EXECUTED 2008ad0: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED 2008ad4: 30 80 00 00 b,a 2008ad4 <_Internal_error_Occurred+0x48> <== NOT EXECUTED =============================================================================== 02008b40 <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008b40: 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 ) 2008b44: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008b48: 80 a0 60 00 cmp %g1, 0 2008b4c: 12 80 00 04 bne 2008b5c <_Objects_Allocate+0x1c> <== ALWAYS TAKEN 2008b50: ba 10 00 18 mov %i0, %i5 return NULL; 2008b54: 81 c7 e0 08 ret 2008b58: 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 ); 2008b5c: b8 06 20 20 add %i0, 0x20, %i4 2008b60: 7f ff fd 85 call 2008174 <_Chain_Get> 2008b64: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2008b68: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2008b6c: 80 a0 60 00 cmp %g1, 0 2008b70: 02 80 00 1d be 2008be4 <_Objects_Allocate+0xa4> 2008b74: 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 ) { 2008b78: 80 a2 20 00 cmp %o0, 0 2008b7c: 32 80 00 0a bne,a 2008ba4 <_Objects_Allocate+0x64> 2008b80: c4 07 60 08 ld [ %i5 + 8 ], %g2 _Objects_Extend_information( information ); 2008b84: 40 00 00 21 call 2008c08 <_Objects_Extend_information> 2008b88: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008b8c: 7f ff fd 7a call 2008174 <_Chain_Get> 2008b90: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2008b94: b0 92 20 00 orcc %o0, 0, %i0 2008b98: 02 bf ff ef be 2008b54 <_Objects_Allocate+0x14> 2008b9c: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008ba0: c4 07 60 08 ld [ %i5 + 8 ], %g2 2008ba4: d0 06 20 08 ld [ %i0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008ba8: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008bac: 03 00 00 3f sethi %hi(0xfc00), %g1 2008bb0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2008bb4: 90 0a 00 01 and %o0, %g1, %o0 2008bb8: 82 08 80 01 and %g2, %g1, %g1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008bbc: 40 00 3a e2 call 2017744 <.udiv> 2008bc0: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2008bc4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2008bc8: 91 2a 20 02 sll %o0, 2, %o0 2008bcc: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2008bd0: 84 00 bf ff add %g2, -1, %g2 2008bd4: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2008bd8: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 2008bdc: 82 00 7f ff add %g1, -1, %g1 2008be0: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2008be4: 81 c7 e0 08 ret 2008be8: 81 e8 00 00 restore =============================================================================== 02008f70 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2008f70: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 2008f74: 80 a6 60 00 cmp %i1, 0 2008f78: 12 80 00 04 bne 2008f88 <_Objects_Get_information+0x18> 2008f7c: 01 00 00 00 nop return NULL; 2008f80: 81 c7 e0 08 ret 2008f84: 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 ); 2008f88: 40 00 10 37 call 200d064 <_Objects_API_maximum_class> 2008f8c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2008f90: 80 a2 20 00 cmp %o0, 0 2008f94: 02 bf ff fb be 2008f80 <_Objects_Get_information+0x10> 2008f98: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 2008f9c: 18 bf ff f9 bgu 2008f80 <_Objects_Get_information+0x10> 2008fa0: 03 00 80 6f sethi %hi(0x201bc00), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2008fa4: b1 2e 20 02 sll %i0, 2, %i0 2008fa8: 82 10 63 e4 or %g1, 0x3e4, %g1 2008fac: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2008fb0: 80 a0 60 00 cmp %g1, 0 2008fb4: 02 bf ff f3 be 2008f80 <_Objects_Get_information+0x10> <== NEVER TAKEN 2008fb8: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 2008fbc: f0 00 40 19 ld [ %g1 + %i1 ], %i0 if ( !info ) 2008fc0: 80 a6 20 00 cmp %i0, 0 2008fc4: 02 bf ff ef be 2008f80 <_Objects_Get_information+0x10> <== NEVER TAKEN 2008fc8: 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 ) 2008fcc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2008fd0: 80 a0 60 00 cmp %g1, 0 2008fd4: 02 bf ff eb be 2008f80 <_Objects_Get_information+0x10> 2008fd8: 01 00 00 00 nop return NULL; #endif return info; } 2008fdc: 81 c7 e0 08 ret 2008fe0: 81 e8 00 00 restore =============================================================================== 0201b2b8 <_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; 201b2b8: c2 02 20 08 ld [ %o0 + 8 ], %g1 201b2bc: 92 22 40 01 sub %o1, %g1, %o1 if ( information->maximum >= index ) { 201b2c0: 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; 201b2c4: 92 02 60 01 inc %o1 if ( information->maximum >= index ) { 201b2c8: 80 a0 40 09 cmp %g1, %o1 201b2cc: 0a 80 00 09 bcs 201b2f0 <_Objects_Get_no_protection+0x38> 201b2d0: 93 2a 60 02 sll %o1, 2, %o1 if ( (the_object = information->local_table[ index ]) != NULL ) { 201b2d4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 201b2d8: d0 00 40 09 ld [ %g1 + %o1 ], %o0 201b2dc: 80 a2 20 00 cmp %o0, 0 201b2e0: 02 80 00 05 be 201b2f4 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN 201b2e4: 82 10 20 01 mov 1, %g1 *location = OBJECTS_LOCAL; return the_object; 201b2e8: 81 c3 e0 08 retl 201b2ec: 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; 201b2f0: 82 10 20 01 mov 1, %g1 return NULL; 201b2f4: 90 10 20 00 clr %o0 } 201b2f8: 81 c3 e0 08 retl 201b2fc: c2 22 80 00 st %g1, [ %o2 ] =============================================================================== 0200d078 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200d078: 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; 200d07c: 80 a6 20 00 cmp %i0, 0 200d080: 12 80 00 06 bne 200d098 <_Objects_Id_to_name+0x20> 200d084: 83 36 20 18 srl %i0, 0x18, %g1 200d088: 03 00 80 b1 sethi %hi(0x202c400), %g1 200d08c: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 202c4d0 <_Per_CPU_Information+0x10> 200d090: f0 00 60 08 ld [ %g1 + 8 ], %i0 200d094: 83 36 20 18 srl %i0, 0x18, %g1 200d098: 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 ) 200d09c: 84 00 7f ff add %g1, -1, %g2 200d0a0: 80 a0 a0 02 cmp %g2, 2 200d0a4: 08 80 00 14 bleu 200d0f4 <_Objects_Id_to_name+0x7c> 200d0a8: 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; 200d0ac: 81 c7 e0 08 ret 200d0b0: 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 ]; 200d0b4: 85 28 a0 02 sll %g2, 2, %g2 200d0b8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200d0bc: 80 a2 20 00 cmp %o0, 0 200d0c0: 02 bf ff fb be 200d0ac <_Objects_Id_to_name+0x34> <== NEVER TAKEN 200d0c4: 92 10 00 18 mov %i0, %o1 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 200d0c8: 7f ff ff cf call 200d004 <_Objects_Get> 200d0cc: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200d0d0: 80 a2 20 00 cmp %o0, 0 200d0d4: 02 bf ff f6 be 200d0ac <_Objects_Id_to_name+0x34> 200d0d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200d0dc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200d0e0: 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(); 200d0e4: 40 00 03 c5 call 200dff8 <_Thread_Enable_dispatch> 200d0e8: c2 26 40 00 st %g1, [ %i1 ] 200d0ec: 81 c7 e0 08 ret 200d0f0: 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 ] ) 200d0f4: 05 00 80 b0 sethi %hi(0x202c000), %g2 200d0f8: 84 10 a1 d4 or %g2, 0x1d4, %g2 ! 202c1d4 <_Objects_Information_table> 200d0fc: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d100: 80 a0 60 00 cmp %g1, 0 200d104: 12 bf ff ec bne 200d0b4 <_Objects_Id_to_name+0x3c> 200d108: 85 36 20 1b srl %i0, 0x1b, %g2 200d10c: 30 bf ff e8 b,a 200d0ac <_Objects_Id_to_name+0x34> =============================================================================== 0200a15c <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a15c: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200a160: 80 a6 60 00 cmp %i1, 0 200a164: 02 80 00 69 be 200a308 <_RBTree_Extract_unprotected+0x1ac> 200a168: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200a16c: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a170: 80 a6 40 01 cmp %i1, %g1 200a174: 32 80 00 07 bne,a 200a190 <_RBTree_Extract_unprotected+0x34> 200a178: 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 ); 200a17c: 90 10 00 19 mov %i1, %o0 200a180: 40 00 01 31 call 200a644 <_RBTree_Next_unprotected> 200a184: 92 10 20 01 mov 1, %o1 RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 200a188: 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]) { 200a18c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a190: 80 a6 40 01 cmp %i1, %g1 200a194: 32 80 00 07 bne,a 200a1b0 <_RBTree_Extract_unprotected+0x54> 200a198: 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 ); 200a19c: 90 10 00 19 mov %i1, %o0 200a1a0: 40 00 01 29 call 200a644 <_RBTree_Next_unprotected> 200a1a4: 92 10 20 00 clr %o1 RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 200a1a8: 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]) { 200a1ac: fa 06 60 04 ld [ %i1 + 4 ], %i5 200a1b0: 80 a7 60 00 cmp %i5, 0 200a1b4: 02 80 00 36 be 200a28c <_RBTree_Extract_unprotected+0x130> 200a1b8: f8 06 60 08 ld [ %i1 + 8 ], %i4 200a1bc: 80 a7 20 00 cmp %i4, 0 200a1c0: 32 80 00 05 bne,a 200a1d4 <_RBTree_Extract_unprotected+0x78> 200a1c4: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a1c8: 10 80 00 35 b 200a29c <_RBTree_Extract_unprotected+0x140> 200a1cc: 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]; 200a1d0: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a1d4: 80 a0 60 00 cmp %g1, 0 200a1d8: 32 bf ff fe bne,a 200a1d0 <_RBTree_Extract_unprotected+0x74> 200a1dc: 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]; 200a1e0: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200a1e4: 80 a7 20 00 cmp %i4, 0 200a1e8: 02 80 00 05 be 200a1fc <_RBTree_Extract_unprotected+0xa0> 200a1ec: 01 00 00 00 nop leaf->parent = target->parent; 200a1f0: c2 07 40 00 ld [ %i5 ], %g1 200a1f4: 10 80 00 04 b 200a204 <_RBTree_Extract_unprotected+0xa8> 200a1f8: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200a1fc: 7f ff ff 73 call 2009fc8 <_RBTree_Extract_validate_unprotected> 200a200: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200a204: 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; 200a208: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 200a20c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a210: 86 1f 40 03 xor %i5, %g3, %g3 200a214: 80 a0 00 03 cmp %g0, %g3 200a218: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 200a21c: 87 28 e0 02 sll %g3, 2, %g3 200a220: 84 00 80 03 add %g2, %g3, %g2 200a224: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200a228: c4 06 40 00 ld [ %i1 ], %g2 200a22c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a230: 86 1e 40 03 xor %i1, %g3, %g3 200a234: 80 a0 00 03 cmp %g0, %g3 200a238: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 200a23c: 87 28 e0 02 sll %g3, 2, %g3 200a240: 84 00 80 03 add %g2, %g3, %g2 200a244: 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]; 200a248: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a24c: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200a250: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a254: 80 a0 a0 00 cmp %g2, 0 200a258: 32 80 00 02 bne,a 200a260 <_RBTree_Extract_unprotected+0x104><== ALWAYS TAKEN 200a25c: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200a260: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a264: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200a268: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a26c: 80 a0 a0 00 cmp %g2, 0 200a270: 32 80 00 02 bne,a 200a278 <_RBTree_Extract_unprotected+0x11c> 200a274: 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; 200a278: c4 06 40 00 ld [ %i1 ], %g2 200a27c: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200a280: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200a284: 10 80 00 14 b 200a2d4 <_RBTree_Extract_unprotected+0x178> 200a288: 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 ) { 200a28c: 80 a7 20 00 cmp %i4, 0 200a290: 32 80 00 04 bne,a 200a2a0 <_RBTree_Extract_unprotected+0x144> 200a294: c2 06 40 00 ld [ %i1 ], %g1 200a298: 30 80 00 04 b,a 200a2a8 <_RBTree_Extract_unprotected+0x14c> leaf->parent = the_node->parent; 200a29c: c2 06 40 00 ld [ %i1 ], %g1 200a2a0: 10 80 00 04 b 200a2b0 <_RBTree_Extract_unprotected+0x154> 200a2a4: 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); 200a2a8: 7f ff ff 48 call 2009fc8 <_RBTree_Extract_validate_unprotected> 200a2ac: 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]; 200a2b0: 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; 200a2b4: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200a2b8: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a2bc: 86 1e 40 03 xor %i1, %g3, %g3 200a2c0: 80 a0 00 03 cmp %g0, %g3 200a2c4: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 200a2c8: 87 28 e0 02 sll %g3, 2, %g3 200a2cc: 84 00 80 03 add %g2, %g3, %g2 200a2d0: 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 */ 200a2d4: 80 a0 60 00 cmp %g1, 0 200a2d8: 32 80 00 06 bne,a 200a2f0 <_RBTree_Extract_unprotected+0x194> 200a2dc: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200a2e0: 80 a7 20 00 cmp %i4, 0 200a2e4: 32 80 00 02 bne,a 200a2ec <_RBTree_Extract_unprotected+0x190> 200a2e8: 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; 200a2ec: 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; 200a2f0: c0 26 60 08 clr [ %i1 + 8 ] 200a2f4: c0 26 60 04 clr [ %i1 + 4 ] 200a2f8: 80 a0 60 00 cmp %g1, 0 200a2fc: 02 80 00 03 be 200a308 <_RBTree_Extract_unprotected+0x1ac> 200a300: c0 26 40 00 clr [ %i1 ] 200a304: c0 20 60 0c clr [ %g1 + 0xc ] 200a308: 81 c7 e0 08 ret 200a30c: 81 e8 00 00 restore =============================================================================== 0200b350 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200b350: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200b354: 80 a6 20 00 cmp %i0, 0 200b358: 02 80 00 10 be 200b398 <_RBTree_Initialize+0x48> <== NEVER TAKEN 200b35c: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200b360: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200b364: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200b368: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200b36c: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200b370: 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-- ) { 200b374: 10 80 00 06 b 200b38c <_RBTree_Initialize+0x3c> 200b378: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert_unprotected(the_rbtree, next); 200b37c: 90 10 00 18 mov %i0, %o0 200b380: 7f ff ff 2e call 200b038 <_RBTree_Insert_unprotected> 200b384: b4 06 80 1c add %i2, %i4, %i2 200b388: 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-- ) { 200b38c: 80 a6 e0 00 cmp %i3, 0 200b390: 12 bf ff fb bne 200b37c <_RBTree_Initialize+0x2c> 200b394: 92 10 00 1a mov %i2, %o1 200b398: 81 c7 e0 08 ret 200b39c: 81 e8 00 00 restore =============================================================================== 0200a3b0 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a3b0: 9d e3 bf a0 save %sp, -96, %sp if(!the_node) return (RBTree_Node*)-1; 200a3b4: 80 a6 60 00 cmp %i1, 0 200a3b8: 02 80 00 7c be 200a5a8 <_RBTree_Insert_unprotected+0x1f8> 200a3bc: ba 10 00 18 mov %i0, %i5 RBTree_Node *iter_node = the_rbtree->root; 200a3c0: f0 06 20 04 ld [ %i0 + 4 ], %i0 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200a3c4: b6 96 20 00 orcc %i0, 0, %i3 200a3c8: 32 80 00 0c bne,a 200a3f8 <_RBTree_Insert_unprotected+0x48> 200a3cc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200a3d0: c0 26 60 0c clr [ %i1 + 0xc ] the_rbtree->root = the_node; 200a3d4: f2 27 60 04 st %i1, [ %i5 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200a3d8: f2 27 60 0c st %i1, [ %i5 + 0xc ] 200a3dc: f2 27 60 08 st %i1, [ %i5 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200a3e0: fa 26 40 00 st %i5, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a3e4: c0 26 60 08 clr [ %i1 + 8 ] 200a3e8: c0 26 60 04 clr [ %i1 + 4 ] 200a3ec: 81 c7 e0 08 ret 200a3f0: 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); 200a3f4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a3f8: 90 10 00 19 mov %i1, %o0 200a3fc: 9f c0 40 00 call %g1 200a400: 92 10 00 18 mov %i0, %o1 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200a404: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1 200a408: 80 a0 60 00 cmp %g1, 0 200a40c: 02 80 00 05 be 200a420 <_RBTree_Insert_unprotected+0x70> 200a410: b8 38 00 08 xnor %g0, %o0, %i4 200a414: 80 a2 20 00 cmp %o0, 0 200a418: 02 80 00 65 be 200a5ac <_RBTree_Insert_unprotected+0x1fc> 200a41c: 01 00 00 00 nop return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a420: b9 37 20 1f srl %i4, 0x1f, %i4 if (!iter_node->child[dir]) { 200a424: 83 2f 20 02 sll %i4, 2, %g1 200a428: 82 06 00 01 add %i0, %g1, %g1 200a42c: f0 00 60 04 ld [ %g1 + 4 ], %i0 200a430: 80 a6 20 00 cmp %i0, 0 200a434: 32 bf ff f0 bne,a 200a3f4 <_RBTree_Insert_unprotected+0x44> 200a438: b6 10 00 18 mov %i0, %i3 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a43c: c0 26 60 08 clr [ %i1 + 8 ] 200a440: c0 26 60 04 clr [ %i1 + 4 ] the_node->color = RBT_RED; 200a444: 84 10 20 01 mov 1, %g2 iter_node->child[dir] = the_node; 200a448: 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; 200a44c: c4 26 60 0c st %g2, [ %i1 + 0xc ] iter_node->child[dir] = the_node; the_node->parent = iter_node; 200a450: f6 26 40 00 st %i3, [ %i1 ] /* update min/max */ compare_result = the_rbtree->compare_function( 200a454: 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]; 200a458: b6 07 20 02 add %i4, 2, %i3 200a45c: 85 2e e0 02 sll %i3, 2, %g2 200a460: d2 07 40 02 ld [ %i5 + %g2 ], %o1 200a464: 9f c0 40 00 call %g1 200a468: 90 10 00 19 mov %i1, %o0 the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 200a46c: 80 a7 20 00 cmp %i4, 0 200a470: 12 80 00 06 bne 200a488 <_RBTree_Insert_unprotected+0xd8> 200a474: 80 a2 20 00 cmp %o0, 0 200a478: 36 80 00 3c bge,a 200a568 <_RBTree_Insert_unprotected+0x1b8> 200a47c: d0 06 40 00 ld [ %i1 ], %o0 (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; 200a480: 10 80 00 04 b 200a490 <_RBTree_Insert_unprotected+0xe0> 200a484: 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)) ) { 200a488: 04 80 00 37 ble 200a564 <_RBTree_Insert_unprotected+0x1b4> 200a48c: b7 2e e0 02 sll %i3, 2, %i3 the_rbtree->first[dir] = the_node; 200a490: 10 80 00 35 b 200a564 <_RBTree_Insert_unprotected+0x1b4> 200a494: 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; 200a498: 02 80 00 13 be 200a4e4 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN 200a49c: 82 10 20 00 clr %g1 if(!(the_node->parent->parent->parent)) return NULL; 200a4a0: c2 07 40 00 ld [ %i5 ], %g1 200a4a4: 80 a0 60 00 cmp %g1, 0 200a4a8: 02 80 00 0f be 200a4e4 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN 200a4ac: 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]) 200a4b0: c2 07 60 04 ld [ %i5 + 4 ], %g1 200a4b4: 80 a2 00 01 cmp %o0, %g1 200a4b8: 22 80 00 02 be,a 200a4c0 <_RBTree_Insert_unprotected+0x110> 200a4bc: 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); 200a4c0: 80 a0 60 00 cmp %g1, 0 200a4c4: 02 80 00 09 be 200a4e8 <_RBTree_Insert_unprotected+0x138> 200a4c8: 84 10 20 00 clr %g2 200a4cc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a4d0: 80 a0 a0 01 cmp %g2, 1 200a4d4: 32 80 00 05 bne,a 200a4e8 <_RBTree_Insert_unprotected+0x138> 200a4d8: 84 10 20 00 clr %g2 200a4dc: 10 80 00 03 b 200a4e8 <_RBTree_Insert_unprotected+0x138> 200a4e0: 84 10 20 01 mov 1, %g2 200a4e4: 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)) { 200a4e8: 80 a0 a0 00 cmp %g2, 0 200a4ec: 22 80 00 08 be,a 200a50c <_RBTree_Insert_unprotected+0x15c> 200a4f0: c2 07 60 04 ld [ %i5 + 4 ], %g1 the_node->parent->color = RBT_BLACK; 200a4f4: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 200a4f8: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a4fc: b2 10 00 1d mov %i5, %i1 200a500: 82 10 20 01 mov 1, %g1 200a504: 10 80 00 18 b 200a564 <_RBTree_Insert_unprotected+0x1b4> 200a508: 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]; 200a50c: 82 1a 00 01 xor %o0, %g1, %g1 200a510: 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]; 200a514: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 200a518: 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]; 200a51c: 82 1e 40 01 xor %i1, %g1, %g1 200a520: 80 a0 00 01 cmp %g0, %g1 200a524: 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) { 200a528: 80 a0 40 1c cmp %g1, %i4 200a52c: 22 80 00 08 be,a 200a54c <_RBTree_Insert_unprotected+0x19c> 200a530: c2 06 40 00 ld [ %i1 ], %g1 _RBTree_Rotate(the_node->parent, pdir); 200a534: 7f ff ff 80 call 200a334 <_RBTree_Rotate> 200a538: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200a53c: 83 2f 20 02 sll %i4, 2, %g1 200a540: b2 06 40 01 add %i1, %g1, %i1 200a544: f2 06 60 04 ld [ %i1 + 4 ], %i1 } the_node->parent->color = RBT_BLACK; 200a548: c2 06 40 00 ld [ %i1 ], %g1 g->color = RBT_RED; 200a54c: 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; 200a550: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a554: d2 27 60 0c st %o1, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200a558: 90 10 00 1d mov %i5, %o0 200a55c: 7f ff ff 76 call 200a334 <_RBTree_Rotate> 200a560: 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; 200a564: d0 06 40 00 ld [ %i1 ], %o0 200a568: fa 02 00 00 ld [ %o0 ], %i5 200a56c: 80 a7 60 00 cmp %i5, 0 200a570: 22 80 00 06 be,a 200a588 <_RBTree_Insert_unprotected+0x1d8> 200a574: 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); 200a578: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a57c: 82 18 60 01 xor %g1, 1, %g1 200a580: 80 a0 00 01 cmp %g0, %g1 200a584: 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))) { 200a588: 80 a0 60 00 cmp %g1, 0 200a58c: 12 bf ff c3 bne 200a498 <_RBTree_Insert_unprotected+0xe8> 200a590: 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; 200a594: 12 80 00 06 bne 200a5ac <_RBTree_Insert_unprotected+0x1fc> 200a598: 01 00 00 00 nop 200a59c: c0 26 60 0c clr [ %i1 + 0xc ] 200a5a0: 81 c7 e0 08 ret 200a5a4: 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; 200a5a8: b0 10 3f ff mov -1, %i0 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200a5ac: 81 c7 e0 08 ret 200a5b0: 81 e8 00 00 restore =============================================================================== 0200a5e4 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200a5e4: 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; 200a5e8: b8 10 20 00 clr %i4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a5ec: 80 a0 00 19 cmp %g0, %i1 200a5f0: 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]; 200a5f4: 82 00 60 02 add %g1, 2, %g1 200a5f8: 83 28 60 02 sll %g1, 2, %g1 while ( !stop && current != NULL ) { 200a5fc: 10 80 00 0a b 200a624 <_RBTree_Iterate_unprotected+0x40> 200a600: fa 06 00 01 ld [ %i0 + %g1 ], %i5 stop = (*visitor)( current, dir, visitor_arg ); 200a604: 92 10 00 19 mov %i1, %o1 200a608: 9f c6 80 00 call %i2 200a60c: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( current, dir ); 200a610: 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 ); 200a614: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( current, dir ); 200a618: 40 00 00 0b call 200a644 <_RBTree_Next_unprotected> 200a61c: 90 10 00 1d mov %i5, %o0 200a620: 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 ) { 200a624: 80 a7 60 00 cmp %i5, 0 200a628: 02 80 00 05 be 200a63c <_RBTree_Iterate_unprotected+0x58> 200a62c: b8 1f 20 01 xor %i4, 1, %i4 200a630: 80 8f 20 ff btst 0xff, %i4 200a634: 12 bf ff f4 bne 200a604 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN 200a638: 90 10 00 1d mov %i5, %o0 200a63c: 81 c7 e0 08 ret 200a640: 81 e8 00 00 restore =============================================================================== 02009f4c <_RBTree_Rotate>: RBTree_Node *the_node, RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; 2009f4c: 80 a2 20 00 cmp %o0, 0 2009f50: 02 80 00 1c be 2009fc0 <_RBTree_Rotate+0x74> <== NEVER TAKEN 2009f54: 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); 2009f58: 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; 2009f5c: 87 28 e0 02 sll %g3, 2, %g3 2009f60: 86 02 00 03 add %o0, %g3, %g3 2009f64: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2009f68: 80 a0 60 00 cmp %g1, 0 2009f6c: 02 80 00 15 be 2009fc0 <_RBTree_Rotate+0x74> <== NEVER TAKEN 2009f70: 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]; 2009f74: 84 00 40 09 add %g1, %o1, %g2 2009f78: c8 00 a0 04 ld [ %g2 + 4 ], %g4 2009f7c: c8 20 e0 04 st %g4, [ %g3 + 4 ] if (c->child[dir]) 2009f80: c4 00 a0 04 ld [ %g2 + 4 ], %g2 2009f84: 80 a0 a0 00 cmp %g2, 0 2009f88: 32 80 00 02 bne,a 2009f90 <_RBTree_Rotate+0x44> 2009f8c: 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; 2009f90: 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; 2009f94: 92 00 40 09 add %g1, %o1, %o1 2009f98: d0 22 60 04 st %o0, [ %o1 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 2009f9c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 c->parent = the_node->parent; 2009fa0: 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; 2009fa4: 86 1a 00 03 xor %o0, %g3, %g3 c->parent = the_node->parent; the_node->parent = c; 2009fa8: 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; 2009fac: 80 a0 00 03 cmp %g0, %g3 2009fb0: 86 40 20 00 addx %g0, 0, %g3 2009fb4: 87 28 e0 02 sll %g3, 2, %g3 2009fb8: 86 00 80 03 add %g2, %g3, %g3 2009fbc: c2 20 e0 04 st %g1, [ %g3 + 4 ] 2009fc0: 81 c3 e0 08 retl =============================================================================== 02009efc <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 2009efc: 80 a2 20 00 cmp %o0, 0 2009f00: 02 80 00 10 be 2009f40 <_RBTree_Sibling+0x44> <== NEVER TAKEN 2009f04: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 2009f08: c4 02 00 00 ld [ %o0 ], %g2 2009f0c: 80 a0 a0 00 cmp %g2, 0 2009f10: 22 80 00 0d be,a 2009f44 <_RBTree_Sibling+0x48> <== NEVER TAKEN 2009f14: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED if(!(the_node->parent->parent)) return NULL; 2009f18: c2 00 80 00 ld [ %g2 ], %g1 2009f1c: 80 a0 60 00 cmp %g1, 0 2009f20: 02 80 00 08 be 2009f40 <_RBTree_Sibling+0x44> 2009f24: 82 10 20 00 clr %g1 if(the_node == the_node->parent->child[RBT_LEFT]) 2009f28: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2009f2c: 80 a2 00 01 cmp %o0, %g1 2009f30: 22 80 00 04 be,a 2009f40 <_RBTree_Sibling+0x44> 2009f34: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; 2009f38: 81 c3 e0 08 retl 2009f3c: 90 10 00 01 mov %g1, %o0 else return the_node->parent->child[RBT_LEFT]; } 2009f40: 90 10 00 01 mov %g1, %o0 2009f44: 81 c3 e0 08 retl =============================================================================== 02008820 <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { 2008820: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 2008824: fa 06 21 50 ld [ %i0 + 0x150 ], %i5 if ( !api ) 2008828: 80 a7 60 00 cmp %i5, 0 200882c: 02 80 00 1c be 200889c <_RTEMS_signal_Post_switch_hook+0x7c><== NEVER TAKEN 2008830: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 2008834: 7f ff eb 45 call 2003548 2008838: 01 00 00 00 nop signal_set = asr->signals_posted; 200883c: f8 07 60 14 ld [ %i5 + 0x14 ], %i4 asr->signals_posted = 0; 2008840: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 2008844: 7f ff eb 45 call 2003558 2008848: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200884c: 80 a7 20 00 cmp %i4, 0 2008850: 02 80 00 13 be 200889c <_RTEMS_signal_Post_switch_hook+0x7c> 2008854: 94 07 bf fc add %fp, -4, %o2 return; asr->nest_level += 1; 2008858: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200885c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 2008860: 82 00 60 01 inc %g1 2008864: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 2008868: 37 00 00 3f sethi %hi(0xfc00), %i3 200886c: 40 00 01 03 call 2008c78 2008870: 92 16 e3 ff or %i3, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 2008874: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2008878: 9f c0 40 00 call %g1 200887c: 90 10 00 1c mov %i4, %o0 asr->nest_level -= 1; 2008880: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 2008884: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 2008888: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200888c: 92 16 e3 ff or %i3, 0x3ff, %o1 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 2008890: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 2008894: 40 00 00 f9 call 2008c78 2008898: 94 07 bf fc add %fp, -4, %o2 200889c: 81 c7 e0 08 ret 20088a0: 81 e8 00 00 restore =============================================================================== 020320a4 <_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 ) { 20320a4: 9d e3 bf 98 save %sp, -104, %sp */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); 20320a8: 13 00 81 82 sethi %hi(0x2060800), %o1 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 20320ac: f6 06 20 40 ld [ %i0 + 0x40 ], %i3 20320b0: 90 07 bf f8 add %fp, -8, %o0 20320b4: 7f ff 58 8d call 20082e8 <_TOD_Get_with_nanoseconds> 20320b8: 92 12 61 e0 or %o1, 0x1e0, %o1 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 20320bc: c4 1f bf f8 ldd [ %fp + -8 ], %g2 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 20320c0: f8 1e 20 50 ldd [ %i0 + 0x50 ], %i4 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 20320c4: 09 00 81 83 sethi %hi(0x2060c00), %g4 20320c8: ba a0 c0 1d subcc %g3, %i5, %i5 20320cc: 88 11 20 a0 or %g4, 0xa0, %g4 20320d0: b8 60 80 1c subx %g2, %i4, %i4 20320d4: f8 3e 40 00 std %i4, [ %i1 ] 20320d8: fa 01 20 10 ld [ %g4 + 0x10 ], %i5 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 20320dc: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 20320e0: 80 a6 c0 1d cmp %i3, %i5 20320e4: 12 80 00 15 bne 2032138 <_Rate_monotonic_Get_status+0x94> 20320e8: 82 10 20 01 mov 1, %g1 20320ec: f8 19 20 20 ldd [ %g4 + 0x20 ], %i4 20320f0: 86 a0 c0 1d subcc %g3, %i5, %g3 20320f4: 84 60 80 1c subx %g2, %i4, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 20320f8: ba 83 40 03 addcc %o5, %g3, %i5 20320fc: b8 43 00 02 addx %o4, %g2, %i4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2032100: c4 1e 20 48 ldd [ %i0 + 0x48 ], %g2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 2032104: 80 a0 80 1c cmp %g2, %i4 2032108: 34 80 00 0c bg,a 2032138 <_Rate_monotonic_Get_status+0x94><== NEVER TAKEN 203210c: 82 10 20 00 clr %g1 <== NOT EXECUTED 2032110: 32 80 00 06 bne,a 2032128 <_Rate_monotonic_Get_status+0x84> 2032114: 86 a7 40 03 subcc %i5, %g3, %g3 2032118: 80 a0 c0 1d cmp %g3, %i5 203211c: 18 80 00 06 bgu 2032134 <_Rate_monotonic_Get_status+0x90> 2032120: 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; 2032124: 82 10 20 01 mov 1, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2032128: 84 67 00 02 subx %i4, %g2, %g2 203212c: 10 80 00 03 b 2032138 <_Rate_monotonic_Get_status+0x94> 2032130: 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; 2032134: 82 10 20 00 clr %g1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 2032138: b0 08 60 01 and %g1, 1, %i0 203213c: 81 c7 e0 08 ret 2032140: 81 e8 00 00 restore =============================================================================== 020324ac <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 20324ac: 9d e3 bf 98 save %sp, -104, %sp 20324b0: 11 00 81 83 sethi %hi(0x2060c00), %o0 20324b4: 92 10 00 18 mov %i0, %o1 20324b8: 90 12 22 c4 or %o0, 0x2c4, %o0 20324bc: 7f ff 5a 32 call 2008d84 <_Objects_Get> 20324c0: 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 ) { 20324c4: c2 07 bf fc ld [ %fp + -4 ], %g1 20324c8: 80 a0 60 00 cmp %g1, 0 20324cc: 12 80 00 24 bne 203255c <_Rate_monotonic_Timeout+0xb0> <== NEVER TAKEN 20324d0: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 20324d4: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 20324d8: 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); 20324dc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 20324e0: 80 88 80 01 btst %g2, %g1 20324e4: 22 80 00 0b be,a 2032510 <_Rate_monotonic_Timeout+0x64> 20324e8: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 20324ec: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 20324f0: c2 07 60 08 ld [ %i5 + 8 ], %g1 20324f4: 80 a0 80 01 cmp %g2, %g1 20324f8: 32 80 00 06 bne,a 2032510 <_Rate_monotonic_Timeout+0x64> 20324fc: 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 ); 2032500: 13 04 01 ff sethi %hi(0x1007fc00), %o1 2032504: 7f ff 5c df call 2009880 <_Thread_Clear_state> 2032508: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 203250c: 30 80 00 06 b,a 2032524 <_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 ) { 2032510: 80 a0 60 01 cmp %g1, 1 2032514: 12 80 00 0d bne 2032548 <_Rate_monotonic_Timeout+0x9c> 2032518: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 203251c: 82 10 20 03 mov 3, %g1 2032520: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2032524: 7f ff ff 51 call 2032268 <_Rate_monotonic_Initiate_statistics> 2032528: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203252c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2032530: 11 00 81 82 sethi %hi(0x2060800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2032534: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2032538: 90 12 23 2c or %o0, 0x32c, %o0 203253c: 7f ff 60 d5 call 200a890 <_Watchdog_Insert> 2032540: 92 07 60 10 add %i5, 0x10, %o1 2032544: 30 80 00 02 b,a 203254c <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2032548: 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) { uint32_t level = _Thread_Dispatch_disable_level; 203254c: 03 00 81 82 sethi %hi(0x2060800), %g1 2032550: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 2060a90 <_Thread_Dispatch_disable_level> --level; 2032554: 84 00 bf ff add %g2, -1, %g2 _Thread_Dispatch_disable_level = level; 2032558: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 203255c: 81 c7 e0 08 ret 2032560: 81 e8 00 00 restore =============================================================================== 02032144 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 2032144: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2032148: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 203214c: 82 00 60 01 inc %g1 2032150: c2 26 20 58 st %g1, [ %i0 + 0x58 ] if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2032154: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2032158: 80 a0 60 04 cmp %g1, 4 203215c: 12 80 00 05 bne 2032170 <_Rate_monotonic_Update_statistics+0x2c> 2032160: 90 10 00 18 mov %i0, %o0 stats->missed_count++; 2032164: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 2032168: 82 00 60 01 inc %g1 203216c: c2 26 20 5c st %g1, [ %i0 + 0x5c ] /* * Grab status for time statistics. */ valid_status = 2032170: 92 07 bf f8 add %fp, -8, %o1 2032174: 7f ff ff cc call 20320a4 <_Rate_monotonic_Get_status> 2032178: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 203217c: 80 8a 20 ff btst 0xff, %o0 2032180: 02 80 00 38 be 2032260 <_Rate_monotonic_Update_statistics+0x11c> 2032184: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2032188: 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 ) ) 203218c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2032190: b6 87 40 03 addcc %i5, %g3, %i3 2032194: b4 47 00 02 addx %i4, %g2, %i2 2032198: 80 a0 40 02 cmp %g1, %g2 203219c: 14 80 00 09 bg 20321c0 <_Rate_monotonic_Update_statistics+0x7c> 20321a0: f4 3e 20 70 std %i2, [ %i0 + 0x70 ] 20321a4: 80 a0 40 02 cmp %g1, %g2 20321a8: 32 80 00 08 bne,a 20321c8 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN 20321ac: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 20321b0: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 20321b4: 80 a0 40 03 cmp %g1, %g3 20321b8: 28 80 00 04 bleu,a 20321c8 <_Rate_monotonic_Update_statistics+0x84> 20321bc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 20321c0: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 20321c4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 20321c8: 80 a0 40 02 cmp %g1, %g2 20321cc: 26 80 00 0a bl,a 20321f4 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 20321d0: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 20321d4: 80 a0 40 02 cmp %g1, %g2 20321d8: 32 80 00 08 bne,a 20321f8 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 20321dc: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 20321e0: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 20321e4: 80 a0 40 03 cmp %g1, %g3 20321e8: 3a 80 00 04 bcc,a 20321f8 <_Rate_monotonic_Update_statistics+0xb4> 20321ec: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 20321f0: 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 ); 20321f4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 20321f8: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 20321fc: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2032200: b6 87 40 03 addcc %i5, %g3, %i3 2032204: b4 47 00 02 addx %i4, %g2, %i2 2032208: 80 a0 40 02 cmp %g1, %g2 203220c: 14 80 00 09 bg 2032230 <_Rate_monotonic_Update_statistics+0xec> 2032210: f4 3e 20 88 std %i2, [ %i0 + 0x88 ] 2032214: 80 a0 40 02 cmp %g1, %g2 2032218: 32 80 00 08 bne,a 2032238 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN 203221c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2032220: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 2032224: 80 a0 40 03 cmp %g1, %g3 2032228: 28 80 00 04 bleu,a 2032238 <_Rate_monotonic_Update_statistics+0xf4> 203222c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; 2032230: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2032234: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2032238: 80 a0 40 02 cmp %g1, %g2 203223c: 26 80 00 09 bl,a 2032260 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 2032240: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 2032244: 80 a0 40 02 cmp %g1, %g2 2032248: 12 80 00 06 bne 2032260 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 203224c: 01 00 00 00 nop 2032250: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2032254: 80 a0 40 03 cmp %g1, %g3 2032258: 2a 80 00 02 bcs,a 2032260 <_Rate_monotonic_Update_statistics+0x11c> 203225c: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 2032260: 81 c7 e0 08 ret 2032264: 81 e8 00 00 restore =============================================================================== 02009f64 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 2009f64: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 2009f68: 40 00 06 aa call 200ba10 <_Workspace_Allocate> 2009f6c: 90 10 20 1c mov 0x1c, %o0 if ( sched ) { 2009f70: 80 a2 20 00 cmp %o0, 0 2009f74: 02 80 00 06 be 2009f8c <_Scheduler_CBS_Allocate+0x28> <== NEVER TAKEN 2009f78: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 2009f7c: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 2009f80: f0 22 00 00 st %i0, [ %o0 ] schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 2009f84: c2 22 20 14 st %g1, [ %o0 + 0x14 ] schinfo->cbs_server = NULL; 2009f88: c0 22 20 18 clr [ %o0 + 0x18 ] } return sched; } 2009f8c: 81 c7 e0 08 ret 2009f90: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200b2a4 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200b2a4: 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; 200b2a8: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200b2ac: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b2b0: 80 a0 40 09 cmp %g1, %o1 200b2b4: 32 80 00 02 bne,a 200b2bc <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200b2b8: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200b2bc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200b2c0: 80 a0 40 09 cmp %g1, %o1 200b2c4: 02 80 00 04 be 200b2d4 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200b2c8: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200b2cc: 40 00 01 81 call 200b8d0 <_Thread_Change_priority> 200b2d0: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200b2d4: fa 06 20 88 ld [ %i0 + 0x88 ], %i5 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200b2d8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b2dc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200b2e0: 80 a0 a0 00 cmp %g2, 0 200b2e4: 02 80 00 09 be 200b308 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200b2e8: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200b2ec: d0 00 40 00 ld [ %g1 ], %o0 200b2f0: 7f ff ff d7 call 200b24c <_Scheduler_CBS_Get_server_id> 200b2f4: 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 ); 200b2f8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b2fc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200b300: 9f c0 40 00 call %g1 200b304: d0 07 bf fc ld [ %fp + -4 ], %o0 200b308: 81 c7 e0 08 ret 200b30c: 81 e8 00 00 restore =============================================================================== 0200aeac <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200aeac: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200aeb0: c2 06 20 04 ld [ %i0 + 4 ], %g1 200aeb4: 80 a0 60 00 cmp %g1, 0 200aeb8: 04 80 00 1d ble 200af2c <_Scheduler_CBS_Create_server+0x80> 200aebc: 01 00 00 00 nop 200aec0: c2 06 00 00 ld [ %i0 ], %g1 200aec4: 80 a0 60 00 cmp %g1, 0 200aec8: 04 80 00 19 ble 200af2c <_Scheduler_CBS_Create_server+0x80> 200aecc: 03 00 80 7a sethi %hi(0x201e800), %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++ ) { 200aed0: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 201ebc0 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list[i] ) 200aed4: 03 00 80 7e sethi %hi(0x201f800), %g1 200aed8: c6 00 62 08 ld [ %g1 + 0x208 ], %g3 ! 201fa08 <_Scheduler_CBS_Server_list> 200aedc: 10 80 00 07 b 200aef8 <_Scheduler_CBS_Create_server+0x4c> 200aee0: 82 10 20 00 clr %g1 200aee4: c8 00 c0 1c ld [ %g3 + %i4 ], %g4 200aee8: 80 a1 20 00 cmp %g4, 0 200aeec: 02 80 00 14 be 200af3c <_Scheduler_CBS_Create_server+0x90> 200aef0: 3b 00 80 7e sethi %hi(0x201f800), %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++ ) { 200aef4: 82 00 60 01 inc %g1 200aef8: 80 a0 40 02 cmp %g1, %g2 200aefc: 12 bf ff fa bne 200aee4 <_Scheduler_CBS_Create_server+0x38> 200af00: 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; 200af04: 81 c7 e0 08 ret 200af08: 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; 200af0c: c4 20 60 04 st %g2, [ %g1 + 4 ] 200af10: c4 06 20 04 ld [ %i0 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200af14: 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; 200af18: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200af1c: 84 10 3f ff mov -1, %g2 200af20: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200af24: 81 c7 e0 08 ret 200af28: 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; 200af2c: 81 c7 e0 08 ret 200af30: 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; 200af34: 81 c7 e0 08 ret <== NOT EXECUTED 200af38: 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 *) 200af3c: f6 07 62 08 ld [ %i5 + 0x208 ], %i3 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200af40: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200af44: 40 00 07 9c call 200cdb4 <_Workspace_Allocate> 200af48: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200af4c: 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 *) 200af50: d0 26 c0 1c st %o0, [ %i3 + %i4 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200af54: c4 07 62 08 ld [ %i5 + 0x208 ], %g2 200af58: 83 28 60 02 sll %g1, 2, %g1 200af5c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200af60: 80 a0 60 00 cmp %g1, 0 200af64: 32 bf ff ea bne,a 200af0c <_Scheduler_CBS_Create_server+0x60><== ALWAYS TAKEN 200af68: c4 06 00 00 ld [ %i0 ], %g2 200af6c: 30 bf ff f2 b,a 200af34 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED =============================================================================== 0200afe4 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200afe4: 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); 200afe8: 90 10 00 19 mov %i1, %o0 200afec: 40 00 03 77 call 200bdc8 <_Thread_Get> 200aff0: 92 07 bf fc add %fp, -4, %o1 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200aff4: ba 92 20 00 orcc %o0, 0, %i5 200aff8: 02 80 00 05 be 200b00c <_Scheduler_CBS_Detach_thread+0x28> 200affc: 03 00 80 7a sethi %hi(0x201e800), %g1 _Thread_Enable_dispatch(); 200b000: 40 00 03 66 call 200bd98 <_Thread_Enable_dispatch> 200b004: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b008: 03 00 80 7a sethi %hi(0x201e800), %g1 200b00c: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 201ebc0 <_Scheduler_CBS_Maximum_servers> 200b010: 80 a6 00 01 cmp %i0, %g1 200b014: 1a 80 00 1b bcc 200b080 <_Scheduler_CBS_Detach_thread+0x9c> 200b018: 80 a7 60 00 cmp %i5, 0 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b01c: 02 80 00 19 be 200b080 <_Scheduler_CBS_Detach_thread+0x9c> 200b020: 03 00 80 7e sethi %hi(0x201f800), %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b024: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 201fa08 <_Scheduler_CBS_Server_list> 200b028: b1 2e 20 02 sll %i0, 2, %i0 200b02c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 200b030: 80 a0 60 00 cmp %g1, 0 200b034: 02 80 00 11 be 200b078 <_Scheduler_CBS_Detach_thread+0x94> 200b038: 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 ) 200b03c: c4 00 40 00 ld [ %g1 ], %g2 200b040: 80 a0 80 19 cmp %g2, %i1 200b044: 12 80 00 0f bne 200b080 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b048: 84 10 3f ff mov -1, %g2 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b04c: c4 20 40 00 st %g2, [ %g1 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b050: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 200b054: c0 20 60 18 clr [ %g1 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b058: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 200b05c: c2 27 60 78 st %g1, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b060: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 200b064: c2 27 60 7c st %g1, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b068: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 200b06c: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] return SCHEDULER_CBS_OK; 200b070: 81 c7 e0 08 ret 200b074: 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; 200b078: 81 c7 e0 08 ret 200b07c: 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; } 200b080: 81 c7 e0 08 ret 200b084: 91 e8 3f ee restore %g0, -18, %o0 =============================================================================== 0200b310 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200b310: 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*) ); 200b314: 3b 00 80 7a sethi %hi(0x201e800), %i5 200b318: d0 07 63 c0 ld [ %i5 + 0x3c0 ], %o0 ! 201ebc0 <_Scheduler_CBS_Maximum_servers> } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200b31c: 40 00 06 a6 call 200cdb4 <_Workspace_Allocate> 200b320: 91 2a 20 02 sll %o0, 2, %o0 200b324: 05 00 80 7e sethi %hi(0x201f800), %g2 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200b328: 80 a2 20 00 cmp %o0, 0 200b32c: 02 80 00 0d be 200b360 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN 200b330: d0 20 a2 08 st %o0, [ %g2 + 0x208 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b334: c6 07 63 c0 ld [ %i5 + 0x3c0 ], %g3 200b338: 10 80 00 05 b 200b34c <_Scheduler_CBS_Initialize+0x3c> 200b33c: 82 10 20 00 clr %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b340: 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++) { 200b344: 82 00 60 01 inc %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b348: 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++) { 200b34c: 80 a0 40 03 cmp %g1, %g3 200b350: 12 bf ff fc bne 200b340 <_Scheduler_CBS_Initialize+0x30> 200b354: fa 00 a2 08 ld [ %g2 + 0x208 ], %i5 _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200b358: 81 c7 e0 08 ret 200b35c: 91 e8 20 00 restore %g0, 0, %o0 } 200b360: 81 c7 e0 08 ret <== NOT EXECUTED 200b364: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED =============================================================================== 02009f94 <_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; 2009f94: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 2009f98: 80 a2 60 00 cmp %o1, 0 2009f9c: 02 80 00 10 be 2009fdc <_Scheduler_CBS_Release_job+0x48> 2009fa0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 2009fa4: 80 a0 60 00 cmp %g1, 0 2009fa8: 02 80 00 08 be 2009fc8 <_Scheduler_CBS_Release_job+0x34> 2009fac: 05 00 80 77 sethi %hi(0x201dc00), %g2 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 2009fb0: d2 00 a1 5c ld [ %g2 + 0x15c ], %o1 ! 201dd5c <_Watchdog_Ticks_since_boot> 2009fb4: c4 00 60 04 ld [ %g1 + 4 ], %g2 2009fb8: 92 02 40 02 add %o1, %g2, %o1 2009fbc: 05 20 00 00 sethi %hi(0x80000000), %g2 2009fc0: 10 80 00 0a b 2009fe8 <_Scheduler_CBS_Release_job+0x54> 2009fc4: 92 2a 40 02 andn %o1, %g2, %o1 & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 2009fc8: c2 00 a1 5c ld [ %g2 + 0x15c ], %g1 2009fcc: 92 02 40 01 add %o1, %g1, %o1 2009fd0: 03 20 00 00 sethi %hi(0x80000000), %g1 2009fd4: 10 80 00 07 b 2009ff0 <_Scheduler_CBS_Release_job+0x5c> 2009fd8: 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) 2009fdc: 80 a0 60 00 cmp %g1, 0 2009fe0: 02 80 00 04 be 2009ff0 <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN 2009fe4: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; 2009fe8: c2 00 60 08 ld [ %g1 + 8 ], %g1 2009fec: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 2009ff0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 2009ff4: 94 10 20 01 mov 1, %o2 2009ff8: 82 13 c0 00 mov %o7, %g1 2009ffc: 40 00 01 24 call 200a48c <_Thread_Change_priority> 200a000: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200a004 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a004: 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); 200a008: 40 00 00 4c call 200a138 <_Scheduler_EDF_Enqueue> 200a00c: 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; 200a010: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a014: 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) { 200a018: 80 a7 60 00 cmp %i5, 0 200a01c: 02 80 00 18 be 200a07c <_Scheduler_CBS_Unblock+0x78> 200a020: 03 00 80 77 sethi %hi(0x201dc00), %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 ) { 200a024: 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 - 200a028: d0 00 61 5c ld [ %g1 + 0x15c ], %o0 200a02c: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a030: 40 00 3b f2 call 2018ff8 <.umul> 200a034: 90 27 00 08 sub %i4, %o0, %o0 200a038: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a03c: b6 10 00 08 mov %o0, %i3 200a040: 40 00 3b ee call 2018ff8 <.umul> 200a044: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a048: 80 a6 c0 08 cmp %i3, %o0 200a04c: 24 80 00 0d ble,a 200a080 <_Scheduler_CBS_Unblock+0x7c> 200a050: 3b 00 80 77 sethi %hi(0x201dc00), %i5 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a054: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a058: 80 a7 00 09 cmp %i4, %o1 200a05c: 32 80 00 02 bne,a 200a064 <_Scheduler_CBS_Unblock+0x60> 200a060: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a064: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a068: 80 a0 40 09 cmp %g1, %o1 200a06c: 02 80 00 04 be 200a07c <_Scheduler_CBS_Unblock+0x78> 200a070: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200a074: 40 00 01 06 call 200a48c <_Thread_Change_priority> 200a078: 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, 200a07c: 3b 00 80 77 sethi %hi(0x201dc00), %i5 200a080: ba 17 62 80 or %i5, 0x280, %i5 ! 201de80 <_Per_CPU_Information> 200a084: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 200a088: 03 00 80 74 sethi %hi(0x201d000), %g1 200a08c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a090: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 200a094: 9f c0 40 00 call %g1 200a098: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 200a09c: 80 a2 20 00 cmp %o0, 0 200a0a0: 04 80 00 0f ble 200a0dc <_Scheduler_CBS_Unblock+0xd8> 200a0a4: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a0a8: c2 07 60 10 ld [ %i5 + 0x10 ], %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; 200a0ac: f0 27 60 14 st %i0, [ %i5 + 0x14 ] if ( _Thread_Executing->is_preemptible || 200a0b0: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a0b4: 80 a0 60 00 cmp %g1, 0 200a0b8: 12 80 00 06 bne 200a0d0 <_Scheduler_CBS_Unblock+0xcc> 200a0bc: 84 10 20 01 mov 1, %g2 200a0c0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a0c4: 80 a0 60 00 cmp %g1, 0 200a0c8: 12 80 00 05 bne 200a0dc <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN 200a0cc: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a0d0: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a0d4: 82 10 62 80 or %g1, 0x280, %g1 ! 201de80 <_Per_CPU_Information> 200a0d8: c4 28 60 0c stb %g2, [ %g1 + 0xc ] 200a0dc: 81 c7 e0 08 ret 200a0e0: 81 e8 00 00 restore =============================================================================== 02009f64 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 2009f64: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 2009f68: 40 00 06 7f call 200b964 <_Workspace_Allocate> 2009f6c: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 2009f70: 80 a2 20 00 cmp %o0, 0 2009f74: 02 80 00 05 be 2009f88 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 2009f78: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 2009f7c: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 2009f80: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 2009f84: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 2009f88: 81 c7 e0 08 ret 2009f8c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a12c <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a12c: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a130: 7f ff ff ad call 2009fe4 <_Scheduler_EDF_Enqueue> 200a134: 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( 200a138: 3b 00 80 77 sethi %hi(0x201dc00), %i5 200a13c: ba 17 61 e0 or %i5, 0x1e0, %i5 ! 201dde0 <_Per_CPU_Information> 200a140: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 200a144: 03 00 80 73 sethi %hi(0x201cc00), %g1 200a148: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 200a14c: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 200a150: 9f c0 40 00 call %g1 200a154: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a158: 80 a2 20 00 cmp %o0, 0 200a15c: 16 80 00 0f bge 200a198 <_Scheduler_EDF_Unblock+0x6c> 200a160: 01 00 00 00 nop _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a164: c2 07 60 10 ld [ %i5 + 0x10 ], %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; 200a168: f0 27 60 14 st %i0, [ %i5 + 0x14 ] if ( _Thread_Executing->is_preemptible || 200a16c: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a170: 80 a0 60 00 cmp %g1, 0 200a174: 12 80 00 06 bne 200a18c <_Scheduler_EDF_Unblock+0x60> 200a178: 84 10 20 01 mov 1, %g2 200a17c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a180: 80 a0 60 00 cmp %g1, 0 200a184: 12 80 00 05 bne 200a198 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN 200a188: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a18c: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a190: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201dde0 <_Per_CPU_Information> 200a194: c4 28 60 0c stb %g2, [ %g1 + 0xc ] 200a198: 81 c7 e0 08 ret 200a19c: 81 e8 00 00 restore =============================================================================== 020084a0 <_TOD_Validate>: }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 20084a0: 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 / 20084a4: 03 00 80 6d sethi %hi(0x201b400), %g1 20084a8: d2 00 62 fc ld [ %g1 + 0x2fc ], %o1 ! 201b6fc 20084ac: 11 00 03 d0 sethi %hi(0xf4000), %o0 20084b0: 40 00 45 19 call 2019914 <.udiv> 20084b4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 20084b8: 80 a6 20 00 cmp %i0, 0 20084bc: 02 80 00 28 be 200855c <_TOD_Validate+0xbc> <== NEVER TAKEN 20084c0: 84 10 20 00 clr %g2 20084c4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20084c8: 80 a0 40 08 cmp %g1, %o0 20084cc: 3a 80 00 25 bcc,a 2008560 <_TOD_Validate+0xc0> 20084d0: b0 08 a0 01 and %g2, 1, %i0 (the_tod->ticks >= ticks_per_second) || 20084d4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20084d8: 80 a0 60 3b cmp %g1, 0x3b 20084dc: 38 80 00 21 bgu,a 2008560 <_TOD_Validate+0xc0> 20084e0: b0 08 a0 01 and %g2, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20084e4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20084e8: 80 a0 60 3b cmp %g1, 0x3b 20084ec: 38 80 00 1d bgu,a 2008560 <_TOD_Validate+0xc0> 20084f0: b0 08 a0 01 and %g2, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20084f4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20084f8: 80 a0 60 17 cmp %g1, 0x17 20084fc: 38 80 00 19 bgu,a 2008560 <_TOD_Validate+0xc0> 2008500: b0 08 a0 01 and %g2, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 2008504: 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) || 2008508: 80 a0 60 00 cmp %g1, 0 200850c: 02 80 00 14 be 200855c <_TOD_Validate+0xbc> <== NEVER TAKEN 2008510: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 2008514: 38 80 00 13 bgu,a 2008560 <_TOD_Validate+0xc0> 2008518: b0 08 a0 01 and %g2, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 200851c: 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) || 2008520: 80 a1 27 c3 cmp %g4, 0x7c3 2008524: 28 80 00 0f bleu,a 2008560 <_TOD_Validate+0xc0> 2008528: b0 08 a0 01 and %g2, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 200852c: 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) || 2008530: 80 a0 e0 00 cmp %g3, 0 2008534: 02 80 00 0a be 200855c <_TOD_Validate+0xbc> <== NEVER TAKEN 2008538: 80 89 20 03 btst 3, %g4 200853c: 05 00 80 72 sethi %hi(0x201c800), %g2 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008540: 12 80 00 03 bne 200854c <_TOD_Validate+0xac> 2008544: 84 10 a0 f0 or %g2, 0xf0, %g2 ! 201c8f0 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2008548: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 200854c: 83 28 60 02 sll %g1, 2, %g1 2008550: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( the_tod->day > days_in_month ) 2008554: 80 a0 40 03 cmp %g1, %g3 2008558: 84 60 3f ff subx %g0, -1, %g2 return false; return true; } 200855c: b0 08 a0 01 and %g2, 1, %i0 2008560: 81 c7 e0 08 ret 2008564: 81 e8 00 00 restore =============================================================================== 02009aec <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2009aec: 9d e3 bf a0 save %sp, -96, %sp 2009af0: ba 10 00 18 mov %i0, %i5 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2009af4: 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 ); 2009af8: 40 00 03 6c call 200a8a8 <_Thread_Set_transient> 2009afc: 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 ) 2009b00: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 2009b04: 80 a0 40 19 cmp %g1, %i1 2009b08: 02 80 00 04 be 2009b18 <_Thread_Change_priority+0x2c> 2009b0c: 90 10 00 1d mov %i5, %o0 _Thread_Set_priority( the_thread, new_priority ); 2009b10: 40 00 03 4d call 200a844 <_Thread_Set_priority> 2009b14: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 2009b18: 7f ff e2 ab call 20025c4 2009b1c: 01 00 00 00 nop 2009b20: 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; 2009b24: f8 07 60 10 ld [ %i5 + 0x10 ], %i4 if ( state != STATES_TRANSIENT ) { 2009b28: 80 a7 20 04 cmp %i4, 4 2009b2c: 02 80 00 10 be 2009b6c <_Thread_Change_priority+0x80> 2009b30: 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 ) ) 2009b34: 80 a0 60 00 cmp %g1, 0 2009b38: 12 80 00 03 bne 2009b44 <_Thread_Change_priority+0x58> <== NEVER TAKEN 2009b3c: 82 0f 3f fb and %i4, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2009b40: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2009b44: 7f ff e2 a4 call 20025d4 2009b48: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2009b4c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009b50: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009b54: 80 8f 00 01 btst %i4, %g1 2009b58: 02 80 00 27 be 2009bf4 <_Thread_Change_priority+0x108> 2009b5c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2009b60: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2009b64: 40 00 03 0b call 200a790 <_Thread_queue_Requeue> 2009b68: 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 ) ) { 2009b6c: 80 a0 60 00 cmp %g1, 0 2009b70: 12 80 00 0b bne 2009b9c <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2009b74: 03 00 80 6d sethi %hi(0x201b400), %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 ); 2009b78: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2009b7c: 80 a6 a0 00 cmp %i2, 0 2009b80: 02 80 00 04 be 2009b90 <_Thread_Change_priority+0xa4> 2009b84: 82 10 60 e4 or %g1, 0xe4, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2009b88: 10 80 00 03 b 2009b94 <_Thread_Change_priority+0xa8> 2009b8c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2009b90: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2009b94: 9f c0 40 00 call %g1 2009b98: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2009b9c: 7f ff e2 8e call 20025d4 2009ba0: 90 10 00 1b mov %i3, %o0 2009ba4: 7f ff e2 88 call 20025c4 2009ba8: 01 00 00 00 nop 2009bac: 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(); 2009bb0: 03 00 80 6d sethi %hi(0x201b400), %g1 2009bb4: c2 00 60 ec ld [ %g1 + 0xec ], %g1 ! 201b4ec <_Scheduler+0x8> 2009bb8: 9f c0 40 00 call %g1 2009bbc: 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 ); 2009bc0: 03 00 80 70 sethi %hi(0x201c000), %g1 2009bc4: 82 10 62 90 or %g1, 0x290, %g1 ! 201c290 <_Per_CPU_Information> * 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() && 2009bc8: c4 18 60 10 ldd [ %g1 + 0x10 ], %g2 2009bcc: 80 a0 80 03 cmp %g2, %g3 2009bd0: 02 80 00 07 be 2009bec <_Thread_Change_priority+0x100> 2009bd4: 01 00 00 00 nop 2009bd8: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 2009bdc: 80 a0 a0 00 cmp %g2, 0 2009be0: 02 80 00 03 be 2009bec <_Thread_Change_priority+0x100> 2009be4: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2009be8: c4 28 60 0c stb %g2, [ %g1 + 0xc ] _ISR_Enable( level ); 2009bec: 7f ff e2 7a call 20025d4 2009bf0: 81 e8 00 00 restore 2009bf4: 81 c7 e0 08 ret 2009bf8: 81 e8 00 00 restore =============================================================================== 02009ddc <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009ddc: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009de0: 90 10 00 18 mov %i0, %o0 2009de4: 40 00 00 80 call 2009fe4 <_Thread_Get> 2009de8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009dec: c2 07 bf fc ld [ %fp + -4 ], %g1 2009df0: 80 a0 60 00 cmp %g1, 0 2009df4: 12 80 00 08 bne 2009e14 <_Thread_Delay_ended+0x38> <== NEVER TAKEN 2009df8: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2009dfc: 7f ff ff 80 call 2009bfc <_Thread_Clear_state> 2009e00: 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) { uint32_t level = _Thread_Dispatch_disable_level; 2009e04: 03 00 80 70 sethi %hi(0x201c000), %g1 2009e08: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 201c080 <_Thread_Dispatch_disable_level> --level; 2009e0c: 84 00 bf ff add %g2, -1, %g2 _Thread_Dispatch_disable_level = level; 2009e10: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 2009e14: 81 c7 e0 08 ret 2009e18: 81 e8 00 00 restore =============================================================================== 02009e1c <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { 2009e1c: 9d e3 bf 98 save %sp, -104, %sp #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2009e20: 35 00 80 70 sethi %hi(0x201c000), %i2 2009e24: 82 16 a2 90 or %i2, 0x290, %g1 ! 201c290 <_Per_CPU_Information> _ISR_Disable( level ); 2009e28: 7f ff e1 e7 call 20025c4 2009e2c: f6 00 60 10 ld [ %g1 + 0x10 ], %i3 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); 2009e30: 21 00 80 6f sethi %hi(0x201bc00), %l0 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 2009e34: 27 00 80 6d sethi %hi(0x201b400), %l3 * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 2009e38: 33 00 80 70 sethi %hi(0x201c000), %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; 2009e3c: 31 00 80 6f sethi %hi(0x201bc00), %i0 2009e40: a0 14 23 d0 or %l0, 0x3d0, %l0 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2009e44: 23 00 80 70 sethi %hi(0x201c000), %l1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2009e48: 25 00 80 6d sethi %hi(0x201b400), %l2 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 2009e4c: 10 80 00 4b b 2009f78 <_Thread_Dispatch+0x15c> 2009e50: a6 14 e2 bc or %l3, 0x2bc, %l3 2009e54: 84 10 20 01 mov 1, %g2 2009e58: c4 26 60 80 st %g2, [ %i1 + 0x80 ] heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 2009e5c: c0 28 60 0c clrb [ %g1 + 0xc ] /* * 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 ) 2009e60: 80 a5 00 1b cmp %l4, %i3 2009e64: 12 80 00 0a bne 2009e8c <_Thread_Dispatch+0x70> 2009e68: e8 20 60 10 st %l4, [ %g1 + 0x10 ] 2009e6c: 03 00 80 70 sethi %hi(0x201c000), %g1 2009e70: c0 20 60 80 clr [ %g1 + 0x80 ] ! 201c080 <_Thread_Dispatch_disable_level> post_switch: #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 0 ); #endif _ISR_Enable( level ); 2009e74: 7f ff e1 d8 call 20025d4 2009e78: 39 00 80 70 sethi %hi(0x201c000), %i4 2009e7c: 03 00 80 70 sethi %hi(0x201c000), %g1 2009e80: fa 00 60 f4 ld [ %g1 + 0xf4 ], %i5 ! 201c0f4 <_API_extensions_Post_switch_list> { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 2009e84: 10 80 00 47 b 2009fa0 <_Thread_Dispatch+0x184> 2009e88: b8 17 20 f8 or %i4, 0xf8, %i4 */ #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 ) 2009e8c: c2 05 20 78 ld [ %l4 + 0x78 ], %g1 2009e90: 80 a0 60 01 cmp %g1, 1 2009e94: 12 80 00 03 bne 2009ea0 <_Thread_Dispatch+0x84> 2009e98: c2 06 23 e0 ld [ %i0 + 0x3e0 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009e9c: c2 25 20 74 st %g1, [ %l4 + 0x74 ] _ISR_Enable( level ); 2009ea0: 7f ff e1 cd call 20025d4 2009ea4: 01 00 00 00 nop 2009ea8: 90 07 bf f8 add %fp, -8, %o0 2009eac: 7f ff f9 c4 call 20085bc <_TOD_Get_with_nanoseconds> 2009eb0: 92 10 00 10 mov %l0, %o1 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 2009eb4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 2009eb8: 82 16 a2 90 or %i2, 0x290, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2009ebc: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4 2009ec0: 96 a0 c0 1d subcc %g3, %i5, %o3 2009ec4: 94 60 80 1c subx %g2, %i4, %o2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2009ec8: f8 1e e0 80 ldd [ %i3 + 0x80 ], %i4 2009ecc: 9a 87 40 0b addcc %i5, %o3, %o5 2009ed0: 98 47 00 0a addx %i4, %o2, %o4 2009ed4: d8 3e e0 80 std %o4, [ %i3 + 0x80 ] &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 2009ed8: c4 38 60 20 std %g2, [ %g1 + 0x20 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2009edc: c2 04 60 f0 ld [ %l1 + 0xf0 ], %g1 2009ee0: 80 a0 60 00 cmp %g1, 0 2009ee4: 22 80 00 0c be,a 2009f14 <_Thread_Dispatch+0xf8> <== NEVER TAKEN 2009ee8: fa 04 a2 b8 ld [ %l2 + 0x2b8 ], %i5 <== NOT EXECUTED executing->libc_reent = *_Thread_libc_reent; 2009eec: c4 00 40 00 ld [ %g1 ], %g2 2009ef0: c4 26 e1 4c st %g2, [ %i3 + 0x14c ] *_Thread_libc_reent = heir->libc_reent; 2009ef4: c4 05 21 4c ld [ %l4 + 0x14c ], %g2 2009ef8: c4 20 40 00 st %g2, [ %g1 ] 2009efc: 10 80 00 06 b 2009f14 <_Thread_Dispatch+0xf8> 2009f00: fa 04 a2 b8 ld [ %l2 + 0x2b8 ], %i5 const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); 2009f04: 90 10 00 1b mov %i3, %o0 2009f08: 9f c0 40 00 call %g1 2009f0c: 92 10 00 14 mov %l4, %o1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next( const Chain_Node *the_node ) { return the_node->next; 2009f10: fa 07 40 00 ld [ %i5 ], %i5 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 2009f14: 80 a7 40 13 cmp %i5, %l3 2009f18: 32 bf ff fb bne,a 2009f04 <_Thread_Dispatch+0xe8> 2009f1c: c2 07 60 08 ld [ %i5 + 8 ], %g1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 2009f20: 90 06 e0 c0 add %i3, 0xc0, %o0 2009f24: 40 00 04 81 call 200b128 <_CPU_Context_switch> 2009f28: 92 05 20 c0 add %l4, 0xc0, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 2009f2c: c2 06 e1 48 ld [ %i3 + 0x148 ], %g1 2009f30: 80 a0 60 00 cmp %g1, 0 2009f34: 02 80 00 0e be 2009f6c <_Thread_Dispatch+0x150> 2009f38: 03 00 80 70 sethi %hi(0x201c000), %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 ); 2009f3c: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 201c0ec <_Thread_Allocated_fp> 2009f40: 80 a6 c0 08 cmp %i3, %o0 2009f44: 02 80 00 0a be 2009f6c <_Thread_Dispatch+0x150> 2009f48: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 2009f4c: 02 80 00 04 be 2009f5c <_Thread_Dispatch+0x140> 2009f50: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 2009f54: 40 00 04 3b call 200b040 <_CPU_Context_save_fp> 2009f58: 90 02 21 48 add %o0, 0x148, %o0 _Context_Restore_fp( &executing->fp_context ); 2009f5c: 40 00 04 56 call 200b0b4 <_CPU_Context_restore_fp> 2009f60: 90 06 e1 48 add %i3, 0x148, %o0 _Thread_Allocated_fp = executing; 2009f64: 03 00 80 70 sethi %hi(0x201c000), %g1 2009f68: f6 20 60 ec st %i3, [ %g1 + 0xec ] ! 201c0ec <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 2009f6c: 82 16 a2 90 or %i2, 0x290, %g1 _ISR_Disable( level ); 2009f70: 7f ff e1 95 call 20025c4 2009f74: f6 00 60 10 ld [ %g1 + 0x10 ], %i3 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 2009f78: 82 16 a2 90 or %i2, 0x290, %g1 2009f7c: c4 08 60 0c ldub [ %g1 + 0xc ], %g2 2009f80: 80 a0 a0 00 cmp %g2, 0 2009f84: 32 bf ff b4 bne,a 2009e54 <_Thread_Dispatch+0x38> 2009f88: e8 00 60 14 ld [ %g1 + 0x14 ], %l4 * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 2009f8c: 10 bf ff b9 b 2009e70 <_Thread_Dispatch+0x54> 2009f90: 03 00 80 70 sethi %hi(0x201c000), %g1 const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); 2009f94: 9f c0 40 00 call %g1 2009f98: 90 10 00 1b mov %i3, %o0 2009f9c: fa 07 40 00 ld [ %i5 ], %i5 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 2009fa0: 80 a7 40 1c cmp %i5, %i4 2009fa4: 32 bf ff fc bne,a 2009f94 <_Thread_Dispatch+0x178> 2009fa8: c2 07 60 08 ld [ %i5 + 8 ], %g1 #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 2009fac: 81 c7 e0 08 ret 2009fb0: 81 e8 00 00 restore =============================================================================== 0200e6f4 <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { 200e6f4: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200e6f8: 03 00 80 70 sethi %hi(0x201c000), %g1 200e6fc: fa 00 62 a0 ld [ %g1 + 0x2a0 ], %i5 ! 201c2a0 <_Per_CPU_Information+0x10> /* * 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(); 200e700: 3f 00 80 39 sethi %hi(0x200e400), %i7 200e704: be 17 e2 f4 or %i7, 0x2f4, %i7 ! 200e6f4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e708: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 200e70c: 7f ff cf b2 call 20025d4 200e710: 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; 200e714: 03 00 80 6f sethi %hi(0x201bc00), %g1 doneConstructors = true; 200e718: 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; 200e71c: f8 08 61 78 ldub [ %g1 + 0x178 ], %i4 doneConstructors = true; 200e720: c4 28 61 78 stb %g2, [ %g1 + 0x178 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e724: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 200e728: 80 a0 60 00 cmp %g1, 0 200e72c: 02 80 00 0c be 200e75c <_Thread_Handler+0x68> 200e730: 03 00 80 70 sethi %hi(0x201c000), %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 ); 200e734: d0 00 60 ec ld [ %g1 + 0xec ], %o0 ! 201c0ec <_Thread_Allocated_fp> 200e738: 80 a7 40 08 cmp %i5, %o0 200e73c: 02 80 00 08 be 200e75c <_Thread_Handler+0x68> 200e740: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e744: 22 80 00 06 be,a 200e75c <_Thread_Handler+0x68> 200e748: fa 20 60 ec st %i5, [ %g1 + 0xec ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e74c: 7f ff f2 3d call 200b040 <_CPU_Context_save_fp> 200e750: 90 02 21 48 add %o0, 0x148, %o0 _Thread_Allocated_fp = executing; 200e754: 03 00 80 70 sethi %hi(0x201c000), %g1 200e758: fa 20 60 ec st %i5, [ %g1 + 0xec ] ! 201c0ec <_Thread_Allocated_fp> ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( 200e75c: 90 10 00 1d mov %i5, %o0 200e760: 13 00 80 2a sethi %hi(0x200a800), %o1 200e764: 7f ff f0 ea call 200ab0c <_User_extensions_Iterate> 200e768: 92 12 62 98 or %o1, 0x298, %o1 ! 200aa98 <_User_extensions_Thread_begin_visitor> _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e76c: 7f ff ee 12 call 2009fb4 <_Thread_Enable_dispatch> 200e770: 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) */ { 200e774: 80 8f 20 ff btst 0xff, %i4 200e778: 32 80 00 05 bne,a 200e78c <_Thread_Handler+0x98> 200e77c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 INIT_NAME (); 200e780: 40 00 33 26 call 201b418 <_init> 200e784: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e788: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e78c: 80 a0 60 00 cmp %g1, 0 200e790: 12 80 00 07 bne 200e7ac <_Thread_Handler+0xb8> <== NEVER TAKEN 200e794: 90 10 00 1d mov %i5, %o0 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e798: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200e79c: 9f c0 40 00 call %g1 200e7a0: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200e7a4: d0 27 60 28 st %o0, [ %i5 + 0x28 ] } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( 200e7a8: 90 10 00 1d mov %i5, %o0 200e7ac: 13 00 80 2a sethi %hi(0x200a800), %o1 200e7b0: 7f ff f0 d7 call 200ab0c <_User_extensions_Iterate> 200e7b4: 92 12 62 bc or %o1, 0x2bc, %o1 ! 200aabc <_User_extensions_Thread_exitted_visitor> * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 200e7b8: 90 10 20 00 clr %o0 200e7bc: 92 10 20 01 mov 1, %o1 200e7c0: 7f ff e8 b3 call 2008a8c <_Internal_error_Occurred> 200e7c4: 94 10 20 05 mov 5, %o2 =============================================================================== 0200a270 <_Thread_Handler_initialization>: #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { 200a270: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200a274: 03 00 80 65 sethi %hi(0x2019400), %g1 200a278: 82 10 60 78 or %g1, 0x78, %g1 ! 2019478 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a27c: c6 00 60 28 ld [ %g1 + 0x28 ], %g3 #include #endif void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200a280: fa 00 60 14 ld [ %g1 + 0x14 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200a284: f8 00 60 08 ld [ %g1 + 8 ], %i4 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a288: 80 a0 e0 00 cmp %g3, 0 200a28c: 02 80 00 06 be 200a2a4 <_Thread_Handler_initialization+0x34><== NEVER TAKEN 200a290: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 200a294: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 200a298: 80 a0 e0 00 cmp %g3, 0 200a29c: 12 80 00 06 bne 200a2b4 <_Thread_Handler_initialization+0x44> 200a2a0: 80 a0 a0 00 cmp %g2, 0 rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200a2a4: 90 10 20 00 clr %o0 200a2a8: 92 10 20 01 mov 1, %o1 200a2ac: 7f ff f9 f8 call 2008a8c <_Internal_error_Occurred> 200a2b0: 94 10 20 0e mov 0xe, %o2 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200a2b4: 22 80 00 05 be,a 200a2c8 <_Thread_Handler_initialization+0x58> 200a2b8: 03 00 80 70 sethi %hi(0x201c000), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200a2bc: 9f c0 80 00 call %g2 200a2c0: d0 00 60 04 ld [ %g1 + 4 ], %o0 ! 201c004 <_Thread_BSP_context+0xc> _Thread_Dispatch_necessary = false; 200a2c4: 03 00 80 70 sethi %hi(0x201c000), %g1 200a2c8: 82 10 62 90 or %g1, 0x290, %g1 ! 201c290 <_Per_CPU_Information> 200a2cc: c0 28 60 0c clrb [ %g1 + 0xc ] _Thread_Executing = NULL; 200a2d0: c0 20 60 10 clr [ %g1 + 0x10 ] _Thread_Heir = NULL; 200a2d4: c0 20 60 14 clr [ %g1 + 0x14 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200a2d8: 03 00 80 70 sethi %hi(0x201c000), %g1 200a2dc: c0 20 60 ec clr [ %g1 + 0xec ] ! 201c0ec <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200a2e0: 03 00 80 70 sethi %hi(0x201c000), %g1 200a2e4: f8 20 61 00 st %i4, [ %g1 + 0x100 ] ! 201c100 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200a2e8: 03 00 80 6f sethi %hi(0x201bc00), %g1 200a2ec: fa 20 63 e0 st %i5, [ %g1 + 0x3e0 ] ! 201bfe0 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200a2f0: 82 10 20 08 mov 8, %g1 200a2f4: 11 00 80 70 sethi %hi(0x201c000), %o0 200a2f8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200a2fc: 90 12 21 74 or %o0, 0x174, %o0 200a300: 92 10 20 01 mov 1, %o1 200a304: 94 10 20 01 mov 1, %o2 200a308: 96 10 20 01 mov 1, %o3 200a30c: 98 10 21 60 mov 0x160, %o4 200a310: 7f ff fb 6f call 20090cc <_Objects_Initialize_information> 200a314: 9a 10 20 00 clr %o5 200a318: 81 c7 e0 08 ret 200a31c: 81 e8 00 00 restore =============================================================================== 0200a094 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a094: 9d e3 bf 98 save %sp, -104, %sp 200a098: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 200a09c: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 200a0a0: e2 00 40 00 ld [ %g1 ], %l1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 200a0a4: c0 26 61 50 clr [ %i1 + 0x150 ] 200a0a8: c0 26 61 54 clr [ %i1 + 0x154 ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a0ac: c0 26 61 4c clr [ %i1 + 0x14c ] /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200a0b0: 90 10 00 19 mov %i1, %o0 200a0b4: 40 00 02 0c call 200a8e4 <_Thread_Stack_Allocate> 200a0b8: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a0bc: 80 a2 00 1b cmp %o0, %i3 200a0c0: 0a 80 00 68 bcs 200a260 <_Thread_Initialize+0x1cc> 200a0c4: 80 a2 20 00 cmp %o0, 0 200a0c8: 02 80 00 66 be 200a260 <_Thread_Initialize+0x1cc> <== NEVER TAKEN 200a0cc: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a0d0: c2 06 60 bc ld [ %i1 + 0xbc ], %g1 the_stack->size = size; 200a0d4: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a0d8: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200a0dc: 02 80 00 07 be 200a0f8 <_Thread_Initialize+0x64> 200a0e0: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200a0e4: 40 00 03 bb call 200afd0 <_Workspace_Allocate> 200a0e8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a0ec: b6 92 20 00 orcc %o0, 0, %i3 200a0f0: 22 80 00 4d be,a 200a224 <_Thread_Initialize+0x190> 200a0f4: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a0f8: 03 00 80 70 sethi %hi(0x201c000), %g1 200a0fc: d0 00 61 00 ld [ %g1 + 0x100 ], %o0 ! 201c100 <_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; 200a100: f6 26 61 48 st %i3, [ %i1 + 0x148 ] the_thread->Start.fp_context = fp_area; 200a104: f6 26 60 b8 st %i3, [ %i1 + 0xb8 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a108: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a10c: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a110: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 200a114: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a118: 80 a2 20 00 cmp %o0, 0 200a11c: 02 80 00 08 be 200a13c <_Thread_Initialize+0xa8> 200a120: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 200a124: 90 02 20 01 inc %o0 200a128: 40 00 03 aa call 200afd0 <_Workspace_Allocate> 200a12c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200a130: b8 92 20 00 orcc %o0, 0, %i4 200a134: 22 80 00 3d be,a 200a228 <_Thread_Initialize+0x194> 200a138: 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 ) { 200a13c: 80 a7 20 00 cmp %i4, 0 200a140: 12 80 00 17 bne 200a19c <_Thread_Initialize+0x108> 200a144: f8 26 61 58 st %i4, [ %i1 + 0x158 ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200a148: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a14c: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 200a150: c2 26 60 a0 st %g1, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; 200a154: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 200a158: a0 10 20 01 mov 1, %l0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a15c: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a160: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; 200a164: e0 26 60 10 st %l0, [ %i1 + 0x10 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a168: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a16c: 03 00 80 6d sethi %hi(0x201b400), %g1 200a170: c2 00 60 fc ld [ %g1 + 0xfc ], %g1 ! 201b4fc <_Scheduler+0x18> the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 200a174: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 200a178: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 200a17c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a180: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a184: 9f c0 40 00 call %g1 200a188: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a18c: b4 92 20 00 orcc %o0, 0, %i2 200a190: 12 80 00 0f bne 200a1cc <_Thread_Initialize+0x138> 200a194: 90 10 00 19 mov %i1, %o0 200a198: 30 80 00 24 b,a 200a228 <_Thread_Initialize+0x194> * 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++ ) 200a19c: 03 00 80 70 sethi %hi(0x201c000), %g1 200a1a0: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 201c100 <_Thread_Maximum_extensions> 200a1a4: 10 80 00 05 b 200a1b8 <_Thread_Initialize+0x124> 200a1a8: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 200a1ac: 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++ ) 200a1b0: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 200a1b4: 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++ ) 200a1b8: 80 a0 40 02 cmp %g1, %g2 200a1bc: 28 bf ff fc bleu,a 200a1ac <_Thread_Initialize+0x118> 200a1c0: c8 06 61 58 ld [ %i1 + 0x158 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200a1c4: 10 bf ff e2 b 200a14c <_Thread_Initialize+0xb8> 200a1c8: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; sched =_Scheduler_Allocate( the_thread ); if ( !sched ) goto failed; _Thread_Set_priority( the_thread, priority ); 200a1cc: 40 00 01 9e call 200a844 <_Thread_Set_priority> 200a1d0: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a1d4: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200a1d8: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200a1dc: c0 26 60 80 clr [ %i1 + 0x80 ] 200a1e0: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a1e4: 83 28 60 02 sll %g1, 2, %g1 200a1e8: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a1ec: e2 26 60 0c st %l1, [ %i1 + 0xc ] * @{ */ static inline bool _User_extensions_Thread_create( Thread_Control *created ) { User_extensions_Thread_create_context ctx = { created, true }; 200a1f0: f2 27 bf f8 st %i1, [ %fp + -8 ] 200a1f4: e0 2f bf fc stb %l0, [ %fp + -4 ] _User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor ); 200a1f8: 90 07 bf f8 add %fp, -8, %o0 200a1fc: 13 00 80 2a sethi %hi(0x200a800), %o1 200a200: 40 00 02 43 call 200ab0c <_User_extensions_Iterate> 200a204: 92 12 61 e8 or %o1, 0x1e8, %o1 ! 200a9e8 <_User_extensions_Thread_create_visitor> * 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 ); if ( extension_status ) 200a208: c2 0f bf fc ldub [ %fp + -4 ], %g1 200a20c: 80 a0 60 00 cmp %g1, 0 200a210: 02 80 00 06 be 200a228 <_Thread_Initialize+0x194> 200a214: b0 10 20 01 mov 1, %i0 200a218: b0 0e 20 01 and %i0, 1, %i0 200a21c: 81 c7 e0 08 ret 200a220: 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; 200a224: 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 ); 200a228: 40 00 03 72 call 200aff0 <_Workspace_Free> 200a22c: d0 06 61 4c ld [ %i1 + 0x14c ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a230: 40 00 03 70 call 200aff0 <_Workspace_Free> 200a234: d0 06 61 50 ld [ %i1 + 0x150 ], %o0 200a238: 40 00 03 6e call 200aff0 <_Workspace_Free> 200a23c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 _Workspace_Free( extensions_area ); 200a240: 40 00 03 6c call 200aff0 <_Workspace_Free> 200a244: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a248: 40 00 03 6a call 200aff0 <_Workspace_Free> 200a24c: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a250: 40 00 03 68 call 200aff0 <_Workspace_Free> 200a254: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 200a258: 40 00 01 b3 call 200a924 <_Thread_Stack_Free> 200a25c: 90 10 00 19 mov %i1, %o0 * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 200a260: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 200a264: b0 0e 20 01 and %i0, 1, %i0 200a268: 81 c7 e0 08 ret 200a26c: 81 e8 00 00 restore =============================================================================== 0200a790 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200a790: 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 ) 200a794: 80 a6 20 00 cmp %i0, 0 200a798: 02 80 00 19 be 200a7fc <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a79c: 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 ) { 200a7a0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5 200a7a4: 80 a7 60 01 cmp %i5, 1 200a7a8: 12 80 00 15 bne 200a7fc <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a7ac: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200a7b0: 7f ff df 85 call 20025c4 200a7b4: 01 00 00 00 nop 200a7b8: b8 10 00 08 mov %o0, %i4 200a7bc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200a7c0: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a7c4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200a7c8: 80 88 80 01 btst %g2, %g1 200a7cc: 02 80 00 0a be 200a7f4 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 200a7d0: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200a7d4: 92 10 00 19 mov %i1, %o1 200a7d8: 94 10 20 01 mov 1, %o2 200a7dc: 40 00 0a 8a call 200d204 <_Thread_queue_Extract_priority_helper> 200a7e0: fa 26 20 30 st %i5, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200a7e4: 90 10 00 18 mov %i0, %o0 200a7e8: 92 10 00 19 mov %i1, %o1 200a7ec: 7f ff ff 50 call 200a52c <_Thread_queue_Enqueue_priority> 200a7f0: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200a7f4: 7f ff df 78 call 20025d4 200a7f8: 90 10 00 1c mov %i4, %o0 200a7fc: 81 c7 e0 08 ret 200a800: 81 e8 00 00 restore =============================================================================== 0200a804 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a804: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a808: 90 10 00 18 mov %i0, %o0 200a80c: 7f ff fd f6 call 2009fe4 <_Thread_Get> 200a810: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a814: c2 07 bf fc ld [ %fp + -4 ], %g1 200a818: 80 a0 60 00 cmp %g1, 0 200a81c: 12 80 00 08 bne 200a83c <_Thread_queue_Timeout+0x38> <== NEVER TAKEN 200a820: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200a824: 40 00 0a af call 200d2e0 <_Thread_queue_Process_timeout> 200a828: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 200a82c: 03 00 80 70 sethi %hi(0x201c000), %g1 200a830: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 201c080 <_Thread_Dispatch_disable_level> --level; 200a834: 84 00 bf ff add %g2, -1, %g2 _Thread_Dispatch_disable_level = level; 200a838: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 200a83c: 81 c7 e0 08 ret 200a840: 81 e8 00 00 restore =============================================================================== 020189dc <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20189dc: 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; 20189e0: 27 00 80 ec sethi %hi(0x203b000), %l3 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20189e4: a4 07 bf e8 add %fp, -24, %l2 20189e8: aa 07 bf ec add %fp, -20, %l5 20189ec: b8 07 bf f4 add %fp, -12, %i4 20189f0: b2 07 bf f8 add %fp, -8, %i1 20189f4: ea 27 bf e8 st %l5, [ %fp + -24 ] head->previous = NULL; 20189f8: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 20189fc: 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; 2018a00: f2 27 bf f4 st %i1, [ %fp + -12 ] head->previous = NULL; 2018a04: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2018a08: 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 ); 2018a0c: 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(); 2018a10: 29 00 80 ec sethi %hi(0x203b000), %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 ); 2018a14: 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 ); 2018a18: 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 ); 2018a1c: 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; 2018a20: 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; 2018a24: c2 04 e3 ec ld [ %l3 + 0x3ec ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2018a28: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018a2c: 90 10 00 1a mov %i2, %o0 2018a30: 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; 2018a34: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018a38: 40 00 11 6c call 201cfe8 <_Watchdog_Adjust_to_chain> 2018a3c: 94 10 00 1c mov %i4, %o2 2018a40: d0 1d 22 48 ldd [ %l4 + 0x248 ], %o0 2018a44: 94 10 20 00 clr %o2 2018a48: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018a4c: 40 00 4b 86 call 202b864 <__divdi3> 2018a50: 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; 2018a54: 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 ) { 2018a58: 80 a2 40 0a cmp %o1, %o2 2018a5c: 08 80 00 07 bleu 2018a78 <_Timer_server_Body+0x9c> 2018a60: 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 ); 2018a64: 92 22 40 0a sub %o1, %o2, %o1 2018a68: 90 10 00 1b mov %i3, %o0 2018a6c: 40 00 11 5f call 201cfe8 <_Watchdog_Adjust_to_chain> 2018a70: 94 10 00 1c mov %i4, %o2 2018a74: 30 80 00 06 b,a 2018a8c <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 2018a78: 1a 80 00 05 bcc 2018a8c <_Timer_server_Body+0xb0> 2018a7c: 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 ); 2018a80: 92 10 20 01 mov 1, %o1 2018a84: 40 00 11 31 call 201cf48 <_Watchdog_Adjust> 2018a88: 94 22 80 1d sub %o2, %i5, %o2 } watchdogs->last_snapshot = snapshot; 2018a8c: 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 ); 2018a90: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2018a94: 40 00 02 d8 call 20195f4 <_Chain_Get> 2018a98: 01 00 00 00 nop if ( timer == NULL ) { 2018a9c: 92 92 20 00 orcc %o0, 0, %o1 2018aa0: 02 80 00 0c be 2018ad0 <_Timer_server_Body+0xf4> 2018aa4: 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 ) { 2018aa8: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2018aac: 80 a0 60 01 cmp %g1, 1 2018ab0: 02 80 00 05 be 2018ac4 <_Timer_server_Body+0xe8> 2018ab4: 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 ) { 2018ab8: 80 a0 60 03 cmp %g1, 3 2018abc: 12 bf ff f5 bne 2018a90 <_Timer_server_Body+0xb4> <== NEVER TAKEN 2018ac0: 90 10 00 1b mov %i3, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2018ac4: 40 00 11 73 call 201d090 <_Watchdog_Insert> 2018ac8: 92 02 60 10 add %o1, 0x10, %o1 2018acc: 30 bf ff f1 b,a 2018a90 <_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 ); 2018ad0: 7f ff df 18 call 2010730 2018ad4: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2018ad8: c2 07 bf e8 ld [ %fp + -24 ], %g1 2018adc: 80 a0 40 15 cmp %g1, %l5 2018ae0: 12 80 00 0a bne 2018b08 <_Timer_server_Body+0x12c> <== NEVER TAKEN 2018ae4: 01 00 00 00 nop ts->insert_chain = NULL; 2018ae8: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2018aec: 7f ff df 15 call 2010740 2018af0: 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 ) ) { 2018af4: c2 07 bf f4 ld [ %fp + -12 ], %g1 2018af8: 80 a0 40 19 cmp %g1, %i1 2018afc: 12 80 00 06 bne 2018b14 <_Timer_server_Body+0x138> 2018b00: 01 00 00 00 nop 2018b04: 30 80 00 18 b,a 2018b64 <_Timer_server_Body+0x188> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2018b08: 7f ff df 0e call 2010740 <== NOT EXECUTED 2018b0c: 01 00 00 00 nop <== NOT EXECUTED 2018b10: 30 bf ff c5 b,a 2018a24 <_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 ); 2018b14: 7f ff df 07 call 2010730 2018b18: 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; 2018b1c: 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)) 2018b20: 80 a7 40 19 cmp %i5, %i1 2018b24: 02 80 00 0d be 2018b58 <_Timer_server_Body+0x17c> 2018b28: 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; 2018b2c: c2 07 40 00 ld [ %i5 ], %g1 head->next = new_first; new_first->previous = head; 2018b30: 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; 2018b34: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 2018b38: c0 27 60 08 clr [ %i5 + 8 ] _ISR_Enable( level ); 2018b3c: 7f ff df 01 call 2010740 2018b40: 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 ); 2018b44: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 2018b48: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 2018b4c: 9f c0 40 00 call %g1 2018b50: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 } 2018b54: 30 bf ff f0 b,a 2018b14 <_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 ); 2018b58: 7f ff de fa call 2010740 2018b5c: 01 00 00 00 nop 2018b60: 30 bf ff b0 b,a 2018a20 <_Timer_server_Body+0x44> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2018b64: c0 2e 20 7c clrb [ %i0 + 0x7c ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 2018b68: 03 00 80 ec sethi %hi(0x203b000), %g1 2018b6c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 203b300 <_Thread_Dispatch_disable_level> ++level; 2018b70: 84 00 a0 01 inc %g2 _Thread_Dispatch_disable_level = level; 2018b74: c4 20 63 00 st %g2, [ %g1 + 0x300 ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2018b78: d0 06 00 00 ld [ %i0 ], %o0 2018b7c: 40 00 10 09 call 201cba0 <_Thread_Set_state> 2018b80: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2018b84: 7f ff ff 6e call 201893c <_Timer_server_Reset_interval_system_watchdog> 2018b88: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2018b8c: 7f ff ff 80 call 201898c <_Timer_server_Reset_tod_system_watchdog> 2018b90: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2018b94: 40 00 0d b2 call 201c25c <_Thread_Enable_dispatch> 2018b98: 01 00 00 00 nop ts->active = true; 2018b9c: 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 ); 2018ba0: 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; 2018ba4: 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 ); 2018ba8: 40 00 11 92 call 201d1f0 <_Watchdog_Remove> 2018bac: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2018bb0: 40 00 11 90 call 201d1f0 <_Watchdog_Remove> 2018bb4: 90 10 00 10 mov %l0, %o0 2018bb8: 30 bf ff 9a b,a 2018a20 <_Timer_server_Body+0x44> =============================================================================== 02018bbc <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2018bbc: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2018bc0: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2018bc4: 80 a0 60 00 cmp %g1, 0 2018bc8: 12 80 00 51 bne 2018d0c <_Timer_server_Schedule_operation_method+0x150> 2018bcc: ba 10 00 19 mov %i1, %i5 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 2018bd0: 03 00 80 ec sethi %hi(0x203b000), %g1 2018bd4: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 203b300 <_Thread_Dispatch_disable_level> ++level; 2018bd8: 84 00 a0 01 inc %g2 _Thread_Dispatch_disable_level = level; 2018bdc: c4 20 63 00 st %g2, [ %g1 + 0x300 ] * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2018be0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2018be4: 80 a0 60 01 cmp %g1, 1 2018be8: 12 80 00 1f bne 2018c64 <_Timer_server_Schedule_operation_method+0xa8> 2018bec: 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 ); 2018bf0: 7f ff de d0 call 2010730 2018bf4: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2018bf8: 03 00 80 ec sethi %hi(0x203b000), %g1 2018bfc: c4 00 63 ec ld [ %g1 + 0x3ec ], %g2 ! 203b3ec <_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; 2018c00: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2018c04: 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 ); 2018c08: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2018c0c: 80 a0 40 03 cmp %g1, %g3 2018c10: 02 80 00 08 be 2018c30 <_Timer_server_Schedule_operation_method+0x74> 2018c14: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2018c18: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 if (delta_interval > delta) { 2018c1c: 80 a7 00 04 cmp %i4, %g4 2018c20: 08 80 00 03 bleu 2018c2c <_Timer_server_Schedule_operation_method+0x70> 2018c24: 86 10 20 00 clr %g3 delta_interval -= delta; 2018c28: 86 27 00 04 sub %i4, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2018c2c: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2018c30: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2018c34: 7f ff de c3 call 2010740 2018c38: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2018c3c: 90 06 20 30 add %i0, 0x30, %o0 2018c40: 40 00 11 14 call 201d090 <_Watchdog_Insert> 2018c44: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018c48: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018c4c: 80 a0 60 00 cmp %g1, 0 2018c50: 12 80 00 2d bne 2018d04 <_Timer_server_Schedule_operation_method+0x148> 2018c54: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 2018c58: 7f ff ff 39 call 201893c <_Timer_server_Reset_interval_system_watchdog> 2018c5c: 90 10 00 18 mov %i0, %o0 2018c60: 30 80 00 29 b,a 2018d04 <_Timer_server_Schedule_operation_method+0x148> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2018c64: 12 80 00 28 bne 2018d04 <_Timer_server_Schedule_operation_method+0x148> 2018c68: 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 ); 2018c6c: 7f ff de b1 call 2010730 2018c70: 01 00 00 00 nop 2018c74: b8 10 00 08 mov %o0, %i4 2018c78: 03 00 80 ec sethi %hi(0x203b000), %g1 2018c7c: d0 18 62 48 ldd [ %g1 + 0x248 ], %o0 ! 203b248 <_TOD> 2018c80: 94 10 20 00 clr %o2 2018c84: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018c88: 40 00 4a f7 call 202b864 <__divdi3> 2018c8c: 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; 2018c90: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2018c94: 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 ); 2018c98: 86 06 20 6c add %i0, 0x6c, %g3 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2018c9c: 80 a0 40 03 cmp %g1, %g3 2018ca0: 02 80 00 0d be 2018cd4 <_Timer_server_Schedule_operation_method+0x118> 2018ca4: 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 ) { 2018ca8: 08 80 00 08 bleu 2018cc8 <_Timer_server_Schedule_operation_method+0x10c> 2018cac: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2018cb0: 88 22 40 02 sub %o1, %g2, %g4 if (delta_interval > delta) { 2018cb4: 80 a0 c0 04 cmp %g3, %g4 2018cb8: 08 80 00 06 bleu 2018cd0 <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN 2018cbc: 84 10 20 00 clr %g2 delta_interval -= delta; 2018cc0: 10 80 00 04 b 2018cd0 <_Timer_server_Schedule_operation_method+0x114> 2018cc4: 84 20 c0 04 sub %g3, %g4, %g2 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2018cc8: 84 00 c0 02 add %g3, %g2, %g2 delta_interval += delta; 2018ccc: 84 20 80 09 sub %g2, %o1, %g2 } first_watchdog->delta_interval = delta_interval; 2018cd0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2018cd4: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 2018cd8: 7f ff de 9a call 2010740 2018cdc: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2018ce0: 90 06 20 68 add %i0, 0x68, %o0 2018ce4: 40 00 10 eb call 201d090 <_Watchdog_Insert> 2018ce8: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018cec: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018cf0: 80 a0 60 00 cmp %g1, 0 2018cf4: 12 80 00 04 bne 2018d04 <_Timer_server_Schedule_operation_method+0x148> 2018cf8: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2018cfc: 7f ff ff 24 call 201898c <_Timer_server_Reset_tod_system_watchdog> 2018d00: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2018d04: 40 00 0d 56 call 201c25c <_Thread_Enable_dispatch> 2018d08: 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 ); 2018d0c: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2018d10: 40 00 02 2d call 20195c4 <_Chain_Append> 2018d14: 81 e8 00 00 restore =============================================================================== 0200c2dc <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c2dc: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c2e0: d4 1e 40 00 ldd [ %i1 ], %o2 200c2e4: 80 92 80 0b orcc %o2, %o3, %g0 200c2e8: 32 80 00 06 bne,a 200c300 <_Timestamp64_Divide+0x24> <== ALWAYS TAKEN 200c2ec: d8 1e 00 00 ldd [ %i0 ], %o4 *_ival_percentage = 0; 200c2f0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *_fval_percentage = 0; 200c2f4: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200c2f8: 81 c7 e0 08 ret <== NOT EXECUTED 200c2fc: 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; 200c300: 83 2b 20 02 sll %o4, 2, %g1 200c304: 87 2b 60 02 sll %o5, 2, %g3 200c308: 89 33 60 1e srl %o5, 0x1e, %g4 200c30c: bb 28 e0 05 sll %g3, 5, %i5 200c310: 84 11 00 01 or %g4, %g1, %g2 200c314: 83 30 e0 1b srl %g3, 0x1b, %g1 200c318: b9 28 a0 05 sll %g2, 5, %i4 200c31c: 86 a7 40 03 subcc %i5, %g3, %g3 200c320: b8 10 40 1c or %g1, %i4, %i4 200c324: 84 67 00 02 subx %i4, %g2, %g2 200c328: b2 80 c0 0d addcc %g3, %o5, %i1 200c32c: b0 40 80 0c addx %g2, %o4, %i0 200c330: 83 36 60 1e srl %i1, 0x1e, %g1 200c334: 87 2e 60 02 sll %i1, 2, %g3 200c338: 85 2e 20 02 sll %i0, 2, %g2 200c33c: 84 10 40 02 or %g1, %g2, %g2 200c340: ba 86 40 03 addcc %i1, %g3, %i5 200c344: b8 46 00 02 addx %i0, %g2, %i4 200c348: 83 37 60 1e srl %i5, 0x1e, %g1 200c34c: 87 2f 60 02 sll %i5, 2, %g3 200c350: 85 2f 20 02 sll %i4, 2, %g2 200c354: 84 10 40 02 or %g1, %g2, %g2 200c358: 92 87 40 03 addcc %i5, %g3, %o1 200c35c: 90 47 00 02 addx %i4, %g2, %o0 200c360: 87 32 60 1b srl %o1, 0x1b, %g3 200c364: 85 2a 20 05 sll %o0, 5, %g2 200c368: 83 2a 60 05 sll %o1, 5, %g1 200c36c: 90 10 c0 02 or %g3, %g2, %o0 200c370: 40 00 36 c1 call 2019e74 <__divdi3> 200c374: 92 10 00 01 mov %g1, %o1 *_ival_percentage = answer / 1000; 200c378: 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; 200c37c: b8 10 00 08 mov %o0, %i4 200c380: ba 10 00 09 mov %o1, %i5 *_ival_percentage = answer / 1000; 200c384: 40 00 36 bc call 2019e74 <__divdi3> 200c388: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200c38c: 90 10 00 1c mov %i4, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200c390: d2 26 80 00 st %o1, [ %i2 ] *_fval_percentage = answer % 1000; 200c394: 94 10 20 00 clr %o2 200c398: 92 10 00 1d mov %i5, %o1 200c39c: 40 00 37 a1 call 201a220 <__moddi3> 200c3a0: 96 10 23 e8 mov 0x3e8, %o3 200c3a4: d2 26 c0 00 st %o1, [ %i3 ] 200c3a8: 81 c7 e0 08 ret 200c3ac: 81 e8 00 00 restore =============================================================================== 0200abcc <_User_extensions_Handler_initialization>: } } void _User_extensions_Handler_initialization(void) { 200abcc: 9d e3 bf 98 save %sp, -104, %sp uint32_t number_of_initial_extensions = 200abd0: 03 00 80 65 sethi %hi(0x2019400), %g1 200abd4: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 20194b8 rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { 200abd8: 80 a0 60 00 cmp %g1, 0 200abdc: 02 80 00 0a be 200ac04 <_User_extensions_Handler_initialization+0x38><== NEVER TAKEN 200abe0: 91 28 60 02 sll %g1, 2, %o0 User_extensions_Switch_control *initial_extension_switch_controls = _Workspace_Allocate_or_fatal_error( number_of_initial_extensions * sizeof( *initial_extension_switch_controls ) 200abe4: 83 28 60 04 sll %g1, 4, %g1 { uint32_t number_of_initial_extensions = rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { User_extensions_Switch_control *initial_extension_switch_controls = 200abe8: 40 00 01 08 call 200b008 <_Workspace_Allocate_or_fatal_error> 200abec: 90 20 40 08 sub %g1, %o0, %o0 number_of_initial_extensions * sizeof( *initial_extension_switch_controls ) ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); 200abf0: 13 00 80 2a sethi %hi(0x200a800), %o1 User_extensions_Switch_control *initial_extension_switch_controls = _Workspace_Allocate_or_fatal_error( number_of_initial_extensions * sizeof( *initial_extension_switch_controls ) ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; 200abf4: d0 27 bf fc st %o0, [ %fp + -4 ] _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); 200abf8: 92 12 63 88 or %o1, 0x388, %o1 200abfc: 7f ff ff c4 call 200ab0c <_User_extensions_Iterate> 200ac00: 90 07 bf fc add %fp, -4, %o0 200ac04: 81 c7 e0 08 ret 200ac08: 81 e8 00 00 restore =============================================================================== 0200c614 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c614: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c618: 7f ff db 7d call 200340c 200c61c: 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; 200c620: 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 ); 200c624: 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 ) ) { 200c628: 80 a0 40 1c cmp %g1, %i4 200c62c: 02 80 00 20 be 200c6ac <_Watchdog_Adjust+0x98> 200c630: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c634: 02 80 00 1b be 200c6a0 <_Watchdog_Adjust+0x8c> 200c638: b6 10 20 01 mov 1, %i3 200c63c: 80 a6 60 01 cmp %i1, 1 200c640: 12 80 00 1b bne 200c6ac <_Watchdog_Adjust+0x98> <== NEVER TAKEN 200c644: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c648: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c64c: 10 80 00 07 b 200c668 <_Watchdog_Adjust+0x54> 200c650: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200c654: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c658: 80 a6 80 02 cmp %i2, %g2 200c65c: 3a 80 00 05 bcc,a 200c670 <_Watchdog_Adjust+0x5c> 200c660: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200c664: b4 20 80 1a sub %g2, %i2, %i2 break; 200c668: 10 80 00 11 b 200c6ac <_Watchdog_Adjust+0x98> 200c66c: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200c670: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200c674: 7f ff db 6a call 200341c 200c678: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c67c: 40 00 00 90 call 200c8bc <_Watchdog_Tickle> 200c680: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200c684: 7f ff db 62 call 200340c 200c688: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200c68c: c2 06 00 00 ld [ %i0 ], %g1 200c690: 80 a0 40 1c cmp %g1, %i4 200c694: 12 80 00 04 bne 200c6a4 <_Watchdog_Adjust+0x90> 200c698: 80 a6 a0 00 cmp %i2, 0 200c69c: 30 80 00 04 b,a 200c6ac <_Watchdog_Adjust+0x98> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c6a0: 80 a6 a0 00 cmp %i2, 0 200c6a4: 32 bf ff ec bne,a 200c654 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200c6a8: c2 06 00 00 ld [ %i0 ], %g1 } break; } } _ISR_Enable( level ); 200c6ac: 7f ff db 5c call 200341c 200c6b0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200ad6c <_Watchdog_Remove>: #include Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200ad6c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200ad70: 7f ff de 15 call 20025c4 200ad74: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 200ad78: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 200ad7c: 80 a6 20 01 cmp %i0, 1 200ad80: 22 80 00 1e be,a 200adf8 <_Watchdog_Remove+0x8c> 200ad84: c0 27 60 08 clr [ %i5 + 8 ] 200ad88: 0a 80 00 1d bcs 200adfc <_Watchdog_Remove+0x90> 200ad8c: 03 00 80 70 sethi %hi(0x201c000), %g1 200ad90: 80 a6 20 03 cmp %i0, 3 200ad94: 18 80 00 1a bgu 200adfc <_Watchdog_Remove+0x90> <== NEVER TAKEN 200ad98: 01 00 00 00 nop RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 200ad9c: 10 80 00 02 b 200ada4 <_Watchdog_Remove+0x38> 200ada0: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200ada4: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200ada8: c4 00 40 00 ld [ %g1 ], %g2 200adac: 80 a0 a0 00 cmp %g2, 0 200adb0: 02 80 00 07 be 200adcc <_Watchdog_Remove+0x60> 200adb4: 05 00 80 70 sethi %hi(0x201c000), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200adb8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200adbc: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200adc0: 84 00 c0 02 add %g3, %g2, %g2 200adc4: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200adc8: 05 00 80 70 sethi %hi(0x201c000), %g2 200adcc: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2 ! 201c168 <_Watchdog_Sync_count> 200add0: 80 a0 a0 00 cmp %g2, 0 200add4: 22 80 00 07 be,a 200adf0 <_Watchdog_Remove+0x84> 200add8: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200addc: 05 00 80 70 sethi %hi(0x201c000), %g2 200ade0: c6 00 a2 98 ld [ %g2 + 0x298 ], %g3 ! 201c298 <_Per_CPU_Information+0x8> 200ade4: 05 00 80 70 sethi %hi(0x201c000), %g2 200ade8: c6 20 a1 08 st %g3, [ %g2 + 0x108 ] ! 201c108 <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200adec: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 200adf0: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200adf4: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200adf8: 03 00 80 70 sethi %hi(0x201c000), %g1 200adfc: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 ! 201c16c <_Watchdog_Ticks_since_boot> 200ae00: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 200ae04: 7f ff dd f4 call 20025d4 200ae08: 01 00 00 00 nop return( previous_state ); } 200ae0c: 81 c7 e0 08 ret 200ae10: 81 e8 00 00 restore =============================================================================== 0200bfc0 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200bfc0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200bfc4: 7f ff db ef call 2002f80 200bfc8: b8 10 00 18 mov %i0, %i4 200bfcc: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200bfd0: 11 00 80 70 sethi %hi(0x201c000), %o0 200bfd4: 94 10 00 19 mov %i1, %o2 200bfd8: 90 12 21 68 or %o0, 0x168, %o0 200bfdc: 7f ff e3 72 call 2004da4 200bfe0: 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; 200bfe4: 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 ); 200bfe8: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200bfec: 80 a7 40 19 cmp %i5, %i1 200bff0: 12 80 00 04 bne 200c000 <_Watchdog_Report_chain+0x40> 200bff4: 92 10 00 1d mov %i5, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200bff8: 10 80 00 0d b 200c02c <_Watchdog_Report_chain+0x6c> 200bffc: 11 00 80 70 sethi %hi(0x201c000), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c000: 40 00 00 0f call 200c03c <_Watchdog_Report> 200c004: 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 ) 200c008: 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 ) ; 200c00c: 80 a7 40 19 cmp %i5, %i1 200c010: 12 bf ff fc bne 200c000 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200c014: 92 10 00 1d mov %i5, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c018: 11 00 80 70 sethi %hi(0x201c000), %o0 200c01c: 92 10 00 1c mov %i4, %o1 200c020: 7f ff e3 61 call 2004da4 200c024: 90 12 21 80 or %o0, 0x180, %o0 200c028: 30 80 00 03 b,a 200c034 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200c02c: 7f ff e3 5e call 2004da4 200c030: 90 12 21 90 or %o0, 0x190, %o0 } _ISR_Enable( level ); 200c034: 7f ff db d7 call 2002f90 200c038: 81 e8 00 00 restore =============================================================================== 0200ae14 <_Watchdog_Tickle>: #include void _Watchdog_Tickle( Chain_Control *header ) { 200ae14: 9d e3 bf a0 save %sp, -96, %sp * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 200ae18: 7f ff dd eb call 20025c4 200ae1c: b8 10 00 18 mov %i0, %i4 200ae20: b0 10 00 08 mov %o0, %i0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200ae24: fa 07 00 00 ld [ %i4 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200ae28: b6 07 20 04 add %i4, 4, %i3 if ( _Chain_Is_empty( header ) ) 200ae2c: 80 a7 40 1b cmp %i5, %i3 200ae30: 02 80 00 1f be 200aeac <_Watchdog_Tickle+0x98> 200ae34: 01 00 00 00 nop * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 200ae38: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200ae3c: 80 a0 60 00 cmp %g1, 0 200ae40: 02 80 00 06 be 200ae58 <_Watchdog_Tickle+0x44> <== NEVER TAKEN 200ae44: 82 00 7f ff add %g1, -1, %g1 the_watchdog->delta_interval--; 200ae48: c2 27 60 10 st %g1, [ %i5 + 0x10 ] if ( the_watchdog->delta_interval != 0 ) 200ae4c: 80 a0 60 00 cmp %g1, 0 200ae50: 12 80 00 17 bne 200aeac <_Watchdog_Tickle+0x98> 200ae54: 01 00 00 00 nop goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 200ae58: 7f ff ff c5 call 200ad6c <_Watchdog_Remove> 200ae5c: 90 10 00 1d mov %i5, %o0 200ae60: b4 10 00 08 mov %o0, %i2 _ISR_Enable( level ); 200ae64: 7f ff dd dc call 20025d4 200ae68: 90 10 00 18 mov %i0, %o0 switch( watchdog_state ) { 200ae6c: 80 a6 a0 02 cmp %i2, 2 200ae70: 12 80 00 06 bne 200ae88 <_Watchdog_Tickle+0x74> 200ae74: 01 00 00 00 nop case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 200ae78: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200ae7c: d0 07 60 20 ld [ %i5 + 0x20 ], %o0 200ae80: 9f c0 40 00 call %g1 200ae84: d2 07 60 24 ld [ %i5 + 0x24 ], %o1 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 200ae88: 7f ff dd cf call 20025c4 200ae8c: 01 00 00 00 nop 200ae90: b0 10 00 08 mov %o0, %i0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200ae94: fa 07 00 00 ld [ %i4 ], %i5 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 200ae98: 80 a7 40 1b cmp %i5, %i3 200ae9c: 02 80 00 04 be 200aeac <_Watchdog_Tickle+0x98> 200aea0: 01 00 00 00 nop } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 200aea4: 10 bf ff ea b 200ae4c <_Watchdog_Tickle+0x38> 200aea8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 200aeac: 7f ff dd ca call 20025d4 200aeb0: 81 e8 00 00 restore =============================================================================== 0200aeb4 <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 200aeb4: 9d e3 bf a0 save %sp, -96, %sp Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 200aeb8: 05 00 80 65 sethi %hi(0x2019400), %g2 200aebc: 82 10 a0 78 or %g2, 0x78, %g1 ! 2019478 200aec0: c6 08 60 32 ldub [ %g1 + 0x32 ], %g3 200aec4: fa 00 a0 78 ld [ %g2 + 0x78 ], %i5 200aec8: 80 a0 e0 00 cmp %g3, 0 200aecc: 12 80 00 03 bne 200aed8 <_Workspace_Handler_initialization+0x24> 200aed0: 84 10 20 00 clr %g2 200aed4: c4 00 60 04 ld [ %g1 + 4 ], %g2 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; 200aed8: 21 00 80 22 sethi %hi(0x2008800), %l0 } else { size = 0; } } space_available = (*init_or_extend)( 200aedc: 27 00 80 70 sethi %hi(0x201c000), %l3 size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 200aee0: ba 00 80 1d add %g2, %i5, %i5 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 200aee4: b6 10 20 00 clr %i3 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; 200aee8: a0 14 20 40 or %l0, 0x40, %l0 size_t i; for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { 200aeec: e2 08 60 30 ldub [ %g1 + 0x30 ], %l1 if ( area->size > overhead ) { uintptr_t space_available; uintptr_t size; if ( unified ) { 200aef0: e4 08 60 31 ldub [ %g1 + 0x31 ], %l2 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 200aef4: 10 80 00 2c b 200afa4 <_Workspace_Handler_initialization+0xf0> 200aef8: a6 14 e0 90 or %l3, 0x90, %l3 Heap_Area *area = &areas [i]; if ( do_zero ) { 200aefc: 22 80 00 07 be,a 200af18 <_Workspace_Handler_initialization+0x64> 200af00: f8 06 20 04 ld [ %i0 + 4 ], %i4 memset( area->begin, 0, area->size ); 200af04: d0 06 00 00 ld [ %i0 ], %o0 200af08: d4 06 20 04 ld [ %i0 + 4 ], %o2 200af0c: 40 00 10 fd call 200f300 200af10: 92 10 20 00 clr %o1 } if ( area->size > overhead ) { 200af14: f8 06 20 04 ld [ %i0 + 4 ], %i4 200af18: 80 a7 20 16 cmp %i4, 0x16 200af1c: 28 80 00 21 bleu,a 200afa0 <_Workspace_Handler_initialization+0xec> 200af20: b6 06 e0 01 inc %i3 uintptr_t space_available; uintptr_t size; if ( unified ) { 200af24: 80 a4 a0 00 cmp %l2, 0 200af28: 32 80 00 0c bne,a 200af58 <_Workspace_Handler_initialization+0xa4> 200af2c: d2 06 00 00 ld [ %i0 ], %o1 size = area->size; } else { if ( remaining > 0 ) { 200af30: 80 a7 60 00 cmp %i5, 0 200af34: 22 80 00 08 be,a 200af54 <_Workspace_Handler_initialization+0xa0><== NEVER TAKEN 200af38: b8 10 20 00 clr %i4 <== NOT EXECUTED size = remaining < area->size - overhead ? 200af3c: 82 07 3f ea add %i4, -22, %g1 remaining + overhead : area->size; 200af40: 80 a7 40 01 cmp %i5, %g1 200af44: 2a 80 00 04 bcs,a 200af54 <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN 200af48: b8 07 60 16 add %i5, 0x16, %i4 } else { size = 0; } } space_available = (*init_or_extend)( 200af4c: 10 80 00 03 b 200af58 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED 200af50: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 200af54: d2 06 00 00 ld [ %i0 ], %o1 200af58: 94 10 00 1c mov %i4, %o2 200af5c: 90 10 00 13 mov %l3, %o0 200af60: 9f c4 00 00 call %l0 200af64: 96 10 20 08 mov 8, %o3 area->begin, size, page_size ); area->begin = (char *) area->begin + size; 200af68: c2 06 00 00 ld [ %i0 ], %g1 area->size -= size; if ( space_available < remaining ) { 200af6c: 80 a2 00 1d cmp %o0, %i5 area->begin, size, page_size ); area->begin = (char *) area->begin + size; 200af70: 82 00 40 1c add %g1, %i4, %g1 200af74: c2 26 00 00 st %g1, [ %i0 ] area->size -= size; 200af78: c2 06 20 04 ld [ %i0 + 4 ], %g1 200af7c: b8 20 40 1c sub %g1, %i4, %i4 if ( space_available < remaining ) { 200af80: 1a 80 00 05 bcc 200af94 <_Workspace_Handler_initialization+0xe0><== ALWAYS TAKEN 200af84: f8 26 20 04 st %i4, [ %i0 + 4 ] remaining -= space_available; 200af88: ba 27 40 08 sub %i5, %o0, %i5 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; 200af8c: 10 80 00 04 b 200af9c <_Workspace_Handler_initialization+0xe8><== NOT EXECUTED 200af90: a0 10 00 1a mov %i2, %l0 <== NOT EXECUTED 200af94: a0 10 00 1a mov %i2, %l0 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; 200af98: ba 10 20 00 clr %i5 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 200af9c: b6 06 e0 01 inc %i3 200afa0: b0 06 20 08 add %i0, 8, %i0 200afa4: 80 a6 c0 19 cmp %i3, %i1 200afa8: 12 bf ff d5 bne 200aefc <_Workspace_Handler_initialization+0x48> 200afac: 80 a4 60 00 cmp %l1, 0 init_or_extend = extend; } } if ( remaining > 0 ) { 200afb0: 80 a7 60 00 cmp %i5, 0 200afb4: 02 80 00 05 be 200afc8 <_Workspace_Handler_initialization+0x114> 200afb8: 90 10 20 00 clr %o0 _Internal_error_Occurred( 200afbc: 92 10 20 01 mov 1, %o1 200afc0: 7f ff f6 b3 call 2008a8c <_Internal_error_Occurred> 200afc4: 94 10 20 02 mov 2, %o2 200afc8: 81 c7 e0 08 ret 200afcc: 81 e8 00 00 restore =============================================================================== 0200adc0 <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { 200adc0: 9d e3 bf a0 save %sp, -96, %sp char *dup = _Workspace_Allocate(len + 1); 200adc4: 7f ff ff e3 call 200ad50 <_Workspace_Allocate> 200adc8: 90 06 60 01 add %i1, 1, %o0 if (dup != NULL) { 200adcc: ba 92 20 00 orcc %o0, 0, %i5 200add0: 02 80 00 05 be 200ade4 <_Workspace_String_duplicate+0x24> <== NEVER TAKEN 200add4: 92 10 00 18 mov %i0, %o1 dup [len] = '\0'; 200add8: c0 2f 40 19 clrb [ %i5 + %i1 ] memcpy(dup, string, len); 200addc: 40 00 11 03 call 200f1e8 200ade0: 94 10 00 19 mov %i1, %o2 } return dup; } 200ade4: 81 c7 e0 08 ret 200ade8: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02018fc0 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2018fc0: 81 c3 e0 08 retl <== NOT EXECUTED 2018fc4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02012f28 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2012f28: 9d e3 bf 98 save %sp, -104, %sp uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 2012f2c: 10 80 00 17 b 2012f88 <_fat_block_read+0x60> 2012f30: ba 10 20 00 clr %i5 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 2012f34: 92 10 00 19 mov %i1, %o1 2012f38: 94 10 20 01 mov 1, %o2 2012f3c: 7f ff ff cc call 2012e6c 2012f40: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012f44: 80 a2 20 00 cmp %o0, 0 2012f48: 32 80 00 15 bne,a 2012f9c <_fat_block_read+0x74> <== NEVER TAKEN 2012f4c: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2012f50: e0 16 00 00 lduh [ %i0 ], %l0 2012f54: a0 24 00 1a sub %l0, %i2, %l0 2012f58: 80 a4 00 1b cmp %l0, %i3 2012f5c: 38 80 00 02 bgu,a 2012f64 <_fat_block_read+0x3c> 2012f60: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (sec_buf + ofs), c); 2012f64: d2 07 bf fc ld [ %fp + -4 ], %o1 2012f68: 90 07 00 1d add %i4, %i5, %o0 2012f6c: 92 02 40 1a add %o1, %i2, %o1 2012f70: 94 10 00 10 mov %l0, %o2 2012f74: 40 00 20 e4 call 201b304 2012f78: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2012f7c: ba 04 00 1d add %l0, %i5, %i5 sec_num++; 2012f80: b2 06 60 01 inc %i1 ofs = 0; 2012f84: b4 10 20 00 clr %i2 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 2012f88: 80 a6 e0 00 cmp %i3, 0 2012f8c: 12 bf ff ea bne 2012f34 <_fat_block_read+0xc> 2012f90: 90 10 00 18 mov %i0, %o0 cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 2012f94: 81 c7 e0 08 ret 2012f98: 91 e8 00 1d restore %g0, %i5, %o0 2012f9c: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED 2012fa0: 81 c7 e0 08 ret <== NOT EXECUTED 2012fa4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020036f0 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 20036f0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20036f4: 7f ff ff d9 call 2003658 <== NOT EXECUTED 20036f8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02003d60 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2003d60: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2003d64: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2003d68: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003d6c: 7f ff ff e9 call 2003d10 <== NOT EXECUTED 2003d70: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020045a4 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 20045a4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20045a8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20045ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20045b0: 7f ff ff e9 call 2004554 <== NOT EXECUTED 20045b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02003990 : #include #include int chroot( const char *path ) { 2003990: 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( 2003994: 94 10 20 19 mov 0x19, %o2 2003998: 92 10 00 18 mov %i0, %o1 200399c: 90 07 bf c8 add %fp, -56, %o0 20039a0: 17 00 80 44 sethi %hi(0x2011000), %o3 20039a4: 96 12 e1 c4 or %o3, 0x1c4, %o3 ! 20111c4 20039a8: 40 00 04 c3 call 2004cb4 20039ac: 98 02 ff fc add %o3, -4, %o4 20039b0: 90 07 bf b0 add %fp, -80, %o0 20039b4: 40 00 05 da call 200511c 20039b8: 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 ); 20039bc: 40 00 06 50 call 20052fc 20039c0: 90 07 bf b0 add %fp, -80, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 20039c4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 20039c8: 39 00 80 43 sethi %hi(0x2010c00), %i4 20039cc: b8 17 20 64 or %i4, 0x64, %i4 ! 2010c64 20039d0: 80 a0 40 1c cmp %g1, %i4 20039d4: 02 80 00 29 be 2003a78 20039d8: d0 27 bf ac st %o0, [ %fp + -84 ] rtems_filesystem_global_location_t *new_root_loc = 20039dc: 40 00 06 16 call 2005234 20039e0: 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)( 20039e4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 20039e8: 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 = 20039ec: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 20039f0: 9f c0 40 00 call %g1 20039f4: 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 ) { 20039f8: 80 a2 20 00 cmp %o0, 0 20039fc: 32 80 00 17 bne,a 2003a58 2003a00: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 sc = rtems_libio_set_private_env(); 2003a04: 40 00 03 1d call 2004678 2003a08: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 2003a0c: 80 a2 20 00 cmp %o0, 0 2003a10: 12 80 00 0c bne 2003a40 2003a14: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( 2003a18: 39 00 80 44 sethi %hi(0x2011000), %i4 2003a1c: d0 07 21 bc ld [ %i4 + 0x1bc ], %o0 ! 20111bc 2003a20: 92 10 00 1d mov %i5, %o1 2003a24: 40 00 05 fb call 2005210 2003a28: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 2003a2c: d0 07 21 bc ld [ %i4 + 0x1bc ], %o0 2003a30: d2 07 bf ac ld [ %fp + -84 ], %o1 2003a34: 40 00 05 f7 call 2005210 2003a38: b0 10 20 00 clr %i0 2003a3c: 30 80 00 10 b,a 2003a7c &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 2003a40: 02 80 00 18 be 2003aa0 <== NEVER TAKEN 2003a44: 01 00 00 00 nop errno = ENOMEM; 2003a48: 40 00 1c 61 call 200abcc <__errno> 2003a4c: 01 00 00 00 nop 2003a50: 10 80 00 08 b 2003a70 2003a54: 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 ) ) { 2003a58: 80 a0 40 1c cmp %g1, %i4 2003a5c: 02 80 00 11 be 2003aa0 <== NEVER TAKEN 2003a60: 01 00 00 00 nop errno = eno; 2003a64: 40 00 1c 5a call 200abcc <__errno> 2003a68: 01 00 00 00 nop 2003a6c: 82 10 20 14 mov 0x14, %g1 ! 14 2003a70: 10 80 00 0c b 2003aa0 2003a74: c2 22 00 00 st %g1, [ %o0 ] if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); } } else { rv = -1; 2003a78: b0 10 3f ff mov -1, %i0 } rtems_filesystem_eval_path_cleanup( &ctx ); 2003a7c: 40 00 04 d4 call 2004dcc 2003a80: 90 07 bf c8 add %fp, -56, %o0 if ( rv != 0 ) { 2003a84: 80 a6 20 00 cmp %i0, 0 2003a88: 02 80 00 0a be 2003ab0 2003a8c: 01 00 00 00 nop rtems_filesystem_global_location_release( new_current_loc ); 2003a90: 40 00 05 c8 call 20051b0 2003a94: d0 07 bf ac ld [ %fp + -84 ], %o0 2003a98: 81 c7 e0 08 ret 2003a9c: 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 ); 2003aa0: 40 00 05 c4 call 20051b0 2003aa4: 90 10 00 1d mov %i5, %o0 } } else { rv = -1; 2003aa8: 10 bf ff f5 b 2003a7c 2003aac: b0 10 3f ff mov -1, %i0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 2003ab0: 81 c7 e0 08 ret 2003ab4: 81 e8 00 00 restore =============================================================================== 02003624 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 2003624: 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) { 2003628: 03 00 80 7f sethi %hi(0x201fc00), %g1 200362c: e0 00 63 f8 ld [ %g1 + 0x3f8 ], %l0 ! 201fff8 2003630: 80 a6 00 10 cmp %i0, %l0 2003634: 0a 80 00 16 bcs 200368c 2003638: 03 00 80 7f sethi %hi(0x201fc00), %g1 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 200363c: bb 2c 20 01 sll %l0, 1, %i5 if (major >= new_size) { 2003640: 80 a6 00 1d cmp %i0, %i5 2003644: 0a 80 00 03 bcs 2003650 <== NEVER TAKEN 2003648: d0 00 63 fc ld [ %g1 + 0x3fc ], %o0 new_size = major + 1; 200364c: ba 06 20 01 add %i0, 1, %i5 } table = realloc(table, new_size * sizeof(*table)); 2003650: 40 00 08 7a call 2005838 2003654: 93 2f 60 03 sll %i5, 3, %o1 if (table == NULL) { 2003658: a2 92 20 00 orcc %o0, 0, %l1 200365c: 02 80 00 58 be 20037bc <== ALWAYS TAKEN 2003660: 94 27 40 10 sub %i5, %l0, %o2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003664: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED 2003668: 92 10 20 00 clr %o1 <== NOT EXECUTED 200366c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED 2003670: 40 00 40 05 call 2013684 <== NOT EXECUTED 2003674: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 2003678: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED 200367c: e2 20 63 fc st %l1, [ %g1 + 0x3fc ] ! 201fffc <== NOT EXECUTED disktab_size = new_size; 2003680: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED 2003684: fa 20 63 f8 st %i5, [ %g1 + 0x3f8 ] ! 201fff8 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2003688: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED 200368c: e4 00 63 fc ld [ %g1 + 0x3fc ], %l2 ! 201fffc 2003690: a3 2e 20 03 sll %i0, 3, %l1 2003694: d0 04 80 11 ld [ %l2 + %l1 ], %o0 2003698: a8 04 80 11 add %l2, %l1, %l4 200369c: 80 a2 20 00 cmp %o0, 0 20036a0: 02 80 00 05 be 20036b4 20036a4: e0 05 20 04 ld [ %l4 + 4 ], %l0 20036a8: 80 a6 40 10 cmp %i1, %l0 20036ac: 2a 80 00 16 bcs,a 2003704 20036b0: 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) { 20036b4: 80 a4 20 00 cmp %l0, 0 20036b8: 02 80 00 03 be 20036c4 20036bc: ba 10 20 08 mov 8, %i5 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 20036c0: bb 2c 20 01 sll %l0, 1, %i5 } if (minor >= new_size) { 20036c4: 80 a6 40 1d cmp %i1, %i5 20036c8: 3a 80 00 02 bcc,a 20036d0 20036cc: ba 06 60 01 add %i1, 1, %i5 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 20036d0: 40 00 08 5a call 2005838 20036d4: 93 2f 60 02 sll %i5, 2, %o1 if (table == NULL) { 20036d8: a6 92 20 00 orcc %o0, 0, %l3 20036dc: 02 80 00 38 be 20037bc 20036e0: 94 27 40 10 sub %i5, %l0, %o2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 20036e4: 91 2c 20 02 sll %l0, 2, %o0 20036e8: 92 10 20 00 clr %o1 20036ec: 90 04 c0 08 add %l3, %o0, %o0 20036f0: 40 00 3f e5 call 2013684 20036f4: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 20036f8: e6 24 80 11 st %l3, [ %l2 + %l1 ] disktab [major].size = new_size; 20036fc: fa 25 20 04 st %i5, [ %l4 + 4 ] } return disktab [major].minor + minor; 2003700: e2 04 80 11 ld [ %l2 + %l1 ], %l1 2003704: a1 2e 60 02 sll %i1, 2, %l0 2003708: 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) { 200370c: 80 a0 60 00 cmp %g1, 0 2003710: 32 80 00 04 bne,a 2003720 <== ALWAYS TAKEN 2003714: c4 04 40 10 ld [ %l1 + %l0 ], %g2 return RTEMS_NO_MEMORY; 2003718: 10 80 00 2a b 20037c0 <== NOT EXECUTED 200371c: 82 10 20 1a mov 0x1a, %g1 <== NOT EXECUTED } if (*dd_entry != NULL) { 2003720: 80 a0 a0 00 cmp %g2, 0 2003724: 12 80 00 27 bne 20037c0 2003728: 82 10 20 0c mov 0xc, %g1 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 200372c: 40 00 05 7d call 2004d20 2003730: 90 10 20 78 mov 0x78, %o0 if (dd == NULL) { 2003734: ba 92 20 00 orcc %o0, 0, %i5 2003738: 02 80 00 21 be 20037bc <== NEVER TAKEN 200373c: 80 a6 a0 00 cmp %i2, 0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2003740: 02 80 00 11 be 2003784 2003744: a4 10 20 00 clr %l2 alloc_name = strdup(name); 2003748: 40 00 41 28 call 2013be8 200374c: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2003750: a4 92 20 00 orcc %o0, 0, %l2 2003754: 12 80 00 11 bne 2003798 <== ALWAYS TAKEN 2003758: b4 10 00 08 mov %o0, %i2 free(dd); 200375c: 40 00 04 30 call 200481c <== NOT EXECUTED 2003760: 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; 2003764: 10 80 00 17 b 20037c0 <== NOT EXECUTED 2003768: 82 10 20 1a mov 0x1a, %g1 <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 200376c: 40 00 04 2c call 200481c <== NOT EXECUTED 2003770: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED free(dd); 2003774: 40 00 04 2a call 200481c <== NOT EXECUTED 2003778: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 200377c: 10 80 00 11 b 20037c0 <== NOT EXECUTED 2003780: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED } } *dd_entry = dd; 2003784: fa 24 40 10 st %i5, [ %l1 + %l0 ] *dd_ptr = dd; 2003788: fa 26 c0 00 st %i5, [ %i3 ] *alloc_name_ptr = alloc_name; 200378c: e4 27 00 00 st %l2, [ %i4 ] return RTEMS_SUCCESSFUL; 2003790: 10 80 00 0c b 20037c0 2003794: 82 10 20 00 clr %g1 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2003798: 13 00 00 18 sethi %hi(0x6000), %o1 200379c: 94 10 00 18 mov %i0, %o2 20037a0: 92 12 61 ff or %o1, 0x1ff, %o1 20037a4: 40 00 05 cf call 2004ee0 20037a8: 96 10 00 19 mov %i1, %o3 20037ac: 80 a2 20 00 cmp %o0, 0 20037b0: 36 bf ff f6 bge,a 2003788 <== ALWAYS TAKEN 20037b4: fa 24 40 10 st %i5, [ %l1 + %l0 ] 20037b8: 30 bf ff ed b,a 200376c <== 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; 20037bc: 82 10 20 1a mov 0x1a, %g1 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 20037c0: 81 c7 e0 08 ret 20037c4: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200490c : * 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) 200490c: 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) 2004910: 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) 2004914: b8 10 00 18 mov %i0, %i4 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 2004918: c0 26 40 00 clr [ %i1 ] if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 200491c: 92 10 20 28 mov 0x28, %o1 2004920: 40 00 03 06 call 2005538 2004924: b0 10 20 1a mov 0x1a, %i0 2004928: 80 a2 20 00 cmp %o0, 0 200492c: 02 80 00 27 be 20049c8 <== NEVER TAKEN 2004930: ba 10 00 08 mov %o0, %i5 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004934: 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)); 2004938: 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); 200493c: c2 2a 00 00 stb %g1, [ %o0 ] part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004940: 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)); 2004944: 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); 2004948: 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)); 200494c: 40 00 3f e0 call 20148cc 2004950: 90 07 bf fc add %fp, -4, %o0 part_desc->start = LE_TO_CPU_U32(temp); 2004954: 7f ff ff ac call 2004804 2004958: d0 07 bf fc ld [ %fp + -4 ], %o0 memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 200495c: 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); 2004960: d0 27 60 04 st %o0, [ %i5 + 4 ] memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004964: 94 10 20 04 mov 4, %o2 2004968: 40 00 3f d9 call 20148cc 200496c: 90 07 bf fc add %fp, -4, %o0 part_desc->size = LE_TO_CPU_U32(temp); 2004970: 7f ff ff a5 call 2004804 2004974: d0 07 bf fc ld [ %fp + -4 ], %o0 2004978: 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) || 200497c: 82 0e e0 7f and %i3, 0x7f, %g1 2004980: 80 a0 60 05 cmp %g1, 5 2004984: 02 80 00 0c be 20049b4 2004988: 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))); 200498c: 11 00 80 8c sethi %hi(0x2023000), %o0 2004990: 92 0e e0 ff and %i3, 0xff, %o1 2004994: 90 12 20 28 or %o0, 0x28, %o0 2004998: 40 00 3f 5f call 2014714 200499c: 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) || 20049a0: 80 a2 20 00 cmp %o0, 0 20049a4: 02 80 00 06 be 20049bc 20049a8: 80 a7 20 00 cmp %i4, 0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 20049ac: 02 80 00 04 be 20049bc <== NEVER TAKEN 20049b0: 01 00 00 00 nop *new_part_desc = part_desc; 20049b4: 10 80 00 04 b 20049c4 20049b8: fa 26 40 00 st %i5, [ %i1 ] } else { /* empty partition */ free(part_desc); 20049bc: 40 00 03 b3 call 2005888 20049c0: 90 10 00 1d mov %i5, %o0 } return RTEMS_SUCCESSFUL; 20049c4: b0 10 20 00 clr %i0 } 20049c8: 81 c7 e0 08 ret 20049cc: 81 e8 00 00 restore =============================================================================== 02002a3c : #endif #include "devfs.h" void devFS_Show(void) { 2002a3c: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002a40: 03 00 80 63 sethi %hi(0x2018c00), %g1 2002a44: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 ! 2018c24 if (rootloc->mt_entry->ops == &devFS_ops) { 2002a48: 05 00 80 5c sethi %hi(0x2017000), %g2 2002a4c: c2 00 60 04 ld [ %g1 + 4 ], %g1 2002a50: 84 10 a2 5c or %g2, 0x25c, %g2 2002a54: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2002a58: c6 00 60 0c ld [ %g1 + 0xc ], %g3 2002a5c: 80 a0 c0 02 cmp %g3, %g2 2002a60: 12 80 00 25 bne 2002af4 <== NEVER TAKEN 2002a64: 33 00 80 5c sethi %hi(0x2017000), %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; 2002a68: 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]); 2002a6c: 31 00 80 5c sethi %hi(0x2017000), %i0 } printk( 2002a70: 21 00 80 5c sethi %hi(0x2017000), %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; 2002a74: f4 00 60 04 ld [ %g1 + 4 ], %i2 2002a78: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002a7c: b6 10 20 00 clr %i3 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002a80: b2 16 62 b0 or %i1, 0x2b0, %i1 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002a84: b0 16 22 b8 or %i0, 0x2b8, %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) { 2002a88: 10 80 00 18 b 2002ae8 2002a8c: a0 14 22 c0 or %l0, 0x2c0, %l0 devFS_node *current = nodes + i; if (current->name != NULL) { 2002a90: 80 a0 60 00 cmp %g1, 0 2002a94: 22 80 00 14 be,a 2002ae4 2002a98: b6 06 e0 01 inc %i3 size_t j = 0; size_t m = current->namelen; 2002a9c: e2 07 60 04 ld [ %i5 + 4 ], %l1 printk("/"); 2002aa0: 90 10 00 19 mov %i1, %o0 2002aa4: 40 00 04 94 call 2003cf4 2002aa8: b8 10 20 00 clr %i4 for (j = 0; j < m; ++j) { 2002aac: 10 80 00 07 b 2002ac8 2002ab0: 80 a7 00 11 cmp %i4, %l1 printk("%c", current->name [j]); 2002ab4: 90 10 00 18 mov %i0, %o0 2002ab8: d2 48 40 1c ldsb [ %g1 + %i4 ], %o1 2002abc: 40 00 04 8e call 2003cf4 2002ac0: 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) { 2002ac4: 80 a7 00 11 cmp %i4, %l1 2002ac8: 32 bf ff fb bne,a 2002ab4 2002acc: c2 07 40 00 ld [ %i5 ], %g1 printk("%c", current->name [j]); } printk( 2002ad0: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002ad4: d4 07 60 0c ld [ %i5 + 0xc ], %o2 2002ad8: 40 00 04 87 call 2003cf4 2002adc: 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) { 2002ae0: b6 06 e0 01 inc %i3 2002ae4: ba 07 60 14 add %i5, 0x14, %i5 2002ae8: 80 a6 c0 1a cmp %i3, %i2 2002aec: 32 bf ff e9 bne,a 2002a90 2002af0: c2 07 40 00 ld [ %i5 ], %g1 2002af4: 81 c7 e0 08 ret 2002af8: 81 e8 00 00 restore =============================================================================== 0200bb14 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200bb14: 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; 200bb18: 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; 200bb1c: f2 06 00 00 ld [ %i0 ], %i1 200bb20: 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; 200bb24: 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; 200bb28: e2 00 60 04 ld [ %g1 + 4 ], %l1 200bb2c: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200bb30: b8 10 20 00 clr %i4 devFS_node *free_node = NULL; 200bb34: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200bb38: 10 80 00 12 b 200bb80 200bb3c: b4 10 20 00 clr %i2 devFS_node *current = nodes + i; if (current->name != NULL) { 200bb40: 80 a2 20 00 cmp %o0, 0 200bb44: 02 80 00 0c be 200bb74 200bb48: a0 10 00 1d mov %i5, %l0 if ( 200bb4c: c4 07 60 04 ld [ %i5 + 4 ], %g2 200bb50: 80 a0 80 1b cmp %g2, %i3 200bb54: 12 80 00 08 bne 200bb74 200bb58: a0 10 00 01 mov %g1, %l0 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200bb5c: 92 10 00 19 mov %i1, %o1 200bb60: 40 00 0a 70 call 200e520 200bb64: 94 10 00 1b mov %i3, %o2 200bb68: 80 a2 20 00 cmp %o0, 0 200bb6c: 22 80 00 02 be,a 200bb74 200bb70: 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) { 200bb74: b4 06 a0 01 inc %i2 200bb78: ba 07 60 14 add %i5, 0x14, %i5 200bb7c: 82 10 00 10 mov %l0, %g1 200bb80: 80 a7 20 00 cmp %i4, 0 200bb84: 02 80 00 0a be 200bbac 200bb88: 80 a6 80 11 cmp %i2, %l1 200bb8c: 80 a0 60 00 cmp %g1, 0 200bb90: 02 80 00 07 be 200bbac 200bb94: 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) { 200bb98: 80 a7 20 00 cmp %i4, 0 200bb9c: 12 80 00 08 bne 200bbbc 200bba0: 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) { 200bba4: 10 80 00 0b b 200bbd0 200bba8: 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) { 200bbac: 32 bf ff e5 bne,a 200bb40 200bbb0: 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) { 200bbb4: 10 bf ff fa b 200bb9c 200bbb8: 80 a7 20 00 cmp %i4, 0 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200bbbc: 80 88 a0 40 btst 0x40, %g2 200bbc0: 12 80 00 12 bne 200bc08 200bbc4: b2 10 20 11 mov 0x11, %i1 currentloc->node_access = node; 200bbc8: 10 80 00 0a b 200bbf0 200bbcc: 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) { 200bbd0: 02 80 00 0d be 200bc04 <== NEVER TAKEN 200bbd4: 80 a0 60 00 cmp %g1, 0 if (free_node != NULL) { 200bbd8: 02 80 00 09 be 200bbfc 200bbdc: 84 10 21 ff mov 0x1ff, %g2 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200bbe0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] currentloc->node_access = free_node; 200bbe4: c2 26 20 20 st %g1, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200bbe8: f2 26 20 08 st %i1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200bbec: 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; 200bbf0: c0 26 20 04 clr [ %i0 + 4 ] 200bbf4: 81 c7 e0 08 ret 200bbf8: 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); 200bbfc: 10 80 00 03 b 200bc08 200bc00: b2 10 20 1c mov 0x1c, %i1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200bc04: b2 10 20 02 mov 2, %i1 <== NOT EXECUTED 200bc08: 7f ff e4 14 call 2004c58 200bc0c: 81 e8 00 00 restore =============================================================================== 020035fc : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 20035fc: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 2003600: 80 a6 a0 03 cmp %i2, 3 2003604: 12 80 00 0e bne 200363c 2003608: 05 00 00 2c sethi %hi(0xb000), %g2 200360c: c2 4e 40 00 ldsb [ %i1 ], %g1 2003610: 80 a0 60 64 cmp %g1, 0x64 2003614: 12 80 00 0b bne 2003640 <== NEVER TAKEN 2003618: 03 00 00 08 sethi %hi(0x2000), %g1 200361c: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1 2003620: 80 a0 60 65 cmp %g1, 0x65 2003624: 12 80 00 07 bne 2003640 <== NEVER TAKEN 2003628: 03 00 00 08 sethi %hi(0x2000), %g1 200362c: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1 2003630: 80 a0 60 76 cmp %g1, 0x76 2003634: 02 80 00 1b be 20036a0 <== ALWAYS TAKEN 2003638: 03 00 00 3c sethi %hi(0xf000), %g1 if (S_ISBLK(mode) || S_ISCHR(mode)) { 200363c: 03 00 00 08 sethi %hi(0x2000), %g1 2003640: 84 0e c0 02 and %i3, %g2, %g2 2003644: 80 a0 80 01 cmp %g2, %g1 2003648: 12 80 00 1b bne 20036b4 200364c: 01 00 00 00 nop char *dupname = malloc(namelen); 2003650: 40 00 01 e6 call 2003de8 2003654: 90 10 00 1a mov %i2, %o0 if (dupname != NULL) { 2003658: 84 92 20 00 orcc %o0, 0, %g2 200365c: 02 80 00 0d be 2003690 2003660: 92 10 00 19 mov %i1, %o1 devFS_node *node = parentloc->node_access; 2003664: c2 06 20 08 ld [ %i0 + 8 ], %g1 node->name = dupname; 2003668: c4 20 40 00 st %g2, [ %g1 ] node->namelen = namelen; 200366c: f4 20 60 04 st %i2, [ %g1 + 4 ] node->major = rtems_filesystem_dev_major_t(dev); 2003670: f8 20 60 08 st %i4, [ %g1 + 8 ] node->minor = rtems_filesystem_dev_minor_t(dev); 2003674: fa 20 60 0c st %i5, [ %g1 + 0xc ] node->mode = mode; 2003678: f6 20 60 10 st %i3, [ %g1 + 0x10 ] memcpy(dupname, name, namelen); 200367c: 94 10 00 1a mov %i2, %o2 2003680: 40 00 2b d2 call 200e5c8 2003684: b0 10 20 00 clr %i0 2003688: 81 c7 e0 08 ret 200368c: 81 e8 00 00 restore } else { errno = ENOMEM; 2003690: 40 00 27 c9 call 200d5b4 <__errno> 2003694: 01 00 00 00 nop 2003698: 10 80 00 0a b 20036c0 200369c: 82 10 20 0c mov 0xc, %g1 ! c } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 20036a0: b6 0e c0 01 and %i3, %g1, %i3 20036a4: 03 00 00 10 sethi %hi(0x4000), %g1 20036a8: 80 a6 c0 01 cmp %i3, %g1 20036ac: 02 bf ff f7 be 2003688 <== ALWAYS TAKEN 20036b0: b0 10 20 00 clr %i0 errno = ENOTSUP; 20036b4: 40 00 27 c0 call 200d5b4 <__errno> 20036b8: 01 00 00 00 nop 20036bc: 82 10 20 86 mov 0x86, %g1 ! 86 20036c0: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 20036c4: b0 10 3f ff mov -1, %i0 } } return rv; } 20036c8: 81 c7 e0 08 ret 20036cc: 81 e8 00 00 restore =============================================================================== 020035b4 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 20035b4: 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); 20035b8: 03 00 80 7f sethi %hi(0x201fc00), %g1 20035bc: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 201fff4 20035c0: 92 10 20 00 clr %o1 20035c4: 94 10 20 00 clr %o2 20035c8: 40 00 15 4c call 2008af8 20035cc: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 20035d0: 80 a2 20 00 cmp %o0, 0 20035d4: 12 80 00 05 bne 20035e8 <== NEVER TAKEN 20035d8: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 20035dc: 03 00 80 7f sethi %hi(0x201fc00), %g1 return RTEMS_SUCCESSFUL; 20035e0: 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; 20035e4: c4 28 63 f0 stb %g2, [ %g1 + 0x3f0 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 20035e8: 81 c7 e0 08 ret 20035ec: 81 e8 00 00 restore =============================================================================== 020035f0 : static void disk_unlock(void) { 20035f0: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 20035f4: 03 00 80 7f sethi %hi(0x201fc00), %g1 20035f8: c0 28 63 f0 clrb [ %g1 + 0x3f0 ] ! 201fff0 sc = rtems_semaphore_release(diskdevs_mutex); 20035fc: 03 00 80 7f sethi %hi(0x201fc00), %g1 2003600: 40 00 15 87 call 2008c1c 2003604: d0 00 63 f4 ld [ %g1 + 0x3f4 ], %o0 ! 201fff4 if (sc != RTEMS_SUCCESSFUL) { 2003608: 80 a2 20 00 cmp %o0, 0 200360c: 02 80 00 04 be 200361c <== ALWAYS TAKEN 2003610: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2003614: 40 00 16 fc call 2009204 <== NOT EXECUTED 2003618: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED 200361c: 81 c7 e0 08 ret 2003620: 81 e8 00 00 restore =============================================================================== 02005124 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 2005124: 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); 2005128: 7f ff f5 27 call 20025c4 200512c: 01 00 00 00 nop while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2005130: 10 80 00 0f b 200516c 2005134: b8 10 20 02 mov 2, %i4 ! 2 rtems_interrupt_enable (level); 2005138: 7f ff f5 27 call 20025d4 <== NOT EXECUTED 200513c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 2005140: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2005144: 92 10 20 00 clr %o1 <== NOT EXECUTED 2005148: 40 00 09 5f call 20076c4 <== NOT EXECUTED 200514c: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2005150: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005154: 02 80 00 04 be 2005164 <== NOT EXECUTED 2005158: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 200515c: 40 00 0b 35 call 2007e30 <== NOT EXECUTED 2005160: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 2005164: 7f ff f5 18 call 20025c4 <== NOT EXECUTED 2005168: 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) { 200516c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 2005170: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2005174: 80 a0 80 01 cmp %g2, %g1 2005178: 32 bf ff f0 bne,a 2005138 <== NEVER TAKEN 200517c: 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); 2005180: 7f ff f5 15 call 20025d4 2005184: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003a40 : */ int dup2( int fildes, int fildes2 ) { 2003a40: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003a44: 90 10 00 18 mov %i0, %o0 2003a48: 40 00 01 e2 call 20041d0 2003a4c: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003a50: 80 a2 3f ff cmp %o0, -1 2003a54: 12 80 00 04 bne 2003a64 2003a58: 90 10 00 19 mov %i1, %o0 return -1; 2003a5c: 81 c7 e0 08 ret 2003a60: 91 e8 3f ff restore %g0, -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003a64: 40 00 01 db call 20041d0 2003a68: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003a6c: 80 a2 3f ff cmp %o0, -1 2003a70: 02 bf ff fb be 2003a5c <== NEVER TAKEN 2003a74: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2003a78: 92 10 20 00 clr %o1 2003a7c: 40 00 00 af call 2003d38 2003a80: 94 10 00 19 mov %i1, %o2 } 2003a84: 81 c7 e0 08 ret 2003a88: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02005f10 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2005f10: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 2005f14: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2005f18: 80 88 62 00 btst 0x200, %g1 2005f1c: 02 80 00 19 be 2005f80 <== NEVER TAKEN 2005f20: 03 00 80 6d sethi %hi(0x201b400), %g1 iscntrl(c) && (c != '\t') && (c != '\n')) { 2005f24: c2 00 63 40 ld [ %g1 + 0x340 ], %g1 ! 201b740 <__ctype_ptr__> 2005f28: 82 00 40 18 add %g1, %i0, %g1 2005f2c: 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) && 2005f30: 80 88 60 20 btst 0x20, %g1 2005f34: 02 80 00 14 be 2005f84 2005f38: 90 10 00 18 mov %i0, %o0 iscntrl(c) && (c != '\t') && (c != '\n')) { 2005f3c: 82 06 3f f7 add %i0, -9, %g1 2005f40: 82 08 60 ff and %g1, 0xff, %g1 2005f44: 80 a0 60 01 cmp %g1, 1 2005f48: 08 80 00 0f bleu 2005f84 2005f4c: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2005f50: 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] = '^'; 2005f54: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 2005f58: f0 2f bf f9 stb %i0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2005f5c: 90 07 bf f8 add %fp, -8, %o0 2005f60: 92 10 20 02 mov 2, %o1 2005f64: 7f ff ff 43 call 2005c70 2005f68: 94 10 00 19 mov %i1, %o2 tty->column += 2; 2005f6c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 2005f70: 82 00 60 02 add %g1, 2, %g1 2005f74: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 2005f78: 81 c7 e0 08 ret 2005f7c: 81 e8 00 00 restore } else { oproc (c, tty); 2005f80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2005f84: 7f ff ff 84 call 2005d94 2005f88: 92 10 00 19 mov %i1, %o1 2005f8c: 81 c7 e0 08 ret 2005f90: 81 e8 00 00 restore =============================================================================== 02023f1c : } void endgrent(void) { if (group_fp != NULL) 2023f1c: 03 00 81 81 sethi %hi(0x2060400), %g1 2023f20: d0 00 60 d0 ld [ %g1 + 0xd0 ], %o0 ! 20604d0 2023f24: 80 a2 20 00 cmp %o0, 0 2023f28: 02 80 00 05 be 2023f3c <== NEVER TAKEN 2023f2c: 01 00 00 00 nop fclose(group_fp); 2023f30: 82 13 c0 00 mov %o7, %g1 2023f34: 40 00 47 ce call 2035e6c 2023f38: 9e 10 40 00 mov %g1, %o7 2023f3c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02023d78 : } void endpwent(void) { if (passwd_fp != NULL) 2023d78: 03 00 81 80 sethi %hi(0x2060000), %g1 2023d7c: d0 00 63 f0 ld [ %g1 + 0x3f0 ], %o0 ! 20603f0 2023d80: 80 a2 20 00 cmp %o0, 0 2023d84: 02 80 00 05 be 2023d98 <== NEVER TAKEN 2023d88: 01 00 00 00 nop fclose(passwd_fp); 2023d8c: 82 13 c0 00 mov %o7, %g1 2023d90: 40 00 48 37 call 2035e6c 2023d94: 9e 10 40 00 mov %g1, %o7 2023d98: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02005f94 : * 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) 2005f94: 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); 2005f98: 35 00 80 68 sethi %hi(0x201a000), %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) 2005f9c: ba 10 00 18 mov %i0, %i5 2005fa0: 37 00 80 6d sethi %hi(0x201b400), %i3 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2005fa4: 31 00 80 68 sethi %hi(0x201a000), %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); 2005fa8: b4 16 a0 b8 or %i2, 0xb8, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2005fac: 10 80 00 62 b 2006134 2005fb0: b0 16 20 b0 or %i0, 0xb0, %i0 } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 2005fb4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2005fb8: 86 00 ff ff add %g3, -1, %g3 2005fbc: c6 27 60 20 st %g3, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 2005fc0: 80 88 60 08 btst 8, %g1 2005fc4: 02 80 00 59 be 2006128 <== NEVER TAKEN 2005fc8: f8 09 00 03 ldub [ %g4 + %g3 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2005fcc: 80 a6 60 00 cmp %i1, 0 2005fd0: 32 80 00 08 bne,a 2005ff0 2005fd4: b8 0f 20 ff and %i4, 0xff, %i4 2005fd8: 80 88 60 10 btst 0x10, %g1 2005fdc: 32 80 00 05 bne,a 2005ff0 <== ALWAYS TAKEN 2005fe0: b8 0f 20 ff and %i4, 0xff, %i4 echo (tty->termios.c_cc[VERASE], tty); 2005fe4: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED 2005fe8: 7f ff ff ca call 2005f10 <== NOT EXECUTED 2005fec: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED } else if (c == '\t') { 2005ff0: 80 a7 20 09 cmp %i4, 9 2005ff4: 32 80 00 28 bne,a 2006094 2005ff8: c4 06 e3 40 ld [ %i3 + 0x340 ], %g2 int col = tty->read_start_column; 2005ffc: 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)) { 2006000: da 06 e3 40 ld [ %i3 + 0x340 ], %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; 2006004: 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) 2006008: 10 80 00 12 b 2006050 200600c: 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') { 2006010: 80 a3 e0 09 cmp %o7, 9 2006014: 12 80 00 04 bne 2006024 2006018: 84 00 a0 01 inc %g2 col = (col | 7) + 1; 200601c: 10 80 00 0c b 200604c 2006020: b8 17 20 07 or %i4, 7, %i4 } else if (iscntrl (c)) { 2006024: 9e 03 40 0f add %o5, %o7, %o7 2006028: de 0b e0 01 ldub [ %o7 + 1 ], %o7 200602c: 80 8b e0 20 btst 0x20, %o7 2006030: 22 80 00 08 be,a 2006050 <== ALWAYS TAKEN 2006034: b8 07 20 01 inc %i4 if (tty->termios.c_lflag & ECHOCTL) 2006038: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200603c: 32 80 00 05 bne,a 2006050 <== NOT EXECUTED 2006040: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2006044: 10 80 00 04 b 2006054 <== NOT EXECUTED 2006048: 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++; 200604c: b8 07 20 01 inc %i4 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2006050: 80 a0 80 03 cmp %g2, %g3 2006054: 32 bf ff ef bne,a 2006010 2006058: de 09 00 02 ldub [ %g4 + %g2 ], %o7 } /* * Back up over the tab */ while (tty->column > col) { 200605c: 10 80 00 09 b 2006080 2006060: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 rtems_termios_puts ("\b", 1, tty); 2006064: 92 10 20 01 mov 1, %o1 2006068: 7f ff ff 02 call 2005c70 200606c: 94 10 00 1d mov %i5, %o2 tty->column--; 2006070: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006074: 82 00 7f ff add %g1, -1, %g1 2006078: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } /* * Back up over the tab */ while (tty->column > col) { 200607c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006080: 80 a0 40 1c cmp %g1, %i4 2006084: 14 bf ff f8 bg 2006064 2006088: 90 10 00 18 mov %i0, %o0 if (tty->column) tty->column--; } } } if (!lineFlag) 200608c: 10 80 00 28 b 200612c 2006090: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006094: b8 07 20 01 inc %i4 2006098: c4 08 80 1c ldub [ %g2 + %i4 ], %g2 200609c: 80 88 a0 20 btst 0x20, %g2 20060a0: 22 80 00 10 be,a 20060e0 <== ALWAYS TAKEN 20060a4: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 20060a8: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20060ac: 02 80 00 0d be 20060e0 <== NOT EXECUTED 20060b0: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 20060b4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 20060b8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20060bc: 7f ff fe ed call 2005c70 <== NOT EXECUTED 20060c0: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 20060c4: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 20060c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20060cc: 22 80 00 05 be,a 20060e0 <== NOT EXECUTED 20060d0: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 <== NOT EXECUTED tty->column--; 20060d4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20060d8: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 20060dc: c2 06 e3 40 ld [ %i3 + 0x340 ], %g1 <== NOT EXECUTED 20060e0: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 20060e4: 80 88 60 20 btst 0x20, %g1 20060e8: 02 80 00 07 be 2006104 <== ALWAYS TAKEN 20060ec: 90 10 00 1a mov %i2, %o0 20060f0: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 20060f4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20060f8: 02 80 00 0d be 200612c <== NOT EXECUTED 20060fc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2006100: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2006104: 92 10 20 03 mov 3, %o1 2006108: 7f ff fe da call 2005c70 200610c: 94 10 00 1d mov %i5, %o2 if (tty->column) 2006110: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006114: 80 a0 60 00 cmp %g1, 0 2006118: 02 80 00 05 be 200612c <== NEVER TAKEN 200611c: 80 a6 60 00 cmp %i1, 0 tty->column--; 2006120: 82 00 7f ff add %g1, -1, %g1 2006124: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } } } if (!lineFlag) 2006128: 80 a6 60 00 cmp %i1, 0 200612c: 02 80 00 06 be 2006144 2006130: 01 00 00 00 nop echo ('\n', tty); return; } } while (tty->ccount) { 2006134: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 2006138: 80 a0 e0 00 cmp %g3, 0 200613c: 32 bf ff 9e bne,a 2005fb4 2006140: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 2006144: 81 c7 e0 08 ret 2006148: 81 e8 00 00 restore =============================================================================== 02004740 : size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr ) { 2004740: 9d e3 bf 98 save %sp, -104, %sp memset(ctx, 0, sizeof(*ctx)); 2004744: 92 10 20 00 clr %o1 2004748: 90 10 00 18 mov %i0, %o0 200474c: 40 00 2a ed call 200f300 2004750: 94 10 20 38 mov 0x38, %o2 ctx->path = path; 2004754: f2 26 00 00 st %i1, [ %i0 ] ctx->pathlen = pathlen; 2004758: 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) { 200475c: 80 a6 a0 00 cmp %i2, 0 2004760: 02 80 00 19 be 20047c4 2004764: f6 26 20 10 st %i3, [ %i0 + 0x10 ] char c = ctx->path [0]; 2004768: f6 0e 40 00 ldub [ %i1 ], %i3 ctx->rootloc = rtems_filesystem_global_location_obtain(global_root_ptr); 200476c: 40 00 01 79 call 2004d50 2004770: 90 10 00 1c mov %i4, %o0 gid_t node_gid ); static inline bool rtems_filesystem_is_delimiter(char c) { return c == '/' || c == '\\'; 2004774: 83 2e e0 18 sll %i3, 0x18, %g1 2004778: 83 38 60 18 sra %g1, 0x18, %g1 if (rtems_filesystem_is_delimiter(c)) { 200477c: 80 a0 60 5c cmp %g1, 0x5c 2004780: 02 80 00 05 be 2004794 <== NEVER TAKEN 2004784: d0 26 20 30 st %o0, [ %i0 + 0x30 ] 2004788: 80 a0 60 2f cmp %g1, 0x2f 200478c: 12 80 00 0a bne 20047b4 2004790: 90 10 00 1d mov %i5, %o0 ++ctx->path; 2004794: c2 06 00 00 ld [ %i0 ], %g1 --ctx->pathlen; ctx->startloc = rtems_filesystem_global_location_obtain( 2004798: 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; 200479c: 82 00 60 01 inc %g1 20047a0: c2 26 00 00 st %g1, [ %i0 ] --ctx->pathlen; 20047a4: c2 06 20 04 ld [ %i0 + 4 ], %g1 20047a8: 82 00 7f ff add %g1, -1, %g1 20047ac: 10 80 00 02 b 20047b4 20047b0: 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( 20047b4: 40 00 01 67 call 2004d50 20047b8: 01 00 00 00 nop 20047bc: 10 80 00 0d b 20047f0 20047c0: 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; 20047c4: c0 27 bf fc clr [ %fp + -4 ] return rtems_filesystem_global_location_obtain( &global_loc ); 20047c8: 40 00 01 62 call 2004d50 20047cc: 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; 20047d0: c0 27 bf fc clr [ %fp + -4 ] global_current_ptr ); } } else { ctx->rootloc = rtems_filesystem_global_location_obtain_null(); 20047d4: d0 26 20 30 st %o0, [ %i0 + 0x30 ] return rtems_filesystem_global_location_obtain( &global_loc ); 20047d8: 40 00 01 5e call 2004d50 20047dc: 90 07 bf fc add %fp, -4, %o0 ctx->startloc = rtems_filesystem_global_location_obtain_null(); errno = ENOENT; 20047e0: 40 00 28 3a call 200e8c8 <__errno> 20047e4: d0 26 20 34 st %o0, [ %i0 + 0x34 ] 20047e8: 82 10 20 02 mov 2, %g1 20047ec: 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; 20047f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20047f4: d0 00 60 14 ld [ %g1 + 0x14 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 20047f8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20047fc: c2 00 40 00 ld [ %g1 ], %g1 2004800: 9f c0 40 00 call %g1 2004804: 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( 2004808: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 200480c: 40 00 1d 20 call 200bc8c 2004810: 90 10 00 1d mov %i5, %o0 &ctx->currentloc, &ctx->startloc->location ); rtems_filesystem_eval_path_continue(ctx); 2004814: 90 10 00 18 mov %i0, %o0 2004818: 7f ff ff b0 call 20046d8 200481c: b0 10 00 1d mov %i5, %i0 return &ctx->currentloc; } 2004820: 81 c7 e0 08 ret 2004824: 81 e8 00 00 restore =============================================================================== 02012e6c : int fat_buf_access(fat_fs_info_t *fs_info, const uint32_t sec_num, const int op_type, uint8_t **sec_buf) { 2012e6c: 9d e3 bf a0 save %sp, -96, %sp static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012e70: c2 0e 20 02 ldub [ %i0 + 2 ], %g1 2012e74: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2 2012e78: 84 20 80 01 sub %g2, %g1, %g2 2012e7c: bb 36 40 02 srl %i1, %g2, %i5 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012e80: b9 2f 40 02 sll %i5, %g2, %i4 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 2012e84: b8 26 40 1c sub %i1, %i4, %i4 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 2012e88: b9 2f 00 01 sll %i4, %g1, %i4 sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info, sec_num, 0); if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 2012e8c: c2 0e 20 89 ldub [ %i0 + 0x89 ], %g1 2012e90: 80 a0 60 00 cmp %g1, 0 2012e94: 02 80 00 06 be 2012eac 2012e98: 01 00 00 00 nop 2012e9c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2012ea0: 80 a0 40 19 cmp %g1, %i1 2012ea4: 22 80 00 1c be,a 2012f14 2012ea8: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 { fat_buf_release(fs_info); 2012eac: 7f ff ff 7c call 2012c9c 2012eb0: 90 10 00 18 mov %i0, %o0 if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2012eb4: 92 10 00 1d mov %i5, %o1 if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) { fat_buf_release(fs_info); if (op_type == FAT_OP_TYPE_READ) 2012eb8: 80 a6 a0 01 cmp %i2, 1 2012ebc: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 2012ec0: 12 80 00 06 bne 2012ed8 2012ec4: 94 06 20 8c add %i0, 0x8c, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2012ec8: 7f ff f7 ae call 2010d80 2012ecc: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2012ed0: 10 80 00 05 b 2012ee4 2012ed4: 80 a2 20 00 cmp %o0, 0 fat_buf_release(fs_info); 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); 2012ed8: 7f ff f7 79 call 2010cbc 2012edc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2012ee0: 80 a2 20 00 cmp %o0, 0 2012ee4: 02 80 00 08 be 2012f04 <== ALWAYS TAKEN 2012ee8: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2012eec: 40 00 1e 47 call 201a808 <__errno> <== NOT EXECUTED 2012ef0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2012ef4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2012ef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012efc: 81 c7 e0 08 ret <== NOT EXECUTED 2012f00: 81 e8 00 00 restore <== NOT EXECUTED fs_info->c.blk_num = sec_num; 2012f04: f2 26 20 84 st %i1, [ %i0 + 0x84 ] fs_info->c.modified = 0; 2012f08: c0 2e 20 88 clrb [ %i0 + 0x88 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2012f0c: c2 2e 20 89 stb %g1, [ %i0 + 0x89 ] } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 2012f10: c2 06 20 8c ld [ %i0 + 0x8c ], %g1 2012f14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2012f18: b8 00 40 1c add %g1, %i4, %i4 2012f1c: f8 26 c0 00 st %i4, [ %i3 ] return RC_OK; } 2012f20: 81 c7 e0 08 ret 2012f24: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02012c9c : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012c9c: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) 2012ca0: c2 0e 20 89 ldub [ %i0 + 0x89 ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2012ca4: ba 10 00 18 mov %i0, %i5 rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) 2012ca8: 80 a0 60 00 cmp %g1, 0 2012cac: 02 80 00 6e be 2012e64 2012cb0: b0 10 20 00 clr %i0 return RC_OK; if (fs_info->c.modified) 2012cb4: c2 0f 60 88 ldub [ %i5 + 0x88 ], %g1 2012cb8: 80 a0 60 00 cmp %g1, 0 2012cbc: 02 80 00 5d be 2012e30 2012cc0: 01 00 00 00 nop { uint32_t sec_num = fs_info->c.blk_num; 2012cc4: c2 07 60 84 ld [ %i5 + 0x84 ], %g1 bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 2012cc8: c4 17 60 18 lduh [ %i5 + 0x18 ], %g2 2012ccc: 80 a0 40 02 cmp %g1, %g2 2012cd0: 0a 80 00 05 bcs 2012ce4 2012cd4: b8 10 20 00 clr %i4 2012cd8: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 2012cdc: 80 a0 40 02 cmp %g1, %g2 2012ce0: b8 40 20 00 addx %g0, 0, %i4 uint32_t ino ) { return (ino >= fs_info->uino_base); } 2012ce4: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) 2012ce8: 80 8f 20 ff btst 0xff, %i4 2012cec: 02 80 00 12 be 2012d34 2012cf0: c6 0f 60 0c ldub [ %i5 + 0xc ], %g3 2012cf4: c8 0f 60 54 ldub [ %i5 + 0x54 ], %g4 2012cf8: 80 a1 20 00 cmp %g4, 0 2012cfc: 12 80 00 0e bne 2012d34 <== NEVER TAKEN 2012d00: 84 08 a0 ff and %g2, 0xff, %g2 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, 2012d04: c8 07 60 8c ld [ %i5 + 0x8c ], %g4 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 2012d08: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 2012d0c: d2 01 20 1c ld [ %g4 + 0x1c ], %o1 2012d10: d4 17 40 00 lduh [ %i5 ], %o2 2012d14: 86 08 e0 ff and %g3, 0xff, %g3 2012d18: 86 20 c0 02 sub %g3, %g2, %g3 2012d1c: b7 30 40 03 srl %g1, %g3, %i3 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012d20: 87 2e c0 03 sll %i3, %g3, %g3 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 2012d24: 82 20 40 03 sub %g1, %g3, %g1 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 2012d28: 85 28 40 02 sll %g1, %g2, %g2 2012d2c: 40 00 21 76 call 201b304 2012d30: 92 02 40 02 add %o1, %g2, %o1 fs_info->c.buf->buffer + blk_ofs, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2012d34: 7f ff f8 c4 call 2011044 2012d38: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012d3c: 80 a2 20 00 cmp %o0, 0 2012d40: 12 80 00 41 bne 2012e44 <== NEVER TAKEN 2012d44: 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) 2012d48: 02 80 00 45 be 2012e5c 2012d4c: c0 2f 60 88 clrb [ %i5 + 0x88 ] 2012d50: c2 0f 60 54 ldub [ %i5 + 0x54 ], %g1 2012d54: 80 a0 60 00 cmp %g1, 0 2012d58: 22 80 00 2f be,a 2012e14 <== ALWAYS TAKEN 2012d5c: 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; 2012d60: 10 80 00 40 b 2012e60 <== NOT EXECUTED 2012d64: c0 2f 60 89 clrb [ %i5 + 0x89 ] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 2012d68: 7f ff be 3a call 2002650 <.umul> 2012d6c: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 2012d70: f6 07 60 84 ld [ %i5 + 0x84 ], %i3 static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012d74: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 2012d78: 90 02 00 1b add %o0, %i3, %o0 2012d7c: f6 0f 60 0c ldub [ %i5 + 0xc ], %i3 2012d80: b6 26 c0 01 sub %i3, %g1, %i3 2012d84: 93 32 00 1b srl %o0, %i3, %o1 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012d88: b7 2a 40 1b sll %o1, %i3, %i3 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 2012d8c: b6 22 00 1b sub %o0, %i3, %i3 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 2012d90: b7 2e c0 01 sll %i3, %g1, %i3 blk = fat_sector_num_to_block_num(fs_info, sec_num); blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (blk_ofs == 0 2012d94: 80 a6 e0 00 cmp %i3, 0 2012d98: 12 80 00 0b bne 2012dc4 2012d9c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 && fs_info->vol.bps == fs_info->vol.bytes_per_block) 2012da0: c4 17 40 00 lduh [ %i5 ], %g2 2012da4: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2012da8: 80 a0 80 01 cmp %g2, %g1 2012dac: 12 80 00 06 bne 2012dc4 2012db0: 01 00 00 00 nop { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 2012db4: 7f ff f7 c2 call 2010cbc 2012db8: 94 07 bf fc add %fp, -4, %o2 } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) 2012dbc: 10 80 00 05 b 2012dd0 2012dc0: 80 a2 20 00 cmp %o0, 0 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 2012dc4: 7f ff f7 ef call 2010d80 2012dc8: 94 07 bf fc add %fp, -4, %o2 } if ( sc != RTEMS_SUCCESSFUL) 2012dcc: 80 a2 20 00 cmp %o0, 0 2012dd0: 22 80 00 03 be,a 2012ddc <== ALWAYS TAKEN 2012dd4: c2 07 bf fc ld [ %fp + -4 ], %g1 2012dd8: 30 80 00 0b b,a 2012e04 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 2012ddc: d2 07 60 90 ld [ %i5 + 0x90 ], %o1 2012de0: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2012de4: d4 17 40 00 lduh [ %i5 ], %o2 2012de8: 40 00 21 47 call 201b304 2012dec: 90 02 00 1b add %o0, %i3, %o0 sc = rtems_bdbuf_release_modified(bd); 2012df0: 7f ff f8 95 call 2011044 2012df4: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2012df8: 80 a2 20 00 cmp %o0, 0 2012dfc: 22 80 00 06 be,a 2012e14 <== ALWAYS TAKEN 2012e00: b8 07 20 01 inc %i4 rtems_set_errno_and_return_minus_one(ENOMEM); 2012e04: 40 00 1e 81 call 201a808 <__errno> <== NOT EXECUTED 2012e08: 01 00 00 00 nop <== NOT EXECUTED 2012e0c: 10 80 00 11 b 2012e50 <== NOT EXECUTED 2012e10: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 2012e14: c2 0f 60 0d ldub [ %i5 + 0xd ], %g1 2012e18: 90 0f 20 ff and %i4, 0xff, %o0 2012e1c: 80 a2 00 01 cmp %o0, %g1 2012e20: 0a bf ff d2 bcs 2012d68 2012e24: 01 00 00 00 nop { 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; 2012e28: 10 80 00 0e b 2012e60 2012e2c: c0 2f 60 89 clrb [ %i5 + 0x89 ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2012e30: 7f ff f8 50 call 2010f70 2012e34: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 if (sc != RTEMS_SUCCESSFUL) 2012e38: 80 a2 20 00 cmp %o0, 0 2012e3c: 22 80 00 09 be,a 2012e60 <== ALWAYS TAKEN 2012e40: c0 2f 60 89 clrb [ %i5 + 0x89 ] rtems_set_errno_and_return_minus_one(EIO); 2012e44: 40 00 1e 71 call 201a808 <__errno> <== NOT EXECUTED 2012e48: 01 00 00 00 nop <== NOT EXECUTED 2012e4c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2012e50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012e54: 81 c7 e0 08 ret <== NOT EXECUTED 2012e58: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2012e5c: c0 2f 60 89 clrb [ %i5 + 0x89 ] return RC_OK; 2012e60: b0 10 20 00 clr %i0 } 2012e64: 81 c7 e0 08 ret 2012e68: 81 e8 00 00 restore =============================================================================== 02012c40 : fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2012c40: 80 a2 60 00 cmp %o1, 0 2012c44: 32 80 00 0c bne,a 2012c74 2012c48: c2 0a 20 0c ldub [ %o0 + 0xc ], %g1 2012c4c: c2 0a 20 0e ldub [ %o0 + 0xe ], %g1 2012c50: 80 88 60 03 btst 3, %g1 2012c54: 22 80 00 08 be,a 2012c74 <== NEVER TAKEN 2012c58: c2 0a 20 0c ldub [ %o0 + 0xc ], %g1 <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 2012c5c: c4 0a 20 0c ldub [ %o0 + 0xc ], %g2 2012c60: c2 0a 20 02 ldub [ %o0 + 2 ], %g1 2012c64: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 2012c68: 82 20 80 01 sub %g2, %g1, %g1 2012c6c: 81 c3 e0 08 retl 2012c70: 91 32 00 01 srl %o0, %g1, %o0 blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 2012c74: c4 0a 20 08 ldub [ %o0 + 8 ], %g2 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; 2012c78: 92 02 7f fe add %o1, -2, %o1 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 2012c7c: 84 20 80 01 sub %g2, %g1, %g2 2012c80: 93 2a 40 02 sll %o1, %g2, %o1 2012c84: c4 0a 20 02 ldub [ %o0 + 2 ], %g2 2012c88: d0 02 20 34 ld [ %o0 + 0x34 ], %o0 2012c8c: 82 20 40 02 sub %g1, %g2, %g1 2012c90: 91 32 00 01 srl %o0, %g1, %o0 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); } return blk; } 2012c94: 81 c3 e0 08 retl 2012c98: 90 02 00 09 add %o0, %o1, %o0 =============================================================================== 02011f9c : 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)) ) 2011f9c: 80 a2 60 00 cmp %o1, 0 2011fa0: 32 80 00 08 bne,a 2011fc0 2011fa4: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 2011fa8: c2 0a 20 0e ldub [ %o0 + 0xe ], %g1 2011fac: 80 88 60 03 btst 3, %g1 2011fb0: 22 80 00 04 be,a 2011fc0 <== NEVER TAKEN 2011fb4: c2 0a 20 05 ldub [ %o0 + 5 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2011fb8: 81 c3 e0 08 retl 2011fbc: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2011fc0: 92 02 7f fe add %o1, -2, %o1 2011fc4: 93 2a 40 01 sll %o1, %g1, %o1 2011fc8: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 fs_info->vol.data_fsec); } 2011fcc: 81 c3 e0 08 retl 2011fd0: 90 02 40 01 add %o1, %g1, %o0 =============================================================================== 02013040 : fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 2013040: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 2013044: c2 16 20 06 lduh [ %i0 + 6 ], %g1 2013048: 82 20 40 1a sub %g1, %i2, %g1 201304c: 80 a6 c0 01 cmp %i3, %g1 2013050: 38 80 00 02 bgu,a 2013058 <== NEVER TAKEN 2013054: b6 10 00 01 mov %g1, %i3 <== NOT EXECUTED uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 2013058: 90 10 00 18 mov %i0, %o0 201305c: 7f ff fe f9 call 2012c40 2013060: 92 10 00 19 mov %i1, %o1 uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 2013064: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; 2013068: a0 10 20 00 clr %l0 const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 201306c: a3 36 80 01 srl %i2, %g1, %l1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 2013070: 83 2c 40 01 sll %l1, %g1, %g1 2013074: a4 10 20 01 mov 1, %l2 2013078: b4 26 80 01 sub %i2, %g1, %i2 ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; 201307c: a2 02 00 11 add %o0, %l1, %l1 while ( (RC_OK == rc) 2013080: 10 80 00 2a b 2013128 2013084: 82 10 20 00 clr %g1 && (0 < bytes_to_write)) { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 2013088: 82 20 80 1a sub %g2, %i2, %g1 201308c: 80 a0 40 1b cmp %g1, %i3 2013090: 08 80 00 03 bleu 201309c <== ALWAYS TAKEN 2013094: ba 10 00 01 mov %g1, %i5 2013098: ba 10 00 1b mov %i3, %i5 <== NOT EXECUTED const uint32_t offset, const uint32_t count, const uint8_t pattern) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 201309c: 80 a7 40 01 cmp %i5, %g1 20130a0: 08 80 00 03 bleu 20130ac <== ALWAYS TAKEN 20130a4: b2 10 00 1d mov %i5, %i1 20130a8: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 20130ac: c2 0e 20 02 ldub [ %i0 + 2 ], %g1 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 20130b0: 80 a6 60 00 cmp %i1, 0 20130b4: 02 80 00 27 be 2013150 <== NEVER TAKEN 20130b8: d2 0e 20 0c ldub [ %i0 + 0xc ], %o1 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 20130bc: 92 22 40 01 sub %o1, %g1, %o1 { if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 20130c0: 90 10 00 18 mov %i0, %o0 20130c4: 93 2c 40 09 sll %l1, %o1, %o1 uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) { if (bytes_to_write == fs_info->vol.bytes_per_block) 20130c8: 80 a6 40 02 cmp %i1, %g2 20130cc: 02 80 00 03 be 20130d8 20130d0: 94 10 20 02 mov 2, %o2 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 20130d4: 94 10 20 01 mov 1, %o2 20130d8: 7f ff ff 65 call 2012e6c 20130dc: 96 07 bf fc add %fp, -4, %o3 if (RC_OK == rc) 20130e0: 80 a2 20 00 cmp %o0, 0 20130e4: 12 80 00 0a bne 201310c <== NEVER TAKEN 20130e8: 80 a7 40 08 cmp %i5, %o0 { memset(blk_buf + offset, pattern, bytes_to_write); 20130ec: d0 07 bf fc ld [ %fp + -4 ], %o0 20130f0: 92 10 00 1c mov %i4, %o1 20130f4: 90 02 00 1a add %o0, %i2, %o0 20130f8: 40 00 20 c0 call 201b3f8 20130fc: 94 10 00 19 mov %i1, %o2 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2013100: 10 80 00 14 b 2013150 2013104: e4 2e 20 88 stb %l2, [ %i0 + 0x88 ] fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 2013108: 80 a7 40 08 cmp %i5, %o0 201310c: 12 80 00 06 bne 2013124 <== NEVER TAKEN 2013110: 82 10 3f ff mov -1, %g1 rc = -1; else { bytes_to_write -= ret; 2013114: b6 26 c0 1d sub %i3, %i5, %i3 bytes_written += ret; 2013118: a0 04 00 1d add %l0, %i5, %l0 ++cur_blk; 201311c: a2 04 60 01 inc %l1 2013120: 82 10 20 00 clr %g1 2013124: b4 10 20 00 clr %i2 ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) 2013128: 80 a6 e0 00 cmp %i3, 0 201312c: 02 80 00 04 be 201313c 2013130: 80 a0 60 00 cmp %g1, 0 2013134: 22 bf ff d5 be,a 2013088 <== ALWAYS TAKEN 2013138: c4 16 20 0a lduh [ %i0 + 0xa ], %g2 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 201313c: 80 a0 60 00 cmp %g1, 0 2013140: 12 80 00 06 bne 2013158 <== NEVER TAKEN 2013144: b0 10 3f ff mov -1, %i0 2013148: 81 c7 e0 08 ret 201314c: 91 e8 00 10 restore %g0, %l0, %o0 } } if (RC_OK != rc) return rc; else return bytes_to_write; 2013150: 10 bf ff ee b 2013108 2013154: 90 10 00 19 mov %i1, %o0 } if (RC_OK != rc) return rc; else return bytes_written; } 2013158: 81 c7 e0 08 ret <== NOT EXECUTED 201315c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013160 : const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 2013160: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 2013164: c2 16 20 06 lduh [ %i0 + 6 ], %g1 2013168: 82 20 40 1a sub %g1, %i2, %g1 201316c: 80 a6 c0 01 cmp %i3, %g1 2013170: 38 80 00 02 bgu,a 2013178 <== NEVER TAKEN 2013174: b6 10 00 01 mov %g1, %i3 <== NOT EXECUTED uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 2013178: 90 10 00 18 mov %i0, %o0 201317c: 7f ff fe b1 call 2012c40 2013180: 92 10 00 19 mov %i1, %o1 uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 2013184: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; 2013188: a2 10 20 00 clr %l1 const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 201318c: a5 36 80 01 srl %i2, %g1, %l2 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 2013190: 83 2c 80 01 sll %l2, %g1, %g1 2013194: a6 10 20 01 mov 1, %l3 2013198: b4 26 80 01 sub %i2, %g1, %i2 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 201319c: a4 02 00 12 add %o0, %l2, %l2 while ( (RC_OK == rc) 20131a0: 10 80 00 2d b 2013254 20131a4: 82 10 20 00 clr %g1 && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 20131a8: 82 20 80 1a sub %g2, %i2, %g1 20131ac: 80 a0 40 1b cmp %g1, %i3 20131b0: 08 80 00 03 bleu 20131bc 20131b4: b2 10 00 01 mov %g1, %i1 20131b8: b2 10 00 1b mov %i3, %i1 const uint32_t count, const void *buf, const bool overwrite_block) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 20131bc: 80 a6 40 01 cmp %i1, %g1 20131c0: 08 80 00 03 bleu 20131cc <== ALWAYS TAKEN 20131c4: a0 10 00 19 mov %i1, %l0 20131c8: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 20131cc: c2 0e 20 02 ldub [ %i0 + 2 ], %g1 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 20131d0: 80 a4 20 00 cmp %l0, 0 20131d4: 02 80 00 2a be 201327c <== NEVER TAKEN 20131d8: d2 0e 20 0c ldub [ %i0 + 0xc ], %o1 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 20131dc: 92 22 40 01 sub %o1, %g1, %o1 { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 20131e0: 90 10 00 18 mov %i0, %o0 uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) { if ( overwrite_block 20131e4: 80 a7 60 00 cmp %i5, 0 20131e8: 12 80 00 05 bne 20131fc 20131ec: 93 2c 80 09 sll %l2, %o1, %o1 || (bytes_to_write == fs_info->vol.bytes_per_block)) 20131f0: 80 a4 00 02 cmp %l0, %g2 20131f4: 12 80 00 04 bne 2013204 20131f8: 94 10 20 01 mov 1, %o2 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 20131fc: 10 80 00 02 b 2013204 2013200: 94 10 20 02 mov 2, %o2 } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 2013204: 7f ff ff 1a call 2012e6c 2013208: 96 07 bf fc add %fp, -4, %o3 if (RC_OK == rc) 201320c: 80 a2 20 00 cmp %o0, 0 2013210: 12 80 00 0a bne 2013238 <== NEVER TAKEN 2013214: 80 a6 40 08 cmp %i1, %o0 { memcpy(blk_buf + offset, buf, bytes_to_write); 2013218: d0 07 bf fc ld [ %fp + -4 ], %o0 201321c: 92 07 00 11 add %i4, %l1, %o1 2013220: 90 02 00 1a add %o0, %i2, %o0 2013224: 40 00 20 38 call 201b304 2013228: 94 10 00 10 mov %l0, %o2 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 201322c: 10 80 00 14 b 201327c 2013230: e6 2e 20 88 stb %l3, [ %i0 + 0x88 ] cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 2013234: 80 a6 40 08 cmp %i1, %o0 2013238: 12 80 00 06 bne 2013250 <== NEVER TAKEN 201323c: 82 10 3f ff mov -1, %g1 rc = -1; else { bytes_to_write -= ret; 2013240: b6 26 c0 19 sub %i3, %i1, %i3 bytes_written += ret; 2013244: a2 04 40 19 add %l1, %i1, %l1 ++cur_blk; 2013248: a4 04 a0 01 inc %l2 201324c: 82 10 20 00 clr %g1 2013250: b4 10 20 00 clr %i2 ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) 2013254: 80 a6 e0 00 cmp %i3, 0 2013258: 02 80 00 04 be 2013268 201325c: 80 a0 60 00 cmp %g1, 0 2013260: 22 bf ff d2 be,a 20131a8 <== ALWAYS TAKEN 2013264: c4 16 20 0a lduh [ %i0 + 0xa ], %g2 bytes_written += ret; ++cur_blk; } ofs_blk = 0; } if (RC_OK != rc) 2013268: 80 a0 60 00 cmp %g1, 0 201326c: 12 80 00 06 bne 2013284 <== NEVER TAKEN 2013270: b0 10 3f ff mov -1, %i0 2013274: 81 c7 e0 08 ret 2013278: 91 e8 00 11 restore %g0, %l1, %o0 } } if (RC_OK != rc) return rc; else return bytes_to_write; 201327c: 10 bf ff ee b 2013234 2013280: 90 10 00 10 mov %l0, %o0 } if (RC_OK != rc) return rc; else return bytes_written; } 2013284: 81 c7 e0 08 ret <== NOT EXECUTED 2013288: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012508 : int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 2012508: 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) 201250c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2012510: 80 a0 60 01 cmp %g1, 1 2012514: 08 80 00 05 bleu 2012528 2012518: 82 00 7f ff add %g1, -1, %g1 { fat_fd->links_num--; return rc; 201251c: 90 10 20 00 clr %o0 2012520: 10 80 00 25 b 20125b4 2012524: 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) 2012528: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 201252c: 80 88 60 01 btst 1, %g1 2012530: 02 80 00 14 be 2012580 2012534: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(fs_info, fat_fd, 0); 2012538: 92 10 00 19 mov %i1, %o1 201253c: 7f ff ff ae call 20123f4 2012540: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2012544: 80 a2 20 00 cmp %o0, 0 2012548: 12 80 00 1b bne 20125b4 <== NEVER TAKEN 201254c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2012550: 40 00 0c bc call 2015840 <_Chain_Extract> 2012554: 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) ) 2012558: d2 06 60 0c ld [ %i1 + 0xc ], %o1 201255c: 40 00 06 01 call 2013d60 2012560: 90 10 00 18 mov %i0, %o0 2012564: 80 8a 20 ff btst 0xff, %o0 2012568: 02 80 00 0f be 20125a4 <== ALWAYS TAKEN 201256c: 01 00 00 00 nop fat_free_unique_ino(fs_info, fat_fd->ino); 2012570: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2012574: 40 00 05 f0 call 2013d34 <== NOT EXECUTED 2012578: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201257c: 30 80 00 0a b,a 20125a4 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 2012580: 40 00 05 f8 call 2013d60 2012584: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2012588: 80 8a 20 ff btst 0xff, %o0 201258c: 02 80 00 04 be 201259c <== ALWAYS TAKEN 2012590: 01 00 00 00 nop { fat_fd->links_num = 0; 2012594: 10 80 00 06 b 20125ac <== NOT EXECUTED 2012598: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 201259c: 40 00 0c a9 call 2015840 <_Chain_Extract> 20125a0: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20125a4: 7f ff cb 6c call 2005354 20125a8: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20125ac: 40 00 01 bc call 2012c9c 20125b0: 81 e8 00 00 restore return rc; } 20125b4: 81 c7 e0 08 ret 20125b8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0201268c : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 201268c: 9d e3 bf 90 save %sp, -112, %sp uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; 2012690: f6 27 00 00 st %i3, [ %i4 ] if (new_length <= fat_fd->fat_file_size) 2012694: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t new_length, uint32_t *a_length ) { int rc = RC_OK; uint32_t chain = 0; 2012698: 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; 201269c: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 20126a0: 80 a6 c0 01 cmp %i3, %g1 20126a4: 18 80 00 04 bgu 20126b4 20126a8: ba 10 00 18 mov %i0, %i5 return RC_OK; 20126ac: 81 c7 e0 08 ret 20126b0: 91 e8 20 00 restore %g0, 0, %o0 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20126b4: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 20126b8: 80 a0 a0 01 cmp %g2, 1 20126bc: 32 80 00 0b bne,a 20126e8 20126c0: e0 17 60 06 lduh [ %i5 + 6 ], %l0 20126c4: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 20126c8: 80 a0 a0 00 cmp %g2, 0 20126cc: 32 80 00 07 bne,a 20126e8 <== NEVER TAKEN 20126d0: e0 17 60 06 lduh [ %i5 + 6 ], %l0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20126d4: c4 0e 20 0e ldub [ %i0 + 0xe ], %g2 *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20126d8: 80 88 a0 03 btst 3, %g2 20126dc: 22 80 00 03 be,a 20126e8 <== NEVER TAKEN 20126e0: e0 17 60 06 lduh [ %i5 + 6 ], %l0 <== NOT EXECUTED 20126e4: 30 80 00 34 b,a 20127b4 (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))) & 20126e8: 84 04 3f ff add %l0, -1, %g2 20126ec: 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 - 20126f0: a0 24 00 12 sub %l0, %l2, %l0 20126f4: 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; 20126f8: 84 26 c0 01 sub %i3, %g1, %g2 if (bytes2add > bytes_remain) 20126fc: 80 a0 80 10 cmp %g2, %l0 2012700: 08 80 00 03 bleu 201270c 2012704: a2 10 20 00 clr %l1 bytes2add -= bytes_remain; 2012708: a2 20 80 10 sub %g2, %l0, %l1 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { 201270c: 80 a4 20 00 cmp %l0, 0 2012710: 02 80 00 17 be 201276c 2012714: 80 a4 60 00 cmp %l1, 0 2012718: 80 a6 a0 00 cmp %i2, 0 201271c: 02 80 00 14 be 201276c 2012720: 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; 2012724: d4 0f 60 08 ldub [ %i5 + 8 ], %o2 uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 2012728: 90 10 00 1d mov %i5, %o0 201272c: 92 10 00 19 mov %i1, %o1 2012730: 95 30 40 0a srl %g1, %o2, %o2 2012734: 7f ff fe 39 call 2012018 2012738: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 201273c: b0 92 60 00 orcc %o1, 0, %i0 2012740: 12 80 00 21 bne 20127c4 <== NEVER TAKEN 2012744: d2 07 bf fc ld [ %fp + -4 ], %o1 return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 2012748: 90 10 00 1d mov %i5, %o0 201274c: 94 10 00 12 mov %l2, %o2 2012750: 96 10 00 10 mov %l0, %o3 2012754: 98 10 20 00 clr %o4 2012758: 40 00 02 3a call 2013040 201275c: b0 10 3f ff mov -1, %i0 if (bytes_remain != bytes_written) 2012760: 80 a4 00 08 cmp %l0, %o0 2012764: 12 80 00 18 bne 20127c4 <== NEVER TAKEN 2012768: 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) 201276c: 02 bf ff d0 be 20126ac 2012770: a4 04 7f ff add %l1, -1, %l2 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2012774: c2 0f 60 08 ldub [ %i5 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 2012778: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 201277c: a5 34 80 01 srl %l2, %g1, %l2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 2012780: 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; 2012784: a4 04 a0 01 inc %l2 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 2012788: 96 07 bf fc add %fp, -4, %o3 201278c: 94 10 00 12 mov %l2, %o2 2012790: 98 07 bf f8 add %fp, -8, %o4 2012794: 40 00 1a 72 call 201915c 2012798: 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) 201279c: b0 92 20 00 orcc %o0, 0, %i0 20127a0: 12 80 00 09 bne 20127c4 <== NEVER TAKEN 20127a4: 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)) 20127a8: 80 94 00 01 orcc %l0, %g1, %g0 20127ac: 12 80 00 08 bne 20127cc <== ALWAYS TAKEN 20127b0: 80 a4 80 01 cmp %l2, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 20127b4: 40 00 20 15 call 201a808 <__errno> 20127b8: b0 10 3f ff mov -1, %i0 20127bc: 82 10 20 1c mov 0x1c, %g1 20127c0: c2 22 00 00 st %g1, [ %o0 ] 20127c4: 81 c7 e0 08 ret 20127c8: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20127cc: 02 80 00 09 be 20127f0 <== ALWAYS TAKEN 20127d0: 82 24 80 01 sub %l2, %g1, %g1 { new_length -= bytes2add & (fs_info->vol.bpc - 1); 20127d4: c4 17 60 06 lduh [ %i5 + 6 ], %g2 <== NOT EXECUTED 20127d8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 20127dc: a2 0c 40 02 and %l1, %g2, %l1 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 20127e0: 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); 20127e4: b6 26 c0 11 sub %i3, %l1, %i3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 20127e8: 83 28 40 02 sll %g1, %g2, %g1 <== NOT EXECUTED 20127ec: 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 ) 20127f0: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20127f4: 80 a2 e0 00 cmp %o3, 0 20127f8: 32 80 00 07 bne,a 2012814 20127fc: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 2012800: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 2012804: 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; 2012808: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 201280c: 10 80 00 1d b 2012880 2012810: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2012814: 80 a0 7f ff cmp %g1, -1 2012818: 22 80 00 04 be,a 2012828 <== NEVER TAKEN 201281c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 2012820: 10 80 00 0c b 2012850 2012824: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 2012828: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 201282c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2012830: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2012834: 7f ff ff 62 call 20125bc <== NOT EXECUTED 2012838: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 201283c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2012840: 02 80 00 05 be 2012854 <== NOT EXECUTED 2012844: 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); 2012848: 10 80 00 1f b 20128c4 <== NOT EXECUTED 201284c: 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); 2012850: d2 07 bf f4 ld [ %fp + -12 ], %o1 2012854: d4 07 bf f0 ld [ %fp + -16 ], %o2 2012858: 40 00 19 71 call 2018e1c 201285c: 90 10 00 1d mov %i5, %o0 2012860: b4 10 00 08 mov %o0, %i2 if ( rc != RC_OK ) 2012864: 80 a6 a0 00 cmp %i2, 0 2012868: 02 80 00 04 be 2012878 <== ALWAYS TAKEN 201286c: 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); 2012870: 10 80 00 16 b 20128c8 <== NOT EXECUTED 2012874: 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); 2012878: 40 00 01 09 call 2012c9c 201287c: 01 00 00 00 nop } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2012880: c2 07 bf fc ld [ %fp + -4 ], %g1 2012884: 80 a0 60 00 cmp %g1, 0 2012888: 22 80 00 14 be,a 20128d8 <== NEVER TAKEN 201288c: f6 27 00 00 st %i3, [ %i4 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2012890: c2 07 bf f8 ld [ %fp + -8 ], %g1 2012894: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2012898: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 201289c: 80 a0 60 00 cmp %g1, 0 20128a0: 32 80 00 0e bne,a 20128d8 20128a4: f6 27 00 00 st %i3, [ %i4 ] { rc = fat_init_clusters_chain(fs_info, chain); 20128a8: d2 07 bf f0 ld [ %fp + -16 ], %o1 20128ac: 40 00 04 d4 call 2013bfc 20128b0: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20128b4: b4 92 20 00 orcc %o0, 0, %i2 20128b8: 22 80 00 08 be,a 20128d8 <== ALWAYS TAKEN 20128bc: f6 27 00 00 st %i3, [ %i4 ] { fat_free_fat_clusters_chain(fs_info, chain); 20128c0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20128c4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20128c8: 40 00 19 f6 call 20190a0 <== NOT EXECUTED 20128cc: b0 10 00 1a mov %i2, %i0 <== NOT EXECUTED 20128d0: 81 c7 e0 08 ret <== NOT EXECUTED 20128d4: 81 e8 00 00 restore <== NOT EXECUTED } } } *a_length = new_length; fat_fd->fat_file_size = new_length; 20128d8: f6 26 60 18 st %i3, [ %i1 + 0x18 ] return RC_OK; } 20128dc: 81 c7 e0 08 ret 20128e0: 81 e8 00 00 restore =============================================================================== 020125bc : fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 20125bc: 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); 20125c0: 82 07 a0 50 add %fp, 0x50, %g1 20125c4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20125c8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20125cc: 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; 20125d0: c0 27 bf f8 clr [ %fp + -8 ] uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 20125d4: 80 a6 a0 01 cmp %i2, 1 20125d8: 12 80 00 26 bne 2012670 <== NEVER TAKEN 20125dc: c2 27 bf fc st %g1, [ %fp + -4 ] { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 20125e0: 82 07 a0 58 add %fp, 0x58, %g1 20125e4: c2 27 bf fc st %g1, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 20125e8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20125ec: 80 a6 c0 01 cmp %i3, %g1 20125f0: 0a 80 00 06 bcs 2012608 <== ALWAYS TAKEN 20125f4: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 20125f8: 40 00 20 84 call 201a808 <__errno> <== NOT EXECUTED 20125fc: 01 00 00 00 nop <== NOT EXECUTED 2012600: 10 80 00 1f b 201267c <== NOT EXECUTED 2012604: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012608: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 201260c: 80 a0 60 01 cmp %g1, 1 2012610: 32 80 00 0d bne,a 2012644 2012614: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 2012618: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 201261c: 80 a0 60 00 cmp %g1, 0 2012620: 32 80 00 09 bne,a 2012644 <== NEVER TAKEN 2012624: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012628: c2 0e 20 0e ldub [ %i0 + 0xe ], %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)) && 201262c: 80 88 60 03 btst 3, %g1 2012630: 22 80 00 05 be,a 2012644 2012634: d4 0e 20 08 ldub [ %i0 + 8 ], %o2 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 2012638: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 201263c: 81 c7 e0 08 ret 2012640: 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); 2012644: 90 10 00 18 mov %i0, %o0 2012648: 92 10 00 19 mov %i1, %o1 201264c: 95 36 c0 0a srl %i3, %o2, %o2 2012650: 7f ff fe 72 call 2012018 2012654: 96 07 bf f8 add %fp, -8, %o3 if ( rc != RC_OK ) 2012658: b0 92 60 00 orcc %o1, 0, %i0 201265c: 12 80 00 03 bne 2012668 <== NEVER TAKEN 2012660: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; 2012664: c2 27 40 00 st %g1, [ %i5 ] break; 2012668: 81 c7 e0 08 ret 201266c: 81 e8 00 00 restore default: errno = EINVAL; 2012670: 40 00 20 66 call 201a808 <__errno> <== NOT EXECUTED 2012674: 01 00 00 00 nop <== NOT EXECUTED 2012678: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 201267c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 2012680: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED break; } va_end(ap); return rc; } 2012684: 81 c7 e0 08 ret <== NOT EXECUTED 2012688: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012018 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2012018: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 201201c: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 2012020: 80 a6 80 01 cmp %i2, %g1 2012024: 12 80 00 05 bne 2012038 2012028: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 201202c: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2012030: 10 80 00 1b b 201209c 2012034: 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) 2012038: 28 80 00 06 bleu,a 2012050 201203c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 { cur_cln = fat_fd->map.disk_cln; 2012040: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 count = file_cln - fat_fd->map.file_cln; 2012044: 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; 2012048: 10 80 00 04 b 2012058 201204c: c4 27 bf fc st %g2, [ %fp + -4 ] count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2012050: b8 10 00 1a mov %i2, %i4 2012054: c2 27 bf fc st %g1, [ %fp + -4 ] count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2012058: 10 80 00 0b b 2012084 201205c: ba 10 20 00 clr %i5 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2012060: 90 10 00 18 mov %i0, %o0 2012064: 40 00 1a fc call 2018c54 2012068: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 201206c: 80 a2 20 00 cmp %o0, 0 2012070: 22 80 00 05 be,a 2012084 <== ALWAYS TAKEN 2012074: ba 07 60 01 inc %i5 return rc; 2012078: 86 10 00 08 mov %o0, %g3 <== NOT EXECUTED 201207c: 10 80 00 0a b 20120a4 <== NOT EXECUTED 2012080: 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++) 2012084: 80 a7 40 1c cmp %i5, %i4 2012088: 12 bf ff f6 bne 2012060 201208c: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2012090: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.disk_cln = cur_cln; 2012094: d2 26 60 38 st %o1, [ %i1 + 0x38 ] *disk_cln = cur_cln; 2012098: d2 26 c0 00 st %o1, [ %i3 ] } return RC_OK; 201209c: 84 10 20 00 clr %g2 20120a0: 86 10 20 00 clr %g3 } 20120a4: b0 10 00 02 mov %g2, %i0 20120a8: 81 c7 e0 08 ret 20120ac: 93 e8 00 03 restore %g0, %g3, %o1 =============================================================================== 020120b0 : fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 20120b0: 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); 20120b4: 90 10 00 18 mov %i0, %o0 20120b8: 7f ff ff c7 call 2011fd4 20120bc: 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; 20120c0: 82 0a 20 01 and %o0, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 20120c4: 85 28 60 02 sll %g1, 2, %g2 20120c8: b7 28 60 04 sll %g1, 4, %i3 20120cc: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 20120d0: 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); 20120d4: 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); 20120d8: 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; 20120dc: 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 )); 20120e0: 10 80 00 0c b 2012110 20120e4: 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); 20120e8: 7f ff ff bb call 2011fd4 20120ec: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 20120f0: 80 a7 00 08 cmp %i4, %o0 20120f4: 32 80 00 07 bne,a 2012110 20120f8: 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++; 20120fc: 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; 2012100: fa 26 80 00 st %i5, [ %i2 ] lfat_fd->links_num++; 2012104: 82 00 60 01 inc %g1 2012108: 10 80 00 42 b 2012210 201210c: 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) ; ) 2012110: 80 a7 40 10 cmp %i5, %l0 2012114: 12 bf ff f5 bne 20120e8 2012118: 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); 201211c: 10 80 00 3f b 2012218 2012120: c2 06 20 70 ld [ %i0 + 0x70 ], %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); 2012124: 7f ff ff ac call 2011fd4 <== NOT EXECUTED 2012128: 92 07 60 20 add %i5, 0x20, %o1 <== NOT EXECUTED if ( (key1) == ck) 201212c: 80 a7 00 08 cmp %i4, %o0 <== NOT EXECUTED 2012130: 32 80 00 0a bne,a 2012158 <== NOT EXECUTED 2012134: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2012138: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 201213c: 22 80 00 0b be,a 2012168 <== NOT EXECUTED 2012140: a0 10 20 00 clr %l0 <== NOT EXECUTED 2012144: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2012148: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED 201214c: 22 80 00 07 be,a 2012168 <== NOT EXECUTED 2012150: a0 10 20 00 clr %l0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2012154: 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) ; ) 2012158: 80 a7 40 10 cmp %i5, %l0 201215c: 12 bf ff f2 bne 2012124 <== NEVER TAKEN 2012160: 90 10 00 18 mov %i0, %o0 2012164: 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)); 2012168: 7f ff cd c5 call 200587c 201216c: 90 10 20 44 mov 0x44, %o0 2012170: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 2012174: 80 a2 20 00 cmp %o0, 0 2012178: 02 80 00 1c be 20121e8 <== NEVER TAKEN 201217c: ba 10 00 08 mov %o0, %i5 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2012180: 92 10 20 00 clr %o1 2012184: 40 00 24 9d call 201b3f8 2012188: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 201218c: 82 10 20 01 mov 1, %g1 2012190: c2 27 60 08 st %g1, [ %i5 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2012194: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2012198: 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; 201219c: 82 08 7f fe and %g1, -2, %g1 20121a0: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 20121a4: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 20121a8: 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; 20121ac: c2 27 60 3c st %g1, [ %i5 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 20121b0: 40 00 24 55 call 201b304 20121b4: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 20121b8: 80 a4 20 00 cmp %l0, 0 20121bc: 02 80 00 04 be 20121cc <== NEVER TAKEN 20121c0: 01 00 00 00 nop lfat_fd->ino = key; 20121c4: 10 80 00 0f b 2012200 20121c8: f8 27 60 0c st %i4, [ %i5 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(fs_info); 20121cc: 40 00 06 aa call 2013c74 <== NOT EXECUTED 20121d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 20121d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20121d8: 12 80 00 0a bne 2012200 <== NOT EXECUTED 20121dc: d0 27 60 0c st %o0, [ %i5 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 20121e0: 7f ff cc 5d call 2005354 <== NOT EXECUTED 20121e4: 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 ); 20121e8: 40 00 21 88 call 201a808 <__errno> <== NOT EXECUTED 20121ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20121f0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 20121f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20121f8: 81 c7 e0 08 ret <== NOT EXECUTED 20121fc: 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); 2012200: d0 06 20 6c ld [ %i0 + 0x6c ], %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2012204: 92 10 00 1d mov %i5, %o1 2012208: 7f ff e0 4d call 200a33c <_Chain_Append> 201220c: 90 02 00 1b add %o0, %i3, %o0 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2012210: 81 c7 e0 08 ret 2012214: 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); 2012218: 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; 201221c: 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 )); 2012220: 10 bf ff ce b 2012158 2012224: a0 04 20 04 add %l0, 4, %l0 =============================================================================== 0201223c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 201223c: 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; 2012240: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2012244: 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) 2012248: 80 a6 e0 00 cmp %i3, 0 201224c: 02 80 00 68 be 20123ec <== NEVER TAKEN 2012250: 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 ) 2012254: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2012258: 80 a6 80 01 cmp %i2, %g1 201225c: 1a 80 00 64 bcc 20123ec 2012260: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2012264: 38 80 00 07 bgu,a 2012280 <== NEVER TAKEN 2012268: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 201226c: 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) || 2012270: 80 a6 80 02 cmp %i2, %g2 2012274: 28 80 00 04 bleu,a 2012284 2012278: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 201227c: b6 20 40 1a sub %g1, %i2, %i3 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2012280: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012284: 80 a0 60 01 cmp %g1, 1 2012288: 32 80 00 1c bne,a 20122f8 201228c: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 2012290: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012294: 80 a0 60 00 cmp %g1, 0 2012298: 32 80 00 18 bne,a 20122f8 <== NEVER TAKEN 201229c: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20122a0: c2 0f 60 0e ldub [ %i5 + 0xe ], %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)) && 20122a4: 80 88 60 03 btst 3, %g1 20122a8: 22 80 00 14 be,a 20122f8 20122ac: e4 0f 60 08 ldub [ %i5 + 8 ], %l2 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 20122b0: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 20122b4: 7f ff ff 3a call 2011f9c 20122b8: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 20122bc: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20122c0: 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); 20122c4: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20122c8: 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); 20122cc: 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); 20122d0: 94 0e 80 0a and %i2, %o2, %o2 20122d4: 90 10 00 1d mov %i5, %o0 20122d8: 96 10 00 1b mov %i3, %o3 20122dc: 40 00 03 13 call 2012f28 <_fat_block_read> 20122e0: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20122e4: 80 a2 20 00 cmp %o0, 0 20122e8: 16 80 00 41 bge 20123ec <== ALWAYS TAKEN 20122ec: 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; 20122f0: 10 80 00 3f b 20123ec <== NOT EXECUTED 20122f4: 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); 20122f8: f0 17 60 06 lduh [ %i5 + 6 ], %i0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20122fc: 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); 2012300: a6 07 bf fc add %fp, -4, %l3 2012304: 90 10 00 1d mov %i5, %o0 2012308: 92 10 00 19 mov %i1, %o1 201230c: 94 10 00 12 mov %l2, %o2 2012310: 7f ff ff 42 call 2012018 2012314: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2012318: 90 92 60 00 orcc %o1, 0, %o0 201231c: 12 80 00 34 bne 20123ec <== NEVER TAKEN 2012320: 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); 2012324: b1 2e 20 10 sll %i0, 0x10, %i0 2012328: b1 36 20 10 srl %i0, 0x10, %i0 201232c: b0 06 3f ff add %i0, -1, %i0 2012330: b4 0e 80 18 and %i2, %i0, %i2 2012334: b0 10 20 00 clr %i0 2012338: 10 80 00 20 b 20123b8 201233c: a2 10 00 1a mov %i2, %l1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2012340: a0 24 00 11 sub %l0, %l1, %l0 2012344: 80 a4 00 1b cmp %l0, %i3 2012348: 38 80 00 02 bgu,a 2012350 201234c: a0 10 00 1b mov %i3, %l0 sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 2012350: d2 07 bf fc ld [ %fp + -4 ], %o1 2012354: 7f ff ff 12 call 2011f9c 2012358: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 201235c: d2 0f 60 02 ldub [ %i5 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2012360: 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); 2012364: 93 34 40 09 srl %l1, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2012368: 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); 201236c: 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); 2012370: 94 0c 40 0a and %l1, %o2, %o2 2012374: 90 10 00 1d mov %i5, %o0 2012378: 96 10 00 10 mov %l0, %o3 201237c: 40 00 02 eb call 2012f28 <_fat_block_read> 2012380: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2012384: 80 a2 20 00 cmp %o0, 0 2012388: 06 80 00 18 bl 20123e8 <== NEVER TAKEN 201238c: b6 26 c0 10 sub %i3, %l0, %i3 return -1; count -= c; cmpltd += c; 2012390: b0 06 00 10 add %i0, %l0, %i0 save_cln = cur_cln; 2012394: e0 07 bf fc ld [ %fp + -4 ], %l0 rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2012398: 90 10 00 1d mov %i5, %o0 201239c: 92 10 00 10 mov %l0, %o1 20123a0: 94 10 00 13 mov %l3, %o2 20123a4: 40 00 1a 2c call 2018c54 20123a8: a2 10 20 00 clr %l1 if ( rc != RC_OK ) 20123ac: 80 a2 20 00 cmp %o0, 0 20123b0: 12 80 00 0f bne 20123ec <== NEVER TAKEN 20123b4: 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) 20123b8: 80 a6 e0 00 cmp %i3, 0 20123bc: 32 bf ff e1 bne,a 2012340 20123c0: 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); 20123c4: c2 0f 60 08 ldub [ %i5 + 8 ], %g1 20123c8: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20123cc: 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); 20123d0: b4 06 80 18 add %i2, %i0, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 20123d4: 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); 20123d8: 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 + 20123dc: a4 06 80 12 add %i2, %l2, %l2 20123e0: 10 80 00 03 b 20123ec 20123e4: 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; 20123e8: 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; } 20123ec: 81 c7 e0 08 ret 20123f0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02012b64 : int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 2012b64: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 2012b68: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 2012b6c: 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)) && 2012b70: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2012b74: 80 a0 60 01 cmp %g1, 1 2012b78: 12 80 00 0d bne 2012bac 2012b7c: ba 10 00 18 mov %i0, %i5 2012b80: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2012b84: 80 a0 60 00 cmp %g1, 0 2012b88: 32 80 00 0a bne,a 2012bb0 <== NEVER TAKEN 2012b8c: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2012b90: c2 0e 20 0e ldub [ %i0 + 0xe ], %g1 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)) && 2012b94: 80 88 60 03 btst 3, %g1 2012b98: 22 80 00 06 be,a 2012bb0 <== ALWAYS TAKEN 2012b9c: c0 26 60 18 clr [ %i1 + 0x18 ] (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2012ba0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED 2012ba4: 10 80 00 18 b 2012c04 <== NOT EXECUTED 2012ba8: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2012bac: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2012bb0: 10 80 00 0d b 2012be4 2012bb4: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2012bb8: 92 10 00 1c mov %i4, %o1 2012bbc: 40 00 18 26 call 2018c54 2012bc0: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2012bc4: b0 92 20 00 orcc %o0, 0, %i0 2012bc8: 12 80 00 10 bne 2012c08 <== NEVER TAKEN 2012bcc: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2012bd0: c2 17 60 06 lduh [ %i5 + 6 ], %g1 2012bd4: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 2012bd8: 82 00 80 01 add %g2, %g1, %g1 2012bdc: 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; 2012be0: 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) 2012be4: f8 07 bf fc ld [ %fp + -4 ], %i4 2012be8: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 2012bec: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 2012bf0: 86 0f 00 03 and %i4, %g3, %g3 2012bf4: 80 a0 c0 02 cmp %g3, %g2 2012bf8: 0a bf ff f0 bcs 2012bb8 2012bfc: 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; 2012c00: c2 26 60 3c st %g1, [ %i1 + 0x3c ] 2012c04: b0 10 20 00 clr %i0 return rc; } 2012c08: 81 c7 e0 08 ret 2012c0c: 81 e8 00 00 restore =============================================================================== 020123f4 : fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 20123f4: 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; 20123f8: 82 10 3f ff mov -1, %g1 20123fc: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2012400: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2012404: 80 a6 80 01 cmp %i2, %g1 2012408: 0a 80 00 04 bcs 2012418 201240c: c0 27 bf f8 clr [ %fp + -8 ] return rc; 2012410: 10 80 00 3b b 20124fc 2012414: 92 10 20 00 clr %o1 assert(fat_fd->fat_file_size); 2012418: 80 a0 60 00 cmp %g1, 0 201241c: 32 80 00 0a bne,a 2012444 <== ALWAYS TAKEN 2012420: c4 0e 20 08 ldub [ %i0 + 8 ], %g2 2012424: 11 00 80 a9 sethi %hi(0x202a400), %o0 <== NOT EXECUTED 2012428: 15 00 80 a9 sethi %hi(0x202a400), %o2 <== NOT EXECUTED 201242c: 17 00 80 a9 sethi %hi(0x202a400), %o3 <== NOT EXECUTED 2012430: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 2012434: 92 10 22 d1 mov 0x2d1, %o1 <== NOT EXECUTED 2012438: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 201243c: 40 00 08 61 call 20145c0 <__assert_func> <== NOT EXECUTED 2012440: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2012444: c6 16 20 06 lduh [ %i0 + 6 ], %g3 2012448: 86 00 ff ff add %g3, -1, %g3 201244c: b4 00 c0 1a add %g3, %i2, %i2 2012450: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2012454: 85 2e 80 02 sll %i2, %g2, %g2 2012458: 80 a0 80 01 cmp %g2, %g1 201245c: 1a bf ff ed bcc 2012410 2012460: 80 a6 a0 00 cmp %i2, 0 return RC_OK; if (cl_start != 0) 2012464: 12 80 00 0b bne 2012490 2012468: 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); 201246c: 92 10 00 19 mov %i1, %o1 2012470: 94 10 00 1a mov %i2, %o2 2012474: 7f ff fe e9 call 2012018 2012478: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 201247c: 80 a2 60 00 cmp %o1, 0 2012480: 32 80 00 20 bne,a 2012500 <== NEVER TAKEN 2012484: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 2012488: 10 80 00 0b b 20124b4 201248c: 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); 2012490: 92 10 00 19 mov %i1, %o1 2012494: 94 06 bf ff add %i2, -1, %o2 2012498: 7f ff fe e0 call 2012018 201249c: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 20124a0: 80 a2 60 00 cmp %o1, 0 20124a4: 02 bf ff f2 be 201246c <== ALWAYS TAKEN 20124a8: 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; } 20124ac: 81 c7 e0 08 ret <== NOT EXECUTED 20124b0: 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); 20124b4: 40 00 1a fb call 20190a0 20124b8: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 20124bc: 92 92 20 00 orcc %o0, 0, %o1 20124c0: 12 80 00 0f bne 20124fc <== NEVER TAKEN 20124c4: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20124c8: 02 80 00 0d be 20124fc 20124cc: 92 10 20 00 clr %o1 { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 20124d0: d2 07 bf fc ld [ %fp + -4 ], %o1 20124d4: 90 10 00 18 mov %i0, %o0 20124d8: 40 00 1a 51 call 2018e1c 20124dc: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 20124e0: 92 92 20 00 orcc %o0, 0, %o1 20124e4: 12 80 00 06 bne 20124fc <== NEVER TAKEN 20124e8: c2 07 bf fc ld [ %fp + -4 ], %g1 return rc; fat_fd->map.file_cln = cl_start - 1; 20124ec: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = new_last_cln; 20124f0: 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; 20124f4: f4 26 60 34 st %i2, [ %i1 + 0x34 ] fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 20124f8: c2 26 60 3c st %g1, [ %i1 + 0x3c ] } return RC_OK; } 20124fc: b0 10 00 09 mov %o1, %i0 2012500: 81 c7 e0 08 ret 2012504: 81 e8 00 00 restore =============================================================================== 020128e4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20128e4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; 20128e8: c0 27 bf f8 clr [ %fp + -8 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20128ec: a0 10 00 18 mov %i0, %l0 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 20128f0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t file_cln_initial = fat_fd->map.file_cln; 20128f4: e6 06 60 34 ld [ %i1 + 0x34 ], %l3 uint32_t cln; if ( count == 0 ) 20128f8: 80 a6 e0 00 cmp %i3, 0 20128fc: 02 80 00 84 be 2012b0c <== NEVER TAKEN 2012900: 90 10 20 00 clr %o0 return cmpltd; if (start >= fat_fd->size_limit) 2012904: fa 06 60 14 ld [ %i1 + 0x14 ], %i5 2012908: 80 a6 80 1d cmp %i2, %i5 201290c: 2a 80 00 07 bcs,a 2012928 <== ALWAYS TAKEN 2012910: ba 27 40 1a sub %i5, %i2, %i5 rtems_set_errno_and_return_minus_one(EFBIG); 2012914: 40 00 1f bd call 201a808 <__errno> <== NOT EXECUTED 2012918: 01 00 00 00 nop <== NOT EXECUTED 201291c: 82 10 20 1b mov 0x1b, %g1 ! 1b <== NOT EXECUTED 2012920: 10 80 00 30 b 20129e0 <== NOT EXECUTED 2012924: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2012928: 80 a7 40 1b cmp %i5, %i3 201292c: 38 80 00 02 bgu,a 2012934 <== ALWAYS TAKEN 2012930: ba 10 00 1b mov %i3, %i5 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 2012934: 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); 2012938: b6 07 40 1a add %i5, %i2, %i3 201293c: 94 40 20 00 addx %g0, 0, %o2 2012940: 90 10 00 10 mov %l0, %o0 2012944: 92 10 00 19 mov %i1, %o1 2012948: 96 10 00 1b mov %i3, %o3 201294c: 7f ff ff 50 call 201268c 2012950: 98 07 bf f8 add %fp, -8, %o4 if (RC_OK == rc) 2012954: 80 a2 20 00 cmp %o0, 0 2012958: 12 80 00 6d bne 2012b0c 201295c: c2 07 bf f8 ld [ %fp + -8 ], %g1 { /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 2012960: 80 a0 40 1b cmp %g1, %i3 2012964: 32 80 00 02 bne,a 201296c <== NEVER TAKEN 2012968: ba 20 40 1a sub %g1, %i2, %i5 <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 201296c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 */ if (c != (start + count)) count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) 2012970: c4 0c 20 0e ldub [ %l0 + 0xe ], %g2 */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 2012974: 80 a0 e0 01 cmp %g3, 1 2012978: 12 80 00 09 bne 201299c 201297c: 82 10 20 00 clr %g1 2012980: c6 06 60 24 ld [ %i1 + 0x24 ], %g3 2012984: 80 a0 e0 00 cmp %g3, 0 2012988: 12 80 00 06 bne 20129a0 <== NEVER TAKEN 201298c: 80 a0 60 00 cmp %g1, 0 2012990: 82 08 a0 03 and %g2, 3, %g1 2012994: 80 a0 00 01 cmp %g0, %g1 2012998: 82 40 20 00 addx %g0, 0, %g1 */ if (c != (start + count)) count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) 201299c: 80 a0 60 00 cmp %g1, 0 20129a0: 02 80 00 12 be 20129e8 20129a4: f6 0c 20 08 ldub [ %l0 + 8 ], %i3 { cln = fat_fd->cln; 20129a8: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 20129ac: d4 14 20 06 lduh [ %l0 + 6 ], %o2 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); 20129b0: b7 36 80 1b srl %i2, %i3, %i3 byte = start & (fs_info->vol.bpc -1); 20129b4: 94 02 bf ff add %o2, -1, %o2 ret = fat_cluster_write(fs_info, 20129b8: 90 10 00 10 mov %l0, %o0 20129bc: 92 06 c0 09 add %i3, %o1, %o1 20129c0: 94 0e 80 0a and %i2, %o2, %o2 20129c4: 96 10 00 1d mov %i5, %o3 20129c8: 98 10 00 1c mov %i4, %o4 20129cc: 40 00 01 e5 call 2013160 20129d0: 9a 10 20 00 clr %o5 cln, byte, count, buf, false); if (0 > ret) 20129d4: 80 a2 20 00 cmp %o0, 0 20129d8: 16 80 00 4d bge 2012b0c <== ALWAYS TAKEN 20129dc: 01 00 00 00 nop rc = -1; 20129e0: 10 80 00 4b b 2012b0c <== NOT EXECUTED 20129e4: 90 10 3f ff mov -1, %o0 ! ffffffff <== NOT EXECUTED const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 20129e8: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; 20129ec: b6 0e e0 ff and %i3, 0xff, %i3 uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 20129f0: aa 07 bf fc add %fp, -4, %l5 { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; 20129f4: a3 36 80 1b srl %i2, %i3, %l1 uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 20129f8: 90 10 00 10 mov %l0, %o0 20129fc: 92 10 00 19 mov %i1, %o1 2012a00: 94 10 00 11 mov %l1, %o2 2012a04: 7f ff fd 85 call 2012018 2012a08: 96 10 00 15 mov %l5, %o3 if (RC_OK == rc) 2012a0c: 80 a2 60 00 cmp %o1, 0 2012a10: 12 80 00 34 bne 2012ae0 <== NEVER TAKEN 2012a14: b7 2c 40 1b sll %l1, %i3, %i3 { file_cln_cnt = cur_cln - fat_fd->cln; 2012a18: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 2012a1c: e4 07 bf fc ld [ %fp + -4 ], %l2 2012a20: a4 24 80 01 sub %l2, %g1, %l2 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 2012a24: b4 26 80 1b sub %i2, %i3, %i2 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 2012a28: 90 10 20 00 clr %o0 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 2012a2c: b0 10 00 1a mov %i2, %i0 uint32_t ofs_cln_save = ofs_cln; uint32_t bytes_to_write = count; uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; 2012a30: a8 10 20 00 clr %l4 const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 2012a34: ac 10 20 00 clr %l6 const uint32_t count, const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; 2012a38: 10 80 00 1a b 2012aa0 2012a3c: b6 10 20 00 clr %i3 { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 2012a40: 96 22 c0 18 sub %o3, %i0, %o3 2012a44: 80 a2 c0 1d cmp %o3, %i5 2012a48: 38 80 00 02 bgu,a 2012a50 2012a4c: 96 10 00 1d mov %i5, %o3 if (file_cln_initial < file_cln_cnt) 2012a50: 80 a4 c0 12 cmp %l3, %l2 2012a54: 2a 80 00 02 bcs,a 2012a5c 2012a58: a8 10 20 01 mov 1, %l4 overwrite_cluster = true; ret = fat_cluster_write(fs_info, 2012a5c: d2 07 bf fc ld [ %fp + -4 ], %o1 2012a60: 90 10 00 10 mov %l0, %o0 2012a64: 94 10 00 18 mov %i0, %o2 2012a68: 98 07 00 1b add %i4, %i3, %o4 2012a6c: 40 00 01 bd call 2013160 2012a70: 9a 0d 20 01 and %l4, 1, %o5 2012a74: 82 10 00 08 mov %o0, %g1 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 2012a78: 80 a0 60 00 cmp %g1, 0 2012a7c: 16 80 00 1d bge 2012af0 <== ALWAYS TAKEN 2012a80: 90 10 3f ff mov -1, %o0 rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) 2012a84: 10 80 00 08 b 2012aa4 <== NOT EXECUTED 2012a88: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; if (0 < bytes_to_write) rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2012a8c: 90 10 00 10 mov %l0, %o0 2012a90: 92 10 00 16 mov %l6, %o1 2012a94: 40 00 18 70 call 2018c54 2012a98: 94 10 00 15 mov %l5, %o2 ofs_cln = 0; 2012a9c: b0 10 20 00 clr %i0 rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) 2012aa0: 80 a7 60 00 cmp %i5, 0 2012aa4: 02 80 00 04 be 2012ab4 2012aa8: 80 a2 20 00 cmp %o0, 0 2012aac: 22 bf ff e5 be,a 2012a40 <== ALWAYS TAKEN 2012ab0: d6 14 20 06 lduh [ %l0 + 6 ], %o3 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 2012ab4: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2012ab8: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2012abc: ec 26 60 38 st %l6, [ %i1 + 0x38 ] } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 2012ac0: b4 06 80 1b add %i2, %i3, %i2 2012ac4: b5 36 80 01 srl %i2, %g1, %i2 } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 2012ac8: a2 06 80 11 add %i2, %l1, %l1 ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; } if (RC_OK != rc) 2012acc: 92 92 20 00 orcc %o0, 0, %o1 2012ad0: 12 80 00 03 bne 2012adc <== NEVER TAKEN 2012ad4: e2 26 60 34 st %l1, [ %i1 + 0x34 ] return rc; else return cmpltd; 2012ad8: 92 10 00 1b mov %i3, %o1 fat_fd, start, count, buf, file_cln_initial); if (0 > ret) 2012adc: 80 a2 60 00 cmp %o1, 0 2012ae0: 16 80 00 0b bge 2012b0c <== ALWAYS TAKEN 2012ae4: 90 10 00 09 mov %o1, %o0 2012ae8: 10 80 00 09 b 2012b0c <== NOT EXECUTED 2012aec: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 2012af0: a4 04 a0 01 inc %l2 bytes_to_write -= ret; cmpltd += ret; 2012af4: b6 06 c0 01 add %i3, %g1, %i3 save_cln = cur_cln; if (0 < bytes_to_write) 2012af8: ba a7 40 01 subcc %i5, %g1, %i5 2012afc: 12 bf ff e4 bne 2012a8c 2012b00: ec 07 bf fc ld [ %fp + -4 ], %l6 2012b04: 10 bf ff e6 b 2012a9c 2012b08: 90 10 20 00 clr %o0 } if (RC_OK != rc) return rc; else return cmpltd; } 2012b0c: 81 c7 e0 08 ret 2012b10: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020190a0 : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 20190a0: 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; 20190a4: b8 10 20 00 clr %i4 int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 20190a8: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 20190ac: 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; 20190b0: 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) 20190b4: 10 80 00 19 b 2019118 20190b8: b4 10 20 00 clr %i2 { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 20190bc: 92 10 00 1b mov %i3, %o1 20190c0: 7f ff fe e5 call 2018c54 20190c4: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 20190c8: b0 92 20 00 orcc %o0, 0, %i0 20190cc: 02 80 00 0b be 20190f8 <== ALWAYS TAKEN 20190d0: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20190d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 <== NOT EXECUTED 20190d8: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 20190dc: 02 80 00 03 be 20190e8 <== NOT EXECUTED 20190e0: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 20190e4: f8 27 60 44 st %i4, [ %i5 + 0x44 ] <== NOT EXECUTED fat_buf_release(fs_info); 20190e8: 7f ff e6 ed call 2012c9c <== NOT EXECUTED 20190ec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20190f0: 81 c7 e0 08 ret <== NOT EXECUTED 20190f4: 81 e8 00 00 restore <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 20190f8: 92 10 00 1b mov %i3, %o1 20190fc: 7f ff ff 48 call 2018e1c 2019100: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2019104: 80 a2 20 00 cmp %o0, 0 2019108: 32 80 00 02 bne,a 2019110 <== NEVER TAKEN 201910c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 2019110: 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++; 2019114: 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) 2019118: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 201911c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 2019120: 84 0e c0 02 and %i3, %g2, %g2 2019124: 80 a0 80 01 cmp %g2, %g1 2019128: 0a bf ff e5 bcs 20190bc 201912c: 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) 2019130: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 2019134: 80 a0 7f ff cmp %g1, -1 2019138: 02 80 00 05 be 201914c <== ALWAYS TAKEN 201913c: f2 27 60 4c st %i1, [ %i5 + 0x4c ] fs_info->vol.free_cls += freed_cls_cnt; 2019140: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED 2019144: f8 27 60 44 st %i4, [ %i5 + 0x44 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019148: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 201914c: 7f ff e6 d4 call 2012c9c 2019150: b0 10 00 1a mov %i2, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2019154: 81 c7 e0 08 ret 2019158: 81 e8 00 00 restore =============================================================================== 02013d34 : 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); 2013d34: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 <== NOT EXECUTED 2013d38: c4 02 20 74 ld [ %o0 + 0x74 ], %g2 <== NOT EXECUTED 2013d3c: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED 2013d40: 92 22 40 01 sub %o1, %g1, %o1 <== NOT EXECUTED 2013d44: 83 32 60 03 srl %o1, 3, %g1 <== NOT EXECUTED 2013d48: 92 0a 60 07 and %o1, 7, %o1 <== NOT EXECUTED 2013d4c: 93 28 c0 09 sll %g3, %o1, %o1 <== NOT EXECUTED 2013d50: c6 08 80 01 ldub [ %g2 + %g1 ], %g3 <== NOT EXECUTED 2013d54: 92 28 c0 09 andn %g3, %o1, %o1 <== NOT EXECUTED 2013d58: 81 c3 e0 08 retl <== NOT EXECUTED 2013d5c: d2 28 80 01 stb %o1, [ %g2 + %g1 ] <== NOT EXECUTED =============================================================================== 02018c54 : fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 2018c54: 9d e3 bf 98 save %sp, -104, %sp uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2018c58: 80 a6 60 01 cmp %i1, 1 2018c5c: 08 80 00 67 bleu 2018df8 <== NEVER TAKEN 2018c60: ba 10 00 18 mov %i0, %i5 2018c64: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2018c68: 82 00 60 01 inc %g1 2018c6c: 80 a6 40 01 cmp %i1, %g1 2018c70: 28 80 00 03 bleu,a 2018c7c <== ALWAYS TAKEN 2018c74: c2 0e 20 0e ldub [ %i0 + 0xe ], %g1 2018c78: 30 80 00 60 b,a 2018df8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2018c7c: 86 08 60 01 and %g1, 1, %g3 2018c80: 80 88 e0 ff btst 0xff, %g3 2018c84: 02 80 00 05 be 2018c98 2018c88: 88 08 60 02 and %g1, 2, %g4 2018c8c: 85 36 60 01 srl %i1, 1, %g2 2018c90: 10 80 00 06 b 2018ca8 2018c94: 84 00 80 19 add %g2, %i1, %g2 2018c98: 80 89 20 ff btst 0xff, %g4 2018c9c: 02 80 00 03 be 2018ca8 2018ca0: 85 2e 60 02 sll %i1, 2, %g2 2018ca4: 85 2e 60 01 sll %i1, 1, %g2 2018ca8: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 2018cac: c8 07 60 58 ld [ %i5 + 0x58 ], %g4 2018cb0: 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); 2018cb4: 80 88 e0 ff btst 0xff, %g3 2018cb8: 02 80 00 05 be 2018ccc 2018cbc: b6 00 80 04 add %g2, %g4, %i3 2018cc0: b9 36 60 01 srl %i1, 1, %i4 2018cc4: 10 80 00 07 b 2018ce0 2018cc8: b8 07 00 19 add %i4, %i1, %i4 2018ccc: 82 08 60 02 and %g1, 2, %g1 2018cd0: 80 88 60 ff btst 0xff, %g1 2018cd4: 02 80 00 03 be 2018ce0 2018cd8: b9 2e 60 02 sll %i1, 2, %i4 2018cdc: b9 2e 60 01 sll %i1, 1, %i4 2018ce0: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 2018ce4: 90 10 00 1d mov %i5, %o0 2018ce8: 92 10 00 1b mov %i3, %o1 2018cec: 94 10 20 01 mov 1, %o2 2018cf0: 7f ff e8 5f call 2012e6c 2018cf4: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2018cf8: b0 92 20 00 orcc %o0, 0, %i0 2018cfc: 12 80 00 37 bne 2018dd8 <== NEVER TAKEN 2018d00: 83 2c 20 10 sll %l0, 0x10, %g1 return rc; switch ( fs_info->vol.type ) 2018d04: c4 0f 60 0e ldub [ %i5 + 0xe ], %g2 2018d08: 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); 2018d0c: 83 30 60 10 srl %g1, 0x10, %g1 2018d10: 82 00 7f ff add %g1, -1, %g1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2018d14: 02 80 00 27 be 2018db0 2018d18: 82 0f 00 01 and %i4, %g1, %g1 2018d1c: 80 a0 a0 04 cmp %g2, 4 2018d20: 02 80 00 30 be 2018de0 2018d24: 80 a0 a0 01 cmp %g2, 1 2018d28: 12 80 00 34 bne 2018df8 <== NEVER TAKEN 2018d2c: c6 07 bf fc ld [ %fp + -4 ], %g3 /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) 2018d30: 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 = (*(sec_buf + ofs)); 2018d34: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2018d38: 88 01 3f ff add %g4, -1, %g4 2018d3c: 80 a0 40 04 cmp %g1, %g4 2018d40: 12 80 00 10 bne 2018d80 <== ALWAYS TAKEN 2018d44: c4 26 80 00 st %g2, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2018d48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2018d4c: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2018d50: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2018d54: 7f ff e8 46 call 2012e6c <== NOT EXECUTED 2018d58: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 2018d5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2018d60: 12 80 00 2c bne 2018e10 <== NOT EXECUTED 2018d64: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= *sec_buf << 8; 2018d68: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 2018d6c: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 2018d70: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 2018d74: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2018d78: 10 80 00 07 b 2018d94 <== NOT EXECUTED 2018d7c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED } else { *ret_val |= *(sec_buf + ofs + 1) << 8; 2018d80: 82 00 c0 01 add %g3, %g1, %g1 2018d84: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2018d88: 83 28 60 08 sll %g1, 8, %g1 2018d8c: 84 10 40 02 or %g1, %g2, %g2 2018d90: c4 26 80 00 st %g2, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2018d94: 80 8e 60 01 btst 1, %i1 2018d98: 02 80 00 04 be 2018da8 2018d9c: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 2018da0: 10 80 00 0d b 2018dd4 2018da4: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2018da8: 10 80 00 0b b 2018dd4 2018dac: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); 2018db0: c4 07 bf fc ld [ %fp + -4 ], %g2 *ret_val = CF_LE_W(*ret_val); 2018db4: 07 00 00 3f sethi %hi(0xfc00), %g3 else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); 2018db8: c2 10 80 01 lduh [ %g2 + %g1 ], %g1 *ret_val = CF_LE_W(*ret_val); 2018dbc: 86 10 e3 ff or %g3, 0x3ff, %g3 2018dc0: 83 28 60 10 sll %g1, 0x10, %g1 2018dc4: 85 30 60 18 srl %g1, 0x18, %g2 2018dc8: 83 30 60 08 srl %g1, 8, %g1 2018dcc: 82 08 40 03 and %g1, %g3, %g1 2018dd0: 82 10 80 01 or %g2, %g1, %g1 2018dd4: c2 26 80 00 st %g1, [ %i2 ] break; 2018dd8: 81 c7 e0 08 ret 2018ddc: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); 2018de0: c4 07 bf fc ld [ %fp + -4 ], %g2 2018de4: 7f ff ff 90 call 2018c24 2018de8: d0 00 80 01 ld [ %g2 + %g1 ], %o0 2018dec: d0 26 80 00 st %o0, [ %i2 ] break; 2018df0: 81 c7 e0 08 ret 2018df4: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one(EIO); 2018df8: 40 00 06 84 call 201a808 <__errno> <== NOT EXECUTED 2018dfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2018e00: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2018e04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2018e08: 81 c7 e0 08 ret <== NOT EXECUTED 2018e0c: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) 2018e10: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2018e14: 81 c7 e0 08 ret <== NOT EXECUTED 2018e18: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013c74 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 2013c74: 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)) 2013c78: 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) 2013c7c: 10 80 00 2b b 2013d28 <== NOT EXECUTED 2013c80: 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)) 2013c84: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED 2013c88: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2013c8c: b6 00 c0 02 add %g3, %g2, %i3 <== NOT EXECUTED 2013c90: f4 08 c0 02 ldub [ %g3 + %g2 ], %i2 <== NOT EXECUTED 2013c94: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2013c98: ba 08 60 07 and %g1, 7, %i5 <== NOT EXECUTED 2013c9c: 85 38 80 1d sra %g2, %i5, %g2 <== NOT EXECUTED 2013ca0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2013ca4: 12 80 00 0a bne 2013ccc <== NOT EXECUTED 2013ca8: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2013cac: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2013cb0: bb 28 40 1d sll %g1, %i5, %i5 <== NOT EXECUTED 2013cb4: ba 17 40 1a or %i5, %i2, %i5 <== NOT EXECUTED 2013cb8: fa 2e c0 00 stb %i5, [ %i3 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2013cbc: c4 06 20 78 ld [ %i0 + 0x78 ], %g2 <== NOT EXECUTED 2013cc0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2013cc4: 81 c7 e0 08 ret <== NOT EXECUTED 2013cc8: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2013ccc: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED 2013cd0: 3a 80 00 03 bcc,a 2013cdc <== NOT EXECUTED 2013cd4: c0 26 20 78 clr [ %i0 + 0x78 ] <== NOT EXECUTED 2013cd8: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2013cdc: 92 02 60 01 inc %o1 <== NOT EXECUTED 2013ce0: 80 a2 40 04 cmp %o1, %g4 <== NOT EXECUTED 2013ce4: 32 bf ff e8 bne,a 2013c84 <== NOT EXECUTED 2013ce8: c6 06 20 74 ld [ %i0 + 0x74 ], %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)) 2013cec: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2013cf0: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2013cf4: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2013cf8: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2013cfc: 2a 80 00 04 bcs,a 2013d0c <== NOT EXECUTED 2013d00: d0 06 20 74 ld [ %i0 + 0x74 ], %o0 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2013d04: 81 c7 e0 08 ret <== NOT EXECUTED 2013d08: 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); 2013d0c: 7f ff c9 a2 call 2006394 <== NOT EXECUTED 2013d10: d2 26 20 7c st %o1, [ %i0 + 0x7c ] <== NOT EXECUTED if (fs_info->uino != NULL) 2013d14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013d18: 02 bf ff fb be 2013d04 <== NOT EXECUTED 2013d1c: d0 26 20 74 st %o0, [ %i0 + 0x74 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2013d20: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 2013d24: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2013d28: c8 06 20 7c ld [ %i0 + 0x7c ], %g4 <== NOT EXECUTED 2013d2c: 10 bf ff ed b 2013ce0 <== NOT EXECUTED 2013d30: 92 10 20 00 clr %o1 <== NOT EXECUTED =============================================================================== 02013bfc : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 2013bfc: 9d e3 bf 98 save %sp, -104, %sp 2013c00: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2013c04: 10 80 00 10 b 2013c44 2013c08: f2 27 bf fc st %i1, [ %fp + -4 ] { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 2013c0c: 90 10 00 1d mov %i5, %o0 2013c10: 94 10 20 00 clr %o2 2013c14: 7f ff fd 0b call 2013040 2013c18: 98 10 20 00 clr %o4 if ( ret != fs_info->vol.bpc ) 2013c1c: c2 17 60 06 lduh [ %i5 + 6 ], %g1 2013c20: 80 a2 00 01 cmp %o0, %g1 2013c24: 12 80 00 11 bne 2013c68 <== NEVER TAKEN 2013c28: d2 07 bf fc ld [ %fp + -4 ], %o1 { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 2013c2c: 90 10 00 1d mov %i5, %o0 2013c30: 40 00 14 09 call 2018c54 2013c34: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2013c38: b0 92 20 00 orcc %o0, 0, %i0 2013c3c: 12 80 00 0c bne 2013c6c <== NEVER TAKEN 2013c40: 01 00 00 00 nop { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2013c44: d2 07 bf fc ld [ %fp + -4 ], %o1 2013c48: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 2013c4c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 2013c50: 84 0a 40 02 and %o1, %g2, %g2 2013c54: 80 a0 80 01 cmp %g2, %g1 2013c58: 2a bf ff ed bcs,a 2013c0c 2013c5c: d6 17 60 06 lduh [ %i5 + 6 ], %o3 return rc; } } return rc; 2013c60: 81 c7 e0 08 ret 2013c64: 91 e8 20 00 restore %g0, 0, %o0 while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) { return -1; 2013c68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED } } return rc; } 2013c6c: 81 c7 e0 08 ret <== NOT EXECUTED 2013c70: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201328c : * 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) { 201328c: 9d e3 bf 08 save %sp, -248, %sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 2013290: 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) { 2013294: b6 10 00 18 mov %i0, %i3 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; 2013298: c0 27 bf a4 clr [ %fp + -92 ] vol->fd = open(device, O_RDWR); 201329c: 7f ff cb a3 call 2006128 20132a0: 90 10 00 19 mov %i1, %o0 if (vol->fd < 0) 20132a4: 80 a2 20 00 cmp %o0, 0 20132a8: 06 80 00 17 bl 2013304 <== NEVER TAKEN 20132ac: d0 26 e0 60 st %o0, [ %i3 + 0x60 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 20132b0: 7f ff c8 53 call 20053fc 20132b4: 92 07 bf b8 add %fp, -72, %o1 if (rc != 0) 20132b8: 80 a2 20 00 cmp %o0, 0 20132bc: 12 80 00 10 bne 20132fc <== NEVER TAKEN 20132c0: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20132c4: c6 07 bf c4 ld [ %fp + -60 ], %g3 20132c8: 05 00 00 3c sethi %hi(0xf000), %g2 20132cc: 86 08 c0 02 and %g3, %g2, %g3 20132d0: 05 00 00 18 sethi %hi(0x6000), %g2 20132d4: 80 a0 c0 02 cmp %g3, %g2 20132d8: 12 80 00 09 bne 20132fc <== NEVER TAKEN 20132dc: 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); 20132e0: 94 06 20 64 add %i0, 0x64, %o2 20132e4: 40 00 05 6e call 201489c 20132e8: 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) { 20132ec: 80 a2 20 00 cmp %o0, 0 20132f0: 22 80 00 09 be,a 2013314 <== ALWAYS TAKEN 20132f4: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 close(vol->fd); 20132f8: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 20132fc: 7f ff c7 59 call 2005060 <== NOT EXECUTED 2013300: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 2013304: 40 00 1d 41 call 201a808 <__errno> <== NOT EXECUTED 2013308: 01 00 00 00 nop <== NOT EXECUTED 201330c: 10 80 01 af b 20139c8 <== NOT EXECUTED 2013310: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 2013314: 92 10 20 00 clr %o1 2013318: 7f ff f6 9a call 2010d80 201331c: 94 07 bf a4 add %fp, -92, %o2 if (sc != RTEMS_SUCCESSFUL) 2013320: 80 a2 20 00 cmp %o0, 0 2013324: 22 80 00 03 be,a 2013330 <== ALWAYS TAKEN 2013328: d0 07 bf a4 ld [ %fp + -92 ], %o0 201332c: 30 80 00 32 b,a 20133f4 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 2013330: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 2013334: c2 08 e0 20 ldub [ %g3 + 0x20 ], %g1 2013338: c4 08 e0 0b ldub [ %g3 + 0xb ], %g2 201333c: c2 2f bf 9a stb %g1, [ %fp + -102 ] 2013340: c2 08 e0 23 ldub [ %g3 + 0x23 ], %g1 2013344: d2 08 e0 0c ldub [ %g3 + 0xc ], %o1 2013348: c2 2f bf 8f stb %g1, [ %fp + -113 ] 201334c: c2 08 e0 2c ldub [ %g3 + 0x2c ], %g1 2013350: d8 08 e0 0e ldub [ %g3 + 0xe ], %o4 2013354: c2 2f bf 9d stb %g1, [ %fp + -99 ] 2013358: c2 08 e0 2d ldub [ %g3 + 0x2d ], %g1 201335c: d6 08 e0 0f ldub [ %g3 + 0xf ], %o3 2013360: c2 2f bf 9c stb %g1, [ %fp + -100 ] 2013364: c2 08 e0 2e ldub [ %g3 + 0x2e ], %g1 2013368: c8 08 e0 11 ldub [ %g3 + 0x11 ], %g4 201336c: c2 2f bf 9b stb %g1, [ %fp + -101 ] 2013370: c2 08 e0 2f ldub [ %g3 + 0x2f ], %g1 2013374: da 08 e0 12 ldub [ %g3 + 0x12 ], %o5 2013378: c2 2f bf 97 stb %g1, [ %fp + -105 ] 201337c: c2 08 e0 30 ldub [ %g3 + 0x30 ], %g1 2013380: fa 08 e0 0d ldub [ %g3 + 0xd ], %i5 2013384: f4 08 e0 10 ldub [ %g3 + 0x10 ], %i2 2013388: e2 08 e0 13 ldub [ %g3 + 0x13 ], %l1 201338c: e4 08 e0 14 ldub [ %g3 + 0x14 ], %l2 2013390: ee 08 e0 16 ldub [ %g3 + 0x16 ], %l7 2013394: f0 08 e0 17 ldub [ %g3 + 0x17 ], %i0 2013398: e0 08 e0 21 ldub [ %g3 + 0x21 ], %l0 201339c: f2 08 e0 22 ldub [ %g3 + 0x22 ], %i1 20133a0: e8 08 e0 24 ldub [ %g3 + 0x24 ], %l4 20133a4: ec 08 e0 25 ldub [ %g3 + 0x25 ], %l6 20133a8: ea 08 e0 26 ldub [ %g3 + 0x26 ], %l5 20133ac: e6 08 e0 27 ldub [ %g3 + 0x27 ], %l3 20133b0: f8 08 e0 28 ldub [ %g3 + 0x28 ], %i4 20133b4: c2 2f bf 9f stb %g1, [ %fp + -97 ] 20133b8: c6 08 e0 31 ldub [ %g3 + 0x31 ], %g3 sc = rtems_bdbuf_release( block); 20133bc: c4 27 bf 80 st %g2, [ %fp + -128 ] 20133c0: c8 27 bf 7c st %g4, [ %fp + -132 ] 20133c4: d2 27 bf 78 st %o1, [ %fp + -136 ] 20133c8: d6 27 bf 74 st %o3, [ %fp + -140 ] 20133cc: d8 3f bf 68 std %o4, [ %fp + -152 ] 20133d0: 7f ff f6 e8 call 2010f70 20133d4: c6 2f bf 9e stb %g3, [ %fp + -98 ] if (sc != RTEMS_SUCCESSFUL) 20133d8: c4 07 bf 80 ld [ %fp + -128 ], %g2 20133dc: 80 a2 20 00 cmp %o0, 0 20133e0: c8 07 bf 7c ld [ %fp + -132 ], %g4 20133e4: d2 07 bf 78 ld [ %fp + -136 ], %o1 20133e8: d6 07 bf 74 ld [ %fp + -140 ], %o3 20133ec: 02 80 00 08 be 201340c <== ALWAYS TAKEN 20133f0: d8 1f bf 68 ldd [ %fp + -152 ], %o4 { close(vol->fd); 20133f4: 7f ff c7 1b call 2005060 <== NOT EXECUTED 20133f8: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20133fc: 40 00 1d 03 call 201a808 <__errno> <== NOT EXECUTED 2013400: 01 00 00 00 nop <== NOT EXECUTED 2013404: 10 80 01 71 b 20139c8 <== NOT EXECUTED 2013408: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 201340c: 84 08 a0 ff and %g2, 0xff, %g2 2013410: 92 0a 60 ff and %o1, 0xff, %o1 2013414: 93 2a 60 08 sll %o1, 8, %o1 2013418: 92 12 40 02 or %o1, %g2, %o1 201341c: d2 36 c0 00 sth %o1, [ %i3 ] if ( (vol->bps != 512) && 2013420: 85 2a 60 10 sll %o1, 0x10, %g2 2013424: 85 30 a0 10 srl %g2, 0x10, %g2 2013428: 80 a0 a4 00 cmp %g2, 0x400 201342c: 02 80 00 0c be 201345c <== NEVER TAKEN 2013430: 86 10 00 09 mov %o1, %g3 2013434: 80 a0 a2 00 cmp %g2, 0x200 2013438: 22 80 00 0a be,a 2013460 <== ALWAYS TAKEN 201343c: 85 2a 60 10 sll %o1, 0x10, %g2 (vol->bps != 1024) && 2013440: 80 a0 a8 00 cmp %g2, 0x800 <== NOT EXECUTED 2013444: 02 80 00 06 be 201345c <== NOT EXECUTED 2013448: 1f 00 00 04 sethi %hi(0x1000), %o7 <== NOT EXECUTED (vol->bps != 2048) && 201344c: 80 a0 80 0f cmp %g2, %o7 <== NOT EXECUTED 2013450: 02 80 00 04 be 2013460 <== NOT EXECUTED 2013454: 85 2a 60 10 sll %o1, 0x10, %g2 <== NOT EXECUTED 2013458: 30 80 00 d6 b,a 20137b0 <== NOT EXECUTED (vol->bps != 4096)) { 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; 201345c: 85 2a 60 10 sll %o1, 0x10, %g2 <== NOT EXECUTED 2013460: c0 2e e0 03 clrb [ %i3 + 3 ] 2013464: 10 80 00 05 b 2013478 2013468: 85 30 a0 19 srl %g2, 0x19, %g2 i >>= 1, vol->sec_mul++); 201346c: 85 38 a0 01 sra %g2, 1, %g2 <== NOT EXECUTED 2013470: 9e 03 e0 01 inc %o7 <== NOT EXECUTED 2013474: de 2e e0 03 stb %o7, [ %i3 + 3 ] <== NOT EXECUTED (vol->bps != 4096)) { 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; 2013478: 80 88 a0 01 btst 1, %g2 201347c: 22 bf ff fc be,a 201346c <== NEVER TAKEN 2013480: de 0e e0 03 ldub [ %i3 + 3 ], %o7 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2013484: 93 2a 60 10 sll %o1, 0x10, %o1 2013488: c0 2e e0 02 clrb [ %i3 + 2 ] 201348c: 93 32 60 10 srl %o1, 0x10, %o1 2013490: 10 80 00 05 b 20134a4 2013494: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 2013498: 84 00 a0 01 inc %g2 201349c: 9f 3b e0 01 sra %o7, 1, %o7 20134a0: c4 2e e0 02 stb %g2, [ %i3 + 2 ] 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; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 20134a4: 80 8b e0 01 btst 1, %o7 20134a8: 02 bf ff fc be 2013498 20134ac: c4 0e e0 02 ldub [ %i3 + 2 ], %g2 i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; 20134b0: c6 36 e0 0a sth %g3, [ %i3 + 0xa ] vol->bytes_per_block_log2 = vol->sec_log2; 20134b4: c4 2e e0 0c stb %g2, [ %i3 + 0xc ] vol->sectors_per_block = 1; 20134b8: 86 10 20 01 mov 1, %g3 vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 20134bc: fa 2e e0 04 stb %i5, [ %i3 + 4 ] /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 20134c0: 9e 8f 60 ff andcc %i5, 0xff, %o7 20134c4: 02 80 00 bb be 20137b0 <== NEVER TAKEN 20134c8: c6 2e e0 09 stb %g3, [ %i3 + 9 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 20134cc: 10 80 00 05 b 20134e0 20134d0: c0 2e e0 05 clrb [ %i3 + 5 ] i >>= 1, vol->spc_log2++); 20134d4: 86 00 e0 01 inc %g3 20134d8: 9f 3b e0 01 sra %o7, 1, %o7 20134dc: c6 2e e0 05 stb %g3, [ %i3 + 5 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 20134e0: 80 8b e0 01 btst 1, %o7 20134e4: 02 bf ff fc be 20134d4 20134e8: c6 0e e0 05 ldub [ %i3 + 5 ], %g3 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) 20134ec: 87 2a 40 03 sll %o1, %g3, %g3 20134f0: 95 28 e0 10 sll %g3, 0x10, %o2 20134f4: 1f 20 00 00 sethi %hi(0x80000000), %o7 20134f8: 80 a2 80 0f cmp %o2, %o7 20134fc: 18 80 00 ad bgu 20137b0 <== NEVER TAKEN 2013500: c6 36 e0 06 sth %g3, [ %i3 + 6 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2013504: 1f 00 00 3f sethi %hi(0xfc00), %o7 2013508: c0 2e e0 08 clrb [ %i3 + 8 ] 201350c: 9e 13 e3 ff or %o7, 0x3ff, %o7 2013510: 10 80 00 05 b 2013524 2013514: 86 08 c0 0f and %g3, %o7, %g3 i >>= 1, vol->bpc_log2++); 2013518: 87 38 e0 01 sra %g3, 1, %g3 201351c: 9e 03 e0 01 inc %o7 2013520: de 2e e0 08 stb %o7, [ %i3 + 8 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2013524: 80 88 e0 01 btst 1, %g3 2013528: 22 bf ff fc be,a 2013518 201352c: de 0e e0 08 ldub [ %i3 + 8 ], %o7 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 2013530: f4 2e e0 0d stb %i2, [ %i3 + 0xd ] 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)) / 2013534: 86 02 7f ff add %o1, -1, %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); 2013538: 96 0a e0 ff and %o3, 0xff, %o3 201353c: 98 0b 20 ff and %o4, 0xff, %o4 2013540: 97 2a e0 08 sll %o3, 8, %o3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013544: 9a 0b 60 ff and %o5, 0xff, %o5 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); 2013548: 98 12 c0 0c or %o3, %o4, %o4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 201354c: 9b 2b 60 08 sll %o5, 8, %o5 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); 2013550: d8 36 e0 18 sth %o4, [ %i3 + 0x18 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2013554: 88 09 20 ff and %g4, 0xff, %g4 2013558: 88 13 40 04 or %o5, %g4, %g4 201355c: c8 36 e0 24 sth %g4, [ %i3 + 0x24 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2013560: 89 29 20 10 sll %g4, 0x10, %g4 2013564: c4 27 bf 80 st %g2, [ %fp + -128 ] 2013568: 91 31 20 0b srl %g4, 0xb, %o0 201356c: d8 27 bf 68 st %o4, [ %fp + -152 ] 2013570: 7f ff bc 74 call 2002740 <.div> 2013574: 90 02 00 03 add %o0, %g3, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013578: c4 07 bf 80 ld [ %fp + -128 ], %g2 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)) / 201357c: d0 26 e0 28 st %o0, [ %i3 + 0x28 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2013580: 85 2a 00 02 sll %o0, %g2, %g2 2013584: c4 26 e0 2c st %g2, [ %i3 + 0x2c ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013588: b0 0e 20 ff and %i0, 0xff, %i0 201358c: ae 0d e0 ff and %l7, 0xff, %l7 2013590: 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)) / 2013594: 86 10 00 08 mov %o0, %g3 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2013598: ae 16 00 17 or %i0, %l7, %l7 201359c: af 2d e0 10 sll %l7, 0x10, %l7 20135a0: 80 a5 e0 00 cmp %l7, 0 20135a4: 02 80 00 05 be 20135b8 20135a8: d8 07 bf 68 ld [ %fp + -152 ], %o4 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 20135ac: af 35 e0 10 srl %l7, 0x10, %l7 20135b0: 10 80 00 0c b 20135e0 20135b4: ee 26 e0 1c st %l7, [ %i3 + 0x1c ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 20135b8: ac 0d a0 ff and %l6, 0xff, %l6 20135bc: aa 0d 60 ff and %l5, 0xff, %l5 20135c0: ad 2d a0 08 sll %l6, 8, %l6 20135c4: ab 2d 60 10 sll %l5, 0x10, %l5 20135c8: a8 0d 20 ff and %l4, 0xff, %l4 20135cc: aa 15 80 15 or %l6, %l5, %l5 20135d0: a7 2c e0 18 sll %l3, 0x18, %l3 20135d4: a8 15 40 14 or %l5, %l4, %l4 20135d8: a6 15 00 13 or %l4, %l3, %l3 20135dc: e6 26 e0 1c st %l3, [ %i3 + 0x1c ] vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 20135e0: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 20135e4: 99 2b 20 10 sll %o4, 0x10, %o4 20135e8: c6 27 bf 84 st %g3, [ %fp + -124 ] 20135ec: b1 33 20 10 srl %o4, 0x10, %i0 20135f0: 7f ff bc 18 call 2002650 <.umul> 20135f4: 90 0e a0 ff and %i2, 0xff, %o0 20135f8: c6 07 bf 84 ld [ %fp + -124 ], %g3 20135fc: 90 06 00 08 add %i0, %o0, %o0 2013600: 86 00 c0 08 add %g3, %o0, %g3 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 2013604: d0 26 e0 20 st %o0, [ %i3 + 0x20 ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 2013608: a4 0c a0 ff and %l2, 0xff, %l2 201360c: a2 0c 60 ff and %l1, 0xff, %l1 2013610: a5 2c a0 08 sll %l2, 8, %l2 2013614: a2 14 80 11 or %l2, %l1, %l1 2013618: a3 2c 60 10 sll %l1, 0x10, %l1 201361c: 80 a4 60 00 cmp %l1, 0 2013620: 02 80 00 05 be 2013634 2013624: c6 26 e0 34 st %g3, [ %i3 + 0x34 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 2013628: a3 34 60 10 srl %l1, 0x10, %l1 201362c: 10 80 00 0d b 2013660 2013630: e2 26 e0 30 st %l1, [ %i3 + 0x30 ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2013634: f4 0f bf 9a ldub [ %fp + -102 ], %i2 2013638: c2 0f bf 8f ldub [ %fp + -113 ], %g1 201363c: a0 0c 20 ff and %l0, 0xff, %l0 2013640: b2 0e 60 ff and %i1, 0xff, %i1 2013644: a1 2c 20 08 sll %l0, 8, %l0 2013648: b3 2e 60 10 sll %i1, 0x10, %i1 201364c: 85 28 60 18 sll %g1, 0x18, %g2 2013650: b2 14 00 19 or %l0, %i1, %i1 2013654: b4 16 40 1a or %i1, %i2, %i2 2013658: b4 16 80 02 or %i2, %g2, %i2 201365c: f4 26 e0 30 st %i2, [ %i3 + 0x30 ] data_secs = vol->tot_secs - vol->data_fsec; 2013660: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 vol->data_cls = data_secs / vol->spc; 2013664: 92 0f 60 ff and %i5, 0xff, %o1 2013668: 7f ff bc 34 call 2002738 <.udiv> 201366c: 90 22 00 03 sub %o0, %g3, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2013670: 80 a2 2f f4 cmp %o0, 0xff4 2013674: 18 80 00 08 bgu 2013694 2013678: d0 26 e0 38 st %o0, [ %i3 + 0x38 ] { vol->type = FAT_FAT12; 201367c: 84 10 20 01 mov 1, %g2 2013680: c4 2e e0 0e stb %g2, [ %i3 + 0xe ] vol->mask = FAT_FAT12_MASK; 2013684: 84 10 2f ff mov 0xfff, %g2 2013688: c4 26 e0 10 st %g2, [ %i3 + 0x10 ] vol->eoc_val = FAT_FAT12_EOC; 201368c: 10 80 00 0f b 20136c8 2013690: 84 10 2f f8 mov 0xff8, %g2 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2013694: 05 00 00 3f sethi %hi(0xfc00), %g2 2013698: 86 10 a3 f4 or %g2, 0x3f4, %g3 ! fff4 201369c: 80 a2 00 03 cmp %o0, %g3 20136a0: 38 80 00 05 bgu,a 20136b4 20136a4: 84 10 20 04 mov 4, %g2 { vol->type = FAT_FAT16; 20136a8: 86 10 20 02 mov 2, %g3 20136ac: 10 80 00 04 b 20136bc 20136b0: c6 2e e0 0e stb %g3, [ %i3 + 0xe ] vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 20136b4: c4 2e e0 0e stb %g2, [ %i3 + 0xe ] vol->mask = FAT_FAT32_MASK; 20136b8: 05 03 ff ff sethi %hi(0xffffc00), %g2 20136bc: 86 10 a3 ff or %g2, 0x3ff, %g3 ! fffffff vol->eoc_val = FAT_FAT32_EOC; 20136c0: 84 10 a3 f8 or %g2, 0x3f8, %g2 vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 20136c4: c6 26 e0 10 st %g3, [ %i3 + 0x10 ] vol->eoc_val = FAT_FAT32_EOC; 20136c8: c4 26 e0 14 st %g2, [ %i3 + 0x14 ] } } if (vol->type == FAT_FAT32) 20136cc: c4 0e e0 0e ldub [ %i3 + 0xe ], %g2 20136d0: 80 a0 a0 04 cmp %g2, 4 20136d4: 12 80 00 63 bne 2013860 20136d8: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 20136dc: c6 0f bf 9c ldub [ %fp + -100 ], %g3 20136e0: c4 0f bf 9b ldub [ %fp + -101 ], %g2 20136e4: 87 28 e0 08 sll %g3, 8, %g3 20136e8: 85 28 a0 10 sll %g2, 0x10, %g2 20136ec: c2 0f bf 97 ldub [ %fp + -105 ], %g1 20136f0: 84 10 c0 02 or %g3, %g2, %g2 20136f4: c6 0f bf 9d ldub [ %fp + -99 ], %g3 20136f8: 84 10 80 03 or %g2, %g3, %g2 20136fc: 87 28 60 18 sll %g1, 0x18, %g3 2013700: 84 10 80 03 or %g2, %g3, %g2 2013704: c4 26 e0 3c st %g2, [ %i3 + 0x3c ] vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2013708: 84 0f 3f 80 and %i4, -128, %g2 if (vol->mirror) 201370c: 80 88 a0 80 btst 0x80, %g2 2013710: 02 80 00 05 be 2013724 <== ALWAYS TAKEN 2013714: c4 2e e0 54 stb %g2, [ %i3 + 0x54 ] vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 2013718: b8 0f 20 0f and %i4, 0xf, %i4 <== NOT EXECUTED 201371c: 10 80 00 03 b 2013728 <== NOT EXECUTED 2013720: f8 2e e0 5c stb %i4, [ %i3 + 0x5c ] <== NOT EXECUTED else vol->afat = 0; 2013724: c0 2e e0 5c clrb [ %i3 + 0x5c ] vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 2013728: d2 0f bf 9e ldub [ %fp + -98 ], %o1 201372c: c4 0f bf 9f ldub [ %fp + -97 ], %g2 2013730: 93 2a 60 08 sll %o1, 8, %o1 2013734: 92 12 40 02 or %o1, %g2, %o1 2013738: d2 36 e0 40 sth %o1, [ %i3 + 0x40 ] if( vol->info_sec == 0 ) 201373c: 93 2a 60 10 sll %o1, 0x10, %o1 2013740: 93 32 60 10 srl %o1, 0x10, %o1 2013744: 80 a2 60 00 cmp %o1, 0 2013748: 32 80 00 03 bne,a 2013754 <== ALWAYS TAKEN 201374c: 90 10 00 1b mov %i3, %o0 2013750: 30 80 00 18 b,a 20137b0 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 2013754: 94 10 20 00 clr %o2 2013758: 96 10 20 04 mov 4, %o3 201375c: 7f ff fd f3 call 2012f28 <_fat_block_read> 2013760: 98 07 bf a8 add %fp, -88, %o4 FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2013764: 80 a2 20 00 cmp %o0, 0 2013768: 06 80 00 22 bl 20137f0 <== NEVER TAKEN 201376c: c4 0f bf aa ldub [ %fp + -86 ], %g2 { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2013770: c6 0f bf a9 ldub [ %fp + -87 ], %g3 2013774: 85 28 a0 10 sll %g2, 0x10, %g2 2013778: 87 28 e0 08 sll %g3, 8, %g3 201377c: 86 10 c0 02 or %g3, %g2, %g3 2013780: c4 0f bf a8 ldub [ %fp + -88 ], %g2 2013784: 86 10 c0 02 or %g3, %g2, %g3 2013788: c4 0f bf ab ldub [ %fp + -85 ], %g2 201378c: 85 28 a0 18 sll %g2, 0x18, %g2 2013790: 86 10 c0 02 or %g3, %g2, %g3 2013794: 05 10 58 54 sethi %hi(0x41615000), %g2 2013798: 84 10 a2 52 or %g2, 0x252, %g2 ! 41615252 201379c: 80 a0 c0 02 cmp %g3, %g2 20137a0: 02 80 00 0a be 20137c8 <== ALWAYS TAKEN 20137a4: 90 10 00 1b mov %i3, %o0 * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 20137a8: 7f ff fd 3d call 2012c9c <== NOT EXECUTED 20137ac: 01 00 00 00 nop <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); 20137b0: 7f ff c6 2c call 2005060 <== NOT EXECUTED 20137b4: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20137b8: 40 00 1c 14 call 201a808 <__errno> <== NOT EXECUTED 20137bc: 01 00 00 00 nop <== NOT EXECUTED 20137c0: 10 80 00 82 b 20139c8 <== NOT EXECUTED 20137c4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 20137c8: d2 16 e0 40 lduh [ %i3 + 0x40 ], %o1 20137cc: 94 10 21 e4 mov 0x1e4, %o2 20137d0: 96 10 20 0c mov 0xc, %o3 20137d4: 7f ff fd d5 call 2012f28 <_fat_block_read> 20137d8: 98 07 bf a8 add %fp, -88, %o4 FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 20137dc: 80 a2 20 00 cmp %o0, 0 20137e0: 16 80 00 08 bge 2013800 <== ALWAYS TAKEN 20137e4: c6 0f bf ad ldub [ %fp + -83 ], %g3 * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 20137e8: 7f ff fd 2d call 2012c9c <== NOT EXECUTED 20137ec: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(fs_info); close(vol->fd); 20137f0: 7f ff c6 1c call 2005060 <== NOT EXECUTED 20137f4: d0 06 e0 60 ld [ %i3 + 0x60 ], %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 ); 20137f8: 81 c7 e0 08 ret <== NOT EXECUTED 20137fc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2013800: c4 0f bf ae ldub [ %fp + -82 ], %g2 2013804: 87 28 e0 08 sll %g3, 8, %g3 2013808: 85 28 a0 10 sll %g2, 0x10, %g2 201380c: 84 10 c0 02 or %g3, %g2, %g2 2013810: c6 0f bf ac ldub [ %fp + -84 ], %g3 2013814: 84 10 80 03 or %g2, %g3, %g2 2013818: c6 0f bf af ldub [ %fp + -81 ], %g3 201381c: 87 28 e0 18 sll %g3, 0x18, %g3 2013820: 84 10 80 03 or %g2, %g3, %g2 vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2013824: c6 0f bf b1 ldub [ %fp + -79 ], %g3 _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls_in_fs_info = 2013828: c4 26 e0 48 st %g2, [ %i3 + 0x48 ] FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; 201382c: c4 26 e0 44 st %g2, [ %i3 + 0x44 ] vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2013830: c4 0f bf b2 ldub [ %fp + -78 ], %g2 2013834: 87 28 e0 08 sll %g3, 8, %g3 2013838: 85 28 a0 10 sll %g2, 0x10, %g2 201383c: 84 10 c0 02 or %g3, %g2, %g2 2013840: c6 0f bf b0 ldub [ %fp + -80 ], %g3 2013844: 84 10 80 03 or %g2, %g3, %g2 2013848: c6 0f bf b3 ldub [ %fp + -77 ], %g3 201384c: 87 28 e0 18 sll %g3, 0x18, %g3 2013850: 84 10 80 03 or %g2, %g3, %g2 } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = 2013854: c4 26 e0 50 st %g2, [ %i3 + 0x50 ] FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); vol->next_cl = vol->next_cl_in_fs_info; 2013858: 10 80 00 07 b 2013874 201385c: c4 26 e0 4c st %g2, [ %i3 + 0x4c ] } } } else { vol->rdir_cl = 0; 2013860: c0 26 e0 3c clr [ %i3 + 0x3c ] vol->mirror = 0; 2013864: c0 2e e0 54 clrb [ %i3 + 0x54 ] vol->afat = 0; 2013868: c0 2e e0 5c clrb [ %i3 + 0x5c ] vol->free_cls = FAT_UNDEFINED_VALUE; 201386c: c2 26 e0 44 st %g1, [ %i3 + 0x44 ] vol->next_cl = FAT_UNDEFINED_VALUE; 2013870: c2 26 e0 4c st %g1, [ %i3 + 0x4c ] * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 2013874: 7f ff fd 0a call 2012c9c 2013878: 90 10 00 1b mov %i3, %o0 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 201387c: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 2013880: 7f ff bb 74 call 2002650 <.umul> 2013884: d0 0e e0 5c ldub [ %i3 + 0x5c ], %o0 2013888: c4 16 e0 18 lduh [ %i3 + 0x18 ], %g2 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 201388c: 92 10 20 0c mov 0xc, %o1 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2013890: 90 02 00 02 add %o0, %g2, %o0 2013894: d0 26 e0 58 st %o0, [ %i3 + 0x58 ] /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 2013898: 7f ff c5 db call 2005004 201389c: 90 10 20 02 mov 2, %o0 if ( fs_info->vhash == NULL ) 20138a0: 80 a2 20 00 cmp %o0, 0 20138a4: 02 80 00 12 be 20138ec <== NEVER TAKEN 20138a8: d0 26 e0 6c st %o0, [ %i3 + 0x6c ] 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 ); 20138ac: 84 02 20 04 add %o0, 4, %g2 20138b0: 86 02 20 10 add %o0, 0x10, %g3 head->next = tail; 20138b4: 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 ); 20138b8: 84 02 20 0c add %o0, 0xc, %g2 head->next = tail; head->previous = NULL; 20138bc: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20138c0: 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; 20138c4: c6 22 20 0c st %g3, [ %o0 + 0xc ] head->previous = NULL; 20138c8: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 20138cc: 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)); 20138d0: 92 10 20 0c mov 0xc, %o1 20138d4: 7f ff c5 cc call 2005004 20138d8: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 20138dc: 80 a2 20 00 cmp %o0, 0 20138e0: 12 80 00 06 bne 20138f8 <== ALWAYS TAKEN 20138e4: d0 26 e0 70 st %o0, [ %i3 + 0x70 ] 20138e8: 30 80 00 1c b,a 2013958 <== 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); 20138ec: 7f ff c5 dd call 2005060 <== NOT EXECUTED 20138f0: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED 20138f4: 30 80 00 32 b,a 20139bc <== 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 ); 20138f8: 84 02 20 04 add %o0, 4, %g2 head->next = tail; 20138fc: 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 ); 2013900: 84 02 20 0c add %o0, 0xc, %g2 head->next = tail; head->previous = NULL; 2013904: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2013908: c4 22 20 14 st %g2, [ %o0 + 0x14 ] 201390c: 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; 2013910: 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 ); 2013914: 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; 2013918: 84 10 21 00 mov 0x100, %g2 head->next = tail; 201391c: c6 22 20 0c st %g3, [ %o0 + 0xc ] 2013920: c4 26 e0 7c st %g2, [ %i3 + 0x7c ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2013924: c6 06 e0 30 ld [ %i3 + 0x30 ], %g3 2013928: c4 0e e0 03 ldub [ %i3 + 3 ], %g2 fs_info->index = 0; 201392c: c0 26 e0 78 clr [ %i3 + 0x78 ] } 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; 2013930: 85 28 c0 02 sll %g3, %g2, %g2 2013934: 85 28 a0 04 sll %g2, 4, %g2 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013938: 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; 201393c: c4 26 e0 80 st %g2, [ %i3 + 0x80 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2013940: 7f ff c5 b1 call 2005004 2013944: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2013948: 80 a2 20 00 cmp %o0, 0 201394c: 12 80 00 0d bne 2013980 <== ALWAYS TAKEN 2013950: d0 26 e0 74 st %o0, [ %i3 + 0x74 ] 2013954: 30 80 00 05 b,a 2013968 <== 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); 2013958: 7f ff c5 c2 call 2005060 <== NOT EXECUTED 201395c: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013960: 10 80 00 15 b 20139b4 <== NOT EXECUTED 2013964: d0 06 e0 6c ld [ %i3 + 0x6c ], %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); 2013968: 7f ff c5 be call 2005060 <== NOT EXECUTED 201396c: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2013970: 7f ff c6 79 call 2005354 <== NOT EXECUTED 2013974: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2013978: 10 80 00 0f b 20139b4 <== NOT EXECUTED 201397c: d0 06 e0 70 ld [ %i3 + 0x70 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2013980: d0 16 c0 00 lduh [ %i3 ], %o0 2013984: 7f ff c5 a0 call 2005004 2013988: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 201398c: 80 a2 20 00 cmp %o0, 0 2013990: 12 80 00 11 bne 20139d4 <== ALWAYS TAKEN 2013994: d0 26 e0 90 st %o0, [ %i3 + 0x90 ] { close(vol->fd); 2013998: 7f ff c5 b2 call 2005060 <== NOT EXECUTED 201399c: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20139a0: 7f ff c6 6d call 2005354 <== NOT EXECUTED 20139a4: d0 06 e0 6c ld [ %i3 + 0x6c ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20139a8: 7f ff c6 6b call 2005354 <== NOT EXECUTED 20139ac: d0 06 e0 70 ld [ %i3 + 0x70 ], %o0 <== NOT EXECUTED free(fs_info->uino); 20139b0: d0 06 e0 74 ld [ %i3 + 0x74 ], %o0 <== NOT EXECUTED 20139b4: 7f ff c6 68 call 2005354 <== NOT EXECUTED 20139b8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20139bc: 40 00 1b 93 call 201a808 <__errno> <== NOT EXECUTED 20139c0: 01 00 00 00 nop <== NOT EXECUTED 20139c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20139c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20139cc: 81 c7 e0 08 ret <== NOT EXECUTED 20139d0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 20139d4: c4 0e e0 04 ldub [ %i3 + 4 ], %g2 20139d8: c6 06 e0 34 ld [ %i3 + 0x34 ], %g3 20139dc: 84 00 bf ff add %g2, -1, %g2 /* * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) 20139e0: 80 88 80 03 btst %g2, %g3 20139e4: 22 80 00 04 be,a 20139f4 <== ALWAYS TAKEN 20139e8: c6 0e e0 0e ldub [ %i3 + 0xe ], %g3 vol->bytes_per_block_log2 = vol->bpc_log2; vol->sectors_per_block = vol->spc; } } return RC_OK; 20139ec: 81 c7 e0 08 ret <== NOT EXECUTED 20139f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 20139f4: 80 a0 e0 04 cmp %g3, 4 20139f8: 22 80 00 07 be,a 2013a14 20139fc: d0 06 e0 64 ld [ %i3 + 0x64 ], %o0 return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 2013a00: c6 06 e0 20 ld [ %i3 + 0x20 ], %g3 * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 2013a04: 80 88 80 03 btst %g2, %g3 2013a08: 12 80 00 0f bne 2013a44 <== NEVER TAKEN 2013a0c: b0 10 20 00 clr %i0 { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 2013a10: d0 06 e0 64 ld [ %i3 + 0x64 ], %o0 2013a14: d2 16 e0 06 lduh [ %i3 + 6 ], %o1 2013a18: 7f ff f6 78 call 20113f8 2013a1c: 94 10 20 01 mov 1, %o2 if (sc == RTEMS_SUCCESSFUL) 2013a20: 80 a2 20 00 cmp %o0, 0 2013a24: 12 80 00 08 bne 2013a44 <== NEVER TAKEN 2013a28: b0 10 20 00 clr %i0 { vol->bytes_per_block = vol->bpc; 2013a2c: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 2013a30: c4 36 e0 0a sth %g2, [ %i3 + 0xa ] vol->bytes_per_block_log2 = vol->bpc_log2; 2013a34: c4 0e e0 08 ldub [ %i3 + 8 ], %g2 2013a38: c4 2e e0 0c stb %g2, [ %i3 + 0xc ] vol->sectors_per_block = vol->spc; 2013a3c: c4 0e e0 04 ldub [ %i3 + 4 ], %g2 2013a40: c4 2e e0 09 stb %g2, [ %i3 + 9 ] } } return RC_OK; } 2013a44: 81 c7 e0 08 ret 2013a48: 81 e8 00 00 restore =============================================================================== 0201915c : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 201915c: 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; 2019160: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 2019164: 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; ssize_t bytes_written; *cls_added = 0; 2019168: c0 26 c0 00 clr [ %i3 ] if (count == 0) 201916c: 80 a6 a0 00 cmp %i2, 0 2019170: 02 80 00 7e be 2019368 <== NEVER TAKEN 2019174: a2 10 20 00 clr %l1 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2019178: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 201917c: 80 a4 3f ff cmp %l0, -1 2019180: 22 80 00 02 be,a 2019188 2019184: 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; 2019188: a8 05 20 02 add %l4, 2, %l4 201918c: a6 10 20 02 mov 2, %l3 2019190: 10 80 00 5a b 20192f8 2019194: 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); 2019198: 92 10 00 10 mov %l0, %o1 201919c: 7f ff fe ae call 2018c54 20191a0: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 20191a4: a2 92 20 00 orcc %o0, 0, %l1 20191a8: 02 80 00 0b be 20191d4 <== ALWAYS TAKEN 20191ac: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 20191b0: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 20191b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20191b8: 22 80 00 6d be,a 201936c <== NOT EXECUTED 20191bc: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 20191c0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 20191c4: 7f ff ff b7 call 20190a0 <== NOT EXECUTED 20191c8: 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; } 20191cc: 81 c7 e0 08 ret <== NOT EXECUTED 20191d0: 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) 20191d4: 80 a0 60 00 cmp %g1, 0 20191d8: 32 80 00 44 bne,a 20192e8 20191dc: 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) 20191e0: c2 06 c0 00 ld [ %i3 ], %g1 20191e4: 80 a0 60 00 cmp %g1, 0 20191e8: 12 80 00 0e bne 2019220 20191ec: 90 10 00 18 mov %i0, %o0 { *chain = cl4find; 20191f0: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 20191f4: 92 10 00 10 mov %l0, %o1 20191f8: 7f ff ff 09 call 2018e1c 20191fc: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2019200: 80 a2 20 00 cmp %o0, 0 2019204: 32 80 00 59 bne,a 2019368 <== NEVER TAKEN 2019208: 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) 201920c: 80 a7 60 00 cmp %i5, 0 2019210: 22 80 00 18 be,a 2019270 2019214: c2 06 c0 00 ld [ %i3 ], %g1 { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 2019218: 10 80 00 1c b 2019288 201921c: d6 16 20 06 lduh [ %i0 + 6 ], %o3 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 2019220: 92 10 00 10 mov %l0, %o1 2019224: 7f ff fe fe call 2018e1c 2019228: 94 10 3f ff mov -1, %o2 201922c: aa 10 00 08 mov %o0, %l5 if ( rc != RC_OK ) 2019230: 80 a5 60 00 cmp %l5, 0 2019234: 02 80 00 07 be 2019250 <== ALWAYS TAKEN 2019238: 90 10 00 18 mov %i0, %o0 { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 201923c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2019240: 7f ff ff 98 call 20190a0 <== NOT EXECUTED 2019244: 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; } 2019248: 81 c7 e0 08 ret <== NOT EXECUTED 201924c: 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); 2019250: 92 10 00 12 mov %l2, %o1 2019254: 7f ff fe f2 call 2018e1c 2019258: 94 10 00 10 mov %l0, %o2 if ( rc != RC_OK ) 201925c: a4 92 20 00 orcc %o0, 0, %l2 2019260: 02 bf ff ec be 2019210 <== ALWAYS TAKEN 2019264: 80 a7 60 00 cmp %i5, 0 return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 2019268: 10 80 00 35 b 201933c <== NOT EXECUTED 201926c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED goto cleanup; } } save_cln = cl4find; (*cls_added)++; 2019270: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 2019274: 80 a0 40 1a cmp %g1, %i2 2019278: 02 80 00 0f be 20192b4 201927c: c2 26 c0 00 st %g1, [ %i3 ] 2019280: 10 80 00 19 b 20192e4 2019284: a4 10 00 10 mov %l0, %l2 goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 2019288: 90 10 00 18 mov %i0, %o0 201928c: 92 10 00 10 mov %l0, %o1 2019290: 94 10 20 00 clr %o2 2019294: 7f ff e7 6b call 2013040 2019298: 98 10 20 00 clr %o4 if (fs_info->vol.bpc != bytes_written) 201929c: c2 16 20 06 lduh [ %i0 + 6 ], %g1 20192a0: 80 a0 40 08 cmp %g1, %o0 20192a4: 22 bf ff f3 be,a 2019270 <== ALWAYS TAKEN 20192a8: c2 06 c0 00 ld [ %i3 ], %g1 { rc = -1; 20192ac: 10 80 00 23 b 2019338 <== NOT EXECUTED 20192b0: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 20192b4: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20192b8: 80 a0 7f ff cmp %g1, -1 20192bc: 02 80 00 05 be 20192d0 <== ALWAYS TAKEN 20192c0: e0 26 20 4c st %l0, [ %i0 + 0x4c ] fs_info->vol.free_cls -= (*cls_added); 20192c4: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 20192c8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20192cc: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED *last_cl = save_cln; 20192d0: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 20192d4: 7f ff e6 72 call 2012c9c 20192d8: 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; } 20192dc: 81 c7 e0 08 ret 20192e0: 91 e8 00 11 restore %g0, %l1, %o0 fat_buf_release(fs_info); return rc; } } i++; cl4find++; 20192e4: a0 04 20 01 inc %l0 if (cl4find >= data_cls_val) 20192e8: 80 a4 00 14 cmp %l0, %l4 20192ec: 0a 80 00 03 bcs 20192f8 <== ALWAYS TAKEN 20192f0: a6 04 e0 01 inc %l3 cl4find = 2; 20192f4: 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) 20192f8: 80 a4 c0 14 cmp %l3, %l4 20192fc: 0a bf ff a7 bcs 2019198 <== ALWAYS TAKEN 2019300: 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 != FAT_UNDEFINED_VALUE) 2019304: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 <== NOT EXECUTED 2019308: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 201930c: 02 80 00 05 be 2019320 <== NOT EXECUTED 2019310: e4 26 20 4c st %l2, [ %i0 + 0x4c ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 2019314: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2019318: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 201931c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED *last_cl = save_cln; 2019320: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 2019324: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2019328: 7f ff e6 5d call 2012c9c <== NOT EXECUTED 201932c: 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; } 2019330: 81 c7 e0 08 ret <== NOT EXECUTED 2019334: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 2019338: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 201933c: 7f ff ff 59 call 20190a0 <== NOT EXECUTED 2019340: 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); 2019344: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2019348: 94 10 20 00 clr %o2 <== NOT EXECUTED 201934c: 7f ff fe b4 call 2018e1c <== NOT EXECUTED 2019350: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 2019354: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2019358: 7f ff e6 51 call 2012c9c <== NOT EXECUTED 201935c: a2 10 00 12 mov %l2, %l1 <== NOT EXECUTED return rc; } 2019360: 81 c7 e0 08 ret <== NOT EXECUTED 2019364: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED 2019368: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 201936c: 81 c7 e0 08 ret <== NOT EXECUTED 2019370: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02012fa8 : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2012fa8: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t cmpltd = 0; 2012fac: a0 10 20 00 clr %l0 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 2012fb0: 10 80 00 1b b 201301c 2012fb4: a2 10 20 01 mov 1, %l1 { c = MIN(count, (fs_info->vol.bps - ofs)); 2012fb8: ba 27 40 1a sub %i5, %i2, %i5 2012fbc: 80 a7 40 1b cmp %i5, %i3 2012fc0: 38 80 00 02 bgu,a 2012fc8 2012fc4: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bytes_per_block) 2012fc8: c2 16 20 0a lduh [ %i0 + 0xa ], %g1 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 2012fcc: 90 10 00 18 mov %i0, %o0 2012fd0: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) 2012fd4: 80 a7 40 01 cmp %i5, %g1 2012fd8: 02 80 00 03 be 2012fe4 <== NEVER TAKEN 2012fdc: 94 10 20 02 mov 2, %o2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 2012fe0: 94 10 20 01 mov 1, %o2 2012fe4: 7f ff ff a2 call 2012e6c 2012fe8: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2012fec: 80 a2 20 00 cmp %o0, 0 2012ff0: 12 80 00 10 bne 2013030 <== NEVER TAKEN 2012ff4: d0 07 bf fc ld [ %fp + -4 ], %o0 return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 2012ff8: 92 07 00 10 add %i4, %l0, %o1 2012ffc: 90 02 00 1a add %o0, %i2, %o0 2013000: 94 10 00 1d mov %i5, %o2 2013004: 40 00 20 c0 call 201b304 2013008: b6 26 c0 1d sub %i3, %i5, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 201300c: a0 07 40 10 add %i5, %l0, %l0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2013010: e2 2e 20 88 stb %l1, [ %i0 + 0x88 ] sec_num++; 2013014: b2 06 60 01 inc %i1 ofs = 0; 2013018: b4 10 20 00 clr %i2 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 201301c: 80 a6 e0 00 cmp %i3, 0 2013020: 32 bf ff e6 bne,a 2012fb8 2013024: fa 16 00 00 lduh [ %i0 ], %i5 cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 2013028: 81 c7 e0 08 ret 201302c: 91 e8 00 10 restore %g0, %l0, %o0 if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; 2013030: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 2013034: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 2013038: 81 c7 e0 08 ret <== NOT EXECUTED 201303c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02018e1c : fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 2018e1c: 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; uint8_t *sec_buf = NULL; 2018e20: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2018e24: 80 a6 60 01 cmp %i1, 1 2018e28: 08 80 00 98 bleu 2019088 <== NEVER TAKEN 2018e2c: ba 10 00 18 mov %i0, %i5 2018e30: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2018e34: 82 00 60 01 inc %g1 2018e38: 80 a6 40 01 cmp %i1, %g1 2018e3c: 28 80 00 03 bleu,a 2018e48 <== ALWAYS TAKEN 2018e40: c2 0e 20 0e ldub [ %i0 + 0xe ], %g1 2018e44: 30 80 00 91 b,a 2019088 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 2018e48: 84 08 60 01 and %g1, 1, %g2 2018e4c: 80 88 a0 ff btst 0xff, %g2 2018e50: 02 80 00 05 be 2018e64 2018e54: 86 08 60 02 and %g1, 2, %g3 2018e58: a1 36 60 01 srl %i1, 1, %l0 2018e5c: 10 80 00 06 b 2018e74 2018e60: a0 04 00 19 add %l0, %i1, %l0 2018e64: 80 88 e0 ff btst 0xff, %g3 2018e68: 02 80 00 03 be 2018e74 2018e6c: a1 2e 60 02 sll %i1, 2, %l0 2018e70: a1 2e 60 01 sll %i1, 1, %l0 2018e74: 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); 2018e78: 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) + 2018e7c: a1 34 00 03 srl %l0, %g3, %l0 2018e80: c6 07 60 58 ld [ %i5 + 0x58 ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2018e84: 02 80 00 05 be 2018e98 2018e88: a0 04 00 03 add %l0, %g3, %l0 2018e8c: b7 36 60 01 srl %i1, 1, %i3 2018e90: 10 80 00 07 b 2018eac 2018e94: b6 06 c0 19 add %i3, %i1, %i3 2018e98: 82 08 60 02 and %g1, 2, %g1 2018e9c: 80 88 60 ff btst 0xff, %g1 2018ea0: 02 80 00 03 be 2018eac 2018ea4: b7 2e 60 02 sll %i1, 2, %i3 2018ea8: b7 2e 60 01 sll %i1, 1, %i3 2018eac: f8 17 40 00 lduh [ %i5 ], %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 2018eb0: 90 10 00 1d mov %i5, %o0 2018eb4: 92 10 00 10 mov %l0, %o1 2018eb8: 94 10 20 01 mov 1, %o2 2018ebc: 7f ff e7 ec call 2012e6c 2018ec0: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2018ec4: b0 92 20 00 orcc %o0, 0, %i0 2018ec8: 12 80 00 4c bne 2018ff8 <== NEVER TAKEN 2018ecc: 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); 2018ed0: b9 37 20 10 srl %i4, 0x10, %i4 2018ed4: b8 07 3f ff add %i4, -1, %i4 2018ed8: b8 0e c0 1c and %i3, %i4, %i4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2018edc: f6 0f 60 0e ldub [ %i5 + 0xe ], %i3 2018ee0: 80 a6 e0 02 cmp %i3, 2 2018ee4: 02 80 00 53 be 2019030 2018ee8: 80 a6 e0 04 cmp %i3, 4 2018eec: 02 80 00 5b be 2019058 2018ef0: 80 a6 e0 01 cmp %i3, 1 2018ef4: 12 80 00 65 bne 2019088 <== NEVER TAKEN 2018ef8: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2018efc: 02 80 00 23 be 2018f88 2018f00: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 2018f04: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2018f08: 84 08 a0 0f and %g2, 0xf, %g2 2018f0c: c4 28 40 1c stb %g2, [ %g1 + %i4 ] *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 2018f10: c2 07 bf fc ld [ %fp + -4 ], %g1 2018f14: 85 2e a0 04 sll %i2, 4, %g2 2018f18: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 2018f1c: 84 10 c0 02 or %g3, %g2, %g2 2018f20: c4 28 40 1c stb %g2, [ %g1 + %i4 ] fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2018f24: c2 17 40 00 lduh [ %i5 ], %g1 2018f28: 82 00 7f ff add %g1, -1, %g1 2018f2c: 80 a7 00 01 cmp %i4, %g1 2018f30: 12 80 00 0f bne 2018f6c <== ALWAYS TAKEN 2018f34: f6 2f 60 88 stb %i3, [ %i5 + 0x88 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2018f38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2018f3c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 2018f40: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2018f44: 7f ff e7 ca call 2012e6c <== NOT EXECUTED 2018f48: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 2018f4c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2018f50: 12 80 00 2a bne 2018ff8 <== NOT EXECUTED 2018f54: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *sec_buf &= 0x00; *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 2018f58: b5 2e a0 14 sll %i2, 0x14, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0x00; 2018f5c: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 2018f60: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2018f64: 10 80 00 21 b 2018fe8 <== NOT EXECUTED 2018f68: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 2018f6c: c2 07 bf fc ld [ %fp + -4 ], %g1 2018f70: b8 07 20 01 inc %i4 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 2018f74: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 2018f78: c0 28 40 1c clrb [ %g1 + %i4 ] *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 2018f7c: b5 36 a0 18 srl %i2, 0x18, %i2 2018f80: 10 80 00 27 b 201901c 2018f84: c2 07 bf fc ld [ %fp + -4 ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *(sec_buf + ofs) &= 0x00; 2018f88: c0 28 40 1c clrb [ %g1 + %i4 ] *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 2018f8c: c2 07 bf fc ld [ %fp + -4 ], %g1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2018f90: b4 0e af ff and %i2, 0xfff, %i2 *(sec_buf + ofs) &= 0x00; *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 2018f94: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2018f98: 84 10 80 1a or %g2, %i2, %g2 2018f9c: c4 28 40 1c stb %g2, [ %g1 + %i4 ] fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2018fa0: c2 17 40 00 lduh [ %i5 ], %g1 2018fa4: 82 00 7f ff add %g1, -1, %g1 2018fa8: 80 a7 00 01 cmp %i4, %g1 2018fac: 12 80 00 15 bne 2019000 <== ALWAYS TAKEN 2018fb0: f6 2f 60 88 stb %i3, [ %i5 + 0x88 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2018fb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2018fb8: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 2018fbc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2018fc0: 7f ff e7 ab call 2012e6c <== NOT EXECUTED 2018fc4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 2018fc8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2018fcc: 12 80 00 0b bne 2018ff8 <== NOT EXECUTED 2018fd0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *sec_buf &= 0xF0; *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 2018fd4: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; 2018fd8: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2018fdc: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2018fe0: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 2018fe4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2018fe8: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2018fec: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 2018ff0: 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; 2018ff4: f6 2f 60 88 stb %i3, [ %i5 + 0x88 ] <== NOT EXECUTED 2018ff8: 81 c7 e0 08 ret <== NOT EXECUTED 2018ffc: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 2019000: c2 07 bf fc ld [ %fp + -4 ], %g1 2019004: b8 07 20 01 inc %i4 2019008: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 201900c: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 2019010: 84 08 bf f0 and %g2, -16, %g2 2019014: c4 28 40 1c stb %g2, [ %g1 + %i4 ] *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 2019018: c2 07 bf fc ld [ %fp + -4 ], %g1 201901c: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2019020: b4 10 80 1a or %g2, %i2, %i2 2019024: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 2019028: 81 c7 e0 08 ret 201902c: 81 e8 00 00 restore break; } return RC_OK; } 2019030: 03 00 00 3f sethi %hi(0xfc00), %g1 2019034: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2019038: 82 0e 80 01 and %i2, %g1, %g1 } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = (uint16_t )(CT_LE_W(in_val)); 201903c: 83 28 60 08 sll %g1, 8, %g1 2019040: b5 2e a0 10 sll %i2, 0x10, %i2 2019044: b5 36 a0 18 srl %i2, 0x18, %i2 2019048: b4 10 40 1a or %g1, %i2, %i2 } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = 201904c: c2 07 bf fc ld [ %fp + -4 ], %g1 2019050: 10 80 00 0a b 2019078 2019054: f4 30 40 1c sth %i2, [ %g1 + %i4 ] (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)); 2019058: 11 3c 00 00 sethi %hi(0xf0000000), %o0 201905c: 7f ff fe f2 call 2018c24 2019060: 90 2e 80 08 andn %i2, %o0, %o0 *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 2019064: c2 07 bf fc ld [ %fp + -4 ], %g1 2019068: c4 00 40 1c ld [ %g1 + %i4 ], %g2 201906c: 84 08 a0 f0 and %g2, 0xf0, %g2 *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 2019070: 90 12 00 02 or %o0, %g2, %o0 2019074: d0 20 40 1c st %o0, [ %g1 + %i4 ] 2019078: 82 10 20 01 mov 1, %g1 201907c: c2 2f 60 88 stb %g1, [ %i5 + 0x88 ] 2019080: 81 c7 e0 08 ret 2019084: 81 e8 00 00 restore fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2019088: 40 00 05 e0 call 201a808 <__errno> <== NOT EXECUTED 201908c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019090: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2019094: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2019098: 81 c7 e0 08 ret <== NOT EXECUTED 201909c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02013b1c : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 2013b1c: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 2013b20: 90 10 00 18 mov %i0, %o0 2013b24: 7f ff ff ca call 2013a4c 2013b28: ba 10 00 18 mov %i0, %i5 if ( rc != RC_OK ) 2013b2c: b0 92 20 00 orcc %o0, 0, %i0 2013b30: 32 80 00 02 bne,a 2013b38 <== NEVER TAKEN 2013b34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rc = -1; 2013b38: 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; 2013b3c: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013b40: 10 80 00 04 b 2013b50 2013b44: b6 06 c0 1c add %i3, %i4, %i3 free(node); 2013b48: 7f ff c6 03 call 2005354 <== NOT EXECUTED 2013b4c: 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 ); 2013b50: 7f ff da 07 call 200a36c <_Chain_Get> 2013b54: 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 ) 2013b58: 80 a2 20 00 cmp %o0, 0 2013b5c: 12 bf ff fb bne 2013b48 <== NEVER TAKEN 2013b60: 01 00 00 00 nop 2013b64: b8 07 20 0c add %i4, 0xc, %i4 rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 2013b68: 80 a7 20 18 cmp %i4, 0x18 2013b6c: 32 bf ff f5 bne,a 2013b40 2013b70: f6 07 60 6c ld [ %i5 + 0x6c ], %i3 2013b74: 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; 2013b78: f6 07 60 70 ld [ %i5 + 0x70 ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 2013b7c: 10 80 00 04 b 2013b8c 2013b80: b6 06 c0 1c add %i3, %i4, %i3 free(node); 2013b84: 7f ff c5 f4 call 2005354 <== NOT EXECUTED 2013b88: 01 00 00 00 nop <== NOT EXECUTED 2013b8c: 7f ff d9 f8 call 200a36c <_Chain_Get> 2013b90: 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 ) 2013b94: 80 a2 20 00 cmp %o0, 0 2013b98: 12 bf ff fb bne 2013b84 <== NEVER TAKEN 2013b9c: 01 00 00 00 nop 2013ba0: 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++) 2013ba4: 80 a7 20 18 cmp %i4, 0x18 2013ba8: 32 bf ff f5 bne,a 2013b7c 2013bac: f6 07 60 70 ld [ %i5 + 0x70 ], %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2013bb0: 7f ff c5 e9 call 2005354 2013bb4: d0 07 60 6c ld [ %i5 + 0x6c ], %o0 free(fs_info->rhash); 2013bb8: 7f ff c5 e7 call 2005354 2013bbc: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 free(fs_info->uino); 2013bc0: 7f ff c5 e5 call 2005354 2013bc4: d0 07 60 74 ld [ %i5 + 0x74 ], %o0 free(fs_info->sec_buf); 2013bc8: 7f ff c5 e3 call 2005354 2013bcc: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 close(fs_info->vol.fd); 2013bd0: 7f ff c5 24 call 2005060 2013bd4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if (rc) 2013bd8: 80 a6 20 00 cmp %i0, 0 2013bdc: 02 80 00 06 be 2013bf4 <== ALWAYS TAKEN 2013be0: 01 00 00 00 nop errno = EIO; 2013be4: 40 00 1b 09 call 201a808 <__errno> <== NOT EXECUTED 2013be8: 01 00 00 00 nop <== NOT EXECUTED 2013bec: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2013bf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2013bf4: 81 c7 e0 08 ret 2013bf8: 81 e8 00 00 restore =============================================================================== 02013a4c : return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 2013a4c: 9d e3 bf 98 save %sp, -104, %sp static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) 2013a50: c4 0e 20 0e ldub [ %i0 + 0xe ], %g2 return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 2013a54: ba 10 00 18 mov %i0, %i5 * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 2013a58: 90 10 20 00 clr %o0 if (fs_info->vol.type == FAT_FAT32) 2013a5c: 80 a0 a0 04 cmp %g2, 4 2013a60: 12 80 00 20 bne 2013ae0 2013a64: b4 10 20 00 clr %i2 { uint32_t free_count = fs_info->vol.free_cls; 2013a68: f6 06 20 44 ld [ %i0 + 0x44 ], %i3 uint32_t next_free = fs_info->vol.next_cl; if (free_count != fs_info->vol.free_cls_in_fs_info) 2013a6c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2013a70: 80 a6 c0 01 cmp %i3, %g1 2013a74: 02 80 00 0d be 2013aa8 <== ALWAYS TAKEN 2013a78: f8 06 20 4c ld [ %i0 + 0x4c ], %i4 { uint32_t le_free_count = CT_LE_L(free_count); 2013a7c: 7f ff fc 65 call 2012c10 <== NOT EXECUTED 2013a80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 2013a84: d2 16 20 40 lduh [ %i0 + 0x40 ], %o1 <== NOT EXECUTED uint32_t free_count = fs_info->vol.free_cls; uint32_t next_free = fs_info->vol.next_cl; if (free_count != fs_info->vol.free_cls_in_fs_info) { uint32_t le_free_count = CT_LE_L(free_count); 2013a88: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; 2013a8c: f6 26 20 48 st %i3, [ %i0 + 0x48 ] <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 2013a90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2013a94: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2013a98: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2013a9c: 7f ff fd 43 call 2012fa8 <== NOT EXECUTED 2013aa0: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED 2013aa4: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 2013aa8: c4 07 60 50 ld [ %i5 + 0x50 ], %g2 2013aac: 80 a7 00 02 cmp %i4, %g2 2013ab0: 02 80 00 0c be 2013ae0 <== NEVER TAKEN 2013ab4: 90 10 20 00 clr %o0 { uint32_t le_next_free = CT_LE_L(next_free); 2013ab8: 7f ff fc 56 call 2012c10 2013abc: 90 10 00 1c mov %i4, %o0 fs_info->vol.next_cl_in_fs_info = next_free; ret2 = fat_sector_write(fs_info, 2013ac0: d2 17 60 40 lduh [ %i5 + 0x40 ], %o1 &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); 2013ac4: d0 27 bf fc st %o0, [ %fp + -4 ] fs_info->vol.next_cl_in_fs_info = next_free; 2013ac8: f8 27 60 50 st %i4, [ %i5 + 0x50 ] ret2 = fat_sector_write(fs_info, 2013acc: 90 10 00 1d mov %i5, %o0 2013ad0: 94 10 21 ec mov 0x1ec, %o2 2013ad4: 96 10 20 04 mov 4, %o3 2013ad8: 7f ff fd 34 call 2012fa8 2013adc: 98 07 bf fc add %fp, -4, %o4 sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 2013ae0: 80 a2 20 00 cmp %o0, 0 2013ae4: 06 80 00 04 bl 2013af4 <== NEVER TAKEN 2013ae8: 80 a6 a0 00 cmp %i2, 0 2013aec: 16 80 00 03 bge 2013af8 <== ALWAYS TAKEN 2013af0: b0 10 20 00 clr %i0 { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; 2013af4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED fat_buf_release(fs_info); 2013af8: 7f ff fc 69 call 2012c9c 2013afc: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 2013b00: 7f ff f5 bb call 20111ec 2013b04: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 2013b08: 80 a2 20 00 cmp %o0, 0 2013b0c: 32 80 00 02 bne,a 2013b14 <== NEVER TAKEN 2013b10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rc = -1; return rc; } 2013b14: 81 c7 e0 08 ret 2013b18: 81 e8 00 00 restore =============================================================================== 02031988 : /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 2031988: 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 ); 203198c: 03 00 81 71 sethi %hi(0x205c400), %g1 2031990: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 205c7d0 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 2031994: c0 27 bf c4 clr [ %fp + -60 ] st.st_uid = 0; 2031998: c0 37 bf ca clrh [ %fp + -54 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 203199c: 80 a6 00 01 cmp %i0, %g1 20319a0: 1a 80 00 0c bcc 20319d0 20319a4: c0 37 bf cc clrh [ %fp + -52 ] iop = rtems_libio_iop( fd ); 20319a8: 83 2e 20 03 sll %i0, 3, %g1 20319ac: b1 2e 20 06 sll %i0, 6, %i0 20319b0: b0 26 00 01 sub %i0, %g1, %i0 20319b4: 03 00 81 82 sethi %hi(0x2060800), %g1 20319b8: fa 00 60 fc ld [ %g1 + 0xfc ], %i5 ! 20608fc 20319bc: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 20319c0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20319c4: 80 88 61 00 btst 0x100, %g1 20319c8: 32 80 00 08 bne,a 20319e8 20319cc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 20319d0: 40 00 10 d5 call 2035d24 <__errno> 20319d4: b0 10 3f ff mov -1, %i0 20319d8: 82 10 20 09 mov 9, %g1 20319dc: c2 22 00 00 st %g1, [ %o0 ] 20319e0: 81 c7 e0 08 ret 20319e4: 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 ); 20319e8: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20319ec: c2 00 40 00 ld [ %g1 ], %g1 20319f0: 9f c0 40 00 call %g1 20319f4: b8 07 60 14 add %i5, 0x14, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 20319f8: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 20319fc: 90 10 00 1c mov %i4, %o0 2031a00: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2031a04: 9f c0 40 00 call %g1 2031a08: 92 07 bf b8 add %fp, -72, %o1 if ( rv == 0 ) { 2031a0c: b0 92 20 00 orcc %o0, 0, %i0 2031a10: 32 80 00 13 bne,a 2031a5c <== NEVER TAKEN 2031a14: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED bool access_ok = rtems_filesystem_check_access( 2031a18: d2 07 bf c4 ld [ %fp + -60 ], %o1 2031a1c: d4 17 bf ca lduh [ %fp + -54 ], %o2 2031a20: d6 17 bf cc lduh [ %fp + -52 ], %o3 2031a24: 7f ff 71 b3 call 200e0f0 2031a28: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 2031a2c: 80 8a 20 ff btst 0xff, %o0 2031a30: 02 80 00 06 be 2031a48 2031a34: 90 07 bf a0 add %fp, -96, %o0 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 2031a38: 7f ff 70 6f call 200dbf4 2031a3c: 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; 2031a40: 10 80 00 07 b 2031a5c 2031a44: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 } else { errno = EACCES; 2031a48: 40 00 10 b7 call 2035d24 <__errno> 2031a4c: b0 10 3f ff mov -1, %i0 2031a50: 82 10 20 0d mov 0xd, %g1 2031a54: c2 22 00 00 st %g1, [ %o0 ] 2031a58: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 2031a5c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2031a60: c2 00 60 04 ld [ %g1 + 4 ], %g1 2031a64: 9f c0 40 00 call %g1 2031a68: 01 00 00 00 nop rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 2031a6c: 80 a6 20 00 cmp %i0, 0 2031a70: 12 80 00 05 bne 2031a84 2031a74: 01 00 00 00 nop rv = rtems_filesystem_chdir( &loc ); 2031a78: 7f ff c5 57 call 2022fd4 2031a7c: 90 07 bf a0 add %fp, -96, %o0 2031a80: b0 10 00 08 mov %o0, %i0 } return rv; } 2031a84: 81 c7 e0 08 ret 2031a88: 81 e8 00 00 restore =============================================================================== 020232bc : /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { 20232bc: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20232c0: 03 00 81 71 sethi %hi(0x205c400), %g1 20232c4: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 205c7d0 20232c8: 80 a6 00 01 cmp %i0, %g1 20232cc: 2a 80 00 03 bcs,a 20232d8 20232d0: 83 2e 20 03 sll %i0, 3, %g1 20232d4: 30 80 00 0a b,a 20232fc iop = rtems_libio_iop( fd ); 20232d8: b1 2e 20 06 sll %i0, 6, %i0 20232dc: b0 26 00 01 sub %i0, %g1, %i0 20232e0: 03 00 81 82 sethi %hi(0x2060800), %g1 20232e4: fa 00 60 fc ld [ %g1 + 0xfc ], %i5 ! 20608fc 20232e8: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 20232ec: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20232f0: 80 88 61 00 btst 0x100, %g1 20232f4: 32 80 00 06 bne,a 202330c 20232f8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 20232fc: 40 00 4a 8a call 2035d24 <__errno> 2023300: 01 00 00 00 nop 2023304: 10 80 00 1b b 2023370 2023308: 82 10 20 09 mov 9, %g1 ! 9 if (iop->pathinfo.mt_entry->writeable) { 202330c: c2 0a 20 29 ldub [ %o0 + 0x29 ], %g1 2023310: 80 a0 60 00 cmp %g1, 0 2023314: 02 80 00 14 be 2023364 <== NEVER TAKEN 2023318: 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 ); 202331c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023320: c2 00 40 00 ld [ %g1 ], %g1 2023324: 9f c0 40 00 call %g1 2023328: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 202332c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2023330: 90 07 60 14 add %i5, 0x14, %o0 2023334: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2023338: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 202333c: 9f c0 40 00 call %g1 2023340: 92 10 00 19 mov %i1, %o1 2023344: 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; 2023348: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 202334c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023350: c2 00 60 04 ld [ %g1 + 4 ], %g1 2023354: 9f c0 40 00 call %g1 2023358: 01 00 00 00 nop 202335c: 81 c7 e0 08 ret 2023360: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 2023364: 40 00 4a 70 call 2035d24 <__errno> <== NOT EXECUTED 2023368: 01 00 00 00 nop <== NOT EXECUTED 202336c: 82 10 20 1e mov 0x1e, %g1 ! 1e <== NOT EXECUTED 2023370: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2023374: 81 c7 e0 08 ret 2023378: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0202337c : /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { 202337c: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2023380: 03 00 81 71 sethi %hi(0x205c400), %g1 2023384: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 205c7d0 2023388: 80 a6 00 01 cmp %i0, %g1 202338c: 2a 80 00 03 bcs,a 2023398 2023390: 83 2e 20 03 sll %i0, 3, %g1 2023394: 30 80 00 0a b,a 20233bc iop = rtems_libio_iop( fd ); 2023398: b1 2e 20 06 sll %i0, 6, %i0 202339c: b0 26 00 01 sub %i0, %g1, %i0 20233a0: 03 00 81 82 sethi %hi(0x2060800), %g1 20233a4: fa 00 60 fc ld [ %g1 + 0xfc ], %i5 ! 20608fc 20233a8: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 20233ac: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20233b0: 80 88 61 00 btst 0x100, %g1 20233b4: 32 80 00 06 bne,a 20233cc 20233b8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 20233bc: 40 00 4a 5a call 2035d24 <__errno> 20233c0: 01 00 00 00 nop 20233c4: 10 80 00 1c b 2023434 20233c8: 82 10 20 09 mov 9, %g1 ! 9 if (iop->pathinfo.mt_entry->writeable) { 20233cc: c2 0a 20 29 ldub [ %o0 + 0x29 ], %g1 20233d0: 80 a0 60 00 cmp %g1, 0 20233d4: 02 80 00 15 be 2023428 <== NEVER TAKEN 20233d8: 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 ); 20233dc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 20233e0: c2 00 40 00 ld [ %g1 ], %g1 20233e4: 9f c0 40 00 call %g1 20233e8: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 20233ec: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 20233f0: 90 07 60 14 add %i5, 0x14, %o0 20233f4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 20233f8: 92 10 00 19 mov %i1, %o1 20233fc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2023400: 9f c0 40 00 call %g1 2023404: 94 10 00 1a mov %i2, %o2 2023408: 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; 202340c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 2023410: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2023414: c2 00 60 04 ld [ %g1 + 4 ], %g1 2023418: 9f c0 40 00 call %g1 202341c: 01 00 00 00 nop 2023420: 81 c7 e0 08 ret 2023424: 81 e8 00 00 restore owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 2023428: 40 00 4a 3f call 2035d24 <__errno> <== NOT EXECUTED 202342c: 01 00 00 00 nop <== NOT EXECUTED 2023430: 82 10 20 1e mov 0x1e, %g1 ! 1e <== NOT EXECUTED 2023434: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2023438: 81 c7 e0 08 ret 202343c: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0202e89c : int fcntl( int fd, int cmd, ... ) { 202e89c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202e8a0: 05 00 80 d1 sethi %hi(0x2034400), %g2 202e8a4: c4 00 a2 dc ld [ %g2 + 0x2dc ], %g2 ! 20346dc ... ) { int ret; va_list ap; va_start( ap, cmd ); 202e8a8: 82 07 a0 4c add %fp, 0x4c, %g1 202e8ac: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 202e8b0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 202e8b4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 202e8b8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202e8bc: 80 a6 00 02 cmp %i0, %g2 202e8c0: 1a 80 00 0c bcc 202e8f0 202e8c4: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 202e8c8: 85 2e 20 03 sll %i0, 3, %g2 202e8cc: b1 2e 20 06 sll %i0, 6, %i0 202e8d0: b0 26 00 02 sub %i0, %g2, %i0 202e8d4: 05 00 81 14 sethi %hi(0x2045000), %g2 202e8d8: fa 00 a2 00 ld [ %g2 + 0x200 ], %i5 ! 2045200 202e8dc: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202e8e0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 202e8e4: 80 8a 21 00 btst 0x100, %o0 202e8e8: 12 80 00 06 bne 202e900 202e8ec: 80 a6 60 09 cmp %i1, 9 202e8f0: 7f ff c4 ab call 201fb9c <__errno> 202e8f4: 01 00 00 00 nop 202e8f8: 10 80 00 5d b 202ea6c 202e8fc: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 202e900: 18 80 00 58 bgu 202ea60 202e904: 85 2e 60 02 sll %i1, 2, %g2 202e908: 07 00 80 ba sethi %hi(0x202e800), %g3 202e90c: 86 10 e0 74 or %g3, 0x74, %g3 ! 202e874 <_calloc_r+0x14> 202e910: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 202e914: 81 c0 80 00 jmp %g2 202e918: 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(); 202e91c: 7f ff 66 a6 call 20083b4 202e920: 01 00 00 00 nop if (diop != NULL) { 202e924: b8 92 20 00 orcc %o0, 0, %i4 202e928: 02 80 00 62 be 202eab0 202e92c: b0 10 3f ff mov -1, %i0 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 202e930: 7f ff 66 8b call 200835c 202e934: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 202e938: 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; 202e93c: b6 0a 3d ff and %o0, -513, %i3 diop->flags |= rtems_libio_fcntl_flags( oflag ); 202e940: 7f ff 66 7a call 2008328 202e944: 90 10 00 1b mov %i3, %o0 202e948: 90 12 00 1a or %o0, %i2, %o0 202e94c: 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; 202e950: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->lock_h)( mt_entry ); 202e954: c2 02 20 0c ld [ %o0 + 0xc ], %g1 202e958: c2 00 40 00 ld [ %g1 ], %g1 202e95c: 9f c0 40 00 call %g1 202e960: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 202e964: 92 07 60 14 add %i5, 0x14, %o1 202e968: 7f ff a0 32 call 2016a30 202e96c: 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; 202e970: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 (*mt_entry->ops->unlock_h)( mt_entry ); 202e974: c2 02 20 0c ld [ %o0 + 0xc ], %g1 202e978: c2 00 60 04 ld [ %g1 + 4 ], %g1 202e97c: 9f c0 40 00 call %g1 202e980: 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 ); 202e984: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 202e988: 90 10 00 1c mov %i4, %o0 202e98c: c2 00 40 00 ld [ %g1 ], %g1 202e990: 92 10 20 00 clr %o1 202e994: 94 10 00 1b mov %i3, %o2 202e998: 9f c0 40 00 call %g1 202e99c: 96 10 20 00 clr %o3 if ( rv == 0 ) { 202e9a0: b0 92 20 00 orcc %o0, 0, %i0 202e9a4: 12 80 00 11 bne 202e9e8 <== NEVER TAKEN 202e9a8: 03 00 81 14 sethi %hi(0x2045000), %g1 rv = diop - rtems_libio_iops; 202e9ac: f0 00 62 00 ld [ %g1 + 0x200 ], %i0 ! 2045200 202e9b0: b8 27 00 18 sub %i4, %i0, %i4 202e9b4: b9 3f 20 03 sra %i4, 3, %i4 202e9b8: 85 2f 20 03 sll %i4, 3, %g2 202e9bc: 83 2f 20 06 sll %i4, 6, %g1 202e9c0: 82 00 80 01 add %g2, %g1, %g1 202e9c4: 85 28 60 06 sll %g1, 6, %g2 202e9c8: 82 00 40 02 add %g1, %g2, %g1 202e9cc: 82 00 40 1c add %g1, %i4, %g1 202e9d0: b1 28 60 0f sll %g1, 0xf, %i0 202e9d4: 82 00 40 18 add %g1, %i0, %g1 202e9d8: 83 28 60 03 sll %g1, 3, %g1 202e9dc: b8 00 40 1c add %g1, %i4, %i4 202e9e0: 10 80 00 25 b 202ea74 202e9e4: b0 20 00 1c neg %i4, %i0 } else { rtems_libio_free( diop ); 202e9e8: 7f ff 66 8a call 2008410 <== NOT EXECUTED 202e9ec: 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) { 202e9f0: 10 80 00 22 b 202ea78 <== NOT EXECUTED 202e9f4: 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); 202e9f8: b1 32 20 0b srl %o0, 0xb, %i0 202e9fc: 10 80 00 21 b 202ea80 202ea00: 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 ) ) 202ea04: c2 00 40 00 ld [ %g1 ], %g1 202ea08: 80 a0 60 00 cmp %g1, 0 202ea0c: 22 80 00 0e be,a 202ea44 202ea10: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 202ea14: 10 80 00 0c b 202ea44 202ea18: 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 ); 202ea1c: 7f ff 66 50 call 200835c 202ea20: 01 00 00 00 nop 202ea24: 10 80 00 14 b 202ea74 202ea28: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 202ea2c: 7f ff 66 3f call 2008328 202ea30: 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); 202ea34: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 202ea38: 90 0a 22 01 and %o0, 0x201, %o0 202ea3c: 82 08 7d fe and %g1, -514, %g1 202ea40: 90 12 00 01 or %o0, %g1, %o0 202ea44: d0 27 60 10 st %o0, [ %i5 + 0x10 ] { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 202ea48: 10 80 00 0e b 202ea80 202ea4c: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 202ea50: 7f ff c4 53 call 201fb9c <__errno> 202ea54: 01 00 00 00 nop 202ea58: 10 80 00 05 b 202ea6c 202ea5c: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 202ea60: 7f ff c4 4f call 201fb9c <__errno> 202ea64: 01 00 00 00 nop 202ea68: 82 10 20 16 mov 0x16, %g1 ! 16 202ea6c: 10 80 00 10 b 202eaac 202ea70: 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) { 202ea74: 80 a6 20 00 cmp %i0, 0 202ea78: 06 80 00 0e bl 202eab0 <== NEVER TAKEN 202ea7c: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 202ea80: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 202ea84: 90 10 00 1d mov %i5, %o0 202ea88: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 202ea8c: 9f c0 40 00 call %g1 202ea90: 92 10 00 19 mov %i1, %o1 if (err) { 202ea94: ba 92 20 00 orcc %o0, 0, %i5 202ea98: 02 80 00 06 be 202eab0 <== ALWAYS TAKEN 202ea9c: 01 00 00 00 nop errno = err; 202eaa0: 7f ff c4 3f call 201fb9c <__errno> <== NOT EXECUTED 202eaa4: 01 00 00 00 nop <== NOT EXECUTED 202eaa8: 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); 202eaac: b0 10 3f ff mov -1, %i0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 202eab0: 81 c7 e0 08 ret 202eab4: 81 e8 00 00 restore =============================================================================== 0200dae0 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200dae0: 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) { 200dae4: 3b 00 80 86 sethi %hi(0x2021800), %i5 200dae8: c2 07 63 08 ld [ %i5 + 0x308 ], %g1 ! 2021b08 int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200daec: b6 10 00 18 mov %i0, %i3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200daf0: 80 a0 60 00 cmp %g1, 0 200daf4: 02 80 00 0c be 200db24 200daf8: b8 17 63 08 or %i5, 0x308, %i4 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200dafc: 03 00 80 86 sethi %hi(0x2021800), %g1 200db00: d0 00 63 08 ld [ %g1 + 0x308 ], %o0 ! 2021b08 200db04: 92 10 20 00 clr %o1 200db08: 7f ff ec be call 2008e00 200db0c: 94 10 20 00 clr %o2 } if (sc == RTEMS_SUCCESSFUL) { 200db10: 80 a2 20 00 cmp %o0, 0 200db14: 22 80 00 ee be,a 200decc <== ALWAYS TAKEN 200db18: fa 06 c0 00 ld [ %i3 ], %i5 return 0; } else { return -ENOMEM; 200db1c: 81 c7 e0 08 ret <== NOT EXECUTED 200db20: 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 ); 200db24: 03 00 80 87 sethi %hi(0x2021c00), %g1 200db28: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 2021c88 200db2c: 92 10 20 00 clr %o1 200db30: 7f ff ec b4 call 2008e00 200db34: 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) { 200db38: c2 07 63 08 ld [ %i5 + 0x308 ], %g1 200db3c: 80 a0 60 00 cmp %g1, 0 200db40: 12 80 00 0a bne 200db68 <== NEVER TAKEN 200db44: ba 10 20 00 clr %i5 sc = rtems_semaphore_create( 200db48: 11 14 12 54 sethi %hi(0x50495000), %o0 200db4c: 92 10 20 01 mov 1, %o1 200db50: 90 12 20 45 or %o0, 0x45, %o0 200db54: 94 10 20 54 mov 0x54, %o2 200db58: 96 10 20 00 clr %o3 200db5c: 7f ff ec 0c call 2008b8c 200db60: 98 10 00 1c mov %i4, %o4 200db64: ba 10 00 08 mov %o0, %i5 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200db68: 03 00 80 87 sethi %hi(0x2021c00), %g1 200db6c: 7f ff ec ee call 2008f24 200db70: d0 00 60 88 ld [ %g1 + 0x88 ], %o0 ! 2021c88 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200db74: 80 a7 60 00 cmp %i5, 0 200db78: 02 bf ff e1 be 200dafc 200db7c: b0 10 3f f4 mov -12, %i0 200db80: 81 c7 e0 08 ret 200db84: 81 e8 00 00 restore { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200db88: 7f ff db eb call 2004b34 200db8c: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200db90: ba 92 20 00 orcc %o0, 0, %i5 200db94: 02 80 00 d2 be 200dedc <== NEVER TAKEN 200db98: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200db9c: 40 00 0e 42 call 20114a4 200dba0: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200dba4: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200dba8: 90 10 22 00 mov 0x200, %o0 200dbac: 7f ff db e2 call 2004b34 200dbb0: c2 27 60 04 st %g1, [ %i5 + 4 ] if (! pipe->Buffer) 200dbb4: 80 a2 20 00 cmp %o0, 0 200dbb8: 02 80 00 2e be 200dc70 <== NEVER TAKEN 200dbbc: d0 27 40 00 st %o0, [ %i5 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200dbc0: 39 00 80 85 sethi %hi(0x2021400), %i4 200dbc4: d0 4f 20 48 ldsb [ %i4 + 0x48 ], %o0 ! 2021448 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200dbc8: 35 14 12 5c sethi %hi(0x50497000), %i2 200dbcc: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200dbd0: 92 10 20 00 clr %o1 200dbd4: 90 12 00 01 or %o0, %g1, %o0 200dbd8: 94 10 20 00 clr %o2 200dbdc: 40 00 04 0a call 200ec04 200dbe0: 96 07 60 2c add %i5, 0x2c, %o3 200dbe4: 80 a2 20 00 cmp %o0, 0 200dbe8: 12 80 00 20 bne 200dc68 200dbec: d0 4f 20 48 ldsb [ %i4 + 0x48 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200dbf0: 03 14 12 5d sethi %hi(0x50497400), %g1 200dbf4: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200dbf8: 92 10 20 00 clr %o1 200dbfc: 90 12 00 01 or %o0, %g1, %o0 200dc00: 94 10 20 00 clr %o2 200dc04: 40 00 04 00 call 200ec04 200dc08: 96 07 60 30 add %i5, 0x30, %o3 200dc0c: 80 a2 20 00 cmp %o0, 0 200dc10: 12 80 00 14 bne 200dc60 200dc14: d0 4f 20 48 ldsb [ %i4 + 0x48 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200dc18: b4 16 a3 00 or %i2, 0x300, %i2 200dc1c: 92 10 20 01 mov 1, %o1 200dc20: 90 12 00 1a or %o0, %i2, %o0 200dc24: 94 10 20 10 mov 0x10, %o2 200dc28: 96 10 20 00 clr %o3 200dc2c: 7f ff eb d8 call 2008b8c 200dc30: 98 07 60 28 add %i5, 0x28, %o4 200dc34: 80 a2 20 00 cmp %o0, 0 200dc38: 12 80 00 08 bne 200dc58 200dc3c: c2 0f 20 48 ldub [ %i4 + 0x48 ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200dc40: c4 4f 20 48 ldsb [ %i4 + 0x48 ], %g2 200dc44: 80 a0 a0 7a cmp %g2, 0x7a 200dc48: 12 80 00 a7 bne 200dee4 200dc4c: 82 00 60 01 inc %g1 c = 'a'; 200dc50: 10 80 00 a5 b 200dee4 200dc54: 82 10 20 61 mov 0x61, %g1 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200dc58: 40 00 04 1a call 200ecc0 200dc5c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200dc60: 40 00 04 18 call 200ecc0 200dc64: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200dc68: 7f ff da a3 call 20046f4 200dc6c: d0 07 40 00 ld [ %i5 ], %o0 err_buf: free(pipe); 200dc70: 7f ff da a1 call 20046f4 200dc74: 90 10 00 1d mov %i5, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200dc78: 10 80 00 13 b 200dcc4 200dc7c: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200dc80: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200dc84: 92 10 20 00 clr %o1 200dc88: 7f ff ec 5e call 2008e00 200dc8c: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200dc90: c2 06 c0 00 ld [ %i3 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200dc94: 80 a0 00 08 cmp %g0, %o0 200dc98: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200dc9c: 80 a0 60 00 cmp %g1, 0 200dca0: 12 80 00 09 bne 200dcc4 200dca4: b0 0e 3f fc and %i0, -4, %i0 if (err) 200dca8: 80 a6 20 00 cmp %i0, 0 200dcac: 22 80 00 06 be,a 200dcc4 <== ALWAYS TAKEN 200dcb0: fa 26 c0 00 st %i5, [ %i3 ] pipe_free(pipe); 200dcb4: 7f ff ff 53 call 200da00 <== NOT EXECUTED 200dcb8: 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); 200dcbc: 10 80 00 03 b 200dcc8 <== NOT EXECUTED 200dcc0: 03 00 80 86 sethi %hi(0x2021800), %g1 <== NOT EXECUTED 200dcc4: 03 00 80 86 sethi %hi(0x2021800), %g1 200dcc8: 7f ff ec 97 call 2008f24 200dccc: d0 00 63 08 ld [ %g1 + 0x308 ], %o0 ! 2021b08 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200dcd0: 80 a6 20 00 cmp %i0, 0 200dcd4: 12 80 00 86 bne 200deec 200dcd8: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200dcdc: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dce0: 82 08 60 06 and %g1, 6, %g1 200dce4: 80 a0 60 04 cmp %g1, 4 200dce8: 02 80 00 2e be 200dda0 200dcec: fa 06 c0 00 ld [ %i3 ], %i5 200dcf0: 80 a0 60 06 cmp %g1, 6 200dcf4: 02 80 00 56 be 200de4c 200dcf8: 80 a0 60 02 cmp %g1, 2 200dcfc: 12 80 00 6a bne 200dea4 <== NEVER TAKEN 200dd00: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200dd04: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200dd08: 82 00 60 01 inc %g1 200dd0c: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (pipe->Readers ++ == 0) 200dd10: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200dd14: 84 00 60 01 add %g1, 1, %g2 200dd18: 80 a0 60 00 cmp %g1, 0 200dd1c: 12 80 00 05 bne 200dd30 <== NEVER TAKEN 200dd20: c4 27 60 10 st %g2, [ %i5 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200dd24: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200dd28: 40 00 04 0f call 200ed64 200dd2c: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200dd30: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200dd34: 80 a0 60 00 cmp %g1, 0 200dd38: 12 80 00 5b bne 200dea4 200dd3c: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200dd40: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dd44: 80 88 60 01 btst 1, %g1 200dd48: 12 80 00 57 bne 200dea4 200dd4c: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200dd50: f8 07 60 24 ld [ %i5 + 0x24 ], %i4 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200dd54: 7f ff ec 74 call 2008f24 200dd58: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200dd5c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200dd60: 40 00 04 17 call 200edbc 200dd64: 92 10 20 00 clr %o1 200dd68: 80 a2 20 00 cmp %o0, 0 200dd6c: 12 80 00 52 bne 200deb4 <== NEVER TAKEN 200dd70: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200dd74: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200dd78: 7f ff ec 22 call 2008e00 200dd7c: 94 10 20 00 clr %o2 200dd80: 80 a2 20 00 cmp %o0, 0 200dd84: 32 80 00 4d bne,a 200deb8 <== NEVER TAKEN 200dd88: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200dd8c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200dd90: 80 a7 00 01 cmp %i4, %g1 200dd94: 02 bf ff f0 be 200dd54 <== NEVER TAKEN 200dd98: 01 00 00 00 nop 200dd9c: 30 80 00 42 b,a 200dea4 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200dda0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200dda4: 82 00 60 01 inc %g1 200dda8: c2 27 60 24 st %g1, [ %i5 + 0x24 ] if (pipe->Writers ++ == 0) 200ddac: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200ddb0: 84 00 60 01 add %g1, 1, %g2 200ddb4: 80 a0 60 00 cmp %g1, 0 200ddb8: 12 80 00 05 bne 200ddcc <== NEVER TAKEN 200ddbc: c4 27 60 14 st %g2, [ %i5 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200ddc0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200ddc4: 40 00 03 e8 call 200ed64 200ddc8: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200ddcc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200ddd0: 80 a0 60 00 cmp %g1, 0 200ddd4: 12 80 00 34 bne 200dea4 200ddd8: 01 00 00 00 nop 200dddc: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dde0: 80 88 60 01 btst 1, %g1 200dde4: 22 80 00 07 be,a 200de00 200dde8: f8 07 60 20 ld [ %i5 + 0x20 ], %i4 PIPE_UNLOCK(pipe); 200ddec: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200ddf0: 7f ff ec 4d call 2008f24 200ddf4: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200ddf8: 10 80 00 31 b 200debc 200ddfc: 90 10 00 1b mov %i3, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200de00: 7f ff ec 49 call 2008f24 200de04: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200de08: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200de0c: 40 00 03 ec call 200edbc 200de10: 92 10 20 00 clr %o1 200de14: 80 a2 20 00 cmp %o0, 0 200de18: 12 80 00 27 bne 200deb4 <== NEVER TAKEN 200de1c: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200de20: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200de24: 7f ff eb f7 call 2008e00 200de28: 94 10 20 00 clr %o2 200de2c: 80 a2 20 00 cmp %o0, 0 200de30: 32 80 00 22 bne,a 200deb8 <== NEVER TAKEN 200de34: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200de38: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200de3c: 80 a7 00 01 cmp %i4, %g1 200de40: 02 bf ff f0 be 200de00 <== NEVER TAKEN 200de44: 01 00 00 00 nop 200de48: 30 80 00 17 b,a 200dea4 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200de4c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200de50: 82 00 60 01 inc %g1 200de54: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (pipe->Readers ++ == 0) 200de58: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200de5c: 84 00 60 01 add %g1, 1, %g2 200de60: 80 a0 60 00 cmp %g1, 0 200de64: 12 80 00 05 bne 200de78 <== NEVER TAKEN 200de68: c4 27 60 10 st %g2, [ %i5 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200de6c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200de70: 40 00 03 bd call 200ed64 200de74: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; 200de78: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200de7c: 82 00 60 01 inc %g1 200de80: c2 27 60 24 st %g1, [ %i5 + 0x24 ] if (pipe->Writers ++ == 0) 200de84: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200de88: 84 00 60 01 add %g1, 1, %g2 200de8c: 80 a0 60 00 cmp %g1, 0 200de90: 12 80 00 05 bne 200dea4 <== NEVER TAKEN 200de94: c4 27 60 14 st %g2, [ %i5 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200de98: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200de9c: 40 00 03 b2 call 200ed64 200dea0: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200dea4: 7f ff ec 20 call 2008f24 200dea8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 return 0; 200deac: 81 c7 e0 08 ret 200deb0: 81 e8 00 00 restore /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 200deb4: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200deb8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200debc: 7f ff fe dc call 200da2c 200dec0: 92 10 00 19 mov %i1, %o1 return err; 200dec4: 81 c7 e0 08 ret 200dec8: 81 e8 00 00 restore err = pipe_lock(); if (err) return err; pipe = *pipep; if (pipe == NULL) { 200decc: 80 a7 60 00 cmp %i5, 0 200ded0: 32 bf ff 6d bne,a 200dc84 200ded4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200ded8: 30 bf ff 2c b,a 200db88 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200dedc: 10 bf ff 7a b 200dcc4 <== NOT EXECUTED 200dee0: b0 10 3f f4 mov -12, %i0 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200dee4: 10 bf ff 67 b 200dc80 200dee8: c2 2f 20 48 stb %g1, [ %i4 + 0x48 ] return 0; out_error: pipe_release(pipep, iop); return err; } 200deec: 81 c7 e0 08 ret 200def0: 81 e8 00 00 restore =============================================================================== 02009550 : */ long fpathconf( int fd, int name ) { 2009550: 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); 2009554: 03 00 80 44 sethi %hi(0x2011000), %g1 2009558: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 20111a8 200955c: 80 a6 00 01 cmp %i0, %g1 2009560: 2a 80 00 03 bcs,a 200956c 2009564: 83 2e 20 03 sll %i0, 3, %g1 2009568: 30 80 00 0a b,a 2009590 iop = rtems_libio_iop(fd); 200956c: b1 2e 20 06 sll %i0, 6, %i0 2009570: b0 26 00 01 sub %i0, %g1, %i0 2009574: 03 00 80 46 sethi %hi(0x2011800), %g1 2009578: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 2011940 200957c: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_is_open(iop); 2009580: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2009584: 80 88 61 00 btst 0x100, %g1 2009588: 32 80 00 06 bne,a 20095a0 <== ALWAYS TAKEN 200958c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2009590: 40 00 05 8f call 200abcc <__errno> 2009594: 01 00 00 00 nop 2009598: 10 80 00 32 b 2009660 200959c: 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 ) { 20095a0: 80 a6 60 0b cmp %i1, 0xb 20095a4: 18 80 00 2c bgu 2009654 20095a8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 20095ac: b3 2e 60 02 sll %i1, 2, %i1 20095b0: 05 00 80 25 sethi %hi(0x2009400), %g2 20095b4: 84 10 a1 20 or %g2, 0x120, %g2 ! 2009520 <_close_r+0x10> 20095b8: c4 00 80 19 ld [ %g2 + %i1 ], %g2 20095bc: 81 c0 80 00 jmp %g2 20095c0: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 20095c4: f0 00 40 00 ld [ %g1 ], %i0 break; 20095c8: 81 c7 e0 08 ret 20095cc: 81 e8 00 00 restore case _PC_MAX_CANON: return_value = the_limits->max_canon; 20095d0: f0 00 60 04 ld [ %g1 + 4 ], %i0 break; 20095d4: 81 c7 e0 08 ret 20095d8: 81 e8 00 00 restore case _PC_MAX_INPUT: return_value = the_limits->max_input; 20095dc: f0 00 60 08 ld [ %g1 + 8 ], %i0 break; 20095e0: 81 c7 e0 08 ret 20095e4: 81 e8 00 00 restore case _PC_NAME_MAX: return_value = the_limits->name_max; 20095e8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 break; 20095ec: 81 c7 e0 08 ret 20095f0: 81 e8 00 00 restore case _PC_PATH_MAX: return_value = the_limits->path_max; 20095f4: f0 00 60 10 ld [ %g1 + 0x10 ], %i0 break; 20095f8: 81 c7 e0 08 ret 20095fc: 81 e8 00 00 restore case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2009600: f0 00 60 14 ld [ %g1 + 0x14 ], %i0 break; 2009604: 81 c7 e0 08 ret 2009608: 81 e8 00 00 restore case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 200960c: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 break; 2009610: 81 c7 e0 08 ret 2009614: 81 e8 00 00 restore case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2009618: f0 00 60 20 ld [ %g1 + 0x20 ], %i0 break; 200961c: 81 c7 e0 08 ret 2009620: 81 e8 00 00 restore case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009624: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 break; 2009628: 81 c7 e0 08 ret 200962c: 81 e8 00 00 restore case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2009630: f0 00 60 18 ld [ %g1 + 0x18 ], %i0 break; 2009634: 81 c7 e0 08 ret 2009638: 81 e8 00 00 restore case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 200963c: f0 00 60 24 ld [ %g1 + 0x24 ], %i0 break; 2009640: 81 c7 e0 08 ret 2009644: 81 e8 00 00 restore case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2009648: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 break; 200964c: 81 c7 e0 08 ret 2009650: 81 e8 00 00 restore default: rtems_set_errno_and_return_minus_one( EINVAL ); 2009654: 40 00 05 5e call 200abcc <__errno> 2009658: 01 00 00 00 nop 200965c: 82 10 20 16 mov 0x16, %g1 ! 16 2009660: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 2009664: 81 c7 e0 08 ret 2009668: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 020035b0 : #include void free( void *ptr ) { 20035b0: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 20035b4: 03 00 80 6f sethi %hi(0x201bc00), %g1 20035b8: 82 10 62 f8 or %g1, 0x2f8, %g1 ! 201bef8 20035bc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 20035c0: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 20035c4: 84 00 a0 01 inc %g2 if ( !ptr ) 20035c8: 80 a6 20 00 cmp %i0, 0 20035cc: 02 80 00 21 be 2003650 20035d0: 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()) && 20035d4: 03 00 80 70 sethi %hi(0x201c000), %g1 20035d8: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 201c28c <_System_state_Current> 20035dc: 80 a0 60 03 cmp %g1, 3 20035e0: 12 80 00 09 bne 2003604 <== NEVER TAKEN 20035e4: 03 00 80 6f sethi %hi(0x201bc00), %g1 !malloc_is_system_state_OK() ) { 20035e8: 40 00 00 78 call 20037c8 20035ec: 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()) && 20035f0: 80 8a 20 ff btst 0xff, %o0 20035f4: 12 80 00 04 bne 2003604 20035f8: 03 00 80 6f sethi %hi(0x201bc00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 20035fc: 40 00 00 8c call 200382c 2003600: 81 e8 00 00 restore } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003604: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 2003608: 80 a0 60 00 cmp %g1, 0 200360c: 02 80 00 06 be 2003624 2003610: 3b 00 80 6d sethi %hi(0x201b400), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003614: c2 00 60 08 ld [ %g1 + 8 ], %g1 2003618: 9f c0 40 00 call %g1 200361c: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2003620: 3b 00 80 6d sethi %hi(0x201b400), %i5 2003624: d0 07 60 e0 ld [ %i5 + 0xe0 ], %o0 ! 201b4e0 2003628: 40 00 17 4d call 200935c <_Protected_heap_Free> 200362c: 92 10 00 19 mov %i1, %o1 2003630: 80 8a 20 ff btst 0xff, %o0 2003634: 12 80 00 07 bne 2003650 2003638: c2 07 60 e0 ld [ %i5 + 0xe0 ], %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 200363c: 31 00 80 68 sethi %hi(0x201a000), %i0 2003640: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 2003644: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 2003648: 40 00 03 68 call 20043e8 200364c: 91 ee 20 08 restore %i0, 8, %o0 2003650: 81 c7 e0 08 ret 2003654: 81 e8 00 00 restore =============================================================================== 02018ee8 : int fstat( int fd, struct stat *sbuf ) { 2018ee8: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 2018eec: 80 a6 60 00 cmp %i1, 0 2018ef0: 32 80 00 06 bne,a 2018f08 <== ALWAYS TAKEN 2018ef4: 03 00 80 6d sethi %hi(0x201b400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 2018ef8: 7f ff d6 74 call 200e8c8 <__errno> <== NOT EXECUTED 2018efc: 01 00 00 00 nop <== NOT EXECUTED 2018f00: 10 80 00 12 b 2018f48 <== NOT EXECUTED 2018f04: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2018f08: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 2018f0c: 80 a6 00 01 cmp %i0, %g1 2018f10: 1a 80 00 0b bcc 2018f3c 2018f14: 83 2e 20 03 sll %i0, 3, %g1 2018f18: b1 2e 20 06 sll %i0, 6, %i0 2018f1c: b0 26 00 01 sub %i0, %g1, %i0 2018f20: 03 00 80 6f sethi %hi(0x201bc00), %g1 2018f24: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 201beec 2018f28: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 2018f2c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2018f30: 80 88 61 00 btst 0x100, %g1 2018f34: 12 80 00 08 bne 2018f54 2018f38: 94 10 20 48 mov 0x48, %o2 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 2018f3c: 7f ff d6 63 call 200e8c8 <__errno> 2018f40: 01 00 00 00 nop 2018f44: 82 10 20 09 mov 9, %g1 ! 9 2018f48: c2 22 00 00 st %g1, [ %o0 ] 2018f4c: 81 c7 e0 08 ret 2018f50: 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) ); 2018f54: 90 10 00 19 mov %i1, %o0 2018f58: 7f ff d8 ea call 200f300 2018f5c: 92 10 20 00 clr %o1 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 2018f60: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2018f64: 90 06 20 14 add %i0, 0x14, %o0 2018f68: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2018f6c: 9f c0 40 00 call %g1 2018f70: 92 10 00 19 mov %i1, %o1 } 2018f74: 81 c7 e0 08 ret 2018f78: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020034c8 : 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) { 20034c8: 03 00 80 7f sethi %hi(0x201fc00), %g1 20034cc: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 201fff8 20034d0: 80 a2 00 01 cmp %o0, %g1 20034d4: 1a 80 00 1e bcc 200354c <== NEVER TAKEN 20034d8: 03 00 80 7f sethi %hi(0x201fc00), %g1 20034dc: c2 00 63 fc ld [ %g1 + 0x3fc ], %g1 ! 201fffc 20034e0: 80 a0 60 00 cmp %g1, 0 20034e4: 22 80 00 1b be,a 2003550 <== NEVER TAKEN 20034e8: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_disk_device_table *dtab = disktab + major; 20034ec: 91 2a 20 03 sll %o0, 3, %o0 20034f0: 84 00 40 08 add %g1, %o0, %g2 if (minor < dtab->size && dtab->minor != NULL) { 20034f4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 20034f8: 80 a2 40 02 cmp %o1, %g2 20034fc: 3a 80 00 15 bcc,a 2003550 <== NEVER TAKEN 2003500: 90 10 20 00 clr %o0 <== NOT EXECUTED 2003504: c2 00 40 08 ld [ %g1 + %o0 ], %g1 2003508: 80 a0 60 00 cmp %g1, 0 200350c: 02 80 00 10 be 200354c <== NEVER TAKEN 2003510: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; if (dd != NULL && !lookup_only) { 2003514: 80 a2 a0 01 cmp %o2, 1 2003518: 02 80 00 0e be 2003550 200351c: d0 00 40 09 ld [ %g1 + %o1 ], %o0 2003520: 80 a2 20 00 cmp %o0, 0 2003524: 02 80 00 0b be 2003550 <== NEVER TAKEN 2003528: 01 00 00 00 nop if (!dd->deleted) { 200352c: c2 0a 20 40 ldub [ %o0 + 0x40 ], %g1 2003530: 80 a0 60 00 cmp %g1, 0 2003534: 32 80 00 07 bne,a 2003550 2003538: 90 10 20 00 clr %o0 ++dd->uses; 200353c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 2003540: 82 00 60 01 inc %g1 2003544: 81 c3 e0 08 retl 2003548: c2 22 20 14 st %g1, [ %o0 + 0x14 ] return dd; } } return NULL; 200354c: 90 10 20 00 clr %o0 <== NOT EXECUTED } 2003550: 81 c3 e0 08 retl =============================================================================== 020048b4 : * 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, 20048b4: 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); 20048b8: 40 00 05 85 call 2005ecc 20048bc: 90 10 22 04 mov 0x204, %o0 if (s == NULL) { return RTEMS_NO_MEMORY; 20048c0: 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) 20048c4: 80 a2 20 00 cmp %o0, 0 20048c8: 02 80 00 0f be 2004904 <== NEVER TAKEN 20048cc: ba 10 00 08 mov %o0, %i5 { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 20048d0: 90 10 00 18 mov %i0, %o0 20048d4: 92 07 60 04 add %i5, 4, %o1 20048d8: 40 00 08 43 call 20069e4 20048dc: 94 10 22 00 mov 0x200, %o2 if (n != RTEMS_IDE_SECTOR_SIZE) 20048e0: 80 a2 22 00 cmp %o0, 0x200 20048e4: 22 80 00 06 be,a 20048fc <== ALWAYS TAKEN 20048e8: f2 27 40 00 st %i1, [ %i5 ] { free(s); 20048ec: 40 00 03 e7 call 2005888 <== NOT EXECUTED 20048f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return RTEMS_IO_ERROR; 20048f4: 10 80 00 04 b 2004904 <== NOT EXECUTED 20048f8: 82 10 20 1b mov 0x1b, %g1 <== NOT EXECUTED } s->sector_num = sector_num; *sector = s; 20048fc: fa 26 80 00 st %i5, [ %i2 ] return RTEMS_SUCCESSFUL; 2004900: 82 10 20 00 clr %g1 } 2004904: 81 c7 e0 08 ret 2004908: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0202eae0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202eae0: 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 ); 202eae4: 03 00 80 d1 sethi %hi(0x2034400), %g1 202eae8: c2 00 62 dc ld [ %g1 + 0x2dc ], %g1 ! 20346dc 202eaec: 80 a6 00 01 cmp %i0, %g1 202eaf0: 1a 80 00 08 bcc 202eb10 <== NEVER TAKEN 202eaf4: ba 10 20 00 clr %i5 202eaf8: 83 2e 20 03 sll %i0, 3, %g1 202eafc: b1 2e 20 06 sll %i0, 6, %i0 202eb00: b0 26 00 01 sub %i0, %g1, %i0 202eb04: 03 00 81 14 sethi %hi(0x2045000), %g1 202eb08: fa 00 62 00 ld [ %g1 + 0x200 ], %i5 ! 2045200 202eb0c: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 202eb10: 7f ff 6d 05 call 2009f24 202eb14: 90 07 60 14 add %i5, 0x14, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 202eb18: 80 a2 20 00 cmp %o0, 0 202eb1c: 22 80 00 08 be,a 202eb3c 202eb20: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 202eb24: 7f ff c4 1e call 201fb9c <__errno> 202eb28: b0 10 3f ff mov -1, %i0 202eb2c: 82 10 20 14 mov 0x14, %g1 202eb30: c2 22 00 00 st %g1, [ %o0 ] 202eb34: 81 c7 e0 08 ret 202eb38: 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 ); 202eb3c: 90 10 00 1d mov %i5, %o0 202eb40: c2 00 60 08 ld [ %g1 + 8 ], %g1 202eb44: 92 10 00 19 mov %i1, %o1 202eb48: 9f c0 40 00 call %g1 202eb4c: 94 10 00 1a mov %i2, %o2 } 202eb50: 81 c7 e0 08 ret 202eb54: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003658 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 2003658: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 200365c: 80 a6 20 00 cmp %i0, 0 2003660: 12 80 00 08 bne 2003680 <== ALWAYS TAKEN 2003664: 90 07 bf f8 add %fp, -8, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 2003668: 40 00 2c 98 call 200e8c8 <__errno> <== NOT EXECUTED 200366c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003670: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2003674: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003678: 81 c7 e0 08 ret <== NOT EXECUTED 200367c: 81 e8 00 00 restore <== NOT EXECUTED ) { Timestamp_Control snapshot_as_timestamp; Timestamp_Control *snapshot_as_timestamp_ptr; snapshot_as_timestamp_ptr = 2003680: 13 00 80 6f sethi %hi(0x201bc00), %o1 2003684: 40 00 13 ce call 20085bc <_TOD_Get_with_nanoseconds> 2003688: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 201bfc8 <_TOD> struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); } 200368c: f8 1a 00 00 ldd [ %o0 ], %i4 static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); 2003690: 94 10 20 00 clr %o2 2003694: 90 10 00 1c mov %i4, %o0 2003698: 92 10 00 1d mov %i5, %o1 200369c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20036a0: 40 00 51 81 call 2017ca4 <__divdi3> 20036a4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); 20036a8: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); 20036ac: d2 26 00 00 st %o1, [ %i0 ] _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); 20036b0: 94 10 20 00 clr %o2 20036b4: 92 10 00 1d mov %i5, %o1 20036b8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20036bc: 40 00 52 65 call 2018050 <__moddi3> 20036c0: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 20036c4: 94 10 20 00 clr %o2 20036c8: 40 00 51 77 call 2017ca4 <__divdi3> 20036cc: 96 10 23 e8 mov 0x3e8, %o3 20036d0: d2 26 20 04 st %o1, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 20036d4: 81 c7 e0 08 ret 20036d8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020239c8 : /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 20239c8: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 20239cc: 03 00 81 80 sethi %hi(0x2060000), %g1 20239d0: c4 48 63 08 ldsb [ %g1 + 0x308 ], %g2 ! 2060308 20239d4: 80 a0 a0 00 cmp %g2, 0 20239d8: 12 80 00 2f bne 2023a94 20239dc: 84 10 20 01 mov 1, %g2 return; etc_passwd_initted = 1; mkdir("/etc", 0777); 20239e0: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 20239e4: c4 28 63 08 stb %g2, [ %g1 + 0x308 ] mkdir("/etc", 0777); 20239e8: 11 00 81 5d sethi %hi(0x2057400), %o0 20239ec: 7f ff 7f 67 call 2003788 20239f0: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 20576f0 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 20239f4: 3b 00 81 5d sethi %hi(0x2057400), %i5 20239f8: 13 00 81 70 sethi %hi(0x205c000), %o1 20239fc: 90 17 62 f8 or %i5, 0x2f8, %o0 2023a00: 40 00 4b 79 call 20367e4 2023a04: 92 12 60 00 mov %o1, %o1 2023a08: 80 a2 20 00 cmp %o0, 0 2023a0c: 22 80 00 03 be,a 2023a18 2023a10: 90 17 62 f8 or %i5, 0x2f8, %o0 2023a14: 30 80 00 0b b,a 2023a40 fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 2023a18: 13 00 81 55 sethi %hi(0x2055400), %o1 2023a1c: 40 00 4b 72 call 20367e4 2023a20: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 20556a8 2023a24: ba 92 20 00 orcc %o0, 0, %i5 2023a28: 02 80 00 08 be 2023a48 <== NEVER TAKEN 2023a2c: 11 00 81 5d sethi %hi(0x2057400), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 2023a30: 92 10 00 1d mov %i5, %o1 2023a34: 40 00 4b cf call 2036970 2023a38: 90 12 23 08 or %o0, 0x308, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 2023a3c: 90 10 00 1d mov %i5, %o0 2023a40: 40 00 49 0b call 2035e6c 2023a44: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2023a48: 3b 00 81 5d sethi %hi(0x2057400), %i5 2023a4c: 13 00 81 70 sethi %hi(0x205c000), %o1 2023a50: 90 17 63 70 or %i5, 0x370, %o0 2023a54: 40 00 4b 64 call 20367e4 2023a58: 92 12 60 00 mov %o1, %o1 2023a5c: b0 92 20 00 orcc %o0, 0, %i0 2023a60: 12 80 00 0b bne 2023a8c 2023a64: 90 17 63 70 or %i5, 0x370, %o0 fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2023a68: 13 00 81 55 sethi %hi(0x2055400), %o1 2023a6c: 40 00 4b 5e call 20367e4 2023a70: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 20556a8 2023a74: b0 92 20 00 orcc %o0, 0, %i0 2023a78: 02 80 00 07 be 2023a94 <== NEVER TAKEN 2023a7c: 11 00 81 5d sethi %hi(0x2057400), %o0 fprintf( fp, "root:x:0:root\n" 2023a80: 92 10 00 18 mov %i0, %o1 2023a84: 40 00 4b bb call 2036970 2023a88: 90 12 23 80 or %o0, 0x380, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2023a8c: 40 00 48 f8 call 2035e6c 2023a90: 81 e8 00 00 restore 2023a94: 81 c7 e0 08 ret 2023a98: 81 e8 00 00 restore =============================================================================== 0200614c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 200614c: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 2006150: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 2006154: 80 88 60 20 btst 0x20, %g1 2006158: 32 80 00 02 bne,a 2006160 <== NEVER TAKEN 200615c: b0 0e 20 7f and %i0, 0x7f, %i0 <== NOT EXECUTED c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 2006160: 80 88 62 00 btst 0x200, %g1 2006164: 02 80 00 0c be 2006194 2006168: 80 a6 20 0d cmp %i0, 0xd c = tolower (c); 200616c: 05 00 80 6d sethi %hi(0x201b400), %g2 2006170: c4 00 a3 40 ld [ %g2 + 0x340 ], %g2 ! 201b740 <__ctype_ptr__> 2006174: 84 00 80 18 add %g2, %i0, %g2 2006178: c4 08 a0 01 ldub [ %g2 + 1 ], %g2 200617c: 84 08 a0 03 and %g2, 3, %g2 2006180: 80 a0 a0 01 cmp %g2, 1 2006184: 22 80 00 02 be,a 200618c 2006188: b0 06 20 20 add %i0, 0x20, %i0 200618c: b0 0e 20 ff and %i0, 0xff, %i0 if (c == '\r') { 2006190: 80 a6 20 0d cmp %i0, 0xd 2006194: 12 80 00 0b bne 20061c0 2006198: 80 a6 20 0a cmp %i0, 0xa if (tty->termios.c_iflag & IGNCR) 200619c: 80 88 60 80 btst 0x80, %g1 20061a0: 02 80 00 04 be 20061b0 <== ALWAYS TAKEN 20061a4: 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; 20061a8: 81 c7 e0 08 ret <== NOT EXECUTED 20061ac: 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) 20061b0: 32 80 00 0d bne,a 20061e4 <== ALWAYS TAKEN 20061b4: 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)) { 20061b8: 10 80 00 0c b 20061e8 <== NOT EXECUTED 20061bc: 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)) { 20061c0: 12 80 00 07 bne 20061dc 20061c4: 80 a6 20 00 cmp %i0, 0 20061c8: 80 88 60 40 btst 0x40, %g1 20061cc: 32 80 00 06 bne,a 20061e4 <== NEVER TAKEN 20061d0: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 20061d4: 10 80 00 05 b 20061e8 20061d8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20061dc: 02 80 00 51 be 2006320 <== NEVER TAKEN 20061e0: 03 00 80 6d sethi %hi(0x201b400), %g1 20061e4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20061e8: 80 88 60 02 btst 2, %g1 20061ec: 22 80 00 4d be,a 2006320 20061f0: 03 00 80 6d sethi %hi(0x201b400), %g1 if (c == tty->termios.c_cc[VERASE]) { 20061f4: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 20061f8: 80 a0 80 18 cmp %g2, %i0 20061fc: 32 80 00 08 bne,a 200621c 2006200: 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) 2006204: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2006208: 80 a0 60 00 cmp %g1, 0 200620c: 02 80 00 57 be 2006368 2006210: 90 10 00 19 mov %i1, %o0 2006214: 10 80 00 1d b 2006288 2006218: 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]) { 200621c: 80 a0 80 18 cmp %g2, %i0 2006220: 32 80 00 1d bne,a 2006294 2006224: 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) 2006228: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 200622c: 80 a0 a0 00 cmp %g2, 0 2006230: 02 80 00 4e be 2006368 <== NEVER TAKEN 2006234: 80 88 60 08 btst 8, %g1 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2006238: 12 80 00 04 bne 2006248 <== ALWAYS TAKEN 200623c: 90 10 00 19 mov %i1, %o0 tty->ccount = 0; 2006240: 10 80 00 4a b 2006368 <== NOT EXECUTED 2006244: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 2006248: 80 88 60 10 btst 0x10, %g1 200624c: 12 80 00 0f bne 2006288 <== ALWAYS TAKEN 2006250: 92 10 20 01 mov 1, %o1 tty->ccount = 0; 2006254: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2006258: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200625c: 7f ff ff 2d call 2005f10 <== NOT EXECUTED 2006260: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2006264: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2006268: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200626c: 22 80 00 42 be,a 2006374 <== NOT EXECUTED 2006270: b0 10 20 00 clr %i0 <== NOT EXECUTED echo ('\n', tty); 2006274: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 2006278: 7f ff ff 26 call 2005f10 <== NOT EXECUTED 200627c: 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; 2006280: 81 c7 e0 08 ret <== NOT EXECUTED 2006284: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 2006288: 7f ff ff 43 call 2005f94 200628c: b0 10 20 00 clr %i0 2006290: 30 80 00 39 b,a 2006374 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2006294: 80 a0 80 18 cmp %g2, %i0 2006298: 02 80 00 36 be 2006370 <== NEVER TAKEN 200629c: 80 a6 20 0a cmp %i0, 0xa return 1; } else if (c == '\n') { 20062a0: 32 80 00 0d bne,a 20062d4 20062a4: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 if (tty->termios.c_lflag & (ECHO | ECHONL)) 20062a8: 80 88 60 48 btst 0x48, %g1 20062ac: 22 80 00 06 be,a 20062c4 <== NEVER TAKEN 20062b0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20062b4: 90 10 20 0a mov 0xa, %o0 20062b8: 7f ff ff 16 call 2005f10 20062bc: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 20062c0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20062c4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 20062c8: 86 10 20 0a mov 0xa, %g3 20062cc: 10 80 00 12 b 2006314 20062d0: c6 28 80 01 stb %g3, [ %g2 + %g1 ] return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 20062d4: 80 a0 80 18 cmp %g2, %i0 20062d8: 02 80 00 07 be 20062f4 <== NEVER TAKEN 20062dc: 80 88 60 08 btst 8, %g1 20062e0: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 20062e4: 80 a0 80 18 cmp %g2, %i0 20062e8: 32 80 00 0e bne,a 2006320 <== ALWAYS TAKEN 20062ec: 03 00 80 6d sethi %hi(0x201b400), %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 20062f0: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 20062f4: 22 80 00 06 be,a 200630c <== NOT EXECUTED 20062f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20062fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006300: 7f ff ff 04 call 2005f10 <== NOT EXECUTED 2006304: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2006308: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 200630c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2006310: f0 28 80 01 stb %i0, [ %g2 + %g1 ] <== NOT EXECUTED 2006314: 82 00 60 01 inc %g1 2006318: 10 80 00 16 b 2006370 200631c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2006320: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2006324: c2 00 62 10 ld [ %g1 + 0x210 ], %g1 2006328: 82 00 7f ff add %g1, -1, %g1 200632c: 80 a0 80 01 cmp %g2, %g1 2006330: 3a 80 00 11 bcc,a 2006374 <== NEVER TAKEN 2006334: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2006338: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 200633c: 80 88 60 08 btst 8, %g1 2006340: 22 80 00 06 be,a 2006358 <== NEVER TAKEN 2006344: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2006348: 90 10 00 18 mov %i0, %o0 200634c: 7f ff fe f1 call 2005f10 2006350: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2006354: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2006358: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 200635c: f0 28 80 01 stb %i0, [ %g2 + %g1 ] 2006360: 82 00 60 01 inc %g1 2006364: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } return 0; 2006368: 81 c7 e0 08 ret 200636c: 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; 2006370: b0 10 20 01 mov 1, %i0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 2006374: 81 c7 e0 08 ret 2006378: 81 e8 00 00 restore =============================================================================== 02018fb0 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 2018fb0: 81 c3 e0 08 retl <== NOT EXECUTED 2018fb4: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02003e30 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 2003e30: 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())) 2003e34: 03 00 80 70 sethi %hi(0x201c000), %g1 2003e38: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 ! 201c28c <_System_state_Current> 2003e3c: 80 a0 60 03 cmp %g1, 3 2003e40: 12 80 00 16 bne 2003e98 <== NEVER TAKEN 2003e44: 03 00 80 6a sethi %hi(0x201a800), %g1 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 2003e48: 39 00 80 6d sethi %hi(0x201b400), %i4 2003e4c: fa 00 61 d8 ld [ %g1 + 0x1d8 ], %i5 2003e50: c2 07 23 48 ld [ %i4 + 0x348 ], %g1 2003e54: 80 a0 40 1d cmp %g1, %i5 2003e58: 22 80 00 06 be,a 2003e70 2003e5c: 3b 00 80 6d sethi %hi(0x201b400), %i5 _wrapup_reent(_global_impure_ptr); 2003e60: 40 00 2d c9 call 200f584 <_wrapup_reent> 2003e64: 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; 2003e68: fa 27 23 48 st %i5, [ %i4 + 0x348 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 2003e6c: 3b 00 80 6d sethi %hi(0x201b400), %i5 2003e70: c2 07 63 48 ld [ %i5 + 0x348 ], %g1 ! 201b748 <_impure_ptr> 2003e74: 40 00 2a e7 call 200ea10 2003e78: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 2003e7c: c2 07 63 48 ld [ %i5 + 0x348 ], %g1 2003e80: 40 00 2a e4 call 200ea10 2003e84: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2003e88: c2 07 63 48 ld [ %i5 + 0x348 ], %g1 2003e8c: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2003e90: 40 00 2a e0 call 200ea10 2003e94: 81 e8 00 00 restore 2003e98: 81 c7 e0 08 ret <== NOT EXECUTED 2003e9c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003900 : #include "malloc_p.h" void *malloc( size_t size ) { 2003900: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 2003904: 03 00 80 6f sethi %hi(0x201bc00), %g1 2003908: 82 10 62 f8 or %g1, 0x2f8, %g1 ! 201bef8 200390c: c4 00 60 04 ld [ %g1 + 4 ], %g2 2003910: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003914: 7f ff ff b9 call 20037f8 2003918: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 200391c: 80 a6 20 00 cmp %i0, 0 2003920: 12 80 00 04 bne 2003930 2003924: 03 00 80 70 sethi %hi(0x201c000), %g1 return (void *) 0; 2003928: 10 80 00 32 b 20039f0 200392c: ba 10 20 00 clr %i5 /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003930: c2 00 62 8c ld [ %g1 + 0x28c ], %g1 2003934: 80 a0 60 03 cmp %g1, 3 2003938: 02 80 00 0c be 2003968 200393c: 39 00 80 6d sethi %hi(0x201b400), %i4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 2003940: d0 07 20 e0 ld [ %i4 + 0xe0 ], %o0 ! 201b4e0 2003944: 92 10 00 18 mov %i0, %o1 2003948: 94 10 20 00 clr %o2 200394c: 40 00 16 76 call 2009324 <_Protected_heap_Allocate_aligned_with_boundary> 2003950: 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 ) { 2003954: ba 92 20 00 orcc %o0, 0, %i5 2003958: 12 80 00 18 bne 20039b8 200395c: 03 00 80 6f sethi %hi(0x201bc00), %g1 return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 2003960: 10 80 00 09 b 2003984 2003964: d0 07 20 e0 ld [ %i4 + 0xe0 ], %o0 /* * 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() ) 2003968: 7f ff ff 98 call 20037c8 200396c: 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()) && 2003970: 80 8a 20 ff btst 0xff, %o0 2003974: 12 bf ff f3 bne 2003940 <== ALWAYS TAKEN 2003978: 01 00 00 00 nop 200397c: 10 80 00 1d b 20039f0 <== NOT EXECUTED 2003980: ba 10 20 00 clr %i5 ! 0 <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 2003984: 03 00 80 65 sethi %hi(0x2019400), %g1 2003988: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 20194c0 200398c: 9f c0 40 00 call %g1 2003990: 92 10 00 18 mov %i0, %o1 if ( !return_this ) { 2003994: ba 92 20 00 orcc %o0, 0, %i5 2003998: 12 80 00 08 bne 20039b8 <== NEVER TAKEN 200399c: 03 00 80 6f sethi %hi(0x201bc00), %g1 errno = ENOMEM; 20039a0: 40 00 2b ca call 200e8c8 <__errno> 20039a4: b0 10 00 1d mov %i5, %i0 20039a8: 82 10 20 0c mov 0xc, %g1 20039ac: c2 22 00 00 st %g1, [ %o0 ] 20039b0: 81 c7 e0 08 ret 20039b4: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 20039b8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 20039bc: 80 a0 60 00 cmp %g1, 0 20039c0: 02 80 00 04 be 20039d0 20039c4: 90 10 00 1d mov %i5, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 20039c8: 9f c0 40 00 call %g1 20039cc: 92 10 00 18 mov %i0, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 20039d0: 03 00 80 6f sethi %hi(0x201bc00), %g1 20039d4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 ! 201bc34 20039d8: 80 a0 60 00 cmp %g1, 0 20039dc: 22 80 00 06 be,a 20039f4 20039e0: b0 10 00 1d mov %i5, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 20039e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 20039e8: 9f c0 40 00 call %g1 20039ec: 90 10 00 1d mov %i5, %o0 return return_this; } 20039f0: b0 10 00 1d mov %i5, %i0 20039f4: 81 c7 e0 08 ret 20039f8: 81 e8 00 00 restore =============================================================================== 0200d3b0 : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 200d3b0: 9d e3 bf a0 save %sp, -96, %sp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 200d3b4: 03 00 80 6f sethi %hi(0x201bc00), %g1 200d3b8: d2 00 60 60 ld [ %g1 + 0x60 ], %o1 ! 201bc60 200d3bc: 7f ff d7 ca call 20032e4 200d3c0: 90 10 20 01 mov 1, %o0 if ( memory ) 200d3c4: b0 92 20 00 orcc %o0, 0, %i0 200d3c8: 02 80 00 05 be 200d3dc <== NEVER TAKEN 200d3cc: 03 00 80 6f sethi %hi(0x201bc00), %g1 memfile_blocks_allocated++; 200d3d0: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201bd74 200d3d4: 84 00 a0 01 inc %g2 200d3d8: c4 20 61 74 st %g2, [ %g1 + 0x174 ] return memory; } 200d3dc: 81 c7 e0 08 ret 200d3e0: 81 e8 00 00 restore =============================================================================== 0200ded8 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200ded8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200dedc: 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 ) 200dee0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200dee4: 80 a0 40 19 cmp %g1, %i1 200dee8: 06 80 00 09 bl 200df0c <== NEVER TAKEN 200deec: 90 10 00 1d mov %i5, %o0 200def0: 32 80 00 0d bne,a 200df24 <== NEVER TAKEN 200def4: f2 27 60 50 st %i1, [ %i5 + 0x50 ] <== NOT EXECUTED 200def8: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200defc: 80 a0 40 1a cmp %g1, %i2 200df00: 3a 80 00 09 bcc,a 200df24 200df04: f2 27 60 50 st %i1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, true, length ); 200df08: 90 10 00 1d mov %i5, %o0 200df0c: 92 10 20 01 mov 1, %o1 200df10: 94 10 00 19 mov %i1, %o2 200df14: 7f ff fe df call 200da90 200df18: 96 10 00 1a mov %i2, %o3 200df1c: 81 c7 e0 08 ret 200df20: 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; 200df24: f4 27 60 54 st %i2, [ %i5 + 0x54 ] IMFS_update_atime( the_jnode ); 200df28: 90 07 bf f8 add %fp, -8, %o0 200df2c: 7f ff d5 cb call 2003658 200df30: 92 10 20 00 clr %o1 200df34: c2 07 bf f8 ld [ %fp + -8 ], %g1 200df38: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200df3c: 81 c7 e0 08 ret 200df40: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200de5c : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200de5c: 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) 200de60: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200de64: 80 88 60 04 btst 4, %g1 200de68: 12 80 00 04 bne 200de78 200de6c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 200de70: 81 c7 e0 08 ret 200de74: 91 e8 20 00 restore %g0, 0, %o0 200de78: 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)) { 200de7c: c2 00 40 00 ld [ %g1 ], %g1 200de80: 80 a0 60 05 cmp %g1, 5 200de84: 12 bf ff fb bne 200de70 <== ALWAYS TAKEN 200de88: 03 00 80 69 sethi %hi(0x201a400), %g1 uint32_t count = the_jnode->info.linearfile.size; 200de8c: d8 02 20 54 ld [ %o0 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200de90: d6 02 20 58 ld [ %o0 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 200de94: 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; 200de98: 82 10 60 2c or %g1, 0x2c, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200de9c: 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; 200dea0: c2 22 20 4c st %g1, [ %o0 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 200dea4: c0 22 20 58 clr [ %o0 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200dea8: c0 22 20 5c clr [ %o0 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200deac: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200deb0: 02 bf ff f0 be 200de70 <== NOT EXECUTED 200deb4: c0 22 20 60 clr [ %o0 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200deb8: 92 10 20 00 clr %o1 <== NOT EXECUTED 200debc: 7f ff ff 5d call 200dc30 <== NOT EXECUTED 200dec0: 94 10 20 00 clr %o2 <== NOT EXECUTED return -1; 200dec4: 90 38 00 08 xnor %g0, %o0, %o0 <== NOT EXECUTED 200dec8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200decc: b0 40 3f ff addx %g0, -1, %i0 <== NOT EXECUTED } return 0; } 200ded0: 81 c7 e0 08 ret <== NOT EXECUTED 200ded4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003b1c : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003b1c: 9d e3 bf 50 save %sp, -176, %sp int rv = 0; if ( 2003b20: 80 a6 e0 01 cmp %i3, 1 2003b24: 18 80 00 b4 bgu 2003df4 2003b28: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 2003b2c: 40 00 21 31 call 200bff0 2003b30: 90 10 00 1a mov %i2, %o0 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 2003b34: a6 92 20 00 orcc %o0, 0, %l3 2003b38: 02 80 00 af be 2003df4 2003b3c: 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 : "/"; 2003b40: 12 80 00 04 bne 2003b50 2003b44: 01 00 00 00 nop 2003b48: 23 00 80 68 sethi %hi(0x201a000), %l1 2003b4c: a2 14 60 40 or %l1, 0x40, %l1 ! 201a040 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003b50: 40 00 30 e5 call 200fee4 2003b54: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003b58: 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; 2003b5c: ba 10 00 08 mov %o0, %i5 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003b60: 02 80 00 06 be 2003b78 2003b64: ac 02 20 01 add %o0, 1, %l6 2003b68: 40 00 30 df call 200fee4 2003b6c: 90 10 00 18 mov %i0, %o0 2003b70: 10 80 00 03 b 2003b7c 2003b74: a0 02 20 01 add %o0, 1, %l0 2003b78: 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 2003b7c: 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; 2003b80: 40 00 30 d9 call 200fee4 2003b84: 90 10 00 11 mov %l1, %o0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003b88: 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; 2003b8c: aa 02 20 01 add %o0, 1, %l5 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 ); 2003b90: 90 10 20 01 mov 1, %o0 2003b94: 7f ff fd d4 call 20032e4 2003b98: 92 02 40 15 add %o1, %l5, %o1 if ( mt_entry != NULL ) { 2003b9c: ba 92 20 00 orcc %o0, 0, %i5 2003ba0: 02 80 00 9d be 2003e14 <== NEVER TAKEN 2003ba4: 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 ); 2003ba8: 92 10 00 1a mov %i2, %o1 2003bac: 90 10 00 12 mov %l2, %o0 2003bb0: 40 00 2d 97 call 200f20c 2003bb4: 94 10 00 16 mov %l6, %o2 mt_entry->type = str; 2003bb8: e4 27 60 34 st %l2, [ %i5 + 0x34 ] + 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 = 2003bbc: a8 07 60 40 add %i5, 0x40, %l4 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 2003bc0: 80 a6 20 00 cmp %i0, 0 2003bc4: 02 80 00 08 be 2003be4 2003bc8: b4 04 80 16 add %l2, %l6, %i2 memcpy( str, source_or_null, source_size ); 2003bcc: 90 10 00 1a mov %i2, %o0 2003bd0: 92 10 00 18 mov %i0, %o1 2003bd4: 40 00 2d 8e call 200f20c 2003bd8: 94 10 00 10 mov %l0, %o2 mt_entry->dev = str; 2003bdc: f4 27 60 38 st %i2, [ %i5 + 0x38 ] str += source_size; 2003be0: b4 06 80 10 add %i2, %l0, %i2 } memcpy( str, target, target_size ); 2003be4: 92 10 00 11 mov %l1, %o1 2003be8: 94 10 00 15 mov %l5, %o2 2003bec: 40 00 2d 88 call 200f20c 2003bf0: 90 10 00 1a mov %i2, %o0 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003bf4: 82 10 20 01 mov 1, %g1 2003bf8: 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; 2003bfc: 03 00 80 68 sethi %hi(0x201a000), %g1 2003c00: 82 10 60 44 or %g1, 0x44, %g1 ! 201a044 2003c04: c2 27 60 2c st %g1, [ %i5 + 0x2c ] mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003c08: 82 10 20 01 mov 1, %g1 void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 2003c0c: 90 07 60 14 add %i5, 0x14, %o0 2003c10: c2 27 60 58 st %g1, [ %i5 + 0x58 ] 2003c14: 92 10 00 14 mov %l4, %o1 2003c18: 94 10 20 01 mov 1, %o2 2003c1c: 96 10 20 24 mov 0x24, %o3 mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); mt_entry->target = str; 2003c20: f4 27 60 30 st %i2, [ %i5 + 0x30 ] str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 2003c24: e8 27 60 24 st %l4, [ %i5 + 0x24 ] 2003c28: 40 00 11 62 call 20081b0 <_Chain_Initialize> 2003c2c: fa 27 60 54 st %i5, [ %i5 + 0x54 ] filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003c30: b6 0e e0 01 and %i3, 1, %i3 rv = (*fsmount_me_h)( mt_entry, data ); 2003c34: 90 10 00 1d mov %i5, %o0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003c38: f6 2f 60 29 stb %i3, [ %i5 + 0x29 ] rv = (*fsmount_me_h)( mt_entry, data ); 2003c3c: 9f c4 c0 00 call %l3 2003c40: 92 10 00 1c mov %i4, %o1 if ( rv == 0 ) { 2003c44: b0 92 20 00 orcc %o0, 0, %i0 2003c48: 12 80 00 6f bne 2003e04 2003c4c: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 2003c50: 02 80 00 38 be 2003d30 2003c54: 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 = 2003c58: 94 10 20 1f mov 0x1f, %o2 2003c5c: 40 00 02 fd call 2004850 2003c60: 90 07 bf c8 add %fp, -56, %o0 static inline bool rtems_filesystem_location_is_instance_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 2003c64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 return (*mt_entry->ops->are_nodes_equal_h)( 2003c68: c4 00 60 0c ld [ %g1 + 0xc ], %g2 2003c6c: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 2003c70: 9f c0 80 00 call %g2 2003c74: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { 2003c78: 80 8a 20 ff btst 0xff, %o0 2003c7c: 12 80 00 22 bne 2003d04 2003c80: 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( 2003c84: 40 00 03 ed call 2004c38 2003c88: 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 ); 2003c8c: 40 00 04 63 call 2004e18 2003c90: 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 ); 2003c94: 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; 2003c98: d0 27 60 20 st %o0, [ %i5 + 0x20 ] rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 2003c9c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 if ( !rtems_filesystem_location_is_instance_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 ); 2003ca0: 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 ); 2003ca4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2003ca8: 9f c0 40 00 call %g1 2003cac: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 2003cb0: b0 92 20 00 orcc %o0, 0, %i0 2003cb4: 12 80 00 11 bne 2003cf8 2003cb8: 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 ); 2003cbc: 39 00 80 6f sethi %hi(0x201bc00), %i4 2003cc0: d0 07 22 f4 ld [ %i4 + 0x2f4 ], %o0 ! 201bef4 2003cc4: 40 00 0e 80 call 20076c4 2003cc8: 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; 2003ccc: 03 00 80 6d sethi %hi(0x201b400), %g1 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003cd0: d0 07 22 f4 ld [ %i4 + 0x2f4 ], %o0 2003cd4: 82 10 61 f8 or %g1, 0x1f8, %g1 2003cd8: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003cdc: 86 00 60 04 add %g1, 4, %g3 2003ce0: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003ce4: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2003ce8: fa 20 80 00 st %i5, [ %g2 ] 2003cec: 40 00 0e bf call 20077e8 2003cf0: c4 27 60 04 st %g2, [ %i5 + 4 ] 2003cf4: 30 80 00 08 b,a 2003d14 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 2003cf8: 40 00 03 f5 call 2004ccc 2003cfc: 90 10 00 1c mov %i4, %o0 2003d00: 30 80 00 05 b,a 2003d14 } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 2003d04: 90 07 bf c8 add %fp, -56, %o0 2003d08: 92 10 20 10 mov 0x10, %o1 2003d0c: 40 00 02 3b call 20045f8 2003d10: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2003d14: 40 00 03 0b call 2004940 2003d18: 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 ) { 2003d1c: 80 a6 20 00 cmp %i0, 0 2003d20: 02 80 00 42 be 2003e28 2003d24: 01 00 00 00 nop (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 2003d28: 10 80 00 2f b 2003de4 2003d2c: 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 ); 2003d30: 03 00 80 6f sethi %hi(0x201bc00), %g1 2003d34: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 201bef4 2003d38: 92 10 20 00 clr %o1 2003d3c: 40 00 0e 62 call 20076c4 2003d40: 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; 2003d44: 05 00 80 6d sethi %hi(0x201b400), %g2 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 2003d48: c6 00 a1 f8 ld [ %g2 + 0x1f8 ], %g3 ! 201b5f8 2003d4c: 82 10 a1 f8 or %g2, 0x1f8, %g1 2003d50: 84 00 60 04 add %g1, 4, %g2 2003d54: 80 a0 c0 02 cmp %g3, %g2 2003d58: 12 80 00 08 bne 2003d78 <== NEVER TAKEN 2003d5c: 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; 2003d60: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003d64: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003d68: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2003d6c: fa 20 80 00 st %i5, [ %g2 ] the_node->previous = old_last; 2003d70: 10 80 00 06 b 2003d88 2003d74: c4 27 60 04 st %g2, [ %i5 + 4 ] rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 2003d78: 40 00 2a d4 call 200e8c8 <__errno> <== NOT EXECUTED 2003d7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003d80: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003d84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003d88: 03 00 80 6f sethi %hi(0x201bc00), %g1 2003d8c: 40 00 0e 97 call 20077e8 2003d90: d0 00 62 f4 ld [ %g1 + 0x2f4 ], %o0 ! 201bef4 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { 2003d94: 80 a6 20 00 cmp %i0, 0 2003d98: 32 80 00 13 bne,a 2003de4 <== NEVER TAKEN 2003d9c: 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 ); 2003da0: 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 = 2003da4: 40 00 03 eb call 2004d50 2003da8: 90 10 00 1d mov %i5, %o0 2003dac: 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 = 2003db0: 40 00 03 e8 call 2004d50 2003db4: 90 10 00 1d mov %i5, %o0 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2003db8: 3b 00 80 6d sethi %hi(0x201b400), %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 = 2003dbc: b8 10 00 08 mov %o0, %i4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2003dc0: d0 07 62 18 ld [ %i5 + 0x218 ], %o0 2003dc4: 92 10 00 1b mov %i3, %o1 2003dc8: 40 00 03 d9 call 2004d2c 2003dcc: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 2003dd0: d0 07 62 18 ld [ %i5 + 0x218 ], %o0 2003dd4: 40 00 03 d6 call 2004d2c 2003dd8: 92 10 00 1c mov %i4, %o1 2003ddc: 81 c7 e0 08 ret 2003de0: 81 e8 00 00 restore } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 2003de4: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 2003de8: 9f c0 40 00 call %g1 2003dec: 90 10 00 1d mov %i5, %o0 2003df0: 30 80 00 05 b,a 2003e04 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 2003df4: 40 00 2a b5 call 200e8c8 <__errno> 2003df8: 01 00 00 00 nop 2003dfc: 10 80 00 09 b 2003e20 2003e00: 82 10 20 16 mov 0x16, %g1 ! 16 (*mt_entry->ops->fsunmount_me_h)( mt_entry ); } } if ( rv != 0 ) { free( mt_entry ); 2003e04: 7f ff fd eb call 20035b0 2003e08: 90 10 00 1d mov %i5, %o0 2003e0c: 81 c7 e0 08 ret 2003e10: 81 e8 00 00 restore } } else { errno = ENOMEM; 2003e14: 40 00 2a ad call 200e8c8 <__errno> <== NOT EXECUTED 2003e18: 01 00 00 00 nop <== NOT EXECUTED 2003e1c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2003e20: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 2003e24: b0 10 3f ff mov -1, %i0 errno = EINVAL; rv = -1; } return rv; } 2003e28: 81 c7 e0 08 ret 2003e2c: 81 e8 00 00 restore =============================================================================== 02008844 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2008844: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 2008848: 90 96 60 00 orcc %i1, 0, %o0 200884c: 02 80 00 09 be 2008870 2008850: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2008854: 40 00 02 f1 call 2009418 2008858: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 200885c: 80 a2 20 00 cmp %o0, 0 2008860: 12 80 00 09 bne 2008884 <== NEVER TAKEN 2008864: 01 00 00 00 nop rv = mount( 2008868: 40 00 00 09 call 200888c 200886c: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 2008870: 40 00 5c cb call 201fb9c <__errno> 2008874: 01 00 00 00 nop 2008878: 82 10 20 16 mov 0x16, %g1 ! 16 200887c: c2 22 00 00 st %g1, [ %o0 ] const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2008880: 90 10 3f ff mov -1, %o0 } else { errno = EINVAL; } return rv; } 2008884: 81 c7 e0 08 ret 2008888: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02016dd8 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2016dd8: 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; 2016ddc: 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); 2016de0: 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; 2016de4: 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; 2016de8: 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); 2016dec: 94 10 20 20 mov 0x20, %o2 2016df0: c2 27 bf 78 st %g1, [ %fp + -136 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2016df4: 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; 2016df8: e0 06 20 08 ld [ %i0 + 8 ], %l0 fat_file_fd_t *fat_fd = NULL; 2016dfc: c0 27 bf 6c clr [ %fp + -148 ] time_t time_ret = 0; uint16_t time_val = 0; 2016e00: c0 37 bf 68 clrh [ %fp + -152 ] uint16_t date = 0; 2016e04: 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; 2016e08: c0 27 bf 70 clr [ %fp + -144 ] dir_pos->sname.ofs = 0; 2016e0c: 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); 2016e10: 40 00 11 7a call 201b3f8 2016e14: 90 07 bf 80 add %fp, -128, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2016e18: 90 07 bf c0 add %fp, -64, %o0 2016e1c: 92 10 20 00 clr %o1 2016e20: 40 00 11 76 call 201b3f8 2016e24: 94 10 20 40 mov 0x40, %o2 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 2016e28: 80 a6 e1 04 cmp %i3, 0x104 2016e2c: 24 80 00 06 ble,a 2016e44 <== ALWAYS TAKEN 2016e30: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 2016e34: 40 00 0e 75 call 201a808 <__errno> <== NOT EXECUTED 2016e38: 01 00 00 00 nop <== NOT EXECUTED 2016e3c: 10 80 00 0c b 2016e6c <== NOT EXECUTED 2016e40: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 2016e44: 92 10 00 1b mov %i3, %o1 2016e48: 94 07 bf 80 add %fp, -128, %o2 2016e4c: 40 00 01 45 call 2017360 2016e50: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 2016e54: a4 92 20 00 orcc %o0, 0, %l2 2016e58: 32 80 00 08 bne,a 2016e78 <== ALWAYS TAKEN 2016e5c: c0 2f bf 8c clrb [ %fp + -116 ] rtems_set_errno_and_return_minus_one(EINVAL); 2016e60: 40 00 0e 6a call 201a808 <__errno> <== NOT EXECUTED 2016e64: 01 00 00 00 nop <== NOT EXECUTED 2016e68: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2016e6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2016e70: 10 80 00 ce b 20171a8 <== NOT EXECUTED 2016e74: 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); 2016e78: 40 00 21 e4 call 201f608