=============================================================================== 02005a30 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2005a30: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2005a34: fa 06 20 50 ld [ %i0 + 0x50 ], %i5 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 2005a38: b8 06 20 54 add %i0, 0x54, %i4 2005a3c: 35 00 80 90 sethi %hi(0x2024000), %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 ); 2005a40: 80 a7 40 1c cmp %i5, %i4 2005a44: 02 80 00 2f be 2005b00 2005a48: b4 16 a0 98 or %i2, 0x98, %i2 2005a4c: 31 00 80 88 sethi %hi(0x2022000), %i0 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005a50: 27 00 80 88 sethi %hi(0x2022000), %l3 return; } puts(""); 2005a54: 21 00 80 88 sethi %hi(0x2022000), %l0 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005a58: 25 00 80 88 sethi %hi(0x2022000), %l2 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005a5c: 23 00 80 88 sethi %hi(0x2022000), %l1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2005a60: b0 16 21 10 or %i0, 0x110, %i0 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005a64: a6 14 e1 80 or %l3, 0x180, %l3 return; } puts(""); 2005a68: a0 14 20 a8 or %l0, 0xa8, %l0 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005a6c: a4 14 a1 68 or %l2, 0x168, %l2 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005a70: a2 14 61 50 or %l1, 0x150, %l1 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 2005a74: 80 a6 60 00 cmp %i1, 0 2005a78: 06 80 00 0c bl 2005aa8 <== NEVER TAKEN 2005a7c: b6 10 20 00 clr %i3 fprintf(stdout, "...." ); 2005a80: c2 06 80 00 ld [ %i2 ], %g1 2005a84: 90 10 00 18 mov %i0, %o0 2005a88: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005a8c: 92 10 20 01 mov 1, %o1 2005a90: 40 00 3c 77 call 2014c6c 2005a94: 94 10 20 04 mov 4, %o2 !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++ ) 2005a98: b6 06 e0 01 inc %i3 2005a9c: 80 a6 40 1b cmp %i1, %i3 2005aa0: 36 bf ff f9 bge,a 2005a84 2005aa4: c2 06 80 00 ld [ %i2 ], %g1 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 2005aa8: c2 06 80 00 ld [ %i2 ], %g1 2005aac: 90 07 60 0c add %i5, 0xc, %o0 2005ab0: 40 00 39 4d call 2013fe4 2005ab4: d2 00 60 08 ld [ %g1 + 8 ], %o1 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 2005ab8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2005abc: d4 00 40 00 ld [ %g1 ], %o2 switch( IMFS_type( the_jnode ) ) { 2005ac0: 80 a2 a0 06 cmp %o2, 6 2005ac4: 28 80 00 11 bleu,a 2005b08 <== ALWAYS TAKEN 2005ac8: 95 2a a0 02 sll %o2, 2, %o2 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 2005acc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2005ad0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 2005ad4: 40 00 38 f3 call 2013ea0 <== NOT EXECUTED 2005ad8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 2005adc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 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 ) ) 2005ae0: c2 00 40 00 ld [ %g1 ], %g1 2005ae4: 80 a0 60 00 cmp %g1, 0 2005ae8: 22 80 00 19 be,a 2005b4c 2005aec: 90 10 00 1d mov %i5, %o0 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 ) { 2005af0: 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 ); 2005af4: 80 a7 40 1c cmp %i5, %i4 2005af8: 12 bf ff e0 bne 2005a78 2005afc: 80 a6 60 00 cmp %i1, 0 2005b00: 81 c7 e0 08 ret 2005b04: 81 e8 00 00 restore ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { 2005b08: 03 00 80 16 sethi %hi(0x2005800), %g1 2005b0c: 82 10 62 14 or %g1, 0x214, %g1 ! 2005a14 2005b10: c2 00 40 0a ld [ %g1 + %o2 ], %g1 2005b14: 81 c0 40 00 jmp %g1 2005b18: 01 00 00 00 nop case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2005b1c: c2 06 80 00 ld [ %i2 ], %g1 2005b20: 90 10 00 11 mov %l1, %o0 2005b24: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005b28: 92 10 20 01 mov 1, %o1 2005b2c: 40 00 3c 50 call 2014c6c 2005b30: 94 10 20 13 mov 0x13, %o2 2005b34: 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 ) ) 2005b38: c2 00 40 00 ld [ %g1 ], %g1 2005b3c: 80 a0 60 00 cmp %g1, 0 2005b40: 32 bf ff ed bne,a 2005af4 <== ALWAYS TAKEN 2005b44: fa 07 40 00 ld [ %i5 ], %i5 IMFS_dump_directory( the_jnode, level + 1 ); 2005b48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2005b4c: 7f ff ff b9 call 2005a30 2005b50: 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 ) { 2005b54: 10 bf ff e8 b 2005af4 2005b58: fa 07 40 00 ld [ %i5 ], %i5 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2005b5c: c2 06 80 00 ld [ %i2 ], %g1 2005b60: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005b64: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005b68: d6 07 60 58 ld [ %i5 + 0x58 ], %o3 2005b6c: 13 00 80 88 sethi %hi(0x2022000), %o1 2005b70: 40 00 38 cc call 2013ea0 2005b74: 92 12 61 30 or %o1, 0x130, %o1 ! 2022130 default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 2005b78: 40 00 40 45 call 2015c8c 2005b7c: 90 10 00 10 mov %l0, %o0 2005b80: 10 bf ff d8 b 2005ae0 2005b84: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2005b88: c2 06 80 00 ld [ %i2 ], %g1 2005b8c: d4 07 60 50 ld [ %i5 + 0x50 ], %o2 2005b90: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005b94: d6 07 60 54 ld [ %i5 + 0x54 ], %o3 2005b98: 13 00 80 88 sethi %hi(0x2022000), %o1 2005b9c: 40 00 38 c1 call 2013ea0 2005ba0: 92 12 61 18 or %o1, 0x118, %o1 ! 2022118 2005ba4: 30 bf ff f5 b,a 2005b78 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2005ba8: c2 06 80 00 ld [ %i2 ], %g1 2005bac: 90 10 20 2f mov 0x2f, %o0 2005bb0: 40 00 38 d8 call 2013f10 2005bb4: d2 00 60 08 ld [ %g1 + 8 ], %o1 2005bb8: 30 bf ff f0 b,a 2005b78 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2005bbc: c2 06 80 00 ld [ %i2 ], %g1 2005bc0: 90 10 00 12 mov %l2, %o0 2005bc4: d6 00 60 08 ld [ %g1 + 8 ], %o3 2005bc8: 92 10 20 01 mov 1, %o1 2005bcc: 40 00 3c 28 call 2014c6c 2005bd0: 94 10 20 12 mov 0x12, %o2 2005bd4: 10 bf ff c3 b 2005ae0 2005bd8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2005bdc: c2 06 80 00 ld [ %i2 ], %g1 2005be0: d4 07 60 54 ld [ %i5 + 0x54 ], %o2 2005be4: d0 00 60 08 ld [ %g1 + 8 ], %o0 2005be8: 13 00 80 88 sethi %hi(0x2022000), %o1 2005bec: 40 00 38 ad call 2013ea0 2005bf0: 92 12 61 40 or %o1, 0x140, %o1 ! 2022140 2005bf4: 30 bf ff e1 b,a 2005b78 =============================================================================== 0200bff4 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200bff4: 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; 200bff8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 bool access_ok = rtems_filesystem_eval_path_check_access( 200bffc: 90 10 00 18 mov %i0, %o0 200c000: d4 07 20 30 ld [ %i4 + 0x30 ], %o2 200c004: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3 200c008: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 200c00c: 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( 200c010: 92 10 20 01 mov 1, %o1 200c014: 40 00 03 39 call 200ccf8 200c018: b0 10 20 01 mov 1, %i0 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 200c01c: 80 8a 20 ff btst 0xff, %o0 200c020: 02 80 00 36 be 200c0f8 200c024: 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] == '.'; 200c028: 02 80 00 3c be 200c118 200c02c: 80 a6 e0 02 cmp %i3, 2 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200c030: 22 80 00 5a be,a 200c198 200c034: c2 4e 80 00 ldsb [ %i2 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200c038: 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 ); 200c03c: b0 07 20 54 add %i4, 0x54, %i0 while ( current != tail ) { 200c040: 80 a6 40 18 cmp %i1, %i0 200c044: 02 80 00 33 be 200c110 200c048: 90 06 60 0c add %i1, 0xc, %o0 IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 200c04c: 92 10 00 1a mov %i2, %o1 200c050: 40 00 13 95 call 2010ea4 200c054: 94 10 00 1b mov %i3, %o2 && entry->name [tokenlen] == '\0'; 200c058: 80 a2 20 00 cmp %o0, 0 200c05c: 12 80 00 29 bne 200c100 200c060: 82 06 40 1b add %i1, %i3, %g1 200c064: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1 200c068: 80 a0 60 00 cmp %g1, 0 200c06c: 32 80 00 26 bne,a 200c104 200c070: f2 06 40 00 ld [ %i1 ], %i1 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 200c074: 80 a6 60 00 cmp %i1, 0 200c078: 02 80 00 20 be 200c0f8 200c07c: b0 10 20 02 mov 2, %i0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 200c080: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 200c084: c4 07 60 04 ld [ %i5 + 4 ], %g2 200c088: c2 00 40 00 ld [ %g1 ], %g1 200c08c: 80 a0 00 02 cmp %g0, %g2 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 200c090: c0 27 60 0c clr [ %i5 + 0xc ] 200c094: b0 60 3f ff subx %g0, -1, %i0 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)) { 200c098: 80 a0 60 02 cmp %g1, 2 200c09c: 02 80 00 37 be 200c178 200c0a0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2 entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 200c0a4: 80 a0 60 03 cmp %g1, 3 200c0a8: 02 80 00 22 be 200c130 200c0ac: 80 a0 60 00 cmp %g1, 0 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 200c0b0: 32 80 00 26 bne,a 200c148 200c0b4: b0 0e 20 ff and %i0, 0xff, %i0 if ( node->info.directory.mt_fs != NULL ) { 200c0b8: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 200c0bc: 80 a0 60 00 cmp %g1, 0 200c0c0: 02 80 00 48 be 200c1e0 200c0c4: 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( 200c0c8: d4 06 60 30 ld [ %i1 + 0x30 ], %o2 200c0cc: d6 16 60 3c lduh [ %i1 + 0x3c ], %o3 200c0d0: 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; 200c0d4: 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( 200c0d8: 92 10 20 01 mov 1, %o1 200c0dc: 40 00 03 07 call 200ccf8 200c0e0: b0 10 20 01 mov 1, %i0 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 200c0e4: 80 8a 20 ff btst 0xff, %o0 200c0e8: 02 80 00 04 be 200c0f8 <== NEVER TAKEN 200c0ec: 90 10 00 1d mov %i5, %o0 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 200c0f0: 7f ff e3 26 call 2004d88 200c0f4: 92 10 00 1c mov %i4, %o1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 200c0f8: 81 c7 e0 08 ret 200c0fc: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 200c100: 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 ) { 200c104: 80 a6 00 19 cmp %i0, %i1 200c108: 12 bf ff d1 bne 200c04c 200c10c: 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; 200c110: 81 c7 e0 08 ret 200c114: 91 e8 20 02 restore %g0, 2, %o0 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 200c118: c2 4e 80 00 ldsb [ %i2 ], %g1 200c11c: 80 a0 60 2e cmp %g1, 0x2e 200c120: 32 bf ff c7 bne,a 200c03c 200c124: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200c128: 10 bf ff d3 b 200c074 200c12c: b2 10 00 1c mov %i4, %i1 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)) { 200c130: 80 88 a0 10 btst 0x10, %g2 200c134: 32 80 00 22 bne,a 200c1bc 200c138: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 200c13c: b0 8e 20 ff andcc %i0, 0xff, %i0 200c140: 22 80 00 1f be,a 200c1bc 200c144: f8 06 60 50 ld [ %i1 + 0x50 ], %i4 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 200c148: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2 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; 200c14c: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 200c150: 84 00 bf ff add %g2, -1, %g2 200c154: c4 37 20 34 sth %g2, [ %i4 + 0x34 ] ++entry->reference_count; 200c158: c4 16 60 34 lduh [ %i1 + 0x34 ], %g2 200c15c: c2 00 60 04 ld [ %g1 + 4 ], %g1 200c160: 84 00 a0 01 inc %g2 200c164: c4 36 60 34 sth %g2, [ %i1 + 0x34 ] currentloc->node_access = entry; 200c168: f2 27 60 20 st %i1, [ %i5 + 0x20 ] 200c16c: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 200c170: 81 c7 e0 08 ret 200c174: 81 e8 00 00 restore 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)) { 200c178: 80 88 a0 08 btst 8, %g2 200c17c: 12 80 00 05 bne 200c190 200c180: b0 0e 20 ff and %i0, 0xff, %i0 200c184: 80 a6 20 00 cmp %i0, 0 200c188: 32 bf ff f1 bne,a 200c14c <== ALWAYS TAKEN 200c18c: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2 entry = entry->info.hard_link.link_node; 200c190: 10 bf ff ee b 200c148 200c194: f2 06 60 50 ld [ %i1 + 0x50 ], %i1 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 200c198: 80 a0 60 2e cmp %g1, 0x2e 200c19c: 32 bf ff a8 bne,a 200c03c 200c1a0: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 200c1a4: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1 200c1a8: 80 a0 60 2e cmp %g1, 0x2e 200c1ac: 32 bf ff a4 bne,a 200c03c <== NEVER TAKEN 200c1b0: 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; 200c1b4: 10 bf ff b0 b 200c074 200c1b8: f2 07 20 08 ld [ %i4 + 8 ], %i1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 200c1bc: 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 ) ); 200c1c0: 40 00 13 08 call 2010de0 200c1c4: 90 10 00 1c mov %i4, %o0 200c1c8: 92 10 00 1c mov %i4, %o1 200c1cc: 94 10 00 08 mov %o0, %o2 200c1d0: 7f ff e3 06 call 2004de8 200c1d4: 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)) { 200c1d8: 81 c7 e0 08 ret 200c1dc: 81 e8 00 00 restore 200c1e0: 10 bf ff da b 200c148 200c1e4: b0 0e 20 ff and %i0, 0xff, %i0 =============================================================================== 02003978 : static off_t IMFS_fifo_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2003978: 9d e3 bf a0 save %sp, -96, %sp off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 200397c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 2003980: 92 10 00 19 mov %i1, %o1 2003984: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 2003988: 98 10 00 18 mov %i0, %o4 200398c: 94 10 00 1a mov %i2, %o2 2003990: 40 00 2d 62 call 200ef18 2003994: 96 10 00 1b mov %i3, %o3 2003998: b1 3a 20 1f sra %o0, 0x1f, %i0 IMFS_FIFO_RETURN(err); 200399c: 80 a6 20 00 cmp %i0, 0 20039a0: 06 80 00 04 bl 20039b0 <== ALWAYS TAKEN 20039a4: b2 10 00 08 mov %o0, %i1 } 20039a8: 81 c7 e0 08 ret <== NOT EXECUTED 20039ac: 81 e8 00 00 restore <== NOT EXECUTED off_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 20039b0: 40 00 36 23 call 201123c <__errno> 20039b4: 31 3f ff ff sethi %hi(0xfffffc00), %i0 20039b8: 82 20 00 19 neg %i1, %g1 20039bc: c2 22 00 00 st %g1, [ %o0 ] 20039c0: b0 16 23 ff or %i0, 0x3ff, %i0 } 20039c4: 81 c7 e0 08 ret 20039c8: 93 e8 00 18 restore %g0, %i0, %o1 =============================================================================== 020039cc : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20039cc: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = iop->pathinfo.node_access; 20039d0: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 20039d4: 96 10 00 18 mov %i0, %o3 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 20039d8: d0 07 60 50 ld [ %i5 + 0x50 ], %o0 20039dc: 92 10 00 19 mov %i1, %o1 20039e0: 40 00 2c b9 call 200ecc4 20039e4: 94 10 00 1a mov %i2, %o2 if (err > 0) { 20039e8: b0 92 20 00 orcc %o0, 0, %i0 20039ec: 04 80 00 09 ble 2003a10 20039f0: 90 07 bf f8 add %fp, -8, %o0 IMFS_mtime_ctime_update(jnode); 20039f4: 40 00 04 52 call 2004b3c 20039f8: 92 10 20 00 clr %o1 20039fc: c2 07 bf f8 ld [ %fp + -8 ], %g1 2003a00: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 2003a04: c2 27 60 48 st %g1, [ %i5 + 0x48 ] 2003a08: 81 c7 e0 08 ret 2003a0c: 81 e8 00 00 restore } IMFS_FIFO_RETURN(err); 2003a10: 80 a6 20 00 cmp %i0, 0 2003a14: 12 80 00 04 bne 2003a24 <== ALWAYS TAKEN 2003a18: 01 00 00 00 nop } 2003a1c: 81 c7 e0 08 ret <== NOT EXECUTED 2003a20: 81 e8 00 00 restore <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 2003a24: 40 00 36 06 call 201123c <__errno> 2003a28: 01 00 00 00 nop 2003a2c: 82 20 00 18 neg %i0, %g1 2003a30: c2 22 00 00 st %g1, [ %o0 ] } 2003a34: 81 c7 e0 08 ret 2003a38: 91 e8 3f ff restore %g0, -1, %o0 =============================================================================== 0200c238 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 200c238: 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; 200c23c: c6 06 20 18 ld [ %i0 + 0x18 ], %g3 200c240: c8 00 e0 08 ld [ %g3 + 8 ], %g4 200c244: d4 00 c0 00 ld [ %g3 ], %o2 200c248: d6 00 e0 04 ld [ %g3 + 4 ], %o3 200c24c: d8 00 e0 0c ld [ %g3 + 0xc ], %o4 200c250: da 00 e0 10 ld [ %g3 + 0x10 ], %o5 200c254: de 00 e0 14 ld [ %g3 + 0x14 ], %o7 200c258: f8 00 e0 18 ld [ %g3 + 0x18 ], %i4 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c25c: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; jnode = (IMFS_jnode_t *)loc.node_access; 200c260: ba 10 00 04 mov %g4, %i5 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c264: c4 00 40 00 ld [ %g1 ], %g2 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 200c268: d4 27 bf e4 st %o2, [ %fp + -28 ] 200c26c: d6 27 bf e8 st %o3, [ %fp + -24 ] 200c270: c8 27 bf ec st %g4, [ %fp + -20 ] 200c274: d8 27 bf f0 st %o4, [ %fp + -16 ] 200c278: da 27 bf f4 st %o5, [ %fp + -12 ] 200c27c: de 27 bf f8 st %o7, [ %fp + -8 ] 200c280: f8 27 bf fc st %i4, [ %fp + -4 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 200c284: c0 20 e0 08 clr [ %g3 + 8 ] 200c288: c2 00 60 04 ld [ %g1 + 4 ], %g1 do { next = jnode->Parent; 200c28c: f8 07 60 08 ld [ %i5 + 8 ], %i4 loc.node_access = (void *)jnode; 200c290: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200c294: 80 a0 a0 00 cmp %g2, 0 200c298: 12 80 00 1d bne 200c30c <== NEVER TAKEN 200c29c: c2 27 bf f4 st %g1, [ %fp + -12 ] 200c2a0: c4 07 60 50 ld [ %i5 + 0x50 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c2a4: 82 07 60 54 add %i5, 0x54, %g1 200c2a8: 80 a0 80 01 cmp %g2, %g1 200c2ac: 02 80 00 18 be 200c30c 200c2b0: 80 a7 60 00 cmp %i5, 0 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); jnode = next; } if ( jnode != NULL ) { 200c2b4: 02 80 00 22 be 200c33c <== NEVER TAKEN 200c2b8: 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; 200c2bc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200c2c0: c4 00 40 00 ld [ %g1 ], %g2 if ( IMFS_is_directory( jnode ) ) { 200c2c4: 80 a0 a0 00 cmp %g2, 0 200c2c8: 32 bf ff f1 bne,a 200c28c <== NEVER TAKEN 200c2cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c2d0: c6 07 60 50 ld [ %i5 + 0x50 ], %g3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 200c2d4: 88 07 60 54 add %i5, 0x54, %g4 if ( jnode_has_children( jnode ) ) 200c2d8: 80 a0 c0 04 cmp %g3, %g4 200c2dc: 02 bf ff eb be 200c288 200c2e0: 80 a0 e0 00 cmp %g3, 0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 200c2e4: 02 80 00 16 be 200c33c <== NEVER TAKEN 200c2e8: ba 10 00 03 mov %g3, %i5 200c2ec: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 200c2f0: c4 00 40 00 ld [ %g1 ], %g2 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; 200c2f4: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 200c2f8: f8 07 60 08 ld [ %i5 + 8 ], %i4 loc.node_access = (void *)jnode; 200c2fc: fa 27 bf ec st %i5, [ %fp + -20 ] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 200c300: 80 a0 a0 00 cmp %g2, 0 200c304: 02 bf ff e7 be 200c2a0 200c308: c2 27 bf f4 st %g1, [ %fp + -12 ] result = IMFS_rmnod( NULL, &loc ); 200c30c: 90 10 20 00 clr %o0 200c310: 7f ff db f7 call 20032ec 200c314: 92 07 bf e4 add %fp, -28, %o1 if ( result != 0 ) 200c318: 80 a2 20 00 cmp %o0, 0 200c31c: 12 80 00 0a bne 200c344 <== NEVER TAKEN 200c320: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 200c324: 7f ff db 11 call 2002f68 200c328: 90 10 00 1d mov %i5, %o0 jnode = next; 200c32c: ba 10 00 1c mov %i4, %i5 } if ( jnode != NULL ) { 200c330: 80 a7 60 00 cmp %i5, 0 200c334: 32 bf ff e3 bne,a 200c2c0 200c338: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 200c33c: 81 c7 e0 08 ret 200c340: 81 e8 00 00 restore IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); 200c344: 7f ff f0 3c call 2008434 <== NOT EXECUTED 200c348: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02002e4c : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 2002e4c: 9d e3 bf a0 save %sp, -96, %sp static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 2002e50: 90 10 20 01 mov 1, %o0 2002e54: 40 00 01 cb call 2003580 2002e58: 92 10 20 24 mov 0x24, %o1 if ( fs_info != NULL ) { 2002e5c: ba 92 20 00 orcc %o0, 0, %i5 2002e60: 02 80 00 36 be 2002f38 2002e64: 03 00 80 73 sethi %hi(0x201cc00), %g1 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e68: c4 00 62 c4 ld [ %g1 + 0x2c4 ], %g2 ! 201cec4 memcpy( 2002e6c: 92 10 00 1a mov %i2, %o1 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 2002e70: 86 00 a0 01 add %g2, 1, %g3 memcpy( 2002e74: 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++; 2002e78: c4 27 40 00 st %g2, [ %i5 ] 2002e7c: c6 20 62 c4 st %g3, [ %g1 + 0x2c4 ] memcpy( 2002e80: 40 00 34 9c call 20100f0 2002e84: 90 07 60 08 add %i5, 8, %o0 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 2002e88: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002e8c: 90 10 00 1d mov %i5, %o0 2002e90: 96 10 20 00 clr %o3 2002e94: 15 00 80 6b sethi %hi(0x201ac00), %o2 2002e98: 9a 10 20 00 clr %o5 2002e9c: 94 12 a0 10 or %o2, 0x10, %o2 2002ea0: 19 00 00 10 sethi %hi(0x4000), %o4 2002ea4: 40 00 24 06 call 200bebc 2002ea8: 98 13 21 ed or %o4, 0x1ed, %o4 ! 41ed "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 2002eac: b8 92 20 00 orcc %o0, 0, %i4 2002eb0: 02 80 00 22 be 2002f38 <== NEVER TAKEN 2002eb4: 90 06 20 28 add %i0, 0x28, %o0 mt_entry->fs_info = fs_info; 2002eb8: fa 26 20 20 st %i5, [ %i0 + 0x20 ] mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 2002ebc: 13 00 80 6d sethi %hi(0x201b400), %o1 2002ec0: 94 10 20 30 mov 0x30, %o2 2002ec4: 40 00 34 8b call 20100f0 2002ec8: 92 12 60 f4 or %o1, 0xf4, %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; 2002ecc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 mt_entry->mt_fs_root->location.node_access = root_node; 2002ed0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2002ed4: c6 00 a0 04 ld [ %g2 + 4 ], %g3 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 2002ed8: 05 00 80 71 sethi %hi(0x201c400), %g2 2002edc: c4 00 a3 78 ld [ %g2 + 0x378 ], %g2 ! 201c778 NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 2002ee0: f8 20 60 08 st %i4, [ %g1 + 8 ] mt_entry->mt_fs_root->location.ops = op_table; 2002ee4: f2 20 60 14 st %i1, [ %g1 + 0x14 ] /* * 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) { 2002ee8: 80 a0 a0 10 cmp %g2, 0x10 2002eec: 02 80 00 0f be 2002f28 2002ef0: c6 20 60 10 st %g3, [ %g1 + 0x10 ] is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002ef4: 86 10 20 05 mov 5, %g3 2002ef8: 80 a0 a0 0f cmp %g2, 0xf 2002efc: 04 80 00 0a ble 2002f24 2002f00: 82 10 20 20 mov 0x20, %g1 /* * 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) { 2002f04: 80 a0 80 01 cmp %g2, %g1 2002f08: 22 80 00 09 be,a 2002f2c 2002f0c: 03 00 80 73 sethi %hi(0x201cc00), %g1 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 2002f10: 26 80 00 06 bl,a 2002f28 <== NEVER TAKEN 2002f14: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 2002f18: 86 80 ff ff addcc %g3, -1, %g3 2002f1c: 12 bf ff fa bne 2002f04 <== ALWAYS TAKEN 2002f20: 83 28 60 01 sll %g1, 1, %g1 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 2002f24: 84 10 20 80 mov 0x80, %g2 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 2002f28: 03 00 80 73 sethi %hi(0x201cc00), %g1 2002f2c: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ] ! 201cec0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 2002f30: 81 c7 e0 08 ret 2002f34: 91 e8 20 00 restore %g0, 0, %o0 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 2002f38: 40 00 32 12 call 200f780 <__errno> 2002f3c: b0 10 3f ff mov -1, %i0 2002f40: 82 10 20 0c mov 0xc, %g1 2002f44: c2 22 00 00 st %g1, [ %o0 ] 2002f48: 81 c7 e0 08 ret 2002f4c: 81 e8 00 00 restore =============================================================================== 0200489c : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 200489c: 9d e3 bf 40 save %sp, -192, %sp int rv = 0; mode &= ~rtems_filesystem_umask; 20048a0: 03 00 80 83 sethi %hi(0x2020c00), %g1 20048a4: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 2020e0c 20048a8: c4 00 60 08 ld [ %g1 + 8 ], %g2 switch (mode & S_IFMT) { 20048ac: 03 00 00 08 sethi %hi(0x2000), %g1 void *context ) { int rv = 0; mode &= ~rtems_filesystem_umask; 20048b0: b2 2e 40 02 andn %i1, %g2, %i1 switch (mode & S_IFMT) { 20048b4: 05 00 00 3c sethi %hi(0xf000), %g2 20048b8: 84 0e 40 02 and %i1, %g2, %g2 20048bc: 80 a0 80 01 cmp %g2, %g1 20048c0: 22 80 00 0c be,a 20048f0 20048c4: c2 06 80 00 ld [ %i2 ], %g1 20048c8: 08 80 00 30 bleu 2004988 <== NEVER TAKEN 20048cc: 03 00 00 04 sethi %hi(0x1000), %g1 20048d0: 03 00 00 18 sethi %hi(0x6000), %g1 20048d4: 80 a0 80 01 cmp %g2, %g1 20048d8: 02 80 00 05 be 20048ec 20048dc: 03 00 00 20 sethi %hi(0x8000), %g1 20048e0: 80 a0 80 01 cmp %g2, %g1 20048e4: 12 80 00 2c bne 2004994 <== ALWAYS TAKEN 20048e8: 01 00 00 00 nop rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 20048ec: c2 06 80 00 ld [ %i2 ], %g1 20048f0: 80 a0 60 07 cmp %g1, 7 20048f4: 12 80 00 35 bne 20049c8 20048f8: 92 10 00 18 mov %i0, %o1 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 = 20048fc: 94 10 20 78 mov 0x78, %o2 2004900: 40 00 09 2f call 2006dbc 2004904: 90 07 bf a4 add %fp, -92, %o0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 2004908: 7f ff ff d2 call 2004850 200490c: ba 10 00 08 mov %o0, %i5 2004910: 80 8a 20 ff btst 0xff, %o0 2004914: 02 80 00 26 be 20049ac 2004918: 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( 200491c: d4 07 bf ac ld [ %fp + -84 ], %o2 2004920: 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; 2004924: f6 27 bf e0 st %i3, [ %fp + -32 ] new_node = IMFS_create_node_with_control( 2004928: 90 10 00 1d mov %i5, %o0 200492c: 92 10 00 1a mov %i2, %o1 2004930: 98 10 00 19 mov %i1, %o4 2004934: 9a 07 bf e0 add %fp, -32, %o5 2004938: 40 00 2f 42 call 2010640 200493c: b0 10 3f ff mov -1, %i0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 2004940: 80 a2 20 00 cmp %o0, 0 2004944: 02 80 00 1d be 20049b8 2004948: 92 10 20 00 clr %o1 IMFS_jnode_t *parent = currentloc->node_access; 200494c: fa 07 60 08 ld [ %i5 + 8 ], %i5 IMFS_update_ctime( parent ); 2004950: 40 00 02 b0 call 2005410 2004954: 90 07 bf f8 add %fp, -8, %o0 2004958: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 200495c: 90 07 bf f8 add %fp, -8, %o0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 2004960: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 2004964: 40 00 02 ab call 2005410 2004968: 92 10 20 00 clr %o1 200496c: c2 07 bf f8 ld [ %fp + -8 ], %g1 2004970: b0 10 20 00 clr %i0 2004974: c2 27 60 44 st %g1, [ %i5 + 0x44 ] } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2004978: 40 00 09 17 call 2006dd4 200497c: 90 07 bf a4 add %fp, -92, %o0 2004980: 81 c7 e0 08 ret 2004984: 81 e8 00 00 restore { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { 2004988: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200498c: 22 bf ff d9 be,a 20048f0 <== NOT EXECUTED 2004990: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED case S_IFCHR: case S_IFIFO: case S_IFREG: break; default: errno = EINVAL; 2004994: 40 00 3d 59 call 2013ef8 <__errno> 2004998: b0 10 3f ff mov -1, %i0 200499c: 82 10 20 16 mov 0x16, %g1 20049a0: c2 22 00 00 st %g1, [ %o0 ] 20049a4: 81 c7 e0 08 ret 20049a8: 81 e8 00 00 restore IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 20049ac: 92 10 20 86 mov 0x86, %o1 20049b0: 40 00 08 3b call 2006a9c 20049b4: b0 10 3f ff mov -1, %i0 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 20049b8: 40 00 09 07 call 2006dd4 20049bc: 90 07 bf a4 add %fp, -92, %o0 20049c0: 81 c7 e0 08 ret 20049c4: 81 e8 00 00 restore } else { errno = EINVAL; 20049c8: 40 00 3d 4c call 2013ef8 <__errno> 20049cc: b0 10 3f ff mov -1, %i0 20049d0: 82 10 20 16 mov 0x16, %g1 20049d4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } } return rv; } 20049d8: 81 c7 e0 08 ret 20049dc: 81 e8 00 00 restore =============================================================================== 0200e7f0 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 200e7f0: 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 ) 200e7f4: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e7f8: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 ! 201cec0 200e7fc: b9 37 60 02 srl %i5, 2, %i4 200e800: 92 10 00 1c mov %i4, %o1 200e804: 40 00 27 8d call 2018638 <.umul> 200e808: 90 07 20 01 add %i4, 1, %o0 200e80c: 92 10 00 1c mov %i4, %o1 200e810: 40 00 27 8a call 2018638 <.umul> 200e814: 90 02 20 01 inc %o0 200e818: 92 10 00 1d mov %i5, %o1 200e81c: 40 00 27 87 call 2018638 <.umul> 200e820: 90 02 3f ff add %o0, -1, %o0 200e824: 82 10 20 00 clr %g1 200e828: 80 a0 40 19 cmp %g1, %i1 200e82c: 04 80 00 42 ble 200e934 <== ALWAYS TAKEN 200e830: b8 10 00 18 mov %i0, %i4 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200e834: f0 07 20 50 ld [ %i4 + 0x50 ], %i0 <== NOT EXECUTED 200e838: 80 a6 40 18 cmp %i1, %i0 200e83c: 04 80 00 2a ble 200e8e4 <== ALWAYS TAKEN 200e840: e0 07 20 54 ld [ %i4 + 0x54 ], %l0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e844: a3 3f 60 1f sra %i5, 0x1f, %l1 <== NOT EXECUTED 200e848: 96 10 00 1d mov %i5, %o3 200e84c: 94 10 00 11 mov %l1, %o2 200e850: 90 10 00 19 mov %i1, %o0 200e854: 40 00 29 0b call 2018c80 <__divdi3> 200e858: 92 10 00 1a mov %i2, %o1 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e85c: 90 10 00 18 mov %i0, %o0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e860: b6 10 00 09 mov %o1, %i3 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e864: 94 10 00 11 mov %l1, %o2 200e868: 92 10 00 10 mov %l0, %o1 200e86c: 40 00 29 05 call 2018c80 <__divdi3> 200e870: 96 10 00 1d mov %i5, %o3 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 200e874: 80 a6 c0 09 cmp %i3, %o1 200e878: 0a 80 00 21 bcs 200e8fc <== NEVER TAKEN 200e87c: b0 10 00 09 mov %o1, %i0 200e880: 10 80 00 05 b 200e894 200e884: ba 10 00 09 mov %o1, %i5 200e888: 80 a6 c0 1d cmp %i3, %i5 200e88c: 0a 80 00 1d bcs 200e900 200e890: 92 10 20 00 clr %o1 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 200e894: 92 10 00 1d mov %i5, %o1 200e898: 7f ff ff 39 call 200e57c 200e89c: 90 10 00 1c mov %i4, %o0 200e8a0: 80 a2 20 00 cmp %o0, 0 200e8a4: 22 bf ff f9 be,a 200e888 200e8a8: ba 07 60 01 inc %i5 for ( ; block>=old_blocks ; block-- ) { 200e8ac: 10 80 00 06 b 200e8c4 200e8b0: 80 a6 00 1d cmp %i0, %i5 IMFS_memfile_remove_block( the_jnode, block ); 200e8b4: 90 10 00 1c mov %i4, %o0 200e8b8: 7f ff ff c2 call 200e7c0 200e8bc: 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-- ) { 200e8c0: 80 a6 00 1d cmp %i0, %i5 200e8c4: 08 bf ff fc bleu 200e8b4 200e8c8: 92 10 00 1d mov %i5, %o1 IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 200e8cc: 40 00 03 ad call 200f780 <__errno> 200e8d0: b0 10 3f ff mov -1, %i0 200e8d4: 82 10 20 1c mov 0x1c, %g1 200e8d8: c2 22 00 00 st %g1, [ %o0 ] 200e8dc: 81 c7 e0 08 ret 200e8e0: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 200e8e4: 12 80 00 04 bne 200e8f4 <== NEVER TAKEN 200e8e8: 80 a6 80 10 cmp %i2, %l0 200e8ec: 18 bf ff d7 bgu 200e848 200e8f0: a3 3f 60 1f sra %i5, 0x1f, %l1 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 200e8f4: 81 c7 e0 08 ret 200e8f8: 91 e8 20 00 restore %g0, 0, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 200e8fc: 92 10 20 00 clr %o1 <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 200e900: f2 27 20 50 st %i1, [ %i4 + 0x50 ] 200e904: f4 27 20 54 st %i2, [ %i4 + 0x54 ] IMFS_update_ctime(the_jnode); 200e908: 7f ff d3 f7 call 20038e4 200e90c: 90 07 bf f8 add %fp, -8, %o0 200e910: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime(the_jnode); 200e914: 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); 200e918: c2 27 20 48 st %g1, [ %i4 + 0x48 ] IMFS_update_mtime(the_jnode); 200e91c: 7f ff d3 f2 call 20038e4 200e920: 92 10 20 00 clr %o1 200e924: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e928: c2 27 20 44 st %g1, [ %i4 + 0x44 ] return 0; 200e92c: 81 c7 e0 08 ret 200e930: 91 e8 20 00 restore %g0, 0, %o0 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 200e934: 12 80 00 04 bne 200e944 200e938: 80 a2 00 1a cmp %o0, %i2 200e93c: 38 bf ff bf bgu,a 200e838 200e940: f0 07 20 50 ld [ %i4 + 0x50 ], %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 200e944: 40 00 03 8f call 200f780 <__errno> 200e948: b0 10 3f ff mov -1, %i0 200e94c: 82 10 20 16 mov 0x16, %g1 200e950: c2 22 00 00 st %g1, [ %o0 ] 200e954: 81 c7 e0 08 ret 200e958: 81 e8 00 00 restore =============================================================================== 0200e09c : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 200e09c: 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 ) { 200e0a0: 03 00 80 73 sethi %hi(0x201cc00), %g1 200e0a4: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 ! 201cec0 200e0a8: bb 37 60 02 srl %i5, 2, %i5 200e0ac: 82 07 7f ff add %i5, -1, %g1 200e0b0: 80 a6 40 01 cmp %i1, %g1 200e0b4: 18 80 00 0b bgu 200e0e0 200e0b8: b8 10 00 18 mov %i0, %i4 p = info->indirect; if ( malloc_it ) { 200e0bc: 80 a6 a0 00 cmp %i2, 0 200e0c0: 12 80 00 50 bne 200e200 200e0c4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 200e0c8: 80 a2 20 00 cmp %o0, 0 200e0cc: 02 80 00 64 be 200e25c <== NEVER TAKEN 200e0d0: b0 10 20 00 clr %i0 return 0; return &info->indirect[ my_block ]; 200e0d4: b3 2e 60 02 sll %i1, 2, %i1 200e0d8: 81 c7 e0 08 ret 200e0dc: 91 ea 00 19 restore %o0, %i1, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 200e0e0: 90 07 60 01 add %i5, 1, %o0 200e0e4: 40 00 29 55 call 2018638 <.umul> 200e0e8: 92 10 00 1d mov %i5, %o1 200e0ec: 82 02 3f ff add %o0, -1, %g1 200e0f0: 80 a6 40 01 cmp %i1, %g1 200e0f4: 08 80 00 2c bleu 200e1a4 200e0f8: b6 10 00 08 mov %o0, %i3 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 200e0fc: 90 02 20 01 inc %o0 200e100: 40 00 29 4e call 2018638 <.umul> 200e104: 92 10 00 1d mov %i5, %o1 200e108: 90 02 3f ff add %o0, -1, %o0 200e10c: 80 a6 40 08 cmp %i1, %o0 200e110: 18 80 00 53 bgu 200e25c <== NEVER TAKEN 200e114: b0 10 20 00 clr %i0 my_block -= FIRST_TRIPLY_INDIRECT; 200e118: b2 26 40 1b sub %i1, %i3, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e11c: 92 10 00 1d mov %i5, %o1 200e120: 40 00 2a 2c call 20189d0 <.urem> 200e124: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e128: 92 10 00 1d mov %i5, %o1 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e12c: a0 10 00 08 mov %o0, %l0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e130: 40 00 29 7c call 2018720 <.udiv> 200e134: 90 10 00 19 mov %i1, %o0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200e138: 92 10 00 1d mov %i5, %o1 200e13c: 40 00 29 79 call 2018720 <.udiv> 200e140: b6 10 00 08 mov %o0, %i3 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e144: 92 10 00 1d mov %i5, %o1 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 200e148: b2 10 00 08 mov %o0, %i1 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 200e14c: 40 00 2a 21 call 20189d0 <.urem> 200e150: 90 10 00 1b mov %i3, %o0 p = info->triply_indirect; 200e154: c2 07 20 60 ld [ %i4 + 0x60 ], %g1 if ( malloc_it ) { 200e158: 80 a6 a0 00 cmp %i2, 0 200e15c: 02 80 00 33 be 200e228 200e160: ba 10 00 08 mov %o0, %i5 if ( !p ) { 200e164: 80 a0 60 00 cmp %g1, 0 200e168: 02 80 00 66 be 200e300 200e16c: 01 00 00 00 nop if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 200e170: b3 2e 60 02 sll %i1, 2, %i1 200e174: c4 00 40 19 ld [ %g1 + %i1 ], %g2 if ( !p1 ) { 200e178: 80 a0 a0 00 cmp %g2, 0 200e17c: 02 80 00 5a be 200e2e4 200e180: b2 00 40 19 add %g1, %i1, %i1 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 200e184: bb 2f 60 02 sll %i5, 2, %i5 200e188: d0 00 80 1d ld [ %g2 + %i5 ], %o0 if ( !p2 ) { 200e18c: 80 a2 20 00 cmp %o0, 0 200e190: 02 80 00 47 be 200e2ac 200e194: ba 00 80 1d add %g2, %i5, %i5 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 200e198: b1 2c 20 02 sll %l0, 2, %i0 200e19c: 81 c7 e0 08 ret 200e1a0: 91 ea 00 18 restore %o0, %i0, %o0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 200e1a4: b2 26 40 1d sub %i1, %i5, %i1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e1a8: 92 10 00 1d mov %i5, %o1 200e1ac: 40 00 2a 09 call 20189d0 <.urem> 200e1b0: 90 10 00 19 mov %i1, %o0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e1b4: 92 10 00 1d mov %i5, %o1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 200e1b8: b6 10 00 08 mov %o0, %i3 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 200e1bc: 40 00 29 59 call 2018720 <.udiv> 200e1c0: 90 10 00 19 mov %i1, %o0 p = info->doubly_indirect; 200e1c4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 if ( malloc_it ) { 200e1c8: 80 a6 a0 00 cmp %i2, 0 200e1cc: 02 80 00 26 be 200e264 200e1d0: ba 10 00 08 mov %o0, %i5 if ( !p ) { 200e1d4: 80 a0 60 00 cmp %g1, 0 200e1d8: 02 80 00 3c be 200e2c8 200e1dc: 01 00 00 00 nop if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 200e1e0: bb 2f 60 02 sll %i5, 2, %i5 200e1e4: d0 00 40 1d ld [ %g1 + %i5 ], %o0 if ( !p1 ) { 200e1e8: 80 a2 20 00 cmp %o0, 0 200e1ec: 02 80 00 29 be 200e290 200e1f0: ba 00 40 1d add %g1, %i5, %i5 if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 200e1f4: b1 2e e0 02 sll %i3, 2, %i0 200e1f8: 81 c7 e0 08 ret 200e1fc: 91 ea 00 18 restore %o0, %i0, %o0 if ( my_block <= LAST_INDIRECT ) { p = info->indirect; if ( malloc_it ) { if ( !p ) { 200e200: 80 a2 20 00 cmp %o0, 0 200e204: 32 bf ff b5 bne,a 200e0d8 200e208: b3 2e 60 02 sll %i1, 2, %i1 p = memfile_alloc_block(); 200e20c: 7f ff ff 97 call 200e068 200e210: b0 10 20 00 clr %i0 if ( !p ) 200e214: 80 a2 20 00 cmp %o0, 0 200e218: 02 80 00 11 be 200e25c <== NEVER TAKEN 200e21c: 01 00 00 00 nop return 0; info->indirect = p; 200e220: 10 bf ff ad b 200e0d4 200e224: d0 27 20 58 st %o0, [ %i4 + 0x58 ] p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 200e228: 80 a0 60 00 cmp %g1, 0 200e22c: 02 80 00 0c be 200e25c <== NEVER TAKEN 200e230: b3 2e 60 02 sll %i1, 2, %i1 return 0; p1 = (block_p *) p[ triply ]; 200e234: c2 00 40 19 ld [ %g1 + %i1 ], %g1 if ( !p1 ) 200e238: 80 a0 60 00 cmp %g1, 0 200e23c: 02 80 00 08 be 200e25c <== NEVER TAKEN 200e240: bb 2a 20 02 sll %o0, 2, %i5 return 0; p2 = (block_p *)p1[ doubly ]; 200e244: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p2 ) 200e248: 80 a0 60 00 cmp %g1, 0 200e24c: 02 80 00 04 be 200e25c <== NEVER TAKEN 200e250: 01 00 00 00 nop return 0; return (block_p *)&p2[ singly ]; 200e254: b1 2c 20 02 sll %l0, 2, %i0 200e258: b0 00 40 18 add %g1, %i0, %i0 /* * This means the requested block number is out of range. */ return 0; } 200e25c: 81 c7 e0 08 ret 200e260: 81 e8 00 00 restore } return (block_p *)&p1[ singly ]; } if ( !p ) 200e264: 80 a0 60 00 cmp %g1, 0 200e268: 02 bf ff fd be 200e25c <== NEVER TAKEN 200e26c: b0 10 20 00 clr %i0 return 0; p = (block_p *)p[ doubly ]; 200e270: bb 2a 20 02 sll %o0, 2, %i5 200e274: c2 00 40 1d ld [ %g1 + %i5 ], %g1 if ( !p ) 200e278: 80 a0 60 00 cmp %g1, 0 200e27c: 02 bf ff f8 be 200e25c <== NEVER TAKEN 200e280: 01 00 00 00 nop return 0; return (block_p *)&p[ singly ]; 200e284: b1 2e e0 02 sll %i3, 2, %i0 200e288: 81 c7 e0 08 ret 200e28c: 91 e8 40 18 restore %g1, %i0, %o0 info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200e290: 7f ff ff 76 call 200e068 200e294: b0 10 20 00 clr %i0 if ( !p1 ) 200e298: 80 a2 20 00 cmp %o0, 0 200e29c: 02 bf ff f0 be 200e25c <== NEVER TAKEN 200e2a0: 01 00 00 00 nop return 0; p[ doubly ] = (block_p) p1; 200e2a4: 10 bf ff d4 b 200e1f4 200e2a8: d0 27 40 00 st %o0, [ %i5 ] p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 200e2ac: 7f ff ff 6f call 200e068 200e2b0: b0 10 20 00 clr %i0 if ( !p2 ) 200e2b4: 80 a2 20 00 cmp %o0, 0 200e2b8: 02 bf ff e9 be 200e25c <== NEVER TAKEN 200e2bc: 01 00 00 00 nop return 0; p1[ doubly ] = (block_p) p2; 200e2c0: 10 bf ff b6 b 200e198 200e2c4: d0 27 40 00 st %o0, [ %i5 ] p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200e2c8: 7f ff ff 68 call 200e068 200e2cc: b0 10 20 00 clr %i0 if ( !p ) 200e2d0: 80 a2 20 00 cmp %o0, 0 200e2d4: 02 bf ff e2 be 200e25c <== NEVER TAKEN 200e2d8: 82 10 00 08 mov %o0, %g1 return 0; info->doubly_indirect = p; 200e2dc: 10 bf ff c1 b 200e1e0 200e2e0: d0 27 20 5c st %o0, [ %i4 + 0x5c ] info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 200e2e4: 7f ff ff 61 call 200e068 200e2e8: b0 10 20 00 clr %i0 if ( !p1 ) 200e2ec: 80 a2 20 00 cmp %o0, 0 200e2f0: 02 bf ff db be 200e25c <== NEVER TAKEN 200e2f4: 84 10 00 08 mov %o0, %g2 return 0; p[ triply ] = (block_p) p1; 200e2f8: 10 bf ff a3 b 200e184 200e2fc: d0 26 40 00 st %o0, [ %i1 ] p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 200e300: 7f ff ff 5a call 200e068 200e304: 01 00 00 00 nop if ( !p ) 200e308: 82 92 20 00 orcc %o0, 0, %g1 200e30c: 02 bf ff d4 be 200e25c <== NEVER TAKEN 200e310: 01 00 00 00 nop return 0; info->triply_indirect = p; 200e314: 10 bf ff 97 b 200e170 200e318: c2 27 20 60 st %g1, [ %i4 + 0x60 ] =============================================================================== 0200e31c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e31c: 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; 200e320: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200e324: 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 ) { 200e328: c2 00 40 00 ld [ %g1 ], %g1 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 200e32c: 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 ) { 200e330: 80 a0 60 05 cmp %g1, 5 200e334: 02 80 00 64 be 200e4c4 200e338: a2 10 00 1a mov %i2, %l1 /* * 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 ) 200e33c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 /* * 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; 200e340: 82 10 00 1a mov %i2, %g1 if ( last_byte > the_jnode->info.file.size ) 200e344: 86 10 20 00 clr %g3 200e348: c8 06 20 54 ld [ %i0 + 0x54 ], %g4 200e34c: 80 a0 c0 02 cmp %g3, %g2 200e350: 04 80 00 41 ble 200e454 <== ALWAYS TAKEN 200e354: b4 07 00 1a add %i4, %i2, %i2 my_length = the_jnode->info.file.size - start; 200e358: b8 21 00 01 sub %g4, %g1, %i4 <== NOT EXECUTED */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e35c: 33 00 80 73 sethi %hi(0x201cc00), %i1 <== NOT EXECUTED 200e360: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2 ! 201cec0 200e364: 90 10 00 10 mov %l0, %o0 200e368: b1 3e a0 1f sra %i2, 0x1f, %i0 200e36c: 92 10 00 11 mov %l1, %o1 200e370: 94 10 00 18 mov %i0, %o2 200e374: 40 00 2b 29 call 2019018 <__moddi3> 200e378: 96 10 00 1a mov %i2, %o3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e37c: 90 10 00 10 mov %l0, %o0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e380: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e384: 94 10 00 18 mov %i0, %o2 200e388: 92 10 00 11 mov %l1, %o1 200e38c: 40 00 2a 3d call 2018c80 <__divdi3> 200e390: 96 10 00 1a mov %i2, %o3 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 200e394: 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; 200e398: a0 10 00 09 mov %o1, %l0 if ( start_offset ) { 200e39c: 80 a4 a0 00 cmp %l2, 0 200e3a0: 02 80 00 14 be 200e3f0 200e3a4: 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 ); 200e3a8: 90 10 00 1d mov %i5, %o0 200e3ac: 7f ff ff 3c call 200e09c 200e3b0: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e3b4: 80 a2 20 00 cmp %o0, 0 200e3b8: 02 80 00 25 be 200e44c <== NEVER TAKEN 200e3bc: b4 26 80 12 sub %i2, %l2, %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; 200e3c0: 80 a7 00 1a cmp %i4, %i2 200e3c4: 18 80 00 53 bgu 200e510 200e3c8: b0 10 00 1c mov %i4, %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 ); 200e3cc: d2 02 00 00 ld [ %o0 ], %o1 200e3d0: 94 10 00 18 mov %i0, %o2 200e3d4: 90 10 00 1b mov %i3, %o0 200e3d8: 40 00 07 46 call 20100f0 200e3dc: 92 02 40 12 add %o1, %l2, %o1 dest += to_copy; block++; my_length -= to_copy; 200e3e0: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2 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 ); dest += to_copy; 200e3e4: a2 06 c0 18 add %i3, %i0, %l1 block++; 200e3e8: a0 04 20 01 inc %l0 my_length -= to_copy; 200e3ec: b8 27 00 18 sub %i4, %i0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e3f0: 80 a7 00 1a cmp %i4, %i2 200e3f4: 1a 80 00 0e bcc 200e42c 200e3f8: 94 10 20 00 clr %o2 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200e3fc: 10 80 00 1e b 200e474 200e400: 80 a7 20 00 cmp %i4, 0 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200e404: d2 00 40 00 ld [ %g1 ], %o1 200e408: 40 00 07 3a call 20100f0 200e40c: b8 27 00 1a sub %i4, %i2, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e410: c2 06 62 c0 ld [ %i1 + 0x2c0 ], %g1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 200e414: a2 04 40 1a add %l1, %i2, %l1 block++; 200e418: a0 04 20 01 inc %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e41c: 80 a0 40 1c cmp %g1, %i4 200e420: 18 80 00 14 bgu 200e470 200e424: b0 06 00 1a add %i0, %i2, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e428: 94 10 20 00 clr %o2 200e42c: 92 10 00 10 mov %l0, %o1 200e430: 7f ff ff 1b call 200e09c 200e434: 90 10 00 1d mov %i5, %o0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 200e438: 94 10 00 1a mov %i2, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e43c: 82 10 00 08 mov %o0, %g1 if ( !block_ptr ) 200e440: 80 a0 60 00 cmp %g1, 0 200e444: 12 bf ff f0 bne 200e404 <== ALWAYS TAKEN 200e448: 90 10 00 11 mov %l1, %o0 } IMFS_update_atime( the_jnode ); return copied; } 200e44c: 81 c7 e0 08 ret <== NOT EXECUTED 200e450: 81 e8 00 00 restore <== NOT EXECUTED /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 200e454: 12 bf ff c3 bne 200e360 <== NEVER TAKEN 200e458: 33 00 80 73 sethi %hi(0x201cc00), %i1 200e45c: 80 a6 80 04 cmp %i2, %g4 200e460: 08 bf ff c1 bleu 200e364 200e464: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2 my_length = the_jnode->info.file.size - start; 200e468: 10 bf ff be b 200e360 200e46c: b8 21 00 01 sub %g4, %g1, %i4 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 200e470: 80 a7 20 00 cmp %i4, 0 200e474: 02 80 00 0e be 200e4ac 200e478: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200e47c: 90 10 00 1d mov %i5, %o0 200e480: 92 10 00 10 mov %l0, %o1 200e484: 7f ff ff 06 call 200e09c 200e488: 94 10 20 00 clr %o2 if ( !block_ptr ) 200e48c: 80 a2 20 00 cmp %o0, 0 200e490: 02 bf ff ef be 200e44c <== NEVER TAKEN 200e494: 94 10 00 1c mov %i4, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 200e498: d2 02 00 00 ld [ %o0 ], %o1 200e49c: 90 10 00 11 mov %l1, %o0 200e4a0: 40 00 07 14 call 20100f0 200e4a4: b0 06 00 1c add %i0, %i4, %i0 copied += my_length; } IMFS_update_atime( the_jnode ); 200e4a8: 90 07 bf f8 add %fp, -8, %o0 200e4ac: 7f ff d5 0e call 20038e4 200e4b0: 92 10 20 00 clr %o1 200e4b4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e4b8: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return copied; } 200e4bc: 81 c7 e0 08 ret 200e4c0: 81 e8 00 00 restore if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200e4c4: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 200e4c8: 82 10 20 00 clr %g1 200e4cc: 86 a3 40 1a subcc %o5, %i2, %g3 200e4d0: 84 63 00 19 subx %o4, %i1, %g2 200e4d4: 80 a0 40 02 cmp %g1, %g2 200e4d8: 04 80 00 10 ble 200e518 <== ALWAYS TAKEN 200e4dc: d2 06 20 58 ld [ %i0 + 0x58 ], %o1 my_length = the_jnode->info.linearfile.size - start; 200e4e0: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 200e4e4: 92 02 40 11 add %o1, %l1, %o1 200e4e8: 94 10 00 18 mov %i0, %o2 200e4ec: 40 00 07 01 call 20100f0 200e4f0: 90 10 00 1b mov %i3, %o0 IMFS_update_atime( the_jnode ); 200e4f4: 90 07 bf f8 add %fp, -8, %o0 200e4f8: 7f ff d4 fb call 20038e4 200e4fc: 92 10 20 00 clr %o1 200e500: c2 07 bf f8 ld [ %fp + -8 ], %g1 200e504: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return my_length; 200e508: 81 c7 e0 08 ret 200e50c: 81 e8 00 00 restore * 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; 200e510: 10 bf ff af b 200e3cc 200e514: b0 10 00 1a mov %i2, %i0 if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 200e518: 12 80 00 04 bne 200e528 <== NEVER TAKEN 200e51c: 80 a7 00 03 cmp %i4, %g3 200e520: 38 bf ff f1 bgu,a 200e4e4 <== ALWAYS TAKEN 200e524: b0 23 40 11 sub %o5, %l1, %i0 my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 200e528: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 200e52c: 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); 200e530: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200e534: 40 00 06 ef call 20100f0 <== NOT EXECUTED 200e538: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 200e53c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED 200e540: 7f ff d4 e9 call 20038e4 <== NOT EXECUTED 200e544: 92 10 20 00 clr %o1 <== NOT EXECUTED 200e548: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED 200e54c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED return my_length; 200e550: 81 c7 e0 08 ret <== NOT EXECUTED 200e554: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200e648 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 200e648: 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; 200e64c: 39 00 80 73 sethi %hi(0x201cc00), %i4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200e650: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 /* * 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; 200e654: f4 07 22 c0 ld [ %i4 + 0x2c0 ], %i2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 200e658: 80 a0 60 00 cmp %g1, 0 200e65c: 02 80 00 05 be 200e670 200e660: b5 36 a0 02 srl %i2, 2, %i2 memfile_free_blocks_in_table( &info->indirect, to_free ); 200e664: 90 06 20 58 add %i0, 0x58, %o0 200e668: 7f ff ff e2 call 200e5f0 200e66c: 92 10 00 1a mov %i2, %o1 } if ( info->doubly_indirect ) { 200e670: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200e674: 80 a0 60 00 cmp %g1, 0 200e678: 02 80 00 1b be 200e6e4 200e67c: c4 07 22 c0 ld [ %i4 + 0x2c0 ], %g2 for ( i=0 ; i <== NEVER TAKEN 200e68c: 90 10 20 00 clr %o0 200e690: 37 00 80 73 sethi %hi(0x201cc00), %i3 200e694: ba 10 20 00 clr %i5 200e698: 10 80 00 03 b 200e6a4 200e69c: b6 16 e2 c0 or %i3, 0x2c0, %i3 200e6a0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 if ( info->doubly_indirect[i] ) { 200e6a4: 91 2a 20 02 sll %o0, 2, %o0 200e6a8: c4 00 40 08 ld [ %g1 + %o0 ], %g2 200e6ac: 80 a0 a0 00 cmp %g2, 0 200e6b0: 02 80 00 04 be 200e6c0 <== NEVER TAKEN 200e6b4: 90 00 40 08 add %g1, %o0, %o0 memfile_free_blocks_in_table( 200e6b8: 7f ff ff ce call 200e5f0 200e6bc: 92 10 00 1a mov %i2, %o1 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 200e6d4: 90 10 00 1d mov %i5, %o0 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 ); 200e6d8: 90 06 20 5c add %i0, 0x5c, %o0 200e6dc: 7f ff ff c5 call 200e5f0 200e6e0: 92 10 00 1a mov %i2, %o1 } if ( info->triply_indirect ) { 200e6e4: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 200e6e8: 80 a2 20 00 cmp %o0, 0 200e6ec: 02 80 00 33 be 200e7b8 200e6f0: c2 07 22 c0 ld [ %i4 + 0x2c0 ], %g1 for ( i=0 ; i <== NEVER TAKEN 200e700: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 200e704: f8 02 00 00 ld [ %o0 ], %i4 if ( !p ) /* ensure we have a valid pointer */ 200e708: 80 a7 20 00 cmp %i4, 0 200e70c: 22 80 00 29 be,a 200e7b0 <== NEVER TAKEN 200e710: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200e714: 37 00 80 73 sethi %hi(0x201cc00), %i3 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200e718: a0 10 20 00 clr %l0 if ( !p ) /* ensure we have a valid pointer */ 200e71c: b2 10 20 00 clr %i1 200e720: b6 16 e2 c0 or %i3, 0x2c0, %i3 break; for ( j=0 ; j <== NEVER TAKEN 200e72c: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 200e730: 90 10 20 00 clr %o0 200e734: ba 10 20 00 clr %i5 if ( p[j] ) { 200e738: 91 2a 20 02 sll %o0, 2, %o0 200e73c: c2 07 00 08 ld [ %i4 + %o0 ], %g1 200e740: 80 a0 60 00 cmp %g1, 0 200e744: 02 80 00 04 be 200e754 <== NEVER TAKEN 200e748: 90 07 00 08 add %i4, %o0, %o0 memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 200e74c: 7f ff ff a9 call 200e5f0 200e750: 92 10 00 1a mov %i2, %o1 if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j 200e768: 90 10 00 1d mov %i5, %o0 200e76c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 200e770: 90 02 00 10 add %o0, %l0, %o0 200e774: 7f ff ff 9f call 200e5f0 200e778: 92 10 00 1a mov %i2, %o1 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i 200e790: 90 06 20 60 add %i0, 0x60, %o0 p = (block_p *) info->triply_indirect[i]; 200e794: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 * 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( 200e798: a1 2e 60 02 sll %i1, 2, %l0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 200e79c: f8 02 00 10 ld [ %o0 + %l0 ], %i4 if ( !p ) /* ensure we have a valid pointer */ 200e7a0: 80 a7 20 00 cmp %i4, 0 200e7a4: 12 bf ff e1 bne 200e728 <== ALWAYS TAKEN 200e7a8: 80 a0 60 00 cmp %g1, 0 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 200e7ac: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED 200e7b0: 7f ff ff 90 call 200e5f0 200e7b4: 92 10 00 1a mov %i2, %o1 (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 200e7b8: 81 c7 e0 08 ret 200e7bc: 81 e8 00 00 restore =============================================================================== 0200e95c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200e95c: 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 ) { 200e960: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 200e964: 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 ) { 200e968: 80 a0 60 00 cmp %g1, 0 200e96c: 06 80 00 5c bl 200eadc <== NEVER TAKEN 200e970: 94 07 00 1a add %i4, %i2, %o2 200e974: 80 a0 60 00 cmp %g1, 0 200e978: 22 80 00 56 be,a 200ead0 <== ALWAYS TAKEN 200e97c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e980: 23 00 80 73 sethi %hi(0x201cc00), %l1 <== NOT EXECUTED 200e984: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0 ! 201cec0 200e988: 92 10 00 1a mov %i2, %o1 200e98c: b1 3c 20 1f sra %l0, 0x1f, %i0 200e990: 96 10 00 10 mov %l0, %o3 200e994: 94 10 00 18 mov %i0, %o2 200e998: 40 00 29 a0 call 2019018 <__moddi3> 200e99c: 90 10 00 19 mov %i1, %o0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e9a0: 94 10 00 18 mov %i0, %o2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 200e9a4: a4 10 00 09 mov %o1, %l2 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 200e9a8: 90 10 00 19 mov %i1, %o0 200e9ac: 92 10 00 1a mov %i2, %o1 200e9b0: 40 00 28 b4 call 2018c80 <__divdi3> 200e9b4: 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; 200e9b8: 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 ) { 200e9bc: 80 a4 a0 00 cmp %l2, 0 200e9c0: 12 80 00 1a bne 200ea28 200e9c4: b4 10 00 09 mov %o1, %i2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e9c8: 80 a7 00 10 cmp %i4, %l0 200e9cc: 1a 80 00 0e bcc 200ea04 200e9d0: 92 10 00 1a mov %i2, %o1 * 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 ) { 200e9d4: 10 80 00 2a b 200ea7c 200e9d8: 80 a7 20 00 cmp %i4, 0 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 200e9dc: d0 02 00 00 ld [ %o0 ], %o0 200e9e0: 40 00 05 c4 call 20100f0 200e9e4: b8 27 00 10 sub %i4, %l0, %i4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e9e8: c2 04 62 c0 ld [ %l1 + 0x2c0 ], %g1 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 200e9ec: b6 06 c0 10 add %i3, %l0, %i3 block++; 200e9f0: b4 06 a0 01 inc %i2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 200e9f4: 80 a0 40 1c cmp %g1, %i4 200e9f8: 18 80 00 20 bgu 200ea78 200e9fc: b0 06 00 10 add %i0, %l0, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ea00: 92 10 00 1a mov %i2, %o1 200ea04: 94 10 20 00 clr %o2 200ea08: 7f ff fd a5 call 200e09c 200ea0c: 90 10 00 1d mov %i5, %o0 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 200ea10: 92 10 00 1b mov %i3, %o1 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 200ea14: 80 a2 20 00 cmp %o0, 0 200ea18: 12 bf ff f1 bne 200e9dc <== ALWAYS TAKEN 200ea1c: 94 10 00 10 mov %l0, %o2 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 200ea20: 81 c7 e0 08 ret <== NOT EXECUTED 200ea24: 81 e8 00 00 restore <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 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 ); 200ea28: 90 10 00 1d mov %i5, %o0 200ea2c: 94 10 20 00 clr %o2 200ea30: 7f ff fd 9b call 200e09c 200ea34: b0 10 20 00 clr %i0 if ( !block_ptr ) 200ea38: 80 a2 20 00 cmp %o0, 0 200ea3c: 02 80 00 32 be 200eb04 <== NEVER TAKEN 200ea40: 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; 200ea44: b0 24 00 12 sub %l0, %l2, %i0 200ea48: 80 a6 00 1c cmp %i0, %i4 200ea4c: 18 80 00 30 bgu 200eb0c 200ea50: d0 02 00 00 ld [ %o0 ], %o0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200ea54: 92 10 00 1b mov %i3, %o1 200ea58: 90 02 00 12 add %o0, %l2, %o0 200ea5c: 94 10 00 18 mov %i0, %o2 200ea60: 40 00 05 a4 call 20100f0 200ea64: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200ea68: b4 06 a0 01 inc %i2 my_length -= to_copy; 200ea6c: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 200ea70: 10 bf ff d6 b 200e9c8 200ea74: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 200ea78: 80 a7 20 00 cmp %i4, 0 200ea7c: 02 80 00 0e be 200eab4 200ea80: 90 07 bf f8 add %fp, -8, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 200ea84: 90 10 00 1d mov %i5, %o0 200ea88: 92 10 00 1a mov %i2, %o1 200ea8c: 7f ff fd 84 call 200e09c 200ea90: 94 10 20 00 clr %o2 if ( !block_ptr ) 200ea94: 80 a2 20 00 cmp %o0, 0 200ea98: 02 bf ff e2 be 200ea20 <== NEVER TAKEN 200ea9c: 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 ); 200eaa0: d0 02 00 00 ld [ %o0 ], %o0 200eaa4: 94 10 00 1c mov %i4, %o2 200eaa8: 40 00 05 92 call 20100f0 200eaac: b0 06 00 1c add %i0, %i4, %i0 my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 200eab0: 90 07 bf f8 add %fp, -8, %o0 200eab4: 7f ff d3 8c call 20038e4 200eab8: 92 10 20 00 clr %o1 200eabc: c2 07 bf f8 ld [ %fp + -8 ], %g1 200eac0: c2 27 60 44 st %g1, [ %i5 + 0x44 ] 200eac4: c2 27 60 48 st %g1, [ %i5 + 0x48 ] return copied; } 200eac8: 81 c7 e0 08 ret 200eacc: 81 e8 00 00 restore * 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 ) { 200ead0: 80 a0 40 0a cmp %g1, %o2 200ead4: 1a bf ff ac bcc 200e984 200ead8: 23 00 80 73 sethi %hi(0x201cc00), %l1 status = IMFS_memfile_extend( the_jnode, last_byte ); 200eadc: 90 10 00 1d mov %i5, %o0 200eae0: 7f ff ff 44 call 200e7f0 200eae4: 92 10 20 00 clr %o1 if ( status ) 200eae8: 80 a2 20 00 cmp %o0, 0 200eaec: 02 bf ff a6 be 200e984 200eaf0: 23 00 80 73 sethi %hi(0x201cc00), %l1 rtems_set_errno_and_return_minus_one( ENOSPC ); 200eaf4: 40 00 03 23 call 200f780 <__errno> 200eaf8: b0 10 3f ff mov -1, %i0 200eafc: 82 10 20 1c mov 0x1c, %g1 200eb00: c2 22 00 00 st %g1, [ %o0 ] 200eb04: 81 c7 e0 08 ret 200eb08: 81 e8 00 00 restore * 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; 200eb0c: b0 10 00 1c mov %i4, %i0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 200eb10: 92 10 00 1b mov %i3, %o1 200eb14: 90 02 00 12 add %o0, %l2, %o0 200eb18: 94 10 00 18 mov %i0, %o2 200eb1c: 40 00 05 75 call 20100f0 200eb20: b6 06 c0 18 add %i3, %i0, %i3 src += to_copy; block++; 200eb24: b4 06 a0 01 inc %i2 my_length -= to_copy; 200eb28: b8 27 00 18 sub %i4, %i0, %i4 copied += to_copy; 200eb2c: 10 bf ff a7 b 200e9c8 200eb30: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0 =============================================================================== 02003058 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003058: 9d e3 bf 80 save %sp, -128, %sp dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 200305c: 03 00 00 3c sethi %hi(0xf000), %g1 2003060: 07 00 00 10 sethi %hi(0x4000), %g3 2003064: 82 0e c0 01 and %i3, %g1, %g1 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003068: 98 10 00 1b mov %i3, %o4 200306c: 94 10 00 19 mov %i1, %o2 2003070: 96 10 00 1a mov %i2, %o3 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 2003074: 80 a0 40 03 cmp %g1, %g3 2003078: 02 80 00 0b be 20030a4 200307c: 84 10 20 00 clr %g2 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 2003080: 07 00 00 20 sethi %hi(0x8000), %g3 2003084: 80 a0 40 03 cmp %g1, %g3 2003088: 02 80 00 29 be 200312c 200308c: 07 00 00 08 sethi %hi(0x2000), %g3 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2003090: 80 a0 40 03 cmp %g1, %g3 2003094: 12 80 00 1d bne 2003108 2003098: 07 00 00 18 sethi %hi(0x6000), %g3 *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 200309c: 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; 20030a0: 84 10 20 01 mov 1, %g2 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 20030a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 20030a8: 84 00 a0 02 add %g2, 2, %g2 20030ac: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 20030b0: 85 28 a0 02 sll %g2, 2, %g2 20030b4: d2 00 40 02 ld [ %g1 + %g2 ], %o1 20030b8: 90 10 00 18 mov %i0, %o0 20030bc: 40 00 23 b2 call 200bf84 20030c0: 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 ) { 20030c4: 80 a2 20 00 cmp %o0, 0 20030c8: 02 80 00 0e be 2003100 20030cc: 82 10 3f ff mov -1, %g1 IMFS_jnode_t *parent = parentloc->node_access; 20030d0: fa 06 20 08 ld [ %i0 + 8 ], %i5 IMFS_update_ctime( parent ); 20030d4: 92 10 20 00 clr %o1 20030d8: 40 00 02 03 call 20038e4 20030dc: 90 07 bf f8 add %fp, -8, %o0 20030e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 IMFS_update_mtime( parent ); 20030e4: 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 ); 20030e8: c2 27 60 48 st %g1, [ %i5 + 0x48 ] IMFS_update_mtime( parent ); 20030ec: 40 00 01 fe call 20038e4 20030f0: 92 10 20 00 clr %o1 20030f4: c4 07 bf f8 ld [ %fp + -8 ], %g2 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 20030f8: 82 10 20 00 clr %g1 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 ); IMFS_update_mtime( parent ); 20030fc: c4 27 60 44 st %g2, [ %i5 + 0x44 ] } else { rv = -1; } return rv; } 2003100: 81 c7 e0 08 ret 2003104: 91 e8 00 01 restore %g0, %g1, %o0 { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 2003108: 80 a0 40 03 cmp %g1, %g3 200310c: 22 bf ff e5 be,a 20030a0 2003110: f8 3f bf e0 std %i4, [ %fp + -32 ] rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 2003114: 07 00 00 04 sethi %hi(0x1000), %g3 2003118: 80 a0 40 03 cmp %g1, %g3 200311c: 22 bf ff e2 be,a 20030a4 <== ALWAYS TAKEN 2003120: 84 10 20 06 mov 6, %g2 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 2003124: 10 bf ff e1 b 20030a8 <== NOT EXECUTED 2003128: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 200312c: 10 bf ff de b 20030a4 2003130: 84 10 20 04 mov 4, %g2 =============================================================================== 02003134 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003134: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 2003138: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200313c: 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; 2003140: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 2003144: c4 00 80 00 ld [ %g2 ], %g2 2003148: 80 a0 a0 00 cmp %g2, 0 200314c: 12 80 00 0f bne 2003188 2003150: 01 00 00 00 nop if ( node->info.directory.mt_fs == NULL ) { 2003154: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 2003158: 80 a0 a0 00 cmp %g2, 0 200315c: 12 80 00 05 bne 2003170 <== NEVER TAKEN 2003160: 01 00 00 00 nop node->info.directory.mt_fs = mt_entry; 2003164: 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; 2003168: 81 c7 e0 08 ret 200316c: 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; 2003170: 40 00 31 84 call 200f780 <__errno> <== NOT EXECUTED 2003174: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003178: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED 200317c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003180: 81 c7 e0 08 ret <== NOT EXECUTED 2003184: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 2003188: 40 00 31 7e call 200f780 <__errno> 200318c: b0 10 3f ff mov -1, %i0 2003190: 82 10 20 14 mov 0x14, %g1 2003194: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 2003198: 81 c7 e0 08 ret 200319c: 81 e8 00 00 restore =============================================================================== 0200c3e0 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { 200c3e0: 9d e3 bf a0 save %sp, -96, %sp if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 200c3e4: 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 ); 200c3e8: 82 06 20 54 add %i0, 0x54, %g1 200c3ec: 80 a0 80 01 cmp %g2, %g1 200c3f0: 12 80 00 10 bne 200c430 200c3f4: 80 a6 00 19 cmp %i0, %i1 errno = ENOTEMPTY; node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { 200c3f8: 02 80 00 08 be 200c418 200c3fc: 01 00 00 00 nop 200c400: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 200c404: 80 a0 60 00 cmp %g1, 0 200c408: 12 80 00 04 bne 200c418 <== NEVER TAKEN 200c40c: 01 00 00 00 nop errno = EBUSY; node = NULL; } return node; } 200c410: 81 c7 e0 08 ret 200c414: 81 e8 00 00 restore { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( node == root_node || IMFS_is_mount_point( node ) ) { errno = EBUSY; 200c418: 40 00 0c da call 200f780 <__errno> 200c41c: b0 10 20 00 clr %i0 200c420: 82 10 20 10 mov 0x10, %g1 200c424: c2 22 00 00 st %g1, [ %o0 ] node = NULL; } return node; } 200c428: 81 c7 e0 08 ret 200c42c: 81 e8 00 00 restore IMFS_jnode_t *node, const IMFS_jnode_t *root_node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 200c430: 40 00 0c d4 call 200f780 <__errno> 200c434: b0 10 20 00 clr %i0 200c438: 82 10 20 5a mov 0x5a, %g1 200c43c: c2 22 00 00 st %g1, [ %o0 ] 200c440: 81 c7 e0 08 ret 200c444: 81 e8 00 00 restore =============================================================================== 020031e0 : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 20031e0: c8 02 20 08 ld [ %o0 + 8 ], %g4 IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 20031e4: 80 a2 a0 00 cmp %o2, 0 20031e8: 02 80 00 13 be 2003234 <== NEVER TAKEN 20031ec: 90 10 20 00 clr %o0 20031f0: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 20031f4: c4 48 40 00 ldsb [ %g1 ], %g2 20031f8: 80 a0 a0 00 cmp %g2, 0 20031fc: 02 80 00 0e be 2003234 <== NEVER TAKEN 2003200: c2 08 40 00 ldub [ %g1 ], %g1 2003204: 10 80 00 07 b 2003220 2003208: 84 10 20 00 clr %g2 200320c: c2 01 20 50 ld [ %g4 + 0x50 ], %g1 2003210: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3 2003214: 80 a0 e0 00 cmp %g3, 0 2003218: 02 80 00 07 be 2003234 200321c: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 buf[i] = node->info.sym_link.name[i]; 2003220: c2 2a 40 02 stb %g1, [ %o1 + %g2 ] node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2003224: 90 02 20 01 inc %o0 2003228: 80 a2 00 0a cmp %o0, %o2 200322c: 12 bf ff f8 bne 200320c 2003230: 84 10 00 08 mov %o0, %g2 buf[i] = node->info.sym_link.name[i]; return i; } 2003234: 81 c3 e0 08 retl =============================================================================== 0200323c : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 200323c: 9d e3 bf 98 save %sp, -104, %sp int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 2003240: fa 06 60 08 ld [ %i1 + 8 ], %i5 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 2003244: c2 07 60 08 ld [ %i5 + 8 ], %g1 2003248: 80 a0 60 00 cmp %g1, 0 200324c: 02 80 00 22 be 20032d4 <== NEVER TAKEN 2003250: f4 06 a0 08 ld [ %i2 + 8 ], %i2 if ( namelen < IMFS_NAME_MAX ) { 2003254: 80 a7 20 1f cmp %i4, 0x1f 2003258: 18 80 00 19 bgu 20032bc <== NEVER TAKEN 200325c: 94 10 00 1c mov %i4, %o2 memcpy( node->name, name, namelen ); 2003260: 92 10 00 1b mov %i3, %o1 2003264: 40 00 33 a3 call 20100f0 2003268: 90 07 60 0c add %i5, 0xc, %o0 node->name [namelen] = '\0'; 200326c: b8 07 40 1c add %i5, %i4, %i4 2003270: c0 2f 20 0c clrb [ %i4 + 0xc ] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 2003274: c2 07 60 04 ld [ %i5 + 4 ], %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 2003278: c4 07 40 00 ld [ %i5 ], %g2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 200327c: 86 06 a0 54 add %i2, 0x54, %g3 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 2003280: c2 20 a0 04 st %g1, [ %g2 + 4 ] previous->next = next; 2003284: c4 20 40 00 st %g2, [ %g1 ] Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2003288: c2 06 a0 58 ld [ %i2 + 0x58 ], %g1 static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 200328c: f4 27 60 08 st %i2, [ %i5 + 8 ] the_node->next = tail; 2003290: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 2003294: fa 26 a0 58 st %i5, [ %i2 + 0x58 ] old_last->next = the_node; 2003298: fa 20 40 00 st %i5, [ %g1 ] the_node->previous = old_last; 200329c: c2 27 60 04 st %g1, [ %i5 + 4 ] IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 20032a0: 90 07 bf f8 add %fp, -8, %o0 20032a4: 40 00 01 90 call 20038e4 20032a8: 92 10 20 00 clr %o1 20032ac: c2 07 bf f8 ld [ %fp + -8 ], %g1 20032b0: c2 27 60 48 st %g1, [ %i5 + 0x48 ] const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 20032b4: 81 c7 e0 08 ret 20032b8: 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; 20032bc: 40 00 31 31 call 200f780 <__errno> <== NOT EXECUTED 20032c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20032c4: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 20032c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20032cc: 81 c7 e0 08 ret <== NOT EXECUTED 20032d0: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 20032d4: 40 00 31 2b call 200f780 <__errno> <== NOT EXECUTED 20032d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20032dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20032e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 20032e4: 81 c7 e0 08 ret <== NOT EXECUTED 20032e8: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020033e8 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 20033e8: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 20033ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 20033f0: 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; 20033f4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2 if ( IMFS_is_directory( node ) ) { 20033f8: c4 00 80 00 ld [ %g2 ], %g2 20033fc: 80 a0 a0 00 cmp %g2, 0 2003400: 12 80 00 0f bne 200343c <== NEVER TAKEN 2003404: 01 00 00 00 nop if ( node->info.directory.mt_fs == mt_entry ) { 2003408: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 200340c: 80 a0 80 18 cmp %g2, %i0 2003410: 12 80 00 05 bne 2003424 <== NEVER TAKEN 2003414: 01 00 00 00 nop node->info.directory.mt_fs = NULL; 2003418: c0 20 60 5c clr [ %g1 + 0x5c ] #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 200341c: 81 c7 e0 08 ret 2003420: 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; 2003424: 40 00 30 d7 call 200f780 <__errno> <== NOT EXECUTED 2003428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200342c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003430: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003434: 81 c7 e0 08 ret <== NOT EXECUTED 2003438: 81 e8 00 00 restore <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 200343c: 40 00 30 d1 call 200f780 <__errno> <== NOT EXECUTED 2003440: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003444: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2003448: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 200344c: 81 c7 e0 08 ret <== NOT EXECUTED 2003450: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02003b08 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 2003b08: 9d e3 bf a0 save %sp, -96, %sp bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b0c: 3b 00 80 71 sethi %hi(0x201c400), %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b10: 03 00 80 73 sethi %hi(0x201cc00), %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b14: ba 17 62 4c or %i5, 0x24c, %i5 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b18: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { bool separate_areas = !rtems_configuration_get_unified_work_area(); 2003b1c: f6 0f 60 31 ldub [ %i5 + 0x31 ], %i3 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2003b20: 80 a0 60 00 cmp %g1, 0 2003b24: 02 80 00 05 be 2003b38 2003b28: b6 1e e0 01 xor %i3, 1, %i3 (*rtems_malloc_statistics_helpers->initialize)(); 2003b2c: c2 00 40 00 ld [ %g1 ], %g1 2003b30: 9f c0 40 00 call %g1 2003b34: 01 00 00 00 nop } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2003b38: 7f ff ff da call 2003aa0 2003b3c: 01 00 00 00 nop /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2003b40: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003b44: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 2003b48: 80 a0 60 00 cmp %g1, 0 2003b4c: 02 80 00 08 be 2003b6c 2003b50: 90 10 00 18 mov %i0, %o0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2003b54: c2 00 40 00 ld [ %g1 ], %g1 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2003b58: b2 06 00 19 add %i0, %i1, %i1 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2003b5c: 9f c0 40 00 call %g1 2003b60: 92 10 00 1a mov %i2, %o1 heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; heap_begin = new_heap_begin; 2003b64: b0 10 00 08 mov %o0, %i0 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2003b68: b2 26 40 08 sub %i1, %o0, %i1 * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) { 2003b6c: 80 8e e0 ff btst 0xff, %i3 2003b70: 02 80 00 0d be 2003ba4 2003b74: 39 00 80 71 sethi %hi(0x201c400), %i4 2003b78: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1 2003b7c: 80 a0 60 00 cmp %g1, 0 2003b80: 12 80 00 11 bne 2003bc4 2003b84: d0 07 23 38 ld [ %i4 + 0x338 ], %o0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 2003b88: 92 10 00 18 mov %i0, %o1 2003b8c: 94 10 00 19 mov %i1, %o2 2003b90: 40 00 14 eb call 2008f3c <_Heap_Initialize> 2003b94: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003b98: 80 a2 20 00 cmp %o0, 0 2003b9c: 02 80 00 17 be 2003bf8 2003ba0: 01 00 00 00 nop rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 2003ba4: 3b 00 80 74 sethi %hi(0x201d000), %i5 2003ba8: d0 07 23 38 ld [ %i4 + 0x338 ], %o0 2003bac: 40 00 17 e5 call 2009b40 <_Protected_heap_Get_size> 2003bb0: f8 07 62 50 ld [ %i5 + 0x250 ], %i4 2003bb4: b8 02 00 1c add %o0, %i4, %i4 2003bb8: f8 27 62 50 st %i4, [ %i5 + 0x250 ] } 2003bbc: 81 c7 e0 08 ret 2003bc0: 81 e8 00 00 restore * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 2003bc4: 92 10 20 00 clr %o1 2003bc8: 94 10 00 19 mov %i1, %o2 2003bcc: 40 00 31 85 call 20101e0 2003bd0: 90 10 00 18 mov %i0, %o0 2003bd4: 39 00 80 71 sethi %hi(0x201c400), %i4 2003bd8: d0 07 23 38 ld [ %i4 + 0x338 ], %o0 ! 201c738 2003bdc: 92 10 00 18 mov %i0, %o1 2003be0: 94 10 00 19 mov %i1, %o2 2003be4: 40 00 14 d6 call 2008f3c <_Heap_Initialize> 2003be8: 96 10 20 08 mov 8, %o3 RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 2003bec: 80 a2 20 00 cmp %o0, 0 2003bf0: 12 bf ff ee bne 2003ba8 <== ALWAYS TAKEN 2003bf4: 3b 00 80 74 sethi %hi(0x201d000), %i5 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003bf8: 40 00 12 0f call 2008434 2003bfc: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 020072ec : static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 20072ec: 9d e3 bf 98 save %sp, -104, %sp /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 20072f0: 80 a6 3f ff cmp %i0, -1 20072f4: 02 80 00 5d be 2007468 20072f8: b6 06 20 b0 add %i0, 0xb0, %i3 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 20072fc: e0 06 21 38 ld [ %i0 + 0x138 ], %l0 2007300: f4 06 20 b4 ld [ %i0 + 0xb4 ], %i2 } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 2007304: f8 06 c0 00 ld [ %i3 ], %i4 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 2007308: 82 06 a0 20 add %i2, 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); 200730c: b8 07 3f f0 add %i4, -16, %i4 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2007310: 86 0f 3f fc and %i4, -4, %g3 2007314: 86 00 40 03 add %g1, %g3, %g3 2007318: 80 a0 40 03 cmp %g1, %g3 200731c: 1a 80 00 12 bcc 2007364 <== NEVER TAKEN 2007320: ba 10 20 00 clr %i5 if (*base != U32_PATTERN) 2007324: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4 2007328: 05 29 69 69 sethi %hi(0xa5a5a400), %g2 200732c: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 2007330: 80 a1 00 02 cmp %g4, %g2 2007334: 22 80 00 08 be,a 2007354 <== ALWAYS TAKEN 2007338: 82 00 60 04 add %g1, 4, %g1 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 ) 200733c: 10 80 00 36 b 2007414 <== NOT EXECUTED 2007340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 2007344: 80 a0 80 04 cmp %g2, %g4 2007348: 12 80 00 32 bne 2007410 200734c: ba 10 20 00 clr %i5 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 2007350: 82 00 60 04 add %g1, 4, %g1 2007354: 80 a0 c0 01 cmp %g3, %g1 2007358: 38 bf ff fb bgu,a 2007344 <== ALWAYS TAKEN 200735c: c4 00 40 00 ld [ %g1 ], %g2 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; 2007360: ba 10 20 00 clr %i5 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2007364: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2007368: 02 80 00 32 be 2007430 <== NOT EXECUTED 200736c: 33 00 81 c4 sethi %hi(0x2071000), %i1 <== NOT EXECUTED #endif { (*print_handler)( 2007370: e2 06 20 08 ld [ %i0 + 8 ], %l1 2007374: 35 00 81 c4 sethi %hi(0x2071000), %i2 2007378: 33 00 81 c4 sethi %hi(0x2071000), %i1 200737c: e4 06 a0 7c ld [ %i2 + 0x7c ], %l2 2007380: f0 06 60 80 ld [ %i1 + 0x80 ], %i0 2007384: 94 07 bf f8 add %fp, -8, %o2 2007388: 92 10 20 05 mov 5, %o1 200738c: 40 00 19 3b call 200d878 2007390: 90 10 00 11 mov %l1, %o0 2007394: 13 00 81 8f sethi %hi(0x2063c00), %o1 2007398: 96 10 00 08 mov %o0, %o3 200739c: 94 10 00 11 mov %l1, %o2 20073a0: 90 10 00 12 mov %l2, %o0 20073a4: 9f c6 00 00 call %i0 20073a8: 92 12 61 60 or %o1, 0x160, %o1 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20073ac: d4 06 e0 04 ld [ %i3 + 4 ], %o2 20073b0: d6 06 c0 00 ld [ %i3 ], %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073b4: c2 06 60 80 ld [ %i1 + 0x80 ], %g1 20073b8: d0 06 a0 7c ld [ %i2 + 0x7c ], %o0 print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 20073bc: 96 02 ff ff add %o3, -1, %o3 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073c0: 13 00 81 8f sethi %hi(0x2063c00), %o1 20073c4: 96 02 80 0b add %o2, %o3, %o3 20073c8: 92 12 61 80 or %o1, 0x180, %o1 20073cc: 98 10 00 10 mov %l0, %o4 20073d0: 9f c0 40 00 call %g1 20073d4: 9a 10 00 1c mov %i4, %o5 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073d8: 03 00 81 c4 sethi %hi(0x2071000), %g1 20073dc: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 2071078 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 20073e0: 07 00 81 c4 sethi %hi(0x2071000), %g3 20073e4: 05 00 81 c4 sethi %hi(0x2071000), %g2 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073e8: 80 a0 60 00 cmp %g1, 0 (*print_handler)( print_context, "Unavailable\n" ); 20073ec: d0 00 a0 7c ld [ %g2 + 0x7c ], %o0 stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 20073f0: 02 80 00 19 be 2007454 <== NEVER TAKEN 20073f4: c2 00 e0 80 ld [ %g3 + 0x80 ], %g1 (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 20073f8: 94 10 00 1d mov %i5, %o2 20073fc: 13 00 81 8f sethi %hi(0x2063c00), %o1 2007400: 9f c0 40 00 call %g1 2007404: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 2063db0 2007408: 81 c7 e0 08 ret 200740c: 81 e8 00 00 restore 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 ) 2007410: 80 a0 60 00 cmp %g1, 0 2007414: 02 bf ff d4 be 2007364 <== NEVER TAKEN 2007418: 80 a6 20 00 cmp %i0, 0 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 200741c: ba 06 a0 10 add %i2, 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 ); 2007420: ba 07 40 1c add %i5, %i4, %i5 else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 2007424: 12 bf ff d3 bne 2007370 2007428: ba 27 40 01 sub %i5, %g1, %i5 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 ); 200742c: 33 00 81 c4 sethi %hi(0x2071000), %i1 2007430: 35 00 81 c4 sethi %hi(0x2071000), %i2 2007434: c2 06 60 80 ld [ %i1 + 0x80 ], %g1 2007438: d0 06 a0 7c ld [ %i2 + 0x7c ], %o0 200743c: 94 10 3f ff mov -1, %o2 2007440: 13 00 81 8f sethi %hi(0x2063c00), %o1 2007444: 9f c0 40 00 call %g1 2007448: 92 12 61 70 or %o1, 0x170, %o1 ! 2063d70 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 200744c: 10 bf ff d9 b 20073b0 2007450: d4 06 e0 04 ld [ %i3 + 4 ], %o2 current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 2007454: 13 00 81 8f sethi %hi(0x2063c00), %o1 <== NOT EXECUTED 2007458: 9f c0 40 00 call %g1 <== NOT EXECUTED 200745c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 2063da0 <== NOT EXECUTED 2007460: 81 c7 e0 08 ret <== NOT EXECUTED 2007464: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 2007468: 37 00 81 cf sethi %hi(0x2073c00), %i3 200746c: b6 16 e1 e4 or %i3, 0x1e4, %i3 ! 2073de4 2007470: f4 06 e0 04 ld [ %i3 + 4 ], %i2 return; stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; 2007474: 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) 2007478: 80 a6 a0 00 cmp %i2, 0 200747c: 12 bf ff a2 bne 2007304 <== ALWAYS TAKEN 2007480: b0 10 20 00 clr %i0 2007484: 81 c7 e0 08 ret <== NOT EXECUTED 2007488: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02007584 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 2007584: 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"); 2007588: 11 00 81 8f sethi %hi(0x2063c00), %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); 200758c: fa 06 20 b4 ld [ %i0 + 0xb4 ], %i5 char name[32]; printk("BLOWN STACK!!!\n"); 2007590: 40 00 0a 9d call 200a004 2007594: 90 12 21 b8 or %o0, 0x1b8, %o0 printk("task control block: 0x%08" PRIxPTR "\n", running); 2007598: 92 10 00 18 mov %i0, %o1 200759c: 11 00 81 8f sethi %hi(0x2063c00), %o0 20075a0: 40 00 0a 99 call 200a004 20075a4: 90 12 21 c8 or %o0, 0x1c8, %o0 ! 2063dc8 printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 20075a8: d2 06 20 08 ld [ %i0 + 8 ], %o1 20075ac: 11 00 81 8f sethi %hi(0x2063c00), %o0 20075b0: 40 00 0a 95 call 200a004 20075b4: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 2063de8 printk( 20075b8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 20075bc: 11 00 81 8f sethi %hi(0x2063c00), %o0 20075c0: 40 00 0a 91 call 200a004 20075c4: 90 12 22 00 or %o0, 0x200, %o0 ! 2063e00 "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 20075c8: d0 06 20 08 ld [ %i0 + 8 ], %o0 20075cc: 94 07 bf e0 add %fp, -32, %o2 20075d0: 40 00 18 aa call 200d878 20075d4: 92 10 20 20 mov 0x20, %o1 20075d8: 92 10 00 08 mov %o0, %o1 20075dc: 11 00 81 8f sethi %hi(0x2063c00), %o0 20075e0: 40 00 0a 89 call 200a004 20075e4: 90 12 22 18 or %o0, 0x218, %o0 ! 2063e18 ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 20075e8: d4 06 20 b4 ld [ %i0 + 0xb4 ], %o2 20075ec: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1 ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 20075f0: 11 00 81 8f sethi %hi(0x2063c00), %o0 20075f4: 96 02 80 09 add %o2, %o1, %o3 20075f8: 40 00 0a 83 call 200a004 20075fc: 90 12 22 30 or %o0, 0x230, %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) { 2007600: 80 a6 60 00 cmp %i1, 0 2007604: 02 80 00 04 be 2007614 <== ALWAYS TAKEN 2007608: 92 10 20 10 mov 0x10, %o1 rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 200760c: 40 00 1b 7c call 200e3fc 2007610: 90 10 20 81 mov 0x81, %o0 (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 2007614: 11 00 81 8f sethi %hi(0x2063c00), %o0 2007618: 94 07 60 08 add %i5, 8, %o2 200761c: 90 12 22 68 or %o0, 0x268, %o0 2007620: 40 00 0a 79 call 200a004 2007624: 96 07 60 18 add %i5, 0x18, %o3 2007628: 30 bf ff f9 b,a 200760c =============================================================================== 02008608 <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2008608: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200860c: 39 00 80 75 sethi %hi(0x201d400), %i4 2008610: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List> 2008614: b8 17 21 a4 or %i4, 0x1a4, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2008618: b8 07 20 04 add %i4, 4, %i4 200861c: 80 a7 40 1c cmp %i5, %i4 2008620: 02 80 00 09 be 2008644 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN 2008624: 01 00 00 00 nop * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 2008628: c2 07 60 08 ld [ %i5 + 8 ], %g1 200862c: 9f c0 40 00 call %g1 2008630: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 2008634: fa 07 40 00 ld [ %i5 ], %i5 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2008638: 80 a7 40 1c cmp %i5, %i4 200863c: 32 bf ff fc bne,a 200862c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN 2008640: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED 2008644: 81 c7 e0 08 ret 2008648: 81 e8 00 00 restore =============================================================================== 0200864c <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 200864c: 9d e3 bf a0 save %sp, -96, %sp 2008650: 39 00 80 75 sethi %hi(0x201d400), %i4 2008654: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List> 2008658: b8 17 21 a4 or %i4, 0x1a4, %i4 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 200865c: b8 07 20 04 add %i4, 4, %i4 2008660: 80 a7 40 1c cmp %i5, %i4 2008664: 02 80 00 0a be 200868c <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN 2008668: 37 00 80 75 sethi %hi(0x201d400), %i3 200866c: b6 16 e1 e0 or %i3, 0x1e0, %i3 ! 201d5e0 <_Per_CPU_Information> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 2008670: c2 07 60 0c ld [ %i5 + 0xc ], %g1 2008674: 9f c0 40 00 call %g1 2008678: d0 06 e0 0c ld [ %i3 + 0xc ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 200867c: fa 07 40 00 ld [ %i5 ], %i5 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 2008680: 80 a7 40 1c cmp %i5, %i4 2008684: 32 bf ff fc bne,a 2008674 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN 2008688: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED 200868c: 81 c7 e0 08 ret 2008690: 81 e8 00 00 restore =============================================================================== 02011998 <_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 ) { 2011998: 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; the_message_queue->number_of_pending_messages = 0; 201199c: c0 26 20 48 clr [ %i0 + 0x48 ] ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 20119a0: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 20119a4: f6 26 20 4c st %i3, [ %i0 + 0x4c ] /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 20119a8: 80 8e e0 03 btst 3, %i3 20119ac: 02 80 00 0a be 20119d4 <_CORE_message_queue_Initialize+0x3c> 20119b0: b8 10 00 1b mov %i3, %i4 allocated_message_size += sizeof(uint32_t); 20119b4: b8 06 e0 04 add %i3, 4, %i4 allocated_message_size &= ~(sizeof(uint32_t) - 1); 20119b8: b8 0f 3f fc and %i4, -4, %i4 } if (allocated_message_size < maximum_message_size) 20119bc: 80 a6 c0 1c cmp %i3, %i4 20119c0: 08 80 00 05 bleu 20119d4 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN 20119c4: ba 10 20 00 clr %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 20119c8: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED 20119cc: 81 c7 e0 08 ret 20119d0: 81 e8 00 00 restore /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 20119d4: b8 07 20 10 add %i4, 0x10, %i4 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 20119d8: 90 10 20 00 clr %o0 20119dc: 92 10 00 1a mov %i2, %o1 20119e0: 94 10 20 00 clr %o2 20119e4: 96 10 00 1c mov %i4, %o3 20119e8: 40 00 41 60 call 2021f68 <__muldi3> 20119ec: ba 10 20 00 clr %i5 if ( x > SIZE_MAX ) 20119f0: 80 a2 20 00 cmp %o0, 0 20119f4: 34 bf ff f6 bg,a 20119cc <_CORE_message_queue_Initialize+0x34> 20119f8: b0 0f 60 01 and %i5, 1, %i0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 20119fc: 40 00 0c a7 call 2014c98 <_Workspace_Allocate> 2011a00: 90 10 00 09 mov %o1, %o0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 2011a04: d0 26 20 5c st %o0, [ %i0 + 0x5c ] _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 2011a08: 80 a2 20 00 cmp %o0, 0 2011a0c: 02 bf ff ef be 20119c8 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN 2011a10: 92 10 00 08 mov %o0, %o1 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 2011a14: 90 06 20 60 add %i0, 0x60, %o0 2011a18: 94 10 00 1a mov %i2, %o2 2011a1c: 7f ff ff c5 call 2011930 <_Chain_Initialize> 2011a20: 96 10 00 1c mov %i4, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 2011a24: c4 06 40 00 ld [ %i1 ], %g2 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 ); 2011a28: 82 06 20 50 add %i0, 0x50, %g1 2011a2c: 84 18 a0 01 xor %g2, 1, %g2 2011a30: 80 a0 00 02 cmp %g0, %g2 2011a34: 84 06 20 54 add %i0, 0x54, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2011a38: c2 26 20 58 st %g1, [ %i0 + 0x58 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2011a3c: c4 26 20 50 st %g2, [ %i0 + 0x50 ] 2011a40: 90 10 00 18 mov %i0, %o0 head->previous = NULL; 2011a44: c0 26 20 54 clr [ %i0 + 0x54 ] 2011a48: 92 60 3f ff subx %g0, -1, %o1 2011a4c: 94 10 20 80 mov 0x80, %o2 2011a50: 96 10 20 06 mov 6, %o3 2011a54: 40 00 0a 3a call 201433c <_Thread_queue_Initialize> 2011a58: ba 10 20 01 mov 1, %i5 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 2011a5c: b0 0f 60 01 and %i5, 1, %i0 2011a60: 81 c7 e0 08 ret 2011a64: 81 e8 00 00 restore =============================================================================== 02008bf0 <_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 ) { 2008bf0: 9d e3 bf a0 save %sp, -96, %sp 2008bf4: ba 10 00 18 mov %i0, %i5 Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008bf8: b0 10 20 00 clr %i0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 2008bfc: 40 00 07 c9 call 200ab20 <_Thread_queue_Dequeue> 2008c00: 90 10 00 1d mov %i5, %o0 2008c04: 80 a2 20 00 cmp %o0, 0 2008c08: 02 80 00 04 be 2008c18 <_CORE_semaphore_Surrender+0x28> 2008c0c: 01 00 00 00 nop status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 2008c10: 81 c7 e0 08 ret 2008c14: 81 e8 00 00 restore if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 2008c18: 7f ff e6 a8 call 20026b8 2008c1c: 01 00 00 00 nop if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 2008c20: c2 07 60 48 ld [ %i5 + 0x48 ], %g1 2008c24: c4 07 60 40 ld [ %i5 + 0x40 ], %g2 2008c28: 80 a0 40 02 cmp %g1, %g2 2008c2c: 1a 80 00 05 bcc 2008c40 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN 2008c30: b0 10 20 04 mov 4, %i0 the_semaphore->count += 1; 2008c34: 82 00 60 01 inc %g1 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 2008c38: b0 10 20 00 clr %i0 #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 2008c3c: c2 27 60 48 st %g1, [ %i5 + 0x48 ] else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 2008c40: 7f ff e6 a2 call 20026c8 2008c44: 01 00 00 00 nop } return status; } 2008c48: 81 c7 e0 08 ret 2008c4c: 81 e8 00 00 restore =============================================================================== 020087e0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 20087e0: 9d e3 bf a0 save %sp, -96, %sp Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 20087e4: c0 26 20 04 clr [ %i0 + 4 ] size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 20087e8: ba 06 20 04 add %i0, 4, %i5 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 20087ec: 80 a6 a0 00 cmp %i2, 0 20087f0: 02 80 00 12 be 2008838 <_Chain_Initialize+0x58> <== NEVER TAKEN 20087f4: 90 10 00 18 mov %i0, %o0 20087f8: b4 06 bf ff add %i2, -1, %i2 { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 20087fc: 82 10 00 19 mov %i1, %g1 head->previous = NULL; while ( count-- ) { 2008800: 92 10 00 1a mov %i2, %o1 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 2008804: 10 80 00 05 b 2008818 <_Chain_Initialize+0x38> 2008808: 84 10 00 18 mov %i0, %g2 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 200880c: 84 10 00 01 mov %g1, %g2 2008810: b4 06 bf ff add %i2, -1, %i2 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 2008814: 82 10 00 03 mov %g3, %g1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 2008818: c2 20 80 00 st %g1, [ %g2 ] next->previous = current; 200881c: c4 20 60 04 st %g2, [ %g1 + 4 ] Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 2008820: 80 a6 a0 00 cmp %i2, 0 2008824: 12 bf ff fa bne 200880c <_Chain_Initialize+0x2c> 2008828: 86 00 40 1b add %g1, %i3, %g3 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 200882c: 40 00 3f 83 call 2018638 <.umul> 2008830: 90 10 00 1b mov %i3, %o0 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 2008834: 90 06 40 08 add %i1, %o0, %o0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 2008838: fa 22 00 00 st %i5, [ %o0 ] tail->previous = current; 200883c: d0 26 20 08 st %o0, [ %i0 + 8 ] } 2008840: 81 c7 e0 08 ret 2008844: 81 e8 00 00 restore =============================================================================== 0200788c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 200788c: 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 ]; 2007890: fa 06 21 50 ld [ %i0 + 0x150 ], %i5 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 2007894: 7f ff eb 89 call 20026b8 2007898: f8 06 20 30 ld [ %i0 + 0x30 ], %i4 pending_events = api->pending_events; 200789c: c4 07 40 00 ld [ %i5 ], %g2 event_condition = (rtems_event_set) the_thread->Wait.count; 20078a0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 20078a4: 86 88 40 02 andcc %g1, %g2, %g3 20078a8: 02 80 00 39 be 200798c <_Event_Surrender+0x100> 20078ac: 09 00 80 75 sethi %hi(0x201d400), %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() && 20078b0: 88 11 21 e0 or %g4, 0x1e0, %g4 ! 201d5e0 <_Per_CPU_Information> 20078b4: f2 01 20 08 ld [ %g4 + 8 ], %i1 20078b8: 80 a6 60 00 cmp %i1, 0 20078bc: 32 80 00 1c bne,a 200792c <_Event_Surrender+0xa0> 20078c0: c8 01 20 0c ld [ %g4 + 0xc ], %g4 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 20078c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 20078c8: 80 89 21 00 btst 0x100, %g4 20078cc: 02 80 00 30 be 200798c <_Event_Surrender+0x100> 20078d0: 80 a0 40 03 cmp %g1, %g3 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 20078d4: 02 80 00 04 be 20078e4 <_Event_Surrender+0x58> 20078d8: 80 8f 20 02 btst 2, %i4 20078dc: 02 80 00 2c be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN 20078e0: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20078e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 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) ); 20078e8: 84 28 80 03 andn %g2, %g3, %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 ); 20078ec: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 20078f0: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 20078f4: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 20078f8: 7f ff eb 74 call 20026c8 20078fc: 01 00 00 00 nop 2007900: 7f ff eb 6e call 20026b8 2007904: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2007908: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200790c: 80 a0 60 02 cmp %g1, 2 2007910: 02 80 00 21 be 2007994 <_Event_Surrender+0x108> 2007914: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2007918: 7f ff eb 6c call 20026c8 200791c: 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 ); 2007920: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2007924: 40 00 0a af call 200a3e0 <_Thread_Clear_state> 2007928: 81 e8 00 00 restore /* * 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() && 200792c: 80 a6 00 04 cmp %i0, %g4 2007930: 32 bf ff e6 bne,a 20078c8 <_Event_Surrender+0x3c> 2007934: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 2007938: 09 00 80 75 sethi %hi(0x201d400), %g4 200793c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1 ! 201d640 <_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 ) && 2007940: 80 a6 60 02 cmp %i1, 2 2007944: 02 80 00 07 be 2007960 <_Event_Surrender+0xd4> <== NEVER TAKEN 2007948: 80 a0 40 03 cmp %g1, %g3 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 200794c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1 * 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) || 2007950: 80 a6 60 01 cmp %i1, 1 2007954: 32 bf ff dd bne,a 20078c8 <_Event_Surrender+0x3c> 2007958: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 200795c: 80 a0 40 03 cmp %g1, %g3 2007960: 02 80 00 04 be 2007970 <_Event_Surrender+0xe4> 2007964: 80 8f 20 02 btst 2, %i4 2007968: 02 80 00 09 be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN 200796c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007970: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 2007974: 84 28 80 03 andn %g2, %g3, %g2 if ( _ISR_Is_in_progress() && _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 ); 2007978: c4 27 40 00 st %g2, [ %i5 ] the_thread->Wait.count = 0; 200797c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2007980: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2007984: 82 10 20 03 mov 3, %g1 2007988: c2 21 22 40 st %g1, [ %g4 + 0x240 ] _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200798c: 7f ff eb 4f call 20026c8 2007990: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 2007994: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 2007998: 7f ff eb 4c call 20026c8 200799c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 20079a0: 40 00 0f 5b call 200b70c <_Watchdog_Remove> 20079a4: 90 06 20 48 add %i0, 0x48, %o0 20079a8: b2 16 63 f8 or %i1, 0x3f8, %i1 20079ac: 40 00 0a 8d call 200a3e0 <_Thread_Clear_state> 20079b0: 81 e8 00 00 restore =============================================================================== 020079b4 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 20079b4: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 20079b8: 90 10 00 18 mov %i0, %o0 20079bc: 40 00 0b 88 call 200a7dc <_Thread_Get> 20079c0: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 20079c4: c2 07 bf fc ld [ %fp + -4 ], %g1 20079c8: 80 a0 60 00 cmp %g1, 0 20079cc: 12 80 00 16 bne 2007a24 <_Event_Timeout+0x70> <== NEVER TAKEN 20079d0: 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 ); 20079d4: 7f ff eb 39 call 20026b8 20079d8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 20079dc: 03 00 80 75 sethi %hi(0x201d400), %g1 return; } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 20079e0: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 201d5ec <_Per_CPU_Information+0xc> 20079e4: 80 a7 40 01 cmp %i5, %g1 20079e8: 02 80 00 11 be 2007a2c <_Event_Timeout+0x78> 20079ec: c0 27 60 24 clr [ %i5 + 0x24 ] if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20079f0: 82 10 20 06 mov 6, %g1 20079f4: c2 27 60 34 st %g1, [ %i5 + 0x34 ] _ISR_Enable( level ); 20079f8: 7f ff eb 34 call 20026c8 20079fc: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2007a00: 90 10 00 1d mov %i5, %o0 2007a04: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2007a08: 40 00 0a 76 call 200a3e0 <_Thread_Clear_state> 2007a0c: 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--; 2007a10: 03 00 80 74 sethi %hi(0x201d000), %g1 2007a14: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level> 2007a18: 84 00 bf ff add %g2, -1, %g2 2007a1c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] return _Thread_Dispatch_disable_level; 2007a20: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 2007a24: 81 c7 e0 08 ret 2007a28: 81 e8 00 00 restore } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 2007a2c: 03 00 80 75 sethi %hi(0x201d400), %g1 2007a30: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201d640 <_Event_Sync_state> 2007a34: 80 a0 a0 01 cmp %g2, 1 2007a38: 32 bf ff ef bne,a 20079f4 <_Event_Timeout+0x40> 2007a3c: 82 10 20 06 mov 6, %g1 _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 2007a40: 84 10 20 02 mov 2, %g2 2007a44: c4 20 62 40 st %g2, [ %g1 + 0x240 ] } the_thread->Wait.return_code = RTEMS_TIMEOUT; 2007a48: 10 bf ff eb b 20079f4 <_Event_Timeout+0x40> 2007a4c: 82 10 20 06 mov 6, %g1 =============================================================================== 0200d768 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 200d768: 9d e3 bf 98 save %sp, -104, %sp 200d76c: ba 10 00 18 mov %i0, %i5 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 200d770: a0 06 60 04 add %i1, 4, %l0 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 200d774: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 200d778: 80 a6 40 10 cmp %i1, %l0 200d77c: 18 80 00 23 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0> 200d780: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 200d784: 80 a6 e0 00 cmp %i3, 0 200d788: 12 80 00 7d bne 200d97c <_Heap_Allocate_aligned_with_boundary+0x214> 200d78c: 80 a6 40 1b cmp %i1, %i3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200d790: e2 07 60 08 ld [ %i5 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200d794: 80 a7 40 11 cmp %i5, %l1 200d798: 02 80 00 18 be 200d7f8 <_Heap_Allocate_aligned_with_boundary+0x90> 200d79c: b8 10 20 00 clr %i4 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200d7a0: 82 05 a0 07 add %l6, 7, %g1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200d7a4: ae 10 20 04 mov 4, %l7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200d7a8: c2 27 bf fc st %g1, [ %fp + -4 ] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 200d7ac: 10 80 00 0b b 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70> 200d7b0: ae 25 c0 19 sub %l7, %i1, %l7 * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { if ( alignment == 0 ) { 200d7b4: 12 80 00 17 bne 200d810 <_Heap_Allocate_aligned_with_boundary+0xa8> 200d7b8: b0 04 60 08 add %l1, 8, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200d7bc: 80 a6 20 00 cmp %i0, 0 200d7c0: 12 80 00 5b bne 200d92c <_Heap_Allocate_aligned_with_boundary+0x1c4> 200d7c4: b8 07 20 01 inc %i4 break; } block = block->next; 200d7c8: e2 04 60 08 ld [ %l1 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200d7cc: 80 a7 40 11 cmp %i5, %l1 200d7d0: 22 80 00 0b be,a 200d7fc <_Heap_Allocate_aligned_with_boundary+0x94> 200d7d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 200d7d8: e4 04 60 04 ld [ %l1 + 4 ], %l2 200d7dc: 80 a4 00 12 cmp %l0, %l2 200d7e0: 0a bf ff f5 bcs 200d7b4 <_Heap_Allocate_aligned_with_boundary+0x4c> 200d7e4: 80 a6 a0 00 cmp %i2, 0 if ( alloc_begin != 0 ) { break; } block = block->next; 200d7e8: e2 04 60 08 ld [ %l1 + 8 ], %l1 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 200d7ec: 80 a7 40 11 cmp %i5, %l1 200d7f0: 12 bf ff fa bne 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70> 200d7f4: b8 07 20 01 inc %i4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200d7f8: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200d7fc: 80 a0 40 1c cmp %g1, %i4 200d800: 0a 80 00 5a bcs 200d968 <_Heap_Allocate_aligned_with_boundary+0x200> 200d804: b0 10 20 00 clr %i0 stats->max_search = search_count; } return (void *) alloc_begin; } 200d808: 81 c7 e0 08 ret 200d80c: 81 e8 00 00 restore uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200d810: c4 07 bf fc ld [ %fp + -4 ], %g2 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 200d814: ea 07 60 14 ld [ %i5 + 0x14 ], %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; 200d818: a4 0c bf fe and %l2, -2, %l2 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 200d81c: 82 20 80 15 sub %g2, %l5, %g1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 200d820: a4 04 40 12 add %l1, %l2, %l2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d824: 92 10 00 1a mov %i2, %o1 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 200d828: b0 05 c0 12 add %l7, %l2, %i0 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 200d82c: a4 00 40 12 add %g1, %l2, %l2 200d830: 40 00 2c 68 call 20189d0 <.urem> 200d834: 90 10 00 18 mov %i0, %o0 200d838: b0 26 00 08 sub %i0, %o0, %i0 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 200d83c: 80 a4 80 18 cmp %l2, %i0 200d840: 1a 80 00 06 bcc 200d858 <_Heap_Allocate_aligned_with_boundary+0xf0> 200d844: a8 04 60 08 add %l1, 8, %l4 200d848: 90 10 00 12 mov %l2, %o0 200d84c: 40 00 2c 61 call 20189d0 <.urem> 200d850: 92 10 00 1a mov %i2, %o1 200d854: b0 24 80 08 sub %l2, %o0, %i0 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 200d858: 80 a6 e0 00 cmp %i3, 0 200d85c: 02 80 00 24 be 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184> 200d860: 80 a5 00 18 cmp %l4, %i0 /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 200d864: a4 06 00 19 add %i0, %i1, %l2 200d868: 92 10 00 1b mov %i3, %o1 200d86c: 40 00 2c 59 call 20189d0 <.urem> 200d870: 90 10 00 12 mov %l2, %o0 200d874: 90 24 80 08 sub %l2, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200d878: 80 a6 00 08 cmp %i0, %o0 200d87c: 1a 80 00 1b bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180> 200d880: 80 a2 00 12 cmp %o0, %l2 200d884: 1a 80 00 1a bcc 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184> 200d888: 80 a5 00 18 cmp %l4, %i0 alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 200d88c: a6 05 00 19 add %l4, %i1, %l3 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 200d890: 80 a4 c0 08 cmp %l3, %o0 200d894: 08 80 00 08 bleu 200d8b4 <_Heap_Allocate_aligned_with_boundary+0x14c> 200d898: b0 10 20 00 clr %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200d89c: 10 bf ff c9 b 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58> 200d8a0: 80 a6 20 00 cmp %i0, 0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200d8a4: 1a 80 00 11 bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180> 200d8a8: 80 a4 c0 08 cmp %l3, %o0 if ( boundary_line < boundary_floor ) { 200d8ac: 18 bf ff c4 bgu 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN 200d8b0: b0 10 20 00 clr %i0 return 0; } alloc_begin = boundary_line - alloc_size; 200d8b4: b0 22 00 19 sub %o0, %i1, %i0 200d8b8: 92 10 00 1a mov %i2, %o1 200d8bc: 40 00 2c 45 call 20189d0 <.urem> 200d8c0: 90 10 00 18 mov %i0, %o0 200d8c4: 92 10 00 1b mov %i3, %o1 200d8c8: b0 26 00 08 sub %i0, %o0, %i0 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 200d8cc: a4 06 00 19 add %i0, %i1, %l2 200d8d0: 40 00 2c 40 call 20189d0 <.urem> 200d8d4: 90 10 00 12 mov %l2, %o0 200d8d8: 90 24 80 08 sub %l2, %o0, %o0 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 200d8dc: 80 a2 00 12 cmp %o0, %l2 200d8e0: 0a bf ff f1 bcs 200d8a4 <_Heap_Allocate_aligned_with_boundary+0x13c> 200d8e4: 80 a6 00 08 cmp %i0, %o0 boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 200d8e8: 80 a5 00 18 cmp %l4, %i0 200d8ec: 18 80 00 22 bgu 200d974 <_Heap_Allocate_aligned_with_boundary+0x20c> 200d8f0: 82 10 3f f8 mov -8, %g1 200d8f4: 90 10 00 18 mov %i0, %o0 200d8f8: a4 20 40 11 sub %g1, %l1, %l2 200d8fc: 92 10 00 16 mov %l6, %o1 200d900: 40 00 2c 34 call 20189d0 <.urem> 200d904: a4 04 80 18 add %l2, %i0, %l2 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; if ( free_size >= min_block_size || free_size == 0 ) { 200d908: 90 a4 80 08 subcc %l2, %o0, %o0 200d90c: 02 bf ff ad be 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58> 200d910: 80 a6 20 00 cmp %i0, 0 200d914: 80 a2 00 15 cmp %o0, %l5 return alloc_begin; } } return 0; 200d918: 82 40 3f ff addx %g0, -1, %g1 200d91c: b0 0e 00 01 and %i0, %g1, %i0 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 200d920: 80 a6 20 00 cmp %i0, 0 200d924: 02 bf ff a9 be 200d7c8 <_Heap_Allocate_aligned_with_boundary+0x60> 200d928: b8 07 20 01 inc %i4 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200d92c: c4 07 60 48 ld [ %i5 + 0x48 ], %g2 stats->searches += search_count; 200d930: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200d934: 84 00 a0 01 inc %g2 stats->searches += search_count; 200d938: 82 00 40 1c add %g1, %i4, %g1 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 200d93c: c4 27 60 48 st %g2, [ %i5 + 0x48 ] stats->searches += search_count; 200d940: c2 27 60 4c st %g1, [ %i5 + 0x4c ] block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 200d944: 90 10 00 1d mov %i5, %o0 200d948: 92 10 00 11 mov %l1, %o1 200d94c: 94 10 00 18 mov %i0, %o2 200d950: 7f ff ed cf call 200908c <_Heap_Block_allocate> 200d954: 96 10 00 19 mov %i1, %o3 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 200d958: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 200d95c: 80 a0 40 1c cmp %g1, %i4 200d960: 1a 80 00 03 bcc 200d96c <_Heap_Allocate_aligned_with_boundary+0x204> 200d964: 01 00 00 00 nop stats->max_search = search_count; 200d968: f8 27 60 44 st %i4, [ %i5 + 0x44 ] } return (void *) alloc_begin; } 200d96c: 81 c7 e0 08 ret 200d970: 81 e8 00 00 restore if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 200d974: 10 bf ff 92 b 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54> 200d978: b0 10 20 00 clr %i0 /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 200d97c: 18 bf ff a3 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0> 200d980: 80 a6 a0 00 cmp %i2, 0 return NULL; } if ( alignment == 0 ) { 200d984: 22 bf ff 83 be,a 200d790 <_Heap_Allocate_aligned_with_boundary+0x28> 200d988: b4 10 00 16 mov %l6, %i2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200d98c: 10 bf ff 82 b 200d794 <_Heap_Allocate_aligned_with_boundary+0x2c> 200d990: e2 07 60 08 ld [ %i5 + 8 ], %l1 =============================================================================== 0200d9a8 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 200d9a8: 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; 200d9ac: c0 27 bf f8 clr [ %fp + -8 ] Heap_Block *extend_last_block = NULL; 200d9b0: 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; 200d9b4: 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; 200d9b8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 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; 200d9bc: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 200d9c0: 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; 200d9c4: 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 ) { 200d9c8: 80 a6 40 1d cmp %i1, %i5 200d9cc: 08 80 00 05 bleu 200d9e0 <_Heap_Extend+0x38> 200d9d0: a2 10 20 00 clr %l1 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 200d9d4: b0 0c 60 01 and %l1, 1, %i0 200d9d8: 81 c7 e0 08 ret 200d9dc: 81 e8 00 00 restore if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 200d9e0: 90 10 00 19 mov %i1, %o0 200d9e4: 92 10 00 1a mov %i2, %o1 200d9e8: 94 10 00 10 mov %l0, %o2 200d9ec: 98 07 bf f8 add %fp, -8, %o4 200d9f0: 7f ff ed 48 call 2008f10 <_Heap_Get_first_and_last_block> 200d9f4: 9a 07 bf fc add %fp, -4, %o5 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 200d9f8: 80 8a 20 ff btst 0xff, %o0 200d9fc: 02 bf ff f6 be 200d9d4 <_Heap_Extend+0x2c> 200da00: aa 10 20 00 clr %l5 200da04: a2 10 00 1c mov %i4, %l1 200da08: ac 10 20 00 clr %l6 200da0c: a6 10 20 00 clr %l3 200da10: 10 80 00 14 b 200da60 <_Heap_Extend+0xb8> 200da14: a8 10 20 00 clr %l4 return false; } if ( extend_area_end == sub_area_begin ) { merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 200da18: 2a 80 00 02 bcs,a 200da20 <_Heap_Extend+0x78> 200da1c: ac 10 00 11 mov %l1, %l6 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200da20: 90 10 00 1a mov %i2, %o0 200da24: 40 00 2c b2 call 2018cec <.urem> 200da28: 92 10 00 10 mov %l0, %o1 200da2c: 82 06 bf f8 add %i2, -8, %g1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200da30: 80 a6 80 19 cmp %i2, %i1 200da34: 02 80 00 1c be 200daa4 <_Heap_Extend+0xfc> 200da38: 82 20 40 08 sub %g1, %o0, %g1 start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 200da3c: 80 a6 40 1a cmp %i1, %i2 200da40: 38 80 00 02 bgu,a 200da48 <_Heap_Extend+0xa0> 200da44: aa 10 00 01 mov %g1, %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; 200da48: e2 00 60 04 ld [ %g1 + 4 ], %l1 200da4c: a2 0c 7f fe and %l1, -2, %l1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200da50: a2 00 40 11 add %g1, %l1, %l1 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200da54: 80 a7 00 11 cmp %i4, %l1 200da58: 22 80 00 1b be,a 200dac4 <_Heap_Extend+0x11c> 200da5c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 200da60: 80 a4 40 1c cmp %l1, %i4 200da64: 02 80 00 66 be 200dbfc <_Heap_Extend+0x254> 200da68: 82 10 00 11 mov %l1, %g1 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 ( 200da6c: 80 a0 40 1d cmp %g1, %i5 200da70: 0a 80 00 70 bcs 200dc30 <_Heap_Extend+0x288> 200da74: f4 04 40 00 ld [ %l1 ], %i2 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 200da78: 80 a0 40 1d cmp %g1, %i5 200da7c: 12 bf ff e7 bne 200da18 <_Heap_Extend+0x70> 200da80: 80 a7 40 1a cmp %i5, %i2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200da84: 90 10 00 1a mov %i2, %o0 200da88: 40 00 2c 99 call 2018cec <.urem> 200da8c: 92 10 00 10 mov %l0, %o1 200da90: 82 06 bf f8 add %i2, -8, %g1 200da94: a8 10 00 11 mov %l1, %l4 merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 200da98: 80 a6 80 19 cmp %i2, %i1 200da9c: 12 bf ff e8 bne 200da3c <_Heap_Extend+0x94> <== ALWAYS TAKEN 200daa0: 82 20 40 08 sub %g1, %o0, %g1 start_block->prev_size = extend_area_end; 200daa4: fa 24 40 00 st %i5, [ %l1 ] - 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; 200daa8: e2 00 60 04 ld [ %g1 + 4 ], %l1 200daac: a2 0c 7f fe and %l1, -2, %l1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200dab0: a2 00 40 11 add %g1, %l1, %l1 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 200dab4: 80 a7 00 11 cmp %i4, %l1 200dab8: 12 bf ff ea bne 200da60 <_Heap_Extend+0xb8> <== NEVER TAKEN 200dabc: a6 10 00 01 mov %g1, %l3 if ( extend_area_begin < heap->area_begin ) { 200dac0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200dac4: 80 a6 40 01 cmp %i1, %g1 200dac8: 3a 80 00 55 bcc,a 200dc1c <_Heap_Extend+0x274> 200dacc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 heap->area_begin = extend_area_begin; 200dad0: f2 26 20 18 st %i1, [ %i0 + 0x18 ] } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 200dad4: c2 07 bf f8 ld [ %fp + -8 ], %g1 200dad8: c4 07 bf fc ld [ %fp + -4 ], %g2 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 ) { 200dadc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 200dae0: 86 20 80 01 sub %g2, %g1, %g3 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 200dae4: fa 20 40 00 st %i5, [ %g1 ] extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 200dae8: b8 10 e0 01 or %g3, 1, %i4 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 = 200daec: f8 20 60 04 st %i4, [ %g1 + 4 ] extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 200daf0: c6 20 80 00 st %g3, [ %g2 ] 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 ) { 200daf4: 80 a1 00 01 cmp %g4, %g1 200daf8: 08 80 00 43 bleu 200dc04 <_Heap_Extend+0x25c> 200dafc: c0 20 a0 04 clr [ %g2 + 4 ] heap->first_block = extend_first_block; 200db00: c2 26 20 20 st %g1, [ %i0 + 0x20 ] } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200db04: 80 a5 20 00 cmp %l4, 0 200db08: 02 80 00 63 be 200dc94 <_Heap_Extend+0x2ec> 200db0c: 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; 200db10: f8 06 20 10 ld [ %i0 + 0x10 ], %i4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 200db14: 92 10 00 1c mov %i4, %o1 200db18: 40 00 2c 75 call 2018cec <.urem> 200db1c: 90 10 00 19 mov %i1, %o0 if ( remainder != 0 ) { 200db20: 80 a2 20 00 cmp %o0, 0 200db24: 02 80 00 04 be 200db34 <_Heap_Extend+0x18c> 200db28: c4 05 00 00 ld [ %l4 ], %g2 return value - remainder + alignment; 200db2c: b2 06 40 1c add %i1, %i4, %i1 200db30: 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 = 200db34: 82 06 7f f8 add %i1, -8, %g1 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; 200db38: c4 26 7f f8 st %g2, [ %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 = 200db3c: 84 25 00 01 sub %l4, %g1, %g2 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; 200db40: 84 10 a0 01 or %g2, 1, %g2 _Heap_Free_block( heap, new_first_block ); 200db44: 90 10 00 18 mov %i0, %o0 200db48: 92 10 00 01 mov %g1, %o1 200db4c: 7f ff ff 8d call 200d980 <_Heap_Free_block> 200db50: c4 26 7f fc st %g2, [ %i1 + -4 ] link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 200db54: 80 a4 e0 00 cmp %l3, 0 200db58: 02 80 00 3b be 200dc44 <_Heap_Extend+0x29c> 200db5c: 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); 200db60: 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( 200db64: ba 27 40 13 sub %i5, %l3, %i5 200db68: 40 00 2c 61 call 2018cec <.urem> 200db6c: 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) 200db70: c2 04 e0 04 ld [ %l3 + 4 ], %g1 200db74: ba 27 40 08 sub %i5, %o0, %i5 200db78: 82 20 40 1d sub %g1, %i5, %g1 | HEAP_PREV_BLOCK_USED; 200db7c: 82 10 60 01 or %g1, 1, %g1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = 200db80: 84 07 40 13 add %i5, %l3, %g2 200db84: c2 20 a0 04 st %g1, [ %g2 + 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; 200db88: c2 04 e0 04 ld [ %l3 + 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 ); 200db8c: 90 10 00 18 mov %i0, %o0 200db90: 82 08 60 01 and %g1, 1, %g1 200db94: 92 10 00 13 mov %l3, %o1 block->size_and_flag = size | flag; 200db98: ba 17 40 01 or %i5, %g1, %i5 200db9c: 7f ff ff 79 call 200d980 <_Heap_Free_block> 200dba0: fa 24 e0 04 st %i5, [ %l3 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200dba4: 80 a4 e0 00 cmp %l3, 0 200dba8: 02 80 00 34 be 200dc78 <_Heap_Extend+0x2d0> 200dbac: 80 a5 20 00 cmp %l4, 0 */ 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 200dbb0: 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( 200dbb4: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 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; 200dbb8: c8 00 60 04 ld [ %g1 + 4 ], %g4 _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 200dbbc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 200dbc0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 * 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( 200dbc4: ba 27 40 01 sub %i5, %g1, %i5 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; 200dbc8: 88 09 20 01 and %g4, 1, %g4 block->size_and_flag = size | flag; 200dbcc: 88 17 40 04 or %i5, %g4, %g4 200dbd0: c8 20 60 04 st %g4, [ %g1 + 4 ] 200dbd4: a4 20 c0 12 sub %g3, %l2, %l2 /* Statistics */ stats->size += extended_size; 200dbd8: 82 00 80 12 add %g2, %l2, %g1 200dbdc: c2 26 20 2c st %g1, [ %i0 + 0x2c ] if ( extended_size_ptr != NULL ) 200dbe0: 80 a6 e0 00 cmp %i3, 0 200dbe4: 02 bf ff 7c be 200d9d4 <_Heap_Extend+0x2c> <== NEVER TAKEN 200dbe8: a2 10 20 01 mov 1, %l1 *extended_size_ptr = extended_size; 200dbec: e4 26 c0 00 st %l2, [ %i3 ] return true; } 200dbf0: b0 0c 60 01 and %l1, 1, %i0 200dbf4: 81 c7 e0 08 ret 200dbf8: 81 e8 00 00 restore return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 200dbfc: 10 bf ff 9c b 200da6c <_Heap_Extend+0xc4> 200dc00: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 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 ) { heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 200dc04: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200dc08: 80 a0 40 02 cmp %g1, %g2 200dc0c: 2a bf ff be bcs,a 200db04 <_Heap_Extend+0x15c> 200dc10: c4 26 20 24 st %g2, [ %i0 + 0x24 ] heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 200dc14: 10 bf ff bd b 200db08 <_Heap_Extend+0x160> 200dc18: 80 a5 20 00 cmp %l4, 0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 200dc1c: 80 a7 40 01 cmp %i5, %g1 200dc20: 38 bf ff ad bgu,a 200dad4 <_Heap_Extend+0x12c> 200dc24: 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; 200dc28: 10 bf ff ac b 200dad8 <_Heap_Extend+0x130> 200dc2c: c2 07 bf f8 ld [ %fp + -8 ], %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 ( 200dc30: 80 a6 40 1a cmp %i1, %i2 200dc34: 1a bf ff 92 bcc 200da7c <_Heap_Extend+0xd4> 200dc38: 80 a0 40 1d cmp %g1, %i5 sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 200dc3c: 10 bf ff 66 b 200d9d4 <_Heap_Extend+0x2c> 200dc40: a2 10 20 00 clr %l1 ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 200dc44: 80 a5 60 00 cmp %l5, 0 200dc48: 02 bf ff d7 be 200dba4 <_Heap_Extend+0x1fc> 200dc4c: c4 07 bf f8 ld [ %fp + -8 ], %g2 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; 200dc50: c6 05 60 04 ld [ %l5 + 4 ], %g3 _Heap_Link_above( 200dc54: c2 07 bf fc ld [ %fp + -4 ], %g1 200dc58: 86 08 e0 01 and %g3, 1, %g3 ) { 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 ); 200dc5c: 84 20 80 15 sub %g2, %l5, %g2 block->size_and_flag = size | flag; 200dc60: 84 10 80 03 or %g2, %g3, %g2 200dc64: c4 25 60 04 st %g2, [ %l5 + 4 ] last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 200dc68: c4 00 60 04 ld [ %g1 + 4 ], %g2 200dc6c: 84 10 a0 01 or %g2, 1, %g2 200dc70: 10 bf ff cd b 200dba4 <_Heap_Extend+0x1fc> 200dc74: c4 20 60 04 st %g2, [ %g1 + 4 ] extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 200dc78: 32 bf ff cf bne,a 200dbb4 <_Heap_Extend+0x20c> 200dc7c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 _Heap_Free_block( heap, extend_first_block ); 200dc80: d2 07 bf f8 ld [ %fp + -8 ], %o1 200dc84: 7f ff ff 3f call 200d980 <_Heap_Free_block> 200dc88: 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 200dc8c: 10 bf ff ca b 200dbb4 <_Heap_Extend+0x20c> 200dc90: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 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 ) { 200dc94: 80 a5 a0 00 cmp %l6, 0 200dc98: 02 bf ff b0 be 200db58 <_Heap_Extend+0x1b0> 200dc9c: 80 a4 e0 00 cmp %l3, 0 { 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; 200dca0: ac 25 80 02 sub %l6, %g2, %l6 200dca4: 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 = 200dca8: 10 bf ff ac b 200db58 <_Heap_Extend+0x1b0> 200dcac: ec 20 a0 04 st %l6, [ %g2 + 4 ] =============================================================================== 0200d994 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 200d994: 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 ) { 200d998: 80 a6 60 00 cmp %i1, 0 200d99c: 02 80 00 57 be 200daf8 <_Heap_Free+0x164> 200d9a0: 84 10 20 01 mov 1, %g2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d9a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200d9a8: 40 00 2c 0a call 20189d0 <.urem> 200d9ac: 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 200d9b0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200d9b4: 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); 200d9b8: 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; 200d9bc: 80 a7 40 01 cmp %i5, %g1 200d9c0: 0a 80 00 4e bcs 200daf8 <_Heap_Free+0x164> 200d9c4: 84 10 20 00 clr %g2 200d9c8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200d9cc: 80 a7 40 04 cmp %i5, %g4 200d9d0: 38 80 00 4b bgu,a 200dafc <_Heap_Free+0x168> 200d9d4: b0 08 a0 01 and %g2, 1, %i0 - 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; 200d9d8: de 07 60 04 ld [ %i5 + 4 ], %o7 200d9dc: b2 0b ff fe and %o7, -2, %i1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200d9e0: 86 07 40 19 add %i5, %i1, %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; 200d9e4: 80 a0 40 03 cmp %g1, %g3 200d9e8: 38 80 00 45 bgu,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN 200d9ec: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 200d9f0: 80 a1 00 03 cmp %g4, %g3 200d9f4: 2a 80 00 42 bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN 200d9f8: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 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; 200d9fc: da 00 e0 04 ld [ %g3 + 4 ], %o5 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 200da00: 80 8b 60 01 btst 1, %o5 200da04: 02 80 00 3d be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN 200da08: 98 0b 7f fe and %o5, -2, %o4 return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 200da0c: 80 a1 00 03 cmp %g4, %g3 200da10: 02 80 00 06 be 200da28 <_Heap_Free+0x94> 200da14: 9a 10 20 00 clr %o5 200da18: 84 00 c0 0c add %g3, %o4, %g2 200da1c: da 00 a0 04 ld [ %g2 + 4 ], %o5 200da20: 9a 0b 60 01 and %o5, 1, %o5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 200da24: 9a 1b 60 01 xor %o5, 1, %o5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 200da28: 80 8b e0 01 btst 1, %o7 200da2c: 12 80 00 1d bne 200daa0 <_Heap_Free+0x10c> 200da30: 80 8b 60 ff btst 0xff, %o5 uintptr_t const prev_size = block->prev_size; 200da34: d6 07 40 00 ld [ %i5 ], %o3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200da38: 9e 27 40 0b sub %i5, %o3, %o7 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; 200da3c: 80 a0 40 0f cmp %g1, %o7 200da40: 18 80 00 2e bgu 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN 200da44: 84 10 20 00 clr %g2 200da48: 80 a1 00 0f cmp %g4, %o7 200da4c: 2a 80 00 2c bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN 200da50: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED 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; 200da54: c2 03 e0 04 ld [ %o7 + 4 ], %g1 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) ) { 200da58: 80 88 60 01 btst 1, %g1 200da5c: 02 80 00 27 be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN 200da60: 80 8b 60 ff btst 0xff, %o5 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 200da64: 22 80 00 3a be,a 200db4c <_Heap_Free+0x1b8> 200da68: 96 06 40 0b add %i1, %o3, %o3 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 200da6c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 Heap_Block *prev = block->prev; 200da70: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 200da74: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 prev->next = next; 200da78: c2 20 a0 08 st %g1, [ %g2 + 8 ] next->prev = prev; 200da7c: c4 20 60 0c st %g2, [ %g1 + 0xc ] 200da80: 82 00 ff ff add %g3, -1, %g1 200da84: c2 26 20 38 st %g1, [ %i0 + 0x38 ] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 200da88: 98 06 40 0c add %i1, %o4, %o4 200da8c: 96 03 00 0b add %o4, %o3, %o3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200da90: 82 12 e0 01 or %o3, 1, %g1 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 200da94: d6 23 c0 0b st %o3, [ %o7 + %o3 ] 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; 200da98: 10 80 00 0e b 200dad0 <_Heap_Free+0x13c> 200da9c: c2 23 e0 04 st %g1, [ %o7 + 4 ] 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; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 200daa0: 22 80 00 19 be,a 200db04 <_Heap_Free+0x170> 200daa4: c4 06 20 08 ld [ %i0 + 8 ], %g2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 200daa8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 Heap_Block *prev = old_block->prev; 200daac: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 new_block->next = next; 200dab0: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = prev; 200dab4: c2 27 60 0c st %g1, [ %i5 + 0xc ] uintptr_t const size = block_size + next_block_size; 200dab8: 98 03 00 19 add %o4, %i1, %o4 next->prev = new_block; 200dabc: fa 20 a0 0c st %i5, [ %g2 + 0xc ] prev->next = new_block; 200dac0: fa 20 60 08 st %i5, [ %g1 + 8 ] _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 200dac4: 84 13 20 01 or %o4, 1, %g2 next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 200dac8: d8 27 40 0c st %o4, [ %i5 + %o4 ] 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; 200dacc: c4 27 60 04 st %g2, [ %i5 + 4 ] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200dad0: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 ++stats->frees; 200dad4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 stats->free_size += block_size; 200dad8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200dadc: 84 00 bf ff add %g2, -1, %g2 ++stats->frees; 200dae0: 82 00 60 01 inc %g1 stats->free_size += block_size; 200dae4: b2 00 c0 19 add %g3, %i1, %i1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 200dae8: c4 26 20 40 st %g2, [ %i0 + 0x40 ] ++stats->frees; 200daec: c2 26 20 50 st %g1, [ %i0 + 0x50 ] stats->free_size += block_size; 200daf0: f2 26 20 30 st %i1, [ %i0 + 0x30 ] return( true ); 200daf4: 84 10 20 01 mov 1, %g2 } 200daf8: b0 08 a0 01 and %g2, 1, %i0 200dafc: 81 c7 e0 08 ret 200db00: 81 e8 00 00 restore 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; 200db04: 82 16 60 01 or %i1, 1, %g1 200db08: c2 27 60 04 st %g1, [ %i5 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200db0c: c8 00 e0 04 ld [ %g3 + 4 ], %g4 ) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; 200db10: f0 27 60 0c st %i0, [ %i5 + 0xc ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200db14: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 200db18: c4 27 60 08 st %g2, [ %i5 + 8 ] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 200db1c: fa 20 a0 0c st %i5, [ %g2 + 0xc ] } 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; 200db20: 84 09 3f fe and %g4, -2, %g2 next_block->prev_size = block_size; 200db24: f2 27 40 19 st %i1, [ %i5 + %i1 ] } 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; 200db28: c4 20 e0 04 st %g2, [ %g3 + 4 ] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { 200db2c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 200db30: 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; 200db34: fa 26 20 08 st %i5, [ %i0 + 8 ] if ( stats->max_free_blocks < stats->free_blocks ) { 200db38: 80 a0 40 02 cmp %g1, %g2 200db3c: 08 bf ff e5 bleu 200dad0 <_Heap_Free+0x13c> 200db40: c2 26 20 38 st %g1, [ %i0 + 0x38 ] stats->max_free_blocks = stats->free_blocks; 200db44: 10 bf ff e3 b 200dad0 <_Heap_Free+0x13c> 200db48: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 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; 200db4c: 82 12 e0 01 or %o3, 1, %g1 200db50: c2 23 e0 04 st %g1, [ %o7 + 4 ] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 200db54: c2 00 e0 04 ld [ %g3 + 4 ], %g1 next_block->prev_size = size; 200db58: d6 27 40 19 st %o3, [ %i5 + %i1 ] _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; 200db5c: 82 08 7f fe and %g1, -2, %g1 200db60: 10 bf ff dc b 200dad0 <_Heap_Free+0x13c> 200db64: c2 20 e0 04 st %g1, [ %g3 + 4 ] =============================================================================== 0202e31c <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 202e31c: 9d e3 bf a0 save %sp, -96, %sp return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 202e320: c2 06 20 08 ld [ %i0 + 8 ], %g1 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 202e324: c0 26 40 00 clr [ %i1 ] info->largest = 0; 202e328: c0 26 60 04 clr [ %i1 + 4 ] info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 202e32c: 80 a6 00 01 cmp %i0, %g1 202e330: 02 80 00 14 be 202e380 <_Heap_Get_free_information+0x64> <== NEVER TAKEN 202e334: c0 26 60 08 clr [ %i1 + 8 ] 202e338: 88 10 20 01 mov 1, %g4 202e33c: 9e 10 20 00 clr %o7 202e340: 10 80 00 03 b 202e34c <_Heap_Get_free_information+0x30> 202e344: 86 10 20 00 clr %g3 202e348: 88 10 00 0d mov %o5, %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; 202e34c: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_block != tail; the_block = the_block->next) 202e350: 9a 01 20 01 add %g4, 1, %o5 202e354: 84 08 bf fe and %g2, -2, %g2 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 202e358: 80 a0 80 0f cmp %g2, %o7 202e35c: 08 80 00 03 bleu 202e368 <_Heap_Get_free_information+0x4c> 202e360: 86 00 c0 02 add %g3, %g2, %g3 info->largest = the_size; 202e364: c4 26 60 04 st %g2, [ %i1 + 4 ] info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 202e368: c2 00 60 08 ld [ %g1 + 8 ], %g1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 202e36c: 80 a6 00 01 cmp %i0, %g1 202e370: 32 bf ff f6 bne,a 202e348 <_Heap_Get_free_information+0x2c> 202e374: de 06 60 04 ld [ %i1 + 4 ], %o7 202e378: c8 26 40 00 st %g4, [ %i1 ] 202e37c: c6 26 60 08 st %g3, [ %i1 + 8 ] 202e380: 81 c7 e0 08 ret 202e384: 81 e8 00 00 restore =============================================================================== 0200add8 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, uintptr_t remaining_free_space ) { 200add8: 9d e3 bf a0 save %sp, -96, %sp void *free_space = remaining_free_space > 0 ? _Heap_Allocate( heap, remaining_free_space ) : NULL; 200addc: b4 10 20 00 clr %i2 200ade0: 80 a6 60 00 cmp %i1, 0 200ade4: 12 80 00 1c bne 200ae54 <_Heap_Greedy_allocate+0x7c> 200ade8: b8 10 00 18 mov %i0, %i4 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200adec: fa 07 20 08 ld [ %i4 + 8 ], %i5 Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; 200adf0: b0 10 20 00 clr %i0 while ( current != free_list_tail ) { 200adf4: 80 a7 00 1d cmp %i4, %i5 200adf8: 12 80 00 05 bne 200ae0c <_Heap_Greedy_allocate+0x34> <== ALWAYS TAKEN 200adfc: b6 10 20 00 clr %i3 current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); } _Heap_Free( heap, free_space ); 200ae00: 10 80 00 11 b 200ae44 <_Heap_Greedy_allocate+0x6c> <== NOT EXECUTED 200ae04: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); 200ae08: ba 10 00 01 mov %g1, %i5 - 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; 200ae0c: d6 07 60 04 ld [ %i5 + 4 ], %o3 Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; while ( current != free_list_tail ) { _Heap_Block_allocate( 200ae10: 92 10 00 1d mov %i5, %o1 200ae14: 96 0a ff fe and %o3, -2, %o3 200ae18: 94 07 60 08 add %i5, 8, %o2 200ae1c: 90 10 00 1c mov %i4, %o0 200ae20: 40 00 00 e6 call 200b1b8 <_Heap_Block_allocate> 200ae24: 96 02 ff f8 add %o3, -8, %o3 current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 200ae28: f6 27 60 08 st %i3, [ %i5 + 8 ] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200ae2c: c2 07 20 08 ld [ %i4 + 8 ], %g1 : NULL; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *current = _Heap_Free_list_first( heap ); Heap_Block *blocks = NULL; while ( current != free_list_tail ) { 200ae30: 80 a7 00 01 cmp %i4, %g1 200ae34: 12 bf ff f5 bne 200ae08 <_Heap_Greedy_allocate+0x30> 200ae38: b6 10 00 1d mov %i5, %i3 200ae3c: b0 10 00 1d mov %i5, %i0 current->next = blocks; blocks = current; current = _Heap_Free_list_first( heap ); } _Heap_Free( heap, free_space ); 200ae40: 90 10 00 1c mov %i4, %o0 200ae44: 40 00 1c ec call 20121f4 <_Heap_Free> 200ae48: 92 10 00 1a mov %i2, %o1 return blocks; } 200ae4c: 81 c7 e0 08 ret 200ae50: 81 e8 00 00 restore * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 200ae54: 90 10 00 18 mov %i0, %o0 200ae58: 92 10 00 19 mov %i1, %o1 200ae5c: 94 10 20 00 clr %o2 200ae60: 40 00 1c 5a call 2011fc8 <_Heap_Allocate_aligned_with_boundary> 200ae64: 96 10 20 00 clr %o3 200ae68: 10 bf ff e1 b 200adec <_Heap_Greedy_allocate+0x14> 200ae6c: b4 10 00 08 mov %o0, %i2 =============================================================================== 0200ae70 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { 200ae70: 9d e3 bf a0 save %sp, -96, %sp while ( blocks != NULL ) { 200ae74: 80 a6 60 00 cmp %i1, 0 200ae78: 32 80 00 04 bne,a 200ae88 <_Heap_Greedy_free+0x18> <== ALWAYS TAKEN 200ae7c: fa 06 60 08 ld [ %i1 + 8 ], %i5 200ae80: 30 80 00 0a b,a 200aea8 <_Heap_Greedy_free+0x38> <== NOT EXECUTED Heap_Block *current = blocks; blocks = blocks->next; 200ae84: fa 06 60 08 ld [ %i1 + 8 ], %i5 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 200ae88: 92 06 60 08 add %i1, 8, %o1 200ae8c: 40 00 1c da call 20121f4 <_Heap_Free> 200ae90: 90 10 00 18 mov %i0, %o0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 200ae94: 80 a7 60 00 cmp %i5, 0 200ae98: 12 bf ff fb bne 200ae84 <_Heap_Greedy_free+0x14> 200ae9c: b2 10 00 1d mov %i5, %i1 200aea0: 81 c7 e0 08 ret 200aea4: 81 e8 00 00 restore 200aea8: 81 c7 e0 08 ret <== NOT EXECUTED 200aeac: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02044174 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 2044174: 9d e3 bf a0 save %sp, -96, %sp Heap_Block *current = heap->first_block; 2044178: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 Heap_Block *end = heap->last_block; 204417c: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 bool stop = false; while ( !stop && current != end ) { 2044180: 80 a7 00 1d cmp %i4, %i5 2044184: 32 80 00 06 bne,a 204419c <_Heap_Iterate+0x28> <== ALWAYS TAKEN 2044188: d2 07 20 04 ld [ %i4 + 4 ], %o1 204418c: 30 80 00 0e b,a 20441c4 <_Heap_Iterate+0x50> <== NOT EXECUTED 2044190: 02 80 00 0d be 20441c4 <_Heap_Iterate+0x50> 2044194: 01 00 00 00 nop - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 2044198: d2 07 20 04 ld [ %i4 + 4 ], %o1 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 ); 204419c: 90 10 00 1c mov %i4, %o0 20441a0: 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); 20441a4: b8 07 00 09 add %i4, %o1, %i4 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; 20441a8: d4 07 20 04 ld [ %i4 + 4 ], %o2 20441ac: 96 10 00 1a mov %i2, %o3 20441b0: 9f c6 40 00 call %i1 20441b4: 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 ) { 20441b8: 80 8a 20 ff btst 0xff, %o0 20441bc: 02 bf ff f5 be 2044190 <_Heap_Iterate+0x1c> <== ALWAYS TAKEN 20441c0: 80 a7 40 1c cmp %i5, %i4 20441c4: 81 c7 e0 08 ret 20441c8: 81 e8 00 00 restore =============================================================================== 0200dc88 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 200dc88: 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); 200dc8c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200dc90: 40 00 2b 50 call 20189d0 <.urem> 200dc94: 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 200dc98: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 200dc9c: 84 06 7f f8 add %i1, -8, %g2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 200dca0: 84 20 80 08 sub %g2, %o0, %g2 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; 200dca4: 80 a0 80 01 cmp %g2, %g1 200dca8: 0a 80 00 16 bcs 200dd00 <_Heap_Size_of_alloc_area+0x78> 200dcac: 86 10 20 00 clr %g3 200dcb0: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 200dcb4: 80 a0 80 04 cmp %g2, %g4 200dcb8: 18 80 00 13 bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200dcbc: b0 08 e0 01 and %g3, 1, %i0 - 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; 200dcc0: f0 00 a0 04 ld [ %g2 + 4 ], %i0 200dcc4: b0 0e 3f fe and %i0, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200dcc8: 84 00 80 18 add %g2, %i0, %g2 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; 200dccc: 80 a0 40 02 cmp %g1, %g2 200dcd0: 18 80 00 0d bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200dcd4: b0 08 e0 01 and %g3, 1, %i0 200dcd8: 80 a1 00 02 cmp %g4, %g2 200dcdc: 0a 80 00 0a bcs 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200dce0: 01 00 00 00 nop block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 200dce4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 200dce8: 80 88 60 01 btst 1, %g1 200dcec: 02 80 00 06 be 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN 200dcf0: 84 20 80 19 sub %g2, %i1, %g2 return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; 200dcf4: 86 10 20 01 mov 1, %g3 || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 200dcf8: 84 00 a0 04 add %g2, 4, %g2 200dcfc: c4 26 80 00 st %g2, [ %i2 ] return true; } 200dd00: b0 08 e0 01 and %g3, 1, %i0 200dd04: 81 c7 e0 08 ret 200dd08: 81 e8 00 00 restore =============================================================================== 02009e48 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 2009e48: 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; 2009e4c: 3b 00 80 27 sethi %hi(0x2009c00), %i5 Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; 2009e50: e0 06 20 10 ld [ %i0 + 0x10 ], %l0 uintptr_t const min_block_size = heap->min_block_size; 2009e54: f6 06 20 14 ld [ %i0 + 0x14 ], %i3 Heap_Block *const first_block = heap->first_block; 2009e58: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 Heap_Block *const last_block = heap->last_block; 2009e5c: 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; 2009e60: 80 a6 a0 00 cmp %i2, 0 2009e64: 02 80 00 04 be 2009e74 <_Heap_Walk+0x2c> 2009e68: ba 17 61 dc or %i5, 0x1dc, %i5 2009e6c: 3b 00 80 27 sethi %hi(0x2009c00), %i5 2009e70: ba 17 61 e4 or %i5, 0x1e4, %i5 ! 2009de4 <_Heap_Walk_print> if ( !_System_state_Is_up( _System_state_Get() ) ) { 2009e74: 03 00 80 7e sethi %hi(0x201f800), %g1 2009e78: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 ! 201f9e8 <_System_state_Current> 2009e7c: 80 a0 a0 03 cmp %g2, 3 2009e80: 02 80 00 05 be 2009e94 <_Heap_Walk+0x4c> 2009e84: 82 10 20 01 mov 1, %g1 block = next_block; } while ( block != first_block ); return true; } 2009e88: b0 08 60 01 and %g1, 1, %i0 2009e8c: 81 c7 e0 08 ret 2009e90: 81 e8 00 00 restore 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)( 2009e94: da 06 20 18 ld [ %i0 + 0x18 ], %o5 2009e98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2009e9c: c4 06 20 08 ld [ %i0 + 8 ], %g2 2009ea0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2009ea4: 90 10 00 19 mov %i1, %o0 2009ea8: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 2009eac: f8 23 a0 60 st %i4, [ %sp + 0x60 ] 2009eb0: e2 23 a0 64 st %l1, [ %sp + 0x64 ] 2009eb4: c4 23 a0 68 st %g2, [ %sp + 0x68 ] 2009eb8: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2009ebc: 92 10 20 00 clr %o1 2009ec0: 96 10 00 10 mov %l0, %o3 2009ec4: 15 00 80 71 sethi %hi(0x201c400), %o2 2009ec8: 98 10 00 1b mov %i3, %o4 2009ecc: 9f c7 40 00 call %i5 2009ed0: 94 12 a1 00 or %o2, 0x100, %o2 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 2009ed4: 80 a4 20 00 cmp %l0, 0 2009ed8: 02 80 00 28 be 2009f78 <_Heap_Walk+0x130> 2009edc: 80 8c 20 07 btst 7, %l0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 2009ee0: 12 80 00 2d bne 2009f94 <_Heap_Walk+0x14c> 2009ee4: 90 10 00 1b mov %i3, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 2009ee8: 7f ff de f9 call 2001acc <.urem> 2009eec: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 2009ef0: 80 a2 20 00 cmp %o0, 0 2009ef4: 12 80 00 30 bne 2009fb4 <_Heap_Walk+0x16c> 2009ef8: 90 07 20 08 add %i4, 8, %o0 2009efc: 7f ff de f4 call 2001acc <.urem> 2009f00: 92 10 00 10 mov %l0, %o1 ); return false; } if ( 2009f04: 80 a2 20 00 cmp %o0, 0 2009f08: 32 80 00 33 bne,a 2009fd4 <_Heap_Walk+0x18c> 2009f0c: 90 10 00 19 mov %i1, %o0 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; 2009f10: e8 07 20 04 ld [ %i4 + 4 ], %l4 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 2009f14: 80 8d 20 01 btst 1, %l4 2009f18: 22 80 00 36 be,a 2009ff0 <_Heap_Walk+0x1a8> 2009f1c: 90 10 00 19 mov %i1, %o0 - 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; 2009f20: c2 04 60 04 ld [ %l1 + 4 ], %g1 2009f24: 82 08 7f fe and %g1, -2, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 2009f28: 82 04 40 01 add %l1, %g1, %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; 2009f2c: c4 00 60 04 ld [ %g1 + 4 ], %g2 ); return false; } if ( _Heap_Is_free( last_block ) ) { 2009f30: 80 88 a0 01 btst 1, %g2 2009f34: 02 80 00 0a be 2009f5c <_Heap_Walk+0x114> 2009f38: 80 a7 00 01 cmp %i4, %g1 ); return false; } if ( 2009f3c: 02 80 00 33 be 200a008 <_Heap_Walk+0x1c0> 2009f40: 90 10 00 19 mov %i1, %o0 _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 2009f44: 92 10 20 01 mov 1, %o1 2009f48: 15 00 80 71 sethi %hi(0x201c400), %o2 2009f4c: 9f c7 40 00 call %i5 2009f50: 94 12 a2 78 or %o2, 0x278, %o2 ! 201c678 <__log2table+0x2d8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009f54: 10 bf ff cd b 2009e88 <_Heap_Walk+0x40> 2009f58: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 2009f5c: 90 10 00 19 mov %i1, %o0 2009f60: 92 10 20 01 mov 1, %o1 2009f64: 15 00 80 71 sethi %hi(0x201c400), %o2 2009f68: 9f c7 40 00 call %i5 2009f6c: 94 12 a2 60 or %o2, 0x260, %o2 ! 201c660 <__log2table+0x2c0> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009f70: 10 bf ff c6 b 2009e88 <_Heap_Walk+0x40> 2009f74: 82 10 20 00 clr %g1 first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 2009f78: 90 10 00 19 mov %i1, %o0 2009f7c: 92 10 20 01 mov 1, %o1 2009f80: 15 00 80 71 sethi %hi(0x201c400), %o2 2009f84: 9f c7 40 00 call %i5 2009f88: 94 12 a1 98 or %o2, 0x198, %o2 ! 201c598 <__log2table+0x1f8> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009f8c: 10 bf ff bf b 2009e88 <_Heap_Walk+0x40> 2009f90: 82 10 20 00 clr %g1 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 2009f94: 90 10 00 19 mov %i1, %o0 2009f98: 92 10 20 01 mov 1, %o1 2009f9c: 96 10 00 10 mov %l0, %o3 2009fa0: 15 00 80 71 sethi %hi(0x201c400), %o2 2009fa4: 9f c7 40 00 call %i5 2009fa8: 94 12 a1 b0 or %o2, 0x1b0, %o2 ! 201c5b0 <__log2table+0x210> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009fac: 10 bf ff b7 b 2009e88 <_Heap_Walk+0x40> 2009fb0: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 2009fb4: 90 10 00 19 mov %i1, %o0 2009fb8: 92 10 20 01 mov 1, %o1 2009fbc: 96 10 00 1b mov %i3, %o3 2009fc0: 15 00 80 71 sethi %hi(0x201c400), %o2 2009fc4: 9f c7 40 00 call %i5 2009fc8: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 201c5d0 <__log2table+0x230> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009fcc: 10 bf ff af b 2009e88 <_Heap_Walk+0x40> 2009fd0: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 2009fd4: 92 10 20 01 mov 1, %o1 2009fd8: 96 10 00 1c mov %i4, %o3 2009fdc: 15 00 80 71 sethi %hi(0x201c400), %o2 2009fe0: 9f c7 40 00 call %i5 2009fe4: 94 12 a1 f8 or %o2, 0x1f8, %o2 ! 201c5f8 <__log2table+0x258> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 2009fe8: 10 bf ff a8 b 2009e88 <_Heap_Walk+0x40> 2009fec: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 2009ff0: 92 10 20 01 mov 1, %o1 2009ff4: 15 00 80 71 sethi %hi(0x201c400), %o2 2009ff8: 9f c7 40 00 call %i5 2009ffc: 94 12 a2 30 or %o2, 0x230, %o2 ! 201c630 <__log2table+0x290> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a000: 10 bf ff a2 b 2009e88 <_Heap_Walk+0x40> 200a004: 82 10 20 00 clr %g1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200a008: f4 06 20 08 ld [ %i0 + 8 ], %i2 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 200a00c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 200a010: 80 a6 00 1a cmp %i0, %i2 200a014: 02 80 00 0d be 200a048 <_Heap_Walk+0x200> 200a018: c2 06 20 20 ld [ %i0 + 0x20 ], %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; 200a01c: 80 a0 40 1a cmp %g1, %i2 200a020: 28 80 00 bc bleu,a 200a310 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN 200a024: e6 06 20 24 ld [ %i0 + 0x24 ], %l3 if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 200a028: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200a02c: 92 10 20 01 mov 1, %o1 200a030: 96 10 00 1a mov %i2, %o3 200a034: 15 00 80 71 sethi %hi(0x201c400), %o2 200a038: 9f c7 40 00 call %i5 200a03c: 94 12 a2 a8 or %o2, 0x2a8, %o2 ! 201c6a8 <__log2table+0x308> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a040: 10 bf ff 92 b 2009e88 <_Heap_Walk+0x40> 200a044: 82 10 20 00 clr %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a048: 2d 00 80 72 sethi %hi(0x201c800), %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)( 200a04c: 2f 00 80 72 sethi %hi(0x201c800), %l7 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a050: a4 10 00 1c mov %i4, %l2 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a054: ac 15 a0 d8 or %l6, 0xd8, %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)( 200a058: ae 15 e0 c0 or %l7, 0xc0, %l7 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a05c: 2b 00 80 72 sethi %hi(0x201c800), %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; 200a060: a6 0d 3f fe and %l4, -2, %l3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 200a064: b4 04 c0 12 add %l3, %l2, %i2 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; 200a068: 80 a0 40 1a cmp %g1, %i2 200a06c: 28 80 00 0b bleu,a 200a098 <_Heap_Walk+0x250> <== ALWAYS TAKEN 200a070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 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 ) ) { (*printer)( 200a074: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 200a078: 92 10 20 01 mov 1, %o1 200a07c: 96 10 00 12 mov %l2, %o3 200a080: 15 00 80 71 sethi %hi(0x201c400), %o2 200a084: 98 10 00 1a mov %i2, %o4 200a088: 9f c7 40 00 call %i5 200a08c: 94 12 a3 50 or %o2, 0x350, %o2 "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; 200a090: 10 bf ff 7e b 2009e88 <_Heap_Walk+0x40> 200a094: 82 10 20 00 clr %g1 200a098: 80 a0 40 1a cmp %g1, %i2 200a09c: 0a bf ff f7 bcs 200a078 <_Heap_Walk+0x230> 200a0a0: 90 10 00 19 mov %i1, %o0 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; 200a0a4: 82 1c 80 11 xor %l2, %l1, %g1 200a0a8: 80 a0 00 01 cmp %g0, %g1 200a0ac: 82 40 20 00 addx %g0, 0, %g1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a0b0: 90 10 00 13 mov %l3, %o0 200a0b4: c2 27 bf fc st %g1, [ %fp + -4 ] 200a0b8: 7f ff de 85 call 2001acc <.urem> 200a0bc: 92 10 00 10 mov %l0, %o1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 200a0c0: 80 a2 20 00 cmp %o0, 0 200a0c4: 02 80 00 05 be 200a0d8 <_Heap_Walk+0x290> 200a0c8: c2 07 bf fc ld [ %fp + -4 ], %g1 200a0cc: 80 88 60 ff btst 0xff, %g1 200a0d0: 12 80 00 76 bne 200a2a8 <_Heap_Walk+0x460> 200a0d4: 90 10 00 19 mov %i1, %o0 ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 200a0d8: 80 a6 c0 13 cmp %i3, %l3 200a0dc: 08 80 00 05 bleu 200a0f0 <_Heap_Walk+0x2a8> 200a0e0: 80 a4 80 1a cmp %l2, %i2 200a0e4: 80 88 60 ff btst 0xff, %g1 200a0e8: 12 80 00 78 bne 200a2c8 <_Heap_Walk+0x480> <== ALWAYS TAKEN 200a0ec: 80 a4 80 1a cmp %l2, %i2 ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 200a0f0: 2a 80 00 06 bcs,a 200a108 <_Heap_Walk+0x2c0> 200a0f4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 200a0f8: 80 88 60 ff btst 0xff, %g1 200a0fc: 12 80 00 7d bne 200a2f0 <_Heap_Walk+0x4a8> 200a100: 90 10 00 19 mov %i1, %o0 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; 200a104: c2 06 a0 04 ld [ %i2 + 4 ], %g1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 200a108: 80 88 60 01 btst 1, %g1 200a10c: 02 80 00 19 be 200a170 <_Heap_Walk+0x328> 200a110: a8 0d 20 01 and %l4, 1, %l4 if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 200a114: 80 a5 20 00 cmp %l4, 0 200a118: 22 80 00 0e be,a 200a150 <_Heap_Walk+0x308> 200a11c: da 04 80 00 ld [ %l2 ], %o5 (*printer)( 200a120: 90 10 00 19 mov %i1, %o0 200a124: 92 10 20 00 clr %o1 200a128: 94 10 00 17 mov %l7, %o2 200a12c: 96 10 00 12 mov %l2, %o3 200a130: 9f c7 40 00 call %i5 200a134: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 200a138: 80 a7 00 1a cmp %i4, %i2 200a13c: 02 80 00 42 be 200a244 <_Heap_Walk+0x3fc> 200a140: a4 10 00 1a mov %i2, %l2 200a144: e8 06 a0 04 ld [ %i2 + 4 ], %l4 200a148: 10 bf ff c6 b 200a060 <_Heap_Walk+0x218> 200a14c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 200a150: 96 10 00 12 mov %l2, %o3 200a154: 90 10 00 19 mov %i1, %o0 200a158: 92 10 20 00 clr %o1 200a15c: 94 10 00 16 mov %l6, %o2 200a160: 9f c7 40 00 call %i5 200a164: 98 10 00 13 mov %l3, %o4 block->prev_size ); } block = next_block; } while ( block != first_block ); 200a168: 10 bf ff f5 b 200a13c <_Heap_Walk+0x2f4> 200a16c: 80 a7 00 1a cmp %i4, %i2 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 ? 200a170: da 04 a0 0c ld [ %l2 + 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)( 200a174: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a178: 05 00 80 71 sethi %hi(0x201c400), %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; 200a17c: c8 06 20 0c ld [ %i0 + 0xc ], %g4 200a180: 80 a0 40 0d cmp %g1, %o5 200a184: 02 80 00 05 be 200a198 <_Heap_Walk+0x350> 200a188: 86 10 a0 c0 or %g2, 0xc0, %g3 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 200a18c: 80 a6 00 0d cmp %i0, %o5 200a190: 02 80 00 3c be 200a280 <_Heap_Walk+0x438> 200a194: 86 15 60 88 or %l5, 0x88, %g3 block->next, block->next == last_free_block ? 200a198: c2 04 a0 08 ld [ %l2 + 8 ], %g1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 200a19c: 1f 00 80 71 sethi %hi(0x201c400), %o7 200a1a0: 80 a1 00 01 cmp %g4, %g1 200a1a4: 02 80 00 05 be 200a1b8 <_Heap_Walk+0x370> 200a1a8: 84 13 e0 e0 or %o7, 0xe0, %g2 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a1ac: 80 a6 00 01 cmp %i0, %g1 200a1b0: 02 80 00 31 be 200a274 <_Heap_Walk+0x42c> 200a1b4: 84 15 60 88 or %l5, 0x88, %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)( 200a1b8: c6 23 a0 5c st %g3, [ %sp + 0x5c ] 200a1bc: c2 23 a0 60 st %g1, [ %sp + 0x60 ] 200a1c0: c4 23 a0 64 st %g2, [ %sp + 0x64 ] 200a1c4: 90 10 00 19 mov %i1, %o0 200a1c8: 92 10 20 00 clr %o1 200a1cc: 15 00 80 72 sethi %hi(0x201c800), %o2 200a1d0: 96 10 00 12 mov %l2, %o3 200a1d4: 94 12 a0 18 or %o2, 0x18, %o2 200a1d8: 9f c7 40 00 call %i5 200a1dc: 98 10 00 13 mov %l3, %o4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 200a1e0: da 06 80 00 ld [ %i2 ], %o5 200a1e4: 80 a4 c0 0d cmp %l3, %o5 200a1e8: 12 80 00 19 bne 200a24c <_Heap_Walk+0x404> 200a1ec: 80 a5 20 00 cmp %l4, 0 ); return false; } if ( !prev_used ) { 200a1f0: 02 80 00 27 be 200a28c <_Heap_Walk+0x444> 200a1f4: 90 10 00 19 mov %i1, %o0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 200a1f8: c2 06 20 08 ld [ %i0 + 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 ) { 200a1fc: 80 a6 00 01 cmp %i0, %g1 200a200: 02 80 00 0b be 200a22c <_Heap_Walk+0x3e4> <== NEVER TAKEN 200a204: 92 10 20 01 mov 1, %o1 if ( free_block == block ) { 200a208: 80 a4 80 01 cmp %l2, %g1 200a20c: 02 bf ff cc be 200a13c <_Heap_Walk+0x2f4> 200a210: 80 a7 00 1a cmp %i4, %i2 return true; } free_block = free_block->next; 200a214: 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 ) { 200a218: 80 a6 00 01 cmp %i0, %g1 200a21c: 12 bf ff fc bne 200a20c <_Heap_Walk+0x3c4> 200a220: 80 a4 80 01 cmp %l2, %g1 return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 200a224: 90 10 00 19 mov %i1, %o0 200a228: 92 10 20 01 mov 1, %o1 200a22c: 96 10 00 12 mov %l2, %o3 200a230: 15 00 80 72 sethi %hi(0x201c800), %o2 200a234: 9f c7 40 00 call %i5 200a238: 94 12 a1 00 or %o2, 0x100, %o2 ! 201c900 <__log2table+0x560> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a23c: 10 bf ff 13 b 2009e88 <_Heap_Walk+0x40> 200a240: 82 10 20 00 clr %g1 } block = next_block; } while ( block != first_block ); return true; 200a244: 10 bf ff 11 b 2009e88 <_Heap_Walk+0x40> 200a248: 82 10 20 01 mov 1, %g1 " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 200a24c: f4 23 a0 5c st %i2, [ %sp + 0x5c ] 200a250: 90 10 00 19 mov %i1, %o0 200a254: 92 10 20 01 mov 1, %o1 200a258: 96 10 00 12 mov %l2, %o3 200a25c: 15 00 80 72 sethi %hi(0x201c800), %o2 200a260: 98 10 00 13 mov %l3, %o4 200a264: 9f c7 40 00 call %i5 200a268: 94 12 a0 50 or %o2, 0x50, %o2 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a26c: 10 bf ff 07 b 2009e88 <_Heap_Walk+0x40> 200a270: 82 10 20 00 clr %g1 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 200a274: 05 00 80 71 sethi %hi(0x201c400), %g2 200a278: 10 bf ff d0 b 200a1b8 <_Heap_Walk+0x370> 200a27c: 84 10 a0 f0 or %g2, 0xf0, %g2 ! 201c4f0 <__log2table+0x150> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 200a280: 07 00 80 71 sethi %hi(0x201c400), %g3 200a284: 10 bf ff c5 b 200a198 <_Heap_Walk+0x350> 200a288: 86 10 e0 d0 or %g3, 0xd0, %g3 ! 201c4d0 <__log2table+0x130> return false; } if ( !prev_used ) { (*printer)( 200a28c: 92 10 20 01 mov 1, %o1 200a290: 96 10 00 12 mov %l2, %o3 200a294: 15 00 80 72 sethi %hi(0x201c800), %o2 200a298: 9f c7 40 00 call %i5 200a29c: 94 12 a0 90 or %o2, 0x90, %o2 ! 201c890 <__log2table+0x4f0> return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 200a2a0: 10 bf fe fa b 2009e88 <_Heap_Walk+0x40> 200a2a4: 82 10 20 00 clr %g1 return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 200a2a8: 92 10 20 01 mov 1, %o1 200a2ac: 96 10 00 12 mov %l2, %o3 200a2b0: 15 00 80 71 sethi %hi(0x201c400), %o2 200a2b4: 98 10 00 13 mov %l3, %o4 200a2b8: 9f c7 40 00 call %i5 200a2bc: 94 12 a3 80 or %o2, 0x380, %o2 "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 200a2c0: 10 bf fe f2 b 2009e88 <_Heap_Walk+0x40> 200a2c4: 82 10 20 00 clr %g1 } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 200a2c8: 90 10 00 19 mov %i1, %o0 200a2cc: 92 10 20 01 mov 1, %o1 200a2d0: 96 10 00 12 mov %l2, %o3 200a2d4: 15 00 80 71 sethi %hi(0x201c400), %o2 200a2d8: 98 10 00 13 mov %l3, %o4 200a2dc: 94 12 a3 b0 or %o2, 0x3b0, %o2 200a2e0: 9f c7 40 00 call %i5 200a2e4: 9a 10 00 1b mov %i3, %o5 block, block_size, min_block_size ); return false; 200a2e8: 10 bf fe e8 b 2009e88 <_Heap_Walk+0x40> 200a2ec: 82 10 20 00 clr %g1 } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 200a2f0: 92 10 20 01 mov 1, %o1 200a2f4: 96 10 00 12 mov %l2, %o3 200a2f8: 15 00 80 71 sethi %hi(0x201c400), %o2 200a2fc: 98 10 00 1a mov %i2, %o4 200a300: 9f c7 40 00 call %i5 200a304: 94 12 a3 e0 or %o2, 0x3e0, %o2 "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 200a308: 10 bf fe e0 b 2009e88 <_Heap_Walk+0x40> 200a30c: 82 10 20 00 clr %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; 200a310: 80 a4 c0 1a cmp %l3, %i2 200a314: 0a bf ff 46 bcs 200a02c <_Heap_Walk+0x1e4> <== NEVER TAKEN 200a318: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a31c: c2 27 bf fc st %g1, [ %fp + -4 ] 200a320: 90 06 a0 08 add %i2, 8, %o0 200a324: 7f ff dd ea call 2001acc <.urem> 200a328: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 200a32c: 80 a2 20 00 cmp %o0, 0 200a330: 12 80 00 36 bne 200a408 <_Heap_Walk+0x5c0> <== NEVER TAKEN 200a334: c2 07 bf fc ld [ %fp + -4 ], %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; 200a338: c4 06 a0 04 ld [ %i2 + 4 ], %g2 200a33c: 84 08 bf fe and %g2, -2, %g2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 200a340: 84 06 80 02 add %i2, %g2, %g2 200a344: c4 00 a0 04 ld [ %g2 + 4 ], %g2 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a348: 80 88 a0 01 btst 1, %g2 200a34c: 12 80 00 27 bne 200a3e8 <_Heap_Walk+0x5a0> <== NEVER TAKEN 200a350: 84 10 00 18 mov %i0, %g2 200a354: 10 80 00 19 b 200a3b8 <_Heap_Walk+0x570> 200a358: a4 10 00 1a mov %i2, %l2 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 ) { 200a35c: 80 a6 00 1a cmp %i0, %i2 200a360: 02 bf ff 3a be 200a048 <_Heap_Walk+0x200> 200a364: 80 a6 80 01 cmp %i2, %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; 200a368: 0a bf ff 31 bcs 200a02c <_Heap_Walk+0x1e4> 200a36c: 90 10 00 19 mov %i1, %o0 200a370: 80 a6 80 13 cmp %i2, %l3 200a374: 18 bf ff 2f bgu 200a030 <_Heap_Walk+0x1e8> <== NEVER TAKEN 200a378: 92 10 20 01 mov 1, %o1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 200a37c: c2 27 bf fc st %g1, [ %fp + -4 ] 200a380: 90 06 a0 08 add %i2, 8, %o0 200a384: 7f ff dd d2 call 2001acc <.urem> 200a388: 92 10 00 15 mov %l5, %o1 ); return false; } if ( 200a38c: 80 a2 20 00 cmp %o0, 0 200a390: 12 80 00 1e bne 200a408 <_Heap_Walk+0x5c0> 200a394: c2 07 bf fc ld [ %fp + -4 ], %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; 200a398: c6 06 a0 04 ld [ %i2 + 4 ], %g3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 200a39c: 84 10 00 12 mov %l2, %g2 200a3a0: 86 08 ff fe and %g3, -2, %g3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 200a3a4: 86 00 c0 1a add %g3, %i2, %g3 200a3a8: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200a3ac: 80 88 e0 01 btst 1, %g3 200a3b0: 12 80 00 0e bne 200a3e8 <_Heap_Walk+0x5a0> 200a3b4: a4 10 00 1a mov %i2, %l2 ); return false; } if ( free_block->prev != prev_block ) { 200a3b8: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 200a3bc: 80 a3 00 02 cmp %o4, %g2 200a3c0: 22 bf ff e7 be,a 200a35c <_Heap_Walk+0x514> 200a3c4: f4 06 a0 08 ld [ %i2 + 8 ], %i2 (*printer)( 200a3c8: 90 10 00 19 mov %i1, %o0 200a3cc: 92 10 20 01 mov 1, %o1 200a3d0: 96 10 00 1a mov %i2, %o3 200a3d4: 15 00 80 71 sethi %hi(0x201c400), %o2 200a3d8: 9f c7 40 00 call %i5 200a3dc: 94 12 a3 18 or %o2, 0x318, %o2 ! 201c718 <__log2table+0x378> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a3e0: 10 bf fe aa b 2009e88 <_Heap_Walk+0x40> 200a3e4: 82 10 20 00 clr %g1 return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 200a3e8: 90 10 00 19 mov %i1, %o0 200a3ec: 92 10 20 01 mov 1, %o1 200a3f0: 96 10 00 1a mov %i2, %o3 200a3f4: 15 00 80 71 sethi %hi(0x201c400), %o2 200a3f8: 9f c7 40 00 call %i5 200a3fc: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 201c6f8 <__log2table+0x358> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a400: 10 bf fe a2 b 2009e88 <_Heap_Walk+0x40> 200a404: 82 10 20 00 clr %g1 } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 200a408: 90 10 00 19 mov %i1, %o0 200a40c: 92 10 20 01 mov 1, %o1 200a410: 96 10 00 1a mov %i2, %o3 200a414: 15 00 80 71 sethi %hi(0x201c400), %o2 200a418: 9f c7 40 00 call %i5 200a41c: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 201c6c8 <__log2table+0x328> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 200a420: 10 bf fe 9a b 2009e88 <_Heap_Walk+0x40> 200a424: 82 10 20 00 clr %g1 =============================================================================== 02008524 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 2008524: 9d e3 bf a0 save %sp, -96, %sp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2008528: 39 00 80 75 sethi %hi(0x201d400), %i4 200852c: c2 07 22 84 ld [ %i4 + 0x284 ], %g1 ! 201d684 <_IO_Number_of_drivers> 2008530: 80 a0 60 00 cmp %g1, 0 2008534: 02 80 00 0c be 2008564 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN 2008538: ba 10 20 00 clr %i5 200853c: b8 17 22 84 or %i4, 0x284, %i4 (void) rtems_io_initialize( major, 0, NULL ); 2008540: 90 10 00 1d mov %i5, %o0 2008544: 92 10 20 00 clr %o1 2008548: 40 00 14 00 call 200d548 200854c: 94 10 20 00 clr %o2 void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 2008550: c2 07 00 00 ld [ %i4 ], %g1 2008554: ba 07 60 01 inc %i5 2008558: 80 a0 40 1d cmp %g1, %i5 200855c: 18 bf ff fa bgu 2008544 <_IO_Initialize_all_drivers+0x20> 2008560: 90 10 00 1d mov %i5, %o0 2008564: 81 c7 e0 08 ret 2008568: 81 e8 00 00 restore =============================================================================== 02008458 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 2008458: 9d e3 bf a0 save %sp, -96, %sp uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 200845c: 03 00 80 71 sethi %hi(0x201c400), %g1 2008460: 82 10 62 4c or %g1, 0x24c, %g1 ! 201c64c drivers_in_table = Configuration.number_of_device_drivers; 2008464: f8 00 60 38 ld [ %g1 + 0x38 ], %i4 number_of_drivers = Configuration.maximum_drivers; 2008468: f2 00 60 34 ld [ %g1 + 0x34 ], %i1 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 200846c: 80 a7 00 19 cmp %i4, %i1 2008470: 0a 80 00 08 bcs 2008490 <_IO_Manager_initialization+0x38> 2008474: fa 00 60 3c ld [ %g1 + 0x3c ], %i5 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 2008478: 03 00 80 75 sethi %hi(0x201d400), %g1 200847c: fa 20 62 88 st %i5, [ %g1 + 0x288 ] ! 201d688 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 2008480: 03 00 80 75 sethi %hi(0x201d400), %g1 2008484: f8 20 62 84 st %i4, [ %g1 + 0x284 ] ! 201d684 <_IO_Number_of_drivers> return; 2008488: 81 c7 e0 08 ret 200848c: 81 e8 00 00 restore * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) 2008490: 83 2e 60 03 sll %i1, 3, %g1 2008494: b5 2e 60 05 sll %i1, 5, %i2 2008498: b4 26 80 01 sub %i2, %g1, %i2 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 200849c: 40 00 0d 2c call 200b94c <_Workspace_Allocate_or_fatal_error> 20084a0: 90 10 00 1a mov %i2, %o0 sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 20084a4: 03 00 80 75 sethi %hi(0x201d400), %g1 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 20084a8: 37 00 80 75 sethi %hi(0x201d400), %i3 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 20084ac: f2 20 62 84 st %i1, [ %g1 + 0x284 ] /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 20084b0: d0 26 e2 88 st %o0, [ %i3 + 0x288 ] _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 20084b4: 92 10 20 00 clr %o1 20084b8: 40 00 1f 4a call 20101e0 20084bc: 94 10 00 1a mov %i2, %o2 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20084c0: 80 a7 20 00 cmp %i4, 0 20084c4: 02 bf ff f1 be 2008488 <_IO_Manager_initialization+0x30> <== NEVER TAKEN 20084c8: f6 06 e2 88 ld [ %i3 + 0x288 ], %i3 20084cc: 82 10 20 00 clr %g1 20084d0: 88 10 20 00 clr %g4 _IO_Driver_address_table[index] = driver_table[index]; 20084d4: c4 07 40 01 ld [ %i5 + %g1 ], %g2 20084d8: 86 07 40 01 add %i5, %g1, %g3 20084dc: c4 26 c0 01 st %g2, [ %i3 + %g1 ] 20084e0: f4 00 e0 04 ld [ %g3 + 4 ], %i2 20084e4: 84 06 c0 01 add %i3, %g1, %g2 20084e8: f4 20 a0 04 st %i2, [ %g2 + 4 ] 20084ec: f4 00 e0 08 ld [ %g3 + 8 ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20084f0: 88 01 20 01 inc %g4 _IO_Driver_address_table[index] = driver_table[index]; 20084f4: f4 20 a0 08 st %i2, [ %g2 + 8 ] 20084f8: f4 00 e0 0c ld [ %g3 + 0xc ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 20084fc: 82 00 60 18 add %g1, 0x18, %g1 _IO_Driver_address_table[index] = driver_table[index]; 2008500: f4 20 a0 0c st %i2, [ %g2 + 0xc ] 2008504: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2008508: 80 a1 00 1c cmp %g4, %i4 _IO_Driver_address_table[index] = driver_table[index]; 200850c: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] 2008510: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 2008514: 12 bf ff f0 bne 20084d4 <_IO_Manager_initialization+0x7c> 2008518: c6 20 a0 14 st %g3, [ %g2 + 0x14 ] 200851c: 81 c7 e0 08 ret 2008520: 81 e8 00 00 restore =============================================================================== 0200926c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 200926c: 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 ) 2009270: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2009274: 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 ) 2009278: 80 a0 60 00 cmp %g1, 0 200927c: 02 80 00 19 be 20092e0 <_Objects_Allocate+0x74> <== NEVER TAKEN 2009280: 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 ); 2009284: b8 07 60 20 add %i5, 0x20, %i4 2009288: 7f ff fd 47 call 20087a4 <_Chain_Get> 200928c: 90 10 00 1c mov %i4, %o0 if ( information->auto_extend ) { 2009290: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1 2009294: 80 a0 60 00 cmp %g1, 0 2009298: 02 80 00 12 be 20092e0 <_Objects_Allocate+0x74> 200929c: 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 ) { 20092a0: 80 a2 20 00 cmp %o0, 0 20092a4: 02 80 00 11 be 20092e8 <_Objects_Allocate+0x7c> 20092a8: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 20092ac: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 20092b0: d0 16 20 0a lduh [ %i0 + 0xa ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 20092b4: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1 20092b8: 40 00 3d 1a call 2018720 <.udiv> 20092bc: 90 22 00 01 sub %o0, %g1, %o0 information->inactive_per_block[ block ]--; 20092c0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20092c4: 91 2a 20 02 sll %o0, 2, %o0 20092c8: c6 00 40 08 ld [ %g1 + %o0 ], %g3 information->inactive--; 20092cc: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 20092d0: 86 00 ff ff add %g3, -1, %g3 20092d4: c6 20 40 08 st %g3, [ %g1 + %o0 ] information->inactive--; 20092d8: 82 00 bf ff add %g2, -1, %g1 20092dc: c2 37 60 2c sth %g1, [ %i5 + 0x2c ] ); } #endif return the_object; } 20092e0: 81 c7 e0 08 ret 20092e4: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 20092e8: 40 00 00 10 call 2009328 <_Objects_Extend_information> 20092ec: 90 10 00 1d mov %i5, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 20092f0: 7f ff fd 2d call 20087a4 <_Chain_Get> 20092f4: 90 10 00 1c mov %i4, %o0 } if ( the_object ) { 20092f8: b0 92 20 00 orcc %o0, 0, %i0 20092fc: 32 bf ff ed bne,a 20092b0 <_Objects_Allocate+0x44> 2009300: c2 17 60 0a lduh [ %i5 + 0xa ], %g1 ); } #endif return the_object; } 2009304: 81 c7 e0 08 ret 2009308: 81 e8 00 00 restore =============================================================================== 02009328 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2009328: 9d e3 bf 90 save %sp, -112, %sp minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 200932c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 2009330: f8 16 20 0a lduh [ %i0 + 0xa ], %i4 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 2009334: 80 a4 20 00 cmp %l0, 0 2009338: 02 80 00 a6 be 20095d0 <_Objects_Extend_information+0x2a8> 200933c: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1 block_count = 0; else { block_count = information->maximum / information->allocation_size; 2009340: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2 2009344: b3 2e 60 10 sll %i1, 0x10, %i1 2009348: 92 10 00 1a mov %i2, %o1 200934c: 40 00 3c f5 call 2018720 <.udiv> 2009350: 91 36 60 10 srl %i1, 0x10, %o0 2009354: a7 2a 20 10 sll %o0, 0x10, %l3 2009358: a7 34 e0 10 srl %l3, 0x10, %l3 for ( ; block < block_count; block++ ) { 200935c: 80 a4 e0 00 cmp %l3, 0 2009360: 02 80 00 a3 be 20095ec <_Objects_Extend_information+0x2c4><== NEVER TAKEN 2009364: 90 10 00 1a mov %i2, %o0 if ( information->object_blocks[ block ] == NULL ) { 2009368: c2 04 00 00 ld [ %l0 ], %g1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 200936c: ba 10 00 1c mov %i4, %i5 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 2009370: 80 a0 60 00 cmp %g1, 0 2009374: 12 80 00 08 bne 2009394 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN 2009378: b6 10 20 00 clr %i3 do_extend = false; 200937c: 10 80 00 a0 b 20095fc <_Objects_Extend_information+0x2d4> <== NOT EXECUTED 2009380: b4 10 20 00 clr %i2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 2009384: c2 04 00 01 ld [ %l0 + %g1 ], %g1 2009388: 80 a0 60 00 cmp %g1, 0 200938c: 22 80 00 08 be,a 20093ac <_Objects_Extend_information+0x84> 2009390: b4 10 20 00 clr %i2 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 2009394: b6 06 e0 01 inc %i3 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 2009398: ba 07 40 1a add %i5, %i2, %i5 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 200939c: 80 a4 c0 1b cmp %l3, %i3 20093a0: 18 bf ff f9 bgu 2009384 <_Objects_Extend_information+0x5c> 20093a4: 83 2e e0 02 sll %i3, 2, %g1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 20093a8: b4 10 20 01 mov 1, %i2 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20093ac: b3 36 60 10 srl %i1, 0x10, %i1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 20093b0: 03 00 00 3f sethi %hi(0xfc00), %g1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 20093b4: b2 06 40 08 add %i1, %o0, %i1 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 20093b8: 82 10 63 ff or %g1, 0x3ff, %g1 20093bc: 80 a6 40 01 cmp %i1, %g1 20093c0: 18 80 00 93 bgu 200960c <_Objects_Extend_information+0x2e4> 20093c4: 01 00 00 00 nop /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 20093c8: 40 00 3c 9c call 2018638 <.umul> 20093cc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 if ( information->auto_extend ) { 20093d0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 20093d4: 80 a0 60 00 cmp %g1, 0 20093d8: 02 80 00 6a be 2009580 <_Objects_Extend_information+0x258> 20093dc: 01 00 00 00 nop new_object_block = _Workspace_Allocate( block_size ); 20093e0: 40 00 09 4d call 200b914 <_Workspace_Allocate> 20093e4: 01 00 00 00 nop if ( !new_object_block ) 20093e8: a0 92 20 00 orcc %o0, 0, %l0 20093ec: 02 80 00 88 be 200960c <_Objects_Extend_information+0x2e4> 20093f0: 01 00 00 00 nop } /* * Do we need to grow the tables? */ if ( do_extend ) { 20093f4: 80 8e a0 ff btst 0xff, %i2 20093f8: 22 80 00 3f be,a 20094f4 <_Objects_Extend_information+0x1cc> 20093fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 */ /* * Up the block count and maximum */ block_count++; 2009400: b4 04 e0 01 add %l3, 1, %i2 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 2009404: 91 2e a0 01 sll %i2, 1, %o0 2009408: 90 02 00 1a add %o0, %i2, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 200940c: 90 06 40 08 add %i1, %o0, %o0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 2009410: 90 02 00 1c add %o0, %i4, %o0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 2009414: 40 00 09 40 call 200b914 <_Workspace_Allocate> 2009418: 91 2a 20 02 sll %o0, 2, %o0 if ( !object_blocks ) { 200941c: a2 92 20 00 orcc %o0, 0, %l1 2009420: 02 80 00 79 be 2009604 <_Objects_Extend_information+0x2dc> 2009424: b5 2e a0 02 sll %i2, 2, %i2 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2009428: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 200942c: 80 a7 00 01 cmp %i4, %g1 2009430: a4 04 40 1a add %l1, %i2, %l2 2009434: 0a 80 00 57 bcs 2009590 <_Objects_Extend_information+0x268> 2009438: b4 04 80 1a add %l2, %i2, %i2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 200943c: 80 a7 20 00 cmp %i4, 0 2009440: 02 80 00 07 be 200945c <_Objects_Extend_information+0x134><== NEVER TAKEN 2009444: 82 10 20 00 clr %g1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 2009448: 85 28 60 02 sll %g1, 2, %g2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 200944c: 82 00 60 01 inc %g1 2009450: 80 a7 00 01 cmp %i4, %g1 2009454: 18 bf ff fd bgu 2009448 <_Objects_Extend_information+0x120><== NEVER TAKEN 2009458: c0 20 80 1a clr [ %g2 + %i2 ] 200945c: a7 2c e0 02 sll %l3, 2, %l3 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2009460: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 2009464: c0 24 40 13 clr [ %l1 + %l3 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 2009468: 86 07 40 03 add %i5, %g3, %g3 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 200946c: 80 a7 40 03 cmp %i5, %g3 2009470: 1a 80 00 0a bcc 2009498 <_Objects_Extend_information+0x170><== NEVER TAKEN 2009474: c0 24 80 13 clr [ %l2 + %l3 ] * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 2009478: 83 2f 60 02 sll %i5, 2, %g1 200947c: 84 10 00 1d mov %i5, %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 2009480: 82 06 80 01 add %i2, %g1, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 2009484: c0 20 40 00 clr [ %g1 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 2009488: 84 00 a0 01 inc %g2 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 200948c: 80 a0 c0 02 cmp %g3, %g2 2009490: 18 bf ff fd bgu 2009484 <_Objects_Extend_information+0x15c> 2009494: 82 00 60 04 add %g1, 4, %g1 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2009498: 7f ff e4 88 call 20026b8 200949c: 01 00 00 00 nop uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 20094a0: c6 06 00 00 ld [ %i0 ], %g3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 20094a4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 20094a8: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 20094ac: f2 36 20 10 sth %i1, [ %i0 + 0x10 ] 20094b0: 87 28 e0 18 sll %g3, 0x18, %g3 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 20094b4: 85 28 a0 1b sll %g2, 0x1b, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 20094b8: e2 26 20 34 st %l1, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; 20094bc: e4 26 20 30 st %l2, [ %i0 + 0x30 ] information->local_table = local_table; 20094c0: f4 26 20 1c st %i2, [ %i0 + 0x1c ] information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 20094c4: b3 2e 60 10 sll %i1, 0x10, %i1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 20094c8: 03 00 00 40 sethi %hi(0x10000), %g1 20094cc: b3 36 60 10 srl %i1, 0x10, %i1 20094d0: 82 10 c0 01 or %g3, %g1, %g1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 20094d4: 82 10 40 02 or %g1, %g2, %g1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 20094d8: 82 10 40 19 or %g1, %i1, %g1 20094dc: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 20094e0: 7f ff e4 7a call 20026c8 20094e4: 01 00 00 00 nop _Workspace_Free( old_tables ); 20094e8: 40 00 09 13 call 200b934 <_Workspace_Free> 20094ec: 90 10 00 1c mov %i4, %o0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 20094f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20094f4: b7 2e e0 02 sll %i3, 2, %i3 20094f8: e0 20 40 1b st %l0, [ %g1 + %i3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 20094fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2009500: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2 2009504: d2 00 40 1b ld [ %g1 + %i3 ], %o1 2009508: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 200950c: 90 07 bf f4 add %fp, -12, %o0 2009510: 7f ff fc b4 call 20087e0 <_Chain_Initialize> 2009514: 39 00 00 40 sethi %hi(0x10000), %i4 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 2009518: 10 80 00 0d b 200954c <_Objects_Extend_information+0x224> 200951c: b4 06 20 20 add %i0, 0x20, %i2 the_object->id = _Objects_Build_id( 2009520: c6 16 20 04 lduh [ %i0 + 4 ], %g3 2009524: 85 28 a0 18 sll %g2, 0x18, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2009528: 87 28 e0 1b sll %g3, 0x1b, %g3 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 200952c: 84 10 80 1c or %g2, %i4, %g2 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 2009530: 84 10 80 03 or %g2, %g3, %g2 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 2009534: 84 10 80 1d or %g2, %i5, %g2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2009538: 90 10 00 1a mov %i2, %o0 200953c: 92 10 00 01 mov %g1, %o1 index++; 2009540: ba 07 60 01 inc %i5 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2009544: 7f ff fc 8d call 2008778 <_Chain_Append> 2009548: c4 20 60 08 st %g2, [ %g1 + 8 ] /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 200954c: 7f ff fc 96 call 20087a4 <_Chain_Get> 2009550: 90 07 bf f4 add %fp, -12, %o0 2009554: 82 92 20 00 orcc %o0, 0, %g1 2009558: 32 bf ff f2 bne,a 2009520 <_Objects_Extend_information+0x1f8> 200955c: c4 06 00 00 ld [ %i0 ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2009560: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4 2009564: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 2009568: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 200956c: c8 20 c0 1b st %g4, [ %g3 + %i3 ] information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 2009570: 82 00 80 04 add %g2, %g4, %g1 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = 2009574: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2009578: 81 c7 e0 08 ret 200957c: 81 e8 00 00 restore if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 2009580: 40 00 08 f3 call 200b94c <_Workspace_Allocate_or_fatal_error> 2009584: 01 00 00 00 nop 2009588: 10 bf ff 9b b 20093f4 <_Objects_Extend_information+0xcc> 200958c: a0 10 00 08 mov %o0, %l0 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2009590: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 information->object_blocks, block_count * sizeof(void*) ); 2009594: a7 2c e0 02 sll %l3, 2, %l3 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 2009598: 40 00 1a d6 call 20100f0 200959c: 94 10 00 13 mov %l3, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 20095a0: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 20095a4: 94 10 00 13 mov %l3, %o2 20095a8: 40 00 1a d2 call 20100f0 20095ac: 90 10 00 12 mov %l2, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 20095b0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20095b4: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 20095b8: b8 07 00 01 add %i4, %g1, %i4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 20095bc: 90 10 00 1a mov %i2, %o0 20095c0: 40 00 1a cc call 20100f0 20095c4: 95 2f 20 02 sll %i4, 2, %o2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 20095c8: 10 bf ff a7 b 2009464 <_Objects_Extend_information+0x13c> 20095cc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 20095d0: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 20095d4: ba 10 00 1c mov %i4, %i5 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 20095d8: b4 10 20 01 mov 1, %i2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 20095dc: b6 10 20 00 clr %i3 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 20095e0: a6 10 20 00 clr %l3 20095e4: 10 bf ff 72 b 20093ac <_Objects_Extend_information+0x84> 20095e8: b3 2e 60 10 sll %i1, 0x10, %i1 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 20095ec: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 20095f0: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; 20095f4: 10 bf ff 6e b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED 20095f8: b6 10 20 00 clr %i3 <== NOT EXECUTED 20095fc: 10 bf ff 6c b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED 2009600: b6 10 20 00 clr %i3 <== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 2009604: 40 00 08 cc call 200b934 <_Workspace_Free> 2009608: 90 10 00 10 mov %l0, %o0 return; 200960c: 81 c7 e0 08 ret 2009610: 81 e8 00 00 restore =============================================================================== 020096b8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 20096b8: 9d e3 bf a0 save %sp, -96, %sp Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 20096bc: 80 a6 60 00 cmp %i1, 0 20096c0: 02 80 00 17 be 200971c <_Objects_Get_information+0x64> 20096c4: 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 ); 20096c8: 40 00 11 91 call 200dd0c <_Objects_API_maximum_class> 20096cc: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum == 0 ) 20096d0: 80 a2 20 00 cmp %o0, 0 20096d4: 02 80 00 12 be 200971c <_Objects_Get_information+0x64> 20096d8: 80 a2 00 19 cmp %o0, %i1 return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 20096dc: 0a 80 00 10 bcs 200971c <_Objects_Get_information+0x64> 20096e0: 03 00 80 74 sethi %hi(0x201d000), %g1 return NULL; if ( !_Objects_Information_table[ the_api ] ) 20096e4: b1 2e 20 02 sll %i0, 2, %i0 20096e8: 82 10 63 18 or %g1, 0x318, %g1 20096ec: c2 00 40 18 ld [ %g1 + %i0 ], %g1 20096f0: 80 a0 60 00 cmp %g1, 0 20096f4: 02 80 00 0a be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN 20096f8: b3 2e 60 02 sll %i1, 2, %i1 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20096fc: fa 00 40 19 ld [ %g1 + %i1 ], %i5 if ( !info ) 2009700: 80 a7 60 00 cmp %i5, 0 2009704: 02 80 00 06 be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN 2009708: 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 ) 200970c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 return NULL; 2009710: 80 a0 00 01 cmp %g0, %g1 2009714: 82 60 20 00 subx %g0, 0, %g1 2009718: ba 0f 40 01 and %i5, %g1, %i5 #endif return info; } 200971c: 81 c7 e0 08 ret 2009720: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02017798 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 2017798: 9d e3 bf 90 save %sp, -112, %sp char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 201779c: 80 a6 60 00 cmp %i1, 0 20177a0: 02 80 00 3c be 2017890 <_Objects_Get_name_as_string+0xf8> 20177a4: 80 a6 a0 00 cmp %i2, 0 return NULL; if ( name == NULL ) 20177a8: 02 80 00 35 be 201787c <_Objects_Get_name_as_string+0xe4> 20177ac: 80 a6 20 00 cmp %i0, 0 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 20177b0: 02 80 00 35 be 2017884 <_Objects_Get_name_as_string+0xec> 20177b4: 03 00 80 c1 sethi %hi(0x2030400), %g1 information = _Objects_Get_information_id( tmpId ); 20177b8: 7f ff e1 94 call 200fe08 <_Objects_Get_information_id> 20177bc: 90 10 00 18 mov %i0, %o0 if ( !information ) 20177c0: 80 a2 20 00 cmp %o0, 0 20177c4: 02 80 00 33 be 2017890 <_Objects_Get_name_as_string+0xf8> 20177c8: 92 10 00 18 mov %i0, %o1 return NULL; the_object = _Objects_Get( information, tmpId, &location ); 20177cc: 7f ff e1 cd call 200ff00 <_Objects_Get> 20177d0: 94 07 bf fc add %fp, -4, %o2 switch ( location ) { 20177d4: c2 07 bf fc ld [ %fp + -4 ], %g1 20177d8: 80 a0 60 00 cmp %g1, 0 20177dc: 32 80 00 2e bne,a 2017894 <_Objects_Get_name_as_string+0xfc> 20177e0: b4 10 20 00 clr %i2 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 20177e4: c2 02 20 0c ld [ %o0 + 0xc ], %g1 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 20177e8: c0 2f bf f4 clrb [ %fp + -12 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 20177ec: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 20177f0: 87 30 60 08 srl %g1, 8, %g3 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 20177f4: 89 30 60 10 srl %g1, 0x10, %g4 lname[ 2 ] = (u32_name >> 8) & 0xff; 20177f8: c6 2f bf f2 stb %g3, [ %fp + -14 ] lname[ 3 ] = (u32_name >> 0) & 0xff; 20177fc: c2 2f bf f3 stb %g1, [ %fp + -13 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2017800: c4 2f bf f0 stb %g2, [ %fp + -16 ] lname[ 1 ] = (u32_name >> 16) & 0xff; 2017804: c8 2f bf f1 stb %g4, [ %fp + -15 ] } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 2017808: 86 10 00 02 mov %g2, %g3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 201780c: b2 86 7f ff addcc %i1, -1, %i1 2017810: 02 80 00 19 be 2017874 <_Objects_Get_name_as_string+0xdc> <== NEVER TAKEN 2017814: 82 10 00 1a mov %i2, %g1 2017818: 80 a0 a0 00 cmp %g2, 0 201781c: 02 80 00 16 be 2017874 <_Objects_Get_name_as_string+0xdc> 2017820: 1f 00 80 bc sethi %hi(0x202f000), %o7 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; 2017824: 84 07 bf f0 add %fp, -16, %g2 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 2017828: b2 06 80 19 add %i2, %i1, %i1 201782c: 10 80 00 05 b 2017840 <_Objects_Get_name_as_string+0xa8> 2017830: 9e 13 e3 58 or %o7, 0x358, %o7 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2017834: 80 a1 20 00 cmp %g4, 0 2017838: 02 80 00 0f be 2017874 <_Objects_Get_name_as_string+0xdc> 201783c: c6 08 80 00 ldub [ %g2 ], %g3 *d = (isprint((unsigned char)*s)) ? *s : '*'; 2017840: f0 03 c0 00 ld [ %o7 ], %i0 2017844: 88 08 e0 ff and %g3, 0xff, %g4 2017848: 88 06 00 04 add %i0, %g4, %g4 201784c: c8 49 20 01 ldsb [ %g4 + 1 ], %g4 2017850: 80 89 20 97 btst 0x97, %g4 2017854: 12 80 00 03 bne 2017860 <_Objects_Get_name_as_string+0xc8> 2017858: 84 00 a0 01 inc %g2 201785c: 86 10 20 2a mov 0x2a, %g3 2017860: c6 28 40 00 stb %g3, [ %g1 ] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 2017864: 82 00 60 01 inc %g1 2017868: 80 a0 40 19 cmp %g1, %i1 201786c: 32 bf ff f2 bne,a 2017834 <_Objects_Get_name_as_string+0x9c> 2017870: c8 48 80 00 ldsb [ %g2 ], %g4 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; _Thread_Enable_dispatch(); 2017874: 7f ff e5 cb call 2010fa0 <_Thread_Enable_dispatch> 2017878: c0 28 40 00 clrb [ %g1 ] return name; } return NULL; /* unreachable path */ } 201787c: 81 c7 e0 08 ret 2017880: 91 e8 00 1a restore %g0, %i2, %o0 return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2017884: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 2017888: 10 bf ff cc b 20177b8 <_Objects_Get_name_as_string+0x20> 201788c: f0 00 60 08 ld [ %g1 + 8 ], %i0 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 2017890: b4 10 20 00 clr %i2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 2017894: 81 c7 e0 08 ret 2017898: 91 e8 00 1a restore %g0, %i2, %o0 =============================================================================== 02019d9c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 2019d9c: 9d e3 bf a0 save %sp, -96, %sp Objects_Control *object; Objects_Id next_id; if ( !information ) return NULL; 2019da0: 90 10 20 00 clr %o0 ) { Objects_Control *object; Objects_Id next_id; if ( !information ) 2019da4: 80 a6 20 00 cmp %i0, 0 2019da8: 02 80 00 19 be 2019e0c <_Objects_Get_next+0x70> 2019dac: ba 10 00 18 mov %i0, %i5 return NULL; if ( !location_p ) 2019db0: 80 a6 a0 00 cmp %i2, 0 2019db4: 02 80 00 16 be 2019e0c <_Objects_Get_next+0x70> 2019db8: 80 a6 e0 00 cmp %i3, 0 return NULL; if ( !next_id_p ) 2019dbc: 02 80 00 14 be 2019e0c <_Objects_Get_next+0x70> 2019dc0: 83 2e 60 10 sll %i1, 0x10, %g1 return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 2019dc4: 80 a0 60 00 cmp %g1, 0 2019dc8: 22 80 00 13 be,a 2019e14 <_Objects_Get_next+0x78> 2019dcc: f2 06 20 08 ld [ %i0 + 8 ], %i1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019dd0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 2019dd4: 83 2e 60 10 sll %i1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2019dd8: 92 10 00 19 mov %i1, %o1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019ddc: 83 30 60 10 srl %g1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2019de0: 90 10 00 1d mov %i5, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019de4: 80 a0 80 01 cmp %g2, %g1 2019de8: 0a 80 00 13 bcs 2019e34 <_Objects_Get_next+0x98> 2019dec: 94 10 00 1a mov %i2, %o2 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2019df0: 7f ff d8 44 call 200ff00 <_Objects_Get> 2019df4: b2 06 60 01 inc %i1 next_id++; } while (*location_p != OBJECTS_LOCAL); 2019df8: c2 06 80 00 ld [ %i2 ], %g1 2019dfc: 80 a0 60 00 cmp %g1, 0 2019e00: 32 bf ff f5 bne,a 2019dd4 <_Objects_Get_next+0x38> 2019e04: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 *next_id_p = next_id; 2019e08: f2 26 c0 00 st %i1, [ %i3 ] return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2019e0c: 81 c7 e0 08 ret 2019e10: 91 e8 00 08 restore %g0, %o0, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019e14: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2 2019e18: 83 2e 60 10 sll %i1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2019e1c: 92 10 00 19 mov %i1, %o1 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019e20: 83 30 60 10 srl %g1, 0x10, %g1 *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 2019e24: 90 10 00 1d mov %i5, %o0 else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 2019e28: 80 a0 80 01 cmp %g2, %g1 2019e2c: 1a bf ff f1 bcc 2019df0 <_Objects_Get_next+0x54> <== ALWAYS TAKEN 2019e30: 94 10 00 1a mov %i2, %o2 { *location_p = OBJECTS_ERROR; 2019e34: 82 10 20 01 mov 1, %g1 2019e38: c2 26 80 00 st %g1, [ %i2 ] *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 2019e3c: 90 10 20 00 clr %o0 *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2019e40: 82 10 3f ff mov -1, %g1 2019e44: c2 26 c0 00 st %g1, [ %i3 ] return 0; } 2019e48: 81 c7 e0 08 ret 2019e4c: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200ff78 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 200ff78: 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; 200ff7c: 80 a6 20 00 cmp %i0, 0 200ff80: 12 80 00 06 bne 200ff98 <_Objects_Id_to_name+0x20> 200ff84: 83 36 20 18 srl %i0, 0x18, %g1 200ff88: 03 00 80 c1 sethi %hi(0x2030400), %g1 200ff8c: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 20306ec <_Per_CPU_Information+0xc> 200ff90: f0 00 60 08 ld [ %g1 + 8 ], %i0 200ff94: 83 36 20 18 srl %i0, 0x18, %g1 200ff98: 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 ) 200ff9c: 84 00 7f ff add %g1, -1, %g2 200ffa0: 80 a0 a0 02 cmp %g2, 2 200ffa4: 18 80 00 17 bgu 2010000 <_Objects_Id_to_name+0x88> 200ffa8: 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 ] ) 200ffac: 83 28 60 02 sll %g1, 2, %g1 200ffb0: 05 00 80 c0 sethi %hi(0x2030000), %g2 200ffb4: 84 10 a3 d8 or %g2, 0x3d8, %g2 ! 20303d8 <_Objects_Information_table> 200ffb8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200ffbc: 80 a0 60 00 cmp %g1, 0 200ffc0: 02 80 00 10 be 2010000 <_Objects_Id_to_name+0x88> 200ffc4: 85 36 20 1b srl %i0, 0x1b, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 200ffc8: 85 28 a0 02 sll %g2, 2, %g2 200ffcc: d0 00 40 02 ld [ %g1 + %g2 ], %o0 if ( !information ) 200ffd0: 80 a2 20 00 cmp %o0, 0 200ffd4: 02 80 00 0b be 2010000 <_Objects_Id_to_name+0x88> <== NEVER TAKEN 200ffd8: 92 10 00 18 mov %i0, %o1 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 200ffdc: 7f ff ff c9 call 200ff00 <_Objects_Get> 200ffe0: 94 07 bf fc add %fp, -4, %o2 if ( !the_object ) 200ffe4: 80 a2 20 00 cmp %o0, 0 200ffe8: 02 80 00 06 be 2010000 <_Objects_Id_to_name+0x88> 200ffec: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 200fff0: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 200fff4: 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(); 200fff8: 40 00 03 ea call 2010fa0 <_Thread_Enable_dispatch> 200fffc: c2 26 40 00 st %g1, [ %i1 ] return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 2010000: 81 c7 e0 08 ret 2010004: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 020099a4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 20099a4: 9d e3 bf a0 save %sp, -96, %sp /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 20099a8: fa 16 20 0a lduh [ %i0 + 0xa ], %i5 block_count = (information->maximum - index_base) / 20099ac: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4 20099b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 20099b4: 92 10 00 1c mov %i4, %o1 20099b8: 40 00 3b 5a call 2018720 <.udiv> 20099bc: 90 22 00 1d sub %o0, %i5, %o0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 20099c0: 80 a2 20 00 cmp %o0, 0 20099c4: 02 80 00 34 be 2009a94 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN 20099c8: 01 00 00 00 nop if ( information->inactive_per_block[ block ] == 20099cc: c8 06 20 30 ld [ %i0 + 0x30 ], %g4 20099d0: c2 01 00 00 ld [ %g4 ], %g1 20099d4: 80 a7 00 01 cmp %i4, %g1 20099d8: 02 80 00 0f be 2009a14 <_Objects_Shrink_information+0x70> <== NEVER TAKEN 20099dc: 82 10 20 00 clr %g1 20099e0: 10 80 00 07 b 20099fc <_Objects_Shrink_information+0x58> 20099e4: b6 10 20 04 mov 4, %i3 * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 20099e8: 86 06 e0 04 add %i3, 4, %g3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 20099ec: 80 a7 00 02 cmp %i4, %g2 20099f0: 02 80 00 0a be 2009a18 <_Objects_Shrink_information+0x74> 20099f4: ba 07 40 1c add %i5, %i4, %i5 20099f8: b6 10 00 03 mov %g3, %i3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 20099fc: 82 00 60 01 inc %g1 2009a00: 80 a0 40 08 cmp %g1, %o0 2009a04: 32 bf ff f9 bne,a 20099e8 <_Objects_Shrink_information+0x44> 2009a08: c4 01 00 1b ld [ %g4 + %i3 ], %g2 2009a0c: 81 c7 e0 08 ret 2009a10: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == 2009a14: b6 10 20 00 clr %i3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2009a18: 10 80 00 06 b 2009a30 <_Objects_Shrink_information+0x8c> 2009a1c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 2009a20: 80 a7 20 00 cmp %i4, 0 2009a24: 22 80 00 12 be,a 2009a6c <_Objects_Shrink_information+0xc8> 2009a28: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 2009a2c: 90 10 00 1c mov %i4, %o0 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 2009a30: c2 12 20 0a lduh [ %o0 + 0xa ], %g1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 2009a34: 80 a0 40 1d cmp %g1, %i5 2009a38: 0a bf ff fa bcs 2009a20 <_Objects_Shrink_information+0x7c> 2009a3c: f8 02 00 00 ld [ %o0 ], %i4 (index < (index_base + information->allocation_size))) { 2009a40: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2009a44: 84 07 40 02 add %i5, %g2, %g2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 2009a48: 80 a0 40 02 cmp %g1, %g2 2009a4c: 1a bf ff f6 bcc 2009a24 <_Objects_Shrink_information+0x80> 2009a50: 80 a7 20 00 cmp %i4, 0 (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 2009a54: 40 00 0e d5 call 200d5a8 <_Chain_Extract> 2009a58: 01 00 00 00 nop } } while ( the_object ); 2009a5c: 80 a7 20 00 cmp %i4, 0 2009a60: 12 bf ff f4 bne 2009a30 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN 2009a64: 90 10 00 1c mov %i4, %o0 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 2009a68: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2009a6c: 40 00 07 b2 call 200b934 <_Workspace_Free> 2009a70: d0 00 40 1b ld [ %g1 + %i3 ], %o0 information->object_blocks[ block ] = NULL; 2009a74: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 2009a78: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 2009a7c: c0 20 40 1b clr [ %g1 + %i3 ] information->inactive_per_block[ block ] = 0; 2009a80: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 information->inactive -= information->allocation_size; 2009a84: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 2009a88: c0 20 c0 1b clr [ %g3 + %i3 ] information->inactive -= information->allocation_size; 2009a8c: 82 20 80 01 sub %g2, %g1, %g1 2009a90: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] return; 2009a94: 81 c7 e0 08 ret 2009a98: 81 e8 00 00 restore =============================================================================== 0200a9e4 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200a9e4: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 200a9e8: 80 a6 60 00 cmp %i1, 0 200a9ec: 02 80 00 4c be 200ab1c <_RBTree_Extract_unprotected+0x138> 200a9f0: 01 00 00 00 nop /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 200a9f4: c2 06 20 08 ld [ %i0 + 8 ], %g1 200a9f8: 80 a0 40 19 cmp %g1, %i1 200a9fc: 22 80 00 59 be,a 200ab60 <_RBTree_Extract_unprotected+0x17c> 200aa00: c2 06 60 08 ld [ %i1 + 8 ], %g1 the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 200aa04: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200aa08: 80 a0 40 19 cmp %g1, %i1 200aa0c: 22 80 00 46 be,a 200ab24 <_RBTree_Extract_unprotected+0x140> 200aa10: c2 06 60 04 ld [ %i1 + 4 ], %g1 * 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]) { 200aa14: fa 06 60 04 ld [ %i1 + 4 ], %i5 200aa18: 80 a7 60 00 cmp %i5, 0 200aa1c: 22 80 00 4a be,a 200ab44 <_RBTree_Extract_unprotected+0x160> 200aa20: f8 06 60 08 ld [ %i1 + 8 ], %i4 200aa24: c2 06 60 08 ld [ %i1 + 8 ], %g1 200aa28: 80 a0 60 00 cmp %g1, 0 200aa2c: 32 80 00 05 bne,a 200aa40 <_RBTree_Extract_unprotected+0x5c> 200aa30: c2 07 60 08 ld [ %i5 + 8 ], %g1 200aa34: 10 80 00 50 b 200ab74 <_RBTree_Extract_unprotected+0x190> 200aa38: b8 10 00 1d mov %i5, %i4 target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 200aa3c: c2 07 60 08 ld [ %i5 + 8 ], %g1 200aa40: 80 a0 60 00 cmp %g1, 0 200aa44: 32 bf ff fe bne,a 200aa3c <_RBTree_Extract_unprotected+0x58> 200aa48: 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]; 200aa4c: f8 07 60 04 ld [ %i5 + 4 ], %i4 if(leaf) { 200aa50: 80 a7 20 00 cmp %i4, 0 200aa54: 02 80 00 54 be 200aba4 <_RBTree_Extract_unprotected+0x1c0> 200aa58: 01 00 00 00 nop leaf->parent = target->parent; 200aa5c: c2 07 40 00 ld [ %i5 ], %g1 200aa60: c2 27 00 00 st %g1, [ %i4 ] } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 200aa64: c4 07 40 00 ld [ %i5 ], %g2 target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200aa68: c2 06 40 00 ld [ %i1 ], %g1 } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 200aa6c: c8 00 a0 04 ld [ %g2 + 4 ], %g4 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; 200aa70: c6 07 60 0c ld [ %i5 + 0xc ], %g3 dir = target != target->parent->child[0]; 200aa74: 88 19 00 1d xor %g4, %i5, %g4 200aa78: 80 a0 00 04 cmp %g0, %g4 200aa7c: 88 40 20 00 addx %g0, 0, %g4 target->parent->child[dir] = leaf; 200aa80: 89 29 20 02 sll %g4, 2, %g4 200aa84: 84 00 80 04 add %g2, %g4, %g2 200aa88: f8 20 a0 04 st %i4, [ %g2 + 4 ] /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 200aa8c: c4 00 60 04 ld [ %g1 + 4 ], %g2 200aa90: 84 18 80 19 xor %g2, %i1, %g2 200aa94: 80 a0 00 02 cmp %g0, %g2 200aa98: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = target; 200aa9c: 85 28 a0 02 sll %g2, 2, %g2 200aaa0: 82 00 40 02 add %g1, %g2, %g1 200aaa4: fa 20 60 04 st %i5, [ %g1 + 4 ] /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 200aaa8: c2 06 60 08 ld [ %i1 + 8 ], %g1 200aaac: c2 27 60 08 st %g1, [ %i5 + 8 ] if (the_node->child[RBT_RIGHT]) 200aab0: c2 06 60 08 ld [ %i1 + 8 ], %g1 200aab4: 80 a0 60 00 cmp %g1, 0 200aab8: 32 80 00 02 bne,a 200aac0 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN 200aabc: fa 20 40 00 st %i5, [ %g1 ] the_node->child[RBT_RIGHT]->parent = target; target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 200aac0: c2 06 60 04 ld [ %i1 + 4 ], %g1 200aac4: c2 27 60 04 st %g1, [ %i5 + 4 ] if (the_node->child[RBT_LEFT]) 200aac8: c2 06 60 04 ld [ %i1 + 4 ], %g1 200aacc: 80 a0 60 00 cmp %g1, 0 200aad0: 32 80 00 02 bne,a 200aad8 <_RBTree_Extract_unprotected+0xf4> 200aad4: fa 20 40 00 st %i5, [ %g1 ] /* 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; 200aad8: c4 06 40 00 ld [ %i1 ], %g2 target->color = the_node->color; 200aadc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 /* 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; 200aae0: c4 27 40 00 st %g2, [ %i5 ] target->color = the_node->color; 200aae4: c2 27 60 0c st %g1, [ %i5 + 0xc ] /* 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 */ 200aae8: 80 a0 e0 00 cmp %g3, 0 200aaec: 32 80 00 06 bne,a 200ab04 <_RBTree_Extract_unprotected+0x120> 200aaf0: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (leaf) { 200aaf4: 80 a7 20 00 cmp %i4, 0 200aaf8: 32 80 00 02 bne,a 200ab00 <_RBTree_Extract_unprotected+0x11c> 200aafc: 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; 200ab00: 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; 200ab04: c0 26 60 08 clr [ %i1 + 8 ] 200ab08: c0 26 60 04 clr [ %i1 + 4 ] 200ab0c: 80 a0 60 00 cmp %g1, 0 200ab10: 02 80 00 03 be 200ab1c <_RBTree_Extract_unprotected+0x138> 200ab14: c0 26 40 00 clr [ %i1 ] 200ab18: c0 20 60 0c clr [ %g1 + 0xc ] 200ab1c: 81 c7 e0 08 ret 200ab20: 81 e8 00 00 restore the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) 200ab24: 80 a0 60 00 cmp %g1, 0 200ab28: 22 80 00 28 be,a 200abc8 <_RBTree_Extract_unprotected+0x1e4> 200ab2c: c2 06 40 00 ld [ %i1 ], %g1 * 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]) { 200ab30: fa 06 60 04 ld [ %i1 + 4 ], %i5 200ab34: 80 a7 60 00 cmp %i5, 0 200ab38: 12 bf ff bb bne 200aa24 <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN 200ab3c: c2 26 20 0c st %g1, [ %i0 + 0xc ] * the_node's location in the tree. This may cause the coloring to be * 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]; 200ab40: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED if( leaf ) { 200ab44: 80 a7 20 00 cmp %i4, 0 200ab48: 32 80 00 0c bne,a 200ab78 <_RBTree_Extract_unprotected+0x194> 200ab4c: c2 06 40 00 ld [ %i1 ], %g1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 200ab50: 7f ff fe d0 call 200a690 <_RBTree_Extract_validate_unprotected> 200ab54: 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]; 200ab58: 10 80 00 0a b 200ab80 <_RBTree_Extract_unprotected+0x19c> 200ab5c: c2 06 40 00 ld [ %i1 ], %g1 if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) 200ab60: 80 a0 60 00 cmp %g1, 0 200ab64: 22 80 00 14 be,a 200abb4 <_RBTree_Extract_unprotected+0x1d0> 200ab68: c2 06 40 00 ld [ %i1 ], %g1 the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 200ab6c: 10 bf ff a6 b 200aa04 <_RBTree_Extract_unprotected+0x20> 200ab70: c2 26 20 08 st %g1, [ %i0 + 8 ] * 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 ) { leaf->parent = the_node->parent; 200ab74: c2 06 40 00 ld [ %i1 ], %g1 200ab78: c2 27 00 00 st %g1, [ %i4 ] _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200ab7c: c2 06 40 00 ld [ %i1 ], %g1 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; 200ab80: c6 06 60 0c ld [ %i1 + 0xc ], %g3 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 200ab84: c4 00 60 04 ld [ %g1 + 4 ], %g2 200ab88: 84 18 80 19 xor %g2, %i1, %g2 200ab8c: 80 a0 00 02 cmp %g0, %g2 200ab90: 84 40 20 00 addx %g0, 0, %g2 the_node->parent->child[dir] = leaf; 200ab94: 85 28 a0 02 sll %g2, 2, %g2 200ab98: 82 00 40 02 add %g1, %g2, %g1 200ab9c: 10 bf ff d3 b 200aae8 <_RBTree_Extract_unprotected+0x104> 200aba0: f8 20 60 04 st %i4, [ %g1 + 4 ] leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 200aba4: 7f ff fe bb call 200a690 <_RBTree_Extract_validate_unprotected> 200aba8: 90 10 00 1d mov %i5, %o0 } victim_color = target->color; dir = target != target->parent->child[0]; 200abac: 10 bf ff af b 200aa68 <_RBTree_Extract_unprotected+0x84> 200abb0: c4 07 40 00 ld [ %i5 ], %g2 if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200abb4: 80 a6 00 01 cmp %i0, %g1 200abb8: 12 bf ff 93 bne 200aa04 <_RBTree_Extract_unprotected+0x20> 200abbc: c2 26 20 08 st %g1, [ %i0 + 8 ] the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 200abc0: 10 bf ff 91 b 200aa04 <_RBTree_Extract_unprotected+0x20> 200abc4: c0 26 20 08 clr [ %i0 + 8 ] if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 200abc8: 80 a6 00 01 cmp %i0, %g1 200abcc: 12 bf ff 92 bne 200aa14 <_RBTree_Extract_unprotected+0x30> 200abd0: c2 26 20 0c st %g1, [ %i0 + 0xc ] the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 200abd4: 10 bf ff 90 b 200aa14 <_RBTree_Extract_unprotected+0x30> 200abd8: c0 26 20 0c clr [ %i0 + 0xc ] =============================================================================== 0200a690 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 200a690: 9d e3 bf a0 save %sp, -96, %sp RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 200a694: c2 06 00 00 ld [ %i0 ], %g1 if(!parent->parent) return; 200a698: c4 00 40 00 ld [ %g1 ], %g2 200a69c: 80 a0 a0 00 cmp %g2, 0 200a6a0: 02 80 00 ca be 200a9c8 <_RBTree_Extract_validate_unprotected+0x338> 200a6a4: 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 == the_node->parent->child[RBT_LEFT]) 200a6a8: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a6ac: 80 a6 00 02 cmp %i0, %g2 200a6b0: 22 80 00 02 be,a 200a6b8 <_RBTree_Extract_validate_unprotected+0x28> 200a6b4: c4 00 60 08 ld [ %g1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a6b8: c6 06 20 0c ld [ %i0 + 0xc ], %g3 200a6bc: 80 a0 e0 01 cmp %g3, 1 200a6c0: 22 80 00 5e be,a 200a838 <_RBTree_Extract_validate_unprotected+0x1a8> 200a6c4: c2 06 00 00 ld [ %i0 ], %g1 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) { 200a6c8: c6 00 40 00 ld [ %g1 ], %g3 200a6cc: 80 a0 e0 00 cmp %g3, 0 200a6d0: 02 80 00 59 be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4> 200a6d4: 80 a0 a0 00 cmp %g2, 0 200a6d8: 22 80 00 07 be,a 200a6f4 <_RBTree_Extract_validate_unprotected+0x64><== NEVER TAKEN 200a6dc: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED 200a6e0: c8 00 a0 0c ld [ %g2 + 0xc ], %g4 200a6e4: 80 a1 20 01 cmp %g4, 1 200a6e8: 22 80 00 29 be,a 200a78c <_RBTree_Extract_validate_unprotected+0xfc> 200a6ec: de 00 60 04 ld [ %g1 + 4 ], %o7 _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]) && 200a6f0: c6 00 a0 08 ld [ %g2 + 8 ], %g3 200a6f4: 80 a0 e0 00 cmp %g3, 0 200a6f8: 22 80 00 07 be,a 200a714 <_RBTree_Extract_validate_unprotected+0x84> 200a6fc: c8 00 a0 04 ld [ %g2 + 4 ], %g4 200a700: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 200a704: 80 a1 20 01 cmp %g4, 1 200a708: 22 80 00 52 be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0> 200a70c: c8 00 60 04 ld [ %g1 + 4 ], %g4 !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 200a710: c8 00 a0 04 ld [ %g2 + 4 ], %g4 200a714: 80 a1 20 00 cmp %g4, 0 200a718: 22 80 00 07 be,a 200a734 <_RBTree_Extract_validate_unprotected+0xa4> 200a71c: 86 10 20 01 mov 1, %g3 200a720: c8 01 20 0c ld [ %g4 + 0xc ], %g4 200a724: 80 a1 20 01 cmp %g4, 1 200a728: 22 80 00 4a be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0> 200a72c: c8 00 60 04 ld [ %g1 + 4 ], %g4 sibling->color = RBT_RED; 200a730: 86 10 20 01 mov 1, %g3 200a734: c6 20 a0 0c st %g3, [ %g2 + 0xc ] 200a738: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200a73c: 80 a0 a0 01 cmp %g2, 1 200a740: 22 80 00 3d be,a 200a834 <_RBTree_Extract_validate_unprotected+0x1a4> 200a744: c0 20 60 0c clr [ %g1 + 0xc ] if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 200a748: c6 00 40 00 ld [ %g1 ], %g3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200a74c: 80 a0 e0 00 cmp %g3, 0 200a750: 02 80 00 0a be 200a778 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN 200a754: 84 10 20 00 clr %g2 if(!(the_node->parent->parent)) return NULL; 200a758: c8 00 c0 00 ld [ %g3 ], %g4 200a75c: 80 a1 20 00 cmp %g4, 0 200a760: 02 80 00 07 be 200a77c <_RBTree_Extract_validate_unprotected+0xec> 200a764: b0 10 00 01 mov %g1, %i0 if(the_node == the_node->parent->child[RBT_LEFT]) 200a768: c4 00 e0 04 ld [ %g3 + 4 ], %g2 200a76c: 80 a0 40 02 cmp %g1, %g2 200a770: 22 80 00 05 be,a 200a784 <_RBTree_Extract_validate_unprotected+0xf4> 200a774: c4 00 e0 08 ld [ %g3 + 8 ], %g2 c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 200a778: b0 10 00 01 mov %g1, %i0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 200a77c: 10 bf ff cf b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28> 200a780: 82 10 00 03 mov %g3, %g1 200a784: 10 bf ff cd b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28> 200a788: 82 10 00 03 mov %g3, %g1 * 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; 200a78c: c8 20 60 0c st %g4, [ %g1 + 0xc ] sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 200a790: 88 1b c0 18 xor %o7, %i0, %g4 200a794: 80 a0 00 04 cmp %g0, %g4 200a798: 9a 40 20 00 addx %g0, 0, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a79c: 98 1b 60 01 xor %o5, 1, %o4 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a7a0: 89 2b 20 02 sll %o4, 2, %g4 200a7a4: 96 00 40 04 add %g1, %g4, %o3 200a7a8: d6 02 e0 04 ld [ %o3 + 4 ], %o3 * 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; 200a7ac: c0 20 a0 0c clr [ %g2 + 0xc ] 200a7b0: 80 a2 e0 00 cmp %o3, 0 200a7b4: 02 bf ff cf be 200a6f0 <_RBTree_Extract_validate_unprotected+0x60><== NEVER TAKEN 200a7b8: 84 10 20 00 clr %g2 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a7bc: 80 a3 20 00 cmp %o4, 0 200a7c0: 02 80 00 04 be 200a7d0 <_RBTree_Extract_validate_unprotected+0x140> 200a7c4: 96 10 20 00 clr %o3 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a7c8: de 00 60 08 ld [ %g1 + 8 ], %o7 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a7cc: 96 10 20 01 mov 1, %o3 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a7d0: 9b 2b 60 02 sll %o5, 2, %o5 200a7d4: 84 03 c0 0d add %o7, %o5, %g2 200a7d8: d8 00 a0 04 ld [ %g2 + 4 ], %o4 200a7dc: 97 2a e0 02 sll %o3, 2, %o3 200a7e0: 96 00 40 0b add %g1, %o3, %o3 200a7e4: d8 22 e0 04 st %o4, [ %o3 + 4 ] if (c->child[dir]) 200a7e8: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200a7ec: 80 a0 a0 00 cmp %g2, 0 200a7f0: 02 80 00 04 be 200a800 <_RBTree_Extract_validate_unprotected+0x170><== NEVER TAKEN 200a7f4: 9a 03 c0 0d add %o7, %o5, %o5 c->child[dir]->parent = the_node; 200a7f8: c2 20 80 00 st %g1, [ %g2 ] 200a7fc: c6 00 40 00 ld [ %g1 ], %g3 c->child[dir] = the_node; 200a800: c2 23 60 04 st %g1, [ %o5 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a804: c4 00 e0 04 ld [ %g3 + 4 ], %g2 c->parent = the_node->parent; 200a808: c6 23 c0 00 st %g3, [ %o7 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a80c: 84 18 40 02 xor %g1, %g2, %g2 200a810: 80 a0 00 02 cmp %g0, %g2 200a814: 84 40 20 00 addx %g0, 0, %g2 200a818: 85 28 a0 02 sll %g2, 2, %g2 200a81c: 84 00 c0 02 add %g3, %g2, %g2 c->parent = the_node->parent; the_node->parent = c; 200a820: 88 00 40 04 add %g1, %g4, %g4 if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a824: de 20 a0 04 st %o7, [ %g2 + 4 ] c->parent = the_node->parent; the_node->parent = c; 200a828: de 20 40 00 st %o7, [ %g1 ] 200a82c: 10 bf ff b1 b 200a6f0 <_RBTree_Extract_validate_unprotected+0x60> 200a830: c4 01 20 04 ld [ %g4 + 4 ], %g2 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; 200a834: c2 06 00 00 ld [ %i0 ], %g1 200a838: c2 00 40 00 ld [ %g1 ], %g1 200a83c: 80 a0 60 00 cmp %g1, 0 200a840: 22 80 00 02 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8> 200a844: c0 26 20 0c clr [ %i0 + 0xc ] 200a848: 81 c7 e0 08 ret 200a84c: 81 e8 00 00 restore * 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]; 200a850: 88 19 00 18 xor %g4, %i0, %g4 200a854: 80 a0 00 04 cmp %g0, %g4 200a858: 9a 40 20 00 addx %g0, 0, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a85c: 98 1b 60 01 xor %o5, 1, %o4 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 200a860: 9f 2b 20 02 sll %o4, 2, %o7 200a864: 88 00 80 0f add %g2, %o7, %g4 200a868: c8 01 20 04 ld [ %g4 + 4 ], %g4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a86c: 80 a1 20 00 cmp %g4, 0 200a870: 02 80 00 06 be 200a888 <_RBTree_Extract_validate_unprotected+0x1f8> 200a874: 96 10 20 01 mov 1, %o3 200a878: d6 01 20 0c ld [ %g4 + 0xc ], %o3 200a87c: 80 a2 e0 01 cmp %o3, 1 200a880: 02 80 00 56 be 200a9d8 <_RBTree_Extract_validate_unprotected+0x348> 200a884: 96 10 20 01 mov 1, %o3 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 200a888: 89 2b 60 02 sll %o5, 2, %g4 200a88c: 88 00 80 04 add %g2, %g4, %g4 200a890: d4 01 20 04 ld [ %g4 + 4 ], %o2 * 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)])) { sibling->color = RBT_RED; 200a894: d6 20 a0 0c st %o3, [ %g2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a898: 88 1b 20 01 xor %o4, 1, %g4 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a89c: 97 29 20 02 sll %g4, 2, %o3 200a8a0: 96 00 80 0b add %g2, %o3, %o3 200a8a4: d6 02 e0 04 ld [ %o3 + 4 ], %o3 200a8a8: 80 a2 e0 00 cmp %o3, 0 200a8ac: 02 80 00 1c be 200a91c <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN 200a8b0: c0 22 a0 0c clr [ %o2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a8b4: 80 a1 20 00 cmp %g4, 0 200a8b8: 12 80 00 04 bne 200a8c8 <_RBTree_Extract_validate_unprotected+0x238> 200a8bc: 96 10 20 01 mov 1, %o3 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a8c0: c6 00 a0 04 ld [ %g2 + 4 ], %g3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a8c4: 96 10 20 00 clr %o3 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a8c8: 88 00 c0 0f add %g3, %o7, %g4 200a8cc: d4 01 20 04 ld [ %g4 + 4 ], %o2 200a8d0: 97 2a e0 02 sll %o3, 2, %o3 200a8d4: 96 00 80 0b add %g2, %o3, %o3 200a8d8: d4 22 e0 04 st %o2, [ %o3 + 4 ] if (c->child[dir]) 200a8dc: c8 01 20 04 ld [ %g4 + 4 ], %g4 200a8e0: 80 a1 20 00 cmp %g4, 0 200a8e4: 32 80 00 02 bne,a 200a8ec <_RBTree_Extract_validate_unprotected+0x25c> 200a8e8: c4 21 00 00 st %g2, [ %g4 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a8ec: c8 00 80 00 ld [ %g2 ], %g4 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200a8f0: 96 00 c0 0f add %g3, %o7, %o3 200a8f4: c4 22 e0 04 st %g2, [ %o3 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a8f8: d6 01 20 04 ld [ %g4 + 4 ], %o3 c->parent = the_node->parent; 200a8fc: c8 20 c0 00 st %g4, [ %g3 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a900: 96 18 80 0b xor %g2, %o3, %o3 c->parent = the_node->parent; the_node->parent = c; 200a904: c6 20 80 00 st %g3, [ %g2 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a908: 80 a0 00 0b cmp %g0, %o3 200a90c: 84 40 20 00 addx %g0, 0, %g2 200a910: 85 28 a0 02 sll %g2, 2, %g2 200a914: 88 01 00 02 add %g4, %g2, %g4 200a918: c6 21 20 04 st %g3, [ %g4 + 4 ] sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; 200a91c: 84 00 40 0f add %g1, %o7, %g2 200a920: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200a924: 9e 00 80 0f add %g2, %o7, %o7 200a928: c8 03 e0 04 ld [ %o7 + 4 ], %g4 200a92c: 9e 10 00 02 mov %g2, %o7 } sibling->color = parent->color; 200a930: c6 00 60 0c ld [ %g1 + 0xc ], %g3 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200a934: 80 a3 e0 00 cmp %o7, 0 200a938: c6 20 a0 0c st %g3, [ %g2 + 0xc ] parent->color = RBT_BLACK; 200a93c: c0 20 60 0c clr [ %g1 + 0xc ] 200a940: 02 bf ff bd be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN 200a944: c0 21 20 0c clr [ %g4 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a948: 80 a3 20 00 cmp %o4, 0 200a94c: 22 80 00 21 be,a 200a9d0 <_RBTree_Extract_validate_unprotected+0x340> 200a950: c4 00 60 04 ld [ %g1 + 4 ], %g2 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200a954: c4 00 60 08 ld [ %g1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a958: 88 10 20 01 mov 1, %g4 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200a95c: 9b 2b 60 02 sll %o5, 2, %o5 200a960: 86 00 80 0d add %g2, %o5, %g3 200a964: de 00 e0 04 ld [ %g3 + 4 ], %o7 200a968: 89 29 20 02 sll %g4, 2, %g4 200a96c: 88 00 40 04 add %g1, %g4, %g4 200a970: de 21 20 04 st %o7, [ %g4 + 4 ] if (c->child[dir]) 200a974: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200a978: 80 a0 e0 00 cmp %g3, 0 200a97c: 32 80 00 02 bne,a 200a984 <_RBTree_Extract_validate_unprotected+0x2f4> 200a980: c2 20 c0 00 st %g1, [ %g3 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a984: c6 00 40 00 ld [ %g1 ], %g3 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200a988: 9a 00 80 0d add %g2, %o5, %o5 200a98c: c2 23 60 04 st %g1, [ %o5 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a990: c8 00 e0 04 ld [ %g3 + 4 ], %g4 c->parent = the_node->parent; 200a994: c6 20 80 00 st %g3, [ %g2 ] the_node->parent = c; 200a998: c4 20 40 00 st %g2, [ %g1 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200a99c: 88 18 40 04 xor %g1, %g4, %g4 200a9a0: 80 a0 00 04 cmp %g0, %g4 200a9a4: 82 40 20 00 addx %g0, 0, %g1 200a9a8: 83 28 60 02 sll %g1, 2, %g1 200a9ac: 86 00 c0 01 add %g3, %g1, %g3 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; 200a9b0: c2 06 00 00 ld [ %i0 ], %g1 200a9b4: c4 20 e0 04 st %g2, [ %g3 + 4 ] 200a9b8: c2 00 40 00 ld [ %g1 ], %g1 200a9bc: 80 a0 60 00 cmp %g1, 0 200a9c0: 22 bf ff a2 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8><== NEVER TAKEN 200a9c4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 200a9c8: 81 c7 e0 08 ret 200a9cc: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200a9d0: 10 bf ff e3 b 200a95c <_RBTree_Extract_validate_unprotected+0x2cc> 200a9d4: 88 10 20 00 clr %g4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200a9d8: 9e 00 40 0f add %g1, %o7, %o7 200a9dc: 10 bf ff d5 b 200a930 <_RBTree_Extract_validate_unprotected+0x2a0> 200a9e0: de 03 e0 04 ld [ %o7 + 4 ], %o7 =============================================================================== 0200b69c <_RBTree_Find>: RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 200b69c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 200b6a0: 7f ff e1 cb call 2003dcc 200b6a4: b8 10 00 18 mov %i0, %i4 200b6a8: ba 10 00 08 mov %o0, %i5 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 200b6ac: f6 06 20 04 ld [ %i0 + 4 ], %i3 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200b6b0: 80 a6 e0 00 cmp %i3, 0 200b6b4: 02 80 00 15 be 200b708 <_RBTree_Find+0x6c> <== NEVER TAKEN 200b6b8: b0 10 20 00 clr %i0 compare_result = the_rbtree->compare_function(the_node, iter_node); 200b6bc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200b6c0: 92 10 00 1b mov %i3, %o1 200b6c4: 9f c0 40 00 call %g1 200b6c8: 90 10 00 19 mov %i1, %o0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = 200b6cc: 83 3a 20 1f sra %o0, 0x1f, %g1 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { 200b6d0: 80 a2 20 00 cmp %o0, 0 found = iter_node; if ( the_rbtree->is_unique ) break; } RBTree_Direction dir = 200b6d4: 82 20 40 08 sub %g1, %o0, %g1 200b6d8: 83 30 60 1f srl %g1, 0x1f, %g1 (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 200b6dc: 83 28 60 02 sll %g1, 2, %g1 RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { compare_result = the_rbtree->compare_function(the_node, iter_node); if ( _RBTree_Is_equal( compare_result ) ) { 200b6e0: 12 80 00 06 bne 200b6f8 <_RBTree_Find+0x5c> 200b6e4: 82 06 c0 01 add %i3, %g1, %g1 found = iter_node; if ( the_rbtree->is_unique ) 200b6e8: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2 200b6ec: 80 a0 a0 00 cmp %g2, 0 200b6f0: 12 80 00 0a bne 200b718 <_RBTree_Find+0x7c> 200b6f4: b0 10 00 1b mov %i3, %i0 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 200b6f8: f6 00 60 04 ld [ %g1 + 4 ], %i3 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 200b6fc: 80 a6 e0 00 cmp %i3, 0 200b700: 32 bf ff f0 bne,a 200b6c0 <_RBTree_Find+0x24> 200b704: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 200b708: 7f ff e1 b5 call 2003ddc 200b70c: 90 10 00 1d mov %i5, %o0 return return_node; } 200b710: 81 c7 e0 08 ret 200b714: 81 e8 00 00 restore RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 200b718: 7f ff e1 b1 call 2003ddc 200b71c: 90 10 00 1d mov %i5, %o0 return return_node; } 200b720: 81 c7 e0 08 ret 200b724: 81 e8 00 00 restore =============================================================================== 0200bb24 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 200bb24: 9d e3 bf a0 save %sp, -96, %sp size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 200bb28: 80 a6 20 00 cmp %i0, 0 200bb2c: 02 80 00 0f be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN 200bb30: 80 a6 e0 00 cmp %i3, 0 RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 200bb34: c0 26 00 00 clr [ %i0 ] the_rbtree->root = NULL; 200bb38: c0 26 20 04 clr [ %i0 + 4 ] the_rbtree->first[0] = NULL; 200bb3c: c0 26 20 08 clr [ %i0 + 8 ] the_rbtree->first[1] = NULL; 200bb40: c0 26 20 0c clr [ %i0 + 0xc ] the_rbtree->compare_function = compare_function; 200bb44: 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-- ) { 200bb48: 02 80 00 08 be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN 200bb4c: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ] _RBTree_Insert(the_rbtree, next); 200bb50: 92 10 00 1a mov %i2, %o1 200bb54: 7f ff ff b5 call 200ba28 <_RBTree_Insert> 200bb58: 90 10 00 18 mov %i0, %o0 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 200bb5c: b6 86 ff ff addcc %i3, -1, %i3 200bb60: 12 bf ff fc bne 200bb50 <_RBTree_Initialize+0x2c> 200bb64: b4 06 80 1c add %i2, %i4, %i2 200bb68: 81 c7 e0 08 ret 200bb6c: 81 e8 00 00 restore =============================================================================== 0200ac04 <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 200ac04: 9d e3 bf a0 save %sp, -96, %sp 200ac08: b8 10 00 18 mov %i0, %i4 if(!the_node) return (RBTree_Node*)-1; 200ac0c: 80 a6 60 00 cmp %i1, 0 200ac10: 02 80 00 96 be 200ae68 <_RBTree_Insert_unprotected+0x264> 200ac14: b0 10 3f ff mov -1, %i0 RBTree_Node *iter_node = the_rbtree->root; 200ac18: fa 07 20 04 ld [ %i4 + 4 ], %i5 int compare_result; if (!iter_node) { /* special case: first node inserted */ 200ac1c: 80 a7 60 00 cmp %i5, 0 200ac20: 32 80 00 05 bne,a 200ac34 <_RBTree_Insert_unprotected+0x30> 200ac24: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 the_node->color = RBT_BLACK; 200ac28: 10 80 00 a0 b 200aea8 <_RBTree_Insert_unprotected+0x2a4> 200ac2c: c0 26 60 0c clr [ %i1 + 0xc ] 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); 200ac30: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 200ac34: 92 10 00 1d mov %i5, %o1 200ac38: 9f c0 40 00 call %g1 200ac3c: 90 10 00 19 mov %i1, %o0 if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200ac40: c2 0f 20 14 ldub [ %i4 + 0x14 ], %g1 200ac44: 80 a0 60 00 cmp %g1, 0 200ac48: 22 80 00 05 be,a 200ac5c <_RBTree_Insert_unprotected+0x58> 200ac4c: 90 38 00 08 xnor %g0, %o0, %o0 200ac50: 80 a2 20 00 cmp %o0, 0 200ac54: 02 80 00 87 be 200ae70 <_RBTree_Insert_unprotected+0x26c> 200ac58: 90 38 00 08 xnor %g0, %o0, %o0 return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 200ac5c: 91 32 20 1f srl %o0, 0x1f, %o0 if (!iter_node->child[dir]) { 200ac60: 83 2a 20 02 sll %o0, 2, %g1 200ac64: 82 07 40 01 add %i5, %g1, %g1 200ac68: f0 00 60 04 ld [ %g1 + 4 ], %i0 200ac6c: 80 a6 20 00 cmp %i0, 0 200ac70: 32 bf ff f0 bne,a 200ac30 <_RBTree_Insert_unprotected+0x2c> 200ac74: ba 10 00 18 mov %i0, %i5 the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200ac78: c0 26 60 08 clr [ %i1 + 8 ] 200ac7c: c0 26 60 04 clr [ %i1 + 4 ] RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 200ac80: 90 02 20 02 add %o0, 2, %o0 200ac84: 91 2a 20 02 sll %o0, 2, %o0 the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200ac88: c4 07 00 08 ld [ %i4 + %o0 ], %g2 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; iter_node->child[dir] = the_node; 200ac8c: f2 20 60 04 st %i1, [ %g1 + 4 ] the_node->parent = iter_node; 200ac90: fa 26 40 00 st %i5, [ %i1 ] 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; 200ac94: 82 10 20 01 mov 1, %g1 iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { 200ac98: 80 a0 80 1d cmp %g2, %i5 200ac9c: 02 80 00 81 be 200aea0 <_RBTree_Insert_unprotected+0x29c> 200aca0: c2 26 60 0c st %g1, [ %i1 + 0xc ] 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; 200aca4: 9a 10 20 01 mov 1, %o5 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200aca8: c2 07 40 00 ld [ %i5 ], %g1 200acac: 84 90 60 00 orcc %g1, 0, %g2 200acb0: 22 80 00 6e be,a 200ae68 <_RBTree_Insert_unprotected+0x264> 200acb4: 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); 200acb8: c6 07 60 0c ld [ %i5 + 0xc ], %g3 200acbc: 80 a0 e0 01 cmp %g3, 1 200acc0: 12 80 00 6d bne 200ae74 <_RBTree_Insert_unprotected+0x270> 200acc4: 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; 200acc8: de 00 40 00 ld [ %g1 ], %o7 200accc: 80 a3 e0 00 cmp %o7, 0 200acd0: 02 80 00 0c be 200ad00 <_RBTree_Insert_unprotected+0xfc> <== NEVER TAKEN 200acd4: f8 00 60 04 ld [ %g1 + 4 ], %i4 { 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]) 200acd8: 80 a7 00 1d cmp %i4, %i5 200acdc: 02 80 00 6f be 200ae98 <_RBTree_Insert_unprotected+0x294> 200ace0: 86 10 00 1c mov %i4, %g3 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 200ace4: 80 a0 e0 00 cmp %g3, 0 200ace8: 22 80 00 07 be,a 200ad04 <_RBTree_Insert_unprotected+0x100> 200acec: c8 07 60 04 ld [ %i5 + 4 ], %g4 200acf0: c8 00 e0 0c ld [ %g3 + 0xc ], %g4 200acf4: 80 a1 20 01 cmp %g4, 1 200acf8: 22 80 00 61 be,a 200ae7c <_RBTree_Insert_unprotected+0x278> 200acfc: c0 27 60 0c clr [ %i5 + 0xc ] 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]; 200ad00: c8 07 60 04 ld [ %i5 + 4 ], %g4 RBTree_Direction pdir = the_node->parent != g->child[0]; 200ad04: b8 1f 00 1d xor %i4, %i5, %i4 200ad08: 80 a0 00 1c cmp %g0, %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]; 200ad0c: b8 1e 40 04 xor %i1, %g4, %i4 RBTree_Direction pdir = the_node->parent != g->child[0]; 200ad10: 86 40 20 00 addx %g0, 0, %g3 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]; 200ad14: 80 a0 00 1c cmp %g0, %i4 200ad18: b8 40 20 00 addx %g0, 0, %i4 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 200ad1c: 80 a7 00 03 cmp %i4, %g3 200ad20: 02 80 00 27 be 200adbc <_RBTree_Insert_unprotected+0x1b8> 200ad24: 9e 18 e0 01 xor %g3, 1, %o7 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200ad28: b9 2b e0 02 sll %o7, 2, %i4 200ad2c: b8 07 40 1c add %i5, %i4, %i4 200ad30: d8 07 20 04 ld [ %i4 + 4 ], %o4 200ad34: 80 a3 20 00 cmp %o4, 0 200ad38: 02 80 00 1e be 200adb0 <_RBTree_Insert_unprotected+0x1ac> <== NEVER TAKEN 200ad3c: b9 28 e0 02 sll %g3, 2, %i4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ad40: 80 a3 e0 00 cmp %o7, 0 200ad44: 02 80 00 05 be 200ad58 <_RBTree_Insert_unprotected+0x154> 200ad48: 98 10 20 00 clr %o4 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200ad4c: c8 07 60 08 ld [ %i5 + 8 ], %g4 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ad50: 98 10 20 01 mov 1, %o4 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200ad54: b9 28 e0 02 sll %g3, 2, %i4 200ad58: 9e 01 00 1c add %g4, %i4, %o7 200ad5c: d6 03 e0 04 ld [ %o7 + 4 ], %o3 200ad60: 99 2b 20 02 sll %o4, 2, %o4 200ad64: 98 07 40 0c add %i5, %o4, %o4 200ad68: d6 23 20 04 st %o3, [ %o4 + 4 ] if (c->child[dir]) 200ad6c: de 03 e0 04 ld [ %o7 + 4 ], %o7 200ad70: 80 a3 e0 00 cmp %o7, 0 200ad74: 22 80 00 05 be,a 200ad88 <_RBTree_Insert_unprotected+0x184> 200ad78: 9e 01 00 1c add %g4, %i4, %o7 c->child[dir]->parent = the_node; 200ad7c: fa 23 c0 00 st %i5, [ %o7 ] 200ad80: c2 07 40 00 ld [ %i5 ], %g1 c->child[dir] = the_node; 200ad84: 9e 01 00 1c add %g4, %i4, %o7 200ad88: fa 23 e0 04 st %i5, [ %o7 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ad8c: de 00 60 04 ld [ %g1 + 4 ], %o7 c->parent = the_node->parent; 200ad90: c2 21 00 00 st %g1, [ %g4 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ad94: 9e 1b c0 1d xor %o7, %i5, %o7 c->parent = the_node->parent; the_node->parent = c; 200ad98: c8 27 40 00 st %g4, [ %i5 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ad9c: 80 a0 00 0f cmp %g0, %o7 200ada0: ba 40 20 00 addx %g0, 0, %i5 200ada4: bb 2f 60 02 sll %i5, 2, %i5 200ada8: 82 00 40 1d add %g1, %i5, %g1 200adac: c8 20 60 04 st %g4, [ %g1 + 4 ] _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 200adb0: b2 06 40 1c add %i1, %i4, %i1 200adb4: f2 06 60 04 ld [ %i1 + 4 ], %i1 200adb8: fa 06 40 00 ld [ %i1 ], %i5 } the_node->parent->color = RBT_BLACK; 200adbc: c0 27 60 0c clr [ %i5 + 0xc ] g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 200adc0: 86 23 40 03 sub %o5, %g3, %g3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200adc4: 80 a0 00 03 cmp %g0, %g3 200adc8: 82 60 3f ff subx %g0, -1, %g1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 200adcc: 89 28 60 02 sll %g1, 2, %g4 200add0: 88 00 80 04 add %g2, %g4, %g4 200add4: c8 01 20 04 ld [ %g4 + 4 ], %g4 200add8: 80 a1 20 00 cmp %g4, 0 200addc: 02 bf ff b3 be 200aca8 <_RBTree_Insert_unprotected+0xa4> <== NEVER TAKEN 200ade0: da 20 a0 0c st %o5, [ %g2 + 0xc ] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ade4: 80 a0 60 00 cmp %g1, 0 200ade8: 22 80 00 2a be,a 200ae90 <_RBTree_Insert_unprotected+0x28c> 200adec: c2 00 a0 04 ld [ %g2 + 4 ], %g1 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; 200adf0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200adf4: ba 10 20 01 mov 1, %i5 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 200adf8: 87 28 e0 02 sll %g3, 2, %g3 200adfc: 88 00 40 03 add %g1, %g3, %g4 200ae00: f8 01 20 04 ld [ %g4 + 4 ], %i4 200ae04: bb 2f 60 02 sll %i5, 2, %i5 200ae08: ba 00 80 1d add %g2, %i5, %i5 200ae0c: f8 27 60 04 st %i4, [ %i5 + 4 ] if (c->child[dir]) 200ae10: c8 01 20 04 ld [ %g4 + 4 ], %g4 200ae14: 80 a1 20 00 cmp %g4, 0 200ae18: 32 80 00 02 bne,a 200ae20 <_RBTree_Insert_unprotected+0x21c> 200ae1c: c4 21 00 00 st %g2, [ %g4 ] c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae20: c8 00 80 00 ld [ %g2 ], %g4 the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200ae24: 86 00 40 03 add %g1, %g3, %g3 the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; 200ae28: c8 20 40 00 st %g4, [ %g1 ] the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 200ae2c: c4 20 e0 04 st %g2, [ %g3 + 4 ] the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 200ae30: c2 20 80 00 st %g1, [ %g2 ] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae34: c6 01 20 04 ld [ %g4 + 4 ], %g3 c->parent = the_node->parent; the_node->parent = c; 200ae38: fa 06 40 00 ld [ %i1 ], %i5 if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 200ae3c: 86 18 80 03 xor %g2, %g3, %g3 200ae40: 80 a0 00 03 cmp %g0, %g3 200ae44: 84 40 20 00 addx %g0, 0, %g2 200ae48: 85 28 a0 02 sll %g2, 2, %g2 200ae4c: 88 01 00 02 add %g4, %g2, %g4 200ae50: c2 21 20 04 st %g1, [ %g4 + 4 ] */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 200ae54: c2 07 40 00 ld [ %i5 ], %g1 200ae58: 84 90 60 00 orcc %g1, 0, %g2 200ae5c: 32 bf ff 98 bne,a 200acbc <_RBTree_Insert_unprotected+0xb8><== ALWAYS TAKEN 200ae60: c6 07 60 0c ld [ %i5 + 0xc ], %g3 } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 200ae64: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 200ae68: 81 c7 e0 08 ret 200ae6c: 81 e8 00 00 restore 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); if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 200ae70: b0 10 00 1d mov %i5, %i0 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 200ae74: 81 c7 e0 08 ret 200ae78: 81 e8 00 00 restore 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; u->color = RBT_BLACK; 200ae7c: c0 20 e0 0c clr [ %g3 + 0xc ] g->color = RBT_RED; 200ae80: c8 20 60 0c st %g4, [ %g1 + 0xc ] 200ae84: ba 10 00 0f mov %o7, %i5 200ae88: 10 bf ff 88 b 200aca8 <_RBTree_Insert_unprotected+0xa4> 200ae8c: b2 10 00 01 mov %g1, %i1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200ae90: 10 bf ff da b 200adf8 <_RBTree_Insert_unprotected+0x1f4> 200ae94: ba 10 20 00 clr %i5 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]) return the_node->parent->child[RBT_RIGHT]; 200ae98: 10 bf ff 93 b 200ace4 <_RBTree_Insert_unprotected+0xe0> 200ae9c: c6 00 60 08 ld [ %g1 + 8 ], %g3 the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ if (_RBTree_Is_first(the_rbtree, iter_node, dir)) { the_rbtree->first[dir] = the_node; 200aea0: 10 bf ff 81 b 200aca4 <_RBTree_Insert_unprotected+0xa0> 200aea4: f2 27 00 08 st %i1, [ %i4 + %o0 ] RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; the_rbtree->root = the_node; 200aea8: f2 27 20 04 st %i1, [ %i4 + 4 ] the_rbtree->first[0] = the_rbtree->first[1] = the_node; 200aeac: f2 27 20 0c st %i1, [ %i4 + 0xc ] 200aeb0: f2 27 20 08 st %i1, [ %i4 + 8 ] the_node->parent = (RBTree_Node *) the_rbtree; 200aeb4: f8 26 40 00 st %i4, [ %i1 ] the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 200aeb8: c0 26 60 08 clr [ %i1 + 8 ] 200aebc: c0 26 60 04 clr [ %i1 + 4 ] } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; 200aec0: 81 c7 e0 08 ret 200aec4: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200aedc <_RBTree_Iterate_unprotected>: const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 200aedc: 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); 200aee0: 80 a0 00 19 cmp %g0, %i1 200aee4: 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]; 200aee8: 82 00 60 02 add %g1, 2, %g1 200aeec: 83 28 60 02 sll %g1, 2, %g1 200aef0: 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 ) { 200aef4: 80 a7 60 00 cmp %i5, 0 200aef8: 02 80 00 0d be 200af2c <_RBTree_Iterate_unprotected+0x50> 200aefc: 90 10 00 1d mov %i5, %o0 stop = (*visitor)( current, dir, visitor_arg ); 200af00: 92 10 00 19 mov %i1, %o1 200af04: 9f c6 80 00 call %i2 200af08: 94 10 00 1b mov %i3, %o2 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200af0c: 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 ); 200af10: b8 10 00 08 mov %o0, %i4 current = _RBTree_Next_unprotected( rbtree, current, dir ); 200af14: 94 10 00 19 mov %i1, %o2 200af18: 40 00 00 07 call 200af34 <_RBTree_Next_unprotected> 200af1c: 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 ) { 200af20: 80 8f 20 ff btst 0xff, %i4 200af24: 02 bf ff f4 be 200aef4 <_RBTree_Iterate_unprotected+0x18> <== ALWAYS TAKEN 200af28: ba 10 00 08 mov %o0, %i5 200af2c: 81 c7 e0 08 ret 200af30: 81 e8 00 00 restore =============================================================================== 0200af34 <_RBTree_Next_unprotected>: const RBTree_Node *node, RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; 200af34: 85 2a a0 02 sll %o2, 2, %g2 200af38: 82 02 40 02 add %o1, %g2, %g1 200af3c: c2 00 60 04 ld [ %g1 + 4 ], %g1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 200af40: 80 a0 00 0a cmp %g0, %o2 200af44: 86 60 3f ff subx %g0, -1, %g3 RBTree_Node *next = NULL; if ( current != NULL ) { 200af48: 80 a0 60 00 cmp %g1, 0 200af4c: 02 80 00 0a be 200af74 <_RBTree_Next_unprotected+0x40> 200af50: 94 10 00 08 mov %o0, %o2 200af54: 87 28 e0 02 sll %g3, 2, %g3 next = current; while ( (current = current->child [opp_dir]) != NULL ) { 200af58: 84 00 40 03 add %g1, %g3, %g2 200af5c: c4 00 a0 04 ld [ %g2 + 4 ], %g2 200af60: 80 a0 a0 00 cmp %g2, 0 200af64: 32 bf ff fd bne,a 200af58 <_RBTree_Next_unprotected+0x24> 200af68: 82 10 00 02 mov %g2, %g1 RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; 200af6c: 81 c3 e0 08 retl 200af70: 90 10 00 01 mov %g1, %o0 while ( (current = current->child [opp_dir]) != NULL ) { next = current; } } else { const RBTree_Node *null = (const RBTree_Node *) rbtree; RBTree_Node *parent = node->parent; 200af74: c8 02 40 00 ld [ %o1 ], %g4 if ( parent != null && node == parent->child [opp_dir] ) { 200af78: 80 a2 80 04 cmp %o2, %g4 200af7c: 02 80 00 19 be 200afe0 <_RBTree_Next_unprotected+0xac> 200af80: 90 10 20 00 clr %o0 200af84: 87 28 e0 02 sll %g3, 2, %g3 200af88: 86 01 00 03 add %g4, %g3, %g3 200af8c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 200af90: 80 a0 40 09 cmp %g1, %o1 200af94: 02 80 00 13 be 200afe0 <_RBTree_Next_unprotected+0xac> 200af98: 90 10 00 04 mov %g4, %o0 next = parent; } else { while ( parent != null && node == parent->child [dir] ) { 200af9c: 82 01 00 02 add %g4, %g2, %g1 200afa0: c2 00 60 04 ld [ %g1 + 4 ], %g1 200afa4: 80 a2 40 01 cmp %o1, %g1 200afa8: 22 80 00 09 be,a 200afcc <_RBTree_Next_unprotected+0x98> <== ALWAYS TAKEN 200afac: c2 01 00 00 ld [ %g4 ], %g1 200afb0: 10 bf ff ef b 200af6c <_RBTree_Next_unprotected+0x38> <== NOT EXECUTED 200afb4: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED 200afb8: c6 00 e0 04 ld [ %g3 + 4 ], %g3 200afbc: 80 a0 c0 04 cmp %g3, %g4 200afc0: 12 bf ff eb bne 200af6c <_RBTree_Next_unprotected+0x38> 200afc4: 88 10 00 01 mov %g1, %g4 node = parent; parent = node->parent; 200afc8: c2 01 00 00 ld [ %g4 ], %g1 RBTree_Node *parent = node->parent; if ( parent != null && node == parent->child [opp_dir] ) { next = parent; } else { while ( parent != null && node == parent->child [dir] ) { 200afcc: 80 a2 80 01 cmp %o2, %g1 200afd0: 12 bf ff fa bne 200afb8 <_RBTree_Next_unprotected+0x84> 200afd4: 86 00 40 02 add %g1, %g2, %g3 } } } return next; } 200afd8: 81 c3 e0 08 retl 200afdc: 90 10 20 00 clr %o0 200afe0: 81 c3 e0 08 retl =============================================================================== 02008104 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 2008104: 9d e3 bf 98 save %sp, -104, %sp rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 2008108: 03 00 80 71 sethi %hi(0x201c400), %g1 200810c: 82 10 62 9c or %g1, 0x29c, %g1 ! 201c69c 2008110: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 2008114: 80 a7 60 00 cmp %i5, 0 2008118: 02 80 00 18 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74> 200811c: f6 00 60 28 ld [ %g1 + 0x28 ], %i3 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 2008120: 80 a6 e0 00 cmp %i3, 0 2008124: 02 80 00 15 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN 2008128: b8 10 20 00 clr %i4 return_value = rtems_task_create( 200812c: d4 07 60 04 ld [ %i5 + 4 ], %o2 2008130: d0 07 40 00 ld [ %i5 ], %o0 2008134: d2 07 60 08 ld [ %i5 + 8 ], %o1 2008138: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 200813c: d8 07 60 0c ld [ %i5 + 0xc ], %o4 2008140: 7f ff ff 70 call 2007f00 2008144: 9a 07 bf fc add %fp, -4, %o5 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 2008148: 94 92 20 00 orcc %o0, 0, %o2 200814c: 12 80 00 0d bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 2008150: d0 07 bf fc ld [ %fp + -4 ], %o0 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 2008154: d4 07 60 18 ld [ %i5 + 0x18 ], %o2 2008158: 40 00 00 0e call 2008190 200815c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 2008160: 94 92 20 00 orcc %o0, 0, %o2 2008164: 12 80 00 07 bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> 2008168: b8 07 20 01 inc %i4 return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 200816c: 80 a7 00 1b cmp %i4, %i3 2008170: 12 bf ff ef bne 200812c <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN 2008174: ba 07 60 1c add %i5, 0x1c, %i5 2008178: 81 c7 e0 08 ret 200817c: 81 e8 00 00 restore id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 2008180: 90 10 20 01 mov 1, %o0 2008184: 40 00 04 0d call 20091b8 <_Internal_error_Occurred> 2008188: 92 10 20 01 mov 1, %o1 =============================================================================== 0200d3dc <_RTEMS_tasks_Post_switch_extension>: */ static void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 200d3dc: 9d e3 bf 98 save %sp, -104, %sp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 200d3e0: fa 06 21 50 ld [ %i0 + 0x150 ], %i5 if ( !api ) 200d3e4: 80 a7 60 00 cmp %i5, 0 200d3e8: 02 80 00 1e be 200d460 <_RTEMS_tasks_Post_switch_extension+0x84><== NEVER TAKEN 200d3ec: 01 00 00 00 nop * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 200d3f0: 7f ff d4 b2 call 20026b8 200d3f4: 01 00 00 00 nop signal_set = asr->signals_posted; 200d3f8: f8 07 60 14 ld [ %i5 + 0x14 ], %i4 asr->signals_posted = 0; 200d3fc: c0 27 60 14 clr [ %i5 + 0x14 ] _ISR_Enable( level ); 200d400: 7f ff d4 b2 call 20026c8 200d404: 01 00 00 00 nop if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 200d408: 80 a7 20 00 cmp %i4, 0 200d40c: 32 80 00 04 bne,a 200d41c <_RTEMS_tasks_Post_switch_extension+0x40> 200d410: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200d414: 81 c7 e0 08 ret 200d418: 81 e8 00 00 restore return; asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200d41c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200d420: 82 00 60 01 inc %g1 rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200d424: 94 07 bf fc add %fp, -4, %o2 200d428: 37 00 00 3f sethi %hi(0xfc00), %i3 if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 200d42c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200d430: 40 00 07 76 call 200f208 200d434: 92 16 e3 ff or %i3, 0x3ff, %o1 (*asr->handler)( signal_set ); 200d438: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200d43c: 9f c0 40 00 call %g1 200d440: 90 10 00 1c mov %i4, %o0 asr->nest_level -= 1; 200d444: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200d448: d0 07 bf fc ld [ %fp + -4 ], %o0 asr->nest_level += 1; rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); (*asr->handler)( signal_set ); asr->nest_level -= 1; 200d44c: 82 00 7f ff add %g1, -1, %g1 rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 200d450: 92 16 e3 ff or %i3, 0x3ff, %o1 200d454: 94 07 bf fc add %fp, -4, %o2 200d458: 40 00 07 6c call 200f208 200d45c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] 200d460: 81 c7 e0 08 ret 200d464: 81 e8 00 00 restore =============================================================================== 0200d270 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; 200d270: c2 02 21 5c ld [ %o0 + 0x15c ], %g1 while (tvp) { 200d274: 80 a0 60 00 cmp %g1, 0 200d278: 22 80 00 0c be,a 200d2a8 <_RTEMS_tasks_Switch_extension+0x38> 200d27c: c2 02 61 5c ld [ %o1 + 0x15c ], %g1 tvp->tval = *tvp->ptr; 200d280: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->gval; 200d284: c6 00 60 08 ld [ %g1 + 8 ], %g3 * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; 200d288: c8 00 80 00 ld [ %g2 ], %g4 200d28c: c8 20 60 0c st %g4, [ %g1 + 0xc ] *tvp->ptr = tvp->gval; 200d290: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200d294: c2 00 40 00 ld [ %g1 ], %g1 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 200d298: 80 a0 60 00 cmp %g1, 0 200d29c: 32 bf ff fa bne,a 200d284 <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN 200d2a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 200d2a4: c2 02 61 5c ld [ %o1 + 0x15c ], %g1 while (tvp) { 200d2a8: 80 a0 60 00 cmp %g1, 0 200d2ac: 02 80 00 0b be 200d2d8 <_RTEMS_tasks_Switch_extension+0x68> 200d2b0: 01 00 00 00 nop tvp->gval = *tvp->ptr; 200d2b4: c4 00 60 04 ld [ %g1 + 4 ], %g2 *tvp->ptr = tvp->tval; 200d2b8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; 200d2bc: c8 00 80 00 ld [ %g2 ], %g4 200d2c0: c8 20 60 08 st %g4, [ %g1 + 8 ] *tvp->ptr = tvp->tval; 200d2c4: c6 20 80 00 st %g3, [ %g2 ] tvp = (rtems_task_variable_t *)tvp->next; 200d2c8: c2 00 40 00 ld [ %g1 ], %g1 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 200d2cc: 80 a0 60 00 cmp %g1, 0 200d2d0: 32 bf ff fa bne,a 200d2b8 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN 200d2d4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 200d2d8: 81 c3 e0 08 retl =============================================================================== 020439fc <_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 ) { 20439fc: 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; 2043a00: 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 ); 2043a04: 7f ff a8 f3 call 202ddd0 <_TOD_Get_uptime> 2043a08: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2043a0c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4 _Timestamp_Subtract( 2043a10: c4 1f bf f8 ldd [ %fp + -8 ], %g2 * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2043a14: 03 00 81 d0 sethi %hi(0x2074000), %g1 2043a18: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 20741a0 <_Per_CPU_Information> 2043a1c: c8 00 60 0c ld [ %g1 + 0xc ], %g4 2043a20: 9a a0 c0 0d subcc %g3, %o5, %o5 2043a24: 98 60 80 0c subx %g2, %o4, %o4 2043a28: d8 3e 40 00 std %o4, [ %i1 ] 2043a2c: 80 a1 00 1d cmp %g4, %i5 #endif /* * Determine cpu usage since period initiated. */ used = owning_thread->cpu_time_used; 2043a30: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ if (owning_thread == _Thread_Executing) { 2043a34: 02 80 00 05 be 2043a48 <_Rate_monotonic_Get_status+0x4c> 2043a38: b2 10 20 01 mov 1, %i1 return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; } 2043a3c: b0 0e 60 01 and %i1, 1, %i0 2043a40: 81 c7 e0 08 ret 2043a44: 81 e8 00 00 restore 2043a48: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2043a4c: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0 2043a50: 86 a0 c0 0b subcc %g3, %o3, %g3 2043a54: 84 60 80 0a subx %g2, %o2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2043a58: 86 83 40 03 addcc %o5, %g3, %g3 2043a5c: 84 43 00 02 addx %o4, %g2, %g2 /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 2043a60: 80 a6 00 02 cmp %i0, %g2 2043a64: 34 bf ff f6 bg,a 2043a3c <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN 2043a68: b2 10 20 00 clr %i1 <== NOT EXECUTED 2043a6c: 02 80 00 09 be 2043a90 <_Rate_monotonic_Get_status+0x94> 2043a70: 80 a6 40 03 cmp %i1, %g3 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 2043a74: 86 a0 c0 19 subcc %g3, %i1, %g3 if (used < the_period->cpu_usage_period_initiated) return false; *cpu_since_last_period = used - the_period->cpu_usage_period_initiated; #endif return true; 2043a78: b2 10 20 01 mov 1, %i1 2043a7c: 84 60 80 18 subx %g2, %i0, %g2 } 2043a80: b0 0e 60 01 and %i1, 1, %i0 2043a84: c4 3e 80 00 std %g2, [ %i2 ] 2043a88: 81 c7 e0 08 ret 2043a8c: 81 e8 00 00 restore /* * The cpu usage info was reset while executing. Can't * determine a status. */ if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated)) 2043a90: 28 bf ff fa bleu,a 2043a78 <_Rate_monotonic_Get_status+0x7c> 2043a94: 86 a0 c0 19 subcc %g3, %i1, %g3 return false; 2043a98: 10 bf ff e9 b 2043a3c <_Rate_monotonic_Get_status+0x40> 2043a9c: b2 10 20 00 clr %i1 =============================================================================== 02043e3c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2043e3c: 9d e3 bf 98 save %sp, -104, %sp 2043e40: 11 00 81 d1 sethi %hi(0x2074400), %o0 2043e44: 92 10 00 18 mov %i0, %o1 2043e48: 90 12 20 70 or %o0, 0x70, %o0 2043e4c: 7f ff 2f 28 call 200faec <_Objects_Get> 2043e50: 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 ) { 2043e54: c2 07 bf fc ld [ %fp + -4 ], %g1 2043e58: 80 a0 60 00 cmp %g1, 0 2043e5c: 12 80 00 17 bne 2043eb8 <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN 2043e60: ba 10 00 08 mov %o0, %i5 case OBJECTS_LOCAL: the_thread = the_period->owner; 2043e64: d0 02 20 40 ld [ %o0 + 0x40 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2043e68: 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); 2043e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2043e70: 80 88 80 01 btst %g2, %g1 2043e74: 22 80 00 08 be,a 2043e94 <_Rate_monotonic_Timeout+0x58> 2043e78: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2043e7c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 2043e80: c2 07 60 08 ld [ %i5 + 8 ], %g1 2043e84: 80 a0 80 01 cmp %g2, %g1 2043e88: 02 80 00 1a be 2043ef0 <_Rate_monotonic_Timeout+0xb4> 2043e8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 _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 ) { 2043e90: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 2043e94: 80 a0 60 01 cmp %g1, 1 2043e98: 02 80 00 0a be 2043ec0 <_Rate_monotonic_Timeout+0x84> 2043e9c: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 2043ea0: 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--; 2043ea4: 03 00 81 cf sethi %hi(0x2073c00), %g1 2043ea8: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level> 2043eac: 84 00 bf ff add %g2, -1, %g2 2043eb0: c4 20 63 70 st %g2, [ %g1 + 0x370 ] return _Thread_Dispatch_disable_level; 2043eb4: c2 00 63 70 ld [ %g1 + 0x370 ], %g1 2043eb8: 81 c7 e0 08 ret 2043ebc: 81 e8 00 00 restore _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2043ec0: 82 10 20 03 mov 3, %g1 _Rate_monotonic_Initiate_statistics( the_period ); 2043ec4: 90 10 00 1d mov %i5, %o0 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 2043ec8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] _Rate_monotonic_Initiate_statistics( the_period ); 2043ecc: 7f ff ff 44 call 2043bdc <_Rate_monotonic_Initiate_statistics> 2043ed0: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2043ed4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2043ed8: 11 00 81 d0 sethi %hi(0x2074000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2043edc: c2 27 60 1c st %g1, [ %i5 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2043ee0: 90 12 20 30 or %o0, 0x30, %o0 2043ee4: 7f ff 36 5d call 2011858 <_Watchdog_Insert> 2043ee8: 92 07 60 10 add %i5, 0x10, %o1 2043eec: 30 bf ff ee b,a 2043ea4 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2043ef0: 7f ff 31 f1 call 20106b4 <_Thread_Clear_state> 2043ef4: 92 12 63 f8 or %o1, 0x3f8, %o1 the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 2043ef8: 10 bf ff f5 b 2043ecc <_Rate_monotonic_Timeout+0x90> 2043efc: 90 10 00 1d mov %i5, %o0 =============================================================================== 02043aa0 <_Rate_monotonic_Update_statistics>: } static void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 2043aa0: 9d e3 bf 90 save %sp, -112, %sp /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2043aa4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2043aa8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 2043aac: 84 00 a0 01 inc %g2 if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 2043ab0: 80 a0 60 04 cmp %g1, 4 2043ab4: 02 80 00 46 be 2043bcc <_Rate_monotonic_Update_statistics+0x12c> 2043ab8: c4 26 20 58 st %g2, [ %i0 + 0x58 ] stats->missed_count++; /* * Grab status for time statistics. */ valid_status = 2043abc: 90 10 00 18 mov %i0, %o0 2043ac0: 92 07 bf f8 add %fp, -8, %o1 2043ac4: 7f ff ff ce call 20439fc <_Rate_monotonic_Get_status> 2043ac8: 94 07 bf f0 add %fp, -16, %o2 _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) 2043acc: 80 8a 20 ff btst 0xff, %o0 2043ad0: 02 80 00 21 be 2043b54 <_Rate_monotonic_Update_statistics+0xb4> 2043ad4: c4 1f bf f0 ldd [ %fp + -16 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2043ad8: 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 ) ) 2043adc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1 2043ae0: 9a 83 40 03 addcc %o5, %g3, %o5 2043ae4: 98 43 00 02 addx %o4, %g2, %o4 2043ae8: 80 a0 40 02 cmp %g1, %g2 2043aec: 04 80 00 1c ble 2043b5c <_Rate_monotonic_Update_statistics+0xbc> 2043af0: d8 3e 20 70 std %o4, [ %i0 + 0x70 ] stats->min_cpu_time = executed; 2043af4: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2043af8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 2043afc: 80 a0 40 02 cmp %g1, %g2 2043b00: 26 80 00 05 bl,a 2043b14 <_Rate_monotonic_Update_statistics+0x74><== NEVER TAKEN 2043b04: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED 2043b08: 80 a0 40 02 cmp %g1, %g2 2043b0c: 22 80 00 2b be,a 2043bb8 <_Rate_monotonic_Update_statistics+0x118><== ALWAYS TAKEN 2043b10: c2 06 20 6c ld [ %i0 + 0x6c ], %g1 /* * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); 2043b14: c4 1f bf f8 ldd [ %fp + -8 ], %g2 2043b18: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4 if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 2043b1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2043b20: 9a 83 40 03 addcc %o5, %g3, %o5 2043b24: 98 43 00 02 addx %o4, %g2, %o4 2043b28: 80 a0 40 02 cmp %g1, %g2 2043b2c: 14 80 00 1e bg 2043ba4 <_Rate_monotonic_Update_statistics+0x104> 2043b30: d8 3e 20 88 std %o4, [ %i0 + 0x88 ] 2043b34: 80 a0 40 02 cmp %g1, %g2 2043b38: 22 80 00 18 be,a 2043b98 <_Rate_monotonic_Update_statistics+0xf8><== ALWAYS TAKEN 2043b3c: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2043b40: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2043b44: 80 a0 40 02 cmp %g1, %g2 2043b48: 16 80 00 0d bge 2043b7c <_Rate_monotonic_Update_statistics+0xdc><== ALWAYS TAKEN 2043b4c: 01 00 00 00 nop stats->max_wall_time = since_last_period; 2043b50: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED 2043b54: 81 c7 e0 08 ret 2043b58: 81 e8 00 00 restore * 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 ) ) 2043b5c: 32 bf ff e8 bne,a 2043afc <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN 2043b60: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED 2043b64: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 2043b68: 80 a0 40 03 cmp %g1, %g3 2043b6c: 28 bf ff e4 bleu,a 2043afc <_Rate_monotonic_Update_statistics+0x5c> 2043b70: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 stats->min_cpu_time = executed; 2043b74: 10 bf ff e1 b 2043af8 <_Rate_monotonic_Update_statistics+0x58> 2043b78: c4 3e 20 60 std %g2, [ %i0 + 0x60 ] _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2043b7c: 12 bf ff f6 bne 2043b54 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN 2043b80: 01 00 00 00 nop 2043b84: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 2043b88: 80 a0 40 03 cmp %g1, %g3 2043b8c: 2a bf ff f2 bcs,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4> 2043b90: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] 2043b94: 30 bf ff f0 b,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4> * Update Wall time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_wall_time, &since_last_period ); if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 2043b98: 80 a0 40 03 cmp %g1, %g3 2043b9c: 28 bf ff ea bleu,a 2043b44 <_Rate_monotonic_Update_statistics+0xa4> 2043ba0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 2043ba4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2043ba8: 80 a0 40 02 cmp %g1, %g2 2043bac: 06 bf ff e9 bl 2043b50 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN 2043bb0: c4 3e 20 78 std %g2, [ %i0 + 0x78 ] 2043bb4: 30 bf ff f2 b,a 2043b7c <_Rate_monotonic_Update_statistics+0xdc> _Timestamp_Add_to( &stats->total_cpu_time, &executed ); if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) stats->min_cpu_time = executed; if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 2043bb8: 80 a0 40 03 cmp %g1, %g3 2043bbc: 3a bf ff d7 bcc,a 2043b18 <_Rate_monotonic_Update_statistics+0x78> 2043bc0: c4 1f bf f8 ldd [ %fp + -8 ], %g2 stats->max_cpu_time = executed; 2043bc4: 10 bf ff d4 b 2043b14 <_Rate_monotonic_Update_statistics+0x74> 2043bc8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 2043bcc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 2043bd0: 82 00 60 01 inc %g1 2043bd4: 10 bf ff ba b 2043abc <_Rate_monotonic_Update_statistics+0x1c> 2043bd8: c2 26 20 5c st %g1, [ %i0 + 0x5c ] =============================================================================== 0200ba90 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 200ba90: 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; 200ba94: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200ba98: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200ba9c: 80 a0 40 09 cmp %g1, %o1 200baa0: 32 80 00 02 bne,a 200baa8 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN 200baa4: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200baa8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200baac: 80 a0 40 09 cmp %g1, %o1 200bab0: 02 80 00 04 be 200bac0 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN 200bab4: 90 10 00 18 mov %i0, %o0 _Thread_Change_priority(the_thread, new_priority, true); 200bab8: 40 00 01 99 call 200c11c <_Thread_Change_priority> 200babc: 94 10 20 01 mov 1, %o2 /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 200bac0: f0 06 20 88 ld [ %i0 + 0x88 ], %i0 if ( sched_info->cbs_server->cbs_budget_overrun ) { 200bac4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bac8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 200bacc: 80 a0 a0 00 cmp %g2, 0 200bad0: 02 80 00 09 be 200baf4 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN 200bad4: 01 00 00 00 nop _Scheduler_CBS_Get_server_id( 200bad8: d0 00 40 00 ld [ %g1 ], %o0 200badc: 7f ff ff d1 call 200ba20 <_Scheduler_CBS_Get_server_id> 200bae0: 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 ); 200bae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200bae8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 200baec: 9f c0 40 00 call %g1 200baf0: d0 07 bf fc ld [ %fp + -4 ], %o0 200baf4: 81 c7 e0 08 ret 200baf8: 81 e8 00 00 restore =============================================================================== 0200b5f8 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { 200b5f8: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b5fc: 39 00 80 7f sethi %hi(0x201fc00), %i4 200b600: c2 07 22 e8 ld [ %i4 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers> 200b604: 80 a0 60 00 cmp %g1, 0 200b608: 02 80 00 18 be 200b668 <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN 200b60c: 03 00 80 83 sethi %hi(0x2020c00), %g1 200b610: 37 00 80 83 sethi %hi(0x2020c00), %i3 200b614: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2 ! 2020e38 <_Scheduler_CBS_Server_list> 200b618: ba 10 20 00 clr %i5 200b61c: b8 17 22 e8 or %i4, 0x2e8, %i4 if ( _Scheduler_CBS_Server_list[ i ] ) 200b620: 83 2f 60 02 sll %i5, 2, %g1 200b624: c2 00 80 01 ld [ %g2 + %g1 ], %g1 200b628: 80 a0 60 00 cmp %g1, 0 200b62c: 02 80 00 05 be 200b640 <_Scheduler_CBS_Cleanup+0x48> 200b630: 90 10 00 1d mov %i5, %o0 _Scheduler_CBS_Destroy_server( i ); 200b634: 40 00 00 45 call 200b748 <_Scheduler_CBS_Destroy_server> 200b638: 01 00 00 00 nop 200b63c: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b640: c2 07 00 00 ld [ %i4 ], %g1 200b644: ba 07 60 01 inc %i5 200b648: 80 a0 40 1d cmp %g1, %i5 200b64c: 18 bf ff f6 bgu 200b624 <_Scheduler_CBS_Cleanup+0x2c> 200b650: 83 2f 60 02 sll %i5, 2, %g1 if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); return SCHEDULER_CBS_OK; } 200b654: b0 10 20 00 clr %i0 for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); 200b658: 40 00 08 51 call 200d79c <_Workspace_Free> 200b65c: 90 10 00 02 mov %g2, %o0 return SCHEDULER_CBS_OK; } 200b660: 81 c7 e0 08 ret 200b664: 81 e8 00 00 restore int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200b668: 10 bf ff fb b 200b654 <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED 200b66c: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 <== NOT EXECUTED =============================================================================== 0200b670 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 200b670: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b674: 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 ) { 200b678: ba 10 00 18 mov %i0, %i5 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 200b67c: 80 a0 60 00 cmp %g1, 0 200b680: 04 80 00 30 ble 200b740 <_Scheduler_CBS_Create_server+0xd0> 200b684: b0 10 3f ee mov -18, %i0 200b688: c2 07 40 00 ld [ %i5 ], %g1 200b68c: 80 a0 60 00 cmp %g1, 0 200b690: 04 80 00 2c ble 200b740 <_Scheduler_CBS_Create_server+0xd0> 200b694: 03 00 80 7f sethi %hi(0x201fc00), %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++ ) { 200b698: c6 00 62 e8 ld [ %g1 + 0x2e8 ], %g3 ! 201fee8 <_Scheduler_CBS_Maximum_servers> 200b69c: 80 a0 e0 00 cmp %g3, 0 200b6a0: 02 80 00 28 be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200b6a4: b0 10 3f e6 mov -26, %i0 if ( !_Scheduler_CBS_Server_list[i] ) 200b6a8: 37 00 80 83 sethi %hi(0x2020c00), %i3 200b6ac: f8 06 e2 38 ld [ %i3 + 0x238 ], %i4 ! 2020e38 <_Scheduler_CBS_Server_list> 200b6b0: c2 07 00 00 ld [ %i4 ], %g1 200b6b4: 80 a0 60 00 cmp %g1, 0 200b6b8: 02 80 00 0e be 200b6f0 <_Scheduler_CBS_Create_server+0x80> 200b6bc: 82 10 20 00 clr %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++ ) { 200b6c0: 10 80 00 07 b 200b6dc <_Scheduler_CBS_Create_server+0x6c> 200b6c4: 82 00 60 01 inc %g1 if ( !_Scheduler_CBS_Server_list[i] ) 200b6c8: c4 07 00 18 ld [ %i4 + %i0 ], %g2 200b6cc: 80 a0 a0 00 cmp %g2, 0 200b6d0: 22 80 00 0a be,a 200b6f8 <_Scheduler_CBS_Create_server+0x88> 200b6d4: c2 26 80 00 st %g1, [ %i2 ] 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++ ) { 200b6d8: 82 00 60 01 inc %g1 200b6dc: 80 a0 40 03 cmp %g1, %g3 200b6e0: 12 bf ff fa bne 200b6c8 <_Scheduler_CBS_Create_server+0x58> 200b6e4: b1 28 60 02 sll %g1, 2, %i0 if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 200b6e8: 81 c7 e0 08 ret 200b6ec: 91 e8 3f e6 restore %g0, -26, %o0 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++ ) { if ( !_Scheduler_CBS_Server_list[i] ) 200b6f0: b0 10 20 00 clr %i0 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 200b6f4: c2 26 80 00 st %g1, [ %i2 ] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 200b6f8: 40 00 08 21 call 200d77c <_Workspace_Allocate> 200b6fc: 90 10 20 10 mov 0x10, %o0 the_server = _Scheduler_CBS_Server_list[*server_id]; 200b700: 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 *) 200b704: d0 27 00 18 st %o0, [ %i4 + %i0 ] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 200b708: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2 200b70c: 83 28 60 02 sll %g1, 2, %g1 200b710: c2 00 80 01 ld [ %g2 + %g1 ], %g1 if ( !the_server ) 200b714: 80 a0 60 00 cmp %g1, 0 200b718: 02 80 00 0a be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN 200b71c: b0 10 3f ef mov -17, %i0 return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; 200b720: c4 07 40 00 ld [ %i5 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 200b724: 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; 200b728: c4 20 60 04 st %g2, [ %g1 + 4 ] 200b72c: c4 07 60 04 ld [ %i5 + 4 ], %g2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 200b730: 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; 200b734: c4 20 60 08 st %g2, [ %g1 + 8 ] the_server->task_id = -1; 200b738: 84 10 3f ff mov -1, %g2 200b73c: c4 20 40 00 st %g2, [ %g1 ] the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 200b740: 81 c7 e0 08 ret 200b744: 81 e8 00 00 restore =============================================================================== 0200b7b8 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 200b7b8: 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); 200b7bc: 92 07 bf fc add %fp, -4, %o1 200b7c0: 40 00 03 a1 call 200c644 <_Thread_Get> 200b7c4: 90 10 00 19 mov %i1, %o0 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 200b7c8: ba 92 20 00 orcc %o0, 0, %i5 200b7cc: 22 80 00 05 be,a 200b7e0 <_Scheduler_CBS_Detach_thread+0x28> 200b7d0: 03 00 80 7f sethi %hi(0x201fc00), %g1 _Thread_Enable_dispatch(); 200b7d4: 40 00 03 8f call 200c610 <_Thread_Enable_dispatch> 200b7d8: 01 00 00 00 nop } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 200b7dc: 03 00 80 7f sethi %hi(0x201fc00), %g1 200b7e0: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 ! 201fee8 <_Scheduler_CBS_Maximum_servers> 200b7e4: 80 a0 80 18 cmp %g2, %i0 200b7e8: 08 80 00 1b bleu 200b854 <_Scheduler_CBS_Detach_thread+0x9c> 200b7ec: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 200b7f0: 80 a7 60 00 cmp %i5, 0 200b7f4: 02 80 00 18 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c> 200b7f8: 01 00 00 00 nop return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 200b7fc: 03 00 80 83 sethi %hi(0x2020c00), %g1 200b800: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 2020e38 <_Scheduler_CBS_Server_list> 200b804: b1 2e 20 02 sll %i0, 2, %i0 200b808: c4 00 40 18 ld [ %g1 + %i0 ], %g2 200b80c: 80 a0 a0 00 cmp %g2, 0 200b810: 02 80 00 11 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c> 200b814: 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 ) 200b818: c6 00 80 00 ld [ %g2 ], %g3 200b81c: 80 a0 c0 19 cmp %g3, %i1 200b820: 12 80 00 0d bne 200b854 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN 200b824: 82 10 3f ee mov -18, %g1 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b828: c8 07 60 88 ld [ %i5 + 0x88 ], %g4 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b82c: 82 10 3f ff mov -1, %g1 sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b830: c6 07 60 a0 ld [ %i5 + 0xa0 ], %g3 return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 200b834: c2 20 80 00 st %g1, [ %g2 ] sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b838: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1 _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 200b83c: c4 07 60 a4 ld [ %i5 + 0xa4 ], %g2 if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 200b840: c0 21 20 18 clr [ %g4 + 0x18 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; 200b844: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ] _Scheduler_CBS_Server_list[server_id]->task_id = -1; sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200b848: c6 27 60 78 st %g3, [ %i5 + 0x78 ] the_thread->budget_callout = the_thread->Start.budget_callout; 200b84c: c4 27 60 7c st %g2, [ %i5 + 0x7c ] the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; 200b850: 82 10 20 00 clr %g1 } 200b854: 81 c7 e0 08 ret 200b858: 91 e8 00 01 restore %g0, %g1, %o0 =============================================================================== 0200ba20 <_Scheduler_CBS_Get_server_id>: int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200ba20: 9d e3 bf a0 save %sp, -96, %sp unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200ba24: 03 00 80 7f sethi %hi(0x201fc00), %g1 200ba28: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers> int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 200ba2c: 84 10 00 18 mov %i0, %g2 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200ba30: 80 a0 60 00 cmp %g1, 0 200ba34: 02 80 00 13 be 200ba80 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN 200ba38: b0 10 3f e7 mov -25, %i0 200ba3c: 07 00 80 83 sethi %hi(0x2020c00), %g3 200ba40: de 00 e2 38 ld [ %g3 + 0x238 ], %o7 ! 2020e38 <_Scheduler_CBS_Server_list> 200ba44: 86 10 20 00 clr %g3 #include #include #include #include int _Scheduler_CBS_Get_server_id ( 200ba48: 89 28 e0 02 sll %g3, 2, %g4 Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && 200ba4c: c8 03 c0 04 ld [ %o7 + %g4 ], %g4 200ba50: 80 a1 20 00 cmp %g4, 0 200ba54: 22 80 00 07 be,a 200ba70 <_Scheduler_CBS_Get_server_id+0x50> 200ba58: 86 00 e0 01 inc %g3 200ba5c: c8 01 00 00 ld [ %g4 ], %g4 200ba60: 80 a1 00 02 cmp %g4, %g2 200ba64: 22 80 00 09 be,a 200ba88 <_Scheduler_CBS_Get_server_id+0x68> 200ba68: c6 26 40 00 st %g3, [ %i1 ] rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 200ba6c: 86 00 e0 01 inc %g3 200ba70: 80 a0 c0 01 cmp %g3, %g1 200ba74: 12 bf ff f6 bne 200ba4c <_Scheduler_CBS_Get_server_id+0x2c> 200ba78: 89 28 e0 02 sll %g3, 2, %g4 _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; 200ba7c: b0 10 3f e7 mov -25, %i0 } 200ba80: 81 c7 e0 08 ret 200ba84: 81 e8 00 00 restore unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[i] && _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; 200ba88: 81 c7 e0 08 ret 200ba8c: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 0200bafc <_Scheduler_CBS_Initialize>: } } int _Scheduler_CBS_Initialize(void) { 200bafc: 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*) ); 200bb00: 3b 00 80 7f sethi %hi(0x201fc00), %i5 200bb04: d0 07 62 e8 ld [ %i5 + 0x2e8 ], %o0 ! 201fee8 <_Scheduler_CBS_Maximum_servers> if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 200bb08: b0 10 3f ef mov -17, %i0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 200bb0c: 40 00 07 1c call 200d77c <_Workspace_Allocate> 200bb10: 91 2a 20 02 sll %o0, 2, %o0 200bb14: 09 00 80 83 sethi %hi(0x2020c00), %g4 _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 200bb18: 80 a2 20 00 cmp %o0, 0 200bb1c: 02 80 00 0f be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200bb20: d0 21 22 38 st %o0, [ %g4 + 0x238 ] return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 200bb24: c6 07 62 e8 ld [ %i5 + 0x2e8 ], %g3 200bb28: 80 a0 e0 00 cmp %g3, 0 200bb2c: 02 80 00 0b be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN 200bb30: b0 10 20 00 clr %i0 200bb34: 10 80 00 03 b 200bb40 <_Scheduler_CBS_Initialize+0x44> 200bb38: 82 10 20 00 clr %g1 200bb3c: d0 01 22 38 ld [ %g4 + 0x238 ], %o0 _Scheduler_CBS_Server_list[i] = NULL; 200bb40: 85 28 60 02 sll %g1, 2, %g2 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++) { 200bb44: 82 00 60 01 inc %g1 200bb48: 80 a0 40 03 cmp %g1, %g3 200bb4c: 12 bf ff fc bne 200bb3c <_Scheduler_CBS_Initialize+0x40> 200bb50: c0 22 00 02 clr [ %o0 + %g2 ] _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 200bb54: b0 10 20 00 clr %i0 } 200bb58: 81 c7 e0 08 ret 200bb5c: 81 e8 00 00 restore =============================================================================== 0200a654 <_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; 200a654: c2 02 20 88 ld [ %o0 + 0x88 ], %g1 if (deadline) { 200a658: 80 a2 60 00 cmp %o1, 0 200a65c: 02 80 00 11 be 200a6a0 <_Scheduler_CBS_Release_job+0x4c> 200a660: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 /* Initializing or shifting deadline. */ if (serv_info) 200a664: 80 a0 60 00 cmp %g1, 0 200a668: 02 80 00 13 be 200a6b4 <_Scheduler_CBS_Release_job+0x60> 200a66c: 07 00 80 7c sethi %hi(0x201f000), %g3 new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 200a670: c4 00 60 04 ld [ %g1 + 4 ], %g2 200a674: d2 00 e0 d0 ld [ %g3 + 0xd0 ], %o1 200a678: 92 02 40 02 add %o1, %g2, %o1 200a67c: 05 20 00 00 sethi %hi(0x80000000), %g2 200a680: 92 2a 40 02 andn %o1, %g2, %o1 new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; 200a684: c2 00 60 08 ld [ %g1 + 8 ], %g1 200a688: c2 22 20 74 st %g1, [ %o0 + 0x74 ] the_thread->real_priority = new_priority; 200a68c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] _Thread_Change_priority(the_thread, new_priority, true); 200a690: 94 10 20 01 mov 1, %o2 200a694: 82 13 c0 00 mov %o7, %g1 200a698: 40 00 01 45 call 200abac <_Thread_Change_priority> 200a69c: 9e 10 40 00 mov %g1, %o7 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) 200a6a0: 80 a0 60 00 cmp %g1, 0 200a6a4: 12 bf ff f8 bne 200a684 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN 200a6a8: d2 02 20 ac ld [ %o0 + 0xac ], %o1 the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 200a6ac: 10 bf ff f9 b 200a690 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED 200a6b0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 200a6b4: 03 00 80 7c sethi %hi(0x201f000), %g1 200a6b8: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 201f0d0 <_Watchdog_Ticks_since_boot> 200a6bc: 92 02 40 01 add %o1, %g1, %o1 200a6c0: 03 20 00 00 sethi %hi(0x80000000), %g1 200a6c4: 10 bf ff f2 b 200a68c <_Scheduler_CBS_Release_job+0x38> 200a6c8: 92 2a 40 01 andn %o1, %g1, %o1 =============================================================================== 0200a6cc <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 200a6cc: 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); 200a6d0: 40 00 00 5b call 200a83c <_Scheduler_EDF_Enqueue> 200a6d4: 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; 200a6d8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 200a6dc: 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) { 200a6e0: 80 a7 60 00 cmp %i5, 0 200a6e4: 02 80 00 19 be 200a748 <_Scheduler_CBS_Unblock+0x7c> 200a6e8: 03 00 80 7c sethi %hi(0x201f000), %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 ) { 200a6ec: 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 - 200a6f0: d0 00 60 d0 ld [ %g1 + 0xd0 ], %o0 200a6f4: f8 06 20 18 ld [ %i0 + 0x18 ], %i4 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 200a6f8: 40 00 3e 3a call 2019fe0 <.umul> 200a6fc: 90 27 00 08 sub %i4, %o0, %o0 200a700: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 200a704: b6 10 00 08 mov %o0, %i3 200a708: 40 00 3e 36 call 2019fe0 <.umul> 200a70c: d0 07 60 08 ld [ %i5 + 8 ], %o0 200a710: 80 a6 c0 08 cmp %i3, %o0 200a714: 24 80 00 0e ble,a 200a74c <_Scheduler_CBS_Unblock+0x80> 200a718: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 200a71c: d2 06 20 ac ld [ %i0 + 0xac ], %o1 if ( the_thread->real_priority != new_priority ) 200a720: 80 a7 00 09 cmp %i4, %o1 200a724: 32 80 00 02 bne,a 200a72c <_Scheduler_CBS_Unblock+0x60> 200a728: d2 26 20 18 st %o1, [ %i0 + 0x18 ] the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) 200a72c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 200a730: 80 a2 00 09 cmp %o0, %o1 200a734: 02 80 00 07 be 200a750 <_Scheduler_CBS_Unblock+0x84> 200a738: 3b 00 80 7c sethi %hi(0x201f000), %i5 _Thread_Change_priority(the_thread, new_priority, true); 200a73c: 90 10 00 18 mov %i0, %o0 200a740: 40 00 01 1b call 200abac <_Thread_Change_priority> 200a744: 94 10 20 01 mov 1, %o2 200a748: d0 06 20 14 ld [ %i0 + 0x14 ], %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_higher_than( the_thread->current_priority, 200a74c: 3b 00 80 7c sethi %hi(0x201f000), %i5 200a750: ba 17 61 f0 or %i5, 0x1f0, %i5 ! 201f1f0 <_Per_CPU_Information> 200a754: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a758: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 200a75c: 03 00 80 78 sethi %hi(0x201e000), %g1 200a760: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 201e2fc <_Scheduler+0x30> 200a764: 9f c0 40 00 call %g1 200a768: 01 00 00 00 nop 200a76c: 80 a2 20 00 cmp %o0, 0 200a770: 04 80 00 0a ble 200a798 <_Scheduler_CBS_Unblock+0xcc> 200a774: 01 00 00 00 nop _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a778: 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; 200a77c: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a780: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a784: 80 a0 60 00 cmp %g1, 0 200a788: 22 80 00 06 be,a 200a7a0 <_Scheduler_CBS_Unblock+0xd4> 200a78c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a790: 82 10 20 01 mov 1, %g1 200a794: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 200a798: 81 c7 e0 08 ret 200a79c: 81 e8 00 00 restore * 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; if ( _Thread_Executing->is_preemptible || 200a7a0: 80 a0 60 00 cmp %g1, 0 200a7a4: 12 bf ff fd bne 200a798 <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN 200a7a8: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a7ac: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 200a7b0: 30 bf ff fa b,a 200a798 <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED =============================================================================== 0200a7b4 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 200a7b4: 9d e3 bf a0 save %sp, -96, %sp void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 200a7b8: 40 00 06 c4 call 200c2c8 <_Workspace_Allocate> 200a7bc: 90 10 20 18 mov 0x18, %o0 if ( sched ) { 200a7c0: 80 a2 20 00 cmp %o0, 0 200a7c4: 02 80 00 05 be 200a7d8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN 200a7c8: 82 10 20 02 mov 2, %g1 the_thread->scheduler_info = sched; 200a7cc: d0 26 20 88 st %o0, [ %i0 + 0x88 ] schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 200a7d0: f0 22 00 00 st %i0, [ %o0 ] schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 200a7d4: c2 22 20 14 st %g1, [ %o0 + 0x14 ] } return sched; } 200a7d8: 81 c7 e0 08 ret 200a7dc: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200a844 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 200a844: 9d e3 bf a0 save %sp, -96, %sp _Scheduler_EDF_Enqueue(the_thread); 200a848: 7f ff ff a5 call 200a6dc <_Scheduler_EDF_Enqueue> 200a84c: 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( 200a850: 3b 00 80 7c sethi %hi(0x201f000), %i5 200a854: ba 17 61 50 or %i5, 0x150, %i5 ! 201f150 <_Per_CPU_Information> 200a858: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 200a85c: d0 00 60 14 ld [ %g1 + 0x14 ], %o0 200a860: 03 00 80 78 sethi %hi(0x201e000), %g1 200a864: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 201e25c <_Scheduler+0x30> 200a868: 9f c0 40 00 call %g1 200a86c: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 200a870: 80 a2 20 00 cmp %o0, 0 200a874: 26 80 00 04 bl,a 200a884 <_Scheduler_EDF_Unblock+0x40> 200a878: c2 07 60 0c ld [ %i5 + 0xc ], %g1 200a87c: 81 c7 e0 08 ret 200a880: 81 e8 00 00 restore _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 200a884: f0 27 60 10 st %i0, [ %i5 + 0x10 ] if ( _Thread_Executing->is_preemptible || 200a888: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1 200a88c: 80 a0 60 00 cmp %g1, 0 200a890: 22 80 00 06 be,a 200a8a8 <_Scheduler_EDF_Unblock+0x64> 200a894: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a898: 82 10 20 01 mov 1, %g1 200a89c: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] 200a8a0: 81 c7 e0 08 ret 200a8a4: 81 e8 00 00 restore */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 200a8a8: 80 a0 60 00 cmp %g1, 0 200a8ac: 12 bf ff f4 bne 200a87c <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN 200a8b0: 82 10 20 01 mov 1, %g1 the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 200a8b4: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED 200a8b8: 30 bf ff fa b,a 200a8a0 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED =============================================================================== 0200a848 <_Scheduler_simple_Ready_queue_enqueue_first>: { Chain_Control *ready; Chain_Node *the_node; Thread_Control *current; ready = (Chain_Control *)_Scheduler.information; 200a848: 03 00 80 75 sethi %hi(0x201d400), %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200a84c: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 201d71c <_Scheduler> */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 200a850: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 200a854: c2 00 40 00 ld [ %g1 ], %g1 200a858: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200a85c: 80 a0 80 03 cmp %g2, %g3 200a860: 3a 80 00 08 bcc,a 200a880 <_Scheduler_simple_Ready_queue_enqueue_first+0x38> 200a864: c2 00 60 04 ld [ %g1 + 4 ], %g1 * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { 200a868: c2 00 40 00 ld [ %g1 ], %g1 current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 200a86c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 200a870: 80 a0 80 03 cmp %g2, %g3 200a874: 2a bf ff fe bcs,a 200a86c <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN 200a878: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED current = (Thread_Control *)current->Object.Node.previous; 200a87c: c2 00 60 04 ld [ %g1 + 4 ], %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 200a880: c4 00 40 00 ld [ %g1 ], %g2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 200a884: c2 22 20 04 st %g1, [ %o0 + 4 ] before_node = after_node->next; after_node->next = the_node; 200a888: d0 20 40 00 st %o0, [ %g1 ] the_node->next = before_node; 200a88c: c4 22 00 00 st %g2, [ %o0 ] } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 200a890: 81 c3 e0 08 retl 200a894: d0 20 a0 04 st %o0, [ %g2 + 4 ] =============================================================================== 02008cc4 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 2008cc4: 9d e3 bf a0 save %sp, -96, %sp static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008cc8: 09 00 80 75 sethi %hi(0x201d400), %g4 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008ccc: 05 00 80 71 sethi %hi(0x201c400), %g2 2008cd0: d8 19 20 30 ldd [ %g4 + 0x30 ], %o4 2008cd4: c6 00 a2 5c ld [ %g2 + 0x25c ], %g3 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008cd8: 03 00 80 75 sethi %hi(0x201d400), %g1 2008cdc: f8 18 60 40 ldd [ %g1 + 0x40 ], %i4 ! 201d440 <_TOD_Now> 2008ce0: 9f 28 e0 07 sll %g3, 7, %o7 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008ce4: 37 00 80 75 sethi %hi(0x201d400), %i3 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008ce8: 85 28 e0 02 sll %g3, 2, %g2 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008cec: f4 06 e0 c0 ld [ %i3 + 0xc0 ], %i2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 2008cf0: 84 23 c0 02 sub %o7, %g2, %g2 2008cf4: 84 00 80 03 add %g2, %g3, %g2 2008cf8: 85 28 a0 03 sll %g2, 3, %g2 2008cfc: 86 10 00 02 mov %g2, %g3 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d00: 9a 80 c0 0d addcc %g3, %o5, %o5 2008d04: 84 10 20 00 clr %g2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d08: 92 10 00 1d mov %i5, %o1 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d0c: 98 40 80 0c addx %g2, %o4, %o4 Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008d10: ba 80 c0 1d addcc %g3, %i5, %i5 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 2008d14: b4 06 a0 01 inc %i2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d18: 94 10 20 00 clr %o2 2008d1c: f4 26 e0 c0 st %i2, [ %i3 + 0xc0 ] 2008d20: 90 10 00 1c mov %i4, %o0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 2008d24: d8 39 20 30 std %o4, [ %g4 + 0x30 ] Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; *_time += *_add; 2008d28: b8 40 80 1c addx %g2, %i4, %i4 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d2c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 *_time += *_add; 2008d30: f8 38 60 40 std %i4, [ %g1 + 0x40 ] static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d34: 40 00 3f d3 call 2018c80 <__divdi3> 2008d38: 96 12 e2 00 or %o3, 0x200, %o3 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008d3c: 94 10 20 00 clr %o2 static inline uint32_t _Timestamp64_Add_to_at_tick( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { Timestamp64_Control _start = *_time / 1000000000L; 2008d40: b6 10 00 08 mov %o0, %i3 2008d44: b4 10 00 09 mov %o1, %i2 *_time += *_add; if ( ((*_time) / 1000000000L) != _start ) { 2008d48: 90 10 00 1c mov %i4, %o0 2008d4c: 92 10 00 1d mov %i5, %o1 2008d50: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2008d54: 40 00 3f cb call 2018c80 <__divdi3> 2008d58: 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 ) { 2008d5c: 80 a6 c0 08 cmp %i3, %o0 2008d60: 02 80 00 05 be 2008d74 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN 2008d64: 80 a6 80 09 cmp %i2, %o1 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 2008d68: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED 2008d6c: 40 00 0a 9e call 200b7e4 <_Watchdog_Tickle> 2008d70: 91 ee 20 64 restore %i0, 0x64, %o0 2008d74: 12 bf ff fe bne 2008d6c <_TOD_Tickle_ticks+0xa8> 2008d78: 31 00 80 75 sethi %hi(0x201d400), %i0 2008d7c: 81 c7 e0 08 ret 2008d80: 81 e8 00 00 restore =============================================================================== 020089f0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 20089f0: 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(); 20089f4: 03 00 80 7b sethi %hi(0x201ec00), %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; 20089f8: 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) || 20089fc: 80 a6 20 00 cmp %i0, 0 2008a00: 02 80 00 2c be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008a04: d2 00 60 fc ld [ %g1 + 0xfc ], %o1 ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 2008a08: 11 00 03 d0 sethi %hi(0xf4000), %o0 2008a0c: 40 00 47 41 call 201a710 <.udiv> 2008a10: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 2008a14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2008a18: 80 a2 00 01 cmp %o0, %g1 2008a1c: 28 80 00 26 bleu,a 2008ab4 <_TOD_Validate+0xc4> 2008a20: b0 0f 60 01 and %i5, 1, %i0 (the_tod->ticks >= ticks_per_second) || 2008a24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2008a28: 80 a0 60 3b cmp %g1, 0x3b 2008a2c: 38 80 00 22 bgu,a 2008ab4 <_TOD_Validate+0xc4> 2008a30: b0 0f 60 01 and %i5, 1, %i0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 2008a34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2008a38: 80 a0 60 3b cmp %g1, 0x3b 2008a3c: 38 80 00 1e bgu,a 2008ab4 <_TOD_Validate+0xc4> 2008a40: b0 0f 60 01 and %i5, 1, %i0 (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 2008a44: c2 06 20 0c ld [ %i0 + 0xc ], %g1 2008a48: 80 a0 60 17 cmp %g1, 0x17 2008a4c: 38 80 00 1a bgu,a 2008ab4 <_TOD_Validate+0xc4> 2008a50: b0 0f 60 01 and %i5, 1, %i0 (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 2008a54: 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) || 2008a58: 80 a0 60 00 cmp %g1, 0 2008a5c: 02 80 00 15 be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008a60: 80 a0 60 0c cmp %g1, 0xc (the_tod->month == 0) || 2008a64: 38 80 00 14 bgu,a 2008ab4 <_TOD_Validate+0xc4> 2008a68: b0 0f 60 01 and %i5, 1, %i0 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2008a6c: c4 06 00 00 ld [ %i0 ], %g2 (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) || 2008a70: 80 a0 a7 c3 cmp %g2, 0x7c3 2008a74: 28 80 00 10 bleu,a 2008ab4 <_TOD_Validate+0xc4> 2008a78: b0 0f 60 01 and %i5, 1, %i0 (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 2008a7c: c6 06 20 08 ld [ %i0 + 8 ], %g3 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 2008a80: 80 a0 e0 00 cmp %g3, 0 2008a84: 02 80 00 0b be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN 2008a88: 80 88 a0 03 btst 3, %g2 (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 2008a8c: 32 80 00 0c bne,a 2008abc <_TOD_Validate+0xcc> 2008a90: 83 28 60 02 sll %g1, 2, %g1 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 2008a94: 82 00 60 0d add %g1, 0xd, %g1 2008a98: 05 00 80 76 sethi %hi(0x201d800), %g2 2008a9c: 83 28 60 02 sll %g1, 2, %g1 2008aa0: 84 10 a0 f8 or %g2, 0xf8, %g2 2008aa4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2008aa8: 80 a0 40 03 cmp %g1, %g3 2008aac: ba 60 3f ff subx %g0, -1, %i5 if ( the_tod->day > days_in_month ) return false; return true; } 2008ab0: b0 0f 60 01 and %i5, 1, %i0 2008ab4: 81 c7 e0 08 ret 2008ab8: 81 e8 00 00 restore return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 2008abc: 05 00 80 76 sethi %hi(0x201d800), %g2 2008ac0: 84 10 a0 f8 or %g2, 0xf8, %g2 ! 201d8f8 <_TOD_Days_per_month> 2008ac4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 2008ac8: 80 a0 40 03 cmp %g1, %g3 2008acc: 10 bf ff f9 b 2008ab0 <_TOD_Validate+0xc0> 2008ad0: ba 60 3f ff subx %g0, -1, %i5 =============================================================================== 0200a2b4 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 200a2b4: 9d e3 bf a0 save %sp, -96, %sp States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 200a2b8: 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 ); 200a2bc: 40 00 03 a3 call 200b148 <_Thread_Set_transient> 200a2c0: 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 ) 200a2c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200a2c8: 80 a0 40 19 cmp %g1, %i1 200a2cc: 02 80 00 05 be 200a2e0 <_Thread_Change_priority+0x2c> 200a2d0: ba 10 00 18 mov %i0, %i5 _Thread_Set_priority( the_thread, new_priority ); 200a2d4: 90 10 00 18 mov %i0, %o0 200a2d8: 40 00 03 82 call 200b0e0 <_Thread_Set_priority> 200a2dc: 92 10 00 19 mov %i1, %o1 _ISR_Disable( level ); 200a2e0: 7f ff e0 f6 call 20026b8 200a2e4: 01 00 00 00 nop 200a2e8: b2 10 00 08 mov %o0, %i1 /* * 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; 200a2ec: f6 07 60 10 ld [ %i5 + 0x10 ], %i3 if ( state != STATES_TRANSIENT ) { 200a2f0: 80 a6 e0 04 cmp %i3, 4 200a2f4: 02 80 00 18 be 200a354 <_Thread_Change_priority+0xa0> 200a2f8: 80 8f 20 04 btst 4, %i4 /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 200a2fc: 02 80 00 0b be 200a328 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN 200a300: 82 0e ff fb and %i3, -5, %g1 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 200a304: 7f ff e0 f1 call 20026c8 <== NOT EXECUTED 200a308: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 200a30c: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED 200a310: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <== NOT EXECUTED if ( _States_Is_waiting_on_thread_queue( state ) ) { 200a314: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED 200a318: 32 80 00 0d bne,a 200a34c <_Thread_Change_priority+0x98> <== NOT EXECUTED 200a31c: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED 200a320: 81 c7 e0 08 ret 200a324: 81 e8 00 00 restore */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 200a328: c2 27 60 10 st %g1, [ %i5 + 0x10 ] _ISR_Enable( level ); 200a32c: 7f ff e0 e7 call 20026c8 200a330: 90 10 00 19 mov %i1, %o0 200a334: 03 00 00 ef sethi %hi(0x3bc00), %g1 200a338: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200a33c: 80 8e c0 01 btst %i3, %g1 200a340: 02 bf ff f8 be 200a320 <_Thread_Change_priority+0x6c> 200a344: 01 00 00 00 nop _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 200a348: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 200a34c: 40 00 03 34 call 200b01c <_Thread_queue_Requeue> 200a350: 93 e8 00 1d restore %g0, %i5, %o1 200a354: 39 00 80 71 sethi %hi(0x201c400), %i4 } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 200a358: 12 80 00 08 bne 200a378 <_Thread_Change_priority+0xc4> <== NEVER TAKEN 200a35c: b8 17 23 3c or %i4, 0x33c, %i4 ! 201c73c <_Scheduler> * 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 ); if ( prepend_it ) 200a360: 80 a6 a0 00 cmp %i2, 0 200a364: 02 80 00 1b be 200a3d0 <_Thread_Change_priority+0x11c> 200a368: c0 27 60 10 clr [ %i5 + 0x10 ] */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 200a36c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 200a370: 9f c0 40 00 call %g1 200a374: 90 10 00 1d mov %i5, %o0 _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 200a378: 7f ff e0 d4 call 20026c8 200a37c: 90 10 00 19 mov %i1, %o0 200a380: 7f ff e0 ce call 20026b8 200a384: 01 00 00 00 nop 200a388: 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(); 200a38c: c2 07 20 08 ld [ %i4 + 8 ], %g1 200a390: 9f c0 40 00 call %g1 200a394: 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 ); 200a398: 03 00 80 75 sethi %hi(0x201d400), %g1 200a39c: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information> 200a3a0: 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() && 200a3a4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200a3a8: 80 a0 80 03 cmp %g2, %g3 200a3ac: 02 80 00 07 be 200a3c8 <_Thread_Change_priority+0x114> 200a3b0: 01 00 00 00 nop 200a3b4: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2 200a3b8: 80 a0 a0 00 cmp %g2, 0 200a3bc: 02 80 00 03 be 200a3c8 <_Thread_Change_priority+0x114> 200a3c0: 84 10 20 01 mov 1, %g2 _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 200a3c4: c4 28 60 18 stb %g2, [ %g1 + 0x18 ] _ISR_Enable( level ); 200a3c8: 7f ff e0 c0 call 20026c8 200a3cc: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 200a3d0: c2 07 20 24 ld [ %i4 + 0x24 ], %g1 200a3d4: 9f c0 40 00 call %g1 200a3d8: 90 10 00 1d mov %i5, %o0 200a3dc: 30 bf ff e7 b,a 200a378 <_Thread_Change_priority+0xc4> =============================================================================== 0200a5f8 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 200a5f8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200a5fc: 90 10 00 18 mov %i0, %o0 200a600: 40 00 00 77 call 200a7dc <_Thread_Get> 200a604: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200a608: c2 07 bf fc ld [ %fp + -4 ], %g1 200a60c: 80 a0 60 00 cmp %g1, 0 200a610: 12 80 00 09 bne 200a634 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN 200a614: 13 04 00 00 sethi %hi(0x10000000), %o1 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 200a618: 7f ff ff 72 call 200a3e0 <_Thread_Clear_state> 200a61c: 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--; 200a620: 03 00 80 74 sethi %hi(0x201d000), %g1 200a624: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level> 200a628: 84 00 bf ff add %g2, -1, %g2 200a62c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] return _Thread_Dispatch_disable_level; 200a630: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 200a634: 81 c7 e0 08 ret 200a638: 81 e8 00 00 restore =============================================================================== 0200a63c <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 200a63c: 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++; 200a640: 31 00 80 74 sethi %hi(0x201d000), %i0 200a644: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level> 200a648: 82 00 60 01 inc %g1 200a64c: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ] return _Thread_Dispatch_disable_level; 200a650: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 200a654: 39 00 80 75 sethi %hi(0x201d400), %i4 200a658: b8 17 21 e0 or %i4, 0x1e0, %i4 ! 201d5e0 <_Per_CPU_Information> _ISR_Disable( level ); 200a65c: 7f ff e0 17 call 20026b8 200a660: fa 07 20 0c ld [ %i4 + 0xc ], %i5 while ( _Thread_Dispatch_necessary == true ) { 200a664: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 200a668: 80 a0 60 00 cmp %g1, 0 200a66c: 02 80 00 45 be 200a780 <_Thread_Dispatch+0x144> 200a670: 01 00 00 00 nop heir = _Thread_Heir; 200a674: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 200a678: c0 2f 20 18 clrb [ %i4 + 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 ) 200a67c: 80 a7 40 1b cmp %i5, %i3 200a680: 02 80 00 40 be 200a780 <_Thread_Dispatch+0x144> 200a684: f6 27 20 0c st %i3, [ %i4 + 0xc ] 200a688: 33 00 80 75 sethi %hi(0x201d400), %i1 #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a68c: 21 00 80 74 sethi %hi(0x201d000), %l0 200a690: b2 16 60 3c or %i1, 0x3c, %i1 #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 ); 200a694: 10 80 00 35 b 200a768 <_Thread_Dispatch+0x12c> 200a698: 35 00 80 75 sethi %hi(0x201d400), %i2 _ISR_Enable( level ); 200a69c: 7f ff e0 0b call 20026c8 200a6a0: 01 00 00 00 nop #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 200a6a4: 40 00 0c 1f call 200d720 <_TOD_Get_uptime> 200a6a8: 90 07 bf f8 add %fp, -8, %o0 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a6ac: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a6b0: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2 _Timestamp_Subtract( 200a6b4: d8 1f bf f8 ldd [ %fp + -8 ], %o4 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 200a6b8: c2 06 40 00 ld [ %i1 ], %g1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 200a6bc: 86 a3 40 03 subcc %o5, %g3, %g3 200a6c0: 84 63 00 02 subx %o4, %g2, %g2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 200a6c4: 86 82 c0 03 addcc %o3, %g3, %g3 200a6c8: 84 42 80 02 addx %o2, %g2, %g2 200a6cc: c4 3f 60 80 std %g2, [ %i5 + 0x80 ] 200a6d0: 80 a0 60 00 cmp %g1, 0 200a6d4: 02 80 00 06 be 200a6ec <_Thread_Dispatch+0xb0> <== NEVER TAKEN 200a6d8: d8 3f 20 20 std %o4, [ %i4 + 0x20 ] executing->libc_reent = *_Thread_libc_reent; 200a6dc: c4 00 40 00 ld [ %g1 ], %g2 200a6e0: c4 27 61 4c st %g2, [ %i5 + 0x14c ] *_Thread_libc_reent = heir->libc_reent; 200a6e4: c4 06 e1 4c ld [ %i3 + 0x14c ], %g2 200a6e8: c4 20 40 00 st %g2, [ %g1 ] } _User_extensions_Thread_switch( executing, heir ); 200a6ec: 90 10 00 1d mov %i5, %o0 200a6f0: 40 00 03 93 call 200b53c <_User_extensions_Thread_switch> 200a6f4: 92 10 00 1b mov %i3, %o1 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 200a6f8: 90 07 60 c0 add %i5, 0xc0, %o0 200a6fc: 40 00 04 dd call 200ba70 <_CPU_Context_switch> 200a700: 92 06 e0 c0 add %i3, 0xc0, %o1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200a704: c2 07 61 48 ld [ %i5 + 0x148 ], %g1 200a708: 80 a0 60 00 cmp %g1, 0 200a70c: 02 80 00 0c be 200a73c <_Thread_Dispatch+0x100> 200a710: d0 06 a0 38 ld [ %i2 + 0x38 ], %o0 200a714: 80 a7 40 08 cmp %i5, %o0 200a718: 02 80 00 09 be 200a73c <_Thread_Dispatch+0x100> 200a71c: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200a720: 02 80 00 04 be 200a730 <_Thread_Dispatch+0xf4> 200a724: 01 00 00 00 nop _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200a728: 40 00 04 98 call 200b988 <_CPU_Context_save_fp> 200a72c: 90 02 21 48 add %o0, 0x148, %o0 _Context_Restore_fp( &executing->fp_context ); 200a730: 40 00 04 b3 call 200b9fc <_CPU_Context_restore_fp> 200a734: 90 07 61 48 add %i5, 0x148, %o0 _Thread_Allocated_fp = executing; 200a738: fa 26 a0 38 st %i5, [ %i2 + 0x38 ] #endif #endif executing = _Thread_Executing; _ISR_Disable( level ); 200a73c: 7f ff df df call 20026b8 200a740: fa 07 20 0c ld [ %i4 + 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 ) { 200a744: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1 200a748: 80 a0 60 00 cmp %g1, 0 200a74c: 02 80 00 0d be 200a780 <_Thread_Dispatch+0x144> 200a750: 01 00 00 00 nop heir = _Thread_Heir; 200a754: f6 07 20 10 ld [ %i4 + 0x10 ], %i3 _Thread_Dispatch_necessary = false; 200a758: c0 2f 20 18 clrb [ %i4 + 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 ) 200a75c: 80 a6 c0 1d cmp %i3, %i5 200a760: 02 80 00 08 be 200a780 <_Thread_Dispatch+0x144> <== NEVER TAKEN 200a764: f6 27 20 0c st %i3, [ %i4 + 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 ) 200a768: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1 200a76c: 80 a0 60 01 cmp %g1, 1 200a770: 12 bf ff cb bne 200a69c <_Thread_Dispatch+0x60> 200a774: c2 04 23 14 ld [ %l0 + 0x314 ], %g1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 200a778: 10 bf ff c9 b 200a69c <_Thread_Dispatch+0x60> 200a77c: c2 26 e0 74 st %g1, [ %i3 + 0x74 ] _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 200a780: 7f ff df d2 call 20026c8 200a784: 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--; 200a788: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 200a78c: 82 00 7f ff add %g1, -1, %g1 200a790: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ] return _Thread_Dispatch_disable_level; 200a794: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 200a798: 7f ff f7 ad call 200864c <_API_extensions_Run_postswitch> 200a79c: 01 00 00 00 nop } 200a7a0: 81 c7 e0 08 ret 200a7a4: 81 e8 00 00 restore =============================================================================== 0200f5ac <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 200f5ac: 9d e3 bf a0 save %sp, -96, %sp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 200f5b0: 03 00 80 75 sethi %hi(0x201d400), %g1 200f5b4: fa 00 61 ec ld [ %g1 + 0x1ec ], %i5 ! 201d5ec <_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(); 200f5b8: 3f 00 80 3d sethi %hi(0x200f400), %i7 200f5bc: be 17 e1 ac or %i7, 0x1ac, %i7 ! 200f5ac <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200f5c0: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0 _ISR_Set_level(level); 200f5c4: 7f ff cc 41 call 20026c8 200f5c8: 91 2a 20 08 sll %o0, 8, %o0 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200f5cc: c4 07 61 48 ld [ %i5 + 0x148 ], %g2 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200f5d0: 03 00 80 73 sethi %hi(0x201cc00), %g1 doneConstructors = true; 200f5d4: 86 10 20 01 mov 1, %g3 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 200f5d8: f6 08 63 d8 ldub [ %g1 + 0x3d8 ], %i3 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 200f5dc: 80 a0 a0 00 cmp %g2, 0 200f5e0: 02 80 00 0c be 200f610 <_Thread_Handler+0x64> 200f5e4: c6 28 63 d8 stb %g3, [ %g1 + 0x3d8 ] #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 ); 200f5e8: 39 00 80 75 sethi %hi(0x201d400), %i4 200f5ec: d0 07 20 38 ld [ %i4 + 0x38 ], %o0 ! 201d438 <_Thread_Allocated_fp> 200f5f0: 80 a7 40 08 cmp %i5, %o0 200f5f4: 02 80 00 07 be 200f610 <_Thread_Handler+0x64> 200f5f8: 80 a2 20 00 cmp %o0, 0 !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 200f5fc: 22 80 00 05 be,a 200f610 <_Thread_Handler+0x64> 200f600: fa 27 20 38 st %i5, [ %i4 + 0x38 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200f604: 7f ff f0 e1 call 200b988 <_CPU_Context_save_fp> 200f608: 90 02 21 48 add %o0, 0x148, %o0 _Thread_Allocated_fp = executing; 200f60c: fa 27 20 38 st %i5, [ %i4 + 0x38 ] /* * 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 ); 200f610: 7f ff ef 49 call 200b334 <_User_extensions_Thread_begin> 200f614: 90 10 00 1d mov %i5, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200f618: 7f ff ec 64 call 200a7a8 <_Thread_Enable_dispatch> 200f61c: 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) */ { 200f620: 80 8e e0 ff btst 0xff, %i3 200f624: 02 80 00 0c be 200f654 <_Thread_Handler+0xa8> 200f628: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f62c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 200f630: 80 a0 60 00 cmp %g1, 0 200f634: 22 80 00 0c be,a 200f664 <_Thread_Handler+0xb8> <== ALWAYS TAKEN 200f638: c2 07 60 8c ld [ %i5 + 0x8c ], %g1 * 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 ); 200f63c: 7f ff ef 52 call 200b384 <_User_extensions_Thread_exitted> 200f640: 90 10 00 1d mov %i5, %o0 _Internal_error_Occurred( 200f644: 90 10 20 00 clr %o0 200f648: 92 10 20 01 mov 1, %o1 200f64c: 7f ff e6 db call 20091b8 <_Internal_error_Occurred> 200f650: 94 10 20 05 mov 5, %o2 * _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) */ { INIT_NAME (); 200f654: 40 00 33 ed call 201c608 <_init> 200f658: 01 00 00 00 nop _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 200f65c: 10 bf ff f5 b 200f630 <_Thread_Handler+0x84> 200f660: c2 07 60 90 ld [ %i5 + 0x90 ], %g1 executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 200f664: 9f c0 40 00 call %g1 200f668: d0 07 60 98 ld [ %i5 + 0x98 ], %o0 #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 200f66c: 10 bf ff f4 b 200f63c <_Thread_Handler+0x90> 200f670: d0 27 60 28 st %o0, [ %i5 + 0x28 ] =============================================================================== 0200aa6c <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 200aa6c: 9d e3 bf 98 save %sp, -104, %sp uint32_t ticks_per_timeslice = 200aa70: 05 00 80 71 sethi %hi(0x201c400), %g2 200aa74: 84 10 a2 4c or %g2, 0x24c, %g2 ! 201c64c #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 200aa78: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 * Output parameters: NONE */ void _Thread_Handler_initialization(void) { uint32_t ticks_per_timeslice = 200aa7c: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5 rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = 200aa80: 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 || 200aa84: 80 a0 e0 00 cmp %g3, 0 200aa88: 02 80 00 21 be 200ab0c <_Thread_Handler_initialization+0xa0> 200aa8c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 200aa90: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 200aa94: 80 a0 e0 00 cmp %g3, 0 200aa98: 02 80 00 1d be 200ab0c <_Thread_Handler_initialization+0xa0><== NEVER TAKEN 200aa9c: 80 a0 60 00 cmp %g1, 0 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 200aaa0: 22 80 00 05 be,a 200aab4 <_Thread_Handler_initialization+0x48> 200aaa4: 03 00 80 75 sethi %hi(0x201d400), %g1 (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 200aaa8: 9f c0 40 00 call %g1 200aaac: d0 00 a0 08 ld [ %g2 + 8 ], %o0 _Thread_Dispatch_necessary = false; 200aab0: 03 00 80 75 sethi %hi(0x201d400), %g1 200aab4: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information> 200aab8: c0 28 60 18 clrb [ %g1 + 0x18 ] _Thread_Executing = NULL; 200aabc: c0 20 60 0c clr [ %g1 + 0xc ] _Thread_Heir = NULL; 200aac0: c0 20 60 10 clr [ %g1 + 0x10 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 200aac4: 03 00 80 75 sethi %hi(0x201d400), %g1 200aac8: c0 20 60 38 clr [ %g1 + 0x38 ] ! 201d438 <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 200aacc: 03 00 80 75 sethi %hi(0x201d400), %g1 200aad0: f8 20 60 48 st %i4, [ %g1 + 0x48 ] ! 201d448 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 200aad4: 03 00 80 74 sethi %hi(0x201d000), %g1 200aad8: fa 20 63 14 st %i5, [ %g1 + 0x314 ] ! 201d314 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 200aadc: 82 10 20 08 mov 8, %g1 200aae0: 11 00 80 75 sethi %hi(0x201d400), %o0 200aae4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 200aae8: 90 12 20 c8 or %o0, 0xc8, %o0 200aaec: 92 10 20 01 mov 1, %o1 200aaf0: 94 10 20 01 mov 1, %o2 200aaf4: 96 10 20 01 mov 1, %o3 200aaf8: 98 10 21 60 mov 0x160, %o4 200aafc: 7f ff fb 45 call 2009810 <_Objects_Initialize_information> 200ab00: 9a 10 20 00 clr %o5 false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 200ab04: 81 c7 e0 08 ret 200ab08: 81 e8 00 00 restore _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 200ab0c: 90 10 20 00 clr %o0 200ab10: 92 10 20 01 mov 1, %o1 200ab14: 7f ff f9 a9 call 20091b8 <_Internal_error_Occurred> 200ab18: 94 10 20 0e mov 0xe, %o2 =============================================================================== 0200a88c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 200a88c: 9d e3 bf a0 save %sp, -96, %sp 200a890: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 200a894: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2 200a898: e0 00 40 00 ld [ %g1 ], %l0 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 200a89c: c0 26 61 50 clr [ %i1 + 0x150 ] 200a8a0: c0 26 61 54 clr [ %i1 + 0x154 ] extensions_area = NULL; the_thread->libc_reent = NULL; 200a8a4: c0 26 61 4c clr [ %i1 + 0x14c ] /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 200a8a8: 90 10 00 19 mov %i1, %o0 200a8ac: 40 00 02 36 call 200b184 <_Thread_Stack_Allocate> 200a8b0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 200a8b4: 80 a2 00 1b cmp %o0, %i3 200a8b8: 0a 80 00 4b bcs 200a9e4 <_Thread_Initialize+0x158> 200a8bc: 80 a2 20 00 cmp %o0, 0 200a8c0: 02 80 00 49 be 200a9e4 <_Thread_Initialize+0x158> <== NEVER TAKEN 200a8c4: 80 a7 20 00 cmp %i4, 0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a8c8: c2 06 60 bc ld [ %i1 + 0xbc ], %g1 the_stack->size = size; 200a8cc: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 200a8d0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 200a8d4: 12 80 00 48 bne 200a9f4 <_Thread_Initialize+0x168> 200a8d8: b6 10 20 00 clr %i3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a8dc: 23 00 80 75 sethi %hi(0x201d400), %l1 200a8e0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 ! 201d448 <_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; 200a8e4: f6 26 61 48 st %i3, [ %i1 + 0x148 ] the_thread->Start.fp_context = fp_area; 200a8e8: f6 26 60 b8 st %i3, [ %i1 + 0xb8 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200a8ec: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 200a8f0: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 200a8f4: c0 26 60 68 clr [ %i1 + 0x68 ] #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 200a8f8: 80 a0 60 00 cmp %g1, 0 200a8fc: 12 80 00 46 bne 200aa14 <_Thread_Initialize+0x188> 200a900: c0 26 60 6c clr [ %i1 + 0x6c ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200a904: c0 26 61 58 clr [ %i1 + 0x158 ] * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 200a908: b8 10 20 00 clr %i4 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200a90c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2 */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 200a910: 03 00 80 71 sethi %hi(0x201c400), %g1 200a914: c4 26 60 a0 st %g2, [ %i1 + 0xa0 ] the_thread->Start.budget_callout = budget_callout; 200a918: c4 07 a0 64 ld [ %fp + 0x64 ], %g2 200a91c: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 200a920: c4 26 60 a4 st %g2, [ %i1 + 0xa4 ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a924: c4 07 a0 68 ld [ %fp + 0x68 ], %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 200a928: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 200a92c: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ] the_thread->current_state = STATES_DORMANT; 200a930: 84 10 20 01 mov 1, %g2 the_thread->Wait.queue = NULL; 200a934: c0 26 60 44 clr [ %i1 + 0x44 ] #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 200a938: c4 26 60 10 st %g2, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 200a93c: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->real_priority = priority; 200a940: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 200a944: fa 26 60 ac st %i5, [ %i1 + 0xac ] 200a948: 9f c0 40 00 call %g1 200a94c: 90 10 00 19 mov %i1, %o0 sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 200a950: b4 92 20 00 orcc %o0, 0, %i2 200a954: 22 80 00 13 be,a 200a9a0 <_Thread_Initialize+0x114> 200a958: d0 06 61 4c ld [ %i1 + 0x14c ], %o0 goto failed; _Thread_Set_priority( the_thread, priority ); 200a95c: 90 10 00 19 mov %i1, %o0 200a960: 40 00 01 e0 call 200b0e0 <_Thread_Set_priority> 200a964: 92 10 00 1d mov %i5, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a968: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 200a96c: c2 16 60 0a lduh [ %i1 + 0xa ], %g1 static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 200a970: c0 26 60 80 clr [ %i1 + 0x80 ] 200a974: c0 26 60 84 clr [ %i1 + 0x84 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200a978: 83 28 60 02 sll %g1, 2, %g1 200a97c: f2 20 80 01 st %i1, [ %g2 + %g1 ] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 200a980: e0 26 60 0c st %l0, [ %i1 + 0xc ] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 200a984: 90 10 00 19 mov %i1, %o0 200a988: 40 00 02 a6 call 200b420 <_User_extensions_Thread_create> 200a98c: b0 10 20 01 mov 1, %i0 if ( extension_status ) 200a990: 80 8a 20 ff btst 0xff, %o0 200a994: 32 80 00 12 bne,a 200a9dc <_Thread_Initialize+0x150> 200a998: b0 0e 20 01 and %i0, 1, %i0 return true; failed: _Workspace_Free( the_thread->libc_reent ); 200a99c: d0 06 61 4c ld [ %i1 + 0x14c ], %o0 200a9a0: 40 00 03 e5 call 200b934 <_Workspace_Free> 200a9a4: b0 10 20 00 clr %i0 for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 200a9a8: 40 00 03 e3 call 200b934 <_Workspace_Free> 200a9ac: d0 06 61 50 ld [ %i1 + 0x150 ], %o0 200a9b0: 40 00 03 e1 call 200b934 <_Workspace_Free> 200a9b4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0 _Workspace_Free( extensions_area ); 200a9b8: 40 00 03 df call 200b934 <_Workspace_Free> 200a9bc: 90 10 00 1c mov %i4, %o0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 200a9c0: 40 00 03 dd call 200b934 <_Workspace_Free> 200a9c4: 90 10 00 1b mov %i3, %o0 #endif _Workspace_Free( sched ); 200a9c8: 40 00 03 db call 200b934 <_Workspace_Free> 200a9cc: 90 10 00 1a mov %i2, %o0 _Thread_Stack_Free( the_thread ); 200a9d0: 40 00 01 fe call 200b1c8 <_Thread_Stack_Free> 200a9d4: 90 10 00 19 mov %i1, %o0 return false; } 200a9d8: b0 0e 20 01 and %i0, 1, %i0 200a9dc: 81 c7 e0 08 ret 200a9e0: 81 e8 00 00 restore * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 200a9e4: b0 10 20 00 clr %i0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 200a9e8: b0 0e 20 01 and %i0, 1, %i0 200a9ec: 81 c7 e0 08 ret 200a9f0: 81 e8 00 00 restore /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 200a9f4: 40 00 03 c8 call 200b914 <_Workspace_Allocate> 200a9f8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) 200a9fc: b6 92 20 00 orcc %o0, 0, %i3 200aa00: 32 bf ff b8 bne,a 200a8e0 <_Thread_Initialize+0x54> 200aa04: 23 00 80 75 sethi %hi(0x201d400), %l1 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 200aa08: b8 10 20 00 clr %i4 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; 200aa0c: 10 bf ff e4 b 200a99c <_Thread_Initialize+0x110> 200aa10: b4 10 20 00 clr %i2 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 200aa14: 82 00 60 01 inc %g1 200aa18: 40 00 03 bf call 200b914 <_Workspace_Allocate> 200aa1c: 91 28 60 02 sll %g1, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 200aa20: b8 92 20 00 orcc %o0, 0, %i4 200aa24: 02 80 00 10 be 200aa64 <_Thread_Initialize+0x1d8> 200aa28: 86 10 00 1c mov %i4, %g3 goto failed; } the_thread->extensions = (void **) extensions_area; 200aa2c: f8 26 61 58 st %i4, [ %i1 + 0x158 ] 200aa30: c8 04 60 48 ld [ %l1 + 0x48 ], %g4 * 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++ ) 200aa34: 84 10 20 00 clr %g2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 200aa38: 10 80 00 03 b 200aa44 <_Thread_Initialize+0x1b8> 200aa3c: 82 10 20 00 clr %g1 200aa40: c6 06 61 58 ld [ %i1 + 0x158 ], %g3 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 200aa44: 85 28 a0 02 sll %g2, 2, %g2 200aa48: c0 20 c0 02 clr [ %g3 + %g2 ] * 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++ ) 200aa4c: 82 00 60 01 inc %g1 200aa50: 80 a0 40 04 cmp %g1, %g4 200aa54: 08 bf ff fb bleu 200aa40 <_Thread_Initialize+0x1b4> 200aa58: 84 10 00 01 mov %g1, %g2 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 200aa5c: 10 bf ff ad b 200a910 <_Thread_Initialize+0x84> 200aa60: c4 07 a0 60 ld [ %fp + 0x60 ], %g2 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; 200aa64: 10 bf ff ce b 200a99c <_Thread_Initialize+0x110> 200aa68: b4 10 20 00 clr %i2 =============================================================================== 0200b01c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200b01c: 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 ) 200b020: 80 a6 20 00 cmp %i0, 0 200b024: 02 80 00 13 be 200b070 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN 200b028: 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 ) { 200b02c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4 200b030: 80 a7 20 01 cmp %i4, 1 200b034: 02 80 00 04 be 200b044 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN 200b038: 01 00 00 00 nop 200b03c: 81 c7 e0 08 ret <== NOT EXECUTED 200b040: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 200b044: 7f ff dd 9d call 20026b8 200b048: 01 00 00 00 nop 200b04c: ba 10 00 08 mov %o0, %i5 200b050: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200b054: 03 00 00 ef sethi %hi(0x3bc00), %g1 200b058: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200b05c: 80 88 80 01 btst %g2, %g1 200b060: 12 80 00 06 bne 200b078 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN 200b064: 90 10 00 18 mov %i0, %o0 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 200b068: 7f ff dd 98 call 20026c8 200b06c: 90 10 00 1d mov %i5, %o0 200b070: 81 c7 e0 08 ret 200b074: 81 e8 00 00 restore ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 200b078: 92 10 00 19 mov %i1, %o1 200b07c: 94 10 20 01 mov 1, %o2 200b080: 40 00 0b 8c call 200deb0 <_Thread_queue_Extract_priority_helper> 200b084: f8 26 20 30 st %i4, [ %i0 + 0x30 ] (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 200b088: 90 10 00 18 mov %i0, %o0 200b08c: 92 10 00 19 mov %i1, %o1 200b090: 7f ff ff 35 call 200ad64 <_Thread_queue_Enqueue_priority> 200b094: 94 07 bf fc add %fp, -4, %o2 200b098: 30 bf ff f4 b,a 200b068 <_Thread_queue_Requeue+0x4c> =============================================================================== 0200b09c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 200b09c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 200b0a0: 90 10 00 18 mov %i0, %o0 200b0a4: 7f ff fd ce call 200a7dc <_Thread_Get> 200b0a8: 92 07 bf fc add %fp, -4, %o1 switch ( location ) { 200b0ac: c2 07 bf fc ld [ %fp + -4 ], %g1 200b0b0: 80 a0 60 00 cmp %g1, 0 200b0b4: 12 80 00 09 bne 200b0d8 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN 200b0b8: 01 00 00 00 nop #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 200b0bc: 40 00 0b b6 call 200df94 <_Thread_queue_Process_timeout> 200b0c0: 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--; 200b0c4: 03 00 80 74 sethi %hi(0x201d000), %g1 200b0c8: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level> 200b0cc: 84 00 bf ff add %g2, -1, %g2 200b0d0: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ] return _Thread_Dispatch_disable_level; 200b0d4: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 200b0d8: 81 c7 e0 08 ret 200b0dc: 81 e8 00 00 restore =============================================================================== 02017c1c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 2017c1c: 9d e3 bf 88 save %sp, -120, %sp 2017c20: 21 00 80 ec sethi %hi(0x203b000), %l0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017c24: a4 07 bf e8 add %fp, -24, %l2 2017c28: b4 07 bf ec add %fp, -20, %i2 2017c2c: b8 07 bf f4 add %fp, -12, %i4 2017c30: a2 07 bf f8 add %fp, -8, %l1 2017c34: 33 00 80 ec sethi %hi(0x203b000), %i1 2017c38: 27 00 80 ec sethi %hi(0x203b000), %l3 2017c3c: f4 27 bf e8 st %i2, [ %fp + -24 ] head->previous = NULL; 2017c40: c0 27 bf ec clr [ %fp + -20 ] tail->previous = head; 2017c44: e4 27 bf f0 st %l2, [ %fp + -16 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2017c48: e2 27 bf f4 st %l1, [ %fp + -12 ] head->previous = NULL; 2017c4c: c0 27 bf f8 clr [ %fp + -8 ] tail->previous = head; 2017c50: f8 27 bf fc st %i4, [ %fp + -4 ] 2017c54: a0 14 23 50 or %l0, 0x350, %l0 2017c58: ba 06 20 30 add %i0, 0x30, %i5 2017c5c: b2 16 62 d0 or %i1, 0x2d0, %i1 2017c60: b6 06 20 68 add %i0, 0x68, %i3 2017c64: a6 14 e2 40 or %l3, 0x240, %l3 2017c68: ac 06 20 08 add %i0, 8, %l6 2017c6c: aa 06 20 40 add %i0, 0x40, %l5 _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; 2017c70: a8 10 20 01 mov 1, %l4 { /* * 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; 2017c74: e4 26 20 78 st %l2, [ %i0 + 0x78 ] static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 2017c78: c2 04 00 00 ld [ %l0 ], %g1 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 2017c7c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017c80: 90 10 00 1d mov %i5, %o0 2017c84: 92 20 40 09 sub %g1, %o1, %o1 2017c88: 94 10 00 1c mov %i4, %o2 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 2017c8c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 2017c90: 40 00 12 a6 call 201c728 <_Watchdog_Adjust_to_chain> 2017c94: 01 00 00 00 nop 2017c98: d0 1e 40 00 ldd [ %i1 ], %o0 2017c9c: 94 10 20 00 clr %o2 2017ca0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2017ca4: 40 00 4d f9 call 202b488 <__divdi3> 2017ca8: 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; 2017cac: 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 ) { 2017cb0: 80 a2 40 0a cmp %o1, %o2 2017cb4: 18 80 00 2b bgu 2017d60 <_Timer_server_Body+0x144> 2017cb8: ae 10 00 09 mov %o1, %l7 * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 2017cbc: 80 a2 40 0a cmp %o1, %o2 2017cc0: 0a 80 00 20 bcs 2017d40 <_Timer_server_Body+0x124> 2017cc4: 90 10 00 1b mov %i3, %o0 */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 2017cc8: ee 26 20 74 st %l7, [ %i0 + 0x74 ] } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017ccc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017cd0: 40 00 02 fe call 20188c8 <_Chain_Get> 2017cd4: 01 00 00 00 nop if ( timer == NULL ) { 2017cd8: 92 92 20 00 orcc %o0, 0, %o1 2017cdc: 02 80 00 10 be 2017d1c <_Timer_server_Body+0x100> 2017ce0: 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 ) { 2017ce4: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 2017ce8: 80 a0 60 01 cmp %g1, 1 2017cec: 02 80 00 19 be 2017d50 <_Timer_server_Body+0x134> 2017cf0: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017cf4: 12 bf ff f6 bne 2017ccc <_Timer_server_Body+0xb0> <== NEVER TAKEN 2017cf8: 92 02 60 10 add %o1, 0x10, %o1 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017cfc: 40 00 12 bc call 201c7ec <_Watchdog_Insert> 2017d00: 90 10 00 1b mov %i3, %o0 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 2017d04: d0 06 20 78 ld [ %i0 + 0x78 ], %o0 2017d08: 40 00 02 f0 call 20188c8 <_Chain_Get> 2017d0c: 01 00 00 00 nop if ( timer == NULL ) { 2017d10: 92 92 20 00 orcc %o0, 0, %o1 2017d14: 32 bf ff f5 bne,a 2017ce8 <_Timer_server_Body+0xcc> <== NEVER TAKEN 2017d18: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 2017d1c: 7f ff dd a7 call 200f3b8 2017d20: 01 00 00 00 nop if ( _Chain_Is_empty( insert_chain ) ) { 2017d24: c2 07 bf e8 ld [ %fp + -24 ], %g1 2017d28: 80 a0 40 1a cmp %g1, %i2 2017d2c: 02 80 00 12 be 2017d74 <_Timer_server_Body+0x158> <== ALWAYS TAKEN 2017d30: 01 00 00 00 nop ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 2017d34: 7f ff dd a5 call 200f3c8 <== NOT EXECUTED 2017d38: 01 00 00 00 nop <== NOT EXECUTED 2017d3c: 30 bf ff cf b,a 2017c78 <_Timer_server_Body+0x5c> <== NOT EXECUTED /* * 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 ); 2017d40: 92 10 20 01 mov 1, %o1 ! 1 2017d44: 40 00 12 4a call 201c66c <_Watchdog_Adjust> 2017d48: 94 22 80 17 sub %o2, %l7, %o2 2017d4c: 30 bf ff df b,a 2017cc8 <_Timer_server_Body+0xac> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017d50: 90 10 00 1d mov %i5, %o0 2017d54: 40 00 12 a6 call 201c7ec <_Watchdog_Insert> 2017d58: 92 02 60 10 add %o1, 0x10, %o1 2017d5c: 30 bf ff dc b,a 2017ccc <_Timer_server_Body+0xb0> /* * 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 ); 2017d60: 92 22 40 0a sub %o1, %o2, %o1 2017d64: 90 10 00 1b mov %i3, %o0 2017d68: 40 00 12 70 call 201c728 <_Watchdog_Adjust_to_chain> 2017d6c: 94 10 00 1c mov %i4, %o2 2017d70: 30 bf ff d6 b,a 2017cc8 <_Timer_server_Body+0xac> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 2017d74: c0 26 20 78 clr [ %i0 + 0x78 ] _ISR_Enable( level ); 2017d78: 7f ff dd 94 call 200f3c8 2017d7c: 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 ) ) { 2017d80: c2 07 bf f4 ld [ %fp + -12 ], %g1 2017d84: 80 a0 40 11 cmp %g1, %l1 2017d88: 12 80 00 0c bne 2017db8 <_Timer_server_Body+0x19c> 2017d8c: 01 00 00 00 nop 2017d90: 30 80 00 13 b,a 2017ddc <_Timer_server_Body+0x1c0> Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; new_first->previous = head; 2017d94: 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; 2017d98: c2 27 bf f4 st %g1, [ %fp + -12 ] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 2017d9c: c0 25 e0 08 clr [ %l7 + 8 ] _ISR_Enable( level ); 2017da0: 7f ff dd 8a call 200f3c8 2017da4: 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 ); 2017da8: d0 05 e0 20 ld [ %l7 + 0x20 ], %o0 2017dac: c2 05 e0 1c ld [ %l7 + 0x1c ], %g1 2017db0: 9f c0 40 00 call %g1 2017db4: d2 05 e0 24 ld [ %l7 + 0x24 ], %o1 /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 2017db8: 7f ff dd 80 call 200f3b8 2017dbc: 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; 2017dc0: ee 07 bf f4 ld [ %fp + -12 ], %l7 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 2017dc4: 80 a5 c0 11 cmp %l7, %l1 2017dc8: 32 bf ff f3 bne,a 2017d94 <_Timer_server_Body+0x178> 2017dcc: c2 05 c0 00 ld [ %l7 ], %g1 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 2017dd0: 7f ff dd 7e call 200f3c8 2017dd4: 01 00 00 00 nop 2017dd8: 30 bf ff a7 b,a 2017c74 <_Timer_server_Body+0x58> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 2017ddc: c0 2e 20 7c clrb [ %i0 + 0x7c ] * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2017de0: c2 04 c0 00 ld [ %l3 ], %g1 2017de4: 82 00 60 01 inc %g1 2017de8: c2 24 c0 00 st %g1, [ %l3 ] return _Thread_Dispatch_disable_level; 2017dec: c2 04 c0 00 ld [ %l3 ], %g1 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 2017df0: d0 06 00 00 ld [ %i0 ], %o0 2017df4: 40 00 10 e8 call 201c194 <_Thread_Set_state> 2017df8: 92 10 20 08 mov 8, %o1 _Timer_server_Reset_interval_system_watchdog( ts ); 2017dfc: 7f ff ff 60 call 2017b7c <_Timer_server_Reset_interval_system_watchdog> 2017e00: 90 10 00 18 mov %i0, %o0 _Timer_server_Reset_tod_system_watchdog( ts ); 2017e04: 7f ff ff 72 call 2017bcc <_Timer_server_Reset_tod_system_watchdog> 2017e08: 90 10 00 18 mov %i0, %o0 _Thread_Enable_dispatch(); 2017e0c: 40 00 0e 68 call 201b7ac <_Thread_Enable_dispatch> 2017e10: 01 00 00 00 nop static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017e14: 90 10 00 16 mov %l6, %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; 2017e18: e8 2e 20 7c stb %l4, [ %i0 + 0x7c ] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 2017e1c: 40 00 12 d6 call 201c974 <_Watchdog_Remove> 2017e20: 01 00 00 00 nop static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 2017e24: 40 00 12 d4 call 201c974 <_Watchdog_Remove> 2017e28: 90 10 00 15 mov %l5, %o0 2017e2c: 30 bf ff 92 b,a 2017c74 <_Timer_server_Body+0x58> =============================================================================== 02017e30 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 2017e30: 9d e3 bf a0 save %sp, -96, %sp if ( ts->insert_chain == NULL ) { 2017e34: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 2017e38: 80 a0 60 00 cmp %g1, 0 2017e3c: 02 80 00 05 be 2017e50 <_Timer_server_Schedule_operation_method+0x20> 2017e40: ba 10 00 19 mov %i1, %i5 * 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 ); 2017e44: f0 06 20 78 ld [ %i0 + 0x78 ], %i0 2017e48: 40 00 02 95 call 201889c <_Chain_Append> 2017e4c: 81 e8 00 00 restore * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 2017e50: 03 00 80 ec sethi %hi(0x203b000), %g1 2017e54: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 203b240 <_Thread_Dispatch_disable_level> 2017e58: 84 00 a0 01 inc %g2 2017e5c: c4 20 62 40 st %g2, [ %g1 + 0x240 ] return _Thread_Dispatch_disable_level; 2017e60: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2017e64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 2017e68: 80 a0 60 01 cmp %g1, 1 2017e6c: 02 80 00 2d be 2017f20 <_Timer_server_Schedule_operation_method+0xf0> 2017e70: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 2017e74: 02 80 00 04 be 2017e84 <_Timer_server_Schedule_operation_method+0x54> 2017e78: 01 00 00 00 nop if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017e7c: 40 00 0e 4c call 201b7ac <_Thread_Enable_dispatch> 2017e80: 81 e8 00 00 restore } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017e84: 7f ff dd 4d call 200f3b8 2017e88: 01 00 00 00 nop 2017e8c: b8 10 00 08 mov %o0, %i4 2017e90: 03 00 80 ec sethi %hi(0x203b000), %g1 2017e94: d0 18 62 d0 ldd [ %g1 + 0x2d0 ], %o0 ! 203b2d0 <_TOD_Now> 2017e98: 94 10 20 00 clr %o2 2017e9c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2017ea0: 40 00 4d 7a call 202b488 <__divdi3> 2017ea4: 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; 2017ea8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 2017eac: c4 06 20 74 ld [ %i0 + 0x74 ], %g2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 2017eb0: 86 06 20 6c add %i0, 0x6c, %g3 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 2017eb4: 80 a0 40 03 cmp %g1, %g3 2017eb8: 02 80 00 0c be 2017ee8 <_Timer_server_Schedule_operation_method+0xb8> 2017ebc: 80 a2 40 02 cmp %o1, %g2 first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 2017ec0: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 2017ec4: 86 01 00 02 add %g4, %g2, %g3 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 ) { 2017ec8: 08 80 00 07 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4> 2017ecc: 86 20 c0 09 sub %g3, %o1, %g3 /* * We advanced in time. */ delta = snapshot - last_snapshot; 2017ed0: 84 22 40 02 sub %o1, %g2, %g2 if (delta_interval > delta) { 2017ed4: 80 a1 00 02 cmp %g4, %g2 2017ed8: 08 80 00 03 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN 2017edc: 86 10 20 00 clr %g3 delta_interval -= delta; 2017ee0: 86 21 00 02 sub %g4, %g2, %g3 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 2017ee4: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->TOD_watchdogs.last_snapshot = snapshot; 2017ee8: d2 26 20 74 st %o1, [ %i0 + 0x74 ] _ISR_Enable( level ); 2017eec: 7f ff dd 37 call 200f3c8 2017ef0: 90 10 00 1c mov %i4, %o0 _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 2017ef4: 90 06 20 68 add %i0, 0x68, %o0 2017ef8: 40 00 12 3d call 201c7ec <_Watchdog_Insert> 2017efc: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017f00: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017f04: 80 a0 60 00 cmp %g1, 0 2017f08: 12 bf ff dd bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c> 2017f0c: 01 00 00 00 nop _Timer_server_Reset_tod_system_watchdog( ts ); 2017f10: 7f ff ff 2f call 2017bcc <_Timer_server_Reset_tod_system_watchdog> 2017f14: 90 10 00 18 mov %i0, %o0 } } _Thread_Enable_dispatch(); 2017f18: 40 00 0e 25 call 201b7ac <_Thread_Enable_dispatch> 2017f1c: 81 e8 00 00 restore if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 2017f20: 7f ff dd 26 call 200f3b8 2017f24: 01 00 00 00 nop snapshot = _Watchdog_Ticks_since_boot; 2017f28: 05 00 80 ec sethi %hi(0x203b000), %g2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 2017f2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2017f30: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2 last_snapshot = ts->Interval_watchdogs.last_snapshot; 2017f34: 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 ); 2017f38: 86 06 20 34 add %i0, 0x34, %g3 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 2017f3c: 80 a0 40 03 cmp %g1, %g3 2017f40: 02 80 00 08 be 2017f60 <_Timer_server_Schedule_operation_method+0x130> 2017f44: 88 20 80 04 sub %g2, %g4, %g4 /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; 2017f48: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 if (delta_interval > delta) { 2017f4c: 80 a1 00 1c cmp %g4, %i4 2017f50: 1a 80 00 03 bcc 2017f5c <_Timer_server_Schedule_operation_method+0x12c> 2017f54: 86 10 20 00 clr %g3 delta_interval -= delta; 2017f58: 86 27 00 04 sub %i4, %g4, %g3 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 2017f5c: c6 20 60 10 st %g3, [ %g1 + 0x10 ] } ts->Interval_watchdogs.last_snapshot = snapshot; 2017f60: c4 26 20 3c st %g2, [ %i0 + 0x3c ] _ISR_Enable( level ); 2017f64: 7f ff dd 19 call 200f3c8 2017f68: 01 00 00 00 nop _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 2017f6c: 90 06 20 30 add %i0, 0x30, %o0 2017f70: 40 00 12 1f call 201c7ec <_Watchdog_Insert> 2017f74: 92 07 60 10 add %i5, 0x10, %o1 if ( !ts->active ) { 2017f78: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2017f7c: 80 a0 60 00 cmp %g1, 0 2017f80: 12 bf ff bf bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c> 2017f84: 01 00 00 00 nop _Timer_server_Reset_interval_system_watchdog( ts ); 2017f88: 7f ff fe fd call 2017b7c <_Timer_server_Reset_interval_system_watchdog> 2017f8c: 90 10 00 18 mov %i0, %o0 if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 2017f90: 40 00 0e 07 call 201b7ac <_Thread_Enable_dispatch> 2017f94: 81 e8 00 00 restore =============================================================================== 0200abe8 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200abe8: 9d e3 bf 88 save %sp, -120, %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; 200abec: da 06 40 00 ld [ %i1 ], %o5 right += rhs->tv_nsec; 200abf0: ea 06 60 04 ld [ %i1 + 4 ], %l5 * 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; 200abf4: 99 3b 60 1f sra %o5, 0x1f, %o4 200abf8: 83 2b 20 03 sll %o4, 3, %g1 200abfc: 87 2b 60 03 sll %o5, 3, %g3 200ac00: 89 33 60 1d srl %o5, 0x1d, %g4 200ac04: 84 11 00 01 or %g4, %g1, %g2 200ac08: 83 30 e0 1b srl %g3, 0x1b, %g1 200ac0c: 95 28 a0 05 sll %g2, 5, %o2 200ac10: 97 28 e0 05 sll %g3, 5, %o3 200ac14: 94 10 40 0a or %g1, %o2, %o2 200ac18: 96 a2 c0 03 subcc %o3, %g3, %o3 200ac1c: 83 32 e0 1a srl %o3, 0x1a, %g1 200ac20: 94 62 80 02 subx %o2, %g2, %o2 200ac24: 93 2a e0 06 sll %o3, 6, %o1 200ac28: 91 2a a0 06 sll %o2, 6, %o0 200ac2c: 96 a2 40 0b subcc %o1, %o3, %o3 200ac30: 90 10 40 08 or %g1, %o0, %o0 200ac34: 94 62 00 0a subx %o0, %o2, %o2 200ac38: 96 82 c0 0d addcc %o3, %o5, %o3 200ac3c: 83 32 e0 1e srl %o3, 0x1e, %g1 200ac40: 94 42 80 0c addx %o2, %o4, %o2 200ac44: bb 2a e0 02 sll %o3, 2, %i5 200ac48: b9 2a a0 02 sll %o2, 2, %i4 200ac4c: 96 82 c0 1d addcc %o3, %i5, %o3 200ac50: b8 10 40 1c or %g1, %i4, %i4 200ac54: 83 32 e0 1e srl %o3, 0x1e, %g1 200ac58: 94 42 80 1c addx %o2, %i4, %o2 200ac5c: a3 2a e0 02 sll %o3, 2, %l1 200ac60: a1 2a a0 02 sll %o2, 2, %l0 200ac64: 96 82 c0 11 addcc %o3, %l1, %o3 200ac68: a0 10 40 10 or %g1, %l0, %l0 200ac6c: 83 32 e0 1e srl %o3, 0x1e, %g1 200ac70: 94 42 80 10 addx %o2, %l0, %o2 200ac74: a7 2a e0 02 sll %o3, 2, %l3 200ac78: a5 2a a0 02 sll %o2, 2, %l2 200ac7c: 96 82 c0 13 addcc %o3, %l3, %o3 200ac80: a4 10 40 12 or %g1, %l2, %l2 200ac84: 83 2a e0 09 sll %o3, 9, %g1 200ac88: 94 42 80 12 addx %o2, %l2, %o2 200ac8c: 87 32 e0 17 srl %o3, 0x17, %g3 200ac90: 85 2a a0 09 sll %o2, 9, %g2 right += rhs->tv_nsec; 200ac94: 96 80 40 15 addcc %g1, %l5, %o3 200ac98: a9 3d 60 1f sra %l5, 0x1f, %l4 * 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; 200ac9c: 94 10 c0 02 or %g3, %g2, %o2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 200aca0: c8 06 00 00 ld [ %i0 ], %g4 left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200aca4: 94 42 80 14 addx %o2, %l4, %o2 if ( right == 0 ) { 200aca8: 80 92 80 0b orcc %o2, %o3, %g0 200acac: 02 80 00 64 be 200ae3c <_Timespec_Divide+0x254> <== ALWAYS TAKEN 200acb0: c2 06 20 04 ld [ %i0 + 4 ], %g1 /* * 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; 200acb4: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED 200acb8: 83 38 60 1f sra %g1, 0x1f, %g1 <== 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; 200acbc: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED 200acc0: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED 200acc4: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED 200acc8: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED 200accc: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED left += lhs->tv_nsec; 200acd0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== 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; 200acd4: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED 200acd8: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED 200acdc: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED 200ace0: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED 200ace4: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED 200ace8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED 200acec: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED 200acf0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED 200acf4: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED 200acf8: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED 200acfc: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED 200ad00: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 200ad04: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED 200ad08: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200ad0c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ad10: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200ad14: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED 200ad18: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED 200ad1c: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED 200ad20: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED 200ad24: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ad28: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED 200ad2c: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED 200ad30: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED 200ad34: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED 200ad38: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED 200ad3c: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED 200ad40: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED 200ad44: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200ad48: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED 200ad4c: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED 200ad50: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED 200ad54: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED 200ad58: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED 200ad5c: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED 200ad60: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED left += lhs->tv_nsec; 200ad64: f8 1f bf e8 ldd [ %fp + -24 ], %i4 <== 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; 200ad68: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED left += lhs->tv_nsec; 200ad6c: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED 200ad70: 98 40 80 1c addx %g2, %i4, %o4 <== NOT EXECUTED * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 200ad74: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED 200ad78: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED 200ad7c: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED 200ad80: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED 200ad84: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED 200ad88: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED 200ad8c: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED 200ad90: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED 200ad94: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED 200ad98: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED 200ad9c: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED 200ada0: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED 200ada4: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200ada8: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200adac: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200adb0: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED 200adb4: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200adb8: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED 200adbc: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED 200adc0: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED 200adc4: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED 200adc8: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED 200adcc: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED 200add0: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED 200add4: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED 200add8: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED 200addc: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED 200ade0: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED 200ade4: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED 200ade8: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED 200adec: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED 200adf0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED 200adf4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED 200adf8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED 200adfc: 40 00 38 6f call 2018fb8 <__udivdi3> <== NOT EXECUTED 200ae00: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED *ival_percentage = answer / 1000; 200ae04: 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; 200ae08: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 200ae0c: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED *ival_percentage = answer / 1000; 200ae10: 40 00 38 6a call 2018fb8 <__udivdi3> <== NOT EXECUTED 200ae14: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED *fval_percentage = answer % 1000; 200ae18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200ae1c: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED *fval_percentage = answer % 1000; 200ae20: 94 10 20 00 clr %o2 <== NOT EXECUTED 200ae24: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED 200ae28: 40 00 39 39 call 201930c <__umoddi3> <== NOT EXECUTED 200ae2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED 200ae30: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED 200ae34: 81 c7 e0 08 ret <== NOT EXECUTED 200ae38: 81 e8 00 00 restore <== NOT EXECUTED left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 200ae3c: c0 26 80 00 clr [ %i2 ] *fval_percentage = 0; 200ae40: c0 26 c0 00 clr [ %i3 ] return; 200ae44: 81 c7 e0 08 ret 200ae48: 81 e8 00 00 restore =============================================================================== 0200ae4c <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 200ae4c: c6 02 00 00 ld [ %o0 ], %g3 200ae50: c4 02 40 00 ld [ %o1 ], %g2 200ae54: 80 a0 c0 02 cmp %g3, %g2 200ae58: 06 80 00 0a bl 200ae80 <_Timespec_Less_than+0x34> <== NEVER TAKEN 200ae5c: 82 10 20 01 mov 1, %g1 return true; if ( lhs->tv_sec > rhs->tv_sec ) 200ae60: 80 a0 c0 02 cmp %g3, %g2 200ae64: 14 80 00 07 bg 200ae80 <_Timespec_Less_than+0x34> 200ae68: 82 10 20 00 clr %g1 #include #include #include bool _Timespec_Less_than( 200ae6c: c6 02 20 04 ld [ %o0 + 4 ], %g3 200ae70: c4 02 60 04 ld [ %o1 + 4 ], %g2 200ae74: 80 a0 c0 02 cmp %g3, %g2 200ae78: 16 80 00 04 bge 200ae88 <_Timespec_Less_than+0x3c> <== ALWAYS TAKEN 200ae7c: 82 10 20 01 mov 1, %g1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 200ae80: 81 c3 e0 08 retl 200ae84: 90 08 60 01 and %g1, 1, %o0 #include #include #include bool _Timespec_Less_than( 200ae88: 82 10 20 00 clr %g1 /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 200ae8c: 81 c3 e0 08 retl 200ae90: 90 08 60 01 and %g1, 1, %o0 =============================================================================== 0200c090 <_Timespec_Subtract>: const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { 200c090: c2 02 20 04 ld [ %o0 + 4 ], %g1 200c094: c4 02 60 04 ld [ %o1 + 4 ], %g2 result->tv_sec = end->tv_sec - start->tv_sec - 1; 200c098: c8 02 40 00 ld [ %o1 ], %g4 const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { 200c09c: 80 a0 80 01 cmp %g2, %g1 200c0a0: 06 80 00 07 bl 200c0bc <_Timespec_Subtract+0x2c> <== NEVER TAKEN 200c0a4: c6 02 00 00 ld [ %o0 ], %g3 result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; 200c0a8: 82 20 80 01 sub %g2, %g1, %g1 if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 200c0ac: 86 21 00 03 sub %g4, %g3, %g3 result->tv_nsec = end->tv_nsec - start->tv_nsec; 200c0b0: c2 22 a0 04 st %g1, [ %o2 + 4 ] if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; 200c0b4: 81 c3 e0 08 retl 200c0b8: c6 22 80 00 st %g3, [ %o2 ] struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 200c0bc: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 200c0c0: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 200c0c4: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 200c0c8: 88 11 22 00 or %g4, 0x200, %g4 <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; 200c0cc: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; 200c0d0: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED 200c0d4: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = 200c0d8: 81 c3 e0 08 retl <== NOT EXECUTED 200c0dc: c2 22 a0 04 st %g1, [ %o2 + 4 ] <== NOT EXECUTED =============================================================================== 0200cb54 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 200cb54: 9d e3 bf a0 save %sp, -96, %sp Timestamp64_Control answer; if ( *_rhs == 0 ) { 200cb58: d4 1e 40 00 ldd [ %i1 ], %o2 200cb5c: 80 92 80 0b orcc %o2, %o3, %g0 200cb60: 22 80 00 2f be,a 200cc1c <_Timestamp64_Divide+0xc8> <== NEVER TAKEN 200cb64: c0 26 80 00 clr [ %i2 ] <== 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; 200cb68: f8 1e 00 00 ldd [ %i0 ], %i4 200cb6c: 83 2f 20 02 sll %i4, 2, %g1 200cb70: 9b 2f 60 02 sll %i5, 2, %o5 200cb74: 89 37 60 1e srl %i5, 0x1e, %g4 200cb78: 98 11 00 01 or %g4, %g1, %o4 200cb7c: 83 33 60 1b srl %o5, 0x1b, %g1 200cb80: 85 2b 20 05 sll %o4, 5, %g2 200cb84: 87 2b 60 05 sll %o5, 5, %g3 200cb88: 84 10 40 02 or %g1, %g2, %g2 200cb8c: 86 a0 c0 0d subcc %g3, %o5, %g3 200cb90: 84 60 80 0c subx %g2, %o4, %g2 200cb94: 86 80 c0 1d addcc %g3, %i5, %g3 200cb98: 83 30 e0 1e srl %g3, 0x1e, %g1 200cb9c: 84 40 80 1c addx %g2, %i4, %g2 200cba0: 93 28 e0 02 sll %g3, 2, %o1 200cba4: 91 28 a0 02 sll %g2, 2, %o0 200cba8: 86 80 c0 09 addcc %g3, %o1, %g3 200cbac: 90 10 40 08 or %g1, %o0, %o0 200cbb0: 83 30 e0 1e srl %g3, 0x1e, %g1 200cbb4: 84 40 80 08 addx %g2, %o0, %g2 200cbb8: b3 28 e0 02 sll %g3, 2, %i1 200cbbc: b1 28 a0 02 sll %g2, 2, %i0 200cbc0: 92 80 c0 19 addcc %g3, %i1, %o1 200cbc4: b0 10 40 18 or %g1, %i0, %i0 200cbc8: 87 32 60 1b srl %o1, 0x1b, %g3 200cbcc: 90 40 80 18 addx %g2, %i0, %o0 200cbd0: 83 2a 60 05 sll %o1, 5, %g1 200cbd4: 85 2a 20 05 sll %o0, 5, %g2 200cbd8: 92 10 00 01 mov %g1, %o1 200cbdc: 40 00 38 25 call 201ac70 <__divdi3> 200cbe0: 90 10 c0 02 or %g3, %g2, %o0 *_ival_percentage = answer / 1000; 200cbe4: 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; 200cbe8: b0 10 00 08 mov %o0, %i0 200cbec: b8 10 00 09 mov %o1, %i4 *_ival_percentage = answer / 1000; 200cbf0: 40 00 38 20 call 201ac70 <__divdi3> 200cbf4: 96 10 23 e8 mov 0x3e8, %o3 *_fval_percentage = answer % 1000; 200cbf8: 90 10 00 18 mov %i0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 200cbfc: d2 26 80 00 st %o1, [ %i2 ] *_fval_percentage = answer % 1000; 200cc00: 94 10 20 00 clr %o2 200cc04: 96 10 23 e8 mov 0x3e8, %o3 200cc08: 40 00 39 00 call 201b008 <__moddi3> 200cc0c: 92 10 00 1c mov %i4, %o1 200cc10: d2 26 c0 00 st %o1, [ %i3 ] 200cc14: 81 c7 e0 08 ret 200cc18: 81 e8 00 00 restore { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; 200cc1c: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED return; 200cc20: 81 c7 e0 08 ret <== NOT EXECUTED 200cc24: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200b3d0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 200b3d0: 9d e3 bf a0 save %sp, -96, %sp 200b3d4: 39 00 80 75 sethi %hi(0x201d400), %i4 200b3d8: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List> 200b3dc: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b3e0: 80 a7 40 1c cmp %i5, %i4 200b3e4: 02 80 00 0d be 200b418 <_User_extensions_Fatal+0x48> <== NEVER TAKEN 200b3e8: 01 00 00 00 nop !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 200b3ec: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200b3f0: 80 a0 60 00 cmp %g1, 0 200b3f4: 02 80 00 05 be 200b408 <_User_extensions_Fatal+0x38> 200b3f8: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 200b3fc: 92 10 00 19 mov %i1, %o1 200b400: 9f c0 40 00 call %g1 200b404: 94 10 00 1a mov %i2, %o2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b408: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b40c: 80 a7 40 1c cmp %i5, %i4 200b410: 32 bf ff f8 bne,a 200b3f0 <_User_extensions_Fatal+0x20> 200b414: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200b418: 81 c7 e0 08 ret 200b41c: 81 e8 00 00 restore =============================================================================== 0200b27c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 200b27c: 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; 200b280: 07 00 80 71 sethi %hi(0x201c400), %g3 200b284: 86 10 e2 4c or %g3, 0x24c, %g3 ! 201c64c initial_extensions = Configuration.User_extension_table; 200b288: f6 00 e0 44 ld [ %g3 + 0x44 ], %i3 200b28c: 3b 00 80 75 sethi %hi(0x201d400), %i5 200b290: 09 00 80 74 sethi %hi(0x201d000), %g4 200b294: 84 17 61 98 or %i5, 0x198, %g2 200b298: 82 11 23 b4 or %g4, 0x3b4, %g1 200b29c: b4 00 a0 04 add %g2, 4, %i2 200b2a0: b8 00 60 04 add %g1, 4, %i4 200b2a4: f4 27 61 98 st %i2, [ %i5 + 0x198 ] head->previous = NULL; 200b2a8: c0 20 a0 04 clr [ %g2 + 4 ] tail->previous = head; 200b2ac: c4 20 a0 08 st %g2, [ %g2 + 8 ] ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 200b2b0: f8 21 23 b4 st %i4, [ %g4 + 0x3b4 ] head->previous = NULL; 200b2b4: c0 20 60 04 clr [ %g1 + 4 ] tail->previous = head; 200b2b8: c2 20 60 08 st %g1, [ %g1 + 8 ] _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 200b2bc: 80 a6 e0 00 cmp %i3, 0 200b2c0: 02 80 00 1b be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200b2c4: f4 00 e0 40 ld [ %g3 + 0x40 ], %i2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) 200b2c8: 83 2e a0 02 sll %i2, 2, %g1 200b2cc: b9 2e a0 04 sll %i2, 4, %i4 200b2d0: b8 27 00 01 sub %i4, %g1, %i4 200b2d4: b8 07 00 1a add %i4, %i2, %i4 200b2d8: b9 2f 20 02 sll %i4, 2, %i4 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200b2dc: 40 00 01 9c call 200b94c <_Workspace_Allocate_or_fatal_error> 200b2e0: 90 10 00 1c mov %i4, %o0 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200b2e4: 92 10 20 00 clr %o1 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 200b2e8: ba 10 00 08 mov %o0, %i5 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 200b2ec: 40 00 13 bd call 20101e0 200b2f0: 94 10 00 1c mov %i4, %o2 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200b2f4: 80 a6 a0 00 cmp %i2, 0 200b2f8: 02 80 00 0d be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN 200b2fc: b8 10 20 00 clr %i4 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 200b300: 92 10 00 1b mov %i3, %o1 200b304: 94 10 20 20 mov 0x20, %o2 200b308: 40 00 13 7a call 20100f0 200b30c: 90 07 60 14 add %i5, 0x14, %o0 _User_extensions_Add_set( extension ); 200b310: 40 00 0b 44 call 200e020 <_User_extensions_Add_set> 200b314: 90 10 00 1d mov %i5, %o0 200b318: b8 07 20 01 inc %i4 _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 200b31c: ba 07 60 34 add %i5, 0x34, %i5 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 200b320: 80 a7 00 1a cmp %i4, %i2 200b324: 12 bf ff f7 bne 200b300 <_User_extensions_Handler_initialization+0x84> 200b328: b6 06 e0 20 add %i3, 0x20, %i3 200b32c: 81 c7 e0 08 ret 200b330: 81 e8 00 00 restore =============================================================================== 0200b334 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 200b334: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b338: 39 00 80 75 sethi %hi(0x201d400), %i4 200b33c: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List> 200b340: b8 17 21 98 or %i4, 0x198, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b344: b8 07 20 04 add %i4, 4, %i4 200b348: 80 a7 40 1c cmp %i5, %i4 200b34c: 02 80 00 0c be 200b37c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN 200b350: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 200b354: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200b358: 80 a0 60 00 cmp %g1, 0 200b35c: 02 80 00 04 be 200b36c <_User_extensions_Thread_begin+0x38> 200b360: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_begin)( executing ); 200b364: 9f c0 40 00 call %g1 200b368: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b36c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b370: 80 a7 40 1c cmp %i5, %i4 200b374: 32 bf ff f9 bne,a 200b358 <_User_extensions_Thread_begin+0x24> 200b378: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200b37c: 81 c7 e0 08 ret 200b380: 81 e8 00 00 restore =============================================================================== 0200b420 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 200b420: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b424: 39 00 80 75 sethi %hi(0x201d400), %i4 200b428: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List> 200b42c: b8 17 21 98 or %i4, 0x198, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 200b430: b8 07 20 04 add %i4, 4, %i4 200b434: 80 a7 40 1c cmp %i5, %i4 200b438: 02 80 00 12 be 200b480 <_User_extensions_Thread_create+0x60><== NEVER TAKEN 200b43c: 82 10 20 01 mov 1, %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 200b440: 37 00 80 75 sethi %hi(0x201d400), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 200b444: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 200b448: 80 a0 60 00 cmp %g1, 0 200b44c: 02 80 00 08 be 200b46c <_User_extensions_Thread_create+0x4c> 200b450: 84 16 e1 e0 or %i3, 0x1e0, %g2 status = (*the_extension->Callouts.thread_create)( 200b454: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b458: 9f c0 40 00 call %g1 200b45c: 92 10 00 18 mov %i0, %o1 _Thread_Executing, the_thread ); if ( !status ) 200b460: 80 8a 20 ff btst 0xff, %o0 200b464: 02 80 00 0a be 200b48c <_User_extensions_Thread_create+0x6c> 200b468: 82 10 20 00 clr %g1 User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b46c: fa 07 40 00 ld [ %i5 ], %i5 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 200b470: 80 a7 40 1c cmp %i5, %i4 200b474: 32 bf ff f5 bne,a 200b448 <_User_extensions_Thread_create+0x28> 200b478: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 if ( !status ) return false; } } return true; 200b47c: 82 10 20 01 mov 1, %g1 } 200b480: b0 08 60 01 and %g1, 1, %i0 200b484: 81 c7 e0 08 ret 200b488: 81 e8 00 00 restore 200b48c: b0 08 60 01 and %g1, 1, %i0 200b490: 81 c7 e0 08 ret 200b494: 81 e8 00 00 restore =============================================================================== 0200b498 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 200b498: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 200b49c: 39 00 80 75 sethi %hi(0x201d400), %i4 200b4a0: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List> 200b4a4: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b4a8: 80 a7 40 1c cmp %i5, %i4 200b4ac: 02 80 00 0d be 200b4e0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN 200b4b0: 37 00 80 75 sethi %hi(0x201d400), %i3 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 200b4b4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200b4b8: 80 a0 60 00 cmp %g1, 0 200b4bc: 02 80 00 05 be 200b4d0 <_User_extensions_Thread_delete+0x38> 200b4c0: 84 16 e1 e0 or %i3, 0x1e0, %g2 (*the_extension->Callouts.thread_delete)( 200b4c4: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b4c8: 9f c0 40 00 call %g1 200b4cc: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b4d0: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b4d4: 80 a7 40 1c cmp %i5, %i4 200b4d8: 32 bf ff f8 bne,a 200b4b8 <_User_extensions_Thread_delete+0x20> 200b4dc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200b4e0: 81 c7 e0 08 ret 200b4e4: 81 e8 00 00 restore =============================================================================== 0200b384 <_User_extensions_Thread_exitted>: } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 200b384: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 200b388: 39 00 80 75 sethi %hi(0x201d400), %i4 200b38c: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List> 200b390: fa 07 20 08 ld [ %i4 + 8 ], %i5 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b394: 80 a7 40 1c cmp %i5, %i4 200b398: 02 80 00 0c be 200b3c8 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN 200b39c: 01 00 00 00 nop !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 200b3a0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200b3a4: 80 a0 60 00 cmp %g1, 0 200b3a8: 02 80 00 04 be 200b3b8 <_User_extensions_Thread_exitted+0x34> 200b3ac: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.thread_exitted)( executing ); 200b3b0: 9f c0 40 00 call %g1 200b3b4: 01 00 00 00 nop Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 200b3b8: fa 07 60 04 ld [ %i5 + 4 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 200b3bc: 80 a7 40 1c cmp %i5, %i4 200b3c0: 32 bf ff f9 bne,a 200b3a4 <_User_extensions_Thread_exitted+0x20> 200b3c4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 200b3c8: 81 c7 e0 08 ret 200b3cc: 81 e8 00 00 restore =============================================================================== 0200bd28 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 200bd28: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200bd2c: 39 00 80 78 sethi %hi(0x201e000), %i4 200bd30: fa 07 20 b8 ld [ %i4 + 0xb8 ], %i5 ! 201e0b8 <_User_extensions_List> 200bd34: b8 17 20 b8 or %i4, 0xb8, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200bd38: b8 07 20 04 add %i4, 4, %i4 200bd3c: 80 a7 40 1c cmp %i5, %i4 200bd40: 02 80 00 0d be 200bd74 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN 200bd44: 37 00 80 78 sethi %hi(0x201e000), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 200bd48: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200bd4c: 80 a0 60 00 cmp %g1, 0 200bd50: 02 80 00 05 be 200bd64 <_User_extensions_Thread_restart+0x3c> 200bd54: 84 16 e1 00 or %i3, 0x100, %g2 (*the_extension->Callouts.thread_restart)( 200bd58: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200bd5c: 9f c0 40 00 call %g1 200bd60: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200bd64: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200bd68: 80 a7 40 1c cmp %i5, %i4 200bd6c: 32 bf ff f8 bne,a 200bd4c <_User_extensions_Thread_restart+0x24> 200bd70: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 200bd74: 81 c7 e0 08 ret 200bd78: 81 e8 00 00 restore =============================================================================== 0200b4e8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 200b4e8: 9d e3 bf a0 save %sp, -96, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200b4ec: 39 00 80 75 sethi %hi(0x201d400), %i4 200b4f0: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List> 200b4f4: b8 17 21 98 or %i4, 0x198, %i4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b4f8: b8 07 20 04 add %i4, 4, %i4 200b4fc: 80 a7 40 1c cmp %i5, %i4 200b500: 02 80 00 0d be 200b534 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN 200b504: 37 00 80 75 sethi %hi(0x201d400), %i3 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 200b508: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b50c: 80 a0 60 00 cmp %g1, 0 200b510: 02 80 00 05 be 200b524 <_User_extensions_Thread_start+0x3c> 200b514: 84 16 e1 e0 or %i3, 0x1e0, %g2 (*the_extension->Callouts.thread_start)( 200b518: d0 00 a0 0c ld [ %g2 + 0xc ], %o0 200b51c: 9f c0 40 00 call %g1 200b520: 92 10 00 18 mov %i0, %o1 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 200b524: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 200b528: 80 a7 40 1c cmp %i5, %i4 200b52c: 32 bf ff f8 bne,a 200b50c <_User_extensions_Thread_start+0x24> 200b530: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 200b534: 81 c7 e0 08 ret 200b538: 81 e8 00 00 restore =============================================================================== 0200b53c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 200b53c: 9d e3 bf a0 save %sp, -96, %sp 200b540: 39 00 80 74 sethi %hi(0x201d000), %i4 200b544: fa 07 23 b4 ld [ %i4 + 0x3b4 ], %i5 ! 201d3b4 <_User_extensions_Switches_list> 200b548: b8 17 23 b4 or %i4, 0x3b4, %i4 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 200b54c: b8 07 20 04 add %i4, 4, %i4 200b550: 80 a7 40 1c cmp %i5, %i4 200b554: 02 80 00 0a be 200b57c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN 200b558: 01 00 00 00 nop !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 200b55c: c2 07 60 08 ld [ %i5 + 8 ], %g1 200b560: 90 10 00 18 mov %i0, %o0 200b564: 9f c0 40 00 call %g1 200b568: 92 10 00 19 mov %i1, %o1 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 200b56c: fa 07 40 00 ld [ %i5 ], %i5 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 200b570: 80 a7 40 1c cmp %i5, %i4 200b574: 32 bf ff fb bne,a 200b560 <_User_extensions_Thread_switch+0x24> 200b578: c2 07 60 08 ld [ %i5 + 8 ], %g1 200b57c: 81 c7 e0 08 ret 200b580: 81 e8 00 00 restore =============================================================================== 0200cf70 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200cf70: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; _ISR_Disable( level ); 200cf74: 7f ff d9 24 call 2003404 200cf78: 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; 200cf7c: 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 ); 200cf80: b6 06 20 04 add %i0, 4, %i3 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 200cf84: 80 a0 40 1b cmp %g1, %i3 200cf88: 02 80 00 1e be 200d000 <_Watchdog_Adjust+0x90> 200cf8c: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200cf90: 12 80 00 1e bne 200d008 <_Watchdog_Adjust+0x98> 200cf94: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200cf98: 80 a6 a0 00 cmp %i2, 0 200cf9c: 02 80 00 19 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200cfa0: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200cfa4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200cfa8: 80 a6 80 1c cmp %i2, %i4 200cfac: 1a 80 00 0a bcc 200cfd4 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN 200cfb0: b2 10 20 01 mov 1, %i1 _Watchdog_First( header )->delta_interval -= units; 200cfb4: 10 80 00 1c b 200d024 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED 200cfb8: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200cfbc: 02 80 00 11 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200cfc0: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200cfc4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4 200cfc8: 80 a7 00 1a cmp %i4, %i2 200cfcc: 38 80 00 16 bgu,a 200d024 <_Watchdog_Adjust+0xb4> 200cfd0: b8 27 00 1a sub %i4, %i2, %i4 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 200cfd4: f2 20 60 10 st %i1, [ %g1 + 0x10 ] _ISR_Enable( level ); 200cfd8: 7f ff d9 0f call 2003414 200cfdc: 01 00 00 00 nop _Watchdog_Tickle( header ); 200cfe0: 40 00 00 ab call 200d28c <_Watchdog_Tickle> 200cfe4: 90 10 00 1d mov %i5, %o0 _ISR_Disable( level ); 200cfe8: 7f ff d9 07 call 2003404 200cfec: 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; 200cff0: c2 07 40 00 ld [ %i5 ], %g1 if ( _Chain_Is_empty( header ) ) 200cff4: 80 a6 c0 01 cmp %i3, %g1 200cff8: 32 bf ff f1 bne,a 200cfbc <_Watchdog_Adjust+0x4c> 200cffc: b4 a6 80 1c subcc %i2, %i4, %i2 } break; } } _ISR_Enable( level ); 200d000: 7f ff d9 05 call 2003414 200d004: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200d008: 12 bf ff fe bne 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN 200d00c: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200d010: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 200d014: b4 00 80 1a add %g2, %i2, %i2 200d018: f4 20 60 10 st %i2, [ %g1 + 0x10 ] } break; } } _ISR_Enable( level ); 200d01c: 7f ff d8 fe call 2003414 200d020: 91 e8 00 08 restore %g0, %o0, %o0 break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; 200d024: 10 bf ff f7 b 200d000 <_Watchdog_Adjust+0x90> 200d028: f8 20 60 10 st %i4, [ %g1 + 0x10 ] =============================================================================== 0200b70c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 200b70c: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 200b710: 7f ff db ea call 20026b8 200b714: 01 00 00 00 nop previous_state = the_watchdog->state; 200b718: fa 06 20 08 ld [ %i0 + 8 ], %i5 switch ( previous_state ) { 200b71c: 80 a7 60 01 cmp %i5, 1 200b720: 02 80 00 2a be 200b7c8 <_Watchdog_Remove+0xbc> 200b724: 03 00 80 75 sethi %hi(0x201d400), %g1 200b728: 1a 80 00 09 bcc 200b74c <_Watchdog_Remove+0x40> 200b72c: 80 a7 60 03 cmp %i5, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b730: 03 00 80 75 sethi %hi(0x201d400), %g1 200b734: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot> 200b738: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b73c: 7f ff db e3 call 20026c8 200b740: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b744: 81 c7 e0 08 ret 200b748: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 200b74c: 18 bf ff fa bgu 200b734 <_Watchdog_Remove+0x28> <== NEVER TAKEN 200b750: 03 00 80 75 sethi %hi(0x201d400), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 200b754: c2 06 00 00 ld [ %i0 ], %g1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200b758: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 200b75c: c4 00 40 00 ld [ %g1 ], %g2 200b760: 80 a0 a0 00 cmp %g2, 0 200b764: 02 80 00 07 be 200b780 <_Watchdog_Remove+0x74> 200b768: 05 00 80 75 sethi %hi(0x201d400), %g2 next_watchdog->delta_interval += the_watchdog->delta_interval; 200b76c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 200b770: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 200b774: 84 00 c0 02 add %g3, %g2, %g2 200b778: c4 20 60 10 st %g2, [ %g1 + 0x10 ] if ( _Watchdog_Sync_count ) 200b77c: 05 00 80 75 sethi %hi(0x201d400), %g2 200b780: c4 00 a0 bc ld [ %g2 + 0xbc ], %g2 ! 201d4bc <_Watchdog_Sync_count> 200b784: 80 a0 a0 00 cmp %g2, 0 200b788: 22 80 00 07 be,a 200b7a4 <_Watchdog_Remove+0x98> 200b78c: c4 06 20 04 ld [ %i0 + 4 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 200b790: 05 00 80 75 sethi %hi(0x201d400), %g2 200b794: c6 00 a1 e8 ld [ %g2 + 0x1e8 ], %g3 ! 201d5e8 <_Per_CPU_Information+0x8> 200b798: 05 00 80 75 sethi %hi(0x201d400), %g2 200b79c: c6 20 a0 5c st %g3, [ %g2 + 0x5c ] ! 201d45c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 200b7a0: c4 06 20 04 ld [ %i0 + 4 ], %g2 next->previous = previous; 200b7a4: c4 20 60 04 st %g2, [ %g1 + 4 ] previous->next = next; 200b7a8: c2 20 80 00 st %g1, [ %g2 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b7ac: 03 00 80 75 sethi %hi(0x201d400), %g1 200b7b0: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot> 200b7b4: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b7b8: 7f ff db c4 call 20026c8 200b7bc: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b7c0: 81 c7 e0 08 ret 200b7c4: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b7c8: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 200b7cc: c0 26 20 08 clr [ %i0 + 8 ] _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 200b7d0: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 200b7d4: 7f ff db bd call 20026c8 200b7d8: b0 10 00 1d mov %i5, %i0 return( previous_state ); } 200b7dc: 81 c7 e0 08 ret 200b7e0: 81 e8 00 00 restore =============================================================================== 0200c924 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 200c924: 9d e3 bf a0 save %sp, -96, %sp ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 200c928: 7f ff d9 98 call 2002f88 200c92c: 01 00 00 00 nop 200c930: ba 10 00 08 mov %o0, %i5 printk( "Watchdog Chain: %s %p\n", name, header ); 200c934: 11 00 80 74 sethi %hi(0x201d000), %o0 200c938: 94 10 00 19 mov %i1, %o2 200c93c: 92 10 00 18 mov %i0, %o1 200c940: 7f ff e1 ac call 2004ff0 200c944: 90 12 23 30 or %o0, 0x330, %o0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 200c948: 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 ); 200c94c: b2 06 60 04 add %i1, 4, %i1 if ( !_Chain_Is_empty( header ) ) { 200c950: 80 a7 00 19 cmp %i4, %i1 200c954: 02 80 00 0f be 200c990 <_Watchdog_Report_chain+0x6c> 200c958: 11 00 80 74 sethi %hi(0x201d000), %o0 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 200c95c: 92 10 00 1c mov %i4, %o1 200c960: 40 00 00 0f call 200c99c <_Watchdog_Report> 200c964: 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 ) 200c968: 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 ) ; 200c96c: 80 a7 00 19 cmp %i4, %i1 200c970: 12 bf ff fc bne 200c960 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN 200c974: 92 10 00 1c mov %i4, %o1 { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 200c978: 11 00 80 74 sethi %hi(0x201d000), %o0 200c97c: 92 10 00 18 mov %i0, %o1 200c980: 7f ff e1 9c call 2004ff0 200c984: 90 12 23 48 or %o0, 0x348, %o0 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 200c988: 7f ff d9 84 call 2002f98 200c98c: 91 e8 00 1d restore %g0, %i5, %o0 _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 200c990: 7f ff e1 98 call 2004ff0 200c994: 90 12 23 58 or %o0, 0x358, %o0 200c998: 30 bf ff fc b,a 200c988 <_Watchdog_Report_chain+0x64> =============================================================================== 0200b6fc <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { 200b6fc: 9d e3 bf a0 save %sp, -96, %sp char *dup = _Workspace_Allocate(len + 1); 200b700: 7f ff ff e2 call 200b688 <_Workspace_Allocate> 200b704: 90 06 60 01 add %i1, 1, %o0 if (dup != NULL) { 200b708: ba 92 20 00 orcc %o0, 0, %i5 200b70c: 02 80 00 05 be 200b720 <_Workspace_String_duplicate+0x24> <== NEVER TAKEN 200b710: 92 10 00 18 mov %i0, %o1 dup [len] = '\0'; 200b714: c0 2f 40 19 clrb [ %i5 + %i1 ] memcpy(dup, string, len); 200b718: 40 00 12 72 call 20100e0 200b71c: 94 10 00 19 mov %i1, %o2 } return dup; } 200b720: 81 c7 e0 08 ret 200b724: 91 e8 00 1d restore %g0, %i5, %o0 =============================================================================== 02019f90 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2019f90: 81 c3 e0 08 retl <== NOT EXECUTED 2019f94: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 02029078 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 2029078: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 202907c: c0 27 bf fc clr [ %fp + -4 ] uint32_t count, void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 2029080: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 2029084: 80 a6 e0 00 cmp %i3, 0 2029088: 12 80 00 12 bne 20290d0 <_fat_block_read+0x58> <== ALWAYS TAKEN 202908c: b0 10 20 00 clr %i0 2029090: 30 80 00 1a b,a 20290f8 <_fat_block_read+0x80> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 2029094: e0 17 40 00 lduh [ %i5 ], %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 2029098: c2 07 bf fc ld [ %fp + -4 ], %g1 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 202909c: a0 24 00 1a sub %l0, %i2, %l0 20290a0: 80 a4 00 1b cmp %l0, %i3 20290a4: 08 80 00 03 bleu 20290b0 <_fat_block_read+0x38> 20290a8: b2 06 60 01 inc %i1 20290ac: a0 10 00 1b mov %i3, %l0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 20290b0: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 20290b4: 94 10 00 10 mov %l0, %o2 20290b8: 40 00 85 ce call 204a7f0 20290bc: 92 02 40 1a add %o1, %i2, %o1 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 20290c0: b6 a6 c0 10 subcc %i3, %l0, %i3 20290c4: 02 80 00 0d be 20290f8 <_fat_block_read+0x80> 20290c8: b0 04 00 18 add %l0, %i0, %i0 memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; ofs = 0; 20290cc: b4 10 20 00 clr %i2 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 20290d0: 92 10 00 19 mov %i1, %o1 20290d4: 94 10 20 01 mov 1, %o2 20290d8: 96 07 bf fc add %fp, -4, %o3 20290dc: 7f ff ff 06 call 2028cf4 20290e0: 90 10 00 1d mov %i5, %o0 if (rc != RC_OK) 20290e4: 80 a2 20 00 cmp %o0, 0 20290e8: 02 bf ff eb be 2029094 <_fat_block_read+0x1c> <== ALWAYS TAKEN 20290ec: 90 07 00 18 add %i4, %i0, %o0 cmpltd += c; blk++; ofs = 0; } return cmpltd; } 20290f0: 81 c7 e0 08 ret <== NOT EXECUTED 20290f4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 20290f8: 81 c7 e0 08 ret 20290fc: 81 e8 00 00 restore =============================================================================== 020291bc <_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); 20291bc: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED 20291c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20291c4: 7f ff ff 52 call 2028f0c <== NOT EXECUTED 20291c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02029100 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 2029100: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 2029104: c0 27 bf fc clr [ %fp + -4 ] uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2029108: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 202910c: a2 10 20 01 mov 1, %l1 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2029110: 80 a6 e0 00 cmp %i3, 0 2029114: 12 80 00 14 bne 2029164 <_fat_block_write+0x64> <== ALWAYS TAKEN 2029118: b0 10 20 00 clr %i0 202911c: 30 80 00 26 b,a 20291b4 <_fat_block_write+0xb4> <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) 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); 2029120: 96 07 bf fc add %fp, -4, %o3 2029124: 7f ff fe f4 call 2028cf4 2029128: 90 10 00 10 mov %l0, %o0 if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202912c: 92 07 00 18 add %i4, %i0, %o1 if (c == fs_info->vol.bps) 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); if (rc != RC_OK) 2029130: 80 a2 20 00 cmp %o0, 0 2029134: 12 80 00 1e bne 20291ac <_fat_block_write+0xac> <== NEVER TAKEN 2029138: 94 10 00 1d mov %i5, %o2 return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202913c: c2 07 bf fc ld [ %fp + -4 ], %g1 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 2029140: b0 07 40 18 add %i5, %i0, %i0 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 2029144: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 2029148: b2 06 60 01 inc %i1 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202914c: 40 00 85 a9 call 204a7f0 2029150: 90 02 00 1a add %o0, %i2, %o0 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 2029154: b6 a6 c0 1d subcc %i3, %i5, %i3 2029158: 02 80 00 17 be 20291b4 <_fat_block_write+0xb4> 202915c: e2 2c 20 7c stb %l1, [ %l0 + 0x7c ] fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 2029160: b4 10 20 00 clr %i2 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); 2029164: c2 14 00 00 lduh [ %l0 ], %g1 2029168: ba 20 40 1a sub %g1, %i2, %i5 202916c: 80 a7 40 1b cmp %i5, %i3 2029170: 08 80 00 03 bleu 202917c <_fat_block_write+0x7c> 2029174: 92 10 00 19 mov %i1, %o1 2029178: ba 10 00 1b mov %i3, %i5 if (c == fs_info->vol.bps) 202917c: 80 a0 40 1d cmp %g1, %i5 2029180: 32 bf ff e8 bne,a 2029120 <_fat_block_write+0x20> 2029184: 94 10 20 01 mov 1, %o2 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 2029188: 92 10 00 19 mov %i1, %o1 202918c: 94 10 20 02 mov 2, %o2 2029190: 90 10 00 10 mov %l0, %o0 2029194: 7f ff fe d8 call 2028cf4 2029198: 96 07 bf fc add %fp, -4, %o3 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 202919c: 92 07 00 18 add %i4, %i0, %o1 if (c == fs_info->vol.bps) 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); if (rc != RC_OK) 20291a0: 80 a2 20 00 cmp %o0, 0 20291a4: 02 bf ff e6 be 202913c <_fat_block_write+0x3c> <== ALWAYS TAKEN 20291a8: 94 10 00 1d mov %i5, %o2 cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 20291ac: 81 c7 e0 08 ret <== NOT EXECUTED 20291b0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 20291b4: 81 c7 e0 08 ret 20291b8: 81 e8 00 00 restore =============================================================================== 02003990 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 2003990: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003994: 7f ff ff d4 call 20038e4 <== NOT EXECUTED 2003998: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202bc70 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 202bc70: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202bc74: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202bc78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202bc7c: 7f ff ff e9 call 202bc20 <== NOT EXECUTED 202bc80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02004900 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2004900: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2004904: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2004908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200490c: 7f ff ff e9 call 20048b0 <== NOT EXECUTED 2004910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 0202a9f4 : #include #include int chroot( const char *path ) { 202a9f4: 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( 202a9f8: 94 10 20 19 mov 0x19, %o2 202a9fc: 92 10 00 18 mov %i0, %o1 202aa00: 90 07 bf a4 add %fp, -92, %o0 202aa04: 17 00 81 bf sethi %hi(0x206fc00), %o3 202aa08: 96 12 e1 fc or %o3, 0x1fc, %o3 ! 206fdfc 202aa0c: 7f ff 7f d0 call 200a94c 202aa10: 98 02 ff fc add %o3, -4, %o4 202aa14: 92 07 bf bc add %fp, -68, %o1 202aa18: 7f ff 80 9f call 200ac94 202aa1c: 90 07 bf e0 add %fp, -32, %o0 &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 ); 202aa20: 7f ff 81 25 call 200aeb4 202aa24: 90 07 bf e0 add %fp, -32, %o0 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 202aa28: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 202aa2c: 3b 00 81 91 sethi %hi(0x2064400), %i5 202aa30: ba 17 62 54 or %i5, 0x254, %i5 ! 2064654 202aa34: 80 a0 40 1d cmp %g1, %i5 202aa38: 02 80 00 15 be 202aa8c 202aa3c: d0 27 bf fc st %o0, [ %fp + -4 ] rtems_filesystem_global_location_t *new_root_loc = 202aa40: 7f ff 80 ea call 200ade8 202aa44: 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 ); 202aa48: 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 = 202aa4c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 202aa50: 9f c0 40 00 call %g1 202aa54: b8 10 00 08 mov %o0, %i4 (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 202aa58: 80 a2 20 00 cmp %o0, 0 202aa5c: 02 80 00 13 be 202aaa8 202aa60: 01 00 00 00 nop static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 202aa64: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 202aa68: 80 a0 40 1d cmp %g1, %i5 202aa6c: 02 80 00 06 be 202aa84 <== NEVER TAKEN 202aa70: 01 00 00 00 nop errno = eno; 202aa74: 40 00 72 1e call 20472ec <__errno> 202aa78: 01 00 00 00 nop 202aa7c: 82 10 20 14 mov 0x14, %g1 ! 14 202aa80: 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 ); 202aa84: 7f ff 80 b9 call 200ad68 202aa88: 90 10 00 1c mov %i4, %o0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 202aa8c: 7f ff 7f d3 call 200a9d8 202aa90: 90 07 bf a4 add %fp, -92, %o0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 202aa94: d0 07 bf fc ld [ %fp + -4 ], %o0 202aa98: 7f ff 80 b4 call 200ad68 202aa9c: b0 10 3f ff mov -1, %i0 } return rv; } 202aaa0: 81 c7 e0 08 ret 202aaa4: 81 e8 00 00 restore 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 ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); 202aaa8: 40 00 05 97 call 202c104 202aaac: 01 00 00 00 nop if (sc == RTEMS_SUCCESSFUL) { 202aab0: 80 a2 20 00 cmp %o0, 0 202aab4: 02 80 00 09 be 202aad8 202aab8: 80 a2 20 0d cmp %o0, 0xd rtems_filesystem_global_location_assign( &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 202aabc: 02 bf ff f2 be 202aa84 <== NEVER TAKEN 202aac0: 01 00 00 00 nop errno = ENOMEM; 202aac4: 40 00 72 0a call 20472ec <__errno> 202aac8: 01 00 00 00 nop 202aacc: 82 10 20 0c mov 0xc, %g1 ! c 202aad0: 10 bf ff ed b 202aa84 202aad4: c2 22 00 00 st %g1, [ %o0 ] (*new_root_loc->location.ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); if (sc == RTEMS_SUCCESSFUL) { rtems_filesystem_global_location_assign( 202aad8: 3b 00 81 bf sethi %hi(0x206fc00), %i5 202aadc: d0 07 61 f4 ld [ %i5 + 0x1f4 ], %o0 ! 206fdf4 202aae0: 92 10 00 1c mov %i4, %o1 202aae4: 7f ff 80 b7 call 200adc0 202aae8: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 202aaec: d2 07 bf fc ld [ %fp + -4 ], %o1 202aaf0: d0 07 61 f4 ld [ %i5 + 0x1f4 ], %o0 202aaf4: 7f ff 80 b3 call 200adc0 202aaf8: b0 10 20 00 clr %i0 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 202aafc: 7f ff 7f b7 call 200a9d8 202ab00: 90 07 bf a4 add %fp, -92, %o0 202ab04: 81 c7 e0 08 ret 202ab08: 81 e8 00 00 restore =============================================================================== 02003720 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2003720: 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) { 2003724: 39 00 80 83 sethi %hi(0x2020c00), %i4 2003728: e0 07 21 c8 ld [ %i4 + 0x1c8 ], %l0 ! 2020dc8 200372c: 03 00 80 83 sethi %hi(0x2020c00), %g1 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 2003730: ba 10 00 18 mov %i0, %i5 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 2003734: 80 a6 00 10 cmp %i0, %l0 2003738: 0a 80 00 16 bcs 2003790 200373c: e2 00 61 cc ld [ %g1 + 0x1cc ], %l1 rtems_disk_device_table *table = disktab; 2003740: 27 00 80 83 sethi %hi(0x2020c00), %l3 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 2003744: a5 2c 20 01 sll %l0, 1, %l2 if (major >= new_size) { 2003748: 80 a6 00 12 cmp %i0, %l2 200374c: 0a 80 00 03 bcs 2003758 <== NEVER TAKEN 2003750: d0 04 e1 cc ld [ %l3 + 0x1cc ], %o0 new_size = major + 1; 2003754: a4 06 20 01 add %i0, 1, %l2 } table = realloc(table, new_size * sizeof(*table)); 2003758: 93 2c a0 03 sll %l2, 3, %o1 200375c: 40 00 09 11 call 2005ba0 2003760: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2003764: 80 a2 20 00 cmp %o0, 0 2003768: 02 80 00 1b be 20037d4 <== ALWAYS TAKEN 200376c: a2 10 00 08 mov %o0, %l1 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003770: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED 2003774: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED 2003778: 92 10 20 00 clr %o1 <== NOT EXECUTED 200377c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED 2003780: 40 00 42 63 call 201410c <== NOT EXECUTED 2003784: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED disktab = table; 2003788: e2 24 e1 cc st %l1, [ %l3 + 0x1cc ] <== NOT EXECUTED disktab_size = new_size; 200378c: e4 27 21 c8 st %l2, [ %i4 + 0x1c8 ] <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2003790: 83 2f 60 03 sll %i5, 3, %g1 2003794: e0 04 40 01 ld [ %l1 + %g1 ], %l0 2003798: a2 04 40 01 add %l1, %g1, %l1 200379c: 80 a4 20 00 cmp %l0, 0 20037a0: 02 80 00 0f be 20037dc 20037a4: e4 04 60 04 ld [ %l1 + 4 ], %l2 20037a8: 80 a6 40 12 cmp %i1, %l2 20037ac: 1a 80 00 0d bcc 20037e0 20037b0: 80 a4 a0 00 cmp %l2, 0 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 20037b4: 83 2e 60 02 sll %i1, 2, %g1 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 20037b8: b8 84 00 01 addcc %l0, %g1, %i4 20037bc: 02 80 00 06 be 20037d4 <== NEVER TAKEN 20037c0: b0 10 20 1a mov 0x1a, %i0 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 20037c4: c2 04 00 01 ld [ %l0 + %g1 ], %g1 20037c8: 80 a0 60 00 cmp %g1, 0 20037cc: 02 80 00 20 be 200384c 20037d0: b0 10 20 0c mov 0xc, %i0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 20037d4: 81 c7 e0 08 ret 20037d8: 81 e8 00 00 restore if (disktab [major].minor == NULL || minor >= disktab[major].size) { 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) { 20037dc: 80 a4 a0 00 cmp %l2, 0 20037e0: 12 80 00 15 bne 2003834 20037e4: b8 10 20 08 mov 8, %i4 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; } if (minor >= new_size) { 20037e8: 80 a6 40 1c cmp %i1, %i4 20037ec: 3a 80 00 02 bcc,a 20037f4 20037f0: b8 06 60 01 add %i1, 1, %i4 new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 20037f4: 90 10 00 10 mov %l0, %o0 20037f8: 93 2f 20 02 sll %i4, 2, %o1 20037fc: 40 00 08 e9 call 2005ba0 2003800: b0 10 20 1a mov 0x1a, %i0 if (table == NULL) { 2003804: 80 a2 20 00 cmp %o0, 0 2003808: 02 bf ff f3 be 20037d4 200380c: a0 10 00 08 mov %o0, %l0 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2003810: 94 27 00 12 sub %i4, %l2, %o2 2003814: 91 2c a0 02 sll %l2, 2, %o0 2003818: 92 10 20 00 clr %o1 200381c: 90 04 00 08 add %l0, %o0, %o0 2003820: 40 00 42 3b call 201410c 2003824: 95 2a a0 02 sll %o2, 2, %o2 disktab [major].minor = table; 2003828: e0 24 40 00 st %l0, [ %l1 ] disktab [major].size = new_size; 200382c: 10 bf ff e2 b 20037b4 2003830: f8 24 60 04 st %i4, [ %l1 + 4 ] rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 2003834: b9 2c a0 01 sll %l2, 1, %i4 } if (minor >= new_size) { 2003838: 80 a6 40 1c cmp %i1, %i4 200383c: 0a bf ff ef bcs 20037f8 <== ALWAYS TAKEN 2003840: 90 10 00 10 mov %l0, %o0 2003844: 10 bf ff ed b 20037f8 <== NOT EXECUTED 2003848: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 200384c: 90 10 20 38 mov 0x38, %o0 2003850: 40 00 06 01 call 2005054 2003854: b0 10 20 1a mov 0x1a, %i0 if (dd == NULL) { 2003858: 80 a2 20 00 cmp %o0, 0 200385c: 02 bf ff de be 20037d4 <== NEVER TAKEN 2003860: a0 10 00 08 mov %o0, %l0 return RTEMS_NO_MEMORY; } if (name != NULL) { 2003864: 80 a6 a0 00 cmp %i2, 0 2003868: 02 80 00 0f be 20038a4 200386c: a2 10 20 00 clr %l1 alloc_name = strdup(name); 2003870: 40 00 43 87 call 201468c 2003874: 90 10 00 1a mov %i2, %o0 if (alloc_name == NULL) { 2003878: a2 92 20 00 orcc %o0, 0, %l1 200387c: 02 80 00 15 be 20038d0 <== NEVER TAKEN 2003880: b4 10 00 08 mov %o0, %i2 return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2003884: 94 10 00 1d mov %i5, %o2 2003888: 13 00 00 18 sethi %hi(0x6000), %o1 200388c: 96 10 00 19 mov %i1, %o3 2003890: 40 00 06 6b call 200523c 2003894: 92 12 61 ff or %o1, 0x1ff, %o1 2003898: 80 a2 20 00 cmp %o0, 0 200389c: 06 80 00 0b bl 20038c8 <== NEVER TAKEN 20038a0: 90 10 00 1a mov %i2, %o0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 20038a4: fa 24 00 00 st %i5, [ %l0 ] 20038a8: f2 24 20 04 st %i1, [ %l0 + 4 ] dd->name = alloc_name; 20038ac: e2 24 20 10 st %l1, [ %l0 + 0x10 ] dd->uses = 0; 20038b0: c0 24 20 14 clr [ %l0 + 0x14 ] dd->deleted = false; 20038b4: c0 2c 20 30 clrb [ %l0 + 0x30 ] *dd_entry = dd; 20038b8: e0 27 00 00 st %l0, [ %i4 ] *dd_ptr = dd; 20038bc: e0 26 c0 00 st %l0, [ %i3 ] return RTEMS_SUCCESSFUL; } 20038c0: 81 c7 e0 08 ret 20038c4: 91 e8 20 00 restore %g0, 0, %o0 } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 20038c8: 40 00 04 62 call 2004a50 <== NOT EXECUTED 20038cc: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED free(dd); 20038d0: 40 00 04 60 call 2004a50 <== NOT EXECUTED 20038d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return RTEMS_UNSATISFIED; 20038d8: 81 c7 e0 08 ret <== NOT EXECUTED 20038dc: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02004dcc : * 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) 2004dcc: 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) 2004dd0: 90 10 20 01 mov 1, %o0 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 2004dd4: c0 26 40 00 clr [ %i1 ] if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004dd8: 40 00 03 55 call 2005b2c 2004ddc: 92 10 20 28 mov 0x28, %o1 * 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) 2004de0: 82 10 00 18 mov %i0, %g1 return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 2004de4: ba 10 00 08 mov %o0, %i5 2004de8: 80 a2 20 00 cmp %o0, 0 2004dec: 02 80 00 45 be 2004f00 <== NEVER TAKEN 2004df0: b0 10 20 1a mov 0x1a, %i0 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)); 2004df4: f0 08 60 0a ldub [ %g1 + 0xa ], %i0 2004df8: c6 08 60 0b ldub [ %g1 + 0xb ], %g3 2004dfc: d6 08 60 08 ldub [ %g1 + 8 ], %o3 2004e00: d8 08 60 09 ldub [ %g1 + 9 ], %o4 part_desc->start = LE_TO_CPU_U32(temp); memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); 2004e04: da 08 60 0c ldub [ %g1 + 0xc ], %o5 2004e08: de 08 60 0d ldub [ %g1 + 0xd ], %o7 2004e0c: f8 08 60 0e ldub [ %g1 + 0xe ], %i4 2004e10: c8 08 60 0f ldub [ %g1 + 0xf ], %g4 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)); 2004e14: f0 2f bf fe stb %i0, [ %fp + -2 ] 2004e18: c6 2f bf ff stb %g3, [ %fp + -1 ] 2004e1c: d6 2f bf fc stb %o3, [ %fp + -4 ] 2004e20: d8 2f bf fd stb %o4, [ %fp + -3 ] part_desc->start = LE_TO_CPU_U32(temp); 2004e24: c4 07 bf fc ld [ %fp + -4 ], %g2 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004e28: c6 08 60 04 ldub [ %g1 + 4 ], %g3 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004e2c: f0 08 40 00 ldub [ %g1 ], %i0 /* 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)); 2004e30: da 2f bf fc stb %o5, [ %fp + -4 ] 2004e34: de 2f bf fd stb %o7, [ %fp + -3 ] 2004e38: f8 2f bf fe stb %i4, [ %fp + -2 ] 2004e3c: c8 2f bf ff stb %g4, [ %fp + -1 ] part_desc->size = LE_TO_CPU_U32(temp); 2004e40: c2 07 bf fc ld [ %fp + -4 ], %g1 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2004e44: 9f 30 a0 08 srl %g2, 8, %o7 2004e48: 9e 0b e0 ff and %o7, 0xff, %o7 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e4c: 9f 2b e0 10 sll %o7, 0x10, %o7 2004e50: 9b 28 a0 18 sll %g2, 0x18, %o5 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004e54: 88 18 e0 85 xor %g3, 0x85, %g4 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2004e58: b9 30 a0 18 srl %g2, 0x18, %i4 2004e5c: 80 a0 00 04 cmp %g0, %g4 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e60: b8 13 40 1c or %o5, %i4, %i4 2004e64: b8 17 00 0f or %i4, %o7, %i4 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2004e68: 9f 30 60 08 srl %g1, 8, %o7 2004e6c: 9e 0b e0 ff and %o7, 0xff, %o7 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e70: 9f 2b e0 10 sll %o7, 0x10, %o7 2004e74: 88 60 3f ff subx %g0, -1, %g4 2004e78: 9b 28 60 18 sll %g1, 0x18, %o5 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004e7c: 85 30 a0 10 srl %g2, 0x10, %g2 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 2004e80: f0 2a 00 00 stb %i0, [ %o0 ] 2004e84: 84 08 a0 ff and %g2, 0xff, %g2 part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 2004e88: c6 2a 20 01 stb %g3, [ %o0 + 1 ] byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e8c: 85 28 a0 08 sll %g2, 8, %g2 2004e90: 84 17 00 02 or %i4, %g2, %g2 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2004e94: b9 30 60 18 srl %g1, 0x18, %i4 /* 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); 2004e98: c4 22 20 04 st %g2, [ %o0 + 4 ] byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004e9c: b8 13 40 1c or %o5, %i4, %i4 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004ea0: 83 30 60 10 srl %g1, 0x10, %g1 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004ea4: b8 17 00 0f or %i4, %o7, %i4 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2004ea8: 82 08 60 ff and %g1, 0xff, %g1 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004eac: 9e 18 e0 05 xor %g3, 5, %o7 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2004eb0: 83 28 60 08 sll %g1, 8, %g1 2004eb4: 80 a0 00 0f cmp %g0, %o7 2004eb8: b8 17 00 01 or %i4, %g1, %i4 /* 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); 2004ebc: f8 22 20 08 st %i4, [ %o0 + 8 ] * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 2004ec0: 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) || 2004ec4: 80 91 00 01 orcc %g4, %g1, %g0 2004ec8: 12 80 00 10 bne 2004f08 2004ecc: 92 10 00 03 mov %g3, %o1 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 2004ed0: 11 00 80 90 sethi %hi(0x2024000), %o0 2004ed4: 94 10 20 06 mov 6, %o2 2004ed8: 40 00 42 1f call 2015754 2004edc: 90 12 21 a8 or %o0, 0x1a8, %o0 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 2004ee0: 80 a2 20 00 cmp %o0, 0 2004ee4: 02 80 00 04 be 2004ef4 2004ee8: 80 a7 20 00 cmp %i4, 0 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 2004eec: 32 80 00 08 bne,a 2004f0c <== ALWAYS TAKEN 2004ef0: fa 26 40 00 st %i5, [ %i1 ] *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); 2004ef4: 90 10 00 1d mov %i5, %o0 2004ef8: 40 00 03 de call 2005e70 2004efc: b0 10 20 00 clr %i0 } return RTEMS_SUCCESSFUL; } 2004f00: 81 c7 e0 08 ret 2004f04: 81 e8 00 00 restore * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; 2004f08: fa 26 40 00 st %i5, [ %i1 ] } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; 2004f0c: 81 c7 e0 08 ret 2004f10: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02002ccc : #endif #include "devfs.h" void devFS_Show(void) { 2002ccc: 9d e3 bf a0 save %sp, -96, %sp rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002cd0: 03 00 80 67 sethi %hi(0x2019c00), %g1 2002cd4: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 2019f80 if (rootloc->ops == &devFS_ops) { 2002cd8: 05 00 80 61 sethi %hi(0x2018400), %g2 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 2002cdc: c2 00 60 04 ld [ %g1 + 4 ], %g1 if (rootloc->ops == &devFS_ops) { 2002ce0: 84 10 a1 54 or %g2, 0x154, %g2 2002ce4: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 2002ce8: 80 a0 c0 02 cmp %g3, %g2 2002cec: 22 80 00 04 be,a 2002cfc <== ALWAYS TAKEN 2002cf0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2002cf4: 81 c7 e0 08 ret <== NOT EXECUTED 2002cf8: 81 e8 00 00 restore <== NOT EXECUTED static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->immutable_fs_info; 2002cfc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 2002d00: f4 00 60 04 ld [ %g1 + 4 ], %i2 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 2002d04: 80 a6 a0 00 cmp %i2, 0 2002d08: 02 bf ff fb be 2002cf4 <== NEVER TAKEN 2002d0c: fa 00 40 00 ld [ %g1 ], %i5 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002d10: 31 00 80 61 sethi %hi(0x2018400), %i0 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( 2002d14: 33 00 80 61 sethi %hi(0x2018400), %i1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002d18: 39 00 80 61 sethi %hi(0x2018400), %i4 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) { 2002d1c: b6 10 20 00 clr %i3 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 2002d20: b0 16 21 a8 or %i0, 0x1a8, %i0 for (j = 0; j < m; ++j) { printk("%c", current->name [j]); } printk( 2002d24: b2 16 61 b8 or %i1, 0x1b8, %i1 size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { printk("%c", current->name [j]); 2002d28: b8 17 21 b0 or %i4, 0x1b0, %i4 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { 2002d2c: c2 07 40 00 ld [ %i5 ], %g1 2002d30: 80 a0 60 00 cmp %g1, 0 2002d34: 22 80 00 16 be,a 2002d8c 2002d38: b6 06 e0 01 inc %i3 size_t j = 0; size_t m = current->namelen; 2002d3c: e2 07 60 04 ld [ %i5 + 4 ], %l1 printk("/"); 2002d40: 40 00 04 f0 call 2004100 2002d44: 90 10 00 18 mov %i0, %o0 for (j = 0; j < m; ++j) { 2002d48: 80 a4 60 00 cmp %l1, 0 2002d4c: 22 80 00 0c be,a 2002d7c <== NEVER TAKEN 2002d50: d2 07 60 08 ld [ %i5 + 8 ], %o1 <== NOT EXECUTED 2002d54: a0 10 20 00 clr %l0 printk("%c", current->name [j]); 2002d58: c2 07 40 00 ld [ %i5 ], %g1 2002d5c: 90 10 00 1c mov %i4, %o0 2002d60: d2 48 40 10 ldsb [ %g1 + %l0 ], %o1 2002d64: 40 00 04 e7 call 2004100 2002d68: 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) { 2002d6c: 80 a4 00 11 cmp %l0, %l1 2002d70: 32 bf ff fb bne,a 2002d5c 2002d74: c2 07 40 00 ld [ %i5 ], %g1 printk("%c", current->name [j]); } printk( 2002d78: d2 07 60 08 ld [ %i5 + 8 ], %o1 2002d7c: d4 07 60 0c ld [ %i5 + 0xc ], %o2 2002d80: 40 00 04 e0 call 2004100 2002d84: 90 10 00 19 mov %i1, %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) { 2002d88: b6 06 e0 01 inc %i3 2002d8c: 80 a6 c0 1a cmp %i3, %i2 2002d90: 12 bf ff e7 bne 2002d2c 2002d94: ba 07 60 14 add %i5, 0x14, %i5 2002d98: 81 c7 e0 08 ret 2002d9c: 81 e8 00 00 restore =============================================================================== 0200c1dc : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 200c1dc: 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; 200c1e0: 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; 200c1e4: e2 06 00 00 ld [ %i0 ], %l1 200c1e8: 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; 200c1ec: f2 06 20 04 ld [ %i0 + 4 ], %i1 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 200c1f0: e0 00 60 04 ld [ %g1 + 4 ], %l0 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) { 200c1f4: 80 a4 20 00 cmp %l0, 0 200c1f8: 02 80 00 2f be 200c2b4 200c1fc: fa 00 40 00 ld [ %g1 ], %i5 ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 200c200: b4 10 20 00 clr %i2 devFS_node *free_node = NULL; 200c204: 82 10 20 00 clr %g1 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 200c208: 10 80 00 0a b 200c230 200c20c: b8 10 20 00 clr %i4 200c210: 80 a6 a0 00 cmp %i2, 0 200c214: 12 80 00 1a bne 200c27c 200c218: 80 a6 e0 00 cmp %i3, 0 200c21c: b8 07 20 01 inc %i4 200c220: 80 a7 00 10 cmp %i4, %l0 200c224: 02 80 00 18 be 200c284 200c228: ba 07 60 14 add %i5, 0x14, %i5 200c22c: 82 10 00 1b mov %i3, %g1 devFS_node *current = nodes + i; if (current->name != NULL) { 200c230: d0 07 40 00 ld [ %i5 ], %o0 200c234: 80 a2 20 00 cmp %o0, 0 200c238: 02 bf ff f6 be 200c210 200c23c: b6 10 00 1d mov %i5, %i3 if ( 200c240: c4 07 60 04 ld [ %i5 + 4 ], %g2 200c244: 80 a6 40 02 cmp %i1, %g2 200c248: 12 bf ff f2 bne 200c210 200c24c: b6 10 00 01 mov %g1, %i3 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 200c250: 92 10 00 11 mov %l1, %o1 200c254: 40 00 0a 2e call 200eb0c 200c258: 94 10 00 19 mov %i1, %o2 200c25c: 80 a2 20 00 cmp %o0, 0 200c260: 12 bf ff ed bne 200c214 200c264: 80 a6 a0 00 cmp %i2, 0 200c268: b4 10 00 1d mov %i5, %i2 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) { 200c26c: 80 a6 a0 00 cmp %i2, 0 200c270: 22 bf ff ec be,a 200c220 <== NEVER TAKEN 200c274: b8 07 20 01 inc %i4 <== NOT EXECUTED 200c278: 80 a6 e0 00 cmp %i3, 0 200c27c: 22 bf ff e9 be,a 200c220 200c280: b8 07 20 01 inc %i4 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 200c284: 80 a6 a0 00 cmp %i2, 0 200c288: 02 80 00 0d be 200c2bc 200c28c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 200c290: 80 88 60 40 btst 0x40, %g1 200c294: 12 80 00 06 bne 200c2ac 200c298: 01 00 00 00 nop currentloc->node_access = node; 200c29c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 200c2a0: c0 26 20 04 clr [ %i0 + 4 ] 200c2a4: 81 c7 e0 08 ret 200c2a8: 81 e8 00 00 restore rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 200c2ac: 7f ff e3 35 call 2004f80 200c2b0: 93 e8 20 11 restore %g0, 0x11, %o1 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 200c2b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; devFS_node *free_node = NULL; 200c2b8: b6 10 20 00 clr %i3 rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 200c2bc: 80 88 60 20 btst 0x20, %g1 200c2c0: 02 80 00 0b be 200c2ec <== NEVER TAKEN 200c2c4: 80 a6 e0 00 cmp %i3, 0 if (free_node != NULL) { 200c2c8: 02 80 00 0b be 200c2f4 200c2cc: 82 10 21 ff mov 0x1ff, %g1 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 200c2d0: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] currentloc->node_access = free_node; 200c2d4: f6 26 20 20 st %i3, [ %i0 + 0x20 ] rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 200c2d8: e2 26 20 08 st %l1, [ %i0 + 8 ] ctx->tokenlen = tokenlen; 200c2dc: f2 26 20 0c st %i1, [ %i0 + 0xc ] static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 200c2e0: c0 26 20 04 clr [ %i0 + 4 ] 200c2e4: 81 c7 e0 08 ret 200c2e8: 81 e8 00 00 restore rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 200c2ec: 7f ff e3 25 call 2004f80 <== NOT EXECUTED 200c2f0: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 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); 200c2f4: 7f ff e3 23 call 2004f80 200c2f8: 93 e8 20 1c restore %g0, 0x1c, %o1 =============================================================================== 02003834 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 2003834: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 2003838: 80 a6 a0 03 cmp %i2, 3 200383c: 22 80 00 18 be,a 200389c 2003840: c2 4e 40 00 ldsb [ %i1 ], %g1 if (S_ISBLK(mode) || S_ISCHR(mode)) { 2003844: 03 00 00 3c sethi %hi(0xf000), %g1 2003848: 05 00 00 08 sethi %hi(0x2000), %g2 200384c: 82 0e c0 01 and %i3, %g1, %g1 2003850: 80 a0 40 02 cmp %g1, %g2 2003854: 12 80 00 28 bne 20038f4 2003858: 05 00 00 18 sethi %hi(0x6000), %g2 char *dupname = malloc(namelen); 200385c: 40 00 02 48 call 200417c 2003860: 90 10 00 1a mov %i2, %o0 if (dupname != NULL) { 2003864: 84 92 20 00 orcc %o0, 0, %g2 2003868: 02 80 00 2c be 2003918 200386c: 92 10 00 19 mov %i1, %o1 devFS_node *node = parentloc->node_access; 2003870: c2 06 20 08 ld [ %i0 + 8 ], %g1 node->name = dupname; 2003874: c4 20 40 00 st %g2, [ %g1 ] node->namelen = namelen; 2003878: f4 20 60 04 st %i2, [ %g1 + 4 ] node->major = rtems_filesystem_dev_major_t(dev); 200387c: f8 20 60 08 st %i4, [ %g1 + 8 ] node->minor = rtems_filesystem_dev_minor_t(dev); 2003880: fa 20 60 0c st %i5, [ %g1 + 0xc ] node->mode = mode; 2003884: f6 20 60 10 st %i3, [ %g1 + 0x10 ] memcpy(dupname, name, namelen); 2003888: 94 10 00 1a mov %i2, %o2 200388c: 40 00 2c ce call 200ebc4 2003890: b0 10 20 00 clr %i0 2003894: 81 c7 e0 08 ret 2003898: 81 e8 00 00 restore dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 200389c: 80 a0 60 64 cmp %g1, 0x64 20038a0: 12 bf ff ea bne 2003848 <== NEVER TAKEN 20038a4: 03 00 00 3c sethi %hi(0xf000), %g1 20038a8: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1 20038ac: 80 a0 60 65 cmp %g1, 0x65 20038b0: 12 bf ff e6 bne 2003848 <== NEVER TAKEN 20038b4: 03 00 00 3c sethi %hi(0xf000), %g1 20038b8: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1 20038bc: 80 a0 60 76 cmp %g1, 0x76 20038c0: 12 bf ff e2 bne 2003848 <== NEVER TAKEN 20038c4: 03 00 00 3c sethi %hi(0xf000), %g1 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 20038c8: b6 0e c0 01 and %i3, %g1, %i3 20038cc: 03 00 00 10 sethi %hi(0x4000), %g1 20038d0: 80 a6 c0 01 cmp %i3, %g1 20038d4: 02 bf ff f0 be 2003894 <== ALWAYS TAKEN 20038d8: b0 10 20 00 clr %i0 errno = ENOTSUP; 20038dc: 40 00 2a 11 call 200e120 <__errno> <== NOT EXECUTED 20038e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20038e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20038e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } } return rv; } 20038ec: 81 c7 e0 08 ret <== NOT EXECUTED 20038f0: 81 e8 00 00 restore <== NOT EXECUTED ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { if (S_ISBLK(mode) || S_ISCHR(mode)) { 20038f4: 80 a0 40 02 cmp %g1, %g2 20038f8: 02 bf ff d9 be 200385c 20038fc: 01 00 00 00 nop } else { errno = ENOMEM; rv = -1; } } else { errno = ENOTSUP; 2003900: 40 00 2a 08 call 200e120 <__errno> 2003904: b0 10 3f ff mov -1, %i0 ! ffffffff 2003908: 82 10 20 86 mov 0x86, %g1 200390c: c2 22 00 00 st %g1, [ %o0 ] 2003910: 81 c7 e0 08 ret 2003914: 81 e8 00 00 restore node->major = rtems_filesystem_dev_major_t(dev); node->minor = rtems_filesystem_dev_minor_t(dev); node->mode = mode; memcpy(dupname, name, namelen); } else { errno = ENOMEM; 2003918: 40 00 2a 02 call 200e120 <__errno> 200391c: b0 10 3f ff mov -1, %i0 2003920: 82 10 20 0c mov 0xc, %g1 2003924: c2 22 00 00 st %g1, [ %o0 ] 2003928: 81 c7 e0 08 ret 200392c: 81 e8 00 00 restore =============================================================================== 020036a8 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 20036a8: 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); 20036ac: 03 00 80 83 sethi %hi(0x2020c00), %g1 20036b0: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 2020dc4 20036b4: 92 10 20 00 clr %o1 20036b8: 94 10 20 00 clr %o2 20036bc: 40 00 16 a7 call 2009158 20036c0: b0 10 20 16 mov 0x16, %i0 if (sc == RTEMS_SUCCESSFUL) { 20036c4: 80 a2 20 00 cmp %o0, 0 20036c8: 12 80 00 05 bne 20036dc <== NEVER TAKEN 20036cc: 84 10 20 01 mov 1, %g2 diskdevs_protected = true; 20036d0: 03 00 80 83 sethi %hi(0x2020c00), %g1 return RTEMS_SUCCESSFUL; 20036d4: 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; 20036d8: c4 28 61 c0 stb %g2, [ %g1 + 0x1c0 ] return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 20036dc: 81 c7 e0 08 ret 20036e0: 81 e8 00 00 restore =============================================================================== 020036e4 : static void disk_unlock(void) { 20036e4: 9d e3 bf a0 save %sp, -96, %sp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 20036e8: 03 00 80 83 sethi %hi(0x2020c00), %g1 20036ec: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 2020dc4 static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 20036f0: 03 00 80 83 sethi %hi(0x2020c00), %g1 20036f4: c0 28 61 c0 clrb [ %g1 + 0x1c0 ] ! 2020dc0 sc = rtems_semaphore_release(diskdevs_mutex); 20036f8: 40 00 16 e2 call 2009280 20036fc: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) { 2003700: 80 a2 20 00 cmp %o0, 0 2003704: 12 80 00 04 bne 2003714 <== NEVER TAKEN 2003708: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0 200370c: 81 c7 e0 08 ret 2003710: 81 e8 00 00 restore /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 2003714: 40 00 18 3b call 2009800 <== NOT EXECUTED 2003718: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED =============================================================================== 02005548 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 2005548: 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); 200554c: 7f ff f4 5b call 20026b8 2005550: ba 10 00 18 mov %i0, %i5 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2005554: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 2005558: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 200555c: 80 a0 80 01 cmp %g2, %g1 2005560: 02 80 00 14 be 20055b0 <== ALWAYS TAKEN 2005564: 01 00 00 00 nop tty->rawOutBufState = rob_wait; 2005568: b8 10 20 02 mov 2, %i4 ! 2 <== NOT EXECUTED 200556c: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 2005570: 7f ff f4 56 call 20026c8 <== NOT EXECUTED 2005574: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain( 2005578: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED 200557c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2005580: 40 00 09 eb call 2007d2c <== NOT EXECUTED 2005584: 94 10 20 00 clr %o2 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2005588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200558c: 12 80 00 0b bne 20055b8 <== NOT EXECUTED 2005590: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2005594: 7f ff f4 49 call 20026b8 <== NOT EXECUTED 2005598: 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) { 200559c: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED 20055a0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED 20055a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20055a8: 32 bf ff f2 bne,a 2005570 <== NOT EXECUTED 20055ac: 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); 20055b0: 7f ff f4 46 call 20026c8 20055b4: 91 e8 00 08 restore %g0, %o0, %o0 tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 20055b8: 40 00 0b 9f call 2008434 <== NOT EXECUTED =============================================================================== 02003d4c : int dup2( int fildes, int fildes2 ) { 2003d4c: 9d e3 bf 58 save %sp, -168, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003d50: 90 10 00 18 mov %i0, %o0 int dup2( int fildes, int fildes2 ) { 2003d54: ba 10 00 18 mov %i0, %i5 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2003d58: 92 07 bf b8 add %fp, -72, %o1 2003d5c: 40 00 01 e8 call 20044fc 2003d60: b0 10 3f ff mov -1, %i0 if ( status == -1 ) 2003d64: 80 a2 3f ff cmp %o0, -1 2003d68: 02 80 00 0b be 2003d94 2003d6c: 90 10 00 19 mov %i1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2003d70: 40 00 01 e3 call 20044fc 2003d74: 92 07 bf b8 add %fp, -72, %o1 if ( status == -1 ) 2003d78: 80 a2 3f ff cmp %o0, -1 2003d7c: 02 80 00 06 be 2003d94 <== NEVER TAKEN 2003d80: 90 10 00 1d mov %i5, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2003d84: 92 10 20 00 clr %o1 2003d88: 40 00 00 ae call 2004040 2003d8c: 94 10 00 19 mov %i1, %o2 2003d90: b0 10 00 08 mov %o0, %i0 } 2003d94: 81 c7 e0 08 ret 2003d98: 81 e8 00 00 restore =============================================================================== 020062e8 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 20062e8: 9d e3 bf 98 save %sp, -104, %sp if ((tty->termios.c_lflag & ECHOCTL) && 20062ec: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 20062f0: 80 88 62 00 btst 0x200, %g1 20062f4: 02 80 00 08 be 2006314 <== NEVER TAKEN 20062f8: 03 00 80 72 sethi %hi(0x201c800), %g1 iscntrl(c) && (c != '\t') && (c != '\n')) { 20062fc: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 201c9a0 <__ctype_ptr__> 2006300: 82 00 40 18 add %g1, %i0, %g1 2006304: c2 08 60 01 ldub [ %g1 + 1 ], %g1 2006308: 80 88 60 20 btst 0x20, %g1 200630c: 12 80 00 07 bne 2006328 2006310: 80 a6 20 09 cmp %i0, 9 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 2006314: 90 10 00 18 mov %i0, %o0 2006318: 7f ff ff 8d call 200614c 200631c: 92 10 00 19 mov %i1, %o1 2006320: 81 c7 e0 08 ret 2006324: 81 e8 00 00 restore */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2006328: 02 bf ff fc be 2006318 200632c: 90 10 00 18 mov %i0, %o0 2006330: 80 a6 20 0a cmp %i0, 0xa 2006334: 02 bf ff f9 be 2006318 2006338: 82 10 20 5e mov 0x5e, %g1 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 200633c: b0 1e 20 40 xor %i0, 0x40, %i0 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 2006340: c2 2f bf f8 stb %g1, [ %fp + -8 ] echobuf[1] = c ^ 0x40; 2006344: f0 2f bf f9 stb %i0, [ %fp + -7 ] rtems_termios_puts (echobuf, 2, tty); 2006348: 90 07 bf f8 add %fp, -8, %o0 200634c: 92 10 20 02 mov 2, %o1 2006350: 7f ff ff 2f call 200600c 2006354: 94 10 00 19 mov %i1, %o2 tty->column += 2; 2006358: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 200635c: 82 00 60 02 add %g1, 2, %g1 2006360: c2 26 60 28 st %g1, [ %i1 + 0x28 ] 2006364: 81 c7 e0 08 ret 2006368: 81 e8 00 00 restore =============================================================================== 0202b968 : void endgrent(void) { if (group_fp != NULL) 202b968: 03 00 81 ce sethi %hi(0x2073800), %g1 202b96c: d0 00 61 c8 ld [ %g1 + 0x1c8 ], %o0 ! 20739c8 202b970: 80 a2 20 00 cmp %o0, 0 202b974: 02 80 00 05 be 202b988 <== NEVER TAKEN 202b978: 01 00 00 00 nop fclose(group_fp); 202b97c: 82 13 c0 00 mov %o7, %g1 202b980: 40 00 6e ad call 2047434 202b984: 9e 10 40 00 mov %g1, %o7 202b988: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0202b7dc : void endpwent(void) { if (passwd_fp != NULL) 202b7dc: 03 00 81 ce sethi %hi(0x2073800), %g1 202b7e0: d0 00 60 e8 ld [ %g1 + 0xe8 ], %o0 ! 20738e8 202b7e4: 80 a2 20 00 cmp %o0, 0 202b7e8: 02 80 00 05 be 202b7fc <== NEVER TAKEN 202b7ec: 01 00 00 00 nop fclose(passwd_fp); 202b7f0: 82 13 c0 00 mov %o7, %g1 202b7f4: 40 00 6f 10 call 2047434 202b7f8: 9e 10 40 00 mov %g1, %o7 202b7fc: 81 c3 e0 08 retl <== NOT EXECUTED =============================================================================== 0200636c : * 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) { 200636c: 9d e3 bf a0 save %sp, -96, %sp if (tty->ccount == 0) 2006370: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2006374: 80 a0 60 00 cmp %g1, 0 2006378: 02 80 00 37 be 2006454 200637c: ba 10 00 18 mov %i0, %i5 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 2006380: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { 2006384: 80 a6 60 00 cmp %i1, 0 2006388: 12 80 00 35 bne 200645c 200638c: 84 08 e0 08 and %g3, 8, %g2 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2006390: 31 00 80 6c sethi %hi(0x201b000), %i0 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2006394: 37 00 80 6c sethi %hi(0x201b000), %i3 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006398: 35 00 80 72 sethi %hi(0x201c800), %i2 rtems_termios_puts ("\b \b", 3, tty); 200639c: b0 16 22 a0 or %i0, 0x2a0, %i0 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 20063a0: 10 80 00 0d b 20063d4 20063a4: b6 16 e2 98 or %i3, 0x298, %i3 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 20063a8: 12 80 00 6b bne 2006554 <== NOT EXECUTED 20063ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 20063b0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20063b4: 02 80 00 66 be 200654c <== NEVER TAKEN 20063b8: 01 00 00 00 nop echo ('\n', tty); return; } } while (tty->ccount) { 20063bc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 20063c0: 80 a0 60 00 cmp %g1, 0 20063c4: 02 80 00 62 be 200654c 20063c8: 01 00 00 00 nop } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 20063cc: c6 07 60 3c ld [ %i5 + 0x3c ], %g3 20063d0: 84 08 e0 08 and %g3, 8, %g2 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 20063d4: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 20063d8: 82 00 7f ff add %g1, -1, %g1 20063dc: c2 27 60 20 st %g1, [ %i5 + 0x20 ] if (tty->termios.c_lflag & ECHO) { 20063e0: 80 a0 a0 00 cmp %g2, 0 20063e4: 02 bf ff f3 be 20063b0 <== NEVER TAKEN 20063e8: f8 09 00 01 ldub [ %g4 + %g1 ], %i4 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 20063ec: 80 a6 60 00 cmp %i1, 0 20063f0: 12 80 00 05 bne 2006404 20063f4: b8 0f 20 ff and %i4, 0xff, %i4 20063f8: 80 88 e0 10 btst 0x10, %g3 20063fc: 22 80 00 52 be,a 2006544 <== NEVER TAKEN 2006400: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2006404: 80 a7 20 09 cmp %i4, 9 2006408: 02 80 00 25 be 200649c 200640c: b8 07 20 01 inc %i4 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2006410: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1 2006414: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 2006418: 80 88 60 20 btst 0x20, %g1 200641c: 12 bf ff e3 bne 20063a8 <== NEVER TAKEN 2006420: 80 88 e2 00 btst 0x200, %g3 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); 2006424: 11 00 80 6c sethi %hi(0x201b000), %o0 2006428: 92 10 20 03 mov 3, %o1 200642c: 90 12 22 a0 or %o0, 0x2a0, %o0 2006430: 7f ff fe f7 call 200600c 2006434: 94 10 00 1d mov %i5, %o2 if (tty->column) 2006438: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 200643c: 80 a0 60 00 cmp %g1, 0 2006440: 02 bf ff dd be 20063b4 <== NEVER TAKEN 2006444: 80 a6 60 00 cmp %i1, 0 tty->column--; 2006448: 82 00 7f ff add %g1, -1, %g1 } } } if (!lineFlag) 200644c: 12 bf ff dc bne 20063bc 2006450: c2 27 60 28 st %g1, [ %i5 + 0x28 ] 2006454: 81 c7 e0 08 ret 2006458: 81 e8 00 00 restore erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 200645c: 84 88 e0 08 andcc %g3, 8, %g2 2006460: 22 bf ff fd be,a 2006454 <== NEVER TAKEN 2006464: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2006468: 80 88 e0 10 btst 0x10, %g3 200646c: 32 bf ff ca bne,a 2006394 <== ALWAYS TAKEN 2006470: 31 00 80 6c sethi %hi(0x201b000), %i0 tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 2006474: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 ! 201b044 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 2006478: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 200647c: 7f ff ff 9b call 20062e8 <== NOT EXECUTED 2006480: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2006484: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 2006488: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 200648c: 02 bf ff f2 be 2006454 <== NOT EXECUTED 2006490: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED echo ('\n', tty); 2006494: 7f ff ff 95 call 20062e8 <== NOT EXECUTED 2006498: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 200649c: 80 a0 60 00 cmp %g1, 0 20064a0: 02 80 00 17 be 20064fc 20064a4: f8 07 60 2c ld [ %i5 + 0x2c ], %i4 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 20064a8: da 06 a1 a0 ld [ %i2 + 0x1a0 ], %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; 20064ac: 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) 20064b0: 10 80 00 07 b 20064cc 20064b4: 98 08 e2 00 and %g3, 0x200, %o4 20064b8: 32 80 00 02 bne,a 20064c0 <== NOT EXECUTED 20064bc: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20064c0: 80 a0 40 02 cmp %g1, %g2 20064c4: 22 80 00 0f be,a 2006500 <== NEVER TAKEN 20064c8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 20064cc: c6 09 00 02 ldub [ %g4 + %g2 ], %g3 20064d0: 84 00 a0 01 inc %g2 if (c == '\t') { 20064d4: 80 a0 e0 09 cmp %g3, 9 20064d8: 02 80 00 18 be 2006538 20064dc: 9e 03 40 03 add %o5, %g3, %o7 col = (col | 7) + 1; } else if (iscntrl (c)) { 20064e0: de 0b e0 01 ldub [ %o7 + 1 ], %o7 20064e4: 80 8b e0 20 btst 0x20, %o7 20064e8: 12 bf ff f4 bne 20064b8 <== NEVER TAKEN 20064ec: 80 a3 20 00 cmp %o4, 0 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 20064f0: 80 a0 40 02 cmp %g1, %g2 20064f4: 12 bf ff f6 bne 20064cc 20064f8: b8 07 20 01 inc %i4 } /* * Back up over the tab */ while (tty->column > col) { 20064fc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006500: 80 a7 00 01 cmp %i4, %g1 2006504: 16 bf ff ac bge 20063b4 <== NEVER TAKEN 2006508: 80 a6 60 00 cmp %i1, 0 rtems_termios_puts ("\b", 1, tty); 200650c: 90 10 00 1b mov %i3, %o0 2006510: 92 10 20 01 mov 1, %o1 2006514: 7f ff fe be call 200600c 2006518: 94 10 00 1d mov %i5, %o2 tty->column--; 200651c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 2006520: 82 00 7f ff add %g1, -1, %g1 } /* * Back up over the tab */ while (tty->column > col) { 2006524: 80 a0 40 1c cmp %g1, %i4 2006528: 14 bf ff f9 bg 200650c 200652c: c2 27 60 28 st %g1, [ %i5 + 0x28 ] if (tty->column) tty->column--; } } } if (!lineFlag) 2006530: 10 bf ff a1 b 20063b4 2006534: 80 a6 60 00 cmp %i1, 0 * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 2006538: b8 17 20 07 or %i4, 7, %i4 200653c: 10 bf ff e1 b 20064c0 2006540: b8 07 20 01 inc %i4 while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 2006544: 7f ff ff 69 call 20062e8 <== NOT EXECUTED 2006548: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED 200654c: 81 c7 e0 08 ret 2006550: 81 e8 00 00 restore tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 2006554: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2006558: 7f ff fe ad call 200600c <== NOT EXECUTED 200655c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED if (tty->column) 2006560: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED 2006564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006568: 22 80 00 05 be,a 200657c <== NOT EXECUTED 200656c: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1 <== NOT EXECUTED tty->column--; 2006570: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2006574: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2006578: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1 <== NOT EXECUTED 200657c: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 <== NOT EXECUTED 2006580: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2006584: 02 bf ff a9 be 2006428 <== NOT EXECUTED 2006588: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED 200658c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED 2006590: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 2006594: 12 bf ff a6 bne 200642c <== NOT EXECUTED 2006598: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 200659c: 10 bf ff 86 b 20063b4 <== NOT EXECUTED 20065a0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED =============================================================================== 02028cf4 : #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) { 2028cf4: 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) 2028cf8: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 2028cfc: 80 a0 60 00 cmp %g1, 0 2028d00: 22 80 00 5b be,a 2028e6c 2028d04: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028d08: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2028d0c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 2028d10: 80 a0 80 01 cmp %g2, %g1 2028d14: 08 80 00 67 bleu 2028eb0 <== ALWAYS TAKEN 2028d18: ba 10 20 00 clr %i5 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 2028d1c: 80 a6 40 01 cmp %i1, %g1 2028d20: 22 80 00 50 be,a 2028e60 2028d24: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 { if (fs_info->c.modified) 2028d28: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1 2028d2c: 80 a0 60 00 cmp %g1, 0 2028d30: 02 80 00 3a be 2028e18 2028d34: ba 8f 60 ff andcc %i5, 0xff, %i5 { if (sec_of_fat && !fs_info->vol.mirror) 2028d38: 02 80 00 06 be 2028d50 <== ALWAYS TAKEN 2028d3c: 01 00 00 00 nop 2028d40: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2028d44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028d48: 22 80 00 62 be,a 2028ed0 <== NOT EXECUTED 2028d4c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2028d50: 7f ff 77 45 call 2006a64 2028d54: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; 2028d58: c0 2e 20 7d clrb [ %i0 + 0x7d ] fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 2028d5c: 80 a2 20 00 cmp %o0, 0 2028d60: 12 80 00 65 bne 2028ef4 <== NEVER TAKEN 2028d64: c0 2e 20 7c clrb [ %i0 + 0x7c ] rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 2028d68: 80 a7 60 00 cmp %i5, 0 2028d6c: 22 80 00 31 be,a 2028e30 <== ALWAYS TAKEN 2028d70: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028d74: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 2028d78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028d7c: 32 80 00 2d bne,a 2028e30 <== NOT EXECUTED 2028d80: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028d84: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2028d88: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2028d8c: 08 80 00 28 bleu 2028e2c <== NOT EXECUTED 2028d90: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED 2028d94: 10 80 00 10 b 2028dd4 <== NOT EXECUTED 2028d98: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2028d9c: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 2028da0: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 2028da4: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED 2028da8: 40 00 86 92 call 204a7f0 <== NOT EXECUTED 2028dac: ba 07 60 01 inc %i5 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 2028db0: 7f ff 77 2d call 2006a64 <== NOT EXECUTED 2028db4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 2028db8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028dbc: 12 80 00 11 bne 2028e00 <== NOT EXECUTED 2028dc0: 90 0f 60 ff and %i5, 0xff, %o0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028dc4: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED 2028dc8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2028dcc: 28 80 00 19 bleu,a 2028e30 <== NOT EXECUTED 2028dd0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2028dd4: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED 2028dd8: 7f ff 68 42 call 2002ee0 <.umul> <== NOT EXECUTED 2028ddc: 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, 2028de0: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 <== NOT EXECUTED 2028de4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED 2028de8: 92 02 00 09 add %o0, %o1, %o1 <== NOT EXECUTED 2028dec: 7f ff 76 16 call 2006644 <== NOT EXECUTED 2028df0: 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) 2028df4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028df8: 02 bf ff e9 be 2028d9c <== NOT EXECUTED 2028dfc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 2028e00: 40 00 79 3b call 20472ec <__errno> <== NOT EXECUTED 2028e04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028e08: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2028e0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028e10: 81 c7 e0 08 ret <== NOT EXECUTED 2028e14: 81 e8 00 00 restore <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 2028e18: 7f ff 76 db call 2006984 2028e1c: d0 06 20 80 ld [ %i0 + 0x80 ], %o0 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 2028e20: 80 a2 20 00 cmp %o0, 0 2028e24: 12 80 00 34 bne 2028ef4 <== NEVER TAKEN 2028e28: 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); 2028e2c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2028e30: 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) 2028e34: 80 a6 a0 01 cmp %i2, 1 2028e38: 02 80 00 2b be 2028ee4 2028e3c: 94 06 20 80 add %i0, 0x80, %o2 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); 2028e40: 7f ff 76 01 call 2006644 2028e44: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2028e48: 80 a2 20 00 cmp %o0, 0 2028e4c: 12 80 00 2a bne 2028ef4 <== NEVER TAKEN 2028e50: 82 10 20 01 mov 1, %g1 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 2028e54: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.state = FAT_CACHE_ACTUAL; 2028e58: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] } *buf = fs_info->c.buf; 2028e5c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 2028e60: c2 26 c0 00 st %g1, [ %i3 ] return RC_OK; } 2028e64: 81 c7 e0 08 ret 2028e68: 91 e8 20 00 restore %g0, 0, %o0 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); 2028e6c: 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) 2028e70: 80 a6 a0 01 cmp %i2, 1 2028e74: 02 80 00 13 be 2028ec0 2028e78: 94 06 20 80 add %i0, 0x80, %o2 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); 2028e7c: 7f ff 75 f2 call 2006644 2028e80: 01 00 00 00 nop if (sc != RTEMS_SUCCESSFUL) 2028e84: 80 a2 20 00 cmp %o0, 0 2028e88: 12 80 00 1b bne 2028ef4 <== NEVER TAKEN 2028e8c: 82 10 20 01 mov 1, %g1 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2028e90: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2 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; 2028e94: f2 26 20 78 st %i1, [ %i0 + 0x78 ] fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 2028e98: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ] 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; fs_info->c.modified = 0; 2028e9c: c0 2e 20 7c clrb [ %i0 + 0x7c ] fs_info->c.state = FAT_CACHE_ACTUAL; 2028ea0: 82 10 00 19 mov %i1, %g1 } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2028ea4: 80 a0 80 01 cmp %g2, %g1 2028ea8: 18 bf ff 9d bgu 2028d1c <== NEVER TAKEN 2028eac: ba 10 20 00 clr %i5 2028eb0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 2028eb4: 80 a0 40 02 cmp %g1, %g2 2028eb8: 10 bf ff 99 b 2028d1c 2028ebc: ba 40 20 00 addx %g0, 0, %i5 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); 2028ec0: 7f ff 76 0c call 20066f0 2028ec4: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2028ec8: 10 bf ff f0 b 2028e88 2028ecc: 80 a2 20 00 cmp %o0, 0 if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2028ed0: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 2028ed4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED 2028ed8: 40 00 86 46 call 204a7f0 <== NOT EXECUTED 2028edc: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED 2028ee0: 30 bf ff 9c b,a 2028d50 <== 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); 2028ee4: 7f ff 76 03 call 20066f0 2028ee8: 01 00 00 00 nop else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 2028eec: 10 bf ff d8 b 2028e4c 2028ef0: 80 a2 20 00 cmp %o0, 0 rtems_set_errno_and_return_minus_one(EIO); 2028ef4: 40 00 78 fe call 20472ec <__errno> <== NOT EXECUTED 2028ef8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028efc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028f00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028f04: 81 c7 e0 08 ret <== NOT EXECUTED 2028f08: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02028f0c : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2028f0c: 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) 2028f10: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1 return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 2028f14: 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) 2028f18: 80 a0 60 00 cmp %g1, 0 2028f1c: 02 80 00 42 be 2029024 2028f20: b0 10 20 00 clr %i0 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 2028f24: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 2028f28: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2 2028f2c: 80 a0 40 02 cmp %g1, %g2 2028f30: 0a 80 00 05 bcs 2028f44 <== NEVER TAKEN 2028f34: b8 10 20 00 clr %i4 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 2028f38: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 2028f3c: 80 a0 40 02 cmp %g1, %g2 2028f40: 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) 2028f44: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1 2028f48: 80 a0 60 00 cmp %g1, 0 2028f4c: 02 80 00 38 be 202902c 2028f50: b8 8f 20 ff andcc %i4, 0xff, %i4 { if (sec_of_fat && !fs_info->vol.mirror) 2028f54: 02 80 00 06 be 2028f6c 2028f58: 01 00 00 00 nop 2028f5c: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2028f60: 80 a0 60 00 cmp %g1, 0 2028f64: 22 80 00 3a be,a 202904c <== ALWAYS TAKEN 2028f68: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2028f6c: 7f ff 76 be call 2006a64 2028f70: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2028f74: 80 a2 20 00 cmp %o0, 0 2028f78: 12 80 00 3a bne 2029060 <== NEVER TAKEN 2028f7c: 80 a7 20 00 cmp %i4, 0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2028f80: 02 80 00 30 be 2029040 2028f84: c0 2f 60 7c clrb [ %i5 + 0x7c ] 2028f88: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1 2028f8c: 80 a0 60 00 cmp %g1, 0 2028f90: 32 80 00 2d bne,a 2029044 <== NEVER TAKEN 2028f94: c0 2f 60 7d clrb [ %i5 + 0x7d ] <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028f98: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 2028f9c: 80 a0 60 01 cmp %g1, 1 2028fa0: 08 80 00 28 bleu 2029040 <== NEVER TAKEN 2028fa4: b8 10 20 01 mov 1, %i4 2028fa8: 10 80 00 10 b 2028fe8 2028fac: 90 10 20 01 mov 1, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 2028fb0: d2 07 60 84 ld [ %i5 + 0x84 ], %o1 2028fb4: d4 17 40 00 lduh [ %i5 ], %o2 2028fb8: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 2028fbc: 40 00 86 0d call 204a7f0 2028fc0: b8 07 20 01 inc %i4 sc = rtems_bdbuf_release_modified(b); 2028fc4: 7f ff 76 a8 call 2006a64 2028fc8: d0 07 bf fc ld [ %fp + -4 ], %o0 if ( sc != RTEMS_SUCCESSFUL) 2028fcc: 80 a2 20 00 cmp %o0, 0 2028fd0: 12 80 00 11 bne 2029014 <== NEVER TAKEN 2028fd4: 90 0f 20 ff and %i4, 0xff, %o0 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2028fd8: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 2028fdc: 80 a2 00 01 cmp %o0, %g1 2028fe0: 3a 80 00 19 bcc,a 2029044 <== ALWAYS TAKEN 2028fe4: c0 2f 60 7d clrb [ %i5 + 0x7d ] { sc = rtems_bdbuf_get(fs_info->vol.dd, fs_info->c.blk_num + fs_info->vol.fat_length * i, 2028fe8: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2028fec: 7f ff 67 bd call 2002ee0 <.umul> 2028ff0: 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, 2028ff4: d2 07 60 78 ld [ %i5 + 0x78 ], %o1 2028ff8: 94 07 bf fc add %fp, -4, %o2 2028ffc: 92 02 00 09 add %o0, %o1, %o1 2029000: 7f ff 75 91 call 2006644 2029004: 90 10 00 1b mov %i3, %o0 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 2029008: 80 a2 20 00 cmp %o0, 0 202900c: 02 bf ff e9 be 2028fb0 <== ALWAYS TAKEN 2029010: c2 07 bf fc ld [ %fp + -4 ], %g1 rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 2029014: 40 00 78 b6 call 20472ec <__errno> <== NOT EXECUTED 2029018: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202901c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2029020: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029024: 81 c7 e0 08 ret 2029028: 81 e8 00 00 restore } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 202902c: 7f ff 76 56 call 2006984 2029030: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 if (sc != RTEMS_SUCCESSFUL) 2029034: 80 a2 20 00 cmp %o0, 0 2029038: 12 80 00 0a bne 2029060 <== NEVER TAKEN 202903c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 2029040: c0 2f 60 7d clrb [ %i5 + 0x7d ] return RC_OK; } 2029044: 81 c7 e0 08 ret 2029048: 91 e8 20 00 restore %g0, 0, %o0 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 202904c: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 2029050: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 2029054: 40 00 85 e7 call 204a7f0 2029058: d4 17 40 00 lduh [ %i5 ], %o2 202905c: 30 bf ff c4 b,a 2028f6c } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 2029060: 40 00 78 a3 call 20472ec <__errno> <== NOT EXECUTED 2029064: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029068: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 202906c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029070: 81 c7 e0 08 ret <== NOT EXECUTED 2029074: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020291cc : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 20291cc: 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)) ) 20291d0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20291d4: 12 80 00 06 bne 20291ec <== NOT EXECUTED 20291d8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED 20291dc: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 20291e0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 20291e4: 32 80 00 0e bne,a 202921c <== NOT EXECUTED 20291e8: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 20291ec: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 20291f0: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== 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); 20291f4: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED 20291f8: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED 20291fc: 92 02 7f fe add %o1, -2, %o1 <== 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, 2029200: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029204: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2029208: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 202920c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED 2029210: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029214: 7f ff ff 99 call 2029078 <_fat_block_read> <== NOT EXECUTED 2029218: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 202921c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 2029220: 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, 2029224: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029228: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 202922c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2029230: 7f ff ff 92 call 2029078 <_fat_block_read> <== NOT EXECUTED 2029234: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 02029238 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 2029238: 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)) ) 202923c: 80 a2 60 00 cmp %o1, 0 2029240: 12 80 00 06 bne 2029258 <== ALWAYS TAKEN 2029244: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 2029248: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 202924c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2029250: 32 80 00 0e bne,a 2029288 <== NOT EXECUTED 2029254: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2029258: c6 08 60 05 ldub [ %g1 + 5 ], %g3 202925c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 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); 2029260: d6 08 60 04 ldub [ %g1 + 4 ], %o3 2029264: c2 08 60 02 ldub [ %g1 + 2 ], %g1 2029268: 92 02 7f fe add %o1, -2, %o1 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, 202926c: 94 10 20 00 clr %o2 2029270: 93 2a 40 03 sll %o1, %g3, %o1 2029274: 97 2a c0 01 sll %o3, %g1, %o3 2029278: 92 02 40 02 add %o1, %g2, %o1 202927c: 82 13 c0 00 mov %o7, %g1 2029280: 7f ff ff a0 call 2029100 <_fat_block_write> 2029284: 9e 10 40 00 mov %g1, %o7 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 2029288: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 202928c: 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_write(mt_entry, fsec, 0, 2029290: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029294: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED 2029298: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202929c: 7f ff ff 99 call 2029100 <_fat_block_write> <== NOT EXECUTED 20292a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED =============================================================================== 020294b4 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 20294b4: 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; 20294b8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20294bc: 87 2e 60 18 sll %i1, 0x18, %g3 <== 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, 20294c0: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 20294c4: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 20294c8: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20294cc: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 20294d0: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20294d4: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED 20294d8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20294dc: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20294e0: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20294e4: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 20294e8: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 20294ec: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED 20294f0: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED 20294f4: 84 10 80 19 or %g2, %i1, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 20294f8: 89 36 a0 08 srl %i2, 8, %g4 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 20294fc: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; 2029500: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2029504: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2029508: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 202950c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2029510: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 2029514: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED 2029518: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED 202951c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2029520: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; 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); 2029524: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 2029528: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 202952c: 7f ff fe f5 call 2029100 <_fat_block_write> <== NOT EXECUTED 2029530: 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, 2029534: 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, 2029538: 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, 202953c: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED 2029540: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2029544: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2029548: 7f ff fe ee call 2029100 <_fat_block_write> <== NOT EXECUTED 202954c: 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) ) 2029550: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029554: 06 80 00 06 bl 202956c <== NOT EXECUTED 2029558: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 202955c: 06 80 00 04 bl 202956c <== NOT EXECUTED 2029560: b0 10 20 00 clr %i0 <== NOT EXECUTED return -1; return RC_OK; } 2029564: 81 c7 e0 08 ret <== NOT EXECUTED 2029568: 81 e8 00 00 restore <== NOT EXECUTED 202956c: 81 c7 e0 08 ret <== NOT EXECUTED 2029570: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED =============================================================================== 02028470 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028470: 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) 2028474: c2 06 60 08 ld [ %i1 + 8 ], %g1 2028478: 80 a0 60 01 cmp %g1, 1 202847c: 08 80 00 07 bleu 2028498 2028480: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 { fat_fd->links_num--; 2028484: 82 00 7f ff add %g1, -1, %g1 return rc; 2028488: 90 10 20 00 clr %o0 * 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) { fat_fd->links_num--; 202848c: c2 26 60 08 st %g1, [ %i1 + 8 ] * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 2028490: 81 c7 e0 08 ret 2028494: 91 e8 00 08 restore %g0, %o0, %o0 return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 2028498: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 202849c: 80 88 60 01 btst 1, %g1 20284a0: 22 80 00 16 be,a 20284f8 20284a4: d2 06 60 0c ld [ %i1 + 0xc ], %o1 { rc = fat_file_truncate(mt_entry, fat_fd, 0); 20284a8: 90 10 00 18 mov %i0, %o0 20284ac: 92 10 00 19 mov %i1, %o1 20284b0: 7f ff ff ac call 2028360 20284b4: 94 10 20 00 clr %o2 if ( rc != RC_OK ) 20284b8: 80 a2 20 00 cmp %o0, 0 20284bc: 12 bf ff f5 bne 2028490 <== NEVER TAKEN 20284c0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 20284c4: 7f ff 99 12 call 200e90c <_Chain_Extract> 20284c8: 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) ) 20284cc: d2 06 60 0c ld [ %i1 + 0xc ], %o1 20284d0: 40 00 03 f4 call 20294a0 20284d4: 90 10 00 18 mov %i0, %o0 20284d8: 80 8a 20 ff btst 0xff, %o0 20284dc: 32 80 00 13 bne,a 2028528 <== NEVER TAKEN 20284e0: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 20284e4: 90 10 00 19 mov %i1, %o0 20284e8: 7f ff 82 3f call 2008de4 20284ec: b0 10 00 1d mov %i5, %i0 } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 20284f0: 40 00 02 87 call 2028f0c 20284f4: 81 e8 00 00 restore free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 20284f8: 40 00 03 ea call 20294a0 20284fc: 90 10 00 18 mov %i0, %o0 2028500: 80 8a 20 ff btst 0xff, %o0 2028504: 02 80 00 05 be 2028518 <== ALWAYS TAKEN 2028508: 01 00 00 00 nop { fat_fd->links_num = 0; 202850c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 2028510: 40 00 02 7f call 2028f0c <== NOT EXECUTED 2028514: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED 2028518: 7f ff 98 fd call 200e90c <_Chain_Extract> 202851c: 90 10 00 19 mov %i1, %o0 fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 2028520: 10 bf ff f2 b 20284e8 2028524: 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) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 2028528: 40 00 03 d0 call 2029468 <== NOT EXECUTED 202852c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 2028530: 10 bf ff ee b 20284e8 <== NOT EXECUTED 2028534: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED =============================================================================== 02028b0c : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028b0c: 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; 2028b10: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 2028b14: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== 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; 2028b18: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; 2028b1c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) return RC_OK; 2028b20: b4 10 20 00 clr %i2 <== 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) 2028b24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028b28: 12 80 00 04 bne 2028b38 <== NOT EXECUTED 2028b2c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 2028b30: 81 c7 e0 08 ret <== NOT EXECUTED 2028b34: 91 e8 00 1a restore %g0, %i2, %o0 <== 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); 2028b38: 40 00 00 f5 call 2028f0c <== NOT EXECUTED 2028b3c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED if (rc != RC_OK) 2028b40: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2028b44: 12 bf ff fb bne 2028b30 <== NOT EXECUTED 2028b48: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028b4c: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED 2028b50: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED 2028b54: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED 2028b58: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2028b5c: 1a bf ff f5 bcc 2028b30 <== NOT EXECUTED 2028b60: 80 a2 60 00 cmp %o1, 0 <== 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)) ) 2028b64: 02 80 00 23 be 2028bf0 <== NOT EXECUTED 2028b68: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028b6c: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED 2028b70: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2028b74: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED 2028b78: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED 2028b7c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED { 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++ ) 2028b80: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2028b84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028b88: 02 80 00 20 be 2028c08 <== NOT EXECUTED 2028b8c: ba 10 20 00 clr %i5 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2028b90: 10 80 00 0c b 2028bc0 <== NOT EXECUTED 2028b94: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 2028b98: 7f ff 77 d5 call 2006aec <== NOT EXECUTED 2028b9c: ba 07 60 01 inc %i5 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 2028ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028ba4: 12 80 00 0d bne 2028bd8 <== NOT EXECUTED 2028ba8: 01 00 00 00 nop <== 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++ ) 2028bac: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED 2028bb0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 2028bb4: 08 80 00 15 bleu 2028c08 <== NOT EXECUTED 2028bb8: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block); 2028bbc: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED 2028bc0: 92 07 40 1b add %i5, %i3, %o1 <== NOT EXECUTED 2028bc4: 7f ff 76 cb call 20066f0 <== NOT EXECUTED 2028bc8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2028bcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028bd0: 02 bf ff f2 be 2028b98 <== NOT EXECUTED 2028bd4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 2028bd8: 40 00 79 c5 call 20472ec <__errno> <== NOT EXECUTED 2028bdc: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED 2028be0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028be4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 2028be8: 81 c7 e0 08 ret <== NOT EXECUTED 2028bec: 91 e8 00 1a restore %g0, %i2, %o0 <== 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)) ) 2028bf0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED 2028bf4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028bf8: 22 bf ff de be,a 2028b70 <== NOT EXECUTED 2028bfc: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028c00: 10 bf ff e0 b 2028b80 <== NOT EXECUTED 2028c04: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== 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); 2028c08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2028c0c: 40 00 67 69 call 20429b0 <== NOT EXECUTED 2028c10: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2028c14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028c18: 02 bf ff cd be 2028b4c <== NOT EXECUTED 2028c1c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== 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); 2028c20: 10 bf ff c4 b 2028b30 <== NOT EXECUTED 2028c24: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED =============================================================================== 02028614 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 2028614: 9d e3 bf 90 save %sp, -112, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2028618: 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; 202861c: f4 26 c0 00 st %i2, [ %i3 ] if (new_length <= fat_fd->fat_file_size) 2028620: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 2028624: 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; 2028628: 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 ) { 202862c: 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) 2028630: 80 a6 80 01 cmp %i2, %g1 2028634: 08 80 00 3d bleu 2028728 2028638: b0 10 20 00 clr %i0 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202863c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 2028640: 80 a0 a0 01 cmp %g2, 1 2028644: 22 80 00 3b be,a 2028730 <== NEVER TAKEN 2028648: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== 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))) & 202864c: c6 17 20 06 lduh [ %i4 + 6 ], %g3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 2028650: a4 26 80 01 sub %i2, %g1, %l2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 2028654: 84 00 ff ff add %g3, -1, %g2 2028658: a0 08 80 01 and %g2, %g1, %l0 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 - 202865c: a0 20 c0 10 sub %g3, %l0, %l0 2028660: a0 0c 00 02 and %l0, %g2, %l0 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 2028664: 80 a4 00 12 cmp %l0, %l2 2028668: 1a 80 00 30 bcc 2028728 202866c: 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) 2028670: a4 a4 80 10 subcc %l2, %l0, %l2 2028674: 02 80 00 2d be 2028728 <== NEVER TAKEN 2028678: a2 04 bf ff add %l2, -1, %l1 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 202867c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2028680: 90 10 00 1d mov %i5, %o0 * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 2028684: a3 34 40 01 srl %l1, %g1, %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2028688: 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; 202868c: a2 04 60 01 inc %l1 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 2028690: 96 07 bf fc add %fp, -4, %o3 2028694: 94 10 00 11 mov %l1, %o2 2028698: 40 00 6a 49 call 2042fbc 202869c: 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) 20286a0: b0 92 20 00 orcc %o0, 0, %i0 20286a4: 12 80 00 21 bne 2028728 <== NEVER TAKEN 20286a8: 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)) 20286ac: 80 94 00 01 orcc %l0, %g1, %g0 20286b0: 02 80 00 27 be 202874c <== NEVER TAKEN 20286b4: 80 a4 40 01 cmp %l1, %g1 rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 20286b8: 02 80 00 0b be 20286e4 <== ALWAYS TAKEN 20286bc: 88 38 00 01 xnor %g0, %g1, %g4 *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20286c0: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20286c4: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED 20286c8: 86 00 ff ff add %g3, -1, %g3 <== 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) - 20286cc: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 20286d0: a4 0c 80 03 and %l2, %g3, %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) - 20286d4: a3 2c 40 02 sll %l1, %g2, %l1 <== 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 - 20286d8: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 20286dc: 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 - 20286e0: 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 ) 20286e4: d6 06 60 18 ld [ %i1 + 0x18 ], %o3 20286e8: 80 a2 e0 00 cmp %o3, 0 20286ec: 32 80 00 1e bne,a 2028764 20286f0: d2 06 60 3c ld [ %i1 + 0x3c ], %o1 { fat_fd->map.disk_cln = fat_fd->cln = chain; 20286f4: c4 07 bf f0 ld [ %fp + -16 ], %g2 fat_fd->map.file_cln = 0; 20286f8: 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; 20286fc: c4 26 60 1c st %g2, [ %i1 + 0x1c ] 2028700: c4 26 60 38 st %g2, [ %i1 + 0x38 ] } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 2028704: 80 a0 60 00 cmp %g1, 0 2028708: 22 80 00 08 be,a 2028728 <== NEVER TAKEN 202870c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 2028710: c4 07 bf f8 ld [ %fp + -8 ], %g2 if (fat_fd->fat_file_type == FAT_DIRECTORY) 2028714: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 2028718: 80 a0 60 00 cmp %g1, 0 202871c: 02 80 00 20 be 202879c 2028720: c4 26 60 3c st %g2, [ %i1 + 0x3c ] return rc; } } } fat_fd->fat_file_size = new_length; 2028724: f4 26 60 18 st %i2, [ %i1 + 0x18 ] return RC_OK; } 2028728: 81 c7 e0 08 ret 202872c: 81 e8 00 00 restore *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028730: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2028734: 32 bf ff c7 bne,a 2028650 <== NOT EXECUTED 2028738: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 202873c: c4 0f 20 0a ldub [ %i4 + 0xa ], %g2 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028740: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED 2028744: 22 bf ff c3 be,a 2028650 <== NOT EXECUTED 2028748: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 202874c: 40 00 7a e8 call 20472ec <__errno> <== NOT EXECUTED 2028750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028754: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2028758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202875c: 81 c7 e0 08 ret <== NOT EXECUTED 2028760: 81 e8 00 00 restore <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 2028764: 80 a2 7f ff cmp %o1, -1 2028768: 22 80 00 19 be,a 20287cc <== NEVER TAKEN 202876c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 2028770: d2 27 bf f4 st %o1, [ %fp + -12 ] fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 2028774: d4 07 bf f0 ld [ %fp + -16 ], %o2 2028778: 40 00 69 16 call 2042bd0 202877c: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 2028780: 82 92 20 00 orcc %o0, 0, %g1 2028784: 12 80 00 0d bne 20287b8 <== NEVER TAKEN 2028788: d2 07 bf f0 ld [ %fp + -16 ], %o1 { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 202878c: 40 00 01 e0 call 2028f0c 2028790: 90 10 00 1c mov %i4, %o0 2028794: 10 bf ff dc b 2028704 2028798: c2 07 bf fc ld [ %fp + -4 ], %g1 if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 202879c: d2 07 bf f0 ld [ %fp + -16 ], %o1 20287a0: 40 00 02 c1 call 20292a4 20287a4: 90 10 00 1d mov %i5, %o0 if ( rc != RC_OK ) 20287a8: 82 92 20 00 orcc %o0, 0, %g1 20287ac: 22 bf ff df be,a 2028728 <== ALWAYS TAKEN 20287b0: f4 26 60 18 st %i2, [ %i1 + 0x18 ] { fat_free_fat_clusters_chain(mt_entry, chain); 20287b4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED 20287b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20287bc: 40 00 69 c7 call 2042ed8 <== NOT EXECUTED 20287c0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 20287c4: 81 c7 e0 08 ret <== NOT EXECUTED 20287c8: 81 e8 00 00 restore <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 20287cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20287d0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 20287d4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 20287d8: 7f ff ff 58 call 2028538 <== NOT EXECUTED 20287dc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 20287e0: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 20287e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20287e8: 02 bf ff e3 be 2028774 <== NOT EXECUTED 20287ec: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); 20287f0: 10 bf ff f2 b 20287b8 <== NOT EXECUTED 20287f4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED =============================================================================== 02028538 : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 2028538: 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); 202853c: 82 07 a0 50 add %fp, 0x50, %g1 2028540: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 2028544: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2028548: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 202854c: 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); 2028550: c2 27 bf fc st %g1, [ %fp + -4 ] switch (cmd) 2028554: 80 a6 a0 01 cmp %i2, 1 2028558: 02 80 00 08 be 2028578 <== ALWAYS TAKEN 202855c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 *ret = cur_cln; break; default: errno = EINVAL; 2028560: 40 00 7b 63 call 20472ec <__errno> <== NOT EXECUTED 2028564: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028568: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202856c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 2028570: 81 c7 e0 08 ret <== NOT EXECUTED 2028574: 81 e8 00 00 restore <== NOT EXECUTED case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2028578: c8 06 60 18 ld [ %i1 + 0x18 ], %g4 switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); ret = va_arg(ap, uint32_t *); 202857c: ba 07 a0 58 add %fp, 0x58, %i5 2028580: fa 27 bf fc st %i5, [ %fp + -4 ] va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 2028584: 84 10 00 1b mov %i3, %g2 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 2028588: 80 a6 c0 04 cmp %i3, %g4 202858c: 1a 80 00 1c bcc 20285fc <== NEVER TAKEN 2028590: ba 10 00 1c mov %i4, %i5 va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028594: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2028598: 80 a0 60 01 cmp %g1, 1 202859c: 22 80 00 0e be,a 20285d4 20285a0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 20285a4: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20285a8: 90 10 00 18 mov %i0, %o0 20285ac: 92 10 00 19 mov %i1, %o1 20285b0: 95 30 80 0a srl %g2, %o2, %o2 20285b4: 7f ff fe 0b call 2027de0 20285b8: 96 07 bf f8 add %fp, -8, %o3 if ( rc != RC_OK ) 20285bc: b0 92 60 00 orcc %o1, 0, %i0 20285c0: 12 bf ff ec bne 2028570 <== NEVER TAKEN 20285c4: c2 07 bf f8 ld [ %fp + -8 ], %g1 break; *ret = cur_cln; 20285c8: c2 27 40 00 st %g1, [ %i5 ] break; 20285cc: 81 c7 e0 08 ret 20285d0: 81 e8 00 00 restore 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)) && 20285d4: 80 a0 60 00 cmp %g1, 0 20285d8: 32 bf ff f4 bne,a 20285a8 <== NEVER TAKEN 20285dc: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20285e0: c2 08 e0 0a ldub [ %g3 + 0xa ], %g1 if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20285e4: 80 88 60 03 btst 3, %g1 20285e8: 22 bf ff f0 be,a 20285a8 <== NEVER TAKEN 20285ec: 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; 20285f0: c0 27 00 00 clr [ %i4 ] rc = RC_OK; break; 20285f4: 81 c7 e0 08 ret 20285f8: 91 e8 20 00 restore %g0, 0, %o0 ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 20285fc: 40 00 7b 3c call 20472ec <__errno> <== NOT EXECUTED 2028600: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028604: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028608: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202860c: 81 c7 e0 08 ret <== NOT EXECUTED 2028610: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02027de0 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2027de0: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2027de4: f8 06 60 34 ld [ %i1 + 0x34 ], %i4 2027de8: 80 a7 00 1a cmp %i4, %i2 2027dec: 22 80 00 21 be,a 2027e70 <== ALWAYS TAKEN 2027df0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 2027df4: 2a 80 00 16 bcs,a 2027e4c <== NOT EXECUTED 2027df8: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 2027dfc: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED 2027e00: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED 2027e04: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2027e08: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 2027e0c: 02 80 00 13 be 2027e58 <== NOT EXECUTED 2027e10: ba 10 20 00 clr %i5 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2027e14: 10 80 00 06 b 2027e2c <== NOT EXECUTED 2027e18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 2027e1c: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED 2027e20: 02 80 00 0e be 2027e58 <== NOT EXECUTED 2027e24: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2027e28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2027e2c: 40 00 6a e1 call 20429b0 <== NOT EXECUTED 2027e30: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2027e34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027e38: 22 bf ff f9 be,a 2027e1c <== NOT EXECUTED 2027e3c: ba 07 60 01 inc %i5 <== NOT EXECUTED return rc; 2027e40: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED 2027e44: 81 c7 e0 08 ret <== NOT EXECUTED 2027e48: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 2027e4c: 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; 2027e50: 10 bf ff ee b 2027e08 <== NOT EXECUTED 2027e54: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 2027e58: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 2027e5c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED *disk_cln = cur_cln; 2027e60: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED } return RC_OK; 2027e64: b0 10 20 00 clr %i0 <== NOT EXECUTED } 2027e68: 81 c7 e0 08 ret <== NOT EXECUTED 2027e6c: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 2027e70: 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; 2027e74: 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; 2027e78: 81 c7 e0 08 ret 2027e7c: 93 e8 20 00 restore %g0, 0, %o1 =============================================================================== 02028a60 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028a60: 9d e3 bf a0 save %sp, -96, %sp 2028a64: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 fat_fs_info_t *fs_info = mt_entry->fs_info; 2028a68: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2028a6c: 80 a0 60 01 cmp %g1, 1 2028a70: 02 80 00 0c be 2028aa0 <== NEVER TAKEN 2028a74: 86 10 20 01 mov 1, %g3 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)) ) 2028a78: 80 a0 60 00 cmp %g1, 0 2028a7c: 32 80 00 1f bne,a 2028af8 <== NEVER TAKEN 2028a80: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED 2028a84: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 2028a88: 80 88 a0 03 btst 3, %g2 2028a8c: 22 80 00 1b be,a 2028af8 <== NEVER TAKEN 2028a90: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2028a94: c6 07 60 1c ld [ %i5 + 0x1c ], %g3 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2028a98: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 2028a9c: 87 28 c0 02 sll %g3, %g2, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028aa0: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 2028aa4: 90 10 00 19 mov %i1, %o0 2028aa8: b9 30 a0 09 srl %g2, 9, %i4 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028aac: 85 30 a0 05 srl %g2, 5, %g2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2028ab0: 86 00 c0 1c add %g3, %i4, %g3 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2028ab4: 84 08 a0 0f and %g2, 0xf, %g2 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2028ab8: b9 28 e0 04 sll %g3, 4, %i4 2028abc: 7f ff 97 94 call 200e90c <_Chain_Extract> 2028ac0: b8 07 00 02 add %i4, %g2, %i4 */ 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); 2028ac4: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 2028ac8: b8 0f 20 01 and %i4, 1, %i4 2028acc: 83 2f 20 02 sll %i4, 2, %g1 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 2028ad0: 92 10 00 19 mov %i1, %o1 2028ad4: b9 2f 20 04 sll %i4, 4, %i4 2028ad8: b8 27 00 01 sub %i4, %g1, %i4 2028adc: 7f ff 97 81 call 200e8e0 <_Chain_Append> 2028ae0: 90 02 00 1c add %o0, %i4, %o0 _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 2028ae4: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1 2028ae8: 82 10 60 01 or %g1, 1, %g1 2028aec: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ] } 2028af0: 81 c7 e0 08 ret 2028af4: 81 e8 00 00 restore register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028af8: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED 2028afc: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED 2028b00: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED 2028b04: 10 bf ff e5 b 2028a98 <== NOT EXECUTED 2028b08: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED =============================================================================== 02027e80 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2027e80: 9d e3 bf a0 save %sp, -96, %sp static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027e84: c2 06 40 00 ld [ %i1 ], %g1 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2027e88: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2027e8c: 80 a0 60 01 cmp %g1, 1 2027e90: 02 80 00 0c be 2027ec0 2027e94: 84 10 20 01 mov 1, %g2 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)) ) 2027e98: 80 a0 60 00 cmp %g1, 0 2027e9c: 32 80 00 7d bne,a 2028090 2027ea0: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 2027ea4: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2 2027ea8: 80 88 a0 03 btst 3, %g2 2027eac: 22 80 00 79 be,a 2028090 <== NEVER TAKEN 2027eb0: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2027eb4: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2027eb8: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2027ebc: 85 28 80 03 sll %g2, %g3, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027ec0: c2 06 60 04 ld [ %i1 + 4 ], %g1 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2027ec4: de 07 60 60 ld [ %i5 + 0x60 ], %o7 2027ec8: b9 30 60 09 srl %g1, 9, %i4 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2027ecc: 83 30 60 05 srl %g1, 5, %g1 2027ed0: 82 08 60 0f and %g1, 0xf, %g1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027ed4: 84 00 80 1c add %g2, %i4, %g2 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027ed8: b9 28 a0 04 sll %g2, 4, %i4 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027edc: b8 07 00 01 add %i4, %g1, %i4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 2027ee0: 82 0f 20 01 and %i4, 1, %g1 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2027ee4: 85 28 60 02 sll %g1, 2, %g2 2027ee8: a1 28 60 04 sll %g1, 4, %l0 2027eec: a0 24 00 02 sub %l0, %g2, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2027ef0: c2 03 c0 10 ld [ %o7 + %l0 ], %g1 2027ef4: 9e 03 c0 10 add %o7, %l0, %o7 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 )); 2027ef8: 9e 03 e0 04 add %o7, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2027efc: 80 a0 40 0f cmp %g1, %o7 2027f00: 22 80 00 1f be,a 2027f7c 2027f04: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 2027f08: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2027f0c: 80 a0 a0 01 cmp %g2, 1 2027f10: 02 80 00 0c be 2027f40 2027f14: 88 10 20 01 mov 1, %g4 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)) ) 2027f18: 80 a0 a0 00 cmp %g2, 0 2027f1c: 32 80 00 62 bne,a 20280a4 2027f20: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 2027f24: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 2027f28: 80 88 e0 03 btst 3, %g3 2027f2c: 22 80 00 5e be,a 20280a4 <== NEVER TAKEN 2027f30: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2027f34: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2027f38: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 2027f3c: 89 29 00 03 sll %g4, %g3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027f40: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 2027f44: b7 30 e0 09 srl %g3, 9, %i3 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2027f48: 85 30 e0 05 srl %g3, 5, %g2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027f4c: 88 01 00 1b add %g4, %i3, %g4 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2027f50: 84 08 a0 0f and %g2, 0xf, %g2 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027f54: 87 29 20 04 sll %g4, 4, %g3 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027f58: 86 00 c0 02 add %g3, %g2, %g3 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 2027f5c: 80 a7 00 03 cmp %i4, %g3 2027f60: 22 80 00 56 be,a 20280b8 2027f64: c4 00 60 08 ld [ %g1 + 8 ], %g2 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2027f68: c2 00 40 00 ld [ %g1 ], %g1 ) { 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) ; ) 2027f6c: 80 a0 40 0f cmp %g1, %o7 2027f70: 32 bf ff e7 bne,a 2027f0c 2027f74: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 2027f78: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 2027f7c: c2 00 80 10 ld [ %g2 + %l0 ], %g1 2027f80: 84 00 80 10 add %g2, %l0, %g2 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 )); 2027f84: 9e 00 a0 04 add %g2, 4, %o7 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2027f88: 80 a0 40 0f cmp %g1, %o7 2027f8c: 02 80 00 1f be 2028008 <== ALWAYS TAKEN 2027f90: a2 10 3f ff mov -1, %l1 2027f94: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 2027f98: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 2027f9c: 02 80 00 0c be 2027fcc <== NOT EXECUTED 2027fa0: 88 10 20 01 mov 1, %g4 <== 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)) ) 2027fa4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2027fa8: 32 80 00 49 bne,a 20280cc <== NOT EXECUTED 2027fac: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED 2027fb0: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED 2027fb4: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED 2027fb8: 22 80 00 45 be,a 20280cc <== NOT EXECUTED 2027fbc: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2027fc0: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 2027fc4: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED 2027fc8: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027fcc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED 2027fd0: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2027fd4: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027fd8: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 2027fdc: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2027fe0: 87 29 20 04 sll %g4, 4, %g3 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 2027fe4: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 2027fe8: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED 2027fec: 02 80 00 3d be 20280e0 <== NOT EXECUTED 2027ff0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 2027ff4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 2027ff8: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED 2027ffc: 32 bf ff e7 bne,a 2027f98 <== NOT EXECUTED 2028000: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 2028004: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 2028008: 7f ff 85 00 call 2009408 202800c: 90 10 20 44 mov 0x44, %o0 2028010: d0 26 80 00 st %o0, [ %i2 ] if ( lfat_fd == NULL ) 2028014: 80 a2 20 00 cmp %o0, 0 2028018: 02 80 00 40 be 2028118 <== NEVER TAKEN 202801c: b6 10 00 08 mov %o0, %i3 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 2028020: 92 10 20 00 clr %o1 2028024: 40 00 8a 7f call 204aa20 2028028: 94 10 20 44 mov 0x44, %o2 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 202802c: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2028030: c8 06 40 00 ld [ %i1 ], %g4 2028034: c6 06 60 04 ld [ %i1 + 4 ], %g3 2028038: c4 06 60 08 ld [ %i1 + 8 ], %g2 202803c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 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; 2028040: b2 0b ff fe and %o7, -2, %i1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 2028044: c8 26 e0 20 st %g4, [ %i3 + 0x20 ] if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 2028048: 9e 10 20 01 mov 1, %o7 lfat_fd->flags &= ~FAT_FILE_REMOVED; 202804c: f2 2e e0 30 stb %i1, [ %i3 + 0x30 ] if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 2028050: de 26 e0 08 st %o7, [ %i3 + 8 ] lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 2028054: b2 10 3f ff mov -1, %i1 lfat_fd->dir_pos = *dir_pos; 2028058: c6 26 e0 24 st %g3, [ %i3 + 0x24 ] 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; 202805c: f2 26 e0 3c st %i1, [ %i3 + 0x3c ] lfat_fd->dir_pos = *dir_pos; 2028060: c4 26 e0 28 st %g2, [ %i3 + 0x28 ] if ( rc != RC_OK ) 2028064: 80 a4 60 00 cmp %l1, 0 2028068: 02 80 00 25 be 20280fc <== NEVER TAKEN 202806c: c2 26 e0 2c st %g1, [ %i3 + 0x2c ] lfat_fd->ino = key; 2028070: f8 26 e0 0c st %i4, [ %i3 + 0xc ] */ 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); 2028074: d0 07 60 60 ld [ %i5 + 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 ); 2028078: 92 10 00 1b mov %i3, %o1 202807c: 90 02 00 10 add %o0, %l0, %o0 2028080: 7f ff 9a 18 call 200e8e0 <_Chain_Append> 2028084: b0 10 20 00 clr %i0 * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 2028088: 81 c7 e0 08 ret 202808c: 81 e8 00 00 restore register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028090: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 2028094: 82 00 7f fe add %g1, -2, %g1 2028098: 85 28 40 02 sll %g1, %g2, %g2 202809c: 10 bf ff 87 b 2027eb8 20280a0: 84 00 80 03 add %g2, %g3, %g2 20280a4: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 20280a8: 84 00 bf fe add %g2, -2, %g2 20280ac: 89 28 80 04 sll %g2, %g4, %g4 20280b0: 10 bf ff a2 b 2027f38 20280b4: 88 01 00 03 add %g4, %g3, %g4 /* 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; 20280b8: c2 26 80 00 st %g1, [ %i2 ] lfat_fd->links_num++; 20280bc: 84 00 a0 01 inc %g2 20280c0: c4 20 60 08 st %g2, [ %g1 + 8 ] return rc; 20280c4: 81 c7 e0 08 ret 20280c8: 91 e8 20 00 restore %g0, 0, %o0 20280cc: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED 20280d0: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED 20280d4: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED 20280d8: 10 bf ff bb b 2027fc4 <== NOT EXECUTED 20280dc: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 20280e0: 02 bf ff ca be 2028008 <== NOT EXECUTED 20280e4: a2 10 20 00 clr %l1 <== NOT EXECUTED 20280e8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED 20280ec: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED 20280f0: 32 bf ff c2 bne,a 2027ff8 <== NOT EXECUTED 20280f4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20280f8: 30 bf ff c4 b,a 2028008 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 20280fc: 40 00 04 9b call 2029368 <== NOT EXECUTED 2028100: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 2028104: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2028108: 12 bf ff db bne 2028074 <== NOT EXECUTED 202810c: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED { free((*fat_fd)); 2028110: 7f ff 83 35 call 2008de4 <== NOT EXECUTED 2028114: 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 ); 2028118: 40 00 7c 75 call 20472ec <__errno> <== NOT EXECUTED 202811c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028120: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2028124: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028128: 81 c7 e0 08 ret <== NOT EXECUTED 202812c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02028148 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2028148: 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; 202814c: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 2028150: 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; 2028154: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 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) 2028158: 80 a6 e0 00 cmp %i3, 0 202815c: 02 80 00 7f be 2028358 <== NEVER TAKEN 2028160: 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 ) 2028164: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2028168: 80 a0 40 1a cmp %g1, %i2 202816c: 08 80 00 7b bleu 2028358 <== NEVER TAKEN 2028170: 80 a6 c0 01 cmp %i3, %g1 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 2028174: 08 80 00 4c bleu 20282a4 <== ALWAYS TAKEN 2028178: 84 20 40 1b sub %g1, %i3, %g2 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 202817c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028180: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2028184: 80 a0 60 01 cmp %g1, 1 2028188: 22 80 00 4c be,a 20282b8 202818c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028190: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028194: e0 14 60 06 lduh [ %l1 + 6 ], %l0 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028198: a7 36 80 13 srl %i2, %l3, %l3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 202819c: 90 10 00 1d mov %i5, %o0 20281a0: 92 10 00 19 mov %i1, %o1 20281a4: 94 10 00 13 mov %l3, %o2 20281a8: 7f ff ff 0e call 2027de0 20281ac: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 20281b0: b0 92 60 00 orcc %o1, 0, %i0 20281b4: 12 80 00 69 bne 2028358 <== NEVER TAKEN 20281b8: a1 2c 20 10 sll %l0, 0x10, %l0 return rc; while (count > 0) 20281bc: a8 10 20 00 clr %l4 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20281c0: a1 34 20 10 srl %l0, 0x10, %l0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20281c4: a4 10 20 00 clr %l2 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20281c8: a0 04 3f ff add %l0, -1, %l0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20281cc: 80 a6 e0 00 cmp %i3, 0 20281d0: 02 80 00 5b be 202833c <== NEVER TAKEN 20281d4: b4 0e 80 10 and %i2, %l0, %i2 cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 20281d8: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 20281dc: d4 14 40 00 lduh [ %l1 ], %o2 return rc; while (count > 0) 20281e0: 10 80 00 20 b 2028260 20281e4: 82 10 00 1a mov %i2, %g1 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)) ) 20281e8: f0 08 e0 0a ldub [ %g3 + 0xa ], %i0 <== NOT EXECUTED 20281ec: 80 8e 20 03 btst 3, %i0 <== NOT EXECUTED 20281f0: 22 80 00 26 be,a 2028288 <== NOT EXECUTED 20281f4: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20281f8: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED { 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); 20281fc: 85 30 40 02 srl %g1, %g2, %g2 byte = ofs & (fs_info->vol.bps - 1); 2028200: 95 2a a0 10 sll %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 2028204: 98 07 00 12 add %i4, %l2, %o4 { 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); byte = ofs & (fs_info->vol.bps - 1); 2028208: 95 32 a0 10 srl %o2, 0x10, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 202820c: 92 02 40 02 add %o1, %g2, %o1 { 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); byte = ofs & (fs_info->vol.bps - 1); 2028210: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 2028214: 96 10 00 10 mov %l0, %o3 2028218: 94 0a 80 01 and %o2, %g1, %o2 202821c: 40 00 03 97 call 2029078 <_fat_block_read> 2028220: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028224: 94 07 bf fc add %fp, -4, %o2 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 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 ) 2028228: 80 a2 20 00 cmp %o0, 0 202822c: 06 80 00 3c bl 202831c <== NEVER TAKEN 2028230: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2028234: e8 07 bf fc ld [ %fp + -4 ], %l4 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 2028238: a4 04 80 10 add %l2, %l0, %l2 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 202823c: 40 00 69 dd call 20429b0 2028240: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 2028244: 80 a2 20 00 cmp %o0, 0 2028248: 12 80 00 15 bne 202829c <== NEVER TAKEN 202824c: b6 a6 c0 10 subcc %i3, %l0, %i3 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028250: 02 80 00 3a be 2028338 <== ALWAYS TAKEN 2028254: 82 10 20 00 clr %g1 2028258: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED 202825c: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028260: e0 14 60 06 lduh [ %l1 + 6 ], %l0 2028264: a0 24 00 01 sub %l0, %g1, %l0 2028268: 80 a4 00 1b cmp %l0, %i3 202826c: 08 80 00 03 bleu 2028278 2028270: c8 07 bf fc ld [ %fp + -4 ], %g4 2028274: a0 10 00 1b mov %i3, %l0 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)) ) 2028278: 80 a1 20 00 cmp %g4, 0 202827c: 02 bf ff db be 20281e8 <== NEVER TAKEN 2028280: c6 07 60 20 ld [ %i5 + 0x20 ], %g3 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028284: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 2028288: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 202828c: 92 01 3f fe add %g4, -2, %o1 2028290: 93 2a 40 18 sll %o1, %i0, %o1 2028294: 10 bf ff da b 20281fc 2028298: 92 02 40 03 add %o1, %g3, %o1 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; } 202829c: 81 c7 e0 08 ret <== NOT EXECUTED 20282a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 20282a4: 80 a6 80 02 cmp %i2, %g2 20282a8: 28 bf ff b7 bleu,a 2028184 <== ALWAYS TAKEN 20282ac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 20282b0: 10 bf ff b4 b 2028180 <== NOT EXECUTED 20282b4: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 20282b8: 80 a0 60 00 cmp %g1, 0 20282bc: 32 bf ff b6 bne,a 2028194 <== NEVER TAKEN 20282c0: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 20282c4: c2 0c 60 0a ldub [ %l1 + 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)) && 20282c8: 80 88 60 03 btst 3, %g1 20282cc: 22 bf ff b2 be,a 2028194 <== NEVER TAKEN 20282d0: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 20282d4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 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)) ) 20282d8: 80 a0 60 00 cmp %g1, 0 20282dc: 32 80 00 12 bne,a 2028324 <== NEVER TAKEN 20282e0: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20282e4: d2 04 60 1c ld [ %l1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 20282e8: c2 0c 60 02 ldub [ %l1 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 20282ec: d4 14 40 00 lduh [ %l1 ], %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); 20282f0: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 20282f4: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 20282f8: 90 10 00 1d mov %i5, %o0 20282fc: 92 02 40 01 add %o1, %g1, %o1 2028300: 94 0e 80 0a and %i2, %o2, %o2 2028304: 96 10 00 1b mov %i3, %o3 2028308: 40 00 03 5c call 2029078 <_fat_block_read> 202830c: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 2028310: b0 92 20 00 orcc %o0, 0, %i0 2028314: 16 80 00 11 bge 2028358 <== ALWAYS TAKEN 2028318: 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; 202831c: 81 c7 e0 08 ret <== NOT EXECUTED 2028320: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028324: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 2028328: 92 00 7f fe add %g1, -2, %o1 <== NOT EXECUTED 202832c: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2028330: 10 bf ff ee b 20282e8 <== NOT EXECUTED 2028334: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 2028338: b0 10 00 12 mov %l2, %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); 202833c: c2 0c 60 08 ldub [ %l1 + 8 ], %g1 2028340: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2028344: 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); 2028348: a4 06 80 12 add %i2, %l2, %l2 202834c: a5 34 80 01 srl %l2, %g1, %l2 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028350: a6 04 80 13 add %l2, %l3, %l3 2028354: e6 26 60 34 st %l3, [ %i1 + 0x34 ] ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2028358: 81 c7 e0 08 ret 202835c: 81 e8 00 00 restore =============================================================================== 02028c28 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028c28: 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; 2028c2c: fa 06 60 1c ld [ %i1 + 0x1c ], %i5 uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028c30: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 2028c34: fa 27 bf fc st %i5, [ %fp + -4 ] int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 2028c38: b6 10 00 18 mov %i0, %i3 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)) && 2028c3c: 80 a0 60 01 cmp %g1, 1 2028c40: 02 80 00 21 be 2028cc4 <== NEVER TAKEN 2028c44: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028c48: c4 07 20 0c ld [ %i4 + 0xc ], %g2 2028c4c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 2028c50: 84 0f 40 02 and %i5, %g2, %g2 2028c54: 80 a0 80 01 cmp %g2, %g1 2028c58: 0a 80 00 0e bcs 2028c90 <== ALWAYS TAKEN 2028c5c: c0 26 60 18 clr [ %i1 + 0x18 ] ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 2028c60: 10 80 00 15 b 2028cb4 <== NOT EXECUTED 2028c64: ba 10 20 00 clr %i5 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2028c68: de 06 60 18 ld [ %i1 + 0x18 ], %o7 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028c6c: c6 07 20 0c ld [ %i4 + 0xc ], %g3 2028c70: c4 07 20 10 ld [ %i4 + 0x10 ], %g2 2028c74: c2 07 bf fc ld [ %fp + -4 ], %g1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 2028c78: 88 03 c0 04 add %o7, %g4, %g4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2028c7c: 86 08 40 03 and %g1, %g3, %g3 2028c80: 80 a0 c0 02 cmp %g3, %g2 2028c84: 1a 80 00 0c bcc 2028cb4 <== ALWAYS TAKEN 2028c88: c8 26 60 18 st %g4, [ %i1 + 0x18 ] 2028c8c: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028c90: 92 10 00 1d mov %i5, %o1 2028c94: 90 10 00 1b mov %i3, %o0 2028c98: 40 00 67 46 call 20429b0 2028c9c: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 2028ca0: 80 a2 20 00 cmp %o0, 0 2028ca4: 22 bf ff f1 be,a 2028c68 <== ALWAYS TAKEN 2028ca8: c8 17 20 06 lduh [ %i4 + 6 ], %g4 fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 2028cac: 81 c7 e0 08 ret <== NOT EXECUTED 2028cb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; 2028cb4: 90 10 20 00 clr %o0 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 2028cb8: fa 26 60 3c st %i5, [ %i1 + 0x3c ] return rc; } 2028cbc: 81 c7 e0 08 ret 2028cc0: 91 e8 00 08 restore %g0, %o0, %o0 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)) && 2028cc4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED 2028cc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028ccc: 32 bf ff e0 bne,a 2028c4c <== NOT EXECUTED 2028cd0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028cd4: 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)) && 2028cd8: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED 2028cdc: 22 bf ff dc be,a 2028c4c <== NOT EXECUTED 2028ce0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 2028ce4: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED return rc; 2028ce8: 90 10 20 00 clr %o0 <== NOT EXECUTED 2028cec: 10 bf ff f0 b 2028cac <== NOT EXECUTED 2028cf0: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED =============================================================================== 02028360 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 2028360: 9d e3 bf 98 save %sp, -104, %sp 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 ) 2028364: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 { 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; 2028368: 84 10 3f ff mov -1, %g2 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 202836c: c0 27 bf f8 clr [ %fp + -8 ] uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 2028370: c4 27 bf fc st %g2, [ %fp + -4 ] if ( new_length >= fat_fd->fat_file_size ) 2028374: 80 a0 40 1a cmp %g1, %i2 2028378: 08 80 00 21 bleu 20283fc 202837c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 return rc; assert(fat_fd->fat_file_size); 2028380: 80 a0 60 00 cmp %g1, 0 2028384: 02 80 00 33 be 2028450 <== NEVER TAKEN 2028388: 11 00 81 a3 sethi %hi(0x2068c00), %o0 cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 202838c: c6 08 a0 08 ldub [ %g2 + 8 ], %g3 2028390: c4 10 a0 06 lduh [ %g2 + 6 ], %g2 2028394: 84 00 bf ff add %g2, -1, %g2 2028398: b4 00 80 1a add %g2, %i2, %i2 202839c: b5 36 80 03 srl %i2, %g3, %i2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 20283a0: 87 2e 80 03 sll %i2, %g3, %g3 20283a4: 80 a0 40 03 cmp %g1, %g3 20283a8: 08 80 00 13 bleu 20283f4 <== NEVER TAKEN 20283ac: 92 10 20 00 clr %o1 return RC_OK; if (cl_start != 0) 20283b0: 80 a6 a0 00 cmp %i2, 0 20283b4: 02 80 00 09 be 20283d8 <== ALWAYS TAKEN 20283b8: 90 10 00 18 mov %i0, %o0 { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 20283bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20283c0: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED 20283c4: 7f ff fe 87 call 2027de0 <== NOT EXECUTED 20283c8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 20283cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 20283d0: 12 80 00 09 bne 20283f4 <== NOT EXECUTED 20283d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 20283d8: 92 10 00 19 mov %i1, %o1 20283dc: 94 10 00 1a mov %i2, %o2 20283e0: 7f ff fe 80 call 2027de0 20283e4: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20283e8: 80 a2 60 00 cmp %o1, 0 20283ec: 22 80 00 07 be,a 2028408 <== ALWAYS TAKEN 20283f0: d2 07 bf f8 ld [ %fp + -8 ], %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; } 20283f4: 81 c7 e0 08 ret 20283f8: 91 e8 00 09 restore %g0, %o1, %o0 uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 20283fc: 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; } 2028400: 81 c7 e0 08 ret 2028404: 91 e8 00 09 restore %g0, %o1, %o0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 2028408: 40 00 6a b4 call 2042ed8 202840c: 90 10 00 18 mov %i0, %o0 if (rc != RC_OK) 2028410: 92 92 20 00 orcc %o0, 0, %o1 2028414: 12 bf ff f8 bne 20283f4 <== NEVER TAKEN 2028418: 80 a6 a0 00 cmp %i2, 0 return rc; if (cl_start != 0) 202841c: 02 bf ff f6 be 20283f4 <== ALWAYS TAKEN 2028420: 90 10 00 18 mov %i0, %o0 { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 2028424: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED 2028428: 40 00 69 ea call 2042bd0 <== NOT EXECUTED 202842c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 2028430: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED 2028434: 12 bf ff f0 bne 20283f4 <== NOT EXECUTED 2028438: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 202843c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 2028440: 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; 2028444: 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; 2028448: 10 bf ff eb b 20283f4 <== NOT EXECUTED 202844c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 2028450: 15 00 81 a3 sethi %hi(0x2068c00), %o2 <== NOT EXECUTED 2028454: 17 00 81 a3 sethi %hi(0x2068c00), %o3 <== NOT EXECUTED 2028458: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED 202845c: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED 2028460: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED 2028464: 40 00 08 99 call 202a6c8 <__assert_func> <== NOT EXECUTED 2028468: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED =============================================================================== 020287f8 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 20287f8: 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; 20287fc: 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; 2028800: c0 27 bf fc clr [ %fp + -4 ] fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2028804: ba 10 00 18 mov %i0, %i5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 2028808: 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 ) 202880c: 80 a6 e0 00 cmp %i3, 0 2028810: 02 80 00 82 be 2028a18 <== NEVER TAKEN 2028814: b0 10 20 00 clr %i0 return cmpltd; if ( start > fat_fd->fat_file_size ) 2028818: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 202881c: 80 a0 40 1a cmp %g1, %i2 2028820: 0a 80 00 7a bcs 2028a08 <== NEVER TAKEN 2028824: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 2028828: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 202882c: 80 a6 c0 01 cmp %i3, %g1 2028830: 18 80 00 76 bgu 2028a08 <== NEVER TAKEN 2028834: 82 20 40 1b sub %g1, %i3, %g1 2028838: 80 a6 80 01 cmp %i2, %g1 202883c: 18 80 00 73 bgu 2028a08 <== NEVER TAKEN 2028840: a2 06 c0 1a add %i3, %i2, %l1 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 2028844: 90 10 00 1d mov %i5, %o0 2028848: 92 10 00 19 mov %i1, %o1 202884c: 94 10 00 11 mov %l1, %o2 2028850: 7f ff ff 71 call 2028614 2028854: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2028858: b0 92 20 00 orcc %o0, 0, %i0 202885c: 12 80 00 6f bne 2028a18 <== NEVER TAKEN 2028860: 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)) 2028864: 80 a4 40 01 cmp %l1, %g1 2028868: 32 80 00 02 bne,a 2028870 <== NEVER TAKEN 202886c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 2028870: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2028874: 80 a0 60 01 cmp %g1, 1 2028878: 22 80 00 45 be,a 202898c 202887c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028880: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2028884: e2 14 20 06 lduh [ %l0 + 6 ], %l1 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2028888: 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); 202888c: 90 10 00 1d mov %i5, %o0 2028890: 92 10 00 19 mov %i1, %o1 2028894: 94 10 00 12 mov %l2, %o2 2028898: 7f ff fd 52 call 2027de0 202889c: 96 07 bf f8 add %fp, -8, %o3 if (rc != RC_OK) 20288a0: b0 92 60 00 orcc %o1, 0, %i0 20288a4: 12 80 00 5d bne 2028a18 <== NEVER TAKEN 20288a8: 83 2c 60 10 sll %l1, 0x10, %g1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20288ac: 83 30 60 10 srl %g1, 0x10, %g1 20288b0: 82 00 7f ff add %g1, -1, %g1 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20288b4: a2 10 20 00 clr %l1 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 20288b8: b4 0e 80 01 and %i2, %g1, %i2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 20288bc: a8 10 20 00 clr %l4 20288c0: 80 a6 e0 00 cmp %i3, 0 20288c4: 12 80 00 20 bne 2028944 <== ALWAYS TAKEN 20288c8: 82 10 00 1a mov %i2, %g1 } /* 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); 20288cc: 10 80 00 5d b 2028a40 <== NOT EXECUTED 20288d0: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== 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)) ) 20288d4: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED 20288d8: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED 20288dc: 22 80 00 25 be,a 2028970 <== NOT EXECUTED 20288e0: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20288e4: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED 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); 20288e8: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 byte = ofs & (fs_info->vol.bps - 1); 20288ec: 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); 20288f0: 85 30 40 02 srl %g1, %g2, %g2 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 20288f4: 98 07 00 11 add %i4, %l1, %o4 { 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); byte = ofs & (fs_info->vol.bps - 1); 20288f8: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 20288fc: 92 02 40 02 add %o1, %g2, %o1 2028900: 94 08 40 0a and %g1, %o2, %o2 2028904: 40 00 01 ff call 2029100 <_fat_block_write> 2028908: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 202890c: 94 07 bf f8 add %fp, -8, %o2 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 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 ) 2028910: 80 a2 20 00 cmp %o0, 0 2028914: 06 80 00 1c bl 2028984 <== NEVER TAKEN 2028918: 90 10 00 1d mov %i5, %o0 return -1; count -= c; cmpltd += c; save_cln = cur_cln; 202891c: 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; 2028920: e6 07 bf fc ld [ %fp + -4 ], %l3 cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2028924: 40 00 68 23 call 20429b0 2028928: 92 10 00 14 mov %l4, %o1 if ( rc != RC_OK ) 202892c: b0 92 20 00 orcc %o0, 0, %i0 2028930: 12 80 00 3a bne 2028a18 <== NEVER TAKEN 2028934: b6 a6 c0 13 subcc %i3, %l3, %i3 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028938: 02 80 00 40 be 2028a38 202893c: a2 04 40 13 add %l1, %l3, %l1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 2028940: 82 10 20 00 clr %g1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2028944: d6 14 20 06 lduh [ %l0 + 6 ], %o3 2028948: 96 22 c0 01 sub %o3, %g1, %o3 202894c: 80 a2 c0 1b cmp %o3, %i3 2028950: 08 80 00 03 bleu 202895c 2028954: c6 07 bf f8 ld [ %fp + -8 ], %g3 2028958: 96 10 00 1b mov %i3, %o3 202895c: d6 27 bf fc st %o3, [ %fp + -4 ] 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)) ) 2028960: 80 a0 e0 00 cmp %g3, 0 2028964: 02 bf ff dc be 20288d4 <== NEVER TAKEN 2028968: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 202896c: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 2028970: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2 2028974: 92 00 ff fe add %g3, -2, %o1 2028978: 93 2a 40 04 sll %o1, %g4, %o1 202897c: 10 bf ff db b 20288e8 2028980: 92 02 40 02 add %o1, %g2, %o1 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; } 2028984: 81 c7 e0 08 ret <== NOT EXECUTED 2028988: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 202898c: 80 a0 60 00 cmp %g1, 0 2028990: 32 bf ff bd bne,a 2028884 <== NEVER TAKEN 2028994: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 2028998: 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)) && 202899c: 80 88 60 03 btst 3, %g1 20289a0: 22 bf ff b9 be,a 2028884 <== NEVER TAKEN 20289a4: 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); 20289a8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 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)) ) 20289ac: 80 a0 a0 00 cmp %g2, 0 20289b0: 12 80 00 1c bne 2028a20 <== NEVER TAKEN 20289b4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 20289b8: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 20289bc: 80 88 e0 03 btst 3, %g3 20289c0: 22 80 00 19 be,a 2028a24 <== NEVER TAKEN 20289c4: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 20289c8: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 sec += (start >> fs_info->vol.sec_log2); 20289cc: c2 0c 20 02 ldub [ %l0 + 2 ], %g1 byte = start & (fs_info->vol.bps - 1); 20289d0: 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); 20289d4: 83 36 80 01 srl %i2, %g1, %g1 byte = start & (fs_info->vol.bps - 1); 20289d8: 94 02 bf ff add %o2, -1, %o2 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 20289dc: 90 10 00 1d mov %i5, %o0 20289e0: 92 02 40 01 add %o1, %g1, %o1 20289e4: 94 0e 80 0a and %i2, %o2, %o2 20289e8: 96 10 00 1b mov %i3, %o3 20289ec: 40 00 01 c5 call 2029100 <_fat_block_write> 20289f0: 98 10 00 1c mov %i4, %o4 if ( ret < 0 ) 20289f4: b0 92 20 00 orcc %o0, 0, %i0 20289f8: 16 80 00 18 bge 2028a58 <== ALWAYS TAKEN 20289fc: 01 00 00 00 nop return -1; 2028a00: 81 c7 e0 08 ret <== NOT EXECUTED 2028a04: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 2028a08: 40 00 7a 39 call 20472ec <__errno> <== NOT EXECUTED 2028a0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028a10: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2028a14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028a18: 81 c7 e0 08 ret <== NOT EXECUTED 2028a1c: 81 e8 00 00 restore <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2028a20: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED 2028a24: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED 2028a28: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED 2028a2c: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED 2028a30: 10 bf ff e7 b 20289cc <== NOT EXECUTED 2028a34: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 2028a38: b0 10 00 11 mov %l1, %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); 2028a3c: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 2028a40: b4 06 bf ff add %i2, -1, %i2 fat_fd->map.disk_cln = save_cln; 2028a44: 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); 2028a48: a2 06 80 11 add %i2, %l1, %l1 2028a4c: a3 34 40 01 srl %l1, %g1, %l1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2028a50: a4 04 40 12 add %l1, %l2, %l2 2028a54: 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; 2028a58: 81 c7 e0 08 ret 2028a5c: 81 e8 00 00 restore =============================================================================== 02042ed8 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 2042ed8: 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; 2042edc: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = chain; uint32_t next_cln = 0; 2042ee0: c0 27 bf fc clr [ %fp + -4 ] uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 2042ee4: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2042ee8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2042eec: 84 0e 40 02 and %i1, %g2, %g2 2042ef0: 80 a0 80 01 cmp %g2, %g1 2042ef4: 1a 80 00 25 bcc 2042f88 <== NEVER TAKEN 2042ef8: b8 10 00 18 mov %i0, %i4 2042efc: b6 10 00 19 mov %i1, %i3 2042f00: b4 10 20 00 clr %i2 2042f04: 10 80 00 0e b 2042f3c 2042f08: a0 10 20 00 clr %l0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2042f0c: 7f ff ff 31 call 2042bd0 2042f10: 01 00 00 00 nop if ( rc != RC_OK ) 2042f14: 80 a2 20 00 cmp %o0, 0 2042f18: 02 80 00 03 be 2042f24 <== ALWAYS TAKEN 2042f1c: f6 07 bf fc ld [ %fp + -4 ], %i3 2042f20: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 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) 2042f24: c4 07 60 0c ld [ %i5 + 0xc ], %g2 2042f28: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 2042f2c: 84 0e c0 02 and %i3, %g2, %g2 2042f30: 80 a0 80 01 cmp %g2, %g1 2042f34: 1a 80 00 17 bcc 2042f90 <== ALWAYS TAKEN 2042f38: b4 06 a0 01 inc %i2 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2042f3c: 92 10 00 1b mov %i3, %o1 2042f40: 94 07 bf fc add %fp, -4, %o2 2042f44: 7f ff fe 9b call 20429b0 2042f48: 90 10 00 1c mov %i4, %o0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2042f4c: 92 10 00 1b mov %i3, %o1 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 2042f50: b0 10 00 08 mov %o0, %i0 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 2042f54: 94 10 20 00 clr %o2 uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 2042f58: 80 a6 20 00 cmp %i0, 0 2042f5c: 02 bf ff ec be 2042f0c <== ALWAYS TAKEN 2042f60: 90 10 00 1c mov %i4, %o0 { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2042f64: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED 2042f68: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2042f6c: 02 80 00 03 be 2042f78 <== NOT EXECUTED 2042f70: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 2042f74: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2042f78: 7f ff 97 e5 call 2028f0c <== NOT EXECUTED 2042f7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED return rc; 2042f80: 81 c7 e0 08 ret <== NOT EXECUTED 2042f84: 81 e8 00 00 restore <== NOT EXECUTED { 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; 2042f88: b4 10 20 00 clr %i2 <== NOT EXECUTED fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 2042f8c: a0 10 20 00 clr %l0 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 2042f90: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 2042f94: 80 a0 7f ff cmp %g1, -1 2042f98: 02 80 00 04 be 2042fa8 <== ALWAYS TAKEN 2042f9c: f2 27 60 44 st %i1, [ %i5 + 0x44 ] fs_info->vol.free_cls += freed_cls_cnt; 2042fa0: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED 2042fa4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED fat_buf_release(fs_info); 2042fa8: b0 10 00 10 mov %l0, %i0 2042fac: 7f ff 97 d8 call 2028f0c 2042fb0: 90 10 00 1d mov %i5, %o0 if (rc1 != RC_OK) return rc1; return RC_OK; } 2042fb4: 81 c7 e0 08 ret 2042fb8: 81 e8 00 00 restore =============================================================================== 02029468 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 2029468: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 202946c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 2029470: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED 2029474: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 <== NOT EXECUTED 2029478: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 <== NOT EXECUTED 202947c: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED 2029480: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED 2029484: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED 2029488: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED 202948c: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED 2029490: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED 2029494: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED } 2029498: 81 c7 e0 08 ret <== NOT EXECUTED 202949c: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020429b0 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 20429b0: 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; 20429b4: 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)) ) 20429b8: 80 a6 60 01 cmp %i1, 1 20429bc: 08 80 00 26 bleu 2042a54 <== NEVER TAKEN 20429c0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 20429c4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 20429c8: 82 00 60 01 inc %g1 20429cc: 80 a6 40 01 cmp %i1, %g1 20429d0: 18 80 00 21 bgu 2042a54 <== NEVER TAKEN 20429d4: 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) + 20429d8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 20429dc: 80 88 60 01 btst 1, %g1 20429e0: 12 80 00 23 bne 2042a6c <== ALWAYS TAKEN 20429e4: f6 0f 60 02 ldub [ %i5 + 2 ], %i3 20429e8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20429ec: 02 80 00 30 be 2042aac <== NOT EXECUTED 20429f0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 20429f4: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 20429f8: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 20429fc: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2042a00: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2042a04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2042a08: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 2042a0c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2042a10: 7f ff 98 b9 call 2028cf4 <== NOT EXECUTED 2042a14: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED if (rc != RC_OK) 2042a18: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2042a1c: 12 80 00 5a bne 2042b84 <== NOT EXECUTED 2042a20: 01 00 00 00 nop <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 2042a24: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED 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); 2042a28: a1 2c 20 10 sll %l0, 0x10, %l0 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2042a2c: 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); 2042a30: a1 34 20 10 srl %l0, 0x10, %l0 2042a34: 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 ) 2042a38: 02 80 00 21 be 2042abc <== NEVER TAKEN 2042a3c: b8 0f 00 10 and %i4, %l0, %i4 2042a40: 80 a0 60 04 cmp %g1, 4 2042a44: 02 80 00 3e be 2042b3c <== NEVER TAKEN 2042a48: 80 a0 60 01 cmp %g1, 1 2042a4c: 02 80 00 29 be 2042af0 <== ALWAYS TAKEN 2042a50: c2 07 bf fc ld [ %fp + -4 ], %g1 *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 2042a54: 40 00 12 26 call 20472ec <__errno> <== NOT EXECUTED 2042a58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2042a5c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2042a60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2042a64: 81 c7 e0 08 ret <== NOT EXECUTED 2042a68: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 2042a6c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2042a70: b9 36 60 01 srl %i1, 1, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2042a74: e0 17 40 00 lduh [ %i5 ], %l0 /* 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) + 2042a78: b8 07 00 19 add %i4, %i1, %i4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2042a7c: 90 10 00 1d mov %i5, %o0 /* 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) + 2042a80: b7 37 00 1b srl %i4, %i3, %i3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2042a84: 94 10 20 01 mov 1, %o2 /* 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) + 2042a88: b6 06 c0 01 add %i3, %g1, %i3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2042a8c: 96 07 bf fc add %fp, -4, %o3 2042a90: 7f ff 98 99 call 2028cf4 2042a94: 92 10 00 1b mov %i3, %o1 if (rc != RC_OK) 2042a98: b0 92 20 00 orcc %o0, 0, %i0 2042a9c: 22 bf ff e3 be,a 2042a28 <== ALWAYS TAKEN 2042aa0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2042aa4: 81 c7 e0 08 ret <== NOT EXECUTED 2042aa8: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 2042aac: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2042ab0: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED 2042ab4: 10 bf ff d3 b 2042a00 <== NOT EXECUTED 2042ab8: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 2042abc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2042ac0: 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)); 2042ac4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2042ac8: 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)); 2042acc: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 2042ad0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED 2042ad4: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED 2042ad8: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED 2042adc: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED 2042ae0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2042ae4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 2042ae8: 81 c7 e0 08 ret <== NOT EXECUTED 2042aec: 81 e8 00 00 restore <== NOT EXECUTED /* * 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) ) 2042af0: 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))); 2042af4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 if ( ofs == (fs_info->vol.bps - 1) ) 2042af8: 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))); 2042afc: c2 08 80 1c ldub [ %g2 + %i4 ], %g1 if ( ofs == (fs_info->vol.bps - 1) ) 2042b00: 80 a0 c0 1c cmp %g3, %i4 2042b04: 02 80 00 22 be 2042b8c <== NEVER TAKEN 2042b08: c2 26 80 00 st %g1, [ %i2 ] *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 2042b0c: b8 00 80 1c add %g2, %i4, %i4 2042b10: c4 0f 20 01 ldub [ %i4 + 1 ], %g2 2042b14: 85 28 a0 08 sll %g2, 8, %g2 2042b18: 82 10 80 01 or %g2, %g1, %g1 2042b1c: c2 26 80 00 st %g1, [ %i2 ] } if ( FAT_CLUSTER_IS_ODD(cln) ) 2042b20: 80 8e 60 01 btst 1, %i1 2042b24: 22 80 00 17 be,a 2042b80 2042b28: 82 08 6f ff and %g1, 0xfff, %g1 *ret_val = (*ret_val) >> FAT12_SHIFT; 2042b2c: 83 30 60 04 srl %g1, 4, %g1 2042b30: c2 26 80 00 st %g1, [ %i2 ] 2042b34: 81 c7 e0 08 ret 2042b38: 81 e8 00 00 restore *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 2042b3c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2042b40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2042b44: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED 2042b48: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2042b4c: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2042b50: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042b54: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2042b58: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2042b5c: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042b60: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2042b64: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042b68: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2042b6c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED 2042b70: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 2042b74: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED break; 2042b78: 81 c7 e0 08 ret <== NOT EXECUTED 2042b7c: 81 e8 00 00 restore <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 2042b80: c2 26 80 00 st %g1, [ %i2 ] 2042b84: 81 c7 e0 08 ret 2042b88: 81 e8 00 00 restore * align problems for some architectures */ *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, 2042b8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2042b90: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED 2042b94: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2042b98: 7f ff 98 57 call 2028cf4 <== NOT EXECUTED 2042b9c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2042ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2042ba4: 12 80 00 09 bne 2042bc8 <== NOT EXECUTED 2042ba8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 2042bac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 2042bb0: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2 <== NOT EXECUTED 2042bb4: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED 2042bb8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2042bbc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED 2042bc0: 10 bf ff d8 b 2042b20 <== NOT EXECUTED 2042bc4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 2042bc8: 81 c7 e0 08 ret <== NOT EXECUTED 2042bcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED =============================================================================== 02029368 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 2029368: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 202936c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== 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)) 2029370: 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; 2029374: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== 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)) 2029378: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 202937c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029380: 22 80 00 20 be,a 2029400 <== NOT EXECUTED 2029384: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 2029388: c6 07 60 68 ld [ %i5 + 0x68 ], %g3 <== NOT EXECUTED 202938c: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED 2029390: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 2029394: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED 2029398: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 202939c: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 20293a0: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED 20293a4: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED 20293a8: 02 80 00 1d be 202941c <== NOT EXECUTED 20293ac: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED 20293b0: 10 80 00 0a b 20293d8 <== NOT EXECUTED 20293b4: 88 10 20 00 clr %g4 <== NOT EXECUTED 20293b8: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED 20293bc: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED 20293c0: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED 20293c4: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED 20293c8: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED 20293cc: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED 20293d0: 02 80 00 13 be 202941c <== NOT EXECUTED 20293d4: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 20293d8: 82 00 60 01 inc %g1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 20293dc: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 20293e0: 0a 80 00 03 bcs 20293ec <== NOT EXECUTED 20293e4: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED fs_info->index = 0; 20293e8: 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++) 20293ec: 88 01 20 01 inc %g4 <== NOT EXECUTED 20293f0: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED 20293f4: 32 bf ff f1 bne,a 20293b8 <== NOT EXECUTED 20293f8: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== 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)) 20293fc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2029400: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED 2029404: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED 2029408: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 202940c: 0a 80 00 0c bcs 202943c <== NOT EXECUTED 2029410: b0 10 20 00 clr %i0 <== NOT EXECUTED 2029414: 81 c7 e0 08 ret <== NOT EXECUTED 2029418: 81 e8 00 00 restore <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 202941c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2029420: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED 2029424: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED 2029428: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 202942c: f0 07 60 6c ld [ %i5 + 0x6c ], %i0 <== NOT EXECUTED 2029430: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED 2029434: 81 c7 e0 08 ret <== NOT EXECUTED 2029438: 91 ee 00 01 restore %i0, %g1, %o0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 202943c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED 2029440: 7f ff 83 3f call 200a13c <== NOT EXECUTED 2029444: d2 27 60 70 st %o1, [ %i5 + 0x70 ] <== NOT EXECUTED if (fs_info->uino != NULL) 2029448: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202944c: 12 80 00 04 bne 202945c <== NOT EXECUTED 2029450: d0 27 60 68 st %o0, [ %i5 + 0x68 ] <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 2029454: 81 c7 e0 08 ret <== NOT EXECUTED 2029458: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); if (fs_info->uino != NULL) fs_info->index = fs_info->uino_pool_size; 202945c: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== NOT EXECUTED 2029460: 10 bf ff c7 b 202937c <== NOT EXECUTED 2029464: d2 27 60 6c st %o1, [ %i5 + 0x6c ] <== NOT EXECUTED =============================================================================== 020292a4 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 20292a4: 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; 20292a8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 uint32_t cur_cln = start_cln; 20292ac: f2 27 bf fc st %i1, [ %fp + -4 ] char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 20292b0: d0 17 60 06 lduh [ %i5 + 6 ], %o0 20292b4: 92 10 20 01 mov 1, %o1 20292b8: 7f ff 7d ec call 2008a68 20292bc: b8 10 00 18 mov %i0, %i4 if ( buf == NULL ) 20292c0: b6 92 20 00 orcc %o0, 0, %i3 20292c4: 32 80 00 04 bne,a 20292d4 <== ALWAYS TAKEN 20292c8: c4 07 60 0c ld [ %i5 + 0xc ], %g2 20292cc: 30 80 00 21 b,a 2029350 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 20292d0: c4 07 60 0c ld [ %i5 + 0xc ], %g2 20292d4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 20292d8: 84 0e 40 02 and %i1, %g2, %g2 20292dc: 80 a0 80 01 cmp %g2, %g1 20292e0: 1a 80 00 12 bcc 2029328 20292e4: 94 10 00 1b mov %i3, %o2 { ret = fat_cluster_write(mt_entry, cur_cln, buf); 20292e8: 92 10 00 19 mov %i1, %o1 20292ec: 7f ff ff d3 call 2029238 20292f0: 90 10 00 1c mov %i4, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 20292f4: 94 07 bf fc add %fp, -4, %o2 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) 20292f8: 80 a2 3f ff cmp %o0, -1 20292fc: 02 80 00 10 be 202933c <== NEVER TAKEN 2029300: 90 10 00 1c mov %i4, %o0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 2029304: 40 00 65 ab call 20429b0 2029308: d2 07 bf fc ld [ %fp + -4 ], %o1 if ( rc != RC_OK ) 202930c: b0 92 20 00 orcc %o0, 0, %i0 2029310: 22 bf ff f0 be,a 20292d0 <== ALWAYS TAKEN 2029314: f2 07 bf fc ld [ %fp + -4 ], %i1 { free(buf); 2029318: 7f ff 7e b3 call 2008de4 <== NOT EXECUTED 202931c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED return rc; 2029320: 81 c7 e0 08 ret <== NOT EXECUTED 2029324: 81 e8 00 00 restore <== NOT EXECUTED } } free(buf); return rc; 2029328: b0 10 20 00 clr %i0 free(buf); return rc; } } free(buf); 202932c: 7f ff 7e ae call 2008de4 2029330: 90 10 00 1b mov %i3, %o0 return rc; } 2029334: 81 c7 e0 08 ret 2029338: 81 e8 00 00 restore while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 202933c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 2029340: 7f ff 7e a9 call 2008de4 <== NOT EXECUTED 2029344: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 2029348: 81 c7 e0 08 ret <== NOT EXECUTED 202934c: 81 e8 00 00 restore <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 2029350: 40 00 77 e7 call 20472ec <__errno> <== NOT EXECUTED 2029354: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029358: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 202935c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029360: 81 c7 e0 08 ret <== NOT EXECUTED 2029364: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029694 : * 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) { 2029694: 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; 2029698: 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); 202969c: 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; 20296a0: c0 27 bf fc clr [ %fp + -4 ] vol->fd = open(mt_entry->dev, O_RDWR); 20296a4: 7f ff 81 c9 call 2009dc8 20296a8: 92 10 20 02 mov 2, %o1 20296ac: d0 27 60 54 st %o0, [ %i5 + 0x54 ] if (vol->fd < 0) 20296b0: 80 a2 20 00 cmp %o0, 0 20296b4: 06 80 01 dc bl 2029e24 <== NEVER TAKEN 20296b8: b8 10 00 18 mov %i0, %i4 { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 20296bc: 40 00 05 95 call 202ad10 20296c0: 92 07 bf a8 add %fp, -88, %o1 if (rc != 0) 20296c4: 80 a2 20 00 cmp %o0, 0 20296c8: 12 80 01 a0 bne 2029d48 <== NEVER TAKEN 20296cc: c4 07 bf b4 ld [ %fp + -76 ], %g2 close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 20296d0: 03 00 00 3c sethi %hi(0xf000), %g1 20296d4: 84 08 80 01 and %g2, %g1, %g2 20296d8: 03 00 00 18 sethi %hi(0x6000), %g1 20296dc: 80 a0 80 01 cmp %g2, %g1 20296e0: 12 80 01 9b bne 2029d4c <== NEVER TAKEN 20296e4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 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); 20296e8: 94 07 60 58 add %i5, 0x58, %o2 20296ec: 13 10 01 10 sethi %hi(0x40044000), %o1 20296f0: 7f ff 7e 15 call 2008f44 20296f4: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 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) { 20296f8: b0 92 20 00 orcc %o0, 0, %i0 20296fc: 12 80 01 93 bne 2029d48 <== NEVER TAKEN 2029700: 92 10 20 00 clr %o1 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); 2029704: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 2029708: 7f ff 73 fa call 20066f0 202970c: 94 07 bf fc add %fp, -4, %o2 if (sc != RTEMS_SUCCESSFUL) 2029710: 80 a2 20 00 cmp %o0, 0 2029714: 12 80 01 b0 bne 2029dd4 <== NEVER TAKEN 2029718: d0 07 bf fc ld [ %fp + -4 ], %o0 { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 202971c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 2029720: c4 08 60 0b ldub [ %g1 + 0xb ], %g2 2029724: c6 08 60 0c ldub [ %g1 + 0xc ], %g3 2029728: c4 2f bf a3 stb %g2, [ %fp + -93 ] 202972c: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2 2029730: c6 2f bf a4 stb %g3, [ %fp + -92 ] 2029734: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3 2029738: c4 2f bf a1 stb %g2, [ %fp + -95 ] 202973c: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2 2029740: c6 2f bf a0 stb %g3, [ %fp + -96 ] 2029744: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3 2029748: c4 2f bf 8f stb %g2, [ %fp + -113 ] 202974c: c4 08 60 27 ldub [ %g1 + 0x27 ], %g2 2029750: f2 08 60 0e ldub [ %g1 + 0xe ], %i1 2029754: c6 2f bf 9f stb %g3, [ %fp + -97 ] 2029758: c6 08 60 28 ldub [ %g1 + 0x28 ], %g3 202975c: c4 2f bf 97 stb %g2, [ %fp + -105 ] 2029760: c4 08 60 2c ldub [ %g1 + 0x2c ], %g2 2029764: f2 2f bf a2 stb %i1, [ %fp + -94 ] 2029768: c6 2f bf 87 stb %g3, [ %fp + -121 ] 202976c: c8 08 60 0f ldub [ %g1 + 0xf ], %g4 2029770: f6 08 60 0d ldub [ %g1 + 0xd ], %i3 2029774: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2 2029778: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1 202977c: e0 08 60 14 ldub [ %g1 + 0x14 ], %l0 2029780: e2 08 60 16 ldub [ %g1 + 0x16 ], %l1 2029784: e4 08 60 17 ldub [ %g1 + 0x17 ], %l2 2029788: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5 202978c: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6 2029790: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7 2029794: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3 2029798: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4 202979c: c4 2f bf 9c stb %g2, [ %fp + -100 ] 20297a0: c6 08 60 2d ldub [ %g1 + 0x2d ], %g3 20297a4: c4 08 60 2e ldub [ %g1 + 0x2e ], %g2 20297a8: c6 2f bf 9b stb %g3, [ %fp + -101 ] 20297ac: c4 2f bf 9a stb %g2, [ %fp + -102 ] 20297b0: c6 08 60 2f ldub [ %g1 + 0x2f ], %g3 20297b4: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2 20297b8: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1 20297bc: c6 2f bf 7f stb %g3, [ %fp + -129 ] sc = rtems_bdbuf_release( block); 20297c0: c8 27 bf 70 st %g4, [ %fp + -144 ] { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 20297c4: c4 2f bf 9e stb %g2, [ %fp + -98 ] sc = rtems_bdbuf_release( block); 20297c8: 7f ff 74 6f call 2006984 20297cc: c2 2f bf 9d stb %g1, [ %fp + -99 ] if (sc != RTEMS_SUCCESSFUL) 20297d0: 80 a2 20 00 cmp %o0, 0 20297d4: 12 80 01 80 bne 2029dd4 <== NEVER TAKEN 20297d8: c8 07 bf 70 ld [ %fp + -144 ], %g4 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 20297dc: c2 0f bf a4 ldub [ %fp + -92 ], %g1 20297e0: c4 0f bf a3 ldub [ %fp + -93 ], %g2 20297e4: 83 28 60 08 sll %g1, 8, %g1 20297e8: 92 10 40 02 or %g1, %g2, %o1 20297ec: d2 37 40 00 sth %o1, [ %i5 ] if ( (vol->bps != 512) && 20297f0: 93 2a 60 10 sll %o1, 0x10, %o1 20297f4: 83 32 60 10 srl %o1, 0x10, %g1 20297f8: 80 a0 64 00 cmp %g1, 0x400 20297fc: 12 80 00 c1 bne 2029b00 <== ALWAYS TAKEN 2029800: 80 a0 62 00 cmp %g1, 0x200 { 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; 2029804: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 2029808: 80 88 60 01 btst 1, %g1 202980c: 12 80 00 0a bne 2029834 <== ALWAYS TAKEN 2029810: c0 2f 60 03 clrb [ %i5 + 3 ] * 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) { 2029814: 10 80 00 03 b 2029820 <== NOT EXECUTED 2029818: 84 10 20 01 mov 1, %g2 <== 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; 202981c: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 2029820: 83 38 60 01 sra %g1, 1, %g1 <== 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; 2029824: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2029828: 02 bf ff fd be 202981c <== NOT EXECUTED 202982c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 2029830: c4 2f 60 03 stb %g2, [ %i5 + 3 ] <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2029834: c0 2f 60 02 clrb [ %i5 + 2 ] 2029838: 93 32 60 10 srl %o1, 0x10, %o1 202983c: 84 10 20 01 mov 1, %g2 2029840: 80 8a 60 01 btst 1, %o1 2029844: 02 80 00 05 be 2029858 <== ALWAYS TAKEN 2029848: 82 10 00 09 mov %o1, %g1 i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 202984c: 10 80 00 09 b 2029870 <== NOT EXECUTED 2029850: f6 2f 60 04 stb %i3, [ %i5 + 4 ] <== NOT EXECUTED 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; 2029854: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->sec_log2++); 2029858: 83 38 60 01 sra %g1, 1, %g1 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; 202985c: 80 88 60 01 btst 1, %g1 2029860: 02 bf ff fd be 2029854 2029864: 86 00 a0 01 add %g2, 1, %g3 2029868: c4 2f 60 02 stb %g2, [ %i5 + 2 ] i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 202986c: f6 2f 60 04 stb %i3, [ %i5 + 4 ] /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 2029870: b6 8e e0 ff andcc %i3, 0xff, %i3 2029874: 02 80 01 40 be 2029d74 <== NEVER TAKEN 2029878: 82 10 00 1b mov %i3, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 202987c: c0 2f 60 05 clrb [ %i5 + 5 ] 2029880: 80 8e e0 01 btst 1, %i3 2029884: 12 80 00 0b bne 20298b0 <== NEVER TAKEN 2029888: 84 10 20 00 clr %g2 202988c: 10 80 00 03 b 2029898 2029890: 84 10 20 01 mov 1, %g2 2029894: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 2029898: 83 38 60 01 sra %g1, 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 202989c: 80 88 60 01 btst 1, %g1 20298a0: 02 bf ff fd be 2029894 <== NEVER TAKEN 20298a4: 86 00 a0 01 add %g2, 1, %g3 20298a8: c4 2f 60 05 stb %g2, [ %i5 + 5 ] 20298ac: 84 08 a0 ff and %g2, 0xff, %g2 i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 20298b0: 85 2a 40 02 sll %o1, %g2, %g2 20298b4: c4 37 60 06 sth %g2, [ %i5 + 6 ] 20298b8: 83 28 a0 10 sll %g2, 0x10, %g1 20298bc: 05 00 00 20 sethi %hi(0x8000), %g2 20298c0: 83 30 60 10 srl %g1, 0x10, %g1 20298c4: 80 a0 40 02 cmp %g1, %g2 20298c8: 18 80 01 2b bgu 2029d74 <== NEVER TAKEN 20298cc: 80 88 60 01 btst 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 20298d0: c0 2f 60 08 clrb [ %i5 + 8 ] 20298d4: 02 80 00 05 be 20298e8 <== ALWAYS TAKEN 20298d8: 84 10 20 01 mov 1, %g2 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); 20298dc: 10 80 00 09 b 2029900 <== NOT EXECUTED 20298e0: c6 0f bf a2 ldub [ %fp + -94 ], %g3 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 20298e4: 84 10 00 03 mov %g3, %g2 i >>= 1, vol->bpc_log2++); 20298e8: 83 38 60 01 sra %g1, 1, %g1 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 20298ec: 80 88 60 01 btst 1, %g1 20298f0: 02 bf ff fd be 20298e4 20298f4: 86 00 a0 01 add %g2, 1, %g3 20298f8: c4 2f 60 08 stb %g2, [ %i5 + 8 ] 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); 20298fc: c6 0f bf a2 ldub [ %fp + -94 ], %g3 2029900: 88 09 20 ff and %g4, 0xff, %g4 2029904: 89 29 20 08 sll %g4, 8, %g4 2029908: 86 11 00 03 or %g4, %g3, %g3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 202990c: c4 0f bf a0 ldub [ %fp + -96 ], %g2 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 2029910: c6 27 bf a4 st %g3, [ %fp + -92 ] 2029914: c6 37 60 14 sth %g3, [ %i5 + 0x14 ] vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 2029918: c6 0f bf a1 ldub [ %fp + -95 ], %g3 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 202991c: 82 02 7f ff add %o1, -1, %g1 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); 2029920: 85 28 a0 08 sll %g2, 8, %g2 2029924: 84 10 80 03 or %g2, %g3, %g2 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029928: 87 28 a0 10 sll %g2, 0x10, %g3 202992c: 87 30 e0 0b srl %g3, 0xb, %g3 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); 2029930: c4 37 60 20 sth %g2, [ %i5 + 0x20 ] /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2029934: 90 00 c0 01 add %g3, %g1, %o0 2029938: 40 00 dc 5b call 2060aa4 <.div> 202993c: f4 2f 60 09 stb %i2, [ %i5 + 9 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029940: 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)) / 2029944: d0 27 60 24 st %o0, [ %i5 + 0x24 ] vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2029948: 85 2a 00 02 sll %o0, %g2, %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)) / 202994c: 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) 2029950: a4 0c a0 ff and %l2, 0xff, %l2 2029954: a2 0c 60 ff and %l1, 0xff, %l1 2029958: a5 2c a0 08 sll %l2, 8, %l2 202995c: a2 14 80 11 or %l2, %l1, %l1 2029960: 91 2c 60 10 sll %l1, 0x10, %o0 2029964: 80 a2 20 00 cmp %o0, 0 2029968: 02 80 00 71 be 2029b2c <== NEVER TAKEN 202996c: c4 27 60 28 st %g2, [ %i5 + 0x28 ] vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 2029970: 91 32 20 10 srl %o0, 0x10, %o0 2029974: d0 27 60 18 st %o0, [ %i5 + 0x18 ] else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2029978: c2 27 bf 74 st %g1, [ %fp + -140 ] 202997c: 7f ff 65 59 call 2002ee0 <.umul> 2029980: 92 0e a0 ff and %i2, 0xff, %o1 2029984: c2 07 bf 74 ld [ %fp + -140 ], %g1 2029988: c6 07 bf a4 ld [ %fp + -92 ], %g3 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 202998c: b2 0e 60 ff and %i1, 0xff, %i1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2029990: 85 28 e0 10 sll %g3, 0x10, %g2 2029994: 85 30 a0 10 srl %g2, 0x10, %g2 2029998: 84 02 00 02 add %o0, %g2, %g2 202999c: 82 00 80 01 add %g2, %g1, %g1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 20299a0: c4 27 60 1c st %g2, [ %i5 + 0x1c ] if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 20299a4: 90 0c 20 ff and %l0, 0xff, %o0 20299a8: 91 2a 20 08 sll %o0, 8, %o0 20299ac: 90 12 00 19 or %o0, %i1, %o0 20299b0: 91 2a 20 10 sll %o0, 0x10, %o0 20299b4: 80 a2 20 00 cmp %o0, 0 20299b8: 02 80 00 d2 be 2029d00 <== NEVER TAKEN 20299bc: c2 27 60 30 st %g1, [ %i5 + 0x30 ] vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 20299c0: 91 32 20 10 srl %o0, 0x10, %o0 20299c4: d0 27 60 2c st %o0, [ %i5 + 0x2c ] else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 20299c8: 90 22 00 01 sub %o0, %g1, %o0 20299cc: 40 00 dc 34 call 2060a9c <.udiv> 20299d0: 92 10 00 1b mov %i3, %o1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 20299d4: 80 a2 2f f4 cmp %o0, 0xff4 20299d8: 18 80 00 61 bgu 2029b5c <== NEVER TAKEN 20299dc: d0 27 60 34 st %o0, [ %i5 + 0x34 ] { vol->type = FAT_FAT12; 20299e0: 82 10 20 01 mov 1, %g1 20299e4: c2 2f 60 0a stb %g1, [ %i5 + 0xa ] vol->mask = FAT_FAT12_MASK; 20299e8: 82 10 2f ff mov 0xfff, %g1 20299ec: c2 27 60 0c st %g1, [ %i5 + 0xc ] vol->eoc_val = FAT_FAT12_EOC; 20299f0: 82 10 2f f8 mov 0xff8, %g1 20299f4: c2 27 60 10 st %g1, [ %i5 + 0x10 ] else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 20299f8: 82 10 3f ff mov -1, %g1 } } } else { vol->rdir_cl = 0; 20299fc: c0 27 60 38 clr [ %i5 + 0x38 ] vol->mirror = 0; 2029a00: c0 2f 60 48 clrb [ %i5 + 0x48 ] vol->afat = 0; 2029a04: c0 2f 60 50 clrb [ %i5 + 0x50 ] vol->free_cls = 0xFFFFFFFF; 2029a08: c2 27 60 40 st %g1, [ %i5 + 0x40 ] vol->next_cl = 0xFFFFFFFF; 2029a0c: 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); 2029a10: 7f ff fd 3f call 2028f0c 2029a14: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 2029a18: d2 07 60 18 ld [ %i5 + 0x18 ], %o1 2029a1c: 7f ff 65 31 call 2002ee0 <.umul> 2029a20: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0 2029a24: 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)); 2029a28: 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; 2029a2c: 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)); 2029a30: 90 10 20 02 mov 2, %o0 2029a34: 7f ff 7c 0d call 2008a68 2029a38: c2 27 60 4c st %g1, [ %i5 + 0x4c ] if ( fs_info->vhash == NULL ) 2029a3c: 80 a2 20 00 cmp %o0, 0 2029a40: 02 80 01 13 be 2029e8c <== NEVER TAKEN 2029a44: 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 ); 2029a48: 86 02 20 04 add %o0, 4, %g3 2029a4c: 82 02 20 0c add %o0, 0xc, %g1 2029a50: 84 02 20 10 add %o0, 0x10, %g2 head->next = tail; 2029a54: c6 22 00 00 st %g3, [ %o0 ] head->previous = NULL; 2029a58: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2029a5c: 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; 2029a60: c4 22 20 0c st %g2, [ %o0 + 0xc ] head->previous = NULL; 2029a64: c0 22 20 10 clr [ %o0 + 0x10 ] tail->previous = head; 2029a68: 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)); 2029a6c: 92 10 20 0c mov 0xc, %o1 2029a70: 7f ff 7b fe call 2008a68 2029a74: 90 10 20 02 mov 2, %o0 if ( fs_info->rhash == NULL ) 2029a78: 80 a2 20 00 cmp %o0, 0 2029a7c: 02 80 01 0d be 2029eb0 <== NEVER TAKEN 2029a80: d0 27 60 64 st %o0, [ %i5 + 0x64 ] 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 ); 2029a84: 82 02 20 0c add %o0, 0xc, %g1 2029a88: 84 02 20 04 add %o0, 4, %g2 head->next = tail; head->previous = NULL; tail->previous = head; 2029a8c: c2 22 20 14 st %g1, [ %o0 + 0x14 ] 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 ); 2029a90: 82 02 20 10 add %o0, 0x10, %g1 head->next = tail; 2029a94: c4 22 00 00 st %g2, [ %o0 ] head->previous = NULL; 2029a98: c0 22 20 04 clr [ %o0 + 4 ] tail->previous = head; 2029a9c: 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; 2029aa0: c0 22 20 10 clr [ %o0 + 0x10 ] } 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; 2029aa4: c4 07 60 2c ld [ %i5 + 0x2c ], %g2 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 2029aa8: c2 22 20 0c st %g1, [ %o0 + 0xc ] 2029aac: c2 0f 60 03 ldub [ %i5 + 3 ], %g1 fs_info->index = 0; 2029ab0: 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; 2029ab4: 83 28 80 01 sll %g2, %g1, %g1 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; 2029ab8: 84 10 21 00 mov 0x100, %g2 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2029abc: 83 28 60 04 sll %g1, 4, %g1 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; 2029ac0: c4 27 60 70 st %g2, [ %i5 + 0x70 ] fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2029ac4: c2 27 60 74 st %g1, [ %i5 + 0x74 ] fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2029ac8: 90 10 21 00 mov 0x100, %o0 2029acc: 7f ff 7b e7 call 2008a68 2029ad0: 92 10 20 01 mov 1, %o1 if ( fs_info->uino == NULL ) 2029ad4: 80 a2 20 00 cmp %o0, 0 2029ad8: 02 80 00 d9 be 2029e3c <== NEVER TAKEN 2029adc: d0 27 60 68 st %o0, [ %i5 + 0x68 ] close(vol->fd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 2029ae0: d0 17 40 00 lduh [ %i5 ], %o0 2029ae4: 7f ff 7b e1 call 2008a68 2029ae8: 92 10 20 01 mov 1, %o1 if (fs_info->sec_buf == NULL) 2029aec: 80 a2 20 00 cmp %o0, 0 2029af0: 02 80 00 aa be 2029d98 <== NEVER TAKEN 2029af4: d0 27 60 84 st %o0, [ %i5 + 0x84 ] free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 2029af8: 81 c7 e0 08 ret 2029afc: 81 e8 00 00 restore } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 2029b00: 22 bf ff 42 be,a 2029808 <== ALWAYS TAKEN 2029b04: 83 32 60 19 srl %o1, 0x19, %g1 (vol->bps != 1024) && 2029b08: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED 2029b0c: 22 bf ff 42 be,a 2029814 <== NOT EXECUTED 2029b10: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED (vol->bps != 2048) && 2029b14: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED 2029b18: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2029b1c: 12 80 00 96 bne 2029d74 <== NOT EXECUTED 2029b20: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED 2029b24: 10 bf ff 3f b 2029820 <== NOT EXECUTED 2029b28: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2029b2c: c4 0f bf 9f ldub [ %fp + -97 ], %g2 <== NOT EXECUTED 2029b30: c6 0f bf 97 ldub [ %fp + -105 ], %g3 <== NOT EXECUTED 2029b34: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED 2029b38: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED 2029b3c: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED 2029b40: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029b44: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029b48: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED 2029b4c: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED 2029b50: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029b54: 10 bf ff 89 b 2029978 <== NOT EXECUTED 2029b58: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 2029b5c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 2029b60: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <== NOT EXECUTED 2029b64: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 2029b68: 08 80 00 72 bleu 2029d30 <== NOT EXECUTED 2029b6c: 84 10 63 ff or %g1, 0x3ff, %g2 <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2029b70: c6 0f bf 87 ldub [ %fp + -121 ], %g3 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029b74: f6 0f bf 9b ldub [ %fp + -101 ], %i3 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 2029b78: 82 08 ff 80 and %g3, -128, %g1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029b7c: f4 0f bf 9c ldub [ %fp + -100 ], %i2 <== NOT EXECUTED 2029b80: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED 2029b84: f2 0f bf 7f ldub [ %fp + -129 ], %i1 <== NOT EXECUTED 2029b88: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2029b8c: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029b90: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 2029b94: 88 10 a3 ff or %g2, 0x3ff, %g4 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029b98: 86 16 c0 03 or %i3, %g3, %g3 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 2029b9c: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029ba0: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED 2029ba4: b7 2e 60 18 sll %i1, 0x18, %i3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2029ba8: b4 10 20 04 mov 4, %i2 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029bac: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 2029bb0: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 2029bb4: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2029bb8: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 2029bbc: c6 27 60 38 st %g3, [ %i5 + 0x38 ] <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 2029bc0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED 2029bc4: 02 80 00 6a be 2029d6c <== NOT EXECUTED 2029bc8: 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; 2029bcc: c4 0f bf 87 ldub [ %fp + -121 ], %g2 <== NOT EXECUTED 2029bd0: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED 2029bd4: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 2029bd8: d2 0f bf 9d ldub [ %fp + -99 ], %o1 <== NOT EXECUTED 2029bdc: c2 0f bf 9e ldub [ %fp + -98 ], %g1 <== NOT EXECUTED 2029be0: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED 2029be4: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED 2029be8: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED if( vol->info_sec == 0 ) 2029bec: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED 2029bf0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2029bf4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2029bf8: 02 80 00 5f be 2029d74 <== NOT EXECUTED 2029bfc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 2029c00: 94 10 20 00 clr %o2 <== NOT EXECUTED 2029c04: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED 2029c08: 7f ff fd 1c call 2029078 <_fat_block_read> <== NOT EXECUTED 2029c0c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 2029c10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029c14: 06 80 00 b2 bl 2029edc <== NOT EXECUTED 2029c18: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 2029c1c: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED 2029c20: c8 0f bf f2 ldub [ %fp + -14 ], %g4 <== NOT EXECUTED 2029c24: c6 0f bf f0 ldub [ %fp + -16 ], %g3 <== NOT EXECUTED 2029c28: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2029c2c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED 2029c30: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED 2029c34: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED 2029c38: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED 2029c3c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED 2029c40: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED 2029c44: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <== NOT EXECUTED 2029c48: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2029c4c: 12 80 00 6b bne 2029df8 <== NOT EXECUTED 2029c50: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 2029c54: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED 2029c58: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2029c5c: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED 2029c60: 7f ff fd 06 call 2029078 <_fat_block_read> <== NOT EXECUTED 2029c64: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 2029c68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2029c6c: 06 80 00 81 bl 2029e70 <== NOT EXECUTED 2029c70: c6 0f bf f5 ldub [ %fp + -11 ], %g3 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029c74: de 0f bf f6 ldub [ %fp + -10 ], %o7 <== NOT EXECUTED 2029c78: f2 0f bf f4 ldub [ %fp + -12 ], %i1 <== NOT EXECUTED 2029c7c: f4 0f bf f7 ldub [ %fp + -9 ], %i2 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029c80: f6 0f bf f9 ldub [ %fp + -7 ], %i3 <== NOT EXECUTED 2029c84: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED 2029c88: c8 0f bf f8 ldub [ %fp + -8 ], %g4 <== NOT EXECUTED 2029c8c: c4 0f bf fb ldub [ %fp + -5 ], %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); 2029c90: 9f 2b e0 10 sll %o7, 0x10, %o7 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029c94: 85 28 a0 18 sll %g2, 0x18, %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); 2029c98: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED 2029c9c: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED 2029ca0: 86 10 c0 0f or %g3, %o7, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029ca4: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029ca8: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029cac: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029cb0: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029cb4: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED 2029cb8: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED 2029cbc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED _fat_block_release(mt_entry); close(vol->fd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 2029cc0: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2029cc4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 2029cc8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 2029ccc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 2029cd0: 7f ff fd f9 call 20294b4 <== NOT EXECUTED 2029cd4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2029cd8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 2029cdc: 02 bf ff 4d be 2029a10 <== NOT EXECUTED 2029ce0: 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); 2029ce4: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 2029ce8: 7f ff fc 89 call 2028f0c <== NOT EXECUTED 2029cec: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); close(vol->fd); 2029cf0: 7f ff 7b 81 call 2008af4 <== NOT EXECUTED 2029cf4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return rc; 2029cf8: 81 c7 e0 08 ret <== NOT EXECUTED 2029cfc: 81 e8 00 00 restore <== NOT EXECUTED vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 2029d00: f2 0f bf 8f ldub [ %fp + -113 ], %i1 <== NOT EXECUTED 2029d04: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED 2029d08: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED 2029d0c: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED 2029d10: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED 2029d14: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED 2029d18: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED 2029d1c: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED 2029d20: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED 2029d24: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED 2029d28: 10 bf ff 28 b 20299c8 <== NOT EXECUTED 2029d2c: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 2029d30: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 2029d34: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 2029d38: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 2029d3c: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 2029d40: 10 bf ff 2e b 20299f8 <== NOT EXECUTED 2029d44: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED } /* 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) { close(vol->fd); 2029d48: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029d4c: 7f ff 7b 6a call 2008af4 <== NOT EXECUTED 2029d50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 2029d54: 40 00 75 66 call 20472ec <__errno> <== NOT EXECUTED 2029d58: 01 00 00 00 nop <== NOT EXECUTED 2029d5c: 82 10 20 06 mov 6, %g1 ! 6 <== NOT EXECUTED 2029d60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029d64: 81 c7 e0 08 ret <== NOT EXECUTED 2029d68: 81 e8 00 00 restore <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 2029d6c: 10 bf ff 9b b 2029bd8 <== NOT EXECUTED 2029d70: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 2029d74: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029d78: 7f ff 7b 5f call 2008af4 <== NOT EXECUTED 2029d7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2029d80: 40 00 75 5b call 20472ec <__errno> <== NOT EXECUTED 2029d84: 01 00 00 00 nop <== NOT EXECUTED 2029d88: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2029d8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029d90: 81 c7 e0 08 ret <== NOT EXECUTED 2029d94: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { close(vol->fd); 2029d98: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029d9c: 7f ff 7b 56 call 2008af4 <== NOT EXECUTED 2029da0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2029da4: 7f ff 7c 10 call 2008de4 <== NOT EXECUTED 2029da8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2029dac: 7f ff 7c 0e call 2008de4 <== NOT EXECUTED 2029db0: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED free(fs_info->uino); 2029db4: 7f ff 7c 0c call 2008de4 <== NOT EXECUTED 2029db8: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2029dbc: 40 00 75 4c call 20472ec <__errno> <== NOT EXECUTED 2029dc0: 01 00 00 00 nop <== NOT EXECUTED 2029dc4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2029dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return RC_OK; } 2029dcc: 81 c7 e0 08 ret <== NOT EXECUTED 2029dd0: 81 e8 00 00 restore <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 2029dd4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029dd8: 7f ff 7b 47 call 2008af4 <== NOT EXECUTED 2029ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 2029de0: 40 00 75 43 call 20472ec <__errno> <== NOT EXECUTED 2029de4: 01 00 00 00 nop <== NOT EXECUTED 2029de8: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2029dec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029df0: 81 c7 e0 08 ret <== NOT EXECUTED 2029df4: 81 e8 00 00 restore <== 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); 2029df8: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 2029dfc: 7f ff fc 44 call 2028f0c <== NOT EXECUTED 2029e00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); close(vol->fd); 2029e04: 7f ff 7b 3c call 2008af4 <== NOT EXECUTED 2029e08: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2029e0c: 40 00 75 38 call 20472ec <__errno> <== NOT EXECUTED 2029e10: 01 00 00 00 nop <== NOT EXECUTED 2029e14: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2029e18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029e1c: 81 c7 e0 08 ret <== NOT EXECUTED 2029e20: 81 e8 00 00 restore <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; vol->fd = open(mt_entry->dev, O_RDWR); if (vol->fd < 0) { rtems_set_errno_and_return_minus_one(ENXIO); 2029e24: 40 00 75 32 call 20472ec <__errno> <== NOT EXECUTED 2029e28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2029e2c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 2029e30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029e34: 81 c7 e0 08 ret <== NOT EXECUTED 2029e38: 81 e8 00 00 restore <== 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); 2029e3c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029e40: 7f ff 7b 2d call 2008af4 <== NOT EXECUTED 2029e44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2029e48: 7f ff 7b e7 call 2008de4 <== NOT EXECUTED 2029e4c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED free(fs_info->rhash); 2029e50: 7f ff 7b e5 call 2008de4 <== NOT EXECUTED 2029e54: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2029e58: 40 00 75 25 call 20472ec <__errno> <== NOT EXECUTED 2029e5c: 01 00 00 00 nop <== NOT EXECUTED 2029e60: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2029e64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029e68: 81 c7 e0 08 ret <== NOT EXECUTED 2029e6c: 81 e8 00 00 restore <== 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); 2029e70: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED 2029e74: 7f ff fc 26 call 2028f0c <== NOT EXECUTED 2029e78: b0 10 3f ff mov -1, %i0 <== 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); 2029e7c: 7f ff 7b 1e call 2008af4 <== NOT EXECUTED 2029e80: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED return -1; 2029e84: 81 c7 e0 08 ret <== NOT EXECUTED 2029e88: 81 e8 00 00 restore <== 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); 2029e8c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029e90: 7f ff 7b 19 call 2008af4 <== NOT EXECUTED 2029e94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2029e98: 40 00 75 15 call 20472ec <__errno> <== NOT EXECUTED 2029e9c: 01 00 00 00 nop <== NOT EXECUTED 2029ea0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2029ea4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029ea8: 81 c7 e0 08 ret <== NOT EXECUTED 2029eac: 81 e8 00 00 restore <== 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); 2029eb0: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029eb4: 7f ff 7b 10 call 2008af4 <== NOT EXECUTED 2029eb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED free(fs_info->vhash); 2029ebc: 7f ff 7b ca call 2008de4 <== NOT EXECUTED 2029ec0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 2029ec4: 40 00 75 0a call 20472ec <__errno> <== NOT EXECUTED 2029ec8: 01 00 00 00 nop <== NOT EXECUTED 2029ecc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2029ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2029ed4: 81 c7 e0 08 ret <== NOT EXECUTED 2029ed8: 81 e8 00 00 restore <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { close(vol->fd); 2029edc: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED 2029ee0: 7f ff 7b 05 call 2008af4 <== NOT EXECUTED 2029ee4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; 2029ee8: 81 c7 e0 08 ret <== NOT EXECUTED 2029eec: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02042fbc : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2042fbc: 9d e3 bf 98 save %sp, -104, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2042fc0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 uint32_t cl4find = 2; uint32_t next_cln = 0; 2042fc4: c0 27 bf fc clr [ %fp + -4 ] uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 2042fc8: e6 04 20 34 ld [ %l0 + 0x34 ], %l3 uint32_t i = 2; *cls_added = 0; 2042fcc: c0 26 c0 00 clr [ %i3 ] uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 2042fd0: ba 10 00 18 mov %i0, %i5 uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 2042fd4: 80 a6 a0 00 cmp %i2, 0 2042fd8: 02 80 00 46 be 20430f0 <== NEVER TAKEN 2042fdc: b0 10 20 00 clr %i0 return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 2042fe0: e2 04 20 44 ld [ %l0 + 0x44 ], %l1 2042fe4: 80 a4 7f ff cmp %l1, -1 2042fe8: 22 80 00 02 be,a 2042ff0 2042fec: a2 10 20 02 mov 2, %l1 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; 2042ff0: a6 04 e0 02 add %l3, 2, %l3 /* * 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) 2042ff4: 80 a4 e0 02 cmp %l3, 2 2042ff8: 08 80 00 40 bleu 20430f8 <== NEVER TAKEN 2042ffc: a4 10 20 02 mov 2, %l2 2043000: 10 80 00 17 b 204305c 2043004: a8 10 20 00 clr %l4 * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2043008: 90 10 00 1d mov %i5, %o0 204300c: 92 10 00 11 mov %l1, %o1 2043010: 7f ff fe f0 call 2042bd0 2043014: 94 10 3f ff mov -1, %o2 if ( rc != RC_OK ) 2043018: 80 a2 20 00 cmp %o0, 0 204301c: 32 80 00 35 bne,a 20430f0 <== NEVER TAKEN 2043020: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 2043024: c2 06 c0 00 ld [ %i3 ], %g1 2043028: 82 00 60 01 inc %g1 /* have we satisfied request ? */ if (*cls_added == count) 204302c: 80 a6 80 01 cmp %i2, %g1 2043030: 02 80 00 49 be 2043154 <== ALWAYS TAKEN 2043034: c2 26 c0 00 st %g1, [ %i3 ] 2043038: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 204303c: a2 04 60 01 inc %l1 <== NOT EXECUTED if (cl4find >= data_cls_val) 2043040: 80 a4 c0 11 cmp %l3, %l1 2043044: 18 80 00 03 bgu 2043050 <== ALWAYS TAKEN 2043048: a4 04 a0 01 inc %l2 cl4find = 2; 204304c: a2 10 20 02 mov 2, %l1 <== 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) 2043050: 80 a4 c0 12 cmp %l3, %l2 2043054: 28 80 00 2b bleu,a 2043100 <== NEVER TAKEN 2043058: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 204305c: 90 10 00 1d mov %i5, %o0 2043060: 92 10 00 11 mov %l1, %o1 2043064: 7f ff fe 53 call 20429b0 2043068: 94 07 bf fc add %fp, -4, %o2 if ( rc != RC_OK ) 204306c: b0 92 20 00 orcc %o0, 0, %i0 2043070: 12 80 00 30 bne 2043130 <== NEVER TAKEN 2043074: c2 07 bf fc ld [ %fp + -4 ], %g1 if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 2043078: 80 a0 60 00 cmp %g1, 0 204307c: 32 bf ff f1 bne,a 2043040 2043080: a2 04 60 01 inc %l1 /* * 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) 2043084: c2 06 c0 00 ld [ %i3 ], %g1 2043088: 80 a0 60 00 cmp %g1, 0 204308c: 22 bf ff df be,a 2043008 <== ALWAYS TAKEN 2043090: e2 26 40 00 st %l1, [ %i1 ] } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 2043094: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2043098: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 204309c: 7f ff fe cd call 2042bd0 <== NOT EXECUTED 20430a0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20430a4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 20430a8: 12 80 00 37 bne 2043184 <== NOT EXECUTED 20430ac: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 20430b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20430b4: 7f ff fe c7 call 2042bd0 <== NOT EXECUTED 20430b8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED if ( rc != RC_OK ) 20430bc: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED 20430c0: 22 bf ff da be,a 2043028 <== NOT EXECUTED 20430c4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 20430c8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 20430cc: 7f ff ff 83 call 2042ed8 <== NOT EXECUTED 20430d0: 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); 20430d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 20430d8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 20430dc: 7f ff fe bd call 2042bd0 <== NOT EXECUTED 20430e0: 94 10 20 00 clr %o2 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 20430e4: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); 20430e8: 7f ff 97 89 call 2028f0c <== NOT EXECUTED 20430ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return rc; 20430f0: 81 c7 e0 08 ret <== NOT EXECUTED 20430f4: 81 e8 00 00 restore <== 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) 20430f8: a8 10 20 00 clr %l4 <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 20430fc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED 2043100: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED 2043104: 02 80 00 05 be 2043118 <== NOT EXECUTED 2043108: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 204310c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2043110: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 2043114: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2043118: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED fat_buf_release(fs_info); 204311c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2043120: 7f ff 97 7b call 2028f0c <== NOT EXECUTED 2043124: b0 10 20 00 clr %i0 <== NOT EXECUTED return RC_OK; 2043128: 81 c7 e0 08 ret <== NOT EXECUTED 204312c: 81 e8 00 00 restore <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 2043130: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 2043134: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2043138: 02 80 00 17 be 2043194 <== NOT EXECUTED 204313c: 01 00 00 00 nop <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 2043140: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2043144: 7f ff ff 65 call 2042ed8 <== NOT EXECUTED 2043148: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 204314c: 81 c7 e0 08 ret <== NOT EXECUTED 2043150: 81 e8 00 00 restore <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 2043154: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 2043158: 80 a0 7f ff cmp %g1, -1 204315c: 02 80 00 05 be 2043170 <== ALWAYS TAKEN 2043160: e2 24 20 44 st %l1, [ %l0 + 0x44 ] fs_info->vol.free_cls -= (*cls_added); 2043164: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED 2043168: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 204316c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED *last_cl = save_cln; 2043170: e2 27 00 00 st %l1, [ %i4 ] fat_buf_release(fs_info); 2043174: 7f ff 97 66 call 2028f0c 2043178: 90 10 00 10 mov %l0, %o0 return rc; 204317c: 81 c7 e0 08 ret 2043180: 81 e8 00 00 restore /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 2043184: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED 2043188: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 204318c: 7f ff ff 53 call 2042ed8 <== NOT EXECUTED 2043190: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED return rc; 2043194: 81 c7 e0 08 ret <== NOT EXECUTED 2043198: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02042bd0 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 2042bd0: 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; 2042bd4: c0 27 bf fc clr [ %fp + -4 ] /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 2042bd8: 80 a6 60 01 cmp %i1, 1 2042bdc: 08 80 00 90 bleu 2042e1c <== NEVER TAKEN 2042be0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 2042be4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 2042be8: 82 00 60 01 inc %g1 2042bec: 80 a6 40 01 cmp %i1, %g1 2042bf0: 18 80 00 8b bgu 2042e1c <== NEVER TAKEN 2042bf4: 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) + 2042bf8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2042bfc: 80 88 60 01 btst 1, %g1 2042c00: 12 80 00 22 bne 2042c88 <== ALWAYS TAKEN 2042c04: e0 0f 60 02 ldub [ %i5 + 2 ], %l0 2042c08: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2042c0c: 02 80 00 25 be 2042ca0 <== NOT EXECUTED 2042c10: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED 2042c14: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED 2042c18: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 2042c1c: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 2042c20: e2 17 40 00 lduh [ %i5 ], %l1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 2042c24: 90 10 00 1d mov %i5, %o0 2042c28: 92 10 00 10 mov %l0, %o1 2042c2c: 94 10 20 01 mov 1, %o2 2042c30: 7f ff 98 31 call 2028cf4 2042c34: 96 07 bf fc add %fp, -4, %o3 if (rc != RC_OK) 2042c38: b0 92 20 00 orcc %o0, 0, %i0 2042c3c: 12 80 00 11 bne 2042c80 <== NEVER TAKEN 2042c40: a3 2c 60 10 sll %l1, 0x10, %l1 return rc; switch ( fs_info->vol.type ) 2042c44: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3 2042c48: 80 a6 e0 02 cmp %i3, 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); 2042c4c: a3 34 60 10 srl %l1, 0x10, %l1 2042c50: a2 04 7f ff add %l1, -1, %l1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 2042c54: 02 80 00 17 be 2042cb0 <== NEVER TAKEN 2042c58: b8 0f 00 11 and %i4, %l1, %i4 2042c5c: 80 a6 e0 04 cmp %i3, 4 2042c60: 02 80 00 3d be 2042d54 <== NEVER TAKEN 2042c64: 80 a6 e0 01 cmp %i3, 1 2042c68: 02 80 00 1d be 2042cdc <== ALWAYS TAKEN 2042c6c: 80 8e 60 01 btst 1, %i1 fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 2042c70: 40 00 11 9f call 20472ec <__errno> <== NOT EXECUTED 2042c74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2042c78: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2042c7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return RC_OK; } 2042c80: 81 c7 e0 08 ret <== NOT EXECUTED 2042c84: 81 e8 00 00 restore <== NOT EXECUTED /* 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) + 2042c88: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 2042c8c: b9 36 60 01 srl %i1, 1, %i4 2042c90: b8 07 00 19 add %i4, %i1, %i4 2042c94: a1 37 00 10 srl %i4, %l0, %l0 2042c98: 10 bf ff e2 b 2042c20 2042c9c: a0 04 00 01 add %l0, %g1, %l0 2042ca0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED 2042ca4: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED 2042ca8: 10 bf ff de b 2042c20 <== NOT EXECUTED 2042cac: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2042cb0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2042cb4: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2042cb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 2042cbc: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED 2042cc0: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED 2042cc4: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 2042cc8: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 2042ccc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2042cd0: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 2042cd4: 81 c7 e0 08 ret <== NOT EXECUTED 2042cd8: 81 e8 00 00 restore <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 2042cdc: 02 80 00 35 be 2042db0 2042ce0: 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)) = 2042ce4: 85 2e a0 04 sll %i2, 4, %g2 case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 2042ce8: 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)) = 2042cec: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 2042cf0: 86 08 e0 0f and %g3, 0xf, %g3 2042cf4: c6 28 40 1c stb %g3, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2042cf8: c2 07 bf fc ld [ %fp + -4 ], %g1 2042cfc: 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)) = 2042d00: c6 08 40 1c ldub [ %g1 + %i4 ], %g3 2042d04: 84 10 c0 02 or %g3, %g2, %g2 2042d08: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2042d0c: c2 17 40 00 lduh [ %i5 ], %g1 2042d10: 82 00 7f ff add %g1, -1, %g1 2042d14: 80 a0 40 1c cmp %g1, %i4 2042d18: 02 80 00 5c be 2042e88 <== NEVER TAKEN 2042d1c: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2042d20: c2 07 bf fc ld [ %fp + -4 ], %g1 2042d24: b8 07 20 01 inc %i4 2042d28: 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); 2042d2c: b5 2e a0 14 sll %i2, 0x14, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 2042d30: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 2042d34: c2 07 bf fc ld [ %fp + -4 ], %g1 (uint8_t )((fat16_clv & 0xFF00)>>8); 2042d38: 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))) | 2042d3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 2042d40: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2042d44: 84 10 80 1a or %g2, %i2, %g2 2042d48: c4 28 40 1c stb %g2, [ %g1 + %i4 ] 2042d4c: 81 c7 e0 08 ret 2042d50: 81 e8 00 00 restore case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2042d54: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2042d58: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== 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)); 2042d5c: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2042d60: c6 00 80 1c ld [ %g2 + %i4 ], %g3 <== 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)); 2042d64: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 2042d68: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2042d6c: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042d70: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 2042d74: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042d78: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED 2042d7c: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 2042d80: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 2042d84: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED 2042d88: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 2042d8c: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED 2042d90: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED 2042d94: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 2042d98: 82 10 40 03 or %g1, %g3, %g1 <== 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)) = 2042d9c: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED 2042da0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2042da4: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED 2042da8: 81 c7 e0 08 ret <== NOT EXECUTED 2042dac: 81 e8 00 00 restore <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 2042db0: b4 0e af ff and %i2, 0xfff, %i2 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 2042db4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2042db8: c0 28 40 1c clrb [ %g1 + %i4 ] *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 2042dbc: c2 07 bf fc ld [ %fp + -4 ], %g1 2042dc0: 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)) = 2042dc4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2042dc8: 84 16 80 02 or %i2, %g2, %g2 2042dcc: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 2042dd0: c2 17 40 00 lduh [ %i5 ], %g1 2042dd4: 82 00 7f ff add %g1, -1, %g1 2042dd8: 80 a0 40 1c cmp %g1, %i4 2042ddc: 02 80 00 16 be 2042e34 <== NEVER TAKEN 2042de0: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 2042de4: c2 07 bf fc ld [ %fp + -4 ], %g1 2042de8: b8 07 20 01 inc %i4 2042dec: 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); 2042df0: b5 36 a0 08 srl %i2, 8, %i2 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 2042df4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2042df8: 84 08 bf f0 and %g2, -16, %g2 2042dfc: c4 28 40 1c stb %g2, [ %g1 + %i4 ] (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 2042e00: c2 07 bf fc ld [ %fp + -4 ], %g1 2042e04: 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)) = 2042e08: c4 08 40 1c ldub [ %g1 + %i4 ], %g2 2042e0c: b4 10 80 1a or %g2, %i2, %i2 2042e10: f4 28 40 1c stb %i2, [ %g1 + %i4 ] 2042e14: 81 c7 e0 08 ret 2042e18: 81 e8 00 00 restore uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 2042e1c: 40 00 11 34 call 20472ec <__errno> <== NOT EXECUTED 2042e20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2042e24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2042e28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2042e2c: 81 c7 e0 08 ret <== NOT EXECUTED 2042e30: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2042e34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2042e38: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 2042e3c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2042e40: 7f ff 97 ad call 2028cf4 <== NOT EXECUTED 2042e44: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2042e48: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2042e4c: 12 bf ff 8d bne 2042c80 <== NOT EXECUTED 2042e50: 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); 2042e54: 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; 2042e58: 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)) = 2042e5c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2042e60: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED 2042e64: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2042e68: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2042e6c: 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)) = 2042e70: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2042e74: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED 2042e78: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 2042e7c: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED 2042e80: 81 c7 e0 08 ret <== NOT EXECUTED 2042e84: 81 e8 00 00 restore <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 2042e88: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 2042e8c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED 2042e90: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2042e94: 7f ff 97 98 call 2028cf4 <== NOT EXECUTED 2042e98: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED &block0); if (rc != RC_OK) 2042e9c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2042ea0: 12 bf ff 78 bne 2042c80 <== NOT EXECUTED 2042ea4: 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); 2042ea8: 87 2e a0 14 sll %i2, 0x14, %g3 <== 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; 2042eac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 2042eb0: 87 30 e0 18 srl %g3, 0x18, %g3 <== 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; 2042eb4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 2042eb8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED 2042ebc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 2042ec0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED 2042ec4: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED 2042ec8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED 2042ecc: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED 2042ed0: 81 c7 e0 08 ret <== NOT EXECUTED 2042ed4: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 02029574 : * 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) { 2029574: 9d e3 bf a0 save %sp, -96, %sp int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 2029578: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 int i = 0; if (fs_info->vol.type & FAT_FAT32) 202957c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 2029580: 80 88 60 04 btst 4, %g1 2029584: 12 80 00 3a bne 202966c <== NEVER TAKEN 2029588: b4 10 20 00 clr %i2 fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 202958c: 7f ff fe 60 call 2028f0c 2029590: 90 10 00 1d mov %i5, %o0 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 2029594: 7f ff 75 ab call 2006c40 2029598: d0 07 60 58 ld [ %i5 + 0x58 ], %o0 202959c: 80 a2 20 00 cmp %o0, 0 20295a0: 32 80 00 3b bne,a 202968c <== NEVER TAKEN 20295a4: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED rc = -1; 20295a8: 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; 20295ac: f8 07 60 60 ld [ %i5 + 0x60 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20295b0: 10 80 00 04 b 20295c0 20295b4: b8 07 00 1b add %i4, %i3, %i4 free(node); 20295b8: 7f ff 7e 0b call 2008de4 <== NOT EXECUTED 20295bc: 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 ); 20295c0: 7f ff 94 dc call 200e930 <_Chain_Get> 20295c4: 90 10 00 1c mov %i4, %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 ) 20295c8: 80 a2 20 00 cmp %o0, 0 20295cc: 12 bf ff fb bne 20295b8 <== NEVER TAKEN 20295d0: 01 00 00 00 nop 20295d4: 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++) 20295d8: 80 a6 e0 18 cmp %i3, 0x18 20295dc: 32 bf ff f5 bne,a 20295b0 20295e0: f8 07 60 60 ld [ %i5 + 0x60 ], %i4 20295e4: 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; 20295e8: f8 07 60 64 ld [ %i5 + 0x64 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) 20295ec: 10 80 00 04 b 20295fc 20295f0: b8 07 00 1b add %i4, %i3, %i4 free(node); 20295f4: 7f ff 7d fc call 2008de4 <== NOT EXECUTED 20295f8: 01 00 00 00 nop <== NOT EXECUTED 20295fc: 7f ff 94 cd call 200e930 <_Chain_Get> 2029600: 90 10 00 1c mov %i4, %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 ) 2029604: 80 a2 20 00 cmp %o0, 0 2029608: 12 bf ff fb bne 20295f4 <== NEVER TAKEN 202960c: 01 00 00 00 nop 2029610: 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++) 2029614: 80 a6 e0 18 cmp %i3, 0x18 2029618: 32 bf ff f5 bne,a 20295ec 202961c: f8 07 60 64 ld [ %i5 + 0x64 ], %i4 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 2029620: 7f ff 7d f1 call 2008de4 2029624: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 free(fs_info->rhash); 2029628: 7f ff 7d ef call 2008de4 202962c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 free(fs_info->uino); 2029630: 7f ff 7d ed call 2008de4 2029634: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 free(fs_info->sec_buf); 2029638: 7f ff 7d eb call 2008de4 202963c: d0 07 60 84 ld [ %i5 + 0x84 ], %o0 close(fs_info->vol.fd); 2029640: 7f ff 7d 2d call 2008af4 2029644: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 if (rc) 2029648: 80 a6 a0 00 cmp %i2, 0 202964c: 02 80 00 06 be 2029664 <== ALWAYS TAKEN 2029650: 01 00 00 00 nop errno = EIO; 2029654: 40 00 77 26 call 20472ec <__errno> <== NOT EXECUTED 2029658: 01 00 00 00 nop <== NOT EXECUTED 202965c: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 2029660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return rc; } 2029664: 81 c7 e0 08 ret 2029668: 91 e8 00 1a restore %g0, %i2, %o0 fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 202966c: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED 2029670: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED 2029674: 7f ff ff 90 call 20294b4 <== NOT EXECUTED 2029678: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 202967c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED 2029680: 32 bf ff c3 bne,a 202958c <== NOT EXECUTED 2029684: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED 2029688: 30 bf ff c1 b,a 202958c <== NOT EXECUTED } fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; 202968c: 10 bf ff c8 b 20295ac <== NOT EXECUTED 2029690: b6 10 20 00 clr %i3 <== NOT EXECUTED =============================================================================== 02043384 : #include #include int fchdir( int fd ) { 2043384: 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 ); 2043388: 03 00 81 bf sethi %hi(0x206fc00), %g1 204338c: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 2043390: c0 27 bf a4 clr [ %fp + -92 ] st.st_uid = 0; 2043394: c0 37 bf aa clrh [ %fp + -86 ] st.st_gid = 0; rtems_libio_check_fd( fd ); 2043398: 80 a6 00 01 cmp %i0, %g1 204339c: 1a 80 00 3a bcc 2043484 20433a0: c0 37 bf ac clrh [ %fp + -84 ] iop = rtems_libio_iop( fd ); 20433a4: 03 00 81 cf sethi %hi(0x2073c00), %g1 20433a8: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 20433ac: 83 2e 20 03 sll %i0, 3, %g1 20433b0: b1 2e 20 06 sll %i0, 6, %i0 20433b4: b0 00 40 18 add %g1, %i0, %i0 20433b8: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open( iop ); 20433bc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 20433c0: 80 88 61 00 btst 0x100, %g1 20433c4: 02 80 00 30 be 2043484 20433c8: 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 ); 20433cc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 20433d0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 20433d4: c2 00 40 00 ld [ %g1 ], %g1 20433d8: 9f c0 40 00 call %g1 20433dc: b8 07 60 1c add %i5, 0x1c, %i4 rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 20433e0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 20433e4: 90 10 00 1c mov %i4, %o0 20433e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 20433ec: 9f c0 40 00 call %g1 20433f0: 92 07 bf 98 add %fp, -104, %o1 if ( rv == 0 ) { 20433f4: b0 92 20 00 orcc %o0, 0, %i0 20433f8: 02 80 00 08 be 2043418 <== ALWAYS TAKEN 20433fc: d2 07 bf a4 ld [ %fp + -92 ], %o1 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 2043400: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED 2043404: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2043408: 9f c0 40 00 call %g1 <== NOT EXECUTED 204340c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 2043410: 81 c7 e0 08 ret <== NOT EXECUTED 2043414: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); if ( rv == 0 ) { bool access_ok = rtems_filesystem_check_access( 2043418: d4 17 bf aa lduh [ %fp + -86 ], %o2 204341c: d6 17 bf ac lduh [ %fp + -84 ], %o3 2043420: 7f ff a4 0d call 202c454 2043424: 90 10 20 01 mov 1, %o0 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 2043428: 80 8a 20 ff btst 0xff, %o0 204342c: 02 80 00 0c be 204345c 2043430: 92 10 00 1c mov %i4, %o1 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 2043434: 7f ff 9d b6 call 202ab0c 2043438: 90 07 bf e4 add %fp, -28, %o0 204343c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043440: c2 00 60 04 ld [ %g1 + 4 ], %g1 2043444: 9f c0 40 00 call %g1 2043448: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 204344c: 7f ff 9d 2b call 202a8f8 2043450: 90 07 bf e4 add %fp, -28, %o0 2043454: 81 c7 e0 08 ret 2043458: 91 e8 00 08 restore %g0, %o0, %o0 ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 204345c: 40 00 0f a4 call 20472ec <__errno> 2043460: b0 10 3f ff mov -1, %i0 2043464: 82 10 20 0d mov 0xd, %g1 2043468: c2 22 00 00 st %g1, [ %o0 ] 204346c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043470: c2 00 60 04 ld [ %g1 + 4 ], %g1 2043474: 9f c0 40 00 call %g1 2043478: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 204347c: 81 c7 e0 08 ret 2043480: 81 e8 00 00 restore st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 2043484: 40 00 0f 9a call 20472ec <__errno> 2043488: b0 10 3f ff mov -1, %i0 204348c: 82 10 20 09 mov 9, %g1 2043490: c2 22 00 00 st %g1, [ %o0 ] 2043494: 81 c7 e0 08 ret 2043498: 81 e8 00 00 restore =============================================================================== 0202ab50 : #include #include int fchmod( int fd, mode_t mode ) { 202ab50: 9d e3 bf a0 save %sp, -96, %sp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202ab54: 03 00 81 bf sethi %hi(0x206fc00), %g1 202ab58: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 202ab5c: 80 a6 00 01 cmp %i0, %g1 202ab60: 1a 80 00 26 bcc 202abf8 202ab64: 03 00 81 cf sethi %hi(0x2073c00), %g1 iop = rtems_libio_iop( fd ); 202ab68: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 202ab6c: 83 2e 20 03 sll %i0, 3, %g1 202ab70: b1 2e 20 06 sll %i0, 6, %i0 202ab74: b0 00 40 18 add %g1, %i0, %i0 202ab78: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202ab7c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 202ab80: 80 88 61 00 btst 0x100, %g1 202ab84: 02 80 00 1d be 202abf8 202ab88: 01 00 00 00 nop if (iop->pathinfo.mt_entry->writeable) { 202ab8c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202ab90: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 202ab94: 80 a0 60 00 cmp %g1, 0 202ab98: 02 80 00 12 be 202abe0 <== NEVER TAKEN 202ab9c: 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 ); 202aba0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202aba4: c2 00 40 00 ld [ %g1 ], %g1 202aba8: 9f c0 40 00 call %g1 202abac: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->fchmod_h)( &iop->pathinfo, mode ); 202abb0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202abb4: 90 07 60 1c add %i5, 0x1c, %o0 202abb8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 202abbc: 9f c0 40 00 call %g1 202abc0: 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 ); 202abc4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202abc8: b0 10 00 08 mov %o0, %i0 202abcc: c2 00 60 04 ld [ %g1 + 4 ], %g1 202abd0: 9f c0 40 00 call %g1 202abd4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202abd8: 81 c7 e0 08 ret 202abdc: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 202abe0: 40 00 71 c3 call 20472ec <__errno> <== NOT EXECUTED 202abe4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202abe8: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 202abec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 202abf0: 81 c7 e0 08 ret <== NOT EXECUTED 202abf4: 81 e8 00 00 restore <== NOT EXECUTED int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202abf8: 40 00 71 bd call 20472ec <__errno> 202abfc: b0 10 3f ff mov -1, %i0 202ac00: 82 10 20 09 mov 9, %g1 202ac04: c2 22 00 00 st %g1, [ %o0 ] 202ac08: 81 c7 e0 08 ret 202ac0c: 81 e8 00 00 restore =============================================================================== 0202ac10 : #include #include int fchown( int fd, uid_t owner, gid_t group ) { 202ac10: 9d e3 bf a0 save %sp, -96, %sp int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202ac14: 03 00 81 bf sethi %hi(0x206fc00), %g1 202ac18: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 202ac1c: 80 a6 00 01 cmp %i0, %g1 202ac20: 1a 80 00 27 bcc 202acbc 202ac24: 03 00 81 cf sethi %hi(0x2073c00), %g1 iop = rtems_libio_iop( fd ); 202ac28: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 202ac2c: 83 2e 20 03 sll %i0, 3, %g1 202ac30: b1 2e 20 06 sll %i0, 6, %i0 202ac34: b0 00 40 18 add %g1, %i0, %i0 202ac38: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 202ac3c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 202ac40: 80 88 61 00 btst 0x100, %g1 202ac44: 02 80 00 1e be 202acbc 202ac48: 01 00 00 00 nop if (iop->pathinfo.mt_entry->writeable) { 202ac4c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202ac50: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1 202ac54: 80 a0 60 00 cmp %g1, 0 202ac58: 02 80 00 13 be 202aca4 <== NEVER TAKEN 202ac5c: 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 ); 202ac60: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202ac64: c2 00 40 00 ld [ %g1 ], %g1 202ac68: 9f c0 40 00 call %g1 202ac6c: 01 00 00 00 nop rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 202ac70: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202ac74: 90 07 60 1c add %i5, 0x1c, %o0 202ac78: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 202ac7c: 92 10 00 19 mov %i1, %o1 202ac80: 9f c0 40 00 call %g1 202ac84: 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 ); 202ac88: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202ac8c: b0 10 00 08 mov %o0, %i0 202ac90: c2 00 60 04 ld [ %g1 + 4 ], %g1 202ac94: 9f c0 40 00 call %g1 202ac98: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 202ac9c: 81 c7 e0 08 ret 202aca0: 81 e8 00 00 restore rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 202aca4: 40 00 71 92 call 20472ec <__errno> <== NOT EXECUTED 202aca8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202acac: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED 202acb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rv = -1; } return rv; } 202acb4: 81 c7 e0 08 ret <== NOT EXECUTED 202acb8: 81 e8 00 00 restore <== NOT EXECUTED int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 202acbc: 40 00 71 8c call 20472ec <__errno> 202acc0: b0 10 3f ff mov -1, %i0 202acc4: 82 10 20 09 mov 9, %g1 202acc8: c2 22 00 00 st %g1, [ %o0 ] 202accc: 81 c7 e0 08 ret 202acd0: 81 e8 00 00 restore =============================================================================== 020434c4 : int fcntl( int fd, int cmd, ... ) { 20434c4: 9d e3 bf 98 save %sp, -104, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 20434c8: 03 00 81 bf sethi %hi(0x206fc00), %g1 20434cc: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 206fce0 ... ) { int ret; va_list ap; va_start( ap, cmd ); 20434d0: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 20434d4: 82 07 a0 4c add %fp, 0x4c, %g1 20434d8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20434dc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20434e0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 20434e4: 80 a6 00 02 cmp %i0, %g2 20434e8: 1a 80 00 7c bcc 20436d8 20434ec: c2 27 bf fc st %g1, [ %fp + -4 ] iop = rtems_libio_iop( fd ); 20434f0: 39 00 81 cf sethi %hi(0x2073c00), %i4 20434f4: fa 07 21 f0 ld [ %i4 + 0x1f0 ], %i5 ! 2073df0 20434f8: 85 2e 20 03 sll %i0, 3, %g2 20434fc: b1 2e 20 06 sll %i0, 6, %i0 2043500: b0 00 80 18 add %g2, %i0, %i0 2043504: ba 07 40 18 add %i5, %i0, %i5 rtems_libio_check_is_open(iop); 2043508: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 204350c: 80 8a 21 00 btst 0x100, %o0 2043510: 02 80 00 72 be 20436d8 2043514: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2043518: 08 80 00 08 bleu 2043538 204351c: 85 2e 60 02 sll %i1, 2, %g2 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 2043520: 40 00 0f 73 call 20472ec <__errno> 2043524: b0 10 3f ff mov -1, %i0 2043528: 82 10 20 16 mov 0x16, %g1 204352c: c2 22 00 00 st %g1, [ %o0 ] 2043530: 81 c7 e0 08 ret 2043534: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2043538: 07 00 81 0d sethi %hi(0x2043400), %g3 204353c: 86 10 e0 9c or %g3, 0x9c, %g3 ! 204349c 2043540: c4 00 c0 02 ld [ %g3 + %g2 ], %g2 2043544: 81 c0 80 00 jmp %g2 2043548: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 204354c: 40 00 0f 68 call 20472ec <__errno> 2043550: b0 10 3f ff mov -1, %i0 ! ffffffff 2043554: 82 10 20 86 mov 0x86, %g1 2043558: c2 22 00 00 st %g1, [ %o0 ] 204355c: 81 c7 e0 08 ret 2043560: 81 e8 00 00 restore case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2043564: d0 00 40 00 ld [ %g1 ], %o0 2043568: 7f ff 16 ce call 20090a0 204356c: b0 10 20 00 clr %i0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2043570: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 2043574: 90 0a 22 01 and %o0, 0x201, %o0 2043578: 82 08 7d fe and %g1, -514, %g1 204357c: 82 12 00 01 or %o0, %g1, %g1 2043580: c2 27 60 18 st %g1, [ %i5 + 0x18 ] * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 2043584: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 2043588: 90 10 00 1d mov %i5, %o0 204358c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 2043590: 9f c0 40 00 call %g1 2043594: 92 10 00 19 mov %i1, %o1 if (err) { 2043598: ba 92 20 00 orcc %o0, 0, %i5 204359c: 12 80 00 04 bne 20435ac <== NEVER TAKEN 20435a0: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 20435a4: 81 c7 e0 08 ret 20435a8: 81 e8 00 00 restore */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 20435ac: 40 00 0f 50 call 20472ec <__errno> <== NOT EXECUTED 20435b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20435b4: 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; } 20435b8: 81 c7 e0 08 ret <== NOT EXECUTED 20435bc: 81 e8 00 00 restore <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 20435c0: 7f ff 16 c5 call 20090d4 20435c4: 01 00 00 00 nop 20435c8: b0 10 00 08 mov %o0, %i0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 20435cc: 80 a6 20 00 cmp %i0, 0 20435d0: 36 bf ff ee bge,a 2043588 <== ALWAYS TAKEN 20435d4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 20435d8: 81 c7 e0 08 ret <== NOT EXECUTED 20435dc: 81 e8 00 00 restore <== NOT EXECUTED * 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 ) ) 20435e0: c2 00 40 00 ld [ %g1 ], %g1 20435e4: 80 a0 60 00 cmp %g1, 0 20435e8: 22 80 00 39 be,a 20436cc 20435ec: 90 0a 37 ff and %o0, -2049, %o0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 20435f0: 90 12 28 00 or %o0, 0x800, %o0 { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 20435f4: b0 10 20 00 clr %i0 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 20435f8: 10 bf ff e3 b 2043584 20435fc: d0 27 60 18 st %o0, [ %i5 + 0x18 ] 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); 2043600: 90 0a 28 00 and %o0, 0x800, %o0 2043604: 80 a0 00 08 cmp %g0, %o0 2043608: 10 bf ff df b 2043584 204360c: b0 40 20 00 addx %g0, 0, %i0 /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 2043610: 7f ff 16 c8 call 2009130 2043614: b0 10 3f ff mov -1, %i0 if (diop != NULL) { 2043618: 80 a2 20 00 cmp %o0, 0 204361c: 02 bf ff d0 be 204355c 2043620: b6 10 00 08 mov %o0, %i3 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 2043624: 7f ff 16 ac call 20090d4 2043628: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 204362c: f4 06 e0 18 ld [ %i3 + 0x18 ], %i2 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 2043630: b0 0a 3d ff and %o0, -513, %i0 diop->flags |= rtems_libio_fcntl_flags( oflag ); 2043634: 7f ff 16 9b call 20090a0 2043638: 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 ); 204363c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043640: b4 12 00 1a or %o0, %i2, %i2 2043644: c2 00 40 00 ld [ %g1 ], %g1 2043648: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 204364c: 9f c0 40 00 call %g1 2043650: f4 26 e0 18 st %i2, [ %i3 + 0x18 ] rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 2043654: 92 07 60 1c add %i5, 0x1c, %o1 2043658: 7f ff 9d 2d call 202ab0c 204365c: 90 06 e0 1c add %i3, 0x1c, %o0 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 2043660: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 2043664: c2 00 60 04 ld [ %g1 + 4 ], %g1 2043668: 9f c0 40 00 call %g1 204366c: 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 ); 2043670: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1 2043674: 94 10 00 18 mov %i0, %o2 2043678: c2 00 40 00 ld [ %g1 ], %g1 204367c: 90 10 00 1b mov %i3, %o0 2043680: 92 10 20 00 clr %o1 2043684: 9f c0 40 00 call %g1 2043688: 96 10 20 00 clr %o3 if ( rv == 0 ) { 204368c: b0 92 20 00 orcc %o0, 0, %i0 2043690: 12 80 00 18 bne 20436f0 <== NEVER TAKEN 2043694: c2 07 21 f0 ld [ %i4 + 0x1f0 ], %g1 rv = diop - rtems_libio_iops; 2043698: b6 26 c0 01 sub %i3, %g1, %i3 204369c: b7 3e e0 03 sra %i3, 3, %i3 20436a0: 85 2e e0 06 sll %i3, 6, %g2 20436a4: 83 2e e0 03 sll %i3, 3, %g1 20436a8: 82 20 80 01 sub %g2, %g1, %g1 20436ac: 85 28 60 06 sll %g1, 6, %g2 20436b0: 82 00 40 02 add %g1, %g2, %g1 20436b4: 82 00 40 1b add %g1, %i3, %g1 20436b8: b1 28 60 0f sll %g1, 0xf, %i0 20436bc: b0 26 00 01 sub %i0, %g1, %i0 20436c0: b1 2e 20 03 sll %i0, 3, %i0 20436c4: 10 bf ff c2 b 20435cc 20436c8: b0 06 00 1b add %i0, %i3, %i0 { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 20436cc: b0 10 20 00 clr %i0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 20436d0: 10 bf ff ad b 2043584 20436d4: d0 27 60 18 st %o0, [ %i5 + 0x18 ] int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 20436d8: 40 00 0f 05 call 20472ec <__errno> 20436dc: b0 10 3f ff mov -1, %i0 20436e0: 82 10 20 09 mov 9, %g1 20436e4: c2 22 00 00 st %g1, [ %o0 ] 20436e8: 81 c7 e0 08 ret 20436ec: 81 e8 00 00 restore */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); if ( rv == 0 ) { rv = diop - rtems_libio_iops; } else { rtems_libio_free( diop ); 20436f0: 7f ff 16 c2 call 20091f8 <== NOT EXECUTED 20436f4: 90 10 00 1b mov %i3, %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) { 20436f8: 10 bf ff b6 b 20435d0 <== NOT EXECUTED 20436fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED =============================================================================== 0200e690 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200e690: 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) { 200e694: 3b 00 80 8b sethi %hi(0x2022c00), %i5 200e698: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 ! 2022f58 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 200e69c: b8 10 00 18 mov %i0, %i4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 200e6a0: 80 a2 20 00 cmp %o0, 0 200e6a4: 02 80 00 54 be 200e7f4 200e6a8: b4 17 63 58 or %i5, 0x358, %i2 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200e6ac: 92 10 20 00 clr %o1 200e6b0: 94 10 20 00 clr %o2 200e6b4: 7f ff eb cb call 20095e0 200e6b8: b0 10 3f f4 mov -12, %i0 } if (sc == RTEMS_SUCCESSFUL) { 200e6bc: 80 a2 20 00 cmp %o0, 0 200e6c0: 12 80 01 06 bne 200ead8 <== NEVER TAKEN 200e6c4: 01 00 00 00 nop err = pipe_lock(); if (err) return err; pipe = *pipep; 200e6c8: f6 07 00 00 ld [ %i4 ], %i3 if (pipe == NULL) { 200e6cc: 80 a6 e0 00 cmp %i3, 0 200e6d0: 02 80 00 91 be 200e914 200e6d4: 01 00 00 00 nop err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e6d8: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 200e6dc: 92 10 20 00 clr %o1 200e6e0: 7f ff eb c0 call 20095e0 200e6e4: 94 10 20 00 clr %o2 err = -EINTR; if (*pipep == NULL) { 200e6e8: c2 07 00 00 ld [ %i4 ], %g1 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 200e6ec: 80 a0 00 08 cmp %g0, %o0 200e6f0: b0 60 20 00 subx %g0, 0, %i0 err = -EINTR; if (*pipep == NULL) { 200e6f4: 80 a0 60 00 cmp %g1, 0 200e6f8: 02 80 00 c7 be 200ea14 200e6fc: b0 0e 3f fc and %i0, -4, %i0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200e700: 7f ff ec 02 call 2009708 200e704: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 200e708: 80 a6 20 00 cmp %i0, 0 200e70c: 12 80 00 f3 bne 200ead8 <== NEVER TAKEN 200e710: 01 00 00 00 nop return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200e714: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e718: 82 08 60 06 and %g1, 6, %g1 200e71c: 80 a0 60 04 cmp %g1, 4 200e720: 02 80 00 42 be 200e828 200e724: fa 07 00 00 ld [ %i4 ], %i5 200e728: 80 a0 60 06 cmp %g1, 6 200e72c: 02 80 00 65 be 200e8c0 200e730: 80 a0 60 02 cmp %g1, 2 200e734: 22 80 00 07 be,a 200e750 <== ALWAYS TAKEN 200e738: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 200e73c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED 200e740: 7f ff eb f2 call 2009708 200e744: b0 10 20 00 clr %i0 return 0; 200e748: 81 c7 e0 08 ret 200e74c: 81 e8 00 00 restore return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200e750: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200e754: 86 00 60 01 add %g1, 1, %g3 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 200e758: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200e75c: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200e760: 80 a0 60 00 cmp %g1, 0 200e764: 02 80 00 c2 be 200ea6c <== ALWAYS TAKEN 200e768: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 200e76c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED 200e770: 80 a0 60 00 cmp %g1, 0 200e774: 32 bf ff f3 bne,a 200e740 200e778: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 /* Not an error */ if (LIBIO_NODELAY(iop)) 200e77c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e780: 80 88 60 01 btst 1, %g1 200e784: 32 bf ff ef bne,a 200e740 200e788: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 break; prevCounter = pipe->writerCounter; 200e78c: 10 80 00 0c b 200e7bc 200e790: f6 07 60 24 ld [ %i5 + 0x24 ], %i3 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200e794: 92 10 20 00 clr %o1 200e798: 7f ff eb 92 call 20095e0 200e79c: 94 10 20 00 clr %o2 200e7a0: 80 a2 20 00 cmp %o0, 0 200e7a4: 12 80 00 0f bne 200e7e0 <== NEVER TAKEN 200e7a8: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->writerCounter); 200e7ac: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 200e7b0: 80 a0 40 1b cmp %g1, %i3 200e7b4: 32 bf ff e3 bne,a 200e740 <== ALWAYS TAKEN 200e7b8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 200e7bc: 7f ff eb d3 call 2009708 200e7c0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_READWAIT(pipe)) 200e7c4: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e7c8: 40 00 04 aa call 200fa70 200e7cc: 92 10 20 00 clr %o1 200e7d0: 80 a2 20 00 cmp %o0, 0 200e7d4: 22 bf ff f0 be,a 200e794 <== ALWAYS TAKEN 200e7d8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200e7dc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 200e7e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200e7e4: 7f ff ff 68 call 200e584 200e7e8: 92 10 00 19 mov %i1, %o1 return err; } 200e7ec: 81 c7 e0 08 ret 200e7f0: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 200e7f4: 37 00 80 8c sethi %hi(0x2023000), %i3 200e7f8: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 ! 20231c4 200e7fc: 92 10 20 00 clr %o1 200e800: 7f ff eb 78 call 20095e0 200e804: 94 10 20 00 clr %o2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 200e808: c2 07 63 58 ld [ %i5 + 0x358 ], %g1 200e80c: 80 a0 60 00 cmp %g1, 0 200e810: 02 80 00 88 be 200ea30 <== ALWAYS TAKEN 200e814: 98 10 00 1a mov %i2, %o4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 200e818: 7f ff eb bc call 2009708 <== NOT EXECUTED 200e81c: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 <== NOT EXECUTED 200e820: 10 bf ff a3 b 200e6ac <== NOT EXECUTED 200e824: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200e828: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200e82c: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200e830: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 200e834: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200e838: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200e83c: 80 a0 60 00 cmp %g1, 0 200e840: 02 80 00 95 be 200ea94 <== ALWAYS TAKEN 200e844: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200e848: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED 200e84c: 80 a0 60 00 cmp %g1, 0 200e850: 32 bf ff bc bne,a 200e740 200e854: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 200e858: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 200e85c: 80 88 60 01 btst 1, %g1 200e860: 32 80 00 a0 bne,a 200eae0 200e864: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 200e868: 10 80 00 0c b 200e898 200e86c: f6 07 60 20 ld [ %i5 + 0x20 ], %i3 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 200e870: 92 10 20 00 clr %o1 200e874: 7f ff eb 5b call 20095e0 200e878: 94 10 20 00 clr %o2 200e87c: 80 a2 20 00 cmp %o0, 0 200e880: 12 bf ff d8 bne 200e7e0 <== NEVER TAKEN 200e884: b0 10 3f fc mov -4, %i0 goto out_error; } while (prevCounter == pipe->readerCounter); 200e888: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 200e88c: 80 a0 40 1b cmp %g1, %i3 200e890: 32 bf ff ac bne,a 200e740 <== ALWAYS TAKEN 200e894: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 200e898: 7f ff eb 9c call 2009708 200e89c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 if (! PIPE_WRITEWAIT(pipe)) 200e8a0: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200e8a4: 40 00 04 73 call 200fa70 200e8a8: 92 10 20 00 clr %o1 200e8ac: 80 a2 20 00 cmp %o0, 0 200e8b0: 22 bf ff f0 be,a 200e870 <== ALWAYS TAKEN 200e8b4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 200e8b8: 10 bf ff ca b 200e7e0 <== NOT EXECUTED 200e8bc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 200e8c0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200e8c4: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 if (pipe->Readers ++ == 0) 200e8c8: 86 00 60 01 add %g1, 1, %g3 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 200e8cc: 84 00 a0 01 inc %g2 if (pipe->Readers ++ == 0) 200e8d0: c6 27 60 10 st %g3, [ %i5 + 0x10 ] 200e8d4: 80 a0 60 00 cmp %g1, 0 200e8d8: 02 80 00 6a be 200ea80 <== ALWAYS TAKEN 200e8dc: c4 27 60 20 st %g2, [ %i5 + 0x20 ] PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200e8e0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200e8e4: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 if (pipe->Writers ++ == 0) 200e8e8: 86 00 60 01 add %g1, 1, %g3 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 200e8ec: 84 00 a0 01 inc %g2 if (pipe->Writers ++ == 0) 200e8f0: c6 27 60 14 st %g3, [ %i5 + 0x14 ] 200e8f4: 80 a0 60 00 cmp %g1, 0 200e8f8: 12 bf ff 91 bne 200e73c <== NEVER TAKEN 200e8fc: c4 27 60 24 st %g2, [ %i5 + 0x24 ] PIPE_WAKEUPREADERS(pipe); 200e900: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200e904: 40 00 04 44 call 200fa14 200e908: 92 07 bf fc add %fp, -4, %o1 break; } PIPE_UNLOCK(pipe); 200e90c: 10 bf ff 8d b 200e740 200e910: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 200e914: 7f ff d9 8e call 2004f4c 200e918: 90 10 20 34 mov 0x34, %o0 if (pipe == NULL) 200e91c: b6 92 20 00 orcc %o0, 0, %i3 200e920: 02 80 00 7c be 200eb10 200e924: 82 10 22 00 mov 0x200, %g1 return err; memset(pipe, 0, sizeof(pipe_control_t)); 200e928: c0 26 c0 00 clr [ %i3 ] 200e92c: c0 26 e0 08 clr [ %i3 + 8 ] 200e930: c0 26 e0 0c clr [ %i3 + 0xc ] 200e934: c0 26 e0 10 clr [ %i3 + 0x10 ] 200e938: c0 26 e0 14 clr [ %i3 + 0x14 ] 200e93c: c0 26 e0 18 clr [ %i3 + 0x18 ] 200e940: c0 26 e0 1c clr [ %i3 + 0x1c ] 200e944: c0 26 e0 20 clr [ %i3 + 0x20 ] 200e948: c0 26 e0 24 clr [ %i3 + 0x24 ] 200e94c: c0 26 e0 28 clr [ %i3 + 0x28 ] 200e950: c0 26 e0 2c clr [ %i3 + 0x2c ] 200e954: c0 26 e0 30 clr [ %i3 + 0x30 ] pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 200e958: 90 10 22 00 mov 0x200, %o0 200e95c: 7f ff d9 7c call 2004f4c 200e960: c2 26 e0 04 st %g1, [ %i3 + 4 ] if (! pipe->Buffer) 200e964: 80 a2 20 00 cmp %o0, 0 200e968: 02 80 00 68 be 200eb08 <== NEVER TAKEN 200e96c: d0 26 c0 00 st %o0, [ %i3 ] goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 200e970: 35 00 80 8a sethi %hi(0x2022800), %i2 200e974: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0 ! 2022894 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 200e978: 31 14 12 5c sethi %hi(0x50497000), %i0 200e97c: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 200e980: 92 10 20 00 clr %o1 200e984: 94 10 20 00 clr %o2 200e988: 90 12 00 01 or %o0, %g1, %o0 200e98c: 40 00 03 c8 call 200f8ac 200e990: 96 06 e0 2c add %i3, 0x2c, %o3 200e994: 80 a2 20 00 cmp %o0, 0 200e998: 12 80 00 5a bne 200eb00 200e99c: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 200e9a0: 03 14 12 5d sethi %hi(0x50497400), %g1 200e9a4: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 200e9a8: 92 10 20 00 clr %o1 200e9ac: 94 10 20 00 clr %o2 200e9b0: 90 12 00 01 or %o0, %g1, %o0 200e9b4: 40 00 03 be call 200f8ac 200e9b8: 96 06 e0 30 add %i3, 0x30, %o3 200e9bc: 80 a2 20 00 cmp %o0, 0 200e9c0: 12 80 00 4e bne 200eaf8 200e9c4: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 200e9c8: b0 16 23 00 or %i0, 0x300, %i0 200e9cc: 92 10 20 01 mov 1, %o1 200e9d0: 90 12 00 18 or %o0, %i0, %o0 200e9d4: 94 10 20 10 mov 0x10, %o2 200e9d8: 96 10 20 00 clr %o3 200e9dc: 7f ff ea 5a call 2009344 200e9e0: 98 06 e0 28 add %i3, 0x28, %o4 200e9e4: 80 a2 20 00 cmp %o0, 0 200e9e8: 12 80 00 42 bne 200eaf0 200e9ec: c2 0e a0 94 ldub [ %i2 + 0x94 ], %g1 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 200e9f0: 84 00 60 01 add %g1, 1, %g2 200e9f4: 83 28 60 18 sll %g1, 0x18, %g1 200e9f8: 83 38 60 18 sra %g1, 0x18, %g1 200e9fc: 80 a0 60 7a cmp %g1, 0x7a 200ea00: 12 bf ff 36 bne 200e6d8 200ea04: c4 2e a0 94 stb %g2, [ %i2 + 0x94 ] c = 'a'; 200ea08: 82 10 20 61 mov 0x61, %g1 200ea0c: 10 bf ff 33 b 200e6d8 200ea10: c2 2e a0 94 stb %g1, [ %i2 + 0x94 ] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 200ea14: 80 a6 20 00 cmp %i0, 0 200ea18: 12 80 00 24 bne 200eaa8 <== NEVER TAKEN 200ea1c: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200ea20: 7f ff eb 3a call 2009708 200ea24: f6 27 00 00 st %i3, [ %i4 ] err = pipe_new(pipep); if (err) return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 200ea28: 10 bf ff 3c b 200e718 200ea2c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 200ea30: 92 10 20 01 mov 1, %o1 200ea34: 94 10 20 54 mov 0x54, %o2 200ea38: 96 10 20 00 clr %o3 200ea3c: 11 14 12 54 sethi %hi(0x50495000), %o0 200ea40: 7f ff ea 41 call 2009344 200ea44: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 200ea48: b4 10 00 08 mov %o0, %i2 200ea4c: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 200ea50: 7f ff eb 2e call 2009708 200ea54: b0 10 3f f4 mov -12, %i0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200ea58: 80 a6 a0 00 cmp %i2, 0 200ea5c: 12 bf ff 3b bne 200e748 200ea60: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 200ea64: 10 bf ff 13 b 200e6b0 200ea68: 92 10 20 00 clr %o1 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200ea6c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200ea70: 40 00 03 e9 call 200fa14 200ea74: 92 07 bf fc add %fp, -4, %o1 if (pipe->Writers == 0) { 200ea78: 10 bf ff 3e b 200e770 200ea7c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 200ea80: d0 07 60 30 ld [ %i5 + 0x30 ], %o0 200ea84: 40 00 03 e4 call 200fa14 200ea88: 92 07 bf fc add %fp, -4, %o1 pipe->writerCounter ++; if (pipe->Writers ++ == 0) 200ea8c: 10 bf ff 96 b 200e8e4 200ea90: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 200ea94: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 200ea98: 40 00 03 df call 200fa14 200ea9c: 92 07 bf fc add %fp, -4, %o1 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 200eaa0: 10 bf ff 6b b 200e84c 200eaa4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 200eaa8: 40 00 03 b2 call 200f970 <== NOT EXECUTED 200eaac: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 200eab0: 40 00 03 b0 call 200f970 <== NOT EXECUTED 200eab4: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 200eab8: 7f ff ea 93 call 2009504 <== NOT EXECUTED 200eabc: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED free(pipe->Buffer); 200eac0: 7f ff d7 f5 call 2004a94 <== NOT EXECUTED 200eac4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED free(pipe); 200eac8: 7f ff d7 f3 call 2004a94 <== NOT EXECUTED 200eacc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 200ead0: 7f ff eb 0e call 2009708 200ead4: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 200ead8: 81 c7 e0 08 ret 200eadc: 81 e8 00 00 restore if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 200eae0: 7f ff eb 0a call 2009708 200eae4: b0 10 3f fa mov -6, %i0 err = -ENXIO; goto out_error; 200eae8: 10 bf ff 3f b 200e7e4 200eaec: 90 10 00 1c mov %i4, %o0 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 200eaf0: 40 00 03 a0 call 200f970 200eaf4: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 err_wbar: rtems_barrier_delete(pipe->readBarrier); 200eaf8: 40 00 03 9e call 200f970 200eafc: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 err_rbar: free(pipe->Buffer); 200eb00: 7f ff d7 e5 call 2004a94 200eb04: d0 06 c0 00 ld [ %i3 ], %o0 err_buf: free(pipe); 200eb08: 7f ff d7 e3 call 2004a94 200eb0c: 90 10 00 1b mov %i3, %o0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 200eb10: 10 bf ff f0 b 200ead0 200eb14: b0 10 3f f4 mov -12, %i0 =============================================================================== 02009d94 : long fpathconf( int fd, int name ) { 2009d94: 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); 2009d98: 03 00 80 48 sethi %hi(0x2012000), %g1 2009d9c: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 20120d0 2009da0: 80 a6 00 01 cmp %i0, %g1 2009da4: 1a 80 00 3d bcc 2009e98 <== ALWAYS TAKEN 2009da8: 03 00 80 4a sethi %hi(0x2012800), %g1 iop = rtems_libio_iop(fd); 2009dac: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 2012964 <== NOT EXECUTED 2009db0: 85 2e 20 03 sll %i0, 3, %g2 <== NOT EXECUTED 2009db4: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED 2009db8: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED 2009dbc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2009dc0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 2009dc4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2009dc8: 02 80 00 34 be 2009e98 <== NOT EXECUTED 2009dcc: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009dd0: 08 80 00 08 bleu 2009df0 <== NOT EXECUTED 2009dd4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2009dd8: 40 00 06 53 call 200b724 <__errno> <== NOT EXECUTED 2009ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009de0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2009de4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED break; } return return_value; } 2009de8: 81 c7 e0 08 ret <== NOT EXECUTED 2009dec: 81 e8 00 00 restore <== NOT EXECUTED * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 2009df0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED 2009df4: 05 00 80 27 sethi %hi(0x2009c00), %g2 <== NOT EXECUTED 2009df8: 84 10 a1 64 or %g2, 0x164, %g2 ! 2009d64 <_close_r+0x10> <== NOT EXECUTED 2009dfc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED 2009e00: 81 c0 80 00 jmp %g2 <== NOT EXECUTED 2009e04: 01 00 00 00 nop <== NOT EXECUTED break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2009e08: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 <== NOT EXECUTED break; 2009e0c: 81 c7 e0 08 ret <== NOT EXECUTED 2009e10: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2009e14: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 <== NOT EXECUTED break; 2009e18: 81 c7 e0 08 ret <== NOT EXECUTED 2009e1c: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2009e20: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 <== NOT EXECUTED break; 2009e24: 81 c7 e0 08 ret <== NOT EXECUTED 2009e28: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2009e2c: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 <== NOT EXECUTED break; 2009e30: 81 c7 e0 08 ret <== NOT EXECUTED 2009e34: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2009e38: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 <== NOT EXECUTED break; 2009e3c: 81 c7 e0 08 ret <== NOT EXECUTED 2009e40: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2009e44: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 <== NOT EXECUTED break; 2009e48: 81 c7 e0 08 ret <== NOT EXECUTED 2009e4c: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 2009e50: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 <== NOT EXECUTED break; 2009e54: 81 c7 e0 08 ret <== NOT EXECUTED 2009e58: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 2009e5c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 <== NOT EXECUTED break; 2009e60: 81 c7 e0 08 ret <== NOT EXECUTED 2009e64: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 2009e68: f0 00 60 30 ld [ %g1 + 0x30 ], %i0 <== NOT EXECUTED break; 2009e6c: 81 c7 e0 08 ret <== NOT EXECUTED 2009e70: 81 e8 00 00 restore <== NOT EXECUTED switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 2009e74: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED break; 2009e78: 81 c7 e0 08 ret <== NOT EXECUTED 2009e7c: 81 e8 00 00 restore <== NOT EXECUTED the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 2009e80: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED break; 2009e84: 81 c7 e0 08 ret <== NOT EXECUTED 2009e88: 81 e8 00 00 restore <== NOT EXECUTED break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2009e8c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 <== NOT EXECUTED break; 2009e90: 81 c7 e0 08 ret <== NOT EXECUTED 2009e94: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 2009e98: 40 00 06 23 call 200b724 <__errno> 2009e9c: b0 10 3f ff mov -1, %i0 2009ea0: 82 10 20 09 mov 9, %g1 2009ea4: c2 22 00 00 st %g1, [ %o0 ] 2009ea8: 81 c7 e0 08 ret 2009eac: 81 e8 00 00 restore =============================================================================== 0200383c : #include void free( void *ptr ) { 200383c: 9d e3 bf a0 save %sp, -96, %sp MSBUMP(free_calls, 1); 2003840: 03 00 80 74 sethi %hi(0x201d000), %g1 2003844: 82 10 62 50 or %g1, 0x250, %g1 ! 201d250 2003848: c4 00 60 0c ld [ %g1 + 0xc ], %g2 #include void free( void *ptr ) { 200384c: b2 10 00 18 mov %i0, %i1 MSBUMP(free_calls, 1); 2003850: 84 00 a0 01 inc %g2 if ( !ptr ) 2003854: 80 a6 20 00 cmp %i0, 0 2003858: 02 80 00 15 be 20038ac 200385c: 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()) && 2003860: 03 00 80 75 sethi %hi(0x201d400), %g1 2003864: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current> 2003868: 80 a0 60 03 cmp %g1, 3 200386c: 02 80 00 17 be 20038c8 <== ALWAYS TAKEN 2003870: 03 00 80 73 sethi %hi(0x201cc00), %g1 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003874: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 201ce98 2003878: 80 a0 60 00 cmp %g1, 0 200387c: 02 80 00 06 be 2003894 2003880: 3b 00 80 71 sethi %hi(0x201c400), %i5 (*rtems_malloc_statistics_helpers->at_free)(ptr); 2003884: c2 00 60 08 ld [ %g1 + 8 ], %g1 2003888: 9f c0 40 00 call %g1 200388c: 90 10 00 19 mov %i1, %o0 if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 2003890: 3b 00 80 71 sethi %hi(0x201c400), %i5 2003894: d0 07 63 38 ld [ %i5 + 0x338 ], %o0 ! 201c738 2003898: 40 00 18 8f call 2009ad4 <_Protected_heap_Free> 200389c: 92 10 00 19 mov %i1, %o1 20038a0: 80 8a 20 ff btst 0xff, %o0 20038a4: 22 80 00 04 be,a 20038b4 20038a8: c2 07 63 38 ld [ %i5 + 0x338 ], %g1 20038ac: 81 c7 e0 08 ret 20038b0: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 20038b4: 31 00 80 6c sethi %hi(0x201b000), %i0 20038b8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 20038bc: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 20038c0: 40 00 03 98 call 2004720 20038c4: 91 ee 21 f0 restore %i0, 0x1f0, %o0 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { 20038c8: 40 00 00 6b call 2003a74 20038cc: 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()) && 20038d0: 80 8a 20 ff btst 0xff, %o0 20038d4: 12 bf ff e8 bne 2003874 20038d8: 03 00 80 73 sethi %hi(0x201cc00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 20038dc: 40 00 00 85 call 2003af0 20038e0: 81 e8 00 00 restore =============================================================================== 02019eb0 : int fstat( int fd, struct stat *sbuf ) { 2019eb0: 9d e3 bf a0 save %sp, -96, %sp rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 2019eb4: 80 a6 60 00 cmp %i1, 0 2019eb8: 02 80 00 1f be 2019f34 <== NEVER TAKEN 2019ebc: 03 00 80 71 sethi %hi(0x201c400), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2019ec0: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c 2019ec4: 80 a6 00 01 cmp %i0, %g1 2019ec8: 1a 80 00 15 bcc 2019f1c 2019ecc: 03 00 80 74 sethi %hi(0x201d000), %g1 2019ed0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 201d238 2019ed4: 85 2e 20 03 sll %i0, 3, %g2 2019ed8: b1 2e 20 06 sll %i0, 6, %i0 2019edc: b0 00 80 18 add %g2, %i0, %i0 2019ee0: b0 00 40 18 add %g1, %i0, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 2019ee4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 2019ee8: 80 88 61 00 btst 0x100, %g1 2019eec: 02 80 00 0c be 2019f1c 2019ef0: 94 10 20 48 mov 0x48, %o2 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 2019ef4: 92 10 20 00 clr %o1 2019ef8: 7f ff d8 ba call 20101e0 2019efc: 90 10 00 19 mov %i1, %o0 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 2019f00: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 2019f04: 90 06 20 1c add %i0, 0x1c, %o0 2019f08: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 2019f0c: 9f c0 40 00 call %g1 2019f10: 92 10 00 19 mov %i1, %o1 } 2019f14: 81 c7 e0 08 ret 2019f18: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 2019f1c: 7f ff d6 19 call 200f780 <__errno> 2019f20: b0 10 3f ff mov -1, %i0 2019f24: 82 10 20 09 mov 9, %g1 2019f28: c2 22 00 00 st %g1, [ %o0 ] 2019f2c: 81 c7 e0 08 ret 2019f30: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 2019f34: 7f ff d6 13 call 200f780 <__errno> <== NOT EXECUTED 2019f38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2019f3c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2019f40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2019f44: 81 c7 e0 08 ret <== NOT EXECUTED 2019f48: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 020035bc : 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) { 20035bc: 03 00 80 83 sethi %hi(0x2020c00), %g1 20035c0: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2020dc8 20035c4: 80 a0 40 08 cmp %g1, %o0 20035c8: 08 80 00 1e bleu 2003640 <== NEVER TAKEN 20035cc: 84 10 20 00 clr %g2 20035d0: 03 00 80 83 sethi %hi(0x2020c00), %g1 20035d4: c2 00 61 cc ld [ %g1 + 0x1cc ], %g1 ! 2020dcc 20035d8: 80 a0 60 00 cmp %g1, 0 20035dc: 02 80 00 19 be 2003640 <== NEVER TAKEN 20035e0: 01 00 00 00 nop rtems_disk_device_table *dtab = disktab + major; 20035e4: 91 2a 20 03 sll %o0, 3, %o0 20035e8: 86 00 40 08 add %g1, %o0, %g3 if (minor < dtab->size && dtab->minor != NULL) { 20035ec: c6 00 e0 04 ld [ %g3 + 4 ], %g3 20035f0: 80 a0 c0 09 cmp %g3, %o1 20035f4: 08 80 00 13 bleu 2003640 <== NEVER TAKEN 20035f8: 01 00 00 00 nop 20035fc: c2 00 40 08 ld [ %g1 + %o0 ], %g1 2003600: 80 a0 60 00 cmp %g1, 0 2003604: 02 80 00 0f be 2003640 <== NEVER TAKEN 2003608: 93 2a 60 02 sll %o1, 2, %o1 rtems_disk_device *dd = dtab->minor [minor]; 200360c: c4 00 40 09 ld [ %g1 + %o1 ], %g2 if (dd != NULL && !lookup_only) { 2003610: 80 a0 a0 00 cmp %g2, 0 2003614: 02 80 00 0b be 2003640 2003618: 80 a2 a0 00 cmp %o2, 0 200361c: 12 80 00 09 bne 2003640 2003620: 01 00 00 00 nop if (!dd->deleted) { 2003624: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1 2003628: 80 a0 60 00 cmp %g1, 0 200362c: 32 80 00 07 bne,a 2003648 2003630: 84 10 20 00 clr %g2 ++dd->uses; 2003634: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2003638: 82 00 60 01 inc %g1 200363c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] return dd; } } return NULL; } 2003640: 81 c3 e0 08 retl 2003644: 90 10 00 02 mov %g2, %o0 2003648: 81 c3 e0 08 retl 200364c: 90 10 00 02 mov %g2, %o0 =============================================================================== 02004d30 : */ static rtems_status_code get_sector(int fd, uint32_t sector_num, rtems_sector_data_t **sector) { 2004d30: 9d e3 bf a0 save %sp, -96, %sp 2004d34: 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) 2004d38: 80 a6 a0 00 cmp %i2, 0 2004d3c: 02 80 00 1e be 2004db4 <== NEVER TAKEN 2004d40: b0 10 20 19 mov 0x19, %i0 { return RTEMS_INTERNAL_ERROR; } off = sector_num * RTEMS_IDE_SECTOR_SIZE; 2004d44: b9 2e 60 09 sll %i1, 9, %i4 new_off = lseek(fd, off, SEEK_SET); 2004d48: 90 10 00 1d mov %i5, %o0 2004d4c: 92 10 20 00 clr %o1 2004d50: 94 10 00 1c mov %i4, %o2 2004d54: 40 00 05 90 call 2006394 2004d58: 96 10 20 00 clr %o3 if (new_off != off) { 2004d5c: 80 a2 20 00 cmp %o0, 0 2004d60: 02 80 00 04 be 2004d70 <== ALWAYS TAKEN 2004d64: 80 a2 40 1c cmp %o1, %i4 s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 2004d68: 81 c7 e0 08 ret <== NOT EXECUTED 2004d6c: 91 e8 20 1b restore %g0, 0x1b, %o0 <== NOT EXECUTED return RTEMS_INTERNAL_ERROR; } off = sector_num * RTEMS_IDE_SECTOR_SIZE; new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { 2004d70: 12 80 00 11 bne 2004db4 <== NEVER TAKEN 2004d74: b0 10 20 1b mov 0x1b, %i0 return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 2004d78: 90 10 22 04 mov 0x204, %o0 2004d7c: 40 00 06 67 call 2006718 2004d80: b0 10 20 1a mov 0x1a, %i0 if (s == NULL) 2004d84: 80 a2 20 00 cmp %o0, 0 2004d88: 02 80 00 0b be 2004db4 <== NEVER TAKEN 2004d8c: b8 10 00 08 mov %o0, %i4 { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 2004d90: 90 10 00 1d mov %i5, %o0 2004d94: 92 07 20 04 add %i4, 4, %o1 2004d98: 40 00 09 33 call 2007264 2004d9c: 94 10 22 00 mov 0x200, %o2 if (n != RTEMS_IDE_SECTOR_SIZE) 2004da0: 80 a2 22 00 cmp %o0, 0x200 2004da4: 02 80 00 06 be 2004dbc <== ALWAYS TAKEN 2004da8: 90 10 00 1c mov %i4, %o0 { free(s); 2004dac: 40 00 04 31 call 2005e70 <== NOT EXECUTED 2004db0: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED 2004db4: 81 c7 e0 08 ret <== NOT EXECUTED 2004db8: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_IO_ERROR; } s->sector_num = sector_num; 2004dbc: f2 27 00 00 st %i1, [ %i4 ] *sector = s; 2004dc0: f8 26 80 00 st %i4, [ %i2 ] return RTEMS_SUCCESSFUL; 2004dc4: 81 c7 e0 08 ret 2004dc8: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02062338 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 2062338: 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 ); 206233c: 03 00 81 bf sethi %hi(0x206fc00), %g1 2062340: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 2062344: 80 a6 00 01 cmp %i0, %g1 2062348: 1a 80 00 08 bcc 2062368 <== NEVER TAKEN 206234c: ba 10 20 00 clr %i5 2062350: 03 00 81 cf sethi %hi(0x2073c00), %g1 2062354: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 2062358: 83 2e 20 03 sll %i0, 3, %g1 206235c: b1 2e 20 06 sll %i0, 6, %i0 2062360: b0 00 40 18 add %g1, %i0, %i0 2062364: ba 07 40 18 add %i5, %i0, %i5 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 2062368: 7f ff 29 51 call 202c8ac 206236c: 90 07 60 1c add %i5, 0x1c, %o0 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 2062370: 80 a2 20 00 cmp %o0, 0 2062374: 12 80 00 09 bne 2062398 2062378: 90 10 00 1d mov %i5, %o0 /* * 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 ); 206237c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1 2062380: c2 00 60 08 ld [ %g1 + 8 ], %g1 2062384: 92 10 00 19 mov %i1, %o1 2062388: 9f c0 40 00 call %g1 206238c: 94 10 00 1a mov %i2, %o2 } 2062390: 81 c7 e0 08 ret 2062394: 91 e8 00 08 restore %g0, %o0, %o0 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); if ( type != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 2062398: 7f ff 93 d5 call 20472ec <__errno> 206239c: b0 10 3f ff mov -1, %i0 20623a0: 82 10 20 14 mov 0x14, %g1 20623a4: c2 22 00 00 st %g1, [ %o0 ] 20623a8: 81 c7 e0 08 ret 20623ac: 81 e8 00 00 restore =============================================================================== 020038e4 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 20038e4: 9d e3 bf 98 save %sp, -104, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 20038e8: b6 96 20 00 orcc %i0, 0, %i3 20038ec: 02 80 00 1e be 2003964 <== NEVER TAKEN 20038f0: 01 00 00 00 nop { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 20038f4: 7f ff fb 71 call 20026b8 20038f8: 01 00 00 00 nop 20038fc: b4 10 00 08 mov %o0, %i2 struct timespec *tod_as_timespec ) { Timestamp_Control tod_as_timestamp; _TOD_Get_as_timestamp( &tod_as_timestamp ); 2003900: 40 00 14 d4 call 2008c50 <_TOD_Get_as_timestamp> 2003904: 90 07 bf f8 add %fp, -8, %o0 _Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec ); 2003908: f8 1f bf f8 ldd [ %fp + -8 ], %i4 _TOD_Get( &now ); _ISR_Enable(level); 200390c: 7f ff fb 6f call 20026c8 2003910: 90 10 00 1a mov %i2, %o0 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2003914: 90 10 00 1c mov %i4, %o0 2003918: 92 10 00 1d mov %i5, %o1 200391c: 94 10 20 00 clr %o2 2003920: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2003924: 40 00 54 d7 call 2018c80 <__divdi3> 2003928: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 200392c: 94 10 20 00 clr %o2 static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); 2003930: d2 26 c0 00 st %o1, [ %i3 ] _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); 2003934: 90 10 00 1c mov %i4, %o0 2003938: 92 10 00 1d mov %i5, %o1 200393c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3 2003940: 40 00 55 b6 call 2019018 <__moddi3> 2003944: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 2003948: b0 10 20 00 clr %i0 useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 200394c: 90 10 00 09 mov %o1, %o0 2003950: 40 00 53 76 call 2018728 <.div> 2003954: 92 10 23 e8 mov 0x3e8, %o1 time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2003958: d0 26 e0 04 st %o0, [ %i3 + 4 ] } 200395c: 81 c7 e0 08 ret 2003960: 81 e8 00 00 restore void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 2003964: 40 00 2f 87 call 200f780 <__errno> <== NOT EXECUTED 2003968: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200396c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2003970: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003974: 81 c7 e0 08 ret <== NOT EXECUTED 2003978: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 0200eee8 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200eee8: 9d e3 be 88 save %sp, -376, %sp static inline void rtems_filesystem_instance_lock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->lock_h)( loc->mt_entry ); 200eeec: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200eef0: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 200eef4: c2 00 40 00 ld [ %g1 ], %g1 200eef8: 9f c0 40 00 call %g1 200eefc: ba 10 00 18 mov %i0, %i5 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); 200ef00: 90 10 00 1a mov %i2, %o0 int last_entry; struct dirent tmp_dirent; rtems_filesystem_instance_lock( &iop->pathinfo ); the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 200ef04: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 the_chain = &the_jnode->info.directory.Entries; /* Move to the first of the desired directory entries */ bytes_transferred = 0; first_entry = iop->offset; 200ef08: f8 06 20 14 ld [ %i0 + 0x14 ], %i4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); 200ef0c: 40 00 26 05 call 2018720 <.udiv> 200ef10: 92 10 21 18 mov 0x118, %o1 200ef14: a1 2a 20 03 sll %o0, 3, %l0 200ef18: 91 2a 20 05 sll %o0, 5, %o0 200ef1c: 90 04 00 08 add %l0, %o0, %o0 200ef20: a1 2a 20 03 sll %o0, 3, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 200ef24: f4 04 60 50 ld [ %l1 + 0x50 ], %i2 200ef28: 90 24 00 08 sub %l0, %o0, %o0 200ef2c: a0 02 00 1c add %o0, %i4, %l0 /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200ef30: 80 a4 20 00 cmp %l0, 0 200ef34: 04 80 00 2c ble 200efe4 <== NEVER TAKEN 200ef38: b0 10 20 00 clr %i0 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 )); 200ef3c: a2 04 60 54 add %l1, 0x54, %l1 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); 200ef40: 80 a6 80 11 cmp %i2, %l1 200ef44: 22 80 00 29 be,a 200efe8 200ef48: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200ef4c: b6 10 20 00 clr %i3 the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 200ef50: 10 80 00 08 b 200ef70 200ef54: a4 10 21 18 mov 0x118, %l2 /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200ef58: 80 a4 00 1b cmp %l0, %i3 200ef5c: 04 80 00 22 ble 200efe4 <== NEVER TAKEN 200ef60: f4 06 80 00 ld [ %i2 ], %i2 current_entry = 0, the_node = rtems_chain_first( the_chain ); current_entry < last_entry && !rtems_chain_is_tail( the_chain, the_node ); 200ef64: 80 a6 80 11 cmp %i2, %l1 200ef68: 22 80 00 20 be,a 200efe8 200ef6c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { 200ef70: 80 a7 00 1b cmp %i4, %i3 200ef74: 34 bf ff f9 bg,a 200ef58 200ef78: b6 06 e1 18 add %i3, 0x118, %i3 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 200ef7c: c2 06 a0 38 ld [ %i2 + 0x38 ], %g1 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200ef80: 85 3e e0 1f sra %i3, 0x1f, %g2 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200ef84: a6 06 a0 0c add %i2, 0xc, %l3 current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200ef88: c4 27 be f0 st %g2, [ %fp + -272 ] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 200ef8c: c2 27 be e8 st %g1, [ %fp + -280 ] current_entry += sizeof( struct dirent ), the_node = rtems_chain_next( the_node ) ) { if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 200ef90: f6 27 be f4 st %i3, [ %fp + -268 ] tmp_dirent.d_reclen = sizeof( struct dirent ); 200ef94: e4 37 be f8 sth %l2, [ %fp + -264 ] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200ef98: 40 00 07 92 call 2010de0 200ef9c: 90 10 00 13 mov %l3, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 200efa0: 92 10 00 13 mov %l3, %o1 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 200efa4: d0 37 be fa sth %o0, [ %fp + -262 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 200efa8: 40 00 05 ca call 20106d0 200efac: 90 07 be fc add %fp, -260, %o0 memcpy( 200efb0: 90 06 40 18 add %i1, %i0, %o0 200efb4: 92 07 be e8 add %fp, -280, %o1 200efb8: 40 00 04 4e call 20100f0 200efbc: 94 10 21 18 mov 0x118, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); 200efc0: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 200efc4: b6 06 e1 18 add %i3, 0x118, %i3 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset += sizeof( struct dirent ); 200efc8: 86 80 e1 18 addcc %g3, 0x118, %g3 200efcc: 84 40 a0 00 addx %g2, 0, %g2 200efd0: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] bytes_transferred += sizeof( struct dirent ); 200efd4: b0 06 21 18 add %i0, 0x118, %i0 /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count / sizeof( struct dirent )) * sizeof( struct dirent ); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 200efd8: 80 a4 00 1b cmp %l0, %i3 200efdc: 14 bf ff e2 bg 200ef64 <== NEVER TAKEN 200efe0: f4 06 80 00 ld [ %i2 ], %i2 static inline void rtems_filesystem_instance_unlock( const rtems_filesystem_location_info_t *loc ) { (*loc->ops->unlock_h)( loc->mt_entry ); 200efe4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 200efe8: c2 00 60 04 ld [ %g1 + 4 ], %g1 200efec: 9f c0 40 00 call %g1 200eff0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 } rtems_filesystem_instance_unlock( &iop->pathinfo ); return bytes_transferred; } 200eff4: 81 c7 e0 08 ret 200eff8: 81 e8 00 00 restore =============================================================================== 0202b3cc : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 202b3cc: 9d e3 bf a0 save %sp, -96, %sp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 202b3d0: 03 00 81 ce sethi %hi(0x2073800), %g1 202b3d4: c4 48 60 00 ldsb [ %g1 ], %g2 202b3d8: 80 a0 a0 00 cmp %g2, 0 202b3dc: 22 80 00 04 be,a 202b3ec 202b3e0: 84 10 20 01 mov 1, %g2 202b3e4: 81 c7 e0 08 ret 202b3e8: 81 e8 00 00 restore return; etc_passwd_initted = 1; mkdir("/etc", 0777); 202b3ec: 92 10 21 ff mov 0x1ff, %o1 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 202b3f0: c4 28 60 00 stb %g2, [ %g1 ] mkdir("/etc", 0777); 202b3f4: 11 00 81 8b sethi %hi(0x2062c00), %o0 202b3f8: 7f ff 78 85 call 200960c 202b3fc: 90 12 23 78 or %o0, 0x378, %o0 ! 2062f78 <_rodata_start+0x9e8> /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 202b400: 39 00 81 8c sethi %hi(0x2063000), %i4 202b404: 3b 00 81 bc sethi %hi(0x206f000), %i5 202b408: 90 17 20 00 mov %i4, %o0 202b40c: 40 00 72 6f call 2047dc8 202b410: 92 17 62 c0 or %i5, 0x2c0, %o1 202b414: 80 a2 20 00 cmp %o0, 0 202b418: 22 80 00 0d be,a 202b44c 202b41c: 90 17 20 00 mov %i4, %o0 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202b420: 40 00 70 05 call 2047434 202b424: 01 00 00 00 nop } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 202b428: 39 00 81 8c sethi %hi(0x2063000), %i4 202b42c: 92 17 62 c0 or %i5, 0x2c0, %o1 202b430: 40 00 72 66 call 2047dc8 202b434: 90 17 20 b8 or %i4, 0xb8, %o0 202b438: 80 a2 20 00 cmp %o0, 0 202b43c: 22 80 00 11 be,a 202b480 202b440: 90 17 20 b8 or %i4, 0xb8, %o0 fclose(fp); 202b444: 40 00 6f fc call 2047434 202b448: 91 e8 00 08 restore %g0, %o0, %o0 * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 202b44c: 13 00 81 9b sethi %hi(0x2066c00), %o1 202b450: 40 00 72 5e call 2047dc8 202b454: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2066ed0 202b458: b0 92 20 00 orcc %o0, 0, %i0 202b45c: 02 bf ff f3 be 202b428 <== NEVER TAKEN 202b460: 92 10 20 01 mov 1, %o1 fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 202b464: 94 10 20 66 mov 0x66, %o2 202b468: 96 10 00 18 mov %i0, %o3 202b46c: 11 00 81 a3 sethi %hi(0x2068c00), %o0 202b470: 40 00 77 2b call 204911c 202b474: 90 12 22 68 or %o0, 0x268, %o0 ! 2068e68 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202b478: 10 bf ff ea b 202b420 202b47c: 90 10 00 18 mov %i0, %o0 * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 202b480: 13 00 81 9b sethi %hi(0x2066c00), %o1 202b484: 40 00 72 51 call 2047dc8 202b488: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2066ed0 202b48c: b0 92 20 00 orcc %o0, 0, %i0 202b490: 02 bf ff d5 be 202b3e4 <== NEVER TAKEN 202b494: 01 00 00 00 nop fprintf( fp, "root:x:0:root\n" 202b498: 92 10 20 01 mov 1, %o1 ! 1 202b49c: 11 00 81 a3 sethi %hi(0x2068c00), %o0 202b4a0: 94 10 20 2a mov 0x2a, %o2 202b4a4: 96 10 00 18 mov %i0, %o3 202b4a8: 40 00 77 1d call 204911c 202b4ac: 90 12 22 d0 or %o0, 0x2d0, %o0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 202b4b0: 40 00 6f e1 call 2047434 202b4b4: 81 e8 00 00 restore =============================================================================== 020065a4 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 20065a4: 9d e3 bf a0 save %sp, -96, %sp if (tty->termios.c_iflag & ISTRIP) 20065a8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1 20065ac: 80 88 60 20 btst 0x20, %g1 20065b0: 02 80 00 03 be 20065bc <== ALWAYS TAKEN 20065b4: ba 10 00 18 mov %i0, %i5 c &= 0x7f; 20065b8: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 20065bc: 80 88 62 00 btst 0x200, %g1 20065c0: 02 80 00 0d be 20065f4 20065c4: 80 a7 60 0d cmp %i5, 0xd c = tolower (c); 20065c8: 05 00 80 72 sethi %hi(0x201c800), %g2 20065cc: c6 00 a1 a0 ld [ %g2 + 0x1a0 ], %g3 ! 201c9a0 <__ctype_ptr__> 20065d0: 84 10 00 1d mov %i5, %g2 20065d4: ba 00 c0 1d add %g3, %i5, %i5 20065d8: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 20065dc: 86 08 e0 03 and %g3, 3, %g3 20065e0: 80 a0 e0 01 cmp %g3, 1 20065e4: 22 80 00 02 be,a 20065ec 20065e8: 84 00 a0 20 add %g2, 0x20, %g2 20065ec: ba 08 a0 ff and %g2, 0xff, %i5 if (c == '\r') { 20065f0: 80 a7 60 0d cmp %i5, 0xd 20065f4: 02 80 00 17 be 2006650 20065f8: 80 a7 60 0a cmp %i5, 0xa 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)) { 20065fc: 02 80 00 40 be 20066fc 2006600: 80 a7 60 00 cmp %i5, 0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006604: 32 80 00 1a bne,a 200666c <== ALWAYS TAKEN 2006608: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 200660c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2006610: 05 00 80 72 sethi %hi(0x201c800), %g2 2006614: c4 00 a0 5c ld [ %g2 + 0x5c ], %g2 ! 201c85c 2006618: 84 00 bf ff add %g2, -1, %g2 200661c: 80 a0 40 02 cmp %g1, %g2 2006620: 1a 80 00 46 bcc 2006738 <== NEVER TAKEN 2006624: b0 10 20 00 clr %i0 if (tty->termios.c_lflag & ECHO) 2006628: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 200662c: 80 88 a0 08 btst 8, %g2 2006630: 12 80 00 38 bne 2006710 <== ALWAYS TAKEN 2006634: 90 10 00 1d mov %i5, %o0 echo (c, tty); tty->cbuf[tty->ccount++] = c; 2006638: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200663c: 84 00 60 01 add %g1, 1, %g2 2006640: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] 2006644: c4 26 60 20 st %g2, [ %i1 + 0x20 ] } return 0; } 2006648: 81 c7 e0 08 ret 200664c: 91 e8 20 00 restore %g0, 0, %o0 if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 2006650: 80 88 60 80 btst 0x80, %g1 2006654: 12 80 00 39 bne 2006738 <== NEVER TAKEN 2006658: b0 10 20 00 clr %i0 return 0; if (tty->termios.c_iflag & ICRNL) 200665c: 80 88 61 00 btst 0x100, %g1 2006660: 32 80 00 02 bne,a 2006668 <== ALWAYS TAKEN 2006664: ba 10 20 0a mov 0xa, %i5 c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006668: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 200666c: 80 88 60 02 btst 2, %g1 2006670: 22 bf ff e8 be,a 2006610 2006674: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 if (c == tty->termios.c_cc[VERASE]) { 2006678: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2 200667c: 80 a0 80 1d cmp %g2, %i5 2006680: 02 80 00 3d be 2006774 2006684: 90 10 00 19 mov %i1, %o0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2006688: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2 200668c: 80 a0 80 1d cmp %g2, %i5 2006690: 02 80 00 28 be 2006730 2006694: 92 10 20 01 mov 1, %o1 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2006698: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2 200669c: 80 a0 80 1d cmp %g2, %i5 20066a0: 02 80 00 26 be 2006738 <== NEVER TAKEN 20066a4: b0 10 20 01 mov 1, %i0 return 1; } else if (c == '\n') { 20066a8: 80 a7 60 0a cmp %i5, 0xa 20066ac: 02 80 00 25 be 2006740 20066b0: 80 88 60 48 btst 0x48, %g1 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 20066b4: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2 20066b8: 80 a0 80 1d cmp %g2, %i5 20066bc: 02 80 00 07 be 20066d8 <== NEVER TAKEN 20066c0: 80 88 60 08 btst 8, %g1 20066c4: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2 20066c8: 80 a0 80 1d cmp %g2, %i5 20066cc: 32 bf ff d1 bne,a 2006610 <== ALWAYS TAKEN 20066d0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 20066d4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 20066d8: 32 80 00 12 bne,a 2006720 <== NOT EXECUTED 20066dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 20066e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 20066e4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 20066e8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 20066ec: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED 20066f0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; 20066f4: 81 c7 e0 08 ret <== NOT EXECUTED 20066f8: 91 e8 20 01 restore %g0, 1, %o0 <== 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)) { 20066fc: 80 88 60 40 btst 0x40, %g1 2006700: 32 bf ff da bne,a 2006668 <== NEVER TAKEN 2006704: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2006708: 10 bf ff d9 b 200666c 200670c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2006710: 7f ff fe f6 call 20062e8 2006714: 92 10 00 19 mov %i1, %o1 2006718: 10 bf ff c8 b 2006638 200671c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 2006720: 7f ff fe f2 call 20062e8 <== NOT EXECUTED 2006724: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2006728: 10 bf ff ef b 20066e4 <== NOT EXECUTED 200672c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 2006730: 7f ff ff 0f call 200636c 2006734: b0 10 20 00 clr %i0 return 0; 2006738: 81 c7 e0 08 ret 200673c: 81 e8 00 00 restore } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 2006740: 22 80 00 06 be,a 2006758 <== NEVER TAKEN 2006744: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2006748: 90 10 20 0a mov 0xa, %o0 200674c: 7f ff fe e7 call 20062e8 2006750: 92 10 00 19 mov %i1, %o1 tty->cbuf[tty->ccount++] = c; 2006754: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 2006758: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 200675c: 86 10 20 0a mov 0xa, %g3 2006760: c6 28 80 01 stb %g3, [ %g2 + %g1 ] 2006764: 82 00 60 01 inc %g1 2006768: c2 26 60 20 st %g1, [ %i1 + 0x20 ] return 1; 200676c: 81 c7 e0 08 ret 2006770: 91 e8 20 01 restore %g0, 1, %o0 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 2006774: 92 10 20 00 clr %o1 2006778: 7f ff fe fd call 200636c 200677c: b0 10 20 00 clr %i0 return 0; 2006780: 81 c7 e0 08 ret 2006784: 81 e8 00 00 restore =============================================================================== 02019f80 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 2019f80: 81 c3 e0 08 retl <== NOT EXECUTED 2019f84: 90 10 20 00 clr %o0 <== NOT EXECUTED =============================================================================== 0200416c : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 200416c: 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())) 2004170: 03 00 80 75 sethi %hi(0x201d400), %g1 2004174: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current> 2004178: 80 a0 60 03 cmp %g1, 3 200417c: 02 80 00 04 be 200418c <== ALWAYS TAKEN 2004180: 3b 00 80 72 sethi %hi(0x201c800), %i5 2004184: 81 c7 e0 08 ret <== NOT EXECUTED 2004188: 81 e8 00 00 restore <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 200418c: 05 00 80 6e sethi %hi(0x201b800), %g2 2004190: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1 2004194: f8 00 a3 c8 ld [ %g2 + 0x3c8 ], %i4 2004198: 80 a0 40 1c cmp %g1, %i4 200419c: 02 80 00 05 be 20041b0 20041a0: 01 00 00 00 nop _wrapup_reent(_global_impure_ptr); 20041a4: 40 00 30 b3 call 2010470 <_wrapup_reent> 20041a8: 90 10 00 1c mov %i4, %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; 20041ac: f8 27 61 a8 st %i4, [ %i5 + 0x1a8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 20041b0: 40 00 2d c6 call 200f8c8 20041b4: d0 07 20 04 ld [ %i4 + 4 ], %o0 fclose (stdout); 20041b8: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1 20041bc: 40 00 2d c3 call 200f8c8 20041c0: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 20041c4: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1 20041c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0 20041cc: 40 00 2d bf call 200f8c8 20041d0: 81 e8 00 00 restore =============================================================================== 02019f98 : #include #include off_t lseek( int fd, off_t offset, int whence ) { 2019f98: 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 ); 2019f9c: 03 00 80 71 sethi %hi(0x201c400), %g1 2019fa0: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c #include #include off_t lseek( int fd, off_t offset, int whence ) { 2019fa4: b8 10 00 19 mov %i1, %i4 2019fa8: ba 10 00 1a mov %i2, %i5 rtems_libio_t *iop; off_t reference_offset; off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); 2019fac: 80 a6 00 01 cmp %i0, %g1 2019fb0: 1a 80 00 5c bcc 201a120 2019fb4: a4 10 00 1b mov %i3, %l2 iop = rtems_libio_iop( fd ); 2019fb8: 03 00 80 74 sethi %hi(0x201d000), %g1 2019fbc: f2 00 62 38 ld [ %g1 + 0x238 ], %i1 ! 201d238 2019fc0: 83 2e 20 03 sll %i0, 3, %g1 2019fc4: b1 2e 20 06 sll %i0, 6, %i0 2019fc8: b0 00 40 18 add %g1, %i0, %i0 2019fcc: b2 06 40 18 add %i1, %i0, %i1 rtems_libio_check_is_open(iop); 2019fd0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 2019fd4: 80 88 61 00 btst 0x100, %g1 2019fd8: 02 80 00 52 be 201a120 2019fdc: 80 a6 e0 01 cmp %i3, 1 old_offset = iop->offset; switch ( whence ) { 2019fe0: 02 80 00 4a be 201a108 2019fe4: e0 1e 60 10 ldd [ %i1 + 0x10 ], %l0 2019fe8: 80 a6 e0 02 cmp %i3, 2 2019fec: 02 80 00 0f be 201a028 2019ff0: b4 10 00 1c mov %i4, %i2 2019ff4: 80 a4 a0 00 cmp %l2, 0 2019ff8: 02 80 00 2b be 201a0a4 2019ffc: b6 10 00 1d mov %i5, %i3 ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { errno = EINVAL; 201a000: 7f ff d5 e0 call 200f780 <__errno> 201a004: 01 00 00 00 nop 201a008: 05 3f ff ff sethi %hi(0xfffffc00), %g2 201a00c: 82 10 20 16 mov 0x16, %g1 201a010: 84 10 a3 ff or %g2, 0x3ff, %g2 201a014: c2 22 00 00 st %g1, [ %o0 ] 201a018: 86 10 00 02 mov %g2, %g3 rv = (off_t) -1; } } return rv; } 201a01c: b0 10 00 02 mov %g2, %i0 201a020: 81 c7 e0 08 ret 201a024: 93 e8 00 03 restore %g0, %g3, %o1 break; case SEEK_CUR: reference_offset = old_offset; break; case SEEK_END: reference_offset = iop->size; 201a028: c4 1e 60 08 ldd [ %i1 + 8 ], %g2 default: errno = EINVAL; rv = (off_t) -1; break; } new_offset = reference_offset + offset; 201a02c: b6 80 c0 1d addcc %g3, %i5, %i3 201a030: b4 40 80 1c addx %g2, %i4, %i2 if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 201a034: 80 a7 00 1a cmp %i4, %i2 201a038: 04 80 00 46 ble 201a150 201a03c: 82 10 20 01 mov 1, %g1 201a040: 82 10 20 00 clr %g1 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201a044: 80 88 60 ff btst 0xff, %g1 201a048: 12 80 00 15 bne 201a09c 201a04c: 80 a0 a0 00 cmp %g2, 0 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 201a050: 80 a6 80 1c cmp %i2, %i4 201a054: 14 80 00 3d bg 201a148 <== NEVER TAKEN 201a058: 82 10 20 01 mov 1, %g1 201a05c: 80 a6 80 1c cmp %i2, %i4 201a060: 02 80 00 38 be 201a140 <== NEVER TAKEN 201a064: 80 a6 c0 1d cmp %i3, %i5 201a068: 80 88 60 ff btst 0xff, %g1 201a06c: 02 80 00 04 be 201a07c <== NEVER TAKEN 201a070: 80 a0 a0 00 cmp %g2, 0 201a074: 06 80 00 0c bl 201a0a4 <== NEVER TAKEN 201a078: 01 00 00 00 nop if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201a07c: 7f ff d5 c1 call 200f780 <__errno> 201a080: 01 00 00 00 nop rv = (off_t) -1; 201a084: 05 3f ff ff sethi %hi(0xfffffc00), %g2 if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201a088: 82 10 20 8b mov 0x8b, %g1 rv = (off_t) -1; 201a08c: 84 10 a3 ff or %g2, 0x3ff, %g2 if ( rv == (off_t) -1 ) { iop->offset = old_offset; } } } else { errno = EOVERFLOW; 201a090: c2 22 00 00 st %g1, [ %o0 ] rv = (off_t) -1; 201a094: 10 bf ff e2 b 201a01c 201a098: 86 10 00 02 mov %g2, %g3 break; } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( 201a09c: 06 bf ff ee bl 201a054 <== NEVER TAKEN 201a0a0: 80 a6 80 1c cmp %i2, %i4 (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { 201a0a4: 40 00 00 79 call 201a288 201a0a8: 90 06 60 1c add %i1, 0x1c, %o0 201a0ac: 80 a2 20 00 cmp %o0, 0 201a0b0: 02 80 00 19 be 201a114 201a0b4: 80 a6 a0 00 cmp %i2, 0 201a0b8: 80 a2 20 04 cmp %o0, 4 201a0bc: 02 80 00 16 be 201a114 201a0c0: 80 a6 a0 00 cmp %i2, 0 break; } if ( rv == 0 ) { iop->offset = new_offset; rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201a0c4: c2 06 60 2c ld [ %i1 + 0x2c ], %g1 default: break; } if ( rv == 0 ) { iop->offset = new_offset; 201a0c8: f4 3e 60 10 std %i2, [ %i1 + 0x10 ] rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); 201a0cc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 201a0d0: 90 10 00 19 mov %i1, %o0 201a0d4: 92 10 00 1c mov %i4, %o1 201a0d8: 94 10 00 1d mov %i5, %o2 201a0dc: 9f c0 40 00 call %g1 201a0e0: 96 10 00 12 mov %l2, %o3 201a0e4: 84 10 00 08 mov %o0, %g2 if ( rv == (off_t) -1 ) { 201a0e8: 80 a0 bf ff cmp %g2, -1 201a0ec: 12 bf ff cc bne 201a01c 201a0f0: 86 10 00 09 mov %o1, %g3 201a0f4: 80 a2 7f ff cmp %o1, -1 201a0f8: 22 bf ff c9 be,a 201a01c <== ALWAYS TAKEN 201a0fc: e0 3e 60 10 std %l0, [ %i1 + 0x10 ] rv = (off_t) -1; } } return rv; } 201a100: 10 bf ff c8 b 201a020 <== NOT EXECUTED 201a104: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED switch ( whence ) { case SEEK_SET: reference_offset = 0; break; case SEEK_CUR: reference_offset = old_offset; 201a108: 84 10 00 10 mov %l0, %g2 201a10c: 10 bf ff c8 b 201a02c 201a110: 86 10 00 11 mov %l1, %g3 || (reference_offset < 0 && new_offset <= offset) ) { switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) { case RTEMS_FILESYSTEM_DIRECTORY: case RTEMS_FILESYSTEM_MEMORY_FILE: if ( new_offset < 0 ) { 201a114: 36 bf ff ed bge,a 201a0c8 201a118: c2 06 60 2c ld [ %i1 + 0x2c ], %g1 201a11c: 30 bf ff b9 b,a 201a000 off_t old_offset; off_t new_offset; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 201a120: 7f ff d5 98 call 200f780 <__errno> 201a124: 01 00 00 00 nop 201a128: 05 3f ff ff sethi %hi(0xfffffc00), %g2 201a12c: 82 10 20 09 mov 9, %g1 201a130: 84 10 a3 ff or %g2, 0x3ff, %g2 201a134: c2 22 00 00 st %g1, [ %o0 ] 201a138: 10 bf ff b9 b 201a01c 201a13c: 86 10 00 02 mov %g2, %g3 new_offset = reference_offset + offset; if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) || (reference_offset < 0 && new_offset <= offset) 201a140: 08 bf ff cb bleu 201a06c <== NOT EXECUTED 201a144: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 201a148: 10 bf ff c8 b 201a068 <== NOT EXECUTED 201a14c: 82 10 20 00 clr %g1 <== NOT EXECUTED } new_offset = reference_offset + offset; if ( rv == 0 ) { if ( (reference_offset >= 0 && new_offset >= offset) 201a150: 12 bf ff be bne 201a048 201a154: 80 88 60 ff btst 0xff, %g1 201a158: 80 a7 40 1b cmp %i5, %i3 201a15c: 08 bf ff bb bleu 201a048 <== ALWAYS TAKEN 201a160: 80 88 60 ff btst 0xff, %g1 201a164: 10 bf ff b8 b 201a044 <== NOT EXECUTED 201a168: 82 10 20 00 clr %g1 <== NOT EXECUTED =============================================================================== 02003c04 : #include "malloc_p.h" void *malloc( size_t size ) { 2003c04: 9d e3 bf a0 save %sp, -96, %sp void *return_this; MSBUMP(malloc_calls, 1); 2003c08: 03 00 80 74 sethi %hi(0x201d000), %g1 2003c0c: 82 10 62 50 or %g1, 0x250, %g1 ! 201d250 2003c10: c4 00 60 04 ld [ %g1 + 4 ], %g2 #include "malloc_p.h" void *malloc( size_t size ) { 2003c14: ba 10 00 18 mov %i0, %i5 void *return_this; MSBUMP(malloc_calls, 1); 2003c18: 84 00 a0 01 inc %g2 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2003c1c: 7f ff ff a8 call 2003abc 2003c20: c4 20 60 04 st %g2, [ %g1 + 4 ] /* * Validate the parameters */ if ( !size ) 2003c24: 80 a7 60 00 cmp %i5, 0 2003c28: 02 80 00 1e be 2003ca0 2003c2c: 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()) && 2003c30: 03 00 80 75 sethi %hi(0x201d400), %g1 2003c34: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current> 2003c38: 80 a0 60 03 cmp %g1, 3 2003c3c: 02 80 00 1b be 2003ca8 2003c40: 03 00 80 71 sethi %hi(0x201c400), %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 ); 2003c44: d0 00 63 38 ld [ %g1 + 0x338 ], %o0 ! 201c738 2003c48: 92 10 00 1d mov %i5, %o1 2003c4c: 94 10 20 00 clr %o2 2003c50: 40 00 17 93 call 2009a9c <_Protected_heap_Allocate_aligned_with_boundary> 2003c54: 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 ) { 2003c58: b0 92 20 00 orcc %o0, 0, %i0 2003c5c: 02 80 00 21 be 2003ce0 <== NEVER TAKEN 2003c60: 03 00 80 73 sethi %hi(0x201cc00), %g1 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2003c64: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003c68: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 201ce90 2003c6c: 80 a0 60 00 cmp %g1, 0 2003c70: 02 80 00 04 be 2003c80 2003c74: 90 10 00 18 mov %i0, %o0 (*rtems_malloc_dirty_helper)( return_this, size ); 2003c78: 9f c0 40 00 call %g1 2003c7c: 92 10 00 1d mov %i5, %o1 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 2003c80: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003c84: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 201ce98 2003c88: 80 a0 60 00 cmp %g1, 0 2003c8c: 02 80 00 25 be 2003d20 2003c90: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 2003c94: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003c98: 9f c0 40 00 call %g1 2003c9c: 90 10 00 18 mov %i0, %o0 return return_this; } 2003ca0: 81 c7 e0 08 ret 2003ca4: 81 e8 00 00 restore /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 2003ca8: 7f ff ff 73 call 2003a74 2003cac: 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()) && 2003cb0: 80 8a 20 ff btst 0xff, %o0 2003cb4: 02 bf ff fb be 2003ca0 <== NEVER TAKEN 2003cb8: 03 00 80 71 sethi %hi(0x201c400), %g1 2003cbc: d0 00 63 38 ld [ %g1 + 0x338 ], %o0 ! 201c738 2003cc0: 92 10 00 1d mov %i5, %o1 2003cc4: 94 10 20 00 clr %o2 2003cc8: 40 00 17 75 call 2009a9c <_Protected_heap_Allocate_aligned_with_boundary> 2003ccc: 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 ) { 2003cd0: b0 92 20 00 orcc %o0, 0, %i0 2003cd4: 12 bf ff e5 bne 2003c68 2003cd8: 03 00 80 73 sethi %hi(0x201cc00), %g1 if (rtems_malloc_sbrk_helpers) 2003cdc: 03 00 80 73 sethi %hi(0x201cc00), %g1 2003ce0: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 2003ce4: 80 a0 60 00 cmp %g1, 0 2003ce8: 02 80 00 0a be 2003d10 2003cec: 01 00 00 00 nop return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2003cf0: c2 00 60 04 ld [ %g1 + 4 ], %g1 2003cf4: 9f c0 40 00 call %g1 2003cf8: 90 10 00 1d mov %i5, %o0 if ( !return_this ) { 2003cfc: 80 a2 20 00 cmp %o0, 0 2003d00: 02 80 00 04 be 2003d10 2003d04: 01 00 00 00 nop 2003d08: 10 bf ff d7 b 2003c64 2003d0c: b0 10 00 08 mov %o0, %i0 errno = ENOMEM; 2003d10: 40 00 2e 9c call 200f780 <__errno> 2003d14: 01 00 00 00 nop 2003d18: 82 10 20 0c mov 0xc, %g1 ! c 2003d1c: c2 22 00 00 st %g1, [ %o0 ] return (void *) 0; 2003d20: 81 c7 e0 08 ret 2003d24: 81 e8 00 00 restore =============================================================================== 02003cf0 : } static void *malloc_sbrk_extend_and_allocate( size_t size ) { 2003cf0: 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; 2003cf4: 03 00 80 75 sethi %hi(0x201d400), %g1 2003cf8: fa 00 62 58 ld [ %g1 + 0x258 ], %i5 ! 201d658 if ( sbrk_amount == 0 ) 2003cfc: 80 a7 60 00 cmp %i5, 0 2003d00: 02 80 00 20 be 2003d80 <== NEVER TAKEN 2003d04: b2 10 00 18 mov %i0, %i1 return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 2003d08: 92 10 00 1d mov %i5, %o1 2003d0c: 40 00 53 4c call 2018a3c <.udiv> 2003d10: 90 06 00 1d add %i0, %i5, %o0 2003d14: 40 00 53 10 call 2018954 <.umul> 2003d18: 92 10 00 1d mov %i5, %o1 starting_address = (void *) sbrk(the_size); 2003d1c: 7f ff f5 c2 call 2001424 2003d20: ba 10 00 08 mov %o0, %i5 if ( starting_address == (void*) -1 ) 2003d24: 80 a2 3f ff cmp %o0, -1 2003d28: 02 80 00 16 be 2003d80 2003d2c: 92 10 00 08 mov %o0, %o1 return (void *) 0; if ( !_Protected_heap_Extend( 2003d30: 39 00 80 72 sethi %hi(0x201c800), %i4 2003d34: d0 07 21 a8 ld [ %i4 + 0x1a8 ], %o0 ! 201c9a8 2003d38: 40 00 17 53 call 2009a84 <_Protected_heap_Extend> 2003d3c: 94 10 00 1d mov %i5, %o2 2003d40: 80 8a 20 ff btst 0xff, %o0 2003d44: 02 80 00 09 be 2003d68 2003d48: 03 00 80 75 sethi %hi(0x201d400), %g1 2003d4c: f0 07 21 a8 ld [ %i4 + 0x1a8 ], %i0 sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 2003d50: c4 00 62 28 ld [ %g1 + 0x228 ], %g2 2003d54: b4 10 20 00 clr %i2 2003d58: ba 07 40 02 add %i5, %g2, %i5 2003d5c: fa 20 62 28 st %i5, [ %g1 + 0x228 ] 2003d60: 40 00 17 3b call 2009a4c <_Protected_heap_Allocate_aligned_with_boundary> 2003d64: 97 e8 20 00 restore %g0, 0, %o3 if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 2003d68: 7f ff f5 af call 2001424 2003d6c: 90 20 00 1d neg %i5, %o0 errno = ENOMEM; 2003d70: 40 00 2f 4b call 200fa9c <__errno> 2003d74: 01 00 00 00 nop 2003d78: 82 10 20 0c mov 0xc, %g1 ! c 2003d7c: c2 22 00 00 st %g1, [ %o0 ] MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 2003d80: 81 c7 e0 08 ret 2003d84: 91 e8 20 00 restore %g0, 0, %o0 =============================================================================== 02003d88 : static void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 2003d88: 9d e3 bf a0 save %sp, -96, %sp uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 2003d8c: 03 00 80 75 sethi %hi(0x201d400), %g1 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 2003d90: 80 a6 20 00 cmp %i0, 0 2003d94: 02 80 00 04 be 2003da4 2003d98: f2 20 62 58 st %i1, [ %g1 + 0x258 ] } starting_address = (void *)uaddress; } return starting_address; } 2003d9c: 81 c7 e0 08 ret 2003da0: 81 e8 00 00 restore * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 2003da4: 7f ff f5 a0 call 2001424 2003da8: 90 10 00 19 mov %i1, %o0 if (uaddress == (uintptr_t) -1) { 2003dac: 80 a2 3f ff cmp %o0, -1 2003db0: 02 80 00 08 be 2003dd0 <== ALWAYS TAKEN 2003db4: 80 8a 20 07 btst 7, %o0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 2003db8: 02 80 00 04 be 2003dc8 <== NOT EXECUTED 2003dbc: 01 00 00 00 nop <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 2003dc0: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003dc4: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 2003dc8: 81 c7 e0 08 ret <== NOT EXECUTED 2003dcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 2003dd0: 40 00 11 b1 call 2008494 2003dd4: 90 10 20 1a mov 0x1a, %o0 =============================================================================== 0200e5f0 : */ static void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 200e5f0: 9d e3 bf a0 save %sp, -96, %sp /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i<== NEVER TAKEN 200e5fc: d0 06 00 00 ld [ %i0 ], %o0 200e600: ba 10 00 08 mov %o0, %i5 200e604: b8 10 20 00 clr %i4 if ( b[i] ) { 200e608: d0 07 40 00 ld [ %i5 ], %o0 200e60c: 80 a2 20 00 cmp %o0, 0 200e610: 02 80 00 05 be 200e624 200e614: b8 07 20 01 inc %i4 memfile_free_block( b[i] ); 200e618: 7f ff ff ed call 200e5cc 200e61c: 01 00 00 00 nop b[i] = 0; 200e620: c0 27 40 00 clr [ %i5 ] /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 200e62c: ba 07 60 04 add %i5, 4, %i5 200e630: d0 06 00 00 ld [ %i0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 200e634: 7f ff ff e6 call 200e5cc 200e638: 01 00 00 00 nop *block_table = 0; 200e63c: c0 26 00 00 clr [ %i0 ] } 200e640: 81 c7 e0 08 ret 200e644: 81 e8 00 00 restore =============================================================================== 0200ec24 : */ int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 200ec24: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200ec28: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 200ec2c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200ec30: 80 a0 40 19 cmp %g1, %i1 200ec34: 06 80 00 13 bl 200ec80 <== NEVER TAKEN 200ec38: 90 10 00 1d mov %i5, %o0 200ec3c: 22 80 00 0d be,a 200ec70 <== ALWAYS TAKEN 200ec40: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 /* * 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; 200ec44: f2 27 60 50 st %i1, [ %i5 + 0x50 ] <== NOT EXECUTED 200ec48: f4 27 60 54 st %i2, [ %i5 + 0x54 ] iop->size = the_jnode->info.file.size; 200ec4c: f2 26 20 08 st %i1, [ %i0 + 8 ] 200ec50: f4 26 20 0c st %i2, [ %i0 + 0xc ] IMFS_update_atime( the_jnode ); 200ec54: 90 07 bf f8 add %fp, -8, %o0 200ec58: 7f ff d3 23 call 20038e4 200ec5c: 92 10 20 00 clr %o1 200ec60: c2 07 bf f8 ld [ %fp + -8 ], %g1 200ec64: c2 27 60 40 st %g1, [ %i5 + 0x40 ] return 0; } 200ec68: 81 c7 e0 08 ret 200ec6c: 91 e8 20 00 restore %g0, 0, %o0 * 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 ) 200ec70: 80 a0 40 1a cmp %g1, %i2 200ec74: 3a bf ff f5 bcc,a 200ec48 200ec78: f2 27 60 50 st %i1, [ %i5 + 0x50 ] return IMFS_memfile_extend( the_jnode, length ); 200ec7c: 90 10 00 1d mov %i5, %o0 200ec80: 92 10 00 19 mov %i1, %o1 200ec84: 7f ff fe db call 200e7f0 200ec88: 94 10 00 1a mov %i2, %o2 200ec8c: 81 c7 e0 08 ret 200ec90: 91 e8 00 08 restore %g0, %o0, %o0 =============================================================================== 0200ec94 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 200ec94: 9d e3 bf a0 save %sp, -96, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 200ec98: fa 06 20 24 ld [ %i0 + 0x24 ], %i5 200ec9c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { 200eca0: c2 00 40 00 ld [ %g1 ], %g1 200eca4: 80 a0 60 05 cmp %g1, 5 200eca8: 02 80 00 0f be 200ece4 200ecac: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 200ecb0: 90 10 00 1d mov %i5, %o0 200ecb4: 92 10 00 02 mov %g2, %o1 200ecb8: 7f ff fe ce call 200e7f0 200ecbc: 94 10 00 03 mov %g3, %o2 200ecc0: 80 a2 20 00 cmp %o0, 0 200ecc4: 12 80 00 19 bne 200ed28 200ecc8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 200eccc: d8 1f 60 50 ldd [ %i5 + 0x50 ], %o4 200ecd0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 200ecd4: d8 3e 20 08 std %o4, [ %i0 + 8 ] } return iop->offset; } 200ecd8: b0 10 00 02 mov %g2, %i0 200ecdc: 81 c7 e0 08 ret 200ece0: 93 e8 00 03 restore %g0, %g3, %o1 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 200ece4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 200ece8: 80 a0 80 01 cmp %g2, %g1 200ecec: 14 80 00 08 bg 200ed0c <== NEVER TAKEN 200ecf0: c8 07 60 54 ld [ %i5 + 0x54 ], %g4 200ecf4: 80 a0 80 01 cmp %g2, %g1 200ecf8: 32 bf ff f9 bne,a 200ecdc <== NEVER TAKEN 200ecfc: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 200ed00: 80 a0 c0 04 cmp %g3, %g4 200ed04: 28 bf ff f6 bleu,a 200ecdc <== ALWAYS TAKEN 200ed08: b0 10 00 02 mov %g2, %i0 iop->offset = the_jnode->info.linearfile.size; 200ed0c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED 200ed10: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 200ed14: c8 26 20 14 st %g4, [ %i0 + 0x14 ] <== NOT EXECUTED 200ed18: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 200ed1c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED 200ed20: 81 c7 e0 08 ret <== NOT EXECUTED 200ed24: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 200ed28: 40 00 02 96 call 200f780 <__errno> 200ed2c: 01 00 00 00 nop 200ed30: 05 3f ff ff sethi %hi(0xfffffc00), %g2 200ed34: 82 10 20 1c mov 0x1c, %g1 200ed38: 84 10 a3 ff or %g2, 0x3ff, %g2 200ed3c: c2 22 00 00 st %g1, [ %o0 ] 200ed40: 10 bf ff e6 b 200ecd8 200ed44: 86 10 00 02 mov %g2, %g3 =============================================================================== 0200eb6c : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200eb6c: 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)) 200eb70: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 200eb74: ba 10 00 18 mov %i0, %i5 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 200eb78: 80 88 62 04 btst 0x204, %g1 200eb7c: 02 80 00 07 be 200eb98 200eb80: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 200eb84: c4 07 20 4c ld [ %i4 + 0x4c ], %g2 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 200eb88: c4 00 80 00 ld [ %g2 ], %g2 200eb8c: 80 a0 a0 05 cmp %g2, 5 200eb90: 22 80 00 0c be,a 200ebc0 <== NEVER TAKEN 200eb94: d8 07 20 54 ld [ %i4 + 0x54 ], %o4 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200eb98: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 200eb9c: 80 88 62 00 btst 0x200, %g1 200eba0: 22 80 00 05 be,a 200ebb4 200eba4: c4 3f 60 08 std %g2, [ %i5 + 8 ] iop->offset = the_jnode->info.file.size; 200eba8: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] 200ebac: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2 iop->size = the_jnode->info.file.size; 200ebb0: c4 3f 60 08 std %g2, [ %i5 + 8 ] return 0; 200ebb4: b0 10 20 00 clr %i0 } 200ebb8: 81 c7 e0 08 ret 200ebbc: 81 e8 00 00 restore * Perform 'copy on write' for linear files */ 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; 200ebc0: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; 200ebc4: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200ebc8: c0 27 20 50 clr [ %i4 + 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; 200ebcc: 82 10 62 14 or %g1, 0x214, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; 200ebd0: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; 200ebd4: c0 27 20 58 clr [ %i4 + 0x58 ] <== 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; 200ebd8: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 200ebdc: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) 200ebe0: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED 200ebe4: 12 80 00 06 bne 200ebfc <== NOT EXECUTED 200ebe8: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED 200ebec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 200ebf0: 84 10 20 00 clr %g2 <== NOT EXECUTED 200ebf4: 10 bf ff ea b 200eb9c <== NOT EXECUTED 200ebf8: 86 10 20 00 clr %g3 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 200ebfc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200ec00: 92 10 20 00 clr %o1 <== NOT EXECUTED 200ec04: 94 10 20 00 clr %o2 <== NOT EXECUTED 200ec08: 7f ff ff 55 call 200e95c <== NOT EXECUTED 200ec0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200ec10: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 200ec14: 02 bf ff e9 be 200ebb8 <== NOT EXECUTED 200ec18: 01 00 00 00 nop <== NOT EXECUTED 200ec1c: 10 bf ff df b 200eb98 <== NOT EXECUTED 200ec20: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED =============================================================================== 02003e48 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2003e48: 9d e3 bf 48 save %sp, -184, %sp int rv = 0; if ( 2003e4c: 80 a6 e0 01 cmp %i3, 1 2003e50: 18 80 00 92 bgu 2004098 2003e54: 01 00 00 00 nop options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 2003e58: 40 00 23 16 call 200cab0 2003e5c: 90 10 00 1a mov %i2, %o0 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 2003e60: a0 92 20 00 orcc %o0, 0, %l0 2003e64: 02 80 00 bc be 2004154 2003e68: 80 a6 60 00 cmp %i1, 0 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2003e6c: 02 80 00 87 be 2004088 2003e70: 90 10 00 19 mov %i1, %o0 } return rv; } int mount( 2003e74: 40 00 33 db call 2010de0 2003e78: aa 10 00 19 mov %i1, %l5 2003e7c: a6 02 20 01 add %o0, 1, %l3 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; 2003e80: 40 00 33 d8 call 2010de0 2003e84: 90 10 00 1a mov %i2, %o0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2003e88: a2 10 20 00 clr %l1 2003e8c: 80 a6 20 00 cmp %i0, 0 2003e90: 02 80 00 05 be 2003ea4 2003e94: a8 10 00 08 mov %o0, %l4 2003e98: 40 00 33 d2 call 2010de0 2003e9c: 90 10 00 18 mov %i0, %o0 2003ea0: a2 02 20 01 add %o0, 1, %l1 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003ea4: 92 04 c0 14 add %l3, %l4, %o1 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003ea8: 90 10 20 01 mov 1, %o0 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; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 2003eac: 92 02 60 8d add %o1, 0x8d, %o1 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2003eb0: 7f ff fd b4 call 2003580 2003eb4: 92 02 40 11 add %o1, %l1, %o1 if ( mt_entry != NULL ) { 2003eb8: ba 92 20 00 orcc %o0, 0, %i5 2003ebc: 02 80 00 6d be 2004070 <== NEVER TAKEN 2003ec0: a4 07 60 8c add %i5, 0x8c, %l2 rtems_filesystem_global_location_t *mt_fs_root = (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); 2003ec4: 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; 2003ec8: a8 05 20 01 inc %l4 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 ); 2003ecc: 90 10 00 12 mov %l2, %o0 2003ed0: 40 00 30 88 call 20100f0 2003ed4: 94 10 00 14 mov %l4, %o2 mt_entry->type = str; str += filesystemtype_size; 2003ed8: b4 04 80 14 add %l2, %l4, %i2 memcpy( str, source_or_null, source_size ); 2003edc: 92 10 00 18 mov %i0, %o1 2003ee0: 94 10 00 11 mov %l1, %o2 2003ee4: 90 10 00 1a mov %i2, %o0 2003ee8: 40 00 30 82 call 20100f0 2003eec: e4 27 60 5c st %l2, [ %i5 + 0x5c ] mt_entry->dev = str; str += source_size; 2003ef0: a2 06 80 11 add %i2, %l1, %l1 memcpy( str, target, target_size ); 2003ef4: 92 10 00 15 mov %l5, %o1 2003ef8: 94 10 00 13 mov %l3, %o2 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 2003efc: f4 27 60 60 st %i2, [ %i5 + 0x60 ] str += source_size; memcpy( str, target, target_size ); 2003f00: 40 00 30 7c call 20100f0 2003f04: 90 10 00 11 mov %l1, %o0 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003f08: 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 = 2003f0c: b4 07 60 64 add %i5, 0x64, %i2 mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003f10: 94 10 20 30 mov 0x30, %o2 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 2003f14: c2 2f 60 1c stb %g1, [ %i5 + 0x1c ] memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2003f18: e2 27 60 58 st %l1, [ %i5 + 0x58 ] str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 2003f1c: f4 27 60 18 st %i2, [ %i5 + 0x18 ] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2003f20: 90 07 60 28 add %i5, 0x28, %o0 2003f24: 13 00 80 6c sethi %hi(0x201b000), %o1 2003f28: 40 00 30 72 call 20100f0 2003f2c: 92 12 62 2c or %o1, 0x22c, %o1 ! 201b22c mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 2003f30: 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 ); 2003f34: 90 07 60 08 add %i5, 8, %o0 2003f38: 92 10 00 1a mov %i2, %o1 2003f3c: 94 10 20 01 mov 1, %o2 2003f40: 96 10 20 28 mov 0x28, %o3 2003f44: c2 27 60 80 st %g1, [ %i5 + 0x80 ] 2003f48: 40 00 12 26 call 20087e0 <_Chain_Initialize> 2003f4c: 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 ); 2003f50: 90 10 00 1d mov %i5, %o0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 2003f54: f6 2f 60 1d stb %i3, [ %i5 + 0x1d ] rv = (*fsmount_me_h)( mt_entry, data ); 2003f58: 9f c4 00 00 call %l0 2003f5c: 92 10 00 1c mov %i4, %o1 if ( rv == 0 ) { 2003f60: b0 92 20 00 orcc %o0, 0, %i0 2003f64: 12 80 00 30 bne 2004024 2003f68: 80 a6 60 00 cmp %i1, 0 if ( target != NULL ) { 2003f6c: 02 80 00 51 be 20040b0 2003f70: 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 = 2003f74: 94 10 20 1f mov 0x1f, %o2 2003f78: 40 00 03 6c call 2004d28 2003f7c: 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)( 2003f80: c6 02 20 14 ld [ %o0 + 0x14 ], %g3 loc, &loc->mt_entry->mt_fs_root->location 2003f84: 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)( 2003f88: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 2003f8c: 9f c0 40 00 call %g1 2003f90: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1 rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_root( currentloc ) ) { 2003f94: 80 8a 20 ff btst 0xff, %o0 2003f98: 12 80 00 6a bne 2004140 2003f9c: 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( 2003fa0: 40 00 04 17 call 2004ffc 2003fa4: 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 ); 2003fa8: 40 00 04 9d call 200521c 2003fac: 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 ); 2003fb0: c2 02 20 14 ld [ %o0 + 0x14 ], %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 ); 2003fb4: 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 ); 2003fb8: c2 00 60 30 ld [ %g1 + 0x30 ], %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; 2003fbc: d0 27 60 14 st %o0, [ %i5 + 0x14 ] rv = (*mt_point_node->location.ops->mount_h)( mt_entry ); 2003fc0: 9f c0 40 00 call %g1 2003fc4: 90 10 00 1d mov %i5, %o0 if ( rv == 0 ) { 2003fc8: b0 92 20 00 orcc %o0, 0, %i0 2003fcc: 22 80 00 1a be,a 2004034 2003fd0: 39 00 80 74 sethi %hi(0x201d000), %i4 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 2003fd4: 40 00 04 3f call 20050d0 2003fd8: 90 10 00 1c mov %i4, %o0 } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 2003fdc: 40 00 03 59 call 2004d40 2003fe0: 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 ) { 2003fe4: 80 a6 20 00 cmp %i0, 0 2003fe8: 32 80 00 0b bne,a 2004014 2003fec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 errno = EINVAL; rv = -1; } return rv; } 2003ff0: 81 c7 e0 08 ret 2003ff4: 81 e8 00 00 restore rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 2003ff8: 40 00 2d e2 call 200f780 <__errno> <== NOT EXECUTED 2003ffc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004000: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2004004: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2004008: 40 00 0f 93 call 2007e54 <== NOT EXECUTED 200400c: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 <== NOT EXECUTED } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->mt_fs_root->location.ops->fsunmount_me_h)( mt_entry ); 2004010: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED 2004014: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 2004018: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 200401c: 9f c0 40 00 call %g1 2004020: 90 10 00 1d mov %i5, %o0 } } if ( rv != 0 ) { free( mt_entry ); 2004024: 7f ff fe 06 call 200383c 2004028: 90 10 00 1d mov %i5, %o0 200402c: 81 c7 e0 08 ret 2004030: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2004034: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 2004038: 92 10 20 00 clr %o1 200403c: 40 00 0f 3c call 2007d2c 2004040: 94 10 20 00 clr %o2 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2004044: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 2004048: 03 00 80 72 sethi %hi(0x201c800), %g1 200404c: 82 10 60 44 or %g1, 0x44, %g1 ! 201c844 2004050: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_node->next = tail; 2004054: 86 00 60 04 add %g1, 4, %g3 2004058: c6 27 40 00 st %g3, [ %i5 ] tail->previous = the_node; 200405c: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 2004060: fa 20 80 00 st %i5, [ %g2 ] 2004064: 40 00 0f 7c call 2007e54 2004068: c4 27 60 04 st %g2, [ %i5 + 4 ] 200406c: 30 bf ff dc b,a 2003fdc } } else { errno = ENOMEM; 2004070: 40 00 2d c4 call 200f780 <__errno> <== NOT EXECUTED 2004074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004078: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200407c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004080: 81 c7 e0 08 ret <== NOT EXECUTED 2004084: 81 e8 00 00 restore <== NOT EXECUTED const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 2004088: 2b 00 80 6c sethi %hi(0x201b000), %l5 200408c: a6 10 20 02 mov 2, %l3 2004090: 10 bf ff 7c b 2003e80 2004094: aa 15 62 28 or %l5, 0x228, %l5 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 2004098: 40 00 2d ba call 200f780 <__errno> 200409c: b0 10 3f ff mov -1, %i0 20040a0: 82 10 20 16 mov 0x16, %g1 20040a4: c2 22 00 00 st %g1, [ %o0 ] rv = -1; } return rv; } 20040a8: 81 c7 e0 08 ret 20040ac: 81 e8 00 00 restore */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 20040b0: 39 00 80 74 sethi %hi(0x201d000), %i4 20040b4: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 ! 201d240 20040b8: 92 10 20 00 clr %o1 20040bc: 40 00 0f 1c call 2007d2c 20040c0: 94 10 20 00 clr %o2 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 20040c4: 03 00 80 72 sethi %hi(0x201c800), %g1 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 20040c8: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 ! 201c844 20040cc: 82 10 60 44 or %g1, 0x44, %g1 20040d0: 86 00 60 04 add %g1, 4, %g3 20040d4: 80 a0 80 03 cmp %g2, %g3 20040d8: 12 bf ff c8 bne 2003ff8 <== NEVER TAKEN 20040dc: 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; 20040e0: c6 00 60 08 ld [ %g1 + 8 ], %g3 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 20040e4: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 the_node->next = tail; 20040e8: c4 27 40 00 st %g2, [ %i5 ] tail->previous = the_node; 20040ec: fa 20 60 08 st %i5, [ %g1 + 8 ] old_last->next = the_node; 20040f0: fa 20 c0 00 st %i5, [ %g3 ] 20040f4: 40 00 0f 58 call 2007e54 20040f8: c6 27 60 04 st %g3, [ %i5 + 4 ] } 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 ); 20040fc: 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 = 2004100: 40 00 04 14 call 2005150 2004104: 90 10 00 1d mov %i5, %o0 2004108: 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 = 200410c: 40 00 04 11 call 2005150 2004110: 90 10 00 1d mov %i5, %o0 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 2004114: 39 00 80 72 sethi %hi(0x201c800), %i4 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 = 2004118: ba 10 00 08 mov %o0, %i5 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 200411c: d0 07 20 64 ld [ %i4 + 0x64 ], %o0 2004120: 92 10 00 1b mov %i3, %o1 2004124: 40 00 04 01 call 2005128 2004128: 90 02 20 04 add %o0, 4, %o0 &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 200412c: d0 07 20 64 ld [ %i4 + 0x64 ], %o0 2004130: 40 00 03 fe call 2005128 2004134: 92 10 00 1d mov %i5, %o1 2004138: 81 c7 e0 08 ret 200413c: 81 e8 00 00 restore rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 2004140: 90 07 bf a8 add %fp, -88, %o0 2004144: 92 10 20 10 mov 0x10, %o1 2004148: 40 00 02 30 call 2004a08 200414c: b0 10 3f ff mov -1, %i0 2004150: 30 bf ff a3 b,a 2003fdc } else { errno = ENOMEM; rv = -1; } } else { errno = EINVAL; 2004154: 40 00 2d 8b call 200f780 <__errno> 2004158: b0 10 3f ff mov -1, %i0 200415c: 82 10 20 16 mov 0x16, %g1 2004160: c2 22 00 00 st %g1, [ %o0 ] 2004164: 81 c7 e0 08 ret 2004168: 81 e8 00 00 restore =============================================================================== 02009438 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2009438: 9d e3 bf a0 save %sp, -96, %sp int rv = -1; if (target != NULL) { 200943c: 90 96 60 00 orcc %i1, 0, %o0 2009440: 02 80 00 0b be 200946c 2009444: 01 00 00 00 nop rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 2009448: 40 00 02 fd call 200a03c 200944c: 92 10 21 ff mov 0x1ff, %o1 ! 1ff if (rv == 0) { 2009450: 82 92 20 00 orcc %o0, 0, %g1 2009454: 02 80 00 04 be 2009464 <== ALWAYS TAKEN 2009458: 01 00 00 00 nop } else { errno = EINVAL; } return rv; } 200945c: 81 c7 e0 08 ret 2009460: 91 e8 00 01 restore %g0, %g1, %o0 int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 2009464: 40 00 00 08 call 2009484 2009468: 81 e8 00 00 restore options, data ); } } else { errno = EINVAL; 200946c: 40 00 63 07 call 2022088 <__errno> 2009470: 01 00 00 00 nop 2009474: 84 10 20 16 mov 0x16, %g2 ! 16 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 2009478: 82 10 3f ff mov -1, %g1 options, data ); } } else { errno = EINVAL; 200947c: 10 bf ff f8 b 200945c 2009480: c4 22 00 00 st %g2, [ %o0 ] =============================================================================== 020380b0 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 20380b0: 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; 20380b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 20380b8: c0 27 bf f8 clr [ %fp + -8 ] 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; 20380bc: e0 00 60 20 ld [ %g1 + 0x20 ], %l0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 20380c0: c0 37 bf fc clrh [ %fp + -4 ] fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 20380c4: 82 10 3f ff mov -1, %g1 uint16_t date = 0; 20380c8: 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; 20380cc: c0 27 bf e8 clr [ %fp + -24 ] dir_pos->sname.ofs = 0; 20380d0: c0 27 bf ec clr [ %fp + -20 ] dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 20380d4: c2 27 bf f0 st %g1, [ %fp + -16 ] dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 20380d8: c2 27 bf f4 st %g1, [ %fp + -12 ] uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 20380dc: c0 27 bf a8 clr [ %fp + -88 ] 20380e0: c0 27 bf ac clr [ %fp + -84 ] 20380e4: c0 27 bf b0 clr [ %fp + -80 ] 20380e8: c0 27 bf b4 clr [ %fp + -76 ] 20380ec: c0 27 bf b8 clr [ %fp + -72 ] 20380f0: c0 27 bf bc clr [ %fp + -68 ] 20380f4: c0 27 bf c0 clr [ %fp + -64 ] 20380f8: c0 27 bf c4 clr [ %fp + -60 ] memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 20380fc: c0 27 bf 68 clr [ %fp + -152 ] 2038100: c0 27 bf 6c clr [ %fp + -148 ] 2038104: c0 27 bf 70 clr [ %fp + -144 ] 2038108: c0 27 bf 74 clr [ %fp + -140 ] 203810c: c0 27 bf 78 clr [ %fp + -136 ] 2038110: c0 27 bf 7c clr [ %fp + -132 ] 2038114: c0 27 bf 80 clr [ %fp + -128 ] 2038118: c0 27 bf 84 clr [ %fp + -124 ] 203811c: c0 27 bf 88 clr [ %fp + -120 ] 2038120: c0 27 bf 8c clr [ %fp + -116 ] 2038124: c0 27 bf 90 clr [ %fp + -112 ] 2038128: c0 27 bf 94 clr [ %fp + -108 ] 203812c: c0 27 bf 98 clr [ %fp + -104 ] 2038130: c0 27 bf 9c clr [ %fp + -100 ] 2038134: c0 27 bf a0 clr [ %fp + -96 ] 2038138: c0 27 bf a4 clr [ %fp + -92 ] msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 203813c: b8 10 00 18 mov %i0, %i4 fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 2038140: 80 a6 e1 04 cmp %i3, 0x104 2038144: 14 80 00 cc bg 2038474 <== NEVER TAKEN 2038148: e2 06 20 08 ld [ %i0 + 8 ], %l1 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 203814c: 90 10 00 1a mov %i2, %o0 2038150: 92 10 00 1b mov %i3, %o1 2038154: 94 07 bf a8 add %fp, -88, %o2 2038158: 40 00 01 2a call 2038600 203815c: 96 10 20 0b mov 0xb, %o3 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 2038160: a4 92 20 00 orcc %o0, 0, %l2 2038164: 02 80 00 ca be 203848c <== NEVER TAKEN 2038168: 90 10 20 00 clr %o0 rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 203816c: c0 2f bf b4 clrb [ %fp + -76 ] /* set up last write date and time */ time_ret = time(NULL); 2038170: 40 00 6f 4a call 2053e98