=============================================================================== 020057d0 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 20057d0: 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, "...." ); 20057d4: 21 00 80 84 sethi %hi(0x2021000), %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 20057d8: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 20057dc: 39 00 80 8c sethi %hi(0x2023000), %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20057e0: 35 00 80 84 sethi %hi(0x2021000), %i2 return; } puts(""); 20057e4: 37 00 80 84 sethi %hi(0x2021000), %i3 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 )); 20057e8: b0 06 20 54 add %i0, 0x54, %i0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 20057ec: a0 14 20 d0 or %l0, 0xd0, %l0 20057f0: b8 17 20 58 or %i4, 0x58, %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20057f4: b4 16 a1 40 or %i2, 0x140, %i2 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 ); 20057f8: 10 80 00 4e b 2005930 20057fc: b6 16 e0 68 or %i3, 0x68, %i3 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2005800: 90 10 00 10 mov %l0, %o0 2005804: 40 00 36 24 call 2013094 2005808: a2 04 60 01 inc %l1 200580c: 10 80 00 03 b 2005818 2005810: c2 07 00 00 ld [ %i4 ], %g1 2005814: 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++ ) 2005818: 80 a4 40 19 cmp %l1, %i1 200581c: 04 bf ff f9 ble 2005800 2005820: d2 00 60 08 ld [ %g1 + 8 ], %o1 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 2005824: 40 00 36 1c call 2013094 2005828: 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; 200582c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2005830: d4 00 40 00 ld [ %g1 ], %o2 switch( IMFS_type( the_jnode ) ) { 2005834: 80 a2 a0 06 cmp %o2, 6 2005838: 38 80 00 2e bgu,a 20058f0 <== NEVER TAKEN 200583c: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED 2005840: 95 2a a0 02 sll %o2, 2, %o2 2005844: 03 00 80 15 sethi %hi(0x2005400), %g1 2005848: 82 10 63 b4 or %g1, 0x3b4, %g1 ! 20057b4 200584c: c2 00 40 0a ld [ %g1 + %o2 ], %g1 2005850: 81 c0 40 00 jmp %g1 2005854: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2005858: c2 07 00 00 ld [ %i4 ], %g1 200585c: 90 10 20 2f mov 0x2f, %o0 2005860: 40 00 35 d8 call 2012fc0 2005864: d2 00 60 08 ld [ %g1 + 8 ], %o1 2005868: 30 80 00 27 b,a 2005904 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 200586c: c2 07 00 00 ld [ %i4 ], %g1 2005870: 13 00 80 84 sethi %hi(0x2021000), %o1 2005874: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005878: 92 12 60 d8 or %o1, 0xd8, %o1 200587c: 10 80 00 08 b 200589c 2005880: 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)", 2005884: c2 07 00 00 ld [ %i4 ], %g1 2005888: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 200588c: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005890: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 2005894: 13 00 80 84 sethi %hi(0x2021000), %o1 2005898: 92 12 60 f0 or %o1, 0xf0, %o1 ! 20210f0 200589c: 40 00 35 ad call 2012f50 20058a0: 01 00 00 00 nop 20058a4: 30 80 00 18 b,a 2005904 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 20058a8: c2 07 00 00 ld [ %i4 ], %g1 20058ac: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 20058b0: d0 00 60 08 ld [ %g1 + 8 ], %o0 20058b4: 13 00 80 84 sethi %hi(0x2021000), %o1 20058b8: 40 00 35 a6 call 2012f50 20058bc: 92 12 61 00 or %o1, 0x100, %o1 ! 2021100 20058c0: 30 80 00 11 b,a 2005904 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 20058c4: 11 00 80 84 sethi %hi(0x2021000), %o0 20058c8: c2 07 00 00 ld [ %i4 ], %g1 20058cc: 10 80 00 05 b 20058e0 20058d0: 90 12 21 10 or %o0, 0x110, %o0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 20058d4: c2 07 00 00 ld [ %i4 ], %g1 20058d8: 11 00 80 84 sethi %hi(0x2021000), %o0 20058dc: 90 12 21 28 or %o0, 0x128, %o0 ! 2021128 20058e0: 40 00 35 ed call 2013094 20058e4: 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; 20058e8: 10 80 00 0a b 2005910 20058ec: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20058f0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20058f4: 40 00 35 97 call 2012f50 <== NOT EXECUTED 20058f8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20058fc: 10 80 00 05 b 2005910 <== NOT EXECUTED 2005900: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED return; } puts(""); 2005904: 40 00 3c d5 call 2014c58 2005908: 90 10 00 1b mov %i3, %o0 200590c: 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 ) ) 2005910: c2 00 40 00 ld [ %g1 ], %g1 2005914: 80 a0 60 00 cmp %g1, 0 2005918: 32 80 00 06 bne,a 2005930 200591c: fa 07 40 00 ld [ %i5 ], %i5 IMFS_dump_directory( the_jnode, level + 1 ); 2005920: 90 10 00 1d mov %i5, %o0 2005924: 7f ff ff ab call 20057d0 2005928: 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 ) { 200592c: fa 07 40 00 ld [ %i5 ], %i5 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 ); 2005930: 80 a7 40 18 cmp %i5, %i0 2005934: 12 bf ff b8 bne 2005814 2005938: a2 10 20 00 clr %l1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 200593c: 81 c7 e0 08 ret 2005940: 81 e8 00 00 restore =============================================================================== 0200b780 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b780: 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; 200b784: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200b788: 90 10 00 18 mov %i0, %o0 200b78c: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200b790: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200b794: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b798: ba 10 00 18 mov %i0, %i5 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; bool access_ok = rtems_filesystem_eval_path_check_access( 200b79c: 92 10 20 01 mov 1, %o1 200b7a0: 40 00 02 f6 call 200c378 200b7a4: b0 10 20 01 mov 1, %i0 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200b7a8: 80 8a 20 ff btst 0xff, %o0 200b7ac: 02 80 00 48 be 200b8cc 200b7b0: 80 a6 e0 01 cmp %i3, 1 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 200b7b4: 12 80 00 5c bne 200b924 200b7b8: 80 a6 e0 02 cmp %i3, 2 200b7bc: c2 4e 80 00 ldsb [ %i2 ], %g1 200b7c0: 80 a0 60 2e cmp %g1, 0x2e 200b7c4: 32 80 00 5b bne,a 200b930 200b7c8: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200b7cc: 10 80 00 1c b 200b83c 200b7d0: b2 10 00 1c mov %i4, %i1 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200b7d4: 80 a0 60 2e cmp %g1, 0x2e 200b7d8: 32 80 00 56 bne,a 200b930 200b7dc: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200b7e0: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200b7e4: 80 a0 60 2e cmp %g1, 0x2e 200b7e8: 32 80 00 52 bne,a 200b930 <== NEVER TAKEN 200b7ec: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 <== NOT EXECUTED { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; 200b7f0: 10 80 00 13 b 200b83c 200b7f4: f2 07 20 08 ld [ %i4 + 8 ], %i1 rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 200b7f8: 92 10 00 1a mov %i2, %o1 200b7fc: 40 00 12 7a call 20101e4 200b800: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200b804: 80 a2 20 00 cmp %o0, 0 200b808: 32 80 00 08 bne,a 200b828 200b80c: f2 06 40 00 ld [ %i1 ], %i1 200b810: 82 06 40 1b add %i1, %i3, %g1 200b814: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200b818: 80 a0 60 00 cmp %g1, 0 200b81c: 02 80 00 09 be 200b840 200b820: 80 a6 60 00 cmp %i1, 0 200b824: f2 06 40 00 ld [ %i1 ], %i1 } 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 ) { 200b828: 80 a6 40 18 cmp %i1, %i0 200b82c: 12 bf ff f3 bne 200b7f8 200b830: 90 06 60 0c add %i1, 0xc, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 200b834: 81 c7 e0 08 ret 200b838: 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 ) { 200b83c: 80 a6 60 00 cmp %i1, 0 200b840: 02 80 00 23 be 200b8cc 200b844: b0 10 20 02 mov 2, %i0 bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 200b848: c2 07 60 04 ld [ %i5 + 4 ], %g1 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 200b84c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200b850: 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; 200b854: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 200b858: b0 60 3f ff subx %g0, -1, %i0 200b85c: c2 00 40 00 ld [ %g1 ], %g1 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)) { 200b860: 80 a0 60 02 cmp %g1, 2 200b864: 12 80 00 0a bne 200b88c 200b868: c0 27 60 0c clr [ %i5 + 0xc ] 200b86c: 80 88 a0 08 btst 8, %g2 200b870: 32 80 00 32 bne,a 200b938 200b874: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 200b878: 80 8e 20 ff btst 0xff, %i0 200b87c: 32 80 00 30 bne,a 200b93c <== ALWAYS TAKEN 200b880: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 entry = entry->info.hard_link.link_node; 200b884: 10 80 00 2d b 200b938 <== NOT EXECUTED 200b888: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200b88c: 80 a0 60 03 cmp %g1, 3 200b890: 12 80 00 11 bne 200b8d4 200b894: 80 a0 60 00 cmp %g1, 0 200b898: 80 88 a0 10 btst 0x10, %g2 200b89c: 12 80 00 04 bne 200b8ac 200b8a0: 80 8e 20 ff btst 0xff, %i0 200b8a4: 32 80 00 26 bne,a 200b93c 200b8a8: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 const char *target = entry->info.sym_link.name; 200b8ac: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b8b0: b0 10 20 01 mov 1, %i0 } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { const char *target = entry->info.sym_link.name; rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 200b8b4: 40 00 12 1b call 2010120 200b8b8: 90 10 00 1c mov %i4, %o0 200b8bc: 92 10 00 1c mov %i4, %o1 200b8c0: 94 10 00 08 mov %o0, %o2 200b8c4: 7f ff e4 c5 call 2004bd8 200b8c8: 90 10 00 1d mov %i5, %o0 if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200b8cc: 81 c7 e0 08 ret 200b8d0: 81 e8 00 00 restore IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 200b8d4: 32 80 00 1a bne,a 200b93c 200b8d8: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 if ( node->info.directory.mt_fs != NULL ) { 200b8dc: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 200b8e0: 80 a0 60 00 cmp %g1, 0 200b8e4: 02 80 00 15 be 200b938 200b8e8: 90 10 00 1d mov %i5, %o0 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200b8ec: d4 06 60 30 ld [ %i1 + 0x30 ], %o2 200b8f0: d6 16 60 3c lduh [ %i1 + 0x3c ], %o3 200b8f4: d8 16 60 3e lduh [ %i1 + 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; 200b8f8: b8 00 60 18 add %g1, 0x18, %i4 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 200b8fc: 92 10 20 01 mov 1, %o1 200b900: 40 00 02 9e call 200c378 200b904: b0 10 20 01 mov 1, %i0 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200b908: 80 8a 20 ff btst 0xff, %o0 200b90c: 02 bf ff f0 be 200b8cc <== NEVER TAKEN 200b910: 90 10 00 1d mov %i5, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200b914: 7f ff e4 9a call 2004b7c 200b918: 92 10 00 1c mov %i4, %o1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200b91c: 81 c7 e0 08 ret 200b920: 81 e8 00 00 restore static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200b924: 22 bf ff ac be,a 200b7d4 200b928: c2 4e 80 00 ldsb [ %i2 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b92c: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; } 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 ); 200b930: 10 bf ff be b 200b828 200b934: b0 07 20 54 add %i4, 0x54, %i0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 200b938: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b93c: b0 0e 20 ff and %i0, 0xff, %i0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 200b940: 82 00 7f ff add %g1, -1, %g1 200b944: c2 37 20 34 sth %g1, [ %i4 + 0x34 ] ++entry->reference_count; 200b948: c2 16 60 34 lduh [ %i1 + 0x34 ], %g1 200b94c: 82 00 60 01 inc %g1 200b950: c2 36 60 34 sth %g1, [ %i1 + 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; 200b954: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 currentloc->node_access = entry; 200b958: f2 27 60 20 st %i1, [ %i5 + 0x20 ] 200b95c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200b960: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 200b964: 81 c7 e0 08 ret 200b968: 81 e8 00 00 restore =============================================================================== 02003850 : static off_t IMFS_fifo_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2003850: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 2003854: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2003858: 92 10 00 19 mov %i1, %o1 200385c: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2003860: 98 10 00 18 mov %i0, %o4 2003864: 94 10 00 1a mov %i2, %o2 2003868: 40 00 2a a4 call 200e2f8 200386c: 96 10 00 1b mov %i3, %o3 2003870: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 2003874: 80 a6 20 00 cmp %i0, 0 2003878: 16 80 00 08 bge 2003898 <== NEVER TAKEN 200387c: b2 10 00 08 mov %o0, %i1 2003880: 40 00 32 df call 20103fc <__errno> 2003884: 31 3f ff ff sethi %hi(0xfffffc00), %i0 2003888: 82 20 00 19 neg %i1, %g1 200388c: c2 22 00 00 st %g1, [ %o0 ] 2003890: b0 16 23 ff or %i0, 0x3ff, %i0 2003894: b2 10 00 18 mov %i0, %i1 } 2003898: 81 c7 e0 08 ret 200389c: 81 e8 00 00 restore =============================================================================== 020038a0 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20038a0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 20038a4: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20038a8: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 20038ac: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 20038b0: 92 10 00 19 mov %i1, %o1 20038b4: 40 00 2a 0a call 200e0dc 20038b8: 94 10 00 1a mov %i2, %o2 if (err > 0) { 20038bc: b0 92 20 00 orcc %o0, 0, %i0 20038c0: 04 80 00 09 ble 20038e4 20038c4: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 20038c8: 40 00 04 19 call 200492c 20038cc: 92 10 20 00 clr %o1 20038d0: c2 07 bf f8 ld [ %fp + -8 ], %g1 20038d4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 20038d8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 20038dc: 81 c7 e0 08 ret 20038e0: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 20038e4: 80 a6 20 00 cmp %i0, 0 20038e8: 02 80 00 06 be 2003900 <== NEVER TAKEN 20038ec: 01 00 00 00 nop 20038f0: 40 00 32 c3 call 20103fc <__errno> 20038f4: b0 20 00 18 neg %i0 20038f8: f0 22 00 00 st %i0, [ %o0 ] 20038fc: b0 10 3f ff mov -1, %i0 } 2003900: 81 c7 e0 08 ret 2003904: 81 e8 00 00 restore =============================================================================== 0200b9bc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200b9bc: 9d e3 bf 80 save %sp, -128, %sp /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 200b9c0: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 200b9c4: ba 07 bf e4 add %fp, -28, %i5 200b9c8: 92 10 00 1c mov %i4, %o1 200b9cc: 90 10 00 1d mov %i5, %o0 200b9d0: 40 00 0e 98 call 200f430 200b9d4: 94 10 20 1c mov 0x1c, %o2 jnode = (IMFS_jnode_t *)loc.node_access; 200b9d8: f6 07 bf ec ld [ %fp + -20 ], %i3 200b9dc: c0 27 20 08 clr [ %i4 + 8 ] 200b9e0: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 200b9e4: f8 06 e0 08 ld [ %i3 + 8 ], %i4 200b9e8: 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 ) ) { 200b9ec: 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; 200b9f0: f6 27 bf ec st %i3, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200b9f4: 80 a0 60 00 cmp %g1, 0 200b9f8: 12 80 00 07 bne 200ba14 200b9fc: c4 27 bf f4 st %g2, [ %fp + -12 ] 200ba00: c4 06 e0 50 ld [ %i3 + 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 ); 200ba04: 82 06 e0 54 add %i3, 0x54, %g1 200ba08: 80 a0 80 01 cmp %g2, %g1 200ba0c: 12 80 00 0e bne 200ba44 200ba10: 80 a6 e0 00 cmp %i3, 0 result = IMFS_rmnod( NULL, &loc ); 200ba14: 90 10 20 00 clr %o0 200ba18: 7f ff dd ec call 20031c8 200ba1c: 92 10 00 1d mov %i5, %o1 if ( result != 0 ) 200ba20: 80 a2 20 00 cmp %o0, 0 200ba24: 22 80 00 05 be,a 200ba38 <== ALWAYS TAKEN 200ba28: 90 10 00 1b mov %i3, %o0 rtems_fatal_error_occurred( 0xdeadbeef ); 200ba2c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED 200ba30: 7f ff f1 54 call 2007f80 <== NOT EXECUTED 200ba34: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED IMFS_node_destroy( jnode ); 200ba38: 7f ff dd 0d call 2002e6c 200ba3c: b6 10 00 1c mov %i4, %i3 jnode = next; } if ( jnode != NULL ) { 200ba40: 80 a6 e0 00 cmp %i3, 0 200ba44: 02 80 00 0e be 200ba7c 200ba48: 01 00 00 00 nop return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 200ba4c: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1 if ( IMFS_is_directory( jnode ) ) { 200ba50: c2 00 40 00 ld [ %g1 ], %g1 200ba54: 80 a0 60 00 cmp %g1, 0 200ba58: 32 bf ff e3 bne,a 200b9e4 <== NEVER TAKEN 200ba5c: c2 06 e0 4c ld [ %i3 + 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; 200ba60: c2 06 e0 50 ld [ %i3 + 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 ); 200ba64: 84 06 e0 54 add %i3, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200ba68: 80 a0 40 02 cmp %g1, %g2 200ba6c: 02 bf ff dd be 200b9e0 200ba70: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200ba74: 12 bf ff db bne 200b9e0 <== ALWAYS TAKEN 200ba78: b6 10 00 01 mov %g1, %i3 200ba7c: 81 c7 e0 08 ret 200ba80: 81 e8 00 00 restore =============================================================================== 02002d5c : 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] ) { 2002d5c: 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 ) ); 2002d60: 90 10 20 01 mov 1, %o0 2002d64: 40 00 01 bd call 2003458 2002d68: 92 10 20 24 mov 0x24, %o1 if ( fs_info != NULL ) { 2002d6c: ba 92 20 00 orcc %o0, 0, %i5 2002d70: 02 80 00 26 be 2002e08 2002d74: 03 00 80 70 sethi %hi(0x201c000), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002d78: c4 00 61 c4 ld [ %g1 + 0x1c4 ], %g2 ! 201c1c4 memcpy( 2002d7c: 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++; 2002d80: c4 27 40 00 st %g2, [ %i5 ] 2002d84: 84 00 a0 01 inc %g2 memcpy( 2002d88: 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++; 2002d8c: c4 20 61 c4 st %g2, [ %g1 + 0x1c4 ] memcpy( 2002d90: 40 00 31 a8 call 200f430 2002d94: 90 07 60 08 add %i5, 8, %o0 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 2002d98: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002d9c: 90 10 00 1d mov %i5, %o0 2002da0: 15 00 80 67 sethi %hi(0x2019c00), %o2 2002da4: 96 10 20 00 clr %o3 2002da8: 94 12 a3 20 or %o2, 0x320, %o2 2002dac: 19 00 00 10 sethi %hi(0x4000), %o4 2002db0: 9a 10 20 00 clr %o5 2002db4: 40 00 22 27 call 200b650 2002db8: 98 13 21 ed or %o4, 0x1ed, %o4 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 2002dbc: b8 92 20 00 orcc %o0, 0, %i4 2002dc0: 02 80 00 12 be 2002e08 <== NEVER TAKEN 2002dc4: 90 06 20 28 add %i0, 0x28, %o0 mt_entry->fs_info = fs_info; 2002dc8: fa 26 20 20 st %i5, [ %i0 + 0x20 ] mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002dcc: 13 00 80 6a sethi %hi(0x201a800), %o1 2002dd0: 94 10 20 30 mov 0x30, %o2 2002dd4: 40 00 31 97 call 200f430 2002dd8: 92 12 60 04 or %o1, 4, %o1 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; 2002ddc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 mt_entry->mt_fs_root->location.node_access = root_node; 2002de0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2002de4: c4 00 a0 04 ld [ %g2 + 4 ], %g2 2002de8: f8 20 60 08 st %i4, [ %g1 + 8 ] 2002dec: c4 20 60 10 st %g2, [ %g1 + 0x10 ] mt_entry->mt_fs_root->location.ops = op_table; 2002df0: f2 20 60 14 st %i1, [ %g1 + 0x14 ] errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002df4: 86 10 20 06 mov 6, %g3 2002df8: 03 00 80 6e sethi %hi(0x201b800), %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002dfc: 84 10 20 10 mov 0x10, %g2 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002e00: 10 80 00 08 b 2002e20 2002e04: c2 00 62 78 ld [ %g1 + 0x278 ], %g1 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002e08: 40 00 2f 2e call 200eac0 <__errno> 2002e0c: b0 10 3f ff mov -1, %i0 2002e10: 82 10 20 0c mov 0xc, %g1 2002e14: c2 22 00 00 st %g1, [ %o0 ] 2002e18: 81 c7 e0 08 ret 2002e1c: 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) { 2002e20: 80 a0 80 01 cmp %g2, %g1 2002e24: 22 80 00 09 be,a 2002e48 2002e28: 05 00 80 70 sethi %hi(0x201c000), %g2 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002e2c: 34 80 00 06 bg,a 2002e44 2002e30: 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) { 2002e34: 86 80 ff ff addcc %g3, -1, %g3 2002e38: 12 bf ff fa bne 2002e20 <== ALWAYS TAKEN 2002e3c: 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); 2002e40: 82 10 20 80 mov 0x80, %g1 <== NOT EXECUTED break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002e44: 05 00 80 70 sethi %hi(0x201c000), %g2 2002e48: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] ! 201c1c0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 2002e4c: 81 c7 e0 08 ret 2002e50: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 020047e8 : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 20047e8: 9d e3 bf 40 save %sp, -192, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 20047ec: 03 00 80 7f sethi %hi(0x201fc00), %g1 20047f0: c2 00 62 1c ld [ %g1 + 0x21c ], %g1 ! 201fe1c switch (mode & S_IFMT) { 20047f4: 05 00 00 08 sethi %hi(0x2000), %g2 void *context ) { int rv = 0; mode &= ~rtems_filesystem_umask; 20047f8: c2 00 60 08 ld [ %g1 + 8 ], %g1 20047fc: b2 2e 40 01 andn %i1, %g1, %i1 switch (mode & S_IFMT) { 2004800: 03 00 00 3c sethi %hi(0xf000), %g1 2004804: 82 0e 40 01 and %i1, %g1, %g1 2004808: 80 a0 40 02 cmp %g1, %g2 200480c: 02 80 00 13 be 2004858 2004810: 92 10 00 18 mov %i0, %o1 2004814: 80 a0 40 02 cmp %g1, %g2 2004818: 38 80 00 04 bgu,a 2004828 <== ALWAYS TAKEN 200481c: 05 00 00 18 sethi %hi(0x6000), %g2 2004820: 10 80 00 05 b 2004834 <== NOT EXECUTED 2004824: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 2004828: 80 a0 40 02 cmp %g1, %g2 200482c: 02 80 00 0b be 2004858 2004830: 05 00 00 20 sethi %hi(0x8000), %g2 2004834: 80 a0 40 02 cmp %g1, %g2 2004838: 22 80 00 09 be,a 200485c <== NEVER TAKEN 200483c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED case S_IFCHR: case S_IFIFO: case S_IFREG: break; default: errno = EINVAL; 2004840: 40 00 39 b1 call 2012f04 <__errno> 2004844: b0 10 3f ff mov -1, %i0 2004848: 82 10 20 16 mov 0x16, %g1 200484c: c2 22 00 00 st %g1, [ %o0 ] 2004850: 81 c7 e0 08 ret 2004854: 81 e8 00 00 restore rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 2004858: c2 06 80 00 ld [ %i2 ], %g1 200485c: 80 a0 60 07 cmp %g1, 7 2004860: 12 80 00 28 bne 2004900 2004864: 94 10 20 78 mov 0x78, %o2 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 = 2004868: 40 00 08 d5 call 2006bbc 200486c: 90 07 bf a4 add %fp, -92, %o0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 2004870: 7f ff ff cc call 20047a0 2004874: ba 10 00 08 mov %o0, %i5 2004878: 80 8a 20 ff btst 0xff, %o0 200487c: 02 80 00 1a be 20048e4 2004880: 90 07 bf a4 add %fp, -92, %o0 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 2004884: d4 07 bf ac ld [ %fp + -84 ], %o2 2004888: d6 07 bf b0 ld [ %fp + -80 ], %o3 if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 200488c: f6 27 bf e0 st %i3, [ %fp + -32 ] new_node = IMFS_create_node_with_control( 2004890: 90 10 00 1d mov %i5, %o0 2004894: 92 10 00 1a mov %i2, %o1 2004898: 98 10 00 19 mov %i1, %o4 200489c: 9a 07 bf e0 add %fp, -32, %o5 20048a0: 40 00 2c 8d call 200fad4 20048a4: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 20048a8: 80 a2 20 00 cmp %o0, 0 20048ac: 02 80 00 11 be 20048f0 20048b0: 92 10 20 00 clr %o1 IMFS_jnode_t *parent = currentloc->node_access; 20048b4: fa 07 60 08 ld [ %i5 + 8 ], %i5 IMFS_update_ctime( parent ); 20048b8: 40 00 02 97 call 2005314 20048bc: 90 07 bf f8 add %fp, -8, %o0 20048c0: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 20048c4: 90 07 bf f8 add %fp, -8, %o0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 20048c8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 20048cc: 40 00 02 92 call 2005314 20048d0: 92 10 20 00 clr %o1 20048d4: c2 07 bf f8 ld [ %fp + -8 ], %g1 20048d8: b0 10 20 00 clr %i0 20048dc: 10 80 00 05 b 20048f0 20048e0: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 20048e4: 92 10 20 86 mov 0x86, %o1 20048e8: 40 00 08 02 call 20068f0 20048ec: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 20048f0: 40 00 08 b9 call 2006bd4 20048f4: 90 07 bf a4 add %fp, -92, %o0 20048f8: 81 c7 e0 08 ret 20048fc: 81 e8 00 00 restore } else { errno = EINVAL; 2004900: 40 00 39 81 call 2012f04 <__errno> 2004904: b0 10 3f ff mov -1, %i0 2004908: 82 10 20 16 mov 0x16, %g1 200490c: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } } return rv; } 2004910: 81 c7 e0 08 ret 2004914: 81 e8 00 00 restore =============================================================================== 0200dcc0 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200dcc0: 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 ) 200dcc4: 03 00 80 70 sethi %hi(0x201c000), %g1 200dcc8: fa 00 61 c0 ld [ %g1 + 0x1c0 ], %i5 ! 201c1c0 200dccc: b9 37 60 02 srl %i5, 2, %i4 200dcd0: 92 10 00 1c mov %i4, %o1 200dcd4: 40 00 27 29 call 2017978 <.umul> 200dcd8: 90 07 20 01 add %i4, 1, %o0 200dcdc: 92 10 00 1c mov %i4, %o1 200dce0: 40 00 27 26 call 2017978 <.umul> 200dce4: 90 02 20 01 inc %o0 200dce8: 92 10 00 1d mov %i5, %o1 200dcec: 40 00 27 23 call 2017978 <.umul> 200dcf0: 90 02 3f ff add %o0, -1, %o0 200dcf4: 82 10 20 00 clr %g1 200dcf8: 80 a0 40 19 cmp %g1, %i1 200dcfc: 34 80 00 0b bg,a 200dd28 <== NEVER TAKEN 200dd00: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 <== NOT EXECUTED 200dd04: 80 a0 40 19 cmp %g1, %i1 200dd08: 12 80 00 04 bne 200dd18 200dd0c: 80 a2 00 1a cmp %o0, %i2 200dd10: 38 80 00 06 bgu,a 200dd28 200dd14: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200dd18: 40 00 03 6a call 200eac0 <__errno> 200dd1c: 01 00 00 00 nop 200dd20: 10 80 00 29 b 200ddc4 200dd24: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200dd28: 80 a6 40 1c cmp %i1, %i4 200dd2c: 14 80 00 07 bg 200dd48 <== NEVER TAKEN 200dd30: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200dd34: 80 a6 40 1c cmp %i1, %i4 200dd38: 12 80 00 37 bne 200de14 <== NEVER TAKEN 200dd3c: 80 a6 80 10 cmp %i2, %l0 200dd40: 08 80 00 35 bleu 200de14 200dd44: 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; 200dd48: b7 3f 60 1f sra %i5, 0x1f, %i3 200dd4c: 96 10 00 1d mov %i5, %o3 200dd50: 94 10 00 1b mov %i3, %o2 200dd54: 90 10 00 19 mov %i1, %o0 200dd58: 40 00 28 9a call 2017fc0 <__divdi3> 200dd5c: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200dd60: 90 10 00 1c mov %i4, %o0 200dd64: 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; 200dd68: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200dd6c: 94 10 00 1b mov %i3, %o2 200dd70: 40 00 28 94 call 2017fc0 <__divdi3> 200dd74: 92 10 00 10 mov %l0, %o1 200dd78: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200dd7c: 10 80 00 15 b 200ddd0 200dd80: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200dd84: 7f ff ff 49 call 200daa8 200dd88: 92 10 00 1d mov %i5, %o1 200dd8c: 80 a2 20 00 cmp %o0, 0 200dd90: 22 80 00 10 be,a 200ddd0 200dd94: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200dd98: 10 80 00 06 b 200ddb0 200dd9c: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200dda0: 90 10 00 18 mov %i0, %o0 200dda4: 7f ff ff bb call 200dc90 200dda8: ba 07 7f ff add %i5, -1, %i5 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 200ddac: 80 a7 40 1c cmp %i5, %i4 200ddb0: 1a bf ff fc bcc 200dda0 200ddb4: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200ddb8: 40 00 03 42 call 200eac0 <__errno> 200ddbc: 01 00 00 00 nop 200ddc0: 82 10 20 1c mov 0x1c, %g1 ! 1c 200ddc4: c2 22 00 00 st %g1, [ %o0 ] 200ddc8: 81 c7 e0 08 ret 200ddcc: 91 e8 3f ff restore %g0, -1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200ddd0: 80 a7 40 11 cmp %i5, %l1 200ddd4: 08 bf ff ec bleu 200dd84 200ddd8: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200dddc: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200dde0: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200dde4: 92 10 20 00 clr %o1 200dde8: 7f ff d6 74 call 20037b8 200ddec: 90 07 bf f8 add %fp, -8, %o0 200ddf0: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200ddf4: 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); 200ddf8: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200ddfc: 7f ff d6 6f call 20037b8 200de00: 92 10 20 00 clr %o1 200de04: c2 07 bf f8 ld [ %fp + -8 ], %g1 200de08: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200de0c: 81 c7 e0 08 ret 200de10: 91 e8 20 00 restore %g0, 0, %o0 } 200de14: 81 c7 e0 08 ret 200de18: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200d618 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200d618: 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 ) { 200d61c: 03 00 80 70 sethi %hi(0x201c000), %g1 200d620: f8 00 61 c0 ld [ %g1 + 0x1c0 ], %i4 ! 201c1c0 200d624: b9 37 20 02 srl %i4, 2, %i4 200d628: 82 07 3f ff add %i4, -1, %g1 200d62c: 80 a6 40 01 cmp %i1, %g1 200d630: 18 80 00 18 bgu 200d690 200d634: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200d638: 80 a6 a0 00 cmp %i2, 0 200d63c: 02 80 00 0f be 200d678 200d640: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200d644: 80 a0 60 00 cmp %g1, 0 200d648: 32 80 00 09 bne,a 200d66c 200d64c: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200d650: 7f ff ff e5 call 200d5e4 200d654: b0 10 20 00 clr %i0 if ( !p ) 200d658: 80 a2 20 00 cmp %o0, 0 200d65c: 02 80 00 8a be 200d884 <== NEVER TAKEN 200d660: 01 00 00 00 nop return 0; info->indirect = p; 200d664: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200d668: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200d66c: b3 2e 60 02 sll %i1, 2, %i1 200d670: 81 c7 e0 08 ret 200d674: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200d678: 80 a0 60 00 cmp %g1, 0 200d67c: 02 80 00 82 be 200d884 <== NEVER TAKEN 200d680: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200d684: b3 2e 60 02 sll %i1, 2, %i1 200d688: 81 c7 e0 08 ret 200d68c: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200d690: 90 07 20 01 add %i4, 1, %o0 200d694: 40 00 28 b9 call 2017978 <.umul> 200d698: 92 10 00 1c mov %i4, %o1 200d69c: 82 02 3f ff add %o0, -1, %g1 200d6a0: 80 a6 40 01 cmp %i1, %g1 200d6a4: 18 80 00 2f bgu 200d760 200d6a8: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200d6ac: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d6b0: 92 10 00 1c mov %i4, %o1 200d6b4: 40 00 29 97 call 2017d10 <.urem> 200d6b8: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d6bc: 92 10 00 1c mov %i4, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d6c0: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d6c4: 40 00 28 e7 call 2017a60 <.udiv> 200d6c8: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200d6cc: 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; 200d6d0: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200d6d4: 02 80 00 18 be 200d734 200d6d8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200d6dc: 80 a2 20 00 cmp %o0, 0 200d6e0: 32 80 00 08 bne,a 200d700 200d6e4: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200d6e8: 7f ff ff bf call 200d5e4 200d6ec: b0 10 20 00 clr %i0 if ( !p ) 200d6f0: 80 a2 20 00 cmp %o0, 0 200d6f4: 02 80 00 64 be 200d884 <== NEVER TAKEN 200d6f8: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200d6fc: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200d700: ba 02 00 1c add %o0, %i4, %i5 200d704: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200d708: 80 a2 20 00 cmp %o0, 0 200d70c: 12 80 00 4f bne 200d848 200d710: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200d714: 7f ff ff b4 call 200d5e4 200d718: b0 10 20 00 clr %i0 if ( !p1 ) 200d71c: 80 a2 20 00 cmp %o0, 0 200d720: 02 80 00 59 be 200d884 <== NEVER TAKEN 200d724: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200d728: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200d72c: 10 80 00 47 b 200d848 200d730: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200d734: 80 a2 20 00 cmp %o0, 0 200d738: 02 80 00 53 be 200d884 <== NEVER TAKEN 200d73c: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200d740: b9 2f 20 02 sll %i4, 2, %i4 200d744: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200d748: 80 a0 60 00 cmp %g1, 0 200d74c: 02 80 00 4e be 200d884 <== NEVER TAKEN 200d750: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200d754: b1 2e e0 02 sll %i3, 2, %i0 200d758: 81 c7 e0 08 ret 200d75c: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200d760: 90 02 20 01 inc %o0 200d764: 40 00 28 85 call 2017978 <.umul> 200d768: 92 10 00 1c mov %i4, %o1 200d76c: 90 02 3f ff add %o0, -1, %o0 200d770: 80 a6 40 08 cmp %i1, %o0 200d774: 18 80 00 44 bgu 200d884 <== NEVER TAKEN 200d778: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200d77c: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200d780: 92 10 00 1c mov %i4, %o1 200d784: 40 00 29 63 call 2017d10 <.urem> 200d788: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d78c: 92 10 00 1c mov %i4, %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; 200d790: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200d794: 40 00 28 b3 call 2017a60 <.udiv> 200d798: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200d79c: 92 10 00 1c mov %i4, %o1 200d7a0: 40 00 28 b0 call 2017a60 <.udiv> 200d7a4: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d7a8: 92 10 00 1c mov %i4, %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; 200d7ac: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200d7b0: 40 00 29 58 call 2017d10 <.urem> 200d7b4: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200d7b8: 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; 200d7bc: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200d7c0: 02 80 00 24 be 200d850 200d7c4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200d7c8: 80 a2 20 00 cmp %o0, 0 200d7cc: 12 80 00 08 bne 200d7ec 200d7d0: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200d7d4: 7f ff ff 84 call 200d5e4 200d7d8: 01 00 00 00 nop if ( !p ) 200d7dc: 80 a2 20 00 cmp %o0, 0 200d7e0: 02 80 00 29 be 200d884 <== NEVER TAKEN 200d7e4: 01 00 00 00 nop return 0; info->triply_indirect = p; 200d7e8: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200d7ec: ba 02 00 1b add %o0, %i3, %i5 200d7f0: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200d7f4: 80 a2 20 00 cmp %o0, 0 200d7f8: 32 80 00 08 bne,a 200d818 200d7fc: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200d800: 7f ff ff 79 call 200d5e4 200d804: b0 10 20 00 clr %i0 if ( !p1 ) 200d808: 80 a2 20 00 cmp %o0, 0 200d80c: 02 80 00 1e be 200d884 <== NEVER TAKEN 200d810: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200d814: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200d818: ba 02 00 1c add %o0, %i4, %i5 200d81c: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200d820: 80 a2 20 00 cmp %o0, 0 200d824: 12 80 00 09 bne 200d848 200d828: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200d82c: 7f ff ff 6e call 200d5e4 200d830: b0 10 20 00 clr %i0 if ( !p2 ) 200d834: 80 a2 20 00 cmp %o0, 0 200d838: 02 80 00 13 be 200d884 <== NEVER TAKEN 200d83c: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200d840: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200d844: b1 2c 20 02 sll %l0, 2, %i0 200d848: 81 c7 e0 08 ret 200d84c: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200d850: 80 a2 20 00 cmp %o0, 0 200d854: 02 80 00 0c be 200d884 <== NEVER TAKEN 200d858: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200d85c: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200d860: 80 a0 60 00 cmp %g1, 0 200d864: 02 80 00 08 be 200d884 <== NEVER TAKEN 200d868: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200d86c: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200d870: 80 a0 60 00 cmp %g1, 0 200d874: 02 80 00 04 be 200d884 <== NEVER TAKEN 200d878: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200d87c: b1 2c 20 02 sll %l0, 2, %i0 200d880: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200d884: 81 c7 e0 08 ret 200d888: 81 e8 00 00 restore =============================================================================== 0200d88c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d88c: 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; 200d890: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200d894: 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 ) { 200d898: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200d89c: a0 10 00 19 mov %i1, %l0 * 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 ) { 200d8a0: 80 a0 60 05 cmp %g1, 5 200d8a4: 12 80 00 1c bne 200d914 200d8a8: a2 10 00 1a mov %i2, %l1 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200d8ac: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200d8b0: 82 10 20 00 clr %g1 200d8b4: 86 a3 40 1a subcc %o5, %i2, %g3 200d8b8: 84 63 00 19 subx %o4, %i1, %g2 200d8bc: 80 a0 40 02 cmp %g1, %g2 200d8c0: 14 80 00 07 bg 200d8dc <== NEVER TAKEN 200d8c4: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200d8c8: 80 a0 40 02 cmp %g1, %g2 200d8cc: 12 80 00 06 bne 200d8e4 <== NEVER TAKEN 200d8d0: 80 a7 00 03 cmp %i4, %g3 200d8d4: 28 80 00 05 bleu,a 200d8e8 <== NEVER TAKEN 200d8d8: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200d8dc: 10 80 00 03 b 200d8e8 200d8e0: b0 23 40 11 sub %o5, %l1, %i0 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 200d8e4: 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); 200d8e8: 92 02 40 11 add %o1, %l1, %o1 200d8ec: 94 10 00 18 mov %i0, %o2 200d8f0: 40 00 06 d0 call 200f430 200d8f4: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200d8f8: 90 07 bf f8 add %fp, -8, %o0 200d8fc: 7f ff d7 af call 20037b8 200d900: 92 10 20 00 clr %o1 200d904: c2 07 bf f8 ld [ %fp + -8 ], %g1 200d908: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200d90c: 81 c7 e0 08 ret 200d910: 81 e8 00 00 restore /* * 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 ) 200d914: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 /* * 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; 200d918: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200d91c: 88 10 20 00 clr %g4 200d920: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200d924: 80 a1 00 03 cmp %g4, %g3 200d928: 14 80 00 08 bg 200d948 <== NEVER TAKEN 200d92c: b4 07 00 1a add %i4, %i2, %i2 200d930: 80 a1 00 03 cmp %g4, %g3 200d934: 32 80 00 07 bne,a 200d950 <== NEVER TAKEN 200d938: 03 00 80 70 sethi %hi(0x201c000), %g1 <== NOT EXECUTED 200d93c: 80 a6 80 02 cmp %i2, %g2 200d940: 28 80 00 04 bleu,a 200d950 200d944: 03 00 80 70 sethi %hi(0x201c000), %g1 my_length = the_jnode->info.file.size - start; 200d948: 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; 200d94c: 03 00 80 70 sethi %hi(0x201c000), %g1 200d950: f4 00 61 c0 ld [ %g1 + 0x1c0 ], %i2 ! 201c1c0 200d954: 90 10 00 10 mov %l0, %o0 200d958: b1 3e a0 1f sra %i2, 0x1f, %i0 200d95c: 92 10 00 11 mov %l1, %o1 200d960: 94 10 00 18 mov %i0, %o2 200d964: 40 00 2a 7d call 2018358 <__moddi3> 200d968: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d96c: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200d970: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d974: 94 10 00 18 mov %i0, %o2 200d978: 92 10 00 11 mov %l1, %o1 200d97c: 40 00 29 91 call 2017fc0 <__divdi3> 200d980: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200d984: a2 10 00 1b mov %i3, %l1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200d988: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200d98c: 80 a6 60 00 cmp %i1, 0 200d990: 02 80 00 14 be 200d9e0 200d994: b0 10 20 00 clr %i0 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d998: 90 10 00 1d mov %i5, %o0 200d99c: 7f ff ff 1f call 200d618 200d9a0: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d9a4: 80 a2 20 00 cmp %o0, 0 200d9a8: 02 bf ff d9 be 200d90c <== NEVER TAKEN 200d9ac: b4 26 80 19 sub %i2, %i1, %i2 * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 200d9b0: 80 a7 00 1a cmp %i4, %i2 200d9b4: 08 80 00 03 bleu 200d9c0 200d9b8: b0 10 00 1c mov %i4, %i0 200d9bc: b0 10 00 1a mov %i2, %i0 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 200d9c0: d2 02 00 00 ld [ %o0 ], %o1 200d9c4: 94 10 00 18 mov %i0, %o2 200d9c8: 90 10 00 1b mov %i3, %o0 200d9cc: 92 02 40 19 add %o1, %i1, %o1 200d9d0: 40 00 06 98 call 200f430 200d9d4: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200d9d8: a0 04 20 01 inc %l0 my_length -= to_copy; 200d9dc: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200d9e0: 35 00 80 70 sethi %hi(0x201c000), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200d9e4: 10 80 00 0f b 200da20 200d9e8: f6 06 a1 c0 ld [ %i2 + 0x1c0 ], %i3 ! 201c1c0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200d9ec: 92 10 00 10 mov %l0, %o1 200d9f0: 7f ff ff 0a call 200d618 200d9f4: 94 10 20 00 clr %o2 if ( !block_ptr ) 200d9f8: 82 92 20 00 orcc %o0, 0, %g1 200d9fc: 02 bf ff c4 be 200d90c <== NEVER TAKEN 200da00: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200da04: d2 00 40 00 ld [ %g1 ], %o1 200da08: 94 10 00 1b mov %i3, %o2 200da0c: 40 00 06 89 call 200f430 200da10: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200da14: a0 04 20 01 inc %l0 my_length -= to_copy; 200da18: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200da1c: 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 ) { 200da20: c2 06 a1 c0 ld [ %i2 + 0x1c0 ], %g1 200da24: 80 a7 00 01 cmp %i4, %g1 200da28: 1a bf ff f1 bcc 200d9ec 200da2c: 90 10 00 1d mov %i5, %o0 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200da30: 80 a7 20 00 cmp %i4, 0 200da34: 02 80 00 0e be 200da6c 200da38: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200da3c: 90 10 00 1d mov %i5, %o0 200da40: 92 10 00 10 mov %l0, %o1 200da44: 7f ff fe f5 call 200d618 200da48: 94 10 20 00 clr %o2 if ( !block_ptr ) 200da4c: 82 92 20 00 orcc %o0, 0, %g1 200da50: 02 bf ff af be 200d90c <== NEVER TAKEN 200da54: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200da58: d2 00 40 00 ld [ %g1 ], %o1 200da5c: 94 10 00 1c mov %i4, %o2 200da60: 40 00 06 74 call 200f430 200da64: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200da68: 90 07 bf f8 add %fp, -8, %o0 200da6c: 7f ff d7 53 call 20037b8 200da70: 92 10 20 00 clr %o1 200da74: c2 07 bf f8 ld [ %fp + -8 ], %g1 200da78: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200da7c: 81 c7 e0 08 ret 200da80: 81 e8 00 00 restore =============================================================================== 0200db64 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200db64: 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; 200db68: 03 00 80 70 sethi %hi(0x201c000), %g1 200db6c: fa 00 61 c0 ld [ %g1 + 0x1c0 ], %i5 ! 201c1c0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200db70: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200db74: 80 a0 60 00 cmp %g1, 0 200db78: 02 80 00 05 be 200db8c 200db7c: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200db80: 90 06 20 58 add %i0, 0x58, %o0 200db84: 7f ff ff e5 call 200db18 200db88: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200db8c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200db90: b8 10 20 00 clr %i4 200db94: 80 a0 60 00 cmp %g1, 0 200db98: 12 80 00 0d bne 200dbcc 200db9c: 37 00 80 70 sethi %hi(0x201c000), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200dba0: 10 80 00 15 b 200dbf4 200dba4: 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( 200dba8: 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] ) { 200dbac: 90 00 80 01 add %g2, %g1, %o0 200dbb0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200dbb4: 80 a0 60 00 cmp %g1, 0 200dbb8: 22 80 00 05 be,a 200dbcc <== NEVER TAKEN 200dbbc: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200dbc0: 7f ff ff d6 call 200db18 200dbc4: 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 200dbdc: 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 ); 200dbe0: 90 06 20 5c add %i0, 0x5c, %o0 200dbe4: 7f ff ff cd call 200db18 200dbe8: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200dbec: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200dbf0: b8 10 20 00 clr %i4 200dbf4: 80 a0 60 00 cmp %g1, 0 200dbf8: 12 80 00 1c bne 200dc68 200dbfc: 33 00 80 70 sethi %hi(0x201c000), %i1 200dc00: 81 c7 e0 08 ret 200dc04: 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( 200dc08: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200dc0c: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200dc10: 80 a6 e0 00 cmp %i3, 0 200dc14: 02 80 00 1b be 200dc80 <== NEVER TAKEN 200dc18: 90 06 20 60 add %i0, 0x60, %o0 200dc1c: 10 80 00 09 b 200dc40 200dc20: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200dc2c: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200dc30: 7f ff ff ba call 200db18 200dc34: 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 200dc50: 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( 200dc54: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200dc58: 92 10 00 1d mov %i5, %o1 200dc5c: 90 02 00 10 add %o0, %l0, %o0 200dc60: 7f ff ff ae call 200db18 200dc64: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200dc78: 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( 200dc7c: 90 06 20 60 add %i0, 0x60, %o0 200dc80: 7f ff ff a6 call 200db18 200dc84: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200dc88: 81 c7 e0 08 ret 200dc8c: 81 e8 00 00 restore =============================================================================== 0200de1c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200de1c: 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 ) { 200de20: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200de24: ba 10 00 18 mov %i0, %i5 * 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 ) { 200de28: 80 a0 60 00 cmp %g1, 0 200de2c: 06 80 00 09 bl 200de50 <== NEVER TAKEN 200de30: 94 07 00 1a add %i4, %i2, %o2 200de34: 80 a0 60 00 cmp %g1, 0 200de38: 12 80 00 12 bne 200de80 <== NEVER TAKEN 200de3c: 03 00 80 70 sethi %hi(0x201c000), %g1 200de40: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200de44: 80 a0 40 0a cmp %g1, %o2 200de48: 1a 80 00 0e bcc 200de80 200de4c: 03 00 80 70 sethi %hi(0x201c000), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200de50: 90 10 00 1d mov %i5, %o0 200de54: 7f ff ff 9b call 200dcc0 200de58: 92 10 20 00 clr %o1 if ( status ) 200de5c: 80 a2 20 00 cmp %o0, 0 200de60: 02 80 00 08 be 200de80 200de64: 03 00 80 70 sethi %hi(0x201c000), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200de68: 40 00 03 16 call 200eac0 <__errno> 200de6c: b0 10 3f ff mov -1, %i0 200de70: 82 10 20 1c mov 0x1c, %g1 200de74: c2 22 00 00 st %g1, [ %o0 ] 200de78: 81 c7 e0 08 ret 200de7c: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200de80: e0 00 61 c0 ld [ %g1 + 0x1c0 ], %l0 200de84: 92 10 00 1a mov %i2, %o1 200de88: b1 3c 20 1f sra %l0, 0x1f, %i0 200de8c: 96 10 00 10 mov %l0, %o3 200de90: 94 10 00 18 mov %i0, %o2 200de94: 40 00 29 31 call 2018358 <__moddi3> 200de98: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200de9c: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200dea0: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200dea4: 90 10 00 19 mov %i1, %o0 200dea8: 92 10 00 1a mov %i2, %o1 200deac: 40 00 28 45 call 2017fc0 <__divdi3> 200deb0: 96 10 00 10 mov %l0, %o3 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 200deb4: b0 10 20 00 clr %i0 /* * 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 ) { 200deb8: 80 a4 60 00 cmp %l1, 0 200debc: 02 80 00 14 be 200df0c 200dec0: b4 10 00 09 mov %o1, %i2 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200dec4: 90 10 00 1d mov %i5, %o0 200dec8: 7f ff fd d4 call 200d618 200decc: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ded0: 80 a2 20 00 cmp %o0, 0 200ded4: 02 80 00 36 be 200dfac <== NEVER TAKEN 200ded8: 01 00 00 00 nop * 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; 200dedc: b0 24 00 11 sub %l0, %l1, %i0 200dee0: 80 a6 00 1c cmp %i0, %i4 200dee4: 38 80 00 02 bgu,a 200deec 200dee8: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200deec: d0 02 00 00 ld [ %o0 ], %o0 200def0: 92 10 00 1b mov %i3, %o1 200def4: 90 02 00 11 add %o0, %l1, %o0 200def8: 94 10 00 18 mov %i0, %o2 200defc: 40 00 05 4d call 200f430 200df00: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200df04: b4 06 a0 01 inc %i2 my_length -= to_copy; 200df08: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200df0c: 21 00 80 70 sethi %hi(0x201c000), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200df10: 10 80 00 0f b 200df4c 200df14: f2 04 21 c0 ld [ %l0 + 0x1c0 ], %i1 ! 201c1c0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200df18: 92 10 00 1a mov %i2, %o1 200df1c: 7f ff fd bf call 200d618 200df20: 94 10 20 00 clr %o2 if ( !block_ptr ) 200df24: 80 a2 20 00 cmp %o0, 0 200df28: 02 bf ff d4 be 200de78 <== NEVER TAKEN 200df2c: 92 10 00 1b mov %i3, %o1 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 ); 200df30: d0 02 00 00 ld [ %o0 ], %o0 200df34: 94 10 00 19 mov %i1, %o2 200df38: 40 00 05 3e call 200f430 200df3c: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200df40: b4 06 a0 01 inc %i2 my_length -= to_copy; 200df44: 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( 200df48: b0 06 00 19 add %i0, %i1, %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200df4c: c2 04 21 c0 ld [ %l0 + 0x1c0 ], %g1 200df50: 80 a7 00 01 cmp %i4, %g1 200df54: 1a bf ff f1 bcc 200df18 200df58: 90 10 00 1d mov %i5, %o0 * 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 ) { 200df5c: 80 a7 20 00 cmp %i4, 0 200df60: 02 80 00 0e be 200df98 200df64: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200df68: 90 10 00 1d mov %i5, %o0 200df6c: 92 10 00 1a mov %i2, %o1 200df70: 7f ff fd aa call 200d618 200df74: 94 10 20 00 clr %o2 if ( !block_ptr ) 200df78: 80 a2 20 00 cmp %o0, 0 200df7c: 02 bf ff bf be 200de78 <== NEVER TAKEN 200df80: 92 10 00 1b mov %i3, %o1 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 ); 200df84: d0 02 00 00 ld [ %o0 ], %o0 200df88: 94 10 00 1c mov %i4, %o2 200df8c: 40 00 05 29 call 200f430 200df90: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200df94: 90 07 bf f8 add %fp, -8, %o0 200df98: 7f ff d6 08 call 20037b8 200df9c: 92 10 20 00 clr %o1 200dfa0: c2 07 bf f8 ld [ %fp + -8 ], %g1 200dfa4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200dfa8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200dfac: 81 c7 e0 08 ret 200dfb0: 81 e8 00 00 restore =============================================================================== 02002f54 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2002f54: 9d e3 bf 80 save %sp, -128, %sp dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2002f58: 05 00 00 3c sethi %hi(0xf000), %g2 2002f5c: 07 00 00 10 sethi %hi(0x4000), %g3 2002f60: 84 0e c0 02 and %i3, %g2, %g2 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2002f64: 94 10 00 19 mov %i1, %o2 2002f68: 96 10 00 1a mov %i2, %o3 2002f6c: 98 10 00 1b mov %i3, %o4 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2002f70: 80 a0 80 03 cmp %g2, %g3 2002f74: 02 80 00 16 be 2002fcc 2002f78: 82 10 20 00 clr %g1 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 2002f7c: 07 00 00 20 sethi %hi(0x8000), %g3 2002f80: 80 a0 80 03 cmp %g2, %g3 2002f84: 02 80 00 11 be 2002fc8 2002f88: 07 00 00 08 sethi %hi(0x2000), %g3 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2002f8c: 80 a0 80 03 cmp %g2, %g3 2002f90: 22 80 00 07 be,a 2002fac 2002f94: f8 3f bf e0 std %i4, [ %fp + -32 ] 2002f98: 07 00 00 18 sethi %hi(0x6000), %g3 2002f9c: 80 a0 80 03 cmp %g2, %g3 2002fa0: 12 80 00 05 bne 2002fb4 2002fa4: 07 00 00 04 sethi %hi(0x1000), %g3 *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 2002fa8: f8 3f bf e0 std %i4, [ %fp + -32 ] 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; 2002fac: 10 80 00 08 b 2002fcc 2002fb0: 82 10 20 01 mov 1, %g1 rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 2002fb4: 80 a0 80 03 cmp %g2, %g3 2002fb8: 32 80 00 06 bne,a 2002fd0 <== NEVER TAKEN 2002fbc: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 <== NOT EXECUTED *type = IMFS_FIFO; 2002fc0: 10 80 00 03 b 2002fcc 2002fc4: 82 10 20 06 mov 6, %g1 2002fc8: 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 = 2002fcc: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 2002fd0: 82 00 60 02 add %g1, 2, %g1 2002fd4: c4 00 a0 20 ld [ %g2 + 0x20 ], %g2 2002fd8: 83 28 60 02 sll %g1, 2, %g1 2002fdc: d2 00 80 01 ld [ %g2 + %g1 ], %o1 2002fe0: 90 10 00 18 mov %i0, %o0 2002fe4: 40 00 21 cb call 200b710 2002fe8: 9a 07 bf e0 add %fp, -32, %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 ) { 2002fec: 80 a2 20 00 cmp %o0, 0 2002ff0: 02 80 00 0e be 2003028 2002ff4: 82 10 3f ff mov -1, %g1 IMFS_jnode_t *parent = parentloc->node_access; 2002ff8: f0 06 20 08 ld [ %i0 + 8 ], %i0 IMFS_update_ctime( parent ); 2002ffc: 92 10 20 00 clr %o1 2003000: 40 00 01 ee call 20037b8 2003004: 90 07 bf f8 add %fp, -8, %o0 2003008: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 200300c: 90 07 bf f8 add %fp, -8, %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 ); 2003010: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime( parent ); 2003014: 40 00 01 e9 call 20037b8 2003018: 92 10 20 00 clr %o1 200301c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003020: c2 26 20 44 st %g1, [ %i0 + 0x44 ] size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 2003024: 82 10 20 00 clr %g1 } else { rv = -1; } return rv; } 2003028: 81 c7 e0 08 ret 200302c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 02003030 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003030: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 2003034: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2003038: 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; 200303c: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003040: c4 00 80 00 ld [ %g2 ], %g2 2003044: 80 a0 a0 00 cmp %g2, 0 2003048: 12 80 00 0f bne 2003084 200304c: 01 00 00 00 nop if ( node->info.directory.mt_fs == NULL ) { 2003050: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2003054: 80 a0 a0 00 cmp %g2, 0 2003058: 12 80 00 05 bne 200306c <== NEVER TAKEN 200305c: 01 00 00 00 nop node->info.directory.mt_fs = mt_entry; 2003060: 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; 2003064: 81 c7 e0 08 ret 2003068: 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; 200306c: 40 00 2e 95 call 200eac0 <__errno> <== NOT EXECUTED 2003070: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003074: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED 2003078: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200307c: 81 c7 e0 08 ret <== NOT EXECUTED 2003080: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2003084: 40 00 2e 8f call 200eac0 <__errno> 2003088: b0 10 3f ff mov -1, %i0 200308c: 82 10 20 14 mov 0x14, %g1 2003090: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2003094: 81 c7 e0 08 ret 2003098: 81 e8 00 00 restore =============================================================================== 0200bb04 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 200bb04: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200bb08: 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 ); 200bb0c: 82 06 20 54 add %i0, 0x54, %g1 200bb10: 80 a0 80 01 cmp %g2, %g1 200bb14: 02 80 00 08 be 200bb34 200bb18: 80 a6 00 19 cmp %i0, %i1 errno = ENOTEMPTY; 200bb1c: 40 00 0b e9 call 200eac0 <__errno> 200bb20: b0 10 20 00 clr %i0 200bb24: 82 10 20 5a mov 0x5a, %g1 200bb28: c2 22 00 00 st %g1, [ %o0 ] 200bb2c: 81 c7 e0 08 ret 200bb30: 81 e8 00 00 restore node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 200bb34: 02 80 00 06 be 200bb4c 200bb38: 01 00 00 00 nop 200bb3c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200bb40: 80 a0 60 00 cmp %g1, 0 200bb44: 02 80 00 06 be 200bb5c <== ALWAYS TAKEN 200bb48: 01 00 00 00 nop errno = EBUSY; 200bb4c: 40 00 0b dd call 200eac0 <__errno> 200bb50: b0 10 20 00 clr %i0 ! 0 200bb54: 82 10 20 10 mov 0x10, %g1 200bb58: c2 22 00 00 st %g1, [ %o0 ] node = NULL; } return node; } 200bb5c: 81 c7 e0 08 ret 200bb60: 81 e8 00 00 restore =============================================================================== 02003118 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 2003118: 9d e3 bf 98 save %sp, -104, %sp int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 200311c: fa 06 60 08 ld [ %i1 + 8 ], %i5 const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 2003120: 92 10 00 1b mov %i3, %o1 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 2003124: c2 07 60 08 ld [ %i5 + 8 ], %g1 2003128: 80 a0 60 00 cmp %g1, 0 200312c: 02 80 00 21 be 20031b0 <== NEVER TAKEN 2003130: f4 06 a0 08 ld [ %i2 + 8 ], %i2 if ( namelen < IMFS_NAME_MAX ) { 2003134: 80 a7 20 1f cmp %i4, 0x1f 2003138: 18 80 00 18 bgu 2003198 <== NEVER TAKEN 200313c: 94 10 00 1c mov %i4, %o2 memcpy( node->name, name, namelen ); 2003140: 40 00 30 bc call 200f430 2003144: 90 07 60 0c add %i5, 0xc, %o0 node->name [namelen] = '\0'; 2003148: b8 07 40 1c add %i5, %i4, %i4 200314c: c0 2f 20 0c clrb [ %i4 + 0xc ] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2003150: c4 07 40 00 ld [ %i5 ], %g2 previous = the_node->previous; 2003154: c2 07 60 04 ld [ %i5 + 4 ], %g1 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 2003158: 90 07 bf f8 add %fp, -8, %o0 next->previous = previous; 200315c: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2003160: 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; 2003164: 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; 2003168: 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 ); 200316c: 84 06 a0 54 add %i2, 0x54, %g2 Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 2003170: 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; 2003174: c4 27 40 00 st %g2, [ %i5 ] tail->previous = the_node; old_last->next = the_node; 2003178: fa 20 40 00 st %i5, [ %g1 ] the_node->previous = old_last; 200317c: c2 27 60 04 st %g1, [ %i5 + 4 ] 2003180: 40 00 01 8e call 20037b8 2003184: 92 10 20 00 clr %o1 2003188: c2 07 bf f8 ld [ %fp + -8 ], %g1 200318c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 2003190: 81 c7 e0 08 ret 2003194: 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; 2003198: 40 00 2e 4a call 200eac0 <__errno> <== NOT EXECUTED 200319c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20031a0: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 20031a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20031a8: 81 c7 e0 08 ret <== NOT EXECUTED 20031ac: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 20031b0: 40 00 2e 44 call 200eac0 <__errno> <== NOT EXECUTED 20031b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20031b8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20031bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20031c0: 81 c7 e0 08 ret <== NOT EXECUTED 20031c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020032c4 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 20032c4: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 20032c8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20032cc: 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; 20032d0: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 20032d4: c4 00 80 00 ld [ %g2 ], %g2 20032d8: 80 a0 a0 00 cmp %g2, 0 20032dc: 12 80 00 0f bne 2003318 <== NEVER TAKEN 20032e0: 01 00 00 00 nop if ( node->info.directory.mt_fs == mt_entry ) { 20032e4: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 20032e8: 80 a0 80 18 cmp %g2, %i0 20032ec: 12 80 00 05 bne 2003300 <== NEVER TAKEN 20032f0: 01 00 00 00 nop node->info.directory.mt_fs = NULL; 20032f4: c0 20 60 5c clr [ %g1 + 0x5c ] #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 20032f8: 81 c7 e0 08 ret 20032fc: 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; 2003300: 40 00 2d f0 call 200eac0 <__errno> <== NOT EXECUTED 2003304: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003308: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200330c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003310: 81 c7 e0 08 ret <== NOT EXECUTED 2003314: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2003318: 40 00 2d ea call 200eac0 <__errno> <== NOT EXECUTED 200331c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003320: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2003324: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 2003328: 81 c7 e0 08 ret <== NOT EXECUTED 200332c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02006da8 : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2006da8: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 2006dac: 80 a6 3f ff cmp %i0, -1 2006db0: 32 80 00 0a bne,a 2006dd8 2006db4: e0 06 21 38 ld [ %i0 + 0x138 ], %l0 if (!Stack_check_Interrupt_stack.area) 2006db8: 33 00 81 b6 sethi %hi(0x206d800), %i1 2006dbc: b2 16 62 b4 or %i1, 0x2b4, %i1 ! 206dab4 2006dc0: c2 06 60 04 ld [ %i1 + 4 ], %g1 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 2006dc4: a0 10 20 00 clr %l0 /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 2006dc8: 80 a0 60 00 cmp %g1, 0 2006dcc: 12 80 00 04 bne 2006ddc <== ALWAYS TAKEN 2006dd0: b0 10 20 00 clr %i0 2006dd4: 30 80 00 4f b,a 2006f10 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 2006dd8: b2 06 20 b0 add %i0, 0xb0, %i1 current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006ddc: c4 06 60 04 ld [ %i1 + 4 ], %g2 size = Stack_check_usable_stack_size(stack); 2006de0: f4 06 40 00 ld [ %i1 ], %i2 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2006de4: 82 00 a0 20 add %g2, 0x20, %g1 stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 2006de8: b4 06 bf f0 add %i2, -16, %i2 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 2006dec: 07 29 69 69 sethi %hi(0xa5a5a400), %g3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2006df0: 88 0e bf fc and %i2, -4, %g4 if (*base != U32_PATTERN) 2006df4: 86 10 e1 a5 or %g3, 0x1a5, %g3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2006df8: 10 80 00 06 b 2006e10 2006dfc: 88 00 40 04 add %g1, %g4, %g4 if (*base != U32_PATTERN) 2006e00: 80 a7 40 03 cmp %i5, %g3 2006e04: 12 80 00 08 bne 2006e24 2006e08: 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++) 2006e0c: 82 00 60 04 add %g1, 4, %g1 2006e10: 80 a0 40 04 cmp %g1, %g4 2006e14: 2a bf ff fb bcs,a 2006e00 <== ALWAYS TAKEN 2006e18: fa 00 40 00 ld [ %g1 ], %i5 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; 2006e1c: 10 80 00 07 b 2006e38 <== NOT EXECUTED 2006e20: ba 10 20 00 clr %i5 <== 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 ) 2006e24: 02 80 00 05 be 2006e38 <== NEVER TAKEN 2006e28: ba 10 20 00 clr %i5 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 2006e2c: ba 00 a0 10 add %g2, 0x10, %i5 size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); 2006e30: ba 07 40 1a add %i5, %i2, %i5 2006e34: ba 27 40 01 sub %i5, %g1, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2006e38: 80 a6 20 00 cmp %i0, 0 2006e3c: 02 80 00 12 be 2006e84 2006e40: 03 00 81 ab sethi %hi(0x206ac00), %g1 #endif { (*print_handler)( 2006e44: f6 06 20 08 ld [ %i0 + 8 ], %i3 2006e48: f8 00 61 50 ld [ %g1 + 0x150 ], %i4 2006e4c: 03 00 81 ab sethi %hi(0x206ac00), %g1 2006e50: e2 00 61 4c ld [ %g1 + 0x14c ], %l1 ! 206ad4c 2006e54: 94 07 bf f8 add %fp, -8, %o2 2006e58: 90 10 00 1b mov %i3, %o0 2006e5c: 40 00 18 01 call 200ce60 2006e60: 92 10 20 05 mov 5, %o1 2006e64: 13 00 81 76 sethi %hi(0x205d800), %o1 2006e68: 96 10 00 08 mov %o0, %o3 2006e6c: 92 12 61 80 or %o1, 0x180, %o1 2006e70: 90 10 00 11 mov %l1, %o0 2006e74: 9f c7 00 00 call %i4 2006e78: 94 10 00 1b mov %i3, %o2 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2006e7c: 10 80 00 0a b 2006ea4 2006e80: d4 06 60 04 ld [ %i1 + 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 ); 2006e84: 05 00 81 ab sethi %hi(0x206ac00), %g2 2006e88: c2 00 61 50 ld [ %g1 + 0x150 ], %g1 2006e8c: d0 00 a1 4c ld [ %g2 + 0x14c ], %o0 2006e90: 13 00 81 76 sethi %hi(0x205d800), %o1 2006e94: 94 10 3f ff mov -1, %o2 2006e98: 9f c0 40 00 call %g1 2006e9c: 92 12 61 90 or %o1, 0x190, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2006ea0: d4 06 60 04 ld [ %i1 + 4 ], %o2 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2006ea4: 37 00 81 ab sethi %hi(0x206ac00), %i3 2006ea8: 39 00 81 ab sethi %hi(0x206ac00), %i4 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2006eac: d6 06 40 00 ld [ %i1 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2006eb0: c2 06 e1 50 ld [ %i3 + 0x150 ], %g1 2006eb4: d0 07 21 4c ld [ %i4 + 0x14c ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 2006eb8: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 2006ebc: 13 00 81 76 sethi %hi(0x205d800), %o1 2006ec0: 96 02 80 0b add %o2, %o3, %o3 2006ec4: 92 12 61 a0 or %o1, 0x1a0, %o1 2006ec8: 98 10 00 10 mov %l0, %o4 2006ecc: 9f c0 40 00 call %g1 2006ed0: 9a 10 00 1a mov %i2, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2006ed4: 03 00 81 ab sethi %hi(0x206ac00), %g1 2006ed8: c2 00 61 48 ld [ %g1 + 0x148 ], %g1 ! 206ad48 (*print_handler)( print_context, "Unavailable\n" ); 2006edc: d0 07 21 4c ld [ %i4 + 0x14c ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2006ee0: 80 a0 60 00 cmp %g1, 0 2006ee4: 12 80 00 07 bne 2006f00 <== ALWAYS TAKEN 2006ee8: c2 06 e1 50 ld [ %i3 + 0x150 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 2006eec: 13 00 81 76 sethi %hi(0x205d800), %o1 <== NOT EXECUTED 2006ef0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006ef4: 92 12 61 c0 or %o1, 0x1c0, %o1 ! 205d9c0 <== NOT EXECUTED 2006ef8: 81 c7 e0 08 ret <== NOT EXECUTED 2006efc: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2006f00: 13 00 81 76 sethi %hi(0x205d800), %o1 2006f04: 94 10 00 1d mov %i5, %o2 2006f08: 9f c0 40 00 call %g1 2006f0c: 92 12 61 d0 or %o1, 0x1d0, %o1 2006f10: 81 c7 e0 08 ret 2006f14: 81 e8 00 00 restore =============================================================================== 02007004 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2007004: 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"); 2007008: 11 00 81 76 sethi %hi(0x205d800), %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); 200700c: fa 06 20 b4 ld [ %i0 + 0xb4 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2007010: 40 00 0a 46 call 2009928 2007014: 90 12 21 d8 or %o0, 0x1d8, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2007018: 92 10 00 18 mov %i0, %o1 200701c: 11 00 81 76 sethi %hi(0x205d800), %o0 2007020: 40 00 0a 42 call 2009928 2007024: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 205d9e8 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2007028: d2 06 20 08 ld [ %i0 + 8 ], %o1 200702c: 11 00 81 76 sethi %hi(0x205d800), %o0 2007030: 40 00 0a 3e call 2009928 2007034: 90 12 22 08 or %o0, 0x208, %o0 ! 205da08 printk( 2007038: d2 06 20 0c ld [ %i0 + 0xc ], %o1 200703c: 11 00 81 76 sethi %hi(0x205d800), %o0 2007040: 40 00 0a 3a call 2009928 2007044: 90 12 22 20 or %o0, 0x220, %o0 ! 205da20 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 2007048: d0 06 20 08 ld [ %i0 + 8 ], %o0 200704c: 94 07 bf e0 add %fp, -32, %o2 2007050: 40 00 17 84 call 200ce60 2007054: 92 10 20 20 mov 0x20, %o1 2007058: 92 10 00 08 mov %o0, %o1 200705c: 11 00 81 76 sethi %hi(0x205d800), %o0 2007060: 40 00 0a 32 call 2009928 2007064: 90 12 22 38 or %o0, 0x238, %o0 ! 205da38 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 2007068: d4 06 20 b4 ld [ %i0 + 0xb4 ], %o2 200706c: 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( 2007070: 11 00 81 76 sethi %hi(0x205d800), %o0 2007074: 96 02 80 09 add %o2, %o1, %o3 2007078: 40 00 0a 2c call 2009928 200707c: 90 12 22 50 or %o0, 0x250, %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) { 2007080: 80 a6 60 00 cmp %i1, 0 2007084: 12 80 00 07 bne 20070a0 <== NEVER TAKEN 2007088: 11 00 81 76 sethi %hi(0x205d800), %o0 printk( 200708c: 92 10 20 10 mov 0x10, %o1 2007090: 90 12 22 88 or %o0, 0x288, %o0 2007094: 94 07 60 08 add %i5, 8, %o2 2007098: 40 00 0a 24 call 2009928 200709c: 96 07 60 18 add %i5, 0x18, %o3 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 20070a0: 40 00 1a 33 call 200d96c 20070a4: 90 10 20 81 mov 0x81, %o0 =============================================================================== 02010af4 <_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 ) { 2010af4: 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; 2010af8: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 2010afc: c0 26 20 48 clr [ %i0 + 0x48 ] the_message_queue->maximum_message_size = maximum_message_size; 2010b00: f6 26 20 4c st %i3, [ %i0 + 0x4c ] /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 2010b04: 80 8e e0 03 btst 3, %i3 2010b08: 02 80 00 07 be 2010b24 <_CORE_message_queue_Initialize+0x30> 2010b0c: ba 10 00 1b mov %i3, %i5 allocated_message_size += sizeof(uint32_t); 2010b10: ba 06 e0 04 add %i3, 4, %i5 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2010b14: ba 0f 7f fc and %i5, -4, %i5 } if (allocated_message_size < maximum_message_size) 2010b18: 80 a7 40 1b cmp %i5, %i3 2010b1c: 0a 80 00 24 bcs 2010bac <_CORE_message_queue_Initialize+0xb8><== NEVER TAKEN 2010b20: b8 10 20 00 clr %i4 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 2010b24: ba 07 60 10 add %i5, 0x10, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2010b28: 90 10 20 00 clr %o0 2010b2c: 92 10 00 1a mov %i2, %o1 2010b30: 94 10 20 00 clr %o2 2010b34: 96 10 00 1d mov %i5, %o3 2010b38: 40 00 3f 8a call 2020960 <__muldi3> 2010b3c: b8 10 20 00 clr %i4 if ( x > SIZE_MAX ) 2010b40: 80 a2 20 00 cmp %o0, 0 2010b44: 34 80 00 1b bg,a 2010bb0 <_CORE_message_queue_Initialize+0xbc> 2010b48: b0 0f 20 01 and %i4, 1, %i0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 2010b4c: 40 00 0b e5 call 2013ae0 <_Workspace_Allocate> 2010b50: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2010b54: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2010b58: 80 a2 20 00 cmp %o0, 0 2010b5c: 02 80 00 14 be 2010bac <_CORE_message_queue_Initialize+0xb8><== NEVER TAKEN 2010b60: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2010b64: 90 06 20 60 add %i0, 0x60, %o0 2010b68: 94 10 00 1a mov %i2, %o2 2010b6c: 7f ff ff d4 call 2010abc <_Chain_Initialize> 2010b70: 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 ); 2010b74: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 2010b78: c2 26 20 58 st %g1, [ %i0 + 0x58 ] allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 2010b7c: 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 ); 2010b80: 84 06 20 54 add %i0, 0x54, %g2 2010b84: 82 18 60 01 xor %g1, 1, %g1 2010b88: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 2010b8c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 2010b90: c0 26 20 54 clr [ %i0 + 0x54 ] 2010b94: 90 10 00 18 mov %i0, %o0 2010b98: 92 60 3f ff subx %g0, -1, %o1 2010b9c: 94 10 20 80 mov 0x80, %o2 2010ba0: 96 10 20 06 mov 6, %o3 2010ba4: 40 00 09 aa call 201324c <_Thread_queue_Initialize> 2010ba8: b8 10 20 01 mov 1, %i4 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2010bac: b0 0f 20 01 and %i4, 1, %i0 2010bb0: 81 c7 e0 08 ret 2010bb4: 81 e8 00 00 restore =============================================================================== 02008694 <_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 ) { 2008694: 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)) ) { 2008698: 90 10 00 18 mov %i0, %o0 200869c: 40 00 07 67 call 200a438 <_Thread_queue_Dequeue> 20086a0: ba 10 00 18 mov %i0, %i5 20086a4: 80 a2 20 00 cmp %o0, 0 20086a8: 12 80 00 0e bne 20086e0 <_CORE_semaphore_Surrender+0x4c> 20086ac: 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 ); 20086b0: 7f ff e7 cf call 20025ec 20086b4: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 20086b8: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 20086bc: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 20086c0: 80 a0 40 02 cmp %g1, %g2 20086c4: 1a 80 00 05 bcc 20086d8 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 20086c8: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 20086cc: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 20086d0: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 20086d4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 20086d8: 7f ff e7 c9 call 20025fc 20086dc: 01 00 00 00 nop } return status; } 20086e0: 81 c7 e0 08 ret 20086e4: 81 e8 00 00 restore =============================================================================== 02007400 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 2007400: 9d e3 bf a0 save %sp, -96, %sp rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 2007404: f8 06 21 50 ld [ %i0 + 0x150 ], %i4 option_set = (rtems_option) the_thread->Wait.option; 2007408: f6 06 20 30 ld [ %i0 + 0x30 ], %i3 _ISR_Disable( level ); 200740c: 7f ff ec 78 call 20025ec 2007410: ba 10 00 18 mov %i0, %i5 2007414: b0 10 00 08 mov %o0, %i0 pending_events = api->pending_events; 2007418: c4 07 00 00 ld [ %i4 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 200741c: c6 07 60 24 ld [ %i5 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 2007420: 82 88 c0 02 andcc %g3, %g2, %g1 2007424: 02 80 00 43 be 2007530 <_Event_Surrender+0x130> 2007428: 01 00 00 00 nop /* * 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() && 200742c: 09 00 80 72 sethi %hi(0x201c800), %g4 2007430: 88 11 20 e0 or %g4, 0xe0, %g4 ! 201c8e0 <_Per_CPU_Information> 2007434: f2 01 20 08 ld [ %g4 + 8 ], %i1 2007438: 80 a6 60 00 cmp %i1, 0 200743c: 22 80 00 1d be,a 20074b0 <_Event_Surrender+0xb0> 2007440: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 2007444: c8 01 20 0c ld [ %g4 + 0xc ], %g4 2007448: 80 a7 40 04 cmp %i5, %g4 200744c: 32 80 00 19 bne,a 20074b0 <_Event_Surrender+0xb0> 2007450: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2007454: 09 00 80 72 sethi %hi(0x201c800), %g4 2007458: f2 01 21 40 ld [ %g4 + 0x140 ], %i1 ! 201c940 <_Event_Sync_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 200745c: 80 a6 60 02 cmp %i1, 2 2007460: 02 80 00 07 be 200747c <_Event_Surrender+0x7c> <== NEVER TAKEN 2007464: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 2007468: c8 01 21 40 ld [ %g4 + 0x140 ], %g4 * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 200746c: 80 a1 20 01 cmp %g4, 1 2007470: 32 80 00 10 bne,a 20074b0 <_Event_Surrender+0xb0> 2007474: c8 07 60 10 ld [ %i5 + 0x10 ], %g4 (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 2007478: 80 a0 40 03 cmp %g1, %g3 200747c: 02 80 00 04 be 200748c <_Event_Surrender+0x8c> 2007480: 80 8e e0 02 btst 2, %i3 2007484: 02 80 00 2b be 2007530 <_Event_Surrender+0x130> <== NEVER TAKEN 2007488: 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) ); 200748c: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2007490: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007494: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 2007498: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 200749c: c2 20 80 00 st %g1, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 20074a0: 84 10 20 03 mov 3, %g2 20074a4: 03 00 80 72 sethi %hi(0x201c800), %g1 20074a8: c4 20 61 40 st %g2, [ %g1 + 0x140 ] ! 201c940 <_Event_Sync_state> 20074ac: 30 80 00 21 b,a 2007530 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 20074b0: 80 89 21 00 btst 0x100, %g4 20074b4: 02 80 00 1f be 2007530 <_Event_Surrender+0x130> 20074b8: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 20074bc: 02 80 00 04 be 20074cc <_Event_Surrender+0xcc> 20074c0: 80 8e e0 02 btst 2, %i3 20074c4: 02 80 00 1b be 2007530 <_Event_Surrender+0x130> <== NEVER TAKEN 20074c8: 01 00 00 00 nop 20074cc: 84 28 80 01 andn %g2, %g1, %g2 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 20074d0: c4 27 00 00 st %g2, [ %i4 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20074d4: c4 07 60 28 ld [ %i5 + 0x28 ], %g2 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 20074d8: c0 27 60 24 clr [ %i5 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20074dc: c2 20 80 00 st %g1, [ %g2 ] _ISR_Flash( level ); 20074e0: 7f ff ec 47 call 20025fc 20074e4: 90 10 00 18 mov %i0, %o0 20074e8: 7f ff ec 41 call 20025ec 20074ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 20074f0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 20074f4: 80 a0 60 02 cmp %g1, 2 20074f8: 02 80 00 06 be 2007510 <_Event_Surrender+0x110> 20074fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2007500: 7f ff ec 3f call 20025fc 2007504: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007508: 10 80 00 08 b 2007528 <_Event_Surrender+0x128> 200750c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2007510: c2 27 60 50 st %g1, [ %i5 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2007514: 7f ff ec 3a call 20025fc 2007518: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200751c: 40 00 0e 7f call 200af18 <_Watchdog_Remove> 2007520: 90 07 60 48 add %i5, 0x48, %o0 2007524: b2 16 63 f8 or %i1, 0x3f8, %i1 2007528: 40 00 0a 10 call 2009d68 <_Thread_Clear_state> 200752c: 91 e8 00 1d restore %g0, %i5, %o0 _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 2007530: 7f ff ec 33 call 20025fc 2007534: 81 e8 00 00 restore =============================================================================== 02007538 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 2007538: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 200753c: 90 10 00 18 mov %i0, %o0 2007540: 40 00 0a f6 call 200a118 <_Thread_Get> 2007544: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2007548: c2 07 bf fc ld [ %fp + -4 ], %g1 200754c: 80 a0 60 00 cmp %g1, 0 2007550: 12 80 00 1d bne 20075c4 <_Event_Timeout+0x8c> <== NEVER TAKEN 2007554: 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 ); 2007558: 7f ff ec 25 call 20025ec 200755c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 2007560: 03 00 80 72 sethi %hi(0x201c800), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2007564: c2 00 60 ec ld [ %g1 + 0xec ], %g1 ! 201c8ec <_Per_CPU_Information+0xc> 2007568: 80 a7 40 01 cmp %i5, %g1 200756c: 12 80 00 09 bne 2007590 <_Event_Timeout+0x58> 2007570: c0 27 60 24 clr [ %i5 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 2007574: 03 00 80 72 sethi %hi(0x201c800), %g1 2007578: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 201c940 <_Event_Sync_state> 200757c: 80 a0 a0 01 cmp %g2, 1 2007580: 32 80 00 05 bne,a 2007594 <_Event_Timeout+0x5c> 2007584: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2007588: 84 10 20 02 mov 2, %g2 200758c: c4 20 61 40 st %g2, [ %g1 + 0x140 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2007590: 82 10 20 06 mov 6, %g1 2007594: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 2007598: 7f ff ec 19 call 20025fc 200759c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 20075a0: 90 10 00 1d mov %i5, %o0 20075a4: 13 04 00 ff sethi %hi(0x1003fc00), %o1 20075a8: 40 00 09 f0 call 2009d68 <_Thread_Clear_state> 20075ac: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 20075b0: 03 00 80 71 sethi %hi(0x201c400), %g1 20075b4: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201c6b0 <_Thread_Dispatch_disable_level> 20075b8: 84 00 bf ff add %g2, -1, %g2 20075bc: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 20075c0: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 20075c4: 81 c7 e0 08 ret 20075c8: 81 e8 00 00 restore =============================================================================== 0200cecc <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200cecc: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 200ced0: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200ced4: c0 27 bf fc clr [ %fp + -4 ] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 200ced8: ba 06 40 1a add %i1, %i2, %i5 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 200cedc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 200cee0: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200cee4: d6 06 20 14 ld [ %i0 + 0x14 ], %o3 uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 200cee8: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 200ceec: 80 a7 40 19 cmp %i5, %i1 200cef0: 0a 80 00 9f bcs 200d16c <_Heap_Extend+0x2a0> 200cef4: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200cef8: 90 10 00 19 mov %i1, %o0 200cefc: 92 10 00 1a mov %i2, %o1 200cf00: 94 10 00 11 mov %l1, %o2 200cf04: 98 07 bf f8 add %fp, -8, %o4 200cf08: 7f ff ee 91 call 200894c <_Heap_Get_first_and_last_block> 200cf0c: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200cf10: 80 8a 20 ff btst 0xff, %o0 200cf14: 02 80 00 96 be 200d16c <_Heap_Extend+0x2a0> 200cf18: b4 10 00 10 mov %l0, %i2 200cf1c: aa 10 20 00 clr %l5 200cf20: ac 10 20 00 clr %l6 200cf24: b8 10 20 00 clr %i4 200cf28: a8 10 20 00 clr %l4 200cf2c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 (uintptr_t) start_block : heap->area_begin; uintptr_t const sub_area_end = start_block->prev_size; Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 200cf30: 80 a0 40 1d cmp %g1, %i5 200cf34: 1a 80 00 05 bcc 200cf48 <_Heap_Extend+0x7c> 200cf38: e6 06 80 00 ld [ %i2 ], %l3 200cf3c: 80 a6 40 13 cmp %i1, %l3 200cf40: 2a 80 00 8b bcs,a 200d16c <_Heap_Extend+0x2a0> 200cf44: b8 10 20 00 clr %i4 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 200cf48: 80 a7 40 01 cmp %i5, %g1 200cf4c: 02 80 00 06 be 200cf64 <_Heap_Extend+0x98> 200cf50: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200cf54: 2a 80 00 05 bcs,a 200cf68 <_Heap_Extend+0x9c> 200cf58: ac 10 00 1a mov %i2, %l6 200cf5c: 10 80 00 04 b 200cf6c <_Heap_Extend+0xa0> 200cf60: 90 10 00 13 mov %l3, %o0 200cf64: a8 10 00 1a mov %i2, %l4 200cf68: 90 10 00 13 mov %l3, %o0 200cf6c: 40 00 2c 0d call 2017fa0 <.urem> 200cf70: 92 10 00 11 mov %l1, %o1 200cf74: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200cf78: 80 a4 c0 19 cmp %l3, %i1 200cf7c: 12 80 00 05 bne 200cf90 <_Heap_Extend+0xc4> 200cf80: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200cf84: fa 26 80 00 st %i5, [ %i2 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 200cf88: 10 80 00 04 b 200cf98 <_Heap_Extend+0xcc> 200cf8c: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200cf90: 2a 80 00 02 bcs,a 200cf98 <_Heap_Extend+0xcc> 200cf94: aa 10 00 08 mov %o0, %l5 - 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; 200cf98: f4 02 20 04 ld [ %o0 + 4 ], %i2 200cf9c: 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); 200cfa0: b4 02 00 1a add %o0, %i2, %i2 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200cfa4: 80 a6 80 10 cmp %i2, %l0 200cfa8: 12 bf ff e2 bne 200cf30 <_Heap_Extend+0x64> 200cfac: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200cfb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200cfb4: 80 a6 40 01 cmp %i1, %g1 200cfb8: 3a 80 00 04 bcc,a 200cfc8 <_Heap_Extend+0xfc> 200cfbc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200cfc0: 10 80 00 05 b 200cfd4 <_Heap_Extend+0x108> 200cfc4: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200cfc8: 80 a0 40 1d cmp %g1, %i5 200cfcc: 2a 80 00 02 bcs,a 200cfd4 <_Heap_Extend+0x108> 200cfd0: fa 26 20 1c st %i5, [ %i0 + 0x1c ] heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 200cfd4: c4 07 bf f8 ld [ %fp + -8 ], %g2 200cfd8: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200cfdc: fa 20 80 00 st %i5, [ %g2 ] heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 200cfe0: 86 20 40 02 sub %g1, %g2, %g3 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200cfe4: 88 10 e0 01 or %g3, 1, %g4 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 200cfe8: c6 20 40 00 st %g3, [ %g1 ] extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = 200cfec: c8 20 a0 04 st %g4, [ %g2 + 4 ] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 200cff0: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200cff4: 80 a0 c0 02 cmp %g3, %g2 200cff8: 08 80 00 04 bleu 200d008 <_Heap_Extend+0x13c> 200cffc: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200d000: 10 80 00 06 b 200d018 <_Heap_Extend+0x14c> 200d004: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200d008: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200d00c: 80 a0 80 01 cmp %g2, %g1 200d010: 2a 80 00 02 bcs,a 200d018 <_Heap_Extend+0x14c> 200d014: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200d018: 80 a5 20 00 cmp %l4, 0 200d01c: 02 80 00 14 be 200d06c <_Heap_Extend+0x1a0> 200d020: b2 06 60 08 add %i1, 8, %i1 Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 200d024: f4 06 20 10 ld [ %i0 + 0x10 ], %i2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 200d028: 92 10 00 1a mov %i2, %o1 200d02c: 40 00 2b dd call 2017fa0 <.urem> 200d030: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200d034: 80 a2 20 00 cmp %o0, 0 200d038: 02 80 00 04 be 200d048 <_Heap_Extend+0x17c> 200d03c: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200d040: b2 06 40 1a add %i1, %i2, %i1 200d044: b2 26 40 08 sub %i1, %o0, %i1 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = 200d048: 92 06 7f f8 add %i1, -8, %o1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 200d04c: c2 26 7f f8 st %g1, [ %i1 + -8 ] uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 200d050: 82 25 00 09 sub %l4, %o1, %g1 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 200d054: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200d058: 90 10 00 18 mov %i0, %o0 200d05c: 7f ff ff 92 call 200cea4 <_Heap_Free_block> 200d060: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d064: 10 80 00 08 b 200d084 <_Heap_Extend+0x1b8> 200d068: 80 a7 20 00 cmp %i4, 0 heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 200d06c: 80 a5 a0 00 cmp %l6, 0 200d070: 02 80 00 04 be 200d080 <_Heap_Extend+0x1b4> 200d074: ac 25 80 01 sub %l6, %g1, %l6 { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 200d078: ac 15 a0 01 or %l6, 1, %l6 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = 200d07c: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d080: 80 a7 20 00 cmp %i4, 0 200d084: 02 80 00 15 be 200d0d8 <_Heap_Extend+0x20c> 200d088: ba 07 7f f8 add %i5, -8, %i5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d08c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 200d090: ba 27 40 1c sub %i5, %i4, %i5 200d094: 40 00 2b c3 call 2017fa0 <.urem> 200d098: 90 10 00 1d mov %i5, %o0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 200d09c: c4 07 20 04 ld [ %i4 + 4 ], %g2 200d0a0: ba 27 40 08 sub %i5, %o0, %i5 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200d0a4: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200d0a8: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200d0ac: 84 10 a0 01 or %g2, 1, %g2 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200d0b0: c4 20 60 04 st %g2, [ %g1 + 4 ] RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d0b4: c2 07 20 04 ld [ %i4 + 4 ], %g1 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 200d0b8: 90 10 00 18 mov %i0, %o0 200d0bc: 82 08 60 01 and %g1, 1, %g1 200d0c0: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200d0c4: ba 17 40 01 or %i5, %g1, %i5 200d0c8: 7f ff ff 77 call 200cea4 <_Heap_Free_block> 200d0cc: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d0d0: 10 80 00 0f b 200d10c <_Heap_Extend+0x240> 200d0d4: 80 a7 20 00 cmp %i4, 0 ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 200d0d8: 80 a5 60 00 cmp %l5, 0 200d0dc: 02 80 00 0b be 200d108 <_Heap_Extend+0x23c> 200d0e0: c6 07 bf f8 ld [ %fp + -8 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d0e4: c4 05 60 04 ld [ %l5 + 4 ], %g2 _Heap_Link_above( 200d0e8: c2 07 bf fc ld [ %fp + -4 ], %g1 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 200d0ec: 86 20 c0 15 sub %g3, %l5, %g3 200d0f0: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d0f4: 84 10 c0 02 or %g3, %g2, %g2 200d0f8: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200d0fc: c4 00 60 04 ld [ %g1 + 4 ], %g2 200d100: 84 10 a0 01 or %g2, 1, %g2 200d104: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d108: 80 a7 20 00 cmp %i4, 0 200d10c: 32 80 00 09 bne,a 200d130 <_Heap_Extend+0x264> 200d110: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d114: 80 a5 20 00 cmp %l4, 0 200d118: 32 80 00 06 bne,a 200d130 <_Heap_Extend+0x264> 200d11c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200d120: d2 07 bf f8 ld [ %fp + -8 ], %o1 200d124: 7f ff ff 60 call 200cea4 <_Heap_Free_block> 200d128: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 200d12c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200d130: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d134: c4 00 60 04 ld [ %g1 + 4 ], %g2 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 200d138: 86 20 c0 01 sub %g3, %g1, %g3 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 200d13c: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d140: 84 10 c0 02 or %g3, %g2, %g2 200d144: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200d148: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200d14c: b8 10 20 01 mov 1, %i4 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200d150: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200d154: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200d158: 80 a6 e0 00 cmp %i3, 0 _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 200d15c: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200d160: 02 80 00 03 be 200d16c <_Heap_Extend+0x2a0> <== NEVER TAKEN 200d164: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200d168: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200d16c: b0 0f 20 01 and %i4, 1, %i0 200d170: 81 c7 e0 08 ret 200d174: 81 e8 00 00 restore =============================================================================== 0200cee8 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200cee8: 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 ) { return true; 200ceec: 88 10 20 01 mov 1, %g4 /* * 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 ) { 200cef0: 80 a6 60 00 cmp %i1, 0 200cef4: 02 80 00 78 be 200d0d4 <_Heap_Free+0x1ec> 200cef8: 90 10 00 19 mov %i1, %o0 200cefc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200cf00: 40 00 2b 84 call 2017d10 <.urem> 200cf04: ba 06 7f f8 add %i1, -8, %i5 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 200cf08: d8 06 20 20 ld [ %i0 + 0x20 ], %o4 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200cf0c: ba 27 40 08 sub %i5, %o0, %i5 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; 200cf10: 80 a7 40 0c cmp %i5, %o4 200cf14: 0a 80 00 05 bcs 200cf28 <_Heap_Free+0x40> 200cf18: 82 10 20 00 clr %g1 200cf1c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200cf20: 80 a0 40 1d cmp %g1, %i5 200cf24: 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 ) ) { 200cf28: 80 a0 60 00 cmp %g1, 0 200cf2c: 02 80 00 6a be 200d0d4 <_Heap_Free+0x1ec> 200cf30: 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; 200cf34: da 07 60 04 ld [ %i5 + 4 ], %o5 200cf38: 84 0b 7f fe and %o5, -2, %g2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200cf3c: 82 07 40 02 add %i5, %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; 200cf40: 80 a0 40 0c cmp %g1, %o4 200cf44: 0a 80 00 05 bcs 200cf58 <_Heap_Free+0x70> <== NEVER TAKEN 200cf48: 86 10 20 00 clr %g3 200cf4c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200cf50: 80 a0 c0 01 cmp %g3, %g1 200cf54: 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 ) ) { 200cf58: 80 a0 e0 00 cmp %g3, 0 200cf5c: 02 80 00 5e be 200d0d4 <_Heap_Free+0x1ec> <== NEVER TAKEN 200cf60: 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; 200cf64: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200cf68: 80 8b e0 01 btst 1, %o7 200cf6c: 02 80 00 5a be 200d0d4 <_Heap_Free+0x1ec> <== NEVER TAKEN 200cf70: 9e 0b ff fe and %o7, -2, %o7 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 200cf74: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200cf78: 80 a0 40 04 cmp %g1, %g4 200cf7c: 02 80 00 07 be 200cf98 <_Heap_Free+0xb0> 200cf80: 96 10 20 00 clr %o3 200cf84: 86 00 40 0f add %g1, %o7, %g3 200cf88: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200cf8c: 86 08 e0 01 and %g3, 1, %g3 200cf90: 80 a0 00 03 cmp %g0, %g3 200cf94: 96 60 3f ff subx %g0, -1, %o3 if ( !_Heap_Is_prev_used( block ) ) { 200cf98: 80 8b 60 01 btst 1, %o5 200cf9c: 12 80 00 26 bne 200d034 <_Heap_Free+0x14c> 200cfa0: 80 8a e0 ff btst 0xff, %o3 uintptr_t const prev_size = block->prev_size; 200cfa4: da 07 40 00 ld [ %i5 ], %o5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200cfa8: 86 27 40 0d sub %i5, %o5, %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; 200cfac: 80 a0 c0 0c cmp %g3, %o4 200cfb0: 0a 80 00 04 bcs 200cfc0 <_Heap_Free+0xd8> <== NEVER TAKEN 200cfb4: 94 10 20 00 clr %o2 200cfb8: 80 a1 00 03 cmp %g4, %g3 200cfbc: 94 60 3f ff subx %g0, -1, %o2 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 200cfc0: 80 a2 a0 00 cmp %o2, 0 200cfc4: 02 80 00 44 be 200d0d4 <_Heap_Free+0x1ec> <== NEVER TAKEN 200cfc8: 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; 200cfcc: d8 00 e0 04 ld [ %g3 + 4 ], %o4 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) ) { 200cfd0: 80 8b 20 01 btst 1, %o4 200cfd4: 02 80 00 40 be 200d0d4 <_Heap_Free+0x1ec> <== NEVER TAKEN 200cfd8: 80 8a e0 ff btst 0xff, %o3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200cfdc: 22 80 00 0f be,a 200d018 <_Heap_Free+0x130> 200cfe0: 9a 00 80 0d add %g2, %o5, %o5 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200cfe4: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200cfe8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 uintptr_t const size = block_size + prev_size + next_block_size; 200cfec: 9e 00 80 0f add %g2, %o7, %o7 prev->next = next; 200cff0: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200cff4: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200cff8: 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; 200cffc: 9a 03 c0 0d add %o7, %o5, %o5 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200d000: 82 00 7f ff add %g1, -1, %g1 200d004: 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; 200d008: da 20 c0 0d st %o5, [ %g3 + %o5 ] 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; 200d00c: 82 13 60 01 or %o5, 1, %g1 200d010: 10 80 00 27 b 200d0ac <_Heap_Free+0x1c4> 200d014: 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; 200d018: 88 13 60 01 or %o5, 1, %g4 200d01c: c8 20 e0 04 st %g4, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d020: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200d024: da 27 40 02 st %o5, [ %i5 + %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; 200d028: 86 08 ff fe and %g3, -2, %g3 200d02c: 10 80 00 20 b 200d0ac <_Heap_Free+0x1c4> 200d030: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200d034: 22 80 00 0d be,a 200d068 <_Heap_Free+0x180> 200d038: 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; 200d03c: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200d040: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200d044: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200d048: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200d04c: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200d050: fa 20 60 08 st %i5, [ %g1 + 8 ] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 200d054: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200d058: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200d05c: c6 27 40 03 st %g3, [ %i5 + %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; 200d060: 10 80 00 13 b 200d0ac <_Heap_Free+0x1c4> 200d064: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200d068: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200d06c: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200d070: fa 20 e0 0c st %i5, [ %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; 200d074: 86 10 a0 01 or %g2, 1, %g3 200d078: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d07c: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200d080: c4 27 40 02 st %g2, [ %i5 + %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; 200d084: 86 08 ff fe and %g3, -2, %g3 200d088: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200d08c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200d090: 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; 200d094: 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; 200d098: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200d09c: 80 a0 c0 01 cmp %g3, %g1 200d0a0: 1a 80 00 03 bcc 200d0ac <_Heap_Free+0x1c4> 200d0a4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200d0a8: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200d0ac: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200d0b0: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200d0b4: 82 00 7f ff add %g1, -1, %g1 200d0b8: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200d0bc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200d0c0: 82 00 60 01 inc %g1 200d0c4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200d0c8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200d0cc: 84 00 40 02 add %g1, %g2, %g2 200d0d0: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200d0d4: b0 09 20 01 and %g4, 1, %i0 200d0d8: 81 c7 e0 08 ret 200d0dc: 81 e8 00 00 restore =============================================================================== 0203e0d0 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 203e0d0: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; 203e0d4: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 Heap_Block *end = heap->last_block; 203e0d8: 10 80 00 0b b 203e104 <_Heap_Iterate+0x34> 203e0dc: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 while ( !stop && current != end ) { 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 ); 203e0e0: 96 10 00 1a mov %i2, %o3 - 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; 203e0e4: 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); 203e0e8: ba 02 00 09 add %o0, %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; 203e0ec: d4 07 60 04 ld [ %i5 + 4 ], %o2 203e0f0: 9f c6 40 00 call %i1 203e0f4: 94 0a a0 01 and %o2, 1, %o2 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 203e0f8: 80 8a 20 ff btst 0xff, %o0 203e0fc: 12 80 00 05 bne 203e110 <_Heap_Iterate+0x40> <== NEVER TAKEN 203e100: 90 10 00 1d mov %i5, %o0 203e104: 80 a2 00 1c cmp %o0, %i4 203e108: 32 bf ff f6 bne,a 203e0e0 <_Heap_Iterate+0x10> 203e10c: d2 02 20 04 ld [ %o0 + 4 ], %o1 203e110: 81 c7 e0 08 ret 203e114: 81 e8 00 00 restore =============================================================================== 0200d200 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200d200: 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); 200d204: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200d208: 40 00 2a c2 call 2017d10 <.urem> 200d20c: 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 200d210: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d214: 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); 200d218: 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; 200d21c: 80 a2 00 03 cmp %o0, %g3 200d220: 0a 80 00 05 bcs 200d234 <_Heap_Size_of_alloc_area+0x34> 200d224: 84 10 20 00 clr %g2 200d228: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d22c: 80 a0 40 08 cmp %g1, %o0 200d230: 84 60 3f ff subx %g0, -1, %g2 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 200d234: 80 a0 a0 00 cmp %g2, 0 200d238: 02 80 00 15 be 200d28c <_Heap_Size_of_alloc_area+0x8c> 200d23c: 82 10 20 00 clr %g1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 200d240: fa 02 20 04 ld [ %o0 + 4 ], %i5 200d244: ba 0f 7f fe and %i5, -2, %i5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200d248: ba 02 00 1d add %o0, %i5, %i5 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; 200d24c: 80 a7 40 03 cmp %i5, %g3 200d250: 0a 80 00 05 bcs 200d264 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 200d254: 84 10 20 00 clr %g2 200d258: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d25c: 80 a0 40 1d cmp %g1, %i5 200d260: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 200d264: 80 a0 a0 00 cmp %g2, 0 200d268: 02 80 00 09 be 200d28c <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200d26c: 82 10 20 00 clr %g1 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; 200d270: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200d274: 80 88 a0 01 btst 1, %g2 200d278: 02 80 00 05 be 200d28c <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200d27c: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200d280: 82 10 20 01 mov 1, %g1 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 200d284: ba 07 60 04 add %i5, 4, %i5 200d288: fa 26 80 00 st %i5, [ %i2 ] return true; } 200d28c: b0 08 60 01 and %g1, 1, %i0 200d290: 81 c7 e0 08 ret 200d294: 81 e8 00 00 restore =============================================================================== 02009808 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2009808: 9d e3 bf 80 save %sp, -128, %sp uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 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; 200980c: 3b 00 80 25 sethi %hi(0x2009400), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2009810: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 2009814: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 2009818: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 200981c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 2009820: 80 a6 a0 00 cmp %i2, 0 2009824: 02 80 00 04 be 2009834 <_Heap_Walk+0x2c> 2009828: ba 17 63 b4 or %i5, 0x3b4, %i5 200982c: 3b 00 80 25 sethi %hi(0x2009400), %i5 2009830: ba 17 63 bc or %i5, 0x3bc, %i5 ! 20097bc <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2009834: 03 00 80 7a sethi %hi(0x201e800), %g1 2009838: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 201ebd8 <_System_state_Current> 200983c: 80 a0 a0 03 cmp %g2, 3 2009840: 12 80 01 24 bne 2009cd0 <_Heap_Walk+0x4c8> 2009844: 82 10 20 01 mov 1, %g1 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)( 2009848: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 200984c: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2009850: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2009854: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 2009858: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 200985c: c2 06 20 08 ld [ %i0 + 8 ], %g1 2009860: 90 10 00 19 mov %i1, %o0 2009864: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 2009868: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200986c: 92 10 20 00 clr %o1 2009870: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2009874: 15 00 80 6d sethi %hi(0x201b400), %o2 2009878: 96 10 00 1c mov %i4, %o3 200987c: 94 12 a2 f0 or %o2, 0x2f0, %o2 2009880: 9f c7 40 00 call %i5 2009884: 98 10 00 10 mov %l0, %o4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2009888: 80 a7 20 00 cmp %i4, 0 200988c: 12 80 00 07 bne 20098a8 <_Heap_Walk+0xa0> 2009890: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 2009894: 15 00 80 6d sethi %hi(0x201b400), %o2 2009898: 90 10 00 19 mov %i1, %o0 200989c: 92 10 20 01 mov 1, %o1 20098a0: 10 80 00 32 b 2009968 <_Heap_Walk+0x160> 20098a4: 94 12 a3 88 or %o2, 0x388, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 20098a8: 22 80 00 08 be,a 20098c8 <_Heap_Walk+0xc0> 20098ac: 90 10 00 10 mov %l0, %o0 (*printer)( 20098b0: 15 00 80 6d sethi %hi(0x201b400), %o2 20098b4: 90 10 00 19 mov %i1, %o0 20098b8: 92 10 20 01 mov 1, %o1 20098bc: 94 12 a3 a0 or %o2, 0x3a0, %o2 20098c0: 10 80 01 0b b 2009cec <_Heap_Walk+0x4e4> 20098c4: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20098c8: 7f ff e0 86 call 2001ae0 <.urem> 20098cc: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 20098d0: 80 a2 20 00 cmp %o0, 0 20098d4: 22 80 00 08 be,a 20098f4 <_Heap_Walk+0xec> 20098d8: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 20098dc: 15 00 80 6d sethi %hi(0x201b400), %o2 20098e0: 90 10 00 19 mov %i1, %o0 20098e4: 92 10 20 01 mov 1, %o1 20098e8: 94 12 a3 c0 or %o2, 0x3c0, %o2 20098ec: 10 80 01 00 b 2009cec <_Heap_Walk+0x4e4> 20098f0: 96 10 00 10 mov %l0, %o3 20098f4: 7f ff e0 7b call 2001ae0 <.urem> 20098f8: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 20098fc: 80 a2 20 00 cmp %o0, 0 2009900: 22 80 00 08 be,a 2009920 <_Heap_Walk+0x118> 2009904: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2009908: 15 00 80 6d sethi %hi(0x201b400), %o2 200990c: 90 10 00 19 mov %i1, %o0 2009910: 92 10 20 01 mov 1, %o1 2009914: 94 12 a3 e8 or %o2, 0x3e8, %o2 2009918: 10 80 00 f5 b 2009cec <_Heap_Walk+0x4e4> 200991c: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2009920: 80 88 60 01 btst 1, %g1 2009924: 32 80 00 07 bne,a 2009940 <_Heap_Walk+0x138> 2009928: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 200992c: 15 00 80 6e sethi %hi(0x201b800), %o2 2009930: 90 10 00 19 mov %i1, %o0 2009934: 92 10 20 01 mov 1, %o1 2009938: 10 80 00 0c b 2009968 <_Heap_Walk+0x160> 200993c: 94 12 a0 20 or %o2, 0x20, %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; 2009940: 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); 2009944: b4 04 40 1a add %l1, %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; 2009948: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 200994c: 80 88 60 01 btst 1, %g1 2009950: 12 80 00 0a bne 2009978 <_Heap_Walk+0x170> 2009954: 80 a6 80 1b cmp %i2, %i3 (*printer)( 2009958: 15 00 80 6e sethi %hi(0x201b800), %o2 200995c: 90 10 00 19 mov %i1, %o0 2009960: 92 10 20 01 mov 1, %o1 2009964: 94 12 a0 50 or %o2, 0x50, %o2 2009968: 9f c7 40 00 call %i5 200996c: 01 00 00 00 nop if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009970: 10 80 00 d8 b 2009cd0 <_Heap_Walk+0x4c8> 2009974: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 2009978: 02 80 00 06 be 2009990 <_Heap_Walk+0x188> 200997c: 15 00 80 6e sethi %hi(0x201b800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2009980: 90 10 00 19 mov %i1, %o0 2009984: 92 10 20 01 mov 1, %o1 2009988: 10 bf ff f8 b 2009968 <_Heap_Walk+0x160> 200998c: 94 12 a0 68 or %o2, 0x68, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2009990: e6 06 20 10 ld [ %i0 + 0x10 ], %l3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 2009994: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2009998: 10 80 00 33 b 2009a64 <_Heap_Walk+0x25c> 200999c: a4 10 00 18 mov %i0, %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; 20099a0: 80 a0 80 0b cmp %g2, %o3 20099a4: 18 80 00 05 bgu 20099b8 <_Heap_Walk+0x1b0> 20099a8: 82 10 20 00 clr %g1 20099ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 20099b0: 80 a0 40 0b cmp %g1, %o3 20099b4: 82 60 3f ff subx %g0, -1, %g1 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 20099b8: 80 a0 60 00 cmp %g1, 0 20099bc: 32 80 00 07 bne,a 20099d8 <_Heap_Walk+0x1d0> 20099c0: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 20099c4: 15 00 80 6e sethi %hi(0x201b800), %o2 20099c8: 90 10 00 19 mov %i1, %o0 20099cc: 92 10 20 01 mov 1, %o1 20099d0: 10 80 00 c7 b 2009cec <_Heap_Walk+0x4e4> 20099d4: 94 12 a0 98 or %o2, 0x98, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 20099d8: d6 27 bf f8 st %o3, [ %fp + -8 ] 20099dc: 7f ff e0 41 call 2001ae0 <.urem> 20099e0: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 20099e4: 80 a2 20 00 cmp %o0, 0 20099e8: 02 80 00 07 be 2009a04 <_Heap_Walk+0x1fc> 20099ec: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 20099f0: 15 00 80 6e sethi %hi(0x201b800), %o2 20099f4: 90 10 00 19 mov %i1, %o0 20099f8: 92 10 20 01 mov 1, %o1 20099fc: 10 80 00 bc b 2009cec <_Heap_Walk+0x4e4> 2009a00: 94 12 a0 b8 or %o2, 0xb8, %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; 2009a04: c2 02 e0 04 ld [ %o3 + 4 ], %g1 2009a08: 82 08 7f fe and %g1, -2, %g1 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; 2009a0c: 82 02 c0 01 add %o3, %g1, %g1 2009a10: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2009a14: 80 88 60 01 btst 1, %g1 2009a18: 22 80 00 07 be,a 2009a34 <_Heap_Walk+0x22c> 2009a1c: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2009a20: 15 00 80 6e sethi %hi(0x201b800), %o2 2009a24: 90 10 00 19 mov %i1, %o0 2009a28: 92 10 20 01 mov 1, %o1 2009a2c: 10 80 00 b0 b 2009cec <_Heap_Walk+0x4e4> 2009a30: 94 12 a0 e8 or %o2, 0xe8, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2009a34: 80 a3 00 12 cmp %o4, %l2 2009a38: 22 80 00 0a be,a 2009a60 <_Heap_Walk+0x258> 2009a3c: a4 10 00 0b mov %o3, %l2 (*printer)( 2009a40: 15 00 80 6e sethi %hi(0x201b800), %o2 2009a44: 90 10 00 19 mov %i1, %o0 2009a48: 92 10 20 01 mov 1, %o1 2009a4c: 94 12 a1 08 or %o2, 0x108, %o2 2009a50: 9f c7 40 00 call %i5 2009a54: 01 00 00 00 nop if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009a58: 10 80 00 9e b 2009cd0 <_Heap_Walk+0x4c8> 2009a5c: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 2009a60: 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 ) { 2009a64: 80 a2 c0 18 cmp %o3, %i0 2009a68: 32 bf ff ce bne,a 20099a0 <_Heap_Walk+0x198> 2009a6c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2009a70: 2d 00 80 6e sethi %hi(0x201b800), %l6 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 2009a74: 2f 00 80 6e sethi %hi(0x201b800), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009a78: ac 15 a2 c8 or %l6, 0x2c8, %l6 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( 2009a7c: ae 15 e2 b0 or %l7, 0x2b0, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009a80: 2b 00 80 6e sethi %hi(0x201b800), %l5 - 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; 2009a84: c2 06 a0 04 ld [ %i2 + 4 ], %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; 2009a88: c6 06 20 20 ld [ %i0 + 0x20 ], %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; 2009a8c: a4 08 7f fe and %g1, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2009a90: a6 06 80 12 add %i2, %l2, %l3 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; 2009a94: 80 a0 c0 13 cmp %g3, %l3 2009a98: 18 80 00 05 bgu 2009aac <_Heap_Walk+0x2a4> <== NEVER TAKEN 2009a9c: 84 10 20 00 clr %g2 2009aa0: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2009aa4: 80 a0 80 13 cmp %g2, %l3 2009aa8: 84 60 3f ff subx %g0, -1, %g2 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; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 2009aac: 80 a0 a0 00 cmp %g2, 0 2009ab0: 12 80 00 07 bne 2009acc <_Heap_Walk+0x2c4> 2009ab4: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 2009ab8: 15 00 80 6e sethi %hi(0x201b800), %o2 2009abc: 90 10 00 19 mov %i1, %o0 2009ac0: 92 10 20 01 mov 1, %o1 2009ac4: 10 80 00 2c b 2009b74 <_Heap_Walk+0x36c> 2009ac8: 94 12 a1 40 or %o2, 0x140, %o2 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; 2009acc: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009ad0: c2 27 bf fc st %g1, [ %fp + -4 ] 2009ad4: a8 40 20 00 addx %g0, 0, %l4 2009ad8: 90 10 00 12 mov %l2, %o0 2009adc: 7f ff e0 01 call 2001ae0 <.urem> 2009ae0: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 2009ae4: 80 a2 20 00 cmp %o0, 0 2009ae8: 02 80 00 0c be 2009b18 <_Heap_Walk+0x310> 2009aec: c2 07 bf fc ld [ %fp + -4 ], %g1 2009af0: 80 8d 20 ff btst 0xff, %l4 2009af4: 02 80 00 0a be 2009b1c <_Heap_Walk+0x314> 2009af8: 80 a4 80 10 cmp %l2, %l0 (*printer)( 2009afc: 15 00 80 6e sethi %hi(0x201b800), %o2 2009b00: 90 10 00 19 mov %i1, %o0 2009b04: 92 10 20 01 mov 1, %o1 2009b08: 94 12 a1 70 or %o2, 0x170, %o2 2009b0c: 96 10 00 1a mov %i2, %o3 2009b10: 10 bf ff d0 b 2009a50 <_Heap_Walk+0x248> 2009b14: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2009b18: 80 a4 80 10 cmp %l2, %l0 2009b1c: 1a 80 00 0d bcc 2009b50 <_Heap_Walk+0x348> 2009b20: 80 a4 c0 1a cmp %l3, %i2 2009b24: 80 8d 20 ff btst 0xff, %l4 2009b28: 02 80 00 0a be 2009b50 <_Heap_Walk+0x348> <== NEVER TAKEN 2009b2c: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2009b30: 15 00 80 6e sethi %hi(0x201b800), %o2 2009b34: 90 10 00 19 mov %i1, %o0 2009b38: 92 10 20 01 mov 1, %o1 2009b3c: 94 12 a1 a0 or %o2, 0x1a0, %o2 2009b40: 96 10 00 1a mov %i2, %o3 2009b44: 98 10 00 12 mov %l2, %o4 2009b48: 10 80 00 3d b 2009c3c <_Heap_Walk+0x434> 2009b4c: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2009b50: 38 80 00 0c bgu,a 2009b80 <_Heap_Walk+0x378> 2009b54: a8 08 60 01 and %g1, 1, %l4 2009b58: 80 8d 20 ff btst 0xff, %l4 2009b5c: 02 80 00 09 be 2009b80 <_Heap_Walk+0x378> 2009b60: a8 08 60 01 and %g1, 1, %l4 (*printer)( 2009b64: 15 00 80 6e sethi %hi(0x201b800), %o2 2009b68: 90 10 00 19 mov %i1, %o0 2009b6c: 92 10 20 01 mov 1, %o1 2009b70: 94 12 a1 d0 or %o2, 0x1d0, %o2 2009b74: 96 10 00 1a mov %i2, %o3 2009b78: 10 bf ff b6 b 2009a50 <_Heap_Walk+0x248> 2009b7c: 98 10 00 13 mov %l3, %o4 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; 2009b80: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2009b84: 80 88 60 01 btst 1, %g1 2009b88: 12 80 00 40 bne 2009c88 <_Heap_Walk+0x480> 2009b8c: 90 10 00 19 mov %i1, %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 ? 2009b90: da 06 a0 0c ld [ %i2 + 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)( 2009b94: c2 06 20 08 ld [ %i0 + 8 ], %g1 2009b98: 05 00 80 6d sethi %hi(0x201b400), %g2 return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 2009b9c: c8 06 20 0c ld [ %i0 + 0xc ], %g4 2009ba0: 80 a3 40 01 cmp %o5, %g1 2009ba4: 02 80 00 07 be 2009bc0 <_Heap_Walk+0x3b8> 2009ba8: 86 10 a2 b0 or %g2, 0x2b0, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2009bac: 80 a3 40 18 cmp %o5, %i0 2009bb0: 12 80 00 04 bne 2009bc0 <_Heap_Walk+0x3b8> 2009bb4: 86 15 62 78 or %l5, 0x278, %g3 2009bb8: 07 00 80 6d sethi %hi(0x201b400), %g3 2009bbc: 86 10 e2 c0 or %g3, 0x2c0, %g3 ! 201b6c0 <__log2table+0x130> block->next, block->next == last_free_block ? 2009bc0: c4 06 a0 08 ld [ %i2 + 8 ], %g2 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)( 2009bc4: 1f 00 80 6d sethi %hi(0x201b400), %o7 2009bc8: 80 a0 80 04 cmp %g2, %g4 2009bcc: 02 80 00 07 be 2009be8 <_Heap_Walk+0x3e0> 2009bd0: 82 13 e2 d0 or %o7, 0x2d0, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009bd4: 80 a0 80 18 cmp %g2, %i0 2009bd8: 12 80 00 04 bne 2009be8 <_Heap_Walk+0x3e0> 2009bdc: 82 15 62 78 or %l5, 0x278, %g1 2009be0: 03 00 80 6d sethi %hi(0x201b400), %g1 2009be4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 201b6e0 <__log2table+0x150> 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)( 2009be8: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009bec: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2009bf0: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 2009bf4: 90 10 00 19 mov %i1, %o0 2009bf8: 92 10 20 00 clr %o1 2009bfc: 15 00 80 6e sethi %hi(0x201b800), %o2 2009c00: 96 10 00 1a mov %i2, %o3 2009c04: 94 12 a2 08 or %o2, 0x208, %o2 2009c08: 9f c7 40 00 call %i5 2009c0c: 98 10 00 12 mov %l2, %o4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 2009c10: da 04 c0 00 ld [ %l3 ], %o5 2009c14: 80 a4 80 0d cmp %l2, %o5 2009c18: 02 80 00 0d be 2009c4c <_Heap_Walk+0x444> 2009c1c: 80 a5 20 00 cmp %l4, 0 (*printer)( 2009c20: 15 00 80 6e sethi %hi(0x201b800), %o2 2009c24: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2009c28: 90 10 00 19 mov %i1, %o0 2009c2c: 92 10 20 01 mov 1, %o1 2009c30: 94 12 a2 40 or %o2, 0x240, %o2 2009c34: 96 10 00 1a mov %i2, %o3 2009c38: 98 10 00 12 mov %l2, %o4 2009c3c: 9f c7 40 00 call %i5 2009c40: 01 00 00 00 nop 2009c44: 10 80 00 23 b 2009cd0 <_Heap_Walk+0x4c8> 2009c48: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 2009c4c: 32 80 00 0a bne,a 2009c74 <_Heap_Walk+0x46c> 2009c50: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2009c54: 15 00 80 6e sethi %hi(0x201b800), %o2 2009c58: 90 10 00 19 mov %i1, %o0 2009c5c: 92 10 20 01 mov 1, %o1 2009c60: 10 80 00 22 b 2009ce8 <_Heap_Walk+0x4e0> 2009c64: 94 12 a2 80 or %o2, 0x280, %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 ) { 2009c68: 02 80 00 17 be 2009cc4 <_Heap_Walk+0x4bc> 2009c6c: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 2009c70: c2 00 60 08 ld [ %g1 + 8 ], %g1 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 2009c74: 80 a0 40 18 cmp %g1, %i0 2009c78: 12 bf ff fc bne 2009c68 <_Heap_Walk+0x460> 2009c7c: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009c80: 10 80 00 17 b 2009cdc <_Heap_Walk+0x4d4> 2009c84: 15 00 80 6e sethi %hi(0x201b800), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2009c88: 80 a5 20 00 cmp %l4, 0 2009c8c: 02 80 00 08 be 2009cac <_Heap_Walk+0x4a4> 2009c90: 92 10 20 00 clr %o1 (*printer)( 2009c94: 94 10 00 17 mov %l7, %o2 2009c98: 96 10 00 1a mov %i2, %o3 2009c9c: 9f c7 40 00 call %i5 2009ca0: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009ca4: 10 80 00 08 b 2009cc4 <_Heap_Walk+0x4bc> 2009ca8: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009cac: da 06 80 00 ld [ %i2 ], %o5 2009cb0: 94 10 00 16 mov %l6, %o2 2009cb4: 96 10 00 1a mov %i2, %o3 2009cb8: 9f c7 40 00 call %i5 2009cbc: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009cc0: 80 a4 c0 1b cmp %l3, %i3 2009cc4: 12 bf ff 70 bne 2009a84 <_Heap_Walk+0x27c> 2009cc8: b4 10 00 13 mov %l3, %i2 return true; 2009ccc: 82 10 20 01 mov 1, %g1 } 2009cd0: b0 08 60 01 and %g1, 1, %i0 2009cd4: 81 c7 e0 08 ret 2009cd8: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009cdc: 90 10 00 19 mov %i1, %o0 2009ce0: 92 10 20 01 mov 1, %o1 2009ce4: 94 12 a2 f0 or %o2, 0x2f0, %o2 2009ce8: 96 10 00 1a mov %i2, %o3 2009cec: 9f c7 40 00 call %i5 2009cf0: 01 00 00 00 nop 2009cf4: 10 bf ff f7 b 2009cd0 <_Heap_Walk+0x4c8> 2009cf8: 82 10 20 00 clr %g1 ! 0 =============================================================================== 02008cac <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008cac: 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 ) 2008cb0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008cb4: ba 10 00 18 mov %i0, %i5 * 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 ) 2008cb8: 80 a0 60 00 cmp %g1, 0 2008cbc: 02 80 00 20 be 2008d3c <_Objects_Allocate+0x90> <== NEVER TAKEN 2008cc0: b0 10 20 00 clr %i0 /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008cc4: b8 07 60 20 add %i5, 0x20, %i4 2008cc8: 7f ff fd 76 call 20082a0 <_Chain_Get> 2008ccc: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2008cd0: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2008cd4: 80 a0 60 00 cmp %g1, 0 2008cd8: 02 80 00 19 be 2008d3c <_Objects_Allocate+0x90> 2008cdc: 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 ) { 2008ce0: 80 a2 20 00 cmp %o0, 0 2008ce4: 32 80 00 0a bne,a 2008d0c <_Objects_Allocate+0x60> 2008ce8: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 2008cec: 40 00 00 1d call 2008d60 <_Objects_Extend_information> 2008cf0: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008cf4: 7f ff fd 6b call 20082a0 <_Chain_Get> 2008cf8: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2008cfc: b0 92 20 00 orcc %o0, 0, %i0 2008d00: 02 80 00 0f be 2008d3c <_Objects_Allocate+0x90> 2008d04: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008d08: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2008d0c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008d10: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 2008d14: 40 00 3b 53 call 2017a60 <.udiv> 2008d18: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2008d1c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2008d20: 91 2a 20 02 sll %o0, 2, %o0 2008d24: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2008d28: 84 00 bf ff add %g2, -1, %g2 2008d2c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2008d30: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 2008d34: 82 00 7f ff add %g1, -1, %g1 2008d38: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2008d3c: 81 c7 e0 08 ret 2008d40: 81 e8 00 00 restore =============================================================================== 020090b8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 20090b8: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 20090bc: 80 a6 60 00 cmp %i1, 0 20090c0: 02 80 00 17 be 200911c <_Objects_Get_information+0x64> 20090c4: ba 10 20 00 clr %i5 /* * 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 ); 20090c8: 40 00 10 74 call 200d298 <_Objects_API_maximum_class> 20090cc: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 20090d0: 80 a2 20 00 cmp %o0, 0 20090d4: 02 80 00 12 be 200911c <_Objects_Get_information+0x64> 20090d8: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 20090dc: 18 80 00 10 bgu 200911c <_Objects_Get_information+0x64> 20090e0: 03 00 80 71 sethi %hi(0x201c400), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 20090e4: b1 2e 20 02 sll %i0, 2, %i0 20090e8: 82 10 62 18 or %g1, 0x218, %g1 20090ec: c2 00 40 18 ld [ %g1 + %i0 ], %g1 20090f0: 80 a0 60 00 cmp %g1, 0 20090f4: 02 80 00 0a be 200911c <_Objects_Get_information+0x64> <== NEVER TAKEN 20090f8: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20090fc: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2009100: 80 a7 60 00 cmp %i5, 0 2009104: 02 80 00 06 be 200911c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009108: 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 ) 200910c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2009110: 80 a0 00 01 cmp %g0, %g1 2009114: 82 60 20 00 subx %g0, 0, %g1 2009118: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 200911c: 81 c7 e0 08 ret 2009120: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 0200d134 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200d134: 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; 200d138: 92 96 20 00 orcc %i0, 0, %o1 200d13c: 12 80 00 06 bne 200d154 <_Objects_Id_to_name+0x20> 200d140: 83 32 60 18 srl %o1, 0x18, %g1 200d144: 03 00 80 b2 sethi %hi(0x202c800), %g1 200d148: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 202c95c <_Per_CPU_Information+0xc> 200d14c: d2 00 60 08 ld [ %g1 + 8 ], %o1 200d150: 83 32 60 18 srl %o1, 0x18, %g1 200d154: 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 ) 200d158: 84 00 7f ff add %g1, -1, %g2 200d15c: 80 a0 a0 02 cmp %g2, 2 200d160: 18 80 00 12 bgu 200d1a8 <_Objects_Id_to_name+0x74> 200d164: ba 10 20 03 mov 3, %i5 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 200d168: 10 80 00 12 b 200d1b0 <_Objects_Id_to_name+0x7c> 200d16c: 83 28 60 02 sll %g1, 2, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 200d170: 85 28 a0 02 sll %g2, 2, %g2 200d174: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200d178: 80 a2 20 00 cmp %o0, 0 200d17c: 02 80 00 0b be 200d1a8 <_Objects_Id_to_name+0x74> <== NEVER TAKEN 200d180: 01 00 00 00 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 200d184: 7f ff ff ce call 200d0bc <_Objects_Get> 200d188: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200d18c: 80 a2 20 00 cmp %o0, 0 200d190: 02 80 00 06 be 200d1a8 <_Objects_Id_to_name+0x74> 200d194: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200d198: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200d19c: ba 10 20 00 clr %i5 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); 200d1a0: 40 00 03 c0 call 200e0a0 <_Thread_Enable_dispatch> 200d1a4: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 200d1a8: 81 c7 e0 08 ret 200d1ac: 91 e8 00 1d restore %g0, %i5, %o0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 200d1b0: 05 00 80 b1 sethi %hi(0x202c400), %g2 200d1b4: 84 10 a2 48 or %g2, 0x248, %g2 ! 202c648 <_Objects_Information_table> 200d1b8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d1bc: 80 a0 60 00 cmp %g1, 0 200d1c0: 12 bf ff ec bne 200d170 <_Objects_Id_to_name+0x3c> 200d1c4: 85 32 60 1b srl %o1, 0x1b, %g2 200d1c8: 30 bf ff f8 b,a 200d1a8 <_Objects_Id_to_name+0x74> =============================================================================== 0200a290 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a290: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200a294: 80 a6 60 00 cmp %i1, 0 200a298: 02 80 00 73 be 200a464 <_RBTree_Extract_unprotected+0x1d4> 200a29c: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200a2a0: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a2a4: 80 a6 40 01 cmp %i1, %g1 200a2a8: 32 80 00 0d bne,a 200a2dc <_RBTree_Extract_unprotected+0x4c> 200a2ac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 200a2b0: c2 06 60 08 ld [ %i1 + 8 ], %g1 200a2b4: 80 a0 60 00 cmp %g1, 0 200a2b8: 22 80 00 04 be,a 200a2c8 <_RBTree_Extract_unprotected+0x38> 200a2bc: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200a2c0: 10 80 00 06 b 200a2d8 <_RBTree_Extract_unprotected+0x48> 200a2c4: c2 26 20 08 st %g1, [ %i0 + 8 ] else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200a2c8: 80 a6 00 01 cmp %i0, %g1 200a2cc: 12 80 00 03 bne 200a2d8 <_RBTree_Extract_unprotected+0x48> 200a2d0: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200a2d4: c0 26 20 08 clr [ %i0 + 8 ] } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 200a2d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a2dc: 80 a6 40 01 cmp %i1, %g1 200a2e0: 12 80 00 0b bne 200a30c <_RBTree_Extract_unprotected+0x7c> 200a2e4: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 200a2e8: 80 a0 60 00 cmp %g1, 0 200a2ec: 22 80 00 04 be,a 200a2fc <_RBTree_Extract_unprotected+0x6c> 200a2f0: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 200a2f4: 10 80 00 06 b 200a30c <_RBTree_Extract_unprotected+0x7c> 200a2f8: c2 26 20 0c st %g1, [ %i0 + 0xc ] else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200a2fc: 80 a6 00 02 cmp %i0, %g2 200a300: 12 80 00 03 bne 200a30c <_RBTree_Extract_unprotected+0x7c> 200a304: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200a308: c0 26 20 0c clr [ %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]) { 200a30c: ba 90 60 00 orcc %g1, 0, %i5 200a310: 02 80 00 36 be 200a3e8 <_RBTree_Extract_unprotected+0x158> 200a314: f8 06 60 08 ld [ %i1 + 8 ], %i4 200a318: 80 a7 20 00 cmp %i4, 0 200a31c: 32 80 00 05 bne,a 200a330 <_RBTree_Extract_unprotected+0xa0> 200a320: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a324: 10 80 00 35 b 200a3f8 <_RBTree_Extract_unprotected+0x168> 200a328: b8 10 00 01 mov %g1, %i4 target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 200a32c: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a330: 80 a0 60 00 cmp %g1, 0 200a334: 32 bf ff fe bne,a 200a32c <_RBTree_Extract_unprotected+0x9c> 200a338: 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]; 200a33c: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200a340: 80 a7 20 00 cmp %i4, 0 200a344: 02 80 00 05 be 200a358 <_RBTree_Extract_unprotected+0xc8> 200a348: 01 00 00 00 nop leaf->parent = target->parent; 200a34c: c2 07 40 00 ld [ %i5 ], %g1 200a350: 10 80 00 04 b 200a360 <_RBTree_Extract_unprotected+0xd0> 200a354: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200a358: 7f ff ff 55 call 200a0ac <_RBTree_Extract_validate_unprotected> 200a35c: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200a360: 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; 200a364: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 200a368: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a36c: 86 1f 40 03 xor %i5, %g3, %g3 200a370: 80 a0 00 03 cmp %g0, %g3 200a374: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 200a378: 87 28 e0 02 sll %g3, 2, %g3 200a37c: 84 00 80 03 add %g2, %g3, %g2 200a380: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200a384: c4 06 40 00 ld [ %i1 ], %g2 200a388: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a38c: 86 1e 40 03 xor %i1, %g3, %g3 200a390: 80 a0 00 03 cmp %g0, %g3 200a394: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 200a398: 87 28 e0 02 sll %g3, 2, %g3 200a39c: 84 00 80 03 add %g2, %g3, %g2 200a3a0: 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]; 200a3a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a3a8: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200a3ac: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a3b0: 80 a0 a0 00 cmp %g2, 0 200a3b4: 32 80 00 02 bne,a 200a3bc <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 200a3b8: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200a3bc: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a3c0: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200a3c4: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a3c8: 80 a0 a0 00 cmp %g2, 0 200a3cc: 32 80 00 02 bne,a 200a3d4 <_RBTree_Extract_unprotected+0x144> 200a3d0: 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; 200a3d4: c4 06 40 00 ld [ %i1 ], %g2 200a3d8: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200a3dc: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200a3e0: 10 80 00 14 b 200a430 <_RBTree_Extract_unprotected+0x1a0> 200a3e4: 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 ) { 200a3e8: 80 a7 20 00 cmp %i4, 0 200a3ec: 32 80 00 04 bne,a 200a3fc <_RBTree_Extract_unprotected+0x16c> 200a3f0: c2 06 40 00 ld [ %i1 ], %g1 200a3f4: 30 80 00 04 b,a 200a404 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 200a3f8: c2 06 40 00 ld [ %i1 ], %g1 200a3fc: 10 80 00 04 b 200a40c <_RBTree_Extract_unprotected+0x17c> 200a400: 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); 200a404: 7f ff ff 2a call 200a0ac <_RBTree_Extract_validate_unprotected> 200a408: 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]; 200a40c: 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; 200a410: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200a414: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a418: 86 1e 40 03 xor %i1, %g3, %g3 200a41c: 80 a0 00 03 cmp %g0, %g3 200a420: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 200a424: 87 28 e0 02 sll %g3, 2, %g3 200a428: 84 00 80 03 add %g2, %g3, %g2 200a42c: 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 */ 200a430: 80 a0 60 00 cmp %g1, 0 200a434: 32 80 00 06 bne,a 200a44c <_RBTree_Extract_unprotected+0x1bc> 200a438: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200a43c: 80 a7 20 00 cmp %i4, 0 200a440: 32 80 00 02 bne,a 200a448 <_RBTree_Extract_unprotected+0x1b8> 200a444: 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; 200a448: 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; 200a44c: c0 26 60 08 clr [ %i1 + 8 ] 200a450: c0 26 60 04 clr [ %i1 + 4 ] 200a454: 80 a0 60 00 cmp %g1, 0 200a458: 02 80 00 03 be 200a464 <_RBTree_Extract_unprotected+0x1d4> 200a45c: c0 26 40 00 clr [ %i1 ] 200a460: c0 20 60 0c clr [ %g1 + 0xc ] 200a464: 81 c7 e0 08 ret 200a468: 81 e8 00 00 restore =============================================================================== 0200a0ac <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200a0ac: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200a0b0: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 200a0b4: c2 07 40 00 ld [ %i5 ], %g1 200a0b8: 80 a0 60 00 cmp %g1, 0 200a0bc: 02 80 00 6c be 200a26c <_RBTree_Extract_validate_unprotected+0x1c0> 200a0c0: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 200a0c4: 7f ff ff ca call 2009fec <_RBTree_Sibling> 200a0c8: b6 10 20 01 mov 1, %i3 /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 200a0cc: 10 80 00 5b b 200a238 <_RBTree_Extract_validate_unprotected+0x18c> 200a0d0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a0d4: 22 80 00 14 be,a 200a124 <_RBTree_Extract_validate_unprotected+0x78><== NEVER TAKEN 200a0d8: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 200a0dc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a0e0: 80 a0 60 01 cmp %g1, 1 200a0e4: 32 80 00 10 bne,a 200a124 <_RBTree_Extract_validate_unprotected+0x78> 200a0e8: c4 02 20 08 ld [ %o0 + 8 ], %g2 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 200a0ec: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200a0f0: c2 07 60 04 ld [ %i5 + 4 ], %g1 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; 200a0f4: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 200a0f8: 82 1e 00 01 xor %i0, %g1, %g1 200a0fc: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 200a100: 90 10 00 1d mov %i5, %o0 * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200a104: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 200a108: 7f ff ff ca call 200a030 <_RBTree_Rotate> 200a10c: 92 10 00 1c mov %i4, %o1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a110: b8 1f 20 01 xor %i4, 1, %i4 sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a114: b9 2f 20 02 sll %i4, 2, %i4 200a118: b8 07 40 1c add %i5, %i4, %i4 200a11c: d0 07 20 04 ld [ %i4 + 4 ], %o0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200a120: c4 02 20 08 ld [ %o0 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a124: 80 a0 a0 00 cmp %g2, 0 200a128: 02 80 00 06 be 200a140 <_RBTree_Extract_validate_unprotected+0x94> 200a12c: 82 10 20 00 clr %g1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( 200a130: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a134: 82 18 60 01 xor %g1, 1, %g1 200a138: 80 a0 00 01 cmp %g0, %g1 200a13c: 82 60 3f ff subx %g0, -1, %g1 _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200a140: 80 a0 60 00 cmp %g1, 0 200a144: 32 80 00 14 bne,a 200a194 <_RBTree_Extract_validate_unprotected+0xe8> 200a148: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200a14c: c4 02 20 04 ld [ %o0 + 4 ], %g2 200a150: 80 a0 a0 00 cmp %g2, 0 200a154: 02 80 00 07 be 200a170 <_RBTree_Extract_validate_unprotected+0xc4> 200a158: 80 a0 60 00 cmp %g1, 0 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( 200a15c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a160: 82 18 60 01 xor %g1, 1, %g1 200a164: 80 a0 00 01 cmp %g0, %g1 200a168: 82 60 3f ff subx %g0, -1, %g1 _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 200a16c: 80 a0 60 00 cmp %g1, 0 200a170: 32 80 00 09 bne,a 200a194 <_RBTree_Extract_validate_unprotected+0xe8> 200a174: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 200a178: f6 22 20 0c st %i3, [ %o0 + 0xc ] 200a17c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200a180: 80 a0 60 01 cmp %g1, 1 200a184: 32 80 00 3c bne,a 200a274 <_RBTree_Extract_validate_unprotected+0x1c8> 200a188: f4 07 40 00 ld [ %i5 ], %i2 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 200a18c: 10 80 00 32 b 200a254 <_RBTree_Extract_validate_unprotected+0x1a8> 200a190: c0 27 60 0c clr [ %i5 + 0xc ] * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 200a194: 82 1e 00 01 xor %i0, %g1, %g1 200a198: 80 a0 00 01 cmp %g0, %g1 200a19c: b6 40 20 00 addx %g0, 0, %i3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a1a0: b8 1e e0 01 xor %i3, 1, %i4 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 200a1a4: 83 2f 20 02 sll %i4, 2, %g1 200a1a8: 82 02 00 01 add %o0, %g1, %g1 200a1ac: c4 00 60 04 ld [ %g1 + 4 ], %g2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a1b0: 80 a0 a0 00 cmp %g2, 0 200a1b4: 02 80 00 06 be 200a1cc <_RBTree_Extract_validate_unprotected+0x120> 200a1b8: 82 10 20 00 clr %g1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( 200a1bc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a1c0: 82 18 60 01 xor %g1, 1, %g1 200a1c4: 80 a0 00 01 cmp %g0, %g1 200a1c8: 82 60 3f ff subx %g0, -1, %g1 * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 200a1cc: 80 a0 60 00 cmp %g1, 0 200a1d0: 32 80 00 0e bne,a 200a208 <_RBTree_Extract_validate_unprotected+0x15c> 200a1d4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 200a1d8: 82 10 20 01 mov 1, %g1 200a1dc: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 200a1e0: 83 2e e0 02 sll %i3, 2, %g1 200a1e4: 82 02 00 01 add %o0, %g1, %g1 200a1e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); 200a1ec: 92 10 00 1c mov %i4, %o1 200a1f0: 7f ff ff 90 call 200a030 <_RBTree_Rotate> 200a1f4: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a1f8: 83 2f 20 02 sll %i4, 2, %g1 200a1fc: 82 07 40 01 add %i5, %g1, %g1 200a200: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 200a204: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a208: b9 2f 20 02 sll %i4, 2, %i4 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; 200a20c: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a210: 90 02 00 1c add %o0, %i4, %o0 200a214: c2 02 20 04 ld [ %o0 + 4 ], %g1 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; parent->color = RBT_BLACK; 200a218: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a21c: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 200a220: 90 10 00 1d mov %i5, %o0 200a224: 7f ff ff 83 call 200a030 <_RBTree_Rotate> 200a228: 92 10 00 1b mov %i3, %o1 break; /* done */ 200a22c: 10 80 00 0b b 200a258 <_RBTree_Extract_validate_unprotected+0x1ac> 200a230: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 200a234: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a238: 80 a0 60 01 cmp %g1, 1 200a23c: 22 80 00 07 be,a 200a258 <_RBTree_Extract_validate_unprotected+0x1ac> 200a240: c2 06 00 00 ld [ %i0 ], %g1 200a244: c2 07 40 00 ld [ %i5 ], %g1 200a248: 80 a0 60 00 cmp %g1, 0 200a24c: 12 bf ff a2 bne 200a0d4 <_RBTree_Extract_validate_unprotected+0x28> 200a250: 80 a2 20 00 cmp %o0, 0 sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200a254: c2 06 00 00 ld [ %i0 ], %g1 200a258: c2 00 40 00 ld [ %g1 ], %g1 200a25c: 80 a0 60 00 cmp %g1, 0 200a260: 12 80 00 0a bne 200a288 <_RBTree_Extract_validate_unprotected+0x1dc> 200a264: 01 00 00 00 nop 200a268: c0 26 20 0c clr [ %i0 + 0xc ] 200a26c: 81 c7 e0 08 ret 200a270: 81 e8 00 00 restore parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; sibling = _RBTree_Sibling(the_node); 200a274: 90 10 00 1d mov %i5, %o0 200a278: 7f ff ff 5d call 2009fec <_RBTree_Sibling> 200a27c: b0 10 00 1d mov %i5, %i0 200a280: 10 bf ff ed b 200a234 <_RBTree_Extract_validate_unprotected+0x188> 200a284: ba 10 00 1a mov %i2, %i5 200a288: 81 c7 e0 08 ret 200a28c: 81 e8 00 00 restore =============================================================================== 0200b44c <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200b44c: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200b450: 80 a6 20 00 cmp %i0, 0 200b454: 02 80 00 10 be 200b494 <_RBTree_Initialize+0x48> <== NEVER TAKEN 200b458: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200b45c: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200b460: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200b464: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200b468: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200b46c: 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-- ) { 200b470: 10 80 00 06 b 200b488 <_RBTree_Initialize+0x3c> 200b474: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 200b478: 90 10 00 18 mov %i0, %o0 200b47c: 7f ff ff ba call 200b364 <_RBTree_Insert> 200b480: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 200b484: 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-- ) { 200b488: 80 a6 e0 00 cmp %i3, 0 200b48c: 12 bf ff fb bne 200b478 <_RBTree_Initialize+0x2c> 200b490: 92 10 00 1a mov %i2, %o1 200b494: 81 c7 e0 08 ret 200b498: 81 e8 00 00 restore =============================================================================== 0200a50c <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a50c: 9d e3 bf a0 save %sp, -96, %sp 200a510: ba 10 00 18 mov %i0, %i5 if(!the_node) return (RBTree_Node*)-1; 200a514: 80 a6 60 00 cmp %i1, 0 200a518: 02 80 00 0d be 200a54c <_RBTree_Insert_unprotected+0x40> 200a51c: b0 10 3f ff mov -1, %i0 RBTree_Node *iter_node = the_rbtree->root; 200a520: f0 07 60 04 ld [ %i5 + 4 ], %i0 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200a524: b8 96 20 00 orcc %i0, 0, %i4 200a528: 32 80 00 22 bne,a 200a5b0 <_RBTree_Insert_unprotected+0xa4> 200a52c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200a530: c0 26 60 0c clr [ %i1 + 0xc ] the_rbtree->root = the_node; 200a534: f2 27 60 04 st %i1, [ %i5 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200a538: f2 27 60 0c st %i1, [ %i5 + 0xc ] 200a53c: f2 27 60 08 st %i1, [ %i5 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200a540: fa 26 40 00 st %i5, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a544: c0 26 60 08 clr [ %i1 + 8 ] 200a548: c0 26 60 04 clr [ %i1 + 4 ] 200a54c: 81 c7 e0 08 ret 200a550: 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); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200a554: 02 bf ff fe be 200a54c <_RBTree_Insert_unprotected+0x40> 200a558: 82 38 00 08 xnor %g0, %o0, %g1 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a55c: 83 30 60 1f srl %g1, 0x1f, %g1 if (!iter_node->child[dir]) { 200a560: 85 28 60 02 sll %g1, 2, %g2 200a564: 84 06 00 02 add %i0, %g2, %g2 200a568: f0 00 a0 04 ld [ %g2 + 4 ], %i0 200a56c: 80 a6 20 00 cmp %i0, 0 200a570: 32 80 00 0f bne,a 200a5ac <_RBTree_Insert_unprotected+0xa0> 200a574: b8 10 00 18 mov %i0, %i4 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a578: c0 26 60 08 clr [ %i1 + 8 ] 200a57c: c0 26 60 04 clr [ %i1 + 4 ] the_node->color = RBT_RED; iter_node->child[dir] = the_node; 200a580: f2 20 a0 04 st %i1, [ %g2 + 4 ] RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200a584: 82 00 60 02 add %g1, 2, %g1 200a588: 83 28 60 02 sll %g1, 2, %g1 the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200a58c: c4 07 40 01 ld [ %i5 + %g1 ], %g2 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; 200a590: 86 10 20 01 mov 1, %g3 iter_node->child[dir] = the_node; the_node->parent = iter_node; 200a594: f8 26 40 00 st %i4, [ %i1 ] /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200a598: 80 a7 00 02 cmp %i4, %g2 200a59c: 12 80 00 2d bne 200a650 <_RBTree_Insert_unprotected+0x144> 200a5a0: c6 26 60 0c st %g3, [ %i1 + 0xc ] the_rbtree->first[dir] = the_node; 200a5a4: 10 80 00 2b b 200a650 <_RBTree_Insert_unprotected+0x144> 200a5a8: f2 27 40 01 st %i1, [ %i5 + %g1 ] the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; } 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); 200a5ac: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a5b0: 90 10 00 19 mov %i1, %o0 200a5b4: 9f c0 40 00 call %g1 200a5b8: 92 10 00 18 mov %i0, %o1 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200a5bc: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1 200a5c0: 80 a0 60 00 cmp %g1, 0 200a5c4: 12 bf ff e4 bne 200a554 <_RBTree_Insert_unprotected+0x48> 200a5c8: 80 a2 20 00 cmp %o0, 0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a5cc: 10 bf ff e4 b 200a55c <_RBTree_Insert_unprotected+0x50> 200a5d0: 82 38 00 08 xnor %g0, %o0, %g1 ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 200a5d4: 80 a0 60 00 cmp %g1, 0 200a5d8: 02 80 00 2c be 200a688 <_RBTree_Insert_unprotected+0x17c> <== NEVER TAKEN 200a5dc: c2 07 60 04 ld [ %i5 + 4 ], %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]) 200a5e0: 80 a2 00 01 cmp %o0, %g1 200a5e4: 22 80 00 02 be,a 200a5ec <_RBTree_Insert_unprotected+0xe0> 200a5e8: 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); 200a5ec: 80 a0 60 00 cmp %g1, 0 200a5f0: 22 80 00 26 be,a 200a688 <_RBTree_Insert_unprotected+0x17c> 200a5f4: c2 07 60 04 ld [ %i5 + 4 ], %g1 200a5f8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a5fc: 80 a0 a0 01 cmp %g2, 1 200a600: 32 80 00 22 bne,a 200a688 <_RBTree_Insert_unprotected+0x17c> 200a604: c2 07 60 04 ld [ %i5 + 4 ], %g1 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)) { the_node->parent->color = RBT_BLACK; 200a608: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 200a60c: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a610: c4 27 60 0c st %g2, [ %i5 + 0xc ] 200a614: 10 80 00 10 b 200a654 <_RBTree_Insert_unprotected+0x148> 200a618: b2 10 00 1d mov %i5, %i1 RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); 200a61c: 7f ff ff 9d call 200a490 <_RBTree_Rotate> 200a620: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200a624: 83 2f 20 02 sll %i4, 2, %g1 200a628: b2 06 40 01 add %i1, %g1, %i1 200a62c: f2 06 60 04 ld [ %i1 + 4 ], %i1 } the_node->parent->color = RBT_BLACK; 200a630: c2 06 40 00 ld [ %i1 ], %g1 g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200a634: 90 10 00 1d mov %i5, %o0 /* 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; 200a638: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a63c: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200a640: 7f ff ff 94 call 200a490 <_RBTree_Rotate> 200a644: 92 26 c0 1c sub %i3, %i4, %o1 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200a648: 10 80 00 04 b 200a658 <_RBTree_Insert_unprotected+0x14c> 200a64c: d0 06 40 00 ld [ %i1 ], %o0 if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; 200a650: b6 10 20 01 mov 1, %i3 200a654: d0 06 40 00 ld [ %i1 ], %o0 200a658: fa 02 00 00 ld [ %o0 ], %i5 200a65c: 80 a7 60 00 cmp %i5, 0 200a660: 22 bf ff bb be,a 200a54c <_RBTree_Insert_unprotected+0x40> 200a664: c0 26 60 0c clr [ %i1 + 0xc ] */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a668: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a66c: 80 a0 60 01 cmp %g1, 1 200a670: 12 80 00 04 bne 200a680 <_RBTree_Insert_unprotected+0x174> 200a674: 01 00 00 00 nop ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 200a678: 10 bf ff d7 b 200a5d4 <_RBTree_Insert_unprotected+0xc8> 200a67c: c2 07 40 00 ld [ %i5 ], %g1 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200a680: 81 c7 e0 08 ret 200a684: 81 e8 00 00 restore 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]; RBTree_Direction pdir = the_node->parent != g->child[0]; 200a688: 82 1a 00 01 xor %o0, %g1, %g1 200a68c: 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]; 200a690: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 200a694: 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]; 200a698: 82 1e 40 01 xor %i1, %g1, %g1 200a69c: 80 a0 00 01 cmp %g0, %g1 200a6a0: 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) { 200a6a4: 80 a0 40 1c cmp %g1, %i4 200a6a8: 12 bf ff dd bne 200a61c <_RBTree_Insert_unprotected+0x110> 200a6ac: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 200a6b0: 10 bf ff e1 b 200a634 <_RBTree_Insert_unprotected+0x128> 200a6b4: c2 06 40 00 ld [ %i1 ], %g1 =============================================================================== 0200a6cc <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200a6cc: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a6d0: 80 a0 00 19 cmp %g0, %i1 200a6d4: 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]; 200a6d8: 82 00 60 02 add %g1, 2, %g1 200a6dc: 83 28 60 02 sll %g1, 2, %g1 200a6e0: 10 80 00 0d b 200a714 <_RBTree_Iterate_unprotected+0x48> 200a6e4: fa 06 00 01 ld [ %i0 + %g1 ], %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 ) { stop = (*visitor)( current, dir, visitor_arg ); 200a6e8: 92 10 00 19 mov %i1, %o1 200a6ec: 9f c6 80 00 call %i2 200a6f0: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200a6f4: 92 10 00 1d mov %i5, %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 ); 200a6f8: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200a6fc: 94 10 00 19 mov %i1, %o2 200a700: 40 00 00 0a call 200a728 <_RBTree_Next_unprotected> 200a704: 90 10 00 18 mov %i0, %o0 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 200a708: 80 8f 20 ff btst 0xff, %i4 200a70c: 12 80 00 05 bne 200a720 <_RBTree_Iterate_unprotected+0x54><== NEVER TAKEN 200a710: ba 10 00 08 mov %o0, %i5 200a714: 80 a7 60 00 cmp %i5, 0 200a718: 12 bf ff f4 bne 200a6e8 <_RBTree_Iterate_unprotected+0x1c> 200a71c: 90 10 00 1d mov %i5, %o0 200a720: 81 c7 e0 08 ret 200a724: 81 e8 00 00 restore =============================================================================== 02009fec <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 2009fec: 80 a2 20 00 cmp %o0, 0 2009ff0: 02 80 00 0e be 200a028 <_RBTree_Sibling+0x3c> 2009ff4: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 2009ff8: c4 02 00 00 ld [ %o0 ], %g2 2009ffc: 80 a0 a0 00 cmp %g2, 0 200a000: 02 80 00 0a be 200a028 <_RBTree_Sibling+0x3c> <== NEVER TAKEN 200a004: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 200a008: c6 00 80 00 ld [ %g2 ], %g3 200a00c: 80 a0 e0 00 cmp %g3, 0 200a010: 02 80 00 06 be 200a028 <_RBTree_Sibling+0x3c> 200a014: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 200a018: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200a01c: 80 a2 00 01 cmp %o0, %g1 200a020: 22 80 00 02 be,a 200a028 <_RBTree_Sibling+0x3c> 200a024: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 200a028: 81 c3 e0 08 retl 200a02c: 90 10 00 01 mov %g1, %o0 =============================================================================== 0200c9dc <_RTEMS_tasks_Post_switch_extension>: */ static void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200c9dc: 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 ]; 200c9e0: fa 06 21 50 ld [ %i0 + 0x150 ], %i5 if ( !api ) 200c9e4: 80 a7 60 00 cmp %i5, 0 200c9e8: 02 80 00 1c be 200ca58 <_RTEMS_tasks_Post_switch_extension+0x7c><== NEVER TAKEN 200c9ec: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200c9f0: 7f ff d6 ff call 20025ec 200c9f4: 01 00 00 00 nop signal_set = asr->signals_posted; 200c9f8: f6 07 60 14 ld [ %i5 + 0x14 ], %i3 asr->signals_posted = 0; 200c9fc: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 200ca00: 7f ff d6 ff call 20025fc 200ca04: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200ca08: 80 a6 e0 00 cmp %i3, 0 200ca0c: 02 80 00 13 be 200ca58 <_RTEMS_tasks_Post_switch_extension+0x7c> 200ca10: 94 07 bf fc add %fp, -4, %o2 return; asr->nest_level += 1; 200ca14: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ca18: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200ca1c: 82 00 60 01 inc %g1 200ca20: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ca24: 39 00 00 3f sethi %hi(0xfc00), %i4 200ca28: 40 00 06 e9 call 200e5cc 200ca2c: 92 17 23 ff or %i4, 0x3ff, %o1 ! ffff (*asr->handler)( signal_set ); 200ca30: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200ca34: 9f c0 40 00 call %g1 200ca38: 90 10 00 1b mov %i3, %o0 asr->nest_level -= 1; 200ca3c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ca40: 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; 200ca44: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ca48: 92 17 23 ff or %i4, 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; 200ca4c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200ca50: 40 00 06 df call 200e5cc 200ca54: 94 07 bf fc add %fp, -4, %o2 200ca58: 81 c7 e0 08 ret 200ca5c: 81 e8 00 00 restore =============================================================================== 0203d9e4 <_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 ) { 203d9e4: 9d e3 bf 98 save %sp, -104, %sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ Timestamp_Control uptime; #endif Thread_Control *owning_thread = the_period->owner; 203d9e8: fa 06 20 40 ld [ %i0 + 0x40 ], %i5 /* * Determine elapsed wall time since period initiated. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 203d9ec: 7f ff b2 8b call 202a418 <_TOD_Get_uptime> 203d9f0: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 203d9f4: c4 1e 20 50 ldd [ %i0 + 0x50 ], %g2 _Timestamp_Subtract( 203d9f8: d8 1f bf f8 ldd [ %fp + -8 ], %o4 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 203d9fc: 82 10 20 01 mov 1, %g1 203da00: 86 a3 40 03 subcc %o5, %g3, %g3 203da04: 84 63 00 02 subx %o4, %g2, %g2 203da08: c4 3e 40 00 std %g2, [ %i1 ] * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 203da0c: 05 00 81 b7 sethi %hi(0x206dc00), %g2 203da10: 84 10 a2 70 or %g2, 0x270, %g2 ! 206de70 <_Per_CPU_Information> 203da14: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 203da18: 80 a7 40 03 cmp %i5, %g3 203da1c: 12 80 00 15 bne 203da70 <_Rate_monotonic_Get_status+0x8c> 203da20: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2 203da24: c4 18 a0 20 ldd [ %g2 + 0x20 ], %g2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 203da28: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0 203da2c: 86 a3 40 03 subcc %o5, %g3, %g3 203da30: 84 63 00 02 subx %o4, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 203da34: 96 82 c0 03 addcc %o3, %g3, %o3 203da38: 94 42 80 02 addx %o2, %g2, %o2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 203da3c: 80 a6 00 0a cmp %i0, %o2 203da40: 34 80 00 0c bg,a 203da70 <_Rate_monotonic_Get_status+0x8c><== NEVER TAKEN 203da44: 82 10 20 00 clr %g1 <== NOT EXECUTED 203da48: 32 80 00 06 bne,a 203da60 <_Rate_monotonic_Get_status+0x7c> 203da4c: 96 a2 c0 19 subcc %o3, %i1, %o3 203da50: 80 a6 40 0b cmp %i1, %o3 203da54: 18 80 00 06 bgu 203da6c <_Rate_monotonic_Get_status+0x88> 203da58: 96 a2 c0 19 subcc %o3, %i1, %o3 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 203da5c: 82 10 20 01 mov 1, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 203da60: 94 62 80 18 subx %o2, %i0, %o2 203da64: 10 80 00 03 b 203da70 <_Rate_monotonic_Get_status+0x8c> 203da68: d4 3e 80 00 std %o2, [ %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; 203da6c: 82 10 20 00 clr %g1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 203da70: b0 08 60 01 and %g1, 1, %i0 203da74: 81 c7 e0 08 ret 203da78: 81 e8 00 00 restore =============================================================================== 0203dddc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 203dddc: 9d e3 bf 98 save %sp, -104, %sp 203dde0: 11 00 81 b8 sethi %hi(0x206e000), %o0 203dde4: 92 10 00 18 mov %i0, %o1 203dde8: 90 12 21 40 or %o0, 0x140, %o0 203ddec: 7f ff 44 38 call 200eecc <_Objects_Get> 203ddf0: 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 ) { 203ddf4: c2 07 bf fc ld [ %fp + -4 ], %g1 203ddf8: 80 a0 60 00 cmp %g1, 0 203ddfc: 12 80 00 25 bne 203de90 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 203de00: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 203de04: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 203de08: 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); 203de0c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 203de10: 80 88 80 01 btst %g2, %g1 203de14: 22 80 00 0b be,a 203de40 <_Rate_monotonic_Timeout+0x64> 203de18: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 203de1c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 203de20: c2 07 60 08 ld [ %i5 + 8 ], %g1 203de24: 80 a0 80 01 cmp %g2, %g1 203de28: 32 80 00 06 bne,a 203de40 <_Rate_monotonic_Timeout+0x64> 203de2c: 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 ); 203de30: 13 04 00 ff sethi %hi(0x1003fc00), %o1 203de34: 7f ff 46 fb call 200fa20 <_Thread_Clear_state> 203de38: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 203de3c: 30 80 00 06 b,a 203de54 <_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 ) { 203de40: 80 a0 60 01 cmp %g1, 1 203de44: 12 80 00 0d bne 203de78 <_Rate_monotonic_Timeout+0x9c> 203de48: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 203de4c: 82 10 20 03 mov 3, %g1 203de50: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 203de54: 7f ff ff 53 call 203dba0 <_Rate_monotonic_Initiate_statistics> 203de58: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203de5c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 203de60: 11 00 81 b7 sethi %hi(0x206dc00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203de64: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 203de68: 90 12 21 00 or %o0, 0x100, %o0 203de6c: 7f ff 4a ff call 2010a68 <_Watchdog_Insert> 203de70: 92 07 60 10 add %i5, 0x10, %o1 203de74: 30 80 00 02 b,a 203de7c <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 203de78: c2 27 60 38 st %g1, [ %i5 + 0x38 ] * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 203de7c: 03 00 81 b7 sethi %hi(0x206dc00), %g1 203de80: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 206dc40 <_Thread_Dispatch_disable_level> 203de84: 84 00 bf ff add %g2, -1, %g2 203de88: c4 20 60 40 st %g2, [ %g1 + 0x40 ] return _Thread_Dispatch_disable_level; 203de8c: c2 00 60 40 ld [ %g1 + 0x40 ], %g1 203de90: 81 c7 e0 08 ret 203de94: 81 e8 00 00 restore =============================================================================== 0203da7c <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 203da7c: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 203da80: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 203da84: 82 00 60 01 inc %g1 203da88: c2 26 20 58 st %g1, [ %i0 + 0x58 ] if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 203da8c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 203da90: 80 a0 60 04 cmp %g1, 4 203da94: 12 80 00 05 bne 203daa8 <_Rate_monotonic_Update_statistics+0x2c> 203da98: 90 10 00 18 mov %i0, %o0 stats->missed_count++; 203da9c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 203daa0: 82 00 60 01 inc %g1 203daa4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] /* * Grab status for time statistics. */ valid_status = 203daa8: 92 07 bf f8 add %fp, -8, %o1 203daac: 7f ff ff ce call 203d9e4 <_Rate_monotonic_Get_status> 203dab0: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 203dab4: 80 8a 20 ff btst 0xff, %o0 203dab8: 02 80 00 38 be 203db98 <_Rate_monotonic_Update_statistics+0x11c> 203dabc: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 203dac0: d8 1e 20 70 ldd [ %i0 + 0x70 ], %o4 * 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 ) ) 203dac4: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 203dac8: 9a 83 40 03 addcc %o5, %g3, %o5 203dacc: 98 43 00 02 addx %o4, %g2, %o4 203dad0: 80 a0 40 02 cmp %g1, %g2 203dad4: 14 80 00 09 bg 203daf8 <_Rate_monotonic_Update_statistics+0x7c> 203dad8: d8 3e 20 70 std %o4, [ %i0 + 0x70 ] 203dadc: 80 a0 40 02 cmp %g1, %g2 203dae0: 32 80 00 08 bne,a 203db00 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN 203dae4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 203dae8: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 203daec: 80 a0 40 03 cmp %g1, %g3 203daf0: 28 80 00 04 bleu,a 203db00 <_Rate_monotonic_Update_statistics+0x84> 203daf4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 203daf8: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 203dafc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 203db00: 80 a0 40 02 cmp %g1, %g2 203db04: 26 80 00 0a bl,a 203db2c <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 203db08: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 203db0c: 80 a0 40 02 cmp %g1, %g2 203db10: 32 80 00 08 bne,a 203db30 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 203db14: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 203db18: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 203db1c: 80 a0 40 03 cmp %g1, %g3 203db20: 3a 80 00 04 bcc,a 203db30 <_Rate_monotonic_Update_statistics+0xb4> 203db24: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 203db28: 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 ); 203db2c: c4 1f bf f8 ldd [ %fp + -8 ], %g2 203db30: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 203db34: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 203db38: 9a 83 40 03 addcc %o5, %g3, %o5 203db3c: 98 43 00 02 addx %o4, %g2, %o4 203db40: 80 a0 40 02 cmp %g1, %g2 203db44: 14 80 00 09 bg 203db68 <_Rate_monotonic_Update_statistics+0xec> 203db48: d8 3e 20 88 std %o4, [ %i0 + 0x88 ] 203db4c: 80 a0 40 02 cmp %g1, %g2 203db50: 32 80 00 08 bne,a 203db70 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN 203db54: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 203db58: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 203db5c: 80 a0 40 03 cmp %g1, %g3 203db60: 28 80 00 04 bleu,a 203db70 <_Rate_monotonic_Update_statistics+0xf4> 203db64: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; 203db68: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 203db6c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 203db70: 80 a0 40 02 cmp %g1, %g2 203db74: 26 80 00 09 bl,a 203db98 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 203db78: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 203db7c: 80 a0 40 02 cmp %g1, %g2 203db80: 12 80 00 06 bne 203db98 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 203db84: 01 00 00 00 nop 203db88: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 203db8c: 80 a0 40 03 cmp %g1, %g3 203db90: 2a 80 00 02 bcs,a 203db98 <_Rate_monotonic_Update_statistics+0x11c> 203db94: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 203db98: 81 c7 e0 08 ret 203db9c: 81 e8 00 00 restore =============================================================================== 0200b448 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200b448: 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; 200b44c: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200b450: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b454: 80 a0 40 09 cmp %g1, %o1 200b458: 32 80 00 02 bne,a 200b460 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200b45c: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200b460: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200b464: 80 a0 40 09 cmp %g1, %o1 200b468: 02 80 00 04 be 200b478 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200b46c: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200b470: 40 00 01 8e call 200baa8 <_Thread_Change_priority> 200b474: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200b478: f0 06 20 88 ld [ %i0 + 0x88 ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200b47c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b480: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200b484: 80 a0 a0 00 cmp %g2, 0 200b488: 02 80 00 09 be 200b4ac <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200b48c: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200b490: d0 00 40 00 ld [ %g1 ], %o0 200b494: 7f ff ff d7 call 200b3f0 <_Scheduler_CBS_Get_server_id> 200b498: 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 ); 200b49c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b4a0: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200b4a4: 9f c0 40 00 call %g1 200b4a8: d0 07 bf fc ld [ %fp + -4 ], %o0 200b4ac: 81 c7 e0 08 ret 200b4b0: 81 e8 00 00 restore =============================================================================== 0200b064 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b064: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b068: c2 06 20 04 ld [ %i0 + 4 ], %g1 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b06c: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b070: 80 a0 60 00 cmp %g1, 0 200b074: 04 80 00 1c ble 200b0e4 <_Scheduler_CBS_Create_server+0x80> 200b078: b0 10 3f ee mov -18, %i0 200b07c: c2 07 40 00 ld [ %i5 ], %g1 200b080: 80 a0 60 00 cmp %g1, 0 200b084: 04 80 00 18 ble 200b0e4 <_Scheduler_CBS_Create_server+0x80> 200b088: 03 00 80 7c sethi %hi(0x201f000), %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++ ) { 200b08c: c6 00 60 78 ld [ %g1 + 0x78 ], %g3 ! 201f078 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list[i] ) 200b090: 03 00 80 7f sethi %hi(0x201fc00), %g1 200b094: c4 00 63 c8 ld [ %g1 + 0x3c8 ], %g2 ! 201ffc8 <_Scheduler_CBS_Server_list> 200b098: 10 80 00 15 b 200b0ec <_Scheduler_CBS_Create_server+0x88> 200b09c: 82 10 20 00 clr %g1 200b0a0: c8 00 80 1b ld [ %g2 + %i3 ], %g4 200b0a4: 80 a1 20 00 cmp %g4, 0 200b0a8: 32 80 00 11 bne,a 200b0ec <_Scheduler_CBS_Create_server+0x88> 200b0ac: 82 00 60 01 inc %g1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 200b0b0: 39 00 80 7f sethi %hi(0x201fc00), %i4 200b0b4: f0 07 23 c8 ld [ %i4 + 0x3c8 ], %i0 ! 201ffc8 <_Scheduler_CBS_Server_list> } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200b0b8: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200b0bc: 40 00 07 9d call 200cf30 <_Workspace_Allocate> 200b0c0: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200b0c4: 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 *) 200b0c8: d0 26 00 1b st %o0, [ %i0 + %i3 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200b0cc: c4 07 23 c8 ld [ %i4 + 0x3c8 ], %g2 200b0d0: 83 28 60 02 sll %g1, 2, %g1 200b0d4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200b0d8: 80 a0 60 00 cmp %g1, 0 200b0dc: 12 80 00 09 bne 200b100 <_Scheduler_CBS_Create_server+0x9c><== ALWAYS TAKEN 200b0e0: b0 10 3f ef mov -17, %i0 200b0e4: 81 c7 e0 08 ret 200b0e8: 81 e8 00 00 restore 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++ ) { 200b0ec: 80 a0 40 03 cmp %g1, %g3 200b0f0: 12 bf ff ec bne 200b0a0 <_Scheduler_CBS_Create_server+0x3c> 200b0f4: b7 28 60 02 sll %g1, 2, %i3 if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 200b0f8: 81 c7 e0 08 ret 200b0fc: 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; 200b100: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200b104: b0 10 20 00 clr %i0 _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; 200b108: c4 20 60 04 st %g2, [ %g1 + 4 ] 200b10c: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200b110: 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; 200b114: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200b118: 84 10 3f ff mov -1, %g2 200b11c: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 200b120: 81 c7 e0 08 ret 200b124: 81 e8 00 00 restore =============================================================================== 0200b19c <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200b19c: 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); 200b1a0: 90 10 00 19 mov %i1, %o0 200b1a4: 40 00 03 73 call 200bf70 <_Thread_Get> 200b1a8: 92 07 bf fc add %fp, -4, %o1 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200b1ac: ba 92 20 00 orcc %o0, 0, %i5 200b1b0: 22 80 00 05 be,a 200b1c4 <_Scheduler_CBS_Detach_thread+0x28> 200b1b4: 03 00 80 7c sethi %hi(0x201f000), %g1 _Thread_Enable_dispatch(); 200b1b8: 40 00 03 61 call 200bf3c <_Thread_Enable_dispatch> 200b1bc: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b1c0: 03 00 80 7c sethi %hi(0x201f000), %g1 200b1c4: c4 00 60 78 ld [ %g1 + 0x78 ], %g2 ! 201f078 <_Scheduler_CBS_Maximum_servers> 200b1c8: 80 a6 00 02 cmp %i0, %g2 200b1cc: 1a 80 00 1b bcc 200b238 <_Scheduler_CBS_Detach_thread+0x9c> 200b1d0: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b1d4: 80 a7 60 00 cmp %i5, 0 200b1d8: 02 80 00 18 be 200b238 <_Scheduler_CBS_Detach_thread+0x9c> 200b1dc: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b1e0: 03 00 80 7f sethi %hi(0x201fc00), %g1 200b1e4: c2 00 63 c8 ld [ %g1 + 0x3c8 ], %g1 ! 201ffc8 <_Scheduler_CBS_Server_list> 200b1e8: b1 2e 20 02 sll %i0, 2, %i0 200b1ec: c4 00 40 18 ld [ %g1 + %i0 ], %g2 200b1f0: 80 a0 a0 00 cmp %g2, 0 200b1f4: 02 80 00 11 be 200b238 <_Scheduler_CBS_Detach_thread+0x9c> 200b1f8: 82 10 3f e7 mov -25, %g1 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 200b1fc: c6 00 80 00 ld [ %g2 ], %g3 200b200: 80 a0 c0 19 cmp %g3, %i1 200b204: 12 80 00 0d bne 200b238 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b208: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b20c: 82 10 3f ff mov -1, %g1 200b210: c2 20 80 00 st %g1, [ %g2 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b214: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 200b218: c0 20 60 18 clr [ %g1 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b21c: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 200b220: c2 27 60 78 st %g1, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b224: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 200b228: c2 27 60 7c st %g1, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b22c: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 200b230: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] return SCHEDULER_CBS_OK; 200b234: 82 10 20 00 clr %g1 } 200b238: 81 c7 e0 08 ret 200b23c: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200b4b4 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200b4b4: 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*) ); 200b4b8: 3b 00 80 7c sethi %hi(0x201f000), %i5 200b4bc: d0 07 60 78 ld [ %i5 + 0x78 ], %o0 ! 201f078 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200b4c0: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200b4c4: 40 00 06 9b call 200cf30 <_Workspace_Allocate> 200b4c8: 91 2a 20 02 sll %o0, 2, %o0 200b4cc: 05 00 80 7f sethi %hi(0x201fc00), %g2 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200b4d0: 80 a2 20 00 cmp %o0, 0 200b4d4: 02 80 00 0c be 200b504 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN 200b4d8: d0 20 a3 c8 st %o0, [ %g2 + 0x3c8 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b4dc: c6 07 60 78 ld [ %i5 + 0x78 ], %g3 200b4e0: 10 80 00 05 b 200b4f4 <_Scheduler_CBS_Initialize+0x40> 200b4e4: 82 10 20 00 clr %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b4e8: 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++) { 200b4ec: 82 00 60 01 inc %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b4f0: 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++) { 200b4f4: 80 a0 40 03 cmp %g1, %g3 200b4f8: 12 bf ff fc bne 200b4e8 <_Scheduler_CBS_Initialize+0x34> 200b4fc: fa 00 a3 c8 ld [ %g2 + 0x3c8 ], %i5 _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200b500: b0 10 20 00 clr %i0 } 200b504: 81 c7 e0 08 ret 200b508: 81 e8 00 00 restore =============================================================================== 0200a0b0 <_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; 200a0b0: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 200a0b4: 80 a2 60 00 cmp %o1, 0 200a0b8: 02 80 00 10 be 200a0f8 <_Scheduler_CBS_Release_job+0x48> 200a0bc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 200a0c0: 80 a0 60 00 cmp %g1, 0 200a0c4: 02 80 00 08 be 200a0e4 <_Scheduler_CBS_Release_job+0x34> 200a0c8: 05 00 80 78 sethi %hi(0x201e000), %g2 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 200a0cc: d2 00 a2 e0 ld [ %g2 + 0x2e0 ], %o1 ! 201e2e0 <_Watchdog_Ticks_since_boot> 200a0d0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a0d4: 92 02 40 02 add %o1, %g2, %o1 200a0d8: 05 20 00 00 sethi %hi(0x80000000), %g2 200a0dc: 10 80 00 0a b 200a104 <_Scheduler_CBS_Release_job+0x54> 200a0e0: 92 2a 40 02 andn %o1, %g2, %o1 & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 200a0e4: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 200a0e8: 92 02 40 01 add %o1, %g1, %o1 200a0ec: 03 20 00 00 sethi %hi(0x80000000), %g1 200a0f0: 10 80 00 07 b 200a10c <_Scheduler_CBS_Release_job+0x5c> 200a0f4: 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) 200a0f8: 80 a0 60 00 cmp %g1, 0 200a0fc: 02 80 00 04 be 200a10c <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN 200a100: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; 200a104: c2 00 60 08 ld [ %g1 + 8 ], %g1 200a108: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 200a10c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 200a110: 94 10 20 01 mov 1, %o2 200a114: 82 13 c0 00 mov %o7, %g1 200a118: 40 00 01 33 call 200a5e4 <_Thread_Change_priority> 200a11c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200a120 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a120: 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); 200a124: 40 00 00 57 call 200a280 <_Scheduler_EDF_Enqueue> 200a128: 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; 200a12c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a130: 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) { 200a134: 80 a7 60 00 cmp %i5, 0 200a138: 02 80 00 18 be 200a198 <_Scheduler_CBS_Unblock+0x78> 200a13c: 03 00 80 78 sethi %hi(0x201e000), %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 ) { 200a140: 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 - 200a144: d0 00 62 e0 ld [ %g1 + 0x2e0 ], %o0 200a148: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a14c: 40 00 3c 39 call 2019230 <.umul> 200a150: 90 27 00 08 sub %i4, %o0, %o0 200a154: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a158: b6 10 00 08 mov %o0, %i3 200a15c: 40 00 3c 35 call 2019230 <.umul> 200a160: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a164: 80 a6 c0 08 cmp %i3, %o0 200a168: 24 80 00 0d ble,a 200a19c <_Scheduler_CBS_Unblock+0x7c> 200a16c: 3b 00 80 79 sethi %hi(0x201e400), %i5 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a170: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a174: 80 a7 00 09 cmp %i4, %o1 200a178: 32 80 00 02 bne,a 200a180 <_Scheduler_CBS_Unblock+0x60> 200a17c: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a180: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a184: 80 a0 40 09 cmp %g1, %o1 200a188: 02 80 00 04 be 200a198 <_Scheduler_CBS_Unblock+0x78> 200a18c: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200a190: 40 00 01 15 call 200a5e4 <_Thread_Change_priority> 200a194: 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, 200a198: 3b 00 80 79 sethi %hi(0x201e400), %i5 200a19c: ba 17 60 00 mov %i5, %i5 ! 201e400 <_Per_CPU_Information> 200a1a0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a1a4: 03 00 80 75 sethi %hi(0x201d400), %g1 200a1a8: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a1ac: c2 00 61 0c ld [ %g1 + 0x10c ], %g1 200a1b0: 9f c0 40 00 call %g1 200a1b4: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 200a1b8: 80 a2 20 00 cmp %o0, 0 200a1bc: 04 80 00 0f ble 200a1f8 <_Scheduler_CBS_Unblock+0xd8> 200a1c0: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a1c4: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; 200a1c8: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a1cc: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a1d0: 80 a0 60 00 cmp %g1, 0 200a1d4: 12 80 00 06 bne 200a1ec <_Scheduler_CBS_Unblock+0xcc> 200a1d8: 84 10 20 01 mov 1, %g2 200a1dc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a1e0: 80 a0 60 00 cmp %g1, 0 200a1e4: 12 80 00 05 bne 200a1f8 <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN 200a1e8: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a1ec: 03 00 80 79 sethi %hi(0x201e400), %g1 200a1f0: 82 10 60 00 mov %g1, %g1 ! 201e400 <_Per_CPU_Information> 200a1f4: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a1f8: 81 c7 e0 08 ret 200a1fc: 81 e8 00 00 restore =============================================================================== 0200a200 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 200a200: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 200a204: 40 00 06 41 call 200bb08 <_Workspace_Allocate> 200a208: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 200a20c: 80 a2 20 00 cmp %o0, 0 200a210: 02 80 00 05 be 200a224 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 200a214: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 200a218: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 200a21c: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 200a220: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 200a224: 81 c7 e0 08 ret 200a228: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a288 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a288: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a28c: 7f ff ff a9 call 200a130 <_Scheduler_EDF_Enqueue> 200a290: 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( 200a294: 3b 00 80 78 sethi %hi(0x201e000), %i5 200a298: ba 17 63 60 or %i5, 0x360, %i5 ! 201e360 <_Per_CPU_Information> 200a29c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a2a0: 03 00 80 75 sethi %hi(0x201d400), %g1 200a2a4: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 200a2a8: c2 00 60 6c ld [ %g1 + 0x6c ], %g1 200a2ac: 9f c0 40 00 call %g1 200a2b0: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a2b4: 80 a2 20 00 cmp %o0, 0 200a2b8: 16 80 00 0f bge 200a2f4 <_Scheduler_EDF_Unblock+0x6c> 200a2bc: 01 00 00 00 nop _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a2c0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 200a2c4: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a2c8: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a2cc: 80 a0 60 00 cmp %g1, 0 200a2d0: 12 80 00 06 bne 200a2e8 <_Scheduler_EDF_Unblock+0x60> 200a2d4: 84 10 20 01 mov 1, %g2 200a2d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a2dc: 80 a0 60 00 cmp %g1, 0 200a2e0: 12 80 00 05 bne 200a2f4 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN 200a2e4: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a2e8: 03 00 80 78 sethi %hi(0x201e000), %g1 200a2ec: 82 10 63 60 or %g1, 0x360, %g1 ! 201e360 <_Per_CPU_Information> 200a2f0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a2f4: 81 c7 e0 08 ret 200a2f8: 81 e8 00 00 restore =============================================================================== 02008760 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 2008760: 9d e3 bf a0 save %sp, -96, %sp Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008764: 03 00 80 6e sethi %hi(0x201b800), %g1 2008768: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201b95c const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 200876c: 94 10 20 00 clr %o2 2008770: 85 28 60 02 sll %g1, 2, %g2 2008774: 91 28 60 07 sll %g1, 7, %o0 2008778: 90 22 00 02 sub %o0, %g2, %o0 200877c: 90 02 00 01 add %o0, %g1, %o0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008780: 03 00 80 71 sethi %hi(0x201c400), %g1 2008784: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 201c7c0 <_Watchdog_Ticks_since_boot> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008788: 91 2a 20 03 sll %o0, 3, %o0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 200878c: 84 00 a0 01 inc %g2 2008790: c4 20 63 c0 st %g2, [ %g1 + 0x3c0 ] static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008794: 03 00 80 71 sethi %hi(0x201c400), %g1 2008798: c4 18 63 30 ldd [ %g1 + 0x330 ], %g2 ! 201c730 <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 200879c: 92 10 00 08 mov %o0, %o1 20087a0: 90 10 20 00 clr %o0 20087a4: 86 80 c0 09 addcc %g3, %o1, %g3 20087a8: 84 40 80 08 addx %g2, %o0, %g2 20087ac: c4 38 63 30 std %g2, [ %g1 + 0x330 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 20087b0: 03 00 80 71 sethi %hi(0x201c400), %g1 20087b4: f8 18 63 40 ldd [ %g1 + 0x340 ], %i4 ! 201c740 <_TOD_Now> *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 20087b8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 20087bc: 92 87 40 09 addcc %i5, %o1, %o1 if ( ((*_time) / 1000000000L) != _start ) { 20087c0: 96 12 e2 00 or %o3, 0x200, %o3 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 20087c4: 90 47 00 08 addx %i4, %o0, %o0 if ( ((*_time) / 1000000000L) != _start ) { 20087c8: 40 00 3d fe call 2017fc0 <__divdi3> 20087cc: d0 38 63 40 std %o0, [ %g1 + 0x340 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 20087d0: 94 10 20 00 clr %o2 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 20087d4: b4 10 00 08 mov %o0, %i2 20087d8: b6 10 00 09 mov %o1, %i3 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 20087dc: 90 10 00 1c mov %i4, %o0 20087e0: 92 10 00 1d mov %i5, %o1 20087e4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 20087e8: 40 00 3d f6 call 2017fc0 <__divdi3> 20087ec: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 20087f0: 80 a6 80 08 cmp %i2, %o0 20087f4: 12 80 00 05 bne 2008808 <_TOD_Tickle_ticks+0xa8> <== NEVER TAKEN 20087f8: 31 00 80 71 sethi %hi(0x201c400), %i0 20087fc: 80 a6 c0 09 cmp %i3, %o1 2008800: 02 80 00 04 be 2008810 <_TOD_Tickle_ticks+0xb0> 2008804: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2008808: 40 00 09 ed call 200afbc <_Watchdog_Tickle> 200880c: 91 ee 23 64 restore %i0, 0x364, %o0 2008810: 81 c7 e0 08 ret 2008814: 81 e8 00 00 restore =============================================================================== 02008670 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2008670: 9d e3 bf a0 save %sp, -96, %sp uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 2008674: 03 00 80 78 sethi %hi(0x201e000), %g1 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 2008678: ba 10 20 00 clr %i5 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 200867c: 80 a6 20 00 cmp %i0, 0 2008680: 02 80 00 2b be 200872c <_TOD_Validate+0xbc> <== NEVER TAKEN 2008684: d2 00 60 ac ld [ %g1 + 0xac ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 2008688: 11 00 03 d0 sethi %hi(0xf4000), %o0 200868c: 40 00 45 19 call 2019af0 <.udiv> 2008690: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2008694: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008698: 80 a0 40 08 cmp %g1, %o0 200869c: 3a 80 00 25 bcc,a 2008730 <_TOD_Validate+0xc0> 20086a0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 20086a4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20086a8: 80 a0 60 3b cmp %g1, 0x3b 20086ac: 38 80 00 21 bgu,a 2008730 <_TOD_Validate+0xc0> 20086b0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20086b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20086b8: 80 a0 60 3b cmp %g1, 0x3b 20086bc: 38 80 00 1d bgu,a 2008730 <_TOD_Validate+0xc0> 20086c0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20086c4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20086c8: 80 a0 60 17 cmp %g1, 0x17 20086cc: 38 80 00 19 bgu,a 2008730 <_TOD_Validate+0xc0> 20086d0: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 20086d4: 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) || 20086d8: 80 a0 60 00 cmp %g1, 0 20086dc: 02 80 00 14 be 200872c <_TOD_Validate+0xbc> <== NEVER TAKEN 20086e0: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 20086e4: 38 80 00 13 bgu,a 2008730 <_TOD_Validate+0xc0> 20086e8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 20086ec: c6 06 00 00 ld [ %i0 ], %g3 (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) || 20086f0: 80 a0 e7 c3 cmp %g3, 0x7c3 20086f4: 28 80 00 0f bleu,a 2008730 <_TOD_Validate+0xc0> 20086f8: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 20086fc: c4 06 20 08 ld [ %i0 + 8 ], %g2 (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) || 2008700: 80 a0 a0 00 cmp %g2, 0 2008704: 02 80 00 0a be 200872c <_TOD_Validate+0xbc> <== NEVER TAKEN 2008708: 80 88 e0 03 btst 3, %g3 200870c: 07 00 80 73 sethi %hi(0x201cc00), %g3 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008710: 12 80 00 03 bne 200871c <_TOD_Validate+0xac> 2008714: 86 10 e0 a8 or %g3, 0xa8, %g3 ! 201cca8 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2008718: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 200871c: 83 28 60 02 sll %g1, 2, %g1 2008720: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2008724: 80 a0 40 02 cmp %g1, %g2 2008728: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 200872c: b0 0f 60 01 and %i5, 1, %i0 2008730: 81 c7 e0 08 ret 2008734: 81 e8 00 00 restore =============================================================================== 02009c50 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2009c50: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2009c54: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 /* * 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 ); 2009c58: 40 00 03 5b call 200a9c4 <_Thread_Set_transient> 2009c5c: 90 10 00 18 mov %i0, %o0 /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 2009c60: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2009c64: 80 a0 40 19 cmp %g1, %i1 2009c68: 02 80 00 05 be 2009c7c <_Thread_Change_priority+0x2c> 2009c6c: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 2009c70: 90 10 00 18 mov %i0, %o0 2009c74: 40 00 03 3b call 200a960 <_Thread_Set_priority> 2009c78: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 2009c7c: 7f ff e2 5c call 20025ec 2009c80: 01 00 00 00 nop 2009c84: 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; 2009c88: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 2009c8c: 80 a6 60 04 cmp %i1, 4 2009c90: 02 80 00 10 be 2009cd0 <_Thread_Change_priority+0x80> 2009c94: b8 0f 20 04 and %i4, 4, %i4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 2009c98: 80 a7 20 00 cmp %i4, 0 2009c9c: 12 80 00 03 bne 2009ca8 <_Thread_Change_priority+0x58> <== NEVER TAKEN 2009ca0: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2009ca4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2009ca8: 7f ff e2 55 call 20025fc 2009cac: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2009cb0: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009cb4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009cb8: 80 8e 40 01 btst %i1, %g1 2009cbc: 02 80 00 29 be 2009d60 <_Thread_Change_priority+0x110> 2009cc0: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2009cc4: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2009cc8: 40 00 02 f8 call 200a8a8 <_Thread_queue_Requeue> 2009ccc: 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 ) ) { 2009cd0: 80 a7 20 00 cmp %i4, 0 2009cd4: 12 80 00 0b bne 2009d00 <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2009cd8: 03 00 80 6e sethi %hi(0x201b800), %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 ); 2009cdc: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2009ce0: 80 a6 a0 00 cmp %i2, 0 2009ce4: 02 80 00 04 be 2009cf4 <_Thread_Change_priority+0xa4> 2009ce8: 82 10 62 3c or %g1, 0x23c, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2009cec: 10 80 00 03 b 2009cf8 <_Thread_Change_priority+0xa8> 2009cf0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2009cf4: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2009cf8: 9f c0 40 00 call %g1 2009cfc: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2009d00: 7f ff e2 3f call 20025fc 2009d04: 90 10 00 1b mov %i3, %o0 2009d08: 7f ff e2 39 call 20025ec 2009d0c: 01 00 00 00 nop 2009d10: 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(); 2009d14: 03 00 80 6e sethi %hi(0x201b800), %g1 2009d18: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 201ba44 <_Scheduler+0x8> 2009d1c: 9f c0 40 00 call %g1 2009d20: 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 ); 2009d24: 03 00 80 72 sethi %hi(0x201c800), %g1 2009d28: 82 10 60 e0 or %g1, 0xe0, %g1 ! 201c8e0 <_Per_CPU_Information> 2009d2c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 2009d30: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009d34: 80 a0 80 03 cmp %g2, %g3 2009d38: 02 80 00 08 be 2009d58 <_Thread_Change_priority+0x108> 2009d3c: 01 00 00 00 nop 2009d40: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 2009d44: 80 a0 a0 00 cmp %g2, 0 2009d48: 02 80 00 04 be 2009d58 <_Thread_Change_priority+0x108> 2009d4c: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2009d50: 84 10 20 01 mov 1, %g2 ! 1 2009d54: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2009d58: 7f ff e2 29 call 20025fc 2009d5c: 81 e8 00 00 restore 2009d60: 81 c7 e0 08 ret 2009d64: 81 e8 00 00 restore =============================================================================== 02009f54 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009f54: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009f58: 90 10 00 18 mov %i0, %o0 2009f5c: 40 00 00 6f call 200a118 <_Thread_Get> 2009f60: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 2009f64: c2 07 bf fc ld [ %fp + -4 ], %g1 2009f68: 80 a0 60 00 cmp %g1, 0 2009f6c: 12 80 00 09 bne 2009f90 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 2009f70: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 2009f74: 7f ff ff 7d call 2009d68 <_Thread_Clear_state> 2009f78: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 2009f7c: 03 00 80 71 sethi %hi(0x201c400), %g1 2009f80: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201c6b0 <_Thread_Dispatch_disable_level> 2009f84: 84 00 bf ff add %g2, -1, %g2 2009f88: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 2009f8c: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 2009f90: 81 c7 e0 08 ret 2009f94: 81 e8 00 00 restore =============================================================================== 02009f98 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 2009f98: 9d e3 bf 98 save %sp, -104, %sp * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2009f9c: 03 00 80 71 sethi %hi(0x201c400), %g1 2009fa0: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201c6b0 <_Thread_Dispatch_disable_level> 2009fa4: 84 00 a0 01 inc %g2 2009fa8: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 2009fac: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 2009fb0: 37 00 80 72 sethi %hi(0x201c800), %i3 2009fb4: 82 16 e0 e0 or %i3, 0xe0, %g1 ! 201c8e0 <_Per_CPU_Information> _ISR_Disable( level ); 2009fb8: 7f ff e1 8d call 20025ec 2009fbc: fa 00 60 0c ld [ %g1 + 0xc ], %i5 #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; 2009fc0: 35 00 80 71 sethi %hi(0x201c400), %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 2009fc4: 31 00 80 71 sethi %hi(0x201c400), %i0 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 2009fc8: 10 80 00 37 b 200a0a4 <_Thread_Dispatch+0x10c> 2009fcc: 33 00 80 71 sethi %hi(0x201c400), %i1 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 2009fd0: c0 28 60 18 clrb [ %g1 + 0x18 ] /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 2009fd4: 80 a7 00 1d cmp %i4, %i5 2009fd8: 02 80 00 38 be 200a0b8 <_Thread_Dispatch+0x120> 2009fdc: f8 20 60 0c st %i4, [ %g1 + 0xc ] */ #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 ) 2009fe0: c2 07 20 78 ld [ %i4 + 0x78 ], %g1 2009fe4: 80 a0 60 01 cmp %g1, 1 2009fe8: 12 80 00 03 bne 2009ff4 <_Thread_Dispatch+0x5c> 2009fec: c2 06 a2 14 ld [ %i2 + 0x214 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009ff0: c2 27 20 74 st %g1, [ %i4 + 0x74 ] _ISR_Enable( level ); 2009ff4: 7f ff e1 82 call 20025fc 2009ff8: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 2009ffc: 40 00 0b 38 call 200ccdc <_TOD_Get_uptime> 200a000: 90 07 bf f8 add %fp, -8, %o0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a004: c4 1f 60 80 ldd [ %i5 + 0x80 ], %g2 _Timestamp_Subtract( 200a008: d4 1f bf f8 ldd [ %fp + -8 ], %o2 200a00c: 82 16 e0 e0 or %i3, 0xe0, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a010: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4 200a014: 9a a2 c0 0d subcc %o3, %o5, %o5 200a018: 98 62 80 0c subx %o2, %o4, %o4 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a01c: 86 80 c0 0d addcc %g3, %o5, %g3 200a020: 84 40 80 0c addx %g2, %o4, %g2 200a024: c4 3f 60 80 std %g2, [ %i5 + 0x80 ] &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 200a028: d4 38 60 20 std %o2, [ %g1 + 0x20 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a02c: c2 06 23 3c ld [ %i0 + 0x33c ], %g1 200a030: 80 a0 60 00 cmp %g1, 0 200a034: 02 80 00 06 be 200a04c <_Thread_Dispatch+0xb4> <== NEVER TAKEN 200a038: 90 10 00 1d mov %i5, %o0 executing->libc_reent = *_Thread_libc_reent; 200a03c: c4 00 40 00 ld [ %g1 ], %g2 200a040: c4 27 61 4c st %g2, [ %i5 + 0x14c ] *_Thread_libc_reent = heir->libc_reent; 200a044: c4 07 21 4c ld [ %i4 + 0x14c ], %g2 200a048: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 200a04c: 40 00 03 4a call 200ad74 <_User_extensions_Thread_switch> 200a050: 92 10 00 1c mov %i4, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 200a054: 90 07 60 c0 add %i5, 0xc0, %o0 200a058: 40 00 04 76 call 200b230 <_CPU_Context_switch> 200a05c: 92 07 20 c0 add %i4, 0xc0, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200a060: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 200a064: 80 a0 60 00 cmp %g1, 0 200a068: 02 80 00 0c be 200a098 <_Thread_Dispatch+0x100> 200a06c: d0 06 63 38 ld [ %i1 + 0x338 ], %o0 200a070: 80 a7 40 08 cmp %i5, %o0 200a074: 02 80 00 09 be 200a098 <_Thread_Dispatch+0x100> 200a078: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200a07c: 02 80 00 04 be 200a08c <_Thread_Dispatch+0xf4> 200a080: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200a084: 40 00 04 31 call 200b148 <_CPU_Context_save_fp> 200a088: 90 02 21 48 add %o0, 0x148, %o0 _Context_Restore_fp( &executing->fp_context ); 200a08c: 40 00 04 4c call 200b1bc <_CPU_Context_restore_fp> 200a090: 90 07 61 48 add %i5, 0x148, %o0 _Thread_Allocated_fp = executing; 200a094: fa 26 63 38 st %i5, [ %i1 + 0x338 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 200a098: 82 16 e0 e0 or %i3, 0xe0, %g1 _ISR_Disable( level ); 200a09c: 7f ff e1 54 call 20025ec 200a0a0: fa 00 60 0c ld [ %g1 + 0xc ], %i5 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 200a0a4: 82 16 e0 e0 or %i3, 0xe0, %g1 200a0a8: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 200a0ac: 80 a0 a0 00 cmp %g2, 0 200a0b0: 32 bf ff c8 bne,a 2009fd0 <_Thread_Dispatch+0x38> 200a0b4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 200a0b8: 7f ff e1 51 call 20025fc 200a0bc: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200a0c0: 03 00 80 71 sethi %hi(0x201c400), %g1 200a0c4: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201c6b0 <_Thread_Dispatch_disable_level> 200a0c8: 84 00 bf ff add %g2, -1, %g2 200a0cc: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 200a0d0: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 200a0d4: 7f ff f8 1f call 2008150 <_API_extensions_Run_postswitch> 200a0d8: 01 00 00 00 nop } 200a0dc: 81 c7 e0 08 ret 200a0e0: 81 e8 00 00 restore =============================================================================== 0200e8fc <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200e8fc: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200e900: 03 00 80 72 sethi %hi(0x201c800), %g1 200e904: fa 00 60 ec ld [ %g1 + 0xec ], %i5 ! 201c8ec <_Per_CPU_Information+0xc> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 200e908: 3f 00 80 3a sethi %hi(0x200e800), %i7 200e90c: be 17 e0 fc or %i7, 0xfc, %i7 ! 200e8fc <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200e910: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 200e914: 7f ff cf 3a call 20025fc 200e918: 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; 200e91c: 03 00 80 70 sethi %hi(0x201c000), %g1 doneConstructors = true; 200e920: 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; 200e924: f8 08 62 d8 ldub [ %g1 + 0x2d8 ], %i4 doneConstructors = true; 200e928: c4 28 62 d8 stb %g2, [ %g1 + 0x2d8 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200e92c: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 200e930: 80 a0 60 00 cmp %g1, 0 200e934: 02 80 00 0c be 200e964 <_Thread_Handler+0x68> 200e938: 03 00 80 71 sethi %hi(0x201c400), %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 ); 200e93c: d0 00 63 38 ld [ %g1 + 0x338 ], %o0 ! 201c738 <_Thread_Allocated_fp> 200e940: 80 a7 40 08 cmp %i5, %o0 200e944: 02 80 00 08 be 200e964 <_Thread_Handler+0x68> 200e948: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200e94c: 22 80 00 06 be,a 200e964 <_Thread_Handler+0x68> 200e950: fa 20 63 38 st %i5, [ %g1 + 0x338 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200e954: 7f ff f1 fd call 200b148 <_CPU_Context_save_fp> 200e958: 90 02 21 48 add %o0, 0x148, %o0 _Thread_Allocated_fp = executing; 200e95c: 03 00 80 71 sethi %hi(0x201c400), %g1 200e960: fa 20 63 38 st %i5, [ %g1 + 0x338 ] ! 201c738 <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 200e964: 7f ff f0 95 call 200abb8 <_User_extensions_Thread_begin> 200e968: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200e96c: 7f ff ed de call 200a0e4 <_Thread_Enable_dispatch> 200e970: 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) */ { 200e974: 80 8f 20 ff btst 0xff, %i4 200e978: 32 80 00 05 bne,a 200e98c <_Thread_Handler+0x90> 200e97c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 INIT_NAME (); 200e980: 40 00 33 e4 call 201b910 <_init> 200e984: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200e988: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200e98c: 80 a0 60 00 cmp %g1, 0 200e990: 12 80 00 06 bne 200e9a8 <_Thread_Handler+0xac> <== NEVER TAKEN 200e994: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200e998: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200e99c: 9f c0 40 00 call %g1 200e9a0: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200e9a4: d0 27 60 28 st %o0, [ %i5 + 0x28 ] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 200e9a8: 7f ff f0 95 call 200abfc <_User_extensions_Thread_exitted> 200e9ac: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200e9b0: 90 10 20 00 clr %o0 200e9b4: 92 10 20 01 mov 1, %o1 200e9b8: 7f ff e8 91 call 2008bfc <_Internal_error_Occurred> 200e9bc: 94 10 20 05 mov 5, %o2 =============================================================================== 0200a388 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 200a388: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200a38c: 05 00 80 6e sethi %hi(0x201b800), %g2 200a390: 84 10 a1 4c or %g2, 0x14c, %g2 ! 201b94c #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a394: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 * Output parameters: NONE */ void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200a398: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200a39c: f8 00 a0 0c ld [ %g2 + 0xc ], %i4 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a3a0: 80 a0 e0 00 cmp %g3, 0 200a3a4: 02 80 00 06 be 200a3bc <_Thread_Handler_initialization+0x34> 200a3a8: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200a3ac: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 200a3b0: 80 a0 e0 00 cmp %g3, 0 200a3b4: 12 80 00 06 bne 200a3cc <_Thread_Handler_initialization+0x44><== ALWAYS TAKEN 200a3b8: 80 a0 60 00 cmp %g1, 0 rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200a3bc: 90 10 20 00 clr %o0 200a3c0: 92 10 20 01 mov 1, %o1 200a3c4: 7f ff fa 0e call 2008bfc <_Internal_error_Occurred> 200a3c8: 94 10 20 0e mov 0xe, %o2 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200a3cc: 22 80 00 05 be,a 200a3e0 <_Thread_Handler_initialization+0x58> 200a3d0: 03 00 80 72 sethi %hi(0x201c800), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200a3d4: 9f c0 40 00 call %g1 200a3d8: d0 00 a0 08 ld [ %g2 + 8 ], %o0 _Thread_Dispatch_necessary = false; 200a3dc: 03 00 80 72 sethi %hi(0x201c800), %g1 200a3e0: 82 10 60 e0 or %g1, 0xe0, %g1 ! 201c8e0 <_Per_CPU_Information> 200a3e4: c0 28 60 18 clrb [ %g1 + 0x18 ] _Thread_Executing = NULL; 200a3e8: c0 20 60 0c clr [ %g1 + 0xc ] _Thread_Heir = NULL; 200a3ec: c0 20 60 10 clr [ %g1 + 0x10 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200a3f0: 03 00 80 71 sethi %hi(0x201c400), %g1 200a3f4: c0 20 63 38 clr [ %g1 + 0x338 ] ! 201c738 <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200a3f8: 03 00 80 71 sethi %hi(0x201c400), %g1 200a3fc: f8 20 63 48 st %i4, [ %g1 + 0x348 ] ! 201c748 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200a400: 03 00 80 71 sethi %hi(0x201c400), %g1 200a404: fa 20 62 14 st %i5, [ %g1 + 0x214 ] ! 201c614 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200a408: 82 10 20 08 mov 8, %g1 200a40c: 11 00 80 71 sethi %hi(0x201c400), %o0 200a410: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200a414: 90 12 23 c8 or %o0, 0x3c8, %o0 200a418: 92 10 20 01 mov 1, %o1 200a41c: 94 10 20 01 mov 1, %o2 200a420: 96 10 20 01 mov 1, %o3 200a424: 98 10 21 60 mov 0x160, %o4 200a428: 7f ff fb 7a call 2009210 <_Objects_Initialize_information> 200a42c: 9a 10 20 00 clr %o5 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 200a430: 81 c7 e0 08 ret 200a434: 81 e8 00 00 restore =============================================================================== 0200a1c8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a1c8: 9d e3 bf a0 save %sp, -96, %sp 200a1cc: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 200a1d0: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 200a1d4: e0 00 40 00 ld [ %g1 ], %l0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 200a1d8: c0 26 61 50 clr [ %i1 + 0x150 ] 200a1dc: c0 26 61 54 clr [ %i1 + 0x154 ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a1e0: 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 ); 200a1e4: 90 10 00 19 mov %i1, %o0 200a1e8: 40 00 02 06 call 200aa00 <_Thread_Stack_Allocate> 200a1ec: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a1f0: 80 a2 00 1b cmp %o0, %i3 200a1f4: 0a 80 00 61 bcs 200a378 <_Thread_Initialize+0x1b0> 200a1f8: 80 a2 20 00 cmp %o0, 0 200a1fc: 02 80 00 5f be 200a378 <_Thread_Initialize+0x1b0> <== NEVER TAKEN 200a200: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a204: c2 06 60 bc ld [ %i1 + 0xbc ], %g1 the_stack->size = size; 200a208: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a20c: 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 ) { 200a210: 02 80 00 07 be 200a22c <_Thread_Initialize+0x64> 200a214: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200a218: 40 00 03 b0 call 200b0d8 <_Workspace_Allocate> 200a21c: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a220: b6 92 20 00 orcc %o0, 0, %i3 200a224: 02 80 00 46 be 200a33c <_Thread_Initialize+0x174> 200a228: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a22c: 03 00 80 71 sethi %hi(0x201c400), %g1 200a230: d0 00 63 48 ld [ %g1 + 0x348 ], %o0 ! 201c748 <_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; 200a234: f6 26 61 48 st %i3, [ %i1 + 0x148 ] the_thread->Start.fp_context = fp_area; 200a238: f6 26 60 b8 st %i3, [ %i1 + 0xb8 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a23c: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a240: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a244: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 200a248: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a24c: 80 a2 20 00 cmp %o0, 0 200a250: 02 80 00 08 be 200a270 <_Thread_Initialize+0xa8> 200a254: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 200a258: 90 02 20 01 inc %o0 200a25c: 40 00 03 9f call 200b0d8 <_Workspace_Allocate> 200a260: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200a264: b8 92 20 00 orcc %o0, 0, %i4 200a268: 22 80 00 36 be,a 200a340 <_Thread_Initialize+0x178> 200a26c: 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 ) { 200a270: 80 a7 20 00 cmp %i4, 0 200a274: 02 80 00 0c be 200a2a4 <_Thread_Initialize+0xdc> 200a278: f8 26 61 58 st %i4, [ %i1 + 0x158 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 200a27c: 03 00 80 71 sethi %hi(0x201c400), %g1 200a280: c4 00 63 48 ld [ %g1 + 0x348 ], %g2 ! 201c748 <_Thread_Maximum_extensions> 200a284: 10 80 00 05 b 200a298 <_Thread_Initialize+0xd0> 200a288: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 200a28c: 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++ ) 200a290: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 200a294: 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++ ) 200a298: 80 a0 40 02 cmp %g1, %g2 200a29c: 28 bf ff fc bleu,a 200a28c <_Thread_Initialize+0xc4> 200a2a0: c8 06 61 58 ld [ %i1 + 0x158 ], %g4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200a2a4: c2 07 a0 60 ld [ %fp + 0x60 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a2a8: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 200a2ac: c2 26 60 a0 st %g1, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; 200a2b0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 200a2b4: c0 26 60 44 clr [ %i1 + 0x44 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a2b8: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a2bc: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 200a2c0: c0 26 60 1c clr [ %i1 + 0x1c ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a2c4: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 200a2c8: 82 10 20 01 mov 1, %g1 200a2cc: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a2d0: 03 00 80 6e sethi %hi(0x201b800), %g1 200a2d4: c2 00 62 54 ld [ %g1 + 0x254 ], %g1 ! 201ba54 <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; 200a2d8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a2dc: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a2e0: 9f c0 40 00 call %g1 200a2e4: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a2e8: b4 92 20 00 orcc %o0, 0, %i2 200a2ec: 02 80 00 15 be 200a340 <_Thread_Initialize+0x178> 200a2f0: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 200a2f4: 40 00 01 9b call 200a960 <_Thread_Set_priority> 200a2f8: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a2fc: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200a300: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200a304: c0 26 60 80 clr [ %i1 + 0x80 ] 200a308: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a30c: 83 28 60 02 sll %g1, 2, %g1 200a310: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a314: e0 26 60 0c st %l0, [ %i1 + 0xc ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 200a318: 90 10 00 19 mov %i1, %o0 200a31c: 40 00 02 59 call 200ac80 <_User_extensions_Thread_create> 200a320: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200a324: 80 8a 20 ff btst 0xff, %o0 200a328: 02 80 00 06 be 200a340 <_Thread_Initialize+0x178> 200a32c: 01 00 00 00 nop 200a330: b0 0e 20 01 and %i0, 1, %i0 200a334: 81 c7 e0 08 ret 200a338: 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; 200a33c: 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 ); 200a340: 40 00 03 6e call 200b0f8 <_Workspace_Free> 200a344: d0 06 61 4c ld [ %i1 + 0x14c ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a348: 40 00 03 6c call 200b0f8 <_Workspace_Free> 200a34c: d0 06 61 50 ld [ %i1 + 0x150 ], %o0 200a350: 40 00 03 6a call 200b0f8 <_Workspace_Free> 200a354: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 _Workspace_Free( extensions_area ); 200a358: 40 00 03 68 call 200b0f8 <_Workspace_Free> 200a35c: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a360: 40 00 03 66 call 200b0f8 <_Workspace_Free> 200a364: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a368: 40 00 03 64 call 200b0f8 <_Workspace_Free> 200a36c: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 200a370: 40 00 01 b5 call 200aa44 <_Thread_Stack_Free> 200a374: 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 */ 200a378: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 200a37c: b0 0e 20 01 and %i0, 1, %i0 200a380: 81 c7 e0 08 ret 200a384: 81 e8 00 00 restore =============================================================================== 0200a8a8 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200a8a8: 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 ) 200a8ac: 80 a6 20 00 cmp %i0, 0 200a8b0: 02 80 00 19 be 200a914 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a8b4: 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 ) { 200a8b8: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200a8bc: 80 a7 20 01 cmp %i4, 1 200a8c0: 12 80 00 15 bne 200a914 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a8c4: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200a8c8: 7f ff df 49 call 20025ec 200a8cc: 01 00 00 00 nop 200a8d0: ba 10 00 08 mov %o0, %i5 200a8d4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200a8d8: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a8dc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200a8e0: 80 88 80 01 btst %g2, %g1 200a8e4: 02 80 00 0a be 200a90c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 200a8e8: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200a8ec: 92 10 00 19 mov %i1, %o1 200a8f0: 94 10 20 01 mov 1, %o2 200a8f4: 40 00 0a cf call 200d430 <_Thread_queue_Extract_priority_helper> 200a8f8: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200a8fc: 90 10 00 18 mov %i0, %o0 200a900: 92 10 00 19 mov %i1, %o1 200a904: 7f ff ff 50 call 200a644 <_Thread_queue_Enqueue_priority> 200a908: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200a90c: 7f ff df 3c call 20025fc 200a910: 90 10 00 1d mov %i5, %o0 200a914: 81 c7 e0 08 ret 200a918: 81 e8 00 00 restore =============================================================================== 0200a91c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a91c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a920: 90 10 00 18 mov %i0, %o0 200a924: 7f ff fd fd call 200a118 <_Thread_Get> 200a928: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a92c: c2 07 bf fc ld [ %fp + -4 ], %g1 200a930: 80 a0 60 00 cmp %g1, 0 200a934: 12 80 00 09 bne 200a958 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200a938: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200a93c: 40 00 0a f4 call 200d50c <_Thread_queue_Process_timeout> 200a940: 01 00 00 00 nop * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 200a944: 03 00 80 71 sethi %hi(0x201c400), %g1 200a948: c4 00 62 b0 ld [ %g1 + 0x2b0 ], %g2 ! 201c6b0 <_Thread_Dispatch_disable_level> 200a94c: 84 00 bf ff add %g2, -1, %g2 200a950: c4 20 62 b0 st %g2, [ %g1 + 0x2b0 ] return _Thread_Dispatch_disable_level; 200a954: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 200a958: 81 c7 e0 08 ret 200a95c: 81 e8 00 00 restore =============================================================================== 020188e0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 20188e0: 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; 20188e4: 25 00 80 ed sethi %hi(0x203b400), %l2 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 20188e8: a6 07 bf e8 add %fp, -24, %l3 20188ec: a2 07 bf ec add %fp, -20, %l1 20188f0: b8 07 bf f4 add %fp, -12, %i4 20188f4: b6 07 bf f8 add %fp, -8, %i3 20188f8: e2 27 bf e8 st %l1, [ %fp + -24 ] head->previous = NULL; 20188fc: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2018900: e6 27 bf f0 st %l3, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2018904: f6 27 bf f4 st %i3, [ %fp + -12 ] head->previous = NULL; 2018908: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 201890c: 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 ); 2018910: b4 06 20 30 add %i0, 0x30, %i2 /* * 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 ); 2018914: ba 06 20 68 add %i0, 0x68, %i5 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2018918: a0 06 20 08 add %i0, 8, %l0 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 201891c: b2 06 20 40 add %i0, 0x40, %i1 { /* * 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; 2018920: e6 26 20 78 st %l3, [ %i0 + 0x78 ] 2018924: 29 00 80 ed sethi %hi(0x203b400), %l4 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2018928: c2 04 a2 90 ld [ %l2 + 0x290 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 201892c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2018930: 90 10 00 1a mov %i2, %o0 2018934: 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; 2018938: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 201893c: 40 00 11 77 call 201cf18 <_Watchdog_Adjust_to_chain> 2018940: 94 10 00 1c mov %i4, %o2 2018944: d0 1d 22 10 ldd [ %l4 + 0x210 ], %o0 2018948: 94 10 20 00 clr %o2 201894c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018950: 40 00 4b b2 call 202b818 <__divdi3> 2018954: 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; 2018958: 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 ) { 201895c: 80 a2 40 0a cmp %o1, %o2 2018960: 08 80 00 07 bleu 201897c <_Timer_server_Body+0x9c> 2018964: aa 10 00 09 mov %o1, %l5 /* * 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 ); 2018968: 92 22 40 0a sub %o1, %o2, %o1 201896c: 90 10 00 1d mov %i5, %o0 2018970: 40 00 11 6a call 201cf18 <_Watchdog_Adjust_to_chain> 2018974: 94 10 00 1c mov %i4, %o2 2018978: 30 80 00 06 b,a 2018990 <_Timer_server_Body+0xb0> } else if ( snapshot < last_snapshot ) { 201897c: 1a 80 00 05 bcc 2018990 <_Timer_server_Body+0xb0> 2018980: 90 10 00 1d mov %i5, %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 ); 2018984: 92 10 20 01 mov 1, %o1 2018988: 40 00 11 3d call 201ce7c <_Watchdog_Adjust> 201898c: 94 22 80 15 sub %o2, %l5, %o2 } watchdogs->last_snapshot = snapshot; 2018990: ea 26 20 74 st %l5, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2018994: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2018998: 40 00 02 bf call 2019494 <_Chain_Get> 201899c: 01 00 00 00 nop if ( timer == NULL ) { 20189a0: 92 92 20 00 orcc %o0, 0, %o1 20189a4: 02 80 00 0c be 20189d4 <_Timer_server_Body+0xf4> 20189a8: 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 ) { 20189ac: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 20189b0: 80 a0 60 01 cmp %g1, 1 20189b4: 02 80 00 05 be 20189c8 <_Timer_server_Body+0xe8> 20189b8: 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 ) { 20189bc: 80 a0 60 03 cmp %g1, 3 20189c0: 12 bf ff f5 bne 2018994 <_Timer_server_Body+0xb4> <== NEVER TAKEN 20189c4: 90 10 00 1d mov %i5, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 20189c8: 40 00 11 86 call 201cfe0 <_Watchdog_Insert> 20189cc: 92 02 60 10 add %o1, 0x10, %o1 20189d0: 30 bf ff f1 b,a 2018994 <_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 ); 20189d4: 7f ff de df call 2010550 20189d8: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 20189dc: c2 07 bf e8 ld [ %fp + -24 ], %g1 20189e0: 80 a0 40 11 cmp %g1, %l1 20189e4: 12 80 00 0a bne 2018a0c <_Timer_server_Body+0x12c> <== NEVER TAKEN 20189e8: 01 00 00 00 nop ts->insert_chain = NULL; 20189ec: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 20189f0: 7f ff de dc call 2010560 20189f4: 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 ) ) { 20189f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20189fc: 80 a0 40 1b cmp %g1, %i3 2018a00: 12 80 00 06 bne 2018a18 <_Timer_server_Body+0x138> 2018a04: 01 00 00 00 nop 2018a08: 30 80 00 18 b,a 2018a68 <_Timer_server_Body+0x188> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2018a0c: 7f ff de d5 call 2010560 <== NOT EXECUTED 2018a10: 01 00 00 00 nop <== NOT EXECUTED 2018a14: 30 bf ff c5 b,a 2018928 <_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 ); 2018a18: 7f ff de ce call 2010550 2018a1c: 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; 2018a20: e8 07 bf f4 ld [ %fp + -12 ], %l4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2018a24: 80 a5 00 1b cmp %l4, %i3 2018a28: 02 80 00 0d be 2018a5c <_Timer_server_Body+0x17c> 2018a2c: 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; 2018a30: c2 05 00 00 ld [ %l4 ], %g1 head->next = new_first; new_first->previous = head; 2018a34: 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; 2018a38: c2 27 bf f4 st %g1, [ %fp + -12 ] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 2018a3c: c0 25 20 08 clr [ %l4 + 8 ] _ISR_Enable( level ); 2018a40: 7f ff de c8 call 2010560 2018a44: 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 ); 2018a48: c2 05 20 1c ld [ %l4 + 0x1c ], %g1 2018a4c: d0 05 20 20 ld [ %l4 + 0x20 ], %o0 2018a50: 9f c0 40 00 call %g1 2018a54: d2 05 20 24 ld [ %l4 + 0x24 ], %o1 } 2018a58: 30 bf ff f0 b,a 2018a18 <_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 ); 2018a5c: 7f ff de c1 call 2010560 2018a60: 01 00 00 00 nop 2018a64: 30 bf ff af b,a 2018920 <_Timer_server_Body+0x40> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2018a68: c0 2e 20 7c clrb [ %i0 + 0x7c ] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 2018a6c: 7f ff ff 6e call 2018824 <_Thread_Disable_dispatch> 2018a70: 01 00 00 00 nop _Thread_Set_state( ts->thread, STATES_DELAYING ); 2018a74: d0 06 00 00 ld [ %i0 ], %o0 2018a78: 40 00 0f e2 call 201ca00 <_Thread_Set_state> 2018a7c: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2018a80: 7f ff ff 70 call 2018840 <_Timer_server_Reset_interval_system_watchdog> 2018a84: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2018a88: 7f ff ff 82 call 2018890 <_Timer_server_Reset_tod_system_watchdog> 2018a8c: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2018a90: 40 00 0d 92 call 201c0d8 <_Thread_Enable_dispatch> 2018a94: 01 00 00 00 nop ts->active = true; 2018a98: 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 ); 2018a9c: 90 10 00 10 mov %l0, %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; 2018aa0: 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 ); 2018aa4: 40 00 11 a9 call 201d148 <_Watchdog_Remove> 2018aa8: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2018aac: 40 00 11 a7 call 201d148 <_Watchdog_Remove> 2018ab0: 90 10 00 19 mov %i1, %o0 2018ab4: 30 bf ff 9b b,a 2018920 <_Timer_server_Body+0x40> =============================================================================== 02018ab8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2018ab8: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2018abc: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2018ac0: 80 a0 60 00 cmp %g1, 0 2018ac4: 12 80 00 4e bne 2018bfc <_Timer_server_Schedule_operation_method+0x144> 2018ac8: ba 10 00 19 mov %i1, %i5 * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 2018acc: 7f ff ff 56 call 2018824 <_Thread_Disable_dispatch> 2018ad0: 01 00 00 00 nop if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2018ad4: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2018ad8: 80 a0 60 01 cmp %g1, 1 2018adc: 12 80 00 1f bne 2018b58 <_Timer_server_Schedule_operation_method+0xa0> 2018ae0: 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 ); 2018ae4: 7f ff de 9b call 2010550 2018ae8: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2018aec: 03 00 80 ed sethi %hi(0x203b400), %g1 2018af0: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 203b690 <_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; 2018af4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2018af8: 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 ); 2018afc: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2018b00: 80 a0 40 03 cmp %g1, %g3 2018b04: 02 80 00 08 be 2018b24 <_Timer_server_Schedule_operation_method+0x6c> 2018b08: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2018b0c: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 if (delta_interval > delta) { 2018b10: 80 a7 00 04 cmp %i4, %g4 2018b14: 08 80 00 03 bleu 2018b20 <_Timer_server_Schedule_operation_method+0x68> 2018b18: 86 10 20 00 clr %g3 delta_interval -= delta; 2018b1c: 86 27 00 04 sub %i4, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2018b20: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2018b24: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2018b28: 7f ff de 8e call 2010560 2018b2c: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2018b30: 90 06 20 30 add %i0, 0x30, %o0 2018b34: 40 00 11 2b call 201cfe0 <_Watchdog_Insert> 2018b38: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018b3c: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018b40: 80 a0 60 00 cmp %g1, 0 2018b44: 12 80 00 2c bne 2018bf4 <_Timer_server_Schedule_operation_method+0x13c> 2018b48: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 2018b4c: 7f ff ff 3d call 2018840 <_Timer_server_Reset_interval_system_watchdog> 2018b50: 90 10 00 18 mov %i0, %o0 2018b54: 30 80 00 28 b,a 2018bf4 <_Timer_server_Schedule_operation_method+0x13c> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2018b58: 12 80 00 27 bne 2018bf4 <_Timer_server_Schedule_operation_method+0x13c> 2018b5c: 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 ); 2018b60: 7f ff de 7c call 2010550 2018b64: 01 00 00 00 nop 2018b68: b8 10 00 08 mov %o0, %i4 2018b6c: 03 00 80 ed sethi %hi(0x203b400), %g1 2018b70: d0 18 62 10 ldd [ %g1 + 0x210 ], %o0 ! 203b610 <_TOD_Now> 2018b74: 94 10 20 00 clr %o2 2018b78: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018b7c: 40 00 4b 27 call 202b818 <__divdi3> 2018b80: 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; 2018b84: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2018b88: c8 06 20 74 ld [ %i0 + 0x74 ], %g4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2018b8c: 84 06 20 6c add %i0, 0x6c, %g2 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2018b90: 80 a0 40 02 cmp %g1, %g2 2018b94: 02 80 00 0c be 2018bc4 <_Timer_server_Schedule_operation_method+0x10c> 2018b98: 80 a2 40 04 cmp %o1, %g4 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2018b9c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2018ba0: 84 00 c0 04 add %g3, %g4, %g2 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { 2018ba4: 08 80 00 07 bleu 2018bc0 <_Timer_server_Schedule_operation_method+0x108> 2018ba8: 84 20 80 09 sub %g2, %o1, %g2 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2018bac: 88 22 40 04 sub %o1, %g4, %g4 if (delta_interval > delta) { 2018bb0: 80 a0 c0 04 cmp %g3, %g4 2018bb4: 08 80 00 03 bleu 2018bc0 <_Timer_server_Schedule_operation_method+0x108><== NEVER TAKEN 2018bb8: 84 10 20 00 clr %g2 delta_interval -= delta; 2018bbc: 84 20 c0 04 sub %g3, %g4, %g2 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 2018bc0: c4 20 60 10 st %g2, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2018bc4: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 2018bc8: 7f ff de 66 call 2010560 2018bcc: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2018bd0: 90 06 20 68 add %i0, 0x68, %o0 2018bd4: 40 00 11 03 call 201cfe0 <_Watchdog_Insert> 2018bd8: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2018bdc: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2018be0: 80 a0 60 00 cmp %g1, 0 2018be4: 12 80 00 04 bne 2018bf4 <_Timer_server_Schedule_operation_method+0x13c> 2018be8: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2018bec: 7f ff ff 29 call 2018890 <_Timer_server_Reset_tod_system_watchdog> 2018bf0: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2018bf4: 40 00 0d 39 call 201c0d8 <_Thread_Enable_dispatch> 2018bf8: 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 ); 2018bfc: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2018c00: 40 00 02 1a call 2019468 <_Chain_Append> 2018c04: 81 e8 00 00 restore =============================================================================== 0200a46c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a46c: 9d e3 bf a0 save %sp, -96, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a470: d6 06 40 00 ld [ %i1 ], %o3 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a474: a0 10 00 1a mov %i2, %l0 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a478: 95 3a e0 1f sra %o3, 0x1f, %o2 200a47c: b9 2a a0 03 sll %o2, 3, %i4 200a480: 87 2a e0 03 sll %o3, 3, %g3 200a484: b5 32 e0 1d srl %o3, 0x1d, %i2 200a488: 9b 28 e0 05 sll %g3, 5, %o5 200a48c: 84 16 80 1c or %i2, %i4, %g2 200a490: b9 30 e0 1b srl %g3, 0x1b, %i4 200a494: 99 28 a0 05 sll %g2, 5, %o4 200a498: 86 a3 40 03 subcc %o5, %g3, %g3 200a49c: 98 17 00 0c or %i4, %o4, %o4 200a4a0: 84 63 00 02 subx %o4, %g2, %g2 200a4a4: b9 30 e0 1a srl %g3, 0x1a, %i4 200a4a8: 99 28 a0 06 sll %g2, 6, %o4 200a4ac: 9b 28 e0 06 sll %g3, 6, %o5 200a4b0: 98 17 00 0c or %i4, %o4, %o4 200a4b4: 9a a3 40 03 subcc %o5, %g3, %o5 200a4b8: 98 63 00 02 subx %o4, %g2, %o4 200a4bc: 96 83 40 0b addcc %o5, %o3, %o3 200a4c0: 85 32 e0 1e srl %o3, 0x1e, %g2 200a4c4: 94 43 00 0a addx %o4, %o2, %o2 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a4c8: a2 10 00 1b mov %i3, %l1 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a4cc: b5 2a a0 02 sll %o2, 2, %i2 200a4d0: b7 2a e0 02 sll %o3, 2, %i3 200a4d4: b4 10 80 1a or %g2, %i2, %i2 200a4d8: 96 82 c0 1b addcc %o3, %i3, %o3 200a4dc: 94 42 80 1a addx %o2, %i2, %o2 200a4e0: 85 32 e0 1e srl %o3, 0x1e, %g2 200a4e4: b9 2a a0 02 sll %o2, 2, %i4 200a4e8: bb 2a e0 02 sll %o3, 2, %i5 200a4ec: b8 10 80 1c or %g2, %i4, %i4 200a4f0: 96 82 c0 1d addcc %o3, %i5, %o3 200a4f4: 94 42 80 1c addx %o2, %i4, %o2 200a4f8: 85 32 e0 1e srl %o3, 0x1e, %g2 200a4fc: b9 2a a0 02 sll %o2, 2, %i4 200a500: bb 2a e0 02 sll %o3, 2, %i5 200a504: b8 10 80 1c or %g2, %i4, %i4 200a508: 96 82 c0 1d addcc %o3, %i5, %o3 200a50c: 94 42 80 1c addx %o2, %i4, %o2 200a510: 87 2a a0 09 sll %o2, 9, %g3 200a514: b9 32 e0 17 srl %o3, 0x17, %i4 200a518: 94 17 00 03 or %i4, %g3, %o2 right += rhs->tv_nsec; 200a51c: c6 06 60 04 ld [ %i1 + 4 ], %g3 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a520: 85 2a e0 09 sll %o3, 9, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a524: c2 06 00 00 ld [ %i0 ], %g1 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a528: 96 10 00 02 mov %g2, %o3 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 200a52c: c8 06 20 04 ld [ %i0 + 4 ], %g4 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a530: b2 82 c0 03 addcc %o3, %g3, %i1 200a534: 85 38 e0 1f sra %g3, 0x1f, %g2 200a538: b0 42 80 02 addx %o2, %g2, %i0 if ( right == 0 ) { 200a53c: 80 96 00 19 orcc %i0, %i1, %g0 200a540: 32 80 00 06 bne,a 200a558 <_Timespec_Divide+0xec> <== NEVER TAKEN 200a544: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED *ival_percentage = 0; 200a548: c0 24 00 00 clr [ %l0 ] *fval_percentage = 0; 200a54c: c0 24 40 00 clr [ %l1 ] return; 200a550: 81 c7 e0 08 ret 200a554: 81 e8 00 00 restore /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a558: 95 38 60 1f sra %g1, 0x1f, %o2 <== NOT EXECUTED 200a55c: b9 30 60 1d srl %g1, 0x1d, %i4 <== NOT EXECUTED 200a560: 83 2a a0 03 sll %o2, 3, %g1 <== NOT EXECUTED 200a564: 87 2a e0 03 sll %o3, 3, %g3 <== NOT EXECUTED 200a568: 84 17 00 01 or %i4, %g1, %g2 <== NOT EXECUTED 200a56c: 83 30 e0 1b srl %g3, 0x1b, %g1 <== NOT EXECUTED 200a570: 99 28 a0 05 sll %g2, 5, %o4 <== NOT EXECUTED 200a574: 9b 28 e0 05 sll %g3, 5, %o5 <== NOT EXECUTED 200a578: 98 10 40 0c or %g1, %o4, %o4 <== NOT EXECUTED 200a57c: 9a a3 40 03 subcc %o5, %g3, %o5 <== NOT EXECUTED 200a580: 83 33 60 1a srl %o5, 0x1a, %g1 <== NOT EXECUTED 200a584: 98 63 00 02 subx %o4, %g2, %o4 <== NOT EXECUTED 200a588: 87 2b 60 06 sll %o5, 6, %g3 <== NOT EXECUTED 200a58c: 85 2b 20 06 sll %o4, 6, %g2 <== NOT EXECUTED 200a590: 92 a0 c0 0d subcc %g3, %o5, %o1 <== NOT EXECUTED 200a594: 84 10 40 02 or %g1, %g2, %g2 <== NOT EXECUTED 200a598: 90 60 80 0c subx %g2, %o4, %o0 <== NOT EXECUTED 200a59c: 92 82 40 0b addcc %o1, %o3, %o1 <== NOT EXECUTED 200a5a0: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a5a4: 90 42 00 0a addx %o0, %o2, %o0 <== NOT EXECUTED 200a5a8: b7 2a 60 02 sll %o1, 2, %i3 <== NOT EXECUTED 200a5ac: b5 2a 20 02 sll %o0, 2, %i2 <== NOT EXECUTED 200a5b0: 92 82 40 1b addcc %o1, %i3, %o1 <== NOT EXECUTED 200a5b4: b4 10 40 1a or %g1, %i2, %i2 <== NOT EXECUTED 200a5b8: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a5bc: 90 42 00 1a addx %o0, %i2, %o0 <== NOT EXECUTED 200a5c0: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED 200a5c4: b9 2a 20 02 sll %o0, 2, %i4 <== NOT EXECUTED 200a5c8: 92 82 40 1d addcc %o1, %i5, %o1 <== NOT EXECUTED 200a5cc: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a5d0: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a5d4: 90 42 00 1c addx %o0, %i4, %o0 <== NOT EXECUTED 200a5d8: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED 200a5dc: b9 2a 20 02 sll %o0, 2, %i4 <== NOT EXECUTED 200a5e0: 92 82 40 1d addcc %o1, %i5, %o1 <== NOT EXECUTED 200a5e4: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a5e8: 83 2a 60 09 sll %o1, 9, %g1 <== NOT EXECUTED 200a5ec: 90 42 00 1c addx %o0, %i4, %o0 <== NOT EXECUTED left += lhs->tv_nsec; 200a5f0: 95 39 20 1f sra %g4, 0x1f, %o2 <== NOT EXECUTED 200a5f4: 96 80 40 04 addcc %g1, %g4, %o3 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a5f8: 87 32 60 17 srl %o1, 0x17, %g3 <== NOT EXECUTED 200a5fc: 85 2a 20 09 sll %o0, 9, %g2 <== NOT EXECUTED 200a600: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED left += lhs->tv_nsec; 200a604: 94 42 00 0a addx %o0, %o2, %o2 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a608: 83 2a a0 02 sll %o2, 2, %g1 <== NOT EXECUTED 200a60c: 9b 2a e0 02 sll %o3, 2, %o5 <== NOT EXECUTED 200a610: 85 32 e0 1e srl %o3, 0x1e, %g2 <== NOT EXECUTED 200a614: 98 10 80 01 or %g2, %g1, %o4 <== NOT EXECUTED 200a618: 83 33 60 1b srl %o5, 0x1b, %g1 <== NOT EXECUTED 200a61c: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 200a620: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 200a624: 84 10 40 02 or %g1, %g2, %g2 <== NOT EXECUTED 200a628: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 200a62c: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 200a630: 96 80 c0 0b addcc %g3, %o3, %o3 <== NOT EXECUTED 200a634: 83 32 e0 1e srl %o3, 0x1e, %g1 <== NOT EXECUTED 200a638: 94 40 80 0a addx %g2, %o2, %o2 <== NOT EXECUTED 200a63c: bb 2a e0 02 sll %o3, 2, %i5 <== NOT EXECUTED 200a640: b9 2a a0 02 sll %o2, 2, %i4 <== NOT EXECUTED 200a644: ba 82 c0 1d addcc %o3, %i5, %i5 <== NOT EXECUTED 200a648: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a64c: 83 37 60 1e srl %i5, 0x1e, %g1 <== NOT EXECUTED 200a650: b8 42 80 1c addx %o2, %i4, %i4 <== NOT EXECUTED 200a654: 93 2f 60 02 sll %i5, 2, %o1 <== NOT EXECUTED 200a658: 91 2f 20 02 sll %i4, 2, %o0 <== NOT EXECUTED 200a65c: 92 87 40 09 addcc %i5, %o1, %o1 <== NOT EXECUTED 200a660: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200a664: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200a668: 90 47 00 08 addx %i4, %o0, %o0 <== NOT EXECUTED 200a66c: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200a670: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200a674: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200a678: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED 200a67c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 200a680: 40 00 37 12 call 20182c8 <__udivdi3> <== NOT EXECUTED 200a684: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a688: 94 10 20 00 clr %o2 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200a68c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED 200a690: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a694: 40 00 37 0d call 20182c8 <__udivdi3> <== NOT EXECUTED 200a698: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200a69c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a6a0: d2 24 00 00 st %o1, [ %l0 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200a6a4: 94 10 20 00 clr %o2 <== NOT EXECUTED 200a6a8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200a6ac: 40 00 37 dc call 201861c <__umoddi3> <== NOT EXECUTED 200a6b0: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200a6b4: d2 24 40 00 st %o1, [ %l1 ] <== NOT EXECUTED 200a6b8: 81 c7 e0 08 ret <== NOT EXECUTED 200a6bc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200a6c0 <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 200a6c0: c6 02 00 00 ld [ %o0 ], %g3 200a6c4: c4 02 40 00 ld [ %o1 ], %g2 200a6c8: 80 a0 c0 02 cmp %g3, %g2 200a6cc: 06 80 00 0b bl 200a6f8 <_Timespec_Less_than+0x38> <== NEVER TAKEN 200a6d0: 82 10 20 01 mov 1, %g1 return true; if ( lhs->tv_sec > rhs->tv_sec ) 200a6d4: 80 a0 c0 02 cmp %g3, %g2 200a6d8: 14 80 00 08 bg 200a6f8 <_Timespec_Less_than+0x38> 200a6dc: 82 10 20 00 clr %g1 #include #include #include bool _Timespec_Less_than( 200a6e0: c6 02 20 04 ld [ %o0 + 4 ], %g3 200a6e4: c4 02 60 04 ld [ %o1 + 4 ], %g2 200a6e8: 80 a0 c0 02 cmp %g3, %g2 200a6ec: 06 80 00 03 bl 200a6f8 <_Timespec_Less_than+0x38> <== NEVER TAKEN 200a6f0: 82 10 20 01 mov 1, %g1 200a6f4: 82 10 20 00 clr %g1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 200a6f8: 81 c3 e0 08 retl 200a6fc: 90 08 60 01 and %g1, 1, %o0 =============================================================================== 0200b8b4 <_Timespec_Subtract>: const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { 200b8b4: c4 02 60 04 ld [ %o1 + 4 ], %g2 200b8b8: c2 02 20 04 ld [ %o0 + 4 ], %g1 200b8bc: c8 02 40 00 ld [ %o1 ], %g4 200b8c0: c6 02 00 00 ld [ %o0 ], %g3 200b8c4: 80 a0 80 01 cmp %g2, %g1 200b8c8: 16 80 00 08 bge 200b8e8 <_Timespec_Subtract+0x34> <== ALWAYS TAKEN 200b8cc: 86 21 00 03 sub %g4, %g3, %g3 result->tv_sec = end->tv_sec - start->tv_sec - 1; 200b8d0: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 200b8d4: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 200b8d8: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3 <== NOT EXECUTED 200b8dc: 86 10 e2 00 or %g3, 0x200, %g3 ! 3b9aca00 <== NOT EXECUTED 200b8e0: 10 80 00 03 b 200b8ec <_Timespec_Subtract+0x38> <== NOT EXECUTED 200b8e4: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED } else { result->tv_sec = end->tv_sec - start->tv_sec; 200b8e8: c6 22 80 00 st %g3, [ %o2 ] result->tv_nsec = end->tv_nsec - start->tv_nsec; 200b8ec: 82 20 80 01 sub %g2, %g1, %g1 200b8f0: 81 c3 e0 08 retl 200b8f4: c2 22 a0 04 st %g1, [ %o2 + 4 ] =============================================================================== 0200c45c <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c45c: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c460: d4 1e 40 00 ldd [ %i1 ], %o2 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c464: a2 10 00 1a mov %i2, %l1 Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c468: 80 92 80 0b orcc %o2, %o3, %g0 200c46c: 12 80 00 06 bne 200c484 <_Timestamp64_Divide+0x28> <== ALWAYS TAKEN 200c470: a0 10 00 1b mov %i3, %l0 *_ival_percentage = 0; 200c474: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *_fval_percentage = 0; 200c478: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200c47c: 81 c7 e0 08 ret <== NOT EXECUTED 200c480: 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; 200c484: d0 1e 00 00 ldd [ %i0 ], %o0 200c488: 83 2a 20 02 sll %o0, 2, %g1 200c48c: 89 32 60 1e srl %o1, 0x1e, %g4 200c490: 87 2a 60 02 sll %o1, 2, %g3 200c494: 84 11 00 01 or %g4, %g1, %g2 200c498: 83 30 e0 1b srl %g3, 0x1b, %g1 200c49c: 9b 28 e0 05 sll %g3, 5, %o5 200c4a0: 99 28 a0 05 sll %g2, 5, %o4 200c4a4: 86 a3 40 03 subcc %o5, %g3, %g3 200c4a8: 98 10 40 0c or %g1, %o4, %o4 200c4ac: 84 63 00 02 subx %o4, %g2, %g2 200c4b0: 92 80 c0 09 addcc %g3, %o1, %o1 200c4b4: 83 32 60 1e srl %o1, 0x1e, %g1 200c4b8: 90 40 80 08 addx %g2, %o0, %o0 200c4bc: b7 2a 60 02 sll %o1, 2, %i3 200c4c0: b5 2a 20 02 sll %o0, 2, %i2 200c4c4: b6 82 40 1b addcc %o1, %i3, %i3 200c4c8: b4 10 40 1a or %g1, %i2, %i2 200c4cc: 83 36 e0 1e srl %i3, 0x1e, %g1 200c4d0: b4 42 00 1a addx %o0, %i2, %i2 200c4d4: bb 2e e0 02 sll %i3, 2, %i5 200c4d8: b9 2e a0 02 sll %i2, 2, %i4 200c4dc: 92 86 c0 1d addcc %i3, %i5, %o1 200c4e0: b8 10 40 1c or %g1, %i4, %i4 200c4e4: 87 32 60 1b srl %o1, 0x1b, %g3 200c4e8: 90 46 80 1c addx %i2, %i4, %o0 200c4ec: 83 2a 60 05 sll %o1, 5, %g1 200c4f0: 85 2a 20 05 sll %o0, 5, %g2 200c4f4: 92 10 00 01 mov %g1, %o1 200c4f8: 40 00 36 d6 call 201a050 <__divdi3> 200c4fc: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200c500: 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; 200c504: b4 10 00 08 mov %o0, %i2 200c508: b8 10 00 09 mov %o1, %i4 *_ival_percentage = answer / 1000; 200c50c: 40 00 36 d1 call 201a050 <__divdi3> 200c510: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200c514: 90 10 00 1a mov %i2, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200c518: d2 24 40 00 st %o1, [ %l1 ] *_fval_percentage = answer % 1000; 200c51c: 94 10 20 00 clr %o2 200c520: 92 10 00 1c mov %i4, %o1 200c524: 40 00 37 b1 call 201a3e8 <__moddi3> 200c528: 96 10 23 e8 mov 0x3e8, %o3 200c52c: d2 24 00 00 st %o1, [ %l0 ] 200c530: 81 c7 e0 08 ret 200c534: 81 e8 00 00 restore =============================================================================== 0200ab00 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200ab00: 9d e3 bf a0 save %sp, -96, %sp User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 200ab04: 03 00 80 6e sethi %hi(0x201b800), %g1 200ab08: 82 10 61 4c or %g1, 0x14c, %g1 ! 201b94c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ab0c: 05 00 80 72 sethi %hi(0x201c800), %g2 initial_extensions = Configuration.User_extension_table; 200ab10: f4 00 60 44 ld [ %g1 + 0x44 ], %i2 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 200ab14: f6 00 60 40 ld [ %g1 + 0x40 ], %i3 200ab18: 82 10 a0 98 or %g2, 0x98, %g1 200ab1c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200ab20: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200ab24: c2 20 60 08 st %g1, [ %g1 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ab28: c6 20 a0 98 st %g3, [ %g2 + 0x98 ] 200ab2c: 05 00 80 71 sethi %hi(0x201c400), %g2 200ab30: 82 10 a2 b4 or %g2, 0x2b4, %g1 ! 201c6b4 <_User_extensions_Switches_list> 200ab34: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200ab38: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ab3c: c6 20 a2 b4 st %g3, [ %g2 + 0x2b4 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200ab40: 80 a6 a0 00 cmp %i2, 0 200ab44: 02 80 00 1b be 200abb0 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200ab48: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200ab4c: 83 2e e0 02 sll %i3, 2, %g1 200ab50: bb 2e e0 04 sll %i3, 4, %i5 200ab54: ba 27 40 01 sub %i5, %g1, %i5 200ab58: ba 07 40 1b add %i5, %i3, %i5 200ab5c: bb 2f 60 02 sll %i5, 2, %i5 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200ab60: 40 00 01 6c call 200b110 <_Workspace_Allocate_or_fatal_error> 200ab64: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200ab68: 94 10 00 1d mov %i5, %o2 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200ab6c: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200ab70: 92 10 20 00 clr %o1 200ab74: 40 00 12 6b call 200f520 200ab78: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200ab7c: 10 80 00 0b b 200aba8 <_User_extensions_Handler_initialization+0xa8> 200ab80: 80 a7 40 1b cmp %i5, %i3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 200ab84: 90 07 20 14 add %i4, 0x14, %o0 200ab88: 92 06 80 09 add %i2, %o1, %o1 200ab8c: 40 00 12 29 call 200f430 200ab90: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 200ab94: 90 10 00 1c mov %i4, %o0 200ab98: 40 00 0a 81 call 200d59c <_User_extensions_Add_set> 200ab9c: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200aba0: b8 07 20 34 add %i4, 0x34, %i4 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200aba4: 80 a7 40 1b cmp %i5, %i3 200aba8: 12 bf ff f7 bne 200ab84 <_User_extensions_Handler_initialization+0x84> 200abac: 93 2f 60 05 sll %i5, 5, %o1 200abb0: 81 c7 e0 08 ret 200abb4: 81 e8 00 00 restore =============================================================================== 0200c828 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c828: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c82c: 7f ff db 0f call 2003468 200c830: ba 10 00 18 mov %i0, %i5 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c834: 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 ); 200c838: 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 ) ) { 200c83c: 80 a0 40 1c cmp %g1, %i4 200c840: 02 80 00 1f be 200c8bc <_Watchdog_Adjust+0x94> 200c844: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c848: 02 80 00 1a be 200c8b0 <_Watchdog_Adjust+0x88> 200c84c: b6 10 20 01 mov 1, %i3 200c850: 80 a6 60 01 cmp %i1, 1 200c854: 12 80 00 1a bne 200c8bc <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200c858: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c85c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c860: 10 80 00 07 b 200c87c <_Watchdog_Adjust+0x54> 200c864: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200c868: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c86c: 80 a6 80 02 cmp %i2, %g2 200c870: 3a 80 00 05 bcc,a 200c884 <_Watchdog_Adjust+0x5c> 200c874: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200c878: b4 20 80 1a sub %g2, %i2, %i2 break; 200c87c: 10 80 00 10 b 200c8bc <_Watchdog_Adjust+0x94> 200c880: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200c884: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200c888: 7f ff da fc call 2003478 200c88c: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c890: 40 00 00 90 call 200cad0 <_Watchdog_Tickle> 200c894: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200c898: 7f ff da f4 call 2003468 200c89c: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200c8a0: c2 07 40 00 ld [ %i5 ], %g1 200c8a4: 80 a0 40 1c cmp %g1, %i4 200c8a8: 02 80 00 05 be 200c8bc <_Watchdog_Adjust+0x94> 200c8ac: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c8b0: 80 a6 a0 00 cmp %i2, 0 200c8b4: 32 bf ff ed bne,a 200c868 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200c8b8: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200c8bc: 7f ff da ef call 2003478 200c8c0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200af18 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200af18: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200af1c: 7f ff dd b4 call 20025ec 200af20: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 200af24: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 200af28: 80 a6 20 01 cmp %i0, 1 200af2c: 22 80 00 1d be,a 200afa0 <_Watchdog_Remove+0x88> 200af30: c0 27 60 08 clr [ %i5 + 8 ] 200af34: 0a 80 00 1c bcs 200afa4 <_Watchdog_Remove+0x8c> 200af38: 03 00 80 71 sethi %hi(0x201c400), %g1 200af3c: 80 a6 20 03 cmp %i0, 3 200af40: 18 80 00 19 bgu 200afa4 <_Watchdog_Remove+0x8c> <== NEVER TAKEN 200af44: 01 00 00 00 nop 200af48: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200af4c: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200af50: c4 00 40 00 ld [ %g1 ], %g2 200af54: 80 a0 a0 00 cmp %g2, 0 200af58: 02 80 00 07 be 200af74 <_Watchdog_Remove+0x5c> 200af5c: 05 00 80 71 sethi %hi(0x201c400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200af60: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200af64: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200af68: 84 00 c0 02 add %g3, %g2, %g2 200af6c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200af70: 05 00 80 71 sethi %hi(0x201c400), %g2 200af74: c4 00 a3 bc ld [ %g2 + 0x3bc ], %g2 ! 201c7bc <_Watchdog_Sync_count> 200af78: 80 a0 a0 00 cmp %g2, 0 200af7c: 22 80 00 07 be,a 200af98 <_Watchdog_Remove+0x80> 200af80: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200af84: 05 00 80 72 sethi %hi(0x201c800), %g2 200af88: c6 00 a0 e8 ld [ %g2 + 0xe8 ], %g3 ! 201c8e8 <_Per_CPU_Information+0x8> 200af8c: 05 00 80 71 sethi %hi(0x201c400), %g2 200af90: c6 20 a3 5c st %g3, [ %g2 + 0x35c ] ! 201c75c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200af94: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 200af98: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200af9c: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200afa0: 03 00 80 71 sethi %hi(0x201c400), %g1 200afa4: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 201c7c0 <_Watchdog_Ticks_since_boot> 200afa8: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 200afac: 7f ff dd 94 call 20025fc 200afb0: 01 00 00 00 nop return( previous_state ); } 200afb4: 81 c7 e0 08 ret 200afb8: 81 e8 00 00 restore =============================================================================== 0200c170 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c170: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c174: 7f ff db 8d call 2002fa8 200c178: ba 10 00 18 mov %i0, %i5 200c17c: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200c180: 11 00 80 71 sethi %hi(0x201c400), %o0 200c184: 94 10 00 19 mov %i1, %o2 200c188: 90 12 22 80 or %o0, 0x280, %o0 200c18c: 7f ff e3 74 call 2004f5c 200c190: 92 10 00 1d mov %i5, %o1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c194: f8 06 40 00 ld [ %i1 ], %i4 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c198: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200c19c: 80 a7 00 19 cmp %i4, %i1 200c1a0: 12 80 00 04 bne 200c1b0 <_Watchdog_Report_chain+0x40> 200c1a4: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200c1a8: 10 80 00 0d b 200c1dc <_Watchdog_Report_chain+0x6c> 200c1ac: 11 00 80 71 sethi %hi(0x201c400), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c1b0: 40 00 00 0f call 200c1ec <_Watchdog_Report> 200c1b4: 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 ) 200c1b8: f8 07 00 00 ld [ %i4 ], %i4 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 200c1bc: 80 a7 00 19 cmp %i4, %i1 200c1c0: 12 bf ff fc bne 200c1b0 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200c1c4: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c1c8: 11 00 80 71 sethi %hi(0x201c400), %o0 200c1cc: 92 10 00 1d mov %i5, %o1 200c1d0: 7f ff e3 63 call 2004f5c 200c1d4: 90 12 22 98 or %o0, 0x298, %o0 200c1d8: 30 80 00 03 b,a 200c1e4 <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200c1dc: 7f ff e3 60 call 2004f5c 200c1e0: 90 12 22 a8 or %o0, 0x2a8, %o0 } _ISR_Enable( level ); 200c1e4: 7f ff db 75 call 2002fb8 200c1e8: 81 e8 00 00 restore =============================================================================== 0200aeb0 <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { 200aeb0: 9d e3 bf a0 save %sp, -96, %sp char *dup = _Workspace_Allocate(len + 1); 200aeb4: 7f ff ff e3 call 200ae40 <_Workspace_Allocate> 200aeb8: 90 06 60 01 add %i1, 1, %o0 if (dup != NULL) { 200aebc: ba 92 20 00 orcc %o0, 0, %i5 200aec0: 02 80 00 05 be 200aed4 <_Workspace_String_duplicate+0x24> <== NEVER TAKEN 200aec4: 92 10 00 18 mov %i0, %o1 dup [len] = '\0'; 200aec8: c0 2f 40 19 clrb [ %i5 + %i1 ] memcpy(dup, string, len); 200aecc: 40 00 11 43 call 200f3d8 200aed0: 94 10 00 19 mov %i1, %o2 } return dup; } 200aed4: 81 c7 e0 08 ret 200aed8: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 020192c8 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 20192c8: 81 c3 e0 08 retl <== NOT EXECUTED 20192cc: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02025c60 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2025c60: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2025c64: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2025c68: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2025c6c: 10 80 00 18 b 2025ccc <_fat_block_read+0x6c> 2025c70: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2025c74: 92 10 00 19 mov %i1, %o1 2025c78: 94 10 20 01 mov 1, %o2 2025c7c: 7f ff ff 22 call 2025904 2025c80: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025c84: 80 a2 20 00 cmp %o0, 0 2025c88: 12 80 00 16 bne 2025ce0 <_fat_block_read+0x80> <== NEVER TAKEN 2025c8c: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2025c90: e0 17 40 00 lduh [ %i5 ], %l0 2025c94: a0 24 00 1a sub %l0, %i2, %l0 2025c98: 80 a4 00 1b cmp %l0, %i3 2025c9c: 38 80 00 02 bgu,a 2025ca4 <_fat_block_read+0x44> 2025ca0: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2025ca4: c2 07 bf fc ld [ %fp + -4 ], %g1 2025ca8: 90 07 00 18 add %i4, %i0, %o0 2025cac: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2025cb0: 94 10 00 10 mov %l0, %o2 2025cb4: 92 02 40 1a add %o1, %i2, %o1 2025cb8: 40 00 79 b3 call 2044384 2025cbc: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2025cc0: b0 04 00 18 add %l0, %i0, %i0 blk++; 2025cc4: b2 06 60 01 inc %i1 ofs = 0; 2025cc8: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2025ccc: 80 a6 e0 00 cmp %i3, 0 2025cd0: 12 bf ff e9 bne 2025c74 <_fat_block_read+0x14> 2025cd4: 90 10 00 1d mov %i5, %o0 2025cd8: 81 c7 e0 08 ret 2025cdc: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2025ce0: 81 c7 e0 08 ret <== NOT EXECUTED 2025ce4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02025d80 <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2025d80: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 2025d84: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2025d88: 7f ff ff 5d call 2025afc <== NOT EXECUTED 2025d8c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02025ce8 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2025ce8: 9d e3 bf 98 save %sp, -104, %sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2025cec: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2025cf0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2025cf4: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2025cf8: 10 80 00 1b b 2025d64 <_fat_block_write+0x7c> 2025cfc: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2025d00: a0 20 40 1a sub %g1, %i2, %l0 2025d04: 80 a4 00 1b cmp %l0, %i3 2025d08: 38 80 00 02 bgu,a 2025d10 <_fat_block_write+0x28> 2025d0c: a0 10 00 1b mov %i3, %l0 if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2025d10: 90 10 00 1d mov %i5, %o0 2025d14: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2025d18: 80 a4 00 01 cmp %l0, %g1 2025d1c: 02 80 00 03 be 2025d28 <_fat_block_write+0x40> 2025d20: 94 10 20 02 mov 2, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2025d24: 94 10 20 01 mov 1, %o2 2025d28: 7f ff fe f7 call 2025904 2025d2c: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025d30: 80 a2 20 00 cmp %o0, 0 2025d34: 12 80 00 11 bne 2025d78 <_fat_block_write+0x90> <== NEVER TAKEN 2025d38: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2025d3c: 92 07 00 18 add %i4, %i0, %o1 2025d40: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2025d44: 94 10 00 10 mov %l0, %o2 2025d48: 90 02 00 1a add %o0, %i2, %o0 2025d4c: 40 00 79 8e call 2044384 2025d50: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2025d54: b0 04 00 18 add %l0, %i0, %i0 2025d58: e2 2f 60 7c stb %l1, [ %i5 + 0x7c ] blk++; 2025d5c: b2 06 60 01 inc %i1 ofs = 0; 2025d60: b4 10 20 00 clr %i2 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2025d64: 80 a6 e0 00 cmp %i3, 0 2025d68: 32 bf ff e6 bne,a 2025d00 <_fat_block_write+0x18> 2025d6c: c2 17 40 00 lduh [ %i5 ], %g1 2025d70: 81 c7 e0 08 ret 2025d74: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2025d78: 81 c7 e0 08 ret <== NOT EXECUTED 2025d7c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02003860 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 2003860: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003864: 7f ff ff d5 call 20037b8 <== NOT EXECUTED 2003868: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02024c28 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2024c28: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2024c2c: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2024c30: 87 28 a0 02 sll %g2, 2, %g3 2024c34: 83 28 a0 04 sll %g2, 4, %g1 2024c38: 82 20 40 03 sub %g1, %g3, %g1 2024c3c: 84 06 40 01 add %i1, %g1, %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2024c40: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2024c44: 10 80 00 11 b 2024c88 <_hash_search+0x60> 2024c48: b2 00 a0 04 add %g2, 4, %i1 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); 2024c4c: 7f ff ff e5 call 2024be0 2024c50: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2024c54: 80 a6 80 08 cmp %i2, %o0 2024c58: 32 80 00 0c bne,a 2024c88 <_hash_search+0x60> 2024c5c: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2024c60: 80 a6 e0 00 cmp %i3, 0 2024c64: 22 80 00 07 be,a 2024c80 <_hash_search+0x58> <== ALWAYS TAKEN 2024c68: fa 27 00 00 st %i5, [ %i4 ] 2024c6c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2024c70: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2024c74: 32 80 00 05 bne,a 2024c88 <_hash_search+0x60> <== NOT EXECUTED 2024c78: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2024c7c: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2024c80: 81 c7 e0 08 ret 2024c84: 91 e8 20 00 restore %g0, 0, %o0 ) { 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) ; ) 2024c88: 80 a7 40 19 cmp %i5, %i1 2024c8c: 12 bf ff f0 bne 2024c4c <_hash_search+0x24> 2024c90: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2024c94: 81 c7 e0 08 ret 2024c98: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 020284a4 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 20284a4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20284a8: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20284ac: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20284b0: 7f ff ff e9 call 2028454 <== NOT EXECUTED 20284b4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004754 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2004754: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2004758: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 200475c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2004760: 7f ff ff e9 call 2004704 <== NOT EXECUTED 2004764: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020272e8 : #include #include int chroot( const char *path ) { 20272e8: 9d e3 bf 40 save %sp, -192, %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( 20272ec: 94 10 20 19 mov 0x19, %o2 20272f0: 92 10 00 18 mov %i0, %o1 20272f4: 90 07 bf a4 add %fp, -92, %o0 20272f8: 17 00 81 a6 sethi %hi(0x2069800), %o3 20272fc: 96 12 e2 cc or %o3, 0x2cc, %o3 ! 2069acc 2027300: 7f ff 8b aa call 200a1a8 2027304: 98 02 ff fc add %o3, -4, %o4 2027308: 90 07 bf e0 add %fp, -32, %o0 202730c: 7f ff 8c 7e call 200a504 2027310: 92 07 bf bc add %fp, -68, %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 ); 2027314: 7f ff 8c f4 call 200a6e4 2027318: 90 07 bf e0 add %fp, -32, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 202731c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 &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 ); 2027320: d0 27 bf fc st %o0, [ %fp + -4 ] if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 2027324: 3b 00 81 78 sethi %hi(0x205e000), %i5 2027328: ba 17 62 74 or %i5, 0x274, %i5 ! 205e274 202732c: 80 a0 40 1d cmp %g1, %i5 2027330: 02 80 00 2a be 20273d8 2027334: b0 10 3f ff mov -1, %i0 rtems_filesystem_global_location_t *new_root_loc = 2027338: 7f ff 8c b8 call 200a618 202733c: 90 07 bf fc add %fp, -4, %o0 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); 2027340: c2 02 20 14 ld [ %o0 + 0x14 ], %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 = 2027344: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2027348: 9f c0 40 00 call %g1 202734c: b0 10 00 08 mov %o0, %i0 (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 2027350: 80 a2 20 00 cmp %o0, 0 2027354: 32 80 00 17 bne,a 20273b0 2027358: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 sc = rtems_libio_set_private_env(); 202735c: 40 00 05 67 call 20288f8 2027360: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 2027364: 80 a2 20 00 cmp %o0, 0 2027368: 12 80 00 0c bne 2027398 202736c: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( 2027370: 3b 00 81 a6 sethi %hi(0x2069800), %i5 2027374: d0 07 62 c4 ld [ %i5 + 0x2c4 ], %o0 ! 2069ac4 2027378: 92 10 00 18 mov %i0, %o1 202737c: 7f ff 8c 9e call 200a5f4 2027380: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 2027384: d0 07 62 c4 ld [ %i5 + 0x2c4 ], %o0 2027388: d2 07 bf fc ld [ %fp + -4 ], %o1 202738c: 7f ff 8c 9a call 200a5f4 2027390: b0 10 20 00 clr %i0 2027394: 30 80 00 11 b,a 20273d8 &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 2027398: 22 80 00 0e be,a 20273d0 <== NEVER TAKEN 202739c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED errno = ENOMEM; 20273a0: 40 00 66 b8 call 2040e80 <__errno> 20273a4: 01 00 00 00 nop 20273a8: 10 80 00 08 b 20273c8 20273ac: 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 ) ) { 20273b0: 80 a0 40 1d cmp %g1, %i5 20273b4: 22 80 00 07 be,a 20273d0 <== NEVER TAKEN 20273b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED errno = eno; 20273bc: 40 00 66 b1 call 2040e80 <__errno> 20273c0: 01 00 00 00 nop 20273c4: 82 10 20 14 mov 0x14, %g1 ! 14 20273c8: c2 22 00 00 st %g1, [ %o0 ] rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 20273cc: 90 10 00 18 mov %i0, %o0 20273d0: 7f ff 8c 72 call 200a598 20273d4: b0 10 3f ff mov -1, %i0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 20273d8: 7f ff 8b 97 call 200a234 20273dc: 90 07 bf a4 add %fp, -92, %o0 if ( rv != 0 ) { 20273e0: 80 a6 20 00 cmp %i0, 0 20273e4: 02 80 00 04 be 20273f4 20273e8: 01 00 00 00 nop rtems_filesystem_global_location_release( new_current_loc ); 20273ec: 7f ff 8c 6b call 200a598 20273f0: d0 07 bf fc ld [ %fp + -4 ], %o0 } return rv; } 20273f4: 81 c7 e0 08 ret 20273f8: 81 e8 00 00 restore =============================================================================== 02003750 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2003750: 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) { 2003754: 03 00 80 7f sethi %hi(0x201fc00), %g1 2003758: e2 00 62 48 ld [ %g1 + 0x248 ], %l1 ! 201fe48 200375c: 80 a6 00 11 cmp %i0, %l1 2003760: 0a 80 00 18 bcs 20037c0 2003764: ba 10 00 18 mov %i0, %i5 rtems_disk_device_table *table = disktab; 2003768: 03 00 80 7f sethi %hi(0x201fc00), %g1 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 200376c: b9 2c 60 01 sll %l1, 1, %i4 if (major >= new_size) { 2003770: 80 a6 00 1c cmp %i0, %i4 2003774: 0a 80 00 03 bcs 2003780 <== NEVER TAKEN 2003778: d0 00 62 4c ld [ %g1 + 0x24c ], %o0 new_size = major + 1; 200377c: b8 06 20 01 add %i0, 1, %i4 } table = realloc(table, new_size * sizeof(*table)); 2003780: 93 2f 20 03 sll %i4, 3, %o1 2003784: 40 00 08 d3 call 2005ad0 2003788: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 200378c: 80 a2 20 00 cmp %o0, 0 2003790: 02 80 00 46 be 20038a8 <== ALWAYS TAKEN 2003794: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003798: 94 27 00 11 sub %i4, %l1, %o2 <== NOT EXECUTED 200379c: 91 2c 60 03 sll %l1, 3, %o0 <== NOT EXECUTED 20037a0: 92 10 20 00 clr %o1 <== NOT EXECUTED 20037a4: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED 20037a8: 40 00 3e 86 call 20131c0 <== NOT EXECUTED 20037ac: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 20037b0: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED 20037b4: e0 20 62 4c st %l0, [ %g1 + 0x24c ] ! 201fe4c <== NOT EXECUTED disktab_size = new_size; 20037b8: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED 20037bc: f8 20 62 48 st %i4, [ %g1 + 0x248 ] ! 201fe48 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20037c0: 03 00 80 7f sethi %hi(0x201fc00), %g1 20037c4: e4 00 62 4c ld [ %g1 + 0x24c ], %l2 ! 201fe4c 20037c8: a3 2f 60 03 sll %i5, 3, %l1 20037cc: d0 04 80 11 ld [ %l2 + %l1 ], %o0 20037d0: a6 04 80 11 add %l2, %l1, %l3 20037d4: 80 a2 20 00 cmp %o0, 0 20037d8: 02 80 00 05 be 20037ec 20037dc: e8 04 e0 04 ld [ %l3 + 4 ], %l4 20037e0: 80 a6 40 14 cmp %i1, %l4 20037e4: 2a 80 00 18 bcs,a 2003844 20037e8: 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) { 20037ec: 80 a5 20 00 cmp %l4, 0 20037f0: 02 80 00 03 be 20037fc 20037f4: b8 10 20 08 mov 8, %i4 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 20037f8: b9 2d 20 01 sll %l4, 1, %i4 } if (minor >= new_size) { 20037fc: 80 a6 40 1c cmp %i1, %i4 2003800: 3a 80 00 02 bcc,a 2003808 2003804: b8 06 60 01 add %i1, 1, %i4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 2003808: 93 2f 20 02 sll %i4, 2, %o1 200380c: 40 00 08 b1 call 2005ad0 2003810: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2003814: 80 a2 20 00 cmp %o0, 0 2003818: 02 80 00 24 be 20038a8 200381c: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003820: 94 27 00 14 sub %i4, %l4, %o2 2003824: 91 2d 20 02 sll %l4, 2, %o0 2003828: 92 10 20 00 clr %o1 200382c: 90 04 00 08 add %l0, %o0, %o0 2003830: 40 00 3e 64 call 20131c0 2003834: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2003838: e0 24 80 11 st %l0, [ %l2 + %l1 ] disktab [major].size = new_size; 200383c: f8 24 e0 04 st %i4, [ %l3 + 4 ] } return disktab [major].minor + minor; 2003840: e2 04 80 11 ld [ %l2 + %l1 ], %l1 2003844: a1 2e 60 02 sll %i1, 2, %l0 2003848: 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) { 200384c: 80 a0 60 00 cmp %g1, 0 2003850: 02 80 00 16 be 20038a8 <== NEVER TAKEN 2003854: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 2003858: c2 04 40 10 ld [ %l1 + %l0 ], %g1 200385c: 80 a0 60 00 cmp %g1, 0 2003860: 12 80 00 12 bne 20038a8 2003864: b0 10 20 0c mov 0xc, %i0 return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 2003868: 90 10 20 38 mov 0x38, %o0 200386c: 40 00 05 d1 call 2004fb0 2003870: b0 10 20 1a mov 0x1a, %i0 if (dd == NULL) { 2003874: 80 a2 20 00 cmp %o0, 0 2003878: 02 80 00 0c be 20038a8 <== NEVER TAKEN 200387c: b8 10 00 08 mov %o0, %i4 return RTEMS_NO_MEMORY; } if (name != NULL) { 2003880: 80 a6 a0 00 cmp %i2, 0 2003884: 02 80 00 12 be 20038cc 2003888: a4 10 20 00 clr %l2 alloc_name = strdup(name); 200388c: 40 00 3f ad call 2013740 2003890: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2003894: a4 92 20 00 orcc %o0, 0, %l2 2003898: 12 80 00 17 bne 20038f4 <== ALWAYS TAKEN 200389c: b4 10 00 08 mov %o0, %i2 free(dd); 20038a0: 40 00 04 4c call 20049d0 <== NOT EXECUTED 20038a4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; 20038a8: 81 c7 e0 08 ret 20038ac: 81 e8 00 00 restore } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 20038b0: 40 00 04 48 call 20049d0 <== NOT EXECUTED 20038b4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED free(dd); 20038b8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 20038bc: 40 00 04 45 call 20049d0 <== NOT EXECUTED 20038c0: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 20038c4: 81 c7 e0 08 ret <== NOT EXECUTED 20038c8: 81 e8 00 00 restore <== NOT EXECUTED } } dd->dev = dev; 20038cc: fa 27 00 00 st %i5, [ %i4 ] 20038d0: f2 27 20 04 st %i1, [ %i4 + 4 ] dd->name = alloc_name; 20038d4: e4 27 20 10 st %l2, [ %i4 + 0x10 ] dd->uses = 0; 20038d8: c0 27 20 14 clr [ %i4 + 0x14 ] dd->deleted = false; 20038dc: c0 2f 20 30 clrb [ %i4 + 0x30 ] *dd_entry = dd; 20038e0: f8 24 40 10 st %i4, [ %l1 + %l0 ] *dd_ptr = dd; 20038e4: f8 26 c0 00 st %i4, [ %i3 ] return RTEMS_SUCCESSFUL; 20038e8: b0 10 20 00 clr %i0 } 20038ec: 81 c7 e0 08 ret 20038f0: 81 e8 00 00 restore return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 20038f4: 13 00 00 18 sethi %hi(0x6000), %o1 20038f8: 94 10 00 1d mov %i5, %o2 20038fc: 92 12 61 ff or %o1, 0x1ff, %o1 2003900: 40 00 06 1b call 200516c 2003904: 96 10 00 19 mov %i1, %o3 2003908: 80 a2 20 00 cmp %o0, 0 200390c: 36 bf ff f1 bge,a 20038d0 <== ALWAYS TAKEN 2003910: fa 27 00 00 st %i5, [ %i4 ] 2003914: 30 bf ff e7 b,a 20038b0 <== NOT EXECUTED =============================================================================== 02004a94 : * 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) 2004a94: 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) 2004a98: 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) 2004a9c: ba 10 00 18 mov %i0, %i5 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 2004aa0: c0 26 40 00 clr [ %i1 ] if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004aa4: 92 10 20 28 mov 0x28, %o1 2004aa8: 40 00 03 1e call 2005720 2004aac: b0 10 20 1a mov 0x1a, %i0 2004ab0: 80 a2 20 00 cmp %o0, 0 2004ab4: 02 80 00 2d be 2004b68 <== NEVER TAKEN 2004ab8: b8 10 00 08 mov %o0, %i4 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004abc: c2 0f 40 00 ldub [ %i5 ], %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)); 2004ac0: 92 07 60 08 add %i5, 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); 2004ac4: c2 2a 00 00 stb %g1, [ %o0 ] part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004ac8: f6 0f 60 04 ldub [ %i5 + 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)); 2004acc: 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); 2004ad0: 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)); 2004ad4: 40 00 3e ca call 20145fc 2004ad8: 90 07 bf fc add %fp, -4, %o0 part_desc->start = LE_TO_CPU_U32(temp); 2004adc: 7f ff ff a2 call 2004964 2004ae0: d0 07 bf fc ld [ %fp + -4 ], %o0 memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004ae4: 92 07 60 0c add %i5, 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); 2004ae8: d0 27 20 04 st %o0, [ %i4 + 4 ] memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004aec: 94 10 20 04 mov 4, %o2 2004af0: 40 00 3e c3 call 20145fc 2004af4: 90 07 bf fc add %fp, -4, %o0 part_desc->size = LE_TO_CPU_U32(temp); 2004af8: 7f ff ff 9b call 2004964 2004afc: d0 07 bf fc ld [ %fp + -4 ], %o0 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004b00: 82 1e e0 85 xor %i3, 0x85, %g1 2004b04: 80 a0 00 01 cmp %g0, %g1 /* 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); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); 2004b08: d0 27 20 08 st %o0, [ %i4 + 8 ] * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004b0c: 84 60 3f ff subx %g0, -1, %g2 2004b10: 82 1e e0 05 xor %i3, 5, %g1 2004b14: 80 a0 00 01 cmp %g0, %g1 /* 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); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); 2004b18: ba 10 00 08 mov %o0, %i5 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004b1c: 82 60 3f ff subx %g0, -1, %g1 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004b20: 80 90 80 01 orcc %g2, %g1, %g0 2004b24: 12 80 00 0b bne 2004b50 2004b28: 92 10 00 1b mov %i3, %o1 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 2004b2c: 11 00 80 8b sethi %hi(0x2022c00), %o0 2004b30: 94 10 20 06 mov 6, %o2 2004b34: 40 00 3e 3f call 2014430 2004b38: 90 12 22 78 or %o0, 0x278, %o0 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004b3c: 80 a2 20 00 cmp %o0, 0 2004b40: 02 80 00 07 be 2004b5c 2004b44: 80 a7 60 00 cmp %i5, 0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 2004b48: 02 80 00 06 be 2004b60 <== NEVER TAKEN 2004b4c: 90 10 00 1c mov %i4, %o0 *new_part_desc = part_desc; 2004b50: f8 26 40 00 st %i4, [ %i1 ] } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; 2004b54: 81 c7 e0 08 ret 2004b58: 91 e8 20 00 restore %g0, 0, %o0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); 2004b5c: 90 10 00 1c mov %i4, %o0 2004b60: 40 00 03 c0 call 2005a60 2004b64: b0 10 20 00 clr %i0 } return RTEMS_SUCCESSFUL; } 2004b68: 81 c7 e0 08 ret 2004b6c: 81 e8 00 00 restore =============================================================================== 02002b9c : #endif #include "devfs.h" void devFS_Show(void) { 2002b9c: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002ba0: 03 00 80 65 sethi %hi(0x2019400), %g1 2002ba4: c2 00 60 80 ld [ %g1 + 0x80 ], %g1 ! 2019480 if (rootloc->ops == &devFS_ops) { 2002ba8: 05 00 80 5e sethi %hi(0x2017800), %g2 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002bac: c2 00 60 04 ld [ %g1 + 4 ], %g1 if (rootloc->ops == &devFS_ops) { 2002bb0: 84 10 a2 64 or %g2, 0x264, %g2 2002bb4: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 2002bb8: 80 a0 c0 02 cmp %g3, %g2 2002bbc: 12 80 00 26 bne 2002c54 <== NEVER TAKEN 2002bc0: 33 00 80 5e sethi %hi(0x2017800), %i1 static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->immutable_fs_info; 2002bc4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2002bc8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002bcc: 35 00 80 5e sethi %hi(0x2017800), %i2 } printk( 2002bd0: 37 00 80 5e sethi %hi(0x2017800), %i3 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 2002bd4: f0 00 60 04 ld [ %g1 + 4 ], %i0 2002bd8: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002bdc: b8 10 20 00 clr %i4 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002be0: b2 16 62 b8 or %i1, 0x2b8, %i1 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002be4: b4 16 a2 c0 or %i2, 0x2c0, %i2 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) { 2002be8: 10 80 00 18 b 2002c48 2002bec: b6 16 e2 c8 or %i3, 0x2c8, %i3 devFS_node *current = nodes + i; if (current->name != NULL) { 2002bf0: 80 a0 60 00 cmp %g1, 0 2002bf4: 22 80 00 14 be,a 2002c44 2002bf8: b8 07 20 01 inc %i4 size_t j = 0; size_t m = current->namelen; 2002bfc: e2 07 60 04 ld [ %i5 + 4 ], %l1 printk("/"); 2002c00: 90 10 00 19 mov %i1, %o0 2002c04: 40 00 04 d4 call 2003f54 2002c08: a0 10 20 00 clr %l0 for (j = 0; j < m; ++j) { 2002c0c: 10 80 00 07 b 2002c28 2002c10: 80 a4 00 11 cmp %l0, %l1 printk("%c", current->name [j]); 2002c14: 90 10 00 1a mov %i2, %o0 2002c18: d2 48 40 10 ldsb [ %g1 + %l0 ], %o1 2002c1c: 40 00 04 ce call 2003f54 2002c20: a0 04 20 01 inc %l0 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 2002c24: 80 a4 00 11 cmp %l0, %l1 2002c28: 32 bf ff fb bne,a 2002c14 2002c2c: c2 07 40 00 ld [ %i5 ], %g1 printk("%c", current->name [j]); } printk( 2002c30: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002c34: d4 07 60 0c ld [ %i5 + 0xc ], %o2 2002c38: 40 00 04 c7 call 2003f54 2002c3c: 90 10 00 1b mov %i3, %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) { 2002c40: b8 07 20 01 inc %i4 2002c44: ba 07 60 14 add %i5, 0x14, %i5 2002c48: 80 a7 00 18 cmp %i4, %i0 2002c4c: 32 bf ff e9 bne,a 2002bf0 2002c50: c2 07 40 00 ld [ %i5 ], %g1 2002c54: 81 c7 e0 08 ret 2002c58: 81 e8 00 00 restore =============================================================================== 0200b968 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200b968: 9d e3 bf a0 save %sp, -96, %sp static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->immutable_fs_info; 200b96c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 static inline const char *rtems_filesystem_eval_path_get_path( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->path; 200b970: f2 06 00 00 ld [ %i0 ], %i1 200b974: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 static inline size_t rtems_filesystem_eval_path_get_pathlen( rtems_filesystem_eval_path_context_t *ctx ) { return ctx->pathlen; 200b978: 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; 200b97c: e2 00 60 04 ld [ %g1 + 4 ], %l1 200b980: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200b984: b8 10 20 00 clr %i4 devFS_node *free_node = NULL; 200b988: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200b98c: 10 80 00 12 b 200b9d4 200b990: b4 10 20 00 clr %i2 devFS_node *current = nodes + i; if (current->name != NULL) { 200b994: 80 a2 20 00 cmp %o0, 0 200b998: 02 80 00 0c be 200b9c8 200b99c: a0 10 00 1d mov %i5, %l0 if ( 200b9a0: c4 07 60 04 ld [ %i5 + 4 ], %g2 200b9a4: 80 a0 80 1b cmp %g2, %i3 200b9a8: 12 80 00 08 bne 200b9c8 200b9ac: a0 10 00 01 mov %g1, %l0 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200b9b0: 92 10 00 19 mov %i1, %o1 200b9b4: 40 00 0b 21 call 200e638 200b9b8: 94 10 00 1b mov %i3, %o2 200b9bc: 80 a2 20 00 cmp %o0, 0 200b9c0: 22 80 00 02 be,a 200b9c8 200b9c4: 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) { 200b9c8: b4 06 a0 01 inc %i2 200b9cc: ba 07 60 14 add %i5, 0x14, %i5 200b9d0: 82 10 00 10 mov %l0, %g1 200b9d4: 80 a7 20 00 cmp %i4, 0 200b9d8: 02 80 00 05 be 200b9ec 200b9dc: 80 a6 80 11 cmp %i2, %l1 200b9e0: 80 a0 60 00 cmp %g1, 0 200b9e4: 12 80 00 04 bne 200b9f4 200b9e8: 80 a6 80 11 cmp %i2, %l1 200b9ec: 32 bf ff ea bne,a 200b994 200b9f0: 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) { 200b9f4: 80 a7 20 00 cmp %i4, 0 200b9f8: 02 80 00 07 be 200ba14 200b9fc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200ba00: 80 88 a0 40 btst 0x40, %g2 200ba04: 32 80 00 13 bne,a 200ba50 200ba08: b2 10 20 11 mov 0x11, %i1 currentloc->node_access = node; 200ba0c: 10 80 00 0b b 200ba38 200ba10: 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) { 200ba14: 80 88 a0 20 btst 0x20, %g2 200ba18: 02 80 00 0d be 200ba4c <== NEVER TAKEN 200ba1c: 80 a0 60 00 cmp %g1, 0 if (free_node != NULL) { 200ba20: 02 80 00 09 be 200ba44 200ba24: 84 10 21 ff mov 0x1ff, %g2 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200ba28: c4 20 60 10 st %g2, [ %g1 + 0x10 ] currentloc->node_access = free_node; 200ba2c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200ba30: f2 26 20 08 st %i1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200ba34: 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; 200ba38: c0 26 20 04 clr [ %i0 + 4 ] 200ba3c: 81 c7 e0 08 ret 200ba40: 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); 200ba44: 10 80 00 03 b 200ba50 200ba48: b2 10 20 1c mov 0x1c, %i1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200ba4c: b2 10 20 02 mov 2, %i1 <== NOT EXECUTED 200ba50: 7f ff e4 d9 call 2004db4 200ba54: 81 e8 00 00 restore =============================================================================== 02003710 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003710: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 2003714: 80 a6 a0 03 cmp %i2, 3 2003718: 12 80 00 0e bne 2003750 200371c: 03 00 00 3c sethi %hi(0xf000), %g1 2003720: c2 4e 40 00 ldsb [ %i1 ], %g1 2003724: 80 a0 60 64 cmp %g1, 0x64 2003728: 12 80 00 0a bne 2003750 <== NEVER TAKEN 200372c: 03 00 00 3c sethi %hi(0xf000), %g1 2003730: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1 2003734: 80 a0 60 65 cmp %g1, 0x65 2003738: 12 80 00 06 bne 2003750 <== NEVER TAKEN 200373c: 03 00 00 3c sethi %hi(0xf000), %g1 2003740: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1 2003744: 80 a0 60 76 cmp %g1, 0x76 2003748: 02 80 00 24 be 20037d8 <== ALWAYS TAKEN 200374c: 03 00 00 3c sethi %hi(0xf000), %g1 if (S_ISBLK(mode) || S_ISCHR(mode)) { 2003750: 05 00 00 08 sethi %hi(0x2000), %g2 2003754: 82 0e c0 01 and %i3, %g1, %g1 2003758: 80 a0 40 02 cmp %g1, %g2 200375c: 02 80 00 05 be 2003770 2003760: 05 00 00 18 sethi %hi(0x6000), %g2 2003764: 80 a0 40 02 cmp %g1, %g2 2003768: 12 80 00 16 bne 20037c0 200376c: 01 00 00 00 nop char *dupname = malloc(namelen); 2003770: 40 00 02 29 call 2004014 2003774: 90 10 00 1a mov %i2, %o0 if (dupname != NULL) { 2003778: 84 92 20 00 orcc %o0, 0, %g2 200377c: 02 80 00 0d be 20037b0 2003780: 92 10 00 19 mov %i1, %o1 devFS_node *node = parentloc->node_access; 2003784: c2 06 20 08 ld [ %i0 + 8 ], %g1 node->name = dupname; 2003788: c4 20 40 00 st %g2, [ %g1 ] node->namelen = namelen; 200378c: f4 20 60 04 st %i2, [ %g1 + 4 ] node->major = rtems_filesystem_dev_major_t(dev); 2003790: f8 20 60 08 st %i4, [ %g1 + 8 ] node->minor = rtems_filesystem_dev_minor_t(dev); 2003794: fa 20 60 0c st %i5, [ %g1 + 0xc ] node->mode = mode; 2003798: f6 20 60 10 st %i3, [ %g1 + 0x10 ] memcpy(dupname, name, namelen); 200379c: 94 10 00 1a mov %i2, %o2 20037a0: 40 00 2b d4 call 200e6f0 20037a4: b0 10 20 00 clr %i0 20037a8: 81 c7 e0 08 ret 20037ac: 81 e8 00 00 restore } else { errno = ENOMEM; 20037b0: 40 00 27 b7 call 200d68c <__errno> 20037b4: 01 00 00 00 nop 20037b8: 10 80 00 05 b 20037cc 20037bc: 82 10 20 0c mov 0xc, %g1 ! c rv = -1; } } else { errno = ENOTSUP; 20037c0: 40 00 27 b3 call 200d68c <__errno> 20037c4: 01 00 00 00 nop 20037c8: 82 10 20 86 mov 0x86, %g1 ! 86 20037cc: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 20037d0: 81 c7 e0 08 ret 20037d4: 91 e8 3f ff restore %g0, -1, %o0 } } else { if (!S_ISDIR(mode)) { 20037d8: b6 0e c0 01 and %i3, %g1, %i3 20037dc: 03 00 00 10 sethi %hi(0x4000), %g1 20037e0: 80 a6 c0 01 cmp %i3, %g1 20037e4: 02 bf ff f1 be 20037a8 <== ALWAYS TAKEN 20037e8: b0 10 20 00 clr %i0 errno = ENOTSUP; 20037ec: 40 00 27 a8 call 200d68c <__errno> <== NOT EXECUTED 20037f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20037f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20037f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } } return rv; } 20037fc: 81 c7 e0 08 ret <== NOT EXECUTED 2003800: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020036e0 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 20036e0: 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); 20036e4: 03 00 80 7f sethi %hi(0x201fc00), %g1 20036e8: d0 00 62 44 ld [ %g1 + 0x244 ], %o0 ! 201fe44 20036ec: 92 10 20 00 clr %o1 20036f0: 94 10 20 00 clr %o2 20036f4: 40 00 15 98 call 2008d54 20036f8: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 20036fc: 80 a2 20 00 cmp %o0, 0 2003700: 12 80 00 05 bne 2003714 <== NEVER TAKEN 2003704: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 2003708: 03 00 80 7f sethi %hi(0x201fc00), %g1 return RTEMS_SUCCESSFUL; 200370c: 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; 2003710: c4 28 62 40 stb %g2, [ %g1 + 0x240 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 2003714: 81 c7 e0 08 ret 2003718: 81 e8 00 00 restore =============================================================================== 0200371c : static void disk_unlock(void) { 200371c: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 2003720: 03 00 80 7f sethi %hi(0x201fc00), %g1 2003724: c0 28 62 40 clrb [ %g1 + 0x240 ] ! 201fe40 sc = rtems_semaphore_release(diskdevs_mutex); 2003728: 03 00 80 7f sethi %hi(0x201fc00), %g1 200372c: 40 00 15 d4 call 2008e7c 2003730: d0 00 62 44 ld [ %g1 + 0x244 ], %o0 ! 201fe44 if (sc != RTEMS_SUCCESSFUL) { 2003734: 80 a2 20 00 cmp %o0, 0 2003738: 02 80 00 04 be 2003748 <== ALWAYS TAKEN 200373c: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2003740: 40 00 17 2f call 20093fc <== NOT EXECUTED 2003744: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED 2003748: 81 c7 e0 08 ret 200374c: 81 e8 00 00 restore =============================================================================== 020052f0 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 20052f0: 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); 20052f4: 7f ff f4 be call 20025ec 20052f8: ba 10 00 18 mov %i0, %i5 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 20052fc: 10 80 00 0f b 2005338 2005300: b8 10 20 02 mov 2, %i4 rtems_interrupt_enable (level); 2005304: 7f ff f4 be call 20025fc <== NOT EXECUTED 2005308: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 200530c: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED 2005310: 92 10 20 00 clr %o1 <== NOT EXECUTED 2005314: 40 00 09 59 call 2007878 <== NOT EXECUTED 2005318: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 200531c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005320: 02 80 00 04 be 2005330 <== NOT EXECUTED 2005324: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2005328: 40 00 0b 16 call 2007f80 <== NOT EXECUTED 200532c: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 2005330: 7f ff f4 af call 20025ec <== NOT EXECUTED 2005334: 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) { 2005338: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 200533c: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2005340: 80 a0 80 01 cmp %g2, %g1 2005344: 32 bf ff f0 bne,a 2005304 <== NEVER TAKEN 2005348: f8 27 60 94 st %i4, [ %i5 + 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); 200534c: 7f ff f4 ac call 20025fc 2005350: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003ba4 : int dup2( int fildes, int fildes2 ) { 2003ba4: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003ba8: 90 10 00 18 mov %i0, %o0 int dup2( int fildes, int fildes2 ) { 2003bac: ba 10 00 18 mov %i0, %i5 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003bb0: 92 07 bf b8 add %fp, -72, %o1 2003bb4: 40 00 01 dd call 2004328 2003bb8: b0 10 3f ff mov -1, %i0 if ( status == -1 ) 2003bbc: 80 a2 3f ff cmp %o0, -1 2003bc0: 02 80 00 0b be 2003bec 2003bc4: 90 10 00 19 mov %i1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003bc8: 40 00 01 d8 call 2004328 2003bcc: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003bd0: 80 a2 3f ff cmp %o0, -1 2003bd4: 02 80 00 06 be 2003bec <== NEVER TAKEN 2003bd8: 90 10 00 1d mov %i5, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2003bdc: 92 10 20 00 clr %o1 2003be0: 40 00 00 ab call 2003e8c 2003be4: 94 10 00 19 mov %i1, %o2 2003be8: b0 10 00 08 mov %o0, %i0 } 2003bec: 81 c7 e0 08 ret 2003bf0: 81 e8 00 00 restore =============================================================================== 0200604c : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 200604c: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 2006050: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2006054: 80 88 62 00 btst 0x200, %g1 2006058: 02 80 00 19 be 20060bc <== NEVER TAKEN 200605c: 90 10 00 18 mov %i0, %o0 iscntrl(c) && (c != '\t') && (c != '\n')) { 2006060: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006064: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 201bca0 <__ctype_ptr__> 2006068: 82 00 40 18 add %g1, %i0, %g1 200606c: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2006070: 80 88 60 20 btst 0x20, %g1 2006074: 02 80 00 12 be 20060bc 2006078: 80 a6 20 09 cmp %i0, 9 200607c: 02 80 00 10 be 20060bc 2006080: 80 a6 20 0a cmp %i0, 0xa 2006084: 02 80 00 0e be 20060bc 2006088: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 200608c: 90 1e 20 40 xor %i0, 0x40, %o0 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2006090: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 2006094: d0 2f bf f9 stb %o0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2006098: 92 10 20 02 mov 2, %o1 200609c: 90 07 bf f8 add %fp, -8, %o0 20060a0: 7f ff ff 40 call 2005da0 20060a4: 94 10 00 19 mov %i1, %o2 tty->column += 2; 20060a8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 20060ac: 82 00 60 02 add %g1, 2, %g1 20060b0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 20060b4: 81 c7 e0 08 ret 20060b8: 81 e8 00 00 restore } else { oproc (c, tty); 20060bc: 7f ff ff 82 call 2005ec4 20060c0: 92 10 00 19 mov %i1, %o1 20060c4: 81 c7 e0 08 ret 20060c8: 81 e8 00 00 restore =============================================================================== 020281c0 : void endgrent(void) { if (group_fp != NULL) 20281c0: 03 00 81 b5 sethi %hi(0x206d400), %g1 20281c4: d0 00 62 98 ld [ %g1 + 0x298 ], %o0 ! 206d698 20281c8: 80 a2 20 00 cmp %o0, 0 20281cc: 02 80 00 05 be 20281e0 <== NEVER TAKEN 20281d0: 01 00 00 00 nop fclose(group_fp); 20281d4: 82 13 c0 00 mov %o7, %g1 20281d8: 40 00 63 7c call 2040fc8 20281dc: 9e 10 40 00 mov %g1, %o7 20281e0: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0202802c : void endpwent(void) { if (passwd_fp != NULL) 202802c: 03 00 81 b5 sethi %hi(0x206d400), %g1 2028030: d0 00 61 b8 ld [ %g1 + 0x1b8 ], %o0 ! 206d5b8 2028034: 80 a2 20 00 cmp %o0, 0 2028038: 02 80 00 05 be 202804c <== NEVER TAKEN 202803c: 01 00 00 00 nop fclose(passwd_fp); 2028040: 82 13 c0 00 mov %o7, %g1 2028044: 40 00 63 e1 call 2040fc8 2028048: 9e 10 40 00 mov %g1, %o7 202804c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 020060cc : * 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) { 20060cc: 9d e3 bf a0 save %sp, -96, %sp if (tty->ccount == 0) 20060d0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 20060d4: 80 a0 60 00 cmp %g1, 0 20060d8: 02 80 00 0a be 2006100 20060dc: ba 10 00 18 mov %i0, %i5 return; if (lineFlag) { 20060e0: 80 a6 60 00 cmp %i1, 0 20060e4: 02 80 00 76 be 20062bc 20060e8: 35 00 80 69 sethi %hi(0x201a400), %i2 if (!(tty->termios.c_lflag & ECHO)) { 20060ec: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 20060f0: 80 88 60 08 btst 8, %g1 20060f4: 32 80 00 05 bne,a 2006108 <== ALWAYS TAKEN 20060f8: 80 88 60 10 btst 0x10, %g1 tty->ccount = 0; 20060fc: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED return; 2006100: 81 c7 e0 08 ret 2006104: 81 e8 00 00 restore } if (!(tty->termios.c_lflag & ECHOE)) { 2006108: 12 80 00 6d bne 20062bc <== ALWAYS TAKEN 200610c: 35 00 80 69 sethi %hi(0x201a400), %i2 tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 2006110: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 2006114: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2006118: 7f ff ff cd call 200604c <== NOT EXECUTED 200611c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2006120: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2006124: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2006128: 02 bf ff f6 be 2006100 <== NOT EXECUTED 200612c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 2006130: 30 80 00 0e b,a 2006168 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 2006134: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2006138: 86 00 ff ff add %g3, -1, %g3 200613c: c6 27 60 20 st %g3, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 2006140: 80 88 60 08 btst 8, %g1 2006144: 02 80 00 59 be 20062a8 <== NEVER TAKEN 2006148: f8 09 00 03 ldub [ %g4 + %g3 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 200614c: 80 a6 60 00 cmp %i1, 0 2006150: 32 80 00 08 bne,a 2006170 2006154: b8 0f 20 ff and %i4, 0xff, %i4 2006158: 80 88 60 10 btst 0x10, %g1 200615c: 32 80 00 05 bne,a 2006170 <== ALWAYS TAKEN 2006160: b8 0f 20 ff and %i4, 0xff, %i4 echo (tty->termios.c_cc[VERASE], tty); 2006164: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED 2006168: 7f ff ff b9 call 200604c <== NOT EXECUTED 200616c: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED } else if (c == '\t') { 2006170: 80 a7 20 09 cmp %i4, 9 2006174: 32 80 00 28 bne,a 2006214 2006178: c4 06 e0 a0 ld [ %i3 + 0xa0 ], %g2 int col = tty->read_start_column; 200617c: 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)) { 2006180: da 06 e0 a0 ld [ %i3 + 0xa0 ], %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; 2006184: 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) 2006188: 10 80 00 12 b 20061d0 200618c: 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') { 2006190: 80 a3 e0 09 cmp %o7, 9 2006194: 12 80 00 04 bne 20061a4 2006198: 84 00 a0 01 inc %g2 col = (col | 7) + 1; 200619c: 10 80 00 0c b 20061cc 20061a0: b8 17 20 07 or %i4, 7, %i4 } else if (iscntrl (c)) { 20061a4: 9e 03 40 0f add %o5, %o7, %o7 20061a8: de 0b e0 01 ldub [ %o7 + 1 ], %o7 20061ac: 80 8b e0 20 btst 0x20, %o7 20061b0: 22 80 00 08 be,a 20061d0 <== ALWAYS TAKEN 20061b4: b8 07 20 01 inc %i4 if (tty->termios.c_lflag & ECHOCTL) 20061b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20061bc: 32 80 00 05 bne,a 20061d0 <== NOT EXECUTED 20061c0: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20061c4: 10 80 00 04 b 20061d4 <== NOT EXECUTED 20061c8: 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++; 20061cc: b8 07 20 01 inc %i4 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20061d0: 80 a0 80 03 cmp %g2, %g3 20061d4: 32 bf ff ef bne,a 2006190 20061d8: de 09 00 02 ldub [ %g4 + %g2 ], %o7 } /* * Back up over the tab */ while (tty->column > col) { 20061dc: 10 80 00 09 b 2006200 20061e0: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 rtems_termios_puts ("\b", 1, tty); 20061e4: 92 10 20 01 mov 1, %o1 20061e8: 7f ff fe ee call 2005da0 20061ec: 94 10 00 1d mov %i5, %o2 tty->column--; 20061f0: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 20061f4: 82 00 7f ff add %g1, -1, %g1 20061f8: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } /* * Back up over the tab */ while (tty->column > col) { 20061fc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006200: 80 a0 40 1c cmp %g1, %i4 2006204: 14 bf ff f8 bg 20061e4 2006208: 90 10 00 18 mov %i0, %o0 if (tty->column) tty->column--; } } } if (!lineFlag) 200620c: 10 80 00 28 b 20062ac 2006210: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006214: b8 07 20 01 inc %i4 2006218: c4 08 80 1c ldub [ %g2 + %i4 ], %g2 200621c: 80 88 a0 20 btst 0x20, %g2 2006220: 22 80 00 10 be,a 2006260 <== ALWAYS TAKEN 2006224: c2 06 e0 a0 ld [ %i3 + 0xa0 ], %g1 2006228: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 200622c: 02 80 00 0d be 2006260 <== NOT EXECUTED 2006230: c2 06 e0 a0 ld [ %i3 + 0xa0 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2006234: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2006238: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 200623c: 7f ff fe d9 call 2005da0 <== NOT EXECUTED 2006240: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 2006244: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 2006248: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200624c: 22 80 00 05 be,a 2006260 <== NOT EXECUTED 2006250: c2 06 e0 a0 ld [ %i3 + 0xa0 ], %g1 <== NOT EXECUTED tty->column--; 2006254: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006258: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 200625c: c2 06 e0 a0 ld [ %i3 + 0xa0 ], %g1 <== NOT EXECUTED 2006260: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 2006264: 80 88 60 20 btst 0x20, %g1 2006268: 02 80 00 07 be 2006284 <== ALWAYS TAKEN 200626c: 90 10 00 1a mov %i2, %o0 2006270: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 2006274: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2006278: 02 80 00 0d be 20062ac <== NOT EXECUTED 200627c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2006280: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2006284: 92 10 20 03 mov 3, %o1 2006288: 7f ff fe c6 call 2005da0 200628c: 94 10 00 1d mov %i5, %o2 if (tty->column) 2006290: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006294: 80 a0 60 00 cmp %g1, 0 2006298: 02 80 00 05 be 20062ac <== NEVER TAKEN 200629c: 80 a6 60 00 cmp %i1, 0 tty->column--; 20062a0: 82 00 7f ff add %g1, -1, %g1 20062a4: c2 27 60 28 st %g1, [ %i5 + 0x28 ] } } } if (!lineFlag) 20062a8: 80 a6 60 00 cmp %i1, 0 20062ac: 32 80 00 09 bne,a 20062d0 20062b0: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 20062b4: 81 c7 e0 08 ret 20062b8: 81 e8 00 00 restore /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20062bc: 31 00 80 69 sethi %hi(0x201a400), %i0 20062c0: 37 00 80 6f sethi %hi(0x201bc00), %i3 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); 20062c4: b4 16 a1 b0 or %i2, 0x1b0, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20062c8: b0 16 21 a8 or %i0, 0x1a8, %i0 echo ('\n', tty); return; } } while (tty->ccount) { 20062cc: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 20062d0: 80 a0 e0 00 cmp %g3, 0 20062d4: 32 bf ff 98 bne,a 2006134 20062d8: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 20062dc: 81 c7 e0 08 ret 20062e0: 81 e8 00 00 restore =============================================================================== 02025904 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 2025904: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2025908: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 202590c: 80 a0 60 00 cmp %g1, 0 2025910: 32 80 00 15 bne,a 2025964 2025914: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025918: 92 10 00 19 mov %i1, %o1 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 202591c: 80 a6 a0 01 cmp %i2, 1 2025920: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2025924: 12 80 00 06 bne 202593c 2025928: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 202592c: 7f ff 82 50 call 200626c 2025930: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2025934: 10 80 00 05 b 2025948 2025938: 80 a2 20 00 cmp %o0, 0 if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 202593c: 7f ff 82 23 call 20061c8 2025940: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2025944: 80 a2 20 00 cmp %o0, 0 2025948: 12 80 00 61 bne 2025acc <== NEVER TAKEN 202594c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 2025950: 82 10 20 01 mov 1, %g1 ! 1 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); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2025954: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.modified = 0; 2025958: c0 2e 20 7c clrb [ %i0 + 0x7c ] fs_info->c.state = FAT_CACHE_ACTUAL; 202595c: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2025960: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2025964: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2025968: 80 a0 40 02 cmp %g1, %g2 202596c: 0a 80 00 05 bcs 2025980 <== NEVER TAKEN 2025970: ba 10 20 00 clr %i5 2025974: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2025978: 80 a0 40 02 cmp %g1, %g2 202597c: ba 40 20 00 addx %g0, 0, %i5 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2025980: 80 a0 40 19 cmp %g1, %i1 2025984: 22 80 00 5b be,a 2025af0 2025988: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (fs_info->c.modified) 202598c: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2025990: 80 a0 60 00 cmp %g1, 0 2025994: 02 80 00 3b be 2025a80 2025998: 80 8f 60 ff btst 0xff, %i5 { if (sec_of_fat && !fs_info->vol.mirror) 202599c: 02 80 00 0b be 20259c8 <== ALWAYS TAKEN 20259a0: 01 00 00 00 nop 20259a4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20259a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20259ac: 12 80 00 07 bne 20259c8 <== NOT EXECUTED 20259b0: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 20259b4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 20259b8: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 20259bc: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 20259c0: 40 00 7a 71 call 2044384 <== NOT EXECUTED 20259c4: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 20259c8: 7f ff 82 ec call 2006578 20259cc: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 20259d0: c0 2e 20 7d clrb [ %i0 + 0x7d ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 20259d4: 80 a2 20 00 cmp %o0, 0 20259d8: 12 80 00 3d bne 2025acc <== NEVER TAKEN 20259dc: c0 2e 20 7c clrb [ %i0 + 0x7c ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 20259e0: 80 8f 60 ff btst 0xff, %i5 20259e4: 02 80 00 2d be 2025a98 <== ALWAYS TAKEN 20259e8: 92 10 00 19 mov %i1, %o1 20259ec: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 20259f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20259f4: 02 80 00 1c be 2025a64 <== NOT EXECUTED 20259f8: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 20259fc: 10 80 00 28 b 2025a9c <== NOT EXECUTED 2025a00: 80 a6 a0 01 cmp %i2, 1 <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2025a04: 7f ff 74 ee call 2002dbc <.umul> <== NOT EXECUTED 2025a08: f8 06 20 58 ld [ %i0 + 0x58 ], %i4 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 2025a0c: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 <== NOT EXECUTED 2025a10: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 2025a14: 92 02 00 09 add %o0, %o1, %o1 <== NOT EXECUTED 2025a18: 7f ff 81 ec call 20061c8 <== NOT EXECUTED 2025a1c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2025a20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025a24: 12 80 00 0c bne 2025a54 <== NOT EXECUTED 2025a28: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2025a2c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2025a30: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 2025a34: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 2025a38: 40 00 7a 53 call 2044384 <== NOT EXECUTED 2025a3c: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2025a40: 7f ff 82 ce call 2006578 <== NOT EXECUTED 2025a44: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2025a48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025a4c: 22 80 00 06 be,a 2025a64 <== NOT EXECUTED 2025a50: ba 07 60 01 inc %i5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2025a54: 40 00 6d 0b call 2040e80 <__errno> <== NOT EXECUTED 2025a58: 01 00 00 00 nop <== NOT EXECUTED 2025a5c: 10 80 00 1f b 2025ad8 <== NOT EXECUTED 2025a60: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2025a64: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2025a68: 90 0f 60 ff and %i5, 0xff, %o0 <== NOT EXECUTED 2025a6c: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2025a70: 2a bf ff e5 bcs,a 2025a04 <== NOT EXECUTED 2025a74: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025a78: 10 80 00 08 b 2025a98 <== NOT EXECUTED 2025a7c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2025a80: 7f ff 82 85 call 2006494 2025a84: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2025a88: 80 a2 20 00 cmp %o0, 0 2025a8c: 12 80 00 10 bne 2025acc <== NEVER TAKEN 2025a90: c0 2e 20 7d clrb [ %i0 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025a94: 92 10 00 19 mov %i1, %o1 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 2025a98: 80 a6 a0 01 cmp %i2, 1 2025a9c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2025aa0: 12 80 00 06 bne 2025ab8 2025aa4: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025aa8: 7f ff 81 f1 call 200626c 2025aac: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2025ab0: 10 80 00 05 b 2025ac4 2025ab4: 80 a2 20 00 cmp %o0, 0 } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 2025ab8: 7f ff 81 c4 call 20061c8 2025abc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2025ac0: 80 a2 20 00 cmp %o0, 0 2025ac4: 02 80 00 08 be 2025ae4 <== ALWAYS TAKEN 2025ac8: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2025acc: 40 00 6c ed call 2040e80 <__errno> <== NOT EXECUTED 2025ad0: 01 00 00 00 nop <== NOT EXECUTED 2025ad4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2025ad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025adc: 81 c7 e0 08 ret <== NOT EXECUTED 2025ae0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2025ae4: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2025ae8: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } *buf = fs_info->c.buf; 2025aec: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2025af0: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2025af4: 81 c7 e0 08 ret 2025af8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02025afc : int fat_buf_release(fat_fs_info_t *fs_info) { 2025afc: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2025b00: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2025b04: ba 10 00 18 mov %i0, %i5 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2025b08: 80 a0 60 00 cmp %g1, 0 2025b0c: 02 80 00 53 be 2025c58 2025b10: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2025b14: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2025b18: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 2025b1c: 80 a0 40 02 cmp %g1, %g2 2025b20: 0a 80 00 05 bcs 2025b34 <== NEVER TAKEN 2025b24: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2025b28: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 2025b2c: 80 a0 40 02 cmp %g1, %g2 2025b30: b8 40 20 00 addx %g0, 0, %i4 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 2025b34: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1 2025b38: 80 a0 60 00 cmp %g1, 0 2025b3c: 02 80 00 3a be 2025c24 2025b40: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2025b44: 02 80 00 0b be 2025b70 2025b48: 01 00 00 00 nop 2025b4c: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2025b50: 80 a0 60 00 cmp %g1, 0 2025b54: 12 80 00 07 bne 2025b70 <== NEVER TAKEN 2025b58: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2025b5c: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2025b60: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 2025b64: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2025b68: 40 00 7a 07 call 2044384 2025b6c: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2025b70: 7f ff 82 82 call 2006578 2025b74: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2025b78: 80 a2 20 00 cmp %o0, 0 2025b7c: 12 80 00 2f bne 2025c38 <== NEVER TAKEN 2025b80: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2025b84: 80 8f 20 ff btst 0xff, %i4 2025b88: 02 80 00 32 be 2025c50 2025b8c: c0 2f 60 7c clrb [ %i5 + 0x7c ] 2025b90: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2025b94: 80 a0 60 00 cmp %g1, 0 2025b98: 02 80 00 1c be 2025c08 <== ALWAYS TAKEN 2025b9c: 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; 2025ba0: 10 80 00 2d b 2025c54 <== NOT EXECUTED 2025ba4: c0 2f 60 7d clrb [ %i5 + 0x7d ] <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2025ba8: 7f ff 74 85 call 2002dbc <.umul> 2025bac: f6 07 60 58 ld [ %i5 + 0x58 ], %i3 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dd, 2025bb0: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 2025bb4: 94 07 bf fc add %fp, -4, %o2 2025bb8: 92 02 00 09 add %o0, %o1, %o1 2025bbc: 7f ff 81 83 call 20061c8 2025bc0: 90 10 00 1b mov %i3, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2025bc4: 80 a2 20 00 cmp %o0, 0 2025bc8: 12 80 00 0c bne 2025bf8 <== NEVER TAKEN 2025bcc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2025bd0: c2 07 bf fc ld [ %fp + -4 ], %g1 2025bd4: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 2025bd8: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2025bdc: 40 00 79 ea call 2044384 2025be0: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(b); 2025be4: 7f ff 82 65 call 2006578 2025be8: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2025bec: 80 a2 20 00 cmp %o0, 0 2025bf0: 22 80 00 06 be,a 2025c08 <== ALWAYS TAKEN 2025bf4: b8 07 20 01 inc %i4 rtems_set_errno_and_return_minus_one(ENOMEM); 2025bf8: 40 00 6c a2 call 2040e80 <__errno> <== NOT EXECUTED 2025bfc: 01 00 00 00 nop <== NOT EXECUTED 2025c00: 10 80 00 11 b 2025c44 <== NOT EXECUTED 2025c04: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2025c08: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 2025c0c: 90 0f 20 ff and %i4, 0xff, %o0 2025c10: 80 a2 00 01 cmp %o0, %g1 2025c14: 2a bf ff e5 bcs,a 2025ba8 2025c18: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2025c1c: 10 80 00 0e b 2025c54 2025c20: c0 2f 60 7d clrb [ %i5 + 0x7d ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2025c24: 7f ff 82 1c call 2006494 2025c28: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2025c2c: 80 a2 20 00 cmp %o0, 0 2025c30: 22 80 00 09 be,a 2025c54 <== ALWAYS TAKEN 2025c34: c0 2f 60 7d clrb [ %i5 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); 2025c38: 40 00 6c 92 call 2040e80 <__errno> <== NOT EXECUTED 2025c3c: 01 00 00 00 nop <== NOT EXECUTED 2025c40: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2025c44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025c48: 81 c7 e0 08 ret <== NOT EXECUTED 2025c4c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2025c50: c0 2f 60 7d clrb [ %i5 + 0x7d ] return RC_OK; 2025c54: b0 10 20 00 clr %i0 } 2025c58: 81 c7 e0 08 ret 2025c5c: 81 e8 00 00 restore =============================================================================== 02024ba4 : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2024ba4: 80 a2 60 00 cmp %o1, 0 2024ba8: 12 80 00 08 bne 2024bc8 2024bac: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 2024bb0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 2024bb4: 80 88 a0 03 btst 3, %g2 2024bb8: 22 80 00 05 be,a 2024bcc <== NEVER TAKEN 2024bbc: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2024bc0: 81 c3 e0 08 retl 2024bc4: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2024bc8: c4 08 60 05 ldub [ %g1 + 5 ], %g2 2024bcc: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2024bd0: 90 02 7f fe add %o1, -2, %o0 2024bd4: 91 2a 00 02 sll %o0, %g2, %o0 fs_info->vol.data_fsec); } 2024bd8: 81 c3 e0 08 retl 2024bdc: 90 02 00 01 add %o0, %g1, %o0 =============================================================================== 02025d90 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2025d90: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2025d94: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2025d98: 12 80 00 08 bne 2025db8 <== NOT EXECUTED 2025d9c: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED 2025da0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2025da4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2025da8: 22 80 00 05 be,a 2025dbc <== NOT EXECUTED 2025dac: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2025db0: 10 80 00 07 b 2025dcc <== NOT EXECUTED 2025db4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2025db8: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED 2025dbc: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED 2025dc0: 93 2a 40 02 sll %o1, %g2, %o1 <== NOT EXECUTED 2025dc4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED 2025dc8: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2025dcc: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED 2025dd0: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 2025dd4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2025dd8: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2025ddc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2025de0: 7f ff ff a0 call 2025c60 <_fat_block_read> <== NOT EXECUTED 2025de4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02025de8 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 2025de8: 98 10 00 0a mov %o2, %o4 uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2025dec: 80 a2 60 00 cmp %o1, 0 2025df0: 12 80 00 08 bne 2025e10 <== ALWAYS TAKEN 2025df4: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 2025df8: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2025dfc: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2025e00: 22 80 00 05 be,a 2025e14 <== NOT EXECUTED 2025e04: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2025e08: 10 80 00 07 b 2025e24 <== NOT EXECUTED 2025e0c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2025e10: c4 08 60 05 ldub [ %g1 + 5 ], %g2 2025e14: 92 02 7f fe add %o1, -2, %o1 2025e18: 93 2a 40 02 sll %o1, %g2, %o1 2025e1c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 2025e20: 92 02 40 02 add %o1, %g2, %o1 uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2025e24: d6 08 60 04 ldub [ %g1 + 4 ], %o3 2025e28: c2 08 60 02 ldub [ %g1 + 2 ], %g1 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 2025e2c: 94 10 20 00 clr %o2 2025e30: 97 2a c0 01 sll %o3, %g1, %o3 2025e34: 82 13 c0 00 mov %o7, %g1 2025e38: 7f ff ff ac call 2025ce8 <_fat_block_write> 2025e3c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0202600c : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 202600c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2026010: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 2026014: 7f ff fe 30 call 20258d4 <== NOT EXECUTED 2026018: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 202601c: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2026020: 7f ff fe 2d call 20258d4 <== NOT EXECUTED 2026024: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2026028: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); 202602c: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 2026030: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 2026034: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026038: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 202603c: 7f ff ff 2b call 2025ce8 <_fat_block_write> <== NOT EXECUTED 2026040: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 2026044: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 2026048: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 202604c: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2026050: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2026054: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026058: 7f ff ff 24 call 2025ce8 <_fat_block_write> <== NOT EXECUTED 202605c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 2026060: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2026064: 06 80 00 04 bl 2026074 <== NOT EXECUTED 2026068: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 202606c: 16 80 00 03 bge 2026078 <== NOT EXECUTED 2026070: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 2026074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2026078: 81 c7 e0 08 ret <== NOT EXECUTED 202607c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02025160 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2025160: 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) 2025164: c2 06 60 08 ld [ %i1 + 8 ], %g1 2025168: 80 a0 60 01 cmp %g1, 1 202516c: 08 80 00 06 bleu 2025184 2025170: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 { fat_fd->links_num--; 2025174: 82 00 7f ff add %g1, -1, %g1 return rc; 2025178: 90 10 20 00 clr %o0 202517c: 10 80 00 25 b 2025210 2025180: c2 26 60 08 st %g1, [ %i1 + 8 ] } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 2025184: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2025188: 80 88 60 01 btst 1, %g1 202518c: 02 80 00 14 be 20251dc 2025190: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 2025194: 92 10 00 19 mov %i1, %o1 2025198: 7f ff ff ae call 2025050 202519c: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 20251a0: 80 a2 20 00 cmp %o0, 0 20251a4: 12 80 00 1b bne 2025210 <== NEVER TAKEN 20251a8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20251ac: 7f ff a3 19 call 200de10 <_Chain_Extract> 20251b0: 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(mt_entry, fat_fd->ino) ) 20251b4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20251b8: 40 00 03 90 call 2025ff8 20251bc: 90 10 00 18 mov %i0, %o0 20251c0: 80 8a 20 ff btst 0xff, %o0 20251c4: 02 80 00 0f be 2025200 <== ALWAYS TAKEN 20251c8: 01 00 00 00 nop fat_free_unique_ino(mt_entry, fat_fd->ino); 20251cc: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 20251d0: 40 00 03 7e call 2025fc8 <== NOT EXECUTED 20251d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20251d8: 30 80 00 0a b,a 2025200 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20251dc: 40 00 03 87 call 2025ff8 20251e0: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20251e4: 80 8a 20 ff btst 0xff, %o0 20251e8: 02 80 00 04 be 20251f8 <== ALWAYS TAKEN 20251ec: 01 00 00 00 nop { fat_fd->links_num = 0; 20251f0: 10 80 00 06 b 2025208 <== NOT EXECUTED 20251f4: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 20251f8: 7f ff a3 06 call 200de10 <_Chain_Extract> 20251fc: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 2025200: 7f ff 8d 5e call 2008778 2025204: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2025208: 40 00 02 3d call 2025afc 202520c: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 2025210: 81 c7 e0 08 ret 2025214: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02025734 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2025734: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2025738: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 202573c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2025740: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2025744: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2025748: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 202574c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2025750: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2025754: 02 80 00 07 be 2025770 <== NOT EXECUTED 2025758: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 202575c: 40 00 00 e8 call 2025afc <== NOT EXECUTED 2025760: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2025764: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2025768: 02 80 00 24 be 20257f8 <== NOT EXECUTED 202576c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2025770: 81 c7 e0 08 ret <== NOT EXECUTED 2025774: 81 e8 00 00 restore <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025778: 7f ff fd 0b call 2024ba4 <== NOT EXECUTED 202577c: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2025780: 10 80 00 13 b 20257cc <== NOT EXECUTED 2025784: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2025788: 92 06 c0 1a add %i3, %i2, %o1 <== NOT EXECUTED 202578c: 7f ff 82 b8 call 200626c <== NOT EXECUTED 2025790: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2025794: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025798: 12 80 00 07 bne 20257b4 <== NOT EXECUTED 202579c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 20257a0: 7f ff 83 9a call 2006608 <== NOT EXECUTED 20257a4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 20257a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20257ac: 22 80 00 08 be,a 20257cc <== NOT EXECUTED 20257b0: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20257b4: 40 00 6d b3 call 2040e80 <__errno> <== NOT EXECUTED 20257b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20257bc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 20257c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20257c4: 81 c7 e0 08 ret <== NOT EXECUTED 20257c8: 81 e8 00 00 restore <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 20257cc: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 20257d0: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 20257d4: 2a bf ff ed bcs,a 2025788 <== NOT EXECUTED 20257d8: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20257dc: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20257e0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20257e4: 40 00 5c c4 call 203caf4 <== NOT EXECUTED 20257e8: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20257ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20257f0: 12 80 00 0a bne 2025818 <== NOT EXECUTED 20257f4: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20257f8: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 20257fc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 2025800: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2025804: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2025808: 0a bf ff dc bcs 2025778 <== NOT EXECUTED 202580c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2025810: 81 c7 e0 08 ret <== NOT EXECUTED 2025814: 81 e8 00 00 restore <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025818: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 202581c: 81 c7 e0 08 ret <== NOT EXECUTED 2025820: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020252ec : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20252ec: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20252f0: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 20252f4: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20252f8: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 20252fc: 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; 2025300: c0 27 bf f8 clr [ %fp + -8 ] rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2025304: ba 10 00 18 mov %i0, %i5 uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 2025308: 80 a6 80 12 cmp %i2, %l2 202530c: 08 80 00 2d bleu 20253c0 2025310: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2025314: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2025318: 80 a0 60 01 cmp %g1, 1 202531c: 32 80 00 0b bne,a 2025348 <== ALWAYS TAKEN 2025320: c4 17 20 06 lduh [ %i4 + 6 ], %g2 2025324: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2025328: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202532c: 32 80 00 07 bne,a 2025348 <== NOT EXECUTED 2025330: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025334: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2025338: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 202533c: 12 80 00 1d bne 20253b0 <== NOT EXECUTED 2025340: 01 00 00 00 nop <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 2025344: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 2025348: 82 00 bf ff add %g2, -1, %g1 202534c: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2025350: a4 26 80 12 sub %i2, %l2, %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 - 2025354: a0 20 80 10 sub %g2, %l0, %l0 2025358: a0 0c 00 01 and %l0, %g1, %l0 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 202535c: 80 a4 80 10 cmp %l2, %l0 2025360: 08 80 00 18 bleu 20253c0 2025364: b0 10 20 00 clr %i0 /* * 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) 2025368: a4 a4 80 10 subcc %l2, %l0, %l2 202536c: 02 80 00 15 be 20253c0 <== NEVER TAKEN 2025370: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2025374: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025378: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 202537c: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025380: 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; 2025384: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025388: 96 07 bf fc add %fp, -4, %o3 202538c: 94 10 00 11 mov %l1, %o2 2025390: 40 00 5f 28 call 203d030 2025394: 98 07 bf f8 add %fp, -8, %o4 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 2025398: b0 92 20 00 orcc %o0, 0, %i0 202539c: 12 80 00 09 bne 20253c0 <== NEVER TAKEN 20253a0: 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)) 20253a4: 80 94 00 01 orcc %l0, %g1, %g0 20253a8: 12 80 00 08 bne 20253c8 <== ALWAYS TAKEN 20253ac: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 20253b0: 40 00 6e b4 call 2040e80 <__errno> <== NOT EXECUTED 20253b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20253b8: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 20253bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20253c0: 81 c7 e0 08 ret 20253c4: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20253c8: 02 80 00 0b be 20253f4 <== ALWAYS TAKEN 20253cc: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20253d0: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 20253d4: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20253d8: c2 17 20 06 lduh [ %i4 + 6 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20253dc: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20253e0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 20253e4: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 20253e8: a4 0c 80 01 and %l2, %g1, %l2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20253ec: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 20253f0: e4 26 c0 00 st %l2, [ %i3 ] <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 20253f4: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20253f8: 80 a2 e0 00 cmp %o3, 0 20253fc: 32 80 00 07 bne,a 2025418 2025400: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 2025404: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 2025408: c0 26 60 34 clr [ %i1 + 0x34 ] (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 202540c: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 2025410: 10 80 00 1d b 2025484 2025414: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2025418: 80 a0 7f ff cmp %g1, -1 202541c: 02 80 00 04 be 202542c <== NEVER TAKEN 2025420: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 2025424: 10 80 00 0a b 202544c 2025428: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 202542c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2025430: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2025434: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2025438: 7f ff ff 78 call 2025218 <== NOT EXECUTED 202543c: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2025440: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 2025444: 12 80 00 09 bne 2025468 <== NOT EXECUTED 2025448: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 202544c: d2 07 bf f4 ld [ %fp + -12 ], %o1 2025450: d4 07 bf f0 ld [ %fp + -16 ], %o2 2025454: 40 00 5e 18 call 203ccb4 2025458: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 202545c: b6 92 20 00 orcc %o0, 0, %i3 2025460: 02 80 00 07 be 202547c <== ALWAYS TAKEN 2025464: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2025468: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 202546c: 40 00 5e c1 call 203cf70 <== NOT EXECUTED 2025470: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 2025474: 81 c7 e0 08 ret <== NOT EXECUTED 2025478: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 202547c: 40 00 01 a0 call 2025afc 2025480: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2025484: c2 07 bf fc ld [ %fp + -4 ], %g1 2025488: 80 a0 60 00 cmp %g1, 0 202548c: 22 bf ff cd be,a 20253c0 <== NEVER TAKEN 2025490: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2025494: c2 07 bf f8 ld [ %fp + -8 ], %g1 2025498: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 202549c: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 20254a0: 80 a0 60 00 cmp %g1, 0 20254a4: 32 bf ff c7 bne,a 20253c0 20254a8: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 20254ac: d2 07 bf f0 ld [ %fp + -16 ], %o1 20254b0: 40 00 02 64 call 2025e40 20254b4: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20254b8: b8 92 20 00 orcc %o0, 0, %i4 20254bc: 22 bf ff c1 be,a 20253c0 <== ALWAYS TAKEN 20254c0: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 20254c4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20254c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20254cc: 40 00 5e a9 call 203cf70 <== NOT EXECUTED 20254d0: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 20254d4: 81 c7 e0 08 ret <== NOT EXECUTED 20254d8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02025218 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2025218: 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); 202521c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2025220: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2025224: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 2025228: 84 07 a0 50 add %fp, 0x50, %g2 int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 202522c: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 2025230: c4 27 bf fc st %g2, [ %fp + -4 ] fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2025234: 90 10 00 18 mov %i0, %o0 2025238: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 202523c: 80 a6 a0 01 cmp %i2, 1 2025240: 12 80 00 24 bne 20252d0 <== NEVER TAKEN 2025244: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2025248: 84 07 a0 58 add %fp, 0x58, %g2 202524c: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2025250: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2025254: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2025258: 80 a6 c0 02 cmp %i3, %g2 202525c: 0a 80 00 06 bcs 2025274 <== ALWAYS TAKEN 2025260: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 2025264: 40 00 6f 07 call 2040e80 <__errno> <== NOT EXECUTED 2025268: 01 00 00 00 nop <== NOT EXECUTED 202526c: 10 80 00 1c b 20252dc <== NOT EXECUTED 2025270: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2025274: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2025278: 80 a0 a0 01 cmp %g2, 1 202527c: 32 80 00 0d bne,a 20252b0 2025280: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 2025284: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2025288: 80 a0 a0 00 cmp %g2, 0 202528c: 32 80 00 09 bne,a 20252b0 <== NEVER TAKEN 2025290: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025294: c4 08 e0 0a ldub [ %g3 + 0xa ], %g2 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)) && 2025298: 80 88 a0 03 btst 3, %g2 202529c: 22 80 00 05 be,a 20252b0 <== NEVER TAKEN 20252a0: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 20252a4: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 20252a8: 10 80 00 0f b 20252e4 20252ac: 92 10 20 00 clr %o1 } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20252b0: 96 07 bf f8 add %fp, -8, %o3 20252b4: 7f ff fe 7a call 2024c9c 20252b8: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 20252bc: 80 a2 60 00 cmp %o1, 0 20252c0: 12 80 00 09 bne 20252e4 <== NEVER TAKEN 20252c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 20252c8: 10 80 00 07 b 20252e4 20252cc: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 20252d0: 40 00 6e ec call 2040e80 <__errno> <== NOT EXECUTED 20252d4: 01 00 00 00 nop <== NOT EXECUTED 20252d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20252dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20252e0: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20252e4: 81 c7 e0 08 ret 20252e8: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02024c9c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2024c9c: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2024ca0: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2024ca4: 80 a6 80 1c cmp %i2, %i4 2024ca8: 12 80 00 07 bne 2024cc4 <== NEVER TAKEN 2024cac: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2024cb0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2024cb4: b0 10 20 00 clr %i0 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 2024cb8: c2 26 c0 00 st %g1, [ %i3 ] fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2024cbc: 81 c7 e0 08 ret 2024cc0: 93 e8 20 00 restore %g0, 0, %o1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2024cc4: 28 80 00 06 bleu,a 2024cdc <== NOT EXECUTED 2024cc8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2024ccc: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2024cd0: b8 26 80 1c sub %i2, %i4, %i4 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 2024cd4: 10 80 00 04 b 2024ce4 <== NOT EXECUTED 2024cd8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2024cdc: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2024ce0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2024ce4: 10 80 00 0b b 2024d10 <== NOT EXECUTED 2024ce8: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2024cec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2024cf0: 40 00 5f 81 call 203caf4 <== NOT EXECUTED 2024cf4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2024cf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024cfc: 22 80 00 05 be,a 2024d10 <== NOT EXECUTED 2024d00: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2024d04: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2024d08: 81 c7 e0 08 ret <== NOT EXECUTED 2024d0c: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2024d10: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2024d14: 12 bf ff f6 bne 2024cec <== NOT EXECUTED 2024d18: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2024d1c: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2024d20: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2024d24: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2024d28: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2024d2c: 81 c7 e0 08 ret <== NOT EXECUTED 2024d30: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 02024d34 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2024d34: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2024d38: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 2024d3c: 90 10 00 18 mov %i0, %o0 2024d40: 92 10 00 19 mov %i1, %o1 2024d44: 7f ff ff a7 call 2024be0 2024d48: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2024d4c: d2 06 e0 60 ld [ %i3 + 0x60 ], %o1 fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 2024d50: b8 10 00 08 mov %o0, %i4 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2024d54: ba 10 00 18 mov %i0, %i5 /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2024d58: 90 10 00 18 mov %i0, %o0 2024d5c: 94 10 00 1c mov %i4, %o2 2024d60: 96 10 20 00 clr %o3 2024d64: 7f ff ff b1 call 2024c28 <_hash_search> 2024d68: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2024d6c: b0 92 20 00 orcc %o0, 0, %i0 2024d70: 12 80 00 08 bne 2024d90 2024d74: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2024d78: c4 00 60 08 ld [ %g1 + 8 ], %g2 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 2024d7c: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2024d80: 84 00 a0 01 inc %g2 2024d84: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2024d88: 81 c7 e0 08 ret 2024d8c: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2024d90: d2 06 e0 64 ld [ %i3 + 0x64 ], %o1 2024d94: 94 10 00 1c mov %i4, %o2 2024d98: 96 10 00 1c mov %i4, %o3 2024d9c: 98 07 bf fc add %fp, -4, %o4 2024da0: 7f ff ff a2 call 2024c28 <_hash_search> 2024da4: 90 10 00 1d mov %i5, %o0 2024da8: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2024dac: 7f ff 8f f3 call 2008d78 2024db0: 90 10 20 44 mov 0x44, %o0 2024db4: d0 26 80 00 st %o0, [ %i2 ] 2024db8: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2024dbc: 80 a2 20 00 cmp %o0, 0 2024dc0: 02 80 00 1f be 2024e3c <== NEVER TAKEN 2024dc4: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2024dc8: 92 10 20 00 clr %o1 2024dcc: 40 00 7d fa call 20445b4 2024dd0: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2024dd4: 82 10 20 01 mov 1, %g1 2024dd8: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2024ddc: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2024de0: 90 06 20 20 add %i0, 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; 2024de4: 82 08 7f fe and %g1, -2, %g1 2024de8: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2024dec: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2024df0: 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; 2024df4: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2024df8: 40 00 7d 63 call 2044384 2024dfc: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2024e00: 80 a4 20 00 cmp %l0, 0 2024e04: 02 80 00 04 be 2024e14 <== NEVER TAKEN 2024e08: 01 00 00 00 nop lfat_fd->ino = key; 2024e0c: 10 80 00 12 b 2024e54 2024e10: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2024e14: 40 00 04 39 call 2025ef8 <== NOT EXECUTED 2024e18: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2024e1c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2024e20: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2024e24: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2024e28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2024e2c: 32 80 00 0b bne,a 2024e58 <== NOT EXECUTED 2024e30: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2024e34: 7f ff 8e 51 call 2008778 <== NOT EXECUTED 2024e38: 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 ); 2024e3c: 40 00 70 11 call 2040e80 <__errno> <== NOT EXECUTED 2024e40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2024e44: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2024e48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2024e4c: 81 c7 e0 08 ret <== NOT EXECUTED 2024e50: 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); 2024e54: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2024e58: d2 07 bf fc ld [ %fp + -4 ], %o1 2024e5c: b8 0f 20 01 and %i4, 1, %i4 2024e60: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 2024e64: b0 10 20 00 clr %i0 */ 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); 2024e68: b9 2f 20 04 sll %i4, 4, %i4 2024e6c: b8 27 00 01 sub %i4, %g1, %i4 2024e70: 7f ff a3 dd call 200dde4 <_Chain_Append> 2024e74: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2024e78: 81 c7 e0 08 ret 2024e7c: 81 e8 00 00 restore =============================================================================== 02024e94 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2024e94: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 2024e98: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2024e9c: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 2024ea0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 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) 2024ea4: 80 a6 e0 00 cmp %i3, 0 2024ea8: 02 80 00 63 be 2025034 <== NEVER TAKEN 2024eac: b0 10 20 00 clr %i0 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 2024eb0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2024eb4: 80 a6 80 01 cmp %i2, %g1 2024eb8: 1a 80 00 5f bcc 2025034 <== NEVER TAKEN 2024ebc: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2024ec0: 38 80 00 07 bgu,a 2024edc <== NEVER TAKEN 2024ec4: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2024ec8: 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) || 2024ecc: 80 a6 80 02 cmp %i2, %g2 2024ed0: 28 80 00 04 bleu,a 2024ee0 <== ALWAYS TAKEN 2024ed4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2024ed8: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2024edc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2024ee0: 80 a0 60 01 cmp %g1, 1 2024ee4: 32 80 00 1c bne,a 2024f54 2024ee8: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2024eec: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2024ef0: 80 a0 60 00 cmp %g1, 0 2024ef4: 32 80 00 18 bne,a 2024f54 <== NEVER TAKEN 2024ef8: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2024efc: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2024f00: 80 88 60 03 btst 3, %g1 2024f04: 22 80 00 14 be,a 2024f54 <== NEVER TAKEN 2024f08: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2024f0c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2024f10: 7f ff ff 25 call 2024ba4 2024f14: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 2024f18: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2024f1c: d4 14 00 00 lduh [ %l0 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 2024f20: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2024f24: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 2024f28: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 2024f2c: 94 0e 80 0a and %i2, %o2, %o2 2024f30: 90 10 00 1d mov %i5, %o0 2024f34: 96 10 00 1b mov %i3, %o3 2024f38: 40 00 03 4a call 2025c60 <_fat_block_read> 2024f3c: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2024f40: b0 92 20 00 orcc %o0, 0, %i0 2024f44: 16 80 00 41 bge 2025048 <== ALWAYS TAKEN 2024f48: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 2024f4c: 81 c7 e0 08 ret <== NOT EXECUTED 2024f50: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2024f54: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2024f58: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2024f5c: a6 07 bf fc add %fp, -4, %l3 2024f60: 90 10 00 1d mov %i5, %o0 2024f64: 92 10 00 19 mov %i1, %o1 2024f68: 94 10 00 12 mov %l2, %o2 2024f6c: 7f ff ff 4c call 2024c9c 2024f70: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2024f74: b0 92 60 00 orcc %o1, 0, %i0 2024f78: 12 80 00 2f bne 2025034 <== NEVER TAKEN 2024f7c: a3 2c 60 10 sll %l1, 0x10, %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2024f80: a3 34 60 10 srl %l1, 0x10, %l1 2024f84: a2 04 7f ff add %l1, -1, %l1 2024f88: b4 0e 80 11 and %i2, %l1, %i2 2024f8c: a2 10 20 00 clr %l1 2024f90: 10 80 00 1f b 202500c 2024f94: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2024f98: a2 24 40 14 sub %l1, %l4, %l1 2024f9c: 80 a4 40 1b cmp %l1, %i3 2024fa0: 38 80 00 02 bgu,a 2024fa8 2024fa4: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2024fa8: d2 07 bf fc ld [ %fp + -4 ], %o1 2024fac: 7f ff fe fe call 2024ba4 2024fb0: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 2024fb4: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2024fb8: d4 14 00 00 lduh [ %l0 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2024fbc: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2024fc0: 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(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2024fc4: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 2024fc8: 94 0d 00 0a and %l4, %o2, %o2 2024fcc: 90 10 00 1d mov %i5, %o0 2024fd0: 96 10 00 11 mov %l1, %o3 2024fd4: 40 00 03 23 call 2025c60 <_fat_block_read> 2024fd8: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 2024fdc: 80 a2 20 00 cmp %o0, 0 2024fe0: 06 80 00 17 bl 202503c <== NEVER TAKEN 2024fe4: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 2024fe8: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 2024fec: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2024ff0: 90 10 00 1d mov %i5, %o0 2024ff4: 92 10 00 11 mov %l1, %o1 2024ff8: 40 00 5e bf call 203caf4 2024ffc: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2025000: 80 a2 20 00 cmp %o0, 0 2025004: 12 80 00 10 bne 2025044 <== NEVER TAKEN 2025008: a8 10 20 00 clr %l4 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 202500c: 80 a6 e0 00 cmp %i3, 0 2025010: 32 bf ff e2 bne,a 2024f98 2025014: e2 14 20 06 lduh [ %l0 + 6 ], %l1 } /* 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); 2025018: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 202501c: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2025020: e2 26 60 38 st %l1, [ %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); 2025024: b4 06 80 18 add %i2, %i0, %i2 2025028: 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 + 202502c: a4 06 80 12 add %i2, %l2, %l2 2025030: e4 26 60 34 st %l2, [ %i1 + 0x34 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2025034: 81 c7 e0 08 ret 2025038: 81 e8 00 00 restore sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 202503c: 81 c7 e0 08 ret <== NOT EXECUTED 2025040: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025044: b0 10 00 08 mov %o0, %i0 <== 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; } 2025048: 81 c7 e0 08 ret 202504c: 81 e8 00 00 restore =============================================================================== 02025824 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2025824: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2025828: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 202582c: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2025830: 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)) && 2025834: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2025838: 80 a0 60 01 cmp %g1, 1 202583c: 12 80 00 0d bne 2025870 <== ALWAYS TAKEN 2025840: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 2025844: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2025848: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202584c: 32 80 00 0a bne,a 2025874 <== NOT EXECUTED 2025850: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025854: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 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)) && 2025858: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 202585c: 22 80 00 06 be,a 2025874 <== NOT EXECUTED 2025860: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2025864: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2025868: 10 80 00 18 b 20258c8 <== NOT EXECUTED 202586c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2025870: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2025874: 10 80 00 0d b 20258a8 2025878: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 202587c: 92 10 00 1b mov %i3, %o1 2025880: 40 00 5c 9d call 203caf4 2025884: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2025888: 80 a2 20 00 cmp %o0, 0 202588c: 12 80 00 10 bne 20258cc <== NEVER TAKEN 2025890: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2025894: c2 17 20 06 lduh [ %i4 + 6 ], %g1 2025898: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 202589c: 82 00 80 01 add %g2, %g1, %g1 20258a0: 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; 20258a4: 82 10 00 1b mov %i3, %g1 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20258a8: f6 07 bf fc ld [ %fp + -4 ], %i3 20258ac: c6 07 20 0c ld [ %i4 + 0xc ], %g3 20258b0: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 20258b4: 86 0e c0 03 and %i3, %g3, %g3 20258b8: 80 a0 c0 02 cmp %g3, %g2 20258bc: 0a bf ff f0 bcs 202587c 20258c0: 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; 20258c4: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 20258c8: 90 10 20 00 clr %o0 } 20258cc: 81 c7 e0 08 ret 20258d0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02025050 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2025050: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 2025054: 82 10 3f ff mov -1, %g1 2025058: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 202505c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 2025060: c0 27 bf f8 clr [ %fp + -8 ] fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2025064: ba 10 00 18 mov %i0, %i5 uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 2025068: 80 a6 80 01 cmp %i2, %g1 202506c: 1a 80 00 3a bcc 2025154 2025070: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 return rc; assert(fat_fd->fat_file_size); 2025074: 80 a0 60 00 cmp %g1, 0 2025078: 32 80 00 0a bne,a 20250a0 <== ALWAYS TAKEN 202507c: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2025080: 11 00 81 8a sethi %hi(0x2062800), %o0 <== NOT EXECUTED 2025084: 15 00 81 8a sethi %hi(0x2062800), %o2 <== NOT EXECUTED 2025088: 17 00 81 8a sethi %hi(0x2062800), %o3 <== NOT EXECUTED 202508c: 90 12 20 90 or %o0, 0x90, %o0 <== NOT EXECUTED 2025090: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2025094: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 2025098: 40 00 07 ec call 2027048 <__assert_func> <== NOT EXECUTED 202509c: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 20250a0: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 20250a4: 86 00 ff ff add %g3, -1, %g3 20250a8: b4 00 c0 1a add %g3, %i2, %i2 20250ac: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 20250b0: 85 2e 80 02 sll %i2, %g2, %g2 20250b4: 80 a0 80 01 cmp %g2, %g1 20250b8: 1a 80 00 28 bcc 2025158 <== NEVER TAKEN 20250bc: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 20250c0: 80 a6 a0 00 cmp %i2, 0 20250c4: 02 80 00 0a be 20250ec <== ALWAYS TAKEN 20250c8: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 20250cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20250d0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20250d4: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20250d8: 7f ff fe f1 call 2024c9c <== NOT EXECUTED 20250dc: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20250e0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20250e4: 12 80 00 1d bne 2025158 <== NOT EXECUTED 20250e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20250ec: 92 10 00 19 mov %i1, %o1 20250f0: 94 10 00 1a mov %i2, %o2 20250f4: 7f ff fe ea call 2024c9c 20250f8: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20250fc: 80 a2 60 00 cmp %o1, 0 2025100: 12 80 00 16 bne 2025158 <== NEVER TAKEN 2025104: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 2025108: d2 07 bf f8 ld [ %fp + -8 ], %o1 202510c: 40 00 5f 99 call 203cf70 2025110: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 2025114: 92 92 20 00 orcc %o0, 0, %o1 2025118: 12 80 00 10 bne 2025158 <== NEVER TAKEN 202511c: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 2025120: 02 80 00 0e be 2025158 <== ALWAYS TAKEN 2025124: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 2025128: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 202512c: 40 00 5e e2 call 203ccb4 <== NOT EXECUTED 2025130: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2025134: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2025138: 12 80 00 08 bne 2025158 <== NOT EXECUTED 202513c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2025140: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2025144: c2 26 60 38 st %g1, [ %i1 + 0x38 ] <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 2025148: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 202514c: 10 80 00 03 b 2025158 <== NOT EXECUTED 2025150: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 2025154: 92 10 20 00 clr %o1 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; } 2025158: 81 c7 e0 08 ret 202515c: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020254dc : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20254dc: 9d e3 bf 98 save %sp, -104, %sp int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 20254e0: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 20254e4: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20254e8: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20254ec: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 20254f0: 80 a6 e0 00 cmp %i3, 0 20254f4: 02 80 00 79 be 20256d8 <== NEVER TAKEN 20254f8: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20254fc: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2025500: 80 a6 80 01 cmp %i2, %g1 2025504: 18 80 00 09 bgu 2025528 <== NEVER TAKEN 2025508: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 202550c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 2025510: 80 a6 c0 01 cmp %i3, %g1 2025514: 18 80 00 05 bgu 2025528 <== NEVER TAKEN 2025518: 82 20 40 1b sub %g1, %i3, %g1 202551c: 80 a6 80 01 cmp %i2, %g1 2025520: 08 80 00 07 bleu 202553c <== ALWAYS TAKEN 2025524: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2025528: 40 00 6e 56 call 2040e80 <__errno> <== NOT EXECUTED 202552c: 01 00 00 00 nop <== NOT EXECUTED 2025530: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2025534: 10 80 00 68 b 20256d4 <== NOT EXECUTED 2025538: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 202553c: 90 10 00 18 mov %i0, %o0 2025540: 92 10 00 19 mov %i1, %o1 2025544: 94 10 00 11 mov %l1, %o2 2025548: 7f ff ff 69 call 20252ec 202554c: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025550: 80 a2 20 00 cmp %o0, 0 2025554: 12 80 00 61 bne 20256d8 <== NEVER TAKEN 2025558: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 202555c: 80 a0 40 11 cmp %g1, %l1 2025560: 32 80 00 02 bne,a 2025568 <== NEVER TAKEN 2025564: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2025568: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 202556c: 80 a0 60 01 cmp %g1, 1 2025570: 32 80 00 1c bne,a 20255e0 2025574: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2025578: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 202557c: 80 a0 60 00 cmp %g1, 0 2025580: 32 80 00 18 bne,a 20255e0 <== NEVER TAKEN 2025584: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025588: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202558c: 80 88 60 03 btst 3, %g1 2025590: 22 80 00 14 be,a 20255e0 <== NEVER TAKEN 2025594: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2025598: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 202559c: 7f ff fd 82 call 2024ba4 20255a0: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 20255a4: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20255a8: d4 14 00 00 lduh [ %l0 ], %o2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20255ac: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20255b0: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 20255b4: 92 02 00 09 add %o0, %o1, %o1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 20255b8: 94 0e 80 0a and %i2, %o2, %o2 20255bc: 90 10 00 1d mov %i5, %o0 20255c0: 96 10 00 1b mov %i3, %o3 20255c4: 40 00 01 c9 call 2025ce8 <_fat_block_write> 20255c8: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20255cc: 80 a2 20 00 cmp %o0, 0 20255d0: 16 80 00 42 bge 20256d8 <== ALWAYS TAKEN 20255d4: 01 00 00 00 nop sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20255d8: 10 80 00 40 b 20256d8 <== NOT EXECUTED 20255dc: 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); 20255e0: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20255e4: a5 36 80 12 srl %i2, %l2, %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20255e8: a6 07 bf f8 add %fp, -8, %l3 20255ec: 90 10 00 1d mov %i5, %o0 20255f0: 92 10 00 19 mov %i1, %o1 20255f4: 94 10 00 12 mov %l2, %o2 20255f8: 7f ff fd a9 call 2024c9c 20255fc: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 2025600: 90 92 60 00 orcc %o1, 0, %o0 2025604: 12 80 00 35 bne 20256d8 <== NEVER TAKEN 2025608: a3 2c 60 10 sll %l1, 0x10, %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 202560c: a3 34 60 10 srl %l1, 0x10, %l1 2025610: a2 04 7f ff add %l1, -1, %l1 2025614: a8 10 20 00 clr %l4 2025618: b4 0e 80 11 and %i2, %l1, %i2 202561c: a2 10 20 00 clr %l1 2025620: 10 80 00 21 b 20256a4 2025624: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2025628: b0 26 00 15 sub %i0, %l5, %i0 202562c: 80 a6 00 1b cmp %i0, %i3 2025630: 38 80 00 02 bgu,a 2025638 2025634: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025638: d2 07 bf f8 ld [ %fp + -8 ], %o1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 202563c: f0 27 bf fc st %i0, [ %fp + -4 ] sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025640: 7f ff fd 59 call 2024ba4 2025644: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 2025648: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 202564c: d4 14 00 00 lduh [ %l0 ], %o2 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2025650: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2025654: 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(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 2025658: 92 02 00 09 add %o0, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 202565c: 94 0d 40 0a and %l5, %o2, %o2 2025660: 90 10 00 1d mov %i5, %o0 2025664: 96 10 00 18 mov %i0, %o3 2025668: 40 00 01 a0 call 2025ce8 <_fat_block_write> 202566c: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2025670: 80 a2 20 00 cmp %o0, 0 2025674: 06 80 00 18 bl 20256d4 <== NEVER TAKEN 2025678: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 202567c: e8 07 bf f8 ld [ %fp + -8 ], %l4 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2025680: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 2025684: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025688: 90 10 00 1d mov %i5, %o0 202568c: 92 10 00 14 mov %l4, %o1 2025690: 40 00 5d 19 call 203caf4 2025694: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2025698: 80 a2 20 00 cmp %o0, 0 202569c: 12 80 00 0f bne 20256d8 <== NEVER TAKEN 20256a0: aa 10 20 00 clr %l5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20256a4: 80 a6 e0 00 cmp %i3, 0 20256a8: 32 bf ff e0 bne,a 2025628 20256ac: f0 14 20 06 lduh [ %l0 + 6 ], %i0 } /* 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); 20256b0: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20256b4: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20256b8: e8 26 60 38 st %l4, [ %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); 20256bc: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 20256c0: 90 10 00 11 mov %l1, %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); 20256c4: 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 + 20256c8: a4 06 80 12 add %i2, %l2, %l2 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 20256cc: 10 80 00 03 b 20256d8 20256d0: e4 26 60 34 st %l2, [ %i1 + 0x34 ] sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 20256d4: 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; } 20256d8: 81 c7 e0 08 ret 20256dc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0203cf70 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 203cf70: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 203cf74: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 203cf78: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 203cf7c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 203cf80: c0 27 bf fc clr [ %fp + -4 ] uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; 203cf84: b4 10 00 19 mov %i1, %i2 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 203cf88: 10 80 00 19 b 203cfec 203cf8c: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 203cf90: 92 10 00 1a mov %i2, %o1 203cf94: 7f ff fe d8 call 203caf4 203cf98: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 203cf9c: b0 92 20 00 orcc %o0, 0, %i0 203cfa0: 02 80 00 0b be 203cfcc <== ALWAYS TAKEN 203cfa4: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 203cfa8: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 203cfac: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 203cfb0: 02 80 00 03 be 203cfbc <== NOT EXECUTED 203cfb4: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 203cfb8: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 203cfbc: 7f ff a2 d0 call 2025afc <== NOT EXECUTED 203cfc0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 203cfc4: 81 c7 e0 08 ret <== NOT EXECUTED 203cfc8: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 203cfcc: 92 10 00 1a mov %i2, %o1 203cfd0: 7f ff ff 39 call 203ccb4 203cfd4: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 203cfd8: 80 a2 20 00 cmp %o0, 0 203cfdc: 32 80 00 02 bne,a 203cfe4 <== NEVER TAKEN 203cfe0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 203cfe4: f4 07 bf fc ld [ %fp + -4 ], %i2 rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 203cfe8: b6 06 e0 01 inc %i3 fat_fs_info_t *fs_info = mt_entry->fs_info; 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) 203cfec: c4 07 20 0c ld [ %i4 + 0xc ], %g2 203cff0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 203cff4: 84 0e 80 02 and %i2, %g2, %g2 203cff8: 80 a0 80 01 cmp %g2, %g1 203cffc: 0a bf ff e5 bcs 203cf90 203d000: 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) 203d004: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 203d008: 80 a0 7f ff cmp %g1, -1 203d00c: 02 80 00 04 be 203d01c <== ALWAYS TAKEN 203d010: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 203d014: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 203d018: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 203d01c: 90 10 00 1c mov %i4, %o0 203d020: 7f ff a2 b7 call 2025afc 203d024: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 203d028: 81 c7 e0 08 ret 203d02c: 81 e8 00 00 restore =============================================================================== 02025fc8 : fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 2025fc8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2025fcc: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2025fd0: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 <== NOT EXECUTED 2025fd4: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 <== NOT EXECUTED 2025fd8: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 2025fdc: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2025fe0: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 2025fe4: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 2025fe8: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 2025fec: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 2025ff0: 81 c3 e0 08 retl <== NOT EXECUTED 2025ff4: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 0203caf4 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 203caf4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 203caf8: c0 27 bf fc clr [ %fp + -4 ] uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 203cafc: 80 a6 60 01 cmp %i1, 1 203cb00: 08 80 00 64 bleu 203cc90 <== NEVER TAKEN 203cb04: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 203cb08: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 203cb0c: 82 00 60 01 inc %g1 203cb10: 80 a6 40 01 cmp %i1, %g1 203cb14: 18 80 00 5f bgu 203cc90 <== NEVER TAKEN 203cb18: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 203cb1c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 203cb20: b7 36 60 01 srl %i1, 1, %i3 203cb24: 84 88 60 01 andcc %g1, 1, %g2 203cb28: 12 80 00 06 bne 203cb40 <== ALWAYS TAKEN 203cb2c: b6 06 c0 19 add %i3, %i1, %i3 203cb30: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203cb34: 02 80 00 03 be 203cb40 <== NOT EXECUTED 203cb38: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 203cb3c: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 203cb40: 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); 203cb44: b9 36 60 01 srl %i1, 1, %i4 /* 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) + 203cb48: b7 36 c0 03 srl %i3, %g3, %i3 203cb4c: c6 07 60 4c ld [ %i5 + 0x4c ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 203cb50: b8 07 00 19 add %i4, %i1, %i4 203cb54: 80 a0 a0 00 cmp %g2, 0 203cb58: 12 80 00 06 bne 203cb70 <== ALWAYS TAKEN 203cb5c: b6 06 c0 03 add %i3, %g3, %i3 203cb60: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203cb64: 02 80 00 03 be 203cb70 <== NOT EXECUTED 203cb68: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 203cb6c: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 203cb70: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 203cb74: 90 10 00 1d mov %i5, %o0 203cb78: 92 10 00 1b mov %i3, %o1 203cb7c: 94 10 20 01 mov 1, %o2 203cb80: 7f ff a3 61 call 2025904 203cb84: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 203cb88: b0 92 20 00 orcc %o0, 0, %i0 203cb8c: 12 80 00 38 bne 203cc6c <== NEVER TAKEN 203cb90: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 203cb94: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 203cb98: 80 a0 60 02 cmp %g1, 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); 203cb9c: a1 34 20 10 srl %l0, 0x10, %l0 203cba0: a0 04 3f ff add %l0, -1, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 203cba4: 02 80 00 27 be 203cc40 <== NEVER TAKEN 203cba8: b8 0f 00 10 and %i4, %l0, %i4 203cbac: 80 a0 60 04 cmp %g1, 4 203cbb0: 02 80 00 31 be 203cc74 <== NEVER TAKEN 203cbb4: 80 a0 60 01 cmp %g1, 1 203cbb8: 12 80 00 36 bne 203cc90 <== NEVER TAKEN 203cbbc: c2 07 bf fc ld [ %fp + -4 ], %g1 /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) 203cbc0: c6 17 40 00 lduh [ %i5 ], %g3 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 203cbc4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 203cbc8: 86 00 ff ff add %g3, -1, %g3 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 203cbcc: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 203cbd0: 80 a7 00 03 cmp %i4, %g3 203cbd4: 12 80 00 0f bne 203cc10 <== ALWAYS TAKEN 203cbd8: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203cbdc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203cbe0: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203cbe4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203cbe8: 7f ff a3 47 call 2025904 <== NOT EXECUTED 203cbec: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203cbf0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 203cbf4: 12 80 00 2d bne 203cca8 <== NOT EXECUTED 203cbf8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 203cbfc: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 203cc00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 203cc04: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 203cc08: 10 80 00 05 b 203cc1c <== NOT EXECUTED 203cc0c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 203cc10: b8 00 80 1c add %g2, %i4, %i4 203cc14: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 203cc18: 85 28 a0 08 sll %g2, 8, %g2 203cc1c: 82 10 80 01 or %g2, %g1, %g1 203cc20: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 203cc24: 80 8e 60 01 btst 1, %i1 203cc28: 02 80 00 04 be 203cc38 203cc2c: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 203cc30: 10 80 00 0e b 203cc68 203cc34: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 203cc38: 10 80 00 0c b 203cc68 203cc3c: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 203cc40: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203cc44: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 203cc48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203cc4c: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 203cc50: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203cc54: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 203cc58: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 203cc5c: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 203cc60: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 203cc64: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 203cc68: c2 26 80 00 st %g1, [ %i2 ] break; 203cc6c: 81 c7 e0 08 ret 203cc70: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 203cc74: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203cc78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 203cc7c: 7f ff ff 92 call 203cac4 <== NOT EXECUTED 203cc80: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 203cc84: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 203cc88: 81 c7 e0 08 ret <== NOT EXECUTED 203cc8c: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 203cc90: 40 00 10 7c call 2040e80 <__errno> <== NOT EXECUTED 203cc94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203cc98: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203cc9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 203cca0: 81 c7 e0 08 ret <== NOT EXECUTED 203cca4: 81 e8 00 00 restore <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) 203cca8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 203ccac: 81 c7 e0 08 ret <== NOT EXECUTED 203ccb0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02025ef8 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2025ef8: 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)) 2025efc: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 2025f00: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 2025f04: 10 80 00 2a b 2025fac <== NOT EXECUTED 2025f08: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 2025f0c: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED 2025f10: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2025f14: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 2025f18: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 2025f1c: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 2025f20: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 2025f24: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 2025f28: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 2025f2c: 12 80 00 0a bne 2025f54 <== NOT EXECUTED 2025f30: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 2025f34: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2025f38: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2025f3c: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2025f40: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2025f44: f0 07 60 6c ld [ %i5 + 0x6c ], %i0 <== NOT EXECUTED 2025f48: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2025f4c: 81 c7 e0 08 ret <== NOT EXECUTED 2025f50: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2025f54: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2025f58: 0a 80 00 03 bcs 2025f64 <== NOT EXECUTED 2025f5c: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED fs_info->index = 0; 2025f60: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2025f64: 92 02 60 01 inc %o1 <== NOT EXECUTED 2025f68: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2025f6c: 32 bf ff e8 bne,a 2025f0c <== NOT EXECUTED 2025f70: c6 07 60 68 ld [ %i5 + 0x68 ], %g3 <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 2025f74: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2025f78: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2025f7c: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2025f80: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 2025f84: 1a 80 00 0d bcc 2025fb8 <== NOT EXECUTED 2025f88: 01 00 00 00 nop <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 2025f8c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 2025f90: 7f ff 8e b3 call 2009a5c <== NOT EXECUTED 2025f94: d2 27 60 70 st %o1, [ %i5 + 0x70 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2025f98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025f9c: 02 80 00 09 be 2025fc0 <== NOT EXECUTED 2025fa0: d0 27 60 68 st %o0, [ %i5 + 0x68 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 2025fa4: c2 07 60 70 ld [ %i5 + 0x70 ], %g1 <== NOT EXECUTED 2025fa8: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2025fac: f0 07 60 70 ld [ %i5 + 0x70 ], %i0 <== NOT EXECUTED 2025fb0: 10 bf ff ee b 2025f68 <== NOT EXECUTED 2025fb4: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2025fb8: 81 c7 e0 08 ret <== NOT EXECUTED 2025fbc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2025fc0: 81 c7 e0 08 ret <== NOT EXECUTED 2025fc4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02025e40 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2025e40: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2025e44: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = start_cln; 2025e48: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2025e4c: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2025e50: 92 10 20 01 mov 1, %o1 2025e54: 7f ff 89 6b call 2008400 2025e58: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2025e5c: b6 92 20 00 orcc %o0, 0, %i3 2025e60: 12 80 00 1b bne 2025ecc <== ALWAYS TAKEN 2025e64: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2025e68: 40 00 6c 06 call 2040e80 <__errno> <== NOT EXECUTED 2025e6c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2025e70: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2025e74: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025e78: 81 c7 e0 08 ret <== NOT EXECUTED 2025e7c: 81 e8 00 00 restore <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 2025e80: 7f ff ff da call 2025de8 2025e84: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2025e88: 80 a2 3f ff cmp %o0, -1 2025e8c: 12 80 00 06 bne 2025ea4 <== ALWAYS TAKEN 2025e90: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2025e94: 7f ff 8a 39 call 2008778 <== NOT EXECUTED 2025e98: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2025e9c: 81 c7 e0 08 ret <== NOT EXECUTED 2025ea0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025ea4: 90 10 00 1c mov %i4, %o0 2025ea8: 40 00 5b 13 call 203caf4 2025eac: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2025eb0: b0 92 20 00 orcc %o0, 0, %i0 2025eb4: 02 80 00 06 be 2025ecc <== ALWAYS TAKEN 2025eb8: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2025ebc: 7f ff 8a 2f call 2008778 <== NOT EXECUTED 2025ec0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2025ec4: 81 c7 e0 08 ret <== NOT EXECUTED 2025ec8: 81 e8 00 00 restore <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2025ecc: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2025ed0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2025ed4: 84 0a 40 02 and %o1, %g2, %g2 2025ed8: 80 a0 80 01 cmp %g2, %g1 2025edc: 0a bf ff e9 bcs 2025e80 2025ee0: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 2025ee4: 90 10 00 1b mov %i3, %o0 2025ee8: 7f ff 8a 24 call 2008778 2025eec: b0 10 20 00 clr %i0 return rc; } 2025ef0: 81 c7 e0 08 ret 2025ef4: 81 e8 00 00 restore =============================================================================== 02026194 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 2026194: 9d e3 bf 10 save %sp, -240, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2026198: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(mt_entry->dev, O_RDWR); 202619c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 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; 20261a0: c0 27 bf fc clr [ %fp + -4 ] vol->fd = open(mt_entry->dev, O_RDWR); 20261a4: 7f ff 8d 54 call 20096f4 20261a8: 92 10 20 02 mov 2, %o1 if (vol->fd < 0) 20261ac: 80 a2 20 00 cmp %o0, 0 20261b0: 06 80 00 09 bl 20261d4 <== NEVER TAKEN 20261b4: d0 27 60 54 st %o0, [ %i5 + 0x54 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 20261b8: 40 00 05 13 call 2027604 20261bc: 92 07 bf a8 add %fp, -88, %o1 if (rc != 0) 20261c0: 80 a2 20 00 cmp %o0, 0 20261c4: 02 80 00 08 be 20261e4 <== ALWAYS TAKEN 20261c8: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 { close(vol->fd); 20261cc: 7f ff 88 b2 call 2008494 <== NOT EXECUTED 20261d0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 20261d4: 40 00 6b 2b call 2040e80 <__errno> <== NOT EXECUTED 20261d8: 01 00 00 00 nop <== NOT EXECUTED 20261dc: 10 80 01 c4 b 20268ec <== NOT EXECUTED 20261e0: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20261e4: c4 07 bf b4 ld [ %fp + -76 ], %g2 20261e8: 03 00 00 3c sethi %hi(0xf000), %g1 20261ec: 84 08 80 01 and %g2, %g1, %g2 20261f0: 03 00 00 18 sethi %hi(0x6000), %g1 20261f4: 80 a0 80 01 cmp %g2, %g1 20261f8: 12 bf ff f5 bne 20261cc <== NEVER TAKEN 20261fc: 01 00 00 00 nop static inline int rtems_disk_fd_get_disk_device( int fd, const rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 2026200: 13 10 01 10 sethi %hi(0x40044000), %o1 2026204: 94 07 60 58 add %i5, 0x58, %o2 2026208: 7f ff 89 b3 call 20088d4 202620c: 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) { 2026210: b8 92 20 00 orcc %o0, 0, %i4 2026214: 22 80 00 04 be,a 2026224 <== ALWAYS TAKEN 2026218: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 close(vol->fd); 202621c: 10 bf ff ec b 20261cc <== NOT EXECUTED 2026220: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 2026224: 92 10 20 00 clr %o1 2026228: 7f ff 80 11 call 200626c 202622c: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) 2026230: 80 a2 20 00 cmp %o0, 0 2026234: 12 80 00 35 bne 2026308 <== NEVER TAKEN 2026238: 01 00 00 00 nop { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 202623c: d0 07 bf fc ld [ %fp + -4 ], %o0 2026240: de 02 20 1c ld [ %o0 + 0x1c ], %o7 2026244: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 2026248: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 202624c: d6 2f bf 98 stb %o3, [ %fp + -104 ] 2026250: d6 0b e0 22 ldub [ %o7 + 0x22 ], %o3 2026254: f4 2f bf 9a stb %i2, [ %fp + -102 ] 2026258: d6 2f bf 99 stb %o3, [ %fp + -103 ] 202625c: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 2026260: f4 0b e0 23 ldub [ %o7 + 0x23 ], %i2 2026264: d6 2f bf 9d stb %o3, [ %fp + -99 ] 2026268: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 202626c: f4 2f bf 97 stb %i2, [ %fp + -105 ] 2026270: d6 2f bf 9c stb %o3, [ %fp + -100 ] 2026274: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 2026278: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 202627c: d6 2f bf 9b stb %o3, [ %fp + -101 ] 2026280: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 2026284: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 2026288: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 202628c: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 2026290: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 2026294: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2026298: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 202629c: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 20262a0: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 20262a4: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 20262a8: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 20262ac: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 20262b0: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 20262b4: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 20262b8: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 20262bc: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 20262c0: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 20262c4: d6 2f bf a7 stb %o3, [ %fp + -89 ] 20262c8: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 20262cc: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 20262d0: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 20262d4: c2 27 bf 8c st %g1, [ %fp + -116 ] 20262d8: c4 3f bf 80 std %g2, [ %fp + -128 ] 20262dc: c8 27 bf 7c st %g4, [ %fp + -132 ] 20262e0: d8 3f bf 70 std %o4, [ %fp + -144 ] { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 20262e4: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 20262e8: 7f ff 80 6b call 2006494 20262ec: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 20262f0: c2 07 bf 8c ld [ %fp + -116 ], %g1 20262f4: 80 a2 20 00 cmp %o0, 0 20262f8: c4 1f bf 80 ldd [ %fp + -128 ], %g2 20262fc: c8 07 bf 7c ld [ %fp + -132 ], %g4 2026300: 02 80 00 08 be 2026320 <== ALWAYS TAKEN 2026304: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { close(vol->fd); 2026308: 7f ff 88 63 call 2008494 <== NOT EXECUTED 202630c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2026310: 40 00 6a dc call 2040e80 <__errno> <== NOT EXECUTED 2026314: 01 00 00 00 nop <== NOT EXECUTED 2026318: 10 80 01 75 b 20268ec <== NOT EXECUTED 202631c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 2026320: 98 0b 20 ff and %o4, 0xff, %o4 2026324: 9a 0b 60 ff and %o5, 0xff, %o5 2026328: 99 2b 20 08 sll %o4, 8, %o4 202632c: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 2026330: 9f 2b 60 10 sll %o5, 0x10, %o7 2026334: 9f 33 e0 10 srl %o7, 0x10, %o7 2026338: 80 a3 e4 00 cmp %o7, 0x400 202633c: 02 80 00 0b be 2026368 <== NEVER TAKEN 2026340: da 37 40 00 sth %o5, [ %i5 ] 2026344: 80 a3 e2 00 cmp %o7, 0x200 2026348: 22 80 00 09 be,a 202636c <== ALWAYS TAKEN 202634c: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 2026350: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 2026354: 02 80 00 05 be 2026368 <== NOT EXECUTED 2026358: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 202635c: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 2026360: 12 80 00 d2 bne 20266a8 <== NOT EXECUTED 2026364: 01 00 00 00 nop <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2026368: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 202636c: c0 2f 60 03 clrb [ %i5 + 3 ] 2026370: 10 80 00 05 b 2026384 2026374: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 2026378: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 202637c: 98 03 20 01 inc %o4 <== NOT EXECUTED 2026380: d8 2f 60 03 stb %o4, [ %i5 + 3 ] <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 2026384: 80 8b e0 01 btst 1, %o7 2026388: 22 bf ff fc be,a 2026378 <== NEVER TAKEN 202638c: d8 0f 60 03 ldub [ %i5 + 3 ], %o4 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2026390: 9b 2b 60 10 sll %o5, 0x10, %o5 2026394: c0 2f 60 02 clrb [ %i5 + 2 ] 2026398: 93 33 60 10 srl %o5, 0x10, %o1 202639c: 10 80 00 05 b 20263b0 20263a0: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 20263a4: 9f 3b e0 01 sra %o7, 1, %o7 20263a8: 9a 03 60 01 inc %o5 20263ac: da 2f 60 02 stb %o5, [ %i5 + 2 ] rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 20263b0: 80 8b e0 01 btst 1, %o7 20263b4: 22 bf ff fc be,a 20263a4 20263b8: da 0f 60 02 ldub [ %i5 + 2 ], %o5 vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 20263bc: 9a 8e e0 ff andcc %i3, 0xff, %o5 20263c0: 02 80 00 ba be 20266a8 <== NEVER TAKEN 20263c4: f6 2f 60 04 stb %i3, [ %i5 + 4 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 20263c8: 10 80 00 05 b 20263dc 20263cc: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 20263d0: 9e 03 e0 01 inc %o7 20263d4: 9b 3b 60 01 sra %o5, 1, %o5 20263d8: de 2f 60 05 stb %o7, [ %i5 + 5 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 20263dc: 80 8b 60 01 btst 1, %o5 20263e0: 02 bf ff fc be 20263d0 20263e4: de 0f 60 05 ldub [ %i5 + 5 ], %o7 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) 20263e8: 9f 2a 40 0f sll %o1, %o7, %o7 20263ec: de 37 60 06 sth %o7, [ %i5 + 6 ] 20263f0: 1b 00 00 20 sethi %hi(0x8000), %o5 20263f4: 9f 2b e0 10 sll %o7, 0x10, %o7 20263f8: 9f 33 e0 10 srl %o7, 0x10, %o7 20263fc: 80 a3 c0 0d cmp %o7, %o5 2026400: 18 80 00 aa bgu 20266a8 <== NEVER TAKEN 2026404: 01 00 00 00 nop { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 2026408: 10 80 00 05 b 202641c 202640c: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 2026410: 9f 3b e0 01 sra %o7, 1, %o7 2026414: 9a 03 60 01 inc %o5 2026418: da 2f 60 08 stb %o5, [ %i5 + 8 ] { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 202641c: 80 8b e0 01 btst 1, %o7 2026420: 22 bf ff fc be,a 2026410 2026424: da 0f 60 08 ldub [ %i5 + 8 ], %o5 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); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026428: 84 08 a0 ff and %g2, 0xff, %g2 202642c: 85 28 a0 08 sll %g2, 8, %g2 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 2026430: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2026434: 88 09 20 ff and %g4, 0xff, %g4 2026438: 86 08 e0 ff and %g3, 0xff, %g3 202643c: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026440: 82 08 60 ff and %g1, 0xff, %g1 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); 2026444: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026448: 82 10 80 01 or %g2, %g1, %g1 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); 202644c: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026450: c2 37 60 20 sth %g1, [ %i5 + 0x20 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2026454: 84 02 7f ff add %o1, -1, %g2 2026458: 83 28 60 10 sll %g1, 0x10, %g1 202645c: c6 27 bf 84 st %g3, [ %fp + -124 ] 2026460: 91 30 60 0b srl %g1, 0xb, %o0 2026464: 40 00 d0 75 call 205a638 <.div> 2026468: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 202646c: c4 0f 60 02 ldub [ %i5 + 2 ], %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)) / 2026470: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2026474: 85 2a 00 02 sll %o0, %g2, %g2 2026478: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 202647c: c4 0f bf 98 ldub [ %fp + -104 ], %g2 2026480: ae 0d e0 ff and %l7, 0xff, %l7 2026484: 85 28 a0 08 sll %g2, 8, %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)) / 2026488: 82 10 00 08 mov %o0, %g1 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 202648c: ae 10 80 17 or %g2, %l7, %l7 2026490: af 2d e0 10 sll %l7, 0x10, %l7 2026494: 80 a5 e0 00 cmp %l7, 0 2026498: 02 80 00 05 be 20264ac <== NEVER TAKEN 202649c: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 20264a0: af 35 e0 10 srl %l7, 0x10, %l7 20264a4: 10 80 00 0c b 20264d4 20264a8: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 20264ac: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 20264b0: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 20264b4: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 20264b8: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 20264bc: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 20264c0: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 20264c4: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 20264c8: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 20264cc: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 20264d0: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 20264d4: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20264d8: 87 28 e0 10 sll %g3, 0x10, %g3 20264dc: c2 27 bf 8c st %g1, [ %fp + -116 ] 20264e0: a7 30 e0 10 srl %g3, 0x10, %l3 20264e4: 7f ff 72 36 call 2002dbc <.umul> 20264e8: 90 0e 60 ff and %i1, 0xff, %o0 20264ec: c2 07 bf 8c ld [ %fp + -116 ], %g1 20264f0: 90 04 c0 08 add %l3, %o0, %o0 20264f4: 82 00 40 08 add %g1, %o0, %g1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 20264f8: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 20264fc: a4 0c a0 ff and %l2, 0xff, %l2 2026500: a2 0c 60 ff and %l1, 0xff, %l1 2026504: a5 2c a0 08 sll %l2, 8, %l2 2026508: a2 14 80 11 or %l2, %l1, %l1 202650c: a3 2c 60 10 sll %l1, 0x10, %l1 2026510: 80 a4 60 00 cmp %l1, 0 2026514: 02 80 00 05 be 2026528 <== NEVER TAKEN 2026518: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 202651c: a3 34 60 10 srl %l1, 0x10, %l1 2026520: 10 80 00 0d b 2026554 2026524: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2026528: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 202652c: c4 0f bf 99 ldub [ %fp + -103 ], %g2 <== NOT EXECUTED 2026530: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 2026534: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 2026538: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 202653c: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED 2026540: 84 14 00 02 or %l0, %g2, %g2 <== NOT EXECUTED 2026544: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2026548: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 202654c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2026550: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 2026554: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 2026558: 92 0e e0 ff and %i3, 0xff, %o1 202655c: 40 00 d0 35 call 205a630 <.udiv> 2026560: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 2026564: 80 a2 2f f4 cmp %o0, 0xff4 2026568: 18 80 00 08 bgu 2026588 <== NEVER TAKEN 202656c: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2026570: 82 10 20 01 mov 1, %g1 2026574: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2026578: 82 10 2f ff mov 0xfff, %g1 202657c: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2026580: 10 80 00 0f b 20265bc 2026584: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2026588: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 202658c: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2026590: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2026594: 38 80 00 05 bgu,a 20265a8 <== NOT EXECUTED 2026598: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 202659c: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 20265a0: 10 80 00 04 b 20265b0 <== NOT EXECUTED 20265a4: c4 2f 60 0a stb %g2, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 20265a8: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 20265ac: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 20265b0: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 20265b4: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 20265b8: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 20265bc: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 20265c0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 20265c4: 80 a0 60 04 cmp %g1, 4 20265c8: 12 80 00 6f bne 2026784 <== ALWAYS TAKEN 20265cc: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 20265d0: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 20265d4: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 20265d8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20265dc: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20265e0: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 20265e4: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20265e8: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 20265ec: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20265f0: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 20265f4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20265f8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 20265fc: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 2026600: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2026604: 02 80 00 05 be 2026618 <== NOT EXECUTED 2026608: c2 2f 60 48 stb %g1, [ %i5 + 0x48 ] <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 202660c: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 2026610: 10 80 00 03 b 202661c <== NOT EXECUTED 2026614: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 2026618: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 202661c: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 2026620: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 2026624: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 2026628: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 202662c: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 2026630: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 2026634: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2026638: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 202663c: 02 80 00 1b be 20266a8 <== NOT EXECUTED 2026640: 01 00 00 00 nop <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 2026644: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2026648: 94 10 20 00 clr %o2 <== NOT EXECUTED 202664c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026650: 7f ff fd 84 call 2025c60 <_fat_block_read> <== NOT EXECUTED 2026654: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2026658: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202665c: 06 80 00 23 bl 20266e8 <== NOT EXECUTED 2026660: 01 00 00 00 nop <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2026664: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 2026668: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 202666c: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2026670: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2026674: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2026678: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 202667c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2026680: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 2026684: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2026688: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 202668c: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2026690: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2026694: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2026698: 22 80 00 0a be,a 20266c0 <== NOT EXECUTED 202669c: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 20266a0: 7f ff fd 17 call 2025afc <== NOT EXECUTED 20266a4: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); close(vol->fd); 20266a8: 7f ff 87 7b call 2008494 <== NOT EXECUTED 20266ac: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 20266b0: 40 00 69 f4 call 2040e80 <__errno> <== NOT EXECUTED 20266b4: 01 00 00 00 nop <== NOT EXECUTED 20266b8: 10 80 00 8d b 20268ec <== NOT EXECUTED 20266bc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 20266c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20266c4: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 20266c8: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 20266cc: 7f ff fd 65 call 2025c60 <_fat_block_read> <== NOT EXECUTED 20266d0: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 20266d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20266d8: 16 80 00 08 bge 20266f8 <== NOT EXECUTED 20266dc: c4 0f bf f5 ldub [ %fp + -11 ], %g2 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 20266e0: 7f ff fd 07 call 2025afc <== NOT EXECUTED 20266e4: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); close(vol->fd); 20266e8: 7f ff 87 6b call 2008494 <== NOT EXECUTED 20266ec: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED { close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 20266f0: 10 80 00 81 b 20268f4 <== NOT EXECUTED 20266f4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 20266f8: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 20266fc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2026700: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2026704: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2026708: c4 0f bf f4 ldub [ %fp + -12 ], %g2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 202670c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2026710: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2026714: c4 0f bf f7 ldub [ %fp + -9 ], %g2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2026718: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 202671c: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 2026720: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2026724: c4 0f bf f9 ldub [ %fp + -7 ], %g2 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2026728: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 202672c: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 2026730: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2026734: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2026738: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 202673c: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2026740: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2026744: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2026748: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 202674c: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 2026750: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2026754: 7f ff fe 2e call 202600c <== NOT EXECUTED 2026758: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 202675c: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 2026760: 02 80 00 0e be 2026798 <== NOT EXECUTED 2026764: 01 00 00 00 nop <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2026768: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED 202676c: 7f ff fc e4 call 2025afc <== NOT EXECUTED 2026770: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); close(vol->fd); 2026774: 7f ff 87 48 call 2008494 <== NOT EXECUTED 2026778: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return rc; 202677c: 81 c7 e0 08 ret <== NOT EXECUTED 2026780: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 2026784: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2026788: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 202678c: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2026790: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2026794: c2 27 60 44 st %g1, [ %i5 + 0x44 ] int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 2026798: 7f ff fc d9 call 2025afc 202679c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 20267a0: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20267a4: 7f ff 71 86 call 2002dbc <.umul> 20267a8: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 20267ac: c2 17 60 14 lduh [ %i5 + 0x14 ], %g1 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 20267b0: 92 10 20 0c mov 0xc, %o1 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 20267b4: 82 02 00 01 add %o0, %g1, %g1 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 20267b8: 90 10 20 02 mov 2, %o0 20267bc: 7f ff 87 11 call 2008400 20267c0: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 20267c4: 80 a2 20 00 cmp %o0, 0 20267c8: 02 80 00 12 be 2026810 <== NEVER TAKEN 20267cc: d0 27 60 60 st %o0, [ %i5 + 0x60 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20267d0: 82 02 20 04 add %o0, 4, %g1 20267d4: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 20267d8: c2 22 00 00 st %g1, [ %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 ); 20267dc: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20267e0: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20267e4: 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; 20267e8: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 20267ec: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 20267f0: c2 22 20 14 st %g1, [ %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)); 20267f4: 92 10 20 0c mov 0xc, %o1 20267f8: 7f ff 87 02 call 2008400 20267fc: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2026800: 80 a2 20 00 cmp %o0, 0 2026804: 12 80 00 06 bne 202681c <== ALWAYS TAKEN 2026808: d0 27 60 64 st %o0, [ %i5 + 0x64 ] 202680c: 30 80 00 1c b,a 202687c <== 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); 2026810: 7f ff 87 21 call 2008494 <== NOT EXECUTED 2026814: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2026818: 30 80 00 32 b,a 20268e0 <== 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 ); 202681c: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 2026820: c2 22 00 00 st %g1, [ %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 ); 2026824: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 2026828: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 202682c: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 2026830: 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; 2026834: 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 ); 2026838: 84 02 20 10 add %o0, 0x10, %g2 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; 202683c: 82 10 21 00 mov 0x100, %g1 head->next = tail; 2026840: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2026844: c2 27 60 70 st %g1, [ %i5 + 0x70 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2026848: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 202684c: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2026850: c0 27 60 6c clr [ %i5 + 0x6c ] } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2026854: 83 28 80 01 sll %g2, %g1, %g1 2026858: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 202685c: 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; 2026860: c2 27 60 74 st %g1, [ %i5 + 0x74 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2026864: 7f ff 86 e7 call 2008400 2026868: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 202686c: 80 a2 20 00 cmp %o0, 0 2026870: 12 80 00 0d bne 20268a4 <== ALWAYS TAKEN 2026874: d0 27 60 68 st %o0, [ %i5 + 0x68 ] 2026878: 30 80 00 05 b,a 202688c <== 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); 202687c: 7f ff 87 06 call 2008494 <== NOT EXECUTED 2026880: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2026884: 10 80 00 15 b 20268d8 <== NOT EXECUTED 2026888: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { close(vol->fd); 202688c: 7f ff 87 02 call 2008494 <== NOT EXECUTED 2026890: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2026894: 7f ff 87 b9 call 2008778 <== NOT EXECUTED 2026898: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 202689c: 10 80 00 0f b 20268d8 <== NOT EXECUTED 20268a0: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 20268a4: d0 17 40 00 lduh [ %i5 ], %o0 20268a8: 7f ff 86 d6 call 2008400 20268ac: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 20268b0: 80 a2 20 00 cmp %o0, 0 20268b4: 12 80 00 10 bne 20268f4 <== ALWAYS TAKEN 20268b8: d0 27 60 84 st %o0, [ %i5 + 0x84 ] { close(vol->fd); 20268bc: 7f ff 86 f6 call 2008494 <== NOT EXECUTED 20268c0: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 20268c4: 7f ff 87 ad call 2008778 <== NOT EXECUTED 20268c8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 20268cc: 7f ff 87 ab call 2008778 <== NOT EXECUTED 20268d0: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED free(fs_info->uino); 20268d4: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 20268d8: 7f ff 87 a8 call 2008778 <== NOT EXECUTED 20268dc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 20268e0: 40 00 69 68 call 2040e80 <__errno> <== NOT EXECUTED 20268e4: 01 00 00 00 nop <== NOT EXECUTED 20268e8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 20268ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20268f0: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED } return RC_OK; } 20268f4: b0 10 00 1c mov %i4, %i0 20268f8: 81 c7 e0 08 ret 20268fc: 81 e8 00 00 restore =============================================================================== 0203d030 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 203d030: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 203d034: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 203d038: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 203d03c: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 203d040: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 203d044: ba 10 00 18 mov %i0, %i5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 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; 203d048: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 203d04c: 80 a6 a0 00 cmp %i2, 0 203d050: 02 80 00 16 be 203d0a8 <== NEVER TAKEN 203d054: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 203d058: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 203d05c: 80 a4 3f ff cmp %l0, -1 203d060: 22 80 00 02 be,a 203d068 203d064: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 203d068: a6 10 20 02 mov 2, %l3 203d06c: 10 80 00 55 b 203d1c0 203d070: 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(mt_entry, cl4find, &next_cln); 203d074: 92 10 00 10 mov %l0, %o1 203d078: 7f ff fe 9f call 203caf4 203d07c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 203d080: b0 92 20 00 orcc %o0, 0, %i0 203d084: 02 80 00 0b be 203d0b0 <== ALWAYS TAKEN 203d088: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 203d08c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 203d090: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 203d094: 02 80 00 5b be 203d200 <== NOT EXECUTED 203d098: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 203d09c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203d0a0: 7f ff ff b4 call 203cf70 <== NOT EXECUTED 203d0a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203d0a8: 81 c7 e0 08 ret <== NOT EXECUTED 203d0ac: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 203d0b0: 80 a0 60 00 cmp %g1, 0 203d0b4: 32 80 00 3f bne,a 203d1b0 203d0b8: 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) 203d0bc: c2 06 c0 00 ld [ %i3 ], %g1 203d0c0: 80 a0 60 00 cmp %g1, 0 203d0c4: 12 80 00 0b bne 203d0f0 <== NEVER TAKEN 203d0c8: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 203d0cc: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 203d0d0: 92 10 00 10 mov %l0, %o1 203d0d4: 7f ff fe f8 call 203ccb4 203d0d8: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 203d0dc: 80 a2 20 00 cmp %o0, 0 203d0e0: 22 80 00 22 be,a 203d168 <== ALWAYS TAKEN 203d0e4: c2 06 c0 00 ld [ %i3 ], %g1 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 203d0e8: 81 c7 e0 08 ret <== NOT EXECUTED 203d0ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 203d0f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 203d0f4: 7f ff fe f0 call 203ccb4 <== NOT EXECUTED 203d0f8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 203d0fc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 203d100: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 203d104: 02 80 00 07 be 203d120 <== NOT EXECUTED 203d108: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 203d10c: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203d110: 7f ff ff 98 call 203cf70 <== NOT EXECUTED 203d114: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 203d118: 81 c7 e0 08 ret <== NOT EXECUTED 203d11c: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 203d120: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 203d124: 7f ff fe e4 call 203ccb4 <== NOT EXECUTED 203d128: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 203d12c: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 203d130: 22 80 00 0e be,a 203d168 <== NOT EXECUTED 203d134: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 203d138: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203d13c: 7f ff ff 8d call 203cf70 <== NOT EXECUTED 203d140: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 203d144: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 203d148: 94 10 20 00 clr %o2 <== NOT EXECUTED 203d14c: 7f ff fe da call 203ccb4 <== NOT EXECUTED 203d150: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 203d154: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 203d158: 7f ff a2 69 call 2025afc <== NOT EXECUTED 203d15c: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 203d160: 81 c7 e0 08 ret <== NOT EXECUTED 203d164: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 203d168: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 203d16c: 80 a0 40 1a cmp %g1, %i2 203d170: 12 80 00 0e bne 203d1a8 <== NEVER TAKEN 203d174: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 203d178: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 203d17c: 80 a0 7f ff cmp %g1, -1 203d180: 02 80 00 05 be 203d194 <== ALWAYS TAKEN 203d184: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 203d188: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 203d18c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 203d190: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 203d194: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 203d198: 7f ff a2 59 call 2025afc 203d19c: 90 10 00 11 mov %l1, %o0 return rc; 203d1a0: 81 c7 e0 08 ret 203d1a4: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 203d1a8: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 203d1ac: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 203d1b0: 80 a4 00 14 cmp %l0, %l4 203d1b4: 0a 80 00 03 bcs 203d1c0 <== ALWAYS TAKEN 203d1b8: a6 04 e0 01 inc %l3 cl4find = 2; 203d1bc: 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) 203d1c0: 80 a4 c0 14 cmp %l3, %l4 203d1c4: 0a bf ff ac bcs 203d074 <== ALWAYS TAKEN 203d1c8: 90 10 00 1d mov %i5, %o0 if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 203d1cc: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 203d1d0: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 203d1d4: 02 80 00 05 be 203d1e8 <== NOT EXECUTED 203d1d8: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 203d1dc: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 203d1e0: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 203d1e4: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 203d1e8: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 203d1ec: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 203d1f0: 7f ff a2 43 call 2025afc <== NOT EXECUTED 203d1f4: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 203d1f8: 81 c7 e0 08 ret <== NOT EXECUTED 203d1fc: 81 e8 00 00 restore <== NOT EXECUTED } 203d200: 81 c7 e0 08 ret <== NOT EXECUTED 203d204: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0203ccb4 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 203ccb4: 9d e3 bf 98 save %sp, -104, %sp fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 203ccb8: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 203ccbc: 80 a6 60 01 cmp %i1, 1 203ccc0: 08 80 00 07 bleu 203ccdc <== NEVER TAKEN 203ccc4: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 203ccc8: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 203cccc: 82 00 60 01 inc %g1 203ccd0: 80 a6 40 01 cmp %i1, %g1 203ccd4: 28 80 00 08 bleu,a 203ccf4 <== ALWAYS TAKEN 203ccd8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 203ccdc: 40 00 10 69 call 2040e80 <__errno> <== NOT EXECUTED 203cce0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203cce4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203cce8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 203ccec: 81 c7 e0 08 ret <== NOT EXECUTED 203ccf0: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 203ccf4: b7 36 60 01 srl %i1, 1, %i3 203ccf8: 84 88 60 01 andcc %g1, 1, %g2 203ccfc: 12 80 00 06 bne 203cd14 <== ALWAYS TAKEN 203cd00: b6 06 c0 19 add %i3, %i1, %i3 203cd04: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203cd08: 02 80 00 03 be 203cd14 <== NOT EXECUTED 203cd0c: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 203cd10: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 203cd14: 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); 203cd18: b9 36 60 01 srl %i1, 1, %i4 /* 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) + 203cd1c: b7 36 c0 03 srl %i3, %g3, %i3 203cd20: c6 07 60 4c ld [ %i5 + 0x4c ], %g3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 203cd24: b8 07 00 19 add %i4, %i1, %i4 203cd28: 80 a0 a0 00 cmp %g2, 0 203cd2c: 12 80 00 06 bne 203cd44 <== ALWAYS TAKEN 203cd30: b6 06 c0 03 add %i3, %g3, %i3 203cd34: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203cd38: 02 80 00 03 be 203cd44 <== NOT EXECUTED 203cd3c: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 203cd40: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 203cd44: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 203cd48: 90 10 00 1d mov %i5, %o0 203cd4c: 92 10 00 1b mov %i3, %o1 203cd50: 94 10 20 01 mov 1, %o2 203cd54: 7f ff a2 ec call 2025904 203cd58: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 203cd5c: b0 92 20 00 orcc %o0, 0, %i0 203cd60: 12 bf ff e3 bne 203ccec <== NEVER TAKEN 203cd64: a1 2c 20 10 sll %l0, 0x10, %l0 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); 203cd68: a1 34 20 10 srl %l0, 0x10, %l0 203cd6c: a0 04 3f ff add %l0, -1, %l0 203cd70: a0 0f 00 10 and %i4, %l0, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 203cd74: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 203cd78: 80 a7 20 02 cmp %i4, 2 203cd7c: 02 80 00 5f be 203cef8 <== NEVER TAKEN 203cd80: 80 a7 20 04 cmp %i4, 4 203cd84: 02 80 00 65 be 203cf18 <== NEVER TAKEN 203cd88: 80 a7 20 01 cmp %i4, 1 203cd8c: 12 80 00 73 bne 203cf58 <== NEVER TAKEN 203cd90: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 203cd94: 02 80 00 29 be 203ce38 203cd98: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 203cd9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 203cda0: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203cda4: 84 08 a0 0f and %g2, 0xf, %g2 203cda8: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 203cdac: c2 07 bf fc ld [ %fp + -4 ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 203cdb0: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 203cdb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 203cdb8: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 203cdbc: 84 10 c0 02 or %g3, %g2, %g2 203cdc0: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 203cdc4: c2 17 40 00 lduh [ %i5 ], %g1 203cdc8: 82 00 7f ff add %g1, -1, %g1 203cdcc: 80 a4 00 01 cmp %l0, %g1 203cdd0: 12 80 00 11 bne 203ce14 <== ALWAYS TAKEN 203cdd4: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203cdd8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203cddc: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203cde0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203cde4: 7f ff a2 c8 call 2025904 <== NOT EXECUTED 203cde8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203cdec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 203cdf0: 12 bf ff bf bne 203ccec <== NOT EXECUTED 203cdf4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203cdf8: b5 2e a0 14 sll %i2, 0x14, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 203cdfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203ce00: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 203ce04: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 203ce08: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203ce0c: 10 80 00 27 b 203cea8 <== NOT EXECUTED 203ce10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 203ce14: c2 07 bf fc ld [ %fp + -4 ], %g1 203ce18: a0 04 20 01 inc %l0 203ce1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203ce20: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 203ce24: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 203ce28: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 203ce2c: b5 36 a0 18 srl %i2, 0x18, %i2 else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 203ce30: 10 80 00 2d b 203cee4 203ce34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 203ce38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 203ce3c: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 203ce40: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 203ce44: c2 07 bf fc ld [ %fp + -4 ], %g1 203ce48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 203ce4c: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203ce50: 84 16 80 02 or %i2, %g2, %g2 203ce54: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 203ce58: c2 17 40 00 lduh [ %i5 ], %g1 203ce5c: 82 00 7f ff add %g1, -1, %g1 203ce60: 80 a4 00 01 cmp %l0, %g1 203ce64: 12 80 00 17 bne 203cec0 <== ALWAYS TAKEN 203ce68: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203ce6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203ce70: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203ce74: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203ce78: 7f ff a2 a3 call 2025904 <== NOT EXECUTED 203ce7c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203ce80: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 203ce84: 12 bf ff 9a bne 203ccec <== NOT EXECUTED 203ce88: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203ce8c: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 203ce90: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 203ce94: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 203ce98: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 203ce9c: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 203cea0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203cea4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 203cea8: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 203ceac: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 203ceb0: 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; 203ceb4: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] <== NOT EXECUTED 203ceb8: 81 c7 e0 08 ret <== NOT EXECUTED 203cebc: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 203cec0: c2 07 bf fc ld [ %fp + -4 ], %g1 203cec4: a0 04 20 01 inc %l0 203cec8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203cecc: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 203ced0: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203ced4: 84 08 bf f0 and %g2, -16, %g2 203ced8: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 203cedc: c2 07 bf fc ld [ %fp + -4 ], %g1 203cee0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 203cee4: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203cee8: b4 10 80 1a or %g2, %i2, %i2 203ceec: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 203cef0: 81 c7 e0 08 ret 203cef4: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203cef8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 203cefc: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203cf00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 203cf04: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 203cf08: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 203cf0c: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203cf10: 10 80 00 0e b 203cf48 <== NOT EXECUTED 203cf14: f4 30 40 10 sth %i2, [ %g1 + %l0 ] <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 203cf18: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 203cf1c: 7f ff fe ea call 203cac4 <== NOT EXECUTED 203cf20: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 203cf24: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 203cf28: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 203cf2c: f8 00 60 1c ld [ %g1 + 0x1c ], %i4 <== NOT EXECUTED 203cf30: 7f ff fe e5 call 203cac4 <== NOT EXECUTED 203cf34: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 203cf38: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 203cf3c: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 203cf40: b6 10 40 1b or %g1, %i3, %i3 <== NOT EXECUTED fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 203cf44: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 203cf48: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 203cf4c: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 203cf50: 81 c7 e0 08 ret <== NOT EXECUTED 203cf54: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 203cf58: 40 00 0f ca call 2040e80 <__errno> <== NOT EXECUTED 203cf5c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203cf60: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203cf64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 203cf68: 81 c7 e0 08 ret <== NOT EXECUTED 203cf6c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02026080 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 2026080: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2026084: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 2026088: 90 10 00 18 mov %i0, %o0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 202608c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2026090: 80 88 60 04 btst 4, %g1 2026094: 02 80 00 08 be 20260b4 <== ALWAYS TAKEN 2026098: b8 10 20 00 clr %i4 { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 202609c: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 20260a0: 7f ff ff db call 202600c <== NOT EXECUTED 20260a4: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 20260a8: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 20260ac: 32 80 00 02 bne,a 20260b4 <== NOT EXECUTED 20260b0: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 20260b4: 7f ff fe 92 call 2025afc 20260b8: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 20260bc: 7f ff 81 a8 call 200675c 20260c0: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 20260c4: 80 a2 20 00 cmp %o0, 0 20260c8: 32 80 00 02 bne,a 20260d0 <== NEVER TAKEN 20260cc: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 20260d0: b6 10 20 00 clr %i3 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 20260d4: f4 07 60 60 ld [ %i5 + 0x60 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20260d8: 10 80 00 04 b 20260e8 20260dc: b4 06 80 1b add %i2, %i3, %i2 free(node); 20260e0: 7f ff 89 a6 call 2008778 <== NOT EXECUTED 20260e4: 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 ); 20260e8: 7f ff 9f 53 call 200de34 <_Chain_Get> 20260ec: 90 10 00 1a mov %i2, %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 ) 20260f0: 80 a2 20 00 cmp %o0, 0 20260f4: 12 bf ff fb bne 20260e0 <== NEVER TAKEN 20260f8: 01 00 00 00 nop 20260fc: b6 06 e0 0c add %i3, 0xc, %i3 fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 2026100: 80 a6 e0 18 cmp %i3, 0x18 2026104: 32 bf ff f5 bne,a 20260d8 2026108: f4 07 60 60 ld [ %i5 + 0x60 ], %i2 202610c: b6 10 20 00 clr %i3 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 2026110: f4 07 60 64 ld [ %i5 + 0x64 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) 2026114: 10 80 00 04 b 2026124 2026118: b4 06 80 1b add %i2, %i3, %i2 free(node); 202611c: 7f ff 89 97 call 2008778 <== NOT EXECUTED 2026120: 01 00 00 00 nop <== NOT EXECUTED 2026124: 7f ff 9f 44 call 200de34 <_Chain_Get> 2026128: 90 10 00 1a mov %i2, %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 ) 202612c: 80 a2 20 00 cmp %o0, 0 2026130: 12 bf ff fb bne 202611c <== NEVER TAKEN 2026134: 01 00 00 00 nop 2026138: b6 06 e0 0c add %i3, 0xc, %i3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 202613c: 80 a6 e0 18 cmp %i3, 0x18 2026140: 32 bf ff f5 bne,a 2026114 2026144: f4 07 60 64 ld [ %i5 + 0x64 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2026148: 7f ff 89 8c call 2008778 202614c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 free(fs_info->rhash); 2026150: 7f ff 89 8a call 2008778 2026154: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 free(fs_info->uino); 2026158: 7f ff 89 88 call 2008778 202615c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 free(fs_info->sec_buf); 2026160: 7f ff 89 86 call 2008778 2026164: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 close(fs_info->vol.fd); 2026168: 7f ff 88 cb call 2008494 202616c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 if (rc) 2026170: 80 a7 20 00 cmp %i4, 0 2026174: 02 80 00 06 be 202618c <== ALWAYS TAKEN 2026178: 01 00 00 00 nop errno = EIO; 202617c: 40 00 6b 41 call 2040e80 <__errno> <== NOT EXECUTED 2026180: 01 00 00 00 nop <== NOT EXECUTED 2026184: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2026188: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 202618c: 81 c7 e0 08 ret 2026190: 91 e8 00 1c restore %g0, %i4, %o0 =============================================================================== 0203d3bc : #include #include int fchdir( int fd ) { 203d3bc: 9d e3 bf 38 save %sp, -200, %sp st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); 203d3c0: 03 00 81 a6 sethi %hi(0x2069800), %g1 203d3c4: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20699b0 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 203d3c8: c0 27 bf a4 clr [ %fp + -92 ] st.st_uid = 0; 203d3cc: c0 37 bf aa clrh [ %fp + -86 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 203d3d0: 80 a6 00 01 cmp %i0, %g1 203d3d4: 1a 80 00 0c bcc 203d404 203d3d8: c0 37 bf ac clrh [ %fp + -84 ] iop = rtems_libio_iop( fd ); 203d3dc: bb 2e 20 03 sll %i0, 3, %i5 203d3e0: 03 00 81 b6 sethi %hi(0x206d800), %g1 203d3e4: b1 2e 20 06 sll %i0, 6, %i0 203d3e8: b0 07 40 18 add %i5, %i0, %i0 203d3ec: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 203d3f0: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 203d3f4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 203d3f8: 80 88 61 00 btst 0x100, %g1 203d3fc: 32 80 00 08 bne,a 203d41c 203d400: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203d404: 40 00 0e 9f call 2040e80 <__errno> 203d408: b0 10 3f ff mov -1, %i0 203d40c: 82 10 20 09 mov 9, %g1 203d410: c2 22 00 00 st %g1, [ %o0 ] 203d414: 81 c7 e0 08 ret 203d418: 81 e8 00 00 restore static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 203d41c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 203d420: c2 00 40 00 ld [ %g1 ], %g1 203d424: 9f c0 40 00 call %g1 203d428: b8 07 60 1c add %i5, 0x1c, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 203d42c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 203d430: 90 10 00 1c mov %i4, %o0 203d434: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 203d438: 9f c0 40 00 call %g1 203d43c: 92 07 bf 98 add %fp, -104, %o1 if ( rv == 0 ) { 203d440: b0 92 20 00 orcc %o0, 0, %i0 203d444: 32 80 00 14 bne,a 203d494 <== NEVER TAKEN 203d448: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED bool access_ok = rtems_filesystem_check_access( 203d44c: d2 07 bf a4 ld [ %fp + -92 ], %o1 203d450: d4 17 bf aa lduh [ %fp + -86 ], %o2 203d454: d6 17 bf ac lduh [ %fp + -84 ], %o3 203d458: 7f ff ad fa call 2028c40 203d45c: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 203d460: 80 8a 20 ff btst 0xff, %o0 203d464: 02 80 00 07 be 203d480 203d468: 01 00 00 00 nop rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 203d46c: 90 07 bf e4 add %fp, -28, %o0 203d470: 7f ff a7 e3 call 20273fc 203d474: 92 10 00 1c mov %i4, %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 203d478: 10 80 00 07 b 203d494 203d47c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 } else { errno = EACCES; 203d480: 40 00 0e 80 call 2040e80 <__errno> 203d484: b0 10 3f ff mov -1, %i0 203d488: 82 10 20 0d mov 0xd, %g1 203d48c: c2 22 00 00 st %g1, [ %o0 ] 203d490: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203d494: c2 00 60 04 ld [ %g1 + 4 ], %g1 203d498: 9f c0 40 00 call %g1 203d49c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 203d4a0: 80 a6 20 00 cmp %i0, 0 203d4a4: 12 80 00 05 bne 203d4b8 203d4a8: 01 00 00 00 nop rv = rtems_filesystem_chdir( &loc ); 203d4ac: 7f ff a7 50 call 20271ec 203d4b0: 90 07 bf e4 add %fp, -28, %o0 203d4b4: b0 10 00 08 mov %o0, %i0 } return rv; } 203d4b8: 81 c7 e0 08 ret 203d4bc: 81 e8 00 00 restore =============================================================================== 02027444 : #include #include int fchmod( int fd, mode_t mode ) { 2027444: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2027448: 03 00 81 a6 sethi %hi(0x2069800), %g1 202744c: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20699b0 2027450: 80 a6 00 01 cmp %i0, %g1 2027454: 1a 80 00 0c bcc 2027484 2027458: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 202745c: bb 2e 20 03 sll %i0, 3, %i5 2027460: 03 00 81 b6 sethi %hi(0x206d800), %g1 2027464: b1 2e 20 06 sll %i0, 6, %i0 2027468: b0 07 40 18 add %i5, %i0, %i0 202746c: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 2027470: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2027474: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2027478: 80 88 61 00 btst 0x100, %g1 202747c: 32 80 00 08 bne,a 202749c 2027480: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2027484: 40 00 66 7f call 2040e80 <__errno> 2027488: b0 10 3f ff mov -1, %i0 202748c: 82 10 20 09 mov 9, %g1 2027490: c2 22 00 00 st %g1, [ %o0 ] 2027494: 81 c7 e0 08 ret 2027498: 81 e8 00 00 restore if (iop->pathinfo.mt_entry->writeable) { 202749c: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 20274a0: 80 a0 60 00 cmp %g1, 0 20274a4: 02 80 00 12 be 20274ec <== NEVER TAKEN 20274a8: 01 00 00 00 nop static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 20274ac: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20274b0: c2 00 40 00 ld [ %g1 ], %g1 20274b4: 9f c0 40 00 call %g1 20274b8: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->fchmod_h)( &iop->pathinfo, mode ); 20274bc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20274c0: 90 07 60 1c add %i5, 0x1c, %o0 20274c4: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 20274c8: 9f c0 40 00 call %g1 20274cc: 92 10 00 19 mov %i1, %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 20274d0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20274d4: b0 10 00 08 mov %o0, %i0 20274d8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20274dc: 9f c0 40 00 call %g1 20274e0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20274e4: 81 c7 e0 08 ret 20274e8: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 20274ec: 40 00 66 65 call 2040e80 <__errno> <== NOT EXECUTED 20274f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20274f4: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 20274f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20274fc: 81 c7 e0 08 ret <== NOT EXECUTED 2027500: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02027504 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 2027504: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2027508: 03 00 81 a6 sethi %hi(0x2069800), %g1 202750c: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20699b0 2027510: 80 a6 00 01 cmp %i0, %g1 2027514: 1a 80 00 0c bcc 2027544 2027518: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 202751c: bb 2e 20 03 sll %i0, 3, %i5 2027520: 03 00 81 b6 sethi %hi(0x206d800), %g1 2027524: b1 2e 20 06 sll %i0, 6, %i0 2027528: b0 07 40 18 add %i5, %i0, %i0 202752c: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 2027530: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2027534: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2027538: 80 88 61 00 btst 0x100, %g1 202753c: 32 80 00 08 bne,a 202755c 2027540: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2027544: 40 00 66 4f call 2040e80 <__errno> 2027548: b0 10 3f ff mov -1, %i0 202754c: 82 10 20 09 mov 9, %g1 2027550: c2 22 00 00 st %g1, [ %o0 ] 2027554: 81 c7 e0 08 ret 2027558: 81 e8 00 00 restore if (iop->pathinfo.mt_entry->writeable) { 202755c: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 2027560: 80 a0 60 00 cmp %g1, 0 2027564: 02 80 00 13 be 20275b0 <== NEVER TAKEN 2027568: 01 00 00 00 nop static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 202756c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2027570: c2 00 40 00 ld [ %g1 ], %g1 2027574: 9f c0 40 00 call %g1 2027578: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 202757c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2027580: 90 07 60 1c add %i5, 0x1c, %o0 2027584: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2027588: 92 10 00 19 mov %i1, %o1 202758c: 9f c0 40 00 call %g1 2027590: 94 10 00 1a mov %i2, %o2 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 2027594: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2027598: b0 10 00 08 mov %o0, %i0 202759c: c2 00 60 04 ld [ %g1 + 4 ], %g1 20275a0: 9f c0 40 00 call %g1 20275a4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20275a8: 81 c7 e0 08 ret 20275ac: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 20275b0: 40 00 66 34 call 2040e80 <__errno> <== NOT EXECUTED 20275b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20275b8: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 20275bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20275c0: 81 c7 e0 08 ret <== NOT EXECUTED 20275c4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0203d4e8 : int fcntl( int fd, int cmd, ... ) { 203d4e8: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 203d4ec: 05 00 81 a6 sethi %hi(0x2069800), %g2 203d4f0: c4 00 a1 b0 ld [ %g2 + 0x1b0 ], %g2 ! 20699b0 ... ) { int ret; va_list ap; va_start( ap, cmd ); 203d4f4: 82 07 a0 4c add %fp, 0x4c, %g1 203d4f8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 203d4fc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 203d500: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 203d504: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 203d508: 80 a6 00 02 cmp %i0, %g2 203d50c: 1a 80 00 0c bcc 203d53c 203d510: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 203d514: bb 2e 20 03 sll %i0, 3, %i5 203d518: 05 00 81 b6 sethi %hi(0x206d800), %g2 203d51c: b1 2e 20 06 sll %i0, 6, %i0 203d520: b0 07 40 18 add %i5, %i0, %i0 203d524: fa 00 a2 c0 ld [ %g2 + 0x2c0 ], %i5 203d528: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 203d52c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 203d530: 80 8a 21 00 btst 0x100, %o0 203d534: 12 80 00 06 bne 203d54c 203d538: 80 a6 60 09 cmp %i1, 9 203d53c: 40 00 0e 51 call 2040e80 <__errno> 203d540: 01 00 00 00 nop 203d544: 10 80 00 5b b 203d6b0 203d548: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 203d54c: 18 80 00 56 bgu 203d6a4 203d550: 85 2e 60 02 sll %i1, 2, %g2 203d554: 07 00 80 f5 sethi %hi(0x203d400), %g3 203d558: 86 10 e0 c0 or %g3, 0xc0, %g3 ! 203d4c0 203d55c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 203d560: 81 c0 80 00 jmp %g2 203d564: 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(); 203d568: 7f ff 2d 59 call 2008acc 203d56c: b0 10 3f ff mov -1, %i0 ! ffffffff if (diop != NULL) { 203d570: 80 a2 20 00 cmp %o0, 0 203d574: 02 80 00 60 be 203d6f4 203d578: b8 10 00 08 mov %o0, %i4 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 203d57c: 7f ff 2d 3e call 2008a74 203d580: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 203d584: f6 07 20 18 ld [ %i4 + 0x18 ], %i3 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 203d588: b0 0a 3d ff and %o0, -513, %i0 diop->flags |= rtems_libio_fcntl_flags( oflag ); 203d58c: 7f ff 2d 2d call 2008a40 203d590: 90 10 00 18 mov %i0, %o0 static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 203d594: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203d598: b6 12 00 1b or %o0, %i3, %i3 203d59c: c2 00 40 00 ld [ %g1 ], %g1 203d5a0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 203d5a4: 9f c0 40 00 call %g1 203d5a8: f6 27 20 18 st %i3, [ %i4 + 0x18 ] rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 203d5ac: 92 07 60 1c add %i5, 0x1c, %o1 203d5b0: 7f ff a7 93 call 20273fc 203d5b4: 90 07 20 1c add %i4, 0x1c, %o0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 203d5b8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203d5bc: c2 00 60 04 ld [ %g1 + 4 ], %g1 203d5c0: 9f c0 40 00 call %g1 203d5c4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 /* * 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 ); 203d5c8: c2 07 20 2c ld [ %i4 + 0x2c ], %g1 203d5cc: 94 10 00 18 mov %i0, %o2 203d5d0: c2 00 40 00 ld [ %g1 ], %g1 203d5d4: 90 10 00 1c mov %i4, %o0 203d5d8: 92 10 20 00 clr %o1 203d5dc: 9f c0 40 00 call %g1 203d5e0: 96 10 20 00 clr %o3 if ( rv == 0 ) { 203d5e4: b0 92 20 00 orcc %o0, 0, %i0 203d5e8: 12 80 00 10 bne 203d628 <== NEVER TAKEN 203d5ec: 03 00 81 b6 sethi %hi(0x206d800), %g1 rv = diop - rtems_libio_iops; 203d5f0: f0 00 62 c0 ld [ %g1 + 0x2c0 ], %i0 ! 206dac0 203d5f4: b8 27 00 18 sub %i4, %i0, %i4 203d5f8: b9 3f 20 03 sra %i4, 3, %i4 203d5fc: 85 2f 20 06 sll %i4, 6, %g2 203d600: 83 2f 20 03 sll %i4, 3, %g1 203d604: 82 20 80 01 sub %g2, %g1, %g1 203d608: 85 28 60 06 sll %g1, 6, %g2 203d60c: 82 00 40 02 add %g1, %g2, %g1 203d610: 82 00 40 1c add %g1, %i4, %g1 203d614: b1 28 60 0f sll %g1, 0xf, %i0 203d618: b0 26 00 01 sub %i0, %g1, %i0 203d61c: b1 2e 20 03 sll %i0, 3, %i0 203d620: 10 80 00 27 b 203d6bc 203d624: b0 06 00 1c add %i0, %i4, %i0 } else { rtems_libio_free( diop ); 203d628: 7f ff 2d 58 call 2008b88 <== NOT EXECUTED 203d62c: 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) { 203d630: 10 80 00 24 b 203d6c0 <== NOT EXECUTED 203d634: 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); 203d638: 90 0a 28 00 and %o0, 0x800, %o0 203d63c: 80 a0 00 08 cmp %g0, %o0 203d640: 10 80 00 22 b 203d6c8 203d644: b0 40 20 00 addx %g0, 0, %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 ) ) 203d648: c2 00 40 00 ld [ %g1 ], %g1 203d64c: 80 a0 60 00 cmp %g1, 0 203d650: 22 80 00 0e be,a 203d688 203d654: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 203d658: 10 80 00 0c b 203d688 203d65c: 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 ); 203d660: 7f ff 2d 05 call 2008a74 203d664: 01 00 00 00 nop 203d668: 10 80 00 15 b 203d6bc 203d66c: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 203d670: 7f ff 2c f4 call 2008a40 203d674: 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); 203d678: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 203d67c: 90 0a 22 01 and %o0, 0x201, %o0 203d680: 82 08 7d fe and %g1, -514, %g1 203d684: 90 12 00 01 or %o0, %g1, %o0 203d688: d0 27 60 18 st %o0, [ %i5 + 0x18 ] { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 203d68c: 10 80 00 0f b 203d6c8 203d690: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 203d694: 40 00 0d fb call 2040e80 <__errno> 203d698: 01 00 00 00 nop 203d69c: 10 80 00 05 b 203d6b0 203d6a0: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 203d6a4: 40 00 0d f7 call 2040e80 <__errno> 203d6a8: 01 00 00 00 nop 203d6ac: 82 10 20 16 mov 0x16, %g1 ! 16 203d6b0: c2 22 00 00 st %g1, [ %o0 ] int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 203d6b4: 81 c7 e0 08 ret 203d6b8: 91 e8 3f ff restore %g0, -1, %o0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 203d6bc: 80 a6 20 00 cmp %i0, 0 203d6c0: 06 80 00 0d bl 203d6f4 <== NEVER TAKEN 203d6c4: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 203d6c8: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 203d6cc: 90 10 00 1d mov %i5, %o0 203d6d0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 203d6d4: 9f c0 40 00 call %g1 203d6d8: 92 10 00 19 mov %i1, %o1 if (err) { 203d6dc: ba 92 20 00 orcc %o0, 0, %i5 203d6e0: 02 80 00 05 be 203d6f4 <== ALWAYS TAKEN 203d6e4: 01 00 00 00 nop errno = err; 203d6e8: 40 00 0d e6 call 2040e80 <__errno> <== NOT EXECUTED 203d6ec: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 203d6f0: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 203d6f4: 81 c7 e0 08 ret 203d6f8: 81 e8 00 00 restore =============================================================================== 0200db50 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200db50: 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) { 200db54: 37 00 80 87 sethi %hi(0x2021c00), %i3 200db58: c2 06 e3 f8 ld [ %i3 + 0x3f8 ], %g1 ! 2021ff8 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200db5c: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200db60: 80 a0 60 00 cmp %g1, 0 200db64: 12 80 00 1a bne 200dbcc 200db68: b8 16 e3 f8 or %i3, 0x3f8, %i4 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200db6c: 03 00 80 88 sethi %hi(0x2022000), %g1 200db70: d0 00 62 64 ld [ %g1 + 0x264 ], %o0 ! 2022264 200db74: 92 10 20 00 clr %o1 200db78: 7f ff ed 16 call 2008fd0 200db7c: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200db80: c2 06 e3 f8 ld [ %i3 + 0x3f8 ], %g1 200db84: 80 a0 60 00 cmp %g1, 0 200db88: 12 80 00 0a bne 200dbb0 <== NEVER TAKEN 200db8c: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200db90: 11 14 12 54 sethi %hi(0x50495000), %o0 200db94: 92 10 20 01 mov 1, %o1 200db98: 90 12 20 45 or %o0, 0x45, %o0 200db9c: 94 10 20 54 mov 0x54, %o2 200dba0: 96 10 20 00 clr %o3 200dba4: 7f ff ec 71 call 2008d68 200dba8: 98 10 00 1c mov %i4, %o4 200dbac: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200dbb0: 03 00 80 88 sethi %hi(0x2022000), %g1 200dbb4: d0 00 62 64 ld [ %g1 + 0x264 ], %o0 ! 2022264 200dbb8: 7f ff ed 50 call 20090f8 200dbbc: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200dbc0: 80 a6 e0 00 cmp %i3, 0 200dbc4: 12 80 00 e1 bne 200df48 200dbc8: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200dbcc: 03 00 80 87 sethi %hi(0x2021c00), %g1 200dbd0: d0 00 63 f8 ld [ %g1 + 0x3f8 ], %o0 ! 2021ff8 200dbd4: 92 10 20 00 clr %o1 200dbd8: 94 10 20 00 clr %o2 200dbdc: 7f ff ec fd call 2008fd0 200dbe0: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200dbe4: 80 a2 20 00 cmp %o0, 0 200dbe8: 12 80 00 d8 bne 200df48 <== NEVER TAKEN 200dbec: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200dbf0: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200dbf4: 80 a7 20 00 cmp %i4, 0 200dbf8: 32 80 00 44 bne,a 200dd08 200dbfc: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200dc00: 7f ff dc 45 call 2004d14 200dc04: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200dc08: b8 92 20 00 orcc %o0, 0, %i4 200dc0c: 02 80 00 3c be 200dcfc 200dc10: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200dc14: 40 00 0e a9 call 20116b8 200dc18: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200dc1c: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200dc20: 90 10 22 00 mov 0x200, %o0 200dc24: 7f ff dc 3c call 2004d14 200dc28: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200dc2c: 80 a2 20 00 cmp %o0, 0 200dc30: 02 80 00 31 be 200dcf4 <== NEVER TAKEN 200dc34: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200dc38: 37 00 80 86 sethi %hi(0x2021800), %i3 200dc3c: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 ! 2021934 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200dc40: 35 14 12 5c sethi %hi(0x50497000), %i2 200dc44: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200dc48: 92 10 20 00 clr %o1 200dc4c: 90 12 00 01 or %o0, %g1, %o0 200dc50: 94 10 20 00 clr %o2 200dc54: 40 00 03 e2 call 200ebdc 200dc58: 96 07 20 2c add %i4, 0x2c, %o3 200dc5c: 80 a2 20 00 cmp %o0, 0 200dc60: 12 80 00 23 bne 200dcec 200dc64: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200dc68: 03 14 12 5d sethi %hi(0x50497400), %g1 200dc6c: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200dc70: 92 10 20 00 clr %o1 200dc74: 90 12 00 01 or %o0, %g1, %o0 200dc78: 94 10 20 00 clr %o2 200dc7c: 40 00 03 d8 call 200ebdc 200dc80: 96 07 20 30 add %i4, 0x30, %o3 200dc84: 80 a2 20 00 cmp %o0, 0 200dc88: 12 80 00 17 bne 200dce4 200dc8c: d0 4e e1 34 ldsb [ %i3 + 0x134 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200dc90: b4 16 a3 00 or %i2, 0x300, %i2 200dc94: 92 10 20 01 mov 1, %o1 200dc98: 90 12 00 1a or %o0, %i2, %o0 200dc9c: 94 10 20 10 mov 0x10, %o2 200dca0: 96 10 20 00 clr %o3 200dca4: 7f ff ec 31 call 2008d68 200dca8: 98 07 20 28 add %i4, 0x28, %o4 200dcac: 80 a2 20 00 cmp %o0, 0 200dcb0: 12 80 00 0b bne 200dcdc 200dcb4: c2 0e e1 34 ldub [ %i3 + 0x134 ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200dcb8: 84 00 60 01 add %g1, 1, %g2 200dcbc: 83 28 60 18 sll %g1, 0x18, %g1 200dcc0: 83 38 60 18 sra %g1, 0x18, %g1 200dcc4: 80 a0 60 7a cmp %g1, 0x7a 200dcc8: 12 80 00 0f bne 200dd04 200dccc: c4 2e e1 34 stb %g2, [ %i3 + 0x134 ] c = 'a'; 200dcd0: 82 10 20 61 mov 0x61, %g1 200dcd4: 10 80 00 0c b 200dd04 200dcd8: c2 2e e1 34 stb %g1, [ %i3 + 0x134 ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200dcdc: 40 00 03 f1 call 200eca0 200dce0: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200dce4: 40 00 03 ef call 200eca0 200dce8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200dcec: 7f ff da e6 call 2004884 200dcf0: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200dcf4: 7f ff da e4 call 2004884 200dcf8: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200dcfc: 10 80 00 13 b 200dd48 200dd00: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200dd04: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200dd08: 92 10 20 00 clr %o1 200dd0c: 7f ff ec b1 call 2008fd0 200dd10: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200dd14: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200dd18: 80 a0 00 08 cmp %g0, %o0 200dd1c: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200dd20: 80 a0 60 00 cmp %g1, 0 200dd24: 12 80 00 09 bne 200dd48 200dd28: b0 0e 3f fc and %i0, -4, %i0 if (err) 200dd2c: 80 a6 20 00 cmp %i0, 0 200dd30: 22 80 00 06 be,a 200dd48 <== ALWAYS TAKEN 200dd34: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200dd38: 7f ff ff 49 call 200da5c <== NOT EXECUTED 200dd3c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200dd40: 10 80 00 03 b 200dd4c <== NOT EXECUTED 200dd44: 03 00 80 87 sethi %hi(0x2021c00), %g1 <== NOT EXECUTED 200dd48: 03 00 80 87 sethi %hi(0x2021c00), %g1 200dd4c: 7f ff ec eb call 20090f8 200dd50: d0 00 63 f8 ld [ %g1 + 0x3f8 ], %o0 ! 2021ff8 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200dd54: 80 a6 20 00 cmp %i0, 0 200dd58: 12 80 00 7c bne 200df48 200dd5c: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200dd60: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200dd64: 82 08 60 06 and %g1, 6, %g1 200dd68: 80 a0 60 04 cmp %g1, 4 200dd6c: 02 80 00 2e be 200de24 200dd70: f8 07 40 00 ld [ %i5 ], %i4 200dd74: 80 a0 60 06 cmp %g1, 6 200dd78: 02 80 00 56 be 200ded0 200dd7c: 80 a0 60 02 cmp %g1, 2 200dd80: 12 80 00 6a bne 200df28 <== NEVER TAKEN 200dd84: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200dd88: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200dd8c: 82 00 60 01 inc %g1 200dd90: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200dd94: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200dd98: 84 00 60 01 add %g1, 1, %g2 200dd9c: 80 a0 60 00 cmp %g1, 0 200dda0: 12 80 00 05 bne 200ddb4 <== NEVER TAKEN 200dda4: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200dda8: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200ddac: 40 00 03 e6 call 200ed44 200ddb0: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200ddb4: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200ddb8: 80 a0 60 00 cmp %g1, 0 200ddbc: 12 80 00 5b bne 200df28 200ddc0: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200ddc4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200ddc8: 80 88 60 01 btst 1, %g1 200ddcc: 12 80 00 57 bne 200df28 200ddd0: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200ddd4: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200ddd8: 7f ff ec c8 call 20090f8 200dddc: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200dde0: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200dde4: 40 00 03 ef call 200eda0 200dde8: 92 10 20 00 clr %o1 200ddec: 80 a2 20 00 cmp %o0, 0 200ddf0: 12 80 00 52 bne 200df38 <== NEVER TAKEN 200ddf4: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200ddf8: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200ddfc: 7f ff ec 75 call 2008fd0 200de00: 94 10 20 00 clr %o2 200de04: 80 a2 20 00 cmp %o0, 0 200de08: 32 80 00 4d bne,a 200df3c <== NEVER TAKEN 200de0c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200de10: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200de14: 80 a6 c0 01 cmp %i3, %g1 200de18: 02 bf ff f0 be 200ddd8 <== NEVER TAKEN 200de1c: 01 00 00 00 nop 200de20: 30 80 00 42 b,a 200df28 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200de24: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200de28: 82 00 60 01 inc %g1 200de2c: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200de30: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200de34: 84 00 60 01 add %g1, 1, %g2 200de38: 80 a0 60 00 cmp %g1, 0 200de3c: 12 80 00 05 bne 200de50 <== NEVER TAKEN 200de40: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200de44: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200de48: 40 00 03 bf call 200ed44 200de4c: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200de50: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200de54: 80 a0 60 00 cmp %g1, 0 200de58: 12 80 00 34 bne 200df28 200de5c: 01 00 00 00 nop 200de60: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200de64: 80 88 60 01 btst 1, %g1 200de68: 22 80 00 07 be,a 200de84 200de6c: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200de70: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200de74: 7f ff ec a1 call 20090f8 200de78: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200de7c: 10 80 00 31 b 200df40 200de80: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200de84: 7f ff ec 9d call 20090f8 200de88: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200de8c: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200de90: 40 00 03 c4 call 200eda0 200de94: 92 10 20 00 clr %o1 200de98: 80 a2 20 00 cmp %o0, 0 200de9c: 12 80 00 27 bne 200df38 <== NEVER TAKEN 200dea0: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200dea4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200dea8: 7f ff ec 4a call 2008fd0 200deac: 94 10 20 00 clr %o2 200deb0: 80 a2 20 00 cmp %o0, 0 200deb4: 32 80 00 22 bne,a 200df3c <== NEVER TAKEN 200deb8: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200debc: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200dec0: 80 a6 c0 01 cmp %i3, %g1 200dec4: 02 bf ff f0 be 200de84 <== NEVER TAKEN 200dec8: 01 00 00 00 nop 200decc: 30 80 00 17 b,a 200df28 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200ded0: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200ded4: 82 00 60 01 inc %g1 200ded8: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200dedc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200dee0: 84 00 60 01 add %g1, 1, %g2 200dee4: 80 a0 60 00 cmp %g1, 0 200dee8: 12 80 00 05 bne 200defc <== NEVER TAKEN 200deec: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200def0: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200def4: 40 00 03 94 call 200ed44 200def8: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; 200defc: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200df00: 82 00 60 01 inc %g1 200df04: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200df08: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200df0c: 84 00 60 01 add %g1, 1, %g2 200df10: 80 a0 60 00 cmp %g1, 0 200df14: 12 80 00 05 bne 200df28 <== NEVER TAKEN 200df18: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200df1c: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200df20: 40 00 03 89 call 200ed44 200df24: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200df28: 7f ff ec 74 call 20090f8 200df2c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200df30: 81 c7 e0 08 ret 200df34: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200df38: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200df3c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200df40: 7f ff fe d2 call 200da88 200df44: 92 10 00 19 mov %i1, %o1 return err; } 200df48: 81 c7 e0 08 ret 200df4c: 81 e8 00 00 restore =============================================================================== 020096b8 : long fpathconf( int fd, int name ) { 20096b8: 9d e3 bf a0 save %sp, -96, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 20096bc: 03 00 80 46 sethi %hi(0x2011800), %g1 20096c0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 2011830 20096c4: 80 a6 00 01 cmp %i0, %g1 20096c8: 1a 80 00 0c bcc 20096f8 <== ALWAYS TAKEN 20096cc: 01 00 00 00 nop iop = rtems_libio_iop(fd); 20096d0: 83 2e 20 03 sll %i0, 3, %g1 <== NOT EXECUTED 20096d4: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED 20096d8: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED 20096dc: 03 00 80 48 sethi %hi(0x2012000), %g1 <== NOT EXECUTED 20096e0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 ! 20120c4 <== NOT EXECUTED 20096e4: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 20096e8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 20096ec: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 20096f0: 12 80 00 08 bne 2009710 <== NOT EXECUTED 20096f4: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED 20096f8: 40 00 05 f4 call 200aec8 <__errno> 20096fc: b0 10 3f ff mov -1, %i0 2009700: 82 10 20 09 mov 9, %g1 2009704: c2 22 00 00 st %g1, [ %o0 ] 2009708: 81 c7 e0 08 ret 200970c: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009710: 18 80 00 2c bgu 20097c0 <== NOT EXECUTED 2009714: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2009718: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 200971c: 05 00 80 25 sethi %hi(0x2009400), %g2 <== NOT EXECUTED 2009720: 84 10 a2 88 or %g2, 0x288, %g2 ! 2009688 <_close_r+0x10> <== NOT EXECUTED 2009724: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED 2009728: 81 c0 80 00 jmp %g2 <== NOT EXECUTED 200972c: 01 00 00 00 nop <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 2009730: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED break; 2009734: 81 c7 e0 08 ret <== NOT EXECUTED 2009738: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_CANON: return_value = the_limits->max_canon; 200973c: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED break; 2009740: 81 c7 e0 08 ret <== NOT EXECUTED 2009744: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_INPUT: return_value = the_limits->max_input; 2009748: f0 00 60 30 ld [ %g1 + 0x30 ], %i0 <== NOT EXECUTED break; 200974c: 81 c7 e0 08 ret <== NOT EXECUTED 2009750: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NAME_MAX: return_value = the_limits->name_max; 2009754: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 <== NOT EXECUTED break; 2009758: 81 c7 e0 08 ret <== NOT EXECUTED 200975c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PATH_MAX: return_value = the_limits->path_max; 2009760: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 <== NOT EXECUTED break; 2009764: 81 c7 e0 08 ret <== NOT EXECUTED 2009768: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 200976c: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 <== NOT EXECUTED break; 2009770: 81 c7 e0 08 ret <== NOT EXECUTED 2009774: 81 e8 00 00 restore <== NOT EXECUTED case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2009778: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 <== NOT EXECUTED break; 200977c: 81 c7 e0 08 ret <== NOT EXECUTED 2009780: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2009784: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 <== NOT EXECUTED break; 2009788: 81 c7 e0 08 ret <== NOT EXECUTED 200978c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009790: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 <== NOT EXECUTED break; 2009794: 81 c7 e0 08 ret <== NOT EXECUTED 2009798: 81 e8 00 00 restore <== NOT EXECUTED case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 200979c: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 <== NOT EXECUTED break; 20097a0: 81 c7 e0 08 ret <== NOT EXECUTED 20097a4: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 20097a8: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 <== NOT EXECUTED break; 20097ac: 81 c7 e0 08 ret <== NOT EXECUTED 20097b0: 81 e8 00 00 restore <== NOT EXECUTED case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 20097b4: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 <== NOT EXECUTED break; 20097b8: 81 c7 e0 08 ret <== NOT EXECUTED 20097bc: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 20097c0: 40 00 05 c2 call 200aec8 <__errno> <== NOT EXECUTED 20097c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20097c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20097cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return return_value; } 20097d0: 81 c7 e0 08 ret <== NOT EXECUTED 20097d4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003710 : #include void free( void *ptr ) { 2003710: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 2003714: 03 00 80 71 sethi %hi(0x201c400), %g1 2003718: 82 10 61 50 or %g1, 0x150, %g1 ! 201c550 200371c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 2003720: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 2003724: 84 00 a0 01 inc %g2 if ( !ptr ) 2003728: 80 a6 20 00 cmp %i0, 0 200372c: 02 80 00 21 be 20037b0 2003730: 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()) && 2003734: 03 00 80 72 sethi %hi(0x201c800), %g1 2003738: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 201c808 <_System_state_Current> 200373c: 80 a0 60 03 cmp %g1, 3 2003740: 12 80 00 09 bne 2003764 <== NEVER TAKEN 2003744: 03 00 80 70 sethi %hi(0x201c000), %g1 !malloc_is_system_state_OK() ) { 2003748: 40 00 00 7c call 2003938 200374c: 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()) && 2003750: 80 8a 20 ff btst 0xff, %o0 2003754: 12 80 00 04 bne 2003764 2003758: 03 00 80 70 sethi %hi(0x201c000), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 200375c: 40 00 00 96 call 20039b4 2003760: 81 e8 00 00 restore } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003764: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 2003768: 80 a0 60 00 cmp %g1, 0 200376c: 02 80 00 06 be 2003784 2003770: 3b 00 80 6e sethi %hi(0x201b800), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003774: c2 00 60 08 ld [ %g1 + 8 ], %g1 2003778: 9f c0 40 00 call %g1 200377c: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2003780: 3b 00 80 6e sethi %hi(0x201b800), %i5 2003784: d0 07 62 38 ld [ %i5 + 0x238 ], %o0 ! 201ba38 2003788: 40 00 17 47 call 20094a4 <_Protected_heap_Free> 200378c: 92 10 00 19 mov %i1, %o1 2003790: 80 8a 20 ff btst 0xff, %o0 2003794: 12 80 00 07 bne 20037b0 2003798: 31 00 80 69 sethi %hi(0x201a400), %i0 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 200379c: c2 07 62 38 ld [ %i5 + 0x238 ], %g1 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 20037a0: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 20037a4: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 20037a8: 40 00 03 7e call 20045a0 20037ac: 91 ee 21 00 restore %i0, 0x100, %o0 20037b0: 81 c7 e0 08 ret 20037b4: 81 e8 00 00 restore =============================================================================== 020191f0 : int fstat( int fd, struct stat *sbuf ) { 20191f0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 20191f4: 80 a6 60 00 cmp %i1, 0 20191f8: 32 80 00 06 bne,a 2019210 <== ALWAYS TAKEN 20191fc: 03 00 80 6e sethi %hi(0x201b800), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 2019200: 7f ff d6 30 call 200eac0 <__errno> <== NOT EXECUTED 2019204: 01 00 00 00 nop <== NOT EXECUTED 2019208: 10 80 00 12 b 2019250 <== NOT EXECUTED 201920c: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2019210: c2 00 62 7c ld [ %g1 + 0x27c ], %g1 2019214: 80 a6 00 01 cmp %i0, %g1 2019218: 1a 80 00 0b bcc 2019244 201921c: 83 2e 20 03 sll %i0, 3, %g1 2019220: b1 2e 20 06 sll %i0, 6, %i0 2019224: b0 00 40 18 add %g1, %i0, %i0 2019228: 03 00 80 71 sethi %hi(0x201c400), %g1 201922c: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 201c538 2019230: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 2019234: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2019238: 80 88 61 00 btst 0x100, %g1 201923c: 12 80 00 08 bne 201925c 2019240: 94 10 20 48 mov 0x48, %o2 2019244: 7f ff d6 1f call 200eac0 <__errno> 2019248: 01 00 00 00 nop 201924c: 82 10 20 09 mov 9, %g1 ! 9 2019250: c2 22 00 00 st %g1, [ %o0 ] 2019254: 81 c7 e0 08 ret 2019258: 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) ); 201925c: 90 10 00 19 mov %i1, %o0 2019260: 7f ff d8 b0 call 200f520 2019264: 92 10 20 00 clr %o1 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 2019268: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 201926c: 90 06 20 1c add %i0, 0x1c, %o0 2019270: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2019274: 9f c0 40 00 call %g1 2019278: 92 10 00 19 mov %i1, %o1 } 201927c: 81 c7 e0 08 ret 2019280: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02003600 : 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) { 2003600: 03 00 80 7f sethi %hi(0x201fc00), %g1 2003604: c4 00 62 48 ld [ %g1 + 0x248 ], %g2 ! 201fe48 2003608: 80 a2 00 02 cmp %o0, %g2 200360c: 1a 80 00 1e bcc 2003684 <== NEVER TAKEN 2003610: 82 10 20 00 clr %g1 2003614: 05 00 80 7f sethi %hi(0x201fc00), %g2 2003618: c4 00 a2 4c ld [ %g2 + 0x24c ], %g2 ! 201fe4c 200361c: 80 a0 a0 00 cmp %g2, 0 2003620: 02 80 00 19 be 2003684 <== NEVER TAKEN 2003624: 01 00 00 00 nop rtems_disk_device_table *dtab = disktab + major; 2003628: 91 2a 20 03 sll %o0, 3, %o0 200362c: 86 00 80 08 add %g2, %o0, %g3 if (minor < dtab->size && dtab->minor != NULL) { 2003630: c6 00 e0 04 ld [ %g3 + 4 ], %g3 2003634: 80 a2 40 03 cmp %o1, %g3 2003638: 1a 80 00 13 bcc 2003684 <== NEVER TAKEN 200363c: 01 00 00 00 nop 2003640: c4 00 80 08 ld [ %g2 + %o0 ], %g2 2003644: 80 a0 a0 00 cmp %g2, 0 2003648: 02 80 00 0f be 2003684 <== NEVER TAKEN 200364c: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; 2003650: c2 00 80 09 ld [ %g2 + %o1 ], %g1 if (dd != NULL && !lookup_only) { 2003654: 80 a0 60 00 cmp %g1, 0 2003658: 02 80 00 0b be 2003684 200365c: 80 a2 a0 00 cmp %o2, 0 2003660: 12 80 00 09 bne 2003684 2003664: 01 00 00 00 nop if (!dd->deleted) { 2003668: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2 200366c: 80 a0 a0 00 cmp %g2, 0 2003670: 32 80 00 05 bne,a 2003684 2003674: 82 10 20 00 clr %g1 ++dd->uses; 2003678: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200367c: 84 00 a0 01 inc %g2 2003680: c4 20 60 14 st %g2, [ %g1 + 0x14 ] return dd; } } return NULL; } 2003684: 81 c3 e0 08 retl 2003688: 90 10 00 01 mov %g1, %o0 =============================================================================== 020049fc : */ static rtems_status_code get_sector(int fd, uint32_t sector_num, rtems_sector_data_t **sector) { 20049fc: 9d e3 bf a0 save %sp, -96, %sp 2004a00: ba 10 00 18 mov %i0, %i5 rtems_sector_data_t *s; ssize_t n; off_t off; off_t new_off; if (sector == NULL) 2004a04: 80 a6 a0 00 cmp %i2, 0 2004a08: 02 80 00 1c be 2004a78 <== NEVER TAKEN 2004a0c: b0 10 20 19 mov 0x19, %i0 { return RTEMS_INTERNAL_ERROR; } off = sector_num * RTEMS_IDE_SECTOR_SIZE; 2004a10: b9 2e 60 09 sll %i1, 9, %i4 new_off = lseek(fd, off, SEEK_SET); 2004a14: 90 10 00 1d mov %i5, %o0 2004a18: 92 10 20 00 clr %o1 2004a1c: 94 10 00 1c mov %i4, %o2 2004a20: 40 00 05 54 call 2005f70 2004a24: 96 10 20 00 clr %o3 if (new_off != off) { 2004a28: 80 a2 20 00 cmp %o0, 0 2004a2c: 12 80 00 13 bne 2004a78 <== NEVER TAKEN 2004a30: b0 10 20 1b mov 0x1b, %i0 2004a34: 80 a2 40 1c cmp %o1, %i4 2004a38: 12 80 00 10 bne 2004a78 <== NEVER TAKEN 2004a3c: 90 10 22 04 mov 0x204, %o0 return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 2004a40: 40 00 06 1e call 20062b8 2004a44: b0 10 20 1a mov 0x1a, %i0 if (s == NULL) 2004a48: 80 a2 20 00 cmp %o0, 0 2004a4c: 02 80 00 0b be 2004a78 <== NEVER TAKEN 2004a50: b8 10 00 08 mov %o0, %i4 { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 2004a54: 90 10 00 1d mov %i5, %o0 2004a58: 92 07 20 04 add %i4, 4, %o1 2004a5c: 40 00 08 df call 2006dd8 2004a60: 94 10 22 00 mov 0x200, %o2 if (n != RTEMS_IDE_SECTOR_SIZE) 2004a64: 80 a2 22 00 cmp %o0, 0x200 2004a68: 02 80 00 06 be 2004a80 <== ALWAYS TAKEN 2004a6c: 90 10 00 1c mov %i4, %o0 { free(s); 2004a70: 40 00 03 fc call 2005a60 <== NOT EXECUTED 2004a74: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED 2004a78: 81 c7 e0 08 ret <== NOT EXECUTED 2004a7c: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_IO_ERROR; } s->sector_num = sector_num; 2004a80: f2 27 00 00 st %i1, [ %i4 ] *sector = s; 2004a84: f8 26 80 00 st %i4, [ %i2 ] 2004a88: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2004a8c: 81 c7 e0 08 ret 2004a90: 81 e8 00 00 restore =============================================================================== 0205bf5c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 205bf5c: 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 ); 205bf60: 03 00 81 a6 sethi %hi(0x2069800), %g1 205bf64: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1 ! 20699b0 205bf68: 80 a6 00 01 cmp %i0, %g1 205bf6c: 1a 80 00 08 bcc 205bf8c <== NEVER TAKEN 205bf70: ba 10 20 00 clr %i5 205bf74: bb 2e 20 03 sll %i0, 3, %i5 205bf78: 03 00 81 b6 sethi %hi(0x206d800), %g1 205bf7c: b1 2e 20 06 sll %i0, 6, %i0 205bf80: b0 07 40 18 add %i5, %i0, %i0 205bf84: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 205bf88: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 205bf8c: 7f ff 34 25 call 2029020 205bf90: 90 07 60 1c add %i5, 0x1c, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 205bf94: 80 a2 20 00 cmp %o0, 0 205bf98: 22 80 00 08 be,a 205bfb8 205bf9c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 205bfa0: 7f ff 93 b8 call 2040e80 <__errno> 205bfa4: b0 10 3f ff mov -1, %i0 205bfa8: 82 10 20 14 mov 0x14, %g1 205bfac: c2 22 00 00 st %g1, [ %o0 ] 205bfb0: 81 c7 e0 08 ret 205bfb4: 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 ); 205bfb8: 90 10 00 1d mov %i5, %o0 205bfbc: c2 00 60 08 ld [ %g1 + 8 ], %g1 205bfc0: 92 10 00 19 mov %i1, %o1 205bfc4: 9f c0 40 00 call %g1 205bfc8: 94 10 00 1a mov %i2, %o2 } 205bfcc: 81 c7 e0 08 ret 205bfd0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020037b8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 20037b8: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 20037bc: 80 a6 20 00 cmp %i0, 0 20037c0: 12 80 00 08 bne 20037e0 <== ALWAYS TAKEN 20037c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EFAULT ); 20037c8: 40 00 2c be call 200eac0 <__errno> <== NOT EXECUTED 20037cc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20037d0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 20037d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20037d8: 81 c7 e0 08 ret <== NOT EXECUTED 20037dc: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 20037e0: 7f ff fb 83 call 20025ec 20037e4: 01 00 00 00 nop 20037e8: b6 10 00 08 mov %o0, %i3 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 20037ec: 40 00 13 bf call 20086e8 <_TOD_Get_as_timestamp> 20037f0: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 20037f4: f8 1f bf f8 ldd [ %fp + -8 ], %i4 _TOD_Get( &now ); _ISR_Enable(level); 20037f8: 7f ff fb 81 call 20025fc 20037fc: 90 10 00 1b mov %i3, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2003800: 90 10 00 1c mov %i4, %o0 2003804: 92 10 00 1d mov %i5, %o1 2003808: 94 10 20 00 clr %o2 200380c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2003810: 40 00 51 ec call 2017fc0 <__divdi3> 2003814: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003818: 94 10 20 00 clr %o2 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 200381c: d2 26 00 00 st %o1, [ %i0 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003820: 90 10 00 1c mov %i4, %o0 2003824: 92 10 00 1d mov %i5, %o1 2003828: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 200382c: 40 00 52 cb call 2018358 <__moddi3> 2003830: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2003834: 90 10 00 09 mov %o1, %o0 2003838: 40 00 50 8c call 2017a68 <.div> 200383c: 92 10 23 e8 mov 0x3e8, %o1 time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2003840: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 2003844: 81 c7 e0 08 ret 2003848: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02027c50 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 2027c50: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2027c54: 03 00 81 b5 sethi %hi(0x206d400), %g1 2027c58: c4 48 60 d0 ldsb [ %g1 + 0xd0 ], %g2 ! 206d4d0 2027c5c: 80 a0 a0 00 cmp %g2, 0 2027c60: 12 80 00 32 bne 2027d28 2027c64: 01 00 00 00 nop return; etc_passwd_initted = 1; 2027c68: 84 10 20 01 mov 1, %g2 ! 1 mkdir("/etc", 0777); 2027c6c: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 2027c70: c4 28 60 d0 stb %g2, [ %g1 + 0xd0 ] mkdir("/etc", 0777); 2027c74: 11 00 81 72 sethi %hi(0x205c800), %o0 2027c78: 7f ff 84 ae call 2008f30 2027c7c: 90 12 23 98 or %o0, 0x398, %o0 ! 205cb98 <_rodata_start+0x9e8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 2027c80: 3b 00 81 73 sethi %hi(0x205cc00), %i5 2027c84: 13 00 81 a3 sethi %hi(0x2068c00), %o1 2027c88: 90 17 60 20 or %i5, 0x20, %o0 2027c8c: 40 00 67 34 call 204195c 2027c90: 92 12 63 88 or %o1, 0x388, %o1 2027c94: 80 a2 20 00 cmp %o0, 0 2027c98: 12 80 00 0d bne 2027ccc 2027c9c: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 2027ca0: 90 17 60 20 or %i5, 0x20, %o0 2027ca4: 13 00 81 82 sethi %hi(0x2060800), %o1 2027ca8: 40 00 67 2d call 204195c 2027cac: 92 12 63 10 or %o1, 0x310, %o1 ! 2060b10 2027cb0: b0 92 20 00 orcc %o0, 0, %i0 2027cb4: 02 80 00 08 be 2027cd4 <== NEVER TAKEN 2027cb8: 11 00 81 8a sethi %hi(0x2062800), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 2027cbc: 92 10 00 18 mov %i0, %o1 2027cc0: 40 00 67 8b call 2041aec 2027cc4: 90 12 22 b8 or %o0, 0x2b8, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 2027cc8: 90 10 00 18 mov %i0, %o0 2027ccc: 40 00 64 bf call 2040fc8 2027cd0: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2027cd4: 3b 00 81 73 sethi %hi(0x205cc00), %i5 2027cd8: 13 00 81 a3 sethi %hi(0x2068c00), %o1 2027cdc: 90 17 60 d8 or %i5, 0xd8, %o0 2027ce0: 40 00 67 1f call 204195c 2027ce4: 92 12 63 88 or %o1, 0x388, %o1 2027ce8: b0 92 20 00 orcc %o0, 0, %i0 2027cec: 12 80 00 0d bne 2027d20 2027cf0: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2027cf4: 90 17 60 d8 or %i5, 0xd8, %o0 2027cf8: 13 00 81 82 sethi %hi(0x2060800), %o1 2027cfc: 40 00 67 18 call 204195c 2027d00: 92 12 63 10 or %o1, 0x310, %o1 ! 2060b10 2027d04: b0 92 20 00 orcc %o0, 0, %i0 2027d08: 02 80 00 08 be 2027d28 <== NEVER TAKEN 2027d0c: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 2027d10: 11 00 81 8a sethi %hi(0x2062800), %o0 2027d14: 92 10 00 18 mov %i0, %o1 2027d18: 40 00 67 75 call 2041aec 2027d1c: 90 12 23 20 or %o0, 0x320, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2027d20: 40 00 64 aa call 2040fc8 2027d24: 81 e8 00 00 restore 2027d28: 81 c7 e0 08 ret 2027d2c: 81 e8 00 00 restore =============================================================================== 020062e4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 20062e4: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 20062e8: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 20062ec: 80 88 a0 20 btst 0x20, %g2 20062f0: 32 80 00 02 bne,a 20062f8 <== NEVER TAKEN 20062f4: b0 0e 20 7f and %i0, 0x7f, %i0 <== NOT EXECUTED c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 20062f8: 80 88 a2 00 btst 0x200, %g2 20062fc: 02 80 00 0c be 200632c 2006300: 80 a6 20 0d cmp %i0, 0xd c = tolower (c); 2006304: 03 00 80 6f sethi %hi(0x201bc00), %g1 2006308: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 201bca0 <__ctype_ptr__> 200630c: 82 00 40 18 add %g1, %i0, %g1 2006310: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2006314: 82 08 60 03 and %g1, 3, %g1 2006318: 80 a0 60 01 cmp %g1, 1 200631c: 22 80 00 02 be,a 2006324 2006320: b0 06 20 20 add %i0, 0x20, %i0 2006324: b0 0e 20 ff and %i0, 0xff, %i0 if (c == '\r') { 2006328: 80 a6 20 0d cmp %i0, 0xd 200632c: 12 80 00 0a bne 2006354 2006330: 80 a6 20 0a cmp %i0, 0xa if (tty->termios.c_iflag & IGNCR) 2006334: 80 88 a0 80 btst 0x80, %g2 2006338: 12 80 00 5b bne 20064a4 <== NEVER TAKEN 200633c: 82 10 20 00 clr %g1 return 0; if (tty->termios.c_iflag & ICRNL) 2006340: 80 88 a1 00 btst 0x100, %g2 2006344: 32 80 00 0d bne,a 2006378 <== ALWAYS TAKEN 2006348: 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)) { 200634c: 10 80 00 0c b 200637c <== NOT EXECUTED 2006350: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== 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)) { 2006354: 12 80 00 07 bne 2006370 2006358: 80 a6 20 00 cmp %i0, 0 200635c: 80 88 a0 40 btst 0x40, %g2 2006360: 32 80 00 06 bne,a 2006378 <== NEVER TAKEN 2006364: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006368: 10 80 00 05 b 200637c 200636c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 2006370: 02 80 00 3a be 2006458 <== NEVER TAKEN 2006374: 03 00 80 6e sethi %hi(0x201b800), %g1 2006378: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 200637c: 80 88 a0 02 btst 2, %g2 2006380: 02 80 00 36 be 2006458 2006384: 03 00 80 6e sethi %hi(0x201b800), %g1 if (c == tty->termios.c_cc[VERASE]) { 2006388: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 erase (tty, 0); 200638c: 90 10 00 19 mov %i1, %o0 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { 2006390: 80 a0 40 18 cmp %g1, %i0 2006394: 02 80 00 08 be 20063b4 2006398: 92 10 20 00 clr %o1 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 200639c: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 20063a0: 80 a0 40 18 cmp %g1, %i0 20063a4: 32 80 00 08 bne,a 20063c4 20063a8: c6 0e 60 45 ldub [ %i1 + 0x45 ], %g3 erase (tty, 1); 20063ac: 90 10 00 19 mov %i1, %o0 20063b0: 92 10 20 01 mov 1, %o1 20063b4: 7f ff ff 46 call 20060cc 20063b8: 01 00 00 00 nop if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 20063bc: 10 80 00 3a b 20064a4 20063c0: 82 10 20 00 clr %g1 ! 0 } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 20063c4: 80 a0 c0 18 cmp %g3, %i0 20063c8: 02 80 00 37 be 20064a4 <== NEVER TAKEN 20063cc: 82 10 20 01 mov 1, %g1 return 1; } else if (c == '\n') { 20063d0: 80 a6 20 0a cmp %i0, 0xa 20063d4: 32 80 00 0d bne,a 2006408 20063d8: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 if (tty->termios.c_lflag & (ECHO | ECHONL)) 20063dc: 80 88 a0 48 btst 0x48, %g2 20063e0: 22 80 00 06 be,a 20063f8 <== NEVER TAKEN 20063e4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 20063e8: 90 10 20 0a mov 0xa, %o0 20063ec: 7f ff ff 18 call 200604c 20063f0: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 20063f4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20063f8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 20063fc: 86 10 20 0a mov 0xa, %g3 2006400: 10 80 00 12 b 2006448 2006404: c6 28 80 01 stb %g3, [ %g2 + %g1 ] return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 2006408: 80 a0 40 18 cmp %g1, %i0 200640c: 02 80 00 07 be 2006428 <== NEVER TAKEN 2006410: 80 88 a0 08 btst 8, %g2 2006414: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 2006418: 80 a0 40 18 cmp %g1, %i0 200641c: 12 80 00 0f bne 2006458 <== ALWAYS TAKEN 2006420: 03 00 80 6e sethi %hi(0x201b800), %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2006424: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2006428: 22 80 00 06 be,a 2006440 <== NOT EXECUTED 200642c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2006430: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2006434: 7f ff ff 06 call 200604c <== NOT EXECUTED 2006438: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 200643c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2006440: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2006444: f0 28 80 01 stb %i0, [ %g2 + %g1 ] <== NOT EXECUTED 2006448: 82 00 60 01 inc %g1 200644c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] return 1; 2006450: 10 80 00 15 b 20064a4 2006454: 82 10 20 01 mov 1, %g1 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2006458: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 200645c: c4 00 63 5c ld [ %g1 + 0x35c ], %g2 2006460: 84 00 bf ff add %g2, -1, %g2 2006464: 80 a0 c0 02 cmp %g3, %g2 2006468: 1a 80 00 0f bcc 20064a4 <== NEVER TAKEN 200646c: 82 10 20 00 clr %g1 if (tty->termios.c_lflag & ECHO) 2006470: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 2006474: 80 88 60 08 btst 8, %g1 2006478: 22 80 00 06 be,a 2006490 <== NEVER TAKEN 200647c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2006480: 90 10 00 18 mov %i0, %o0 2006484: 7f ff fe f2 call 200604c 2006488: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 200648c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2006490: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 2006494: f0 28 80 01 stb %i0, [ %g2 + %g1 ] 2006498: 82 00 60 01 inc %g1 200649c: c2 26 60 20 st %g1, [ %i1 + 0x20 ] } return 0; 20064a0: 82 10 20 00 clr %g1 } 20064a4: 81 c7 e0 08 ret 20064a8: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 020192b8 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 20192b8: 81 c3 e0 08 retl <== NOT EXECUTED 20192bc: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02003ff0 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 2003ff0: 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())) 2003ff4: 03 00 80 72 sethi %hi(0x201c800), %g1 2003ff8: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 201c808 <_System_state_Current> 2003ffc: 80 a0 60 03 cmp %g1, 3 2004000: 12 80 00 16 bne 2004058 <== NEVER TAKEN 2004004: 39 00 80 6f sethi %hi(0x201bc00), %i4 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 2004008: 03 00 80 6b sethi %hi(0x201ac00), %g1 200400c: fa 00 62 d0 ld [ %g1 + 0x2d0 ], %i5 ! 201aed0 <_global_impure_ptr> 2004010: c2 07 20 a8 ld [ %i4 + 0xa8 ], %g1 2004014: 80 a0 40 1d cmp %g1, %i5 2004018: 22 80 00 06 be,a 2004030 200401c: 3b 00 80 6f sethi %hi(0x201bc00), %i5 _wrapup_reent(_global_impure_ptr); 2004020: 40 00 2d e4 call 200f7b0 <_wrapup_reent> 2004024: 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; 2004028: fa 27 20 a8 st %i5, [ %i4 + 0xa8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 200402c: 3b 00 80 6f sethi %hi(0x201bc00), %i5 2004030: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1 ! 201bca8 <_impure_ptr> 2004034: 40 00 2a f5 call 200ec08 2004038: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 200403c: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1 2004040: 40 00 2a f2 call 200ec08 2004044: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2004048: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1 200404c: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2004050: 40 00 2a ee call 200ec08 2004054: 81 e8 00 00 restore 2004058: 81 c7 e0 08 ret <== NOT EXECUTED 200405c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020192d0 : #include #include off_t lseek( int fd, off_t offset, int whence ) { 20192d0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; off_t reference_offset; off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); 20192d4: 03 00 80 6e sethi %hi(0x201b800), %g1 20192d8: c2 00 62 7c ld [ %g1 + 0x27c ], %g1 ! 201ba7c #include #include off_t lseek( int fd, off_t offset, int whence ) { 20192dc: a0 10 00 19 mov %i1, %l0 rtems_libio_t *iop; off_t reference_offset; off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); 20192e0: 80 a6 00 01 cmp %i0, %g1 20192e4: 1a 80 00 0c bcc 2019314 20192e8: a2 10 00 1a mov %i2, %l1 iop = rtems_libio_iop( fd ); 20192ec: b5 2e 20 03 sll %i0, 3, %i2 20192f0: 03 00 80 71 sethi %hi(0x201c400), %g1 20192f4: b1 2e 20 06 sll %i0, 6, %i0 20192f8: b0 06 80 18 add %i2, %i0, %i0 20192fc: f4 00 61 38 ld [ %g1 + 0x138 ], %i2 2019300: b4 06 80 18 add %i2, %i0, %i2 rtems_libio_check_is_open(iop); 2019304: c2 06 a0 18 ld [ %i2 + 0x18 ], %g1 2019308: 80 88 61 00 btst 0x100, %g1 201930c: 32 80 00 06 bne,a 2019324 2019310: e4 06 a0 10 ld [ %i2 + 0x10 ], %l2 2019314: 7f ff d5 eb call 200eac0 <__errno> 2019318: 01 00 00 00 nop 201931c: 10 80 00 44 b 201942c 2019320: 82 10 20 09 mov 9, %g1 ! 9 old_offset = iop->offset; switch ( whence ) { 2019324: 80 a6 e0 01 cmp %i3, 1 2019328: 02 80 00 0b be 2019354 201932c: f2 06 a0 14 ld [ %i2 + 0x14 ], %i1 2019330: 80 a6 e0 02 cmp %i3, 2 2019334: 02 80 00 06 be 201934c 2019338: 80 a6 e0 00 cmp %i3, 0 case SEEK_SET: reference_offset = 0; 201933c: 84 10 20 00 clr %g2 rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); old_offset = iop->offset; switch ( whence ) { 2019340: 02 80 00 07 be 201935c 2019344: 86 10 20 00 clr %g3 2019348: 30 80 00 30 b,a 2019408 case SEEK_CUR: reference_offset = old_offset; break; case SEEK_END: reference_offset = iop->size; break; 201934c: 10 80 00 04 b 201935c 2019350: c4 1e a0 08 ldd [ %i2 + 8 ], %g2 switch ( whence ) { case SEEK_SET: reference_offset = 0; break; case SEEK_CUR: reference_offset = old_offset; 2019354: 84 10 00 12 mov %l2, %g2 2019358: 86 10 00 19 mov %i1, %g3 default: errno = EINVAL; rv = (off_t) -1; break; } new_offset = reference_offset + offset; 201935c: ba 80 c0 11 addcc %g3, %l1, %i5 2019360: b8 40 80 10 addx %g2, %l0, %i4 if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 2019364: 80 a4 00 1c cmp %l0, %i4 2019368: 14 80 00 08 bg 2019388 201936c: 82 10 20 01 mov 1, %g1 2019370: 80 a4 00 1c cmp %l0, %i4 2019374: 12 80 00 07 bne 2019390 2019378: 80 88 60 ff btst 0xff, %g1 201937c: 80 a4 40 1d cmp %l1, %i5 2019380: 08 80 00 04 bleu 2019390 <== ALWAYS TAKEN 2019384: 80 88 60 ff btst 0xff, %g1 2019388: 82 10 20 00 clr %g1 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201938c: 80 88 60 ff btst 0xff, %g1 2019390: 02 80 00 05 be 20193a4 2019394: 80 a7 00 10 cmp %i4, %l0 2019398: 80 a0 a0 00 cmp %g2, 0 201939c: 16 80 00 10 bge 20193dc <== ALWAYS TAKEN 20193a0: 80 a7 00 10 cmp %i4, %l0 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 20193a4: 14 80 00 08 bg 20193c4 <== NEVER TAKEN 20193a8: 82 10 20 01 mov 1, %g1 20193ac: 80 a7 00 10 cmp %i4, %l0 20193b0: 12 80 00 07 bne 20193cc <== ALWAYS TAKEN 20193b4: 80 88 60 ff btst 0xff, %g1 20193b8: 80 a7 40 11 cmp %i5, %l1 <== NOT EXECUTED 20193bc: 08 80 00 04 bleu 20193cc <== NOT EXECUTED 20193c0: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 20193c4: 82 10 20 00 clr %g1 <== NOT EXECUTED 20193c8: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 20193cc: 02 80 00 15 be 2019420 <== NEVER TAKEN 20193d0: 80 a0 a0 00 cmp %g2, 0 20193d4: 16 80 00 13 bge 2019420 <== ALWAYS TAKEN 20193d8: 01 00 00 00 nop ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { 20193dc: 40 00 00 6f call 2019598 20193e0: 90 06 a0 1c add %i2, 0x1c, %o0 20193e4: 80 a2 20 00 cmp %o0, 0 20193e8: 02 80 00 06 be 2019400 20193ec: 80 a7 20 00 cmp %i4, 0 20193f0: 80 a2 20 04 cmp %o0, 4 20193f4: 32 80 00 15 bne,a 2019448 20193f8: c2 06 a0 2c ld [ %i2 + 0x2c ], %g1 case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { 20193fc: 80 a7 20 00 cmp %i4, 0 2019400: 36 80 00 12 bge,a 2019448 2019404: c2 06 a0 2c ld [ %i2 + 0x2c ], %g1 errno = EINVAL; 2019408: 7f ff d5 ae call 200eac0 <__errno> 201940c: 01 00 00 00 nop 2019410: 10 80 00 07 b 201942c 2019414: 82 10 20 16 mov 0x16, %g1 ! 16 if ( rv == 0 ) { iop->offset = new_offset; rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); if ( rv == (off_t) -1 ) { iop->offset = old_offset; 2019418: 10 80 00 09 b 201943c 201941c: f2 26 a0 14 st %i1, [ %i2 + 0x14 ] } } } else { errno = EOVERFLOW; 2019420: 7f ff d5 a8 call 200eac0 <__errno> 2019424: 01 00 00 00 nop 2019428: 82 10 20 8b mov 0x8b, %g1 ! 8b 201942c: c2 22 00 00 st %g1, [ %o0 ] rv = (off_t) -1; 2019430: 11 3f ff ff sethi %hi(0xfffffc00), %o0 2019434: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 2019438: 92 10 00 08 mov %o0, %o1 } } return rv; } 201943c: b0 10 00 08 mov %o0, %i0 2019440: 81 c7 e0 08 ret 2019444: 93 e8 00 09 restore %g0, %o1, %o1 default: break; } if ( rv == 0 ) { iop->offset = new_offset; 2019448: f8 3e a0 10 std %i4, [ %i2 + 0x10 ] rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201944c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2019450: 90 10 00 1a mov %i2, %o0 2019454: 92 10 00 10 mov %l0, %o1 2019458: 94 10 00 11 mov %l1, %o2 201945c: 9f c0 40 00 call %g1 2019460: 96 10 00 1b mov %i3, %o3 if ( rv == (off_t) -1 ) { 2019464: 80 a2 3f ff cmp %o0, -1 2019468: 12 bf ff f6 bne 2019440 201946c: b0 10 00 08 mov %o0, %i0 2019470: 80 a2 7f ff cmp %o1, -1 2019474: 12 bf ff f3 bne 2019440 <== NEVER TAKEN 2019478: 01 00 00 00 nop iop->offset = old_offset; 201947c: 10 bf ff e7 b 2019418 2019480: e4 26 a0 10 st %l2, [ %i2 + 0x10 ] =============================================================================== 02003ab0 : #include "malloc_p.h" void *malloc( size_t size ) { 2003ab0: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 2003ab4: 03 00 80 71 sethi %hi(0x201c400), %g1 2003ab8: 82 10 61 50 or %g1, 0x150, %g1 ! 201c550 2003abc: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 2003ac0: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 2003ac4: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003ac8: 7f ff ff ae call 2003980 2003acc: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 2003ad0: 80 a7 60 00 cmp %i5, 0 2003ad4: 02 80 00 23 be 2003b60 2003ad8: b0 10 20 00 clr %i0 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2003adc: 03 00 80 72 sethi %hi(0x201c800), %g1 2003ae0: c2 00 60 08 ld [ %g1 + 8 ], %g1 ! 201c808 <_System_state_Current> 2003ae4: 80 a0 60 03 cmp %g1, 3 2003ae8: 12 80 00 07 bne 2003b04 2003aec: 03 00 80 6e sethi %hi(0x201b800), %g1 !malloc_is_system_state_OK() ) 2003af0: 7f ff ff 92 call 2003938 2003af4: 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()) && 2003af8: 80 8a 20 ff btst 0xff, %o0 2003afc: 02 80 00 19 be 2003b60 <== NEVER TAKEN 2003b00: 03 00 80 6e sethi %hi(0x201b800), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 2003b04: d0 00 62 38 ld [ %g1 + 0x238 ], %o0 ! 201ba38 2003b08: 92 10 00 1d mov %i5, %o1 2003b0c: 94 10 20 00 clr %o2 2003b10: 40 00 16 57 call 200946c <_Protected_heap_Allocate_aligned_with_boundary> 2003b14: 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 ) { 2003b18: b0 92 20 00 orcc %o0, 0, %i0 2003b1c: 12 80 00 13 bne 2003b68 2003b20: 03 00 80 70 sethi %hi(0x201c000), %g1 if (rtems_malloc_sbrk_helpers) 2003b24: 03 00 80 70 sethi %hi(0x201c000), %g1 2003b28: c2 00 61 94 ld [ %g1 + 0x194 ], %g1 ! 201c194 2003b2c: 80 a0 60 00 cmp %g1, 0 2003b30: 02 80 00 08 be 2003b50 2003b34: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2003b38: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003b3c: 9f c0 40 00 call %g1 2003b40: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 2003b44: b0 92 20 00 orcc %o0, 0, %i0 2003b48: 12 80 00 08 bne 2003b68 2003b4c: 03 00 80 70 sethi %hi(0x201c000), %g1 errno = ENOMEM; 2003b50: 40 00 2b dc call 200eac0 <__errno> 2003b54: b0 10 20 00 clr %i0 2003b58: 82 10 20 0c mov 0xc, %g1 2003b5c: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2003b60: 81 c7 e0 08 ret 2003b64: 81 e8 00 00 restore } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003b68: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 2003b6c: 80 a0 60 00 cmp %g1, 0 2003b70: 02 80 00 04 be 2003b80 2003b74: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003b78: 9f c0 40 00 call %g1 2003b7c: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003b80: 03 00 80 70 sethi %hi(0x201c000), %g1 2003b84: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 201c198 2003b88: 80 a0 60 00 cmp %g1, 0 2003b8c: 02 80 00 05 be 2003ba0 2003b90: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003b94: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003b98: 9f c0 40 00 call %g1 2003b9c: 90 10 00 18 mov %i0, %o0 return return_this; } 2003ba0: 81 c7 e0 08 ret 2003ba4: 81 e8 00 00 restore =============================================================================== 02003b34 : } static void *malloc_sbrk_extend_and_allocate( size_t size ) { 2003b34: 9d e3 bf a0 save %sp, -96, %sp * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 2003b38: 03 00 80 72 sethi %hi(0x201c800), %g1 2003b3c: fa 00 60 d8 ld [ %g1 + 0xd8 ], %i5 ! 201c8d8 if ( sbrk_amount == 0 ) 2003b40: 80 a7 60 00 cmp %i5, 0 2003b44: 02 80 00 22 be 2003bcc <== NEVER TAKEN 2003b48: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 2003b4c: 92 10 00 1d mov %i5, %o1 2003b50: 40 00 50 68 call 2017cf0 <.udiv> 2003b54: 90 06 00 1d add %i0, %i5, %o0 2003b58: 40 00 50 2c call 2017c08 <.umul> 2003b5c: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 2003b60: 7f ff f6 2e call 2001418 2003b64: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 2003b68: 80 a2 3f ff cmp %o0, -1 2003b6c: 02 80 00 18 be 2003bcc 2003b70: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 2003b74: 39 00 80 6f sethi %hi(0x201bc00), %i4 2003b78: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 ! 201bc28 2003b7c: 40 00 16 2a call 2009424 <_Protected_heap_Extend> 2003b80: 94 10 00 1d mov %i5, %o2 2003b84: 80 8a 20 ff btst 0xff, %o0 2003b88: 12 80 00 0a bne 2003bb0 2003b8c: 03 00 80 72 sethi %hi(0x201c800), %g1 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 2003b90: 7f ff f6 22 call 2001418 2003b94: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 2003b98: 40 00 2c 6e call 200ed50 <__errno> 2003b9c: b0 10 20 00 clr %i0 2003ba0: 82 10 20 0c mov 0xc, %g1 2003ba4: c2 22 00 00 st %g1, [ %o0 ] 2003ba8: 81 c7 e0 08 ret 2003bac: 81 e8 00 00 restore 2003bb0: f0 07 20 28 ld [ %i4 + 0x28 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2003bb4: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 2003bb8: b4 10 20 00 clr %i2 2003bbc: ba 07 40 02 add %i5, %g2, %i5 2003bc0: fa 20 60 a8 st %i5, [ %g1 + 0xa8 ] 2003bc4: 40 00 16 0a call 20093ec <_Protected_heap_Allocate_aligned_with_boundary> 2003bc8: 97 e8 20 00 restore %g0, 0, %o3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 2003bcc: b0 10 20 00 clr %i0 2003bd0: 81 c7 e0 08 ret 2003bd4: 81 e8 00 00 restore =============================================================================== 02003bd8 : static void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2003bd8: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2003bdc: 03 00 80 72 sethi %hi(0x201c800), %g1 2003be0: f2 20 60 d8 st %i1, [ %g1 + 0xd8 ] ! 201c8d8 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 2003be4: 80 a6 20 00 cmp %i0, 0 2003be8: 12 80 00 0e bne 2003c20 2003bec: 90 10 00 19 mov %i1, %o0 uaddress = (uintptr_t)sbrk(length); 2003bf0: 7f ff f6 0a call 2001418 2003bf4: 01 00 00 00 nop if (uaddress == (uintptr_t) -1) { 2003bf8: 80 a2 3f ff cmp %o0, -1 2003bfc: 12 80 00 04 bne 2003c0c <== NEVER TAKEN 2003c00: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003c04: 40 00 10 ea call 2007fac 2003c08: 90 10 20 1a mov 0x1a, %o0 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003c0c: 22 80 00 05 be,a 2003c20 <== NOT EXECUTED 2003c10: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 2003c14: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003c18: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED * adjust the length by whatever we aligned by */ length -= uaddress - old_address; } starting_address = (void *)uaddress; 2003c1c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return starting_address; } 2003c20: 81 c7 e0 08 ret 2003c24: 81 e8 00 00 restore =============================================================================== 0200e08c : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200e08c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200e090: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200e094: 92 10 00 19 mov %i1, %o1 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 200e098: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200e09c: 80 a0 40 19 cmp %g1, %i1 200e0a0: 06 80 00 09 bl 200e0c4 <== NEVER TAKEN 200e0a4: 94 10 00 1a mov %i2, %o2 200e0a8: 80 a0 40 19 cmp %g1, %i1 200e0ac: 32 80 00 0a bne,a 200e0d4 <== NEVER TAKEN 200e0b0: d2 27 60 50 st %o1, [ %i5 + 0x50 ] <== NOT EXECUTED 200e0b4: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200e0b8: 80 a0 40 1a cmp %g1, %i2 200e0bc: 3a 80 00 06 bcc,a 200e0d4 200e0c0: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200e0c4: 7f ff fe ff call 200dcc0 200e0c8: 90 10 00 1d mov %i5, %o0 200e0cc: 81 c7 e0 08 ret 200e0d0: 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; 200e0d4: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200e0d8: d2 26 20 08 st %o1, [ %i0 + 8 ] 200e0dc: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200e0e0: 90 07 bf f8 add %fp, -8, %o0 200e0e4: 7f ff d5 b5 call 20037b8 200e0e8: 92 10 20 00 clr %o1 200e0ec: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e0f0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200e0f4: 81 c7 e0 08 ret 200e0f8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200e0fc : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 200e0fc: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200e100: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200e104: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { 200e108: c2 00 40 00 ld [ %g1 ], %g1 200e10c: 80 a0 60 05 cmp %g1, 5 200e110: 32 80 00 11 bne,a 200e154 200e114: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200e118: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200e11c: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200e120: 80 a0 c0 01 cmp %g3, %g1 200e124: 14 80 00 09 bg 200e148 <== NEVER TAKEN 200e128: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200e12c: 80 a0 c0 01 cmp %g3, %g1 200e130: 32 80 00 19 bne,a 200e194 <== NEVER TAKEN 200e134: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200e138: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200e13c: 80 a0 c0 02 cmp %g3, %g2 200e140: 28 80 00 15 bleu,a 200e194 <== ALWAYS TAKEN 200e144: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200e148: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200e14c: 10 80 00 11 b 200e190 <== NOT EXECUTED 200e150: c4 26 20 14 st %g2, [ %i0 + 0x14 ] <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 200e154: 90 10 00 1d mov %i5, %o0 200e158: 92 10 00 02 mov %g2, %o1 200e15c: 7f ff fe d9 call 200dcc0 200e160: 94 10 00 03 mov %g3, %o2 200e164: 80 a2 20 00 cmp %o0, 0 200e168: 22 80 00 09 be,a 200e18c 200e16c: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200e170: 40 00 02 54 call 200eac0 <__errno> 200e174: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200e178: 82 10 20 1c mov 0x1c, %g1 200e17c: c2 22 00 00 st %g1, [ %o0 ] 200e180: b0 16 23 ff or %i0, 0x3ff, %i0 200e184: 81 c7 e0 08 ret 200e188: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200e18c: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200e190: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200e194: 81 c7 e0 08 ret 200e198: 81 e8 00 00 restore =============================================================================== 0200dfe8 : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200dfe8: 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 | LIBIO_FLAGS_APPEND)) 200dfec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200dff0: b8 10 00 18 mov %i0, %i4 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200dff4: 80 88 62 04 btst 0x204, %g1 200dff8: 02 80 00 1b be 200e064 200dffc: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200e000: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 200e004: c2 00 40 00 ld [ %g1 ], %g1 200e008: 80 a0 60 05 cmp %g1, 5 200e00c: 32 80 00 17 bne,a 200e068 <== ALWAYS TAKEN 200e010: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200e014: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200e018: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 200e01c: 03 00 80 6a sethi %hi(0x201a800), %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200e020: c0 27 60 50 clr [ %i5 + 0x50 ] <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (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; 200e024: 82 10 61 24 or %g1, 0x124, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200e028: c0 27 60 54 clr [ %i5 + 0x54 ] <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (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; 200e02c: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 200e030: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200e034: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200e038: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200e03c: 02 80 00 0a be 200e064 <== NOT EXECUTED 200e040: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200e044: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e048: 92 10 20 00 clr %o1 <== NOT EXECUTED 200e04c: 94 10 20 00 clr %o2 <== NOT EXECUTED 200e050: 7f ff ff 73 call 200de1c <== NOT EXECUTED 200e054: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200e058: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200e05c: 02 80 00 0a be 200e084 <== NOT EXECUTED 200e060: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200e064: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200e068: 80 88 62 00 btst 0x200, %g1 200e06c: 02 80 00 04 be 200e07c 200e070: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200e074: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200e078: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200e07c: b0 10 20 00 clr %i0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 200e080: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200e084: 81 c7 e0 08 ret 200e088: 81 e8 00 00 restore =============================================================================== 02003ce4 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003ce4: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; if ( 2003ce8: 80 a6 e0 01 cmp %i3, 1 2003cec: 18 80 00 b5 bgu 2003fc0 2003cf0: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 2003cf4: 40 00 21 22 call 200c17c 2003cf8: 90 10 00 1a mov %i2, %o0 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 2003cfc: a0 92 20 00 orcc %o0, 0, %l0 2003d00: 02 80 00 ac be 2003fb0 2003d04: a4 96 60 00 orcc %i1, 0, %l2 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2003d08: 12 80 00 04 bne 2003d18 2003d0c: 01 00 00 00 nop 2003d10: 25 00 80 69 sethi %hi(0x201a400), %l2 2003d14: a4 14 a1 38 or %l2, 0x138, %l2 ! 201a538 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003d18: 40 00 31 02 call 2010120 2003d1c: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003d20: a2 10 20 00 clr %l1 2003d24: 80 a6 20 00 cmp %i0, 0 2003d28: 02 80 00 05 be 2003d3c 2003d2c: ac 10 00 08 mov %o0, %l6 2003d30: 40 00 30 fc call 2010120 2003d34: 90 10 00 18 mov %i0, %o0 2003d38: a2 02 20 01 add %o0, 1, %l1 size_t target_size = strlen( target ) + 1; 2003d3c: 40 00 30 f9 call 2010120 2003d40: 90 10 00 12 mov %l2, %o0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003d44: 92 05 a0 8d add %l6, 0x8d, %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; 2003d48: aa 02 20 01 add %o0, 1, %l5 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003d4c: 92 02 40 11 add %o1, %l1, %o1 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003d50: 90 10 20 01 mov 1, %o0 2003d54: 7f ff fd c1 call 2003458 2003d58: 92 02 40 15 add %o1, %l5, %o1 if ( mt_entry != NULL ) { 2003d5c: ba 92 20 00 orcc %o0, 0, %i5 2003d60: 02 80 00 9e be 2003fd8 <== NEVER TAKEN 2003d64: a6 07 60 8c add %i5, 0x8c, %l3 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 ); 2003d68: 92 10 00 1a mov %i2, %o1 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; 2003d6c: ac 05 a0 01 inc %l6 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 ); 2003d70: 90 10 00 13 mov %l3, %o0 2003d74: 40 00 2d af call 200f430 2003d78: 94 10 00 16 mov %l6, %o2 mt_entry->type = str; str += filesystemtype_size; 2003d7c: b4 04 c0 16 add %l3, %l6, %i2 memcpy( str, source_or_null, source_size ); 2003d80: 92 10 00 18 mov %i0, %o1 2003d84: 94 10 00 11 mov %l1, %o2 (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 2003d88: e6 27 60 5c st %l3, [ %i5 + 0x5c ] str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 2003d8c: 40 00 2d a9 call 200f430 2003d90: 90 10 00 1a mov %i2, %o0 mt_entry->dev = str; str += source_size; 2003d94: a2 06 80 11 add %i2, %l1, %l1 memcpy( str, target, target_size ); 2003d98: 92 10 00 12 mov %l2, %o1 2003d9c: 94 10 00 15 mov %l5, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003da0: f4 27 60 60 st %i2, [ %i5 + 0x60 ] str += source_size; memcpy( str, target, target_size ); 2003da4: 40 00 2d a3 call 200f430 2003da8: 90 10 00 11 mov %l1, %o0 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003dac: 82 10 20 01 mov 1, %g1 + filesystemtype_size + source_size + target_size + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { rtems_filesystem_global_location_t *mt_fs_root = 2003db0: a8 07 60 64 add %i5, 0x64, %l4 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003db4: c2 2f 60 1c stb %g1, [ %i5 + 0x1c ] mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003db8: 94 10 20 30 mov 0x30, %o2 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2003dbc: e2 27 60 58 st %l1, [ %i5 + 0x58 ] str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 2003dc0: e8 27 60 18 st %l4, [ %i5 + 0x18 ] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003dc4: 90 07 60 28 add %i5, 0x28, %o0 2003dc8: 13 00 80 69 sethi %hi(0x201a400), %o1 2003dcc: 40 00 2d 99 call 200f430 2003dd0: 92 12 61 3c or %o1, 0x13c, %o1 ! 201a53c mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003dd4: 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 ); 2003dd8: 90 07 60 08 add %i5, 8, %o0 2003ddc: c2 27 60 80 st %g1, [ %i5 + 0x80 ] 2003de0: 92 10 00 14 mov %l4, %o1 2003de4: 94 10 20 01 mov 1, %o2 2003de8: 96 10 20 28 mov 0x28, %o3 2003dec: 40 00 11 3c call 20082dc <_Chain_Initialize> 2003df0: fa 27 60 7c st %i5, [ %i5 + 0x7c ] ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 2003df4: 90 10 00 1d mov %i5, %o0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003df8: f6 2f 60 1d stb %i3, [ %i5 + 0x1d ] rv = (*fsmount_me_h)( mt_entry, data ); 2003dfc: 9f c4 00 00 call %l0 2003e00: 92 10 00 1c mov %i4, %o1 if ( rv == 0 ) { 2003e04: b0 92 20 00 orcc %o0, 0, %i0 2003e08: 12 80 00 66 bne 2003fa0 2003e0c: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 2003e10: 02 80 00 36 be 2003ee8 2003e14: 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 = 2003e18: 94 10 20 1f mov 0x1f, %o2 2003e1c: 40 00 03 40 call 2004b1c 2003e20: 90 07 bf a8 add %fp, -88, %o0 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { return (*loc->ops->are_nodes_equal_h)( 2003e24: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 loc, &loc->mt_entry->mt_fs_root->location 2003e28: c4 02 20 18 ld [ %o0 + 0x18 ], %g2 static inline bool rtems_filesystem_location_is_root( const rtems_filesystem_location_info_t *loc ) { return (*loc->ops->are_nodes_equal_h)( 2003e2c: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2003e30: 9f c0 40 00 call %g1 2003e34: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_root( currentloc ) ) { 2003e38: 80 8a 20 ff btst 0xff, %o0 2003e3c: 12 80 00 20 bne 2003ebc 2003e40: 92 07 bf c0 add %fp, -64, %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( 2003e44: 40 00 03 f0 call 2004e04 2003e48: 90 07 bf e4 add %fp, -28, %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 ); 2003e4c: 40 00 04 66 call 2004fe4 2003e50: 90 07 bf e4 add %fp, -28, %o0 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003e54: 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; 2003e58: d0 27 60 14 st %o0, [ %i5 + 0x14 ] rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003e5c: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 if ( !rtems_filesystem_location_is_root( currentloc ) ) { rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 2003e60: b8 10 00 08 mov %o0, %i4 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003e64: 9f c0 40 00 call %g1 2003e68: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 2003e6c: b0 92 20 00 orcc %o0, 0, %i0 2003e70: 12 80 00 10 bne 2003eb0 2003e74: 01 00 00 00 nop rtems_filesystem_mt_lock(); 2003e78: 7f ff ff 94 call 2003cc8 2003e7c: 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; 2003e80: 03 00 80 6e sethi %hi(0x201b800), %g1 2003e84: 82 10 63 44 or %g1, 0x344, %g1 ! 201bb44 2003e88: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003e8c: 86 00 60 04 add %g1, 4, %g3 tail->previous = the_node; 2003e90: fa 20 60 08 st %i5, [ %g1 + 8 ] rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2003e94: 03 00 80 71 sethi %hi(0x201c400), %g1 2003e98: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 201c540 ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; 2003e9c: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; old_last->next = the_node; 2003ea0: fa 20 80 00 st %i5, [ %g2 ] 2003ea4: 40 00 0e bf call 20079a0 2003ea8: c4 27 60 04 st %g2, [ %i5 + 4 ] 2003eac: 30 80 00 08 b,a 2003ecc &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 2003eb0: 40 00 03 fa call 2004e98 2003eb4: 90 10 00 1c mov %i4, %o0 2003eb8: 30 80 00 05 b,a 2003ecc } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 2003ebc: 90 07 bf a8 add %fp, -88, %o0 2003ec0: 92 10 20 10 mov 0x10, %o1 2003ec4: 40 00 02 63 call 2004850 2003ec8: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2003ecc: 40 00 03 1a call 2004b34 2003ed0: 90 07 bf a8 add %fp, -88, %o0 rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 2003ed4: 80 a6 20 00 cmp %i0, 0 2003ed8: 02 80 00 3e be 2003fd0 2003edc: 01 00 00 00 nop (*mt_entry->mt_fs_root->location.ops->fsunmount_me_h)( mt_entry ); 2003ee0: 10 80 00 2c b 2003f90 2003ee4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; rtems_filesystem_mt_lock(); 2003ee8: 7f ff ff 78 call 2003cc8 2003eec: 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; 2003ef0: 05 00 80 6e sethi %hi(0x201b800), %g2 if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 2003ef4: c6 00 a3 44 ld [ %g2 + 0x344 ], %g3 ! 201bb44 2003ef8: 82 10 a3 44 or %g2, 0x344, %g1 2003efc: 84 00 60 04 add %g1, 4, %g2 2003f00: 80 a0 c0 02 cmp %g3, %g2 2003f04: 12 80 00 08 bne 2003f24 <== NEVER TAKEN 2003f08: 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; 2003f0c: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2003f10: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003f14: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2003f18: fa 20 80 00 st %i5, [ %g2 ] the_node->previous = old_last; 2003f1c: 10 80 00 06 b 2003f34 2003f20: c4 27 60 04 st %g2, [ %i5 + 4 ] rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 2003f24: 40 00 2a e7 call 200eac0 <__errno> <== NOT EXECUTED 2003f28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003f2c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003f30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003f34: 03 00 80 71 sethi %hi(0x201c400), %g1 2003f38: 40 00 0e 9a call 20079a0 2003f3c: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 201c540 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { 2003f40: 80 a6 20 00 cmp %i0, 0 2003f44: 32 80 00 13 bne,a 2003f90 <== NEVER TAKEN 2003f48: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 2003f4c: ba 07 60 18 add %i5, 0x18, %i5 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 2003f50: 40 00 03 f2 call 2004f18 2003f54: 90 10 00 1d mov %i5, %o0 2003f58: 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 = 2003f5c: 40 00 03 ef call 2004f18 2003f60: 90 10 00 1d mov %i5, %o0 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2003f64: 3b 00 80 6e sethi %hi(0x201b800), %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 = 2003f68: b8 10 00 08 mov %o0, %i4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2003f6c: d0 07 63 64 ld [ %i5 + 0x364 ], %o0 2003f70: 92 10 00 1b mov %i3, %o1 2003f74: 40 00 03 e0 call 2004ef4 2003f78: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 2003f7c: d0 07 63 64 ld [ %i5 + 0x364 ], %o0 2003f80: 40 00 03 dd call 2004ef4 2003f84: 92 10 00 1c mov %i4, %o1 2003f88: 81 c7 e0 08 ret 2003f8c: 81 e8 00 00 restore } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->mt_fs_root->location.ops->fsunmount_me_h)( mt_entry ); 2003f90: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2003f94: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 2003f98: 9f c0 40 00 call %g1 2003f9c: 90 10 00 1d mov %i5, %o0 } } if ( rv != 0 ) { free( mt_entry ); 2003fa0: 7f ff fd dc call 2003710 2003fa4: 90 10 00 1d mov %i5, %o0 2003fa8: 81 c7 e0 08 ret 2003fac: 81 e8 00 00 restore } else { errno = ENOMEM; rv = -1; } } else { errno = EINVAL; 2003fb0: 40 00 2a c4 call 200eac0 <__errno> 2003fb4: 01 00 00 00 nop 2003fb8: 10 80 00 0b b 2003fe4 2003fbc: 82 10 20 16 mov 0x16, %g1 ! 16 rv = -1; } } else { errno = EINVAL; 2003fc0: 40 00 2a c0 call 200eac0 <__errno> 2003fc4: b0 10 3f ff mov -1, %i0 2003fc8: 82 10 20 16 mov 0x16, %g1 2003fcc: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2003fd0: 81 c7 e0 08 ret 2003fd4: 81 e8 00 00 restore if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; 2003fd8: 40 00 2a ba call 200eac0 <__errno> <== NOT EXECUTED 2003fdc: 01 00 00 00 nop <== NOT EXECUTED 2003fe0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2003fe4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; 2003fe8: 81 c7 e0 08 ret 2003fec: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 02008bbc : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2008bbc: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 2008bc0: 90 96 60 00 orcc %i1, 0, %o0 2008bc4: 02 80 00 09 be 2008be8 2008bc8: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2008bcc: 40 00 02 ef call 2009788 2008bd0: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 2008bd4: 80 a2 20 00 cmp %o0, 0 2008bd8: 12 80 00 09 bne 2008bfc <== NEVER TAKEN 2008bdc: 01 00 00 00 nop rv = mount( 2008be0: 40 00 00 10 call 2008c20 2008be4: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 2008be8: 40 00 5a ba call 201f6d0 <__errno> 2008bec: 01 00 00 00 nop 2008bf0: 82 10 20 16 mov 0x16, %g1 ! 16 2008bf4: c2 22 00 00 st %g1, [ %o0 ] const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2008bf8: 90 10 3f ff mov -1, %o0 } else { errno = EINVAL; } return rv; } 2008bfc: 81 c7 e0 08 ret 2008c00: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0203349c : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 203349c: 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; 20334a0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 20334a4: 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; 20334a8: e0 00 60 20 ld [ %g1 + 0x20 ], %l0 fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 20334ac: 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); 20334b0: 94 10 20 20 mov 0x20, %o2 20334b4: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 20334b8: c2 27 bf f4 st %g1, [ %fp + -12 ] 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; 20334bc: e2 06 20 08 ld [ %i0 + 8 ], %l1 fat_file_fd_t *fat_fd = NULL; 20334c0: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 20334c4: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 20334c8: c0 37 bf fe clrh [ %fp + -2 ] static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 20334cc: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 20334d0: c0 27 bf ec clr [ %fp + -20 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 20334d4: 40 00 44 38 call 20445b4 20334d8: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 20334dc: 90 07 bf 68 add %fp, -152, %o0 20334e0: 92 10 20 00 clr %o1 20334e4: 40 00 44 34 call 20445b4 20334e8: 94 10 20 40 mov 0x40, %o2 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 20334ec: 80 a6 e1 04 cmp %i3, 0x104 20334f0: 04 80 00 06 ble 2033508 <== ALWAYS TAKEN 20334f4: b8 10 00 18 mov %i0, %i4 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 20334f8: 40 00 36 62 call 2040e80 <__errno> <== NOT EXECUTED 20334fc: 01 00 00 00 nop <== NOT EXECUTED 2033500: 10 80 00 0d b 2033534 <== NOT EXECUTED 2033504: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 2033508: 90 10 00 1a mov %i2, %o0 203350c: 92 10 00 1b mov %i3, %o1 2033510: 94 07 bf a8 add %fp, -88, %o2 2033514: 40 00 01 39 call 20339f8 2033518: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 203351c: a4 92 20 00 orcc %o0, 0, %l2 2033520: 32 80 00 08 bne,a 2033540 <== ALWAYS TAKEN 2033524: c0 2f bf b4 clrb [ %fp + -76 ] rtems_set_errno_and_return_minus_one(EINVAL); 2033528: 40 00 36 56 call 2040e80 <__errno> <== NOT EXECUTED 203352c: 01 00 00 00 nop <== NOT EXECUTED 2033530: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2033534: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2033538: 81 c7 e0 08 ret <== NOT EXECUTED 203353c: 91 e8 3f ff restore %g0, -1, %o0 <== 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); 2033540: 90 10 20 00 clr %o0 2033544: 40 00 69 61 call 204dac8