=============================================================================== 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 88 sethi %hi(0x2022000), %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 91 sethi %hi(0x2024400), %i4 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 20057e0: 35 00 80 89 sethi %hi(0x2022400), %i2 return; } puts(""); 20057e4: 37 00 80 88 sethi %hi(0x2022000), %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 23 e0 or %l0, 0x3e0, %l0 20057f0: b8 17 21 68 or %i4, 0x168, %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 a0 50 or %i2, 0x50, %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 e3 78 or %i3, 0x378, %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 39 91 call 2013e48 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 39 89 call 2013e48 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 39 45 call 2013d74 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 88 sethi %hi(0x2022000), %o1 2005874: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005878: 92 12 63 e8 or %o1, 0x3e8, %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 89 sethi %hi(0x2022400), %o1 2005898: 92 12 60 00 mov %o1, %o1 ! 2022400 200589c: 40 00 39 1a call 2013d04 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 89 sethi %hi(0x2022400), %o1 20058b8: 40 00 39 13 call 2013d04 20058bc: 92 12 60 10 or %o1, 0x10, %o1 ! 2022410 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 89 sethi %hi(0x2022400), %o0 20058c8: c2 07 00 00 ld [ %i4 ], %g1 20058cc: 10 80 00 05 b 20058e0 20058d0: 90 12 20 20 or %o0, 0x20, %o0 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 20058d4: c2 07 00 00 ld [ %i4 ], %g1 20058d8: 11 00 80 89 sethi %hi(0x2022400), %o0 20058dc: 90 12 20 38 or %o0, 0x38, %o0 ! 2022438 20058e0: 40 00 39 5a call 2013e48 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 39 04 call 2013d04 <== 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 40 42 call 2015a0c 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 =============================================================================== 0200b8a0 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b8a0: 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; 200b8a4: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200b8a8: 90 10 00 18 mov %i0, %o0 200b8ac: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200b8b0: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200b8b4: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200b8b8: 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( 200b8bc: 92 10 20 01 mov 1, %o1 200b8c0: 40 00 03 0d call 200c4f4 200b8c4: b0 10 20 01 mov 1, %i0 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200b8c8: 80 8a 20 ff btst 0xff, %o0 200b8cc: 02 80 00 48 be 200b9ec 200b8d0: 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] == '.'; 200b8d4: 12 80 00 5c bne 200ba44 200b8d8: 80 a6 e0 02 cmp %i3, 2 200b8dc: c2 4e 80 00 ldsb [ %i2 ], %g1 200b8e0: 80 a0 60 2e cmp %g1, 0x2e 200b8e4: 32 80 00 5b bne,a 200ba50 200b8e8: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200b8ec: 10 80 00 1c b 200b95c 200b8f0: 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] == '.'; 200b8f4: 80 a0 60 2e cmp %g1, 0x2e 200b8f8: 32 80 00 56 bne,a 200ba50 200b8fc: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200b900: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200b904: 80 a0 60 2e cmp %g1, 0x2e 200b908: 32 80 00 52 bne,a 200ba50 <== NEVER TAKEN 200b90c: 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; 200b910: 10 80 00 13 b 200b95c 200b914: 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 200b918: 92 10 00 1a mov %i2, %o1 200b91c: 40 00 15 9f call 2010f98 200b920: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200b924: 80 a2 20 00 cmp %o0, 0 200b928: 32 80 00 08 bne,a 200b948 200b92c: f2 06 40 00 ld [ %i1 ], %i1 200b930: 82 06 40 1b add %i1, %i3, %g1 200b934: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200b938: 80 a0 60 00 cmp %g1, 0 200b93c: 02 80 00 09 be 200b960 200b940: 80 a6 60 00 cmp %i1, 0 200b944: 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 ) { 200b948: 80 a6 40 18 cmp %i1, %i0 200b94c: 12 bf ff f3 bne 200b918 200b950: 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; 200b954: 81 c7 e0 08 ret 200b958: 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 ) { 200b95c: 80 a6 60 00 cmp %i1, 0 200b960: 02 80 00 23 be 200b9ec 200b964: b0 10 20 02 mov 2, %i0 bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 200b968: 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; 200b96c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200b970: 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; 200b974: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 200b978: b0 60 3f ff subx %g0, -1, %i0 200b97c: 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)) { 200b980: 80 a0 60 02 cmp %g1, 2 200b984: 12 80 00 0a bne 200b9ac 200b988: c0 27 60 0c clr [ %i5 + 0xc ] 200b98c: 80 88 a0 08 btst 8, %g2 200b990: 32 80 00 32 bne,a 200ba58 200b994: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 200b998: 80 8e 20 ff btst 0xff, %i0 200b99c: 32 80 00 30 bne,a 200ba5c <== ALWAYS TAKEN 200b9a0: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 entry = entry->info.hard_link.link_node; 200b9a4: 10 80 00 2d b 200ba58 <== NOT EXECUTED 200b9a8: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200b9ac: 80 a0 60 03 cmp %g1, 3 200b9b0: 12 80 00 11 bne 200b9f4 200b9b4: 80 a0 60 00 cmp %g1, 0 200b9b8: 80 88 a0 10 btst 0x10, %g2 200b9bc: 12 80 00 04 bne 200b9cc 200b9c0: 80 8e 20 ff btst 0xff, %i0 200b9c4: 32 80 00 26 bne,a 200ba5c 200b9c8: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 const char *target = entry->info.sym_link.name; 200b9cc: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200b9d0: 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 ) ); 200b9d4: 40 00 15 40 call 2010ed4 200b9d8: 90 10 00 1c mov %i4, %o0 200b9dc: 92 10 00 1c mov %i4, %o1 200b9e0: 94 10 00 08 mov %o0, %o2 200b9e4: 7f ff e4 7d call 2004bd8 200b9e8: 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)) { 200b9ec: 81 c7 e0 08 ret 200b9f0: 81 e8 00 00 restore IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 200b9f4: 32 80 00 1a bne,a 200ba5c 200b9f8: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 if ( node->info.directory.mt_fs != NULL ) { 200b9fc: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 200ba00: 80 a0 60 00 cmp %g1, 0 200ba04: 02 80 00 15 be 200ba58 200ba08: 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( 200ba0c: d4 06 60 30 ld [ %i1 + 0x30 ], %o2 200ba10: d6 16 60 3c lduh [ %i1 + 0x3c ], %o3 200ba14: 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; 200ba18: 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( 200ba1c: 92 10 20 01 mov 1, %o1 200ba20: 40 00 02 b5 call 200c4f4 200ba24: b0 10 20 01 mov 1, %i0 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200ba28: 80 8a 20 ff btst 0xff, %o0 200ba2c: 02 bf ff f0 be 200b9ec <== NEVER TAKEN 200ba30: 90 10 00 1d mov %i5, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200ba34: 7f ff e4 52 call 2004b7c 200ba38: 92 10 00 1c mov %i4, %o1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200ba3c: 81 c7 e0 08 ret 200ba40: 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] == '.'; 200ba44: 22 bf ff ac be,a 200b8f4 200ba48: c2 4e 80 00 ldsb [ %i2 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200ba4c: 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 ); 200ba50: 10 bf ff be b 200b948 200ba54: 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; 200ba58: c2 17 20 34 lduh [ %i4 + 0x34 ], %g1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200ba5c: 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; 200ba60: 82 00 7f ff add %g1, -1, %g1 200ba64: c2 37 20 34 sth %g1, [ %i4 + 0x34 ] ++entry->reference_count; 200ba68: c2 16 60 34 lduh [ %i1 + 0x34 ], %g1 200ba6c: 82 00 60 01 inc %g1 200ba70: 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; 200ba74: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 currentloc->node_access = entry; 200ba78: f2 27 60 20 st %i1, [ %i5 + 0x20 ] 200ba7c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200ba80: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 200ba84: 81 c7 e0 08 ret 200ba88: 81 e8 00 00 restore =============================================================================== 02003994 : static off_t IMFS_fifo_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2003994: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 2003998: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200399c: 92 10 00 19 mov %i1, %o1 20039a0: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 20039a4: 98 10 00 18 mov %i0, %o4 20039a8: 94 10 00 1a mov %i2, %o2 20039ac: 40 00 2a f7 call 200e588 20039b0: 96 10 00 1b mov %i3, %o3 20039b4: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 20039b8: 80 a6 20 00 cmp %i0, 0 20039bc: 16 80 00 08 bge 20039dc <== NEVER TAKEN 20039c0: b2 10 00 08 mov %o0, %i1 20039c4: 40 00 37 a5 call 2011858 <__errno> 20039c8: 31 3f ff ff sethi %hi(0xfffffc00), %i0 20039cc: 82 20 00 19 neg %i1, %g1 20039d0: c2 22 00 00 st %g1, [ %o0 ] 20039d4: b0 16 23 ff or %i0, 0x3ff, %i0 20039d8: b2 10 00 18 mov %i0, %i1 } 20039dc: 81 c7 e0 08 ret 20039e0: 81 e8 00 00 restore =============================================================================== 020039e4 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20039e4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 20039e8: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20039ec: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 20039f0: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 20039f4: 92 10 00 19 mov %i1, %o1 20039f8: 40 00 2a 56 call 200e350 20039fc: 94 10 00 1a mov %i2, %o2 if (err > 0) { 2003a00: b0 92 20 00 orcc %o0, 0, %i0 2003a04: 04 80 00 09 ble 2003a28 2003a08: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 2003a0c: 40 00 04 1d call 2004a80 2003a10: 92 10 20 00 clr %o1 2003a14: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003a18: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2003a1c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003a20: 81 c7 e0 08 ret 2003a24: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003a28: 80 a6 20 00 cmp %i0, 0 2003a2c: 02 80 00 06 be 2003a44 <== NEVER TAKEN 2003a30: 01 00 00 00 nop 2003a34: 40 00 37 89 call 2011858 <__errno> 2003a38: b0 20 00 18 neg %i0 2003a3c: f0 22 00 00 st %i0, [ %o0 ] 2003a40: b0 10 3f ff mov -1, %i0 } 2003a44: 81 c7 e0 08 ret 2003a48: 81 e8 00 00 restore =============================================================================== 0200bb18 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200bb18: 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; 200bb1c: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 200bb20: ba 07 bf e4 add %fp, -28, %i5 200bb24: 92 10 00 1c mov %i4, %o1 200bb28: 90 10 00 1d mov %i5, %o0 200bb2c: 40 00 11 ae call 20101e4 200bb30: 94 10 20 1c mov 0x1c, %o2 jnode = (IMFS_jnode_t *)loc.node_access; 200bb34: f6 07 bf ec ld [ %fp + -20 ], %i3 200bb38: c0 27 20 08 clr [ %i4 + 8 ] 200bb3c: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 200bb40: f8 06 e0 08 ld [ %i3 + 8 ], %i4 200bb44: 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 ) ) { 200bb48: 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; 200bb4c: f6 27 bf ec st %i3, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200bb50: 80 a0 60 00 cmp %g1, 0 200bb54: 12 80 00 07 bne 200bb70 200bb58: c4 27 bf f4 st %g2, [ %fp + -12 ] 200bb5c: 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 ); 200bb60: 82 06 e0 54 add %i3, 0x54, %g1 200bb64: 80 a0 80 01 cmp %g2, %g1 200bb68: 12 80 00 0e bne 200bba0 200bb6c: 80 a6 e0 00 cmp %i3, 0 result = IMFS_rmnod( NULL, &loc ); 200bb70: 90 10 20 00 clr %o0 200bb74: 7f ff dd 95 call 20031c8 200bb78: 92 10 00 1d mov %i5, %o1 if ( result != 0 ) 200bb7c: 80 a2 20 00 cmp %o0, 0 200bb80: 22 80 00 05 be,a 200bb94 <== ALWAYS TAKEN 200bb84: 90 10 00 1b mov %i3, %o0 rtems_fatal_error_occurred( 0xdeadbeef ); 200bb88: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 <== NOT EXECUTED 200bb8c: 7f ff f0 ff call 2007f88 <== NOT EXECUTED 200bb90: 90 12 22 ef or %o0, 0x2ef, %o0 ! deadbeef <== NOT EXECUTED IMFS_node_destroy( jnode ); 200bb94: 7f ff dc b6 call 2002e6c 200bb98: b6 10 00 1c mov %i4, %i3 jnode = next; } if ( jnode != NULL ) { 200bb9c: 80 a6 e0 00 cmp %i3, 0 200bba0: 02 80 00 0e be 200bbd8 200bba4: 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; 200bba8: c2 06 e0 4c ld [ %i3 + 0x4c ], %g1 if ( IMFS_is_directory( jnode ) ) { 200bbac: c2 00 40 00 ld [ %g1 ], %g1 200bbb0: 80 a0 60 00 cmp %g1, 0 200bbb4: 32 bf ff e3 bne,a 200bb40 <== NEVER TAKEN 200bbb8: 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; 200bbbc: 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 ); 200bbc0: 84 06 e0 54 add %i3, 0x54, %g2 if ( jnode_has_children( jnode ) ) 200bbc4: 80 a0 40 02 cmp %g1, %g2 200bbc8: 02 bf ff dd be 200bb3c 200bbcc: 80 a0 60 00 cmp %g1, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200bbd0: 12 bf ff db bne 200bb3c <== ALWAYS TAKEN 200bbd4: b6 10 00 01 mov %g1, %i3 200bbd8: 81 c7 e0 08 ret 200bbdc: 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 75 sethi %hi(0x201d400), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002d78: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 ! 201d724 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 63 24 st %g2, [ %g1 + 0x324 ] memcpy( 2002d90: 40 00 35 15 call 20101e4 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 6c sethi %hi(0x201b000), %o2 2002da4: 96 10 20 00 clr %o3 2002da8: 94 12 a2 30 or %o2, 0x230, %o2 2002dac: 19 00 00 10 sethi %hi(0x4000), %o4 2002db0: 9a 10 20 00 clr %o5 2002db4: 40 00 22 6c call 200b764 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 6e sethi %hi(0x201b800), %o1 2002dd0: 94 10 20 30 mov 0x30, %o2 2002dd4: 40 00 35 04 call 20101e4 2002dd8: 92 12 63 1c or %o1, 0x31c, %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 73 sethi %hi(0x201cc00), %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 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 63 58 ld [ %g1 + 0x358 ], %g1 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002e08: 40 00 32 9b call 200f874 <__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 75 sethi %hi(0x201d400), %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 75 sethi %hi(0x201d400), %g2 2002e48: c2 20 a3 20 st %g1, [ %g2 + 0x320 ] ! 201d720 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 84 sethi %hi(0x2021000), %g1 20047f0: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 20212ec 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 3d 1e call 2013cb8 <__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 d5 call 200fbf4 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 3c ee call 2013cb8 <__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 =============================================================================== 0200e5e8 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200e5e8: 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 ) 200e5ec: 03 00 80 75 sethi %hi(0x201d400), %g1 200e5f0: fa 00 63 20 ld [ %g1 + 0x320 ], %i5 ! 201d720 200e5f4: b9 37 60 02 srl %i5, 2, %i4 200e5f8: 92 10 00 1c mov %i4, %o1 200e5fc: 40 00 28 4c call 201872c <.umul> 200e600: 90 07 20 01 add %i4, 1, %o0 200e604: 92 10 00 1c mov %i4, %o1 200e608: 40 00 28 49 call 201872c <.umul> 200e60c: 90 02 20 01 inc %o0 200e610: 92 10 00 1d mov %i5, %o1 200e614: 40 00 28 46 call 201872c <.umul> 200e618: 90 02 3f ff add %o0, -1, %o0 200e61c: 82 10 20 00 clr %g1 200e620: 80 a0 40 19 cmp %g1, %i1 200e624: 34 80 00 0b bg,a 200e650 <== NEVER TAKEN 200e628: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 <== NOT EXECUTED 200e62c: 80 a0 40 19 cmp %g1, %i1 200e630: 12 80 00 04 bne 200e640 200e634: 80 a2 00 1a cmp %o0, %i2 200e638: 38 80 00 06 bgu,a 200e650 200e63c: f8 06 20 50 ld [ %i0 + 0x50 ], %i4 rtems_set_errno_and_return_minus_one( EINVAL ); 200e640: 40 00 04 8d call 200f874 <__errno> 200e644: 01 00 00 00 nop 200e648: 10 80 00 29 b 200e6ec 200e64c: 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 ) 200e650: 80 a6 40 1c cmp %i1, %i4 200e654: 14 80 00 07 bg 200e670 <== NEVER TAKEN 200e658: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 200e65c: 80 a6 40 1c cmp %i1, %i4 200e660: 12 80 00 37 bne 200e73c <== NEVER TAKEN 200e664: 80 a6 80 10 cmp %i2, %l0 200e668: 08 80 00 35 bleu 200e73c 200e66c: 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; 200e670: b7 3f 60 1f sra %i5, 0x1f, %i3 200e674: 96 10 00 1d mov %i5, %o3 200e678: 94 10 00 1b mov %i3, %o2 200e67c: 90 10 00 19 mov %i1, %o0 200e680: 40 00 29 bd call 2018d74 <__divdi3> 200e684: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e688: 90 10 00 1c mov %i4, %o0 200e68c: 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; 200e690: a2 10 00 09 mov %o1, %l1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e694: 94 10 00 1b mov %i3, %o2 200e698: 40 00 29 b7 call 2018d74 <__divdi3> 200e69c: 92 10 00 10 mov %l0, %o1 200e6a0: b8 10 00 09 mov %o1, %i4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200e6a4: 10 80 00 15 b 200e6f8 200e6a8: ba 10 00 09 mov %o1, %i5 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200e6ac: 7f ff ff 49 call 200e3d0 200e6b0: 92 10 00 1d mov %i5, %o1 200e6b4: 80 a2 20 00 cmp %o0, 0 200e6b8: 22 80 00 10 be,a 200e6f8 200e6bc: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200e6c0: 10 80 00 06 b 200e6d8 200e6c4: 80 a7 40 1c cmp %i5, %i4 IMFS_memfile_remove_block( the_jnode, block ); 200e6c8: 90 10 00 18 mov %i0, %o0 200e6cc: 7f ff ff bb call 200e5b8 200e6d0: 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-- ) { 200e6d4: 80 a7 40 1c cmp %i5, %i4 200e6d8: 1a bf ff fc bcc 200e6c8 200e6dc: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200e6e0: 40 00 04 65 call 200f874 <__errno> 200e6e4: 01 00 00 00 nop 200e6e8: 82 10 20 1c mov 0x1c, %g1 ! 1c 200e6ec: c2 22 00 00 st %g1, [ %o0 ] 200e6f0: 81 c7 e0 08 ret 200e6f4: 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++ ) { 200e6f8: 80 a7 40 11 cmp %i5, %l1 200e6fc: 08 bf ff ec bleu 200e6ac 200e700: 90 10 00 18 mov %i0, %o0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200e704: f2 26 20 50 st %i1, [ %i0 + 0x50 ] 200e708: f4 26 20 54 st %i2, [ %i0 + 0x54 ] IMFS_update_ctime(the_jnode); 200e70c: 92 10 20 00 clr %o1 200e710: 7f ff d4 2a call 20037b8 200e714: 90 07 bf f8 add %fp, -8, %o0 200e718: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200e71c: 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); 200e720: c2 26 20 48 st %g1, [ %i0 + 0x48 ] IMFS_update_mtime(the_jnode); 200e724: 7f ff d4 25 call 20037b8 200e728: 92 10 20 00 clr %o1 200e72c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e730: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; 200e734: 81 c7 e0 08 ret 200e738: 91 e8 20 00 restore %g0, 0, %o0 } 200e73c: 81 c7 e0 08 ret 200e740: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200df40 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200df40: 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 ) { 200df44: 03 00 80 75 sethi %hi(0x201d400), %g1 200df48: f8 00 63 20 ld [ %g1 + 0x320 ], %i4 ! 201d720 200df4c: b9 37 20 02 srl %i4, 2, %i4 200df50: 82 07 3f ff add %i4, -1, %g1 200df54: 80 a6 40 01 cmp %i1, %g1 200df58: 18 80 00 18 bgu 200dfb8 200df5c: ba 10 00 18 mov %i0, %i5 p = info->indirect; if ( malloc_it ) { 200df60: 80 a6 a0 00 cmp %i2, 0 200df64: 02 80 00 0f be 200dfa0 200df68: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 if ( !p ) { 200df6c: 80 a0 60 00 cmp %g1, 0 200df70: 32 80 00 09 bne,a 200df94 200df74: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 p = memfile_alloc_block(); 200df78: 7f ff ff e5 call 200df0c 200df7c: b0 10 20 00 clr %i0 if ( !p ) 200df80: 80 a2 20 00 cmp %o0, 0 200df84: 02 80 00 8a be 200e1ac <== NEVER TAKEN 200df88: 01 00 00 00 nop return 0; info->indirect = p; 200df8c: d0 27 60 58 st %o0, [ %i5 + 0x58 ] } return &info->indirect[ my_block ]; 200df90: f0 07 60 58 ld [ %i5 + 0x58 ], %i0 200df94: b3 2e 60 02 sll %i1, 2, %i1 200df98: 81 c7 e0 08 ret 200df9c: 91 ee 00 19 restore %i0, %i1, %o0 } if ( !p ) 200dfa0: 80 a0 60 00 cmp %g1, 0 200dfa4: 02 80 00 82 be 200e1ac <== NEVER TAKEN 200dfa8: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200dfac: b3 2e 60 02 sll %i1, 2, %i1 200dfb0: 81 c7 e0 08 ret 200dfb4: 91 e8 40 19 restore %g1, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200dfb8: 90 07 20 01 add %i4, 1, %o0 200dfbc: 40 00 29 dc call 201872c <.umul> 200dfc0: 92 10 00 1c mov %i4, %o1 200dfc4: 82 02 3f ff add %o0, -1, %g1 200dfc8: 80 a6 40 01 cmp %i1, %g1 200dfcc: 18 80 00 2f bgu 200e088 200dfd0: b6 10 00 08 mov %o0, %i3 my_block -= FIRST_DOUBLY_INDIRECT; 200dfd4: b2 26 40 1c sub %i1, %i4, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200dfd8: 92 10 00 1c mov %i4, %o1 200dfdc: 40 00 2a ba call 2018ac4 <.urem> 200dfe0: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200dfe4: 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; 200dfe8: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200dfec: 40 00 2a 0a call 2018814 <.udiv> 200dff0: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; if ( malloc_it ) { 200dff4: 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; 200dff8: b8 10 00 08 mov %o0, %i4 p = info->doubly_indirect; if ( malloc_it ) { 200dffc: 02 80 00 18 be 200e05c 200e000: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !p ) { 200e004: 80 a2 20 00 cmp %o0, 0 200e008: 32 80 00 08 bne,a 200e028 200e00c: b9 2f 20 02 sll %i4, 2, %i4 p = memfile_alloc_block(); 200e010: 7f ff ff bf call 200df0c 200e014: b0 10 20 00 clr %i0 if ( !p ) 200e018: 80 a2 20 00 cmp %o0, 0 200e01c: 02 80 00 64 be 200e1ac <== NEVER TAKEN 200e020: b9 2f 20 02 sll %i4, 2, %i4 return 0; info->doubly_indirect = p; 200e024: d0 27 60 5c st %o0, [ %i5 + 0x5c ] } p1 = (block_p *)p[ doubly ]; 200e028: ba 02 00 1c add %o0, %i4, %i5 200e02c: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p1 ) { 200e030: 80 a2 20 00 cmp %o0, 0 200e034: 12 80 00 4f bne 200e170 200e038: b1 2e e0 02 sll %i3, 2, %i0 p1 = memfile_alloc_block(); 200e03c: 7f ff ff b4 call 200df0c 200e040: b0 10 20 00 clr %i0 if ( !p1 ) 200e044: 80 a2 20 00 cmp %o0, 0 200e048: 02 80 00 59 be 200e1ac <== NEVER TAKEN 200e04c: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200e050: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p1[ singly ]; 200e054: 10 80 00 47 b 200e170 200e058: b1 2e e0 02 sll %i3, 2, %i0 } if ( !p ) 200e05c: 80 a2 20 00 cmp %o0, 0 200e060: 02 80 00 53 be 200e1ac <== NEVER TAKEN 200e064: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200e068: b9 2f 20 02 sll %i4, 2, %i4 200e06c: c2 02 00 1c ld [ %o0 + %i4 ], %g1 if ( !p ) 200e070: 80 a0 60 00 cmp %g1, 0 200e074: 02 80 00 4e be 200e1ac <== NEVER TAKEN 200e078: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200e07c: b1 2e e0 02 sll %i3, 2, %i0 200e080: 81 c7 e0 08 ret 200e084: 91 e8 40 18 restore %g1, %i0, %o0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200e088: 90 02 20 01 inc %o0 200e08c: 40 00 29 a8 call 201872c <.umul> 200e090: 92 10 00 1c mov %i4, %o1 200e094: 90 02 3f ff add %o0, -1, %o0 200e098: 80 a6 40 08 cmp %i1, %o0 200e09c: 18 80 00 44 bgu 200e1ac <== NEVER TAKEN 200e0a0: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200e0a4: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e0a8: 92 10 00 1c mov %i4, %o1 200e0ac: 40 00 2a 86 call 2018ac4 <.urem> 200e0b0: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e0b4: 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; 200e0b8: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e0bc: 40 00 29 d6 call 2018814 <.udiv> 200e0c0: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200e0c4: 92 10 00 1c mov %i4, %o1 200e0c8: 40 00 29 d3 call 2018814 <.udiv> 200e0cc: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e0d0: 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; 200e0d4: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e0d8: 40 00 2a 7b call 2018ac4 <.urem> 200e0dc: 90 10 00 19 mov %i1, %o0 p = info->triply_indirect; if ( malloc_it ) { 200e0e0: 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; 200e0e4: b8 10 00 08 mov %o0, %i4 p = info->triply_indirect; if ( malloc_it ) { 200e0e8: 02 80 00 24 be 200e178 200e0ec: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 if ( !p ) { 200e0f0: 80 a2 20 00 cmp %o0, 0 200e0f4: 12 80 00 08 bne 200e114 200e0f8: b7 2e e0 02 sll %i3, 2, %i3 p = memfile_alloc_block(); 200e0fc: 7f ff ff 84 call 200df0c 200e100: 01 00 00 00 nop if ( !p ) 200e104: 80 a2 20 00 cmp %o0, 0 200e108: 02 80 00 29 be 200e1ac <== NEVER TAKEN 200e10c: 01 00 00 00 nop return 0; info->triply_indirect = p; 200e110: d0 27 60 60 st %o0, [ %i5 + 0x60 ] } p1 = (block_p *) p[ triply ]; 200e114: ba 02 00 1b add %o0, %i3, %i5 200e118: d0 02 00 1b ld [ %o0 + %i3 ], %o0 if ( !p1 ) { 200e11c: 80 a2 20 00 cmp %o0, 0 200e120: 32 80 00 08 bne,a 200e140 200e124: b9 2f 20 02 sll %i4, 2, %i4 p1 = memfile_alloc_block(); 200e128: 7f ff ff 79 call 200df0c 200e12c: b0 10 20 00 clr %i0 if ( !p1 ) 200e130: 80 a2 20 00 cmp %o0, 0 200e134: 02 80 00 1e be 200e1ac <== NEVER TAKEN 200e138: b9 2f 20 02 sll %i4, 2, %i4 return 0; p[ triply ] = (block_p) p1; 200e13c: d0 27 40 00 st %o0, [ %i5 ] } p2 = (block_p *)p1[ doubly ]; 200e140: ba 02 00 1c add %o0, %i4, %i5 200e144: d0 02 00 1c ld [ %o0 + %i4 ], %o0 if ( !p2 ) { 200e148: 80 a2 20 00 cmp %o0, 0 200e14c: 12 80 00 09 bne 200e170 200e150: b1 2c 20 02 sll %l0, 2, %i0 p2 = memfile_alloc_block(); 200e154: 7f ff ff 6e call 200df0c 200e158: b0 10 20 00 clr %i0 if ( !p2 ) 200e15c: 80 a2 20 00 cmp %o0, 0 200e160: 02 80 00 13 be 200e1ac <== NEVER TAKEN 200e164: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200e168: d0 27 40 00 st %o0, [ %i5 ] } return (block_p *)&p2[ singly ]; 200e16c: b1 2c 20 02 sll %l0, 2, %i0 200e170: 81 c7 e0 08 ret 200e174: 91 ea 00 18 restore %o0, %i0, %o0 } if ( !p ) 200e178: 80 a2 20 00 cmp %o0, 0 200e17c: 02 80 00 0c be 200e1ac <== NEVER TAKEN 200e180: b7 2e e0 02 sll %i3, 2, %i3 return 0; p1 = (block_p *) p[ triply ]; 200e184: c2 02 00 1b ld [ %o0 + %i3 ], %g1 if ( !p1 ) 200e188: 80 a0 60 00 cmp %g1, 0 200e18c: 02 80 00 08 be 200e1ac <== NEVER TAKEN 200e190: b9 2f 20 02 sll %i4, 2, %i4 return 0; p2 = (block_p *)p1[ doubly ]; 200e194: c2 00 40 1c ld [ %g1 + %i4 ], %g1 if ( !p2 ) 200e198: 80 a0 60 00 cmp %g1, 0 200e19c: 02 80 00 04 be 200e1ac <== NEVER TAKEN 200e1a0: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200e1a4: b1 2c 20 02 sll %l0, 2, %i0 200e1a8: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200e1ac: 81 c7 e0 08 ret 200e1b0: 81 e8 00 00 restore =============================================================================== 0200e1b4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e1b4: 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; 200e1b8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200e1bc: 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 ) { 200e1c0: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e1c4: 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 ) { 200e1c8: 80 a0 60 05 cmp %g1, 5 200e1cc: 12 80 00 1c bne 200e23c 200e1d0: 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)) 200e1d4: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200e1d8: 82 10 20 00 clr %g1 200e1dc: 86 a3 40 1a subcc %o5, %i2, %g3 200e1e0: 84 63 00 19 subx %o4, %i1, %g2 200e1e4: 80 a0 40 02 cmp %g1, %g2 200e1e8: 14 80 00 07 bg 200e204 <== NEVER TAKEN 200e1ec: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 200e1f0: 80 a0 40 02 cmp %g1, %g2 200e1f4: 12 80 00 06 bne 200e20c <== NEVER TAKEN 200e1f8: 80 a7 00 03 cmp %i4, %g3 200e1fc: 28 80 00 05 bleu,a 200e210 <== NEVER TAKEN 200e200: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 200e204: 10 80 00 03 b 200e210 200e208: 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; 200e20c: 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); 200e210: 92 02 40 11 add %o1, %l1, %o1 200e214: 94 10 00 18 mov %i0, %o2 200e218: 40 00 07 f3 call 20101e4 200e21c: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200e220: 90 07 bf f8 add %fp, -8, %o0 200e224: 7f ff d5 65 call 20037b8 200e228: 92 10 20 00 clr %o1 200e22c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e230: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200e234: 81 c7 e0 08 ret 200e238: 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 ) 200e23c: 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; 200e240: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200e244: 88 10 20 00 clr %g4 200e248: c4 06 20 54 ld [ %i0 + 0x54 ], %g2 200e24c: 80 a1 00 03 cmp %g4, %g3 200e250: 14 80 00 08 bg 200e270 <== NEVER TAKEN 200e254: b4 07 00 1a add %i4, %i2, %i2 200e258: 80 a1 00 03 cmp %g4, %g3 200e25c: 32 80 00 07 bne,a 200e278 <== NEVER TAKEN 200e260: 03 00 80 75 sethi %hi(0x201d400), %g1 <== NOT EXECUTED 200e264: 80 a6 80 02 cmp %i2, %g2 200e268: 28 80 00 04 bleu,a 200e278 200e26c: 03 00 80 75 sethi %hi(0x201d400), %g1 my_length = the_jnode->info.file.size - start; 200e270: 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; 200e274: 03 00 80 75 sethi %hi(0x201d400), %g1 200e278: f4 00 63 20 ld [ %g1 + 0x320 ], %i2 ! 201d720 200e27c: 90 10 00 10 mov %l0, %o0 200e280: b1 3e a0 1f sra %i2, 0x1f, %i0 200e284: 92 10 00 11 mov %l1, %o1 200e288: 94 10 00 18 mov %i0, %o2 200e28c: 40 00 2b a0 call 201910c <__moddi3> 200e290: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e294: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e298: b2 10 00 09 mov %o1, %i1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e29c: 94 10 00 18 mov %i0, %o2 200e2a0: 92 10 00 11 mov %l1, %o1 200e2a4: 40 00 2a b4 call 2018d74 <__divdi3> 200e2a8: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200e2ac: 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; 200e2b0: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200e2b4: 80 a6 60 00 cmp %i1, 0 200e2b8: 02 80 00 14 be 200e308 200e2bc: 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 ); 200e2c0: 90 10 00 1d mov %i5, %o0 200e2c4: 7f ff ff 1f call 200df40 200e2c8: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e2cc: 80 a2 20 00 cmp %o0, 0 200e2d0: 02 bf ff d9 be 200e234 <== NEVER TAKEN 200e2d4: 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; 200e2d8: 80 a7 00 1a cmp %i4, %i2 200e2dc: 08 80 00 03 bleu 200e2e8 200e2e0: b0 10 00 1c mov %i4, %i0 200e2e4: 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 ); 200e2e8: d2 02 00 00 ld [ %o0 ], %o1 200e2ec: 94 10 00 18 mov %i0, %o2 200e2f0: 90 10 00 1b mov %i3, %o0 200e2f4: 92 02 40 19 add %o1, %i1, %o1 200e2f8: 40 00 07 bb call 20101e4 200e2fc: a2 06 c0 18 add %i3, %i0, %l1 dest += to_copy; block++; 200e300: a0 04 20 01 inc %l0 my_length -= to_copy; 200e304: b8 27 00 18 sub %i4, %i0, %i4 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e308: 35 00 80 75 sethi %hi(0x201d400), %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e30c: 10 80 00 0f b 200e348 200e310: f6 06 a3 20 ld [ %i2 + 0x320 ], %i3 ! 201d720 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e314: 92 10 00 10 mov %l0, %o1 200e318: 7f ff ff 0a call 200df40 200e31c: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e320: 82 92 20 00 orcc %o0, 0, %g1 200e324: 02 bf ff c4 be 200e234 <== NEVER TAKEN 200e328: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200e32c: d2 00 40 00 ld [ %g1 ], %o1 200e330: 94 10 00 1b mov %i3, %o2 200e334: 40 00 07 ac call 20101e4 200e338: a2 04 40 1b add %l1, %i3, %l1 dest += to_copy; block++; 200e33c: a0 04 20 01 inc %l0 my_length -= to_copy; 200e340: b8 27 00 1b sub %i4, %i3, %i4 copied += to_copy; 200e344: 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 ) { 200e348: c2 06 a3 20 ld [ %i2 + 0x320 ], %g1 200e34c: 80 a7 00 01 cmp %i4, %g1 200e350: 1a bf ff f1 bcc 200e314 200e354: 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 ) { 200e358: 80 a7 20 00 cmp %i4, 0 200e35c: 02 80 00 0e be 200e394 200e360: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e364: 90 10 00 1d mov %i5, %o0 200e368: 92 10 00 10 mov %l0, %o1 200e36c: 7f ff fe f5 call 200df40 200e370: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e374: 82 92 20 00 orcc %o0, 0, %g1 200e378: 02 bf ff af be 200e234 <== NEVER TAKEN 200e37c: 90 10 00 11 mov %l1, %o0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200e380: d2 00 40 00 ld [ %g1 ], %o1 200e384: 94 10 00 1c mov %i4, %o2 200e388: 40 00 07 97 call 20101e4 200e38c: b0 07 00 18 add %i4, %i0, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200e390: 90 07 bf f8 add %fp, -8, %o0 200e394: 7f ff d5 09 call 20037b8 200e398: 92 10 20 00 clr %o1 200e39c: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e3a0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200e3a4: 81 c7 e0 08 ret 200e3a8: 81 e8 00 00 restore =============================================================================== 0200e48c : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200e48c: 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; 200e490: 03 00 80 75 sethi %hi(0x201d400), %g1 200e494: fa 00 63 20 ld [ %g1 + 0x320 ], %i5 ! 201d720 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200e498: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 200e49c: 80 a0 60 00 cmp %g1, 0 200e4a0: 02 80 00 05 be 200e4b4 200e4a4: bb 37 60 02 srl %i5, 2, %i5 memfile_free_blocks_in_table( &info->indirect, to_free ); 200e4a8: 90 06 20 58 add %i0, 0x58, %o0 200e4ac: 7f ff ff e5 call 200e440 200e4b0: 92 10 00 1d mov %i5, %o1 } if ( info->doubly_indirect ) { 200e4b4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200e4b8: b8 10 20 00 clr %i4 200e4bc: 80 a0 60 00 cmp %g1, 0 200e4c0: 12 80 00 0d bne 200e4f4 200e4c4: 37 00 80 75 sethi %hi(0x201d400), %i3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 200e4c8: 10 80 00 15 b 200e51c 200e4cc: 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( 200e4d0: 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] ) { 200e4d4: 90 00 80 01 add %g2, %g1, %o0 200e4d8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200e4dc: 80 a0 60 00 cmp %g1, 0 200e4e0: 22 80 00 05 be,a 200e4f4 <== NEVER TAKEN 200e4e4: b8 07 20 01 inc %i4 <== NOT EXECUTED memfile_free_blocks_in_table( 200e4e8: 7f ff ff d6 call 200e440 200e4ec: 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 200e504: 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 ); 200e508: 90 06 20 5c add %i0, 0x5c, %o0 200e50c: 7f ff ff cd call 200e440 200e510: 92 10 00 1d mov %i5, %o1 } if ( info->triply_indirect ) { 200e514: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 200e518: b8 10 20 00 clr %i4 200e51c: 80 a0 60 00 cmp %g1, 0 200e520: 12 80 00 1c bne 200e590 200e524: 33 00 80 75 sethi %hi(0x201d400), %i1 200e528: 81 c7 e0 08 ret 200e52c: 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( 200e530: a1 2f 20 02 sll %i4, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200e534: f6 00 40 10 ld [ %g1 + %l0 ], %i3 if ( !p ) /* ensure we have a valid pointer */ 200e538: 80 a6 e0 00 cmp %i3, 0 200e53c: 02 80 00 1b be 200e5a8 <== NEVER TAKEN 200e540: 90 06 20 60 add %i0, 0x60, %o0 200e544: 10 80 00 09 b 200e568 200e548: b4 10 20 00 clr %i2 break; for ( j=0 ; j <== NEVER TAKEN 200e554: 90 10 00 1b mov %i3, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200e558: 7f ff ff ba call 200e440 200e55c: 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 200e578: 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( 200e57c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200e580: 92 10 00 1d mov %i5, %o1 200e584: 90 02 00 10 add %o0, %l0, %o0 200e588: 7f ff ff ae call 200e440 200e58c: b8 07 20 01 inc %i4 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200e5a0: 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( 200e5a4: 90 06 20 60 add %i0, 0x60, %o0 200e5a8: 7f ff ff a6 call 200e440 200e5ac: 92 10 00 1d mov %i5, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200e5b0: 81 c7 e0 08 ret 200e5b4: 81 e8 00 00 restore =============================================================================== 0200e744 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200e744: 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 ) { 200e748: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200e74c: 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 ) { 200e750: 80 a0 60 00 cmp %g1, 0 200e754: 06 80 00 09 bl 200e778 <== NEVER TAKEN 200e758: 94 07 00 1a add %i4, %i2, %o2 200e75c: 80 a0 60 00 cmp %g1, 0 200e760: 12 80 00 12 bne 200e7a8 <== NEVER TAKEN 200e764: 03 00 80 75 sethi %hi(0x201d400), %g1 200e768: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200e76c: 80 a0 40 0a cmp %g1, %o2 200e770: 1a 80 00 0e bcc 200e7a8 200e774: 03 00 80 75 sethi %hi(0x201d400), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200e778: 90 10 00 1d mov %i5, %o0 200e77c: 7f ff ff 9b call 200e5e8 200e780: 92 10 20 00 clr %o1 if ( status ) 200e784: 80 a2 20 00 cmp %o0, 0 200e788: 02 80 00 08 be 200e7a8 200e78c: 03 00 80 75 sethi %hi(0x201d400), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200e790: 40 00 04 39 call 200f874 <__errno> 200e794: b0 10 3f ff mov -1, %i0 200e798: 82 10 20 1c mov 0x1c, %g1 200e79c: c2 22 00 00 st %g1, [ %o0 ] 200e7a0: 81 c7 e0 08 ret 200e7a4: 81 e8 00 00 restore */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7a8: e0 00 63 20 ld [ %g1 + 0x320 ], %l0 200e7ac: 92 10 00 1a mov %i2, %o1 200e7b0: b1 3c 20 1f sra %l0, 0x1f, %i0 200e7b4: 96 10 00 10 mov %l0, %o3 200e7b8: 94 10 00 18 mov %i0, %o2 200e7bc: 40 00 2a 54 call 201910c <__moddi3> 200e7c0: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7c4: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7c8: a2 10 00 09 mov %o1, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e7cc: 90 10 00 19 mov %i1, %o0 200e7d0: 92 10 00 1a mov %i2, %o1 200e7d4: 40 00 29 68 call 2018d74 <__divdi3> 200e7d8: 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; 200e7dc: 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 ) { 200e7e0: 80 a4 60 00 cmp %l1, 0 200e7e4: 02 80 00 14 be 200e834 200e7e8: 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 ); 200e7ec: 90 10 00 1d mov %i5, %o0 200e7f0: 7f ff fd d4 call 200df40 200e7f4: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e7f8: 80 a2 20 00 cmp %o0, 0 200e7fc: 02 80 00 36 be 200e8d4 <== NEVER TAKEN 200e800: 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; 200e804: b0 24 00 11 sub %l0, %l1, %i0 200e808: 80 a6 00 1c cmp %i0, %i4 200e80c: 38 80 00 02 bgu,a 200e814 200e810: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200e814: d0 02 00 00 ld [ %o0 ], %o0 200e818: 92 10 00 1b mov %i3, %o1 200e81c: 90 02 00 11 add %o0, %l1, %o0 200e820: 94 10 00 18 mov %i0, %o2 200e824: 40 00 06 70 call 20101e4 200e828: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200e82c: b4 06 a0 01 inc %i2 my_length -= to_copy; 200e830: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 200e834: 21 00 80 75 sethi %hi(0x201d400), %l0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e838: 10 80 00 0f b 200e874 200e83c: f2 04 23 20 ld [ %l0 + 0x320 ], %i1 ! 201d720 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e840: 92 10 00 1a mov %i2, %o1 200e844: 7f ff fd bf call 200df40 200e848: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e84c: 80 a2 20 00 cmp %o0, 0 200e850: 02 bf ff d4 be 200e7a0 <== NEVER TAKEN 200e854: 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 ); 200e858: d0 02 00 00 ld [ %o0 ], %o0 200e85c: 94 10 00 19 mov %i1, %o2 200e860: 40 00 06 61 call 20101e4 200e864: b6 06 c0 19 add %i3, %i1, %i3 src += to_copy; block++; 200e868: b4 06 a0 01 inc %i2 my_length -= to_copy; 200e86c: 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( 200e870: 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 ) { 200e874: c2 04 23 20 ld [ %l0 + 0x320 ], %g1 200e878: 80 a7 00 01 cmp %i4, %g1 200e87c: 1a bf ff f1 bcc 200e840 200e880: 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 ) { 200e884: 80 a7 20 00 cmp %i4, 0 200e888: 02 80 00 0e be 200e8c0 200e88c: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e890: 90 10 00 1d mov %i5, %o0 200e894: 92 10 00 1a mov %i2, %o1 200e898: 7f ff fd aa call 200df40 200e89c: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e8a0: 80 a2 20 00 cmp %o0, 0 200e8a4: 02 bf ff bf be 200e7a0 <== NEVER TAKEN 200e8a8: 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 ); 200e8ac: d0 02 00 00 ld [ %o0 ], %o0 200e8b0: 94 10 00 1c mov %i4, %o2 200e8b4: 40 00 06 4c call 20101e4 200e8b8: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200e8bc: 90 07 bf f8 add %fp, -8, %o0 200e8c0: 7f ff d3 be call 20037b8 200e8c4: 92 10 20 00 clr %o1 200e8c8: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e8cc: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200e8d0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200e8d4: 81 c7 e0 08 ret 200e8d8: 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 22 13 call 200b830 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 32 02 call 200f874 <__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 31 fc call 200f874 <__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 =============================================================================== 0200bc60 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 200bc60: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200bc64: 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 ); 200bc68: 82 06 20 54 add %i0, 0x54, %g1 200bc6c: 80 a0 80 01 cmp %g2, %g1 200bc70: 02 80 00 08 be 200bc90 200bc74: 80 a6 00 19 cmp %i0, %i1 errno = ENOTEMPTY; 200bc78: 40 00 0e ff call 200f874 <__errno> 200bc7c: b0 10 20 00 clr %i0 200bc80: 82 10 20 5a mov 0x5a, %g1 200bc84: c2 22 00 00 st %g1, [ %o0 ] 200bc88: 81 c7 e0 08 ret 200bc8c: 81 e8 00 00 restore node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 200bc90: 02 80 00 06 be 200bca8 200bc94: 01 00 00 00 nop 200bc98: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200bc9c: 80 a0 60 00 cmp %g1, 0 200bca0: 02 80 00 06 be 200bcb8 <== ALWAYS TAKEN 200bca4: 01 00 00 00 nop errno = EBUSY; 200bca8: 40 00 0e f3 call 200f874 <__errno> 200bcac: b0 10 20 00 clr %i0 ! 0 200bcb0: 82 10 20 10 mov 0x10, %g1 200bcb4: c2 22 00 00 st %g1, [ %o0 ] node = NULL; } return node; } 200bcb8: 81 c7 e0 08 ret 200bcbc: 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 34 29 call 20101e4 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 31 b7 call 200f874 <__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 31 b1 call 200f874 <__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 31 5d call 200f874 <__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 31 57 call 200f874 <__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 40 ld [ %i0 + 0x140 ], %l0 if (!Stack_check_Interrupt_stack.area) 2006db8: 33 00 81 bc sethi %hi(0x206f000), %i1 2006dbc: b2 16 61 3c or %i1, 0x13c, %i1 ! 206f13c 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 b4 add %i0, 0xb4, %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 b0 sethi %hi(0x206c000), %g1 #endif { (*print_handler)( 2006e44: f6 06 20 08 ld [ %i0 + 8 ], %i3 2006e48: f8 00 63 d8 ld [ %g1 + 0x3d8 ], %i4 2006e4c: 03 00 81 b0 sethi %hi(0x206c000), %g1 2006e50: e2 00 63 d4 ld [ %g1 + 0x3d4 ], %l1 ! 206c3d4 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 7b sethi %hi(0x205ec00), %o1 2006e68: 96 10 00 08 mov %o0, %o3 2006e6c: 92 12 61 00 or %o1, 0x100, %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 b0 sethi %hi(0x206c000), %g2 2006e88: c2 00 63 d8 ld [ %g1 + 0x3d8 ], %g1 2006e8c: d0 00 a3 d4 ld [ %g2 + 0x3d4 ], %o0 2006e90: 13 00 81 7b sethi %hi(0x205ec00), %o1 2006e94: 94 10 3f ff mov -1, %o2 2006e98: 9f c0 40 00 call %g1 2006e9c: 92 12 61 10 or %o1, 0x110, %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 b0 sethi %hi(0x206c000), %i3 2006ea8: 39 00 81 b0 sethi %hi(0x206c000), %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 e3 d8 ld [ %i3 + 0x3d8 ], %g1 2006eb4: d0 07 23 d4 ld [ %i4 + 0x3d4 ], %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 7b sethi %hi(0x205ec00), %o1 2006ec0: 96 02 80 0b add %o2, %o3, %o3 2006ec4: 92 12 61 20 or %o1, 0x120, %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 b0 sethi %hi(0x206c000), %g1 2006ed8: c2 00 63 d0 ld [ %g1 + 0x3d0 ], %g1 ! 206c3d0 (*print_handler)( print_context, "Unavailable\n" ); 2006edc: d0 07 23 d4 ld [ %i4 + 0x3d4 ], %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 e3 d8 ld [ %i3 + 0x3d8 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); 2006eec: 13 00 81 7b sethi %hi(0x205ec00), %o1 <== NOT EXECUTED 2006ef0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006ef4: 92 12 61 40 or %o1, 0x140, %o1 ! 205ed40 <== 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 7b sethi %hi(0x205ec00), %o1 2006f04: 94 10 00 1d mov %i5, %o2 2006f08: 9f c0 40 00 call %g1 2006f0c: 92 12 61 50 or %o1, 0x150, %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 7b sethi %hi(0x205ec00), %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 b8 ld [ %i0 + 0xb8 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2007010: 40 00 0a 46 call 2009928 2007014: 90 12 21 58 or %o0, 0x158, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2007018: 92 10 00 18 mov %i0, %o1 200701c: 11 00 81 7b sethi %hi(0x205ec00), %o0 2007020: 40 00 0a 42 call 2009928 2007024: 90 12 21 68 or %o0, 0x168, %o0 ! 205ed68 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 2007028: d2 06 20 08 ld [ %i0 + 8 ], %o1 200702c: 11 00 81 7b sethi %hi(0x205ec00), %o0 2007030: 40 00 0a 3e call 2009928 2007034: 90 12 21 88 or %o0, 0x188, %o0 ! 205ed88 printk( 2007038: d2 06 20 0c ld [ %i0 + 0xc ], %o1 200703c: 11 00 81 7b sethi %hi(0x205ec00), %o0 2007040: 40 00 0a 3a call 2009928 2007044: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 205eda0 "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 7b sethi %hi(0x205ec00), %o0 2007060: 40 00 0a 32 call 2009928 2007064: 90 12 21 b8 or %o0, 0x1b8, %o0 ! 205edb8 ); 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 b8 ld [ %i0 + 0xb8 ], %o2 200706c: d2 06 20 b4 ld [ %i0 + 0xb4 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 2007070: 11 00 81 7b sethi %hi(0x205ec00), %o0 2007074: 96 02 80 09 add %o2, %o1, %o3 2007078: 40 00 0a 2c call 2009928 200707c: 90 12 21 d0 or %o0, 0x1d0, %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 7b sethi %hi(0x205ec00), %o0 printk( 200708c: 92 10 20 10 mov 0x10, %o1 2007090: 90 12 22 08 or %o0, 0x208, %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 35 call 200d974 20070a4: 90 10 20 81 mov 0x81, %o0 =============================================================================== 0200a8c8 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 200a8c8: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 200a8cc: 03 00 80 84 sethi %hi(0x2021000), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 200a8d0: 7f ff e4 94 call 2003b20 200a8d4: fa 00 62 8c ld [ %g1 + 0x28c ], %i5 ! 202128c <_Per_CPU_Information+0xc> 200a8d8: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 200a8dc: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 200a8e0: 80 a0 60 00 cmp %g1, 0 200a8e4: 12 80 00 08 bne 200a904 <_CORE_RWLock_Release+0x3c> 200a8e8: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 200a8ec: 7f ff e4 91 call 2003b30 200a8f0: b0 10 20 00 clr %i0 executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 200a8f4: 82 10 20 02 mov 2, %g1 200a8f8: c2 27 60 34 st %g1, [ %i5 + 0x34 ] 200a8fc: 81 c7 e0 08 ret 200a900: 81 e8 00 00 restore return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 200a904: 32 80 00 0b bne,a 200a930 <_CORE_RWLock_Release+0x68> 200a908: c0 27 60 34 clr [ %i5 + 0x34 ] the_rwlock->number_of_readers -= 1; 200a90c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a910: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 200a914: 80 a0 60 00 cmp %g1, 0 200a918: 02 80 00 05 be 200a92c <_CORE_RWLock_Release+0x64> 200a91c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 200a920: 7f ff e4 84 call 2003b30 200a924: b0 10 20 00 clr %i0 return CORE_RWLOCK_SUCCESSFUL; 200a928: 30 80 00 24 b,a 200a9b8 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 200a92c: c0 27 60 34 clr [ %i5 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 200a930: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 200a934: 7f ff e4 7f call 2003b30 200a938: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 200a93c: 40 00 07 ac call 200c7ec <_Thread_queue_Dequeue> 200a940: 90 10 00 18 mov %i0, %o0 if ( next ) { 200a944: 80 a2 20 00 cmp %o0, 0 200a948: 22 80 00 1c be,a 200a9b8 <_CORE_RWLock_Release+0xf0> 200a94c: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 200a950: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 200a954: 80 a0 60 01 cmp %g1, 1 200a958: 32 80 00 05 bne,a 200a96c <_CORE_RWLock_Release+0xa4> 200a95c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 200a960: 82 10 20 02 mov 2, %g1 return CORE_RWLOCK_SUCCESSFUL; 200a964: 10 80 00 14 b 200a9b4 <_CORE_RWLock_Release+0xec> 200a968: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 200a96c: 82 00 60 01 inc %g1 200a970: c2 26 20 48 st %g1, [ %i0 + 0x48 ] the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200a974: 82 10 20 01 mov 1, %g1 200a978: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 200a97c: 40 00 08 d8 call 200ccdc <_Thread_queue_First> 200a980: 90 10 00 18 mov %i0, %o0 if ( !next || 200a984: 92 92 20 00 orcc %o0, 0, %o1 200a988: 22 80 00 0c be,a 200a9b8 <_CORE_RWLock_Release+0xf0> 200a98c: b0 10 20 00 clr %i0 200a990: c2 02 60 30 ld [ %o1 + 0x30 ], %g1 200a994: 80 a0 60 01 cmp %g1, 1 200a998: 02 80 00 07 be 200a9b4 <_CORE_RWLock_Release+0xec> <== NEVER TAKEN 200a99c: 90 10 00 18 mov %i0, %o0 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 200a9a0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a9a4: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 200a9a8: 40 00 08 7e call 200cba0 <_Thread_queue_Extract> 200a9ac: c2 26 20 48 st %g1, [ %i0 + 0x48 ] } 200a9b0: 30 bf ff f3 b,a 200a97c <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200a9b4: b0 10 20 00 clr %i0 200a9b8: 81 c7 e0 08 ret 200a9bc: 81 e8 00 00 restore =============================================================================== 0200a9c0 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 200a9c0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a9c4: 90 10 00 18 mov %i0, %o0 200a9c8: 40 00 06 b5 call 200c49c <_Thread_Get> 200a9cc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a9d0: c2 07 bf fc ld [ %fp + -4 ], %g1 200a9d4: 80 a0 60 00 cmp %g1, 0 200a9d8: 12 80 00 09 bne 200a9fc <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN 200a9dc: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200a9e0: 40 00 08 fd call 200cdd4 <_Thread_queue_Process_timeout> 200a9e4: 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--; 200a9e8: 03 00 80 83 sethi %hi(0x2020c00), %g1 200a9ec: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 2020d40 <_Thread_Dispatch_disable_level> 200a9f0: 84 00 bf ff add %g2, -1, %g2 200a9f4: c4 20 61 40 st %g2, [ %g1 + 0x140 ] return _Thread_Dispatch_disable_level; 200a9f8: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 200a9fc: 81 c7 e0 08 ret 200aa00: 81 e8 00 00 restore =============================================================================== 02010b64 <_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 ) { 2010b64: 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; 2010b68: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; 2010b6c: c0 26 20 48 clr [ %i0 + 0x48 ] the_message_queue->maximum_message_size = maximum_message_size; 2010b70: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 2010b74: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 2010b78: c0 26 20 64 clr [ %i0 + 0x64 ] /* * 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)) { 2010b7c: 80 8e e0 03 btst 3, %i3 2010b80: 02 80 00 07 be 2010b9c <_CORE_message_queue_Initialize+0x38> 2010b84: ba 10 00 1b mov %i3, %i5 allocated_message_size += sizeof(uint32_t); 2010b88: ba 06 e0 04 add %i3, 4, %i5 allocated_message_size &= ~(sizeof(uint32_t) - 1); 2010b8c: ba 0f 7f fc and %i5, -4, %i5 } if (allocated_message_size < maximum_message_size) 2010b90: 80 a7 40 1b cmp %i5, %i3 2010b94: 0a 80 00 24 bcs 2010c24 <_CORE_message_queue_Initialize+0xc0><== NEVER TAKEN 2010b98: 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( 2010b9c: ba 07 60 14 add %i5, 0x14, %i5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 2010ba0: 90 10 20 00 clr %o0 2010ba4: 92 10 00 1a mov %i2, %o1 2010ba8: 94 10 20 00 clr %o2 2010bac: 96 10 00 1d mov %i5, %o3 2010bb0: 40 00 43 34 call 2021880 <__muldi3> 2010bb4: b8 10 20 00 clr %i4 if ( x > SIZE_MAX ) 2010bb8: 80 a2 20 00 cmp %o0, 0 2010bbc: 34 80 00 1b bg,a 2010c28 <_CORE_message_queue_Initialize+0xc4> 2010bc0: 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 ); 2010bc4: 40 00 0c 28 call 2013c64 <_Workspace_Allocate> 2010bc8: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2010bcc: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2010bd0: 80 a2 20 00 cmp %o0, 0 2010bd4: 02 80 00 14 be 2010c24 <_CORE_message_queue_Initialize+0xc0> 2010bd8: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2010bdc: 90 06 20 68 add %i0, 0x68, %o0 2010be0: 94 10 00 1a mov %i2, %o2 2010be4: 7f ff ff d2 call 2010b2c <_Chain_Initialize> 2010be8: 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 ); 2010bec: 82 06 20 50 add %i0, 0x50, %g1 head->next = tail; head->previous = NULL; tail->previous = head; 2010bf0: 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( 2010bf4: 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 ); 2010bf8: 84 06 20 54 add %i0, 0x54, %g2 2010bfc: 82 18 60 01 xor %g1, 1, %g1 2010c00: 80 a0 00 01 cmp %g0, %g1 head->next = tail; 2010c04: c4 26 20 50 st %g2, [ %i0 + 0x50 ] head->previous = NULL; 2010c08: c0 26 20 54 clr [ %i0 + 0x54 ] 2010c0c: 90 10 00 18 mov %i0, %o0 2010c10: 92 60 3f ff subx %g0, -1, %o1 2010c14: 94 10 20 80 mov 0x80, %o2 2010c18: 96 10 20 06 mov 6, %o3 2010c1c: 40 00 09 ea call 20133c4 <_Thread_queue_Initialize> 2010c20: b8 10 20 01 mov 1, %i4 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2010c24: b0 0f 20 01 and %i4, 1, %i0 2010c28: 81 c7 e0 08 ret 2010c2c: 81 e8 00 00 restore =============================================================================== 02008704 <_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 ) { 2008704: 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)) ) { 2008708: 90 10 00 18 mov %i0, %o0 200870c: 40 00 07 7e call 200a504 <_Thread_queue_Dequeue> 2008710: ba 10 00 18 mov %i0, %i5 2008714: 80 a2 20 00 cmp %o0, 0 2008718: 12 80 00 0e bne 2008750 <_CORE_semaphore_Surrender+0x4c> 200871c: 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 ); 2008720: 7f ff e7 b3 call 20025ec 2008724: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2008728: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 200872c: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2008730: 80 a0 40 02 cmp %g1, %g2 2008734: 1a 80 00 05 bcc 2008748 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN 2008738: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 200873c: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008740: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2008744: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2008748: 7f ff e7 ad call 20025fc 200874c: 01 00 00 00 nop } return status; } 2008750: 81 c7 e0 08 ret 2008754: 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 58 ld [ %i0 + 0x158 ], %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 78 sethi %hi(0x201e000), %g4 2007430: 88 11 21 50 or %g4, 0x150, %g4 ! 201e150 <_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 79 sethi %hi(0x201e400), %g4 2007458: f2 01 21 50 ld [ %g4 + 0x150 ], %i1 ! 201e550 <_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 50 ld [ %g4 + 0x150 ], %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 79 sethi %hi(0x201e400), %g1 20074a8: c4 20 61 50 st %g2, [ %g1 + 0x150 ] ! 201e550 <_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 b5 call 200aff0 <_Watchdog_Remove> 2007520: 90 07 60 48 add %i5, 0x48, %o0 2007524: b2 16 63 f8 or %i1, 0x3f8, %i1 2007528: 40 00 0a 37 call 2009e04 <_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 0b 1d call 200a1b4 <_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 78 sethi %hi(0x201e000), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2007564: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 201e15c <_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 79 sethi %hi(0x201e400), %g1 2007578: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 201e550 <_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 50 st %g2, [ %g1 + 0x150 ] } 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 0a 17 call 2009e04 <_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 77 sethi %hi(0x201dc00), %g1 20075b4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 20075b8: 84 00 bf ff add %g2, -1, %g2 20075bc: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 20075c0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 20075c4: 81 c7 e0 08 ret 20075c8: 81 e8 00 00 restore =============================================================================== 0200d770 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200d770: 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; 200d774: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200d778: 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; 200d77c: 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; 200d780: 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; 200d784: e2 06 20 10 ld [ %i0 + 0x10 ], %l1 uintptr_t const min_block_size = heap->min_block_size; 200d788: 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; 200d78c: 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 ) { 200d790: 80 a7 40 19 cmp %i5, %i1 200d794: 0a 80 00 9f bcs 200da10 <_Heap_Extend+0x2a0> 200d798: b8 10 20 00 clr %i4 return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200d79c: 90 10 00 19 mov %i1, %o0 200d7a0: 92 10 00 1a mov %i2, %o1 200d7a4: 94 10 00 11 mov %l1, %o2 200d7a8: 98 07 bf f8 add %fp, -8, %o4 200d7ac: 7f ff ec 84 call 20089bc <_Heap_Get_first_and_last_block> 200d7b0: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200d7b4: 80 8a 20 ff btst 0xff, %o0 200d7b8: 02 80 00 96 be 200da10 <_Heap_Extend+0x2a0> 200d7bc: b4 10 00 10 mov %l0, %i2 200d7c0: aa 10 20 00 clr %l5 200d7c4: ac 10 20 00 clr %l6 200d7c8: b8 10 20 00 clr %i4 200d7cc: a8 10 20 00 clr %l4 200d7d0: 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 ( 200d7d4: 80 a0 40 1d cmp %g1, %i5 200d7d8: 1a 80 00 05 bcc 200d7ec <_Heap_Extend+0x7c> 200d7dc: e6 06 80 00 ld [ %i2 ], %l3 200d7e0: 80 a6 40 13 cmp %i1, %l3 200d7e4: 2a 80 00 8b bcs,a 200da10 <_Heap_Extend+0x2a0> 200d7e8: 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 ) { 200d7ec: 80 a7 40 01 cmp %i5, %g1 200d7f0: 02 80 00 06 be 200d808 <_Heap_Extend+0x98> 200d7f4: 80 a7 40 13 cmp %i5, %l3 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200d7f8: 2a 80 00 05 bcs,a 200d80c <_Heap_Extend+0x9c> 200d7fc: ac 10 00 1a mov %i2, %l6 200d800: 10 80 00 04 b 200d810 <_Heap_Extend+0xa0> 200d804: 90 10 00 13 mov %l3, %o0 200d808: a8 10 00 1a mov %i2, %l4 200d80c: 90 10 00 13 mov %l3, %o0 200d810: 40 00 2d 51 call 2018d54 <.urem> 200d814: 92 10 00 11 mov %l1, %o1 200d818: ae 04 ff f8 add %l3, -8, %l7 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200d81c: 80 a4 c0 19 cmp %l3, %i1 200d820: 12 80 00 05 bne 200d834 <_Heap_Extend+0xc4> 200d824: 90 25 c0 08 sub %l7, %o0, %o0 start_block->prev_size = extend_area_end; 200d828: 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 ) 200d82c: 10 80 00 04 b 200d83c <_Heap_Extend+0xcc> 200d830: b8 10 00 08 mov %o0, %i4 merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200d834: 2a 80 00 02 bcs,a 200d83c <_Heap_Extend+0xcc> 200d838: 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; 200d83c: f4 02 20 04 ld [ %o0 + 4 ], %i2 200d840: 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); 200d844: 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 ); 200d848: 80 a6 80 10 cmp %i2, %l0 200d84c: 12 bf ff e2 bne 200d7d4 <_Heap_Extend+0x64> 200d850: 82 10 00 1a mov %i2, %g1 if ( extend_area_begin < heap->area_begin ) { 200d854: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200d858: 80 a6 40 01 cmp %i1, %g1 200d85c: 3a 80 00 04 bcc,a 200d86c <_Heap_Extend+0xfc> 200d860: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200d864: 10 80 00 05 b 200d878 <_Heap_Extend+0x108> 200d868: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { 200d86c: 80 a0 40 1d cmp %g1, %i5 200d870: 2a 80 00 02 bcs,a 200d878 <_Heap_Extend+0x108> 200d874: 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; 200d878: c4 07 bf f8 ld [ %fp + -8 ], %g2 200d87c: c2 07 bf fc ld [ %fp + -4 ], %g1 extend_first_block->prev_size = extend_area_end; 200d880: 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 = 200d884: 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; 200d888: 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; 200d88c: 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 = 200d890: 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 ) { 200d894: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 200d898: 80 a0 c0 02 cmp %g3, %g2 200d89c: 08 80 00 04 bleu 200d8ac <_Heap_Extend+0x13c> 200d8a0: c0 20 60 04 clr [ %g1 + 4 ] heap->first_block = extend_first_block; 200d8a4: 10 80 00 06 b 200d8bc <_Heap_Extend+0x14c> 200d8a8: c4 26 20 20 st %g2, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200d8ac: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 200d8b0: 80 a0 80 01 cmp %g2, %g1 200d8b4: 2a 80 00 02 bcs,a 200d8bc <_Heap_Extend+0x14c> 200d8b8: c2 26 20 24 st %g1, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200d8bc: 80 a5 20 00 cmp %l4, 0 200d8c0: 02 80 00 14 be 200d910 <_Heap_Extend+0x1a0> 200d8c4: 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; 200d8c8: 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; 200d8cc: 92 10 00 1a mov %i2, %o1 200d8d0: 40 00 2d 21 call 2018d54 <.urem> 200d8d4: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200d8d8: 80 a2 20 00 cmp %o0, 0 200d8dc: 02 80 00 04 be 200d8ec <_Heap_Extend+0x17c> 200d8e0: c2 05 00 00 ld [ %l4 ], %g1 return value - remainder + alignment; 200d8e4: b2 06 40 1a add %i1, %i2, %i1 200d8e8: 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 = 200d8ec: 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; 200d8f0: 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 = 200d8f4: 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; 200d8f8: 82 10 60 01 or %g1, 1, %g1 _Heap_Free_block( heap, new_first_block ); 200d8fc: 90 10 00 18 mov %i0, %o0 200d900: 7f ff ff 92 call 200d748 <_Heap_Free_block> 200d904: c2 22 60 04 st %g1, [ %o1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d908: 10 80 00 08 b 200d928 <_Heap_Extend+0x1b8> 200d90c: 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 ) { 200d910: 80 a5 a0 00 cmp %l6, 0 200d914: 02 80 00 04 be 200d924 <_Heap_Extend+0x1b4> 200d918: 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; 200d91c: 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 = 200d920: ec 20 60 04 st %l6, [ %g1 + 4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200d924: 80 a7 20 00 cmp %i4, 0 200d928: 02 80 00 15 be 200d97c <_Heap_Extend+0x20c> 200d92c: 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); 200d930: 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( 200d934: ba 27 40 1c sub %i5, %i4, %i5 200d938: 40 00 2d 07 call 2018d54 <.urem> 200d93c: 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) 200d940: c4 07 20 04 ld [ %i4 + 4 ], %g2 200d944: 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 = 200d948: 82 07 40 1c add %i5, %i4, %g1 (last_block->size_and_flag - last_block_new_size) 200d94c: 84 20 80 1d sub %g2, %i5, %g2 | HEAP_PREV_BLOCK_USED; 200d950: 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 = 200d954: 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; 200d958: 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 ); 200d95c: 90 10 00 18 mov %i0, %o0 200d960: 82 08 60 01 and %g1, 1, %g1 200d964: 92 10 00 1c mov %i4, %o1 block->size_and_flag = size | flag; 200d968: ba 17 40 01 or %i5, %g1, %i5 200d96c: 7f ff ff 77 call 200d748 <_Heap_Free_block> 200d970: fa 27 20 04 st %i5, [ %i4 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d974: 10 80 00 0f b 200d9b0 <_Heap_Extend+0x240> 200d978: 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 ) { 200d97c: 80 a5 60 00 cmp %l5, 0 200d980: 02 80 00 0b be 200d9ac <_Heap_Extend+0x23c> 200d984: 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; 200d988: c4 05 60 04 ld [ %l5 + 4 ], %g2 _Heap_Link_above( 200d98c: 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 ); 200d990: 86 20 c0 15 sub %g3, %l5, %g3 200d994: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d998: 84 10 c0 02 or %g3, %g2, %g2 200d99c: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200d9a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200d9a4: 84 10 a0 01 or %g2, 1, %g2 200d9a8: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200d9ac: 80 a7 20 00 cmp %i4, 0 200d9b0: 32 80 00 09 bne,a 200d9d4 <_Heap_Extend+0x264> 200d9b4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d9b8: 80 a5 20 00 cmp %l4, 0 200d9bc: 32 80 00 06 bne,a 200d9d4 <_Heap_Extend+0x264> 200d9c0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200d9c4: d2 07 bf f8 ld [ %fp + -8 ], %o1 200d9c8: 7f ff ff 60 call 200d748 <_Heap_Free_block> 200d9cc: 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 200d9d0: 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( 200d9d4: 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; 200d9d8: 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( 200d9dc: 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; 200d9e0: 84 08 a0 01 and %g2, 1, %g2 block->size_and_flag = size | flag; 200d9e4: 84 10 c0 02 or %g3, %g2, %g2 200d9e8: c4 20 60 04 st %g2, [ %g1 + 4 ] } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200d9ec: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 200d9f0: 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; 200d9f4: a4 20 40 12 sub %g1, %l2, %l2 /* Statistics */ stats->size += extended_size; 200d9f8: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 if ( extended_size_ptr != NULL ) 200d9fc: 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; 200da00: 82 00 40 12 add %g1, %l2, %g1 if ( extended_size_ptr != NULL ) 200da04: 02 80 00 03 be 200da10 <_Heap_Extend+0x2a0> <== NEVER TAKEN 200da08: c2 26 20 2c st %g1, [ %i0 + 0x2c ] 200da0c: e4 26 c0 00 st %l2, [ %i3 ] *extended_size_ptr = extended_size; return true; } 200da10: b0 0f 20 01 and %i4, 1, %i0 200da14: 81 c7 e0 08 ret 200da18: 81 e8 00 00 restore =============================================================================== 0200d78c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200d78c: 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; 200d790: 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 ) { 200d794: 80 a6 60 00 cmp %i1, 0 200d798: 02 80 00 78 be 200d978 <_Heap_Free+0x1ec> 200d79c: 90 10 00 19 mov %i1, %o0 200d7a0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200d7a4: 40 00 2c c8 call 2018ac4 <.urem> 200d7a8: 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 200d7ac: 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); 200d7b0: 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; 200d7b4: 80 a7 40 0c cmp %i5, %o4 200d7b8: 0a 80 00 05 bcs 200d7cc <_Heap_Free+0x40> 200d7bc: 82 10 20 00 clr %g1 200d7c0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200d7c4: 80 a0 40 1d cmp %g1, %i5 200d7c8: 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 ) ) { 200d7cc: 80 a0 60 00 cmp %g1, 0 200d7d0: 02 80 00 6a be 200d978 <_Heap_Free+0x1ec> 200d7d4: 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; 200d7d8: da 07 60 04 ld [ %i5 + 4 ], %o5 200d7dc: 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); 200d7e0: 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; 200d7e4: 80 a0 40 0c cmp %g1, %o4 200d7e8: 0a 80 00 05 bcs 200d7fc <_Heap_Free+0x70> <== NEVER TAKEN 200d7ec: 86 10 20 00 clr %g3 200d7f0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200d7f4: 80 a0 c0 01 cmp %g3, %g1 200d7f8: 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 ) ) { 200d7fc: 80 a0 e0 00 cmp %g3, 0 200d800: 02 80 00 5e be 200d978 <_Heap_Free+0x1ec> <== NEVER TAKEN 200d804: 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; 200d808: de 00 60 04 ld [ %g1 + 4 ], %o7 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200d80c: 80 8b e0 01 btst 1, %o7 200d810: 02 80 00 5a be 200d978 <_Heap_Free+0x1ec> <== NEVER TAKEN 200d814: 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 200d818: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200d81c: 80 a0 40 04 cmp %g1, %g4 200d820: 02 80 00 07 be 200d83c <_Heap_Free+0xb0> 200d824: 96 10 20 00 clr %o3 200d828: 86 00 40 0f add %g1, %o7, %g3 200d82c: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200d830: 86 08 e0 01 and %g3, 1, %g3 200d834: 80 a0 00 03 cmp %g0, %g3 200d838: 96 60 3f ff subx %g0, -1, %o3 if ( !_Heap_Is_prev_used( block ) ) { 200d83c: 80 8b 60 01 btst 1, %o5 200d840: 12 80 00 26 bne 200d8d8 <_Heap_Free+0x14c> 200d844: 80 8a e0 ff btst 0xff, %o3 uintptr_t const prev_size = block->prev_size; 200d848: 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); 200d84c: 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; 200d850: 80 a0 c0 0c cmp %g3, %o4 200d854: 0a 80 00 04 bcs 200d864 <_Heap_Free+0xd8> <== NEVER TAKEN 200d858: 94 10 20 00 clr %o2 200d85c: 80 a1 00 03 cmp %g4, %g3 200d860: 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 ) ) { 200d864: 80 a2 a0 00 cmp %o2, 0 200d868: 02 80 00 44 be 200d978 <_Heap_Free+0x1ec> <== NEVER TAKEN 200d86c: 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; 200d870: 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) ) { 200d874: 80 8b 20 01 btst 1, %o4 200d878: 02 80 00 40 be 200d978 <_Heap_Free+0x1ec> <== NEVER TAKEN 200d87c: 80 8a e0 ff btst 0xff, %o3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200d880: 22 80 00 0f be,a 200d8bc <_Heap_Free+0x130> 200d884: 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; 200d888: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = block->prev; 200d88c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 uintptr_t const size = block_size + prev_size + next_block_size; 200d890: 9e 00 80 0f add %g2, %o7, %o7 prev->next = next; 200d894: c8 20 60 08 st %g4, [ %g1 + 8 ] next->prev = prev; 200d898: c2 21 20 0c st %g1, [ %g4 + 0xc ] _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200d89c: 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; 200d8a0: 9a 03 c0 0d add %o7, %o5, %o5 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200d8a4: 82 00 7f ff add %g1, -1, %g1 200d8a8: 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; 200d8ac: 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; 200d8b0: 82 13 60 01 or %o5, 1, %g1 200d8b4: 10 80 00 27 b 200d950 <_Heap_Free+0x1c4> 200d8b8: 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; 200d8bc: 88 13 60 01 or %o5, 1, %g4 200d8c0: c8 20 e0 04 st %g4, [ %g3 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d8c4: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = size; 200d8c8: 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; 200d8cc: 86 08 ff fe and %g3, -2, %g3 200d8d0: 10 80 00 20 b 200d950 <_Heap_Free+0x1c4> 200d8d4: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200d8d8: 22 80 00 0d be,a 200d90c <_Heap_Free+0x180> 200d8dc: 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; 200d8e0: c8 00 60 08 ld [ %g1 + 8 ], %g4 Heap_Block *prev = old_block->prev; 200d8e4: c2 00 60 0c ld [ %g1 + 0xc ], %g1 new_block->next = next; 200d8e8: c8 27 60 08 st %g4, [ %i5 + 8 ] new_block->prev = prev; 200d8ec: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200d8f0: 86 03 c0 02 add %o7, %g2, %g3 next->prev = new_block; prev->next = new_block; 200d8f4: 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; 200d8f8: fa 21 20 0c st %i5, [ %g4 + 0xc ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200d8fc: 82 10 e0 01 or %g3, 1, %g1 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200d900: 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; 200d904: 10 80 00 13 b 200d950 <_Heap_Free+0x1c4> 200d908: c2 27 60 04 st %g1, [ %i5 + 4 ] ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200d90c: f0 27 60 0c st %i0, [ %i5 + 0xc ] Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200d910: c6 27 60 08 st %g3, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200d914: 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; 200d918: 86 10 a0 01 or %g2, 1, %g3 200d91c: c6 27 60 04 st %g3, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200d920: c6 00 60 04 ld [ %g1 + 4 ], %g3 next_block->prev_size = block_size; 200d924: 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; 200d928: 86 08 ff fe and %g3, -2, %g3 200d92c: c6 20 60 04 st %g3, [ %g1 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200d930: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 if ( stats->max_free_blocks < stats->free_blocks ) { 200d934: 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; 200d938: 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; 200d93c: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200d940: 80 a0 c0 01 cmp %g3, %g1 200d944: 1a 80 00 03 bcc 200d950 <_Heap_Free+0x1c4> 200d948: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200d94c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] } } /* Statistics */ --stats->used_blocks; 200d950: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 ++stats->frees; stats->free_size += block_size; return( true ); 200d954: 88 10 20 01 mov 1, %g4 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200d958: 82 00 7f ff add %g1, -1, %g1 200d95c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] ++stats->frees; 200d960: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200d964: 82 00 60 01 inc %g1 200d968: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200d96c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200d970: 84 00 40 02 add %g1, %g2, %g2 200d974: c4 26 20 30 st %g2, [ %i0 + 0x30 ] return( true ); } 200d978: b0 09 20 01 and %g4, 1, %i0 200d97c: 81 c7 e0 08 ret 200d980: 81 e8 00 00 restore =============================================================================== 0203ee68 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 203ee68: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; 203ee6c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 Heap_Block *end = heap->last_block; 203ee70: 10 80 00 0b b 203ee9c <_Heap_Iterate+0x34> 203ee74: 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 ); 203ee78: 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; 203ee7c: 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); 203ee80: 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; 203ee84: d4 07 60 04 ld [ %i5 + 4 ], %o2 203ee88: 9f c6 40 00 call %i1 203ee8c: 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 ) { 203ee90: 80 8a 20 ff btst 0xff, %o0 203ee94: 12 80 00 05 bne 203eea8 <_Heap_Iterate+0x40> <== NEVER TAKEN 203ee98: 90 10 00 1d mov %i5, %o0 203ee9c: 80 a2 00 1c cmp %o0, %i4 203eea0: 32 bf ff f6 bne,a 203ee78 <_Heap_Iterate+0x10> 203eea4: d2 02 20 04 ld [ %o0 + 4 ], %o1 203eea8: 81 c7 e0 08 ret 203eeac: 81 e8 00 00 restore =============================================================================== 0200daa4 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200daa4: 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); 200daa8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200daac: 40 00 2c 06 call 2018ac4 <.urem> 200dab0: 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 200dab4: 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); 200dab8: 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); 200dabc: 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; 200dac0: 80 a2 00 03 cmp %o0, %g3 200dac4: 0a 80 00 05 bcs 200dad8 <_Heap_Size_of_alloc_area+0x34> 200dac8: 84 10 20 00 clr %g2 200dacc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200dad0: 80 a0 40 08 cmp %g1, %o0 200dad4: 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 ) ) { 200dad8: 80 a0 a0 00 cmp %g2, 0 200dadc: 02 80 00 15 be 200db30 <_Heap_Size_of_alloc_area+0x8c> 200dae0: 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; 200dae4: fa 02 20 04 ld [ %o0 + 4 ], %i5 200dae8: 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); 200daec: 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; 200daf0: 80 a7 40 03 cmp %i5, %g3 200daf4: 0a 80 00 05 bcs 200db08 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN 200daf8: 84 10 20 00 clr %g2 200dafc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200db00: 80 a0 40 1d cmp %g1, %i5 200db04: 84 60 3f ff subx %g0, -1, %g2 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 200db08: 80 a0 a0 00 cmp %g2, 0 200db0c: 02 80 00 09 be 200db30 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200db10: 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; 200db14: c4 07 60 04 ld [ %i5 + 4 ], %g2 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200db18: 80 88 a0 01 btst 1, %g2 200db1c: 02 80 00 05 be 200db30 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN 200db20: ba 27 40 19 sub %i5, %i1, %i5 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200db24: 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; 200db28: ba 07 60 04 add %i5, 4, %i5 200db2c: fa 26 80 00 st %i5, [ %i2 ] return true; } 200db30: b0 08 60 01 and %g1, 1, %i0 200db34: 81 c7 e0 08 ret 200db38: 81 e8 00 00 restore =============================================================================== 02009878 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2009878: 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; 200987c: 3b 00 80 26 sethi %hi(0x2009800), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2009880: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 uintptr_t const min_block_size = heap->min_block_size; 2009884: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 Heap_Block *const first_block = heap->first_block; 2009888: f6 06 20 20 ld [ %i0 + 0x20 ], %i3 Heap_Block *const last_block = heap->last_block; 200988c: 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; 2009890: 80 a6 a0 00 cmp %i2, 0 2009894: 02 80 00 04 be 20098a4 <_Heap_Walk+0x2c> 2009898: ba 17 60 24 or %i5, 0x24, %i5 200989c: 3b 00 80 26 sethi %hi(0x2009800), %i5 20098a0: ba 17 60 2c or %i5, 0x2c, %i5 ! 200982c <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 20098a4: 03 00 80 80 sethi %hi(0x2020000), %g1 20098a8: c4 00 61 28 ld [ %g1 + 0x128 ], %g2 ! 2020128 <_System_state_Current> 20098ac: 80 a0 a0 03 cmp %g2, 3 20098b0: 12 80 01 24 bne 2009d40 <_Heap_Walk+0x4c8> 20098b4: 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)( 20098b8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 20098bc: da 06 20 18 ld [ %i0 + 0x18 ], %o5 20098c0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 20098c4: f6 23 a0 60 st %i3, [ %sp + 0x60 ] 20098c8: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 20098cc: c2 06 20 08 ld [ %i0 + 8 ], %g1 20098d0: 90 10 00 19 mov %i1, %o0 20098d4: c2 23 a0 68 st %g1, [ %sp + 0x68 ] 20098d8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20098dc: 92 10 20 00 clr %o1 20098e0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 20098e4: 15 00 80 72 sethi %hi(0x201c800), %o2 20098e8: 96 10 00 1c mov %i4, %o3 20098ec: 94 12 a1 f8 or %o2, 0x1f8, %o2 20098f0: 9f c7 40 00 call %i5 20098f4: 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 ) { 20098f8: 80 a7 20 00 cmp %i4, 0 20098fc: 12 80 00 07 bne 2009918 <_Heap_Walk+0xa0> 2009900: 80 8f 20 07 btst 7, %i4 (*printer)( source, true, "page size is zero\n" ); 2009904: 15 00 80 72 sethi %hi(0x201c800), %o2 2009908: 90 10 00 19 mov %i1, %o0 200990c: 92 10 20 01 mov 1, %o1 2009910: 10 80 00 32 b 20099d8 <_Heap_Walk+0x160> 2009914: 94 12 a2 90 or %o2, 0x290, %o2 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009918: 22 80 00 08 be,a 2009938 <_Heap_Walk+0xc0> 200991c: 90 10 00 10 mov %l0, %o0 (*printer)( 2009920: 15 00 80 72 sethi %hi(0x201c800), %o2 2009924: 90 10 00 19 mov %i1, %o0 2009928: 92 10 20 01 mov 1, %o1 200992c: 94 12 a2 a8 or %o2, 0x2a8, %o2 2009930: 10 80 01 0b b 2009d5c <_Heap_Walk+0x4e4> 2009934: 96 10 00 1c mov %i4, %o3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009938: 7f ff e0 6a call 2001ae0 <.urem> 200993c: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2009940: 80 a2 20 00 cmp %o0, 0 2009944: 22 80 00 08 be,a 2009964 <_Heap_Walk+0xec> 2009948: 90 06 e0 08 add %i3, 8, %o0 (*printer)( 200994c: 15 00 80 72 sethi %hi(0x201c800), %o2 2009950: 90 10 00 19 mov %i1, %o0 2009954: 92 10 20 01 mov 1, %o1 2009958: 94 12 a2 c8 or %o2, 0x2c8, %o2 200995c: 10 80 01 00 b 2009d5c <_Heap_Walk+0x4e4> 2009960: 96 10 00 10 mov %l0, %o3 2009964: 7f ff e0 5f call 2001ae0 <.urem> 2009968: 92 10 00 1c mov %i4, %o1 ); return false; } if ( 200996c: 80 a2 20 00 cmp %o0, 0 2009970: 22 80 00 08 be,a 2009990 <_Heap_Walk+0x118> 2009974: c2 06 e0 04 ld [ %i3 + 4 ], %g1 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2009978: 15 00 80 72 sethi %hi(0x201c800), %o2 200997c: 90 10 00 19 mov %i1, %o0 2009980: 92 10 20 01 mov 1, %o1 2009984: 94 12 a2 f0 or %o2, 0x2f0, %o2 2009988: 10 80 00 f5 b 2009d5c <_Heap_Walk+0x4e4> 200998c: 96 10 00 1b mov %i3, %o3 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2009990: 80 88 60 01 btst 1, %g1 2009994: 32 80 00 07 bne,a 20099b0 <_Heap_Walk+0x138> 2009998: f4 04 60 04 ld [ %l1 + 4 ], %i2 (*printer)( 200999c: 15 00 80 72 sethi %hi(0x201c800), %o2 20099a0: 90 10 00 19 mov %i1, %o0 20099a4: 92 10 20 01 mov 1, %o1 20099a8: 10 80 00 0c b 20099d8 <_Heap_Walk+0x160> 20099ac: 94 12 a3 28 or %o2, 0x328, %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; 20099b0: 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); 20099b4: 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; 20099b8: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 20099bc: 80 88 60 01 btst 1, %g1 20099c0: 12 80 00 0a bne 20099e8 <_Heap_Walk+0x170> 20099c4: 80 a6 80 1b cmp %i2, %i3 (*printer)( 20099c8: 15 00 80 72 sethi %hi(0x201c800), %o2 20099cc: 90 10 00 19 mov %i1, %o0 20099d0: 92 10 20 01 mov 1, %o1 20099d4: 94 12 a3 58 or %o2, 0x358, %o2 20099d8: 9f c7 40 00 call %i5 20099dc: 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; 20099e0: 10 80 00 d8 b 2009d40 <_Heap_Walk+0x4c8> 20099e4: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( 20099e8: 02 80 00 06 be 2009a00 <_Heap_Walk+0x188> 20099ec: 15 00 80 72 sethi %hi(0x201c800), %o2 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 20099f0: 90 10 00 19 mov %i1, %o0 20099f4: 92 10 20 01 mov 1, %o1 20099f8: 10 bf ff f8 b 20099d8 <_Heap_Walk+0x160> 20099fc: 94 12 a3 70 or %o2, 0x370, %o2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 2009a00: 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; 2009a04: d6 06 20 08 ld [ %i0 + 8 ], %o3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 2009a08: 10 80 00 33 b 2009ad4 <_Heap_Walk+0x25c> 2009a0c: 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; 2009a10: 80 a0 80 0b cmp %g2, %o3 2009a14: 18 80 00 05 bgu 2009a28 <_Heap_Walk+0x1b0> 2009a18: 82 10 20 00 clr %g1 2009a1c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2009a20: 80 a0 40 0b cmp %g1, %o3 2009a24: 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 ) ) { 2009a28: 80 a0 60 00 cmp %g1, 0 2009a2c: 32 80 00 07 bne,a 2009a48 <_Heap_Walk+0x1d0> 2009a30: 90 02 e0 08 add %o3, 8, %o0 (*printer)( 2009a34: 15 00 80 72 sethi %hi(0x201c800), %o2 2009a38: 90 10 00 19 mov %i1, %o0 2009a3c: 92 10 20 01 mov 1, %o1 2009a40: 10 80 00 c7 b 2009d5c <_Heap_Walk+0x4e4> 2009a44: 94 12 a3 a0 or %o2, 0x3a0, %o2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009a48: d6 27 bf f8 st %o3, [ %fp + -8 ] 2009a4c: 7f ff e0 25 call 2001ae0 <.urem> 2009a50: 92 10 00 13 mov %l3, %o1 ); return false; } if ( 2009a54: 80 a2 20 00 cmp %o0, 0 2009a58: 02 80 00 07 be 2009a74 <_Heap_Walk+0x1fc> 2009a5c: d6 07 bf f8 ld [ %fp + -8 ], %o3 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 2009a60: 15 00 80 72 sethi %hi(0x201c800), %o2 2009a64: 90 10 00 19 mov %i1, %o0 2009a68: 92 10 20 01 mov 1, %o1 2009a6c: 10 80 00 bc b 2009d5c <_Heap_Walk+0x4e4> 2009a70: 94 12 a3 c0 or %o2, 0x3c0, %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; 2009a74: c2 02 e0 04 ld [ %o3 + 4 ], %g1 2009a78: 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; 2009a7c: 82 02 c0 01 add %o3, %g1, %g1 2009a80: c2 00 60 04 ld [ %g1 + 4 ], %g1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 2009a84: 80 88 60 01 btst 1, %g1 2009a88: 22 80 00 07 be,a 2009aa4 <_Heap_Walk+0x22c> 2009a8c: d8 02 e0 0c ld [ %o3 + 0xc ], %o4 (*printer)( 2009a90: 15 00 80 72 sethi %hi(0x201c800), %o2 2009a94: 90 10 00 19 mov %i1, %o0 2009a98: 92 10 20 01 mov 1, %o1 2009a9c: 10 80 00 b0 b 2009d5c <_Heap_Walk+0x4e4> 2009aa0: 94 12 a3 f0 or %o2, 0x3f0, %o2 ); return false; } if ( free_block->prev != prev_block ) { 2009aa4: 80 a3 00 12 cmp %o4, %l2 2009aa8: 22 80 00 0a be,a 2009ad0 <_Heap_Walk+0x258> 2009aac: a4 10 00 0b mov %o3, %l2 (*printer)( 2009ab0: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009ab4: 90 10 00 19 mov %i1, %o0 2009ab8: 92 10 20 01 mov 1, %o1 2009abc: 94 12 a0 10 or %o2, 0x10, %o2 2009ac0: 9f c7 40 00 call %i5 2009ac4: 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; 2009ac8: 10 80 00 9e b 2009d40 <_Heap_Walk+0x4c8> 2009acc: 82 10 20 00 clr %g1 ! 0 return false; } prev_block = free_block; free_block = free_block->next; 2009ad0: 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 ) { 2009ad4: 80 a2 c0 18 cmp %o3, %i0 2009ad8: 32 bf ff ce bne,a 2009a10 <_Heap_Walk+0x198> 2009adc: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2009ae0: 2d 00 80 73 sethi %hi(0x201cc00), %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)( 2009ae4: 2f 00 80 73 sethi %hi(0x201cc00), %l7 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009ae8: ac 15 a1 d0 or %l6, 0x1d0, %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)( 2009aec: ae 15 e1 b8 or %l7, 0x1b8, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009af0: 2b 00 80 73 sethi %hi(0x201cc00), %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; 2009af4: 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; 2009af8: 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; 2009afc: 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); 2009b00: 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; 2009b04: 80 a0 c0 13 cmp %g3, %l3 2009b08: 18 80 00 05 bgu 2009b1c <_Heap_Walk+0x2a4> <== NEVER TAKEN 2009b0c: 84 10 20 00 clr %g2 2009b10: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 2009b14: 80 a0 80 13 cmp %g2, %l3 2009b18: 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 ) ) { 2009b1c: 80 a0 a0 00 cmp %g2, 0 2009b20: 12 80 00 07 bne 2009b3c <_Heap_Walk+0x2c4> 2009b24: 84 1e 80 11 xor %i2, %l1, %g2 (*printer)( 2009b28: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009b2c: 90 10 00 19 mov %i1, %o0 2009b30: 92 10 20 01 mov 1, %o1 2009b34: 10 80 00 2c b 2009be4 <_Heap_Walk+0x36c> 2009b38: 94 12 a0 48 or %o2, 0x48, %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; 2009b3c: 80 a0 00 02 cmp %g0, %g2 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009b40: c2 27 bf fc st %g1, [ %fp + -4 ] 2009b44: a8 40 20 00 addx %g0, 0, %l4 2009b48: 90 10 00 12 mov %l2, %o0 2009b4c: 7f ff df e5 call 2001ae0 <.urem> 2009b50: 92 10 00 1c mov %i4, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 2009b54: 80 a2 20 00 cmp %o0, 0 2009b58: 02 80 00 0c be 2009b88 <_Heap_Walk+0x310> 2009b5c: c2 07 bf fc ld [ %fp + -4 ], %g1 2009b60: 80 8d 20 ff btst 0xff, %l4 2009b64: 02 80 00 0a be 2009b8c <_Heap_Walk+0x314> 2009b68: 80 a4 80 10 cmp %l2, %l0 (*printer)( 2009b6c: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009b70: 90 10 00 19 mov %i1, %o0 2009b74: 92 10 20 01 mov 1, %o1 2009b78: 94 12 a0 78 or %o2, 0x78, %o2 2009b7c: 96 10 00 1a mov %i2, %o3 2009b80: 10 bf ff d0 b 2009ac0 <_Heap_Walk+0x248> 2009b84: 98 10 00 12 mov %l2, %o4 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 2009b88: 80 a4 80 10 cmp %l2, %l0 2009b8c: 1a 80 00 0d bcc 2009bc0 <_Heap_Walk+0x348> 2009b90: 80 a4 c0 1a cmp %l3, %i2 2009b94: 80 8d 20 ff btst 0xff, %l4 2009b98: 02 80 00 0a be 2009bc0 <_Heap_Walk+0x348> <== NEVER TAKEN 2009b9c: 80 a4 c0 1a cmp %l3, %i2 (*printer)( 2009ba0: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009ba4: 90 10 00 19 mov %i1, %o0 2009ba8: 92 10 20 01 mov 1, %o1 2009bac: 94 12 a0 a8 or %o2, 0xa8, %o2 2009bb0: 96 10 00 1a mov %i2, %o3 2009bb4: 98 10 00 12 mov %l2, %o4 2009bb8: 10 80 00 3d b 2009cac <_Heap_Walk+0x434> 2009bbc: 9a 10 00 10 mov %l0, %o5 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 2009bc0: 38 80 00 0c bgu,a 2009bf0 <_Heap_Walk+0x378> 2009bc4: a8 08 60 01 and %g1, 1, %l4 2009bc8: 80 8d 20 ff btst 0xff, %l4 2009bcc: 02 80 00 09 be 2009bf0 <_Heap_Walk+0x378> 2009bd0: a8 08 60 01 and %g1, 1, %l4 (*printer)( 2009bd4: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009bd8: 90 10 00 19 mov %i1, %o0 2009bdc: 92 10 20 01 mov 1, %o1 2009be0: 94 12 a0 d8 or %o2, 0xd8, %o2 2009be4: 96 10 00 1a mov %i2, %o3 2009be8: 10 bf ff b6 b 2009ac0 <_Heap_Walk+0x248> 2009bec: 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; 2009bf0: c2 04 e0 04 ld [ %l3 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 2009bf4: 80 88 60 01 btst 1, %g1 2009bf8: 12 80 00 40 bne 2009cf8 <_Heap_Walk+0x480> 2009bfc: 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 ? 2009c00: 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)( 2009c04: c2 06 20 08 ld [ %i0 + 8 ], %g1 2009c08: 05 00 80 72 sethi %hi(0x201c800), %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; 2009c0c: c8 06 20 0c ld [ %i0 + 0xc ], %g4 2009c10: 80 a3 40 01 cmp %o5, %g1 2009c14: 02 80 00 07 be 2009c30 <_Heap_Walk+0x3b8> 2009c18: 86 10 a1 b8 or %g2, 0x1b8, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 2009c1c: 80 a3 40 18 cmp %o5, %i0 2009c20: 12 80 00 04 bne 2009c30 <_Heap_Walk+0x3b8> 2009c24: 86 15 61 80 or %l5, 0x180, %g3 2009c28: 07 00 80 72 sethi %hi(0x201c800), %g3 2009c2c: 86 10 e1 c8 or %g3, 0x1c8, %g3 ! 201c9c8 <__log2table+0x130> block->next, block->next == last_free_block ? 2009c30: 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)( 2009c34: 1f 00 80 72 sethi %hi(0x201c800), %o7 2009c38: 80 a0 80 04 cmp %g2, %g4 2009c3c: 02 80 00 07 be 2009c58 <_Heap_Walk+0x3e0> 2009c40: 82 13 e1 d8 or %o7, 0x1d8, %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 2009c44: 80 a0 80 18 cmp %g2, %i0 2009c48: 12 80 00 04 bne 2009c58 <_Heap_Walk+0x3e0> 2009c4c: 82 15 61 80 or %l5, 0x180, %g1 2009c50: 03 00 80 72 sethi %hi(0x201c800), %g1 2009c54: 82 10 61 e8 or %g1, 0x1e8, %g1 ! 201c9e8 <__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)( 2009c58: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009c5c: c4 23 a0 60 st %g2, [ %sp + 0x60 ] 2009c60: c2 23 a0 64 st %g1, [ %sp + 0x64 ] 2009c64: 90 10 00 19 mov %i1, %o0 2009c68: 92 10 20 00 clr %o1 2009c6c: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009c70: 96 10 00 1a mov %i2, %o3 2009c74: 94 12 a1 10 or %o2, 0x110, %o2 2009c78: 9f c7 40 00 call %i5 2009c7c: 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 ) { 2009c80: da 04 c0 00 ld [ %l3 ], %o5 2009c84: 80 a4 80 0d cmp %l2, %o5 2009c88: 02 80 00 0d be 2009cbc <_Heap_Walk+0x444> 2009c8c: 80 a5 20 00 cmp %l4, 0 (*printer)( 2009c90: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009c94: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2009c98: 90 10 00 19 mov %i1, %o0 2009c9c: 92 10 20 01 mov 1, %o1 2009ca0: 94 12 a1 48 or %o2, 0x148, %o2 2009ca4: 96 10 00 1a mov %i2, %o3 2009ca8: 98 10 00 12 mov %l2, %o4 2009cac: 9f c7 40 00 call %i5 2009cb0: 01 00 00 00 nop 2009cb4: 10 80 00 23 b 2009d40 <_Heap_Walk+0x4c8> 2009cb8: 82 10 20 00 clr %g1 ! 0 ); return false; } if ( !prev_used ) { 2009cbc: 32 80 00 0a bne,a 2009ce4 <_Heap_Walk+0x46c> 2009cc0: c2 06 20 08 ld [ %i0 + 8 ], %g1 (*printer)( 2009cc4: 15 00 80 73 sethi %hi(0x201cc00), %o2 2009cc8: 90 10 00 19 mov %i1, %o0 2009ccc: 92 10 20 01 mov 1, %o1 2009cd0: 10 80 00 22 b 2009d58 <_Heap_Walk+0x4e0> 2009cd4: 94 12 a1 88 or %o2, 0x188, %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 ) { 2009cd8: 02 80 00 17 be 2009d34 <_Heap_Walk+0x4bc> 2009cdc: 80 a4 c0 1b cmp %l3, %i3 return true; } free_block = free_block->next; 2009ce0: 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 ) { 2009ce4: 80 a0 40 18 cmp %g1, %i0 2009ce8: 12 bf ff fc bne 2009cd8 <_Heap_Walk+0x460> 2009cec: 80 a0 40 1a cmp %g1, %i2 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009cf0: 10 80 00 17 b 2009d4c <_Heap_Walk+0x4d4> 2009cf4: 15 00 80 73 sethi %hi(0x201cc00), %o2 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 2009cf8: 80 a5 20 00 cmp %l4, 0 2009cfc: 02 80 00 08 be 2009d1c <_Heap_Walk+0x4a4> 2009d00: 92 10 20 00 clr %o1 (*printer)( 2009d04: 94 10 00 17 mov %l7, %o2 2009d08: 96 10 00 1a mov %i2, %o3 2009d0c: 9f c7 40 00 call %i5 2009d10: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009d14: 10 80 00 08 b 2009d34 <_Heap_Walk+0x4bc> 2009d18: 80 a4 c0 1b cmp %l3, %i3 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 2009d1c: da 06 80 00 ld [ %i2 ], %o5 2009d20: 94 10 00 16 mov %l6, %o2 2009d24: 96 10 00 1a mov %i2, %o3 2009d28: 9f c7 40 00 call %i5 2009d2c: 98 10 00 12 mov %l2, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 2009d30: 80 a4 c0 1b cmp %l3, %i3 2009d34: 12 bf ff 70 bne 2009af4 <_Heap_Walk+0x27c> 2009d38: b4 10 00 13 mov %l3, %i2 return true; 2009d3c: 82 10 20 01 mov 1, %g1 } 2009d40: b0 08 60 01 and %g1, 1, %i0 2009d44: 81 c7 e0 08 ret 2009d48: 81 e8 00 00 restore return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 2009d4c: 90 10 00 19 mov %i1, %o0 2009d50: 92 10 20 01 mov 1, %o1 2009d54: 94 12 a1 f8 or %o2, 0x1f8, %o2 2009d58: 96 10 00 1a mov %i2, %o3 2009d5c: 9f c7 40 00 call %i5 2009d60: 01 00 00 00 nop 2009d64: 10 bf ff f7 b 2009d40 <_Heap_Walk+0x4c8> 2009d68: 82 10 20 00 clr %g1 ! 0 =============================================================================== 02008d1c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008d1c: 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 ) 2008d20: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2008d24: 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 ) 2008d28: 80 a0 60 00 cmp %g1, 0 2008d2c: 02 80 00 20 be 2008dac <_Objects_Allocate+0x90> <== NEVER TAKEN 2008d30: 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 ); 2008d34: b8 07 60 20 add %i5, 0x20, %i4 2008d38: 7f ff fd 76 call 2008310 <_Chain_Get> 2008d3c: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2008d40: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2008d44: 80 a0 60 00 cmp %g1, 0 2008d48: 02 80 00 19 be 2008dac <_Objects_Allocate+0x90> 2008d4c: 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 ) { 2008d50: 80 a2 20 00 cmp %o0, 0 2008d54: 32 80 00 0a bne,a 2008d7c <_Objects_Allocate+0x60> 2008d58: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 _Objects_Extend_information( information ); 2008d5c: 40 00 00 1d call 2008dd0 <_Objects_Extend_information> 2008d60: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2008d64: 7f ff fd 6b call 2008310 <_Chain_Get> 2008d68: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 2008d6c: b0 92 20 00 orcc %o0, 0, %i0 2008d70: 02 80 00 0f be 2008dac <_Objects_Allocate+0x90> 2008d74: 01 00 00 00 nop uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 2008d78: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 2008d7c: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 2008d80: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 2008d84: 40 00 3e a4 call 2018814 <.udiv> 2008d88: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 2008d8c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2008d90: 91 2a 20 02 sll %o0, 2, %o0 2008d94: c4 00 40 08 ld [ %g1 + %o0 ], %g2 2008d98: 84 00 bf ff add %g2, -1, %g2 2008d9c: c4 20 40 08 st %g2, [ %g1 + %o0 ] information->inactive--; 2008da0: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1 2008da4: 82 00 7f ff add %g1, -1, %g1 2008da8: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 2008dac: 81 c7 e0 08 ret 2008db0: 81 e8 00 00 restore =============================================================================== 02009128 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 2009128: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 200912c: 80 a6 60 00 cmp %i1, 0 2009130: 02 80 00 17 be 200918c <_Objects_Get_information+0x64> 2009134: 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 ); 2009138: 40 00 12 81 call 200db3c <_Objects_API_maximum_class> 200913c: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 2009140: 80 a2 20 00 cmp %o0, 0 2009144: 02 80 00 12 be 200918c <_Objects_Get_information+0x64> 2009148: 80 a6 40 08 cmp %i1, %o0 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 200914c: 18 80 00 10 bgu 200918c <_Objects_Get_information+0x64> 2009150: 03 00 80 76 sethi %hi(0x201d800), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 2009154: b1 2e 20 02 sll %i0, 2, %i0 2009158: 82 10 63 78 or %g1, 0x378, %g1 200915c: c2 00 40 18 ld [ %g1 + %i0 ], %g1 2009160: 80 a0 60 00 cmp %g1, 0 2009164: 02 80 00 0a be 200918c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009168: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 200916c: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2009170: 80 a7 60 00 cmp %i5, 0 2009174: 02 80 00 06 be 200918c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009178: 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 ) 200917c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2009180: 80 a0 00 01 cmp %g0, %g1 2009184: 82 60 20 00 subx %g0, 0, %g1 2009188: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 200918c: 81 c7 e0 08 ret 2009190: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 0200d1a4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200d1a4: 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; 200d1a8: 92 96 20 00 orcc %i0, 0, %o1 200d1ac: 12 80 00 06 bne 200d1c4 <_Objects_Id_to_name+0x20> 200d1b0: 83 32 60 18 srl %o1, 0x18, %g1 200d1b4: 03 00 80 b8 sethi %hi(0x202e000), %g1 200d1b8: c2 00 63 9c ld [ %g1 + 0x39c ], %g1 ! 202e39c <_Per_CPU_Information+0xc> 200d1bc: d2 00 60 08 ld [ %g1 + 8 ], %o1 200d1c0: 83 32 60 18 srl %o1, 0x18, %g1 200d1c4: 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 ) 200d1c8: 84 00 7f ff add %g1, -1, %g2 200d1cc: 80 a0 a0 02 cmp %g2, 2 200d1d0: 18 80 00 16 bgu 200d228 <_Objects_Id_to_name+0x84> 200d1d4: 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 ] ) 200d1d8: 10 80 00 16 b 200d230 <_Objects_Id_to_name+0x8c> 200d1dc: 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 ]; 200d1e0: 85 28 a0 02 sll %g2, 2, %g2 200d1e4: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200d1e8: 80 a2 20 00 cmp %o0, 0 200d1ec: 02 80 00 0f be 200d228 <_Objects_Id_to_name+0x84> <== NEVER TAKEN 200d1f0: 01 00 00 00 nop return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 200d1f4: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 200d1f8: 80 a0 60 00 cmp %g1, 0 200d1fc: 12 80 00 0b bne 200d228 <_Objects_Id_to_name+0x84> <== NEVER TAKEN 200d200: 01 00 00 00 nop return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 200d204: 7f ff ff ca call 200d12c <_Objects_Get> 200d208: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200d20c: 80 a2 20 00 cmp %o0, 0 200d210: 02 80 00 06 be 200d228 <_Objects_Id_to_name+0x84> 200d214: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200d218: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200d21c: 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(); 200d220: 40 00 03 cb call 200e14c <_Thread_Enable_dispatch> 200d224: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 200d228: 81 c7 e0 08 ret 200d22c: 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 ] ) 200d230: 05 00 80 b7 sethi %hi(0x202dc00), %g2 200d234: 84 10 a1 78 or %g2, 0x178, %g2 ! 202dd78 <_Objects_Information_table> 200d238: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200d23c: 80 a0 60 00 cmp %g1, 0 200d240: 12 bf ff e8 bne 200d1e0 <_Objects_Id_to_name+0x3c> 200d244: 85 32 60 1b srl %o1, 0x1b, %g2 200d248: 30 bf ff f8 b,a 200d228 <_Objects_Id_to_name+0x84> =============================================================================== 0200ef3c <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200ef3c: 9d e3 bf a0 save %sp, -96, %sp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 200ef40: f6 06 20 08 ld [ %i0 + 8 ], %i3 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200ef44: 39 00 80 78 sethi %hi(0x201e000), %i4 200ef48: b5 36 e0 18 srl %i3, 0x18, %i2 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 200ef4c: b7 2e e0 10 sll %i3, 0x10, %i3 200ef50: b4 0e a0 07 and %i2, 7, %i2 200ef54: b7 36 e0 0e srl %i3, 0xe, %i3 200ef58: b4 06 a0 04 add %i2, 4, %i2 200ef5c: b5 2e a0 02 sll %i2, 2, %i2 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 200ef60: 82 17 20 28 or %i4, 0x28, %g1 done = true; for ( index = 1 ; index <= max ; ++index ) { 200ef64: ba 10 20 01 mov 1, %i5 */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 200ef68: 84 10 20 01 mov 1, %g2 for ( index = 1 ; index <= max ; ++index ) { 200ef6c: 10 80 00 18 b 200efcc <_POSIX_Keys_Run_destructors+0x90> 200ef70: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1 POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 200ef74: 86 17 20 28 or %i4, 0x28, %g3 Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) 200ef78: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3 200ef7c: 83 28 60 02 sll %g1, 2, %g1 200ef80: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 200ef84: 80 a0 60 00 cmp %g1, 0 200ef88: 22 80 00 11 be,a 200efcc <_POSIX_Keys_Run_destructors+0x90> 200ef8c: ba 07 60 01 inc %i5 200ef90: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200ef94: 80 a0 e0 00 cmp %g3, 0 200ef98: 02 80 00 0c be 200efc8 <_POSIX_Keys_Run_destructors+0x8c> 200ef9c: 86 00 40 1a add %g1, %i2, %g3 void *value = key->Values [ thread_api ][ thread_index ]; 200efa0: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200efa4: d0 00 c0 1b ld [ %g3 + %i3 ], %o0 if ( value != NULL ) { 200efa8: 80 a2 20 00 cmp %o0, 0 200efac: 22 80 00 08 be,a 200efcc <_POSIX_Keys_Run_destructors+0x90><== ALWAYS TAKEN 200efb0: ba 07 60 01 inc %i5 key->Values [ thread_api ][ thread_index ] = NULL; 200efb4: c0 20 c0 1b clr [ %g3 + %i3 ] <== NOT EXECUTED (*key->destructor)( value ); 200efb8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 200efbc: 9f c0 40 00 call %g1 <== NOT EXECUTED 200efc0: 01 00 00 00 nop <== NOT EXECUTED done = false; 200efc4: 84 10 20 00 clr %g2 ! 0 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 200efc8: ba 07 60 01 inc %i5 200efcc: 83 2f 60 10 sll %i5, 0x10, %g1 200efd0: 83 30 60 10 srl %g1, 0x10, %g1 200efd4: 80 a0 40 19 cmp %g1, %i1 200efd8: 08 bf ff e7 bleu 200ef74 <_POSIX_Keys_Run_destructors+0x38> 200efdc: 80 88 a0 ff btst 0xff, %g2 * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 200efe0: 02 bf ff e1 be 200ef64 <_POSIX_Keys_Run_destructors+0x28> <== NEVER TAKEN 200efe4: 82 17 20 28 or %i4, 0x28, %g1 done = false; } } } } } 200efe8: 81 c7 e0 08 ret 200efec: 81 e8 00 00 restore =============================================================================== 0200ca3c <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 200ca3c: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 200ca40: 11 00 80 ab sethi %hi(0x202ac00), %o0 200ca44: 92 10 00 18 mov %i0, %o1 200ca48: 90 12 23 3c or %o0, 0x33c, %o0 200ca4c: 40 00 0c d2 call 200fd94 <_Objects_Get> 200ca50: 94 07 bf f8 add %fp, -8, %o2 Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 200ca54: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ca58: 80 a0 60 00 cmp %g1, 0 200ca5c: 12 80 00 45 bne 200cb70 <_POSIX_Message_queue_Receive_support+0x134> 200ca60: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 200ca64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200ca68: 84 08 60 03 and %g1, 3, %g2 200ca6c: 80 a0 a0 01 cmp %g2, 1 200ca70: 32 80 00 08 bne,a 200ca90 <_POSIX_Message_queue_Receive_support+0x54> 200ca74: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 _Thread_Enable_dispatch(); 200ca78: 40 00 10 a1 call 2010cfc <_Thread_Enable_dispatch> 200ca7c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); 200ca80: 40 00 28 55 call 2016bd4 <__errno> 200ca84: 01 00 00 00 nop 200ca88: 10 80 00 0b b 200cab4 <_POSIX_Message_queue_Receive_support+0x78> 200ca8c: 82 10 20 09 mov 9, %g1 ! 9 } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 200ca90: c4 02 20 68 ld [ %o0 + 0x68 ], %g2 200ca94: 80 a6 80 02 cmp %i2, %g2 200ca98: 1a 80 00 09 bcc 200cabc <_POSIX_Message_queue_Receive_support+0x80> 200ca9c: 84 10 3f ff mov -1, %g2 _Thread_Enable_dispatch(); 200caa0: 40 00 10 97 call 2010cfc <_Thread_Enable_dispatch> 200caa4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EMSGSIZE ); 200caa8: 40 00 28 4b call 2016bd4 <__errno> 200caac: 01 00 00 00 nop 200cab0: 82 10 20 7a mov 0x7a, %g1 ! 7a 200cab4: 10 80 00 2d b 200cb68 <_POSIX_Message_queue_Receive_support+0x12c> 200cab8: c2 22 00 00 st %g1, [ %o0 ] /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 200cabc: c4 27 bf fc st %g2, [ %fp + -4 ] /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 200cac0: 80 a7 20 00 cmp %i4, 0 200cac4: 02 80 00 06 be 200cadc <_POSIX_Message_queue_Receive_support+0xa0> 200cac8: 98 10 20 00 clr %o4 do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 200cacc: 05 00 00 10 sethi %hi(0x4000), %g2 200cad0: 82 08 40 02 and %g1, %g2, %g1 200cad4: 80 a0 00 01 cmp %g0, %g1 200cad8: 98 60 3f ff subx %g0, -1, %o4 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 200cadc: 90 02 20 1c add %o0, 0x1c, %o0 200cae0: 92 10 00 18 mov %i0, %o1 200cae4: 94 10 00 19 mov %i1, %o2 200cae8: 96 07 bf fc add %fp, -4, %o3 200caec: 98 0b 20 01 and %o4, 1, %o4 200caf0: 40 00 08 72 call 200ecb8 <_CORE_message_queue_Seize> 200caf4: 9a 10 00 1d mov %i5, %o5 &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 200caf8: 40 00 10 81 call 2010cfc <_Thread_Enable_dispatch> 200cafc: 01 00 00 00 nop if (msg_prio) { 200cb00: 80 a6 e0 00 cmp %i3, 0 200cb04: 02 80 00 08 be 200cb24 <_POSIX_Message_queue_Receive_support+0xe8><== NEVER TAKEN 200cb08: 03 00 80 ab sethi %hi(0x202ac00), %g1 *msg_prio = _POSIX_Message_queue_Priority_from_core( _Thread_Executing->Wait.count 200cb0c: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 ! 202afbc <_Per_CPU_Information+0xc> RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return (unsigned int) ((priority >= 0) ? priority : -priority); 200cb10: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 200cb14: 83 38 a0 1f sra %g2, 0x1f, %g1 200cb18: 84 18 40 02 xor %g1, %g2, %g2 200cb1c: 82 20 80 01 sub %g2, %g1, %g1 timeout ); _Thread_Enable_dispatch(); if (msg_prio) { *msg_prio = _POSIX_Message_queue_Priority_from_core( 200cb20: c2 26 c0 00 st %g1, [ %i3 ] _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 200cb24: 3b 00 80 ab sethi %hi(0x202ac00), %i5 200cb28: ba 17 63 b0 or %i5, 0x3b0, %i5 ! 202afb0 <_Per_CPU_Information> 200cb2c: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cb30: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 200cb34: 80 a0 60 00 cmp %g1, 0 200cb38: 12 80 00 05 bne 200cb4c <_POSIX_Message_queue_Receive_support+0x110> 200cb3c: 01 00 00 00 nop return length_out; 200cb40: f0 07 bf fc ld [ %fp + -4 ], %i0 200cb44: 81 c7 e0 08 ret 200cb48: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( 200cb4c: 40 00 28 22 call 2016bd4 <__errno> 200cb50: 01 00 00 00 nop 200cb54: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200cb58: b8 10 00 08 mov %o0, %i4 200cb5c: 40 00 00 9b call 200cdc8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 200cb60: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 200cb64: d0 27 00 00 st %o0, [ %i4 ] 200cb68: 81 c7 e0 08 ret 200cb6c: 91 e8 3f ff restore %g0, -1, %o0 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 200cb70: 40 00 28 19 call 2016bd4 <__errno> 200cb74: b0 10 3f ff mov -1, %i0 200cb78: 82 10 20 09 mov 9, %g1 200cb7c: c2 22 00 00 st %g1, [ %o0 ] } 200cb80: 81 c7 e0 08 ret 200cb84: 81 e8 00 00 restore =============================================================================== 0200ee50 <_POSIX_Semaphore_Create_support>: size_t name_len, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200ee50: 9d e3 bf a0 save %sp, -96, %sp POSIX_Semaphore_Control *the_semaphore; CORE_semaphore_Attributes *the_sem_attr; char *name; /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) 200ee54: 80 a6 a0 00 cmp %i2, 0 200ee58: 22 80 00 06 be,a 200ee70 <_POSIX_Semaphore_Create_support+0x20> 200ee5c: 03 00 80 89 sethi %hi(0x2022400), %g1 rtems_set_errno_and_return_minus_one( ENOSYS ); 200ee60: 40 00 0a 61 call 20117e4 <__errno> 200ee64: 01 00 00 00 nop 200ee68: 10 80 00 21 b 200eeec <_POSIX_Semaphore_Create_support+0x9c> 200ee6c: 82 10 20 58 mov 0x58, %g1 ! 58 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 200ee70: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 200ee74: 84 00 a0 01 inc %g2 200ee78: c4 20 63 30 st %g2, [ %g1 + 0x330 ] return _Thread_Dispatch_disable_level; 200ee7c: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200ee80: 35 00 80 8a sethi %hi(0x2022800), %i2 200ee84: 7f ff ee cc call 200a9b4 <_Objects_Allocate> 200ee88: 90 16 a2 30 or %i2, 0x230, %o0 ! 2022a30 <_POSIX_Semaphore_Information> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200ee8c: ba 92 20 00 orcc %o0, 0, %i5 200ee90: 12 80 00 08 bne 200eeb0 <_POSIX_Semaphore_Create_support+0x60> 200ee94: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 200ee98: 7f ff f3 ef call 200be54 <_Thread_Enable_dispatch> 200ee9c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 200eea0: 40 00 0a 51 call 20117e4 <__errno> 200eea4: 01 00 00 00 nop 200eea8: 10 80 00 11 b 200eeec <_POSIX_Semaphore_Create_support+0x9c> 200eeac: 82 10 20 1c mov 0x1c, %g1 ! 1c /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ if ( name_arg != NULL ) { 200eeb0: 02 80 00 12 be 200eef8 <_POSIX_Semaphore_Create_support+0xa8> 200eeb4: 92 10 00 19 mov %i1, %o1 name = _Workspace_String_duplicate( name_arg, name_len ); 200eeb8: 40 00 04 72 call 2010080 <_Workspace_String_duplicate> 200eebc: 90 10 00 18 mov %i0, %o0 if ( !name ) { 200eec0: b2 92 20 00 orcc %o0, 0, %i1 200eec4: 12 80 00 0f bne 200ef00 <_POSIX_Semaphore_Create_support+0xb0><== ALWAYS TAKEN 200eec8: 80 a6 60 00 cmp %i1, 0 RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object ); 200eecc: 90 16 a2 30 or %i2, 0x230, %o0 <== NOT EXECUTED 200eed0: 7f ff ef 92 call 200ad18 <_Objects_Free> <== NOT EXECUTED 200eed4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED _POSIX_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200eed8: 7f ff f3 df call 200be54 <_Thread_Enable_dispatch> <== NOT EXECUTED 200eedc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 200eee0: 40 00 0a 41 call 20117e4 <__errno> <== NOT EXECUTED 200eee4: 01 00 00 00 nop <== NOT EXECUTED 200eee8: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200eeec: c2 22 00 00 st %g1, [ %o0 ] 200eef0: 81 c7 e0 08 ret 200eef4: 91 e8 3f ff restore %g0, -1, %o0 } } else { name = NULL; 200eef8: b2 10 20 00 clr %i1 } the_semaphore->process_shared = pshared; if ( name ) { 200eefc: 80 a6 60 00 cmp %i1, 0 200ef00: 02 80 00 08 be 200ef20 <_POSIX_Semaphore_Create_support+0xd0> 200ef04: c0 27 60 10 clr [ %i5 + 0x10 ] the_semaphore->named = true; 200ef08: 82 10 20 01 mov 1, %g1 200ef0c: c2 2f 60 14 stb %g1, [ %i5 + 0x14 ] the_semaphore->open_count = 1; 200ef10: 82 10 20 01 mov 1, %g1 200ef14: c2 27 60 18 st %g1, [ %i5 + 0x18 ] the_semaphore->linked = true; 200ef18: 10 80 00 05 b 200ef2c <_POSIX_Semaphore_Create_support+0xdc> 200ef1c: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ] } else { the_semaphore->named = false; 200ef20: c0 2f 60 14 clrb [ %i5 + 0x14 ] the_semaphore->open_count = 0; 200ef24: c0 27 60 18 clr [ %i5 + 0x18 ] the_semaphore->linked = false; 200ef28: c0 2f 60 15 clrb [ %i5 + 0x15 ] the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200ef2c: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200ef30: 90 07 60 1c add %i5, 0x1c, %o0 the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200ef34: c2 27 60 5c st %g1, [ %i5 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200ef38: 92 07 60 5c add %i5, 0x5c, %o1 200ef3c: 94 10 00 1b mov %i3, %o2 200ef40: 7f ff ed 02 call 200a348 <_CORE_semaphore_Initialize> 200ef44: c0 27 60 60 clr [ %i5 + 0x60 ] Objects_Information *information, Objects_Control *the_object, const char *name ) { _Objects_Set_local_object( 200ef48: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200ef4c: 05 00 80 8a sethi %hi(0x2022800), %g2 200ef50: c4 00 a2 4c ld [ %g2 + 0x24c ], %g2 ! 2022a4c <_POSIX_Semaphore_Information+0x1c> 200ef54: 83 28 60 02 sll %g1, 2, %g1 200ef58: fa 20 80 01 st %i5, [ %g2 + %g1 ] the_object ); #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) /* ASSERT: information->is_string */ the_object->name.name_p = name; 200ef5c: f2 27 60 0c st %i1, [ %i5 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name ); *the_sem = the_semaphore; 200ef60: fa 27 00 00 st %i5, [ %i4 ] _Thread_Enable_dispatch(); 200ef64: 7f ff f3 bc call 200be54 <_Thread_Enable_dispatch> 200ef68: b0 10 20 00 clr %i0 return 0; } 200ef6c: 81 c7 e0 08 ret 200ef70: 81 e8 00 00 restore =============================================================================== 0200c8fc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: Thread_Control *the_thread ) { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200c8fc: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 200c900: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 200c904: 80 a0 a0 00 cmp %g2, 0 200c908: 12 80 00 13 bne 200c954 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58><== NEVER TAKEN 200c90c: 01 00 00 00 nop 200c910: c4 00 60 dc ld [ %g1 + 0xdc ], %g2 200c914: 80 a0 a0 01 cmp %g2, 1 200c918: 12 80 00 0f bne 200c954 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200c91c: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 200c920: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 200c924: 80 a0 60 00 cmp %g1, 0 200c928: 02 80 00 0b be 200c954 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58> 200c92c: 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--; 200c930: 03 00 80 78 sethi %hi(0x201e000), %g1 200c934: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 201e0c0 <_Thread_Dispatch_disable_level> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 200c938: 92 10 3f ff mov -1, %o1 200c93c: 84 00 bf ff add %g2, -1, %g2 200c940: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ] return _Thread_Dispatch_disable_level; 200c944: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 200c948: 82 13 c0 00 mov %o7, %g1 200c94c: 40 00 01 b6 call 200d024 <_POSIX_Thread_Exit> 200c950: 9e 10 40 00 mov %g1, %o7 } else _Thread_Enable_dispatch(); 200c954: 82 13 c0 00 mov %o7, %g1 200c958: 7f ff f6 42 call 200a260 <_Thread_Enable_dispatch> 200c95c: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200dcb0 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 200dcb0: 9d e3 bf a0 save %sp, -96, %sp if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 200dcb4: d0 06 40 00 ld [ %i1 ], %o0 200dcb8: 7f ff ff f3 call 200dc84 <_POSIX_Priority_Is_valid> 200dcbc: ba 10 00 18 mov %i0, %i5 200dcc0: 80 8a 20 ff btst 0xff, %o0 200dcc4: 02 80 00 11 be 200dd08 <_POSIX_Thread_Translate_sched_param+0x58><== NEVER TAKEN 200dcc8: b0 10 20 16 mov 0x16, %i0 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 200dccc: c0 26 80 00 clr [ %i2 ] *budget_callout = NULL; if ( policy == SCHED_OTHER ) { 200dcd0: 80 a7 60 00 cmp %i5, 0 200dcd4: 12 80 00 06 bne 200dcec <_POSIX_Thread_Translate_sched_param+0x3c> 200dcd8: c0 26 c0 00 clr [ %i3 ] *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 200dcdc: 82 10 20 01 mov 1, %g1 200dce0: c2 26 80 00 st %g1, [ %i2 ] return 0; 200dce4: 81 c7 e0 08 ret 200dce8: 91 e8 20 00 restore %g0, 0, %o0 } if ( policy == SCHED_FIFO ) { 200dcec: 80 a7 60 01 cmp %i5, 1 200dcf0: 02 80 00 06 be 200dd08 <_POSIX_Thread_Translate_sched_param+0x58> 200dcf4: b0 10 20 00 clr %i0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 200dcf8: 80 a7 60 02 cmp %i5, 2 200dcfc: 32 80 00 05 bne,a 200dd10 <_POSIX_Thread_Translate_sched_param+0x60> 200dd00: 80 a7 60 04 cmp %i5, 4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 200dd04: fa 26 80 00 st %i5, [ %i2 ] return 0; 200dd08: 81 c7 e0 08 ret 200dd0c: 81 e8 00 00 restore } if ( policy == SCHED_SPORADIC ) { 200dd10: 12 bf ff fe bne 200dd08 <_POSIX_Thread_Translate_sched_param+0x58> 200dd14: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_repl_period.tv_sec == 0) && 200dd18: c2 06 60 08 ld [ %i1 + 8 ], %g1 200dd1c: 80 a0 60 00 cmp %g1, 0 200dd20: 32 80 00 07 bne,a 200dd3c <_POSIX_Thread_Translate_sched_param+0x8c> 200dd24: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dd28: c2 06 60 0c ld [ %i1 + 0xc ], %g1 200dd2c: 80 a0 60 00 cmp %g1, 0 200dd30: 02 80 00 1d be 200dda4 <_POSIX_Thread_Translate_sched_param+0xf4> 200dd34: 01 00 00 00 nop (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 200dd38: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 200dd3c: 80 a0 60 00 cmp %g1, 0 200dd40: 12 80 00 06 bne 200dd58 <_POSIX_Thread_Translate_sched_param+0xa8> 200dd44: 01 00 00 00 nop 200dd48: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200dd4c: 80 a0 60 00 cmp %g1, 0 200dd50: 02 bf ff ee be 200dd08 <_POSIX_Thread_Translate_sched_param+0x58> 200dd54: b0 10 20 16 mov 0x16, %i0 (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200dd58: 7f ff f7 4f call 200ba94 <_Timespec_To_ticks> 200dd5c: 90 06 60 08 add %i1, 8, %o0 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; 200dd60: b0 10 20 16 mov 0x16, %i0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200dd64: ba 10 00 08 mov %o0, %i5 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 200dd68: 7f ff f7 4b call 200ba94 <_Timespec_To_ticks> 200dd6c: 90 06 60 10 add %i1, 0x10, %o0 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 200dd70: 80 a7 40 08 cmp %i5, %o0 200dd74: 0a 80 00 0c bcs 200dda4 <_POSIX_Thread_Translate_sched_param+0xf4> 200dd78: 01 00 00 00 nop _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 200dd7c: 7f ff ff c2 call 200dc84 <_POSIX_Priority_Is_valid> 200dd80: d0 06 60 04 ld [ %i1 + 4 ], %o0 200dd84: 80 8a 20 ff btst 0xff, %o0 200dd88: 02 bf ff e0 be 200dd08 <_POSIX_Thread_Translate_sched_param+0x58> 200dd8c: 82 10 20 03 mov 3, %g1 return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 200dd90: c2 26 80 00 st %g1, [ %i2 ] *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 200dd94: b0 10 20 00 clr %i0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 200dd98: 03 00 80 1f sethi %hi(0x2007c00), %g1 200dd9c: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 2007da0 <_POSIX_Threads_Sporadic_budget_callout> 200dda0: c2 26 c0 00 st %g1, [ %i3 ] return 0; } return EINVAL; } 200dda4: 81 c7 e0 08 ret 200dda8: 81 e8 00 00 restore =============================================================================== 0200cc3c <_POSIX_Threads_Delete_extension>: */ static void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 200cc3c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 200cc40: f0 06 61 5c ld [ %i1 + 0x15c ], %i0 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 200cc44: 40 00 08 a4 call 200eed4 <_POSIX_Threads_cancel_run> 200cc48: 90 10 00 19 mov %i1, %o0 /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 200cc4c: 90 10 00 19 mov %i1, %o0 200cc50: 40 00 08 bb call 200ef3c <_POSIX_Keys_Run_destructors> 200cc54: ba 06 20 44 add %i0, 0x44, %i5 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200cc58: 10 80 00 03 b 200cc64 <_POSIX_Threads_Delete_extension+0x28> 200cc5c: f8 06 60 28 ld [ %i1 + 0x28 ], %i4 *(void **)the_thread->Wait.return_argument = value_ptr; 200cc60: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 200cc64: 7f ff f6 28 call 200a504 <_Thread_queue_Dequeue> 200cc68: 90 10 00 1d mov %i5, %o0 200cc6c: 80 a2 20 00 cmp %o0, 0 200cc70: 32 bf ff fc bne,a 200cc60 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN 200cc74: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 200cc78: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 200cc7c: 80 a0 60 04 cmp %g1, 4 200cc80: 32 80 00 05 bne,a 200cc94 <_POSIX_Threads_Delete_extension+0x58> 200cc84: c0 26 61 5c clr [ %i1 + 0x15c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 200cc88: 7f ff f8 da call 200aff0 <_Watchdog_Remove> 200cc8c: 90 06 20 a8 add %i0, 0xa8, %o0 deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 200cc90: c0 26 61 5c clr [ %i1 + 0x15c ] _Workspace_Free( api ); 200cc94: 7f ff f9 4f call 200b1d0 <_Workspace_Free> 200cc98: 81 e8 00 00 restore =============================================================================== 02007b00 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 2007b00: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 2007b04: 03 00 80 86 sethi %hi(0x2021800), %g1 2007b08: 82 10 63 6c or %g1, 0x36c, %g1 ! 2021b6c maximum = Configuration_POSIX_API.number_of_initialization_threads; 2007b0c: f6 00 60 30 ld [ %g1 + 0x30 ], %i3 if ( !user_threads || maximum == 0 ) 2007b10: 80 a6 e0 00 cmp %i3, 0 2007b14: 02 80 00 1d be 2007b88 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2007b18: fa 00 60 34 ld [ %g1 + 0x34 ], %i5 2007b1c: 80 a7 60 00 cmp %i5, 0 2007b20: 02 80 00 1a be 2007b88 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN 2007b24: b8 10 20 00 clr %i4 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 2007b28: 40 00 18 a1 call 200ddac 2007b2c: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 2007b30: 92 10 20 02 mov 2, %o1 2007b34: 40 00 18 aa call 200dddc 2007b38: 90 07 bf bc add %fp, -68, %o0 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 2007b3c: d2 07 60 04 ld [ %i5 + 4 ], %o1 2007b40: 40 00 18 b6 call 200de18 2007b44: 90 07 bf bc add %fp, -68, %o0 status = pthread_create( 2007b48: d4 07 40 00 ld [ %i5 ], %o2 2007b4c: 90 07 bf fc add %fp, -4, %o0 2007b50: 92 07 bf bc add %fp, -68, %o1 2007b54: 96 10 20 00 clr %o3 2007b58: 7f ff ff 17 call 20077b4 2007b5c: ba 07 60 08 add %i5, 8, %i5 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 2007b60: 80 a2 20 00 cmp %o0, 0 2007b64: 02 80 00 05 be 2007b78 <_POSIX_Threads_Initialize_user_threads_body+0x78> 2007b68: 94 10 00 08 mov %o0, %o2 _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 2007b6c: 90 10 20 02 mov 2, %o0 2007b70: 40 00 08 04 call 2009b80 <_Internal_error_Occurred> 2007b74: 92 10 20 01 mov 1, %o1 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 2007b78: b8 07 20 01 inc %i4 2007b7c: 80 a7 00 1b cmp %i4, %i3 2007b80: 12 bf ff ea bne 2007b28 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN 2007b84: 01 00 00 00 nop 2007b88: 81 c7 e0 08 ret 2007b8c: 81 e8 00 00 restore =============================================================================== 0200cd90 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 200cd90: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200cd94: fa 06 61 5c ld [ %i1 + 0x15c ], %i5 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 200cd98: 40 00 04 2a call 200de40 <_Timespec_To_ticks> 200cd9c: 90 07 60 98 add %i5, 0x98, %o0 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 200cda0: 03 00 80 73 sethi %hi(0x201cc00), %g1 200cda4: d2 08 62 74 ldub [ %g1 + 0x274 ], %o1 ! 201ce74 200cda8: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 the_thread->cpu_time_budget = ticks; 200cdac: d0 26 60 74 st %o0, [ %i1 + 0x74 ] 200cdb0: 92 22 40 01 sub %o1, %g1, %o1 */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200cdb4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 200cdb8: 80 a0 60 00 cmp %g1, 0 200cdbc: 12 80 00 08 bne 200cddc <_POSIX_Threads_Sporadic_budget_TSR+0x4c><== NEVER TAKEN 200cdc0: d2 26 60 18 st %o1, [ %i1 + 0x18 ] /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 200cdc4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200cdc8: 80 a0 40 09 cmp %g1, %o1 200cdcc: 08 80 00 04 bleu 200cddc <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 200cdd0: 90 10 00 19 mov %i1, %o0 _Thread_Change_priority( the_thread, new_priority, true ); 200cdd4: 7f ff f3 c6 call 2009cec <_Thread_Change_priority> 200cdd8: 94 10 20 01 mov 1, %o2 #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 200cddc: 40 00 04 19 call 200de40 <_Timespec_To_ticks> 200cde0: 90 07 60 90 add %i5, 0x90, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200cde4: 31 00 80 77 sethi %hi(0x201dc00), %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200cde8: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200cdec: b0 16 20 d0 or %i0, 0xd0, %i0 200cdf0: 7f ff f8 26 call 200ae88 <_Watchdog_Insert> 200cdf4: 93 ef 60 a8 restore %i5, 0xa8, %o1 =============================================================================== 0200cdf8 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200cdf8: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 200cdfc: 86 10 3f ff mov -1, %g3 200ce00: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 200ce04: c6 22 20 74 st %g3, [ %o0 + 0x74 ] 200ce08: 07 00 80 73 sethi %hi(0x201cc00), %g3 200ce0c: d2 08 e2 74 ldub [ %g3 + 0x274 ], %o1 ! 201ce74 200ce10: 92 22 40 02 sub %o1, %g2, %o1 */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 200ce14: c4 02 20 1c ld [ %o0 + 0x1c ], %g2 200ce18: 80 a0 a0 00 cmp %g2, 0 200ce1c: 12 80 00 09 bne 200ce40 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200ce20: d2 22 20 18 st %o1, [ %o0 + 0x18 ] /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 200ce24: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 200ce28: 80 a0 40 09 cmp %g1, %o1 200ce2c: 1a 80 00 05 bcc 200ce40 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN 200ce30: 94 10 20 01 mov 1, %o2 _Thread_Change_priority( the_thread, new_priority, true ); 200ce34: 82 13 c0 00 mov %o7, %g1 200ce38: 7f ff f3 ad call 2009cec <_Thread_Change_priority> 200ce3c: 9e 10 40 00 mov %g1, %o7 200ce40: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 020075b8 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 20075b8: 9d e3 bf 98 save %sp, -104, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 20075bc: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 20075c0: 82 00 60 01 inc %g1 20075c4: c2 26 60 68 st %g1, [ %i1 + 0x68 ] /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 20075c8: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 20075cc: 80 a0 60 00 cmp %g1, 0 20075d0: 32 80 00 07 bne,a 20075ec <_POSIX_Timer_TSR+0x34> 20075d4: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 20075d8: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 20075dc: 80 a0 60 00 cmp %g1, 0 20075e0: 02 80 00 1e be 2007658 <_POSIX_Timer_TSR+0xa0> <== NEVER TAKEN 20075e4: 82 10 20 04 mov 4, %g1 ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 20075e8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 20075ec: d4 06 60 08 ld [ %i1 + 8 ], %o2 20075f0: 90 06 60 10 add %i1, 0x10, %o0 20075f4: 17 00 80 1d sethi %hi(0x2007400), %o3 20075f8: 98 10 00 19 mov %i1, %o4 20075fc: 40 00 18 34 call 200d6cc <_POSIX_Timer_Insert_helper> 2007600: 96 12 e1 b8 or %o3, 0x1b8, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2007604: 80 8a 20 ff btst 0xff, %o0 2007608: 02 80 00 19 be 200766c <_POSIX_Timer_TSR+0xb4> <== NEVER TAKEN 200760c: 01 00 00 00 nop struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2007610: 40 00 05 d7 call 2008d6c <_TOD_Get_as_timestamp> 2007614: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007618: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 200761c: 94 10 20 00 clr %o2 2007620: 90 10 00 1c mov %i4, %o0 2007624: 92 10 00 1d mov %i5, %o1 2007628: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 200762c: 40 00 48 d0 call 201996c <__divdi3> 2007630: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007634: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007638: d2 26 60 6c st %o1, [ %i1 + 0x6c ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 200763c: 94 10 20 00 clr %o2 2007640: 92 10 00 1d mov %i5, %o1 2007644: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007648: 40 00 49 af call 2019d04 <__moddi3> 200764c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2007650: 82 10 20 03 mov 3, %g1 2007654: d2 26 60 70 st %o1, [ %i1 + 0x70 ] /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 2007658: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 200765c: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 2007660: 40 00 17 0f call 200d29c 2007664: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 2007668: c0 26 60 68 clr [ %i1 + 0x68 ] 200766c: 81 c7 e0 08 ret 2007670: 81 e8 00 00 restore =============================================================================== 0200eff0 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 200eff0: 9d e3 bf 68 save %sp, -152, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 200eff4: 98 10 20 01 mov 1, %o4 200eff8: 90 10 00 18 mov %i0, %o0 200effc: 92 10 00 19 mov %i1, %o1 200f000: 94 07 bf f4 add %fp, -12, %o2 200f004: 40 00 00 2e call 200f0bc <_POSIX_signals_Clear_signals> 200f008: 96 10 00 1a mov %i2, %o3 200f00c: 80 8a 20 ff btst 0xff, %o0 200f010: 02 80 00 28 be 200f0b0 <_POSIX_signals_Check_signal+0xc0> 200f014: 82 10 20 00 clr %g1 #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 200f018: 85 2e 60 02 sll %i1, 2, %g2 200f01c: 35 00 80 78 sethi %hi(0x201e000), %i2 200f020: b7 2e 60 04 sll %i1, 4, %i3 200f024: b4 16 a1 b0 or %i2, 0x1b0, %i2 200f028: b6 26 c0 02 sub %i3, %g2, %i3 200f02c: 84 06 80 1b add %i2, %i3, %g2 200f030: fa 00 a0 08 ld [ %g2 + 8 ], %i5 200f034: 80 a7 60 01 cmp %i5, 1 200f038: 02 80 00 1e be 200f0b0 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN 200f03c: 90 07 bf cc add %fp, -52, %o0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 200f040: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 200f044: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200f048: 82 10 40 1c or %g1, %i4, %g1 200f04c: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ] /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 200f050: 03 00 80 78 sethi %hi(0x201e000), %g1 200f054: d2 00 61 5c ld [ %g1 + 0x15c ], %o1 ! 201e15c <_Per_CPU_Information+0xc> 200f058: 94 10 20 28 mov 0x28, %o2 200f05c: 40 00 04 62 call 20101e4 200f060: 92 02 60 20 add %o1, 0x20, %o1 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 200f064: c2 06 80 1b ld [ %i2 + %i3 ], %g1 200f068: 80 a0 60 02 cmp %g1, 2 200f06c: 12 80 00 07 bne 200f088 <_POSIX_signals_Check_signal+0x98> 200f070: 90 10 00 19 mov %i1, %o0 case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 200f074: 92 07 bf f4 add %fp, -12, %o1 200f078: 9f c7 40 00 call %i5 200f07c: 94 10 20 00 clr %o2 signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 200f080: 10 80 00 05 b 200f094 <_POSIX_signals_Check_signal+0xa4> 200f084: 03 00 80 78 sethi %hi(0x201e000), %g1 default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 200f088: 9f c7 40 00 call %i5 200f08c: 01 00 00 00 nop } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 200f090: 03 00 80 78 sethi %hi(0x201e000), %g1 200f094: d0 00 61 5c ld [ %g1 + 0x15c ], %o0 ! 201e15c <_Per_CPU_Information+0xc> 200f098: 92 07 bf cc add %fp, -52, %o1 200f09c: 90 02 20 20 add %o0, 0x20, %o0 200f0a0: 40 00 04 51 call 20101e4 200f0a4: 94 10 20 28 mov 0x28, %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 200f0a8: 82 10 20 01 mov 1, %g1 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 200f0ac: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ] return true; } 200f0b0: b0 08 60 01 and %g1, 1, %i0 200f0b4: 81 c7 e0 08 ret 200f0b8: 81 e8 00 00 restore =============================================================================== 0200f7d0 <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 200f7d0: 9d e3 bf a0 save %sp, -96, %sp clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 200f7d4: 7f ff cb 86 call 20025ec 200f7d8: 01 00 00 00 nop if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200f7dc: 85 2e 20 04 sll %i0, 4, %g2 200f7e0: 83 2e 20 02 sll %i0, 2, %g1 200f7e4: 82 20 80 01 sub %g2, %g1, %g1 200f7e8: 05 00 80 78 sethi %hi(0x201e000), %g2 200f7ec: 84 10 a1 b0 or %g2, 0x1b0, %g2 ! 201e1b0 <_POSIX_signals_Vectors> 200f7f0: c4 00 80 01 ld [ %g2 + %g1 ], %g2 200f7f4: 80 a0 a0 02 cmp %g2, 2 200f7f8: 12 80 00 0a bne 200f820 <_POSIX_signals_Clear_process_signals+0x50> 200f7fc: 84 10 20 01 mov 1, %g2 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200f800: 05 00 80 78 sethi %hi(0x201e000), %g2 200f804: 84 10 a3 a8 or %g2, 0x3a8, %g2 ! 201e3a8 <_POSIX_signals_Siginfo> 200f808: 86 00 40 02 add %g1, %g2, %g3 200f80c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200f810: 86 00 e0 04 add %g3, 4, %g3 200f814: 80 a0 40 03 cmp %g1, %g3 200f818: 12 80 00 08 bne 200f838 <_POSIX_signals_Clear_process_signals+0x68><== NEVER TAKEN 200f81c: 84 10 20 01 mov 1, %g2 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 200f820: 03 00 80 78 sethi %hi(0x201e000), %g1 200f824: b0 06 3f ff add %i0, -1, %i0 200f828: b1 28 80 18 sll %g2, %i0, %i0 200f82c: c4 00 63 a4 ld [ %g1 + 0x3a4 ], %g2 200f830: b0 28 80 18 andn %g2, %i0, %i0 200f834: f0 20 63 a4 st %i0, [ %g1 + 0x3a4 ] } _ISR_Enable( level ); 200f838: 7f ff cb 71 call 20025fc 200f83c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020083bc <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 20083bc: 82 10 20 1b mov 0x1b, %g1 20083c0: 84 10 20 01 mov 1, %g2 #include #include #include #include static int _POSIX_signals_Get_lowest( 20083c4: 86 00 7f ff add %g1, -1, %g3 20083c8: 87 28 80 03 sll %g2, %g3, %g3 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 20083cc: 80 88 c0 08 btst %g3, %o0 20083d0: 12 80 00 11 bne 2008414 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN 20083d4: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 20083d8: 82 00 60 01 inc %g1 20083dc: 80 a0 60 20 cmp %g1, 0x20 20083e0: 12 bf ff fa bne 20083c8 <_POSIX_signals_Get_lowest+0xc> 20083e4: 86 00 7f ff add %g1, -1, %g3 20083e8: 82 10 20 01 mov 1, %g1 20083ec: 84 10 20 01 mov 1, %g2 #include #include #include #include static int _POSIX_signals_Get_lowest( 20083f0: 86 00 7f ff add %g1, -1, %g3 20083f4: 87 28 80 03 sll %g2, %g3, %g3 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 20083f8: 80 88 c0 08 btst %g3, %o0 20083fc: 12 80 00 06 bne 2008414 <_POSIX_signals_Get_lowest+0x58> 2008400: 01 00 00 00 nop */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 2008404: 82 00 60 01 inc %g1 2008408: 80 a0 60 1b cmp %g1, 0x1b 200840c: 12 bf ff fa bne 20083f4 <_POSIX_signals_Get_lowest+0x38> <== ALWAYS TAKEN 2008410: 86 00 7f ff add %g1, -1, %g3 * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 2008414: 81 c3 e0 08 retl 2008418: 90 10 00 01 mov %g1, %o0 =============================================================================== 0201a778 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 201a778: 9d e3 bf a0 save %sp, -96, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201a77c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 201a780: 3b 04 00 20 sethi %hi(0x10008000), %i5 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 201a784: 84 06 7f ff add %i1, -1, %g2 201a788: 86 10 20 01 mov 1, %g3 201a78c: 9e 08 40 1d and %g1, %i5, %o7 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 201a790: 92 10 00 1a mov %i2, %o1 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 201a794: c8 06 21 5c ld [ %i0 + 0x15c ], %g4 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 201a798: 80 a3 c0 1d cmp %o7, %i5 201a79c: 12 80 00 1c bne 201a80c <_POSIX_signals_Unblock_thread+0x94> 201a7a0: 85 28 c0 02 sll %g3, %g2, %g2 if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 201a7a4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 201a7a8: 80 88 80 01 btst %g2, %g1 201a7ac: 12 80 00 07 bne 201a7c8 <_POSIX_signals_Unblock_thread+0x50> 201a7b0: 82 10 20 04 mov 4, %g1 201a7b4: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 201a7b8: 80 a8 80 01 andncc %g2, %g1, %g0 201a7bc: 02 80 00 3f be 201a8b8 <_POSIX_signals_Unblock_thread+0x140> 201a7c0: ba 10 20 00 clr %i5 the_thread->Wait.return_code = EINTR; 201a7c4: 82 10 20 04 mov 4, %g1 201a7c8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 201a7cc: 80 a2 60 00 cmp %o1, 0 201a7d0: 12 80 00 07 bne 201a7ec <_POSIX_signals_Unblock_thread+0x74> 201a7d4: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 201a7d8: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 201a7dc: f2 22 00 00 st %i1, [ %o0 ] the_info->si_code = SI_USER; 201a7e0: c2 22 20 04 st %g1, [ %o0 + 4 ] the_info->si_value.sival_int = 0; 201a7e4: 10 80 00 04 b 201a7f4 <_POSIX_signals_Unblock_thread+0x7c> 201a7e8: c0 22 20 08 clr [ %o0 + 8 ] } else { *the_info = *info; 201a7ec: 7f ff d6 7e call 20101e4 201a7f0: 94 10 20 0c mov 0xc, %o2 } _Thread_queue_Extract_with_proxy( the_thread ); 201a7f4: 90 10 00 18 mov %i0, %o0 201a7f8: 7f ff c0 30 call 200a8b8 <_Thread_queue_Extract_with_proxy> 201a7fc: ba 10 20 01 mov 1, %i5 201a800: b0 0f 60 01 and %i5, 1, %i0 201a804: 81 c7 e0 08 ret 201a808: 81 e8 00 00 restore } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 201a80c: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4 201a810: 80 a8 80 04 andncc %g2, %g4, %g0 201a814: 02 80 00 29 be 201a8b8 <_POSIX_signals_Unblock_thread+0x140> 201a818: ba 10 20 00 clr %i5 * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 201a81c: 05 04 00 00 sethi %hi(0x10000000), %g2 201a820: 80 88 40 02 btst %g1, %g2 201a824: 02 80 00 19 be 201a888 <_POSIX_signals_Unblock_thread+0x110> 201a828: 80 a0 60 00 cmp %g1, 0 the_thread->Wait.return_code = EINTR; 201a82c: 84 10 20 04 mov 4, %g2 201a830: c4 26 20 34 st %g2, [ %i0 + 0x34 ] /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 201a834: 05 00 00 ef sethi %hi(0x3bc00), %g2 201a838: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 201a83c: 80 88 40 02 btst %g1, %g2 201a840: 02 80 00 07 be 201a85c <_POSIX_signals_Unblock_thread+0xe4> 201a844: 80 88 60 08 btst 8, %g1 _Thread_queue_Extract_with_proxy( the_thread ); 201a848: 7f ff c0 1c call 200a8b8 <_Thread_queue_Extract_with_proxy> 201a84c: 90 10 00 18 mov %i0, %o0 201a850: b0 0f 60 01 and %i5, 1, %i0 201a854: 81 c7 e0 08 ret 201a858: 81 e8 00 00 restore else if ( _States_Is_delaying(the_thread->current_state) ) { 201a85c: 22 80 00 18 be,a 201a8bc <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 201a860: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 201a864: 7f ff c1 e3 call 200aff0 <_Watchdog_Remove> 201a868: 90 06 20 48 add %i0, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 201a86c: 90 10 00 18 mov %i0, %o0 201a870: 13 04 00 ff sethi %hi(0x1003fc00), %o1 201a874: 7f ff bd 64 call 2009e04 <_Thread_Clear_state> 201a878: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 201a87c: b0 0f 60 01 and %i5, 1, %i0 201a880: 81 c7 e0 08 ret 201a884: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 201a888: 32 80 00 0d bne,a 201a8bc <_POSIX_signals_Unblock_thread+0x144><== NEVER TAKEN 201a88c: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 201a890: 03 00 80 78 sethi %hi(0x201e000), %g1 201a894: 82 10 61 50 or %g1, 0x150, %g1 ! 201e150 <_Per_CPU_Information> 201a898: c4 00 60 08 ld [ %g1 + 8 ], %g2 201a89c: 80 a0 a0 00 cmp %g2, 0 201a8a0: 22 80 00 07 be,a 201a8bc <_POSIX_signals_Unblock_thread+0x144> 201a8a4: b0 0f 60 01 and %i5, 1, %i0 201a8a8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 201a8ac: 80 a6 00 02 cmp %i0, %g2 201a8b0: 22 80 00 02 be,a 201a8b8 <_POSIX_signals_Unblock_thread+0x140><== ALWAYS TAKEN 201a8b4: c6 28 60 18 stb %g3, [ %g1 + 0x18 ] _Thread_Dispatch_necessary = true; } } return false; } 201a8b8: b0 0f 60 01 and %i5, 1, %i0 201a8bc: 81 c7 e0 08 ret 201a8c0: 81 e8 00 00 restore =============================================================================== 0200a324 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a324: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200a328: 80 a6 60 00 cmp %i1, 0 200a32c: 02 80 00 73 be 200a4f8 <_RBTree_Extract_unprotected+0x1d4> 200a330: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200a334: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a338: 80 a6 40 01 cmp %i1, %g1 200a33c: 32 80 00 0d bne,a 200a370 <_RBTree_Extract_unprotected+0x4c> 200a340: c2 06 20 0c ld [ %i0 + 0xc ], %g1 if (the_node->child[RBT_RIGHT]) 200a344: c2 06 60 08 ld [ %i1 + 8 ], %g1 200a348: 80 a0 60 00 cmp %g1, 0 200a34c: 22 80 00 04 be,a 200a35c <_RBTree_Extract_unprotected+0x38> 200a350: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200a354: 10 80 00 06 b 200a36c <_RBTree_Extract_unprotected+0x48> 200a358: 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, 200a35c: 80 a6 00 01 cmp %i0, %g1 200a360: 12 80 00 03 bne 200a36c <_RBTree_Extract_unprotected+0x48> 200a364: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200a368: 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]) { 200a36c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a370: 80 a6 40 01 cmp %i1, %g1 200a374: 12 80 00 0b bne 200a3a0 <_RBTree_Extract_unprotected+0x7c> 200a378: c2 06 60 04 ld [ %i1 + 4 ], %g1 if (the_node->child[RBT_LEFT]) 200a37c: 80 a0 60 00 cmp %g1, 0 200a380: 22 80 00 04 be,a 200a390 <_RBTree_Extract_unprotected+0x6c> 200a384: c4 06 40 00 ld [ %i1 ], %g2 the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 200a388: 10 80 00 06 b 200a3a0 <_RBTree_Extract_unprotected+0x7c> 200a38c: 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, 200a390: 80 a6 00 02 cmp %i0, %g2 200a394: 12 80 00 03 bne 200a3a0 <_RBTree_Extract_unprotected+0x7c> 200a398: c4 26 20 0c st %g2, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200a39c: 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]) { 200a3a0: ba 90 60 00 orcc %g1, 0, %i5 200a3a4: 02 80 00 36 be 200a47c <_RBTree_Extract_unprotected+0x158> 200a3a8: f8 06 60 08 ld [ %i1 + 8 ], %i4 200a3ac: 80 a7 20 00 cmp %i4, 0 200a3b0: 32 80 00 05 bne,a 200a3c4 <_RBTree_Extract_unprotected+0xa0> 200a3b4: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a3b8: 10 80 00 35 b 200a48c <_RBTree_Extract_unprotected+0x168> 200a3bc: 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]; 200a3c0: c2 07 60 08 ld [ %i5 + 8 ], %g1 200a3c4: 80 a0 60 00 cmp %g1, 0 200a3c8: 32 bf ff fe bne,a 200a3c0 <_RBTree_Extract_unprotected+0x9c> 200a3cc: 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]; 200a3d0: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200a3d4: 80 a7 20 00 cmp %i4, 0 200a3d8: 02 80 00 05 be 200a3ec <_RBTree_Extract_unprotected+0xc8> 200a3dc: 01 00 00 00 nop leaf->parent = target->parent; 200a3e0: c2 07 40 00 ld [ %i5 ], %g1 200a3e4: 10 80 00 04 b 200a3f4 <_RBTree_Extract_unprotected+0xd0> 200a3e8: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200a3ec: 7f ff ff 55 call 200a140 <_RBTree_Extract_validate_unprotected> 200a3f0: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200a3f4: 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; 200a3f8: c2 07 60 0c ld [ %i5 + 0xc ], %g1 dir = target != target->parent->child[0]; 200a3fc: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a400: 86 1f 40 03 xor %i5, %g3, %g3 200a404: 80 a0 00 03 cmp %g0, %g3 200a408: 86 40 20 00 addx %g0, 0, %g3 target->parent->child[dir] = leaf; 200a40c: 87 28 e0 02 sll %g3, 2, %g3 200a410: 84 00 80 03 add %g2, %g3, %g2 200a414: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200a418: c4 06 40 00 ld [ %i1 ], %g2 200a41c: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a420: 86 1e 40 03 xor %i1, %g3, %g3 200a424: 80 a0 00 03 cmp %g0, %g3 200a428: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = target; 200a42c: 87 28 e0 02 sll %g3, 2, %g3 200a430: 84 00 80 03 add %g2, %g3, %g2 200a434: 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]; 200a438: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a43c: c4 27 60 08 st %g2, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200a440: c4 06 60 08 ld [ %i1 + 8 ], %g2 200a444: 80 a0 a0 00 cmp %g2, 0 200a448: 32 80 00 02 bne,a 200a450 <_RBTree_Extract_unprotected+0x12c><== ALWAYS TAKEN 200a44c: fa 20 80 00 st %i5, [ %g2 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200a450: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a454: c4 27 60 04 st %g2, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200a458: c4 06 60 04 ld [ %i1 + 4 ], %g2 200a45c: 80 a0 a0 00 cmp %g2, 0 200a460: 32 80 00 02 bne,a 200a468 <_RBTree_Extract_unprotected+0x144> 200a464: 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; 200a468: c4 06 40 00 ld [ %i1 ], %g2 200a46c: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200a470: c4 06 60 0c ld [ %i1 + 0xc ], %g2 200a474: 10 80 00 14 b 200a4c4 <_RBTree_Extract_unprotected+0x1a0> 200a478: 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 ) { 200a47c: 80 a7 20 00 cmp %i4, 0 200a480: 32 80 00 04 bne,a 200a490 <_RBTree_Extract_unprotected+0x16c> 200a484: c2 06 40 00 ld [ %i1 ], %g1 200a488: 30 80 00 04 b,a 200a498 <_RBTree_Extract_unprotected+0x174> leaf->parent = the_node->parent; 200a48c: c2 06 40 00 ld [ %i1 ], %g1 200a490: 10 80 00 04 b 200a4a0 <_RBTree_Extract_unprotected+0x17c> 200a494: 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); 200a498: 7f ff ff 2a call 200a140 <_RBTree_Extract_validate_unprotected> 200a49c: 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]; 200a4a0: 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; 200a4a4: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200a4a8: c6 00 a0 04 ld [ %g2 + 4 ], %g3 200a4ac: 86 1e 40 03 xor %i1, %g3, %g3 200a4b0: 80 a0 00 03 cmp %g0, %g3 200a4b4: 86 40 20 00 addx %g0, 0, %g3 the_node->parent->child[dir] = leaf; 200a4b8: 87 28 e0 02 sll %g3, 2, %g3 200a4bc: 84 00 80 03 add %g2, %g3, %g2 200a4c0: 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 */ 200a4c4: 80 a0 60 00 cmp %g1, 0 200a4c8: 32 80 00 06 bne,a 200a4e0 <_RBTree_Extract_unprotected+0x1bc> 200a4cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200a4d0: 80 a7 20 00 cmp %i4, 0 200a4d4: 32 80 00 02 bne,a 200a4dc <_RBTree_Extract_unprotected+0x1b8> 200a4d8: 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; 200a4dc: 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; 200a4e0: c0 26 60 08 clr [ %i1 + 8 ] 200a4e4: c0 26 60 04 clr [ %i1 + 4 ] 200a4e8: 80 a0 60 00 cmp %g1, 0 200a4ec: 02 80 00 03 be 200a4f8 <_RBTree_Extract_unprotected+0x1d4> 200a4f0: c0 26 40 00 clr [ %i1 ] 200a4f4: c0 20 60 0c clr [ %g1 + 0xc ] 200a4f8: 81 c7 e0 08 ret 200a4fc: 81 e8 00 00 restore =============================================================================== 0200a140 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200a140: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200a144: fa 06 00 00 ld [ %i0 ], %i5 if(!parent->parent) return; 200a148: c2 07 40 00 ld [ %i5 ], %g1 200a14c: 80 a0 60 00 cmp %g1, 0 200a150: 02 80 00 6c be 200a300 <_RBTree_Extract_validate_unprotected+0x1c0> 200a154: 90 10 00 18 mov %i0, %o0 sibling = _RBTree_Sibling(the_node); 200a158: 7f ff ff ca call 200a080 <_RBTree_Sibling> 200a15c: 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) { 200a160: 10 80 00 5b b 200a2cc <_RBTree_Extract_validate_unprotected+0x18c> 200a164: 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); 200a168: 22 80 00 14 be,a 200a1b8 <_RBTree_Extract_validate_unprotected+0x78><== NEVER TAKEN 200a16c: c4 02 20 08 ld [ %o0 + 8 ], %g2 <== NOT EXECUTED 200a170: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a174: 80 a0 60 01 cmp %g1, 1 200a178: 32 80 00 10 bne,a 200a1b8 <_RBTree_Extract_validate_unprotected+0x78> 200a17c: 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; 200a180: c2 27 60 0c st %g1, [ %i5 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200a184: 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; 200a188: c0 22 20 0c clr [ %o0 + 0xc ] dir = the_node != parent->child[0]; 200a18c: 82 1e 00 01 xor %i0, %g1, %g1 200a190: 80 a0 00 01 cmp %g0, %g1 _RBTree_Rotate(parent, dir); 200a194: 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]; 200a198: b8 40 20 00 addx %g0, 0, %i4 _RBTree_Rotate(parent, dir); 200a19c: 7f ff ff ca call 200a0c4 <_RBTree_Rotate> 200a1a0: 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); 200a1a4: b8 1f 20 01 xor %i4, 1, %i4 sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a1a8: b9 2f 20 02 sll %i4, 2, %i4 200a1ac: b8 07 40 1c add %i5, %i4, %i4 200a1b0: 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]) && 200a1b4: 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); 200a1b8: 80 a0 a0 00 cmp %g2, 0 200a1bc: 02 80 00 06 be 200a1d4 <_RBTree_Extract_validate_unprotected+0x94> 200a1c0: 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( 200a1c4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a1c8: 82 18 60 01 xor %g1, 1, %g1 200a1cc: 80 a0 00 01 cmp %g0, %g1 200a1d0: 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]) && 200a1d4: 80 a0 60 00 cmp %g1, 0 200a1d8: 32 80 00 14 bne,a 200a228 <_RBTree_Extract_validate_unprotected+0xe8> 200a1dc: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200a1e0: c4 02 20 04 ld [ %o0 + 4 ], %g2 200a1e4: 80 a0 a0 00 cmp %g2, 0 200a1e8: 02 80 00 07 be 200a204 <_RBTree_Extract_validate_unprotected+0xc4> 200a1ec: 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( 200a1f0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a1f4: 82 18 60 01 xor %g1, 1, %g1 200a1f8: 80 a0 00 01 cmp %g0, %g1 200a1fc: 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]) && 200a200: 80 a0 60 00 cmp %g1, 0 200a204: 32 80 00 09 bne,a 200a228 <_RBTree_Extract_validate_unprotected+0xe8> 200a208: c2 07 60 04 ld [ %i5 + 4 ], %g1 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 200a20c: f6 22 20 0c st %i3, [ %o0 + 0xc ] 200a210: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200a214: 80 a0 60 01 cmp %g1, 1 200a218: 32 80 00 3c bne,a 200a308 <_RBTree_Extract_validate_unprotected+0x1c8> 200a21c: f4 07 40 00 ld [ %i5 ], %i2 if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; 200a220: 10 80 00 32 b 200a2e8 <_RBTree_Extract_validate_unprotected+0x1a8> 200a224: 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]; 200a228: 82 1e 00 01 xor %i0, %g1, %g1 200a22c: 80 a0 00 01 cmp %g0, %g1 200a230: 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); 200a234: b8 1e e0 01 xor %i3, 1, %i4 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 200a238: 83 2f 20 02 sll %i4, 2, %g1 200a23c: 82 02 00 01 add %o0, %g1, %g1 200a240: 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); 200a244: 80 a0 a0 00 cmp %g2, 0 200a248: 02 80 00 06 be 200a260 <_RBTree_Extract_validate_unprotected+0x120> 200a24c: 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( 200a250: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a254: 82 18 60 01 xor %g1, 1, %g1 200a258: 80 a0 00 01 cmp %g0, %g1 200a25c: 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)])) { 200a260: 80 a0 60 00 cmp %g1, 0 200a264: 32 80 00 0e bne,a 200a29c <_RBTree_Extract_validate_unprotected+0x15c> 200a268: c2 07 60 0c ld [ %i5 + 0xc ], %g1 sibling->color = RBT_RED; 200a26c: 82 10 20 01 mov 1, %g1 200a270: c2 22 20 0c st %g1, [ %o0 + 0xc ] sibling->child[dir]->color = RBT_BLACK; 200a274: 83 2e e0 02 sll %i3, 2, %g1 200a278: 82 02 00 01 add %o0, %g1, %g1 200a27c: c2 00 60 04 ld [ %g1 + 4 ], %g1 _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); 200a280: 92 10 00 1c mov %i4, %o1 200a284: 7f ff ff 90 call 200a0c4 <_RBTree_Rotate> 200a288: c0 20 60 0c clr [ %g1 + 0xc ] sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a28c: 83 2f 20 02 sll %i4, 2, %g1 200a290: 82 07 40 01 add %i5, %g1, %g1 200a294: d0 00 60 04 ld [ %g1 + 4 ], %o0 } sibling->color = parent->color; 200a298: c2 07 60 0c ld [ %i5 + 0xc ], %g1 parent->color = RBT_BLACK; sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a29c: 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; 200a2a0: c2 22 20 0c st %g1, [ %o0 + 0xc ] parent->color = RBT_BLACK; sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a2a4: 90 02 00 1c add %o0, %i4, %o0 200a2a8: 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; 200a2ac: c0 27 60 0c clr [ %i5 + 0xc ] sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 200a2b0: c0 20 60 0c clr [ %g1 + 0xc ] _RBTree_Rotate(parent, dir); 200a2b4: 90 10 00 1d mov %i5, %o0 200a2b8: 7f ff ff 83 call 200a0c4 <_RBTree_Rotate> 200a2bc: 92 10 00 1b mov %i3, %o1 break; /* done */ 200a2c0: 10 80 00 0b b 200a2ec <_RBTree_Extract_validate_unprotected+0x1ac> 200a2c4: 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) { 200a2c8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200a2cc: 80 a0 60 01 cmp %g1, 1 200a2d0: 22 80 00 07 be,a 200a2ec <_RBTree_Extract_validate_unprotected+0x1ac> 200a2d4: c2 06 00 00 ld [ %i0 ], %g1 200a2d8: c2 07 40 00 ld [ %i5 ], %g1 200a2dc: 80 a0 60 00 cmp %g1, 0 200a2e0: 12 bf ff a2 bne 200a168 <_RBTree_Extract_validate_unprotected+0x28> 200a2e4: 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; 200a2e8: c2 06 00 00 ld [ %i0 ], %g1 200a2ec: c2 00 40 00 ld [ %g1 ], %g1 200a2f0: 80 a0 60 00 cmp %g1, 0 200a2f4: 12 80 00 0a bne 200a31c <_RBTree_Extract_validate_unprotected+0x1dc> 200a2f8: 01 00 00 00 nop 200a2fc: c0 26 20 0c clr [ %i0 + 0xc ] 200a300: 81 c7 e0 08 ret 200a304: 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); 200a308: 90 10 00 1d mov %i5, %o0 200a30c: 7f ff ff 5d call 200a080 <_RBTree_Sibling> 200a310: b0 10 00 1d mov %i5, %i0 200a314: 10 bf ff ed b 200a2c8 <_RBTree_Extract_validate_unprotected+0x188> 200a318: ba 10 00 1a mov %i2, %i5 200a31c: 81 c7 e0 08 ret 200a320: 81 e8 00 00 restore =============================================================================== 0200b4e0 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200b4e0: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200b4e4: 80 a6 20 00 cmp %i0, 0 200b4e8: 02 80 00 10 be 200b528 <_RBTree_Initialize+0x48> <== NEVER TAKEN 200b4ec: 01 00 00 00 nop RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200b4f0: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200b4f4: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200b4f8: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200b4fc: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200b500: 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-- ) { 200b504: 10 80 00 06 b 200b51c <_RBTree_Initialize+0x3c> 200b508: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 200b50c: 90 10 00 18 mov %i0, %o0 200b510: 7f ff ff ba call 200b3f8 <_RBTree_Insert> 200b514: b4 06 80 1c add %i2, %i4, %i2 * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 200b518: 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-- ) { 200b51c: 80 a6 e0 00 cmp %i3, 0 200b520: 12 bf ff fb bne 200b50c <_RBTree_Initialize+0x2c> 200b524: 92 10 00 1a mov %i2, %o1 200b528: 81 c7 e0 08 ret 200b52c: 81 e8 00 00 restore =============================================================================== 0200a5a0 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a5a0: 9d e3 bf a0 save %sp, -96, %sp 200a5a4: ba 10 00 18 mov %i0, %i5 if(!the_node) return (RBTree_Node*)-1; 200a5a8: 80 a6 60 00 cmp %i1, 0 200a5ac: 02 80 00 0d be 200a5e0 <_RBTree_Insert_unprotected+0x40> 200a5b0: b0 10 3f ff mov -1, %i0 RBTree_Node *iter_node = the_rbtree->root; 200a5b4: f0 07 60 04 ld [ %i5 + 4 ], %i0 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200a5b8: b8 96 20 00 orcc %i0, 0, %i4 200a5bc: 32 80 00 22 bne,a 200a644 <_RBTree_Insert_unprotected+0xa4> 200a5c0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200a5c4: c0 26 60 0c clr [ %i1 + 0xc ] the_rbtree->root = the_node; 200a5c8: f2 27 60 04 st %i1, [ %i5 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200a5cc: f2 27 60 0c st %i1, [ %i5 + 0xc ] 200a5d0: f2 27 60 08 st %i1, [ %i5 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200a5d4: fa 26 40 00 st %i5, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a5d8: c0 26 60 08 clr [ %i1 + 8 ] 200a5dc: c0 26 60 04 clr [ %i1 + 4 ] 200a5e0: 81 c7 e0 08 ret 200a5e4: 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 ) ) 200a5e8: 02 bf ff fe be 200a5e0 <_RBTree_Insert_unprotected+0x40> 200a5ec: 82 38 00 08 xnor %g0, %o0, %g1 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a5f0: 83 30 60 1f srl %g1, 0x1f, %g1 if (!iter_node->child[dir]) { 200a5f4: 85 28 60 02 sll %g1, 2, %g2 200a5f8: 84 06 00 02 add %i0, %g2, %g2 200a5fc: f0 00 a0 04 ld [ %g2 + 4 ], %i0 200a600: 80 a6 20 00 cmp %i0, 0 200a604: 32 80 00 0f bne,a 200a640 <_RBTree_Insert_unprotected+0xa0> 200a608: b8 10 00 18 mov %i0, %i4 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200a60c: c0 26 60 08 clr [ %i1 + 8 ] 200a610: c0 26 60 04 clr [ %i1 + 4 ] the_node->color = RBT_RED; iter_node->child[dir] = the_node; 200a614: 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]; 200a618: 82 00 60 02 add %g1, 2, %g1 200a61c: 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)) { 200a620: 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; 200a624: 86 10 20 01 mov 1, %g3 iter_node->child[dir] = the_node; the_node->parent = iter_node; 200a628: f8 26 40 00 st %i4, [ %i1 ] /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200a62c: 80 a7 00 02 cmp %i4, %g2 200a630: 12 80 00 2d bne 200a6e4 <_RBTree_Insert_unprotected+0x144> 200a634: c6 26 60 0c st %g3, [ %i1 + 0xc ] the_rbtree->first[dir] = the_node; 200a638: 10 80 00 2b b 200a6e4 <_RBTree_Insert_unprotected+0x144> 200a63c: 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); 200a640: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a644: 90 10 00 19 mov %i1, %o0 200a648: 9f c0 40 00 call %g1 200a64c: 92 10 00 18 mov %i0, %o1 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200a650: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1 200a654: 80 a0 60 00 cmp %g1, 0 200a658: 12 bf ff e4 bne 200a5e8 <_RBTree_Insert_unprotected+0x48> 200a65c: 80 a2 20 00 cmp %o0, 0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200a660: 10 bf ff e4 b 200a5f0 <_RBTree_Insert_unprotected+0x50> 200a664: 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; 200a668: 80 a0 60 00 cmp %g1, 0 200a66c: 02 80 00 2c be 200a71c <_RBTree_Insert_unprotected+0x17c> <== NEVER TAKEN 200a670: 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]) 200a674: 80 a2 00 01 cmp %o0, %g1 200a678: 22 80 00 02 be,a 200a680 <_RBTree_Insert_unprotected+0xe0> 200a67c: 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); 200a680: 80 a0 60 00 cmp %g1, 0 200a684: 22 80 00 26 be,a 200a71c <_RBTree_Insert_unprotected+0x17c> 200a688: c2 07 60 04 ld [ %i5 + 4 ], %g1 200a68c: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a690: 80 a0 a0 01 cmp %g2, 1 200a694: 32 80 00 22 bne,a 200a71c <_RBTree_Insert_unprotected+0x17c> 200a698: 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; 200a69c: c0 22 20 0c clr [ %o0 + 0xc ] u->color = RBT_BLACK; 200a6a0: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a6a4: c4 27 60 0c st %g2, [ %i5 + 0xc ] 200a6a8: 10 80 00 10 b 200a6e8 <_RBTree_Insert_unprotected+0x148> 200a6ac: 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); 200a6b0: 7f ff ff 9d call 200a524 <_RBTree_Rotate> 200a6b4: 92 10 00 1c mov %i4, %o1 the_node = the_node->child[pdir]; 200a6b8: 83 2f 20 02 sll %i4, 2, %g1 200a6bc: b2 06 40 01 add %i1, %g1, %i1 200a6c0: f2 06 60 04 ld [ %i1 + 4 ], %i1 } the_node->parent->color = RBT_BLACK; 200a6c4: 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)); 200a6c8: 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; 200a6cc: c0 20 60 0c clr [ %g1 + 0xc ] g->color = RBT_RED; 200a6d0: f6 27 60 0c st %i3, [ %i5 + 0xc ] /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200a6d4: 7f ff ff 94 call 200a524 <_RBTree_Rotate> 200a6d8: 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; 200a6dc: 10 80 00 04 b 200a6ec <_RBTree_Insert_unprotected+0x14c> 200a6e0: 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; 200a6e4: b6 10 20 01 mov 1, %i3 200a6e8: d0 06 40 00 ld [ %i1 ], %o0 200a6ec: fa 02 00 00 ld [ %o0 ], %i5 200a6f0: 80 a7 60 00 cmp %i5, 0 200a6f4: 22 bf ff bb be,a 200a5e0 <_RBTree_Insert_unprotected+0x40> 200a6f8: 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); 200a6fc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 200a700: 80 a0 60 01 cmp %g1, 1 200a704: 12 80 00 04 bne 200a714 <_RBTree_Insert_unprotected+0x174> 200a708: 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; 200a70c: 10 bf ff d7 b 200a668 <_RBTree_Insert_unprotected+0xc8> 200a710: c2 07 40 00 ld [ %i5 ], %g1 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200a714: 81 c7 e0 08 ret 200a718: 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]; 200a71c: 82 1a 00 01 xor %o0, %g1, %g1 200a720: 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]; 200a724: c2 02 20 04 ld [ %o0 + 4 ], %g1 RBTree_Direction pdir = the_node->parent != g->child[0]; 200a728: 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]; 200a72c: 82 1e 40 01 xor %i1, %g1, %g1 200a730: 80 a0 00 01 cmp %g0, %g1 200a734: 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) { 200a738: 80 a0 40 1c cmp %g1, %i4 200a73c: 12 bf ff dd bne 200a6b0 <_RBTree_Insert_unprotected+0x110> 200a740: 01 00 00 00 nop _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 200a744: 10 bf ff e1 b 200a6c8 <_RBTree_Insert_unprotected+0x128> 200a748: c2 06 40 00 ld [ %i1 ], %g1 =============================================================================== 0200a760 <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200a760: 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); 200a764: 80 a0 00 19 cmp %g0, %i1 200a768: 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]; 200a76c: 82 00 60 02 add %g1, 2, %g1 200a770: 83 28 60 02 sll %g1, 2, %g1 200a774: 10 80 00 0d b 200a7a8 <_RBTree_Iterate_unprotected+0x48> 200a778: 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 ); 200a77c: 92 10 00 19 mov %i1, %o1 200a780: 9f c6 80 00 call %i2 200a784: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200a788: 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 ); 200a78c: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200a790: 94 10 00 19 mov %i1, %o2 200a794: 40 00 00 0a call 200a7bc <_RBTree_Next_unprotected> 200a798: 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 ) { 200a79c: 80 8f 20 ff btst 0xff, %i4 200a7a0: 12 80 00 05 bne 200a7b4 <_RBTree_Iterate_unprotected+0x54><== NEVER TAKEN 200a7a4: ba 10 00 08 mov %o0, %i5 200a7a8: 80 a7 60 00 cmp %i5, 0 200a7ac: 12 bf ff f4 bne 200a77c <_RBTree_Iterate_unprotected+0x1c> 200a7b0: 90 10 00 1d mov %i5, %o0 200a7b4: 81 c7 e0 08 ret 200a7b8: 81 e8 00 00 restore =============================================================================== 0200a080 <_RBTree_Sibling>: */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 200a080: 80 a2 20 00 cmp %o0, 0 200a084: 02 80 00 0e be 200a0bc <_RBTree_Sibling+0x3c> 200a088: 82 10 20 00 clr %g1 if(!(the_node->parent)) return NULL; 200a08c: c4 02 00 00 ld [ %o0 ], %g2 200a090: 80 a0 a0 00 cmp %g2, 0 200a094: 02 80 00 0a be 200a0bc <_RBTree_Sibling+0x3c> <== NEVER TAKEN 200a098: 01 00 00 00 nop if(!(the_node->parent->parent)) return NULL; 200a09c: c6 00 80 00 ld [ %g2 ], %g3 200a0a0: 80 a0 e0 00 cmp %g3, 0 200a0a4: 02 80 00 06 be 200a0bc <_RBTree_Sibling+0x3c> 200a0a8: 01 00 00 00 nop if(the_node == the_node->parent->child[RBT_LEFT]) 200a0ac: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200a0b0: 80 a2 00 01 cmp %o0, %g1 200a0b4: 22 80 00 02 be,a 200a0bc <_RBTree_Sibling+0x3c> 200a0b8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 200a0bc: 81 c3 e0 08 retl 200a0c0: 90 10 00 01 mov %g1, %o0 =============================================================================== 0203e77c <_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 ) { 203e77c: 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; 203e780: 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 ); 203e784: 7f ff b1 8a call 202adac <_TOD_Get_uptime> 203e788: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 203e78c: c4 1e 20 50 ldd [ %i0 + 0x50 ], %g2 _Timestamp_Subtract( 203e790: 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; 203e794: 82 10 20 01 mov 1, %g1 203e798: 86 a3 40 03 subcc %o5, %g3, %g3 203e79c: 84 63 00 02 subx %o4, %g2, %g2 203e7a0: 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) { 203e7a4: 05 00 81 be sethi %hi(0x206f800), %g2 203e7a8: 84 10 a0 00 mov %g2, %g2 ! 206f800 <_Per_CPU_Information> 203e7ac: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 203e7b0: 80 a7 40 03 cmp %i5, %g3 203e7b4: 12 80 00 15 bne 203e808 <_Rate_monotonic_Get_status+0x8c> 203e7b8: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2 203e7bc: c4 18 a0 20 ldd [ %g2 + 0x20 ], %g2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 203e7c0: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0 203e7c4: 86 a3 40 03 subcc %o5, %g3, %g3 203e7c8: 84 63 00 02 subx %o4, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 203e7cc: 96 82 c0 03 addcc %o3, %g3, %o3 203e7d0: 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)) 203e7d4: 80 a6 00 0a cmp %i0, %o2 203e7d8: 34 80 00 0c bg,a 203e808 <_Rate_monotonic_Get_status+0x8c><== NEVER TAKEN 203e7dc: 82 10 20 00 clr %g1 <== NOT EXECUTED 203e7e0: 32 80 00 06 bne,a 203e7f8 <_Rate_monotonic_Get_status+0x7c> 203e7e4: 96 a2 c0 19 subcc %o3, %i1, %o3 203e7e8: 80 a6 40 0b cmp %i1, %o3 203e7ec: 18 80 00 06 bgu 203e804 <_Rate_monotonic_Get_status+0x88> 203e7f0: 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; 203e7f4: 82 10 20 01 mov 1, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 203e7f8: 94 62 80 18 subx %o2, %i0, %o2 203e7fc: 10 80 00 03 b 203e808 <_Rate_monotonic_Get_status+0x8c> 203e800: 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; 203e804: 82 10 20 00 clr %g1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 203e808: b0 08 60 01 and %g1, 1, %i0 203e80c: 81 c7 e0 08 ret 203e810: 81 e8 00 00 restore =============================================================================== 0203eb74 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 203eb74: 9d e3 bf 98 save %sp, -104, %sp 203eb78: 11 00 81 bf sethi %hi(0x206fc00), %o0 203eb7c: 92 10 00 18 mov %i0, %o1 203eb80: 90 12 22 70 or %o0, 0x270, %o0 203eb84: 7f ff 40 f4 call 200ef54 <_Objects_Get> 203eb88: 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 ) { 203eb8c: c2 07 bf fc ld [ %fp + -4 ], %g1 203eb90: 80 a0 60 00 cmp %g1, 0 203eb94: 12 80 00 25 bne 203ec28 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN 203eb98: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 203eb9c: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 203eba0: 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); 203eba4: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 203eba8: 80 88 80 01 btst %g2, %g1 203ebac: 22 80 00 0b be,a 203ebd8 <_Rate_monotonic_Timeout+0x64> 203ebb0: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 203ebb4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 203ebb8: c2 07 60 08 ld [ %i5 + 8 ], %g1 203ebbc: 80 a0 80 01 cmp %g2, %g1 203ebc0: 32 80 00 06 bne,a 203ebd8 <_Rate_monotonic_Timeout+0x64> 203ebc4: 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 ); 203ebc8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 203ebcc: 7f ff 43 c2 call 200fad4 <_Thread_Clear_state> 203ebd0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 203ebd4: 30 80 00 06 b,a 203ebec <_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 ) { 203ebd8: 80 a0 60 01 cmp %g1, 1 203ebdc: 12 80 00 0d bne 203ec10 <_Rate_monotonic_Timeout+0x9c> 203ebe0: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 203ebe4: 82 10 20 03 mov 3, %g1 203ebe8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 203ebec: 7f ff ff 53 call 203e938 <_Rate_monotonic_Initiate_statistics> 203ebf0: 90 10 00 1d mov %i5, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203ebf4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 203ebf8: 11 00 81 bc sethi %hi(0x206f000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 203ebfc: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 203ec00: 90 12 23 80 or %o0, 0x380, %o0 203ec04: 7f ff 47 d5 call 2010b58 <_Watchdog_Insert> 203ec08: 92 07 60 10 add %i5, 0x10, %o1 203ec0c: 30 80 00 02 b,a 203ec14 <_Rate_monotonic_Timeout+0xa0> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 203ec10: 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--; 203ec14: 03 00 81 bc sethi %hi(0x206f000), %g1 203ec18: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 206f2c0 <_Thread_Dispatch_disable_level> 203ec1c: 84 00 bf ff add %g2, -1, %g2 203ec20: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ] return _Thread_Dispatch_disable_level; 203ec24: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 203ec28: 81 c7 e0 08 ret 203ec2c: 81 e8 00 00 restore =============================================================================== 0203e814 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 203e814: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 203e818: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 203e81c: 82 00 60 01 inc %g1 203e820: c2 26 20 58 st %g1, [ %i0 + 0x58 ] if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 203e824: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 203e828: 80 a0 60 04 cmp %g1, 4 203e82c: 12 80 00 05 bne 203e840 <_Rate_monotonic_Update_statistics+0x2c> 203e830: 90 10 00 18 mov %i0, %o0 stats->missed_count++; 203e834: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 203e838: 82 00 60 01 inc %g1 203e83c: c2 26 20 5c st %g1, [ %i0 + 0x5c ] /* * Grab status for time statistics. */ valid_status = 203e840: 92 07 bf f8 add %fp, -8, %o1 203e844: 7f ff ff ce call 203e77c <_Rate_monotonic_Get_status> 203e848: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 203e84c: 80 8a 20 ff btst 0xff, %o0 203e850: 02 80 00 38 be 203e930 <_Rate_monotonic_Update_statistics+0x11c> 203e854: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 203e858: 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 ) ) 203e85c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 203e860: 9a 83 40 03 addcc %o5, %g3, %o5 203e864: 98 43 00 02 addx %o4, %g2, %o4 203e868: 80 a0 40 02 cmp %g1, %g2 203e86c: 14 80 00 09 bg 203e890 <_Rate_monotonic_Update_statistics+0x7c> 203e870: d8 3e 20 70 std %o4, [ %i0 + 0x70 ] 203e874: 80 a0 40 02 cmp %g1, %g2 203e878: 32 80 00 08 bne,a 203e898 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN 203e87c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 203e880: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 203e884: 80 a0 40 03 cmp %g1, %g3 203e888: 28 80 00 04 bleu,a 203e898 <_Rate_monotonic_Update_statistics+0x84> 203e88c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 203e890: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 203e894: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 203e898: 80 a0 40 02 cmp %g1, %g2 203e89c: 26 80 00 0a bl,a 203e8c4 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 203e8a0: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 203e8a4: 80 a0 40 02 cmp %g1, %g2 203e8a8: 32 80 00 08 bne,a 203e8c8 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 203e8ac: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED 203e8b0: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 203e8b4: 80 a0 40 03 cmp %g1, %g3 203e8b8: 3a 80 00 04 bcc,a 203e8c8 <_Rate_monotonic_Update_statistics+0xb4> 203e8bc: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 203e8c0: 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 ); 203e8c4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 203e8c8: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 203e8cc: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 203e8d0: 9a 83 40 03 addcc %o5, %g3, %o5 203e8d4: 98 43 00 02 addx %o4, %g2, %o4 203e8d8: 80 a0 40 02 cmp %g1, %g2 203e8dc: 14 80 00 09 bg 203e900 <_Rate_monotonic_Update_statistics+0xec> 203e8e0: d8 3e 20 88 std %o4, [ %i0 + 0x88 ] 203e8e4: 80 a0 40 02 cmp %g1, %g2 203e8e8: 32 80 00 08 bne,a 203e908 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN 203e8ec: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 203e8f0: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 203e8f4: 80 a0 40 03 cmp %g1, %g3 203e8f8: 28 80 00 04 bleu,a 203e908 <_Rate_monotonic_Update_statistics+0xf4> 203e8fc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; 203e900: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 203e904: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 203e908: 80 a0 40 02 cmp %g1, %g2 203e90c: 26 80 00 09 bl,a 203e930 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 203e910: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 203e914: 80 a0 40 02 cmp %g1, %g2 203e918: 12 80 00 06 bne 203e930 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN 203e91c: 01 00 00 00 nop 203e920: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 203e924: 80 a0 40 03 cmp %g1, %g3 203e928: 2a 80 00 02 bcs,a 203e930 <_Rate_monotonic_Update_statistics+0x11c> 203e92c: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 203e930: 81 c7 e0 08 ret 203e934: 81 e8 00 00 restore =============================================================================== 0200b4dc <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200b4dc: 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; 200b4e0: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200b4e4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b4e8: 80 a0 40 09 cmp %g1, %o1 200b4ec: 32 80 00 02 bne,a 200b4f4 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200b4f0: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200b4f4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200b4f8: 80 a0 40 09 cmp %g1, %o1 200b4fc: 02 80 00 04 be 200b50c <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200b500: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200b504: 40 00 01 90 call 200bb44 <_Thread_Change_priority> 200b508: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200b50c: f0 06 20 88 ld [ %i0 + 0x88 ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200b510: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b514: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200b518: 80 a0 a0 00 cmp %g2, 0 200b51c: 02 80 00 09 be 200b540 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200b520: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200b524: d0 00 40 00 ld [ %g1 ], %o0 200b528: 7f ff ff d7 call 200b484 <_Scheduler_CBS_Get_server_id> 200b52c: 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 ); 200b530: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200b534: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200b538: 9f c0 40 00 call %g1 200b53c: d0 07 bf fc ld [ %fp + -4 ], %o0 200b540: 81 c7 e0 08 ret 200b544: 81 e8 00 00 restore =============================================================================== 0200b0f8 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b0f8: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b0fc: 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 ) { 200b100: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b104: 80 a0 60 00 cmp %g1, 0 200b108: 04 80 00 1c ble 200b178 <_Scheduler_CBS_Create_server+0x80> 200b10c: b0 10 3f ee mov -18, %i0 200b110: c2 07 40 00 ld [ %i5 ], %g1 200b114: 80 a0 60 00 cmp %g1, 0 200b118: 04 80 00 18 ble 200b178 <_Scheduler_CBS_Create_server+0x80> 200b11c: 03 00 80 81 sethi %hi(0x2020400), %g1 params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b120: c6 00 61 48 ld [ %g1 + 0x148 ], %g3 ! 2020548 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list[i] ) 200b124: 03 00 80 86 sethi %hi(0x2021800), %g1 200b128: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 ! 2021828 <_Scheduler_CBS_Server_list> 200b12c: 10 80 00 15 b 200b180 <_Scheduler_CBS_Create_server+0x88> 200b130: 82 10 20 00 clr %g1 200b134: c8 00 80 1b ld [ %g2 + %i3 ], %g4 200b138: 80 a1 20 00 cmp %g4, 0 200b13c: 32 80 00 11 bne,a 200b180 <_Scheduler_CBS_Create_server+0x88> 200b140: 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 *) 200b144: 39 00 80 86 sethi %hi(0x2021800), %i4 200b148: f0 07 20 28 ld [ %i4 + 0x28 ], %i0 ! 2021828 <_Scheduler_CBS_Server_list> } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200b14c: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200b150: 40 00 07 ae call 200d008 <_Workspace_Allocate> 200b154: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200b158: 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 *) 200b15c: d0 26 00 1b st %o0, [ %i0 + %i3 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200b160: c4 07 20 28 ld [ %i4 + 0x28 ], %g2 200b164: 83 28 60 02 sll %g1, 2, %g1 200b168: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200b16c: 80 a0 60 00 cmp %g1, 0 200b170: 12 80 00 09 bne 200b194 <_Scheduler_CBS_Create_server+0x9c><== ALWAYS TAKEN 200b174: b0 10 3f ef mov -17, %i0 200b178: 81 c7 e0 08 ret 200b17c: 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++ ) { 200b180: 80 a0 40 03 cmp %g1, %g3 200b184: 12 bf ff ec bne 200b134 <_Scheduler_CBS_Create_server+0x3c> 200b188: 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; 200b18c: 81 c7 e0 08 ret 200b190: 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; 200b194: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200b198: 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; 200b19c: c4 20 60 04 st %g2, [ %g1 + 4 ] 200b1a0: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200b1a4: 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; 200b1a8: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200b1ac: 84 10 3f ff mov -1, %g2 200b1b0: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 200b1b4: 81 c7 e0 08 ret 200b1b8: 81 e8 00 00 restore =============================================================================== 0200b230 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200b230: 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); 200b234: 90 10 00 19 mov %i1, %o0 200b238: 40 00 03 75 call 200c00c <_Thread_Get> 200b23c: 92 07 bf fc add %fp, -4, %o1 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200b240: ba 92 20 00 orcc %o0, 0, %i5 200b244: 22 80 00 05 be,a 200b258 <_Scheduler_CBS_Detach_thread+0x28> 200b248: 03 00 80 81 sethi %hi(0x2020400), %g1 _Thread_Enable_dispatch(); 200b24c: 40 00 03 63 call 200bfd8 <_Thread_Enable_dispatch> 200b250: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b254: 03 00 80 81 sethi %hi(0x2020400), %g1 200b258: c4 00 61 48 ld [ %g1 + 0x148 ], %g2 ! 2020548 <_Scheduler_CBS_Maximum_servers> 200b25c: 80 a6 00 02 cmp %i0, %g2 200b260: 1a 80 00 1b bcc 200b2cc <_Scheduler_CBS_Detach_thread+0x9c> 200b264: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b268: 80 a7 60 00 cmp %i5, 0 200b26c: 02 80 00 18 be 200b2cc <_Scheduler_CBS_Detach_thread+0x9c> 200b270: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b274: 03 00 80 86 sethi %hi(0x2021800), %g1 200b278: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 ! 2021828 <_Scheduler_CBS_Server_list> 200b27c: b1 2e 20 02 sll %i0, 2, %i0 200b280: c4 00 40 18 ld [ %g1 + %i0 ], %g2 200b284: 80 a0 a0 00 cmp %g2, 0 200b288: 02 80 00 11 be 200b2cc <_Scheduler_CBS_Detach_thread+0x9c> 200b28c: 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 ) 200b290: c6 00 80 00 ld [ %g2 ], %g3 200b294: 80 a0 c0 19 cmp %g3, %i1 200b298: 12 80 00 0d bne 200b2cc <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b29c: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b2a0: 82 10 3f ff mov -1, %g1 200b2a4: c2 20 80 00 st %g1, [ %g2 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b2a8: c2 07 60 88 ld [ %i5 + 0x88 ], %g1 200b2ac: c0 20 60 18 clr [ %g1 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b2b0: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 200b2b4: c2 27 60 78 st %g1, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b2b8: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 200b2bc: c2 27 60 7c st %g1, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b2c0: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 200b2c4: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] return SCHEDULER_CBS_OK; 200b2c8: 82 10 20 00 clr %g1 } 200b2cc: 81 c7 e0 08 ret 200b2d0: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200b548 <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200b548: 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*) ); 200b54c: 3b 00 80 81 sethi %hi(0x2020400), %i5 200b550: d0 07 61 48 ld [ %i5 + 0x148 ], %o0 ! 2020548 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200b554: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200b558: 40 00 06 ac call 200d008 <_Workspace_Allocate> 200b55c: 91 2a 20 02 sll %o0, 2, %o0 200b560: 05 00 80 86 sethi %hi(0x2021800), %g2 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200b564: 80 a2 20 00 cmp %o0, 0 200b568: 02 80 00 0c be 200b598 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN 200b56c: d0 20 a0 28 st %o0, [ %g2 + 0x28 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200b570: c6 07 61 48 ld [ %i5 + 0x148 ], %g3 200b574: 10 80 00 05 b 200b588 <_Scheduler_CBS_Initialize+0x40> 200b578: 82 10 20 00 clr %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b57c: 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++) { 200b580: 82 00 60 01 inc %g1 _Scheduler_CBS_Server_list[i] = NULL; 200b584: 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++) { 200b588: 80 a0 40 03 cmp %g1, %g3 200b58c: 12 bf ff fc bne 200b57c <_Scheduler_CBS_Initialize+0x34> 200b590: fa 00 a0 28 ld [ %g2 + 0x28 ], %i5 _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200b594: b0 10 20 00 clr %i0 } 200b598: 81 c7 e0 08 ret 200b59c: 81 e8 00 00 restore =============================================================================== 0200a144 <_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; 200a144: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 200a148: 80 a2 60 00 cmp %o1, 0 200a14c: 02 80 00 10 be 200a18c <_Scheduler_CBS_Release_job+0x48> 200a150: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 200a154: 80 a0 60 00 cmp %g1, 0 200a158: 02 80 00 08 be 200a178 <_Scheduler_CBS_Release_job+0x34> 200a15c: 05 00 80 7e sethi %hi(0x201f800), %g2 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 200a160: d2 00 a0 30 ld [ %g2 + 0x30 ], %o1 ! 201f830 <_Watchdog_Ticks_since_boot> 200a164: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a168: 92 02 40 02 add %o1, %g2, %o1 200a16c: 05 20 00 00 sethi %hi(0x80000000), %g2 200a170: 10 80 00 0a b 200a198 <_Scheduler_CBS_Release_job+0x54> 200a174: 92 2a 40 02 andn %o1, %g2, %o1 & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 200a178: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 200a17c: 92 02 40 01 add %o1, %g1, %o1 200a180: 03 20 00 00 sethi %hi(0x80000000), %g1 200a184: 10 80 00 07 b 200a1a0 <_Scheduler_CBS_Release_job+0x5c> 200a188: 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) 200a18c: 80 a0 60 00 cmp %g1, 0 200a190: 02 80 00 04 be 200a1a0 <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN 200a194: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; 200a198: c2 00 60 08 ld [ %g1 + 8 ], %g1 200a19c: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 200a1a0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 200a1a4: 94 10 20 01 mov 1, %o2 200a1a8: 82 13 c0 00 mov %o7, %g1 200a1ac: 40 00 01 35 call 200a680 <_Thread_Change_priority> 200a1b0: 9e 10 40 00 mov %g1, %o7 =============================================================================== 0200a1b4 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a1b4: 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); 200a1b8: 40 00 00 57 call 200a314 <_Scheduler_EDF_Enqueue> 200a1bc: 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; 200a1c0: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a1c4: 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) { 200a1c8: 80 a7 60 00 cmp %i5, 0 200a1cc: 02 80 00 18 be 200a22c <_Scheduler_CBS_Unblock+0x78> 200a1d0: 03 00 80 7e sethi %hi(0x201f800), %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 ) { 200a1d4: 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 - 200a1d8: d0 00 60 30 ld [ %g1 + 0x30 ], %o0 200a1dc: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a1e0: 40 00 3f 81 call 2019fe4 <.umul> 200a1e4: 90 27 00 08 sub %i4, %o0, %o0 200a1e8: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a1ec: b6 10 00 08 mov %o0, %i3 200a1f0: 40 00 3f 7d call 2019fe4 <.umul> 200a1f4: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a1f8: 80 a6 c0 08 cmp %i3, %o0 200a1fc: 24 80 00 0d ble,a 200a230 <_Scheduler_CBS_Unblock+0x7c> 200a200: 3b 00 80 7f sethi %hi(0x201fc00), %i5 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a204: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a208: 80 a7 00 09 cmp %i4, %o1 200a20c: 32 80 00 02 bne,a 200a214 <_Scheduler_CBS_Unblock+0x60> 200a210: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a214: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a218: 80 a0 40 09 cmp %g1, %o1 200a21c: 02 80 00 04 be 200a22c <_Scheduler_CBS_Unblock+0x78> 200a220: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200a224: 40 00 01 17 call 200a680 <_Thread_Change_priority> 200a228: 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, 200a22c: 3b 00 80 7f sethi %hi(0x201fc00), %i5 200a230: ba 17 60 60 or %i5, 0x60, %i5 ! 201fc60 <_Per_CPU_Information> 200a234: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a238: 03 00 80 7a sethi %hi(0x201e800), %g1 200a23c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a240: c2 00 61 dc ld [ %g1 + 0x1dc ], %g1 200a244: 9f c0 40 00 call %g1 200a248: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1 200a24c: 80 a2 20 00 cmp %o0, 0 200a250: 04 80 00 0f ble 200a28c <_Scheduler_CBS_Unblock+0xd8> 200a254: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a258: 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; 200a25c: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a260: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a264: 80 a0 60 00 cmp %g1, 0 200a268: 12 80 00 06 bne 200a280 <_Scheduler_CBS_Unblock+0xcc> 200a26c: 84 10 20 01 mov 1, %g2 200a270: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a274: 80 a0 60 00 cmp %g1, 0 200a278: 12 80 00 05 bne 200a28c <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN 200a27c: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a280: 03 00 80 7f sethi %hi(0x201fc00), %g1 200a284: 82 10 60 60 or %g1, 0x60, %g1 ! 201fc60 <_Per_CPU_Information> 200a288: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a28c: 81 c7 e0 08 ret 200a290: 81 e8 00 00 restore =============================================================================== 0200a294 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 200a294: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 200a298: 40 00 06 52 call 200bbe0 <_Workspace_Allocate> 200a29c: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 200a2a0: 80 a2 20 00 cmp %o0, 0 200a2a4: 02 80 00 05 be 200a2b8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 200a2a8: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 200a2ac: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 200a2b0: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 200a2b4: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 200a2b8: 81 c7 e0 08 ret 200a2bc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a31c <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a31c: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a320: 7f ff ff a9 call 200a1c4 <_Scheduler_EDF_Enqueue> 200a324: 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( 200a328: 3b 00 80 7e sethi %hi(0x201f800), %i5 200a32c: ba 17 63 c0 or %i5, 0x3c0, %i5 ! 201fbc0 <_Per_CPU_Information> 200a330: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200a334: 03 00 80 7a sethi %hi(0x201e800), %g1 200a338: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0 200a33c: c2 00 61 3c ld [ %g1 + 0x13c ], %g1 200a340: 9f c0 40 00 call %g1 200a344: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a348: 80 a2 20 00 cmp %o0, 0 200a34c: 16 80 00 0f bge 200a388 <_Scheduler_EDF_Unblock+0x6c> 200a350: 01 00 00 00 nop _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a354: 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; 200a358: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a35c: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a360: 80 a0 60 00 cmp %g1, 0 200a364: 12 80 00 06 bne 200a37c <_Scheduler_EDF_Unblock+0x60> 200a368: 84 10 20 01 mov 1, %g2 200a36c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a370: 80 a0 60 00 cmp %g1, 0 200a374: 12 80 00 05 bne 200a388 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN 200a378: 01 00 00 00 nop the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a37c: 03 00 80 7e sethi %hi(0x201f800), %g1 200a380: 82 10 63 c0 or %g1, 0x3c0, %g1 ! 201fbc0 <_Per_CPU_Information> 200a384: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] 200a388: 81 c7 e0 08 ret 200a38c: 81 e8 00 00 restore =============================================================================== 02009a2c <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 2009a2c: 9d e3 bf a0 save %sp, -96, %sp Thread_Control *executing; executing = _Thread_Executing; 2009a30: 03 00 80 78 sethi %hi(0x201e000), %g1 2009a34: fa 00 61 5c ld [ %g1 + 0x15c ], %i5 ! 201e15c <_Per_CPU_Information+0xc> /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 2009a38: c2 0f 60 70 ldub [ %i5 + 0x70 ], %g1 2009a3c: 80 a0 60 00 cmp %g1, 0 2009a40: 02 80 00 25 be 2009ad4 <_Scheduler_priority_Tick+0xa8> 2009a44: 01 00 00 00 nop return; if ( !_States_Is_ready( executing->current_state ) ) 2009a48: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2009a4c: 80 a0 60 00 cmp %g1, 0 2009a50: 12 80 00 21 bne 2009ad4 <_Scheduler_priority_Tick+0xa8> 2009a54: 01 00 00 00 nop /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 2009a58: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2009a5c: 80 a0 60 01 cmp %g1, 1 2009a60: 0a 80 00 14 bcs 2009ab0 <_Scheduler_priority_Tick+0x84> 2009a64: 80 a0 60 02 cmp %g1, 2 2009a68: 28 80 00 07 bleu,a 2009a84 <_Scheduler_priority_Tick+0x58> 2009a6c: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 2009a70: 80 a0 60 03 cmp %g1, 3 2009a74: 12 80 00 18 bne 2009ad4 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN 2009a78: 01 00 00 00 nop } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2009a7c: 10 80 00 0f b 2009ab8 <_Scheduler_priority_Tick+0x8c> 2009a80: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 2009a84: 82 00 7f ff add %g1, -1, %g1 2009a88: 80 a0 60 00 cmp %g1, 0 2009a8c: 14 80 00 09 bg 2009ab0 <_Scheduler_priority_Tick+0x84> 2009a90: c2 27 60 74 st %g1, [ %i5 + 0x74 ] * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 2009a94: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009a98: c2 00 63 28 ld [ %g1 + 0x328 ], %g1 ! 201cf28 <_Scheduler+0xc> 2009a9c: 9f c0 40 00 call %g1 2009aa0: 01 00 00 00 nop * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 2009aa4: 03 00 80 76 sethi %hi(0x201d800), %g1 2009aa8: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 201db74 <_Thread_Ticks_per_timeslice> 2009aac: c2 27 60 74 st %g1, [ %i5 + 0x74 ] 2009ab0: 81 c7 e0 08 ret 2009ab4: 81 e8 00 00 restore } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 2009ab8: 82 00 7f ff add %g1, -1, %g1 2009abc: 80 a0 60 00 cmp %g1, 0 2009ac0: 12 bf ff fc bne 2009ab0 <_Scheduler_priority_Tick+0x84> 2009ac4: c2 27 60 74 st %g1, [ %i5 + 0x74 ] (*executing->budget_callout)( executing ); 2009ac8: c2 07 60 7c ld [ %i5 + 0x7c ], %g1 2009acc: 9f c0 40 00 call %g1 2009ad0: 90 10 00 1d mov %i5, %o0 2009ad4: 81 c7 e0 08 ret 2009ad8: 81 e8 00 00 restore =============================================================================== 020087d0 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 20087d0: 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() ); 20087d4: 03 00 80 73 sethi %hi(0x201cc00), %g1 20087d8: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 201ce3c const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 20087dc: 94 10 20 00 clr %o2 20087e0: 85 28 60 02 sll %g1, 2, %g2 20087e4: 91 28 60 07 sll %g1, 7, %o0 20087e8: 90 22 00 02 sub %o0, %g2, %o0 20087ec: 90 02 00 01 add %o0, %g1, %o0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 20087f0: 03 00 80 77 sethi %hi(0x201dc00), %g1 20087f4: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 201dd20 <_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() ); 20087f8: 91 2a 20 03 sll %o0, 3, %o0 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 20087fc: 84 00 a0 01 inc %g2 2008800: c4 20 61 20 st %g2, [ %g1 + 0x120 ] static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008804: 03 00 80 77 sethi %hi(0x201dc00), %g1 2008808: c4 18 60 90 ldd [ %g1 + 0x90 ], %g2 ! 201dc90 <_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() ); 200880c: 92 10 00 08 mov %o0, %o1 2008810: 90 10 20 00 clr %o0 2008814: 86 80 c0 09 addcc %g3, %o1, %g3 2008818: 84 40 80 08 addx %g2, %o0, %g2 200881c: c4 38 60 90 std %g2, [ %g1 + 0x90 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008820: 03 00 80 77 sethi %hi(0x201dc00), %g1 2008824: f8 18 60 a0 ldd [ %g1 + 0xa0 ], %i4 ! 201dca0 <_TOD_Now> *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008828: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 200882c: 92 87 40 09 addcc %i5, %o1, %o1 if ( ((*_time) / 1000000000L) != _start ) { 2008830: 96 12 e2 00 or %o3, 0x200, %o3 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008834: 90 47 00 08 addx %i4, %o0, %o0 if ( ((*_time) / 1000000000L) != _start ) { 2008838: 40 00 41 4f call 2018d74 <__divdi3> 200883c: d0 38 60 a0 std %o0, [ %g1 + 0xa0 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008840: 94 10 20 00 clr %o2 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008844: b4 10 00 08 mov %o0, %i2 2008848: 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; 200884c: 90 10 00 1c mov %i4, %o0 2008850: 92 10 00 1d mov %i5, %o1 2008854: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2008858: 40 00 41 47 call 2018d74 <__divdi3> 200885c: 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 ) { 2008860: 80 a6 80 08 cmp %i2, %o0 2008864: 12 80 00 05 bne 2008878 <_TOD_Tickle_ticks+0xa8> <== NEVER TAKEN 2008868: 31 00 80 77 sethi %hi(0x201dc00), %i0 200886c: 80 a6 c0 09 cmp %i3, %o1 2008870: 02 80 00 04 be 2008880 <_TOD_Tickle_ticks+0xb0> 2008874: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2008878: 40 00 0a 07 call 200b094 <_Watchdog_Tickle> 200887c: 91 ee 20 c4 restore %i0, 0xc4, %o0 2008880: 81 c7 e0 08 ret 2008884: 81 e8 00 00 restore =============================================================================== 02008664 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 2008664: 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(); 2008668: 03 00 80 7d sethi %hi(0x201f400), %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; 200866c: 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) || 2008670: 80 a6 20 00 cmp %i0, 0 2008674: 02 80 00 2b be 2008720 <_TOD_Validate+0xbc> <== NEVER TAKEN 2008678: d2 00 61 7c ld [ %g1 + 0x17c ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 200867c: 11 00 03 d0 sethi %hi(0xf4000), %o0 2008680: 40 00 48 8c call 201a8b0 <.udiv> 2008684: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2008688: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200868c: 80 a0 40 08 cmp %g1, %o0 2008690: 3a 80 00 25 bcc,a 2008724 <_TOD_Validate+0xc0> 2008694: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2008698: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200869c: 80 a0 60 3b cmp %g1, 0x3b 20086a0: 38 80 00 21 bgu,a 2008724 <_TOD_Validate+0xc0> 20086a4: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 20086a8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 20086ac: 80 a0 60 3b cmp %g1, 0x3b 20086b0: 38 80 00 1d bgu,a 2008724 <_TOD_Validate+0xc0> 20086b4: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 20086b8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20086bc: 80 a0 60 17 cmp %g1, 0x17 20086c0: 38 80 00 19 bgu,a 2008724 <_TOD_Validate+0xc0> 20086c4: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 20086c8: 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) || 20086cc: 80 a0 60 00 cmp %g1, 0 20086d0: 02 80 00 14 be 2008720 <_TOD_Validate+0xbc> <== NEVER TAKEN 20086d4: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 20086d8: 38 80 00 13 bgu,a 2008724 <_TOD_Validate+0xc0> 20086dc: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 20086e0: 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) || 20086e4: 80 a0 e7 c3 cmp %g3, 0x7c3 20086e8: 28 80 00 0f bleu,a 2008724 <_TOD_Validate+0xc0> 20086ec: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 20086f0: 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) || 20086f4: 80 a0 a0 00 cmp %g2, 0 20086f8: 02 80 00 0a be 2008720 <_TOD_Validate+0xbc> <== NEVER TAKEN 20086fc: 80 88 e0 03 btst 3, %g3 2008700: 07 00 80 77 sethi %hi(0x201dc00), %g3 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008704: 12 80 00 03 bne 2008710 <_TOD_Validate+0xac> 2008708: 86 10 e3 b8 or %g3, 0x3b8, %g3 ! 201dfb8 <_TOD_Days_per_month> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 200870c: 82 00 60 0d add %g1, 0xd, %g1 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2008710: 83 28 60 02 sll %g1, 2, %g1 2008714: 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( 2008718: 80 a0 40 02 cmp %g1, %g2 200871c: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 2008720: b0 0f 60 01 and %i5, 1, %i0 2008724: 81 c7 e0 08 ret 2008728: 81 e8 00 00 restore =============================================================================== 02009cec <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 2009cec: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 2009cf0: 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 ); 2009cf4: 40 00 03 67 call 200aa90 <_Thread_Set_transient> 2009cf8: 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 ) 2009cfc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2009d00: 80 a0 40 19 cmp %g1, %i1 2009d04: 02 80 00 05 be 2009d18 <_Thread_Change_priority+0x2c> 2009d08: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 2009d0c: 90 10 00 18 mov %i0, %o0 2009d10: 40 00 03 47 call 200aa2c <_Thread_Set_priority> 2009d14: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 2009d18: 7f ff e2 35 call 20025ec 2009d1c: 01 00 00 00 nop 2009d20: 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; 2009d24: f2 07 60 10 ld [ %i5 + 0x10 ], %i1 if ( state != STATES_TRANSIENT ) { 2009d28: 80 a6 60 04 cmp %i1, 4 2009d2c: 02 80 00 10 be 2009d6c <_Thread_Change_priority+0x80> 2009d30: 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 ) ) 2009d34: 80 a7 20 00 cmp %i4, 0 2009d38: 12 80 00 03 bne 2009d44 <_Thread_Change_priority+0x58> <== NEVER TAKEN 2009d3c: 82 0e 7f fb and %i1, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2009d40: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 2009d44: 7f ff e2 2e call 20025fc 2009d48: 90 10 00 1b mov %i3, %o0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 2009d4c: 03 00 00 ef sethi %hi(0x3bc00), %g1 2009d50: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 2009d54: 80 8e 40 01 btst %i1, %g1 2009d58: 02 80 00 29 be 2009dfc <_Thread_Change_priority+0x110> 2009d5c: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 2009d60: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 2009d64: 40 00 03 04 call 200a974 <_Thread_queue_Requeue> 2009d68: 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 ) ) { 2009d6c: 80 a7 20 00 cmp %i4, 0 2009d70: 12 80 00 0b bne 2009d9c <_Thread_Change_priority+0xb0> <== NEVER TAKEN 2009d74: 03 00 80 73 sethi %hi(0x201cc00), %g1 * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 2009d78: c0 27 60 10 clr [ %i5 + 0x10 ] if ( prepend_it ) 2009d7c: 80 a6 a0 00 cmp %i2, 0 2009d80: 02 80 00 04 be 2009d90 <_Thread_Change_priority+0xa4> 2009d84: 82 10 63 1c or %g1, 0x31c, %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 2009d88: 10 80 00 03 b 2009d94 <_Thread_Change_priority+0xa8> 2009d8c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 2009d90: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 2009d94: 9f c0 40 00 call %g1 2009d98: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 2009d9c: 7f ff e2 18 call 20025fc 2009da0: 90 10 00 1b mov %i3, %o0 2009da4: 7f ff e2 12 call 20025ec 2009da8: 01 00 00 00 nop 2009dac: 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(); 2009db0: 03 00 80 73 sethi %hi(0x201cc00), %g1 2009db4: c2 00 63 24 ld [ %g1 + 0x324 ], %g1 ! 201cf24 <_Scheduler+0x8> 2009db8: 9f c0 40 00 call %g1 2009dbc: 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 ); 2009dc0: 03 00 80 78 sethi %hi(0x201e000), %g1 2009dc4: 82 10 61 50 or %g1, 0x150, %g1 ! 201e150 <_Per_CPU_Information> 2009dc8: 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() && 2009dcc: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 2009dd0: 80 a0 80 03 cmp %g2, %g3 2009dd4: 02 80 00 08 be 2009df4 <_Thread_Change_priority+0x108> 2009dd8: 01 00 00 00 nop 2009ddc: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 2009de0: 80 a0 a0 00 cmp %g2, 0 2009de4: 02 80 00 04 be 2009df4 <_Thread_Change_priority+0x108> 2009de8: 01 00 00 00 nop _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 2009dec: 84 10 20 01 mov 1, %g2 ! 1 2009df0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 2009df4: 7f ff e2 02 call 20025fc 2009df8: 81 e8 00 00 restore 2009dfc: 81 c7 e0 08 ret 2009e00: 81 e8 00 00 restore =============================================================================== 02009ff0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 2009ff0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 2009ff4: 90 10 00 18 mov %i0, %o0 2009ff8: 40 00 00 6f call 200a1b4 <_Thread_Get> 2009ffc: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a000: c2 07 bf fc ld [ %fp + -4 ], %g1 200a004: 80 a0 60 00 cmp %g1, 0 200a008: 12 80 00 09 bne 200a02c <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 200a00c: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 200a010: 7f ff ff 7d call 2009e04 <_Thread_Clear_state> 200a014: 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--; 200a018: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a01c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 200a020: 84 00 bf ff add %g2, -1, %g2 200a024: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 200a028: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a02c: 81 c7 e0 08 ret 200a030: 81 e8 00 00 restore =============================================================================== 0200a034 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 200a034: 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++; 200a038: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a03c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 200a040: 84 00 a0 01 inc %g2 200a044: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 200a048: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 200a04c: 37 00 80 78 sethi %hi(0x201e000), %i3 200a050: 82 16 e1 50 or %i3, 0x150, %g1 ! 201e150 <_Per_CPU_Information> _ISR_Disable( level ); 200a054: 7f ff e1 66 call 20025ec 200a058: 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; 200a05c: 35 00 80 76 sethi %hi(0x201d800), %i2 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a060: 31 00 80 77 sethi %hi(0x201dc00), %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 ) { 200a064: 10 80 00 37 b 200a140 <_Thread_Dispatch+0x10c> 200a068: 33 00 80 77 sethi %hi(0x201dc00), %i1 heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 200a06c: 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 ) 200a070: 80 a7 00 1d cmp %i4, %i5 200a074: 02 80 00 38 be 200a154 <_Thread_Dispatch+0x120> 200a078: 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 ) 200a07c: c2 07 20 78 ld [ %i4 + 0x78 ], %g1 200a080: 80 a0 60 01 cmp %g1, 1 200a084: 12 80 00 03 bne 200a090 <_Thread_Dispatch+0x5c> 200a088: c2 06 a3 74 ld [ %i2 + 0x374 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a08c: c2 27 20 74 st %g1, [ %i4 + 0x74 ] _ISR_Enable( level ); 200a090: 7f ff e1 5b call 20025fc 200a094: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 200a098: 40 00 0d 3a call 200d580 <_TOD_Get_uptime> 200a09c: 90 07 bf f8 add %fp, -8, %o0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a0a0: c4 1f 60 80 ldd [ %i5 + 0x80 ], %g2 _Timestamp_Subtract( 200a0a4: d4 1f bf f8 ldd [ %fp + -8 ], %o2 200a0a8: 82 16 e1 50 or %i3, 0x150, %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a0ac: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4 200a0b0: 9a a2 c0 0d subcc %o3, %o5, %o5 200a0b4: 98 62 80 0c subx %o2, %o4, %o4 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a0b8: 86 80 c0 0d addcc %g3, %o5, %g3 200a0bc: 84 40 80 0c addx %g2, %o4, %g2 200a0c0: 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; 200a0c4: d4 38 60 20 std %o2, [ %g1 + 0x20 ] #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a0c8: c2 06 20 9c ld [ %i0 + 0x9c ], %g1 200a0cc: 80 a0 60 00 cmp %g1, 0 200a0d0: 02 80 00 06 be 200a0e8 <_Thread_Dispatch+0xb4> <== NEVER TAKEN 200a0d4: 90 10 00 1d mov %i5, %o0 executing->libc_reent = *_Thread_libc_reent; 200a0d8: c4 00 40 00 ld [ %g1 ], %g2 200a0dc: c4 27 61 54 st %g2, [ %i5 + 0x154 ] *_Thread_libc_reent = heir->libc_reent; 200a0e0: c4 07 21 54 ld [ %i4 + 0x154 ], %g2 200a0e4: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 200a0e8: 40 00 03 59 call 200ae4c <_User_extensions_Thread_switch> 200a0ec: 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 ); 200a0f0: 90 07 60 c8 add %i5, 0xc8, %o0 200a0f4: 40 00 04 85 call 200b308 <_CPU_Context_switch> 200a0f8: 92 07 20 c8 add %i4, 0xc8, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200a0fc: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200a100: 80 a0 60 00 cmp %g1, 0 200a104: 02 80 00 0c be 200a134 <_Thread_Dispatch+0x100> 200a108: d0 06 60 98 ld [ %i1 + 0x98 ], %o0 200a10c: 80 a7 40 08 cmp %i5, %o0 200a110: 02 80 00 09 be 200a134 <_Thread_Dispatch+0x100> 200a114: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200a118: 02 80 00 04 be 200a128 <_Thread_Dispatch+0xf4> 200a11c: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200a120: 40 00 04 40 call 200b220 <_CPU_Context_save_fp> 200a124: 90 02 21 50 add %o0, 0x150, %o0 _Context_Restore_fp( &executing->fp_context ); 200a128: 40 00 04 5b call 200b294 <_CPU_Context_restore_fp> 200a12c: 90 07 61 50 add %i5, 0x150, %o0 _Thread_Allocated_fp = executing; 200a130: fa 26 60 98 st %i5, [ %i1 + 0x98 ] if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 200a134: 82 16 e1 50 or %i3, 0x150, %g1 _ISR_Disable( level ); 200a138: 7f ff e1 2d call 20025ec 200a13c: 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 ) { 200a140: 82 16 e1 50 or %i3, 0x150, %g1 200a144: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2 200a148: 80 a0 a0 00 cmp %g2, 0 200a14c: 32 bf ff c8 bne,a 200a06c <_Thread_Dispatch+0x38> 200a150: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 200a154: 7f ff e1 2a call 20025fc 200a158: 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--; 200a15c: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a160: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 200a164: 84 00 bf ff add %g2, -1, %g2 200a168: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 200a16c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 200a170: 7f ff f8 14 call 20081c0 <_API_extensions_Run_postswitch> 200a174: 01 00 00 00 nop } 200a178: 81 c7 e0 08 ret 200a17c: 81 e8 00 00 restore =============================================================================== 0200f628 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200f628: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200f62c: 03 00 80 78 sethi %hi(0x201e000), %g1 200f630: fa 00 61 5c ld [ %g1 + 0x15c ], %i5 ! 201e15c <_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(); 200f634: 3f 00 80 3d sethi %hi(0x200f400), %i7 200f638: be 17 e2 28 or %i7, 0x228, %i7 ! 200f628 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200f63c: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 200f640: 7f ff cb ef call 20025fc 200f644: 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; 200f648: 03 00 80 76 sethi %hi(0x201d800), %g1 doneConstructors = true; 200f64c: 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; 200f650: f8 08 60 38 ldub [ %g1 + 0x38 ], %i4 doneConstructors = true; 200f654: c4 28 60 38 stb %g2, [ %g1 + 0x38 ] #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200f658: c2 07 61 50 ld [ %i5 + 0x150 ], %g1 200f65c: 80 a0 60 00 cmp %g1, 0 200f660: 02 80 00 0c be 200f690 <_Thread_Handler+0x68> 200f664: 03 00 80 77 sethi %hi(0x201dc00), %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 ); 200f668: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 ! 201dc98 <_Thread_Allocated_fp> 200f66c: 80 a7 40 08 cmp %i5, %o0 200f670: 02 80 00 08 be 200f690 <_Thread_Handler+0x68> 200f674: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200f678: 22 80 00 06 be,a 200f690 <_Thread_Handler+0x68> 200f67c: fa 20 60 98 st %i5, [ %g1 + 0x98 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200f680: 7f ff ee e8 call 200b220 <_CPU_Context_save_fp> 200f684: 90 02 21 50 add %o0, 0x150, %o0 _Thread_Allocated_fp = executing; 200f688: 03 00 80 77 sethi %hi(0x201dc00), %g1 200f68c: fa 20 60 98 st %i5, [ %g1 + 0x98 ] ! 201dc98 <_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 ); 200f690: 7f ff ed 80 call 200ac90 <_User_extensions_Thread_begin> 200f694: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200f698: 7f ff ea ba call 200a180 <_Thread_Enable_dispatch> 200f69c: 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) */ { 200f6a0: 80 8f 20 ff btst 0xff, %i4 200f6a4: 32 80 00 05 bne,a 200f6b8 <_Thread_Handler+0x90> 200f6a8: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 INIT_NAME (); 200f6ac: 40 00 35 cf call 201cde8 <_init> 200f6b0: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f6b4: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200f6b8: 80 a0 60 00 cmp %g1, 0 200f6bc: 12 80 00 05 bne 200f6d0 <_Thread_Handler+0xa8> 200f6c0: 80 a0 60 01 cmp %g1, 1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200f6c4: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200f6c8: 10 80 00 06 b 200f6e0 <_Thread_Handler+0xb8> 200f6cc: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 200f6d0: 12 80 00 07 bne 200f6ec <_Thread_Handler+0xc4> <== NEVER TAKEN 200f6d4: 01 00 00 00 nop executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 200f6d8: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 200f6dc: d0 07 60 94 ld [ %i5 + 0x94 ], %o0 200f6e0: 9f c0 40 00 call %g1 200f6e4: 01 00 00 00 nop executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 200f6e8: 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 ); 200f6ec: 7f ff ed 7a call 200acd4 <_User_extensions_Thread_exitted> 200f6f0: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200f6f4: 90 10 20 00 clr %o0 200f6f8: 92 10 20 01 mov 1, %o1 200f6fc: 7f ff e5 5c call 2008c6c <_Internal_error_Occurred> 200f700: 94 10 20 05 mov 5, %o2 =============================================================================== 0200a454 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 200a454: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200a458: 05 00 80 73 sethi %hi(0x201cc00), %g2 200a45c: 84 10 a2 2c or %g2, 0x22c, %g2 ! 201ce2c #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200a460: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 * Output parameters: NONE */ void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200a464: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200a468: 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 || 200a46c: 80 a0 e0 00 cmp %g3, 0 200a470: 02 80 00 06 be 200a488 <_Thread_Handler_initialization+0x34> 200a474: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200a478: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 200a47c: 80 a0 e0 00 cmp %g3, 0 200a480: 12 80 00 06 bne 200a498 <_Thread_Handler_initialization+0x44><== ALWAYS TAKEN 200a484: 80 a0 60 00 cmp %g1, 0 rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200a488: 90 10 20 00 clr %o0 200a48c: 92 10 20 01 mov 1, %o1 200a490: 7f ff f9 f7 call 2008c6c <_Internal_error_Occurred> 200a494: 94 10 20 0e mov 0xe, %o2 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200a498: 22 80 00 05 be,a 200a4ac <_Thread_Handler_initialization+0x58> 200a49c: 03 00 80 78 sethi %hi(0x201e000), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200a4a0: 9f c0 40 00 call %g1 200a4a4: d0 00 a0 08 ld [ %g2 + 8 ], %o0 _Thread_Dispatch_necessary = false; 200a4a8: 03 00 80 78 sethi %hi(0x201e000), %g1 200a4ac: 82 10 61 50 or %g1, 0x150, %g1 ! 201e150 <_Per_CPU_Information> 200a4b0: c0 28 60 18 clrb [ %g1 + 0x18 ] _Thread_Executing = NULL; 200a4b4: c0 20 60 0c clr [ %g1 + 0xc ] _Thread_Heir = NULL; 200a4b8: c0 20 60 10 clr [ %g1 + 0x10 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200a4bc: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a4c0: c0 20 60 98 clr [ %g1 + 0x98 ] ! 201dc98 <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200a4c4: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a4c8: f8 20 60 a8 st %i4, [ %g1 + 0xa8 ] ! 201dca8 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200a4cc: 03 00 80 76 sethi %hi(0x201d800), %g1 200a4d0: fa 20 63 74 st %i5, [ %g1 + 0x374 ] ! 201db74 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200a4d4: 82 10 20 08 mov 8, %g1 200a4d8: 11 00 80 77 sethi %hi(0x201dc00), %o0 200a4dc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200a4e0: 90 12 21 28 or %o0, 0x128, %o0 200a4e4: 92 10 20 01 mov 1, %o1 200a4e8: 94 10 20 01 mov 1, %o2 200a4ec: 96 10 20 01 mov 1, %o3 200a4f0: 98 10 21 68 mov 0x168, %o4 200a4f4: 7f ff fb 63 call 2009280 <_Objects_Initialize_information> 200a4f8: 9a 10 20 00 clr %o5 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 200a4fc: 81 c7 e0 08 ret 200a500: 81 e8 00 00 restore =============================================================================== 0200a264 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a264: 9d e3 bf a0 save %sp, -96, %sp 200a268: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 200a26c: c0 26 61 58 clr [ %i1 + 0x158 ] 200a270: c0 26 61 5c clr [ %i1 + 0x15c ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a274: c0 26 61 54 clr [ %i1 + 0x154 ] Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a278: e0 07 a0 60 ld [ %fp + 0x60 ], %l0 200a27c: e2 00 40 00 ld [ %g1 ], %l1 if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 200a280: 80 a6 a0 00 cmp %i2, 0 200a284: 12 80 00 0d bne 200a2b8 <_Thread_Initialize+0x54> 200a288: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200a28c: 90 10 00 19 mov %i1, %o0 200a290: 40 00 02 0f call 200aacc <_Thread_Stack_Allocate> 200a294: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a298: 80 a2 00 1b cmp %o0, %i3 200a29c: 0a 80 00 6a bcs 200a444 <_Thread_Initialize+0x1e0> 200a2a0: 80 a2 20 00 cmp %o0, 0 200a2a4: 02 80 00 68 be 200a444 <_Thread_Initialize+0x1e0> <== NEVER TAKEN 200a2a8: 82 10 20 01 mov 1, %g1 return false; /* stack allocation failed */ stack = the_thread->Start.stack; 200a2ac: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2 the_thread->Start.core_allocated_stack = true; 200a2b0: 10 80 00 04 b 200a2c0 <_Thread_Initialize+0x5c> 200a2b4: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 200a2b8: c0 2e 60 b0 clrb [ %i1 + 0xb0 ] 200a2bc: 90 10 00 1b mov %i3, %o0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a2c0: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ] the_stack->size = size; 200a2c4: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200a2c8: 80 a7 20 00 cmp %i4, 0 200a2cc: 02 80 00 07 be 200a2e8 <_Thread_Initialize+0x84> 200a2d0: b6 10 20 00 clr %i3 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200a2d4: 40 00 03 b7 call 200b1b0 <_Workspace_Allocate> 200a2d8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a2dc: b6 92 20 00 orcc %o0, 0, %i3 200a2e0: 02 80 00 4a be 200a408 <_Thread_Initialize+0x1a4> 200a2e4: b8 10 20 00 clr %i4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a2e8: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a2ec: d0 00 60 a8 ld [ %g1 + 0xa8 ], %o0 ! 201dca8 <_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; 200a2f0: f6 26 61 50 st %i3, [ %i1 + 0x150 ] the_thread->Start.fp_context = fp_area; 200a2f4: f6 26 60 bc st %i3, [ %i1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a2f8: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a2fc: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a300: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 200a304: c0 26 60 6c clr [ %i1 + 0x6c ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a308: 80 a2 20 00 cmp %o0, 0 200a30c: 02 80 00 08 be 200a32c <_Thread_Initialize+0xc8> 200a310: b8 10 20 00 clr %i4 extensions_area = _Workspace_Allocate( 200a314: 90 02 20 01 inc %o0 200a318: 40 00 03 a6 call 200b1b0 <_Workspace_Allocate> 200a31c: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200a320: b8 92 20 00 orcc %o0, 0, %i4 200a324: 02 80 00 3a be 200a40c <_Thread_Initialize+0x1a8> 200a328: 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 ) { 200a32c: 80 a7 20 00 cmp %i4, 0 200a330: 02 80 00 0c be 200a360 <_Thread_Initialize+0xfc> 200a334: f8 26 61 60 st %i4, [ %i1 + 0x160 ] for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 200a338: 03 00 80 77 sethi %hi(0x201dc00), %g1 200a33c: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 ! 201dca8 <_Thread_Maximum_extensions> 200a340: 10 80 00 05 b 200a354 <_Thread_Initialize+0xf0> 200a344: 82 10 20 00 clr %g1 the_thread->extensions[i] = NULL; 200a348: 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++ ) 200a34c: 82 00 60 01 inc %g1 the_thread->extensions[i] = NULL; 200a350: 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++ ) 200a354: 80 a0 40 02 cmp %g1, %g2 200a358: 28 bf ff fc bleu,a 200a348 <_Thread_Initialize+0xe4> 200a35c: c8 06 61 60 ld [ %i1 + 0x160 ], %g4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 200a360: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a364: e4 2e 60 9c stb %l2, [ %i1 + 0x9c ] the_thread->Start.budget_algorithm = budget_algorithm; 200a368: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 200a36c: 80 a4 20 02 cmp %l0, 2 200a370: 12 80 00 05 bne 200a384 <_Thread_Initialize+0x120> 200a374: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a378: 03 00 80 76 sethi %hi(0x201d800), %g1 200a37c: c2 00 63 74 ld [ %g1 + 0x374 ], %g1 ! 201db74 <_Thread_Ticks_per_timeslice> 200a380: c2 26 60 74 st %g1, [ %i1 + 0x74 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a384: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 200a388: c0 26 60 44 clr [ %i1 + 0x44 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a38c: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 200a390: 82 10 20 01 mov 1, %g1 200a394: c2 26 60 10 st %g1, [ %i1 + 0x10 ] */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a398: 03 00 80 73 sethi %hi(0x201cc00), %g1 200a39c: c2 00 63 34 ld [ %g1 + 0x334 ], %g1 ! 201cf34 <_Scheduler+0x18> the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 200a3a0: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 200a3a4: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a3a8: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a3ac: 9f c0 40 00 call %g1 200a3b0: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a3b4: b4 92 20 00 orcc %o0, 0, %i2 200a3b8: 02 80 00 15 be 200a40c <_Thread_Initialize+0x1a8> 200a3bc: 90 10 00 19 mov %i1, %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 200a3c0: 40 00 01 9b call 200aa2c <_Thread_Set_priority> 200a3c4: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a3c8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200a3cc: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200a3d0: c0 26 60 80 clr [ %i1 + 0x80 ] 200a3d4: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a3d8: 83 28 60 02 sll %g1, 2, %g1 200a3dc: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a3e0: e2 26 60 0c st %l1, [ %i1 + 0xc ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 200a3e4: 90 10 00 19 mov %i1, %o0 200a3e8: 40 00 02 5c call 200ad58 <_User_extensions_Thread_create> 200a3ec: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200a3f0: 80 8a 20 ff btst 0xff, %o0 200a3f4: 02 80 00 06 be 200a40c <_Thread_Initialize+0x1a8> 200a3f8: 01 00 00 00 nop 200a3fc: b0 0e 20 01 and %i0, 1, %i0 200a400: 81 c7 e0 08 ret 200a404: 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; 200a408: 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 ); 200a40c: 40 00 03 71 call 200b1d0 <_Workspace_Free> 200a410: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a414: 40 00 03 6f call 200b1d0 <_Workspace_Free> 200a418: d0 06 61 58 ld [ %i1 + 0x158 ], %o0 200a41c: 40 00 03 6d call 200b1d0 <_Workspace_Free> 200a420: d0 06 61 5c ld [ %i1 + 0x15c ], %o0 _Workspace_Free( extensions_area ); 200a424: 40 00 03 6b call 200b1d0 <_Workspace_Free> 200a428: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a42c: 40 00 03 69 call 200b1d0 <_Workspace_Free> 200a430: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a434: 40 00 03 67 call 200b1d0 <_Workspace_Free> 200a438: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 200a43c: 40 00 01 b5 call 200ab10 <_Thread_Stack_Free> 200a440: 90 10 00 19 mov %i1, %o0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 200a444: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 200a448: b0 0e 20 01 and %i0, 1, %i0 200a44c: 81 c7 e0 08 ret 200a450: 81 e8 00 00 restore =============================================================================== 0200ab10 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200ab10: 9d e3 bf a0 save %sp, -96, %sp #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200ab14: c4 0e 20 b0 ldub [ %i0 + 0xb0 ], %g2 void _Thread_Stack_Free( Thread_Control *the_thread ) { rtems_stack_free_hook stack_free_hook = 200ab18: 03 00 80 73 sethi %hi(0x201cc00), %g1 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 200ab1c: 80 a0 a0 00 cmp %g2, 0 200ab20: 02 80 00 04 be 200ab30 <_Thread_Stack_Free+0x20> <== NEVER TAKEN 200ab24: c2 00 62 58 ld [ %g1 + 0x258 ], %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ (*stack_free_hook)( the_thread->Start.Initial_stack.area ); 200ab28: 9f c0 40 00 call %g1 200ab2c: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0 200ab30: 81 c7 e0 08 ret 200ab34: 81 e8 00 00 restore =============================================================================== 0200a974 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200a974: 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 ) 200a978: 80 a6 20 00 cmp %i0, 0 200a97c: 02 80 00 19 be 200a9e0 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a980: 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 ) { 200a984: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200a988: 80 a7 20 01 cmp %i4, 1 200a98c: 12 80 00 15 bne 200a9e0 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN 200a990: 01 00 00 00 nop Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200a994: 7f ff df 16 call 20025ec 200a998: 01 00 00 00 nop 200a99c: ba 10 00 08 mov %o0, %i5 200a9a0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200a9a4: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a9a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200a9ac: 80 88 80 01 btst %g2, %g1 200a9b0: 02 80 00 0a be 200a9d8 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN 200a9b4: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200a9b8: 92 10 00 19 mov %i1, %o1 200a9bc: 94 10 20 01 mov 1, %o2 200a9c0: 40 00 0c c5 call 200dcd4 <_Thread_queue_Extract_priority_helper> 200a9c4: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200a9c8: 90 10 00 18 mov %i0, %o0 200a9cc: 92 10 00 19 mov %i1, %o1 200a9d0: 7f ff ff 50 call 200a710 <_Thread_queue_Enqueue_priority> 200a9d4: 94 07 bf fc add %fp, -4, %o2 } _ISR_Enable( level ); 200a9d8: 7f ff df 09 call 20025fc 200a9dc: 90 10 00 1d mov %i5, %o0 200a9e0: 81 c7 e0 08 ret 200a9e4: 81 e8 00 00 restore =============================================================================== 0200a9e8 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a9e8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a9ec: 90 10 00 18 mov %i0, %o0 200a9f0: 7f ff fd f1 call 200a1b4 <_Thread_Get> 200a9f4: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a9f8: c2 07 bf fc ld [ %fp + -4 ], %g1 200a9fc: 80 a0 60 00 cmp %g1, 0 200aa00: 12 80 00 09 bne 200aa24 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200aa04: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200aa08: 40 00 0c ea call 200ddb0 <_Thread_queue_Process_timeout> 200aa0c: 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--; 200aa10: 03 00 80 77 sethi %hi(0x201dc00), %g1 200aa14: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 200aa18: 84 00 bf ff add %g2, -1, %g2 200aa1c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 200aa20: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200aa24: 81 c7 e0 08 ret 200aa28: 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 f3 sethi %hi(0x203cc00), %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 f3 sethi %hi(0x203cc00), %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 a1 60 ld [ %l2 + 0x160 ], %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 d8 call 201d09c <_Watchdog_Adjust_to_chain> 2018940: 94 10 00 1c mov %i4, %o2 2018944: d0 1d 20 e0 ldd [ %l4 + 0xe0 ], %o0 2018948: 94 10 20 00 clr %o2 201894c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018950: 40 00 4f 7a call 202c738 <__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 cb call 201d09c <_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 9e call 201d000 <_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 db call 2019504 <_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 e7 call 201d164 <_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 10 40 call 201cb78 <_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 e4 call 201c220 <_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 12 0a call 201d2cc <_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 12 08 call 201d2cc <_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 f3 sethi %hi(0x203cc00), %g1 2018af0: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 203cd60 <_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 8c call 201d164 <_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 f3 sethi %hi(0x203cc00), %g1 2018b70: d0 18 60 e0 ldd [ %g1 + 0xe0 ], %o0 ! 203cce0 <_TOD_Now> 2018b74: 94 10 20 00 clr %o2 2018b78: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2018b7c: 40 00 4e ef call 202c738 <__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 64 call 201d164 <_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 8b call 201c220 <_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 36 call 20194d8 <_Chain_Append> 2018c04: 81 e8 00 00 restore =============================================================================== 0200c7a4 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 200c7a4: 82 10 00 08 mov %o0, %g1 uint32_t seconds = add->tv_sec; 200c7a8: d0 02 40 00 ld [ %o1 ], %o0 /* Add the basics */ time->tv_sec += add->tv_sec; 200c7ac: c4 00 40 00 ld [ %g1 ], %g2 time->tv_nsec += add->tv_nsec; 200c7b0: c6 00 60 04 ld [ %g1 + 4 ], %g3 ) { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; 200c7b4: 84 00 80 08 add %g2, %o0, %g2 200c7b8: c4 20 40 00 st %g2, [ %g1 ] time->tv_nsec += add->tv_nsec; 200c7bc: c4 02 60 04 ld [ %o1 + 4 ], %g2 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c7c0: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200c7c4: 84 00 c0 02 add %g3, %g2, %g2 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c7c8: 88 11 21 ff or %g4, 0x1ff, %g4 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c7cc: 07 31 19 4d sethi %hi(0xc4653400), %g3 { uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 200c7d0: c4 20 60 04 st %g2, [ %g1 + 4 ] /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c7d4: 10 80 00 07 b 200c7f0 <_Timespec_Add_to+0x4c> 200c7d8: 86 10 e2 00 or %g3, 0x200, %g3 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 200c7dc: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED time->tv_sec++; 200c7e0: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED seconds++; 200c7e4: 90 02 20 01 inc %o0 <== NOT EXECUTED time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 200c7e8: 84 00 a0 01 inc %g2 <== NOT EXECUTED 200c7ec: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 200c7f0: c4 00 60 04 ld [ %g1 + 4 ], %g2 200c7f4: 80 a0 80 04 cmp %g2, %g4 200c7f8: 18 bf ff f9 bgu 200c7dc <_Timespec_Add_to+0x38> <== NEVER TAKEN 200c7fc: 84 00 80 03 add %g2, %g3, %g2 time->tv_sec++; seconds++; } return seconds; } 200c800: 81 c3 e0 08 retl =============================================================================== 0200a544 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a544: 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; 200a548: d6 06 40 00 ld [ %i1 ], %o3 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a54c: 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; 200a550: 95 3a e0 1f sra %o3, 0x1f, %o2 200a554: b9 2a a0 03 sll %o2, 3, %i4 200a558: 87 2a e0 03 sll %o3, 3, %g3 200a55c: b5 32 e0 1d srl %o3, 0x1d, %i2 200a560: 9b 28 e0 05 sll %g3, 5, %o5 200a564: 84 16 80 1c or %i2, %i4, %g2 200a568: b9 30 e0 1b srl %g3, 0x1b, %i4 200a56c: 99 28 a0 05 sll %g2, 5, %o4 200a570: 86 a3 40 03 subcc %o5, %g3, %g3 200a574: 98 17 00 0c or %i4, %o4, %o4 200a578: 84 63 00 02 subx %o4, %g2, %g2 200a57c: b9 30 e0 1a srl %g3, 0x1a, %i4 200a580: 99 28 a0 06 sll %g2, 6, %o4 200a584: 9b 28 e0 06 sll %g3, 6, %o5 200a588: 98 17 00 0c or %i4, %o4, %o4 200a58c: 9a a3 40 03 subcc %o5, %g3, %o5 200a590: 98 63 00 02 subx %o4, %g2, %o4 200a594: 96 83 40 0b addcc %o5, %o3, %o3 200a598: 85 32 e0 1e srl %o3, 0x1e, %g2 200a59c: 94 43 00 0a addx %o4, %o2, %o2 const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a5a0: 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; 200a5a4: b5 2a a0 02 sll %o2, 2, %i2 200a5a8: b7 2a e0 02 sll %o3, 2, %i3 200a5ac: b4 10 80 1a or %g2, %i2, %i2 200a5b0: 96 82 c0 1b addcc %o3, %i3, %o3 200a5b4: 94 42 80 1a addx %o2, %i2, %o2 200a5b8: 85 32 e0 1e srl %o3, 0x1e, %g2 200a5bc: b9 2a a0 02 sll %o2, 2, %i4 200a5c0: bb 2a e0 02 sll %o3, 2, %i5 200a5c4: b8 10 80 1c or %g2, %i4, %i4 200a5c8: 96 82 c0 1d addcc %o3, %i5, %o3 200a5cc: 94 42 80 1c addx %o2, %i4, %o2 200a5d0: 85 32 e0 1e srl %o3, 0x1e, %g2 200a5d4: b9 2a a0 02 sll %o2, 2, %i4 200a5d8: bb 2a e0 02 sll %o3, 2, %i5 200a5dc: b8 10 80 1c or %g2, %i4, %i4 200a5e0: 96 82 c0 1d addcc %o3, %i5, %o3 200a5e4: 94 42 80 1c addx %o2, %i4, %o2 200a5e8: 87 2a a0 09 sll %o2, 9, %g3 200a5ec: b9 32 e0 17 srl %o3, 0x17, %i4 200a5f0: 94 17 00 03 or %i4, %g3, %o2 right += rhs->tv_nsec; 200a5f4: 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; 200a5f8: 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; 200a5fc: c2 06 00 00 ld [ %i0 ], %g1 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200a600: 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; 200a604: c8 06 20 04 ld [ %i0 + 4 ], %g4 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a608: b2 82 c0 03 addcc %o3, %g3, %i1 200a60c: 85 38 e0 1f sra %g3, 0x1f, %g2 200a610: b0 42 80 02 addx %o2, %g2, %i0 if ( right == 0 ) { 200a614: 80 96 00 19 orcc %i0, %i1, %g0 200a618: 32 80 00 06 bne,a 200a630 <_Timespec_Divide+0xec> <== NEVER TAKEN 200a61c: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED *ival_percentage = 0; 200a620: c0 24 00 00 clr [ %l0 ] *fval_percentage = 0; 200a624: c0 24 40 00 clr [ %l1 ] return; 200a628: 81 c7 e0 08 ret 200a62c: 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; 200a630: 95 38 60 1f sra %g1, 0x1f, %o2 <== NOT EXECUTED 200a634: b9 30 60 1d srl %g1, 0x1d, %i4 <== NOT EXECUTED 200a638: 83 2a a0 03 sll %o2, 3, %g1 <== NOT EXECUTED 200a63c: 87 2a e0 03 sll %o3, 3, %g3 <== NOT EXECUTED 200a640: 84 17 00 01 or %i4, %g1, %g2 <== NOT EXECUTED 200a644: 83 30 e0 1b srl %g3, 0x1b, %g1 <== NOT EXECUTED 200a648: 99 28 a0 05 sll %g2, 5, %o4 <== NOT EXECUTED 200a64c: 9b 28 e0 05 sll %g3, 5, %o5 <== NOT EXECUTED 200a650: 98 10 40 0c or %g1, %o4, %o4 <== NOT EXECUTED 200a654: 9a a3 40 03 subcc %o5, %g3, %o5 <== NOT EXECUTED 200a658: 83 33 60 1a srl %o5, 0x1a, %g1 <== NOT EXECUTED 200a65c: 98 63 00 02 subx %o4, %g2, %o4 <== NOT EXECUTED 200a660: 87 2b 60 06 sll %o5, 6, %g3 <== NOT EXECUTED 200a664: 85 2b 20 06 sll %o4, 6, %g2 <== NOT EXECUTED 200a668: 92 a0 c0 0d subcc %g3, %o5, %o1 <== NOT EXECUTED 200a66c: 84 10 40 02 or %g1, %g2, %g2 <== NOT EXECUTED 200a670: 90 60 80 0c subx %g2, %o4, %o0 <== NOT EXECUTED 200a674: 92 82 40 0b addcc %o1, %o3, %o1 <== NOT EXECUTED 200a678: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a67c: 90 42 00 0a addx %o0, %o2, %o0 <== NOT EXECUTED 200a680: b7 2a 60 02 sll %o1, 2, %i3 <== NOT EXECUTED 200a684: b5 2a 20 02 sll %o0, 2, %i2 <== NOT EXECUTED 200a688: 92 82 40 1b addcc %o1, %i3, %o1 <== NOT EXECUTED 200a68c: b4 10 40 1a or %g1, %i2, %i2 <== NOT EXECUTED 200a690: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a694: 90 42 00 1a addx %o0, %i2, %o0 <== NOT EXECUTED 200a698: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED 200a69c: b9 2a 20 02 sll %o0, 2, %i4 <== NOT EXECUTED 200a6a0: 92 82 40 1d addcc %o1, %i5, %o1 <== NOT EXECUTED 200a6a4: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a6a8: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED 200a6ac: 90 42 00 1c addx %o0, %i4, %o0 <== NOT EXECUTED 200a6b0: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED 200a6b4: b9 2a 20 02 sll %o0, 2, %i4 <== NOT EXECUTED 200a6b8: 92 82 40 1d addcc %o1, %i5, %o1 <== NOT EXECUTED 200a6bc: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a6c0: 83 2a 60 09 sll %o1, 9, %g1 <== NOT EXECUTED 200a6c4: 90 42 00 1c addx %o0, %i4, %o0 <== NOT EXECUTED left += lhs->tv_nsec; 200a6c8: 95 39 20 1f sra %g4, 0x1f, %o2 <== NOT EXECUTED 200a6cc: 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; 200a6d0: 87 32 60 17 srl %o1, 0x17, %g3 <== NOT EXECUTED 200a6d4: 85 2a 20 09 sll %o0, 9, %g2 <== NOT EXECUTED 200a6d8: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED left += lhs->tv_nsec; 200a6dc: 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; 200a6e0: 83 2a a0 02 sll %o2, 2, %g1 <== NOT EXECUTED 200a6e4: 9b 2a e0 02 sll %o3, 2, %o5 <== NOT EXECUTED 200a6e8: 85 32 e0 1e srl %o3, 0x1e, %g2 <== NOT EXECUTED 200a6ec: 98 10 80 01 or %g2, %g1, %o4 <== NOT EXECUTED 200a6f0: 83 33 60 1b srl %o5, 0x1b, %g1 <== NOT EXECUTED 200a6f4: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 200a6f8: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 200a6fc: 84 10 40 02 or %g1, %g2, %g2 <== NOT EXECUTED 200a700: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 200a704: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 200a708: 96 80 c0 0b addcc %g3, %o3, %o3 <== NOT EXECUTED 200a70c: 83 32 e0 1e srl %o3, 0x1e, %g1 <== NOT EXECUTED 200a710: 94 40 80 0a addx %g2, %o2, %o2 <== NOT EXECUTED 200a714: bb 2a e0 02 sll %o3, 2, %i5 <== NOT EXECUTED 200a718: b9 2a a0 02 sll %o2, 2, %i4 <== NOT EXECUTED 200a71c: ba 82 c0 1d addcc %o3, %i5, %i5 <== NOT EXECUTED 200a720: b8 10 40 1c or %g1, %i4, %i4 <== NOT EXECUTED 200a724: 83 37 60 1e srl %i5, 0x1e, %g1 <== NOT EXECUTED 200a728: b8 42 80 1c addx %o2, %i4, %i4 <== NOT EXECUTED 200a72c: 93 2f 60 02 sll %i5, 2, %o1 <== NOT EXECUTED 200a730: 91 2f 20 02 sll %i4, 2, %o0 <== NOT EXECUTED 200a734: 92 87 40 09 addcc %i5, %o1, %o1 <== NOT EXECUTED 200a738: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200a73c: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200a740: 90 47 00 08 addx %i4, %o0, %o0 <== NOT EXECUTED 200a744: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200a748: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200a74c: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200a750: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED 200a754: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 200a758: 40 00 3a 49 call 201907c <__udivdi3> <== NOT EXECUTED 200a75c: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a760: 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; 200a764: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED 200a768: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED *ival_percentage = answer / 1000; 200a76c: 40 00 3a 44 call 201907c <__udivdi3> <== NOT EXECUTED 200a770: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200a774: 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; 200a778: d2 24 00 00 st %o1, [ %l0 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200a77c: 94 10 20 00 clr %o2 <== NOT EXECUTED 200a780: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200a784: 40 00 3b 13 call 20193d0 <__umoddi3> <== NOT EXECUTED 200a788: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200a78c: d2 24 40 00 st %o1, [ %l1 ] <== NOT EXECUTED 200a790: 81 c7 e0 08 ret <== NOT EXECUTED 200a794: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200c540 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c540: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c544: d4 1e 40 00 ldd [ %i1 ], %o2 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200c548: a2 10 00 1a mov %i2, %l1 Timestamp64_Control answer; if ( *_rhs == 0 ) { 200c54c: 80 92 80 0b orcc %o2, %o3, %g0 200c550: 12 80 00 06 bne 200c568 <_Timestamp64_Divide+0x28> <== ALWAYS TAKEN 200c554: a0 10 00 1b mov %i3, %l0 *_ival_percentage = 0; 200c558: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *_fval_percentage = 0; 200c55c: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200c560: 81 c7 e0 08 ret <== NOT EXECUTED 200c564: 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; 200c568: d0 1e 00 00 ldd [ %i0 ], %o0 200c56c: 83 2a 20 02 sll %o0, 2, %g1 200c570: 89 32 60 1e srl %o1, 0x1e, %g4 200c574: 87 2a 60 02 sll %o1, 2, %g3 200c578: 84 11 00 01 or %g4, %g1, %g2 200c57c: 83 30 e0 1b srl %g3, 0x1b, %g1 200c580: 9b 28 e0 05 sll %g3, 5, %o5 200c584: 99 28 a0 05 sll %g2, 5, %o4 200c588: 86 a3 40 03 subcc %o5, %g3, %g3 200c58c: 98 10 40 0c or %g1, %o4, %o4 200c590: 84 63 00 02 subx %o4, %g2, %g2 200c594: 92 80 c0 09 addcc %g3, %o1, %o1 200c598: 83 32 60 1e srl %o1, 0x1e, %g1 200c59c: 90 40 80 08 addx %g2, %o0, %o0 200c5a0: b7 2a 60 02 sll %o1, 2, %i3 200c5a4: b5 2a 20 02 sll %o0, 2, %i2 200c5a8: b6 82 40 1b addcc %o1, %i3, %i3 200c5ac: b4 10 40 1a or %g1, %i2, %i2 200c5b0: 83 36 e0 1e srl %i3, 0x1e, %g1 200c5b4: b4 42 00 1a addx %o0, %i2, %i2 200c5b8: bb 2e e0 02 sll %i3, 2, %i5 200c5bc: b9 2e a0 02 sll %i2, 2, %i4 200c5c0: 92 86 c0 1d addcc %i3, %i5, %o1 200c5c4: b8 10 40 1c or %g1, %i4, %i4 200c5c8: 87 32 60 1b srl %o1, 0x1b, %g3 200c5cc: 90 46 80 1c addx %i2, %i4, %o0 200c5d0: 83 2a 60 05 sll %o1, 5, %g1 200c5d4: 85 2a 20 05 sll %o0, 5, %g2 200c5d8: 92 10 00 01 mov %g1, %o1 200c5dc: 40 00 3a 0d call 201ae10 <__divdi3> 200c5e0: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200c5e4: 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; 200c5e8: b4 10 00 08 mov %o0, %i2 200c5ec: b8 10 00 09 mov %o1, %i4 *_ival_percentage = answer / 1000; 200c5f0: 40 00 3a 08 call 201ae10 <__divdi3> 200c5f4: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200c5f8: 90 10 00 1a mov %i2, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200c5fc: d2 24 40 00 st %o1, [ %l1 ] *_fval_percentage = answer % 1000; 200c600: 94 10 20 00 clr %o2 200c604: 92 10 00 1c mov %i4, %o1 200c608: 40 00 3a e8 call 201b1a8 <__moddi3> 200c60c: 96 10 23 e8 mov 0x3e8, %o3 200c610: d2 24 00 00 st %o1, [ %l0 ] 200c614: 81 c7 e0 08 ret 200c618: 81 e8 00 00 restore =============================================================================== 0200abd8 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200abd8: 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; 200abdc: 03 00 80 73 sethi %hi(0x201cc00), %g1 200abe0: 82 10 62 2c or %g1, 0x22c, %g1 ! 201ce2c ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200abe4: 05 00 80 77 sethi %hi(0x201dc00), %g2 initial_extensions = Configuration.User_extension_table; 200abe8: 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; 200abec: f6 00 60 40 ld [ %g1 + 0x40 ], %i3 200abf0: 82 10 a1 f8 or %g2, 0x1f8, %g1 200abf4: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200abf8: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200abfc: 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; 200ac00: c6 20 a1 f8 st %g3, [ %g2 + 0x1f8 ] 200ac04: 05 00 80 77 sethi %hi(0x201dc00), %g2 200ac08: 82 10 a0 14 or %g2, 0x14, %g1 ! 201dc14 <_User_extensions_Switches_list> 200ac0c: 86 00 60 04 add %g1, 4, %g3 head->previous = NULL; 200ac10: c0 20 60 04 clr [ %g1 + 4 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200ac14: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200ac18: 80 a6 a0 00 cmp %i2, 0 200ac1c: 02 80 00 1b be 200ac88 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200ac20: c2 20 60 08 st %g1, [ %g1 + 8 ] extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200ac24: 83 2e e0 02 sll %i3, 2, %g1 200ac28: bb 2e e0 04 sll %i3, 4, %i5 200ac2c: ba 27 40 01 sub %i5, %g1, %i5 200ac30: ba 07 40 1b add %i5, %i3, %i5 200ac34: 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 *) 200ac38: 40 00 01 6c call 200b1e8 <_Workspace_Allocate_or_fatal_error> 200ac3c: 90 10 00 1d mov %i5, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200ac40: 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 *) 200ac44: b8 10 00 08 mov %o0, %i4 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200ac48: 92 10 20 00 clr %o1 200ac4c: 40 00 15 a2 call 20102d4 200ac50: ba 10 20 00 clr %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200ac54: 10 80 00 0b b 200ac80 <_User_extensions_Handler_initialization+0xa8> 200ac58: 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; 200ac5c: 90 07 20 14 add %i4, 0x14, %o0 200ac60: 92 06 80 09 add %i2, %o1, %o1 200ac64: 40 00 15 60 call 20101e4 200ac68: 94 10 20 20 mov 0x20, %o2 _User_extensions_Add_set( extension ); 200ac6c: 90 10 00 1c mov %i4, %o0 200ac70: 40 00 0c 95 call 200dec4 <_User_extensions_Add_set> 200ac74: ba 07 60 01 inc %i5 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200ac78: 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++ ) { 200ac7c: 80 a7 40 1b cmp %i5, %i3 200ac80: 12 bf ff f7 bne 200ac5c <_User_extensions_Handler_initialization+0x84> 200ac84: 93 2f 60 05 sll %i5, 5, %o1 200ac88: 81 c7 e0 08 ret 200ac8c: 81 e8 00 00 restore =============================================================================== 0200c90c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200c90c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200c910: 7f ff da d6 call 2003468 200c914: 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; 200c918: 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 ); 200c91c: 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 ) ) { 200c920: 80 a0 40 1c cmp %g1, %i4 200c924: 02 80 00 1f be 200c9a0 <_Watchdog_Adjust+0x94> 200c928: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200c92c: 02 80 00 1a be 200c994 <_Watchdog_Adjust+0x88> 200c930: b6 10 20 01 mov 1, %i3 200c934: 80 a6 60 01 cmp %i1, 1 200c938: 12 80 00 1a bne 200c9a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN 200c93c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200c940: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c944: 10 80 00 07 b 200c960 <_Watchdog_Adjust+0x54> 200c948: b4 00 80 1a add %g2, %i2, %i2 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 200c94c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200c950: 80 a6 80 02 cmp %i2, %g2 200c954: 3a 80 00 05 bcc,a 200c968 <_Watchdog_Adjust+0x5c> 200c958: f6 20 60 10 st %i3, [ %g1 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 200c95c: b4 20 80 1a sub %g2, %i2, %i2 break; 200c960: 10 80 00 10 b 200c9a0 <_Watchdog_Adjust+0x94> 200c964: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } else { units -= _Watchdog_First( header )->delta_interval; 200c968: b4 26 80 02 sub %i2, %g2, %i2 _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); 200c96c: 7f ff da c3 call 2003478 200c970: 01 00 00 00 nop _Watchdog_Tickle( header ); 200c974: 40 00 00 90 call 200cbb4 <_Watchdog_Tickle> 200c978: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200c97c: 7f ff da bb call 2003468 200c980: 01 00 00 00 nop if ( _Chain_Is_empty( header ) ) 200c984: c2 07 40 00 ld [ %i5 ], %g1 200c988: 80 a0 40 1c cmp %g1, %i4 200c98c: 02 80 00 05 be 200c9a0 <_Watchdog_Adjust+0x94> 200c990: 01 00 00 00 nop switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200c994: 80 a6 a0 00 cmp %i2, 0 200c998: 32 bf ff ed bne,a 200c94c <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN 200c99c: c2 07 40 00 ld [ %i5 ], %g1 } break; } } _ISR_Enable( level ); 200c9a0: 7f ff da b6 call 2003478 200c9a4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200aff0 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200aff0: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200aff4: 7f ff dd 7e call 20025ec 200aff8: ba 10 00 18 mov %i0, %i5 previous_state = the_watchdog->state; 200affc: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 200b000: 80 a6 20 01 cmp %i0, 1 200b004: 22 80 00 1d be,a 200b078 <_Watchdog_Remove+0x88> 200b008: c0 27 60 08 clr [ %i5 + 8 ] 200b00c: 0a 80 00 1c bcs 200b07c <_Watchdog_Remove+0x8c> 200b010: 03 00 80 77 sethi %hi(0x201dc00), %g1 200b014: 80 a6 20 03 cmp %i0, 3 200b018: 18 80 00 19 bgu 200b07c <_Watchdog_Remove+0x8c> <== NEVER TAKEN 200b01c: 01 00 00 00 nop 200b020: c2 07 40 00 ld [ %i5 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200b024: c0 27 60 08 clr [ %i5 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200b028: c4 00 40 00 ld [ %g1 ], %g2 200b02c: 80 a0 a0 00 cmp %g2, 0 200b030: 02 80 00 07 be 200b04c <_Watchdog_Remove+0x5c> 200b034: 05 00 80 77 sethi %hi(0x201dc00), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200b038: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200b03c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 200b040: 84 00 c0 02 add %g3, %g2, %g2 200b044: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200b048: 05 00 80 77 sethi %hi(0x201dc00), %g2 200b04c: c4 00 a1 1c ld [ %g2 + 0x11c ], %g2 ! 201dd1c <_Watchdog_Sync_count> 200b050: 80 a0 a0 00 cmp %g2, 0 200b054: 22 80 00 07 be,a 200b070 <_Watchdog_Remove+0x80> 200b058: c4 07 60 04 ld [ %i5 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200b05c: 05 00 80 78 sethi %hi(0x201e000), %g2 200b060: c6 00 a1 58 ld [ %g2 + 0x158 ], %g3 ! 201e158 <_Per_CPU_Information+0x8> 200b064: 05 00 80 77 sethi %hi(0x201dc00), %g2 200b068: c6 20 a0 bc st %g3, [ %g2 + 0xbc ] ! 201dcbc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200b06c: c4 07 60 04 ld [ %i5 + 4 ], %g2 next->previous = previous; 200b070: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200b074: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b078: 03 00 80 77 sethi %hi(0x201dc00), %g1 200b07c: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 201dd20 <_Watchdog_Ticks_since_boot> 200b080: c2 27 60 18 st %g1, [ %i5 + 0x18 ] _ISR_Enable( level ); 200b084: 7f ff dd 5e call 20025fc 200b088: 01 00 00 00 nop return( previous_state ); } 200b08c: 81 c7 e0 08 ret 200b090: 81 e8 00 00 restore =============================================================================== 0200c248 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c248: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c24c: 7f ff db 57 call 2002fa8 200c250: ba 10 00 18 mov %i0, %i5 200c254: b0 10 00 08 mov %o0, %i0 printk( "Watchdog Chain: %s %p\n", name, header ); 200c258: 11 00 80 76 sethi %hi(0x201d800), %o0 200c25c: 94 10 00 19 mov %i1, %o2 200c260: 90 12 21 80 or %o0, 0x180, %o0 200c264: 7f ff e3 3e call 2004f5c 200c268: 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; 200c26c: 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 ); 200c270: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200c274: 80 a7 00 19 cmp %i4, %i1 200c278: 12 80 00 04 bne 200c288 <_Watchdog_Report_chain+0x40> 200c27c: 92 10 00 1c mov %i4, %o1 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200c280: 10 80 00 0d b 200c2b4 <_Watchdog_Report_chain+0x6c> 200c284: 11 00 80 76 sethi %hi(0x201d800), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c288: 40 00 00 0f call 200c2c4 <_Watchdog_Report> 200c28c: 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 ) 200c290: 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 ) ; 200c294: 80 a7 00 19 cmp %i4, %i1 200c298: 12 bf ff fc bne 200c288 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN 200c29c: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c2a0: 11 00 80 76 sethi %hi(0x201d800), %o0 200c2a4: 92 10 00 1d mov %i5, %o1 200c2a8: 7f ff e3 2d call 2004f5c 200c2ac: 90 12 21 98 or %o0, 0x198, %o0 200c2b0: 30 80 00 03 b,a 200c2bc <_Watchdog_Report_chain+0x74> } else { printk( "Chain is empty\n" ); 200c2b4: 7f ff e3 2a call 2004f5c 200c2b8: 90 12 21 a8 or %o0, 0x1a8, %o0 } _ISR_Enable( level ); 200c2bc: 7f ff db 3f call 2002fb8 200c2c0: 81 e8 00 00 restore =============================================================================== 02025e28 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2025e28: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2025e2c: 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; 2025e30: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while (count > 0) 2025e34: 10 80 00 18 b 2025e94 <_fat_block_read+0x6c> 2025e38: b0 10 20 00 clr %i0 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 2025e3c: 92 10 00 19 mov %i1, %o1 2025e40: 94 10 20 01 mov 1, %o2 2025e44: 7f ff ff 22 call 2025acc 2025e48: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025e4c: 80 a2 20 00 cmp %o0, 0 2025e50: 12 80 00 16 bne 2025ea8 <_fat_block_read+0x80> <== NEVER TAKEN 2025e54: 01 00 00 00 nop return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2025e58: e0 17 40 00 lduh [ %i5 ], %l0 2025e5c: a0 24 00 1a sub %l0, %i2, %l0 2025e60: 80 a4 00 1b cmp %l0, %i3 2025e64: 38 80 00 02 bgu,a 2025e6c <_fat_block_read+0x44> 2025e68: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2025e6c: c2 07 bf fc ld [ %fp + -4 ], %g1 2025e70: 90 07 00 18 add %i4, %i0, %o0 2025e74: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2025e78: 94 10 00 10 mov %l0, %o2 2025e7c: 92 02 40 1a add %o1, %i2, %o1 2025e80: 40 00 7c c9 call 20451a4 2025e84: b6 26 c0 10 sub %i3, %l0, %i3 count -= c; cmpltd += c; 2025e88: b0 04 00 18 add %l0, %i0, %i0 blk++; 2025e8c: b2 06 60 01 inc %i1 ofs = 0; 2025e90: 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) 2025e94: 80 a6 e0 00 cmp %i3, 0 2025e98: 12 bf ff e9 bne 2025e3c <_fat_block_read+0x14> 2025e9c: 90 10 00 1d mov %i5, %o0 2025ea0: 81 c7 e0 08 ret 2025ea4: 81 e8 00 00 restore cmpltd += c; blk++; ofs = 0; } return cmpltd; } 2025ea8: 81 c7 e0 08 ret <== NOT EXECUTED 2025eac: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02025f48 <_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); 2025f48: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 2025f4c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2025f50: 7f ff ff 5d call 2025cc4 <== NOT EXECUTED 2025f54: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02025eb0 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2025eb0: 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; 2025eb4: a2 10 20 01 mov 1, %l1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2025eb8: 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; 2025ebc: c0 27 bf fc clr [ %fp + -4 ] uint32_t c = 0; while(count > 0) 2025ec0: 10 80 00 1b b 2025f2c <_fat_block_write+0x7c> 2025ec4: b0 10 20 00 clr %i0 { c = MIN(count, (fs_info->vol.bps - ofs)); 2025ec8: a0 20 40 1a sub %g1, %i2, %l0 2025ecc: 80 a4 00 1b cmp %l0, %i3 2025ed0: 38 80 00 02 bgu,a 2025ed8 <_fat_block_write+0x28> 2025ed4: 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); 2025ed8: 90 10 00 1d mov %i5, %o0 2025edc: 92 10 00 19 mov %i1, %o1 while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 2025ee0: 80 a4 00 01 cmp %l0, %g1 2025ee4: 02 80 00 03 be 2025ef0 <_fat_block_write+0x40> 2025ee8: 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); 2025eec: 94 10 20 01 mov 1, %o2 2025ef0: 7f ff fe f7 call 2025acc 2025ef4: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025ef8: 80 a2 20 00 cmp %o0, 0 2025efc: 12 80 00 11 bne 2025f40 <_fat_block_write+0x90> <== NEVER TAKEN 2025f00: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2025f04: 92 07 00 18 add %i4, %i0, %o1 2025f08: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2025f0c: 94 10 00 10 mov %l0, %o2 2025f10: 90 02 00 1a add %o0, %i2, %o0 2025f14: 40 00 7c a4 call 20451a4 2025f18: b6 26 c0 10 sub %i3, %l0, %i3 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2025f1c: b0 04 00 18 add %l0, %i0, %i0 2025f20: e2 2f 60 7c stb %l1, [ %i5 + 0x7c ] blk++; 2025f24: b2 06 60 01 inc %i1 ofs = 0; 2025f28: 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) 2025f2c: 80 a6 e0 00 cmp %i3, 0 2025f30: 32 bf ff e6 bne,a 2025ec8 <_fat_block_write+0x18> 2025f34: c2 17 40 00 lduh [ %i5 ], %g1 2025f38: 81 c7 e0 08 ret 2025f3c: 81 e8 00 00 restore cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 2025f40: 81 c7 e0 08 ret <== NOT EXECUTED 2025f44: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02024df0 <_hash_search>: rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 2024df0: 9d e3 bf a0 save %sp, -96, %sp uint32_t mod = (key1) % FAT_HASH_MODULE; 2024df4: 84 0e a0 01 and %i2, 1, %g2 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2024df8: 87 28 a0 02 sll %g2, 2, %g3 2024dfc: 83 28 a0 04 sll %g2, 4, %g1 2024e00: 82 20 40 03 sub %g1, %g3, %g1 2024e04: 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; 2024e08: fa 06 40 01 ld [ %i1 + %g1 ], %i5 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2024e0c: 10 80 00 11 b 2024e50 <_hash_search+0x60> 2024e10: 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); 2024e14: 7f ff ff e5 call 2024da8 2024e18: 92 07 60 20 add %i5, 0x20, %o1 if ( (key1) == ck) 2024e1c: 80 a6 80 08 cmp %i2, %o0 2024e20: 32 80 00 0c bne,a 2024e50 <_hash_search+0x60> 2024e24: fa 07 40 00 ld [ %i5 ], %i5 { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 2024e28: 80 a6 e0 00 cmp %i3, 0 2024e2c: 22 80 00 07 be,a 2024e48 <_hash_search+0x58> <== ALWAYS TAKEN 2024e30: fa 27 00 00 st %i5, [ %i4 ] 2024e34: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 2024e38: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 2024e3c: 32 80 00 05 bne,a 2024e50 <_hash_search+0x60> <== NOT EXECUTED 2024e40: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED { *ret = (void *)the_node; 2024e44: fa 27 00 00 st %i5, [ %i4 ] <== NOT EXECUTED return 0; 2024e48: 81 c7 e0 08 ret 2024e4c: 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) ; ) 2024e50: 80 a7 40 19 cmp %i5, %i1 2024e54: 12 bf ff f0 bne 2024e14 <_hash_search+0x24> 2024e58: 90 10 00 18 mov %i0, %o0 } } the_node = the_node->next; } return -1; } 2024e5c: 81 c7 e0 08 ret 2024e60: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 020286f0 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 20286f0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20286f4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20286f8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20286fc: 7f ff ff e9 call 20286a0 <== NOT EXECUTED 2028700: 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 =============================================================================== 02007978 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 2007978: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 200797c: 3b 00 80 80 sethi %hi(0x2020000), %i5 2007980: 40 00 04 66 call 2008b18 2007984: 90 17 60 24 or %i5, 0x24, %o0 ! 2020024 if (fcntl (fildes, F_GETFD) < 0) { 2007988: 90 10 00 18 mov %i0, %o0 200798c: 40 00 1a ab call 200e438 2007990: 92 10 20 01 mov 1, %o1 2007994: 80 a2 20 00 cmp %o0, 0 2007998: 16 80 00 08 bge 20079b8 200799c: 80 a6 60 00 cmp %i1, 0 pthread_mutex_unlock(&aio_request_queue.mutex); 20079a0: 40 00 04 7e call 2008b98 20079a4: 90 17 60 24 or %i5, 0x24, %o0 rtems_set_errno_and_return_minus_one (EBADF); 20079a8: 40 00 28 7e call 2011ba0 <__errno> 20079ac: 01 00 00 00 nop 20079b0: 10 80 00 4e b 2007ae8 20079b4: 82 10 20 09 mov 9, %g1 ! 9 } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 20079b8: 32 80 00 2f bne,a 2007a74 20079bc: f8 06 40 00 ld [ %i1 ], %i4 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 20079c0: 11 00 80 80 sethi %hi(0x2020000), %o0 20079c4: 92 10 00 18 mov %i0, %o1 20079c8: 90 12 20 6c or %o0, 0x6c, %o0 20079cc: 40 00 01 6f call 2007f88 20079d0: 94 10 20 00 clr %o2 if (r_chain == NULL) { 20079d4: b8 92 20 00 orcc %o0, 0, %i4 20079d8: 32 80 00 1a bne,a 2007a40 20079dc: b2 07 20 1c add %i4, 0x1c, %i1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20079e0: ba 17 60 24 or %i5, 0x24, %i5 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 20079e4: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 20079e8: 82 07 60 58 add %i5, 0x58, %g1 20079ec: 80 a0 80 01 cmp %g2, %g1 20079f0: 02 80 00 48 be 2007b10 <== NEVER TAKEN 20079f4: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 20079f8: 92 10 00 18 mov %i0, %o1 20079fc: 40 00 01 63 call 2007f88 2007a00: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007a04: b8 92 20 00 orcc %o0, 0, %i4 2007a08: 22 80 00 43 be,a 2007b14 2007a0c: 90 10 00 1d mov %i5, %o0 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2007a10: 40 00 0a ca call 200a538 <_Chain_Extract> 2007a14: b2 07 20 1c add %i4, 0x1c, %i1 } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007a18: 40 00 01 87 call 2008034 2007a1c: 90 10 00 1c mov %i4, %o0 pthread_mutex_destroy (&r_chain->mutex); 2007a20: 40 00 03 99 call 2008884 2007a24: 90 10 00 19 mov %i1, %o0 pthread_cond_destroy (&r_chain->mutex); 2007a28: 40 00 02 be call 2008520 2007a2c: 90 10 00 19 mov %i1, %o0 free (r_chain); 2007a30: 7f ff f0 9e call 2003ca8 2007a34: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007a38: 10 80 00 0b b 2007a64 2007a3c: 90 10 00 1d mov %i5, %o0 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007a40: 40 00 04 36 call 2008b18 2007a44: 90 10 00 19 mov %i1, %o0 2007a48: 40 00 0a bc call 200a538 <_Chain_Extract> 2007a4c: 90 10 00 1c mov %i4, %o0 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 2007a50: 40 00 01 79 call 2008034 2007a54: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&r_chain->mutex); 2007a58: 40 00 04 50 call 2008b98 2007a5c: 90 10 00 19 mov %i1, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007a60: 90 17 60 24 or %i5, 0x24, %o0 2007a64: 40 00 04 4d call 2008b98 2007a68: b0 10 20 00 clr %i0 return AIO_CANCELED; 2007a6c: 81 c7 e0 08 ret 2007a70: 81 e8 00 00 restore } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 2007a74: 80 a7 00 18 cmp %i4, %i0 2007a78: 12 80 00 17 bne 2007ad4 2007a7c: 90 17 60 24 or %i5, 0x24, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 2007a80: 11 00 80 80 sethi %hi(0x2020000), %o0 2007a84: 92 10 00 1c mov %i4, %o1 2007a88: 90 12 20 6c or %o0, 0x6c, %o0 2007a8c: 40 00 01 3f call 2007f88 2007a90: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007a94: b0 92 20 00 orcc %o0, 0, %i0 2007a98: 32 80 00 23 bne,a 2007b24 2007a9c: b8 06 20 1c add %i0, 0x1c, %i4 2007aa0: ba 17 60 24 or %i5, 0x24, %i5 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 2007aa4: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 2007aa8: 82 07 60 58 add %i5, 0x58, %g1 2007aac: 80 a0 80 01 cmp %g2, %g1 2007ab0: 02 80 00 18 be 2007b10 <== NEVER TAKEN 2007ab4: 90 07 60 54 add %i5, 0x54, %o0 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 2007ab8: 92 10 00 1c mov %i4, %o1 2007abc: 40 00 01 33 call 2007f88 2007ac0: 94 10 20 00 clr %o2 if (r_chain == NULL) { 2007ac4: 80 a2 20 00 cmp %o0, 0 2007ac8: 12 80 00 0b bne 2007af4 2007acc: 92 10 00 19 mov %i1, %o1 pthread_mutex_unlock (&aio_request_queue.mutex); 2007ad0: 90 10 00 1d mov %i5, %o0 2007ad4: 40 00 04 31 call 2008b98 2007ad8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one (EINVAL); 2007adc: 40 00 28 31 call 2011ba0 <__errno> 2007ae0: 01 00 00 00 nop 2007ae4: 82 10 20 16 mov 0x16, %g1 ! 16 2007ae8: c2 22 00 00 st %g1, [ %o0 ] 2007aec: 81 c7 e0 08 ret 2007af0: 91 e8 3f ff restore %g0, -1, %o0 } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007af4: 40 00 01 64 call 2008084 2007af8: 90 02 20 08 add %o0, 8, %o0 2007afc: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007b00: 40 00 04 26 call 2008b98 2007b04: 90 10 00 1d mov %i5, %o0 return result; 2007b08: 81 c7 e0 08 ret 2007b0c: 81 e8 00 00 restore } else { pthread_mutex_unlock (&aio_request_queue.mutex); 2007b10: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2007b14: 40 00 04 21 call 2008b98 2007b18: b0 10 20 02 mov 2, %i0 return AIO_ALLDONE; 2007b1c: 81 c7 e0 08 ret 2007b20: 81 e8 00 00 restore } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 2007b24: 40 00 03 fd call 2008b18 2007b28: 90 10 00 1c mov %i4, %o0 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 2007b2c: 92 10 00 19 mov %i1, %o1 2007b30: 40 00 01 55 call 2008084 2007b34: 90 06 20 08 add %i0, 8, %o0 2007b38: b0 10 00 08 mov %o0, %i0 pthread_mutex_unlock (&r_chain->mutex); 2007b3c: 40 00 04 17 call 2008b98 2007b40: 90 10 00 1c mov %i4, %o0 pthread_mutex_unlock (&aio_request_queue.mutex); 2007b44: 40 00 04 15 call 2008b98 2007b48: 90 17 60 24 or %i5, 0x24, %o0 return result; } return AIO_ALLDONE; } 2007b4c: 81 c7 e0 08 ret 2007b50: 81 e8 00 00 restore =============================================================================== 02007b5c : int aio_fsync( int op, struct aiocb *aiocbp ) { 2007b5c: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; if (op != O_SYNC) 2007b60: 03 00 00 08 sethi %hi(0x2000), %g1 2007b64: 80 a6 00 01 cmp %i0, %g1 2007b68: 12 80 00 10 bne 2007ba8 2007b6c: ba 10 20 16 mov 0x16, %i5 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 2007b70: d0 06 40 00 ld [ %i1 ], %o0 2007b74: 40 00 1a 31 call 200e438 2007b78: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2007b7c: 90 0a 20 03 and %o0, 3, %o0 2007b80: 90 02 3f ff add %o0, -1, %o0 2007b84: 80 a2 20 01 cmp %o0, 1 2007b88: 18 80 00 08 bgu 2007ba8 2007b8c: ba 10 20 09 mov 9, %i5 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2007b90: 7f ff f1 9d call 2004204 2007b94: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2007b98: 80 a2 20 00 cmp %o0, 0 2007b9c: 32 80 00 0b bne,a 2007bc8 <== ALWAYS TAKEN 2007ba0: f2 22 20 14 st %i1, [ %o0 + 0x14 ] rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2007ba4: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED 2007ba8: 82 10 3f ff mov -1, %g1 2007bac: fa 26 60 34 st %i5, [ %i1 + 0x34 ] 2007bb0: c2 26 60 38 st %g1, [ %i1 + 0x38 ] 2007bb4: 40 00 27 fb call 2011ba0 <__errno> 2007bb8: b0 10 3f ff mov -1, %i0 2007bbc: fa 22 00 00 st %i5, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 2007bc0: 81 c7 e0 08 ret 2007bc4: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; 2007bc8: 82 10 20 03 mov 3, %g1 2007bcc: c2 26 60 30 st %g1, [ %i1 + 0x30 ] return rtems_aio_enqueue (req); 2007bd0: 40 00 01 4a call 20080f8 2007bd4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02008328 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 2008328: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 200832c: d0 06 00 00 ld [ %i0 ], %o0 2008330: 40 00 18 42 call 200e438 2008334: 92 10 20 03 mov 3, %o1 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 2008338: 90 0a 20 03 and %o0, 3, %o0 200833c: 80 a2 20 02 cmp %o0, 2 2008340: 02 80 00 05 be 2008354 2008344: ba 10 00 18 mov %i0, %i5 2008348: 80 a2 20 00 cmp %o0, 0 200834c: 12 80 00 10 bne 200838c <== ALWAYS TAKEN 2008350: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 2008354: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2008358: 80 a0 60 00 cmp %g1, 0 200835c: 32 80 00 0c bne,a 200838c 2008360: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 2008364: c2 07 60 08 ld [ %i5 + 8 ], %g1 2008368: 80 a0 60 00 cmp %g1, 0 200836c: 26 80 00 08 bl,a 200838c 2008370: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 2008374: 7f ff ef a4 call 2004204 2008378: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 200837c: 80 a2 20 00 cmp %o0, 0 2008380: 32 80 00 0b bne,a 20083ac <== ALWAYS TAKEN 2008384: fa 22 20 14 st %i5, [ %o0 + 0x14 ] 2008388: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 200838c: 82 10 3f ff mov -1, %g1 2008390: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 2008394: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 2008398: 40 00 26 02 call 2011ba0 <__errno> 200839c: b0 10 3f ff mov -1, %i0 20083a0: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 20083a4: 81 c7 e0 08 ret 20083a8: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; 20083ac: 82 10 20 01 mov 1, %g1 20083b0: c2 27 60 30 st %g1, [ %i5 + 0x30 ] return rtems_aio_enqueue (req); 20083b4: 7f ff ff 51 call 20080f8 20083b8: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020083c4 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 20083c4: 9d e3 bf a0 save %sp, -96, %sp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 20083c8: d0 06 00 00 ld [ %i0 ], %o0 20083cc: 40 00 18 1b call 200e438 20083d0: 92 10 20 03 mov 3, %o1 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 20083d4: ba 10 00 18 mov %i0, %i5 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 20083d8: 90 0a 20 03 and %o0, 3, %o0 20083dc: 90 02 3f ff add %o0, -1, %o0 20083e0: 80 a2 20 01 cmp %o0, 1 20083e4: 18 80 00 10 bgu 2008424 20083e8: b8 10 20 09 mov 9, %i4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 20083ec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20083f0: 80 a0 60 00 cmp %g1, 0 20083f4: 32 80 00 0c bne,a 2008424 20083f8: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 20083fc: c2 06 20 08 ld [ %i0 + 8 ], %g1 2008400: 80 a0 60 00 cmp %g1, 0 2008404: 26 80 00 08 bl,a 2008424 2008408: b8 10 20 16 mov 0x16, %i4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 200840c: 7f ff ef 7e call 2004204 2008410: 90 10 20 18 mov 0x18, %o0 if (req == NULL) 2008414: 80 a2 20 00 cmp %o0, 0 2008418: 32 80 00 0b bne,a 2008444 <== ALWAYS TAKEN 200841c: f0 22 20 14 st %i0, [ %o0 + 0x14 ] 2008420: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 2008424: 82 10 3f ff mov -1, %g1 2008428: f8 27 60 34 st %i4, [ %i5 + 0x34 ] 200842c: c2 27 60 38 st %g1, [ %i5 + 0x38 ] 2008430: 40 00 25 dc call 2011ba0 <__errno> 2008434: b0 10 3f ff mov -1, %i0 2008438: f8 22 00 00 st %i4, [ %o0 ] req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 200843c: 81 c7 e0 08 ret 2008440: 81 e8 00 00 restore req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; 2008444: 82 10 20 02 mov 2, %g1 2008448: c2 26 20 30 st %g1, [ %i0 + 0x30 ] return rtems_aio_enqueue (req); 200844c: 7f ff ff 2b call 20080f8 2008450: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02027534 : #include #include int chroot( const char *path ) { 2027534: 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( 2027538: 94 10 20 19 mov 0x19, %o2 202753c: 92 10 00 18 mov %i0, %o1 2027540: 90 07 bf a4 add %fp, -92, %o0 2027544: 17 00 81 ac sethi %hi(0x206b000), %o3 2027548: 96 12 e0 dc or %o3, 0xdc, %o3 ! 206b0dc 202754c: 7f ff 8b 17 call 200a1a8 2027550: 98 02 ff fc add %o3, -4, %o4 2027554: 90 07 bf e0 add %fp, -32, %o0 2027558: 7f ff 8b eb call 200a504 202755c: 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 ); 2027560: 7f ff 8c 61 call 200a6e4 2027564: 90 07 bf e0 add %fp, -32, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 2027568: 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 ); 202756c: d0 27 bf fc st %o0, [ %fp + -4 ] if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 2027570: 3b 00 81 7d sethi %hi(0x205f400), %i5 2027574: ba 17 61 f4 or %i5, 0x1f4, %i5 ! 205f5f4 2027578: 80 a0 40 1d cmp %g1, %i5 202757c: 02 80 00 2a be 2027624 2027580: b0 10 3f ff mov -1, %i0 rtems_filesystem_global_location_t *new_root_loc = 2027584: 7f ff 8c 25 call 200a618 2027588: 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 ); 202758c: 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 = 2027590: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2027594: 9f c0 40 00 call %g1 2027598: b0 10 00 08 mov %o0, %i0 (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 202759c: 80 a2 20 00 cmp %o0, 0 20275a0: 32 80 00 17 bne,a 20275fc 20275a4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 sc = rtems_libio_set_private_env(); 20275a8: 40 00 05 67 call 2028b44 20275ac: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 20275b0: 80 a2 20 00 cmp %o0, 0 20275b4: 12 80 00 0c bne 20275e4 20275b8: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( 20275bc: 3b 00 81 ac sethi %hi(0x206b000), %i5 20275c0: d0 07 60 d4 ld [ %i5 + 0xd4 ], %o0 ! 206b0d4 20275c4: 92 10 00 18 mov %i0, %o1 20275c8: 7f ff 8c 0b call 200a5f4 20275cc: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 20275d0: d0 07 60 d4 ld [ %i5 + 0xd4 ], %o0 20275d4: d2 07 bf fc ld [ %fp + -4 ], %o1 20275d8: 7f ff 8c 07 call 200a5f4 20275dc: b0 10 20 00 clr %i0 20275e0: 30 80 00 11 b,a 2027624 &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 20275e4: 22 80 00 0e be,a 202761c <== NEVER TAKEN 20275e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED errno = ENOMEM; 20275ec: 40 00 69 ad call 2041ca0 <__errno> 20275f0: 01 00 00 00 nop 20275f4: 10 80 00 08 b 2027614 20275f8: 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 ) ) { 20275fc: 80 a0 40 1d cmp %g1, %i5 2027600: 22 80 00 07 be,a 202761c <== NEVER TAKEN 2027604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED errno = eno; 2027608: 40 00 69 a6 call 2041ca0 <__errno> 202760c: 01 00 00 00 nop 2027610: 82 10 20 14 mov 0x14, %g1 ! 14 2027614: 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 ); 2027618: 90 10 00 18 mov %i0, %o0 202761c: 7f ff 8b df call 200a598 2027620: b0 10 3f ff mov -1, %i0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2027624: 7f ff 8b 04 call 200a234 2027628: 90 07 bf a4 add %fp, -92, %o0 if ( rv != 0 ) { 202762c: 80 a6 20 00 cmp %i0, 0 2027630: 02 80 00 04 be 2027640 2027634: 01 00 00 00 nop rtems_filesystem_global_location_release( new_current_loc ); 2027638: 7f ff 8b d8 call 200a598 202763c: d0 07 bf fc ld [ %fp + -4 ], %o0 } return rv; } 2027640: 81 c7 e0 08 ret 2027644: 81 e8 00 00 restore =============================================================================== 02007504 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 2007504: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2007508: 80 a6 60 00 cmp %i1, 0 200750c: 12 80 00 06 bne 2007524 2007510: 80 a6 20 01 cmp %i0, 1 rtems_set_errno_and_return_minus_one( EINVAL ); 2007514: 40 00 25 1d call 2010988 <__errno> 2007518: 01 00 00 00 nop 200751c: 10 80 00 24 b 20075ac 2007520: 82 10 20 16 mov 0x16, %g1 ! 16 if ( clock_id == CLOCK_REALTIME ) { 2007524: 12 80 00 14 bne 2007574 2007528: 80 a6 20 04 cmp %i0, 4 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 200752c: 40 00 08 21 call 20095b0 <_TOD_Get_as_timestamp> 2007530: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2007534: f8 1f bf f8 ldd [ %fp + -8 ], %i4 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007538: 94 10 20 00 clr %o2 200753c: 90 10 00 1c mov %i4, %o0 2007540: 92 10 00 1d mov %i5, %o1 2007544: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007548: 40 00 53 a0 call 201c3c8 <__divdi3> 200754c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007550: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2007554: d2 26 40 00 st %o1, [ %i1 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2007558: 94 10 20 00 clr %o2 200755c: 92 10 00 1d mov %i5, %o1 2007560: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2007564: 40 00 54 7f call 201c760 <__moddi3> 2007568: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 200756c: 10 80 00 09 b 2007590 2007570: d2 26 60 04 st %o1, [ %i1 + 4 ] _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 2007574: 02 80 00 05 be 2007588 <== NEVER TAKEN 2007578: 01 00 00 00 nop return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 200757c: 80 a6 20 02 cmp %i0, 2 2007580: 12 80 00 06 bne 2007598 2007584: 80 a6 20 03 cmp %i0, 3 _TOD_Get_uptime_as_timespec( tp ); 2007588: 40 00 08 1d call 20095fc <_TOD_Get_uptime_as_timespec> 200758c: 90 10 00 19 mov %i1, %o0 return 0; 2007590: 81 c7 e0 08 ret 2007594: 91 e8 20 00 restore %g0, 0, %o0 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 2007598: 12 80 00 08 bne 20075b8 200759c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 20075a0: 40 00 24 fa call 2010988 <__errno> 20075a4: 01 00 00 00 nop 20075a8: 82 10 20 58 mov 0x58, %g1 ! 58 20075ac: c2 22 00 00 st %g1, [ %o0 ] 20075b0: 81 c7 e0 08 ret 20075b4: 91 e8 3f ff restore %g0, -1, %o0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 20075b8: 40 00 24 f4 call 2010988 <__errno> 20075bc: b0 10 3f ff mov -1, %i0 20075c0: 82 10 20 16 mov 0x16, %g1 20075c4: c2 22 00 00 st %g1, [ %o0 ] return 0; } 20075c8: 81 c7 e0 08 ret 20075cc: 81 e8 00 00 restore =============================================================================== 02029474 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 2029474: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 2029478: 80 a6 60 00 cmp %i1, 0 202947c: 02 80 00 0b be 20294a8 <== NEVER TAKEN 2029480: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 2029484: 80 a6 20 01 cmp %i0, 1 2029488: 12 80 00 46 bne 20295a0 202948c: 80 a6 20 02 cmp %i0, 2 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 2029490: c4 06 40 00 ld [ %i1 ], %g2 2029494: 03 08 76 b9 sethi %hi(0x21dae400), %g1 2029498: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 202949c: 80 a0 80 01 cmp %g2, %g1 20294a0: 38 80 00 06 bgu,a 20294b8 20294a4: 03 00 81 bc sethi %hi(0x206f000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 20294a8: 40 00 61 fe call 2041ca0 <__errno> 20294ac: 01 00 00 00 nop 20294b0: 10 80 00 44 b 20295c0 20294b4: 82 10 20 16 mov 0x16, %g1 ! 16 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 20294b8: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 20294bc: 84 00 a0 01 inc %g2 20294c0: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ] return _Thread_Dispatch_disable_level; 20294c4: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 const struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _Timestamp_Set( 20294c8: d6 06 40 00 ld [ %i1 ], %o3 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 20294cc: b0 10 20 00 clr %i0 20294d0: 95 3a e0 1f sra %o3, 0x1f, %o2 Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; 20294d4: 83 2a a0 03 sll %o2, 3, %g1 20294d8: 89 32 e0 1d srl %o3, 0x1d, %g4 20294dc: 87 2a e0 03 sll %o3, 3, %g3 20294e0: 84 11 00 01 or %g4, %g1, %g2 20294e4: 83 30 e0 1b srl %g3, 0x1b, %g1 20294e8: 99 28 a0 05 sll %g2, 5, %o4 20294ec: 9b 28 e0 05 sll %g3, 5, %o5 20294f0: 98 10 40 0c or %g1, %o4, %o4 20294f4: 86 a3 40 03 subcc %o5, %g3, %g3 20294f8: 83 30 e0 1a srl %g3, 0x1a, %g1 20294fc: 84 63 00 02 subx %o4, %g2, %g2 2029500: 9b 28 e0 06 sll %g3, 6, %o5 2029504: 99 28 a0 06 sll %g2, 6, %o4 2029508: 9a a3 40 03 subcc %o5, %g3, %o5 202950c: 98 10 40 0c or %g1, %o4, %o4 2029510: 98 63 00 02 subx %o4, %g2, %o4 2029514: 96 83 40 0b addcc %o5, %o3, %o3 2029518: 83 32 e0 1e srl %o3, 0x1e, %g1 202951c: 94 43 00 0a addx %o4, %o2, %o2 2029520: bb 2a e0 02 sll %o3, 2, %i5 2029524: b9 2a a0 02 sll %o2, 2, %i4 2029528: 96 82 c0 1d addcc %o3, %i5, %o3 202952c: b8 10 40 1c or %g1, %i4, %i4 2029530: 93 2a e0 02 sll %o3, 2, %o1 2029534: 94 42 80 1c addx %o2, %i4, %o2 2029538: 83 32 e0 1e srl %o3, 0x1e, %g1 202953c: 91 2a a0 02 sll %o2, 2, %o0 2029540: 90 10 40 08 or %g1, %o0, %o0 2029544: 96 82 c0 09 addcc %o3, %o1, %o3 2029548: 94 42 80 08 addx %o2, %o0, %o2 202954c: 83 32 e0 1e srl %o3, 0x1e, %g1 2029550: 93 2a e0 02 sll %o3, 2, %o1 2029554: 91 2a a0 02 sll %o2, 2, %o0 2029558: 96 82 c0 09 addcc %o3, %o1, %o3 202955c: 90 10 40 08 or %g1, %o0, %o0 2029560: 87 32 e0 17 srl %o3, 0x17, %g3 2029564: 94 42 80 08 addx %o2, %o0, %o2 2029568: 85 2a a0 09 sll %o2, 9, %g2 202956c: 94 10 c0 02 or %g3, %g2, %o2 2029570: c6 06 60 04 ld [ %i1 + 4 ], %g3 2029574: 83 2a e0 09 sll %o3, 9, %g1 2029578: 85 38 e0 1f sra %g3, 0x1f, %g2 202957c: 96 80 40 03 addcc %g1, %g3, %o3 &tod_as_timestamp, tod_as_timespec->tv_sec, tod_as_timespec->tv_nsec ); _TOD_Set_with_timestamp( &tod_as_timestamp ); 2029580: 90 07 bf f8 add %fp, -8, %o0 2029584: 94 42 80 02 addx %o2, %g2, %o2 2029588: 40 00 06 30 call 202ae48 <_TOD_Set_with_timestamp> 202958c: d4 3f bf f8 std %o2, [ %fp + -8 ] if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); 2029590: 7f ff 9a 30 call 200fe50 <_Thread_Enable_dispatch> 2029594: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 2029598: 81 c7 e0 08 ret 202959c: 81 e8 00 00 restore _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 20295a0: 02 80 00 05 be 20295b4 20295a4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 20295a8: 80 a6 20 03 cmp %i0, 3 20295ac: 12 80 00 08 bne 20295cc 20295b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 20295b4: 40 00 61 bb call 2041ca0 <__errno> 20295b8: 01 00 00 00 nop 20295bc: 82 10 20 58 mov 0x58, %g1 ! 58 20295c0: c2 22 00 00 st %g1, [ %o0 ] 20295c4: 81 c7 e0 08 ret 20295c8: 91 e8 3f ff restore %g0, -1, %o0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 20295cc: 40 00 61 b5 call 2041ca0 <__errno> 20295d0: b0 10 3f ff mov -1, %i0 20295d4: 82 10 20 16 mov 0x16, %g1 20295d8: c2 22 00 00 st %g1, [ %o0 ] return 0; } 20295dc: 81 c7 e0 08 ret 20295e0: 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 84 sethi %hi(0x2021000), %g1 2003758: e2 00 63 a8 ld [ %g1 + 0x3a8 ], %l1 ! 20213a8 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 84 sethi %hi(0x2021000), %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 63 ac ld [ %g1 + 0x3ac ], %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 41 f3 call 2013f74 <== NOT EXECUTED 20037ac: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 20037b0: 03 00 80 84 sethi %hi(0x2021000), %g1 <== NOT EXECUTED 20037b4: e0 20 63 ac st %l0, [ %g1 + 0x3ac ] ! 20213ac <== NOT EXECUTED disktab_size = new_size; 20037b8: 03 00 80 84 sethi %hi(0x2021000), %g1 <== NOT EXECUTED 20037bc: f8 20 63 a8 st %i4, [ %g1 + 0x3a8 ] ! 20213a8 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 20037c0: 03 00 80 84 sethi %hi(0x2021000), %g1 20037c4: e4 00 63 ac ld [ %g1 + 0x3ac ], %l2 ! 20213ac 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 41 d1 call 2013f74 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 43 1a call 20144f4 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 42 37 call 20153b0 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 42 30 call 20153b0 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 90 sethi %hi(0x2024000), %o0 2004b30: 94 10 20 06 mov 6, %o2 2004b34: 40 00 41 ac call 20151e4 2004b38: 90 12 21 88 or %o0, 0x188, %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 6a sethi %hi(0x201a800), %g1 2002ba4: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 201a8d0 if (rootloc->ops == &devFS_ops) { 2002ba8: 05 00 80 63 sethi %hi(0x2018c00), %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 a0 e4 or %g2, 0xe4, %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 63 sethi %hi(0x2018c00), %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 63 sethi %hi(0x2018c00), %i2 } printk( 2002bd0: 37 00 80 63 sethi %hi(0x2018c00), %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 61 38 or %i1, 0x138, %i1 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002be4: b4 16 a1 40 or %i2, 0x140, %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 e1 48 or %i3, 0x148, %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 =============================================================================== 0200ba40 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200ba40: 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; 200ba44: 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; 200ba48: f2 06 00 00 ld [ %i0 ], %i1 200ba4c: 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; 200ba50: 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; 200ba54: e2 00 60 04 ld [ %g1 + 4 ], %l1 200ba58: fa 00 40 00 ld [ %g1 ], %i5 devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200ba5c: b8 10 20 00 clr %i4 devFS_node *free_node = NULL; 200ba60: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200ba64: 10 80 00 12 b 200baac 200ba68: b4 10 20 00 clr %i2 devFS_node *current = nodes + i; if (current->name != NULL) { 200ba6c: 80 a2 20 00 cmp %o0, 0 200ba70: 02 80 00 0c be 200baa0 200ba74: a0 10 00 1d mov %i5, %l0 if ( 200ba78: c4 07 60 04 ld [ %i5 + 4 ], %g2 200ba7c: 80 a0 80 1b cmp %g2, %i3 200ba80: 12 80 00 08 bne 200baa0 200ba84: a0 10 00 01 mov %g1, %l0 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200ba88: 92 10 00 19 mov %i1, %o1 200ba8c: 40 00 0e 37 call 200f368 200ba90: 94 10 00 1b mov %i3, %o2 200ba94: 80 a2 20 00 cmp %o0, 0 200ba98: 22 80 00 02 be,a 200baa0 200ba9c: 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) { 200baa0: b4 06 a0 01 inc %i2 200baa4: ba 07 60 14 add %i5, 0x14, %i5 200baa8: 82 10 00 10 mov %l0, %g1 200baac: 80 a7 20 00 cmp %i4, 0 200bab0: 02 80 00 05 be 200bac4 200bab4: 80 a6 80 11 cmp %i2, %l1 200bab8: 80 a0 60 00 cmp %g1, 0 200babc: 12 80 00 04 bne 200bacc 200bac0: 80 a6 80 11 cmp %i2, %l1 200bac4: 32 bf ff ea bne,a 200ba6c 200bac8: 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) { 200bacc: 80 a7 20 00 cmp %i4, 0 200bad0: 02 80 00 07 be 200baec 200bad4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200bad8: 80 88 a0 40 btst 0x40, %g2 200badc: 32 80 00 13 bne,a 200bb28 200bae0: b2 10 20 11 mov 0x11, %i1 currentloc->node_access = node; 200bae4: 10 80 00 0b b 200bb10 200bae8: 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) { 200baec: 80 88 a0 20 btst 0x20, %g2 200baf0: 02 80 00 0d be 200bb24 <== NEVER TAKEN 200baf4: 80 a0 60 00 cmp %g1, 0 if (free_node != NULL) { 200baf8: 02 80 00 09 be 200bb1c 200bafc: 84 10 21 ff mov 0x1ff, %g2 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200bb00: c4 20 60 10 st %g2, [ %g1 + 0x10 ] currentloc->node_access = free_node; 200bb04: c2 26 20 20 st %g1, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200bb08: f2 26 20 08 st %i1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200bb0c: 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; 200bb10: c0 26 20 04 clr [ %i0 + 4 ] 200bb14: 81 c7 e0 08 ret 200bb18: 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); 200bb1c: 10 80 00 03 b 200bb28 200bb20: b2 10 20 1c mov 0x1c, %i1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200bb24: b2 10 20 02 mov 2, %i1 <== NOT EXECUTED 200bb28: 7f ff e4 a3 call 2004db4 200bb2c: 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 2f 20 call 200f420 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 2b 03 call 200e3bc <__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 2a ff call 200e3bc <__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 2a f4 call 200e3bc <__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 84 sethi %hi(0x2021000), %g1 20036e8: d0 00 63 a4 ld [ %g1 + 0x3a4 ], %o0 ! 20213a4 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 84 sethi %hi(0x2021000), %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 63 a0 stb %g2, [ %g1 + 0x3a0 ] 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 84 sethi %hi(0x2021000), %g1 2003724: c0 28 63 a0 clrb [ %g1 + 0x3a0 ] ! 20213a0 sc = rtems_semaphore_release(diskdevs_mutex); 2003728: 03 00 80 84 sethi %hi(0x2021000), %g1 200372c: 40 00 15 d4 call 2008e7c 2003730: d0 00 63 a4 ld [ %g1 + 0x3a4 ], %o0 ! 20213a4 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 31 call 2009404 <== 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 18 call 2007f88 <== 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 74 sethi %hi(0x201d000), %g1 2006064: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 201d1c0 <__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 =============================================================================== 0202840c : void endgrent(void) { if (group_fp != NULL) 202840c: 03 00 81 bb sethi %hi(0x206ec00), %g1 2028410: d0 00 61 20 ld [ %g1 + 0x120 ], %o0 ! 206ed20 2028414: 80 a2 20 00 cmp %o0, 0 2028418: 02 80 00 05 be 202842c <== NEVER TAKEN 202841c: 01 00 00 00 nop fclose(group_fp); 2028420: 82 13 c0 00 mov %o7, %g1 2028424: 40 00 66 71 call 2041de8 2028428: 9e 10 40 00 mov %g1, %o7 202842c: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 02028278 : void endpwent(void) { if (passwd_fp != NULL) 2028278: 03 00 81 bb sethi %hi(0x206ec00), %g1 202827c: d0 00 60 40 ld [ %g1 + 0x40 ], %o0 ! 206ec40 2028280: 80 a2 20 00 cmp %o0, 0 2028284: 02 80 00 05 be 2028298 <== NEVER TAKEN 2028288: 01 00 00 00 nop fclose(passwd_fp); 202828c: 82 13 c0 00 mov %o7, %g1 2028290: 40 00 66 d6 call 2041de8 2028294: 9e 10 40 00 mov %g1, %o7 2028298: 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 6e sethi %hi(0x201b800), %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 6e sethi %hi(0x201b800), %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 e1 c0 ld [ %i3 + 0x1c0 ], %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 e1 c0 ld [ %i3 + 0x1c0 ], %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 e1 c0 ld [ %i3 + 0x1c0 ], %g1 2006228: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 200622c: 02 80 00 0d be 2006260 <== NOT EXECUTED 2006230: c2 06 e1 c0 ld [ %i3 + 0x1c0 ], %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 e1 c0 ld [ %i3 + 0x1c0 ], %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 e1 c0 ld [ %i3 + 0x1c0 ], %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 6e sethi %hi(0x201b800), %i0 20062c0: 37 00 80 74 sethi %hi(0x201d000), %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 a0 c0 or %i2, 0xc0, %i2 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20062c8: b0 16 20 b8 or %i0, 0xb8, %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 =============================================================================== 02025acc : #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) { 2025acc: 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) 2025ad0: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 2025ad4: 80 a0 60 00 cmp %g1, 0 2025ad8: 32 80 00 15 bne,a 2025b2c 2025adc: 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); 2025ae0: 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) 2025ae4: 80 a6 a0 01 cmp %i2, 1 2025ae8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2025aec: 12 80 00 06 bne 2025b04 2025af0: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025af4: 7f ff 81 de call 200626c 2025af8: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2025afc: 10 80 00 05 b 2025b10 2025b00: 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); 2025b04: 7f ff 81 b1 call 20061c8 2025b08: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2025b0c: 80 a2 20 00 cmp %o0, 0 2025b10: 12 80 00 61 bne 2025c94 <== NEVER TAKEN 2025b14: 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; 2025b18: 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; 2025b1c: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.modified = 0; 2025b20: c0 2e 20 7c clrb [ %i0 + 0x7c ] fs_info->c.state = FAT_CACHE_ACTUAL; 2025b24: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2025b28: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2025b2c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2025b30: 80 a0 40 02 cmp %g1, %g2 2025b34: 0a 80 00 05 bcs 2025b48 <== NEVER TAKEN 2025b38: ba 10 20 00 clr %i5 2025b3c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2025b40: 80 a0 40 02 cmp %g1, %g2 2025b44: 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) 2025b48: 80 a0 40 19 cmp %g1, %i1 2025b4c: 22 80 00 5b be,a 2025cb8 2025b50: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (fs_info->c.modified) 2025b54: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2025b58: 80 a0 60 00 cmp %g1, 0 2025b5c: 02 80 00 3b be 2025c48 2025b60: 80 8f 60 ff btst 0xff, %i5 { if (sec_of_fat && !fs_info->vol.mirror) 2025b64: 02 80 00 0b be 2025b90 <== ALWAYS TAKEN 2025b68: 01 00 00 00 nop 2025b6c: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2025b70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2025b74: 12 80 00 07 bne 2025b90 <== NOT EXECUTED 2025b78: 01 00 00 00 nop <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2025b7c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2025b80: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 2025b84: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 2025b88: 40 00 7d 87 call 20451a4 <== NOT EXECUTED 2025b8c: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2025b90: 7f ff 82 7a call 2006578 2025b94: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2025b98: c0 2e 20 7d clrb [ %i0 + 0x7d ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2025b9c: 80 a2 20 00 cmp %o0, 0 2025ba0: 12 80 00 3d bne 2025c94 <== NEVER TAKEN 2025ba4: c0 2e 20 7c clrb [ %i0 + 0x7c ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2025ba8: 80 8f 60 ff btst 0xff, %i5 2025bac: 02 80 00 2d be 2025c60 <== ALWAYS TAKEN 2025bb0: 92 10 00 19 mov %i1, %o1 2025bb4: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2025bb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2025bbc: 02 80 00 1c be 2025c2c <== NOT EXECUTED 2025bc0: 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) 2025bc4: 10 80 00 28 b 2025c64 <== NOT EXECUTED 2025bc8: 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, 2025bcc: 7f ff 74 7c call 2002dbc <.umul> <== NOT EXECUTED 2025bd0: 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, 2025bd4: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 <== NOT EXECUTED 2025bd8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 2025bdc: 92 02 00 09 add %o0, %o1, %o1 <== NOT EXECUTED 2025be0: 7f ff 81 7a call 20061c8 <== NOT EXECUTED 2025be4: 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) 2025be8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025bec: 12 80 00 0c bne 2025c1c <== NOT EXECUTED 2025bf0: 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); 2025bf4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2025bf8: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 2025bfc: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 2025c00: 40 00 7d 69 call 20451a4 <== NOT EXECUTED 2025c04: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2025c08: 7f ff 82 5c call 2006578 <== NOT EXECUTED 2025c0c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2025c10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025c14: 22 80 00 06 be,a 2025c2c <== NOT EXECUTED 2025c18: ba 07 60 01 inc %i5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2025c1c: 40 00 70 21 call 2041ca0 <__errno> <== NOT EXECUTED 2025c20: 01 00 00 00 nop <== NOT EXECUTED 2025c24: 10 80 00 1f b 2025ca0 <== NOT EXECUTED 2025c28: 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++) 2025c2c: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2025c30: 90 0f 60 ff and %i5, 0xff, %o0 <== NOT EXECUTED 2025c34: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2025c38: 2a bf ff e5 bcs,a 2025bcc <== NOT EXECUTED 2025c3c: 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); 2025c40: 10 80 00 08 b 2025c60 <== NOT EXECUTED 2025c44: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2025c48: 7f ff 82 13 call 2006494 2025c4c: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2025c50: 80 a2 20 00 cmp %o0, 0 2025c54: 12 80 00 10 bne 2025c94 <== NEVER TAKEN 2025c58: 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); 2025c5c: 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) 2025c60: 80 a6 a0 01 cmp %i2, 1 2025c64: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2025c68: 12 80 00 06 bne 2025c80 2025c6c: 94 06 20 80 add %i0, 0x80, %o2 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 2025c70: 7f ff 81 7f call 200626c 2025c74: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2025c78: 10 80 00 05 b 2025c8c 2025c7c: 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); 2025c80: 7f ff 81 52 call 20061c8 2025c84: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2025c88: 80 a2 20 00 cmp %o0, 0 2025c8c: 02 80 00 08 be 2025cac <== ALWAYS TAKEN 2025c90: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); 2025c94: 40 00 70 03 call 2041ca0 <__errno> <== NOT EXECUTED 2025c98: 01 00 00 00 nop <== NOT EXECUTED 2025c9c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2025ca0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025ca4: 81 c7 e0 08 ret <== NOT EXECUTED 2025ca8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED fs_info->c.blk_num = blk; 2025cac: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2025cb0: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } *buf = fs_info->c.buf; 2025cb4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2025cb8: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2025cbc: 81 c7 e0 08 ret 2025cc0: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02025cc4 : int fat_buf_release(fat_fs_info_t *fs_info) { 2025cc4: 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) 2025cc8: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2025ccc: 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) 2025cd0: 80 a0 60 00 cmp %g1, 0 2025cd4: 02 80 00 53 be 2025e20 2025cd8: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2025cdc: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2025ce0: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 2025ce4: 80 a0 40 02 cmp %g1, %g2 2025ce8: 0a 80 00 05 bcs 2025cfc <== NEVER TAKEN 2025cec: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2025cf0: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 2025cf4: 80 a0 40 02 cmp %g1, %g2 2025cf8: 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) 2025cfc: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1 2025d00: 80 a0 60 00 cmp %g1, 0 2025d04: 02 80 00 3a be 2025dec 2025d08: 80 8f 20 ff btst 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2025d0c: 02 80 00 0b be 2025d38 2025d10: 01 00 00 00 nop 2025d14: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2025d18: 80 a0 60 00 cmp %g1, 0 2025d1c: 12 80 00 07 bne 2025d38 <== NEVER TAKEN 2025d20: 01 00 00 00 nop memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 2025d24: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 2025d28: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 2025d2c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2025d30: 40 00 7d 1d call 20451a4 2025d34: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2025d38: 7f ff 82 10 call 2006578 2025d3c: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2025d40: 80 a2 20 00 cmp %o0, 0 2025d44: 12 80 00 2f bne 2025e00 <== NEVER TAKEN 2025d48: 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) 2025d4c: 80 8f 20 ff btst 0xff, %i4 2025d50: 02 80 00 32 be 2025e18 2025d54: c0 2f 60 7c clrb [ %i5 + 0x7c ] 2025d58: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2025d5c: 80 a0 60 00 cmp %g1, 0 2025d60: 02 80 00 1c be 2025dd0 <== ALWAYS TAKEN 2025d64: 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; 2025d68: 10 80 00 2d b 2025e1c <== NOT EXECUTED 2025d6c: 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, 2025d70: 7f ff 74 13 call 2002dbc <.umul> 2025d74: 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, 2025d78: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 2025d7c: 94 07 bf fc add %fp, -4, %o2 2025d80: 92 02 00 09 add %o0, %o1, %o1 2025d84: 7f ff 81 11 call 20061c8 2025d88: 90 10 00 1b mov %i3, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2025d8c: 80 a2 20 00 cmp %o0, 0 2025d90: 12 80 00 0c bne 2025dc0 <== NEVER TAKEN 2025d94: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2025d98: c2 07 bf fc ld [ %fp + -4 ], %g1 2025d9c: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 2025da0: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2025da4: 40 00 7d 00 call 20451a4 2025da8: d4 17 40 00 lduh [ %i5 ], %o2 sc = rtems_bdbuf_release_modified(b); 2025dac: 7f ff 81 f3 call 2006578 2025db0: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2025db4: 80 a2 20 00 cmp %o0, 0 2025db8: 22 80 00 06 be,a 2025dd0 <== ALWAYS TAKEN 2025dbc: b8 07 20 01 inc %i4 rtems_set_errno_and_return_minus_one(ENOMEM); 2025dc0: 40 00 6f b8 call 2041ca0 <__errno> <== NOT EXECUTED 2025dc4: 01 00 00 00 nop <== NOT EXECUTED 2025dc8: 10 80 00 11 b 2025e0c <== NOT EXECUTED 2025dcc: 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++) 2025dd0: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 2025dd4: 90 0f 20 ff and %i4, 0xff, %o0 2025dd8: 80 a2 00 01 cmp %o0, %g1 2025ddc: 2a bf ff e5 bcs,a 2025d70 2025de0: 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; 2025de4: 10 80 00 0e b 2025e1c 2025de8: c0 2f 60 7d clrb [ %i5 + 0x7d ] } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2025dec: 7f ff 81 aa call 2006494 2025df0: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2025df4: 80 a2 20 00 cmp %o0, 0 2025df8: 22 80 00 09 be,a 2025e1c <== ALWAYS TAKEN 2025dfc: c0 2f 60 7d clrb [ %i5 + 0x7d ] rtems_set_errno_and_return_minus_one(EIO); 2025e00: 40 00 6f a8 call 2041ca0 <__errno> <== NOT EXECUTED 2025e04: 01 00 00 00 nop <== NOT EXECUTED 2025e08: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2025e0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025e10: 81 c7 e0 08 ret <== NOT EXECUTED 2025e14: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 2025e18: c0 2f 60 7d clrb [ %i5 + 0x7d ] return RC_OK; 2025e1c: b0 10 20 00 clr %i0 } 2025e20: 81 c7 e0 08 ret 2025e24: 81 e8 00 00 restore =============================================================================== 02024d6c : 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)) ) 2024d6c: 80 a2 60 00 cmp %o1, 0 2024d70: 12 80 00 08 bne 2024d90 2024d74: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 2024d78: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 2024d7c: 80 88 a0 03 btst 3, %g2 2024d80: 22 80 00 05 be,a 2024d94 <== NEVER TAKEN 2024d84: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2024d88: 81 c3 e0 08 retl 2024d8c: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2024d90: c4 08 60 05 ldub [ %g1 + 5 ], %g2 2024d94: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 2024d98: 90 02 7f fe add %o1, -2, %o0 2024d9c: 91 2a 00 02 sll %o0, %g2, %o0 fs_info->vol.data_fsec); } 2024da0: 81 c3 e0 08 retl 2024da4: 90 02 00 01 add %o0, %g1, %o0 =============================================================================== 02025f58 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2025f58: 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)) ) 2025f5c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2025f60: 12 80 00 08 bne 2025f80 <== NOT EXECUTED 2025f64: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED 2025f68: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2025f6c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2025f70: 22 80 00 05 be,a 2025f84 <== NOT EXECUTED 2025f74: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2025f78: 10 80 00 07 b 2025f94 <== NOT EXECUTED 2025f7c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2025f80: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED 2025f84: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED 2025f88: 93 2a 40 02 sll %o1, %g2, %o1 <== NOT EXECUTED 2025f8c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED 2025f90: 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); 2025f94: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED 2025f98: 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, 2025f9c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2025fa0: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2025fa4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2025fa8: 7f ff ff a0 call 2025e28 <_fat_block_read> <== NOT EXECUTED 2025fac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02025fb0 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 2025fb0: 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)) ) 2025fb4: 80 a2 60 00 cmp %o1, 0 2025fb8: 12 80 00 08 bne 2025fd8 <== ALWAYS TAKEN 2025fbc: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 2025fc0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2025fc4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2025fc8: 22 80 00 05 be,a 2025fdc <== NOT EXECUTED 2025fcc: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2025fd0: 10 80 00 07 b 2025fec <== NOT EXECUTED 2025fd4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2025fd8: c4 08 60 05 ldub [ %g1 + 5 ], %g2 2025fdc: 92 02 7f fe add %o1, -2, %o1 2025fe0: 93 2a 40 02 sll %o1, %g2, %o1 2025fe4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 2025fe8: 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); 2025fec: d6 08 60 04 ldub [ %g1 + 4 ], %o3 2025ff0: 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, 2025ff4: 94 10 20 00 clr %o2 2025ff8: 97 2a c0 01 sll %o3, %g1, %o3 2025ffc: 82 13 c0 00 mov %o7, %g1 2026000: 7f ff ff ac call 2025eb0 <_fat_block_write> 2026004: 9e 10 40 00 mov %g1, %o7 =============================================================================== 020261d4 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 20261d4: 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; 20261d8: 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); 20261dc: 7f ff fe 30 call 2025a9c <== NOT EXECUTED 20261e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20261e4: d0 27 bf f8 st %o0, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 20261e8: 7f ff fe 2d call 2025a9c <== NOT EXECUTED 20261ec: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 20261f0: 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); 20261f4: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 20261f8: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 20261fc: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026200: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED 2026204: 7f ff ff 2b call 2025eb0 <_fat_block_write> <== NOT EXECUTED 2026208: 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, 202620c: 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, 2026210: 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, 2026214: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2026218: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202621c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026220: 7f ff ff 24 call 2025eb0 <_fat_block_write> <== NOT EXECUTED 2026224: 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) ) 2026228: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202622c: 06 80 00 04 bl 202623c <== NOT EXECUTED 2026230: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2026234: 16 80 00 03 bge 2026240 <== NOT EXECUTED 2026238: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; 202623c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return RC_OK; } 2026240: 81 c7 e0 08 ret <== NOT EXECUTED 2026244: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02025328 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2025328: 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) 202532c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2025330: 80 a0 60 01 cmp %g1, 1 2025334: 08 80 00 06 bleu 202534c 2025338: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 { fat_fd->links_num--; 202533c: 82 00 7f ff add %g1, -1, %g1 return rc; 2025340: 90 10 20 00 clr %o0 2025344: 10 80 00 25 b 20253d8 2025348: 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) 202534c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2025350: 80 88 60 01 btst 1, %g1 2025354: 02 80 00 14 be 20253a4 2025358: 90 10 00 18 mov %i0, %o0 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 202535c: 92 10 00 19 mov %i1, %o1 2025360: 7f ff ff ae call 2025218 2025364: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 2025368: 80 a2 20 00 cmp %o0, 0 202536c: 12 80 00 1b bne 20253d8 <== NEVER TAKEN 2025370: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 2025374: 7f ff a2 c3 call 200de80 <_Chain_Extract> 2025378: 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) ) 202537c: d2 06 60 0c ld [ %i1 + 0xc ], %o1 2025380: 40 00 03 90 call 20261c0 2025384: 90 10 00 18 mov %i0, %o0 2025388: 80 8a 20 ff btst 0xff, %o0 202538c: 02 80 00 0f be 20253c8 <== ALWAYS TAKEN 2025390: 01 00 00 00 nop fat_free_unique_ino(mt_entry, fat_fd->ino); 2025394: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED 2025398: 40 00 03 7e call 2026190 <== NOT EXECUTED 202539c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20253a0: 30 80 00 0a b,a 20253c8 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20253a4: 40 00 03 87 call 20261c0 20253a8: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20253ac: 80 8a 20 ff btst 0xff, %o0 20253b0: 02 80 00 04 be 20253c0 <== ALWAYS TAKEN 20253b4: 01 00 00 00 nop { fat_fd->links_num = 0; 20253b8: 10 80 00 06 b 20253d0 <== NOT EXECUTED 20253bc: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 20253c0: 7f ff a2 b0 call 200de80 <_Chain_Extract> 20253c4: 90 10 00 19 mov %i1, %o0 } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20253c8: 7f ff 8c ec call 2008778 20253cc: 90 10 00 19 mov %i1, %o0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20253d0: 40 00 02 3d call 2025cc4 20253d4: 91 e8 00 1c restore %g0, %i4, %o0 return rc; } 20253d8: 81 c7 e0 08 ret 20253dc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 020258fc : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20258fc: 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; 2025900: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2025904: 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; 2025908: 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) 202590c: 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 ) { 2025910: 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; 2025914: 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) 2025918: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202591c: 02 80 00 07 be 2025938 <== NOT EXECUTED 2025920: 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); 2025924: 40 00 00 e8 call 2025cc4 <== NOT EXECUTED 2025928: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 202592c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2025930: 02 80 00 24 be 20259c0 <== NOT EXECUTED 2025934: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 2025938: 81 c7 e0 08 ret <== NOT EXECUTED 202593c: 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); 2025940: 7f ff fd 0b call 2024d6c <== NOT EXECUTED 2025944: b6 10 20 00 clr %i3 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 2025948: 10 80 00 13 b 2025994 <== NOT EXECUTED 202594c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2025950: 92 06 c0 1a add %i3, %i2, %o1 <== NOT EXECUTED 2025954: 7f ff 82 46 call 200626c <== NOT EXECUTED 2025958: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 202595c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025960: 12 80 00 07 bne 202597c <== NOT EXECUTED 2025964: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2025968: 7f ff 83 28 call 2006608 <== NOT EXECUTED 202596c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2025970: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2025974: 22 80 00 08 be,a 2025994 <== NOT EXECUTED 2025978: b6 06 e0 01 inc %i3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 202597c: 40 00 70 c9 call 2041ca0 <__errno> <== NOT EXECUTED 2025980: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2025984: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2025988: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202598c: 81 c7 e0 08 ret <== NOT EXECUTED 2025990: 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++ ) 2025994: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2025998: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 202599c: 2a bf ff ed bcs,a 2025950 <== NOT EXECUTED 20259a0: 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); 20259a4: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED 20259a8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20259ac: 40 00 5e b7 call 203d488 <== NOT EXECUTED 20259b0: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20259b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20259b8: 12 80 00 0a bne 20259e0 <== NOT EXECUTED 20259bc: 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) 20259c0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 20259c4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 20259c8: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 20259cc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20259d0: 0a bf ff dc bcs 2025940 <== NOT EXECUTED 20259d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20259d8: 81 c7 e0 08 ret <== NOT EXECUTED 20259dc: 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); 20259e0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 20259e4: 81 c7 e0 08 ret <== NOT EXECUTED 20259e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020254b4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 20254b4: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 20254b8: 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; 20254bc: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 20254c0: 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; 20254c4: 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; 20254c8: 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 ) { 20254cc: 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) 20254d0: 80 a6 80 12 cmp %i2, %l2 20254d4: 08 80 00 2d bleu 2025588 20254d8: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20254dc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 20254e0: 80 a0 60 01 cmp %g1, 1 20254e4: 32 80 00 0b bne,a 2025510 <== ALWAYS TAKEN 20254e8: c4 17 20 06 lduh [ %i4 + 6 ], %g2 20254ec: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 20254f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20254f4: 32 80 00 07 bne,a 2025510 <== NOT EXECUTED 20254f8: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20254fc: 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)) && 2025500: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2025504: 12 80 00 1d bne 2025578 <== NOT EXECUTED 2025508: 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))) & 202550c: c4 17 20 06 lduh [ %i4 + 6 ], %g2 <== NOT EXECUTED 2025510: 82 00 bf ff add %g2, -1, %g1 2025514: a0 08 40 12 and %g1, %l2, %l0 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2025518: 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 - 202551c: a0 20 80 10 sub %g2, %l0, %l0 2025520: 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) 2025524: 80 a4 80 10 cmp %l2, %l0 2025528: 08 80 00 18 bleu 2025588 202552c: 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) 2025530: a4 a4 80 10 subcc %l2, %l0, %l2 2025534: 02 80 00 15 be 2025588 <== NEVER TAKEN 2025538: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 202553c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025540: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2025544: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025548: 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; 202554c: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2025550: 96 07 bf fc add %fp, -4, %o3 2025554: 94 10 00 11 mov %l1, %o2 2025558: 40 00 61 1b call 203d9c4 202555c: 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) 2025560: b0 92 20 00 orcc %o0, 0, %i0 2025564: 12 80 00 09 bne 2025588 <== NEVER TAKEN 2025568: 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)) 202556c: 80 94 00 01 orcc %l0, %g1, %g0 2025570: 12 80 00 08 bne 2025590 <== ALWAYS TAKEN 2025574: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); 2025578: 40 00 71 ca call 2041ca0 <__errno> <== NOT EXECUTED 202557c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2025580: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2025584: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025588: 81 c7 e0 08 ret 202558c: 81 e8 00 00 restore /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 2025590: 02 80 00 0b be 20255bc <== ALWAYS TAKEN 2025594: 82 38 00 01 xnor %g0, %g1, %g1 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 2025598: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED 202559c: a2 00 40 11 add %g1, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20255a0: 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) - 20255a4: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20255a8: 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 - 20255ac: 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)); 20255b0: 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) - 20255b4: 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 - 20255b8: 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 ) 20255bc: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20255c0: 80 a2 e0 00 cmp %o3, 0 20255c4: 32 80 00 07 bne,a 20255e0 20255c8: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20255cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 fat_fd->map.file_cln = 0; 20255d0: 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; 20255d4: c2 26 60 1c st %g1, [ %i1 + 0x1c ] 20255d8: 10 80 00 1d b 202564c 20255dc: c2 26 60 38 st %g1, [ %i1 + 0x38 ] fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 20255e0: 80 a0 7f ff cmp %g1, -1 20255e4: 02 80 00 04 be 20255f4 <== NEVER TAKEN 20255e8: 90 10 00 1d mov %i5, %o0 { old_last_cl = fat_fd->map.last_cln; 20255ec: 10 80 00 0a b 2025614 20255f0: c2 27 bf f4 st %g1, [ %fp + -12 ] } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 20255f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20255f8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20255fc: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2025600: 7f ff ff 78 call 20253e0 <== NOT EXECUTED 2025604: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2025608: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 202560c: 12 80 00 09 bne 2025630 <== NOT EXECUTED 2025610: 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); 2025614: d2 07 bf f4 ld [ %fp + -12 ], %o1 2025618: d4 07 bf f0 ld [ %fp + -16 ], %o2 202561c: 40 00 60 0b call 203d648 2025620: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2025624: b6 92 20 00 orcc %o0, 0, %i3 2025628: 02 80 00 07 be 2025644 <== ALWAYS TAKEN 202562c: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); 2025630: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2025634: 40 00 60 b4 call 203d904 <== NOT EXECUTED 2025638: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED return rc; 202563c: 81 c7 e0 08 ret <== NOT EXECUTED 2025640: 81 e8 00 00 restore <== NOT EXECUTED } fat_buf_release(fs_info); 2025644: 40 00 01 a0 call 2025cc4 2025648: 90 10 00 1c mov %i4, %o0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 202564c: c2 07 bf fc ld [ %fp + -4 ], %g1 2025650: 80 a0 60 00 cmp %g1, 0 2025654: 22 bf ff cd be,a 2025588 <== NEVER TAKEN 2025658: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 202565c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2025660: c2 26 60 3c st %g1, [ %i1 + 0x3c ] if (fat_fd->fat_file_type == FAT_DIRECTORY) 2025664: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2025668: 80 a0 60 00 cmp %g1, 0 202566c: 32 bf ff c7 bne,a 2025588 2025670: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { rc = fat_init_clusters_chain(mt_entry, chain); 2025674: d2 07 bf f0 ld [ %fp + -16 ], %o1 2025678: 40 00 02 64 call 2026008 202567c: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2025680: b8 92 20 00 orcc %o0, 0, %i4 2025684: 22 bf ff c1 be,a 2025588 <== ALWAYS TAKEN 2025688: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 202568c: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 2025690: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2025694: 40 00 60 9c call 203d904 <== NOT EXECUTED 2025698: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED return rc; 202569c: 81 c7 e0 08 ret <== NOT EXECUTED 20256a0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020253e0 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 20253e0: 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); 20253e4: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20253e8: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20253ec: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 20253f0: 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; 20253f4: 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); 20253f8: 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, ...) { 20253fc: 90 10 00 18 mov %i0, %o0 2025400: 92 10 00 19 mov %i1, %o1 uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 2025404: 80 a6 a0 01 cmp %i2, 1 2025408: 12 80 00 24 bne 2025498 <== NEVER TAKEN 202540c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 2025410: 84 07 a0 58 add %fp, 0x58, %g2 2025414: c4 27 bf fc st %g2, [ %fp + -4 ] /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2025418: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 202541c: 82 10 00 1b mov %i3, %g1 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2025420: 80 a6 c0 02 cmp %i3, %g2 2025424: 0a 80 00 06 bcs 202543c <== ALWAYS TAKEN 2025428: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 202542c: 40 00 72 1d call 2041ca0 <__errno> <== NOT EXECUTED 2025430: 01 00 00 00 nop <== NOT EXECUTED 2025434: 10 80 00 1c b 20254a4 <== NOT EXECUTED 2025438: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202543c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2025440: 80 a0 a0 01 cmp %g2, 1 2025444: 32 80 00 0d bne,a 2025478 2025448: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 202544c: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2025450: 80 a0 a0 00 cmp %g2, 0 2025454: 32 80 00 09 bne,a 2025478 <== NEVER TAKEN 2025458: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 202545c: 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)) && 2025460: 80 88 a0 03 btst 3, %g2 2025464: 22 80 00 05 be,a 2025478 <== NEVER TAKEN 2025468: 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; 202546c: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 2025470: 10 80 00 0f b 20254ac 2025474: 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); 2025478: 96 07 bf f8 add %fp, -8, %o3 202547c: 7f ff fe 7a call 2024e64 2025480: 95 30 40 0a srl %g1, %o2, %o2 if ( rc != RC_OK ) 2025484: 80 a2 60 00 cmp %o1, 0 2025488: 12 80 00 09 bne 20254ac <== NEVER TAKEN 202548c: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; break; 2025490: 10 80 00 07 b 20254ac 2025494: c2 27 40 00 st %g1, [ %i5 ] default: errno = EINVAL; 2025498: 40 00 72 02 call 2041ca0 <__errno> <== NOT EXECUTED 202549c: 01 00 00 00 nop <== NOT EXECUTED 20254a0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20254a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; 20254a8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED break; } va_end(ap); return rc; } 20254ac: 81 c7 e0 08 ret 20254b0: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 02024e64 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2024e64: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2024e68: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2024e6c: 80 a6 80 1c cmp %i2, %i4 2024e70: 12 80 00 07 bne 2024e8c <== NEVER TAKEN 2024e74: 01 00 00 00 nop *disk_cln = fat_fd->map.disk_cln; 2024e78: 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; 2024e7c: 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; 2024e80: 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; 2024e84: 81 c7 e0 08 ret 2024e88: 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) 2024e8c: 28 80 00 06 bleu,a 2024ea4 <== NOT EXECUTED 2024e90: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 2024e94: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2024e98: 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; 2024e9c: 10 80 00 04 b 2024eac <== NOT EXECUTED 2024ea0: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2024ea4: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2024ea8: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2024eac: 10 80 00 0b b 2024ed8 <== NOT EXECUTED 2024eb0: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2024eb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2024eb8: 40 00 61 74 call 203d488 <== NOT EXECUTED 2024ebc: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2024ec0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2024ec4: 22 80 00 05 be,a 2024ed8 <== NOT EXECUTED 2024ec8: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2024ecc: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2024ed0: 81 c7 e0 08 ret <== NOT EXECUTED 2024ed4: 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++) 2024ed8: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2024edc: 12 bf ff f6 bne 2024eb4 <== NOT EXECUTED 2024ee0: 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; 2024ee4: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2024ee8: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2024eec: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2024ef0: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2024ef4: 81 c7 e0 08 ret <== NOT EXECUTED 2024ef8: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED =============================================================================== 02024efc : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2024efc: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2024f00: 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); 2024f04: 90 10 00 18 mov %i0, %o0 2024f08: 92 10 00 19 mov %i1, %o1 2024f0c: 7f ff ff a7 call 2024da8 2024f10: c0 27 bf fc clr [ %fp + -4 ] /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 2024f14: 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); 2024f18: 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 ) { 2024f1c: 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); 2024f20: 90 10 00 18 mov %i0, %o0 2024f24: 94 10 00 1c mov %i4, %o2 2024f28: 96 10 20 00 clr %o3 2024f2c: 7f ff ff b1 call 2024df0 <_hash_search> 2024f30: 98 07 bf fc add %fp, -4, %o4 if ( rc == RC_OK ) 2024f34: b0 92 20 00 orcc %o0, 0, %i0 2024f38: 12 80 00 08 bne 2024f58 2024f3c: c2 07 bf fc ld [ %fp + -4 ], %g1 { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 2024f40: 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; 2024f44: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 2024f48: 84 00 a0 01 inc %g2 2024f4c: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 2024f50: 81 c7 e0 08 ret 2024f54: 81 e8 00 00 restore } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 2024f58: d2 06 e0 64 ld [ %i3 + 0x64 ], %o1 2024f5c: 94 10 00 1c mov %i4, %o2 2024f60: 96 10 00 1c mov %i4, %o3 2024f64: 98 07 bf fc add %fp, -4, %o4 2024f68: 7f ff ff a2 call 2024df0 <_hash_search> 2024f6c: 90 10 00 1d mov %i5, %o0 2024f70: a0 10 00 08 mov %o0, %l0 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2024f74: 7f ff 8f 81 call 2008d78 2024f78: 90 10 20 44 mov 0x44, %o0 2024f7c: d0 26 80 00 st %o0, [ %i2 ] 2024f80: d0 27 bf fc st %o0, [ %fp + -4 ] if ( lfat_fd == NULL ) 2024f84: 80 a2 20 00 cmp %o0, 0 2024f88: 02 80 00 1f be 2025004 <== NEVER TAKEN 2024f8c: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2024f90: 92 10 20 00 clr %o1 2024f94: 40 00 81 10 call 20453d4 2024f98: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; 2024f9c: 82 10 20 01 mov 1, %g1 2024fa0: c2 26 20 08 st %g1, [ %i0 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; 2024fa4: c2 0e 20 30 ldub [ %i0 + 0x30 ], %g1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2024fa8: 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; 2024fac: 82 08 7f fe and %g1, -2, %g1 2024fb0: c2 2e 20 30 stb %g1, [ %i0 + 0x30 ] lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2024fb4: 82 10 3f ff mov -1, %g1 lfat_fd->dir_pos = *dir_pos; 2024fb8: 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; 2024fbc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2024fc0: 40 00 80 79 call 20451a4 2024fc4: 94 10 20 10 mov 0x10, %o2 if ( rc != RC_OK ) 2024fc8: 80 a4 20 00 cmp %l0, 0 2024fcc: 02 80 00 04 be 2024fdc <== NEVER TAKEN 2024fd0: 01 00 00 00 nop lfat_fd->ino = key; 2024fd4: 10 80 00 12 b 202501c 2024fd8: f8 26 20 0c st %i4, [ %i0 + 0xc ] else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2024fdc: 40 00 04 39 call 20260c0 <== NOT EXECUTED 2024fe0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2024fe4: 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); 2024fe8: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2024fec: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED 2024ff0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2024ff4: 32 80 00 0b bne,a 2025020 <== NOT EXECUTED 2024ff8: d0 06 e0 60 ld [ %i3 + 0x60 ], %o0 <== NOT EXECUTED { free((*fat_fd)); 2024ffc: 7f ff 8d df call 2008778 <== NOT EXECUTED 2025000: 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 ); 2025004: 40 00 73 27 call 2041ca0 <__errno> <== NOT EXECUTED 2025008: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202500c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2025010: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2025014: 81 c7 e0 08 ret <== NOT EXECUTED 2025018: 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); 202501c: 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 ); 2025020: d2 07 bf fc ld [ %fp + -4 ], %o1 2025024: b8 0f 20 01 and %i4, 1, %i4 2025028: 83 2f 20 02 sll %i4, 2, %g1 /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 202502c: 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); 2025030: b9 2f 20 04 sll %i4, 4, %i4 2025034: b8 27 00 01 sub %i4, %g1, %i4 2025038: 7f ff a3 87 call 200de54 <_Chain_Append> 202503c: 90 02 00 1c add %o0, %i4, %o0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2025040: 81 c7 e0 08 ret 2025044: 81 e8 00 00 restore =============================================================================== 0202505c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 202505c: 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; 2025060: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2025064: 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; 2025068: 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) 202506c: 80 a6 e0 00 cmp %i3, 0 2025070: 02 80 00 63 be 20251fc <== NEVER TAKEN 2025074: 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 ) 2025078: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 202507c: 80 a6 80 01 cmp %i2, %g1 2025080: 1a 80 00 5f bcc 20251fc <== NEVER TAKEN 2025084: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2025088: 38 80 00 07 bgu,a 20250a4 <== NEVER TAKEN 202508c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) 2025090: 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) || 2025094: 80 a6 80 02 cmp %i2, %g2 2025098: 28 80 00 04 bleu,a 20250a8 <== ALWAYS TAKEN 202509c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 20250a0: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20250a4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 20250a8: 80 a0 60 01 cmp %g1, 1 20250ac: 32 80 00 1c bne,a 202511c 20250b0: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 20250b4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 20250b8: 80 a0 60 00 cmp %g1, 0 20250bc: 32 80 00 18 bne,a 202511c <== NEVER TAKEN 20250c0: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20250c4: 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)) && 20250c8: 80 88 60 03 btst 3, %g1 20250cc: 22 80 00 14 be,a 202511c <== NEVER TAKEN 20250d0: 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); 20250d4: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 20250d8: 7f ff ff 25 call 2024d6c 20250dc: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 20250e0: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 20250e4: 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); 20250e8: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 20250ec: 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); 20250f0: 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); 20250f4: 94 0e 80 0a and %i2, %o2, %o2 20250f8: 90 10 00 1d mov %i5, %o0 20250fc: 96 10 00 1b mov %i3, %o3 2025100: 40 00 03 4a call 2025e28 <_fat_block_read> 2025104: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2025108: b0 92 20 00 orcc %o0, 0, %i0 202510c: 16 80 00 41 bge 2025210 <== ALWAYS TAKEN 2025110: 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; 2025114: 81 c7 e0 08 ret <== NOT EXECUTED 2025118: 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); 202511c: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2025120: 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); 2025124: a6 07 bf fc add %fp, -4, %l3 2025128: 90 10 00 1d mov %i5, %o0 202512c: 92 10 00 19 mov %i1, %o1 2025130: 94 10 00 12 mov %l2, %o2 2025134: 7f ff ff 4c call 2024e64 2025138: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 202513c: b0 92 60 00 orcc %o1, 0, %i0 2025140: 12 80 00 2f bne 20251fc <== NEVER TAKEN 2025144: 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); 2025148: a3 34 60 10 srl %l1, 0x10, %l1 202514c: a2 04 7f ff add %l1, -1, %l1 2025150: b4 0e 80 11 and %i2, %l1, %i2 2025154: a2 10 20 00 clr %l1 2025158: 10 80 00 1f b 20251d4 202515c: a8 10 00 1a mov %i2, %l4 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2025160: a2 24 40 14 sub %l1, %l4, %l1 2025164: 80 a4 40 1b cmp %l1, %i3 2025168: 38 80 00 02 bgu,a 2025170 202516c: a2 10 00 1b mov %i3, %l1 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025170: d2 07 bf fc ld [ %fp + -4 ], %o1 2025174: 7f ff fe fe call 2024d6c 2025178: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 202517c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2025180: 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); 2025184: 93 35 00 09 srl %l4, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 2025188: 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); 202518c: 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); 2025190: 94 0d 00 0a and %l4, %o2, %o2 2025194: 90 10 00 1d mov %i5, %o0 2025198: 96 10 00 11 mov %l1, %o3 202519c: 40 00 03 23 call 2025e28 <_fat_block_read> 20251a0: 98 07 00 18 add %i4, %i0, %o4 if ( ret < 0 ) 20251a4: 80 a2 20 00 cmp %o0, 0 20251a8: 06 80 00 17 bl 2025204 <== NEVER TAKEN 20251ac: b6 26 c0 11 sub %i3, %l1, %i3 return -1; count -= c; cmpltd += c; 20251b0: b0 06 00 11 add %i0, %l1, %i0 save_cln = cur_cln; 20251b4: e2 07 bf fc ld [ %fp + -4 ], %l1 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20251b8: 90 10 00 1d mov %i5, %o0 20251bc: 92 10 00 11 mov %l1, %o1 20251c0: 40 00 60 b2 call 203d488 20251c4: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 20251c8: 80 a2 20 00 cmp %o0, 0 20251cc: 12 80 00 10 bne 202520c <== NEVER TAKEN 20251d0: 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) 20251d4: 80 a6 e0 00 cmp %i3, 0 20251d8: 32 bf ff e2 bne,a 2025160 20251dc: 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); 20251e0: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 20251e4: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 20251e8: 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); 20251ec: b4 06 80 18 add %i2, %i0, %i2 20251f0: 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 + 20251f4: a4 06 80 12 add %i2, %l2, %l2 20251f8: 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; 20251fc: 81 c7 e0 08 ret 2025200: 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; 2025204: 81 c7 e0 08 ret <== NOT EXECUTED 2025208: 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); 202520c: 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; } 2025210: 81 c7 e0 08 ret 2025214: 81 e8 00 00 restore =============================================================================== 020259ec : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 20259ec: 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; 20259f0: 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 ) { 20259f4: 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; 20259f8: 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)) && 20259fc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2025a00: 80 a0 60 01 cmp %g1, 1 2025a04: 12 80 00 0d bne 2025a38 <== ALWAYS TAKEN 2025a08: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 2025a0c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2025a10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2025a14: 32 80 00 0a bne,a 2025a3c <== NOT EXECUTED 2025a18: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025a1c: 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)) && 2025a20: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2025a24: 22 80 00 06 be,a 2025a3c <== NOT EXECUTED 2025a28: 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; 2025a2c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED 2025a30: 10 80 00 18 b 2025a90 <== NOT EXECUTED 2025a34: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; 2025a38: c0 26 60 18 clr [ %i1 + 0x18 ] while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2025a3c: 10 80 00 0d b 2025a70 2025a40: 82 10 20 00 clr %g1 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025a44: 92 10 00 1b mov %i3, %o1 2025a48: 40 00 5e 90 call 203d488 2025a4c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2025a50: 80 a2 20 00 cmp %o0, 0 2025a54: 12 80 00 10 bne 2025a94 <== NEVER TAKEN 2025a58: 01 00 00 00 nop return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2025a5c: c2 17 20 06 lduh [ %i4 + 6 ], %g1 2025a60: c4 06 60 18 ld [ %i1 + 0x18 ], %g2 2025a64: 82 00 80 01 add %g2, %g1, %g1 2025a68: 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; 2025a6c: 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) 2025a70: f6 07 bf fc ld [ %fp + -4 ], %i3 2025a74: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2025a78: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2025a7c: 86 0e c0 03 and %i3, %g3, %g3 2025a80: 80 a0 c0 02 cmp %g3, %g2 2025a84: 0a bf ff f0 bcs 2025a44 2025a88: 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; 2025a8c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] return rc; 2025a90: 90 10 20 00 clr %o0 } 2025a94: 81 c7 e0 08 ret 2025a98: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02025218 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2025218: 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; 202521c: 82 10 3f ff mov -1, %g1 2025220: c2 27 bf fc st %g1, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2025224: 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; 2025228: 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 ) { 202522c: 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 ) 2025230: 80 a6 80 01 cmp %i2, %g1 2025234: 1a 80 00 3a bcc 202531c 2025238: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 return rc; assert(fat_fd->fat_file_size); 202523c: 80 a0 60 00 cmp %g1, 0 2025240: 32 80 00 0a bne,a 2025268 <== ALWAYS TAKEN 2025244: c4 08 e0 08 ldub [ %g3 + 8 ], %g2 2025248: 11 00 81 8f sethi %hi(0x2063c00), %o0 <== NOT EXECUTED 202524c: 15 00 81 8f sethi %hi(0x2063c00), %o2 <== NOT EXECUTED 2025250: 17 00 81 8f sethi %hi(0x2063c00), %o3 <== NOT EXECUTED 2025254: 90 12 20 18 or %o0, 0x18, %o0 <== NOT EXECUTED 2025258: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 202525c: 94 12 a0 78 or %o2, 0x78, %o2 <== NOT EXECUTED 2025260: 40 00 08 0d call 2027294 <__assert_func> <== NOT EXECUTED 2025264: 96 12 e0 60 or %o3, 0x60, %o3 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 2025268: c6 10 e0 06 lduh [ %g3 + 6 ], %g3 202526c: 86 00 ff ff add %g3, -1, %g3 2025270: b4 00 c0 1a add %g3, %i2, %i2 2025274: b5 36 80 02 srl %i2, %g2, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 2025278: 85 2e 80 02 sll %i2, %g2, %g2 202527c: 80 a0 80 01 cmp %g2, %g1 2025280: 1a 80 00 28 bcc 2025320 <== NEVER TAKEN 2025284: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 2025288: 80 a6 a0 00 cmp %i2, 0 202528c: 02 80 00 0a be 20252b4 <== ALWAYS TAKEN 2025290: 90 10 00 1d mov %i5, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 2025294: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2025298: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 202529c: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20252a0: 7f ff fe f1 call 2024e64 <== NOT EXECUTED 20252a4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20252a8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20252ac: 12 80 00 1d bne 2025320 <== NOT EXECUTED 20252b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20252b4: 92 10 00 19 mov %i1, %o1 20252b8: 94 10 00 1a mov %i2, %o2 20252bc: 7f ff fe ea call 2024e64 20252c0: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20252c4: 80 a2 60 00 cmp %o1, 0 20252c8: 12 80 00 16 bne 2025320 <== NEVER TAKEN 20252cc: 01 00 00 00 nop return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 20252d0: d2 07 bf f8 ld [ %fp + -8 ], %o1 20252d4: 40 00 61 8c call 203d904 20252d8: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20252dc: 92 92 20 00 orcc %o0, 0, %o1 20252e0: 12 80 00 10 bne 2025320 <== NEVER TAKEN 20252e4: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 20252e8: 02 80 00 0e be 2025320 <== ALWAYS TAKEN 20252ec: 90 10 00 1d mov %i5, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 20252f0: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 20252f4: 40 00 60 d5 call 203d648 <== NOT EXECUTED 20252f8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20252fc: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2025300: 12 80 00 08 bne 2025320 <== NOT EXECUTED 2025304: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 2025308: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 202530c: 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; 2025310: 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; 2025314: 10 80 00 03 b 2025320 <== NOT EXECUTED 2025318: 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; 202531c: 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; } 2025320: 81 c7 e0 08 ret 2025324: 91 e8 00 09 restore %g0, %o1, %o0 =============================================================================== 020256a4 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20256a4: 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; 20256a8: 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; 20256ac: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20256b0: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 20256b4: 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 ) 20256b8: 80 a6 e0 00 cmp %i3, 0 20256bc: 02 80 00 79 be 20258a0 <== NEVER TAKEN 20256c0: 90 10 20 00 clr %o0 return cmpltd; if ( start > fat_fd->fat_file_size ) 20256c4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 20256c8: 80 a6 80 01 cmp %i2, %g1 20256cc: 18 80 00 09 bgu 20256f0 <== NEVER TAKEN 20256d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 20256d4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 20256d8: 80 a6 c0 01 cmp %i3, %g1 20256dc: 18 80 00 05 bgu 20256f0 <== NEVER TAKEN 20256e0: 82 20 40 1b sub %g1, %i3, %g1 20256e4: 80 a6 80 01 cmp %i2, %g1 20256e8: 08 80 00 07 bleu 2025704 <== ALWAYS TAKEN 20256ec: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 20256f0: 40 00 71 6c call 2041ca0 <__errno> <== NOT EXECUTED 20256f4: 01 00 00 00 nop <== NOT EXECUTED 20256f8: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 20256fc: 10 80 00 68 b 202589c <== NOT EXECUTED 2025700: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2025704: 90 10 00 18 mov %i0, %o0 2025708: 92 10 00 19 mov %i1, %o1 202570c: 94 10 00 11 mov %l1, %o2 2025710: 7f ff ff 69 call 20254b4 2025714: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2025718: 80 a2 20 00 cmp %o0, 0 202571c: 12 80 00 61 bne 20258a0 <== NEVER TAKEN 2025720: 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)) 2025724: 80 a0 40 11 cmp %g1, %l1 2025728: 32 80 00 02 bne,a 2025730 <== NEVER TAKEN 202572c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2025730: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2025734: 80 a0 60 01 cmp %g1, 1 2025738: 32 80 00 1c bne,a 20257a8 202573c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 2025740: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 2025744: 80 a0 60 00 cmp %g1, 0 2025748: 32 80 00 18 bne,a 20257a8 <== NEVER TAKEN 202574c: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2025750: 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)) && 2025754: 80 88 60 03 btst 3, %g1 2025758: 22 80 00 14 be,a 20257a8 <== NEVER TAKEN 202575c: 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); 2025760: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 2025764: 7f ff fd 82 call 2024d6c 2025768: 90 10 00 1d mov %i5, %o0 sec += (start >> fs_info->vol.sec_log2); 202576c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = start & (fs_info->vol.bps - 1); 2025770: 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); 2025774: 93 36 80 09 srl %i2, %o1, %o1 byte = start & (fs_info->vol.bps - 1); 2025778: 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); 202577c: 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); 2025780: 94 0e 80 0a and %i2, %o2, %o2 2025784: 90 10 00 1d mov %i5, %o0 2025788: 96 10 00 1b mov %i3, %o3 202578c: 40 00 01 c9 call 2025eb0 <_fat_block_write> 2025790: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2025794: 80 a2 20 00 cmp %o0, 0 2025798: 16 80 00 42 bge 20258a0 <== ALWAYS TAKEN 202579c: 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; 20257a0: 10 80 00 40 b 20258a0 <== NOT EXECUTED 20257a4: 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); 20257a8: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 20257ac: 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); 20257b0: a6 07 bf f8 add %fp, -8, %l3 20257b4: 90 10 00 1d mov %i5, %o0 20257b8: 92 10 00 19 mov %i1, %o1 20257bc: 94 10 00 12 mov %l2, %o2 20257c0: 7f ff fd a9 call 2024e64 20257c4: 96 10 00 13 mov %l3, %o3 if (rc != RC_OK) 20257c8: 90 92 60 00 orcc %o1, 0, %o0 20257cc: 12 80 00 35 bne 20258a0 <== NEVER TAKEN 20257d0: 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); 20257d4: a3 34 60 10 srl %l1, 0x10, %l1 20257d8: a2 04 7f ff add %l1, -1, %l1 20257dc: a8 10 20 00 clr %l4 20257e0: b4 0e 80 11 and %i2, %l1, %i2 20257e4: a2 10 20 00 clr %l1 20257e8: 10 80 00 21 b 202586c 20257ec: aa 10 00 1a mov %i2, %l5 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 20257f0: b0 26 00 15 sub %i0, %l5, %i0 20257f4: 80 a6 00 1b cmp %i0, %i3 20257f8: 38 80 00 02 bgu,a 2025800 20257fc: b0 10 00 1b mov %i3, %i0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025800: 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)); 2025804: f0 27 bf fc st %i0, [ %fp + -4 ] sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 2025808: 7f ff fd 59 call 2024d6c 202580c: 90 10 00 1d mov %i5, %o0 sec += (ofs >> fs_info->vol.sec_log2); 2025810: d2 0c 20 02 ldub [ %l0 + 2 ], %o1 byte = ofs & (fs_info->vol.bps - 1); 2025814: 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); 2025818: 93 35 40 09 srl %l5, %o1, %o1 byte = ofs & (fs_info->vol.bps - 1); 202581c: 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); 2025820: 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); 2025824: 94 0d 40 0a and %l5, %o2, %o2 2025828: 90 10 00 1d mov %i5, %o0 202582c: 96 10 00 18 mov %i0, %o3 2025830: 40 00 01 a0 call 2025eb0 <_fat_block_write> 2025834: 98 07 00 11 add %i4, %l1, %o4 if ( ret < 0 ) 2025838: 80 a2 20 00 cmp %o0, 0 202583c: 06 80 00 18 bl 202589c <== NEVER TAKEN 2025840: c2 07 bf fc ld [ %fp + -4 ], %g1 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2025844: 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; 2025848: b6 26 c0 01 sub %i3, %g1, %i3 cmpltd += c; 202584c: a2 04 40 01 add %l1, %g1, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2025850: 90 10 00 1d mov %i5, %o0 2025854: 92 10 00 14 mov %l4, %o1 2025858: 40 00 5f 0c call 203d488 202585c: 94 10 00 13 mov %l3, %o2 if ( rc != RC_OK ) 2025860: 80 a2 20 00 cmp %o0, 0 2025864: 12 80 00 0f bne 20258a0 <== NEVER TAKEN 2025868: 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) 202586c: 80 a6 e0 00 cmp %i3, 0 2025870: 32 bf ff e0 bne,a 20257f0 2025874: 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); 2025878: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 202587c: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2025880: 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); 2025884: b4 06 80 11 add %i2, %l1, %i2 fat_fd->map.disk_cln = save_cln; return cmpltd; 2025888: 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); 202588c: 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 + 2025890: 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; 2025894: 10 80 00 03 b 20258a0 2025898: 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; 202589c: 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; } 20258a0: 81 c7 e0 08 ret 20258a4: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0203d904 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 203d904: 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; 203d908: b6 10 20 00 clr %i3 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 203d90c: ba 10 00 18 mov %i0, %i5 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 203d910: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 uint32_t cur_cln = chain; uint32_t next_cln = 0; 203d914: 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; 203d918: 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) 203d91c: 10 80 00 19 b 203d980 203d920: a0 10 20 00 clr %l0 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 203d924: 92 10 00 1a mov %i2, %o1 203d928: 7f ff fe d8 call 203d488 203d92c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 203d930: b0 92 20 00 orcc %o0, 0, %i0 203d934: 02 80 00 0b be 203d960 <== ALWAYS TAKEN 203d938: 90 10 00 1d mov %i5, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 203d93c: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 <== NOT EXECUTED 203d940: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 203d944: 02 80 00 03 be 203d950 <== NOT EXECUTED 203d948: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 203d94c: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 203d950: 7f ff a0 dd call 2025cc4 <== NOT EXECUTED 203d954: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED return rc; 203d958: 81 c7 e0 08 ret <== NOT EXECUTED 203d95c: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 203d960: 92 10 00 1a mov %i2, %o1 203d964: 7f ff ff 39 call 203d648 203d968: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 203d96c: 80 a2 20 00 cmp %o0, 0 203d970: 32 80 00 02 bne,a 203d978 <== NEVER TAKEN 203d974: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 203d978: 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++; 203d97c: 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) 203d980: c4 07 20 0c ld [ %i4 + 0xc ], %g2 203d984: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 203d988: 84 0e 80 02 and %i2, %g2, %g2 203d98c: 80 a0 80 01 cmp %g2, %g1 203d990: 0a bf ff e5 bcs 203d924 203d994: 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) 203d998: c2 07 20 40 ld [ %i4 + 0x40 ], %g1 203d99c: 80 a0 7f ff cmp %g1, -1 203d9a0: 02 80 00 04 be 203d9b0 <== ALWAYS TAKEN 203d9a4: f2 27 20 44 st %i1, [ %i4 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 203d9a8: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED 203d9ac: f6 27 20 40 st %i3, [ %i4 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 203d9b0: 90 10 00 1c mov %i4, %o0 203d9b4: 7f ff a0 c4 call 2025cc4 203d9b8: b0 10 00 10 mov %l0, %i0 if (rc1 != RC_OK) return rc1; return RC_OK; } 203d9bc: 81 c7 e0 08 ret 203d9c0: 81 e8 00 00 restore =============================================================================== 02026190 : 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; 2026190: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2026194: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 2026198: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 <== NOT EXECUTED 202619c: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 <== NOT EXECUTED 20261a0: 84 22 40 02 sub %o1, %g2, %g2 <== NOT EXECUTED 20261a4: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 20261a8: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 20261ac: 85 29 00 02 sll %g4, %g2, %g2 <== NOT EXECUTED 20261b0: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 20261b4: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED } 20261b8: 81 c3 e0 08 retl <== NOT EXECUTED 20261bc: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED =============================================================================== 0203d488 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 203d488: 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; 203d48c: 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)) ) 203d490: 80 a6 60 01 cmp %i1, 1 203d494: 08 80 00 64 bleu 203d624 <== NEVER TAKEN 203d498: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 203d49c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 203d4a0: 82 00 60 01 inc %g1 203d4a4: 80 a6 40 01 cmp %i1, %g1 203d4a8: 18 80 00 5f bgu 203d624 <== NEVER TAKEN 203d4ac: 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) + 203d4b0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 203d4b4: b7 36 60 01 srl %i1, 1, %i3 203d4b8: 84 88 60 01 andcc %g1, 1, %g2 203d4bc: 12 80 00 06 bne 203d4d4 <== ALWAYS TAKEN 203d4c0: b6 06 c0 19 add %i3, %i1, %i3 203d4c4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203d4c8: 02 80 00 03 be 203d4d4 <== NOT EXECUTED 203d4cc: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 203d4d0: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 203d4d4: 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); 203d4d8: 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) + 203d4dc: b7 36 c0 03 srl %i3, %g3, %i3 203d4e0: 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); 203d4e4: b8 07 00 19 add %i4, %i1, %i4 203d4e8: 80 a0 a0 00 cmp %g2, 0 203d4ec: 12 80 00 06 bne 203d504 <== ALWAYS TAKEN 203d4f0: b6 06 c0 03 add %i3, %g3, %i3 203d4f4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203d4f8: 02 80 00 03 be 203d504 <== NOT EXECUTED 203d4fc: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 203d500: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 203d504: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 203d508: 90 10 00 1d mov %i5, %o0 203d50c: 92 10 00 1b mov %i3, %o1 203d510: 94 10 20 01 mov 1, %o2 203d514: 7f ff a1 6e call 2025acc 203d518: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 203d51c: b0 92 20 00 orcc %o0, 0, %i0 203d520: 12 80 00 38 bne 203d600 <== NEVER TAKEN 203d524: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; switch ( fs_info->vol.type ) 203d528: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 203d52c: 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); 203d530: a1 34 20 10 srl %l0, 0x10, %l0 203d534: 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 ) 203d538: 02 80 00 27 be 203d5d4 <== NEVER TAKEN 203d53c: b8 0f 00 10 and %i4, %l0, %i4 203d540: 80 a0 60 04 cmp %g1, 4 203d544: 02 80 00 31 be 203d608 <== NEVER TAKEN 203d548: 80 a0 60 01 cmp %g1, 1 203d54c: 12 80 00 36 bne 203d624 <== NEVER TAKEN 203d550: 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) ) 203d554: 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))); 203d558: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 203d55c: 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))); 203d560: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 203d564: 80 a7 00 03 cmp %i4, %g3 203d568: 12 80 00 0f bne 203d5a4 <== ALWAYS TAKEN 203d56c: c2 26 80 00 st %g1, [ %i2 ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203d570: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203d574: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203d578: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203d57c: 7f ff a1 54 call 2025acc <== NOT EXECUTED 203d580: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203d584: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 203d588: 12 80 00 2d bne 203d63c <== NOT EXECUTED 203d58c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 203d590: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED 203d594: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 203d598: c2 08 40 00 ldub [ %g1 ], %g1 <== NOT EXECUTED 203d59c: 10 80 00 05 b 203d5b0 <== NOT EXECUTED 203d5a0: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 203d5a4: b8 00 80 1c add %g2, %i4, %i4 203d5a8: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 203d5ac: 85 28 a0 08 sll %g2, 8, %g2 203d5b0: 82 10 80 01 or %g2, %g1, %g1 203d5b4: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 203d5b8: 80 8e 60 01 btst 1, %i1 203d5bc: 02 80 00 04 be 203d5cc 203d5c0: c2 06 80 00 ld [ %i2 ], %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 203d5c4: 10 80 00 0e b 203d5fc 203d5c8: 83 30 60 04 srl %g1, 4, %g1 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 203d5cc: 10 80 00 0c b 203d5fc 203d5d0: 82 08 6f ff and %g1, 0xfff, %g1 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 203d5d4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203d5d8: 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)); 203d5dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203d5e0: 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)); 203d5e4: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 203d5e8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 203d5ec: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 203d5f0: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 203d5f4: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 203d5f8: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 203d5fc: c2 26 80 00 st %g1, [ %i2 ] break; 203d600: 81 c7 e0 08 ret 203d604: 81 e8 00 00 restore case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 203d608: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203d60c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 203d610: 7f ff ff 92 call 203d458 <== NOT EXECUTED 203d614: d0 00 40 1c ld [ %g1 + %i4 ], %o0 <== NOT EXECUTED 203d618: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED break; 203d61c: 81 c7 e0 08 ret <== NOT EXECUTED 203d620: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 203d624: 40 00 11 9f call 2041ca0 <__errno> <== NOT EXECUTED 203d628: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203d62c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203d630: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 203d634: 81 c7 e0 08 ret <== NOT EXECUTED 203d638: 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) 203d63c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 203d640: 81 c7 e0 08 ret <== NOT EXECUTED 203d644: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020260c0 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 20260c0: 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)) 20260c4: 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; 20260c8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 20260cc: 10 80 00 2a b 2026174 <== NOT EXECUTED 20260d0: 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)) 20260d4: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED 20260d8: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 20260dc: 9e 00 c0 02 add %g3, %g2, %o7 <== NOT EXECUTED 20260e0: da 08 c0 02 ldub [ %g3 + %g2 ], %o5 <== NOT EXECUTED 20260e4: c4 48 c0 02 ldsb [ %g3 + %g2 ], %g2 <== NOT EXECUTED 20260e8: 88 08 60 07 and %g1, 7, %g4 <== NOT EXECUTED 20260ec: 85 38 80 04 sra %g2, %g4, %g2 <== NOT EXECUTED 20260f0: 80 88 a0 01 btst 1, %g2 <== NOT EXECUTED 20260f4: 12 80 00 0a bne 202611c <== NOT EXECUTED 20260f8: 82 00 60 01 inc %g1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 20260fc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2026100: 89 28 40 04 sll %g1, %g4, %g4 <== NOT EXECUTED 2026104: 88 11 00 0d or %g4, %o5, %g4 <== NOT EXECUTED 2026108: c8 2b c0 00 stb %g4, [ %o7 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 202610c: f0 07 60 6c ld [ %i5 + 0x6c ], %i0 <== NOT EXECUTED 2026110: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2026114: 81 c7 e0 08 ret <== NOT EXECUTED 2026118: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 202611c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2026120: 0a 80 00 03 bcs 202612c <== NOT EXECUTED 2026124: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED fs_info->index = 0; 2026128: 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++) 202612c: 92 02 60 01 inc %o1 <== NOT EXECUTED 2026130: 80 a2 40 18 cmp %o1, %i0 <== NOT EXECUTED 2026134: 32 bf ff e8 bne,a 20260d4 <== NOT EXECUTED 2026138: 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)) 202613c: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2026140: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2026144: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2026148: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 202614c: 1a 80 00 0d bcc 2026180 <== NOT EXECUTED 2026150: 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); 2026154: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 2026158: 7f ff 8e 41 call 2009a5c <== NOT EXECUTED 202615c: d2 27 60 70 st %o1, [ %i5 + 0x70 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2026160: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2026164: 02 80 00 09 be 2026188 <== NOT EXECUTED 2026168: d0 27 60 68 st %o0, [ %i5 + 0x68 ] <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 202616c: c2 07 60 70 ld [ %i5 + 0x70 ], %g1 <== NOT EXECUTED 2026170: 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++) 2026174: f0 07 60 70 ld [ %i5 + 0x70 ], %i0 <== NOT EXECUTED 2026178: 10 bf ff ee b 2026130 <== NOT EXECUTED 202617c: 92 10 20 00 clr %o1 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 2026180: 81 c7 e0 08 ret <== NOT EXECUTED 2026184: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } 2026188: 81 c7 e0 08 ret <== NOT EXECUTED 202618c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED =============================================================================== 02026008 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 2026008: 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; 202600c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = start_cln; 2026010: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 2026014: d0 17 60 06 lduh [ %i5 + 6 ], %o0 2026018: 92 10 20 01 mov 1, %o1 202601c: 7f ff 88 f9 call 2008400 2026020: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 2026024: b6 92 20 00 orcc %o0, 0, %i3 2026028: 12 80 00 1b bne 2026094 <== ALWAYS TAKEN 202602c: d2 07 bf fc ld [ %fp + -4 ], %o1 rtems_set_errno_and_return_minus_one( EIO ); 2026030: 40 00 6f 1c call 2041ca0 <__errno> <== NOT EXECUTED 2026034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2026038: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 202603c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2026040: 81 c7 e0 08 ret <== NOT EXECUTED 2026044: 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); 2026048: 7f ff ff da call 2025fb0 202604c: 94 10 00 1b mov %i3, %o2 if ( ret == -1 ) 2026050: 80 a2 3f ff cmp %o0, -1 2026054: 12 80 00 06 bne 202606c <== ALWAYS TAKEN 2026058: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 202605c: 7f ff 89 c7 call 2008778 <== NOT EXECUTED 2026060: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return -1; 2026064: 81 c7 e0 08 ret <== NOT EXECUTED 2026068: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 202606c: 90 10 00 1c mov %i4, %o0 2026070: 40 00 5d 06 call 203d488 2026074: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2026078: b0 92 20 00 orcc %o0, 0, %i0 202607c: 02 80 00 06 be 2026094 <== ALWAYS TAKEN 2026080: d2 07 bf fc ld [ %fp + -4 ], %o1 { free(buf); 2026084: 7f ff 89 bd call 2008778 <== NOT EXECUTED 2026088: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 202608c: 81 c7 e0 08 ret <== NOT EXECUTED 2026090: 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) 2026094: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2026098: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 202609c: 84 0a 40 02 and %o1, %g2, %g2 20260a0: 80 a0 80 01 cmp %g2, %g1 20260a4: 0a bf ff e9 bcs 2026048 20260a8: 90 10 00 1c mov %i4, %o0 free(buf); return rc; } } free(buf); 20260ac: 90 10 00 1b mov %i3, %o0 20260b0: 7f ff 89 b2 call 2008778 20260b4: b0 10 20 00 clr %i0 return rc; } 20260b8: 81 c7 e0 08 ret 20260bc: 81 e8 00 00 restore =============================================================================== 0202635c : * 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) { 202635c: 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; 2026360: 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); 2026364: 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; 2026368: c0 27 bf fc clr [ %fp + -4 ] vol->fd = open(mt_entry->dev, O_RDWR); 202636c: 7f ff 8c e2 call 20096f4 2026370: 92 10 20 02 mov 2, %o1 if (vol->fd < 0) 2026374: 80 a2 20 00 cmp %o0, 0 2026378: 06 80 00 09 bl 202639c <== NEVER TAKEN 202637c: d0 27 60 54 st %o0, [ %i5 + 0x54 ] { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 2026380: 40 00 05 34 call 2027850 2026384: 92 07 bf a8 add %fp, -88, %o1 if (rc != 0) 2026388: 80 a2 20 00 cmp %o0, 0 202638c: 02 80 00 08 be 20263ac <== ALWAYS TAKEN 2026390: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 { close(vol->fd); 2026394: 7f ff 88 40 call 2008494 <== NOT EXECUTED 2026398: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 202639c: 40 00 6e 41 call 2041ca0 <__errno> <== NOT EXECUTED 20263a0: 01 00 00 00 nop <== NOT EXECUTED 20263a4: 10 80 01 c4 b 2026ab4 <== NOT EXECUTED 20263a8: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20263ac: c4 07 bf b4 ld [ %fp + -76 ], %g2 20263b0: 03 00 00 3c sethi %hi(0xf000), %g1 20263b4: 84 08 80 01 and %g2, %g1, %g2 20263b8: 03 00 00 18 sethi %hi(0x6000), %g1 20263bc: 80 a0 80 01 cmp %g2, %g1 20263c0: 12 bf ff f5 bne 2026394 <== NEVER TAKEN 20263c4: 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); 20263c8: 13 10 01 10 sethi %hi(0x40044000), %o1 20263cc: 94 07 60 58 add %i5, 0x58, %o2 20263d0: 7f ff 89 41 call 20088d4 20263d4: 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) { 20263d8: b8 92 20 00 orcc %o0, 0, %i4 20263dc: 22 80 00 04 be,a 20263ec <== ALWAYS TAKEN 20263e0: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 close(vol->fd); 20263e4: 10 bf ff ec b 2026394 <== NOT EXECUTED 20263e8: 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); 20263ec: 92 10 20 00 clr %o1 20263f0: 7f ff 7f 9f call 200626c 20263f4: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) 20263f8: 80 a2 20 00 cmp %o0, 0 20263fc: 12 80 00 35 bne 20264d0 <== NEVER TAKEN 2026400: 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); 2026404: d0 07 bf fc ld [ %fp + -4 ], %o0 2026408: de 02 20 1c ld [ %o0 + 0x1c ], %o7 202640c: d6 0b e0 17 ldub [ %o7 + 0x17 ], %o3 2026410: f4 0b e0 20 ldub [ %o7 + 0x20 ], %i2 2026414: d6 2f bf 98 stb %o3, [ %fp + -104 ] 2026418: d6 0b e0 22 ldub [ %o7 + 0x22 ], %o3 202641c: f4 2f bf 9a stb %i2, [ %fp + -102 ] 2026420: d6 2f bf 99 stb %o3, [ %fp + -103 ] 2026424: d6 0b e0 2c ldub [ %o7 + 0x2c ], %o3 2026428: f4 0b e0 23 ldub [ %o7 + 0x23 ], %i2 202642c: d6 2f bf 9d stb %o3, [ %fp + -99 ] 2026430: d6 0b e0 2d ldub [ %o7 + 0x2d ], %o3 2026434: f4 2f bf 97 stb %i2, [ %fp + -105 ] 2026438: d6 2f bf 9c stb %o3, [ %fp + -100 ] 202643c: d6 0b e0 2e ldub [ %o7 + 0x2e ], %o3 2026440: da 0b e0 0b ldub [ %o7 + 0xb ], %o5 2026444: d6 2f bf 9b stb %o3, [ %fp + -101 ] 2026448: d6 0b e0 2f ldub [ %o7 + 0x2f ], %o3 202644c: d8 0b e0 0c ldub [ %o7 + 0xc ], %o4 2026450: c6 0b e0 0e ldub [ %o7 + 0xe ], %g3 2026454: c8 0b e0 0f ldub [ %o7 + 0xf ], %g4 2026458: c2 0b e0 11 ldub [ %o7 + 0x11 ], %g1 202645c: c4 0b e0 12 ldub [ %o7 + 0x12 ], %g2 2026460: f6 0b e0 0d ldub [ %o7 + 0xd ], %i3 2026464: f2 0b e0 10 ldub [ %o7 + 0x10 ], %i1 2026468: e2 0b e0 13 ldub [ %o7 + 0x13 ], %l1 202646c: e4 0b e0 14 ldub [ %o7 + 0x14 ], %l2 2026470: ee 0b e0 16 ldub [ %o7 + 0x16 ], %l7 2026474: e0 0b e0 21 ldub [ %o7 + 0x21 ], %l0 2026478: e8 0b e0 24 ldub [ %o7 + 0x24 ], %l4 202647c: ec 0b e0 25 ldub [ %o7 + 0x25 ], %l6 2026480: ea 0b e0 26 ldub [ %o7 + 0x26 ], %l5 2026484: e6 0b e0 27 ldub [ %o7 + 0x27 ], %l3 2026488: f4 0b e0 28 ldub [ %o7 + 0x28 ], %i2 202648c: d6 2f bf a7 stb %o3, [ %fp + -89 ] 2026490: d6 0b e0 30 ldub [ %o7 + 0x30 ], %o3 2026494: de 0b e0 31 ldub [ %o7 + 0x31 ], %o7 2026498: d6 2f bf 9f stb %o3, [ %fp + -97 ] sc = rtems_bdbuf_release( block); 202649c: c2 27 bf 8c st %g1, [ %fp + -116 ] 20264a0: c4 3f bf 80 std %g2, [ %fp + -128 ] 20264a4: c8 27 bf 7c st %g4, [ %fp + -132 ] 20264a8: 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); 20264ac: de 2f bf 9e stb %o7, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 20264b0: 7f ff 7f f9 call 2006494 20264b4: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 20264b8: c2 07 bf 8c ld [ %fp + -116 ], %g1 20264bc: 80 a2 20 00 cmp %o0, 0 20264c0: c4 1f bf 80 ldd [ %fp + -128 ], %g2 20264c4: c8 07 bf 7c ld [ %fp + -132 ], %g4 20264c8: 02 80 00 08 be 20264e8 <== ALWAYS TAKEN 20264cc: d8 1f bf 70 ldd [ %fp + -144 ], %o4 { close(vol->fd); 20264d0: 7f ff 87 f1 call 2008494 <== NOT EXECUTED 20264d4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 20264d8: 40 00 6d f2 call 2041ca0 <__errno> <== NOT EXECUTED 20264dc: 01 00 00 00 nop <== NOT EXECUTED 20264e0: 10 80 01 75 b 2026ab4 <== NOT EXECUTED 20264e4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20264e8: 98 0b 20 ff and %o4, 0xff, %o4 20264ec: 9a 0b 60 ff and %o5, 0xff, %o5 20264f0: 99 2b 20 08 sll %o4, 8, %o4 20264f4: 9a 13 00 0d or %o4, %o5, %o5 if ( (vol->bps != 512) && 20264f8: 9f 2b 60 10 sll %o5, 0x10, %o7 20264fc: 9f 33 e0 10 srl %o7, 0x10, %o7 2026500: 80 a3 e4 00 cmp %o7, 0x400 2026504: 02 80 00 0b be 2026530 <== NEVER TAKEN 2026508: da 37 40 00 sth %o5, [ %i5 ] 202650c: 80 a3 e2 00 cmp %o7, 0x200 2026510: 22 80 00 09 be,a 2026534 <== ALWAYS TAKEN 2026514: 9f 2b 60 10 sll %o5, 0x10, %o7 (vol->bps != 1024) && 2026518: 80 a3 e8 00 cmp %o7, 0x800 <== NOT EXECUTED 202651c: 02 80 00 05 be 2026530 <== NOT EXECUTED 2026520: 19 00 00 04 sethi %hi(0x1000), %o4 <== NOT EXECUTED (vol->bps != 2048) && 2026524: 80 a3 c0 0c cmp %o7, %o4 <== NOT EXECUTED 2026528: 12 80 00 d2 bne 2026870 <== NOT EXECUTED 202652c: 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; 2026530: 9f 2b 60 10 sll %o5, 0x10, %o7 <== NOT EXECUTED 2026534: c0 2f 60 03 clrb [ %i5 + 3 ] 2026538: 10 80 00 05 b 202654c 202653c: 9f 33 e0 19 srl %o7, 0x19, %o7 i >>= 1, vol->sec_mul++); 2026540: 9f 3b e0 01 sra %o7, 1, %o7 <== NOT EXECUTED 2026544: 98 03 20 01 inc %o4 <== NOT EXECUTED 2026548: 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; 202654c: 80 8b e0 01 btst 1, %o7 2026550: 22 bf ff fc be,a 2026540 <== NEVER TAKEN 2026554: 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; 2026558: 9b 2b 60 10 sll %o5, 0x10, %o5 202655c: c0 2f 60 02 clrb [ %i5 + 2 ] 2026560: 93 33 60 10 srl %o5, 0x10, %o1 2026564: 10 80 00 05 b 2026578 2026568: 9e 10 00 09 mov %o1, %o7 i >>= 1, vol->sec_log2++); 202656c: 9f 3b e0 01 sra %o7, 1, %o7 2026570: 9a 03 60 01 inc %o5 2026574: 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; 2026578: 80 8b e0 01 btst 1, %o7 202657c: 22 bf ff fc be,a 202656c 2026580: 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) 2026584: 9a 8e e0 ff andcc %i3, 0xff, %o5 2026588: 02 80 00 ba be 2026870 <== NEVER TAKEN 202658c: 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; 2026590: 10 80 00 05 b 20265a4 2026594: c0 2f 60 05 clrb [ %i5 + 5 ] i >>= 1, vol->spc_log2++); 2026598: 9e 03 e0 01 inc %o7 202659c: 9b 3b 60 01 sra %o5, 1, %o5 20265a0: 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; 20265a4: 80 8b 60 01 btst 1, %o5 20265a8: 02 bf ff fc be 2026598 20265ac: 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) 20265b0: 9f 2a 40 0f sll %o1, %o7, %o7 20265b4: de 37 60 06 sth %o7, [ %i5 + 6 ] 20265b8: 1b 00 00 20 sethi %hi(0x8000), %o5 20265bc: 9f 2b e0 10 sll %o7, 0x10, %o7 20265c0: 9f 33 e0 10 srl %o7, 0x10, %o7 20265c4: 80 a3 c0 0d cmp %o7, %o5 20265c8: 18 80 00 aa bgu 2026870 <== NEVER TAKEN 20265cc: 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; 20265d0: 10 80 00 05 b 20265e4 20265d4: c0 2f 60 08 clrb [ %i5 + 8 ] i >>= 1, vol->bpc_log2++); 20265d8: 9f 3b e0 01 sra %o7, 1, %o7 20265dc: 9a 03 60 01 inc %o5 20265e0: 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; 20265e4: 80 8b e0 01 btst 1, %o7 20265e8: 22 bf ff fc be,a 20265d8 20265ec: 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); 20265f0: 84 08 a0 ff and %g2, 0xff, %g2 20265f4: 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); 20265f8: f2 2f 60 09 stb %i1, [ %i5 + 9 ] vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 20265fc: 88 09 20 ff and %g4, 0xff, %g4 2026600: 86 08 e0 ff and %g3, 0xff, %g3 2026604: 89 29 20 08 sll %g4, 8, %g4 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026608: 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); 202660c: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026610: 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); 2026614: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2026618: 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)) / 202661c: 84 02 7f ff add %o1, -1, %g2 2026620: 83 28 60 10 sll %g1, 0x10, %g1 2026624: c6 27 bf 84 st %g3, [ %fp + -124 ] 2026628: 91 30 60 0b srl %g1, 0xb, %o0 202662c: 40 00 d3 8b call 205b458 <.div> 2026630: 90 02 00 02 add %o0, %g2, %o0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2026634: 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)) / 2026638: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 202663c: 85 2a 00 02 sll %o0, %g2, %g2 2026640: c4 27 60 28 st %g2, [ %i5 + 0x28 ] if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 2026644: c4 0f bf 98 ldub [ %fp + -104 ], %g2 2026648: ae 0d e0 ff and %l7, 0xff, %l7 202664c: 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)) / 2026650: 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) 2026654: ae 10 80 17 or %g2, %l7, %l7 2026658: af 2d e0 10 sll %l7, 0x10, %l7 202665c: 80 a5 e0 00 cmp %l7, 0 2026660: 02 80 00 05 be 2026674 <== NEVER TAKEN 2026664: c6 07 bf 84 ld [ %fp + -124 ], %g3 vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2026668: af 35 e0 10 srl %l7, 0x10, %l7 202666c: 10 80 00 0c b 202669c 2026670: ee 27 60 18 st %l7, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2026674: ac 0d a0 ff and %l6, 0xff, %l6 <== NOT EXECUTED 2026678: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 202667c: ad 2d a0 08 sll %l6, 8, %l6 <== NOT EXECUTED 2026680: ab 2d 60 10 sll %l5, 0x10, %l5 <== NOT EXECUTED 2026684: a8 0d 20 ff and %l4, 0xff, %l4 <== NOT EXECUTED 2026688: aa 15 80 15 or %l6, %l5, %l5 <== NOT EXECUTED 202668c: a7 2c e0 18 sll %l3, 0x18, %l3 <== NOT EXECUTED 2026690: a8 15 40 14 or %l5, %l4, %l4 <== NOT EXECUTED 2026694: a6 15 00 13 or %l4, %l3, %l3 <== NOT EXECUTED 2026698: e6 27 60 18 st %l3, [ %i5 + 0x18 ] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 202669c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 20266a0: 87 28 e0 10 sll %g3, 0x10, %g3 20266a4: c2 27 bf 8c st %g1, [ %fp + -116 ] 20266a8: a7 30 e0 10 srl %g3, 0x10, %l3 20266ac: 7f ff 71 c4 call 2002dbc <.umul> 20266b0: 90 0e 60 ff and %i1, 0xff, %o0 20266b4: c2 07 bf 8c ld [ %fp + -116 ], %g1 20266b8: 90 04 c0 08 add %l3, %o0, %o0 20266bc: 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; 20266c0: d0 27 60 1c st %o0, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 20266c4: a4 0c a0 ff and %l2, 0xff, %l2 20266c8: a2 0c 60 ff and %l1, 0xff, %l1 20266cc: a5 2c a0 08 sll %l2, 8, %l2 20266d0: a2 14 80 11 or %l2, %l1, %l1 20266d4: a3 2c 60 10 sll %l1, 0x10, %l1 20266d8: 80 a4 60 00 cmp %l1, 0 20266dc: 02 80 00 05 be 20266f0 <== NEVER TAKEN 20266e0: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20266e4: a3 34 60 10 srl %l1, 0x10, %l1 20266e8: 10 80 00 0d b 202671c 20266ec: e2 27 60 2c st %l1, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 20266f0: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 20266f4: c4 0f bf 99 ldub [ %fp + -103 ], %g2 <== NOT EXECUTED 20266f8: c8 0f bf 97 ldub [ %fp + -105 ], %g4 <== NOT EXECUTED 20266fc: a0 0c 20 ff and %l0, 0xff, %l0 <== NOT EXECUTED 2026700: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2026704: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED 2026708: 84 14 00 02 or %l0, %g2, %g2 <== NOT EXECUTED 202670c: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2026710: 87 29 20 18 sll %g4, 0x18, %g3 <== NOT EXECUTED 2026714: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2026718: c4 27 60 2c st %g2, [ %i5 + 0x2c ] <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 202671c: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 vol->data_cls = data_secs / vol->spc; 2026720: 92 0e e0 ff and %i3, 0xff, %o1 2026724: 40 00 d3 4b call 205b450 <.udiv> 2026728: 90 22 00 01 sub %o0, %g1, %o0 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 202672c: 80 a2 2f f4 cmp %o0, 0xff4 2026730: 18 80 00 08 bgu 2026750 <== NEVER TAKEN 2026734: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 2026738: 82 10 20 01 mov 1, %g1 202673c: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 2026740: 82 10 2f ff mov 0xfff, %g1 2026744: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 2026748: 10 80 00 0f b 2026784 202674c: 82 10 2f f8 mov 0xff8, %g1 } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2026750: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2026754: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2026758: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 202675c: 38 80 00 05 bgu,a 2026770 <== NOT EXECUTED 2026760: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED { vol->type = FAT_FAT16; 2026764: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2026768: 10 80 00 04 b 2026778 <== NOT EXECUTED 202676c: 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; 2026770: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2026774: 03 03 ff ff sethi %hi(0xffffc00), %g1 <== NOT EXECUTED 2026778: 84 10 63 ff or %g1, 0x3ff, %g2 ! fffffff <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 202677c: 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; 2026780: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2026784: c2 27 60 10 st %g1, [ %i5 + 0x10 ] } } if (vol->type == FAT_FAT32) 2026788: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 202678c: 80 a0 60 04 cmp %g1, 4 2026790: 12 80 00 6f bne 202694c <== ALWAYS TAKEN 2026794: 82 10 3f ff mov -1, %g1 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2026798: c4 0f bf 9c ldub [ %fp + -100 ], %g2 <== NOT EXECUTED 202679c: c2 0f bf 9b ldub [ %fp + -101 ], %g1 <== NOT EXECUTED 20267a0: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20267a4: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20267a8: d6 0f bf a7 ldub [ %fp + -89 ], %o3 <== NOT EXECUTED 20267ac: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20267b0: c4 0f bf 9d ldub [ %fp + -99 ], %g2 <== NOT EXECUTED 20267b4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20267b8: 85 2a e0 18 sll %o3, 0x18, %g2 <== NOT EXECUTED 20267bc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20267c0: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 20267c4: 82 0e bf 80 and %i2, -128, %g1 <== NOT EXECUTED if (vol->mirror) 20267c8: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 20267cc: 02 80 00 05 be 20267e0 <== NOT EXECUTED 20267d0: 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; 20267d4: b4 0e a0 0f and %i2, 0xf, %i2 <== NOT EXECUTED 20267d8: 10 80 00 03 b 20267e4 <== NOT EXECUTED 20267dc: f4 2f 60 50 stb %i2, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; 20267e0: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 20267e4: d2 0f bf 9e ldub [ %fp + -98 ], %o1 <== NOT EXECUTED 20267e8: c2 0f bf 9f ldub [ %fp + -97 ], %g1 <== NOT EXECUTED 20267ec: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 20267f0: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 20267f4: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 20267f8: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 20267fc: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2026800: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2026804: 02 80 00 1b be 2026870 <== NOT EXECUTED 2026808: 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, 202680c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2026810: 94 10 20 00 clr %o2 <== NOT EXECUTED 2026814: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2026818: 7f ff fd 84 call 2025e28 <_fat_block_read> <== NOT EXECUTED 202681c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2026820: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2026824: 06 80 00 23 bl 20268b0 <== NOT EXECUTED 2026828: 01 00 00 00 nop <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 202682c: c2 0f bf f2 ldub [ %fp + -14 ], %g1 <== NOT EXECUTED 2026830: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2026834: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2026838: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 202683c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2026840: c2 0f bf f0 ldub [ %fp + -16 ], %g1 <== NOT EXECUTED 2026844: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2026848: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED 202684c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2026850: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2026854: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2026858: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 202685c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2026860: 22 80 00 0a be,a 2026888 <== NOT EXECUTED 2026864: 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); 2026868: 7f ff fd 17 call 2025cc4 <== NOT EXECUTED 202686c: 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); 2026870: 7f ff 87 09 call 2008494 <== NOT EXECUTED 2026874: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2026878: 40 00 6d 0a call 2041ca0 <__errno> <== NOT EXECUTED 202687c: 01 00 00 00 nop <== NOT EXECUTED 2026880: 10 80 00 8d b 2026ab4 <== NOT EXECUTED 2026884: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2026888: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202688c: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED 2026890: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2026894: 7f ff fd 65 call 2025e28 <_fat_block_read> <== NOT EXECUTED 2026898: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 202689c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20268a0: 16 80 00 08 bge 20268c0 <== NOT EXECUTED 20268a4: 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); 20268a8: 7f ff fd 07 call 2025cc4 <== NOT EXECUTED 20268ac: 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); 20268b0: 7f ff 86 f9 call 2008494 <== NOT EXECUTED 20268b4: 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 ); 20268b8: 10 80 00 81 b 2026abc <== NOT EXECUTED 20268bc: 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); 20268c0: c2 0f bf f6 ldub [ %fp + -10 ], %g1 <== NOT EXECUTED 20268c4: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20268c8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 20268cc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 20268d0: 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, 20268d4: 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); 20268d8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 20268dc: 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, 20268e0: 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); 20268e4: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 20268e8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20268ec: 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); 20268f0: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 20268f4: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 20268f8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 20268fc: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2026900: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2026904: c4 0f bf f8 ldub [ %fp + -8 ], %g2 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2026908: 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); 202690c: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 2026910: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED 2026914: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED 2026918: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 202691c: 7f ff fe 2e call 20261d4 <== NOT EXECUTED 2026920: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2026924: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED 2026928: 02 80 00 0e be 2026960 <== NOT EXECUTED 202692c: 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); 2026930: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED 2026934: 7f ff fc e4 call 2025cc4 <== NOT EXECUTED 2026938: 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); 202693c: 7f ff 86 d6 call 2008494 <== NOT EXECUTED 2026940: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return rc; 2026944: 81 c7 e0 08 ret <== NOT EXECUTED 2026948: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 202694c: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2026950: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2026954: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2026958: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 202695c: 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); 2026960: 7f ff fc d9 call 2025cc4 2026964: 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; 2026968: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 202696c: 7f ff 71 14 call 2002dbc <.umul> 2026970: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2026974: 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)); 2026978: 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; 202697c: 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)); 2026980: 90 10 20 02 mov 2, %o0 2026984: 7f ff 86 9f call 2008400 2026988: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 202698c: 80 a2 20 00 cmp %o0, 0 2026990: 02 80 00 12 be 20269d8 <== NEVER TAKEN 2026994: 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 ); 2026998: 82 02 20 04 add %o0, 4, %g1 202699c: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 20269a0: 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 ); 20269a4: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20269a8: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20269ac: 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; 20269b0: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 20269b4: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 20269b8: 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)); 20269bc: 92 10 20 0c mov 0xc, %o1 20269c0: 7f ff 86 90 call 2008400 20269c4: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 20269c8: 80 a2 20 00 cmp %o0, 0 20269cc: 12 80 00 06 bne 20269e4 <== ALWAYS TAKEN 20269d0: d0 27 60 64 st %o0, [ %i5 + 0x64 ] 20269d4: 30 80 00 1c b,a 2026a44 <== 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); 20269d8: 7f ff 86 af call 2008494 <== NOT EXECUTED 20269dc: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 20269e0: 30 80 00 32 b,a 2026aa8 <== 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 ); 20269e4: 82 02 20 04 add %o0, 4, %g1 head->next = tail; 20269e8: 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 ); 20269ec: 82 02 20 0c add %o0, 0xc, %g1 head->next = tail; head->previous = NULL; 20269f0: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 20269f4: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 20269f8: 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; 20269fc: 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 ); 2026a00: 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; 2026a04: 82 10 21 00 mov 0x100, %g1 head->next = tail; 2026a08: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2026a0c: c2 27 60 70 st %g1, [ %i5 + 0x70 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2026a10: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 2026a14: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2026a18: 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; 2026a1c: 83 28 80 01 sll %g2, %g1, %g1 2026a20: 83 28 60 04 sll %g1, 4, %g1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2026a24: 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; 2026a28: c2 27 60 74 st %g1, [ %i5 + 0x74 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2026a2c: 7f ff 86 75 call 2008400 2026a30: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2026a34: 80 a2 20 00 cmp %o0, 0 2026a38: 12 80 00 0d bne 2026a6c <== ALWAYS TAKEN 2026a3c: d0 27 60 68 st %o0, [ %i5 + 0x68 ] 2026a40: 30 80 00 05 b,a 2026a54 <== 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); 2026a44: 7f ff 86 94 call 2008494 <== NOT EXECUTED 2026a48: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2026a4c: 10 80 00 15 b 2026aa0 <== NOT EXECUTED 2026a50: 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); 2026a54: 7f ff 86 90 call 2008494 <== NOT EXECUTED 2026a58: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2026a5c: 7f ff 87 47 call 2008778 <== NOT EXECUTED 2026a60: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2026a64: 10 80 00 0f b 2026aa0 <== NOT EXECUTED 2026a68: 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)); 2026a6c: d0 17 40 00 lduh [ %i5 ], %o0 2026a70: 7f ff 86 64 call 2008400 2026a74: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 2026a78: 80 a2 20 00 cmp %o0, 0 2026a7c: 12 80 00 10 bne 2026abc <== ALWAYS TAKEN 2026a80: d0 27 60 84 st %o0, [ %i5 + 0x84 ] { close(vol->fd); 2026a84: 7f ff 86 84 call 2008494 <== NOT EXECUTED 2026a88: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED free(fs_info->vhash); 2026a8c: 7f ff 87 3b call 2008778 <== NOT EXECUTED 2026a90: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2026a94: 7f ff 87 39 call 2008778 <== NOT EXECUTED 2026a98: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED free(fs_info->uino); 2026a9c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 2026aa0: 7f ff 87 36 call 2008778 <== NOT EXECUTED 2026aa4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2026aa8: 40 00 6c 7e call 2041ca0 <__errno> <== NOT EXECUTED 2026aac: 01 00 00 00 nop <== NOT EXECUTED 2026ab0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2026ab4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2026ab8: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED } return RC_OK; } 2026abc: b0 10 00 1c mov %i4, %i0 2026ac0: 81 c7 e0 08 ret 2026ac4: 81 e8 00 00 restore =============================================================================== 0203d9c4 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 203d9c4: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 203d9c8: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 uint32_t cl4find = 2; uint32_t next_cln = 0; 203d9cc: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 203d9d0: e8 04 60 34 ld [ %l1 + 0x34 ], %l4 uint32_t i = 2; *cls_added = 0; 203d9d4: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 203d9d8: 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; 203d9dc: a8 05 20 02 add %l4, 2, %l4 uint32_t i = 2; *cls_added = 0; if (count == 0) 203d9e0: 80 a6 a0 00 cmp %i2, 0 203d9e4: 02 80 00 16 be 203da3c <== NEVER TAKEN 203d9e8: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 203d9ec: e0 04 60 44 ld [ %l1 + 0x44 ], %l0 203d9f0: 80 a4 3f ff cmp %l0, -1 203d9f4: 22 80 00 02 be,a 203d9fc 203d9f8: a0 10 20 02 mov 2, %l0 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 203d9fc: a6 10 20 02 mov 2, %l3 203da00: 10 80 00 55 b 203db54 203da04: 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); 203da08: 92 10 00 10 mov %l0, %o1 203da0c: 7f ff fe 9f call 203d488 203da10: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 203da14: b0 92 20 00 orcc %o0, 0, %i0 203da18: 02 80 00 0b be 203da44 <== ALWAYS TAKEN 203da1c: c2 07 bf fc ld [ %fp + -4 ], %g1 { if (*cls_added != 0) 203da20: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 203da24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 203da28: 02 80 00 5b be 203db94 <== NOT EXECUTED 203da2c: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 203da30: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203da34: 7f ff ff b4 call 203d904 <== NOT EXECUTED 203da38: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203da3c: 81 c7 e0 08 ret <== NOT EXECUTED 203da40: 81 e8 00 00 restore <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 203da44: 80 a0 60 00 cmp %g1, 0 203da48: 32 80 00 3f bne,a 203db44 203da4c: 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) 203da50: c2 06 c0 00 ld [ %i3 ], %g1 203da54: 80 a0 60 00 cmp %g1, 0 203da58: 12 80 00 0b bne 203da84 <== NEVER TAKEN 203da5c: 90 10 00 1d mov %i5, %o0 { *chain = cl4find; 203da60: e0 26 40 00 st %l0, [ %i1 ] rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 203da64: 92 10 00 10 mov %l0, %o1 203da68: 7f ff fe f8 call 203d648 203da6c: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 203da70: 80 a2 20 00 cmp %o0, 0 203da74: 22 80 00 22 be,a 203dafc <== ALWAYS TAKEN 203da78: 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); 203da7c: 81 c7 e0 08 ret <== NOT EXECUTED 203da80: 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); 203da84: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 203da88: 7f ff fe f0 call 203d648 <== NOT EXECUTED 203da8c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 203da90: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED if ( rc != RC_OK ) 203da94: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 203da98: 02 80 00 07 be 203dab4 <== NOT EXECUTED 203da9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 203daa0: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203daa4: 7f ff ff 98 call 203d904 <== NOT EXECUTED 203daa8: b0 10 00 15 mov %l5, %i0 <== NOT EXECUTED return rc; 203daac: 81 c7 e0 08 ret <== NOT EXECUTED 203dab0: 81 e8 00 00 restore <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 203dab4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 203dab8: 7f ff fe e4 call 203d648 <== NOT EXECUTED 203dabc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 203dac0: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 203dac4: 22 80 00 0e be,a 203dafc <== NOT EXECUTED 203dac8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 203dacc: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 203dad0: 7f ff ff 8d call 203d904 <== NOT EXECUTED 203dad4: 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); 203dad8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 203dadc: 94 10 20 00 clr %o2 <== NOT EXECUTED 203dae0: 7f ff fe da call 203d648 <== NOT EXECUTED 203dae4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED fat_buf_release(fs_info); 203dae8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 203daec: 7f ff a0 76 call 2025cc4 <== NOT EXECUTED 203daf0: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return rc; 203daf4: 81 c7 e0 08 ret <== NOT EXECUTED 203daf8: 81 e8 00 00 restore <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 203dafc: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 203db00: 80 a0 40 1a cmp %g1, %i2 203db04: 12 80 00 0e bne 203db3c <== NEVER TAKEN 203db08: c2 26 c0 00 st %g1, [ %i3 ] { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 203db0c: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 203db10: 80 a0 7f ff cmp %g1, -1 203db14: 02 80 00 05 be 203db28 <== ALWAYS TAKEN 203db18: e0 24 60 44 st %l0, [ %l1 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 203db1c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 203db20: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 203db24: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 203db28: e0 27 00 00 st %l0, [ %i4 ] fat_buf_release(fs_info); 203db2c: 7f ff a0 66 call 2025cc4 203db30: 90 10 00 11 mov %l1, %o0 return rc; 203db34: 81 c7 e0 08 ret 203db38: 81 e8 00 00 restore save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 203db3c: a4 10 00 10 mov %l0, %l2 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 203db40: a0 04 20 01 inc %l0 <== NOT EXECUTED if (cl4find >= data_cls_val) 203db44: 80 a4 00 14 cmp %l0, %l4 203db48: 0a 80 00 03 bcs 203db54 <== ALWAYS TAKEN 203db4c: a6 04 e0 01 inc %l3 cl4find = 2; 203db50: 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) 203db54: 80 a4 c0 14 cmp %l3, %l4 203db58: 0a bf ff ac bcs 203da08 <== ALWAYS TAKEN 203db5c: 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) 203db60: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 <== NOT EXECUTED 203db64: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 203db68: 02 80 00 05 be 203db7c <== NOT EXECUTED 203db6c: e4 24 60 44 st %l2, [ %l1 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 203db70: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 203db74: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 203db78: c2 24 60 40 st %g1, [ %l1 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 203db7c: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 203db80: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 203db84: 7f ff a0 50 call 2025cc4 <== NOT EXECUTED 203db88: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 203db8c: 81 c7 e0 08 ret <== NOT EXECUTED 203db90: 81 e8 00 00 restore <== NOT EXECUTED } 203db94: 81 c7 e0 08 ret <== NOT EXECUTED 203db98: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0203d648 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 203d648: 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; 203d64c: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 203d650: 80 a6 60 01 cmp %i1, 1 203d654: 08 80 00 07 bleu 203d670 <== NEVER TAKEN 203d658: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 203d65c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 203d660: 82 00 60 01 inc %g1 203d664: 80 a6 40 01 cmp %i1, %g1 203d668: 28 80 00 08 bleu,a 203d688 <== ALWAYS TAKEN 203d66c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); 203d670: 40 00 11 8c call 2041ca0 <__errno> <== NOT EXECUTED 203d674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203d678: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203d67c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 203d680: 81 c7 e0 08 ret <== NOT EXECUTED 203d684: 81 e8 00 00 restore <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 203d688: b7 36 60 01 srl %i1, 1, %i3 203d68c: 84 88 60 01 andcc %g1, 1, %g2 203d690: 12 80 00 06 bne 203d6a8 <== ALWAYS TAKEN 203d694: b6 06 c0 19 add %i3, %i1, %i3 203d698: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203d69c: 02 80 00 03 be 203d6a8 <== NOT EXECUTED 203d6a0: b7 2e 60 02 sll %i1, 2, %i3 <== NOT EXECUTED 203d6a4: b7 2e 60 01 sll %i1, 1, %i3 <== NOT EXECUTED 203d6a8: 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); 203d6ac: 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) + 203d6b0: b7 36 c0 03 srl %i3, %g3, %i3 203d6b4: 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); 203d6b8: b8 07 00 19 add %i4, %i1, %i4 203d6bc: 80 a0 a0 00 cmp %g2, 0 203d6c0: 12 80 00 06 bne 203d6d8 <== ALWAYS TAKEN 203d6c4: b6 06 c0 03 add %i3, %g3, %i3 203d6c8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 203d6cc: 02 80 00 03 be 203d6d8 <== NOT EXECUTED 203d6d0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 203d6d4: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 203d6d8: e0 17 40 00 lduh [ %i5 ], %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 203d6dc: 90 10 00 1d mov %i5, %o0 203d6e0: 92 10 00 1b mov %i3, %o1 203d6e4: 94 10 20 01 mov 1, %o2 203d6e8: 7f ff a0 f9 call 2025acc 203d6ec: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 203d6f0: b0 92 20 00 orcc %o0, 0, %i0 203d6f4: 12 bf ff e3 bne 203d680 <== NEVER TAKEN 203d6f8: 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); 203d6fc: a1 34 20 10 srl %l0, 0x10, %l0 203d700: a0 04 3f ff add %l0, -1, %l0 203d704: 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 ) 203d708: f8 0f 60 0a ldub [ %i5 + 0xa ], %i4 203d70c: 80 a7 20 02 cmp %i4, 2 203d710: 02 80 00 5f be 203d88c <== NEVER TAKEN 203d714: 80 a7 20 04 cmp %i4, 4 203d718: 02 80 00 65 be 203d8ac <== NEVER TAKEN 203d71c: 80 a7 20 01 cmp %i4, 1 203d720: 12 80 00 73 bne 203d8ec <== NEVER TAKEN 203d724: 80 8e 60 01 btst 1, %i1 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 203d728: 02 80 00 29 be 203d7cc 203d72c: 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; 203d730: 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)) = 203d734: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203d738: 84 08 a0 0f and %g2, 0xf, %g2 203d73c: c4 28 40 10 stb %g2, [ %g1 + %l0 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 203d740: 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)) = 203d744: 85 2e a0 04 sll %i2, 4, %g2 (*((uint8_t *)(block0->buffer + ofs))) | 203d748: 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)) = 203d74c: c6 08 40 10 ldub [ %g1 + %l0 ], %g3 203d750: 84 10 c0 02 or %g3, %g2, %g2 203d754: 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) ) 203d758: c2 17 40 00 lduh [ %i5 ], %g1 203d75c: 82 00 7f ff add %g1, -1, %g1 203d760: 80 a4 00 01 cmp %l0, %g1 203d764: 12 80 00 11 bne 203d7a8 <== ALWAYS TAKEN 203d768: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203d76c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203d770: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203d774: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203d778: 7f ff a0 d5 call 2025acc <== NOT EXECUTED 203d77c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203d780: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 203d784: 12 bf ff bf bne 203d680 <== NOT EXECUTED 203d788: 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); 203d78c: 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; 203d790: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 203d794: 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; 203d798: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 203d79c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203d7a0: 10 80 00 27 b 203d83c <== NOT EXECUTED 203d7a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 203d7a8: c2 07 bf fc ld [ %fp + -4 ], %g1 203d7ac: a0 04 20 01 inc %l0 203d7b0: 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); 203d7b4: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 203d7b8: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 203d7bc: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 203d7c0: 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))) | 203d7c4: 10 80 00 2d b 203d878 203d7c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 203d7cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 203d7d0: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 203d7d4: c0 28 40 10 clrb [ %g1 + %l0 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 203d7d8: c2 07 bf fc ld [ %fp + -4 ], %g1 203d7dc: 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)) = 203d7e0: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203d7e4: 84 16 80 02 or %i2, %g2, %g2 203d7e8: 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) ) 203d7ec: c2 17 40 00 lduh [ %i5 ], %g1 203d7f0: 82 00 7f ff add %g1, -1, %g1 203d7f4: 80 a4 00 01 cmp %l0, %g1 203d7f8: 12 80 00 17 bne 203d854 <== ALWAYS TAKEN 203d7fc: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 203d800: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 203d804: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 203d808: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 203d80c: 7f ff a0 b0 call 2025acc <== NOT EXECUTED 203d810: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 203d814: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 203d818: 12 bf ff 9a bne 203d680 <== NOT EXECUTED 203d81c: 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); 203d820: 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; 203d824: 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)) = 203d828: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 203d82c: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 203d830: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 203d834: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 203d838: 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)) = 203d83c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 203d840: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED 203d844: 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; 203d848: f8 2f 60 7c stb %i4, [ %i5 + 0x7c ] <== NOT EXECUTED 203d84c: 81 c7 e0 08 ret <== NOT EXECUTED 203d850: 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; 203d854: c2 07 bf fc ld [ %fp + -4 ], %g1 203d858: a0 04 20 01 inc %l0 203d85c: 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); 203d860: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 203d864: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203d868: 84 08 bf f0 and %g2, -16, %g2 203d86c: 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))) | 203d870: c2 07 bf fc ld [ %fp + -4 ], %g1 203d874: 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)) = 203d878: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 203d87c: b4 10 80 1a or %g2, %i2, %i2 203d880: f4 28 40 10 stb %i2, [ %g1 + %l0 ] 203d884: 81 c7 e0 08 ret 203d888: 81 e8 00 00 restore } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203d88c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 203d890: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203d894: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 203d898: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 203d89c: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 203d8a0: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 203d8a4: 10 80 00 0e b 203d8dc <== NOT EXECUTED 203d8a8: 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)); 203d8ac: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 203d8b0: 7f ff fe ea call 203d458 <== NOT EXECUTED 203d8b4: 90 2e 80 08 andn %i2, %o0, %o0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 203d8b8: 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)); 203d8bc: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 203d8c0: f8 00 60 1c ld [ %g1 + 0x1c ], %i4 <== NOT EXECUTED 203d8c4: 7f ff fe e5 call 203d458 <== NOT EXECUTED 203d8c8: 11 3c 00 00 sethi %hi(0xf0000000), %o0 <== NOT EXECUTED 203d8cc: c2 07 00 10 ld [ %i4 + %l0 ], %g1 <== NOT EXECUTED 203d8d0: 82 0a 00 01 and %o0, %g1, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 203d8d4: 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)) = 203d8d8: f6 27 00 10 st %i3, [ %i4 + %l0 ] <== NOT EXECUTED 203d8dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 203d8e0: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 203d8e4: 81 c7 e0 08 ret <== NOT EXECUTED 203d8e8: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 203d8ec: 40 00 10 ed call 2041ca0 <__errno> <== NOT EXECUTED 203d8f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 203d8f4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 203d8f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 203d8fc: 81 c7 e0 08 ret <== NOT EXECUTED 203d900: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02026248 : * 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) { 2026248: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 202624c: 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) { 2026250: 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) 2026254: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2026258: 80 88 60 04 btst 4, %g1 202625c: 02 80 00 08 be 202627c <== ALWAYS TAKEN 2026260: b8 10 20 00 clr %i4 { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 2026264: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2026268: 7f ff ff db call 20261d4 <== NOT EXECUTED 202626c: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 2026270: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED 2026274: 32 80 00 02 bne,a 202627c <== NOT EXECUTED 2026278: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 202627c: 7f ff fe 92 call 2025cc4 2026280: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 2026284: 7f ff 81 36 call 200675c 2026288: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 202628c: 80 a2 20 00 cmp %o0, 0 2026290: 32 80 00 02 bne,a 2026298 <== NEVER TAKEN 2026294: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED rc = -1; 2026298: 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; 202629c: f4 07 60 60 ld [ %i5 + 0x60 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20262a0: 10 80 00 04 b 20262b0 20262a4: b4 06 80 1b add %i2, %i3, %i2 free(node); 20262a8: 7f ff 89 34 call 2008778 <== NOT EXECUTED 20262ac: 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 ); 20262b0: 7f ff 9e fd call 200dea4 <_Chain_Get> 20262b4: 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 ) 20262b8: 80 a2 20 00 cmp %o0, 0 20262bc: 12 bf ff fb bne 20262a8 <== NEVER TAKEN 20262c0: 01 00 00 00 nop 20262c4: 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++) 20262c8: 80 a6 e0 18 cmp %i3, 0x18 20262cc: 32 bf ff f5 bne,a 20262a0 20262d0: f4 07 60 60 ld [ %i5 + 0x60 ], %i2 20262d4: 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; 20262d8: f4 07 60 64 ld [ %i5 + 0x64 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20262dc: 10 80 00 04 b 20262ec 20262e0: b4 06 80 1b add %i2, %i3, %i2 free(node); 20262e4: 7f ff 89 25 call 2008778 <== NOT EXECUTED 20262e8: 01 00 00 00 nop <== NOT EXECUTED 20262ec: 7f ff 9e ee call 200dea4 <_Chain_Get> 20262f0: 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 ) 20262f4: 80 a2 20 00 cmp %o0, 0 20262f8: 12 bf ff fb bne 20262e4 <== NEVER TAKEN 20262fc: 01 00 00 00 nop 2026300: 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++) 2026304: 80 a6 e0 18 cmp %i3, 0x18 2026308: 32 bf ff f5 bne,a 20262dc 202630c: f4 07 60 64 ld [ %i5 + 0x64 ], %i2 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2026310: 7f ff 89 1a call 2008778 2026314: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 free(fs_info->rhash); 2026318: 7f ff 89 18 call 2008778 202631c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 free(fs_info->uino); 2026320: 7f ff 89 16 call 2008778 2026324: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 free(fs_info->sec_buf); 2026328: 7f ff 89 14 call 2008778 202632c: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 close(fs_info->vol.fd); 2026330: 7f ff 88 59 call 2008494 2026334: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 if (rc) 2026338: 80 a7 20 00 cmp %i4, 0 202633c: 02 80 00 06 be 2026354 <== ALWAYS TAKEN 2026340: 01 00 00 00 nop errno = EIO; 2026344: 40 00 6e 57 call 2041ca0 <__errno> <== NOT EXECUTED 2026348: 01 00 00 00 nop <== NOT EXECUTED 202634c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2026350: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2026354: 81 c7 e0 08 ret 2026358: 91 e8 00 1c restore %g0, %i4, %o0 =============================================================================== 0203dd50 : #include #include int fchdir( int fd ) { 203dd50: 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 ); 203dd54: 03 00 81 ab sethi %hi(0x206ac00), %g1 203dd58: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 206afc0 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 203dd5c: c0 27 bf a4 clr [ %fp + -92 ] st.st_uid = 0; 203dd60: c0 37 bf aa clrh [ %fp + -86 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 203dd64: 80 a6 00 01 cmp %i0, %g1 203dd68: 1a 80 00 0c bcc 203dd98 203dd6c: c0 37 bf ac clrh [ %fp + -84 ] iop = rtems_libio_iop( fd ); 203dd70: bb 2e 20 03 sll %i0, 3, %i5 203dd74: 03 00 81 bc sethi %hi(0x206f000), %g1 203dd78: b1 2e 20 06 sll %i0, 6, %i0 203dd7c: b0 07 40 18 add %i5, %i0, %i0 203dd80: fa 00 61 48 ld [ %g1 + 0x148 ], %i5 203dd84: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 203dd88: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 203dd8c: 80 88 61 00 btst 0x100, %g1 203dd90: 32 80 00 08 bne,a 203ddb0 203dd94: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203dd98: 40 00 0f c2 call 2041ca0 <__errno> 203dd9c: b0 10 3f ff mov -1, %i0 203dda0: 82 10 20 09 mov 9, %g1 203dda4: c2 22 00 00 st %g1, [ %o0 ] 203dda8: 81 c7 e0 08 ret 203ddac: 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 ); 203ddb0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 203ddb4: c2 00 40 00 ld [ %g1 ], %g1 203ddb8: 9f c0 40 00 call %g1 203ddbc: b8 07 60 1c add %i5, 0x1c, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 203ddc0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 203ddc4: 90 10 00 1c mov %i4, %o0 203ddc8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 203ddcc: 9f c0 40 00 call %g1 203ddd0: 92 07 bf 98 add %fp, -104, %o1 if ( rv == 0 ) { 203ddd4: b0 92 20 00 orcc %o0, 0, %i0 203ddd8: 32 80 00 14 bne,a 203de28 <== NEVER TAKEN 203dddc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED bool access_ok = rtems_filesystem_check_access( 203dde0: d2 07 bf a4 ld [ %fp + -92 ], %o1 203dde4: d4 17 bf aa lduh [ %fp + -86 ], %o2 203dde8: d6 17 bf ac lduh [ %fp + -84 ], %o3 203ddec: 7f ff ac 28 call 2028e8c 203ddf0: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 203ddf4: 80 8a 20 ff btst 0xff, %o0 203ddf8: 02 80 00 07 be 203de14 203ddfc: 01 00 00 00 nop rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 203de00: 90 07 bf e4 add %fp, -28, %o0 203de04: 7f ff a6 11 call 2027648 203de08: 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 ); 203de0c: 10 80 00 07 b 203de28 203de10: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 } else { errno = EACCES; 203de14: 40 00 0f a3 call 2041ca0 <__errno> 203de18: b0 10 3f ff mov -1, %i0 203de1c: 82 10 20 0d mov 0xd, %g1 203de20: c2 22 00 00 st %g1, [ %o0 ] 203de24: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203de28: c2 00 60 04 ld [ %g1 + 4 ], %g1 203de2c: 9f c0 40 00 call %g1 203de30: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 203de34: 80 a6 20 00 cmp %i0, 0 203de38: 12 80 00 05 bne 203de4c 203de3c: 01 00 00 00 nop rv = rtems_filesystem_chdir( &loc ); 203de40: 7f ff a5 7e call 2027438 203de44: 90 07 bf e4 add %fp, -28, %o0 203de48: b0 10 00 08 mov %o0, %i0 } return rv; } 203de4c: 81 c7 e0 08 ret 203de50: 81 e8 00 00 restore =============================================================================== 02027690 : #include #include int fchmod( int fd, mode_t mode ) { 2027690: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2027694: 03 00 81 ab sethi %hi(0x206ac00), %g1 2027698: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 206afc0 202769c: 80 a6 00 01 cmp %i0, %g1 20276a0: 1a 80 00 0c bcc 20276d0 20276a4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 20276a8: bb 2e 20 03 sll %i0, 3, %i5 20276ac: 03 00 81 bc sethi %hi(0x206f000), %g1 20276b0: b1 2e 20 06 sll %i0, 6, %i0 20276b4: b0 07 40 18 add %i5, %i0, %i0 20276b8: fa 00 61 48 ld [ %g1 + 0x148 ], %i5 20276bc: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 20276c0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 20276c4: 80 88 61 00 btst 0x100, %g1 20276c8: 32 80 00 08 bne,a 20276e8 20276cc: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20276d0: 40 00 69 74 call 2041ca0 <__errno> 20276d4: b0 10 3f ff mov -1, %i0 20276d8: 82 10 20 09 mov 9, %g1 20276dc: c2 22 00 00 st %g1, [ %o0 ] 20276e0: 81 c7 e0 08 ret 20276e4: 81 e8 00 00 restore if (iop->pathinfo.mt_entry->writeable) { 20276e8: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 20276ec: 80 a0 60 00 cmp %g1, 0 20276f0: 02 80 00 12 be 2027738 <== NEVER TAKEN 20276f4: 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 ); 20276f8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20276fc: c2 00 40 00 ld [ %g1 ], %g1 2027700: 9f c0 40 00 call %g1 2027704: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->fchmod_h)( &iop->pathinfo, mode ); 2027708: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202770c: 90 07 60 1c add %i5, 0x1c, %o0 2027710: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 2027714: 9f c0 40 00 call %g1 2027718: 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 ); 202771c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2027720: b0 10 00 08 mov %o0, %i0 2027724: c2 00 60 04 ld [ %g1 + 4 ], %g1 2027728: 9f c0 40 00 call %g1 202772c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2027730: 81 c7 e0 08 ret 2027734: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 2027738: 40 00 69 5a call 2041ca0 <__errno> <== NOT EXECUTED 202773c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2027740: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 2027744: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 2027748: 81 c7 e0 08 ret <== NOT EXECUTED 202774c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02027750 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 2027750: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2027754: 03 00 81 ab sethi %hi(0x206ac00), %g1 2027758: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 206afc0 202775c: 80 a6 00 01 cmp %i0, %g1 2027760: 1a 80 00 0c bcc 2027790 2027764: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 2027768: bb 2e 20 03 sll %i0, 3, %i5 202776c: 03 00 81 bc sethi %hi(0x206f000), %g1 2027770: b1 2e 20 06 sll %i0, 6, %i0 2027774: b0 07 40 18 add %i5, %i0, %i0 2027778: fa 00 61 48 ld [ %g1 + 0x148 ], %i5 202777c: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2027780: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2027784: 80 88 61 00 btst 0x100, %g1 2027788: 32 80 00 08 bne,a 20277a8 202778c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 2027790: 40 00 69 44 call 2041ca0 <__errno> 2027794: b0 10 3f ff mov -1, %i0 2027798: 82 10 20 09 mov 9, %g1 202779c: c2 22 00 00 st %g1, [ %o0 ] 20277a0: 81 c7 e0 08 ret 20277a4: 81 e8 00 00 restore if (iop->pathinfo.mt_entry->writeable) { 20277a8: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 20277ac: 80 a0 60 00 cmp %g1, 0 20277b0: 02 80 00 13 be 20277fc <== NEVER TAKEN 20277b4: 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 ); 20277b8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20277bc: c2 00 40 00 ld [ %g1 ], %g1 20277c0: 9f c0 40 00 call %g1 20277c4: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 20277c8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20277cc: 90 07 60 1c add %i5, 0x1c, %o0 20277d0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 20277d4: 92 10 00 19 mov %i1, %o1 20277d8: 9f c0 40 00 call %g1 20277dc: 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 ); 20277e0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20277e4: b0 10 00 08 mov %o0, %i0 20277e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20277ec: 9f c0 40 00 call %g1 20277f0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20277f4: 81 c7 e0 08 ret 20277f8: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 20277fc: 40 00 69 29 call 2041ca0 <__errno> <== NOT EXECUTED 2027800: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2027804: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 2027808: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 202780c: 81 c7 e0 08 ret <== NOT EXECUTED 2027810: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0203de7c : int fcntl( int fd, int cmd, ... ) { 203de7c: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 203de80: 05 00 81 ab sethi %hi(0x206ac00), %g2 203de84: c4 00 a3 c0 ld [ %g2 + 0x3c0 ], %g2 ! 206afc0 ... ) { int ret; va_list ap; va_start( ap, cmd ); 203de88: 82 07 a0 4c add %fp, 0x4c, %g1 203de8c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 203de90: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 203de94: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 203de98: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 203de9c: 80 a6 00 02 cmp %i0, %g2 203dea0: 1a 80 00 0c bcc 203ded0 203dea4: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 203dea8: bb 2e 20 03 sll %i0, 3, %i5 203deac: 05 00 81 bc sethi %hi(0x206f000), %g2 203deb0: b1 2e 20 06 sll %i0, 6, %i0 203deb4: b0 07 40 18 add %i5, %i0, %i0 203deb8: fa 00 a1 48 ld [ %g2 + 0x148 ], %i5 203debc: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 203dec0: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 203dec4: 80 8a 21 00 btst 0x100, %o0 203dec8: 12 80 00 06 bne 203dee0 203decc: 80 a6 60 09 cmp %i1, 9 203ded0: 40 00 0f 74 call 2041ca0 <__errno> 203ded4: 01 00 00 00 nop 203ded8: 10 80 00 5b b 203e044 203dedc: 82 10 20 09 mov 9, %g1 ! 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 203dee0: 18 80 00 56 bgu 203e038 203dee4: 85 2e 60 02 sll %i1, 2, %g2 203dee8: 07 00 80 f7 sethi %hi(0x203dc00), %g3 203deec: 86 10 e2 54 or %g3, 0x254, %g3 ! 203de54 203def0: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 203def4: 81 c0 80 00 jmp %g2 203def8: 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(); 203defc: 7f ff 2a f4 call 2008acc 203df00: b0 10 3f ff mov -1, %i0 ! ffffffff if (diop != NULL) { 203df04: 80 a2 20 00 cmp %o0, 0 203df08: 02 80 00 60 be 203e088 203df0c: b8 10 00 08 mov %o0, %i4 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 203df10: 7f ff 2a d9 call 2008a74 203df14: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 203df18: 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; 203df1c: b0 0a 3d ff and %o0, -513, %i0 diop->flags |= rtems_libio_fcntl_flags( oflag ); 203df20: 7f ff 2a c8 call 2008a40 203df24: 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 ); 203df28: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203df2c: b6 12 00 1b or %o0, %i3, %i3 203df30: c2 00 40 00 ld [ %g1 ], %g1 203df34: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 203df38: 9f c0 40 00 call %g1 203df3c: f6 27 20 18 st %i3, [ %i4 + 0x18 ] rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 203df40: 92 07 60 1c add %i5, 0x1c, %o1 203df44: 7f ff a5 c1 call 2027648 203df48: 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 ); 203df4c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 203df50: c2 00 60 04 ld [ %g1 + 4 ], %g1 203df54: 9f c0 40 00 call %g1 203df58: 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 ); 203df5c: c2 07 20 2c ld [ %i4 + 0x2c ], %g1 203df60: 94 10 00 18 mov %i0, %o2 203df64: c2 00 40 00 ld [ %g1 ], %g1 203df68: 90 10 00 1c mov %i4, %o0 203df6c: 92 10 20 00 clr %o1 203df70: 9f c0 40 00 call %g1 203df74: 96 10 20 00 clr %o3 if ( rv == 0 ) { 203df78: b0 92 20 00 orcc %o0, 0, %i0 203df7c: 12 80 00 10 bne 203dfbc <== NEVER TAKEN 203df80: 03 00 81 bc sethi %hi(0x206f000), %g1 rv = diop - rtems_libio_iops; 203df84: f0 00 61 48 ld [ %g1 + 0x148 ], %i0 ! 206f148 203df88: b8 27 00 18 sub %i4, %i0, %i4 203df8c: b9 3f 20 03 sra %i4, 3, %i4 203df90: 85 2f 20 06 sll %i4, 6, %g2 203df94: 83 2f 20 03 sll %i4, 3, %g1 203df98: 82 20 80 01 sub %g2, %g1, %g1 203df9c: 85 28 60 06 sll %g1, 6, %g2 203dfa0: 82 00 40 02 add %g1, %g2, %g1 203dfa4: 82 00 40 1c add %g1, %i4, %g1 203dfa8: b1 28 60 0f sll %g1, 0xf, %i0 203dfac: b0 26 00 01 sub %i0, %g1, %i0 203dfb0: b1 2e 20 03 sll %i0, 3, %i0 203dfb4: 10 80 00 27 b 203e050 203dfb8: b0 06 00 1c add %i0, %i4, %i0 } else { rtems_libio_free( diop ); 203dfbc: 7f ff 2a f3 call 2008b88 <== NOT EXECUTED 203dfc0: 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) { 203dfc4: 10 80 00 24 b 203e054 <== NOT EXECUTED 203dfc8: 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); 203dfcc: 90 0a 28 00 and %o0, 0x800, %o0 203dfd0: 80 a0 00 08 cmp %g0, %o0 203dfd4: 10 80 00 22 b 203e05c 203dfd8: 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 ) ) 203dfdc: c2 00 40 00 ld [ %g1 ], %g1 203dfe0: 80 a0 60 00 cmp %g1, 0 203dfe4: 22 80 00 0e be,a 203e01c 203dfe8: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 203dfec: 10 80 00 0c b 203e01c 203dff0: 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 ); 203dff4: 7f ff 2a a0 call 2008a74 203dff8: 01 00 00 00 nop 203dffc: 10 80 00 15 b 203e050 203e000: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 203e004: 7f ff 2a 8f call 2008a40 203e008: 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); 203e00c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 203e010: 90 0a 22 01 and %o0, 0x201, %o0 203e014: 82 08 7d fe and %g1, -514, %g1 203e018: 90 12 00 01 or %o0, %g1, %o0 203e01c: d0 27 60 18 st %o0, [ %i5 + 0x18 ] { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 203e020: 10 80 00 0f b 203e05c 203e024: b0 10 20 00 clr %i0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 203e028: 40 00 0f 1e call 2041ca0 <__errno> 203e02c: 01 00 00 00 nop 203e030: 10 80 00 05 b 203e044 203e034: 82 10 20 86 mov 0x86, %g1 ! 86 ret = -1; break; default: errno = EINVAL; 203e038: 40 00 0f 1a call 2041ca0 <__errno> 203e03c: 01 00 00 00 nop 203e040: 82 10 20 16 mov 0x16, %g1 ! 16 203e044: 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); 203e048: 81 c7 e0 08 ret 203e04c: 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) { 203e050: 80 a6 20 00 cmp %i0, 0 203e054: 06 80 00 0d bl 203e088 <== NEVER TAKEN 203e058: 01 00 00 00 nop int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 203e05c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 203e060: 90 10 00 1d mov %i5, %o0 203e064: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 203e068: 9f c0 40 00 call %g1 203e06c: 92 10 00 19 mov %i1, %o1 if (err) { 203e070: ba 92 20 00 orcc %o0, 0, %i5 203e074: 02 80 00 05 be 203e088 <== ALWAYS TAKEN 203e078: 01 00 00 00 nop errno = err; 203e07c: 40 00 0f 09 call 2041ca0 <__errno> <== NOT EXECUTED 203e080: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 203e084: 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; } 203e088: 81 c7 e0 08 ret 203e08c: 81 e8 00 00 restore =============================================================================== 0200dd7c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200dd7c: 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) { 200dd80: 37 00 80 8d sethi %hi(0x2023400), %i3 200dd84: c2 06 e2 88 ld [ %i3 + 0x288 ], %g1 ! 2023688 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200dd88: ba 10 00 18 mov %i0, %i5 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200dd8c: 80 a0 60 00 cmp %g1, 0 200dd90: 12 80 00 1a bne 200ddf8 200dd94: b8 16 e2 88 or %i3, 0x288, %i4 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200dd98: 03 00 80 8e sethi %hi(0x2023800), %g1 200dd9c: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 20238f4 200dda0: 92 10 20 00 clr %o1 200dda4: 7f ff ec e0 call 2009124 200dda8: 94 10 20 00 clr %o2 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200ddac: c2 06 e2 88 ld [ %i3 + 0x288 ], %g1 200ddb0: 80 a0 60 00 cmp %g1, 0 200ddb4: 12 80 00 0a bne 200dddc <== NEVER TAKEN 200ddb8: b6 10 20 00 clr %i3 sc = rtems_semaphore_create( 200ddbc: 11 14 12 54 sethi %hi(0x50495000), %o0 200ddc0: 92 10 20 01 mov 1, %o1 200ddc4: 90 12 20 45 or %o0, 0x45, %o0 200ddc8: 94 10 20 54 mov 0x54, %o2 200ddcc: 96 10 20 00 clr %o3 200ddd0: 7f ff ec 3b call 2008ebc 200ddd4: 98 10 00 1c mov %i4, %o4 200ddd8: b6 10 00 08 mov %o0, %i3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200dddc: 03 00 80 8e sethi %hi(0x2023800), %g1 200dde0: d0 00 60 f4 ld [ %g1 + 0xf4 ], %o0 ! 20238f4 200dde4: 7f ff ed 1a call 200924c 200dde8: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ddec: 80 a6 e0 00 cmp %i3, 0 200ddf0: 12 80 00 f3 bne 200e1bc 200ddf4: 01 00 00 00 nop sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200ddf8: 03 00 80 8d sethi %hi(0x2023400), %g1 200ddfc: d0 00 62 88 ld [ %g1 + 0x288 ], %o0 ! 2023688 200de00: 92 10 20 00 clr %o1 200de04: 94 10 20 00 clr %o2 200de08: 7f ff ec c7 call 2009124 200de0c: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200de10: 80 a2 20 00 cmp %o0, 0 200de14: 12 80 00 ea bne 200e1bc <== NEVER TAKEN 200de18: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200de1c: f8 07 40 00 ld [ %i5 ], %i4 if (pipe == NULL) { 200de20: 80 a7 20 00 cmp %i4, 0 200de24: 32 80 00 56 bne,a 200df7c 200de28: 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)); 200de2c: 7f ff dc 0f call 2004e68 200de30: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200de34: b8 92 20 00 orcc %o0, 0, %i4 200de38: 02 80 00 4e be 200df70 200de3c: 92 10 20 00 clr %o1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200de40: 40 00 13 35 call 2012b14 200de44: 94 10 20 34 mov 0x34, %o2 pipe->Size = PIPE_BUF; 200de48: 82 10 22 00 mov 0x200, %g1 pipe->Buffer = malloc(pipe->Size); 200de4c: 90 10 22 00 mov 0x200, %o0 200de50: 7f ff dc 06 call 2004e68 200de54: c2 27 20 04 st %g1, [ %i4 + 4 ] if (! pipe->Buffer) 200de58: 80 a2 20 00 cmp %o0, 0 200de5c: 02 80 00 43 be 200df68 <== NEVER TAKEN 200de60: d0 27 00 00 st %o0, [ %i4 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200de64: 37 00 80 8b sethi %hi(0x2022c00), %i3 200de68: d0 4e e3 34 ldsb [ %i3 + 0x334 ], %o0 ! 2022f34 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200de6c: 35 14 12 5c sethi %hi(0x50497000), %i2 200de70: 82 16 a2 00 or %i2, 0x200, %g1 ! 50497200 200de74: 92 10 20 00 clr %o1 200de78: 90 12 00 01 or %o0, %g1, %o0 200de7c: 94 10 20 00 clr %o2 200de80: 40 00 05 c7 call 200f59c 200de84: 96 07 20 2c add %i4, 0x2c, %o3 200de88: 80 a2 20 00 cmp %o0, 0 200de8c: 12 80 00 35 bne 200df60 200de90: d0 4e e3 34 ldsb [ %i3 + 0x334 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200de94: 03 14 12 5d sethi %hi(0x50497400), %g1 200de98: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200de9c: 92 10 20 00 clr %o1 200dea0: 90 12 00 01 or %o0, %g1, %o0 200dea4: 94 10 20 00 clr %o2 200dea8: 40 00 05 bd call 200f59c 200deac: 96 07 20 30 add %i4, 0x30, %o3 200deb0: 80 a2 20 00 cmp %o0, 0 200deb4: 12 80 00 29 bne 200df58 200deb8: d0 4e e3 34 ldsb [ %i3 + 0x334 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200debc: b4 16 a3 00 or %i2, 0x300, %i2 200dec0: 92 10 20 01 mov 1, %o1 200dec4: 90 12 00 1a or %o0, %i2, %o0 200dec8: 94 10 20 10 mov 0x10, %o2 200decc: 96 10 20 00 clr %o3 200ded0: 7f ff eb fb call 2008ebc 200ded4: 98 07 20 28 add %i4, 0x28, %o4 200ded8: 80 a2 20 00 cmp %o0, 0 200dedc: 12 80 00 1d bne 200df50 200dee0: 94 07 bf fc add %fp, -4, %o2 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 200dee4: d2 07 20 2c ld [ %i4 + 0x2c ], %o1 200dee8: 31 00 80 90 sethi %hi(0x2024000), %i0 200deec: 7f ff f3 05 call 200ab00 <_Objects_Get> 200def0: 90 16 23 b0 or %i0, 0x3b0, %o0 ! 20243b0 <_Barrier_Information> static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200def4: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200def8: 35 04 00 00 sethi %hi(0x10000000), %i2 200defc: 82 10 40 1a or %g1, %i2, %g1 _Thread_Enable_dispatch(); 200df00: 7f ff f6 b3 call 200b9cc <_Thread_Enable_dispatch> 200df04: c2 22 20 4c st %g1, [ %o0 + 0x4c ] 200df08: d2 07 20 30 ld [ %i4 + 0x30 ], %o1 200df0c: 94 07 bf fc add %fp, -4, %o2 200df10: 7f ff f2 fc call 200ab00 <_Objects_Get> 200df14: 90 16 23 b0 or %i0, 0x3b0, %o0 _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 200df18: c2 02 20 4c ld [ %o0 + 0x4c ], %g1 200df1c: b4 10 40 1a or %g1, %i2, %i2 _Thread_Enable_dispatch(); 200df20: 7f ff f6 ab call 200b9cc <_Thread_Enable_dispatch> 200df24: f4 22 20 4c st %i2, [ %o0 + 0x4c ] #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200df28: c2 0e e3 34 ldub [ %i3 + 0x334 ], %g1 200df2c: 84 00 60 01 add %g1, 1, %g2 200df30: 83 28 60 18 sll %g1, 0x18, %g1 200df34: 83 38 60 18 sra %g1, 0x18, %g1 200df38: 80 a0 60 7a cmp %g1, 0x7a 200df3c: 12 80 00 0f bne 200df78 200df40: c4 2e e3 34 stb %g2, [ %i3 + 0x334 ] c = 'a'; 200df44: 82 10 20 61 mov 0x61, %g1 200df48: 10 80 00 0c b 200df78 200df4c: c2 2e e3 34 stb %g1, [ %i3 + 0x334 ] return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200df50: 40 00 05 c4 call 200f660 200df54: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200df58: 40 00 05 c2 call 200f660 200df5c: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200df60: 7f ff da 9a call 20049c8 200df64: d0 07 00 00 ld [ %i4 ], %o0 err_buf: free(pipe); 200df68: 7f ff da 98 call 20049c8 200df6c: 90 10 00 1c mov %i4, %o0 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 200df70: 10 80 00 13 b 200dfbc 200df74: b0 10 3f f4 mov -12, %i0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200df78: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200df7c: 92 10 20 00 clr %o1 200df80: 7f ff ec 69 call 2009124 200df84: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200df88: c2 07 40 00 ld [ %i5 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200df8c: 80 a0 00 08 cmp %g0, %o0 200df90: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200df94: 80 a0 60 00 cmp %g1, 0 200df98: 12 80 00 09 bne 200dfbc 200df9c: b0 0e 3f fc and %i0, -4, %i0 if (err) 200dfa0: 80 a6 20 00 cmp %i0, 0 200dfa4: 22 80 00 06 be,a 200dfbc <== ALWAYS TAKEN 200dfa8: f8 27 40 00 st %i4, [ %i5 ] pipe_free(pipe); 200dfac: 7f ff ff 37 call 200dc88 <== NOT EXECUTED 200dfb0: 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); 200dfb4: 10 80 00 03 b 200dfc0 <== NOT EXECUTED 200dfb8: 03 00 80 8d sethi %hi(0x2023400), %g1 <== NOT EXECUTED 200dfbc: 03 00 80 8d sethi %hi(0x2023400), %g1 200dfc0: 7f ff ec a3 call 200924c 200dfc4: d0 00 62 88 ld [ %g1 + 0x288 ], %o0 ! 2023688 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200dfc8: 80 a6 20 00 cmp %i0, 0 200dfcc: 12 80 00 7c bne 200e1bc 200dfd0: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200dfd4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200dfd8: 82 08 60 06 and %g1, 6, %g1 200dfdc: 80 a0 60 04 cmp %g1, 4 200dfe0: 02 80 00 2e be 200e098 200dfe4: f8 07 40 00 ld [ %i5 ], %i4 200dfe8: 80 a0 60 06 cmp %g1, 6 200dfec: 02 80 00 56 be 200e144 200dff0: 80 a0 60 02 cmp %g1, 2 200dff4: 12 80 00 6a bne 200e19c <== NEVER TAKEN 200dff8: 01 00 00 00 nop case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200dffc: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200e000: 82 00 60 01 inc %g1 200e004: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200e008: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200e00c: 84 00 60 01 add %g1, 1, %g2 200e010: 80 a0 60 00 cmp %g1, 0 200e014: 12 80 00 05 bne 200e028 <== NEVER TAKEN 200e018: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200e01c: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200e020: 40 00 05 b9 call 200f704 200e024: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Writers == 0) { 200e028: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200e02c: 80 a0 60 00 cmp %g1, 0 200e030: 12 80 00 5b bne 200e19c 200e034: 01 00 00 00 nop /* Not an error */ if (LIBIO_NODELAY(iop)) 200e038: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e03c: 80 88 60 01 btst 1, %g1 200e040: 12 80 00 57 bne 200e19c 200e044: 01 00 00 00 nop break; prevCounter = pipe->writerCounter; 200e048: f6 07 20 24 ld [ %i4 + 0x24 ], %i3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200e04c: 7f ff ec 80 call 200924c 200e050: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200e054: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200e058: 40 00 05 c2 call 200f760 200e05c: 92 10 20 00 clr %o1 200e060: 80 a2 20 00 cmp %o0, 0 200e064: 12 80 00 52 bne 200e1ac <== NEVER TAKEN 200e068: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200e06c: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200e070: 7f ff ec 2d call 2009124 200e074: 94 10 20 00 clr %o2 200e078: 80 a2 20 00 cmp %o0, 0 200e07c: 32 80 00 4d bne,a 200e1b0 <== NEVER TAKEN 200e080: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 200e084: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200e088: 80 a6 c0 01 cmp %i3, %g1 200e08c: 02 bf ff f0 be 200e04c <== NEVER TAKEN 200e090: 01 00 00 00 nop 200e094: 30 80 00 42 b,a 200e19c } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200e098: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200e09c: 82 00 60 01 inc %g1 200e0a0: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200e0a4: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200e0a8: 84 00 60 01 add %g1, 1, %g2 200e0ac: 80 a0 60 00 cmp %g1, 0 200e0b0: 12 80 00 05 bne 200e0c4 <== NEVER TAKEN 200e0b4: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200e0b8: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200e0bc: 40 00 05 92 call 200f704 200e0c0: 92 07 bf f8 add %fp, -8, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200e0c4: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200e0c8: 80 a0 60 00 cmp %g1, 0 200e0cc: 12 80 00 34 bne 200e19c 200e0d0: 01 00 00 00 nop 200e0d4: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e0d8: 80 88 60 01 btst 1, %g1 200e0dc: 22 80 00 07 be,a 200e0f8 200e0e0: f6 07 20 20 ld [ %i4 + 0x20 ], %i3 PIPE_UNLOCK(pipe); 200e0e4: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200e0e8: 7f ff ec 59 call 200924c 200e0ec: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200e0f0: 10 80 00 31 b 200e1b4 200e0f4: 90 10 00 1d mov %i5, %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200e0f8: 7f ff ec 55 call 200924c 200e0fc: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200e100: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200e104: 40 00 05 97 call 200f760 200e108: 92 10 20 00 clr %o1 200e10c: 80 a2 20 00 cmp %o0, 0 200e110: 12 80 00 27 bne 200e1ac <== NEVER TAKEN 200e114: 92 10 20 00 clr %o1 goto out_error; if (! PIPE_LOCK(pipe)) 200e118: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 200e11c: 7f ff ec 02 call 2009124 200e120: 94 10 20 00 clr %o2 200e124: 80 a2 20 00 cmp %o0, 0 200e128: 32 80 00 22 bne,a 200e1b0 <== NEVER TAKEN 200e12c: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 200e130: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200e134: 80 a6 c0 01 cmp %i3, %g1 200e138: 02 bf ff f0 be 200e0f8 <== NEVER TAKEN 200e13c: 01 00 00 00 nop 200e140: 30 80 00 17 b,a 200e19c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200e144: c2 07 20 20 ld [ %i4 + 0x20 ], %g1 200e148: 82 00 60 01 inc %g1 200e14c: c2 27 20 20 st %g1, [ %i4 + 0x20 ] if (pipe->Readers ++ == 0) 200e150: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200e154: 84 00 60 01 add %g1, 1, %g2 200e158: 80 a0 60 00 cmp %g1, 0 200e15c: 12 80 00 05 bne 200e170 <== NEVER TAKEN 200e160: c4 27 20 10 st %g2, [ %i4 + 0x10 ] PIPE_WAKEUPWRITERS(pipe); 200e164: d0 07 20 30 ld [ %i4 + 0x30 ], %o0 200e168: 40 00 05 67 call 200f704 200e16c: 92 07 bf f8 add %fp, -8, %o1 pipe->writerCounter ++; 200e170: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200e174: 82 00 60 01 inc %g1 200e178: c2 27 20 24 st %g1, [ %i4 + 0x24 ] if (pipe->Writers ++ == 0) 200e17c: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 200e180: 84 00 60 01 add %g1, 1, %g2 200e184: 80 a0 60 00 cmp %g1, 0 200e188: 12 80 00 05 bne 200e19c <== NEVER TAKEN 200e18c: c4 27 20 14 st %g2, [ %i4 + 0x14 ] PIPE_WAKEUPREADERS(pipe); 200e190: d0 07 20 2c ld [ %i4 + 0x2c ], %o0 200e194: 40 00 05 5c call 200f704 200e198: 92 07 bf f8 add %fp, -8, %o1 break; } PIPE_UNLOCK(pipe); 200e19c: 7f ff ec 2c call 200924c 200e1a0: d0 07 20 28 ld [ %i4 + 0x28 ], %o0 return 0; 200e1a4: 81 c7 e0 08 ret 200e1a8: 81 e8 00 00 restore goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200e1ac: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200e1b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e1b4: 7f ff fe c0 call 200dcb4 200e1b8: 92 10 00 19 mov %i1, %o1 return err; } 200e1bc: 81 c7 e0 08 ret 200e1c0: 81 e8 00 00 restore =============================================================================== 02009790 : long fpathconf( int fd, int name ) { 2009790: 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); 2009794: 03 00 80 4a sethi %hi(0x2012800), %g1 2009798: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 2012870 200979c: 80 a6 00 01 cmp %i0, %g1 20097a0: 1a 80 00 0c bcc 20097d0 <== ALWAYS TAKEN 20097a4: 01 00 00 00 nop iop = rtems_libio_iop(fd); 20097a8: 83 2e 20 03 sll %i0, 3, %g1 <== NOT EXECUTED 20097ac: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED 20097b0: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED 20097b4: 03 00 80 4c sethi %hi(0x2013000), %g1 <== NOT EXECUTED 20097b8: c2 00 61 7c ld [ %g1 + 0x17c ], %g1 ! 201317c <== NOT EXECUTED 20097bc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 20097c0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 20097c4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 20097c8: 12 80 00 08 bne 20097e8 <== NOT EXECUTED 20097cc: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED 20097d0: 40 00 09 60 call 200bd50 <__errno> 20097d4: b0 10 3f ff mov -1, %i0 20097d8: 82 10 20 09 mov 9, %g1 20097dc: c2 22 00 00 st %g1, [ %o0 ] 20097e0: 81 c7 e0 08 ret 20097e4: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 20097e8: 18 80 00 2c bgu 2009898 <== NOT EXECUTED 20097ec: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 20097f0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 20097f4: 05 00 80 25 sethi %hi(0x2009400), %g2 <== NOT EXECUTED 20097f8: 84 10 a3 60 or %g2, 0x360, %g2 ! 2009760 <_close_r+0x10> <== NOT EXECUTED 20097fc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED 2009800: 81 c0 80 00 jmp %g2 <== NOT EXECUTED 2009804: 01 00 00 00 nop <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 2009808: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED break; 200980c: 81 c7 e0 08 ret <== NOT EXECUTED 2009810: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_CANON: return_value = the_limits->max_canon; 2009814: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED break; 2009818: 81 c7 e0 08 ret <== NOT EXECUTED 200981c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_MAX_INPUT: return_value = the_limits->max_input; 2009820: f0 00 60 30 ld [ %g1 + 0x30 ], %i0 <== NOT EXECUTED break; 2009824: 81 c7 e0 08 ret <== NOT EXECUTED 2009828: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NAME_MAX: return_value = the_limits->name_max; 200982c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 <== NOT EXECUTED break; 2009830: 81 c7 e0 08 ret <== NOT EXECUTED 2009834: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PATH_MAX: return_value = the_limits->path_max; 2009838: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 <== NOT EXECUTED break; 200983c: 81 c7 e0 08 ret <== NOT EXECUTED 2009840: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2009844: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 <== NOT EXECUTED break; 2009848: 81 c7 e0 08 ret <== NOT EXECUTED 200984c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2009850: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 <== NOT EXECUTED break; 2009854: 81 c7 e0 08 ret <== NOT EXECUTED 2009858: 81 e8 00 00 restore <== NOT EXECUTED case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 200985c: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 <== NOT EXECUTED break; 2009860: 81 c7 e0 08 ret <== NOT EXECUTED 2009864: 81 e8 00 00 restore <== NOT EXECUTED case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009868: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 <== NOT EXECUTED break; 200986c: 81 c7 e0 08 ret <== NOT EXECUTED 2009870: 81 e8 00 00 restore <== NOT EXECUTED case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2009874: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 <== NOT EXECUTED break; 2009878: 81 c7 e0 08 ret <== NOT EXECUTED 200987c: 81 e8 00 00 restore <== NOT EXECUTED case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2009880: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 <== NOT EXECUTED break; 2009884: 81 c7 e0 08 ret <== NOT EXECUTED 2009888: 81 e8 00 00 restore <== NOT EXECUTED case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 200988c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 <== NOT EXECUTED break; 2009890: 81 c7 e0 08 ret <== NOT EXECUTED 2009894: 81 e8 00 00 restore <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 2009898: 40 00 09 2e call 200bd50 <__errno> <== NOT EXECUTED 200989c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20098a0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20098a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return return_value; } 20098a8: 81 c7 e0 08 ret <== NOT EXECUTED 20098ac: 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 76 sethi %hi(0x201d800), %g1 2003718: 82 10 62 b0 or %g1, 0x2b0, %g1 ! 201dab0 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 77 sethi %hi(0x201dc00), %g1 2003738: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 201dd68 <_System_state_Current> 200373c: 80 a0 60 03 cmp %g1, 3 2003740: 12 80 00 09 bne 2003764 <== NEVER TAKEN 2003744: 03 00 80 75 sethi %hi(0x201d400), %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 75 sethi %hi(0x201d400), %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 62 f4 ld [ %g1 + 0x2f4 ], %g1 2003768: 80 a0 60 00 cmp %g1, 0 200376c: 02 80 00 06 be 2003784 2003770: 3b 00 80 73 sethi %hi(0x201cc00), %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 73 sethi %hi(0x201cc00), %i5 2003784: d0 07 63 18 ld [ %i5 + 0x318 ], %o0 ! 201cf18 2003788: 40 00 17 6c call 2009538 <_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 6e sethi %hi(0x201b800), %i0 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 200379c: c2 07 63 18 ld [ %i5 + 0x318 ], %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 20 10 restore %i0, 0x10, %o0 20037b0: 81 c7 e0 08 ret 20037b4: 81 e8 00 00 restore =============================================================================== 02019fa4 : int fstat( int fd, struct stat *sbuf ) { 2019fa4: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 2019fa8: 80 a6 60 00 cmp %i1, 0 2019fac: 32 80 00 06 bne,a 2019fc4 <== ALWAYS TAKEN 2019fb0: 03 00 80 73 sethi %hi(0x201cc00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 2019fb4: 7f ff d6 30 call 200f874 <__errno> <== NOT EXECUTED 2019fb8: 01 00 00 00 nop <== NOT EXECUTED 2019fbc: 10 80 00 12 b 201a004 <== NOT EXECUTED 2019fc0: 82 10 20 0e mov 0xe, %g1 ! e <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2019fc4: c2 00 63 5c ld [ %g1 + 0x35c ], %g1 2019fc8: 80 a6 00 01 cmp %i0, %g1 2019fcc: 1a 80 00 0b bcc 2019ff8 2019fd0: 83 2e 20 03 sll %i0, 3, %g1 2019fd4: b1 2e 20 06 sll %i0, 6, %i0 2019fd8: b0 00 40 18 add %g1, %i0, %i0 2019fdc: 03 00 80 76 sethi %hi(0x201d800), %g1 2019fe0: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 201da98 2019fe4: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 2019fe8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2019fec: 80 88 61 00 btst 0x100, %g1 2019ff0: 12 80 00 08 bne 201a010 2019ff4: 94 10 20 48 mov 0x48, %o2 2019ff8: 7f ff d6 1f call 200f874 <__errno> 2019ffc: 01 00 00 00 nop 201a000: 82 10 20 09 mov 9, %g1 ! 9 201a004: c2 22 00 00 st %g1, [ %o0 ] 201a008: 81 c7 e0 08 ret 201a00c: 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) ); 201a010: 90 10 00 19 mov %i1, %o0 201a014: 7f ff d8 b0 call 20102d4 201a018: 92 10 20 00 clr %o1 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 201a01c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 201a020: 90 06 20 1c add %i0, 0x1c, %o0 201a024: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 201a028: 9f c0 40 00 call %g1 201a02c: 92 10 00 19 mov %i1, %o1 } 201a030: 81 c7 e0 08 ret 201a034: 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 84 sethi %hi(0x2021000), %g1 2003604: c4 00 63 a8 ld [ %g1 + 0x3a8 ], %g2 ! 20213a8 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 84 sethi %hi(0x2021000), %g2 2003618: c4 00 a3 ac ld [ %g2 + 0x3ac ], %g2 ! 20213ac 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 =============================================================================== 0205cd7c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 205cd7c: 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 ); 205cd80: 03 00 81 ab sethi %hi(0x206ac00), %g1 205cd84: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 206afc0 205cd88: 80 a6 00 01 cmp %i0, %g1 205cd8c: 1a 80 00 08 bcc 205cdac <== NEVER TAKEN 205cd90: ba 10 20 00 clr %i5 205cd94: bb 2e 20 03 sll %i0, 3, %i5 205cd98: 03 00 81 bc sethi %hi(0x206f000), %g1 205cd9c: b1 2e 20 06 sll %i0, 6, %i0 205cda0: b0 07 40 18 add %i5, %i0, %i0 205cda4: fa 00 61 48 ld [ %g1 + 0x148 ], %i5 205cda8: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 205cdac: 7f ff 31 30 call 202926c 205cdb0: 90 07 60 1c add %i5, 0x1c, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 205cdb4: 80 a2 20 00 cmp %o0, 0 205cdb8: 22 80 00 08 be,a 205cdd8 205cdbc: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 205cdc0: 7f ff 93 b8 call 2041ca0 <__errno> 205cdc4: b0 10 3f ff mov -1, %i0 205cdc8: 82 10 20 14 mov 0x14, %g1 205cdcc: c2 22 00 00 st %g1, [ %o0 ] 205cdd0: 81 c7 e0 08 ret 205cdd4: 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 ); 205cdd8: 90 10 00 1d mov %i5, %o0 205cddc: c2 00 60 08 ld [ %g1 + 8 ], %g1 205cde0: 92 10 00 19 mov %i1, %o1 205cde4: 9f c0 40 00 call %g1 205cde8: 94 10 00 1a mov %i2, %o2 } 205cdec: 81 c7 e0 08 ret 205cdf0: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 02027e9c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 2027e9c: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2027ea0: 03 00 81 ba sethi %hi(0x206e800), %g1 2027ea4: c4 48 63 58 ldsb [ %g1 + 0x358 ], %g2 ! 206eb58 2027ea8: 80 a0 a0 00 cmp %g2, 0 2027eac: 12 80 00 32 bne 2027f74 2027eb0: 01 00 00 00 nop return; etc_passwd_initted = 1; 2027eb4: 84 10 20 01 mov 1, %g2 ! 1 mkdir("/etc", 0777); 2027eb8: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 2027ebc: c4 28 63 58 stb %g2, [ %g1 + 0x358 ] mkdir("/etc", 0777); 2027ec0: 11 00 81 77 sethi %hi(0x205dc00), %o0 2027ec4: 7f ff 84 1b call 2008f30 2027ec8: 90 12 23 18 or %o0, 0x318, %o0 ! 205df18 <_rodata_start+0x9e8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 2027ecc: 3b 00 81 77 sethi %hi(0x205dc00), %i5 2027ed0: 13 00 81 a9 sethi %hi(0x206a400), %o1 2027ed4: 90 17 63 a0 or %i5, 0x3a0, %o0 2027ed8: 40 00 6a 29 call 204277c 2027edc: 92 12 61 a0 or %o1, 0x1a0, %o1 2027ee0: 80 a2 20 00 cmp %o0, 0 2027ee4: 12 80 00 0d bne 2027f18 2027ee8: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 2027eec: 90 17 63 a0 or %i5, 0x3a0, %o0 2027ef0: 13 00 81 87 sethi %hi(0x2061c00), %o1 2027ef4: 40 00 6a 22 call 204277c 2027ef8: 92 12 62 98 or %o1, 0x298, %o1 ! 2061e98 2027efc: b0 92 20 00 orcc %o0, 0, %i0 2027f00: 02 80 00 08 be 2027f20 <== NEVER TAKEN 2027f04: 11 00 81 8f sethi %hi(0x2063c00), %o0 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 2027f08: 92 10 00 18 mov %i0, %o1 2027f0c: 40 00 6a 80 call 204290c 2027f10: 90 12 22 40 or %o0, 0x240, %o0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 2027f14: 90 10 00 18 mov %i0, %o0 2027f18: 40 00 67 b4 call 2041de8 2027f1c: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 2027f20: 3b 00 81 78 sethi %hi(0x205e000), %i5 2027f24: 13 00 81 a9 sethi %hi(0x206a400), %o1 2027f28: 90 17 60 58 or %i5, 0x58, %o0 2027f2c: 40 00 6a 14 call 204277c 2027f30: 92 12 61 a0 or %o1, 0x1a0, %o1 2027f34: b0 92 20 00 orcc %o0, 0, %i0 2027f38: 12 80 00 0d bne 2027f6c 2027f3c: 01 00 00 00 nop fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 2027f40: 90 17 60 58 or %i5, 0x58, %o0 2027f44: 13 00 81 87 sethi %hi(0x2061c00), %o1 2027f48: 40 00 6a 0d call 204277c 2027f4c: 92 12 62 98 or %o1, 0x298, %o1 ! 2061e98 2027f50: b0 92 20 00 orcc %o0, 0, %i0 2027f54: 02 80 00 08 be 2027f74 <== NEVER TAKEN 2027f58: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 2027f5c: 11 00 81 8f sethi %hi(0x2063c00), %o0 2027f60: 92 10 00 18 mov %i0, %o1 2027f64: 40 00 6a 6a call 204290c 2027f68: 90 12 22 a8 or %o0, 0x2a8, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2027f6c: 40 00 67 9f call 2041de8 2027f70: 81 e8 00 00 restore 2027f74: 81 c7 e0 08 ret 2027f78: 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 74 sethi %hi(0x201d000), %g1 2006308: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 201d1c0 <__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 74 sethi %hi(0x201d000), %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 74 sethi %hi(0x201d000), %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 74 sethi %hi(0x201d000), %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 60 3c ld [ %g1 + 0x3c ], %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 =============================================================================== 0201a464 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 201a464: 9d e3 bf 90 save %sp, -112, %sp POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 201a468: 7f ff fe f9 call 201a04c 201a46c: 01 00 00 00 nop 201a470: 80 a6 00 08 cmp %i0, %o0 201a474: 02 80 00 06 be 201a48c 201a478: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 201a47c: 7f ff d4 fe call 200f874 <__errno> 201a480: 01 00 00 00 nop 201a484: 10 80 00 a5 b 201a718 201a488: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 201a48c: 02 80 00 06 be 201a4a4 201a490: 01 00 00 00 nop static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 201a494: ba 06 7f ff add %i1, -1, %i5 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 201a498: 80 a7 60 1f cmp %i5, 0x1f 201a49c: 28 80 00 06 bleu,a 201a4b4 201a4a0: 83 2e 60 02 sll %i1, 2, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 201a4a4: 7f ff d4 f4 call 200f874 <__errno> 201a4a8: 01 00 00 00 nop 201a4ac: 10 80 00 9b b 201a718 201a4b0: 82 10 20 16 mov 0x16, %g1 ! 16 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 201a4b4: 85 2e 60 04 sll %i1, 4, %g2 201a4b8: 84 20 80 01 sub %g2, %g1, %g2 201a4bc: 03 00 80 78 sethi %hi(0x201e000), %g1 201a4c0: 82 10 61 b0 or %g1, 0x1b0, %g1 ! 201e1b0 <_POSIX_signals_Vectors> 201a4c4: 82 00 40 02 add %g1, %g2, %g1 201a4c8: c2 00 60 08 ld [ %g1 + 8 ], %g1 201a4cc: 80 a0 60 01 cmp %g1, 1 201a4d0: 02 80 00 7b be 201a6bc 201a4d4: b0 10 20 00 clr %i0 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 201a4d8: 80 a6 60 04 cmp %i1, 4 201a4dc: 02 80 00 06 be 201a4f4 201a4e0: 80 a6 60 08 cmp %i1, 8 201a4e4: 02 80 00 04 be 201a4f4 201a4e8: 80 a6 60 0b cmp %i1, 0xb 201a4ec: 12 80 00 08 bne 201a50c 201a4f0: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 201a4f4: 40 00 01 2e call 201a9ac 201a4f8: 01 00 00 00 nop 201a4fc: 40 00 00 f2 call 201a8c4 201a500: 92 10 00 19 mov %i1, %o1 201a504: 81 c7 e0 08 ret 201a508: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 201a50c: f2 27 bf f4 st %i1, [ %fp + -12 ] siginfo->si_code = SI_USER; 201a510: c2 27 bf f8 st %g1, [ %fp + -8 ] if ( !value ) { 201a514: 80 a6 a0 00 cmp %i2, 0 201a518: 12 80 00 04 bne 201a528 201a51c: bb 28 40 1d sll %g1, %i5, %i5 siginfo->si_value.sival_int = 0; 201a520: 10 80 00 04 b 201a530 201a524: c0 27 bf fc clr [ %fp + -4 ] } else { siginfo->si_value = *value; 201a528: c2 06 80 00 ld [ %i2 ], %g1 201a52c: c2 27 bf fc st %g1, [ %fp + -4 ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 201a530: 03 00 80 77 sethi %hi(0x201dc00), %g1 201a534: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 201dc10 <_Thread_Dispatch_disable_level> 201a538: 84 00 a0 01 inc %g2 201a53c: c4 20 60 10 st %g2, [ %g1 + 0x10 ] return _Thread_Dispatch_disable_level; 201a540: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 201a544: 03 00 80 78 sethi %hi(0x201e000), %g1 201a548: d0 00 61 5c ld [ %g1 + 0x15c ], %o0 ! 201e15c <_Per_CPU_Information+0xc> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 201a54c: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 201a550: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 201a554: 80 af 40 01 andncc %i5, %g1, %g0 201a558: 12 80 00 51 bne 201a69c 201a55c: 03 00 80 78 sethi %hi(0x201e000), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 201a560: d0 00 63 3c ld [ %g1 + 0x33c ], %o0 ! 201e33c <_POSIX_signals_Wait_queue> /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201a564: 03 00 80 78 sethi %hi(0x201e000), %g1 201a568: 10 80 00 0a b 201a590 201a56c: 82 10 63 40 or %g1, 0x340, %g1 ! 201e340 <_POSIX_signals_Wait_queue+0x4> #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 201a570: 80 8f 40 03 btst %i5, %g3 201a574: 12 80 00 4a bne 201a69c 201a578: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 201a57c: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2 201a580: 80 af 40 02 andncc %i5, %g2, %g0 201a584: 12 80 00 47 bne 201a6a0 201a588: 92 10 00 19 mov %i1, %o1 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 201a58c: d0 02 00 00 ld [ %o0 ], %o0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 201a590: 80 a2 00 01 cmp %o0, %g1 201a594: 32 bf ff f7 bne,a 201a570 201a598: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 201a59c: 03 00 80 73 sethi %hi(0x201cc00), %g1 201a5a0: c4 08 62 74 ldub [ %g1 + 0x274 ], %g2 ! 201ce74 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 201a5a4: 90 10 20 00 clr %o0 interested_priority = PRIORITY_MAXIMUM + 1; 201a5a8: 84 00 a0 01 inc %g2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201a5ac: 88 10 20 02 mov 2, %g4 /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 201a5b0: 19 00 80 76 sethi %hi(0x201d800), %o4 */ RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal ( States_Control the_states ) { return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL); 201a5b4: 31 04 00 00 sethi %hi(0x10000000), %i0 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 201a5b8: 83 29 20 02 sll %g4, 2, %g1 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 201a5bc: 86 13 23 78 or %o4, 0x378, %g3 201a5c0: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 201a5c4: 80 a0 60 00 cmp %g1, 0 201a5c8: 22 80 00 2f be,a 201a684 <== NEVER TAKEN 201a5cc: 88 01 20 01 inc %g4 <== NOT EXECUTED continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 201a5d0: c2 00 60 04 ld [ %g1 + 4 ], %g1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a5d4: b4 10 20 01 mov 1, %i2 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 201a5d8: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a5dc: 10 80 00 26 b 201a674 201a5e0: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 the_thread = (Thread_Control *) object_table[ index ]; 201a5e4: c2 02 c0 01 ld [ %o3 + %g1 ], %g1 if ( !the_thread ) 201a5e8: 80 a0 60 00 cmp %g1, 0 201a5ec: 22 80 00 22 be,a 201a674 201a5f0: b4 06 a0 01 inc %i2 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 201a5f4: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 201a5f8: 80 a0 c0 02 cmp %g3, %g2 201a5fc: 38 80 00 1e bgu,a 201a674 201a600: b4 06 a0 01 inc %i2 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 201a604: de 00 61 5c ld [ %g1 + 0x15c ], %o7 201a608: de 03 e0 d0 ld [ %o7 + 0xd0 ], %o7 201a60c: 80 af 40 0f andncc %i5, %o7, %g0 201a610: 22 80 00 19 be,a 201a674 201a614: b4 06 a0 01 inc %i2 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 201a618: 80 a0 c0 02 cmp %g3, %g2 201a61c: 2a 80 00 14 bcs,a 201a66c 201a620: 84 10 00 03 mov %g3, %g2 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 201a624: 80 a2 20 00 cmp %o0, 0 201a628: 22 80 00 13 be,a 201a674 <== NEVER TAKEN 201a62c: b4 06 a0 01 inc %i2 <== NOT EXECUTED 201a630: da 02 20 10 ld [ %o0 + 0x10 ], %o5 201a634: 80 a3 60 00 cmp %o5, 0 201a638: 22 80 00 0f be,a 201a674 <== NEVER TAKEN 201a63c: b4 06 a0 01 inc %i2 <== NOT EXECUTED /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201a640: de 00 60 10 ld [ %g1 + 0x10 ], %o7 201a644: 80 a3 e0 00 cmp %o7, 0 201a648: 22 80 00 09 be,a 201a66c 201a64c: 84 10 00 03 mov %g3, %g2 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 201a650: 80 8b 40 18 btst %o5, %i0 201a654: 32 80 00 08 bne,a 201a674 201a658: b4 06 a0 01 inc %i2 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 201a65c: 80 8b c0 18 btst %o7, %i0 201a660: 22 80 00 05 be,a 201a674 201a664: b4 06 a0 01 inc %i2 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 201a668: 84 10 00 03 mov %g3, %g2 201a66c: 90 10 00 01 mov %g1, %o0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 201a670: b4 06 a0 01 inc %i2 201a674: 80 a6 80 0a cmp %i2, %o2 201a678: 08 bf ff db bleu 201a5e4 201a67c: 83 2e a0 02 sll %i2, 2, %g1 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 201a680: 88 01 20 01 inc %g4 201a684: 80 a1 20 04 cmp %g4, 4 201a688: 12 bf ff cd bne 201a5bc 201a68c: 83 29 20 02 sll %g4, 2, %g1 } } } } if ( interested ) { 201a690: 80 a2 20 00 cmp %o0, 0 201a694: 02 80 00 0c be 201a6c4 201a698: 01 00 00 00 nop /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 201a69c: 92 10 00 19 mov %i1, %o1 201a6a0: 40 00 00 36 call 201a778 <_POSIX_signals_Unblock_thread> 201a6a4: 94 07 bf f4 add %fp, -12, %o2 201a6a8: 80 8a 20 ff btst 0xff, %o0 201a6ac: 02 80 00 06 be 201a6c4 201a6b0: 01 00 00 00 nop _Thread_Enable_dispatch(); 201a6b4: 7f ff be b3 call 200a180 <_Thread_Enable_dispatch> 201a6b8: b0 10 20 00 clr %i0 ! 0 return 0; 201a6bc: 81 c7 e0 08 ret 201a6c0: 81 e8 00 00 restore /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 201a6c4: 40 00 00 24 call 201a754 <_POSIX_signals_Set_process_signals> 201a6c8: 90 10 00 1d mov %i5, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 201a6cc: 83 2e 60 02 sll %i1, 2, %g1 201a6d0: b3 2e 60 04 sll %i1, 4, %i1 201a6d4: b2 26 40 01 sub %i1, %g1, %i1 201a6d8: 03 00 80 78 sethi %hi(0x201e000), %g1 201a6dc: 82 10 61 b0 or %g1, 0x1b0, %g1 ! 201e1b0 <_POSIX_signals_Vectors> 201a6e0: c2 00 40 19 ld [ %g1 + %i1 ], %g1 201a6e4: 80 a0 60 02 cmp %g1, 2 201a6e8: 12 80 00 17 bne 201a744 201a6ec: 11 00 80 78 sethi %hi(0x201e000), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 201a6f0: 7f ff b7 08 call 2008310 <_Chain_Get> 201a6f4: 90 12 23 30 or %o0, 0x330, %o0 ! 201e330 <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 201a6f8: ba 92 20 00 orcc %o0, 0, %i5 201a6fc: 12 80 00 0a bne 201a724 201a700: 92 07 bf f4 add %fp, -12, %o1 _Thread_Enable_dispatch(); 201a704: 7f ff be 9f call 200a180 <_Thread_Enable_dispatch> 201a708: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EAGAIN ); 201a70c: 7f ff d4 5a call 200f874 <__errno> 201a710: 01 00 00 00 nop 201a714: 82 10 20 0b mov 0xb, %g1 ! b 201a718: c2 22 00 00 st %g1, [ %o0 ] 201a71c: 81 c7 e0 08 ret 201a720: 91 e8 3f ff restore %g0, -1, %o0 } psiginfo->Info = *siginfo; 201a724: 90 07 60 08 add %i5, 8, %o0 201a728: 7f ff d6 af call 20101e4 201a72c: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 201a730: 11 00 80 78 sethi %hi(0x201e000), %o0 201a734: 92 10 00 1d mov %i5, %o1 201a738: 90 12 23 a8 or %o0, 0x3a8, %o0 201a73c: 7f ff b6 ea call 20082e4 <_Chain_Append> 201a740: 90 02 00 19 add %o0, %i1, %o0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 201a744: 7f ff be 8f call 200a180 <_Thread_Enable_dispatch> 201a748: b0 10 20 00 clr %i0 return 0; } 201a74c: 81 c7 e0 08 ret 201a750: 81 e8 00 00 restore =============================================================================== 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 77 sethi %hi(0x201dc00), %g1 2003ff8: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 201dd68 <_System_state_Current> 2003ffc: 80 a0 60 03 cmp %g1, 3 2004000: 12 80 00 16 bne 2004058 <== NEVER TAKEN 2004004: 39 00 80 74 sethi %hi(0x201d000), %i4 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 2004008: 03 00 80 70 sethi %hi(0x201c000), %g1 200400c: fa 00 63 a8 ld [ %g1 + 0x3a8 ], %i5 ! 201c3a8 <_global_impure_ptr> 2004010: c2 07 21 c8 ld [ %i4 + 0x1c8 ], %g1 2004014: 80 a0 40 1d cmp %g1, %i5 2004018: 22 80 00 06 be,a 2004030 200401c: 3b 00 80 74 sethi %hi(0x201d000), %i5 _wrapup_reent(_global_impure_ptr); 2004020: 40 00 31 51 call 2010564 <_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 21 c8 st %i5, [ %i4 + 0x1c8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 200402c: 3b 00 80 74 sethi %hi(0x201d000), %i5 2004030: c2 07 61 c8 ld [ %i5 + 0x1c8 ], %g1 ! 201d1c8 <_impure_ptr> 2004034: 40 00 2e 62 call 200f9bc 2004038: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 200403c: c2 07 61 c8 ld [ %i5 + 0x1c8 ], %g1 2004040: 40 00 2e 5f call 200f9bc 2004044: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2004048: c2 07 61 c8 ld [ %i5 + 0x1c8 ], %g1 200404c: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2004050: 40 00 2e 5b call 200f9bc 2004054: 81 e8 00 00 restore 2004058: 81 c7 e0 08 ret <== NOT EXECUTED 200405c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0201a06c : #include #include off_t lseek( int fd, off_t offset, int whence ) { 201a06c: 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 ); 201a070: 03 00 80 73 sethi %hi(0x201cc00), %g1 201a074: c2 00 63 5c ld [ %g1 + 0x35c ], %g1 ! 201cf5c #include #include off_t lseek( int fd, off_t offset, int whence ) { 201a078: 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 ); 201a07c: 80 a6 00 01 cmp %i0, %g1 201a080: 1a 80 00 0c bcc 201a0b0 201a084: a2 10 00 1a mov %i2, %l1 iop = rtems_libio_iop( fd ); 201a088: b5 2e 20 03 sll %i0, 3, %i2 201a08c: 03 00 80 76 sethi %hi(0x201d800), %g1 201a090: b1 2e 20 06 sll %i0, 6, %i0 201a094: b0 06 80 18 add %i2, %i0, %i0 201a098: f4 00 62 98 ld [ %g1 + 0x298 ], %i2 201a09c: b4 06 80 18 add %i2, %i0, %i2 rtems_libio_check_is_open(iop); 201a0a0: c2 06 a0 18 ld [ %i2 + 0x18 ], %g1 201a0a4: 80 88 61 00 btst 0x100, %g1 201a0a8: 32 80 00 06 bne,a 201a0c0 201a0ac: e4 06 a0 10 ld [ %i2 + 0x10 ], %l2 201a0b0: 7f ff d5 f1 call 200f874 <__errno> 201a0b4: 01 00 00 00 nop 201a0b8: 10 80 00 44 b 201a1c8 201a0bc: 82 10 20 09 mov 9, %g1 ! 9 old_offset = iop->offset; switch ( whence ) { 201a0c0: 80 a6 e0 01 cmp %i3, 1 201a0c4: 02 80 00 0b be 201a0f0 201a0c8: f2 06 a0 14 ld [ %i2 + 0x14 ], %i1 201a0cc: 80 a6 e0 02 cmp %i3, 2 201a0d0: 02 80 00 06 be 201a0e8 201a0d4: 80 a6 e0 00 cmp %i3, 0 case SEEK_SET: reference_offset = 0; 201a0d8: 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 ) { 201a0dc: 02 80 00 07 be 201a0f8 201a0e0: 86 10 20 00 clr %g3 201a0e4: 30 80 00 30 b,a 201a1a4 case SEEK_CUR: reference_offset = old_offset; break; case SEEK_END: reference_offset = iop->size; break; 201a0e8: 10 80 00 04 b 201a0f8 201a0ec: c4 1e a0 08 ldd [ %i2 + 8 ], %g2 switch ( whence ) { case SEEK_SET: reference_offset = 0; break; case SEEK_CUR: reference_offset = old_offset; 201a0f0: 84 10 00 12 mov %l2, %g2 201a0f4: 86 10 00 19 mov %i1, %g3 default: errno = EINVAL; rv = (off_t) -1; break; } new_offset = reference_offset + offset; 201a0f8: ba 80 c0 11 addcc %g3, %l1, %i5 201a0fc: b8 40 80 10 addx %g2, %l0, %i4 if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 201a100: 80 a4 00 1c cmp %l0, %i4 201a104: 14 80 00 08 bg 201a124 201a108: 82 10 20 01 mov 1, %g1 201a10c: 80 a4 00 1c cmp %l0, %i4 201a110: 12 80 00 07 bne 201a12c 201a114: 80 88 60 ff btst 0xff, %g1 201a118: 80 a4 40 1d cmp %l1, %i5 201a11c: 08 80 00 04 bleu 201a12c <== ALWAYS TAKEN 201a120: 80 88 60 ff btst 0xff, %g1 201a124: 82 10 20 00 clr %g1 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201a128: 80 88 60 ff btst 0xff, %g1 201a12c: 02 80 00 05 be 201a140 201a130: 80 a7 00 10 cmp %i4, %l0 201a134: 80 a0 a0 00 cmp %g2, 0 201a138: 16 80 00 10 bge 201a178 <== ALWAYS TAKEN 201a13c: 80 a7 00 10 cmp %i4, %l0 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 201a140: 14 80 00 08 bg 201a160 <== NEVER TAKEN 201a144: 82 10 20 01 mov 1, %g1 201a148: 80 a7 00 10 cmp %i4, %l0 201a14c: 12 80 00 07 bne 201a168 <== ALWAYS TAKEN 201a150: 80 88 60 ff btst 0xff, %g1 201a154: 80 a7 40 11 cmp %i5, %l1 <== NOT EXECUTED 201a158: 08 80 00 04 bleu 201a168 <== NOT EXECUTED 201a15c: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 201a160: 82 10 20 00 clr %g1 <== NOT EXECUTED 201a164: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 201a168: 02 80 00 15 be 201a1bc <== NEVER TAKEN 201a16c: 80 a0 a0 00 cmp %g2, 0 201a170: 16 80 00 13 bge 201a1bc <== ALWAYS TAKEN 201a174: 01 00 00 00 nop ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { 201a178: 40 00 00 6f call 201a334 201a17c: 90 06 a0 1c add %i2, 0x1c, %o0 201a180: 80 a2 20 00 cmp %o0, 0 201a184: 02 80 00 06 be 201a19c 201a188: 80 a7 20 00 cmp %i4, 0 201a18c: 80 a2 20 04 cmp %o0, 4 201a190: 32 80 00 15 bne,a 201a1e4 201a194: c2 06 a0 2c ld [ %i2 + 0x2c ], %g1 case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { 201a198: 80 a7 20 00 cmp %i4, 0 201a19c: 36 80 00 12 bge,a 201a1e4 201a1a0: c2 06 a0 2c ld [ %i2 + 0x2c ], %g1 errno = EINVAL; 201a1a4: 7f ff d5 b4 call 200f874 <__errno> 201a1a8: 01 00 00 00 nop 201a1ac: 10 80 00 07 b 201a1c8 201a1b0: 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; 201a1b4: 10 80 00 09 b 201a1d8 201a1b8: f2 26 a0 14 st %i1, [ %i2 + 0x14 ] } } } else { errno = EOVERFLOW; 201a1bc: 7f ff d5 ae call 200f874 <__errno> 201a1c0: 01 00 00 00 nop 201a1c4: 82 10 20 8b mov 0x8b, %g1 ! 8b 201a1c8: c2 22 00 00 st %g1, [ %o0 ] rv = (off_t) -1; 201a1cc: 11 3f ff ff sethi %hi(0xfffffc00), %o0 201a1d0: 90 12 23 ff or %o0, 0x3ff, %o0 ! ffffffff 201a1d4: 92 10 00 08 mov %o0, %o1 } } return rv; } 201a1d8: b0 10 00 08 mov %o0, %i0 201a1dc: 81 c7 e0 08 ret 201a1e0: 93 e8 00 09 restore %g0, %o1, %o1 default: break; } if ( rv == 0 ) { iop->offset = new_offset; 201a1e4: f8 3e a0 10 std %i4, [ %i2 + 0x10 ] rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201a1e8: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 201a1ec: 90 10 00 1a mov %i2, %o0 201a1f0: 92 10 00 10 mov %l0, %o1 201a1f4: 94 10 00 11 mov %l1, %o2 201a1f8: 9f c0 40 00 call %g1 201a1fc: 96 10 00 1b mov %i3, %o3 if ( rv == (off_t) -1 ) { 201a200: 80 a2 3f ff cmp %o0, -1 201a204: 12 bf ff f6 bne 201a1dc 201a208: b0 10 00 08 mov %o0, %i0 201a20c: 80 a2 7f ff cmp %o1, -1 201a210: 12 bf ff f3 bne 201a1dc <== NEVER TAKEN 201a214: 01 00 00 00 nop iop->offset = old_offset; 201a218: 10 bf ff e7 b 201a1b4 201a21c: 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 76 sethi %hi(0x201d800), %g1 2003ab8: 82 10 62 b0 or %g1, 0x2b0, %g1 ! 201dab0 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 77 sethi %hi(0x201dc00), %g1 2003ae0: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 201dd68 <_System_state_Current> 2003ae4: 80 a0 60 03 cmp %g1, 3 2003ae8: 12 80 00 07 bne 2003b04 2003aec: 03 00 80 73 sethi %hi(0x201cc00), %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 73 sethi %hi(0x201cc00), %g1 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 2003b04: d0 00 63 18 ld [ %g1 + 0x318 ], %o0 ! 201cf18 2003b08: 92 10 00 1d mov %i5, %o1 2003b0c: 94 10 20 00 clr %o2 2003b10: 40 00 16 7c call 2009500 <_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 75 sethi %hi(0x201d400), %g1 if (rtems_malloc_sbrk_helpers) 2003b24: 03 00 80 75 sethi %hi(0x201d400), %g1 2003b28: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 201d6f0 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 75 sethi %hi(0x201d400), %g1 errno = ENOMEM; 2003b50: 40 00 2f 49 call 200f874 <__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 62 ec ld [ %g1 + 0x2ec ], %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 75 sethi %hi(0x201d400), %g1 2003b84: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 201d6f4 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 77 sethi %hi(0x201dc00), %g1 2003b3c: fa 00 62 38 ld [ %g1 + 0x238 ], %i5 ! 201de38 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 53 d5 call 2018aa4 <.udiv> 2003b54: 90 06 00 1d add %i0, %i5, %o0 2003b58: 40 00 53 99 call 20189bc <.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 74 sethi %hi(0x201d000), %i4 2003b78: d0 07 21 08 ld [ %i4 + 0x108 ], %o0 ! 201d108 2003b7c: 40 00 16 4f call 20094b8 <_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 77 sethi %hi(0x201dc00), %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 2f db call 200fb04 <__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 21 08 ld [ %i4 + 0x108 ], %i0 return (void *) 0; } MSBUMP(space_available, the_size); 2003bb4: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 2003bb8: b4 10 20 00 clr %i2 2003bbc: ba 07 40 02 add %i5, %g2, %i5 2003bc0: fa 20 62 08 st %i5, [ %g1 + 0x208 ] 2003bc4: 40 00 16 2f call 2009480 <_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 77 sethi %hi(0x201dc00), %g1 2003be0: f2 20 62 38 st %i1, [ %g1 + 0x238 ] ! 201de38 * 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 ec call 2007fb4 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 =============================================================================== 0200e9b4 : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200e9b4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200e9b8: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200e9bc: 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 ) 200e9c0: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200e9c4: 80 a0 40 19 cmp %g1, %i1 200e9c8: 06 80 00 09 bl 200e9ec <== NEVER TAKEN 200e9cc: 94 10 00 1a mov %i2, %o2 200e9d0: 80 a0 40 19 cmp %g1, %i1 200e9d4: 32 80 00 0a bne,a 200e9fc <== NEVER TAKEN 200e9d8: d2 27 60 50 st %o1, [ %i5 + 0x50 ] <== NOT EXECUTED 200e9dc: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 200e9e0: 80 a0 40 1a cmp %g1, %i2 200e9e4: 3a 80 00 06 bcc,a 200e9fc 200e9e8: d2 27 60 50 st %o1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200e9ec: 7f ff fe ff call 200e5e8 200e9f0: 90 10 00 1d mov %i5, %o0 200e9f4: 81 c7 e0 08 ret 200e9f8: 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; 200e9fc: d4 27 60 54 st %o2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200ea00: d2 26 20 08 st %o1, [ %i0 + 8 ] 200ea04: d4 26 20 0c st %o2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200ea08: 90 07 bf f8 add %fp, -8, %o0 200ea0c: 7f ff d3 6b call 20037b8 200ea10: 92 10 20 00 clr %o1 200ea14: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ea18: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200ea1c: 81 c7 e0 08 ret 200ea20: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200ea24 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 200ea24: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200ea28: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200ea2c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { 200ea30: c2 00 40 00 ld [ %g1 ], %g1 200ea34: 80 a0 60 05 cmp %g1, 5 200ea38: 32 80 00 11 bne,a 200ea7c 200ea3c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) 200ea40: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200ea44: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 200ea48: 80 a0 c0 01 cmp %g3, %g1 200ea4c: 14 80 00 09 bg 200ea70 <== NEVER TAKEN 200ea50: c4 07 60 54 ld [ %i5 + 0x54 ], %g2 200ea54: 80 a0 c0 01 cmp %g3, %g1 200ea58: 32 80 00 19 bne,a 200eabc <== NEVER TAKEN 200ea5c: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED 200ea60: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200ea64: 80 a0 c0 02 cmp %g3, %g2 200ea68: 28 80 00 15 bleu,a 200eabc <== ALWAYS TAKEN 200ea6c: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 iop->offset = the_jnode->info.linearfile.size; 200ea70: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200ea74: 10 80 00 11 b 200eab8 <== NOT EXECUTED 200ea78: 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 )) 200ea7c: 90 10 00 1d mov %i5, %o0 200ea80: 92 10 00 02 mov %g2, %o1 200ea84: 7f ff fe d9 call 200e5e8 200ea88: 94 10 00 03 mov %g3, %o2 200ea8c: 80 a2 20 00 cmp %o0, 0 200ea90: 22 80 00 09 be,a 200eab4 200ea94: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 rtems_set_errno_and_return_minus_one( ENOSPC ); 200ea98: 40 00 03 77 call 200f874 <__errno> 200ea9c: 31 3f ff ff sethi %hi(0xfffffc00), %i0 200eaa0: 82 10 20 1c mov 0x1c, %g1 200eaa4: c2 22 00 00 st %g1, [ %o0 ] 200eaa8: b0 16 23 ff or %i0, 0x3ff, %i0 200eaac: 81 c7 e0 08 ret 200eab0: 93 e8 00 18 restore %g0, %i0, %o1 iop->size = the_jnode->info.file.size; 200eab4: c4 3e 20 08 std %g2, [ %i0 + 8 ] } return iop->offset; 200eab8: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 } 200eabc: 81 c7 e0 08 ret 200eac0: 81 e8 00 00 restore =============================================================================== 0200e910 : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200e910: 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)) 200e914: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200e918: 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)) 200e91c: 80 88 62 04 btst 0x204, %g1 200e920: 02 80 00 1b be 200e98c 200e924: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200e928: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 200e92c: c2 00 40 00 ld [ %g1 ], %g1 200e930: 80 a0 60 05 cmp %g1, 5 200e934: 32 80 00 17 bne,a 200e990 <== ALWAYS TAKEN 200e938: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 uint32_t count = the_jnode->info.linearfile.size; 200e93c: d8 07 60 54 ld [ %i5 + 0x54 ], %o4 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 200e940: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 200e944: 03 00 80 6f sethi %hi(0x201bc00), %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200e948: 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; 200e94c: 82 10 60 3c or %g1, 0x3c, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200e950: 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; 200e954: c2 27 60 4c st %g1, [ %i5 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 200e958: c0 27 60 58 clr [ %i5 + 0x58 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 200e95c: c0 27 60 5c clr [ %i5 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200e960: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200e964: 02 80 00 0a be 200e98c <== NOT EXECUTED 200e968: c0 27 60 60 clr [ %i5 + 0x60 ] <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200e96c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 200e970: 92 10 20 00 clr %o1 <== NOT EXECUTED 200e974: 94 10 20 00 clr %o2 <== NOT EXECUTED 200e978: 7f ff ff 73 call 200e744 <== NOT EXECUTED 200e97c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200e980: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200e984: 02 80 00 0a be 200e9ac <== NOT EXECUTED 200e988: 01 00 00 00 nop <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200e98c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1 200e990: 80 88 62 00 btst 0x200, %g1 200e994: 02 80 00 04 be 200e9a4 200e998: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 iop->offset = the_jnode->info.file.size; 200e99c: c4 3f 20 10 std %g2, [ %i4 + 0x10 ] iop->size = the_jnode->info.file.size; 200e9a0: c4 1f 60 50 ldd [ %i5 + 0x50 ], %g2 return 0; 200e9a4: 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; 200e9a8: c4 3f 20 08 std %g2, [ %i4 + 8 ] return 0; } 200e9ac: 81 c7 e0 08 ret 200e9b0: 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 81 call 200c2f8 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 6e sethi %hi(0x201b800), %l2 2003d14: a4 14 a0 48 or %l2, 0x48, %l2 ! 201b848 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2003d18: 40 00 34 6f call 2010ed4 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 34 69 call 2010ed4 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 34 66 call 2010ed4 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 31 1c call 20101e4 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 31 16 call 20101e4 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 31 10 call 20101e4 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 6e sethi %hi(0x201b800), %o1 2003dcc: 40 00 31 06 call 20101e4 2003dd0: 92 12 60 4c or %o1, 0x4c, %o1 ! 201b84c 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 58 call 200834c <_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 74 sethi %hi(0x201d000), %g1 2003e84: 82 10 60 24 or %g1, 0x24, %g1 ! 201d024 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 76 sethi %hi(0x201d800), %g1 2003e98: d0 00 62 a0 ld [ %g1 + 0x2a0 ], %o0 ! 201daa0 ) { 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 74 sethi %hi(0x201d000), %g2 if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 2003ef4: c6 00 a0 24 ld [ %g2 + 0x24 ], %g3 ! 201d024 2003ef8: 82 10 a0 24 or %g2, 0x24, %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 2e 54 call 200f874 <__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 76 sethi %hi(0x201d800), %g1 2003f38: 40 00 0e 9a call 20079a0 2003f3c: d0 00 62 a0 ld [ %g1 + 0x2a0 ], %o0 ! 201daa0 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 74 sethi %hi(0x201d000), %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 60 44 ld [ %i5 + 0x44 ], %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 60 44 ld [ %i5 + 0x44 ], %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 2e 31 call 200f874 <__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 2e 2d call 200f874 <__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 2e 27 call 200f874 <__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 5e 60 call 2020568 <__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 =============================================================================== 02033e30 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 2033e30: 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; 2033e34: 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); 2033e38: 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; 2033e3c: 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; 2033e40: 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); 2033e44: 94 10 20 20 mov 0x20, %o2 2033e48: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 2033e4c: 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; 2033e50: e2 06 20 08 ld [ %i0 + 8 ], %l1 fat_file_fd_t *fat_fd = NULL; 2033e54: c0 27 bf f8 clr [ %fp + -8 ] time_t time_ret = 0; uint16_t time_val = 0; 2033e58: c0 37 bf fc clrh [ %fp + -4 ] uint16_t date = 0; 2033e5c: 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; 2033e60: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 2033e64: 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); 2033e68: 40 00 45 5b call 20453d4 2033e6c: 90 07 bf a8 add %fp, -88, %o0 memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 2033e70: 90 07 bf 68 add %fp, -152, %o0 2033e74: 92 10 20 00 clr %o1 2033e78: 40 00 45 57 call 20453d4 2033e7c: 94 10 20 40 mov 0x40, %o2 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 2033e80: 80 a6 e1 04 cmp %i3, 0x104 2033e84: 04 80 00 06 ble 2033e9c <== ALWAYS TAKEN 2033e88: b8 10 00 18 mov %i0, %i4 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 2033e8c: 40 00 37 85 call 2041ca0 <__errno> <== NOT EXECUTED 2033e90: 01 00 00 00 nop <== NOT EXECUTED 2033e94: 10 80 00 0d b 2033ec8 <== NOT EXECUTED 2033e98: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 2033e9c: 90 10 00 1a mov %i2, %o0 2033ea0: 92 10 00 1b mov %i3, %o1 2033ea4: 94 07 bf a8 add %fp, -88, %o2 2033ea8: 40 00 01 39 call 203438c 2033eac: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 2033eb0: a4 92 20 00 orcc %o0, 0, %l2 2033eb4: 32 80 00 08 bne,a 2033ed4 <== ALWAYS TAKEN 2033eb8: c0 2f bf b4 clrb [ %fp + -76 ] rtems_set_errno_and_return_minus_one(EINVAL); 2033ebc: 40 00 37 79 call 2041ca0 <__errno> <== NOT EXECUTED 2033ec0: 01 00 00 00 nop <== NOT EXECUTED 2033ec4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2033ec8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2033ecc: 81 c7 e0 08 ret <== NOT EXECUTED 2033ed0: 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); 2033ed4: 90 10 20 00 clr %o0 2033ed8: 40 00 6a 84 call 204e8e8