=============================================================================== 000450e0 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 450e0: 4e56 ffd8 linkw %fp,#-40 450e4: 206e 0008 moveal %fp@(8),%a0 450e8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 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 )); 450ec: 2608 movel %a0,%d3 450ee: 49f9 0005 24a6 lea 524a6 ,%a4 450f4: 0683 0000 0052 addil #82,%d3 450fa: 242e 000c movel %fp@(12),%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 450fe: 2668 004e moveal %a0@(78),%a3 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 ); 45102: b68b cmpl %a3,%d3 45104: 6700 008e beqw 45194 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 45108: 2c02 movel %d2,%d6 4510a: 45f9 0005 2ff6 lea 52ff6 ,%a2 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 45110: 283c 0005 2352 movel #336722,%d4 return; } puts(""); 45116: 4bf9 0005 3d60 lea 53d60 ,%a5 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 4511c: 5286 addql #1,%d6 4511e: 2a3c 0004 50e0 movel #282848,%d5 !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++ ) 45124: 4287 clrl %d7 45126: 4a82 tstl %d2 45128: 6d24 blts 4514e <== NEVER TAKEN fprintf(stdout, "...." ); 4512a: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 !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++ ) 45130: 5287 addql #1,%d7 fprintf(stdout, "...." ); 45132: 2f28 0008 movel %a0@(8),%sp@- 45136: 4878 0004 pea 4 4513a: 4878 0001 pea 1 4513e: 4879 0006 2719 pea 62719 45144: 4e92 jsr %a2@ !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++ ) 45146: 4fef 0010 lea %sp@(16),%sp 4514a: be82 cmpl %d2,%d7 4514c: 6fdc bles 4512a IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4514e: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 45154: 2f28 0008 movel %a0@(8),%sp@- 45158: 486b 000c pea %a3@(12) 4515c: 4e94 jsr %a4@ rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4515e: 206b 004a moveal %a3@(74),%a0 switch( IMFS_type( the_jnode ) ) { 45162: 508f addql #8,%sp 45164: 7206 moveq #6,%d1 45166: 2010 movel %a0@,%d0 45168: b280 cmpl %d0,%d1 4516a: 6446 bccs 451b2 <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 4516c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4516e: 4879 0006 2773 pea 62773 <== NOT EXECUTED 45174: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 <== NOT EXECUTED 4517a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4517e: 2044 moveal %d4,%a0 <== NOT EXECUTED 45180: 4e90 jsr %a0@ <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 45182: 206b 004a moveal %a3@(74),%a0 <== NOT EXECUTED 45186: 4fef 000c lea %sp@(12),%sp <== 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 ) ) 4518a: 4a90 tstl %a0@ <== NOT EXECUTED 4518c: 6710 beqs 4519e <== NOT EXECUTED 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 ) { 4518e: 2653 moveal %a3@,%a3 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 ); 45190: b68b cmpl %a3,%d3 45192: 6690 bnes 45124 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 45194: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4519a: 4e5e unlk %fp 4519c: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 4519e: 2f06 movel %d6,%sp@- 451a0: 2045 moveal %d5,%a0 451a2: 2f0b movel %a3,%sp@- 451a4: 4e90 jsr %a0@ 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 ) { 451a6: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); 451a8: 508f addql #8,%sp 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 ); 451aa: b68b cmpl %a3,%d3 451ac: 6600 ff76 bnew 45124 451b0: 60e2 bras 45194 ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { 451b2: 303b 0a08 movew %pc@(451bc ,%d0:l:2),%d0 451b6: 48c0 extl %d0 451b8: 4efb 0802 jmp %pc@(451bc ,%d0:l) 451bc: 0090 006e 000e oril #7208974,%d0 <== NOT EXECUTED 451c2: 000e .short 0x000e <== NOT EXECUTED 451c4: 00de .short 0x00de <== NOT EXECUTED 451c6: 0036 .short 0x0036 <== NOT EXECUTED 451c8: 00b2 2079 0006 oril #544800774,%d2 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 451ce: 3ff0 .short 0x3ff0 451d0: 2f28 0008 movel %a0@(8),%sp@- 451d4: 4878 0013 pea 13 451d8: 4878 0001 pea 1 451dc: 4879 0006 274c pea 6274c 451e2: 4e92 jsr %a2@ 451e4: 206b 004a moveal %a3@(74),%a0 451e8: 4fef 0010 lea %sp@(16),%sp 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 ) ) 451ec: 4a90 tstl %a0@ 451ee: 669e bnes 4518e <== ALWAYS TAKEN 451f0: 60ac bras 4519e <== NOT EXECUTED 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)", 451f2: 2f2b 0056 movel %a3@(86),%sp@- 451f6: 2f2b 0052 movel %a3@(82),%sp@- 451fa: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 45200: 4879 0006 2731 pea 62731 45206: 2f28 0008 movel %a0@(8),%sp@- 4520a: 2044 moveal %d4,%a0 4520c: 4e90 jsr %a0@ 4520e: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 45212: 4879 0006 2f5a pea 62f5a 45218: 4e95 jsr %a5@ 4521a: 588f addql #4,%sp 4521c: 206b 004a moveal %a3@(74),%a0 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 ) ) 45220: 4a90 tstl %a0@ 45222: 6600 ff6a bnew 4518e 45226: 6000 ff76 braw 4519e case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4522a: 2f2b 0052 movel %a3@(82),%sp@- 4522e: 2f2b 004e movel %a3@(78),%sp@- the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 45232: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 45238: 4879 0006 271e pea 6271e the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4523e: 2f28 0008 movel %a0@(8),%sp@- 45242: 2044 moveal %d4,%a0 45244: 4e90 jsr %a0@ 45246: 4fef 0010 lea %sp@(16),%sp 4524a: 60c6 bras 45212 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4524c: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 45252: 2f28 0008 movel %a0@(8),%sp@- 45256: 4878 002f pea 2f 4525a: 4eb9 0005 23d0 jsr 523d0 45260: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 45262: 4879 0006 2f5a pea 62f5a 45268: 4e95 jsr %a5@ 4526a: 588f addql #4,%sp 4526c: 60ae bras 4521c case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 4526e: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 45274: 2f28 0008 movel %a0@(8),%sp@- 45278: 4878 0012 pea 12 4527c: 4878 0001 pea 1 45280: 4879 0006 2760 pea 62760 45286: 4e92 jsr %a2@ 45288: 206b 004a moveal %a3@(74),%a0 4528c: 4fef 0010 lea %sp@(16),%sp 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 ) ) 45290: 4a90 tstl %a0@ 45292: 6600 fefa bnew 4518e 45296: 6000 ff06 braw 4519e <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4529a: 2f2b 0052 movel %a3@(82),%sp@- 4529e: 2079 0006 3ff0 moveal 63ff0 <_impure_ptr>,%a0 452a4: 4879 0006 2740 pea 62740 452aa: 2f28 0008 movel %a0@(8),%sp@- 452ae: 2044 moveal %d4,%a0 452b0: 4e90 jsr %a0@ 452b2: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); 452b6: 4879 0006 2f5a pea 62f5a 452bc: 4e95 jsr %a5@ 452be: 588f addql #4,%sp 452c0: 6000 ff5a braw 4521c =============================================================================== 0004b0e2 : 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( 4b0e2: 4280 clrl %d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b0e4: 4e56 ffe0 linkw %fp,#-32 4b0e8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b0ec: 286e 0008 moveal %fp@(8),%a4 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( 4b0f0: 263c 0004 be14 movel #310804,%d3 4b0f6: 2043 moveal %d3,%a0 { 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; 4b0f8: 266c 0020 moveal %a4@(32),%a3 bool access_ok = rtems_filesystem_eval_path_check_access( 4b0fc: 302b 003c movew %a3@(60),%d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b100: 282e 0010 movel %fp@(16),%d4 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( 4b104: 2f00 movel %d0,%sp@- rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 4b106: 242e 0014 movel %fp@(20),%d2 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( 4b10a: 302b 003a movew %a3@(58),%d0 4b10e: 2f00 movel %d0,%sp@- 4b110: 2f2b 002e movel %a3@(46),%sp@- 4b114: 4878 0001 pea 1 4b118: 2f0c movel %a4,%sp@- 4b11a: 4e90 jsr %a0@ dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 4b11c: 4fef 0014 lea %sp@(20),%sp 4b120: 4a00 tstb %d0 4b122: 660c bnes 4b130 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b124: 7001 moveq #1,%d0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b126: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b12c: 4e5e unlk %fp 4b12e: 4e75 rts static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 4b130: 7001 moveq #1,%d0 4b132: b082 cmpl %d2,%d0 4b134: 6700 012c beqw 4b262 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 4b138: 7002 moveq #2,%d0 4b13a: b082 cmpl %d2,%d0 4b13c: 6700 00bc beqw 4b1fa 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 ); 4b140: 2a0b movel %a3,%d5 4b142: 0685 0000 0052 addil #82,%d5 4b148: 4bf9 0004 f4a4 lea 4f4a4 ,%a5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4b14e: 246b 004e moveal %a3@(78),%a2 while ( current != tail ) { 4b152: ba8a cmpl %a2,%d5 4b154: 6700 0098 beqw 4b1ee IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 4b158: 2f02 movel %d2,%sp@- 4b15a: 2f04 movel %d4,%sp@- 4b15c: 486a 000c pea %a2@(12) 4b160: 4e95 jsr %a5@ 4b162: 4fef 000c lea %sp@(12),%sp && entry->name [tokenlen] == '\0'; 4b166: 4a80 tstl %d0 4b168: 667c bnes 4b1e6 4b16a: 4a32 280c tstb %a2@(0000000c,%d2:l) 4b16e: 6676 bnes 4b1e6 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4b170: 206a 004a moveal %a2@(74),%a0 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)) { 4b174: 7802 moveq #2,%d4 if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 4b176: 4aac 0004 tstl %a4@(4) 4b17a: 57c0 seq %d0 4b17c: 2210 movel %a0@,%d1 4b17e: 4480 negl %d0 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 4b180: 242c 0010 movel %a4@(16),%d2 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 4b184: 42ac 000c clrl %a4@(12) 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)) { 4b188: b881 cmpl %d1,%d4 4b18a: 6700 00ea beqw 4b276 entry = entry->info.hard_link.link_node; } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 4b18e: 7803 moveq #3,%d4 4b190: b881 cmpl %d1,%d4 4b192: 6700 008e beqw 4b222 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 4b196: 4a81 tstl %d1 4b198: 6600 0096 bnew 4b230 if ( node->info.directory.mt_fs != NULL ) { 4b19c: 2a6a 005a moveal %a2@(90),%a5 4b1a0: 4a8d tstl %a5 4b1a2: 6700 008c beqw 4b230 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 4b1a6: 4280 clrl %d0 4b1a8: 2043 moveal %d3,%a0 4b1aa: 302a 003c movew %a2@(60),%d0 4b1ae: 2f00 movel %d0,%sp@- 4b1b0: 302a 003a movew %a2@(58),%d0 4b1b4: 2f00 movel %d0,%sp@- 4b1b6: 2f2a 002e movel %a2@(46),%sp@- 4b1ba: 4878 0001 pea 1 4b1be: 2f0c movel %a4,%sp@- 4b1c0: 4e90 jsr %a0@ RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 4b1c2: 4fef 0014 lea %sp@(20),%sp 4b1c6: 4a00 tstb %d0 4b1c8: 6700 ff5a beqw 4b124 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 4b1cc: 486d 0024 pea %a5@(36) 4b1d0: 2f0c movel %a4,%sp@- 4b1d2: 4eb9 0004 4540 jsr 44540 4b1d8: 508f addql #8,%sp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b1da: 7001 moveq #1,%d0 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b1dc: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b1e2: 4e5e unlk %fp 4b1e4: 4e75 rts }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 4b1e6: 2452 moveal %a2@,%a2 } 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 ) { 4b1e8: b5c5 cmpal %d5,%a2 4b1ea: 6600 ff6c bnew 4b158 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 4b1ee: 7002 moveq #2,%d0 } } return status; } 4b1f0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b1f6: 4e5e unlk %fp 4b1f8: 4e75 rts static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 4b1fa: 2044 moveal %d4,%a0 4b1fc: 722e moveq #46,%d1 4b1fe: 1010 moveb %a0@,%d0 4b200: 49c0 extbl %d0 4b202: b280 cmpl %d0,%d1 4b204: 6600 ff3a bnew 4b140 4b208: 1028 0001 moveb %a0@(1),%d0 4b20c: 49c0 extbl %d0 4b20e: b280 cmpl %d0,%d1 4b210: 6600 ff2e bnew 4b140 { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; 4b214: 246b 0008 moveal %a3@(8),%a2 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 4b218: 4a8a tstl %a2 4b21a: 6600 ff54 bnew 4b170 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 4b21e: 7002 moveq #2,%d0 4b220: 60ce bras 4b1f0 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)) { 4b222: 0802 0004 btst #4,%d2 4b226: 6600 008a bnew 4b2b2 4b22a: 4a00 tstb %d0 4b22c: 6700 0084 beqw 4b2b2 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; 4b230: 206a 004a moveal %a2@(74),%a0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b234: 322b 0032 movew %a3@(50),%d1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b238: 0280 0000 00ff andil #255,%d0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b23e: 5381 subql #1,%d1 4b240: 3741 0032 movew %d1,%a3@(50) ++entry->reference_count; 4b244: 322a 0032 movew %a2@(50),%d1 4b248: 5281 addql #1,%d1 4b24a: 3541 0032 movew %d1,%a2@(50) currentloc->node_access = entry; 4b24e: 294a 0020 movel %a2,%a4@(32) 4b252: 2968 0004 0028 movel %a0@(4),%a4@(40) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 4b258: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4b25e: 4e5e unlk %fp 4b260: 4e75 rts static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 4b262: 2044 moveal %d4,%a0 4b264: 722e moveq #46,%d1 4b266: 1010 moveb %a0@,%d0 4b268: 49c0 extbl %d0 4b26a: b280 cmpl %d0,%d1 4b26c: 6600 fed2 bnew 4b140 4b270: 244b moveal %a3,%a2 4b272: 6000 fefc braw 4b170 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)) { 4b276: 44c2 movew %d2,%ccr 4b278: 6a2e bpls 4b2a8 entry = entry->info.hard_link.link_node; 4b27a: 246a 004e moveal %a2@(78),%a2 4b27e: 206a 004a moveal %a2@(74),%a0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b282: 322b 0032 movew %a3@(50),%d1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b286: 0280 0000 00ff andil #255,%d0 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 4b28c: 5381 subql #1,%d1 4b28e: 3741 0032 movew %d1,%a3@(50) ++entry->reference_count; 4b292: 322a 0032 movew %a2@(50),%d1 4b296: 5281 addql #1,%d1 4b298: 3541 0032 movew %d1,%a2@(50) 4b29c: 2968 0004 0028 movel %a0@(4),%a4@(40) currentloc->node_access = entry; 4b2a2: 294a 0020 movel %a2,%a4@(32) 4b2a6: 60b0 bras 4b258 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)) { 4b2a8: 4a00 tstb %d0 4b2aa: 6684 bnes 4b230 <== ALWAYS TAKEN entry = entry->info.hard_link.link_node; 4b2ac: 246a 004e moveal %a2@(78),%a2 <== NOT EXECUTED 4b2b0: 60cc bras 4b27e <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { const char *target = entry->info.sym_link.name; 4b2b2: 242a 004e movel %a2@(78),%d2 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 4b2b6: 2f02 movel %d2,%sp@- 4b2b8: 4eb9 0004 f488 jsr 4f488 4b2be: 2e80 movel %d0,%sp@ 4b2c0: 2f02 movel %d2,%sp@- 4b2c2: 2f0c movel %a4,%sp@- 4b2c4: 4eb9 0004 45b4 jsr 445b4 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)) { 4b2ca: 4fef 000c lea %sp@(12),%sp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 4b2ce: 7001 moveq #1,%d0 4b2d0: 6000 fe54 braw 4b126 =============================================================================== 000433c6 : static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 433c6: 4e56 0000 linkw %fp,#0 433ca: 206e 0008 moveal %fp@(8),%a0 433ce: 202e 000c movel %fp@(12),%d0 433d2: 226e 0010 moveal %fp@(16),%a1 433d6: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 433d8: 0c80 8004 667e cmpil #-2147195266,%d0 433de: 6724 beqs 43404 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 433e0: 2f08 movel %a0,%sp@- 433e2: 2068 0018 moveal %a0@(24),%a0 433e6: 2f09 movel %a1,%sp@- 433e8: 2f00 movel %d0,%sp@- 433ea: 2f28 004e movel %a0@(78),%sp@- 433ee: 4eb9 0004 dfb8 jsr 4dfb8 IMFS_FIFO_RETURN(err); 433f4: 4fef 0010 lea %sp@(16),%sp 433f8: 4a80 tstl %d0 433fa: 6d44 blts 43440 } 433fc: 242e fffc movel %fp@(-4),%d2 43400: 4e5e unlk %fp 43402: 4e75 rts ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43404: 4a89 tstl %a1 43406: 6722 beqs 4342a err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43408: 4280 clrl %d0 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) 4340a: 4a91 tstl %a1@ 4340c: 670e beqs 4341c iop->flags |= LIBIO_FLAGS_NO_DELAY; 4340e: 7201 moveq #1,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43410: 242e fffc movel %fp@(-4),%d2 43414: 4e5e unlk %fp if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43416: 83a8 000c orl %d1,%a0@(12) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4341a: 4e75 rts err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 4341c: 72fe moveq #-2,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 4341e: 242e fffc movel %fp@(-4),%d2 43422: 4e5e unlk %fp err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43424: c3a8 000c andl %d1,%a0@(12) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43428: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4342a: 4eb9 0004 fd8c jsr 4fd8c <__errno> ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43430: 740e moveq #14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43432: 2040 moveal %d0,%a0 43434: 70ff moveq #-1,%d0 43436: 2082 movel %d2,%a0@ } 43438: 242e fffc movel %fp@(-4),%d2 4343c: 4e5e unlk %fp 4343e: 4e75 rts 43440: 2400 movel %d0,%d2 43442: 4482 negl %d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43444: 4eb9 0004 fd8c jsr 4fd8c <__errno> 4344a: 2040 moveal %d0,%a0 4344c: 70ff moveq #-1,%d0 4344e: 2082 movel %d2,%a0@ 43450: 60e6 bras 43438 ... =============================================================================== 00043280 : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 43280: 4e56 fff8 linkw %fp,#-8 43284: 206e 0008 moveal %fp@(8),%a0 43288: 2f0a movel %a2,%sp@- 4328a: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 4328c: 2f08 movel %a0,%sp@- 4328e: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; 43292: 2468 0018 moveal %a0@(24),%a2 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 43296: 2f2e 000c movel %fp@(12),%sp@- 4329a: 2f2a 004e movel %a2@(78),%sp@- 4329e: 4eb9 0004 ddc8 jsr 4ddc8 if (err > 0) { 432a4: 4fef 0010 lea %sp@(16),%sp size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 432a8: 2400 movel %d0,%d2 if (err > 0) { 432aa: 6f28 bles 432d4 IMFS_mtime_ctime_update(jnode); 432ac: 42a7 clrl %sp@- 432ae: 486e fff8 pea %fp@(-8) 432b2: 4eb9 0004 4424 jsr 44424 432b8: 202e fff8 movel %fp@(-8),%d0 432bc: 508f addql #8,%sp 432be: 2540 0042 movel %d0,%a2@(66) 432c2: 2540 0046 movel %d0,%a2@(70) } IMFS_FIFO_RETURN(err); } 432c6: 2002 movel %d2,%d0 432c8: 242e fff0 movel %fp@(-16),%d2 432cc: 246e fff4 moveal %fp@(-12),%a2 432d0: 4e5e unlk %fp 432d2: 4e75 rts int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 432d4: 4a80 tstl %d0 432d6: 67ee beqs 432c6 <== NEVER TAKEN 432d8: 4eb9 0004 fd8c jsr 4fd8c <__errno> 432de: 4482 negl %d2 432e0: 2040 moveal %d0,%a0 432e2: 2082 movel %d2,%a0@ 432e4: 74ff moveq #-1,%d2 } 432e6: 2002 movel %d2,%d0 432e8: 242e fff0 movel %fp@(-16),%d2 432ec: 246e fff4 moveal %fp@(-12),%a2 432f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b338 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b338: 4e56 ffd4 linkw %fp,#-44 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b33c: 206e 0008 moveal %fp@(8),%a0 4b340: 2268 0024 moveal %a0@(36),%a1 4b344: 2049 moveal %a1,%a0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b346: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b34a: 49ee ffe8 lea %fp@(-24),%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); 4b34e: 243c 0004 2bb0 movel #273328,%d2 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 4b354: 4bf9 0004 2834 lea 42834 ,%a5 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b35a: 2898 movel %a0@+,%a4@ 4b35c: 2d58 ffec movel %a0@+,%fp@(-20) 4b360: 2d58 fff0 movel %a0@+,%fp@(-16) 4b364: 2d58 fff4 movel %a0@+,%fp@(-12) 4b368: 2d58 fff8 movel %a0@+,%fp@(-8) jnode = (IMFS_jnode_t *)loc.node_access; 4b36c: 246e fff0 moveal %fp@(-16),%a2 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 4b370: 2d50 fffc movel %a0@,%fp@(-4) 4b374: 206a 004a moveal %a2@(74),%a0 4b378: 2010 movel %a0@,%d0 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 4b37a: 42a9 0008 clrl %a1@(8) do { next = jnode->Parent; 4b37e: 266a 0008 moveal %a2@(8),%a3 4b382: 2d68 0004 fff8 movel %a0@(4),%fp@(-8) loc.node_access = (void *)jnode; 4b388: 2d4a fff0 movel %a2,%fp@(-16) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 4b38c: 4a80 tstl %d0 4b38e: 662e bnes 4b3be <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b390: 200a movel %a2,%d0 4b392: 0680 0000 0052 addil #82,%d0 4b398: b0aa 004e cmpl %a2@(78),%d0 4b39c: 6720 beqs 4b3be */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b39e: 246a 004e moveal %a2@(78),%a2 if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4b3a2: 4a8a tstl %a2 4b3a4: 674e beqs 4b3f4 <== NEVER TAKEN 4b3a6: 206a 004a moveal %a2@(74),%a0 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 4b3aa: 266a 0008 moveal %a2@(8),%a3 4b3ae: 2010 movel %a0@,%d0 4b3b0: 2d68 0004 fff8 movel %a0@(4),%fp@(-8) loc.node_access = (void *)jnode; 4b3b6: 2d4a fff0 movel %a2,%fp@(-16) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 4b3ba: 4a80 tstl %d0 4b3bc: 67d2 beqs 4b390 result = IMFS_rmnod( NULL, &loc ); 4b3be: 2f0c movel %a4,%sp@- 4b3c0: 2042 moveal %d2,%a0 4b3c2: 42a7 clrl %sp@- 4b3c4: 4e90 jsr %a0@ if ( result != 0 ) 4b3c6: 508f addql #8,%sp 4b3c8: 4a80 tstl %d0 4b3ca: 6632 bnes 4b3fe <== NEVER TAKEN rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 4b3cc: 2f0a movel %a2,%sp@- 4b3ce: 4e95 jsr %a5@ jnode = next; } if ( jnode != NULL ) { 4b3d0: 588f addql #4,%sp 4b3d2: 4a8b tstl %a3 4b3d4: 671e beqs 4b3f4 4b3d6: 206b 004a moveal %a3@(74),%a0 if ( IMFS_is_directory( jnode ) ) { 4b3da: 244b moveal %a3,%a2 4b3dc: 2010 movel %a0@,%d0 4b3de: 669e bnes 4b37e <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b3e0: 220b movel %a3,%d1 4b3e2: 0681 0000 0052 addil #82,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b3e8: 246b 004e moveal %a3@(78),%a2 if ( jnode_has_children( jnode ) ) 4b3ec: b28a cmpl %a2,%d1 4b3ee: 66b2 bnes 4b3a2 4b3f0: 244b moveal %a3,%a2 4b3f2: 608a bras 4b37e jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); } 4b3f4: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 4b3fa: 4e5e unlk %fp 4b3fc: 4e75 rts 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 ); 4b3fe: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4b404: 4eb9 0004 7c4c jsr 47c4c <== NOT EXECUTED ... =============================================================================== 0004270c : 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] ) { 4270c: 4e56 fff4 linkw %fp,#-12 42710: 48d7 1c00 moveml %a2-%a4,%sp@ static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42714: 4878 0024 pea 24 42718: 4878 0001 pea 1 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] ) { 4271c: 266e 0008 moveal %fp@(8),%a3 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42720: 4eb9 0004 2e28 jsr 42e28 if ( fs_info != NULL ) { 42726: 508f addql #8,%sp ) { static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 42728: 2440 moveal %d0,%a2 if ( fs_info != NULL ) { 4272a: 4a80 tstl %d0 4272c: 6700 00c2 beqw 427f0 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 42730: 2039 0005 f0f4 movel 5f0f4 ,%d0 42736: 2200 movel %d0,%d1 42738: 5281 addql #1,%d1 memcpy( 4273a: 206e 0010 moveal %fp@(16),%a0 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++; 4273e: 23c1 0005 f0f4 movel %d1,5f0f4 memcpy( 42744: 2558 0008 movel %a0@+,%a2@(8) 42748: 2558 000c movel %a0@+,%a2@(12) 4274c: 2558 0010 movel %a0@+,%a2@(16) 42750: 2558 0014 movel %a0@+,%a2@(20) 42754: 2558 0018 movel %a0@+,%a2@(24) 42758: 2558 001c movel %a0@+,%a2@(28) 4275c: 2550 0020 movel %a0@,%a2@(32) fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 42760: 42a7 clrl %sp@- 42762: 4878 41ed pea 41ed 42766: 42a7 clrl %sp@- 42768: 4879 0005 d40e pea 5d40e 4276e: 2f2a 0008 movel %a2@(8),%sp@- 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++; 42772: 2480 movel %d0,%a2@ fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 42774: 2f0a movel %a2,%sp@- 42776: 4eb9 0004 af8c jsr 4af8c "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 4277c: 4fef 0018 lea %sp@(24),%sp 42780: 4a80 tstl %d0 42782: 6700 0084 beqw 42808 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; 42786: 2840 moveal %d0,%a4 mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 42788: 223c 0005 d646 movel #382534,%d1 4278e: 226c 004a moveal %a4@(74),%a1 mt_entry->mt_fs_root->location.node_access = root_node; 42792: 206b 0024 moveal %a3@(36),%a0 (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; 42796: 276e 000c 000c movel %fp@(12),%a3@(12) mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 4279c: 2741 002a movel %d1,%a3@(42) errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 427a0: 2239 0005 e25c movel 5e25c ,%d1 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 427a6: 274a 0008 movel %a2,%a3@(8) 427aa: 2169 0004 0010 movel %a1@(4),%a0@(16) mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 427b0: 2140 0008 movel %d0,%a0@(8) /* * 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) { 427b4: 7010 moveq #16,%d0 427b6: b081 cmpl %d1,%d0 427b8: 6724 beqs 427de is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 427ba: 103c 000f moveb #15,%d0 427be: b081 cmpl %d1,%d0 427c0: 6c16 bges 427d8 427c2: 307c 0005 moveaw #5,%a0 427c6: 103c 0020 moveb #32,%d0 427ca: 5388 subql #1,%a0 /* * 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) { 427cc: b081 cmpl %d1,%d0 427ce: 670e beqs 427de is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 427d0: 6e06 bgts 427d8 <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 427d2: d080 addl %d0,%d0 427d4: 4a88 tstl %a0 427d6: 66f2 bnes 427ca <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 427d8: 223c 0000 0080 movel #128,%d1 const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; 427de: 4280 clrl %d0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427e0: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 427e6: 23c1 0005 f0f0 movel %d1,5f0f0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427ec: 4e5e unlk %fp 427ee: 4e75 rts } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 427f0: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 427f6: 2840 moveal %d0,%a4 <== NOT EXECUTED 427f8: 700c moveq #12,%d0 <== NOT EXECUTED 427fa: 2880 movel %d0,%a4@ <== NOT EXECUTED if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 427fc: 70ff moveq #-1,%d0 <== NOT EXECUTED IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 427fe: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 <== NOT EXECUTED 42804: 4e5e unlk %fp <== NOT EXECUTED 42806: 4e75 rts <== NOT EXECUTED mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; IMFS_Set_handlers( &mt_entry->mt_fs_root->location ); } else { errno = ENOMEM; 42808: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 4280e: 720c moveq #12,%d1 <== NOT EXECUTED 42810: 2040 moveal %d0,%a0 <== NOT EXECUTED if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 42812: 70ff moveq #-1,%d0 <== NOT EXECUTED mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; IMFS_Set_handlers( &mt_entry->mt_fs_root->location ); } else { errno = ENOMEM; 42814: 2081 movel %d1,%a0@ <== NOT EXECUTED 42816: 60e6 bras 427fe <== NOT EXECUTED =============================================================================== 000445ac : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 445ac: 4e56 ff98 linkw %fp,#-104 int rv = 0; mode &= ~rtems_filesystem_umask; 445b0: 2079 0006 2e88 moveal 62e88 ,%a0 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 445b6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ int rv = 0; mode &= ~rtems_filesystem_umask; 445ba: 2428 0008 movel %a0@(8),%d2 445be: 4682 notl %d2 445c0: c4ae 000c andl %fp@(12),%d2 switch (mode & S_IFMT) { 445c4: 2002 movel %d2,%d0 445c6: 0280 0000 f000 andil #61440,%d0 445cc: 0c80 0000 2000 cmpil #8192,%d0 445d2: 6734 beqs 44608 445d4: 632a blss 44600 <== NEVER TAKEN 445d6: 0c80 0000 6000 cmpil #24576,%d0 445dc: 672a beqs 44608 445de: 0c80 0000 8000 cmpil #32768,%d0 445e4: 6722 beqs 44608 <== NEVER TAKEN rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; 445e6: 4eb9 0005 30b4 jsr 530b4 <__errno> rv = -1; 445ec: 74ff moveq #-1,%d2 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; 445ee: 2040 moveal %d0,%a0 445f0: 7016 moveq #22,%d0 445f2: 2080 movel %d0,%a0@ rv = -1; } } return rv; } 445f4: 2002 movel %d2,%d0 445f6: 4cee 0c1c ff98 moveml %fp@(-104),%d2-%d4/%a2-%a3 445fc: 4e5e unlk %fp 445fe: 4e75 rts { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { 44600: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 44606: 66de bnes 445e6 <== NOT EXECUTED rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 44608: 206e 0010 moveal %fp@(16),%a0 4460c: 7007 moveq #7,%d0 4460e: b090 cmpl %a0@,%d0 44610: 66d4 bnes 445e6 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 = 44612: 4878 0078 pea 78 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 44616: 260e movel %fp,%d3 44618: 0683 ffff ffc8 addil #-56,%d3 if ( node_control->imfs_type == IMFS_GENERIC ) { rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 4461e: 2f2e 0008 movel %fp@(8),%sp@- 44622: 2f03 movel %d3,%sp@- 44624: 4eb9 0004 6772 jsr 46772 4462a: 2440 moveal %d0,%a2 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 4462c: 2f00 movel %d0,%sp@- 4462e: 4eb9 0004 4556 jsr 44556 44634: 4fef 0010 lea %sp@(16),%sp 44638: 4a00 tstb %d0 4463a: 676e beqs 446aa IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 4463c: 486e ffb4 pea %fp@(-76) if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 44640: 2d6e 0014 ffb4 movel %fp@(20),%fp@(-76) new_node = IMFS_create_node_with_control( 44646: 2f02 movel %d2,%sp@- 44648: 2f2e ffd4 movel %fp@(-44),%sp@- 4464c: 2f2e ffd0 movel %fp@(-48),%sp@- 44650: 2f2e 0010 movel %fp@(16),%sp@- 44654: 2f0a movel %a2,%sp@- 44656: 4eb9 0004 fe1a jsr 4fe1a rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 4465c: 4fef 0018 lea %sp@(24),%sp 44660: 4a80 tstl %d0 44662: 6762 beqs 446c6 IMFS_jnode_t *parent = currentloc->node_access; 44664: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 44668: 280e movel %fp,%d4 4466a: 0684 ffff ffac addil #-84,%d4 44670: 47f9 0004 5084 lea 45084 ,%a3 44676: 4282 clrl %d2 44678: 42a7 clrl %sp@- 4467a: 2f04 movel %d4,%sp@- 4467c: 4e93 jsr %a3@ 4467e: 256e ffac 0046 movel %fp@(-84),%a2@(70) IMFS_update_mtime( parent ); 44684: 42a7 clrl %sp@- 44686: 2f04 movel %d4,%sp@- 44688: 4e93 jsr %a3@ 4468a: 256e ffac 0042 movel %fp@(-84),%a2@(66) 44690: 4fef 0010 lea %sp@(16),%sp } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 44694: 2f03 movel %d3,%sp@- 44696: 4eb9 0004 68c6 jsr 468c6 4469c: 588f addql #4,%sp rv = -1; } } return rv; } 4469e: 2002 movel %d2,%d0 446a0: 4cee 0c1c ff98 moveml %fp@(-104),%d2-%d4/%a2-%a3 446a6: 4e5e unlk %fp 446a8: 4e75 rts IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 446aa: 4878 0086 pea 86 rv = -1; 446ae: 74ff moveq #-1,%d2 IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 446b0: 2f03 movel %d3,%sp@- 446b2: 4eb9 0004 641a jsr 4641a 446b8: 508f addql #8,%sp rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 446ba: 2f03 movel %d3,%sp@- 446bc: 4eb9 0004 68c6 jsr 468c6 446c2: 588f addql #4,%sp 446c4: 60d8 bras 4469e 446c6: 2f03 movel %d3,%sp@- IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 446c8: 74ff moveq #-1,%d2 } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 446ca: 4eb9 0004 68c6 jsr 468c6 446d0: 588f addql #4,%sp 446d2: 60ca bras 4469e =============================================================================== 0004d18e : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4d18e: 4e56 0000 linkw %fp,#0 4d192: 2f0a movel %a2,%sp@- 4d194: 2f02 movel %d2,%sp@- IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4d196: 4878 0001 pea 1 if ( *block_entry_ptr ) return 0; 4d19a: 4282 clrl %d2 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4d19c: 2f2e 000c movel %fp@(12),%sp@- 4d1a0: 2f2e 0008 movel %fp@(8),%sp@- 4d1a4: 4eb9 0004 cd58 jsr 4cd58 if ( *block_entry_ptr ) 4d1aa: 4fef 000c lea %sp@(12),%sp IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4d1ae: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4d1b0: 4a92 tstl %a2@ 4d1b2: 670e beqs 4d1c2 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 4d1b4: 2002 movel %d2,%d0 4d1b6: 242e fff8 movel %fp@(-8),%d2 4d1ba: 246e fffc moveal %fp@(-4),%a2 4d1be: 4e5e unlk %fp 4d1c0: 4e75 rts return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 4d1c2: 4eb9 0004 cd34 jsr 4cd34 if ( !memory ) 4d1c8: 4a80 tstl %d0 4d1ca: 6710 beqs 4d1dc <== NEVER TAKEN return 1; *block_entry_ptr = memory; 4d1cc: 2480 movel %d0,%a2@ return 0; } 4d1ce: 2002 movel %d2,%d0 4d1d0: 242e fff8 movel %fp@(-8),%d2 4d1d4: 246e fffc moveal %fp@(-4),%a2 4d1d8: 4e5e unlk %fp 4d1da: 4e75 rts /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 4d1dc: 7401 moveq #1,%d2 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } 4d1de: 2002 movel %d2,%d0 <== NOT EXECUTED 4d1e0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4d1e4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4d1e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d390 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4d390: 4e56 ffd0 linkw %fp,#-48 4d394: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d398: 2679 0005 f0f0 moveal 5f0f0 ,%a3 4d39e: 260b movel %a3,%d3 4d3a0: e48b lsrl #2,%d3 4d3a2: 2403 movel %d3,%d2 4d3a4: 5282 addql #1,%d2 4d3a6: 4c03 2800 mulsl %d3,%d2 4d3aa: 200b movel %a3,%d0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4d3ac: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d3b0: 5282 addql #1,%d2 4d3b2: 4c03 2800 mulsl %d3,%d2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4d3b6: 1a2e 000f moveb %fp@(15),%d5 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d3ba: 5382 subql #1,%d2 4d3bc: 4c00 2800 mulsl %d0,%d2 4d3c0: 4280 clrl %d0 4d3c2: 2202 movel %d2,%d1 4d3c4: 242e 0010 movel %fp@(16),%d2 4d3c8: 262e 0014 movel %fp@(20),%d3 4d3cc: 9681 subl %d1,%d3 4d3ce: 9580 subxl %d0,%d2 4d3d0: 6c00 012e bgew 4d500 rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 4d3d4: 242a 004e movel %a2@(78),%d2 4d3d8: 262a 0052 movel %a2@(82),%d3 4d3dc: 202e 0010 movel %fp@(16),%d0 4d3e0: 222e 0014 movel %fp@(20),%d1 4d3e4: 9283 subl %d3,%d1 4d3e6: 9182 subxl %d2,%d0 4d3e8: 6f00 00da blew 4d4c4 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d3ec: 49f9 0005 a79c lea 5a79c <__divdi3>,%a4 4d3f2: 2e0b movel %a3,%d7 4d3f4: 5bc6 smi %d6 4d3f6: 49c6 extbl %d6 4d3f8: 2f07 movel %d7,%sp@- 4d3fa: 2f06 movel %d6,%sp@- 4d3fc: 2f2e 0014 movel %fp@(20),%sp@- 4d400: 2f2e 0010 movel %fp@(16),%sp@- 4d404: 4e94 jsr %a4@ 4d406: 4fef 0010 lea %sp@(16),%sp 4d40a: 2801 movel %d1,%d4 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d40c: 2f07 movel %d7,%sp@- 4d40e: 2f06 movel %d6,%sp@- 4d410: 2f03 movel %d3,%sp@- 4d412: 2f02 movel %d2,%sp@- offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4d414: 2403 movel %d3,%d2 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d416: 4e94 jsr %a4@ 4d418: 4fef 0010 lea %sp@(16),%sp offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4d41c: 200b movel %a3,%d0 4d41e: 4c01 0800 mulsl %d1,%d0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d422: 2c01 movel %d1,%d6 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4d424: 9480 subl %d0,%d2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d426: b284 cmpl %d4,%d1 4d428: 622c bhis 4d456 <== NEVER TAKEN 4d42a: 2e01 movel %d1,%d7 4d42c: 47f9 0004 d18e lea 4d18e ,%a3 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4d432: 4bf9 0004 cd58 lea 4cd58 ,%a5 IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4d438: 49f9 0004 e9d4 lea 4e9d4 ,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 4d43e: 2f07 movel %d7,%sp@- 4d440: 2f0a movel %a2,%sp@- 4d442: 4e93 jsr %a3@ 4d444: 508f addql #8,%sp 4d446: 4a80 tstl %d0 4d448: 6600 0086 bnew 4d4d0 if ( zero_fill ) { 4d44c: 4a05 tstb %d5 4d44e: 6648 bnes 4d498 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d450: 5287 addql #1,%d7 4d452: be84 cmpl %d4,%d7 4d454: 63e8 blss 4d43e /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 4d456: 42a7 clrl %sp@- 4d458: 240e movel %fp,%d2 4d45a: 5182 subql #8,%d2 4d45c: 47f9 0004 315c lea 4315c ,%a3 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4d462: 202e 0010 movel %fp@(16),%d0 4d466: 222e 0014 movel %fp@(20),%d1 4d46a: 2540 004e movel %d0,%a2@(78) 4d46e: 2541 0052 movel %d1,%a2@(82) IMFS_update_ctime(the_jnode); 4d472: 2f02 movel %d2,%sp@- 4d474: 4e93 jsr %a3@ 4d476: 256e fff8 0046 movel %fp@(-8),%a2@(70) IMFS_update_mtime(the_jnode); 4d47c: 42a7 clrl %sp@- 4d47e: 2f02 movel %d2,%sp@- 4d480: 4e93 jsr %a3@ 4d482: 256e fff8 0042 movel %fp@(-8),%a2@(66) return 0; 4d488: 4fef 0010 lea %sp@(16),%sp 4d48c: 4280 clrl %d0 } 4d48e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d494: 4e5e unlk %fp 4d496: 4e75 rts */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4d498: 42a7 clrl %sp@- * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 4d49a: 2639 0005 f0f0 movel 5f0f0 ,%d3 4d4a0: 9682 subl %d2,%d3 block_p *block_ptr = 4d4a2: 2f07 movel %d7,%sp@- offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d4a4: 5287 addql #1,%d7 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4d4a6: 2f0a movel %a2,%sp@- 4d4a8: 4e95 jsr %a5@ IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4d4aa: 2040 moveal %d0,%a0 4d4ac: 2f03 movel %d3,%sp@- 4d4ae: 42a7 clrl %sp@- 4d4b0: d490 addl %a0@,%d2 4d4b2: 2f02 movel %d2,%sp@- offset = 0; 4d4b4: 4282 clrl %d2 if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4d4b6: 4e94 jsr %a4@ 4d4b8: 4fef 0018 lea %sp@(24),%sp offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d4bc: be84 cmpl %d4,%d7 4d4be: 6300 ff7e blsw 4d43e 4d4c2: 6092 bras 4d456 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 4d4c4: 4280 clrl %d0 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d4c6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d4cc: 4e5e unlk %fp <== NOT EXECUTED 4d4ce: 4e75 rts <== NOT EXECUTED 4d4d0: 47f9 0004 d368 lea 4d368 ,%a3 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4d4d6: bc87 cmpl %d7,%d6 <== NOT EXECUTED 4d4d8: 620e bhis 4d4e8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4d4da: 2f07 movel %d7,%sp@- <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4d4dc: 5387 subql #1,%d7 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4d4de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d4e0: 4e93 jsr %a3@ <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4d4e2: 508f addql #8,%sp <== NOT EXECUTED 4d4e4: be86 cmpl %d6,%d7 <== NOT EXECUTED 4d4e6: 64f2 bccs 4d4da <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4d4e8: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 4d4ee: 721c moveq #28,%d1 <== NOT EXECUTED 4d4f0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d4f2: 70ff moveq #-1,%d0 <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d4f4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4d4fa: 2081 movel %d1,%a0@ <== NOT EXECUTED the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d4fc: 4e5e unlk %fp <== NOT EXECUTED 4d4fe: 4e75 rts <== NOT EXECUTED /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EFBIG ); 4d500: 4eb9 0004 e144 jsr 4e144 <__errno> 4d506: 741b moveq #27,%d2 4d508: 2040 moveal %d0,%a0 4d50a: 70ff moveq #-1,%d0 4d50c: 2082 movel %d2,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d50e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d514: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cd58 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4cd58: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4cd5c: 2239 0005 f0f0 movel 5f0f0 ,%d1 4cd62: e489 lsrl #2,%d1 4cd64: 2001 movel %d1,%d0 4cd66: 5380 subql #1,%d0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4cd68: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4cd6c: 246e 0008 moveal %fp@(8),%a2 4cd70: 242e 000c movel %fp@(12),%d2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4cd74: b082 cmpl %d2,%d0 4cd76: 6522 bcss 4cd9a p = info->indirect; 4cd78: 206a 0056 moveal %a2@(86),%a0 if ( malloc_it ) { 4cd7c: 4aae 0010 tstl %fp@(16) 4cd80: 6700 00a8 beqw 4ce2a if ( !p ) { 4cd84: 4a88 tstl %a0 4cd86: 6700 010a beqw 4ce92 } if ( !p ) return 0; return &info->indirect[ my_block ]; 4cd8a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4cd8e: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4cd90: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cd96: 4e5e unlk %fp 4cd98: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4cd9a: 2001 movel %d1,%d0 4cd9c: 5280 addql #1,%d0 4cd9e: 4c01 0800 mulsl %d1,%d0 4cda2: 2040 moveal %d0,%a0 4cda4: 5388 subql #1,%a0 4cda6: b1c2 cmpal %d2,%a0 4cda8: 6450 bccs 4cdfa } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4cdaa: 2600 movel %d0,%d3 4cdac: 5283 addql #1,%d3 4cdae: 4c01 3800 mulsl %d1,%d3 4cdb2: 5383 subql #1,%d3 4cdb4: b682 cmpl %d2,%d3 4cdb6: 6578 bcss 4ce30 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4cdb8: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4cdba: 4c41 2004 remul %d1,%d4,%d2 4cdbe: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4cdc2: 206a 005e moveal %a2@(94),%a0 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; 4cdc6: 4c41 2003 remul %d1,%d3,%d2 4cdca: 4c41 2002 remul %d1,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4cdce: 4aae 0010 tstl %fp@(16) 4cdd2: 6600 008c bnew 4ce60 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4cdd6: 4a88 tstl %a0 4cdd8: 6756 beqs 4ce30 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4cdda: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 if ( !p1 ) 4cdde: 4a88 tstl %a0 4cde0: 674e beqs 4ce30 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4cde2: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 if ( !p2 ) 4cde6: 4a88 tstl %a0 4cde8: 6746 beqs 4ce30 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4cdea: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4cdee: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4cdf0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cdf6: 4e5e unlk %fp 4cdf8: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 4cdfa: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4cdfc: 206a 005a moveal %a2@(90),%a0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4ce00: 4c41 2003 remul %d1,%d3,%d2 4ce04: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4ce08: 4aae 0010 tstl %fp@(16) 4ce0c: 662e bnes 4ce3c } return (block_p *)&p1[ singly ]; } if ( !p ) 4ce0e: 4a88 tstl %a0 4ce10: 671e beqs 4ce30 <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 4ce12: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 if ( !p ) 4ce16: 4a88 tstl %a0 4ce18: 6716 beqs 4ce30 <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; 4ce1a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4ce1e: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4ce20: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4ce26: 4e5e unlk %fp 4ce28: 4e75 rts info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4ce2a: 4a88 tstl %a0 4ce2c: 6600 ff5c bnew 4cd8a if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) return 0; 4ce30: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4ce32: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4ce38: 4e5e unlk %fp <== NOT EXECUTED 4ce3a: 4e75 rts <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { 4ce3c: 4a88 tstl %a0 4ce3e: 676c beqs 4ceac if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4ce40: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4ce44: 2052 moveal %a2@,%a0 if ( !p1 ) { 4ce46: 4a88 tstl %a0 4ce48: 66d0 bnes 4ce1a p1 = memfile_alloc_block(); 4ce4a: 4eb9 0004 cd34 jsr 4cd34 4ce50: 2040 moveal %d0,%a0 if ( !p1 ) 4ce52: 4a80 tstl %d0 4ce54: 67da beqs 4ce30 <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 4ce56: 2480 movel %d0,%a2@ p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 4ce58: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4ce5c: 2008 movel %a0,%d0 4ce5e: 60c0 bras 4ce20 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { 4ce60: 4a88 tstl %a0 4ce62: 676a beqs 4cece if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4ce64: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4ce68: 2052 moveal %a2@,%a0 if ( !p1 ) { 4ce6a: 4a88 tstl %a0 4ce6c: 677c beqs 4ceea if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4ce6e: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4ce72: 2052 moveal %a2@,%a0 if ( !p2 ) { 4ce74: 4a88 tstl %a0 4ce76: 6600 ff72 bnew 4cdea p2 = memfile_alloc_block(); 4ce7a: 4eb9 0004 cd34 jsr 4cd34 4ce80: 2040 moveal %d0,%a0 if ( !p2 ) 4ce82: 4a80 tstl %d0 4ce84: 67aa beqs 4ce30 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4ce86: 2480 movel %d0,%a2@ p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4ce88: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4ce8c: 2008 movel %a0,%d0 4ce8e: 6000 ff60 braw 4cdf0 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4ce92: 4eb9 0004 cd34 jsr 4cd34 4ce98: 2040 moveal %d0,%a0 if ( !p ) 4ce9a: 4a80 tstl %d0 4ce9c: 6792 beqs 4ce30 <== NEVER TAKEN return 0; info->indirect = p; 4ce9e: 2540 0056 movel %d0,%a2@(86) } if ( !p ) return 0; return &info->indirect[ my_block ]; 4cea2: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4cea6: 2008 movel %a0,%d0 4cea8: 6000 fee6 braw 4cd90 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4ceac: 4eb9 0004 cd34 jsr 4cd34 4ceb2: 2040 moveal %d0,%a0 if ( !p ) 4ceb4: 4a80 tstl %d0 4ceb6: 6700 ff78 beqw 4ce30 return 0; info->doubly_indirect = p; 4ceba: 2540 005a movel %d0,%a2@(90) } p1 = (block_p *)p[ doubly ]; 4cebe: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4cec2: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cec4: 4a88 tstl %a0 4cec6: 6600 ff52 bnew 4ce1a 4ceca: 6000 ff7e braw 4ce4a p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4cece: 4eb9 0004 cd34 jsr 4cd34 4ced4: 2040 moveal %d0,%a0 if ( !p ) 4ced6: 4a80 tstl %d0 4ced8: 6700 ff56 beqw 4ce30 return 0; info->triply_indirect = p; 4cedc: 2540 005e movel %d0,%a2@(94) } p1 = (block_p *) p[ triply ]; 4cee0: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4cee4: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cee6: 4a88 tstl %a0 4cee8: 6684 bnes 4ce6e <== NEVER TAKEN p1 = memfile_alloc_block(); 4ceea: 4eb9 0004 cd34 jsr 4cd34 4cef0: 2040 moveal %d0,%a0 if ( !p1 ) 4cef2: 4a80 tstl %d0 4cef4: 6700 ff3a beqw 4ce30 return 0; p[ triply ] = (block_p) p1; 4cef8: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4cefa: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4cefe: 2052 moveal %a2@,%a0 if ( !p2 ) { 4cf00: 4a88 tstl %a0 4cf02: 6600 fee6 bnew 4cdea 4cf06: 6000 ff72 braw 4ce7a =============================================================================== 0004cf0a : * 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 ) { 4cf0a: 7005 moveq #5,%d0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4cf0c: 4e56 ffd0 linkw %fp,#-48 4cf10: 226e 0018 moveal %fp@(24),%a1 4cf14: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cf18: 246e 0008 moveal %fp@(8),%a2 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4cf1c: 206a 004a moveal %a2@(74),%a0 4cf20: 242e 000c movel %fp@(12),%d2 4cf24: 262e 0010 movel %fp@(16),%d3 * 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 ) { 4cf28: b090 cmpl %a0@,%d0 4cf2a: 6700 0180 beqw 4d0ac /* * 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; 4cf2e: 2009 movel %a1,%d0 4cf30: d083 addl %d3,%d0 if ( last_byte > the_jnode->info.file.size ) 4cf32: 2a00 movel %d0,%d5 4cf34: 4284 clrl %d4 4cf36: 202a 004e movel %a2@(78),%d0 4cf3a: 222a 0052 movel %a2@(82),%d1 4cf3e: 2c04 movel %d4,%d6 4cf40: 2e05 movel %d5,%d7 4cf42: 9e81 subl %d1,%d7 4cf44: 9d80 subxl %d0,%d6 4cf46: 6f00 0112 blew 4d05a */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4cf4a: 2c39 0005 f0f0 movel 5f0f0 ,%d6 * 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 ) my_length = the_jnode->info.file.size - start; 4cf50: 2e01 movel %d1,%d7 4cf52: 9e83 subl %d3,%d7 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4cf54: 2a06 movel %d6,%d5 4cf56: 5bc4 smi %d4 4cf58: 49c4 extbl %d4 4cf5a: 2f05 movel %d5,%sp@- 4cf5c: 2f04 movel %d4,%sp@- 4cf5e: 2f03 movel %d3,%sp@- 4cf60: 2f02 movel %d2,%sp@- 4cf62: 4eb9 0005 abfc jsr 5abfc <__moddi3> 4cf68: 4fef 0010 lea %sp@(16),%sp 4cf6c: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4cf6e: 2f05 movel %d5,%sp@- 4cf70: 2f04 movel %d4,%sp@- 4cf72: 2f03 movel %d3,%sp@- 4cf74: 2f02 movel %d2,%sp@- 4cf76: 4eb9 0005 a79c jsr 5a79c <__divdi3> 4cf7c: 4fef 0010 lea %sp@(16),%sp 4cf80: 2401 movel %d1,%d2 if ( start_offset ) { 4cf82: 4a8b tstl %a3 4cf84: 6700 0110 beqw 4d096 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4cf88: 9c8b subl %a3,%d6 4cf8a: 2807 movel %d7,%d4 4cf8c: bc87 cmpl %d7,%d6 4cf8e: 6500 0174 bcsw 4d104 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4cf92: 42a7 clrl %sp@- 4cf94: 2f02 movel %d2,%sp@- 4cf96: 2f0a movel %a2,%sp@- 4cf98: 4eb9 0004 cd58 jsr 4cd58 if ( !block_ptr ) 4cf9e: 4fef 000c lea %sp@(12),%sp 4cfa2: 4a80 tstl %d0 4cfa4: 6700 0190 beqw 4d136 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4cfa8: 2f04 movel %d4,%sp@- 4cfaa: 2040 moveal %d0,%a0 4cfac: d7d0 addal %a0@,%a3 dest += to_copy; block++; 4cfae: 5282 addql #1,%d2 my_length -= to_copy; 4cfb0: 9e84 subl %d4,%d7 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 ); 4cfb2: 2f0b movel %a3,%sp@- 4cfb4: 2f2e 0014 movel %fp@(20),%sp@- dest += to_copy; 4cfb8: 262e 0014 movel %fp@(20),%d3 4cfbc: d684 addl %d4,%d3 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 ); 4cfbe: 4eb9 0004 e964 jsr 4e964 4cfc4: 2c39 0005 f0f0 movel 5f0f0 ,%d6 4cfca: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4cfce: bc87 cmpl %d7,%d6 4cfd0: 623c bhis 4d00e 4cfd2: 47f9 0004 cd58 lea 4cd58 ,%a3 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4cfd8: 49f9 0004 e964 lea 4e964 ,%a4 /* * 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 ); 4cfde: 42a7 clrl %sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 4cfe0: 9e86 subl %d6,%d7 /* * 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 ); 4cfe2: 2f02 movel %d2,%sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4cfe4: 5282 addql #1,%d2 /* * 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 ); 4cfe6: 2f0a movel %a2,%sp@- 4cfe8: 4e93 jsr %a3@ if ( !block_ptr ) 4cfea: 4fef 000c lea %sp@(12),%sp 4cfee: 4a80 tstl %d0 4cff0: 6700 00ae beqw 4d0a0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4cff4: 2040 moveal %d0,%a0 dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4cff6: d886 addl %d6,%d4 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 ); 4cff8: 2f06 movel %d6,%sp@- 4cffa: 2f10 movel %a0@,%sp@- 4cffc: 2f03 movel %d3,%sp@- dest += to_copy; 4cffe: d686 addl %d6,%d3 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 ); 4d000: 4e94 jsr %a4@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d002: 4fef 000c lea %sp@(12),%sp 4d006: beb9 0005 f0f0 cmpl 5f0f0 ,%d7 4d00c: 64d0 bccs 4cfde /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4d00e: 4a87 tstl %d7 4d010: 6728 beqs 4d03a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d012: 42a7 clrl %sp@- 4d014: 2f02 movel %d2,%sp@- 4d016: 2f0a movel %a2,%sp@- 4d018: 4eb9 0004 cd58 jsr 4cd58 if ( !block_ptr ) 4d01e: 4fef 000c lea %sp@(12),%sp 4d022: 4a80 tstl %d0 4d024: 677a beqs 4d0a0 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d026: 2040 moveal %d0,%a0 copied += my_length; 4d028: d887 addl %d7,%d4 if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4d02a: 2f07 movel %d7,%sp@- 4d02c: 2f10 movel %a0@,%sp@- 4d02e: 2f03 movel %d3,%sp@- 4d030: 4eb9 0004 e964 jsr 4e964 copied += my_length; 4d036: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4d03a: 42a7 clrl %sp@- 4d03c: 486e fff8 pea %fp@(-8) 4d040: 4eb9 0004 315c jsr 4315c 4d046: 256e fff8 003e movel %fp@(-8),%a2@(62) return copied; 4d04c: 2004 movel %d4,%d0 4d04e: 508f addql #8,%sp } 4d050: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d056: 4e5e unlk %fp 4d058: 4e75 rts */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d05a: 2c39 0005 f0f0 movel 5f0f0 ,%d6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4d060: 2e09 movel %a1,%d7 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d062: 2a06 movel %d6,%d5 4d064: 5bc4 smi %d4 4d066: 49c4 extbl %d4 4d068: 2f05 movel %d5,%sp@- 4d06a: 2f04 movel %d4,%sp@- 4d06c: 2f03 movel %d3,%sp@- 4d06e: 2f02 movel %d2,%sp@- 4d070: 4eb9 0005 abfc jsr 5abfc <__moddi3> 4d076: 4fef 0010 lea %sp@(16),%sp 4d07a: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d07c: 2f05 movel %d5,%sp@- 4d07e: 2f04 movel %d4,%sp@- 4d080: 2f03 movel %d3,%sp@- 4d082: 2f02 movel %d2,%sp@- 4d084: 4eb9 0005 a79c jsr 5a79c <__divdi3> 4d08a: 4fef 0010 lea %sp@(16),%sp 4d08e: 2401 movel %d1,%d2 if ( start_offset ) { 4d090: 4a8b tstl %a3 4d092: 6600 fef4 bnew 4cf88 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 4d096: 262e 0014 movel %fp@(20),%d3 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4d09a: 4284 clrl %d4 4d09c: 6000 ff30 braw 4cfce IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4d0a0: 2004 movel %d4,%d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4d0a2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d0a8: 4e5e unlk %fp <== NOT EXECUTED 4d0aa: 4e75 rts <== NOT EXECUTED 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)) 4d0ac: 2a49 moveal %a1,%a5 4d0ae: 99cc subal %a4,%a4 4d0b0: 282a 004e movel %a2@(78),%d4 4d0b4: 2a2a 0052 movel %a2@(82),%d5 my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4d0b8: 206a 0056 moveal %a2@(86),%a0 if (my_length > (the_jnode->info.linearfile.size - start)) 4d0bc: 2c04 movel %d4,%d6 4d0be: 2e05 movel %d5,%d7 4d0c0: 200c movel %a4,%d0 4d0c2: 220d movel %a5,%d1 4d0c4: 9e83 subl %d3,%d7 4d0c6: 9d82 subxl %d2,%d6 4d0c8: 9287 subl %d7,%d1 4d0ca: 9186 subxl %d6,%d0 4d0cc: 6f3c bles 4d10a <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4d0ce: 2805 movel %d5,%d4 4d0d0: 9883 subl %d3,%d4 memcpy(dest, &file_ptr[start], my_length); 4d0d2: 2f04 movel %d4,%sp@- 4d0d4: 4870 3800 pea %a0@(00000000,%d3:l) 4d0d8: 2f2e 0014 movel %fp@(20),%sp@- 4d0dc: 4eb9 0004 e964 jsr 4e964 IMFS_update_atime( the_jnode ); 4d0e2: 42a7 clrl %sp@- 4d0e4: 486e fff8 pea %fp@(-8) 4d0e8: 4eb9 0004 315c jsr 4315c 4d0ee: 256e fff8 003e movel %fp@(-8),%a2@(62) return my_length; 4d0f4: 2004 movel %d4,%d0 4d0f6: 4fef 0014 lea %sp@(20),%sp } IMFS_update_atime( the_jnode ); return copied; } 4d0fa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d100: 4e5e unlk %fp 4d102: 4e75 rts 4d104: 2806 movel %d6,%d4 4d106: 6000 fe8a braw 4cf92 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4d10a: 2809 movel %a1,%d4 <== 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); 4d10c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d10e: 4870 3800 pea %a0@(00000000,%d3:l) <== NOT EXECUTED 4d112: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4d116: 4eb9 0004 e964 jsr 4e964 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4d11c: 42a7 clrl %sp@- <== NOT EXECUTED 4d11e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4d122: 4eb9 0004 315c jsr 4315c <== NOT EXECUTED 4d128: 256e fff8 003e movel %fp@(-8),%a2@(62) <== NOT EXECUTED return my_length; 4d12e: 2004 movel %d4,%d0 <== NOT EXECUTED 4d130: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d134: 60c4 bras 4d0fa <== NOT EXECUTED 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 ); if ( !block_ptr ) return copied; 4d136: 4280 clrl %d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4d138: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d13e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d252 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4d252: 4e56 ffe0 linkw %fp,#-32 4d256: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%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; 4d25a: 2839 0005 f0f0 movel 5f0f0 ,%d4 4d260: e48c lsrl #2,%d4 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4d262: 286e 0008 moveal %fp@(8),%a4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4d266: 4aac 0056 tstl %a4@(86) 4d26a: 670c beqs 4d278 memfile_free_blocks_in_table( &info->indirect, to_free ); 4d26c: 2f04 movel %d4,%sp@- 4d26e: 486c 0056 pea %a4@(86) 4d272: 4eba ff92 jsr %pc@(4d206 ) 4d276: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4d278: 206c 005a moveal %a4@(90),%a0 4d27c: 4a88 tstl %a0 4d27e: 674a beqs 4d2ca for ( i=0 ; i,%d3 4d286: 2003 movel %d3,%d0 4d288: e488 lsrl #2,%d0 4d28a: 47fa ff7a lea %pc@(4d206 ),%a3 4d28e: 6730 beqs 4d2c0 <== NEVER TAKEN 4d290: 4280 clrl %d0 4d292: 4282 clrl %d2 4d294: 47fa ff70 lea %pc@(4d206 ),%a3 4d298: 5282 addql #1,%d2 if ( info->doubly_indirect[i] ) { 4d29a: 41f0 0c00 lea %a0@(00000000,%d0:l:4),%a0 4d29e: 4a90 tstl %a0@ 4d2a0: 670e beqs 4d2b0 <== NEVER TAKEN memfile_free_blocks_in_table( 4d2a2: 2f04 movel %d4,%sp@- 4d2a4: 2f08 movel %a0,%sp@- 4d2a6: 4e93 jsr %a3@ 4d2a8: 2639 0005 f0f0 movel 5f0f0 ,%d3 4d2ae: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 4d2ba: 206c 005a moveal %a4@(90),%a0 4d2be: 60d8 bras 4d298 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 ); 4d2c0: 2f04 movel %d4,%sp@- 4d2c2: 486c 005a pea %a4@(90) 4d2c6: 4e93 jsr %a3@ 4d2c8: 508f addql #8,%sp } if ( info->triply_indirect ) { 4d2ca: 206c 005e moveal %a4@(94),%a0 4d2ce: 4a88 tstl %a0 4d2d0: 677a beqs 4d34c for ( i=0 ; i,%d3 4d2d8: 2003 movel %d3,%d0 4d2da: e488 lsrl #2,%d0 4d2dc: 677a beqs 4d358 <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 4d2de: 2450 moveal %a0@,%a2 if ( !p ) /* ensure we have a valid pointer */ 4d2e0: 4a8a tstl %a2 4d2e2: 6774 beqs 4d358 <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d2e4: 4286 clrl %d6 if ( !p ) /* ensure we have a valid pointer */ 4d2e6: 4285 clrl %d5 4d2e8: 47fa ff1c lea %pc@(4d206 ),%a3 break; for ( j=0 ; j <== NEVER TAKEN 4d2f0: 4281 clrl %d1 4d2f2: 4282 clrl %d2 4d2f4: 5282 addql #1,%d2 if ( p[j] ) { 4d2f6: 41f2 1c00 lea %a2@(00000000,%d1:l:4),%a0 4d2fa: 4a90 tstl %a0@ 4d2fc: 670e beqs 4d30c <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4d2fe: 2f04 movel %d4,%sp@- 4d300: 2f08 movel %a0,%sp@- 4d302: 4e93 jsr %a3@ 4d304: 2639 0005 f0f0 movel 5f0f0 ,%d3 4d30a: 508f addql #8,%sp if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4d316: 2f04 movel %d4,%sp@- 4d318: dcac 005e addl %a4@(94),%d6 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; idoubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i,%d3 4d328: 2003 movel %d3,%d0 4d32a: 508f addql #8,%sp 4d32c: e488 lsrl #2,%d0 4d32e: b085 cmpl %d5,%d0 4d330: 6310 blss 4d342 * 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( 4d332: 2c05 movel %d5,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d334: 206c 005e moveal %a4@(94),%a0 * 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( 4d338: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d33a: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 if ( !p ) /* ensure we have a valid pointer */ 4d33e: 4a8a tstl %a2 4d340: 66aa bnes 4d2ec <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4d342: 2f04 movel %d4,%sp@- 4d344: 486c 005e pea %a4@(94) 4d348: 4e93 jsr %a3@ 4d34a: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 4d34c: 200c movel %a4,%d0 4d34e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4d354: 4e5e unlk %fp 4d356: 4e75 rts } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4d358: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d35a: 486c 005e pea %a4@(94) <== NOT EXECUTED 4d35e: 47fa fea6 lea %pc@(4d206 ),%a3<== NOT EXECUTED 4d362: 4e93 jsr %a3@ <== NOT EXECUTED 4d364: 508f addql #8,%sp <== NOT EXECUTED 4d366: 60e4 bras 4d34c <== NOT EXECUTED =============================================================================== 0004d368 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4d368: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d36c: 42a7 clrl %sp@- <== NOT EXECUTED 4d36e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d372: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d376: 4eb9 0004 cd58 jsr 4cd58 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 4d37c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d37e: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4d380: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4d382: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d384: 4eb9 0004 d1ec jsr 4d1ec <== NOT EXECUTED return 1; } 4d38a: 7001 moveq #1,%d0 <== NOT EXECUTED 4d38c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d518 : * 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 ) { 4d518: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4d51a: 4e56 ffd4 linkw %fp,#-44 4d51e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4d522: 242e 000c movel %fp@(12),%d2 4d526: 262e 0010 movel %fp@(16),%d3 4d52a: 286e 0018 moveal %fp@(24),%a4 /* * 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; 4d52e: 41f4 3800 lea %a4@(00000000,%d3:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4d532: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4d534: 246e 0008 moveal %fp@(8),%a2 * 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 ) { 4d538: 2c00 movel %d0,%d6 4d53a: 2e01 movel %d1,%d7 4d53c: 282a 004e movel %a2@(78),%d4 4d540: 2a2a 0052 movel %a2@(82),%d5 4d544: 9e85 subl %d5,%d7 4d546: 9d84 subxl %d4,%d6 4d548: 6e00 0124 bgtw 4d66e */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d54c: 2e39 0005 f0f0 movel 5f0f0 ,%d7 4d552: 2a07 movel %d7,%d5 4d554: 5bc4 smi %d4 4d556: 49c4 extbl %d4 4d558: 2f05 movel %d5,%sp@- 4d55a: 2f04 movel %d4,%sp@- 4d55c: 2f03 movel %d3,%sp@- 4d55e: 2f02 movel %d2,%sp@- 4d560: 4eb9 0005 abfc jsr 5abfc <__moddi3> 4d566: 4fef 0010 lea %sp@(16),%sp 4d56a: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d56c: 2f05 movel %d5,%sp@- 4d56e: 2f04 movel %d4,%sp@- 4d570: 2f03 movel %d3,%sp@- 4d572: 2f02 movel %d2,%sp@- 4d574: 4eb9 0005 a79c jsr 5a79c <__divdi3> 4d57a: 4fef 0010 lea %sp@(16),%sp 4d57e: 2401 movel %d1,%d2 if ( start_offset ) { 4d580: 4a8b tstl %a3 4d582: 6700 00de beqw 4d662 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4d586: 9e8b subl %a3,%d7 4d588: b9c7 cmpal %d7,%a4 4d58a: 6402 bccs 4d58e 4d58c: 2e0c movel %a4,%d7 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d58e: 42a7 clrl %sp@- 4d590: 2f02 movel %d2,%sp@- 4d592: 2f0a movel %a2,%sp@- 4d594: 4eb9 0004 cd58 jsr 4cd58 if ( !block_ptr ) 4d59a: 4fef 000c lea %sp@(12),%sp 4d59e: 4a80 tstl %d0 4d5a0: 6700 013a beqw 4d6dc block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d5a4: 2f07 movel %d7,%sp@- 4d5a6: 2f2e 0014 movel %fp@(20),%sp@- 4d5aa: 2040 moveal %d0,%a0 4d5ac: d7d0 addal %a0@,%a3 src += to_copy; block++; my_length -= to_copy; 4d5ae: 2c0c movel %a4,%d6 4d5b0: 9c87 subl %d7,%d6 copied += to_copy; 4d5b2: 2807 movel %d7,%d4 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4d5b4: 5282 addql #1,%d2 to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; 4d5b6: 262e 0014 movel %fp@(20),%d3 4d5ba: d687 addl %d7,%d3 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d5bc: 2f0b movel %a3,%sp@- 4d5be: 4eb9 0004 e964 jsr 4e964 4d5c4: 2e39 0005 f0f0 movel 5f0f0 ,%d7 4d5ca: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d5ce: be86 cmpl %d6,%d7 4d5d0: 623c bhis 4d60e 4d5d2: 47f9 0004 cd58 lea 4cd58 ,%a3 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 ); 4d5d8: 49f9 0004 e964 lea 4e964 ,%a4 * 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 ); 4d5de: 42a7 clrl %sp@- 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; block++; my_length -= to_copy; 4d5e0: 9c87 subl %d7,%d6 * 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 ); 4d5e2: 2f02 movel %d2,%sp@- #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; block++; 4d5e4: 5282 addql #1,%d2 * 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 ); 4d5e6: 2f0a movel %a2,%sp@- 4d5e8: 4e93 jsr %a3@ if ( !block_ptr ) 4d5ea: 4fef 000c lea %sp@(12),%sp 4d5ee: 4a80 tstl %d0 4d5f0: 6700 00de beqw 4d6d0 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 ); 4d5f4: 2f07 movel %d7,%sp@- 4d5f6: 2040 moveal %d0,%a0 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4d5f8: d887 addl %d7,%d4 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 ); 4d5fa: 2f03 movel %d3,%sp@- 4d5fc: 2f10 movel %a0@,%sp@- src += to_copy; 4d5fe: d687 addl %d7,%d3 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 ); 4d600: 4e94 jsr %a4@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d602: 4fef 000c lea %sp@(12),%sp 4d606: bcb9 0005 f0f0 cmpl 5f0f0 ,%d6 4d60c: 64d0 bccs 4d5de * 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 ) { 4d60e: 4a86 tstl %d6 4d610: 672a beqs 4d63c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d612: 42a7 clrl %sp@- 4d614: 2f02 movel %d2,%sp@- 4d616: 2f0a movel %a2,%sp@- 4d618: 4eb9 0004 cd58 jsr 4cd58 if ( !block_ptr ) 4d61e: 4fef 000c lea %sp@(12),%sp 4d622: 4a80 tstl %d0 4d624: 6700 00aa beqw 4d6d0 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 ); 4d628: 2f06 movel %d6,%sp@- 4d62a: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4d62c: d886 addl %d6,%d4 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, my_length ); 4d62e: 2f03 movel %d3,%sp@- 4d630: 2f10 movel %a0@,%sp@- 4d632: 4eb9 0004 e964 jsr 4e964 my_length = 0; copied += to_copy; 4d638: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4d63c: 42a7 clrl %sp@- 4d63e: 486e fff8 pea %fp@(-8) 4d642: 4eb9 0004 315c jsr 4315c 4d648: 222e fff8 movel %fp@(-8),%d1 return copied; 4d64c: 508f addql #8,%sp 4d64e: 2004 movel %d4,%d0 memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4d650: 2541 0042 movel %d1,%a2@(66) 4d654: 2541 0046 movel %d1,%a2@(70) return copied; } 4d658: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 4d65e: 4e5e unlk %fp 4d660: 4e75 rts unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 4d662: 262e 0014 movel %fp@(20),%d3 /* * 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 ) { 4d666: 2c0c movel %a4,%d6 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 4d668: 4284 clrl %d4 4d66a: 6000 ff62 braw 4d5ce last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4d66e: 2f08 movel %a0,%sp@- * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 4d670: b484 cmpl %d4,%d2 4d672: 6606 bnes 4d67a <== NEVER TAKEN 4d674: b685 cmpl %d5,%d3 4d676: 52c4 shi %d4 4d678: 6002 bras 4d67c 4d67a: 5ec4 sgt %d4 <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4d67c: 2f00 movel %d0,%sp@- * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; 4d67e: 49c4 extbl %d4 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4d680: 4484 negl %d4 4d682: 2f04 movel %d4,%sp@- 4d684: 2f0a movel %a2,%sp@- 4d686: 4eb9 0004 d390 jsr 4d390 if ( status ) 4d68c: 4fef 0010 lea %sp@(16),%sp 4d690: 4a80 tstl %d0 4d692: 66c4 bnes 4d658 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d694: 2e39 0005 f0f0 movel 5f0f0 ,%d7 4d69a: 2a07 movel %d7,%d5 4d69c: 5bc4 smi %d4 4d69e: 49c4 extbl %d4 4d6a0: 2f05 movel %d5,%sp@- 4d6a2: 2f04 movel %d4,%sp@- 4d6a4: 2f03 movel %d3,%sp@- 4d6a6: 2f02 movel %d2,%sp@- 4d6a8: 4eb9 0005 abfc jsr 5abfc <__moddi3> 4d6ae: 4fef 0010 lea %sp@(16),%sp 4d6b2: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d6b4: 2f05 movel %d5,%sp@- 4d6b6: 2f04 movel %d4,%sp@- 4d6b8: 2f03 movel %d3,%sp@- 4d6ba: 2f02 movel %d2,%sp@- 4d6bc: 4eb9 0005 a79c jsr 5a79c <__divdi3> 4d6c2: 4fef 0010 lea %sp@(16),%sp 4d6c6: 2401 movel %d1,%d2 if ( start_offset ) { 4d6c8: 4a8b tstl %a3 4d6ca: 6600 feba bnew 4d586 4d6ce: 6092 bras 4d662 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 4d6d0: 2004 movel %d4,%d0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4d6d2: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4d6d8: 4e5e unlk %fp <== NOT EXECUTED 4d6da: 4e75 rts <== NOT EXECUTED 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 ); if ( !block_ptr ) return copied; 4d6dc: 4280 clrl %d0 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4d6de: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4d6e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004293c : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 4293c: 4e56 ffd8 linkw %fp,#-40 42940: 222e 0014 movel %fp@(20),%d1 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 42944: 2001 movel %d1,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 42946: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 4294a: 0280 0000 f000 andil #61440,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 42950: 246e 0008 moveal %fp@(8),%a2 42954: 242e 0018 movel %fp@(24),%d2 42958: 206e 001c moveal %fp@(28),%a0 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 4295c: 0c80 0000 4000 cmpil #16384,%d0 42962: 6700 009c beqw 42a00 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 42966: 0c80 0000 8000 cmpil #32768,%d0 4296c: 6700 0096 beqw 42a04 *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 42970: 0c80 0000 6000 cmpil #24576,%d0 42976: 6774 beqs 429ec 42978: 0c80 0000 2000 cmpil #8192,%d0 4297e: 676c beqs 429ec rtems_filesystem_split_dev_t( dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 42980: 0c80 0000 1000 cmpil #4096,%d0 42986: 6772 beqs 429fa <== ALWAYS TAKEN 42988: 486e ffec pea %fp@(-20) size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 4298c: 206a 0014 moveal %a2@(20),%a0 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 42990: 2f01 movel %d1,%sp@- 42992: 2f2e 0010 movel %fp@(16),%sp@- 42996: 2f2e 000c movel %fp@(12),%sp@- 4299a: 2068 0008 moveal %a0@(8),%a0 4299e: 2f30 9c08 movel %a0@(00000008,%a1:l:4),%sp@- 429a2: 2f0a movel %a2,%sp@- 429a4: 4eb9 0004 b06a jsr 4b06a 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 ) { 429aa: 4fef 0018 lea %sp@(24),%sp 429ae: 4a80 tstl %d0 429b0: 675a beqs 42a0c IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); 429b2: 42a7 clrl %sp@- 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 ) { IMFS_jnode_t *parent = parentloc->node_access; 429b4: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 429b8: 240e movel %fp,%d2 429ba: 0682 ffff ffe4 addil #-28,%d2 429c0: 47f9 0004 315c lea 4315c ,%a3 429c6: 2f02 movel %d2,%sp@- 429c8: 4e93 jsr %a3@ 429ca: 256e ffe4 0046 movel %fp@(-28),%a2@(70) IMFS_update_mtime( parent ); 429d0: 42a7 clrl %sp@- 429d2: 2f02 movel %d2,%sp@- 429d4: 4e93 jsr %a3@ 429d6: 256e ffe4 0042 movel %fp@(-28),%a2@(66) 429dc: 4fef 0010 lea %sp@(16),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 429e0: 4280 clrl %d0 } else { rv = -1; } return rv; } 429e2: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3 429e8: 4e5e unlk %fp 429ea: 4e75 rts *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 429ec: 2d42 ffec movel %d2,%fp@(-20) 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; 429f0: 327c 0001 moveaw #1,%a1 rtems_filesystem_split_dev_t( 429f4: 2d48 fff0 movel %a0,%fp@(-16) 429f8: 608e bras 42988 dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { *type = IMFS_FIFO; 429fa: 327c 0006 moveaw #6,%a1 429fe: 6088 bras 42988 IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 42a00: 93c9 subal %a1,%a1 42a02: 6084 bras 42988 } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 42a04: 327c 0004 moveaw #4,%a1 42a08: 6000 ff7e braw 42988 IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 42a0c: 70ff moveq #-1,%d0 } return rv; } 42a0e: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3 42a14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a18 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42a18: 4e56 0000 linkw %fp,#0 42a1c: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 42a20: 2069 0020 moveal %a1@(32),%a0 42a24: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42a28: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 42a2a: 2468 004a moveal %a0@(74),%a2 42a2e: 4a92 tstl %a2@ 42a30: 662a bnes 42a5c if ( node->info.directory.mt_fs == NULL ) { 42a32: 4aa8 005a tstl %a0@(90) 42a36: 660e bnes 42a46 <== NEVER TAKEN node->info.directory.mt_fs = mt_entry; 42a38: 2149 005a movel %a1,%a0@(90) errno = ENOTDIR; rv = -1; } return rv; } 42a3c: 246e fffc moveal %fp@(-4),%a2 #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 42a40: 4280 clrl %d0 errno = ENOTDIR; rv = -1; } return rv; } 42a42: 4e5e unlk %fp 42a44: 4e75 rts if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a46: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a4c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a50: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a52: 7210 moveq #16,%d1 <== NOT EXECUTED rv = -1; 42a54: 70ff moveq #-1,%d0 <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a56: 4e5e unlk %fp <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 42a58: 2081 movel %d1,%a0@ <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42a5a: 4e75 rts <== NOT EXECUTED } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a5c: 4eb9 0004 e144 jsr 4e144 <__errno> rv = -1; } return rv; } 42a62: 246e fffc moveal %fp@(-4),%a2 } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a66: 2040 moveal %d0,%a0 42a68: 7214 moveq #20,%d1 rv = -1; 42a6a: 70ff moveq #-1,%d0 } return rv; } 42a6c: 4e5e unlk %fp } else { errno = EBUSY; rv = -1; } } else { errno = ENOTDIR; 42a6e: 2081 movel %d1,%a0@ rv = -1; } return rv; } ... =============================================================================== 0004b4e6 : } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 4b4e6: 4e56 0000 linkw %fp,#0 4b4ea: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b4ee: 2008 movel %a0,%d0 4b4f0: 0680 0000 0052 addil #82,%d0 if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 4b4f6: b0a8 004e cmpl %a0@(78),%d0 4b4fa: 660c bnes 4b508 errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { 4b4fc: 4aa8 005a tstl %a0@(90) 4b500: 661a bnes 4b51c <== NEVER TAKEN errno = EBUSY; node = NULL; } return node; } 4b502: 2008 movel %a0,%d0 4b504: 4e5e unlk %fp 4b506: 4e75 rts static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 4b508: 4eb9 0004 e144 jsr 4e144 <__errno> 4b50e: 725a moveq #90,%d1 4b510: 2240 moveal %d0,%a1 node = NULL; 4b512: 91c8 subal %a0,%a0 errno = EBUSY; node = NULL; } return node; } 4b514: 2008 movel %a0,%d0 4b516: 4e5e unlk %fp static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; 4b518: 2281 movel %d1,%a1@ errno = EBUSY; node = NULL; } return node; } 4b51a: 4e75 rts { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; 4b51c: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 4b522: 91c8 subal %a0,%a0 <== NOT EXECUTED 4b524: 2240 moveal %d0,%a1 <== NOT EXECUTED 4b526: 7010 moveq #16,%d0 <== NOT EXECUTED node = NULL; } return node; } 4b528: 4e5e unlk %fp <== NOT EXECUTED { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { errno = EBUSY; 4b52a: 2280 movel %d0,%a1@ <== NOT EXECUTED node = NULL; } return node; } 4b52c: 2008 movel %a0,%d0 <== NOT EXECUTED =============================================================================== 00042a74 : { const IMFS_jnode_t *node = loc->node_access; IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 42a74: 7202 moveq #2,%d1 #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { 42a76: 4e56 0000 linkw %fp,#0 42a7a: 206e 0008 moveal %fp@(8),%a0 const IMFS_jnode_t *node = loc->node_access; 42a7e: 2068 0008 moveal %a0@(8),%a0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 42a82: 2268 004a moveal %a0@(74),%a1 42a86: 2011 movel %a1@,%d0 IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 42a88: b280 cmpl %d0,%d1 42a8a: 6712 beqs 42a9e 42a8c: 123c 0005 moveb #5,%d1 42a90: b280 cmpl %d0,%d1 42a92: 6704 beqs 42a98 <== NEVER TAKEN type = imfs_type; break; } return type; } 42a94: 4e5e unlk %fp 42a96: 4e75 rts switch ( imfs_type ) { case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; case IMFS_LINEAR_FILE: type = RTEMS_FILESYSTEM_MEMORY_FILE; 42a98: 7004 moveq #4,%d0 <== NOT EXECUTED type = imfs_type; break; } return type; } 42a9a: 4e5e unlk %fp <== NOT EXECUTED 42a9c: 4e75 rts <== NOT EXECUTED 42a9e: 2068 004e moveal %a0@(78),%a0 42aa2: 4e5e unlk %fp 42aa4: 2068 004a moveal %a0@(74),%a0 42aa8: 2010 movel %a0@,%d0 <== NOT EXECUTED =============================================================================== 00042aac : ssize_t IMFS_readlink( const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize ) { 42aac: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42ab0: 206e 0008 moveal %fp@(8),%a0 ssize_t IMFS_readlink( const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize ) { 42ab4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42ab8: 266e 000c moveal %fp@(12),%a3 42abc: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42ac0: 2468 0008 moveal %a0@(8),%a2 IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42ac4: 672a beqs 42af0 <== NEVER TAKEN 42ac6: 206a 004e moveal %a2@(78),%a0 42aca: 1210 moveb %a0@,%d1 42acc: 6722 beqs 42af0 <== NEVER TAKEN 42ace: 91c8 subal %a0,%a0 42ad0: 4280 clrl %d0 42ad2: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 42ad4: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42ad8: 2040 moveal %d0,%a0 42ada: b480 cmpl %d0,%d2 42adc: 670a beqs 42ae8 42ade: 226a 004e moveal %a2@(78),%a1 42ae2: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 42ae6: 66ea bnes 42ad2 buf[i] = node->info.sym_link.name[i]; return i; } 42ae8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 42aec: 4e5e unlk %fp 42aee: 4e75 rts node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42af0: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 42af2: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 42af6: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042afc : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42afc: 4e56 ffe8 linkw %fp,#-24 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42b00: 206e 000c moveal %fp@(12),%a0 const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42b04: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42b08: 2468 0008 moveal %a0@(8),%a2 IMFS_jnode_t *new_parent = newparentloc->node_access; 42b0c: 206e 0010 moveal %fp@(16),%a0 const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 42b10: 242e 0018 movel %fp@(24),%d2 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; IMFS_jnode_t *new_parent = newparentloc->node_access; 42b14: 2668 0008 moveal %a0@(8),%a3 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 42b18: 4aaa 0008 tstl %a2@(8) 42b1c: 677a beqs 42b98 <== NEVER TAKEN if ( namelen < IMFS_NAME_MAX ) { 42b1e: 701f moveq #31,%d0 42b20: b082 cmpl %d2,%d0 42b22: 655c bcss 42b80 <== NEVER TAKEN memcpy( node->name, name, namelen ); 42b24: 2f02 movel %d2,%sp@- 42b26: 2f2e 0014 movel %fp@(20),%sp@- 42b2a: 486a 000c pea %a2@(12) 42b2e: 4eb9 0004 e964 jsr 4e964 node->name [namelen] = '\0'; 42b34: 4200 clrb %d0 42b36: 1580 280c moveb %d0,%a2@(0000000c,%d2:l) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 42b3a: 226a 0004 moveal %a2@(4),%a1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 42b3e: 2852 moveal %a2@,%a4 previous = the_node->previous; next->previous = previous; 42b40: 2949 0004 movel %a1,%a4@(4) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 42b44: 206b 0056 moveal %a3@(86),%a0 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 42b48: 228c movel %a4,%a1@ RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 42b4a: 43eb 0052 lea %a3@(82),%a1 static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 42b4e: 254b 0008 movel %a3,%a2@(8) 42b52: 2489 movel %a1,%a2@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 42b54: 274a 0056 movel %a2,%a3@(86) old_last->next = the_node; 42b58: 208a movel %a2,%a0@ the_node->previous = old_last; 42b5a: 2548 0004 movel %a0,%a2@(4) IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 42b5e: 42a7 clrl %sp@- 42b60: 486e fff8 pea %fp@(-8) 42b64: 4eb9 0004 315c jsr 4315c 42b6a: 256e fff8 0046 movel %fp@(-8),%a2@(70) 42b70: 4fef 0014 lea %sp@(20),%sp const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 42b74: 4280 clrl %d0 errno = EINVAL; rv = -1; } return rv; } 42b76: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 42b7c: 4e5e unlk %fp 42b7e: 4e75 rts IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 42b80: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 42b86: 745b moveq #91,%d2 <== NOT EXECUTED 42b88: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 42b8a: 70ff moveq #-1,%d0 <== NOT EXECUTED IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 42b8c: 2082 movel %d2,%a0@ <== NOT EXECUTED errno = EINVAL; rv = -1; } return rv; } 42b8e: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED 42b94: 4e5e unlk %fp <== NOT EXECUTED 42b96: 4e75 rts <== NOT EXECUTED } else { errno = ENAMETOOLONG; rv = -1; } } else { errno = EINVAL; 42b98: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 42b9e: 7216 moveq #22,%d1 <== NOT EXECUTED 42ba0: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 42ba2: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 42ba4: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED } else { errno = ENAMETOOLONG; rv = -1; } } else { errno = EINVAL; 42baa: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 42bac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b428 : static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b428: 4e56 0000 linkw %fp,#0 4b42c: 226e 0008 moveal %fp@(8),%a1 4b430: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; 4b432: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b436: 206e 000c moveal %fp@(12),%a0 const IMFS_jnode_t *node = loc->node_access; const IMFS_device_t *io = &node->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b43a: 202a 0052 movel %a2@(82),%d0 4b43e: 216a 004e 0016 movel %a2@(78),%a0@(22) return IMFS_stat( loc, buf ); } 4b444: 245f moveal %sp@+,%a2 4b446: 4e5e unlk %fp ) { const IMFS_jnode_t *node = loc->node_access; const IMFS_device_t *io = &node->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b448: 2140 001a movel %d0,%a0@(26) return IMFS_stat( loc, buf ); 4b44c: 4ef9 0004 b6a8 jmp 4b6a8 ... =============================================================================== 0004b670 : static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b670: 4e56 0000 linkw %fp,#0 4b674: 226e 0008 moveal %fp@(8),%a1 4b678: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b67a: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b67e: 206e 000c moveal %fp@(12),%a0 const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b682: 202a 004e movel %a2@(78),%d0 4b686: 222a 0052 movel %a2@(82),%d1 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b68a: 45f9 0005 e25c lea 5e25c ,%a2 4b690: 2152 003e movel %a2@,%a0@(62) return IMFS_stat( loc, buf ); } 4b694: 245f moveal %sp@+,%a2 4b696: 4e5e unlk %fp struct stat *buf ) { const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 4b698: 2140 001e movel %d0,%a0@(30) 4b69c: 2141 0022 movel %d1,%a0@(34) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return IMFS_stat( loc, buf ); 4b6a0: 4ef9 0004 b6a8 jmp 4b6a8 ... =============================================================================== 00042ca0 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42ca0: 4e56 0000 linkw %fp,#0 42ca4: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 42ca8: 2069 0020 moveal %a1@(32),%a0 42cac: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42cb0: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 42cb2: 2468 004a moveal %a0@(74),%a2 42cb6: 4a92 tstl %a2@ 42cb8: 662a bnes 42ce4 <== NEVER TAKEN if ( node->info.directory.mt_fs == mt_entry ) { 42cba: b3e8 005a cmpal %a0@(90),%a1 42cbe: 660e bnes 42cce <== NEVER TAKEN node->info.directory.mt_fs = NULL; 42cc0: 42a8 005a clrl %a0@(90) errno = ENOTDIR; rv = -1; } return rv; } 42cc4: 246e fffc moveal %fp@(-4),%a2 #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 42cc8: 4280 clrl %d0 errno = ENOTDIR; rv = -1; } return rv; } 42cca: 4e5e unlk %fp 42ccc: 4e75 rts if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42cce: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42cd4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42cd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cda: 7216 moveq #22,%d1 <== NOT EXECUTED rv = -1; 42cdc: 70ff moveq #-1,%d0 <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42cde: 4e5e unlk %fp <== NOT EXECUTED if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 42ce0: 2081 movel %d1,%a0@ <== NOT EXECUTED errno = ENOTDIR; rv = -1; } return rv; } 42ce2: 4e75 rts <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42ce4: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED rv = -1; } return rv; } 42cea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42cee: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cf0: 7214 moveq #20,%d1 <== NOT EXECUTED rv = -1; 42cf2: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 42cf4: 4e5e unlk %fp <== NOT EXECUTED } else { errno = EINVAL; rv = -1; } } else { errno = ENOTDIR; 42cf6: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } ... =============================================================================== 00043334 : void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 43334: 4e56 ffe8 linkw %fp,#-24 43338: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4333c: 282e 000c movel %fp@(12),%d4 43340: 2a2e 0010 movel %fp@(16),%d5 Heap_Control *heap = RTEMS_Malloc_Heap; 43344: 2639 0005 e21c movel 5e21c ,%d3 if ( !rtems_configuration_get_unified_work_area() ) { 4334a: 4a39 0005 c605 tstb 5c605 43350: 6638 bnes 4338a Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { 43352: 4a84 tstl %d4 43354: 6764 beqs 433ba 43356: 246e 0008 moveal %fp@(8),%a2 4335a: 4282 clrl %d2 4335c: 47f9 0004 86b0 lea 486b0 <_Heap_Initialize>,%a3 const Heap_Area *area = &areas [i]; uintptr_t space_available = (*init_or_extend)( 43362: 4878 0004 pea 4 43366: 2f2a 0004 movel %a2@(4),%sp@- 4336a: 2f12 movel %a2@,%sp@- 4336c: 2f03 movel %d3,%sp@- 4336e: 4e93 jsr %a3@ area->begin, area->size, page_size ); if ( space_available > 0 ) { 43370: 4fef 0010 lea %sp@(16),%sp 43374: 4a80 tstl %d0 43376: 6702 beqs 4337a <== NEVER TAKEN init_or_extend = extend; 43378: 2645 moveal %d5,%a3 if ( !rtems_configuration_get_unified_work_area() ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { 4337a: 5282 addql #1,%d2 4337c: 508a addql #8,%a2 4337e: b882 cmpl %d2,%d4 43380: 66e0 bnes 43362 <== NEVER TAKEN if ( space_available > 0 ) { init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { 43382: b7fc 0004 86b0 cmpal #296624,%a3 43388: 6730 beqs 433ba <== NEVER TAKEN } /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4338a: 2079 0005 e8c4 moveal 5e8c4 ,%a0 43390: 4a88 tstl %a0 43392: 6704 beqs 43398 (*rtems_malloc_statistics_helpers->initialize)(); 43394: 2050 moveal %a0@,%a0 43396: 4e90 jsr %a0@ } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 43398: 2439 0005 f900 movel 5f900 ,%d2 4339e: 2f03 movel %d3,%sp@- 433a0: 4eb9 0004 91f4 jsr 491f4 <_Protected_heap_Get_size> 433a6: 588f addql #4,%sp 433a8: d082 addl %d2,%d0 } 433aa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 433b0: 23c0 0005 f900 movel %d0,5f900 } 433b6: 4e5e unlk %fp 433b8: 4e75 rts init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { _Internal_error_Occurred( 433ba: 4878 0017 pea 17 433be: 4878 0001 pea 1 433c2: 42a7 clrl %sp@- 433c4: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> ... =============================================================================== 00062bb8 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 62bb8: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 62bba: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 62bbe: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 62bc2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 62bc6: b08a cmpl %a2,%d0 <== NOT EXECUTED 62bc8: 6700 014c beqw 62d16 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 62bcc: 262a 00ec movel %a2@(236),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 62bd0: 47ea 00ac lea %a2@(172),%a3 <== NOT EXECUTED 62bd4: 226a 00b0 moveal %a2@(176),%a1 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 62bd8: 2413 movel %a3@,%d2 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 62bda: 70fc moveq #-4,%d0 <== NOT EXECUTED 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); 62bdc: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 62be2: 41e9 0020 lea %a1@(32),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 62be6: c082 andl %d2,%d0 <== NOT EXECUTED 62be8: d088 addl %a0,%d0 <== NOT EXECUTED 62bea: b088 cmpl %a0,%d0 <== NOT EXECUTED 62bec: 6300 00ae blsw 62c9c <== NOT EXECUTED if (*base != U32_PATTERN) 62bf0: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 62bf6: b2a9 0020 cmpl %a1@(32),%d1 <== NOT EXECUTED 62bfa: 6612 bnes 62c0e <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 62bfc: 5888 addql #4,%a0 <== NOT EXECUTED 62bfe: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 62c00: 6400 009a bccw 62c9c <== NOT EXECUTED if (*base != U32_PATTERN) 62c04: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 62c0a: b290 cmpl %a0@,%d1 <== NOT EXECUTED 62c0c: 67ee beqs 62bfc <== NOT EXECUTED 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 ); 62c0e: 49f1 2810 lea %a1@(00000010,%d2:l),%a4 <== NOT EXECUTED 62c12: 99c8 subal %a0,%a4 <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 62c14: 4a8a tstl %a2 <== NOT EXECUTED 62c16: 6700 008c beqw 62ca4 <== NOT EXECUTED #endif { (*print_handler)( 62c1a: 486e fffb pea %fp@(-5) <== NOT EXECUTED 62c1e: 4878 0005 pea 5 <== NOT EXECUTED 62c22: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 62c26: 2a79 0009 f208 moveal 9f208 ,%a5 <== NOT EXECUTED 62c2c: 4eb9 0004 e620 jsr 4e620 <== NOT EXECUTED 62c32: 2f00 movel %d0,%sp@- <== NOT EXECUTED 62c34: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 62c38: 4879 0009 6a42 pea 96a42 <== NOT EXECUTED 62c3e: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62c44: 4e95 jsr %a5@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 62c46: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 62c4a: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 62c4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 62c50: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 62c52: 2013 movel %a3@,%d0 <== NOT EXECUTED 62c54: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 62c56: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 62c5a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 62c5c: 4879 0009 6a5d pea 96a5d <== NOT EXECUTED 62c62: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62c68: 2079 0009 f208 moveal 9f208 ,%a0 <== NOT EXECUTED 62c6e: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 62c70: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 62c74: 4ab9 0009 f200 tstl 9f200 <== NOT EXECUTED 62c7a: 6676 bnes 62cf2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 62c7c: 4879 0009 6a7b pea 96a7b <== NOT EXECUTED 62c82: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62c88: 2079 0009 f208 moveal 9f208 ,%a0 <== NOT EXECUTED 62c8e: 4e90 jsr %a0@ <== NOT EXECUTED 62c90: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 62c92: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 62c98: 4e5e unlk %fp <== NOT EXECUTED 62c9a: 4e75 rts <== NOT EXECUTED 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; 62c9c: 99cc subal %a4,%a4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 62c9e: 4a8a tstl %a2 <== NOT EXECUTED 62ca0: 6600 ff78 bnew 62c1a <== NOT EXECUTED 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 ); 62ca4: 4878 ffff pea ffffffff <== NOT EXECUTED 62ca8: 4879 0009 6a4f pea 96a4f <== NOT EXECUTED 62cae: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62cb4: 2079 0009 f208 moveal 9f208 ,%a0 <== NOT EXECUTED 62cba: 4e90 jsr %a0@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 62cbc: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 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 ); 62cc0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } #endif (*print_handler)( 62cc4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 62cc6: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 62cc8: 2013 movel %a3@,%d0 <== NOT EXECUTED 62cca: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 62ccc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 62cd0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 62cd2: 4879 0009 6a5d pea 96a5d <== NOT EXECUTED 62cd8: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62cde: 2079 0009 f208 moveal 9f208 ,%a0 <== NOT EXECUTED 62ce4: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 62ce6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 62cea: 4ab9 0009 f200 tstl 9f200 <== NOT EXECUTED 62cf0: 678a beqs 62c7c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 62cf2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 62cf4: 4879 0009 6a88 pea 96a88 <== NOT EXECUTED 62cfa: 2f39 0009 f204 movel 9f204 ,%sp@- <== NOT EXECUTED 62d00: 2079 0009 f208 moveal 9f208 ,%a0 <== NOT EXECUTED 62d06: 4e90 jsr %a0@ <== NOT EXECUTED 62d08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 62d0c: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 62d12: 4e5e unlk %fp <== NOT EXECUTED 62d14: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 62d16: 2279 000a 014c moveal a014c ,%a1<== NOT EXECUTED 62d1c: 4a89 tstl %a1 <== NOT EXECUTED 62d1e: 6700 ff72 beqw 62c92 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 62d22: 47f9 000a 0148 lea a0148 ,%a3 <== NOT EXECUTED the_thread = 0; current = 0; 62d28: 4283 clrl %d3 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 62d2a: 95ca subal %a2,%a2 <== NOT EXECUTED 62d2c: 6000 feaa braw 62bd8 <== NOT EXECUTED =============================================================================== 00062e0e : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 62e0e: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 62e12: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 62e16: 4879 0009 6a8e pea 96a8e <== NOT EXECUTED 62e1c: 47f9 0004 3cc0 lea 43cc0 ,%a3 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 62e22: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 62e26: 286a 00b0 moveal %a2@(176),%a4 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 62e2a: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 62e2e: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 62e30: 2f0a movel %a2,%sp@- <== NOT EXECUTED 62e32: 4879 0009 6a9e pea 96a9e <== NOT EXECUTED 62e38: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 62e3a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 62e3e: 4879 0009 6abb pea 96abb <== NOT EXECUTED 62e44: 4e93 jsr %a3@ <== NOT EXECUTED printk( 62e46: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 62e4a: 4879 0009 6acd pea 96acd <== NOT EXECUTED 62e50: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 62e52: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 62e56: 4878 0020 pea 20 <== NOT EXECUTED 62e5a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 62e5e: 4eb9 0004 e620 jsr 4e620 <== NOT EXECUTED 62e64: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 62e68: 2e80 movel %d0,%sp@ <== NOT EXECUTED 62e6a: 4879 0009 6ae1 pea 96ae1 <== NOT EXECUTED 62e70: 4e93 jsr %a3@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 62e72: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 62e76: 202a 00ac movel %a2@(172),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 62e7a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 62e7e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 62e80: 2f00 movel %d0,%sp@- <== NOT EXECUTED 62e82: 4879 0009 6af7 pea 96af7 <== NOT EXECUTED 62e88: 4e93 jsr %a3@ <== NOT EXECUTED "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) { 62e8a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 62e8e: 4a02 tstb %d2 <== NOT EXECUTED 62e90: 670e beqs 62ea0 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 62e92: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 62e96: 4878 0009 pea 9 <== NOT EXECUTED 62e9a: 4eb9 0004 795c jsr 4795c <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 62ea0: 486c 0018 pea %a4@(24) <== NOT EXECUTED 62ea4: 486c 0008 pea %a4@(8) <== NOT EXECUTED 62ea8: 4878 0010 pea 10 <== NOT EXECUTED 62eac: 4879 0009 6b28 pea 96b28 <== NOT EXECUTED 62eb2: 4e93 jsr %a3@ <== NOT EXECUTED 62eb4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 62eb8: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 62ebc: 4878 0009 pea 9 <== NOT EXECUTED 62ec0: 4eb9 0004 795c jsr 4795c <== NOT EXECUTED =============================================================================== 0004d1fc : * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4d1fc: 41f9 0006 1a24 lea 61a24 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4d202: 4e56 0000 linkw %fp,#0 * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; 4d206: 202e 0008 movel %fp@(8),%d0 4d20a: 4c50 0001 remul %a0@,%d1,%d0 4d20e: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4d212: 4a81 tstl %d1 4d214: 6702 beqs 4d218 <== ALWAYS TAKEN ticks += 1; 4d216: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4d218: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048cdc : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48cdc: 4e56 0000 linkw %fp,#0 /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48ce0: 2039 0005 d6c4 movel 5d6c4 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48ce6: 2f02 movel %d2,%sp@- /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick(); 48ce8: 243c 0000 03e8 movel #1000,%d2 48cee: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 48cf2: 242e 0008 movel %fp@(8),%d2 48cf6: 4c40 2001 remul %d0,%d1,%d2 48cfa: 4c40 2002 remul %d0,%d2,%d2 48cfe: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 48d00: 4a81 tstl %d1 48d02: 6702 beqs 48d06 <== ALWAYS TAKEN ticks += 1; 48d04: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 48d06: 241f movel %sp@+,%d2 48d08: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047f08 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 47f08: 4e56 0000 linkw %fp,#0 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 47f0c: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 ++level; 47f12: 5280 addql #1,%d0 47f14: 206e 0008 moveal %fp@(8),%a0 _Thread_Dispatch_disable_level = level; 47f18: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> /* Dispatch is already disabled in SMP while lock is held. */ #if !defined(RTEMS_SMP) _Thread_Disable_dispatch(); #endif _CORE_mutex_Surrender( 47f1e: 42a7 clrl %sp@- 47f20: 2f28 0008 movel %a0@(8),%sp@- 47f24: 4868 0010 pea %a0@(16) 47f28: 4eb9 0004 8298 jsr 48298 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47f2e: 4fef 000c lea %sp@(12),%sp } 47f32: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 47f34: 4ef9 0004 9c44 jmp 49c44 <_Thread_Enable_dispatch> ... =============================================================================== 00047de2 <_API_extensions_Add_post_switch>: void _API_extensions_Add_post_switch( API_extensions_Post_switch_control *post_switch ) { 47de2: 4e56 0000 linkw %fp,#0 47de6: 206e 0008 moveal %fp@(8),%a0 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 47dea: 4a90 tstl %a0@ 47dec: 6704 beqs 47df2 <_API_extensions_Add_post_switch+0x10> _Chain_Append_if_is_off_chain_unprotected( &_API_extensions_Post_switch_list, &post_switch->Node ); } 47dee: 4e5e unlk %fp 47df0: 4e75 rts 47df2: 4aa8 0004 tstl %a0@(4) 47df6: 66f6 bnes 47dee <_API_extensions_Add_post_switch+0xc><== NEVER TAKEN Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 47df8: 2279 0005 fa82 moveal 5fa82 <_API_extensions_Post_switch_list+0x8>,%a1 47dfe: 4e5e unlk %fp the_node->next = tail; 47e00: 20bc 0005 fa7e movel #391806,%a0@ tail->previous = the_node; 47e06: 23c8 0005 fa82 movel %a0,5fa82 <_API_extensions_Post_switch_list+0x8> old_last->next = the_node; 47e0c: 2288 movel %a0,%a1@ the_node->previous = old_last; 47e0e: 2149 0004 movel %a1,%a0@(4) =============================================================================== 00047e14 <_API_extensions_Run_postdriver>: } } #endif void _API_extensions_Run_postdriver( void ) { 47e14: 4e56 0000 linkw %fp,#0 47e18: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 47e1a: 2479 0005 fb2a moveal 5fb2a <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47e20: b5fc 0005 fb2e cmpal #391982,%a2 47e26: 6710 beqs 47e38 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * 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)(); 47e28: 206a 0008 moveal %a2@(8),%a0 47e2c: 4e90 jsr %a0@ 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 ) { 47e2e: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 47e30: b5fc 0005 fb2e cmpal #391982,%a2 47e36: 66f0 bnes 47e28 <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 47e38: 246e fffc moveal %fp@(-4),%a2 47e3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f30c <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f30c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f312: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4f316: 2279 0006 2092 moveal 62092 <_Per_CPU_Information+0xe>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f31c: 48d7 001c moveml %d2-%d4,%sp@ 4f320: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4f324: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f328: 242e 000c movel %fp@(12),%d2 4f32c: 262e 0014 movel %fp@(20),%d3 4f330: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f334: 40c1 movew %sr,%d1 4f336: 8081 orl %d1,%d0 4f338: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4f33a: 2028 0048 movel %a0@(72),%d0 4f33e: 5280 addql #1,%d0 4f340: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4f344: 4aa8 0040 tstl %a0@(64) 4f348: 6606 bnes 4f350 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 4f34a: b0a8 0044 cmpl %a0@(68),%d0 4f34e: 672e beqs 4f37e <_CORE_barrier_Wait+0x72> 4f350: 7001 moveq #1,%d0 4f352: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4f356: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4f35a: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4f35e: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4f360: 2d43 000c movel %d3,%fp@(12) 4f364: 203c 0004 bee0 movel #311008,%d0 4f36a: 2d48 0008 movel %a0,%fp@(8) } 4f36e: 4cd7 001c moveml %sp@,%d2-%d4 _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4f372: 2d40 0010 movel %d0,%fp@(16) } 4f376: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4f378: 4ef9 0004 bb10 jmp 4bb10 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4f37e: 7001 moveq #1,%d0 4f380: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4f384: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4f386: 2d44 0010 movel %d4,%fp@(16) 4f38a: 2d42 000c movel %d2,%fp@(12) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4f38e: 4cd7 001c moveml %sp@,%d2-%d4 if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4f392: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 4f396: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4f398: 4ef9 0004 f2d0 jmp 4f2d0 <_CORE_barrier_Release> ... =============================================================================== 00058830 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 58830: 4e56 ffe4 linkw %fp,#-28 58834: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 58838: 266e 0008 moveal %fp@(8),%a3 5883c: 282e 000c movel %fp@(12),%d4 58840: 242e 0010 movel %fp@(16),%d2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 58844: b4ab 004c cmpl %a3@(76),%d2 58848: 6266 bhis 588b0 <_CORE_message_queue_Broadcast+0x80> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 5884a: 4aab 0048 tstl %a3@(72) 5884e: 664e bnes 5889e <_CORE_message_queue_Broadcast+0x6e> /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 58850: 2f0b movel %a3,%sp@- 58852: 49f9 0005 b554 lea 5b554 <_Thread_queue_Dequeue>,%a4 * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 58858: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5885a: 4bf9 0005 fe18 lea 5fe18 ,%a5 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 58860: 4e94 jsr %a4@ 58862: 588f addql #4,%sp 58864: 2440 moveal %d0,%a2 58866: 4a80 tstl %d0 58868: 6722 beqs 5888c <_CORE_message_queue_Broadcast+0x5c> 5886a: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5886c: 5283 addql #1,%d3 5886e: 2f04 movel %d4,%sp@- 58870: 2f2a 002c movel %a2@(44),%sp@- 58874: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 58876: 206a 0028 moveal %a2@(40),%a0 5887a: 4fef 000c lea %sp@(12),%sp 5887e: 2082 movel %d2,%a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 58880: 2f0b movel %a3,%sp@- 58882: 4e94 jsr %a4@ 58884: 588f addql #4,%sp 58886: 2440 moveal %d0,%a2 58888: 4a80 tstl %d0 5888a: 66de bnes 5886a <_CORE_message_queue_Broadcast+0x3a><== NEVER TAKEN if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5888c: 206e 001c moveal %fp@(28),%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 58890: 4280 clrl %d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 58892: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 58894: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5889a: 4e5e unlk %fp 5889c: 4e75 rts * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 5889e: 206e 001c moveal %fp@(28),%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 588a2: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 588a4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 588aa: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 588ac: 4e5e unlk %fp 588ae: 4e75 rts Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 588b0: 7001 moveq #1,%d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 588b2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 588b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000552f4 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 552f4: 4e56 0000 linkw %fp,#0 552f8: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 552fa: 2f2e 0010 movel %fp@(16),%sp@- 552fe: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 55302: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 55306: 2f0a movel %a2,%sp@- 55308: 4eb9 0005 0118 jsr 50118 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 5530e: 4fef 000c lea %sp@(12),%sp 55312: 4aaa 0048 tstl %a2@(72) 55316: 6612 bnes 5532a <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55318: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 5531e: 246e fffc moveal %fp@(-4),%a2 55322: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55324: 4ef9 0005 09ec jmp 509ec <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 5532a: 2f0a movel %a2,%sp@- 5532c: 4eb9 0005 5348 jsr 55348 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 55332: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 55338: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 5533a: 246e fffc moveal %fp@(-4),%a2 5533e: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 55340: 4ef9 0005 09ec jmp 509ec <_Workspace_Free> ... =============================================================================== 000507c0 <_CORE_message_queue_Initialize>: /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 507c0: 7203 moveq #3,%d1 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 ) { 507c2: 4e56 ffe4 linkw %fp,#-28 507c6: 202e 0014 movel %fp@(20),%d0 507ca: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 507ce: 246e 0008 moveal %fp@(8),%a2 507d2: 282e 0010 movel %fp@(16),%d4 /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 507d6: c280 andl %d0,%d1 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 507d8: 2544 0044 movel %d4,%a2@(68) the_message_queue->number_of_pending_messages = 0; 507dc: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 507e0: 2540 004c movel %d0,%a2@(76) /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 507e4: 4a81 tstl %d1 507e6: 6718 beqs 50800 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uintptr_t); 507e8: 2200 movel %d0,%d1 507ea: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uintptr_t) - 1); 507ec: 74fc moveq #-4,%d2 507ee: c282 andl %d2,%d1 /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) 507f0: b280 cmpl %d0,%d1 507f2: 640e bccs 50802 <_CORE_message_queue_Initialize+0x42> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 507f4: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) return false; 507fa: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 507fc: 4e5e unlk %fp 507fe: 4e75 rts /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { 50800: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 50802: 2a01 movel %d1,%d5 50804: 0685 0000 0010 addil #16,%d5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 5080a: 2f05 movel %d5,%sp@- if ( x > SIZE_MAX ) 5080c: 4286 clrl %d6 5080e: 7eff moveq #-1,%d7 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 50810: 42a7 clrl %sp@- 50812: 2f04 movel %d4,%sp@- 50814: 42a7 clrl %sp@- 50816: 4eb9 0006 3584 jsr 63584 <__muldi3> 5081c: 4fef 0010 lea %sp@(16),%sp 50820: 2400 movel %d0,%d2 50822: 2601 movel %d1,%d3 if ( x > SIZE_MAX ) 50824: 9e83 subl %d3,%d7 50826: 9d82 subxl %d2,%d6 50828: 6dca blts 507f4 <_CORE_message_queue_Initialize+0x34> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 5082a: 2f01 movel %d1,%sp@- 5082c: 4eb9 0005 3694 jsr 53694 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 50832: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 50834: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 50838: 67ba beqs 507f4 <_CORE_message_queue_Initialize+0x34><== NEVER TAKEN /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 5083a: 2f05 movel %d5,%sp@- */ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority( CORE_message_queue_Attributes *the_attribute ) { return 5083c: 7e01 moveq #1,%d7 5083e: 2f04 movel %d4,%sp@- 50840: 2f00 movel %d0,%sp@- 50842: 486a 0060 pea %a2@(96) 50846: 4eb9 0005 0758 jsr 50758 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 5084c: 4878 0006 pea 6 50850: 206e 000c moveal %fp@(12),%a0 50854: be90 cmpl %a0@,%d7 50856: 57c0 seq %d0 50858: 4878 0080 pea 80 5085c: 49c0 extbl %d0 5085e: 4480 negl %d0 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 ); 50860: 41ea 0054 lea %a2@(84),%a0 50864: 2f00 movel %d0,%sp@- 50866: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5086a: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5086e: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50872: 2548 0058 movel %a0,%a2@(88) 50876: 2f0a movel %a2,%sp@- 50878: 4eb9 0005 2e90 jsr 52e90 <_Thread_queue_Initialize> 5087e: 4fef 0020 lea %sp@(32),%sp STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50882: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 50888: 7001 moveq #1,%d0 } 5088a: 4e5e unlk %fp ... =============================================================================== 00050890 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 50890: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50896: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 5089a: 2079 0006 91a6 moveal 691a6 <_Per_CPU_Information+0xe>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 508a0: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 508a4: 246e 0008 moveal %fp@(8),%a2 508a8: 282e 000c movel %fp@(12),%d4 508ac: 242e 0010 movel %fp@(16),%d2 508b0: 226e 0014 moveal %fp@(20),%a1 508b4: 2a2e 001c movel %fp@(28),%d5 508b8: 1c2e 001b moveb %fp@(27),%d6 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 508bc: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 508c0: 40c1 movew %sr,%d1 508c2: 8081 orl %d1,%d0 508c4: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 508c6: 260a movel %a2,%d3 508c8: 200a movel %a2,%d0 508ca: 0683 0000 0050 addil #80,%d3 508d0: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 508d6: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 508da: b08b cmpl %a3,%d0 508dc: 674a beqs 50928 <_CORE_message_queue_Seize+0x98> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 508de: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 508e0: 2143 0004 movel %d3,%a0@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 508e4: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 508e8: 2548 0050 movel %a0,%a2@(80) _ISR_Enable( level ); 508ec: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 508ee: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 508f2: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 508f6: 2079 0006 91a6 moveal 691a6 <_Per_CPU_Information+0xe>,%a0 508fc: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50900: 2f11 movel %a1@,%sp@- 50902: 486b 000c pea %a3@(12) 50906: 2f02 movel %d2,%sp@- 50908: 4eb9 0005 76b8 jsr 576b8 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5090e: 4fef 000c lea %sp@(12),%sp 50912: 2d4a 0008 movel %a2,%fp@(8) 50916: 2d4b 000c movel %a3,%fp@(12) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 5091a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 50920: 4e5e unlk %fp 50922: 4ef9 0005 06e4 jmp 506e4 <_Chain_Append> return; } #endif } if ( !wait ) { 50928: 4a06 tstb %d6 5092a: 6612 bnes 5093e <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 5092c: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 5092e: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50930: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 50936: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 5093a: 4e5e unlk %fp 5093c: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5093e: 7001 moveq #1,%d0 50940: 2540 0030 movel %d0,%a2@(48) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 50944: 2142 002c movel %d2,%a0@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 50948: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 5094c: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 50950: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 50954: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50956: 2d45 000c movel %d5,%fp@(12) 5095a: 203c 0005 2f90 movel #339856,%d0 50960: 2d4a 0008 movel %a2,%fp@(8) } 50964: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5096a: 2d40 0010 movel %d0,%fp@(16) } 5096e: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50970: 4ef9 0005 2bc0 jmp 52bc0 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 000481ac <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 481ac: 4e56 0000 linkw %fp,#0 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 481b0: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 481b6: 2f0a movel %a2,%sp@- 481b8: 246e 0008 moveal %fp@(8),%a2 481bc: 2f02 movel %d2,%sp@- 481be: 142e 0013 moveb %fp@(19),%d2 481c2: 4a80 tstl %d0 481c4: 6768 beqs 4822e <_CORE_mutex_Seize+0x82> _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 481c6: 4a02 tstb %d2 481c8: 6700 0098 beqw 48262 <_CORE_mutex_Seize+0xb6> 481cc: 7001 moveq #1,%d0 481ce: b0b9 0005 fb6c cmpl 5fb6c <_System_state_Current>,%d0 481d4: 6500 00b2 bcsw 48288 <_CORE_mutex_Seize+0xdc> 481d8: 486e 0018 pea %fp@(24) 481dc: 2f0a movel %a2,%sp@- 481de: 4eb9 0004 c5ac jsr 4c5ac <_CORE_mutex_Seize_interrupt_trylock> 481e4: 508f addql #8,%sp 481e6: 4a80 tstl %d0 481e8: 6738 beqs 48222 <_CORE_mutex_Seize+0x76> <== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 481ea: 7001 moveq #1,%d0 481ec: 2079 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a0 481f2: 2540 0030 movel %d0,%a2@(48) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 481f6: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 ++level; 481fc: 5280 addql #1,%d0 481fe: 216e 000c 0020 movel %fp@(12),%a0@(32) 48204: 214a 0044 movel %a2,%a0@(68) _Thread_Dispatch_disable_level = level; 48208: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> 4820e: 202e 0018 movel %fp@(24),%d0 48212: 46c0 movew %d0,%sr 48214: 2f2e 0014 movel %fp@(20),%sp@- 48218: 2f0a movel %a2,%sp@- 4821a: 4eb9 0004 8114 jsr 48114 <_CORE_mutex_Seize_interrupt_blocking> 48220: 508f addql #8,%sp } 48222: 242e fff8 movel %fp@(-8),%d2 48226: 246e fffc moveal %fp@(-4),%a2 4822a: 4e5e unlk %fp 4822c: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 4822e: 486e 0018 pea %fp@(24) 48232: 2f0a movel %a2,%sp@- 48234: 4eb9 0004 c5ac jsr 4c5ac <_CORE_mutex_Seize_interrupt_trylock> 4823a: 508f addql #8,%sp 4823c: 4a80 tstl %d0 4823e: 67e2 beqs 48222 <_CORE_mutex_Seize+0x76> 48240: 4a02 tstb %d2 48242: 66a6 bnes 481ea <_CORE_mutex_Seize+0x3e> 48244: 202e 0018 movel %fp@(24),%d0 48248: 46c0 movew %d0,%sr 4824a: 2079 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a0 48250: 7001 moveq #1,%d0 48252: 2140 0034 movel %d0,%a0@(52) } 48256: 242e fff8 movel %fp@(-8),%d2 4825a: 246e fffc moveal %fp@(-4),%a2 4825e: 4e5e unlk %fp 48260: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 48262: 486e 0018 pea %fp@(24) 48266: 2f0a movel %a2,%sp@- 48268: 4eb9 0004 c5ac jsr 4c5ac <_CORE_mutex_Seize_interrupt_trylock> 4826e: 508f addql #8,%sp 48270: 4a80 tstl %d0 48272: 67ae beqs 48222 <_CORE_mutex_Seize+0x76> <== ALWAYS TAKEN 48274: 202e 0018 movel %fp@(24),%d0 <== NOT EXECUTED 48278: 46c0 movew %d0,%sr <== NOT EXECUTED 4827a: 2079 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a0 <== NOT EXECUTED 48280: 7001 moveq #1,%d0 <== NOT EXECUTED 48282: 2140 0034 movel %d0,%a0@(52) <== NOT EXECUTED 48286: 60ce bras 48256 <_CORE_mutex_Seize+0xaa> <== NOT EXECUTED 48288: 4878 0012 pea 12 4828c: 42a7 clrl %sp@- 4828e: 42a7 clrl %sp@- 48290: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> ... =============================================================================== 000483ec <_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 ) { 483ec: 4e56 0000 linkw %fp,#0 483f0: 2f0a movel %a2,%sp@- 483f2: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 483f6: 2f0a movel %a2,%sp@- 483f8: 4eb9 0004 9fb0 jsr 49fb0 <_Thread_queue_Dequeue> 483fe: 588f addql #4,%sp 48400: 4a80 tstl %d0 48402: 670a beqs 4840e <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 48404: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 48408: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4840a: 4e5e unlk %fp 4840c: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 4840e: 303c 0700 movew #1792,%d0 48412: 40c1 movew %sr,%d1 48414: 8081 orl %d1,%d0 48416: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 48418: 202a 0048 movel %a2@(72),%d0 4841c: b0aa 0040 cmpl %a2@(64),%d0 48420: 6412 bccs 48434 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 48422: 5280 addql #1,%d0 48424: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 48428: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 4842a: 46c1 movew %d1,%sr } return status; } 4842c: 246e fffc moveal %fp@(-4),%a2 48430: 4e5e unlk %fp 48432: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 48434: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 48436: 46c1 movew %d1,%sr <== NOT EXECUTED 48438: 60f2 bras 4842c <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 00047fb0 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 47fb0: 4e56 ffec linkw %fp,#-20 47fb4: 202e 0010 movel %fp@(16),%d0 47fb8: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47fbc: 246e 0008 moveal %fp@(8),%a2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 47fc0: 2600 movel %d0,%d3 size_t node_size ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 47fc2: 280a movel %a2,%d4 47fc4: 5884 addql #4,%d4 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 47fc6: 5383 subql #1,%d3 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 47fc8: 242e 000c movel %fp@(12),%d2 47fcc: 222e 0014 movel %fp@(20),%d1 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; 47fd0: 42aa 0004 clrl %a2@(4) while ( count-- ) { 47fd4: 4a80 tstl %d0 47fd6: 672e beqs 48006 <_Chain_Initialize+0x56> <== NEVER TAKEN 47fd8: 2003 movel %d3,%d0 47fda: 2042 moveal %d2,%a0 47fdc: 224a moveal %a2,%a1 current->next = next; 47fde: 2288 movel %a0,%a1@ Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 47fe0: 5380 subql #1,%d0 47fe2: 7aff moveq #-1,%d5 current->next = next; next->previous = current; 47fe4: 2149 0004 movel %a1,%a0@(4) 47fe8: 2248 moveal %a0,%a1 current = next; next = (Chain_Node *) 47fea: d1c1 addal %d1,%a0 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 47fec: ba80 cmpl %d0,%d5 47fee: 66ee bnes 47fde <_Chain_Initialize+0x2e> #include #include #include #include void _Chain_Initialize( 47ff0: 4c03 1800 mulsl %d3,%d1 47ff4: 2042 moveal %d2,%a0 47ff6: d1c1 addal %d1,%a0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 47ff8: 2084 movel %d4,%a0@ tail->previous = current; 47ffa: 2548 0008 movel %a0,%a2@(8) } 47ffe: 4cd7 043c moveml %sp@,%d2-%d5/%a2 48002: 4e5e unlk %fp 48004: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 48006: 204a moveal %a2,%a0 <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 48008: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; 4800a: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED } 4800e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 48012: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00046fa8 <_Event_Surrender>: rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 46fa8: 223c 0000 0700 movel #1792,%d1 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 46fae: 4e56 ffe4 linkw %fp,#-28 46fb2: 202e 000c movel %fp@(12),%d0 46fb6: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 46fba: 246e 0008 moveal %fp@(8),%a2 46fbe: 206e 0010 moveal %fp@(16),%a0 rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; 46fc2: 2a2a 0030 movel %a2@(48),%d5 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 46fc6: 226e 0014 moveal %fp@(20),%a1 46fca: 282e 0018 movel %fp@(24),%d4 rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 46fce: 40c3 movew %sr,%d3 46fd0: 8283 orl %d3,%d1 46fd2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; 46fd4: 8090 orl %a0@,%d0 46fd6: 2080 movel %d0,%a0@ _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; 46fd8: 242a 0024 movel %a2@(36),%d2 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 46fdc: 2200 movel %d0,%d1 46fde: c282 andl %d2,%d1 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 46fe0: 6700 0090 beqw 47072 <_Event_Surrender+0xca> /* * 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() && 46fe4: 4ab9 0005 fb78 tstl 5fb78 <_Per_CPU_Information+0x8> 46fea: 6708 beqs 46ff4 <_Event_Surrender+0x4c> 46fec: b5f9 0005 fb7e cmpal 5fb7e <_Per_CPU_Information+0xe>,%a2 46ff2: 6754 beqs 47048 <_Event_Surrender+0xa0> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 46ff4: c8aa 0010 andl %a2@(16),%d4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { 46ff8: 6778 beqs 47072 <_Event_Surrender+0xca> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46ffa: b282 cmpl %d2,%d1 46ffc: 6706 beqs 47004 <_Event_Surrender+0x5c> 46ffe: 0805 0001 btst #1,%d5 47002: 676e beqs 47072 <_Event_Surrender+0xca> <== NEVER TAKEN 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) ); 47004: 2401 movel %d1,%d2 47006: 4682 notl %d2 47008: c480 andl %d0,%d2 4700a: 2082 movel %d2,%a0@ event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4700c: 206a 0028 moveal %a2@(40),%a0 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 47010: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 47014: 2081 movel %d1,%a0@ _ISR_Flash( level ); 47016: 203c 0000 0700 movel #1792,%d0 4701c: 46c3 movew %d3,%sr 4701e: 8083 orl %d3,%d0 47020: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 47022: 7002 moveq #2,%d0 47024: b0aa 0050 cmpl %a2@(80),%d0 47028: 6754 beqs 4707e <_Event_Surrender+0xd6> _ISR_Enable( level ); 4702a: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4702c: 2d4a 0008 movel %a2,%fp@(8) 47030: 2e3c 1007 fff8 movel #268959736,%d7 47036: 2d47 000c movel %d7,%fp@(12) } return; } } _ISR_Enable( level ); } 4703a: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 47040: 4e5e unlk %fp 47042: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_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 ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 47048: 2c11 movel %a1@,%d6 /* * 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 ) && 4704a: 7e01 moveq #1,%d7 ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 4704c: 5386 subql #1,%d6 /* * 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 ) && 4704e: be86 cmpl %d6,%d7 47050: 65a2 bcss 46ff4 <_Event_Surrender+0x4c> <== NEVER TAKEN ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 47052: b282 cmpl %d2,%d1 47054: 6706 beqs 4705c <_Event_Surrender+0xb4> 47056: 0805 0001 btst #1,%d5 4705a: 6716 beqs 47072 <_Event_Surrender+0xca> <== NEVER TAKEN 4705c: 2401 movel %d1,%d2 4705e: 4682 notl %d2 47060: c480 andl %d0,%d2 pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 47062: 7003 moveq #3,%d0 47064: 2082 movel %d2,%a0@ event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 47066: 206a 0028 moveal %a2@(40),%a0 if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 4706a: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4706e: 2081 movel %d1,%a0@ *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 47070: 2280 movel %d0,%a1@ _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 47072: 46c3 movew %d3,%sr } 47074: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 4707a: 4e5e unlk %fp 4707c: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4707e: 7003 moveq #3,%d0 47080: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 47084: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47086: 486a 0048 pea %a2@(72) 4708a: 2e3c 1007 fff8 movel #268959736,%d7 47090: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 47096: 588f addql #4,%sp 47098: 2d47 000c movel %d7,%fp@(12) 4709c: 2d4a 0008 movel %a2,%fp@(8) } return; } } _ISR_Enable( level ); } 470a0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 470a6: 4e5e unlk %fp 470a8: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> ... =============================================================================== 000470b0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { 470b0: 4e56 fffc linkw %fp,#-4 470b4: 2f02 movel %d2,%sp@- ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); 470b6: 486e fffc pea %fp@(-4) 470ba: 2f2e 0008 movel %fp@(8),%sp@- 470be: 4eb9 0004 9c64 jsr 49c64 <_Thread_Get> switch ( location ) { 470c4: 508f addql #8,%sp 470c6: 4aae fffc tstl %fp@(-4) 470ca: 6642 bnes 4710e <_Event_Timeout+0x5e> <== NEVER TAKEN * * 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 ); 470cc: 223c 0000 0700 movel #1792,%d1 470d2: 40c2 movew %sr,%d2 470d4: 8282 orl %d2,%d1 470d6: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 470d8: 2040 moveal %d0,%a0 470da: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 470de: b0b9 0005 fb7e cmpl 5fb7e <_Per_CPU_Information+0xe>,%d0 470e4: 6730 beqs 47116 <_Event_Timeout+0x66> if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 470e6: 7206 moveq #6,%d1 470e8: 2040 moveal %d0,%a0 470ea: 2141 0034 movel %d1,%a0@(52) _ISR_Enable( level ); 470ee: 46c2 movew %d2,%sr 470f0: 2f3c 1007 fff8 movel #268959736,%sp@- 470f6: 2f00 movel %d0,%sp@- 470f8: 4eb9 0004 9844 jsr 49844 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 470fe: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 47100: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 --level; 47106: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 47108: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4710e: 242e fff8 movel %fp@(-8),%d2 47112: 4e5e unlk %fp 47114: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 47116: 206e 000c moveal %fp@(12),%a0 4711a: 7201 moveq #1,%d1 4711c: b290 cmpl %a0@,%d1 4711e: 66c6 bnes 470e6 <_Event_Timeout+0x36> *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 47120: 7202 moveq #2,%d1 47122: 2081 movel %d1,%a0@ } the_thread->Wait.return_code = RTEMS_TIMEOUT; 47124: 7206 moveq #6,%d1 47126: 2040 moveal %d0,%a0 47128: 2141 0034 movel %d1,%a0@(52) _ISR_Enable( level ); 4712c: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4712e: 2f3c 1007 fff8 movel #268959736,%sp@- 47134: 2f00 movel %d0,%sp@- 47136: 4eb9 0004 9844 jsr 49844 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 4713c: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4713e: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 --level; 47144: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 47146: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> 4714c: 60c0 bras 4710e <_Event_Timeout+0x5e> ... =============================================================================== 0004c6b0 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c6b0: 4e56 ffc4 linkw %fp,#-60 4c6b4: 226e 000c moveal %fp@(12),%a1 4c6b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c6bc: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4c6c0: 2c09 movel %a1,%d6 4c6c2: 5886 addql #4,%d6 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c6c4: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c6c8: 262e 0010 movel %fp@(16),%d3 4c6cc: 2a2e 0014 movel %fp@(20),%d5 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c6d0: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4c6d4: bc89 cmpl %a1,%d6 4c6d6: 6500 0164 bcsw 4c83c <_Heap_Allocate_aligned_with_boundary+0x18c> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4c6da: 4a85 tstl %d5 4c6dc: 670c beqs 4c6ea <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4c6de: ba89 cmpl %a1,%d5 4c6e0: 6500 015a bcsw 4c83c <_Heap_Allocate_aligned_with_boundary+0x18c> return NULL; } if ( alignment == 0 ) { 4c6e4: 4a83 tstl %d3 4c6e6: 6602 bnes 4c6ea <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4c6e8: 2600 movel %d0,%d3 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4c6ea: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c6ee: 4284 clrl %d4 4c6f0: b1ca cmpal %a2,%a0 4c6f2: 6732 beqs 4c726 <_Heap_Allocate_aligned_with_boundary+0x76> 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 4c6f4: 222e fffc movel %fp@(-4),%d1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c6f8: 7404 moveq #4,%d2 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 4c6fa: 5e81 addql #7,%d1 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c6fc: 9489 subl %a1,%d2 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 4c6fe: 2d41 fff8 movel %d1,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c702: 2d42 fff4 movel %d2,%fp@(-12) /* * 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 ) { 4c706: 2028 0004 movel %a0@(4),%d0 4c70a: b086 cmpl %d6,%d0 4c70c: 632e blss 4c73c <_Heap_Allocate_aligned_with_boundary+0x8c> if ( alignment == 0 ) { 4c70e: 4a83 tstl %d3 4c710: 6636 bnes 4c748 <_Heap_Allocate_aligned_with_boundary+0x98> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c712: 2408 movel %a0,%d2 4c714: 5082 addql #8,%d2 ); } } /* Statistics */ ++search_count; 4c716: 5284 addql #1,%d4 if ( alloc_begin != 0 ) { 4c718: 4a82 tstl %d2 4c71a: 6600 00f4 bnew 4c810 <_Heap_Allocate_aligned_with_boundary+0x160> break; } block = block->next; 4c71e: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c722: b1ca cmpal %a2,%a0 4c724: 66e0 bnes 4c706 <_Heap_Allocate_aligned_with_boundary+0x56> ); } } /* Statistics */ ++search_count; 4c726: 4280 clrl %d0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4c728: b8aa 0044 cmpl %a2@(68),%d4 4c72c: 6304 blss 4c732 <_Heap_Allocate_aligned_with_boundary+0x82> stats->max_search = search_count; 4c72e: 2544 0044 movel %d4,%a2@(68) } return (void *) alloc_begin; } 4c732: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4c738: 4e5e unlk %fp 4c73a: 4e75 rts if ( alloc_begin != 0 ) { break; } block = block->next; 4c73c: 2068 0008 moveal %a0@(8),%a0 ); } } /* Statistics */ ++search_count; 4c740: 5284 addql #1,%d4 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c742: b1ca cmpal %a2,%a0 4c744: 66c0 bnes 4c706 <_Heap_Allocate_aligned_with_boundary+0x56> 4c746: 60de bras 4c726 <_Heap_Allocate_aligned_with_boundary+0x76> - 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; 4c748: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c74a: 49e8 0008 lea %a0@(8),%a4 - 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; 4c74e: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c750: 266a 0014 moveal %a2@(20),%a3 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; 4c754: d088 addl %a0,%d0 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; 4c756: 222e fff8 movel %fp@(-8),%d1 4c75a: 928b subl %a3,%d1 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4c75c: 242e fff4 movel %fp@(-12),%d2 4c760: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c762: 2e02 movel %d2,%d7 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 4c764: d081 addl %d1,%d0 4c766: 4c43 7001 remul %d3,%d1,%d7 4c76a: 9481 subl %d1,%d2 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 ) { 4c76c: b480 cmpl %d0,%d2 4c76e: 630a blss 4c77a <_Heap_Allocate_aligned_with_boundary+0xca> 4c770: 2400 movel %d0,%d2 4c772: 4c43 2001 remul %d3,%d1,%d2 4c776: 2400 movel %d0,%d2 4c778: 9481 subl %d1,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4c77a: 4a85 tstl %d5 4c77c: 6766 beqs 4c7e4 <_Heap_Allocate_aligned_with_boundary+0x134> /* 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; 4c77e: 2202 movel %d2,%d1 4c780: d289 addl %a1,%d1 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4c782: 4bf4 9800 lea %a4@(00000000,%a1:l),%a5 4c786: 2001 movel %d1,%d0 4c788: 4c45 0007 remul %d5,%d7,%d0 4c78c: 2d4d ffec movel %a5,%fp@(-20) 4c790: 2a41 moveal %d1,%a5 4c792: 9bc7 subal %d7,%a5 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4c794: bbc2 cmpal %d2,%a5 4c796: 634c blss 4c7e4 <_Heap_Allocate_aligned_with_boundary+0x134> 4c798: bbc1 cmpal %d1,%a5 4c79a: 6448 bccs 4c7e4 <_Heap_Allocate_aligned_with_boundary+0x134> if ( boundary_line < boundary_floor ) { 4c79c: bbee ffec cmpal %fp@(-20),%a5 4c7a0: 6500 008e bcsw 4c830 <_Heap_Allocate_aligned_with_boundary+0x180> 4c7a4: 200d movel %a5,%d0 4c7a6: 2a44 moveal %d4,%a5 4c7a8: 2e2e ffec movel %fp@(-20),%d7 return 0; } alloc_begin = boundary_line - alloc_size; 4c7ac: 9089 subl %a1,%d0 4c7ae: 2400 movel %d0,%d2 4c7b0: 4c43 2001 remul %d3,%d1,%d2 4c7b4: 2400 movel %d0,%d2 4c7b6: 9481 subl %d1,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4c7b8: 2202 movel %d2,%d1 4c7ba: d289 addl %a1,%d1 4c7bc: 2801 movel %d1,%d4 4c7be: 4c45 4000 remul %d5,%d0,%d4 4c7c2: 2801 movel %d1,%d4 4c7c4: 9880 subl %d0,%d4 4c7c6: 2004 movel %d4,%d0 /* 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 ) { 4c7c8: b882 cmpl %d2,%d4 4c7ca: 6316 blss 4c7e2 <_Heap_Allocate_aligned_with_boundary+0x132> 4c7cc: b881 cmpl %d1,%d4 4c7ce: 6412 bccs 4c7e2 <_Heap_Allocate_aligned_with_boundary+0x132> if ( boundary_line < boundary_floor ) { 4c7d0: b087 cmpl %d7,%d0 4c7d2: 64d8 bccs 4c7ac <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN 4c7d4: 280d movel %a5,%d4 <== NOT EXECUTED return 0; 4c7d6: 4282 clrl %d2 <== NOT EXECUTED ); } } /* Statistics */ ++search_count; 4c7d8: 5284 addql #1,%d4 <== NOT EXECUTED if ( alloc_begin != 0 ) { 4c7da: 4a82 tstl %d2 <== NOT EXECUTED 4c7dc: 6700 ff40 beqw 4c71e <_Heap_Allocate_aligned_with_boundary+0x6e><== NOT EXECUTED 4c7e0: 602e bras 4c810 <_Heap_Allocate_aligned_with_boundary+0x160><== NOT EXECUTED 4c7e2: 280d movel %a5,%d4 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 ) { 4c7e4: b48c cmpl %a4,%d2 4c7e6: 6548 bcss 4c830 <_Heap_Allocate_aligned_with_boundary+0x180> 4c7e8: 70f8 moveq #-8,%d0 4c7ea: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c7ec: 2a40 moveal %d0,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c7ee: 2e02 movel %d2,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c7f0: dbc2 addal %d2,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c7f2: 202e fffc movel %fp@(-4),%d0 4c7f6: 4c40 7001 remul %d0,%d1,%d7 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; 4c7fa: 9bc1 subal %d1,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4c7fc: bbcb cmpal %a3,%a5 4c7fe: 6400 ff16 bccw 4c716 <_Heap_Allocate_aligned_with_boundary+0x66> 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 ) { if ( boundary_line < boundary_floor ) { return 0; 4c802: 4a8d tstl %a5 4c804: 57c0 seq %d0 ); } } /* Statistics */ ++search_count; 4c806: 5284 addql #1,%d4 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 ) { if ( boundary_line < boundary_floor ) { return 0; 4c808: 49c0 extbl %d0 4c80a: c480 andl %d0,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4c80c: 6700 ff10 beqw 4c71e <_Heap_Allocate_aligned_with_boundary+0x6e> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c810: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4c812: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4c816: d9aa 004c addl %d4,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c81a: 2f02 movel %d2,%sp@- 4c81c: 2f08 movel %a0,%sp@- 4c81e: 2f0a movel %a2,%sp@- 4c820: 4eb9 0004 8800 jsr 48800 <_Heap_Block_allocate> 4c826: 4fef 0010 lea %sp@(16),%sp 4c82a: 2002 movel %d2,%d0 4c82c: 6000 fefa braw 4c728 <_Heap_Allocate_aligned_with_boundary+0x78> 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 ) { if ( boundary_line < boundary_floor ) { return 0; 4c830: 4282 clrl %d2 ); } } /* Statistics */ ++search_count; 4c832: 5284 addql #1,%d4 if ( alloc_begin != 0 ) { 4c834: 4a82 tstl %d2 4c836: 6700 fee6 beqw 4c71e <_Heap_Allocate_aligned_with_boundary+0x6e> 4c83a: 60d4 bras 4c810 <_Heap_Allocate_aligned_with_boundary+0x160><== NOT EXECUTED uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { /* Integer overflow occured */ return NULL; 4c83c: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c83e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4c844: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c848 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4c848: 4e56 ffe8 linkw %fp,#-24 4c84c: 206e 0008 moveal %fp@(8),%a0 4c850: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c854: 202e 000c movel %fp@(12),%d0 /* * 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 ) { 4c858: 6700 00ba beqw 4c914 <_Heap_Free+0xcc> 4c85c: 2240 moveal %d0,%a1 4c85e: 5189 subql #8,%a1 4c860: 4c68 0001 0010 remul %a0@(16),%d1,%d0 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 4c866: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c86a: 93c1 subal %d1,%a1 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; 4c86c: b089 cmpl %a1,%d0 4c86e: 6200 009a bhiw 4c90a <_Heap_Free+0xc2> 4c872: 2228 0024 movel %a0@(36),%d1 4c876: b289 cmpl %a1,%d1 4c878: 6500 0090 bcsw 4c90a <_Heap_Free+0xc2> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c87c: 2829 0004 movel %a1@(4),%d4 - 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; 4c880: 74fe moveq #-2,%d2 4c882: c484 andl %d4,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c884: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 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; 4c888: b5c0 cmpal %d0,%a2 4c88a: 657e bcss 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN 4c88c: b5c1 cmpal %d1,%a2 4c88e: 627a bhis 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN 4c890: 262a 0004 movel %a2@(4),%d3 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4c894: 0803 0000 btst #0,%d3 4c898: 6770 beqs 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN - 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; 4c89a: 7afe moveq #-2,%d5 4c89c: c685 andl %d5,%d3 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 )); 4c89e: b5c1 cmpal %d1,%a2 4c8a0: 6700 00b2 beqw 4c954 <_Heap_Free+0x10c> 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; 4c8a4: 7a01 moveq #1,%d5 4c8a6: cab2 3804 andl %a2@(00000004,%d3:l),%d5 4c8aa: 6600 00a8 bnew 4c954 <_Heap_Free+0x10c> if ( !_Heap_Is_prev_used( block ) ) { 4c8ae: 0804 0000 btst #0,%d4 4c8b2: 666a bnes 4c91e <_Heap_Free+0xd6> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4c8b4: 7a01 moveq #1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; 4c8b6: 2811 movel %a1@,%d4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c8b8: 93c4 subal %d4,%a1 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; 4c8ba: b3c0 cmpal %d0,%a1 4c8bc: 654c bcss 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN 4c8be: b3c1 cmpal %d1,%a1 4c8c0: 6248 bhis 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN 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; 4c8c2: 7001 moveq #1,%d0 4c8c4: c0a9 0004 andl %a1@(4),%d0 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) ) { 4c8c8: 6740 beqs 4c90a <_Heap_Free+0xc2> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4c8ca: 4a05 tstb %d5 4c8cc: 6700 00de beqw 4c9ac <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c8d0: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4c8d4: d882 addl %d2,%d4 4c8d6: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c8d8: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c8da: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4c8de: 254b 0008 movel %a3,%a2@(8) 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; 4c8e2: 8083 orl %d3,%d0 next->prev = prev; 4c8e4: 274a 000c movel %a2,%a3@(12) } 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; 4c8e8: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4c8ec: 2383 3800 movel %d3,%a1@(00000000,%d3:l) 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; 4c8f0: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c8f4: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c8f8: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c8fc: d5a8 0030 addl %d2,%a0@(48) return( true ); 4c900: 7001 moveq #1,%d0 } 4c902: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4c906: 4e5e unlk %fp 4c908: 4e75 rts 4c90a: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 4c90e: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c910: 4e5e unlk %fp 4c912: 4e75 rts 4c914: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 4c918: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c91a: 4e5e unlk %fp 4c91c: 4e75 rts 4c91e: 266a 0008 moveal %a2@(8),%a3 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 */ uintptr_t const size = block_size + next_block_size; 4c922: d682 addl %d2,%d3 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c924: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c926: 246a 000c moveal %a2@(12),%a2 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; 4c92a: 8083 orl %d3,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4c92c: 234b 0008 movel %a3,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4c930: 2383 3800 movel %d3,%a1@(00000000,%d3:l) new_block->prev = prev; 4c934: 234a 000c movel %a2,%a1@(12) 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; 4c938: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c93c: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4c93e: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4c942: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c946: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c94a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c94e: d5a8 0030 addl %d2,%a0@(48) 4c952: 60ae bras 4c902 <_Heap_Free+0xba> 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 ) ) { 4c954: 0804 0000 btst #0,%d4 4c958: 6606 bnes 4c960 <_Heap_Free+0x118> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 4c95a: 4205 clrb %d5 4c95c: 6000 ff58 braw 4c8b6 <_Heap_Free+0x6e> 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; 4c960: 2028 0038 movel %a0@(56),%d0 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; 4c964: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c966: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4c968: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4c96a: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4c96e: 2348 000c movel %a0,%a1@(12) 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; 4c972: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4c974: 234b 0008 movel %a3,%a1@(8) 4c978: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c97c: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4c980: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4c984: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4c986: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4c98a: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4c98e: b0a8 003c cmpl %a0@(60),%d0 4c992: 6300 ff60 blsw 4c8f4 <_Heap_Free+0xac> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c996: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c99a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c99e: d5a8 0030 addl %d2,%a0@(48) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4c9a2: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c9a6: 7001 moveq #1,%d0 4c9a8: 6000 ff58 braw 4c902 <_Heap_Free+0xba> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4c9ac: d882 addl %d2,%d4 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c9ae: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c9b0: 7afe moveq #-2,%d5 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; 4c9b2: 8284 orl %d4,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4c9b4: 2484 movel %d4,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c9b6: 7001 moveq #1,%d0 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; 4c9b8: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c9bc: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c9c0: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c9c4: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c9c8: d5a8 0030 addl %d2,%a0@(48) 4c9cc: 6000 ff34 braw 4c902 <_Heap_Free+0xba> =============================================================================== 00051b08 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 51b08: 4e56 fff0 linkw %fp,#-16 51b0c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 51b10: 266e 0008 moveal %fp@(8),%a3 51b14: 246e 000c moveal %fp@(12),%a2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 51b18: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 51b1c: 4292 clrl %a2@ info->largest = 0; 51b1e: 42aa 0004 clrl %a2@(4) info->total = 0; 51b22: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 51b26: b1cb cmpal %a3,%a0 51b28: 6732 beqs 51b5c <_Heap_Get_free_information+0x54><== NEVER TAKEN 51b2a: 327c 0001 moveaw #1,%a1 51b2e: 4282 clrl %d2 51b30: 4281 clrl %d1 - 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; 51b32: 70fe moveq #-2,%d0 51b34: 2609 movel %a1,%d3 51b36: 5283 addql #1,%d3 51b38: c0a8 0004 andl %a0@(4),%d0 /* 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; 51b3c: d280 addl %d0,%d1 if ( info->largest < the_size ) 51b3e: b480 cmpl %d0,%d2 51b40: 6404 bccs 51b46 <_Heap_Get_free_information+0x3e> info->largest = the_size; 51b42: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 51b46: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 51b4a: b1cb cmpal %a3,%a0 51b4c: 6708 beqs 51b56 <_Heap_Get_free_information+0x4e> 51b4e: 242a 0004 movel %a2@(4),%d2 51b52: 2243 moveal %d3,%a1 51b54: 60dc bras 51b32 <_Heap_Get_free_information+0x2a> 51b56: 2489 movel %a1,%a2@ 51b58: 2541 0008 movel %d1,%a2@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 51b5c: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 51b60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aa48 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 4aa48: 4e56 ffe8 linkw %fp,#-24 4aa4c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4aa50: 246e 0008 moveal %fp@(8),%a2 4aa54: 242e 0010 movel %fp@(16),%d2 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aa58: 6700 00ca beqw 4ab24 <_Heap_Greedy_allocate+0xdc> 4aa5c: 2a6e 000c moveal %fp@(12),%a5 4aa60: 97cb subal %a3,%a3 const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; 4aa62: 99cc subal %a4,%a4 4aa64: 263c 0005 1610 movel #333328,%d3 * @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 ); 4aa6a: 42a7 clrl %sp@- 4aa6c: 2043 moveal %d3,%a0 Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aa6e: 528b addql #1,%a3 4aa70: 42a7 clrl %sp@- 4aa72: 2f1d movel %a5@+,%sp@- 4aa74: 2f0a movel %a2,%sp@- 4aa76: 4e90 jsr %a0@ void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { 4aa78: 4fef 0010 lea %sp@(16),%sp RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4aa7c: 2040 moveal %d0,%a0 4aa7e: 5188 subql #8,%a0 4aa80: 4a80 tstl %d0 4aa82: 670e beqs 4aa92 <_Heap_Greedy_allocate+0x4a> <== NEVER TAKEN 4aa84: 4c6a 0001 0010 remul %a2@(16),%d1,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4aa8a: 91c1 subal %d1,%a0 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; 4aa8c: 214c 0008 movel %a4,%a0@(8) 4aa90: 2848 moveal %a0,%a4 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 4aa92: b48b cmpl %a3,%d2 4aa94: 66d4 bnes 4aa6a <_Heap_Greedy_allocate+0x22> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4aa96: 266a 0008 moveal %a2@(8),%a3 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aa9a: b7ca cmpal %a2,%a3 4aa9c: 6700 008c beqw 4ab2a <_Heap_Greedy_allocate+0xe2> - 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; 4aaa0: 70fe moveq #-2,%d0 4aaa2: 4bf9 0004 ae20 lea 4ae20 <_Heap_Block_allocate>,%a5 4aaa8: 4282 clrl %d2 4aaaa: c0ab 0004 andl %a3@(4),%d0 _Heap_Block_allocate( 4aaae: 2040 moveal %d0,%a0 4aab0: 4868 fff8 pea %a0@(-8) 4aab4: 486b 0008 pea %a3@(8) 4aab8: 2f0b movel %a3,%sp@- 4aaba: 2f0a movel %a2,%sp@- 4aabc: 4e95 jsr %a5@ next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aabe: 4fef 0010 lea %sp@(16),%sp current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 4aac2: 2742 0008 movel %d2,%a3@(8) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4aac6: 202a 0008 movel %a2@(8),%d0 4aaca: 240b movel %a3,%d2 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aacc: b08a cmpl %a2,%d0 4aace: 672a beqs 4aafa <_Heap_Greedy_allocate+0xb2> 4aad0: 2640 moveal %d0,%a3 - 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; 4aad2: 70fe moveq #-2,%d0 4aad4: c0ab 0004 andl %a3@(4),%d0 _Heap_Block_allocate( 4aad8: 2040 moveal %d0,%a0 4aada: 4868 fff8 pea %a0@(-8) 4aade: 486b 0008 pea %a3@(8) 4aae2: 2f0b movel %a3,%sp@- 4aae4: 2f0a movel %a2,%sp@- 4aae6: 4e95 jsr %a5@ next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aae8: 4fef 0010 lea %sp@(16),%sp current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 4aaec: 2742 0008 movel %d2,%a3@(8) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4aaf0: 202a 0008 movel %a2@(8),%d0 4aaf4: 240b movel %a3,%d2 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4aaf6: b08a cmpl %a2,%d0 4aaf8: 66d6 bnes 4aad0 <_Heap_Greedy_allocate+0x88> 4aafa: 4bf9 0005 17a8 lea 517a8 <_Heap_Free>,%a5 current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab00: 4a8c tstl %a4 4ab02: 6714 beqs 4ab18 <_Heap_Greedy_allocate+0xd0> current = allocated_blocks; allocated_blocks = allocated_blocks->next; 4ab04: 222c 0008 movel %a4@(8),%d1 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4ab08: 486c 0008 pea %a4@(8) blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 4ab0c: 2841 moveal %d1,%a4 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4ab0e: 2f0a movel %a2,%sp@- 4ab10: 4e95 jsr %a5@ current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab12: 508f addql #8,%sp 4ab14: 4a8c tstl %a4 4ab16: 66ec bnes 4ab04 <_Heap_Greedy_allocate+0xbc> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } 4ab18: 200b movel %a3,%d0 4ab1a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ab20: 4e5e unlk %fp 4ab22: 4e75 rts const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; 4ab24: 99cc subal %a4,%a4 4ab26: 6000 ff6e braw 4aa96 <_Heap_Greedy_allocate+0x4e> next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 4ab2a: 97cb subal %a3,%a3 <== NOT EXECUTED 4ab2c: 4bf9 0005 17a8 lea 517a8 <_Heap_Free>,%a5 <== NOT EXECUTED current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 4ab32: 4a8c tstl %a4 <== NOT EXECUTED 4ab34: 66ce bnes 4ab04 <_Heap_Greedy_allocate+0xbc> <== NOT EXECUTED 4ab36: 60e0 bras 4ab18 <_Heap_Greedy_allocate+0xd0> <== NOT EXECUTED =============================================================================== 0004ab38 <_Heap_Greedy_free>: void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { 4ab38: 4e56 fff4 linkw %fp,#-12 4ab3c: 206e 000c moveal %fp@(12),%a0 4ab40: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ab44: 262e 0008 movel %fp@(8),%d3 4ab48: 45f9 0005 17a8 lea 517a8 <_Heap_Free>,%a2 while ( blocks != NULL ) { 4ab4e: 4a88 tstl %a0 4ab50: 6714 beqs 4ab66 <_Heap_Greedy_free+0x2e> <== NEVER TAKEN Heap_Block *current = blocks; blocks = blocks->next; 4ab52: 2428 0008 movel %a0@(8),%d2 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 4ab56: 4868 0008 pea %a0@(8) 4ab5a: 2f03 movel %d3,%sp@- 4ab5c: 4e92 jsr %a2@ void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 4ab5e: 508f addql #8,%sp Heap_Block *current = blocks; blocks = blocks->next; 4ab60: 2042 moveal %d2,%a0 void _Heap_Greedy_free( Heap_Control *heap, Heap_Block *blocks ) { while ( blocks != NULL ) { 4ab62: 4a82 tstl %d2 4ab64: 66ec bnes 4ab52 <_Heap_Greedy_free+0x1a> Heap_Block *current = blocks; blocks = blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } } 4ab66: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4ab6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051bc0 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 51bc0: 4e56 fff0 linkw %fp,#-16 51bc4: 226e 0008 moveal %fp@(8),%a1 51bc8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 51bcc: 266e 000c moveal %fp@(12),%a3 51bd0: 262e 0010 movel %fp@(16),%d3 Heap_Block *current = heap->first_block; 51bd4: 2069 0020 moveal %a1@(32),%a0 Heap_Block *end = heap->last_block; 51bd8: 2429 0024 movel %a1@(36),%d2 bool stop = false; while ( !stop && current != end ) { 51bdc: b488 cmpl %a0,%d2 51bde: 6728 beqs 51c08 <_Heap_Iterate+0x48> <== NEVER TAKEN 51be0: 70fe moveq #-2,%d0 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 ); 51be2: 7201 moveq #1,%d1 51be4: c0a8 0004 andl %a0@(4),%d0 51be8: 2f03 movel %d3,%sp@- RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 51bea: 45f0 0800 lea %a0@(00000000,%d0:l),%a2 51bee: c2aa 0004 andl %a2@(4),%d1 51bf2: 2f01 movel %d1,%sp@- 51bf4: 2f00 movel %d0,%sp@- 51bf6: 2f08 movel %a0,%sp@- 51bf8: 4e93 jsr %a3@ { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 51bfa: 4fef 0010 lea %sp@(16),%sp 51bfe: 204a moveal %a2,%a0 51c00: 4a00 tstb %d0 51c02: 6604 bnes 51c08 <_Heap_Iterate+0x48> <== NEVER TAKEN 51c04: b5c2 cmpal %d2,%a2 51c06: 66d8 bnes 51be0 <_Heap_Iterate+0x20> stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } 51c08: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 51c0e: 4e5e unlk %fp ... =============================================================================== 0005c2b0 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5c2b0: 4e56 0000 linkw %fp,#0 5c2b4: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5c2b8: 2040 moveal %d0,%a0 5c2ba: 5188 subql #8,%a0 5c2bc: 226e 0008 moveal %fp@(8),%a1 5c2c0: 2f02 movel %d2,%sp@- 5c2c2: 2400 movel %d0,%d2 5c2c4: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5c2ca: 91c1 subal %d1,%a0 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 5c2cc: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c2d0: b288 cmpl %a0,%d1 5c2d2: 6238 bhis 5c30c <_Heap_Size_of_alloc_area+0x5c> 5c2d4: 2269 0024 moveal %a1@(36),%a1 5c2d8: b3c8 cmpal %a0,%a1 5c2da: 6530 bcss 5c30c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN - 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; 5c2dc: 74fe moveq #-2,%d2 5c2de: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5c2e2: 41f0 2800 lea %a0@(00000000,%d2:l),%a0 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; 5c2e6: b1c1 cmpal %d1,%a0 5c2e8: 6522 bcss 5c30c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5c2ea: b1c9 cmpal %a1,%a0 5c2ec: 621e bhis 5c30c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 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; 5c2ee: 7201 moveq #1,%d1 5c2f0: c2a8 0004 andl %a0@(4),%d1 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 ) 5c2f4: 6716 beqs 5c30c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c2f6: 7204 moveq #4,%d1 5c2f8: 9280 subl %d0,%d1 5c2fa: 2001 movel %d1,%d0 5c2fc: d088 addl %a0,%d0 5c2fe: 226e 0010 moveal %fp@(16),%a1 return true; } 5c302: 241f movel %sp@+,%d2 5c304: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c306: 2280 movel %d0,%a1@ return true; 5c308: 7001 moveq #1,%d0 } 5c30a: 4e75 rts 5c30c: 241f movel %sp@+,%d2 5c30e: 4e5e unlk %fp Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; 5c310: 4200 clrb %d0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } =============================================================================== 000490ce <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 490ce: 4e56 ffc8 linkw %fp,#-56 490d2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 490d6: 246e 0008 moveal %fp@(8),%a2 uintptr_t const page_size = heap->page_size; 490da: 242a 0010 movel %a2@(16),%d2 uintptr_t const min_block_size = heap->min_block_size; 490de: 262a 0014 movel %a2@(20),%d3 Heap_Block *const first_block = heap->first_block; 490e2: 266a 0020 moveal %a2@(32),%a3 Heap_Block *const last_block = heap->last_block; 490e6: 2a6a 0024 moveal %a2@(36),%a5 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 490ea: 4a2e 0013 tstb %fp@(19) 490ee: 671a beqs 4910a <_Heap_Walk+0x3c> 490f0: 49fa ff86 lea %pc@(49078 <_Heap_Walk_print>),%a4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 490f4: 7003 moveq #3,%d0 490f6: b0b9 0006 1d44 cmpl 61d44 <_System_state_Current>,%d0 490fc: 671a beqs 49118 <_Heap_Walk+0x4a> <== ALWAYS TAKEN block = next_block; } while ( block != first_block ); return true; } 490fe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 49104: 7001 moveq #1,%d0 } 49106: 4e5e unlk %fp 49108: 4e75 rts 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; 4910a: 49fa ff64 lea %pc@(49070 <_Heap_Walk_print_nothing>),%a4 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4910e: 7003 moveq #3,%d0 49110: b0b9 0006 1d44 cmpl 61d44 <_System_state_Current>,%d0 49116: 66e6 bnes 490fe <_Heap_Walk+0x30> 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)( 49118: 2f2a 000c movel %a2@(12),%sp@- 4911c: 2f2a 0008 movel %a2@(8),%sp@- 49120: 2f0d movel %a5,%sp@- 49122: 2f0b movel %a3,%sp@- 49124: 2f2a 001c movel %a2@(28),%sp@- 49128: 2f2a 0018 movel %a2@(24),%sp@- 4912c: 2f03 movel %d3,%sp@- 4912e: 2f02 movel %d2,%sp@- 49130: 4879 0005 e292 pea 5e292 <_Copyright_Notice+0x94> 49136: 42a7 clrl %sp@- 49138: 2f2e 000c movel %fp@(12),%sp@- 4913c: 4e94 jsr %a4@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4913e: 4fef 002c lea %sp@(44),%sp 49142: 4a82 tstl %d2 49144: 677e beqs 491c4 <_Heap_Walk+0xf6> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 49146: 7003 moveq #3,%d0 49148: c082 andl %d2,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 4914a: 6600 0090 bnew 491dc <_Heap_Walk+0x10e> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4914e: 2203 movel %d3,%d1 49150: 4c42 1000 remul %d2,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 49154: 4a80 tstl %d0 49156: 6600 009e bnew 491f6 <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4915a: 200b movel %a3,%d0 4915c: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4915e: 4c42 0001 remul %d2,%d1,%d0 ); return false; } if ( 49162: 4a81 tstl %d1 49164: 6600 00aa bnew 49210 <_Heap_Walk+0x142> block = next_block; } while ( block != first_block ); return true; } 49168: 202b 0004 movel %a3@(4),%d0 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; 4916c: 7801 moveq #1,%d4 4916e: c880 andl %d0,%d4 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 49170: 6700 00ba beqw 4922c <_Heap_Walk+0x15e> - 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; 49174: 72fe moveq #-2,%d1 49176: c2ad 0004 andl %a5@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4917a: 41f5 1800 lea %a5@(00000000,%d1:l),%a0 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; 4917e: 7201 moveq #1,%d1 49180: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 49184: 6726 beqs 491ac <_Heap_Walk+0xde> ); return false; } if ( 49186: b1cb cmpal %a3,%a0 49188: 6700 00bc beqw 49246 <_Heap_Walk+0x178> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 4918c: 4879 0005 e3ec pea 5e3ec <_Copyright_Notice+0x1ee> 49192: 4878 0001 pea 1 49196: 2f2e 000c movel %fp@(12),%sp@- 4919a: 4e94 jsr %a4@ 4919c: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 491a0: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 491a2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 491a8: 4e5e unlk %fp 491aa: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 491ac: 4879 0005 e3d7 pea 5e3d7 <_Copyright_Notice+0x1d9> 491b2: 4878 0001 pea 1 491b6: 2f2e 000c movel %fp@(12),%sp@- 491ba: 4e94 jsr %a4@ 491bc: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 491c0: 4200 clrb %d0 491c2: 60de bras 491a2 <_Heap_Walk+0xd4> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 491c4: 4879 0005 e323 pea 5e323 <_Copyright_Notice+0x125> 491ca: 4878 0001 pea 1 491ce: 2f2e 000c movel %fp@(12),%sp@- 491d2: 4e94 jsr %a4@ 491d4: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 491d8: 4200 clrb %d0 491da: 60c6 bras 491a2 <_Heap_Walk+0xd4> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 491dc: 2f02 movel %d2,%sp@- 491de: 4879 0005 e336 pea 5e336 <_Copyright_Notice+0x138> 491e4: 4878 0001 pea 1 491e8: 2f2e 000c movel %fp@(12),%sp@- 491ec: 4e94 jsr %a4@ 491ee: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 491f2: 4200 clrb %d0 491f4: 60ac bras 491a2 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 491f6: 2f03 movel %d3,%sp@- 491f8: 4879 0005 e354 pea 5e354 <_Copyright_Notice+0x156> 491fe: 4878 0001 pea 1 49202: 2f2e 000c movel %fp@(12),%sp@- 49206: 4e94 jsr %a4@ 49208: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4920c: 4200 clrb %d0 4920e: 6092 bras 491a2 <_Heap_Walk+0xd4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 49210: 2f0b movel %a3,%sp@- 49212: 4879 0005 e378 pea 5e378 <_Copyright_Notice+0x17a> 49218: 4878 0001 pea 1 4921c: 2f2e 000c movel %fp@(12),%sp@- 49220: 4e94 jsr %a4@ 49222: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49226: 4200 clrb %d0 49228: 6000 ff78 braw 491a2 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4922c: 4879 0005 e3a9 pea 5e3a9 <_Copyright_Notice+0x1ab> 49232: 4878 0001 pea 1 49236: 2f2e 000c movel %fp@(12),%sp@- 4923a: 4e94 jsr %a4@ 4923c: 4fef 000c lea %sp@(12),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49240: 4200 clrb %d0 49242: 6000 ff5e braw 491a2 <_Heap_Walk+0xd4> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 49246: 222a 0010 movel %a2@(16),%d1 4924a: 2d41 fffc movel %d1,%fp@(-4) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4924e: 206a 0008 moveal %a2@(8),%a0 block = next_block; } while ( block != first_block ); return true; } 49252: 222a 0020 movel %a2@(32),%d1 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 ) { 49256: b1ca cmpal %a2,%a0 49258: 6700 00c6 beqw 49320 <_Heap_Walk+0x252> 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; 4925c: b1c1 cmpal %d1,%a0 4925e: 6500 009c bcsw 492fc <_Heap_Walk+0x22e> 49262: 2a2a 0024 movel %a2@(36),%d5 49266: 2d45 fff0 movel %d5,%fp@(-16) 4926a: b1c5 cmpal %d5,%a0 4926c: 6200 008e bhiw 492fc <_Heap_Walk+0x22e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 49270: 43e8 0008 lea %a0@(8),%a1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 49274: 2c09 movel %a1,%d6 49276: 2e2e fffc movel %fp@(-4),%d7 4927a: 4c47 6005 remul %d7,%d5,%d6 ); return false; } if ( 4927e: 4a85 tstl %d5 49280: 6600 02b8 bnew 4953a <_Heap_Walk+0x46c> - 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; 49284: 7afe moveq #-2,%d5 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; 49286: 7c01 moveq #1,%d6 - 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; 49288: caa8 0004 andl %a0@(4),%d5 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; 4928c: ccb0 5804 andl %a0@(00000004,%d5:l),%d6 ); return false; } if ( _Heap_Is_used( free_block ) ) { 49290: 664e bnes 492e0 <_Heap_Walk+0x212> <== NEVER TAKEN 49292: 2e2e fff0 movel %fp@(-16),%d7 49296: 224a moveal %a2,%a1 49298: 2c08 movel %a0,%d6 4929a: 2d42 fff8 movel %d2,%fp@(-8) 4929e: 2d40 fff4 movel %d0,%fp@(-12) ); return false; } if ( free_block->prev != prev_block ) { 492a2: 2a28 000c movel %a0@(12),%d5 492a6: b3c5 cmpal %d5,%a1 492a8: 6600 02ac bnew 49556 <_Heap_Walk+0x488> return false; } prev_block = free_block; free_block = free_block->next; 492ac: 2068 0008 moveal %a0@(8),%a0 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 ) { 492b0: b1ca cmpal %a2,%a0 492b2: 6764 beqs 49318 <_Heap_Walk+0x24a> 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; 492b4: b288 cmpl %a0,%d1 492b6: 6244 bhis 492fc <_Heap_Walk+0x22e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 492b8: 2408 movel %a0,%d2 492ba: 5082 addql #8,%d2 492bc: 2246 moveal %d6,%a1 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; 492be: be88 cmpl %a0,%d7 492c0: 653a bcss 492fc <_Heap_Walk+0x22e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 492c2: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 492c6: 2c08 movel %a0,%d6 492c8: 4c40 2005 remul %d0,%d5,%d2 ); return false; } if ( 492cc: 4a85 tstl %d5 492ce: 6600 026a bnew 4953a <_Heap_Walk+0x46c> - 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; 492d2: 74fe moveq #-2,%d2 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; 492d4: 7001 moveq #1,%d0 - 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; 492d6: c4a8 0004 andl %a0@(4),%d2 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; 492da: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 492de: 67c2 beqs 492a2 <_Heap_Walk+0x1d4> (*printer)( 492e0: 2f08 movel %a0,%sp@- 492e2: 4879 0005 e46b pea 5e46b <_Copyright_Notice+0x26d> 492e8: 4878 0001 pea 1 492ec: 2f2e 000c movel %fp@(12),%sp@- 492f0: 4e94 jsr %a4@ 492f2: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 492f6: 4200 clrb %d0 492f8: 6000 fea8 braw 491a2 <_Heap_Walk+0xd4> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 492fc: 2f08 movel %a0,%sp@- 492fe: 4879 0005 e41b pea 5e41b <_Copyright_Notice+0x21d> 49304: 4878 0001 pea 1 49308: 2f2e 000c movel %fp@(12),%sp@- 4930c: 4e94 jsr %a4@ 4930e: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49312: 4200 clrb %d0 49314: 6000 fe8c braw 491a2 <_Heap_Walk+0xd4> 49318: 242e fff8 movel %fp@(-8),%d2 4931c: 202e fff4 movel %fp@(-12),%d0 49320: 2d42 fffc movel %d2,%fp@(-4) 49324: 2e00 movel %d0,%d7 - 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; 49326: 74fe moveq #-2,%d2 49328: 204d moveal %a5,%a0 4932a: 2a4b moveal %a3,%a5 4932c: 2a0b movel %a3,%d5 4932e: 264a moveal %a2,%a3 49330: ce82 andl %d2,%d7 49332: 2d48 fff8 movel %a0,%fp@(-8) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 49336: 45f5 7800 lea %a5@(00000000,%d7:l),%a2 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; 4933a: b5c1 cmpal %d1,%a2 4933c: 6568 bcss 493a6 <_Heap_Walk+0x2d8> <== NEVER TAKEN 4933e: b5eb 0024 cmpal %a3@(36),%a2 49342: 6262 bhis 493a6 <_Heap_Walk+0x2d8> 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; 49344: bbee fff8 cmpal %fp@(-8),%a5 49348: 56c0 sne %d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4934a: 2c2e fffc movel %fp@(-4),%d6 4934e: 2407 movel %d7,%d2 49350: 4480 negl %d0 49352: 4c46 2001 remul %d6,%d1,%d2 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 49356: 4a81 tstl %d1 49358: 6700 0084 beqw 493de <_Heap_Walk+0x310> 4935c: 4a00 tstb %d0 4935e: 6664 bnes 493c4 <_Heap_Walk+0x2f6> 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; 49360: 7001 moveq #1,%d0 49362: c0aa 0004 andl %a2@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 49366: 6700 00e8 beqw 49450 <_Heap_Walk+0x382> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 4936a: 4a84 tstl %d4 4936c: 6700 00c6 beqw 49434 <_Heap_Walk+0x366> (*printer)( 49370: 2f07 movel %d7,%sp@- 49372: 2f0d movel %a5,%sp@- 49374: 4879 0005 e610 pea 5e610 <_Copyright_Notice+0x412> 4937a: 42a7 clrl %sp@- 4937c: 2f2e 000c movel %fp@(12),%sp@- 49380: 4e94 jsr %a4@ 49382: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 49386: b5c5 cmpal %d5,%a2 49388: 6700 fd74 beqw 490fe <_Heap_Walk+0x30> 4938c: 2e2a 0004 movel %a2@(4),%d7 49390: 7801 moveq #1,%d4 - 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; 49392: 74fe moveq #-2,%d2 49394: 2a4a moveal %a2,%a5 49396: c887 andl %d7,%d4 49398: ce82 andl %d2,%d7 4939a: 222b 0020 movel %a3@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4939e: 45f5 7800 lea %a5@(00000000,%d7:l),%a2 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; 493a2: b5c1 cmpal %d1,%a2 493a4: 6498 bccs 4933e <_Heap_Walk+0x270> <== ALWAYS TAKEN 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)( 493a6: 2f0a movel %a2,%sp@- 493a8: 2f0d movel %a5,%sp@- 493aa: 4879 0005 e4b9 pea 5e4b9 <_Copyright_Notice+0x2bb> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 493b0: 4878 0001 pea 1 493b4: 2f2e 000c movel %fp@(12),%sp@- 493b8: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 493ba: 4fef 0014 lea %sp@(20),%sp 493be: 4200 clrb %d0 493c0: 6000 fde0 braw 491a2 <_Heap_Walk+0xd4> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 493c4: 2f07 movel %d7,%sp@- 493c6: 2f0d movel %a5,%sp@- 493c8: 4879 0005 e4e6 pea 5e4e6 <_Copyright_Notice+0x2e8> 493ce: 4878 0001 pea 1 493d2: 2f2e 000c movel %fp@(12),%sp@- 493d6: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 493d8: 4fef 0014 lea %sp@(20),%sp 493dc: 60e0 bras 493be <_Heap_Walk+0x2f0> } if ( block_size < min_block_size && is_not_last_block ) { 493de: be83 cmpl %d3,%d7 493e0: 642c bccs 4940e <_Heap_Walk+0x340> 493e2: 4a00 tstb %d0 493e4: 6700 ff7a beqw 49360 <_Heap_Walk+0x292> (*printer)( 493e8: 2f03 movel %d3,%sp@- 493ea: 2f07 movel %d7,%sp@- 493ec: 2f0d movel %a5,%sp@- 493ee: 4879 0005 e514 pea 5e514 <_Copyright_Notice+0x316> 493f4: 4878 0001 pea 1 493f8: 2f2e 000c movel %fp@(12),%sp@- 493fc: 4e94 jsr %a4@ block, block_size, min_block_size ); return false; 493fe: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 49402: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 49408: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 4940a: 4e5e unlk %fp 4940c: 4e75 rts ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 4940e: b5cd cmpal %a5,%a2 49410: 6200 ff4e bhiw 49360 <_Heap_Walk+0x292> 49414: 4a00 tstb %d0 49416: 6700 ff48 beqw 49360 <_Heap_Walk+0x292> (*printer)( 4941a: 2f0a movel %a2,%sp@- 4941c: 2f0d movel %a5,%sp@- 4941e: 4879 0005 e53f pea 5e53f <_Copyright_Notice+0x341> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 49424: 4878 0001 pea 1 49428: 2f2e 000c movel %fp@(12),%sp@- 4942c: 4e94 jsr %a4@ "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4942e: 4fef 0014 lea %sp@(20),%sp 49432: 608a bras 493be <_Heap_Walk+0x2f0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 49434: 2f15 movel %a5@,%sp@- 49436: 2f07 movel %d7,%sp@- 49438: 2f0d movel %a5,%sp@- 4943a: 4879 0005 e627 pea 5e627 <_Copyright_Notice+0x429> 49440: 42a7 clrl %sp@- 49442: 2f2e 000c movel %fp@(12),%sp@- 49446: 4e94 jsr %a4@ 49448: 4fef 0018 lea %sp@(24),%sp 4944c: 6000 ff38 braw 49386 <_Heap_Walk+0x2b8> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 49450: 206b 0008 moveal %a3@(8),%a0 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 49454: 222d 0008 movel %a5@(8),%d1 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)( 49458: b2ab 000c cmpl %a3@(12),%d1 4945c: 6700 00b6 beqw 49514 <_Heap_Walk+0x446> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 49460: 43f9 0005 e13e lea 5e13e ,%a1 49466: b28b cmpl %a3,%d1 49468: 676e beqs 494d8 <_Heap_Walk+0x40a> 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 ? 4946a: 202d 000c movel %a5@(12),%d0 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)( 4946e: b088 cmpl %a0,%d0 49470: 6700 0098 beqw 4950a <_Heap_Walk+0x43c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 49474: 41f9 0005 e13e lea 5e13e ,%a0 4947a: b08b cmpl %a3,%d0 4947c: 6762 beqs 494e0 <_Heap_Walk+0x412> 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)( 4947e: 2f09 movel %a1,%sp@- 49480: 2f01 movel %d1,%sp@- 49482: 2f08 movel %a0,%sp@- 49484: 2f00 movel %d0,%sp@- 49486: 2f07 movel %d7,%sp@- 49488: 2f0d movel %a5,%sp@- 4948a: 4879 0005 e573 pea 5e573 <_Copyright_Notice+0x375> 49490: 42a7 clrl %sp@- 49492: 2f2e 000c movel %fp@(12),%sp@- 49496: 4e94 jsr %a4@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 49498: 2012 movel %a2@,%d0 4949a: 4fef 0024 lea %sp@(36),%sp 4949e: b087 cmpl %d7,%d0 494a0: 6646 bnes 494e8 <_Heap_Walk+0x41a> ); return false; } if ( !prev_used ) { 494a2: 4a84 tstl %d4 494a4: 6778 beqs 4951e <_Heap_Walk+0x450> 494a6: 206b 0008 moveal %a3@(8),%a0 ) { 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 ) { 494aa: b1cb cmpal %a3,%a0 494ac: 670e beqs 494bc <_Heap_Walk+0x3ee> <== NEVER TAKEN if ( free_block == block ) { 494ae: b1cd cmpal %a5,%a0 494b0: 6700 fed4 beqw 49386 <_Heap_Walk+0x2b8> return true; } free_block = free_block->next; 494b4: 2068 0008 moveal %a0@(8),%a0 ) { 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 ) { 494b8: b1cb cmpal %a3,%a0 494ba: 66f2 bnes 494ae <_Heap_Walk+0x3e0> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 494bc: 2f0d movel %a5,%sp@- 494be: 4879 0005 e64c pea 5e64c <_Copyright_Notice+0x44e> 494c4: 4878 0001 pea 1 494c8: 2f2e 000c movel %fp@(12),%sp@- 494cc: 4e94 jsr %a4@ 494ce: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 494d2: 4200 clrb %d0 494d4: 6000 fccc braw 491a2 <_Heap_Walk+0xd4> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 494d8: 43f9 0005 e26e lea 5e26e <_Copyright_Notice+0x70>,%a1 494de: 608a bras 4946a <_Heap_Walk+0x39c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 494e0: 41f9 0005 e288 lea 5e288 <_Copyright_Notice+0x8a>,%a0 494e6: 6096 bras 4947e <_Heap_Walk+0x3b0> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 494e8: 2f0a movel %a2,%sp@- 494ea: 2f00 movel %d0,%sp@- 494ec: 2f07 movel %d7,%sp@- 494ee: 2f0d movel %a5,%sp@- 494f0: 4879 0005 e5a8 pea 5e5a8 <_Copyright_Notice+0x3aa> 494f6: 4878 0001 pea 1 494fa: 2f2e 000c movel %fp@(12),%sp@- 494fe: 4e94 jsr %a4@ 49500: 4fef 001c lea %sp@(28),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49504: 4200 clrb %d0 49506: 6000 fc9a braw 491a2 <_Heap_Walk+0xd4> 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)( 4950a: 41f9 0005 e278 lea 5e278 <_Copyright_Notice+0x7a>,%a0 49510: 6000 ff6c braw 4947e <_Heap_Walk+0x3b0> 49514: 43f9 0005 e25f lea 5e25f <_Copyright_Notice+0x61>,%a1 4951a: 6000 ff4e braw 4946a <_Heap_Walk+0x39c> return false; } if ( !prev_used ) { (*printer)( 4951e: 2f0d movel %a5,%sp@- 49520: 4879 0005 e5e1 pea 5e5e1 <_Copyright_Notice+0x3e3> 49526: 4878 0001 pea 1 4952a: 2f2e 000c movel %fp@(12),%sp@- 4952e: 4e94 jsr %a4@ 49530: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49534: 4200 clrb %d0 49536: 6000 fc6a braw 491a2 <_Heap_Walk+0xd4> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 4953a: 2f08 movel %a0,%sp@- 4953c: 4879 0005 e43b pea 5e43b <_Copyright_Notice+0x23d> 49542: 4878 0001 pea 1 49546: 2f2e 000c movel %fp@(12),%sp@- 4954a: 4e94 jsr %a4@ 4954c: 4fef 0010 lea %sp@(16),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 49550: 4200 clrb %d0 49552: 6000 fc4e braw 491a2 <_Heap_Walk+0xd4> return false; } if ( free_block->prev != prev_block ) { (*printer)( 49556: 2f05 movel %d5,%sp@- 49558: 2f08 movel %a0,%sp@- 4955a: 4879 0005 e487 pea 5e487 <_Copyright_Notice+0x289> 49560: 4878 0001 pea 1 49564: 2f2e 000c movel %fp@(12),%sp@- 49568: 4e94 jsr %a4@ 4956a: 4fef 0014 lea %sp@(20),%sp "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; 4956e: 4200 clrb %d0 49570: 6000 fc30 braw 491a2 <_Heap_Walk+0xd4> =============================================================================== 00047d00 <_IO_Initialize_all_drivers>: void _IO_Initialize_all_drivers( void ) { 47d00: 4e56 0000 linkw %fp,#0 47d04: 2f0a movel %a2,%sp@- 47d06: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d08: 4ab9 0005 fbf8 tstl 5fbf8 <_IO_Number_of_drivers> 47d0e: 671e beqs 47d2e <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 47d10: 4282 clrl %d2 47d12: 45f9 0004 c53c lea 4c53c ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 47d18: 42a7 clrl %sp@- 47d1a: 42a7 clrl %sp@- 47d1c: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d1e: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 47d20: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47d22: 4fef 000c lea %sp@(12),%sp 47d26: b4b9 0005 fbf8 cmpl 5fbf8 <_IO_Number_of_drivers>,%d2 47d2c: 65ea bcss 47d18 <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 47d2e: 242e fff8 movel %fp@(-8),%d2 47d32: 246e fffc moveal %fp@(-4),%a2 47d36: 4e5e unlk %fp ... =============================================================================== 00047c60 <_IO_Manager_initialization>: #include #include void _IO_Manager_initialization(void) { 47c60: 4e56 fff0 linkw %fp,#-16 47c64: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = rtems_configuration_get_device_driver_table(); 47c68: 2439 0005 c610 movel 5c610 ,%d2 drivers_in_table = rtems_configuration_get_number_of_device_drivers(); 47c6e: 2839 0005 c60c movel 5c60c ,%d4 number_of_drivers = rtems_configuration_get_maximum_drivers(); 47c74: 2639 0005 c608 movel 5c608 ,%d3 /* * 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 ) 47c7a: b684 cmpl %d4,%d3 47c7c: 636c blss 47cea <_IO_Manager_initialization+0x8a> * 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( 47c7e: 2003 movel %d3,%d0 47c80: 2a03 movel %d3,%d5 47c82: e788 lsll #3,%d0 47c84: eb8d lsll #5,%d5 47c86: 9a80 subl %d0,%d5 47c88: 2f05 movel %d5,%sp@- 47c8a: 4eb9 0004 ac2a jsr 4ac2a <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47c90: 2f05 movel %d5,%sp@- 47c92: 42a7 clrl %sp@- /* * 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 *) 47c94: 23c0 0005 fbfc movel %d0,5fbfc <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47c9a: 2f00 movel %d0,%sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 47c9c: 23c3 0005 fbf8 movel %d3,5fbf8 <_IO_Number_of_drivers> memset( 47ca2: 4eb9 0004 e9d4 jsr 4e9d4 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 47ca8: 4fef 0010 lea %sp@(16),%sp 47cac: 4a84 tstl %d4 47cae: 6730 beqs 47ce0 <_IO_Manager_initialization+0x80><== NEVER TAKEN #include #include #include void _IO_Manager_initialization(void) 47cb0: 2a04 movel %d4,%d5 47cb2: 2204 movel %d4,%d1 47cb4: 4280 clrl %d0 47cb6: e78d lsll #3,%d5 47cb8: eb89 lsll #5,%d1 47cba: 2639 0005 fbfc movel 5fbfc <_IO_Driver_address_table>,%d3 47cc0: 9285 subl %d5,%d1 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; 47cc2: 2242 moveal %d2,%a1 47cc4: 2043 moveal %d3,%a0 47cc6: d3c0 addal %d0,%a1 47cc8: d1c0 addal %d0,%a0 47cca: 0680 0000 0018 addil #24,%d0 47cd0: 20d9 movel %a1@+,%a0@+ 47cd2: 20d9 movel %a1@+,%a0@+ 47cd4: 20d9 movel %a1@+,%a0@+ 47cd6: 20d9 movel %a1@+,%a0@+ 47cd8: 20d9 movel %a1@+,%a0@+ 47cda: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 47cdc: b280 cmpl %d0,%d1 47cde: 66e2 bnes 47cc2 <_IO_Manager_initialization+0x62> _IO_Driver_address_table[index] = driver_table[index]; } 47ce0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 47ce6: 4e5e unlk %fp 47ce8: 4e75 rts * 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; 47cea: 23c2 0005 fbfc movel %d2,5fbfc <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 47cf0: 23c4 0005 fbf8 movel %d4,5fbf8 <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 47cf6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 47cfc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004891c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 4891c: 4e56 ffe8 linkw %fp,#-24 48920: 48d7 001c moveml %d2-%d4,%sp@ Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 48924: 4879 0004 a788 pea 4a788 <_User_extensions_Fatal_visitor> 4892a: 262e 0010 movel %fp@(16),%d3 4892e: 486e fff6 pea %fp@(-10) 48932: 282e 0008 movel %fp@(8),%d4 48936: 242e 000c movel %fp@(12),%d2 Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; 4893a: 2d44 fff6 movel %d4,%fp@(-10) 4893e: 1d42 fffa moveb %d2,%fp@(-6) 48942: 2d43 fffc movel %d3,%fp@(-4) _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 48946: 4eb9 0004 a7b8 jsr 4a7b8 <_User_extensions_Iterate> _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 4894c: 13c2 0005 fb66 moveb %d2,5fb66 <_Internal_errors_What_happened+0x4><== NOT EXECUTED _Internal_errors_What_happened.the_error = the_error; _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 48952: 2043 moveal %d3,%a0 <== NOT EXECUTED 48954: 243c 0000 0700 movel #1792,%d2 <== NOT EXECUTED Internal_errors_t the_error ) { _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; 4895a: 23c4 0005 fb62 movel %d4,5fb62 <_Internal_errors_What_happened><== NOT EXECUTED _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 48960: 23c3 0005 fb68 movel %d3,5fb68 <_Internal_errors_What_happened+0x6><== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 48966: 40c0 movew %sr,%d0 <== NOT EXECUTED 48968: 8082 orl %d2,%d0 <== NOT EXECUTED 4896a: 46c0 movew %d0,%sr <== NOT EXECUTED 4896c: 2008 movel %a0,%d0 <== NOT EXECUTED 4896e: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 48974: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 48976: 7005 moveq #5,%d0 <== NOT EXECUTED 48978: 508f addql #8,%sp <== NOT EXECUTED 4897a: 23c0 0005 fb6c movel %d0,5fb6c <_System_state_Current> <== NOT EXECUTED 48980: 60fe bras 48980 <_Internal_error_Occurred+0x64> <== NOT EXECUTED ... =============================================================================== 000489e4 <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { 489e4: 4e56 fff0 linkw %fp,#-16 489e8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 489ec: 246e 0008 moveal %fp@(8),%a2 * 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 ) 489f0: 4aaa 0014 tstl %a2@(20) 489f4: 6770 beqs 48a66 <_Objects_Allocate+0x82> <== NEVER TAKEN /* * 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 ); 489f6: 240a movel %a2,%d2 489f8: 0682 0000 001c addil #28,%d2 489fe: 47f9 0004 7f74 lea 47f74 <_Chain_Get>,%a3 48a04: 2f02 movel %d2,%sp@- 48a06: 4e93 jsr %a3@ if ( information->auto_extend ) { 48a08: 588f addql #4,%sp 48a0a: 4a2a 0010 tstb %a2@(16) 48a0e: 673a beqs 48a4a <_Objects_Allocate+0x66> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 48a10: 4a80 tstl %d0 48a12: 6740 beqs 48a54 <_Objects_Allocate+0x70> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a14: 2040 moveal %d0,%a0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a16: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a18: 2228 0008 movel %a0@(8),%d1 48a1c: 262a 0006 movel %a2@(6),%d3 48a20: 0281 0000 ffff andil #65535,%d1 48a26: 0283 0000 ffff andil #65535,%d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a2c: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 48a30: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 48a34: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 48a36: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 48a3a: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 48a3e: e589 lsll #2,%d1 information->inactive--; 48a40: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 48a42: d1c1 addal %d1,%a0 48a44: 5390 subql #1,%a0@ information->inactive--; 48a46: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 48a4a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48a50: 4e5e unlk %fp 48a52: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 48a54: 2f0a movel %a2,%sp@- 48a56: 4eb9 0004 8aa0 jsr 48aa0 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 48a5c: 2f02 movel %d2,%sp@- 48a5e: 4e93 jsr %a3@ } if ( the_object ) { 48a60: 508f addql #8,%sp 48a62: 4a80 tstl %d0 48a64: 66ae bnes 48a14 <_Objects_Allocate+0x30> * 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 ) return NULL; 48a66: 4280 clrl %d0 ); } #endif return the_object; } 48a68: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 48a6e: 4e5e unlk %fp ... =============================================================================== 00048a74 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 48a74: 4e56 0000 linkw %fp,#0 48a78: 226e 000c moveal %fp@(12),%a1 48a7c: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48a80: 2029 0008 movel %a1@(8),%d0 48a84: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a86: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48a8a: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a90: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 48a94: 245f moveal %sp@+,%a2 48a96: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 48a98: 4ef9 0004 9024 jmp 49024 <_Objects_Namespace_remove> ... =============================================================================== 00048aa0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 48aa0: 4e56 ffc8 linkw %fp,#-56 48aa4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48aa8: 246e 0008 moveal %fp@(8),%a2 /* * 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 ); 48aac: 2a2a 0006 movel %a2@(6),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48ab0: 206a 002e moveal %a2@(46),%a0 /* * 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 ); 48ab4: 0285 0000 ffff andil #65535,%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48aba: 4a88 tstl %a0 48abc: 6700 020c beqw 48cca <_Objects_Extend_information+0x22a> block_count = 0; else { block_count = information->maximum / information->allocation_size; 48ac0: 3e2a 000e movew %a2@(14),%d7 48ac4: 302a 0012 movew %a2@(18),%d0 48ac8: 3807 movew %d7,%d4 48aca: 0284 0000 ffff andil #65535,%d4 48ad0: 88c0 divuw %d0,%d4 48ad2: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 48ad8: 6700 0260 beqw 48d3a <_Objects_Extend_information+0x29a> if ( information->object_blocks[ block ] == NULL ) { 48adc: 4a90 tstl %a0@ 48ade: 6700 026c beqw 48d4c <_Objects_Extend_information+0x2ac> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48ae2: 5888 addql #4,%a0 /* * 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 ); 48ae4: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48ae6: 4282 clrl %d2 48ae8: 0280 0000 ffff andil #65535,%d0 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; 48aee: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48af0: 5282 addql #1,%d2 48af2: b484 cmpl %d4,%d2 48af4: 6400 01ac bccw 48ca2 <_Objects_Extend_information+0x202> if ( information->object_blocks[ block ] == NULL ) { 48af8: 4a98 tstl %a0@+ 48afa: 66f2 bnes 48aee <_Objects_Extend_information+0x4e> do_extend = false; 48afc: 97cb subal %a3,%a3 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 48afe: 0287 0000 ffff andil #65535,%d7 48b04: de80 addl %d0,%d7 /* * 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 ) { 48b06: 0c87 0000 ffff cmpil #65535,%d7 48b0c: 6200 018a bhiw 48c98 <_Objects_Extend_information+0x1f8> /* * 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; 48b10: 41ea 0014 lea %a2@(20),%a0 48b14: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 48b18: 4a2a 0010 tstb %a2@(16) 48b1c: 6700 018c beqw 48caa <_Objects_Extend_information+0x20a> new_object_block = _Workspace_Allocate( block_size ); 48b20: 2f00 movel %d0,%sp@- 48b22: 4eb9 0004 abf4 jsr 4abf4 <_Workspace_Allocate> if ( !new_object_block ) 48b28: 588f addql #4,%sp * 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; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 48b2a: 2c00 movel %d0,%d6 if ( !new_object_block ) 48b2c: 6700 016a beqw 48c98 <_Objects_Extend_information+0x1f8> } /* * Do we need to grow the tables? */ if ( do_extend ) { 48b30: 300b movew %a3,%d0 48b32: 4a00 tstb %d0 48b34: 6700 00c4 beqw 48bfa <_Objects_Extend_information+0x15a> */ /* * Up the block count and maximum */ block_count++; 48b38: 2844 moveal %d4,%a4 48b3a: 528c addql #1,%a4 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); 48b3c: 2007 movel %d7,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48b3e: 41f4 ca00 lea %a4@(00000000,%a4:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 48b42: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48b44: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 48b46: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { 48b48: 4a2a 0010 tstb %a2@(16) 48b4c: 6700 016c beqw 48cba <_Objects_Extend_information+0x21a> object_blocks = _Workspace_Allocate( block_size ); 48b50: 2f00 movel %d0,%sp@- 48b52: 4eb9 0004 abf4 jsr 4abf4 <_Workspace_Allocate> if ( !object_blocks ) { 48b58: 588f addql #4,%sp */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); 48b5a: 2640 moveal %d0,%a3 if ( !object_blocks ) { 48b5c: 4a80 tstl %d0 48b5e: 6700 01c6 beqw 48d26 <_Objects_Extend_information+0x286> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 48b62: 220c movel %a4,%d1 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 48b64: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 48b66: e589 lsll #2,%d1 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 48b68: 302a 000e movew %a2@(14),%d0 48b6c: 43f3 1800 lea %a3@(00000000,%d1:l),%a1 48b70: 49f1 1800 lea %a1@(00000000,%d1:l),%a4 48b74: b085 cmpl %d5,%d0 48b76: 6200 016a bhiw 48ce2 <_Objects_Extend_information+0x242> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 48b7a: 4a85 tstl %d5 48b7c: 670c beqs 48b8a <_Objects_Extend_information+0xea><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48b7e: 204c moveal %a4,%a0 48b80: 4bf4 5c00 lea %a4@(00000000,%d5:l:4),%a5 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 48b84: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 48b86: bbc8 cmpal %a0,%a5 48b88: 66fa bnes 48b84 <_Objects_Extend_information+0xe4><== NEVER TAKEN 48b8a: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48b8c: 4280 clrl %d0 48b8e: 2203 movel %d3,%d1 48b90: 302a 0012 movew %a2@(18),%d0 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 48b94: 42b3 4800 clrl %a3@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 48b98: d280 addl %d0,%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 48b9a: 42b1 4800 clrl %a1@(00000000,%d4:l) for ( index=index_base ; 48b9e: b283 cmpl %d3,%d1 48ba0: 630e blss 48bb0 <_Objects_Extend_information+0x110><== NEVER TAKEN * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 48ba2: 4281 clrl %d1 48ba4: 41f4 3c00 lea %a4@(00000000,%d3:l:4),%a0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 48ba8: 4298 clrl %a0@+ 48baa: 5281 addql #1,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 48bac: b081 cmpl %d1,%d0 48bae: 66f8 bnes 48ba8 <_Objects_Extend_information+0x108> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 48bb0: 203c 0000 0700 movel #1792,%d0 48bb6: 40c4 movew %sr,%d4 48bb8: 8084 orl %d4,%d0 48bba: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48bbc: 2012 movel %a2@,%d0 48bbe: 7a18 moveq #24,%d5 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( 48bc0: 4281 clrl %d1 48bc2: eba8 lsll %d5,%d0 48bc4: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48bc8: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48bcc: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48bd0: eba9 lsll %d5,%d1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 48bd2: 206a 002e moveal %a2@(46),%a0 48bd6: 8081 orl %d1,%d0 information->object_blocks = object_blocks; 48bd8: 254b 002e movel %a3,%a2@(46) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48bdc: 8087 orl %d7,%d0 information->inactive_per_block = inactive_per_block; 48bde: 2549 002a movel %a1,%a2@(42) information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 48be2: 3547 000e movew %d7,%a2@(14) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 48be6: 254c 0018 movel %a4,%a2@(24) 48bea: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 48bee: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 48bf0: 2f08 movel %a0,%sp@- 48bf2: 4eb9 0004 ac10 jsr 4ac10 <_Workspace_Free> 48bf8: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48bfa: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48bfe: 4280 clrl %d0 48c00: 280e movel %fp,%d4 48c02: 0684 ffff fff4 addil #-12,%d4 48c08: 47f9 0004 7f74 lea 47f74 <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48c0e: 2a0a movel %a2,%d5 48c10: 0685 0000 001c addil #28,%d5 48c16: 49f9 0004 7f3c lea 47f3c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48c1c: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48c1e: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48c22: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48c26: 2f2a 0014 movel %a2@(20),%sp@- 48c2a: 206a 002e moveal %a2@(46),%a0 48c2e: 2f00 movel %d0,%sp@- 48c30: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48c34: 2f04 movel %d4,%sp@- 48c36: 4eb9 0004 7fb0 jsr 47fb0 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 48c3c: 4fef 0010 lea %sp@(16),%sp 48c40: 2f04 movel %d4,%sp@- 48c42: 4e93 jsr %a3@ 48c44: 588f addql #4,%sp 48c46: 4a80 tstl %d0 48c48: 6734 beqs 48c7e <_Objects_Extend_information+0x1de><== NEVER TAKEN 48c4a: 2212 movel %a2@,%d1 48c4c: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 48c4e: 4286 clrl %d6 48c50: 2040 moveal %d0,%a0 48c52: 3c2a 0004 movew %a2@(4),%d6 48c56: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48c58: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48c5c: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48c60: efae lsll %d7,%d6 48c62: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48c64: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 48c66: 5283 addql #1,%d3 48c68: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48c6c: 2f00 movel %d0,%sp@- 48c6e: 2f05 movel %d5,%sp@- 48c70: 4e94 jsr %a4@ index++; 48c72: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 48c74: 2f04 movel %d4,%sp@- 48c76: 4e93 jsr %a3@ 48c78: 588f addql #4,%sp 48c7a: 4a80 tstl %d0 48c7c: 66cc bnes 48c4a <_Objects_Extend_information+0x1aa> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48c7e: 4281 clrl %d1 48c80: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 48c84: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48c88: 206a 002a moveal %a2@(42),%a0 48c8c: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 48c8e: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 48c90: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 48c94: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 48c98: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 48c9e: 4e5e unlk %fp 48ca0: 4e75 rts /* * 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; 48ca2: 367c 0001 moveaw #1,%a3 48ca6: 6000 fe56 braw 48afe <_Objects_Extend_information+0x5e> 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 ); 48caa: 2f00 movel %d0,%sp@- 48cac: 4eb9 0004 ac2a jsr 4ac2a <_Workspace_Allocate_or_fatal_error> 48cb2: 588f addql #4,%sp 48cb4: 2c00 movel %d0,%d6 48cb6: 6000 fe78 braw 48b30 <_Objects_Extend_information+0x90> if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); 48cba: 2f00 movel %d0,%sp@- 48cbc: 4eb9 0004 ac2a jsr 4ac2a <_Workspace_Allocate_or_fatal_error> 48cc2: 588f addql #4,%sp 48cc4: 2640 moveal %d0,%a3 48cc6: 6000 fe9a braw 48b62 <_Objects_Extend_information+0xc2> 48cca: 4280 clrl %d0 /* * 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 ); 48ccc: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 48cce: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 48cd0: 4284 clrl %d4 48cd2: 3e2a 000e movew %a2@(14),%d7 48cd6: 302a 0012 movew %a2@(18),%d0 /* * 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; 48cda: 367c 0001 moveaw #1,%a3 48cde: 6000 fe1e braw 48afe <_Objects_Extend_information+0x5e> /* * 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, 48ce2: 4bf9 0004 e964 lea 4e964 ,%a5 48ce8: e58c lsll #2,%d4 48cea: 2f04 movel %d4,%sp@- 48cec: 2f2a 002e movel %a2@(46),%sp@- 48cf0: 2d49 fff0 movel %a1,%fp@(-16) 48cf4: 2f0b movel %a3,%sp@- 48cf6: 4e95 jsr %a5@ information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 48cf8: 226e fff0 moveal %fp@(-16),%a1 48cfc: 2f04 movel %d4,%sp@- 48cfe: 2f2a 002a movel %a2@(42),%sp@- 48d02: 2f09 movel %a1,%sp@- 48d04: 4e95 jsr %a5@ information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 48d06: 4280 clrl %d0 48d08: 302a 000e movew %a2@(14),%d0 48d0c: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 48d0e: e58d lsll #2,%d5 48d10: 2f05 movel %d5,%sp@- 48d12: 2f2a 0018 movel %a2@(24),%sp@- 48d16: 2f0c movel %a4,%sp@- 48d18: 4e95 jsr %a5@ 48d1a: 226e fff0 moveal %fp@(-16),%a1 48d1e: 4fef 0024 lea %sp@(36),%sp 48d22: 6000 fe68 braw 48b8c <_Objects_Extend_information+0xec> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 48d26: 2f06 movel %d6,%sp@- 48d28: 4eb9 0004 ac10 jsr 4ac10 <_Workspace_Free> 48d2e: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 48d30: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 48d36: 4e5e unlk %fp 48d38: 4e75 rts /* * 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 ); 48d3a: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48d3c: 4282 clrl %d2 <== NOT EXECUTED 48d3e: 0280 0000 ffff andil #65535,%d0 <== 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; 48d44: 367c 0001 moveaw #1,%a3 <== NOT EXECUTED 48d48: 6000 fdb4 braw 48afe <_Objects_Extend_information+0x5e><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 48d4c: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48d4e: 4282 clrl %d2 <== NOT EXECUTED 48d50: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; 48d56: 97cb subal %a3,%a3 <== NOT EXECUTED 48d58: 6000 fda4 braw 48afe <_Objects_Extend_information+0x5e><== NOT EXECUTED =============================================================================== 00048e14 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 48e14: 4e56 0000 linkw %fp,#0 48e18: 2f03 movel %d3,%sp@- 48e1a: 262e 0008 movel %fp@(8),%d3 48e1e: 2f02 movel %d2,%sp@- 48e20: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 48e24: 6740 beqs 48e66 <_Objects_Get_information+0x52> /* * 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 ); 48e26: 2f03 movel %d3,%sp@- 48e28: 4eb9 0004 c9d0 jsr 4c9d0 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 48e2e: 588f addql #4,%sp 48e30: 4a80 tstl %d0 48e32: 6732 beqs 48e66 <_Objects_Get_information+0x52> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 48e34: 0282 0000 ffff andil #65535,%d2 48e3a: b480 cmpl %d0,%d2 48e3c: 6228 bhis 48e66 <_Objects_Get_information+0x52> return NULL; if ( !_Objects_Information_table[ the_api ] ) 48e3e: 41f9 0005 f9c2 lea 5f9c2 <_Objects_Information_table>,%a0 48e44: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 48e48: 4a88 tstl %a0 48e4a: 671a beqs 48e66 <_Objects_Get_information+0x52> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 48e4c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 48e50: 6714 beqs 48e66 <_Objects_Get_information+0x52> <== NEVER TAKEN * 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 ) 48e52: 2040 moveal %d0,%a0 48e54: 4a68 000e tstw %a0@(14) 48e58: 670c beqs 48e66 <_Objects_Get_information+0x52> return NULL; #endif return info; } 48e5a: 242e fff8 movel %fp@(-8),%d2 48e5e: 262e fffc movel %fp@(-4),%d3 48e62: 4e5e unlk %fp 48e64: 4e75 rts 48e66: 242e fff8 movel %fp@(-8),%d2 { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; 48e6a: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 48e6c: 262e fffc movel %fp@(-4),%d3 48e70: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005598c <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 5598c: 4e56 ffdc linkw %fp,#-36 55990: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 55994: 242e 000c movel %fp@(12),%d2 55998: 262e 0010 movel %fp@(16),%d3 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 5599c: 4a82 tstl %d2 5599e: 6700 00c6 beqw 55a66 <_Objects_Get_name_as_string+0xda> return NULL; if ( name == NULL ) 559a2: 4a83 tstl %d3 559a4: 6700 00c0 beqw 55a66 <_Objects_Get_name_as_string+0xda> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 559a8: 4aae 0008 tstl %fp@(8) 559ac: 6600 00b0 bnew 55a5e <_Objects_Get_name_as_string+0xd2> 559b0: 2079 0006 df62 moveal 6df62 <_Per_CPU_Information+0xe>,%a0 559b6: 2468 0008 moveal %a0@(8),%a2 information = _Objects_Get_information_id( tmpId ); 559ba: 2f0a movel %a2,%sp@- 559bc: 4eb9 0004 eac4 jsr 4eac4 <_Objects_Get_information_id> if ( !information ) 559c2: 588f addql #4,%sp 559c4: 4a80 tstl %d0 559c6: 6700 009e beqw 55a66 <_Objects_Get_name_as_string+0xda> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 559ca: 486e fff6 pea %fp@(-10) 559ce: 2f0a movel %a2,%sp@- 559d0: 2f00 movel %d0,%sp@- 559d2: 4eb9 0004 ebb8 jsr 4ebb8 <_Objects_Get> switch ( location ) { 559d8: 4fef 000c lea %sp@(12),%sp 559dc: 4aae fff6 tstl %fp@(-10) 559e0: 6600 0084 bnew 55a66 <_Objects_Get_name_as_string+0xda> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 559e4: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 559e6: 7818 moveq #24,%d4 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 559e8: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 559ec: 2200 movel %d0,%d1 559ee: e8a9 lsrl %d4,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 559f0: 2800 movel %d0,%d4 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 559f2: 2a00 movel %d0,%d5 lname[ 2 ] = (u32_name >> 8) & 0xff; 559f4: e08c lsrl #8,%d4 lname[ 3 ] = (u32_name >> 0) & 0xff; 559f6: 1d40 fffe moveb %d0,%fp@(-2) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 559fa: 4245 clrw %d5 559fc: 4845 swap %d5 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 559fe: 4200 clrb %d0 { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 55a00: 1d44 fffd moveb %d4,%fp@(-3) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 55a04: 7801 moveq #1,%d4 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 55a06: 1d41 fffb moveb %d1,%fp@(-5) lname[ 1 ] = (u32_name >> 16) & 0xff; 55a0a: 1d45 fffc moveb %d5,%fp@(-4) lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 55a0e: 1d40 ffff moveb %d0,%fp@(-1) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 55a12: b882 cmpl %d2,%d4 55a14: 675e beqs 55a74 <_Objects_Get_name_as_string+0xe8><== NEVER TAKEN 55a16: 4a01 tstb %d1 55a18: 675a beqs 55a74 <_Objects_Get_name_as_string+0xe8> * 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( 55a1a: 43ee fffc lea %fp@(-4),%a1 55a1e: 2043 moveal %d3,%a0 55a20: 47f6 28fa lea %fp@(fffffffa,%d2:l),%a3 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 55a24: 4282 clrl %d2 55a26: 1401 moveb %d1,%d2 55a28: 2479 0006 c074 moveal 6c074 <__ctype_ptr__>,%a2 55a2e: 1432 2801 moveb %a2@(00000001,%d2:l),%d2 55a32: 49c2 extbl %d2 55a34: 0282 0000 0097 andil #151,%d2 55a3a: 6602 bnes 55a3e <_Objects_Get_name_as_string+0xb2> 55a3c: 722a moveq #42,%d1 55a3e: 10c1 moveb %d1,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 55a40: 2448 moveal %a0,%a2 55a42: b7c9 cmpal %a1,%a3 55a44: 6704 beqs 55a4a <_Objects_Get_name_as_string+0xbe> 55a46: 1219 moveb %a1@+,%d1 55a48: 66da bnes 55a24 <_Objects_Get_name_as_string+0x98> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 55a4a: 4212 clrb %a2@ _Thread_Enable_dispatch(); 55a4c: 4eb9 0004 f9a8 jsr 4f9a8 <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 55a52: 2003 movel %d3,%d0 55a54: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 55a5a: 4e5e unlk %fp 55a5c: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 55a5e: 246e 0008 moveal %fp@(8),%a2 55a62: 6000 ff56 braw 559ba <_Objects_Get_name_as_string+0x2e> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 55a66: 4283 clrl %d3 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 55a68: 2003 movel %d3,%d0 55a6a: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 55a70: 4e5e unlk %fp 55a72: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 55a74: 2443 moveal %d3,%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 55a76: 4212 clrb %a2@ _Thread_Enable_dispatch(); 55a78: 4eb9 0004 f9a8 jsr 4f9a8 <_Thread_Enable_dispatch> 55a7e: 60d2 bras 55a52 <_Objects_Get_name_as_string+0xc6> =============================================================================== 0005a440 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5a440: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5a442: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5a444: 4e56 0000 linkw %fp,#0 5a448: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5a44c: 90a8 0006 subl %a0@(6),%d0 5a450: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5a454: 3228 000e movew %a0@(14),%d1 5a458: b280 cmpl %d0,%d1 5a45a: 6514 bcss 5a470 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5a45c: 2068 0018 moveal %a0@(24),%a0 5a460: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5a464: 670a beqs 5a470 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5a466: 206e 0010 moveal %fp@(16),%a0 * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5a46a: 4e5e unlk %fp */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; 5a46c: 4290 clrl %a0@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5a46e: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5a470: 226e 0010 moveal %fp@(16),%a1 5a474: 7001 moveq #1,%d0 return NULL; } 5a476: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5a478: 2280 movel %d0,%a1@ return NULL; 5a47a: 4280 clrl %d0 } ... =============================================================================== 0004ec20 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4ec20: 4e56 fffc linkw %fp,#-4 4ec24: 202e 0008 movel %fp@(8),%d0 4ec28: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4ec2a: 4a80 tstl %d0 4ec2c: 6676 bnes 4eca4 <_Objects_Id_to_name+0x84> 4ec2e: 2079 0006 df62 moveal 6df62 <_Per_CPU_Information+0xe>,%a0 4ec34: 2228 0008 movel %a0@(8),%d1 4ec38: 7418 moveq #24,%d2 4ec3a: 2001 movel %d1,%d0 4ec3c: e4a8 lsrl %d2,%d0 4ec3e: 143c 0007 moveb #7,%d2 4ec42: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4ec44: 143c 0002 moveb #2,%d2 4ec48: 2040 moveal %d0,%a0 4ec4a: 5388 subql #1,%a0 4ec4c: b488 cmpl %a0,%d2 4ec4e: 654a bcss 4ec9a <_Objects_Id_to_name+0x7a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 4ec50: 41f9 0006 dd6e lea 6dd6e <_Objects_Information_table>,%a0 4ec56: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4ec5a: 4a88 tstl %a0 4ec5c: 673c beqs 4ec9a <_Objects_Id_to_name+0x7a> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 4ec5e: 2001 movel %d1,%d0 4ec60: 741b moveq #27,%d2 4ec62: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 4ec64: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 4ec68: 6730 beqs 4ec9a <_Objects_Id_to_name+0x7a> <== NEVER TAKEN #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 ); 4ec6a: 486e fffc pea %fp@(-4) 4ec6e: 2f01 movel %d1,%sp@- 4ec70: 2f00 movel %d0,%sp@- 4ec72: 4eb9 0004 ebb8 jsr 4ebb8 <_Objects_Get> if ( !the_object ) 4ec78: 4fef 000c lea %sp@(12),%sp 4ec7c: 4a80 tstl %d0 4ec7e: 671a beqs 4ec9a <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 4ec80: 206e 000c moveal %fp@(12),%a0 4ec84: 2240 moveal %d0,%a1 4ec86: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4ec8a: 4eb9 0004 f9a8 jsr 4f9a8 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4ec90: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 4ec94: 4280 clrl %d0 } 4ec96: 4e5e unlk %fp 4ec98: 4e75 rts 4ec9a: 242e fff8 movel %fp@(-8),%d2 tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 4ec9e: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4eca0: 4e5e unlk %fp 4eca2: 4e75 rts /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4eca4: 2200 movel %d0,%d1 4eca6: 6090 bras 4ec38 <_Objects_Id_to_name+0x18> =============================================================================== 00048f44 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48f44: 4e56 ffec linkw %fp,#-20 48f48: 202e 000c movel %fp@(12),%d0 48f4c: 48d7 043c moveml %d2-%d5/%a2,%sp@ information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 48f50: 45f9 0005 f9c2 lea 5f9c2 <_Objects_Information_table>,%a2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48f56: 4282 clrl %d2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 48f58: 4283 clrl %d3 48f5a: 2472 0c00 moveal %a2@(00000000,%d0:l:4),%a2 , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48f5e: 206e 0008 moveal %fp@(8),%a0 48f62: 342e 001a movew %fp@(26),%d2 48f66: 226e 0010 moveal %fp@(16),%a1 uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size; 48f6a: 2142 0014 movel %d2,%a0@(20) , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48f6e: 222e 0014 movel %fp@(20),%d1 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 48f72: 4242 clrw %d2 information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 48f74: 3609 movew %a1,%d3 Objects_Maximum maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 48f76: 2080 movel %d0,%a0@ , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 48f78: 282e 0020 movel %fp@(32),%d4 information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0; 48f7c: 3142 0028 movew %d2,%a0@(40) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 48f80: 3142 000e movew %d2,%a0@(14) * @retval true Unlimited objects are available. * @retval false The object count is fixed. */ RTEMS_INLINE_ROUTINE bool _Objects_Is_unlimited( uint32_t maximum ) { return (maximum & OBJECTS_UNLIMITED_OBJECTS) != 0; 48f84: 2401 movel %d1,%d2 #endif information->the_api = the_api; information->the_class = the_class; information->size = size; information->local_table = 0; 48f86: 42a8 0018 clrl %a0@(24) #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; 48f8a: 3149 0004 movew %a1,%a0@(4) information->size = size; information->local_table = 0; information->inactive_per_block = 0; 48f8e: 42a8 002a clrl %a0@(42) 48f92: d482 addl %d2,%d2 48f94: 9582 subxl %d2,%d2 48f96: 4482 negl %d2 information->object_blocks = 0; 48f98: 42a8 002e clrl %a0@(46) information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 48f9c: 2588 3c00 movel %a0,%a2@(00000000,%d3:l:4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = _Objects_Is_unlimited( maximum ); 48fa0: 1142 0010 moveb %d2,%a0@(16) maximum_per_allocation = _Objects_Maximum_per_allocation( maximum ); /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 48fa4: 4a82 tstl %d2 48fa6: 6704 beqs 48fac <_Objects_Initialize_information+0x68> 48fa8: 4a41 tstw %d1 48faa: 6766 beqs 49012 <_Objects_Initialize_information+0xce> uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48fac: 7a18 moveq #24,%d5 information->local_table = &null_local_table; /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 48fae: 4a41 tstw %d1 48fb0: 56c2 sne %d2 48fb2: eba8 lsll %d5,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48fb4: 1a3c 001b moveb #27,%d5 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 48fb8: 43f9 0005 f200 lea 5f200 ,%a1 /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 48fbe: 4482 negl %d2 48fc0: ebab lsll %d5,%d3 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48fc2: 08c0 0010 bset #16,%d0 information->allocation_size = maximum_per_allocation; /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 48fc6: 2149 0018 movel %a1,%a0@(24) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; 48fca: 4285 clrl %d5 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 ); 48fcc: 43e8 0020 lea %a0@(32),%a1 48fd0: 1a02 moveb %d2,%d5 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48fd2: 8083 orl %d3,%d0 48fd4: 2149 001c movel %a1,%a0@(28) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48fd8: 43e8 001c lea %a0@(28),%a1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 48fdc: 8085 orl %d5,%d0 } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 48fde: 3141 0012 movew %d1,%a0@(18) * NOTE: Either 4 bytes for Classic API names or an arbitrary * number for POSIX names which are strings that may be * an odd number of bytes. */ information->name_length = maximum_name_length; 48fe2: 3144 0032 movew %d4,%a0@(50) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48fe6: 42a8 0020 clrl %a0@(32) 48fea: 2140 0006 movel %d0,%a0@(6) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48fee: 2149 0024 movel %a1,%a0@(36) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 48ff2: 4a02 tstb %d2 48ff4: 660a bnes 49000 <_Objects_Initialize_information+0xbc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 48ff6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 48ffc: 4e5e unlk %fp 48ffe: 4e75 rts /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 49000: 2d48 0008 movel %a0,%fp@(8) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 49004: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4900a: 4e5e unlk %fp /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 4900c: 4ef9 0004 8aa0 jmp 48aa0 <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 49012: 4878 0013 pea 13 49016: 4878 0001 pea 1 4901a: 42a7 clrl %sp@- 4901c: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> ... =============================================================================== 000490b4 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 490b4: 4281 clrl %d1 #include void _Objects_Shrink_information( Objects_Information *information ) { 490b6: 4e56 ffec linkw %fp,#-20 490ba: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 490be: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 490c2: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 490c4: 242a 0006 movel %a2@(6),%d2 block_count = (information->maximum - index_base) / 490c8: 362a 000e movew %a2@(14),%d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 490cc: 0282 0000 ffff andil #65535,%d2 block_count = (information->maximum - index_base) / 490d2: 322a 0012 movew %a2@(18),%d1 490d6: 9682 subl %d2,%d3 490d8: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 490dc: 6778 beqs 49156 <_Objects_Shrink_information+0xa2><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 490de: 206a 002a moveal %a2@(42),%a0 490e2: b290 cmpl %a0@,%d1 490e4: 6700 0088 beqw 4916e <_Objects_Shrink_information+0xba> #include #include #include #include void _Objects_Shrink_information( 490e8: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 490ea: 4280 clrl %d0 490ec: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 490ee: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 490f0: b680 cmpl %d0,%d3 490f2: 6762 beqs 49156 <_Objects_Shrink_information+0xa2> #include #include #include #include void _Objects_Shrink_information( 490f4: 2800 movel %d0,%d4 490f6: e58c lsll #2,%d4 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 ] == 490f8: b298 cmpl %a0@+,%d1 490fa: 66f0 bnes 490ec <_Objects_Shrink_information+0x38> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 490fc: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 49100: 47f9 0004 c584 lea 4c584 <_Chain_Extract>,%a3 * 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 ); 49106: 2028 0008 movel %a0@(8),%d0 4910a: 0280 0000 ffff andil #65535,%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 49110: 2610 movel %a0@,%d3 if ((index >= index_base) && 49112: b480 cmpl %d0,%d2 49114: 620c bhis 49122 <_Objects_Shrink_information+0x6e> (index < (index_base + information->allocation_size))) { 49116: 4281 clrl %d1 49118: 322a 0012 movew %a2@(18),%d1 4911c: d282 addl %d2,%d1 /* * 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) && 4911e: b280 cmpl %d0,%d1 49120: 623e bhis 49160 <_Objects_Shrink_information+0xac> 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; 49122: 2043 moveal %d3,%a0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 49124: 4a83 tstl %d3 49126: 66de bnes 49106 <_Objects_Shrink_information+0x52> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 49128: 206a 002e moveal %a2@(46),%a0 4912c: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 49130: 4eb9 0004 ac10 jsr 4ac10 <_Workspace_Free> information->object_blocks[ block ] = NULL; 49136: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4913a: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4913c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 49140: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 49144: 302a 0028 movew %a2@(40),%d0 49148: 322a 0012 movew %a2@(18),%d1 * 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; 4914c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 49150: 9081 subl %d1,%d0 49152: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 49156: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4915c: 4e5e unlk %fp 4915e: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 49160: 2f08 movel %a0,%sp@- 49162: 4e93 jsr %a3@ 49164: 588f addql #4,%sp 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; 49166: 2043 moveal %d3,%a0 if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 49168: 4a83 tstl %d3 4916a: 669a bnes 49106 <_Objects_Shrink_information+0x52> 4916c: 60ba bras 49128 <_Objects_Shrink_information+0x74> 4916e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 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 ] == 49172: 4284 clrl %d4 <== NOT EXECUTED */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 49174: 47f9 0004 c584 lea 4c584 <_Chain_Extract>,%a3 <== NOT EXECUTED 4917a: 608a bras 49106 <_Objects_Shrink_information+0x52><== NOT EXECUTED =============================================================================== 0004e298 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4e298: 4e56 fff0 linkw %fp,#-16 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 4e29c: 2039 0006 5fd2 movel 65fd2 <_Thread_Dispatch_disable_level>,%d0 4e2a2: 48d7 001c moveml %d2-%d4,%sp@ 4e2a6: 262e 0008 movel %fp@(8),%d3 4e2aa: 282e 000c movel %fp@(12),%d4 4e2ae: 142e 0013 moveb %fp@(19),%d2 4e2b2: 4a80 tstl %d0 4e2b4: 6640 bnes 4e2f6 <_Protected_heap_Walk+0x5e> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4e2b6: 2f39 0006 6056 movel 66056 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4e2bc: 0282 0000 00ff andil #255,%d2 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4e2c2: 4eb9 0004 c2a8 jsr 4c2a8 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4e2c8: 2f02 movel %d2,%sp@- 4e2ca: 2f04 movel %d4,%sp@- 4e2cc: 2f03 movel %d3,%sp@- 4e2ce: 4eb9 0004 d3b2 jsr 4d3b2 <_Heap_Walk> _RTEMS_Unlock_allocator(); 4e2d4: 2f39 0006 6056 movel 66056 <_RTEMS_Allocator_Mutex>,%sp@- 4e2da: 2d40 fffc movel %d0,%fp@(-4) 4e2de: 4eb9 0004 c308 jsr 4c308 <_API_Mutex_Unlock> 4e2e4: 202e fffc movel %fp@(-4),%d0 4e2e8: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4e2ec: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e2f2: 4e5e unlk %fp 4e2f4: 4e75 rts if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4e2f6: 2d44 000c movel %d4,%fp@(12) 4e2fa: 0282 0000 00ff andil #255,%d2 4e300: 2d43 0008 movel %d3,%fp@(8) 4e304: 2d42 0010 movel %d2,%fp@(16) } return status; } 4e308: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4e30e: 4e5e unlk %fp if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4e310: 4ef9 0004 d3b2 jmp 4d3b2 <_Heap_Walk> ... =============================================================================== 00049f3a <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 49f3a: 4e56 ffec linkw %fp,#-20 49f3e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 49f42: 2a6e 0008 moveal %fp@(8),%a5 49f46: 266e 000c moveal %fp@(12),%a3 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 49f4a: 4a8b tstl %a3 49f4c: 6700 00b0 beqw 49ffe <_RBTree_Extract_unprotected+0xc4> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 49f50: b7ed 0008 cmpal %a5@(8),%a3 49f54: 6700 00d2 beqw 4a028 <_RBTree_Extract_unprotected+0xee> the_rbtree->first[RBT_LEFT] = next; } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 49f58: b7ed 000c cmpal %a5@(12),%a3 49f5c: 6700 00e4 beqw 4a042 <_RBTree_Extract_unprotected+0x108> * 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]) { 49f60: 246b 0004 moveal %a3@(4),%a2 49f64: 4a8a tstl %a2 49f66: 6700 00f4 beqw 4a05c <_RBTree_Extract_unprotected+0x122> 49f6a: 4aab 0008 tstl %a3@(8) 49f6e: 6700 0098 beqw 4a008 <_RBTree_Extract_unprotected+0xce> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 49f72: 202a 0008 movel %a2@(8),%d0 49f76: 6708 beqs 49f80 <_RBTree_Extract_unprotected+0x46> 49f78: 2440 moveal %d0,%a2 49f7a: 202a 0008 movel %a2@(8),%d0 49f7e: 66f8 bnes 49f78 <_RBTree_Extract_unprotected+0x3e> * 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]; 49f80: 286a 0004 moveal %a2@(4),%a4 if(leaf) { 49f84: 4a8c tstl %a4 49f86: 6700 00fc beqw 4a084 <_RBTree_Extract_unprotected+0x14a> leaf->parent = target->parent; 49f8a: 2892 movel %a2@,%a4@ } 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]; 49f8c: 2252 moveal %a2@,%a1 49f8e: b5e9 0004 cmpal %a1@(4),%a2 49f92: 56c0 sne %d0 target->parent->child[dir] = leaf; 49f94: 7201 moveq #1,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 49f96: 7401 moveq #1,%d2 } 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]; 49f98: 49c0 extbl %d0 target->parent->child[dir] = leaf; 49f9a: 9280 subl %d0,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 49f9c: 2053 moveal %a3@,%a0 /* 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]; target->parent->child[dir] = leaf; 49f9e: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 49fa2: b7e8 0004 cmpal %a0@(4),%a3 49fa6: 56c1 sne %d1 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; 49fa8: 202a 000c movel %a2@(12),%d0 dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 49fac: 49c1 extbl %d1 the_node->parent->child[dir] = target; 49fae: 9481 subl %d1,%d2 49fb0: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 49fb4: 256b 0008 0008 movel %a3@(8),%a2@(8) if (the_node->child[RBT_RIGHT]) 49fba: 206b 0008 moveal %a3@(8),%a0 49fbe: 4a88 tstl %a0 49fc0: 6702 beqs 49fc4 <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 49fc2: 208a movel %a2,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 49fc4: 256b 0004 0004 movel %a3@(4),%a2@(4) if (the_node->child[RBT_LEFT]) 49fca: 206b 0004 moveal %a3@(4),%a0 49fce: 4a88 tstl %a0 49fd0: 6702 beqs 49fd4 <_RBTree_Extract_unprotected+0x9a> the_node->child[RBT_LEFT]->parent = target; 49fd2: 208a movel %a2,%a0@ /* 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; 49fd4: 2493 movel %a3@,%a2@ target->color = the_node->color; 49fd6: 256b 000c 000c movel %a3@(12),%a2@(12) /* 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 */ 49fdc: 4a80 tstl %d0 49fde: 6608 bnes 49fe8 <_RBTree_Extract_unprotected+0xae> if (leaf) { 49fe0: 4a8c tstl %a4 49fe2: 6704 beqs 49fe8 <_RBTree_Extract_unprotected+0xae> leaf->color = RBT_BLACK; /* case 2 */ 49fe4: 42ac 000c clrl %a4@(12) /* 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; 49fe8: 206d 0004 moveal %a5@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 49fec: 42ab 0008 clrl %a3@(8) 49ff0: 42ab 0004 clrl %a3@(4) 49ff4: 4293 clrl %a3@ 49ff6: 4a88 tstl %a0 49ff8: 6704 beqs 49ffe <_RBTree_Extract_unprotected+0xc4> 49ffa: 42a8 000c clrl %a0@(12) } 49ffe: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a004: 4e5e unlk %fp 4a006: 4e75 rts * 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]) { 4a008: 284a moveal %a2,%a4 * 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; 4a00a: 2893 movel %a3@,%a4@ } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a00c: 7401 moveq #1,%d2 _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]; 4a00e: 2053 moveal %a3@,%a0 4a010: b7e8 0004 cmpal %a0@(4),%a3 4a014: 56c1 sne %d1 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; 4a016: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a01a: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4a01c: 9481 subl %d1,%d2 4a01e: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4a022: 4a80 tstl %d0 4a024: 66c2 bnes 49fe8 <_RBTree_Extract_unprotected+0xae> 4a026: 60b8 bras 49fe0 <_RBTree_Extract_unprotected+0xa6> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); 4a028: 4878 0001 pea 1 4a02c: 2f0b movel %a3,%sp@- 4a02e: 4eb9 0004 a33c jsr 4a33c <_RBTree_Next_unprotected> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 4a034: 508f addql #8,%sp 4a036: 2b40 0008 movel %d0,%a5@(8) } /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4a03a: b7ed 000c cmpal %a5@(12),%a3 4a03e: 6600 ff20 bnew 49f60 <_RBTree_Extract_unprotected+0x26> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); 4a042: 42a7 clrl %sp@- 4a044: 2f0b movel %a3,%sp@- 4a046: 4eb9 0004 a33c jsr 4a33c <_RBTree_Next_unprotected> * 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]) { 4a04c: 246b 0004 moveal %a3@(4),%a2 /* Check if max needs to be updated. min=max for 1 element trees so * do not use else if here. */ if (the_node == the_rbtree->first[RBT_RIGHT]) { RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 4a050: 508f addql #8,%sp 4a052: 2b40 000c movel %d0,%a5@(12) * 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]) { 4a056: 4a8a tstl %a2 4a058: 6600 ff10 bnew 49f6a <_RBTree_Extract_unprotected+0x30> * 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]; 4a05c: 286b 0008 moveal %a3@(8),%a4 if( leaf ) { 4a060: 4a8c tstl %a4 4a062: 66a6 bnes 4a00a <_RBTree_Extract_unprotected+0xd0> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a064: 2f0b movel %a3,%sp@- } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a066: 7401 moveq #1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a068: 4eba fcc2 jsr %pc@(49d2c <_RBTree_Extract_validate_unprotected>) } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a06c: 2053 moveal %a3@,%a0 4a06e: b7e8 0004 cmpal %a0@(4),%a3 4a072: 56c1 sne %d1 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; 4a074: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4a078: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4a07a: 9481 subl %d1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4a07c: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4a07e: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4a082: 609e bras 4a022 <_RBTree_Extract_unprotected+0xe8> 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); 4a084: 2f0a movel %a2,%sp@- 4a086: 4eba fca4 jsr %pc@(49d2c <_RBTree_Extract_validate_unprotected>) 4a08a: 588f addql #4,%sp 4a08c: 6000 fefe braw 49f8c <_RBTree_Extract_unprotected+0x52> =============================================================================== 00049d2c <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 49d2c: 4e56 ffec linkw %fp,#-20 49d30: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49d34: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 49d38: 2053 moveal %a3@,%a0 if(!parent->parent) return; 49d3a: 4a90 tstl %a0@ 49d3c: 677e beqs 49dbc <_RBTree_Extract_validate_unprotected+0x90> { 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]) 49d3e: 2268 0004 moveal %a0@(4),%a1 49d42: b3cb cmpal %a3,%a1 49d44: 6700 01de beqw 49f24 <_RBTree_Extract_validate_unprotected+0x1f8> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49d48: 7401 moveq #1,%d2 49d4a: b4ab 000c cmpl %a3@(12),%d2 49d4e: 6764 beqs 49db4 <_RBTree_Extract_validate_unprotected+0x88> 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) { 49d50: 4a90 tstl %a0@ 49d52: 6760 beqs 49db4 <_RBTree_Extract_validate_unprotected+0x88> 49d54: 4a89 tstl %a1 49d56: 670a beqs 49d62 <_RBTree_Extract_validate_unprotected+0x36><== NEVER TAKEN 49d58: 7001 moveq #1,%d0 49d5a: b0a9 000c cmpl %a1@(12),%d0 49d5e: 6700 011c beqw 49e7c <_RBTree_Extract_validate_unprotected+0x150> _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]) && 49d62: 2469 0008 moveal %a1@(8),%a2 49d66: 4a8a tstl %a2 49d68: 6708 beqs 49d72 <_RBTree_Extract_validate_unprotected+0x46> 49d6a: 7601 moveq #1,%d3 49d6c: b6aa 000c cmpl %a2@(12),%d3 49d70: 6752 beqs 49dc4 <_RBTree_Extract_validate_unprotected+0x98> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 49d72: 2469 0004 moveal %a1@(4),%a2 49d76: 4a8a tstl %a2 49d78: 6708 beqs 49d82 <_RBTree_Extract_validate_unprotected+0x56> 49d7a: 7001 moveq #1,%d0 49d7c: b0aa 000c cmpl %a2@(12),%d0 49d80: 6742 beqs 49dc4 <_RBTree_Extract_validate_unprotected+0x98> sibling->color = RBT_RED; 49d82: 7001 moveq #1,%d0 49d84: 2340 000c movel %d0,%a1@(12) 49d88: b0a8 000c cmpl %a0@(12),%d0 49d8c: 6700 019e beqw 49f2c <_RBTree_Extract_validate_unprotected+0x200> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 49d90: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49d92: 4a8a tstl %a2 49d94: 6700 0154 beqw 49eea <_RBTree_Extract_validate_unprotected+0x1be> if(!(the_node->parent->parent)) return NULL; 49d98: 4a92 tstl %a2@ 49d9a: 6700 014e beqw 49eea <_RBTree_Extract_validate_unprotected+0x1be> if(the_node == the_node->parent->child[RBT_LEFT]) 49d9e: 226a 0004 moveal %a2@(4),%a1 49da2: b3c8 cmpal %a0,%a1 49da4: 6700 0138 beqw 49ede <_RBTree_Extract_validate_unprotected+0x1b2> 49da8: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49daa: 204a moveal %a2,%a0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49dac: 7401 moveq #1,%d2 49dae: b4ab 000c cmpl %a3@(12),%d2 49db2: 669c bnes 49d50 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN 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; 49db4: 2053 moveal %a3@,%a0 49db6: 4a90 tstl %a0@ 49db8: 6700 0140 beqw 49efa <_RBTree_Extract_validate_unprotected+0x1ce> } 49dbc: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 49dc0: 4e5e unlk %fp 49dc2: 4e75 rts * 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]; 49dc4: b7e8 0004 cmpal %a0@(4),%a3 49dc8: 56c0 sne %d0 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 49dca: 7201 moveq #1,%d1 49dcc: 4480 negl %d0 49dce: b181 eorl %d0,%d1 49dd0: 0280 0000 00ff andil #255,%d0 49dd6: 0281 0000 00ff andil #255,%d1 if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { 49ddc: 5281 addql #1,%d1 49dde: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 49de2: 4a8a tstl %a2 49de4: 670a beqs 49df0 <_RBTree_Extract_validate_unprotected+0xc4> 49de6: 7401 moveq #1,%d2 49de8: b4aa 000c cmpl %a2@(12),%d2 49dec: 6700 0118 beqw 49f06 <_RBTree_Extract_validate_unprotected+0x1da> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 49df0: 5280 addql #1,%d0 * 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; 49df2: 7401 moveq #1,%d2 sibling->child[dir]->color = RBT_BLACK; 49df4: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 * 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; 49df8: 2342 000c movel %d2,%a1@(12) sibling->child[dir]->color = RBT_BLACK; 49dfc: 42aa 000c clrl %a2@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49e00: 4a8a tstl %a2 49e02: 672c beqs 49e30 <_RBTree_Extract_validate_unprotected+0x104><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 49e04: 49f2 1c00 lea %a2@(00000000,%d1:l:4),%a4 49e08: 2394 0c00 movel %a4@,%a1@(00000000,%d0:l:4) if (c->child[dir]) 49e0c: 2872 1c00 moveal %a2@(00000000,%d1:l:4),%a4 49e10: 4a8c tstl %a4 49e12: 6702 beqs 49e16 <_RBTree_Extract_validate_unprotected+0xea> c->child[dir]->parent = the_node; 49e14: 2889 movel %a1,%a4@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49e16: 2851 moveal %a1@,%a4 49e18: 7601 moveq #1,%d3 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; 49e1a: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49e1e: b3ec 0004 cmpal %a4@(4),%a1 49e22: 56c2 sne %d2 c->parent = the_node->parent; 49e24: 248c movel %a4,%a2@ 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; 49e26: 49c2 extbl %d2 49e28: 9682 subl %d2,%d3 49e2a: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 49e2e: 228a movel %a2,%a1@ _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; 49e30: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 } sibling->color = parent->color; 49e34: 2968 000c 000c movel %a0@(12),%a4@(12) 49e3a: 2274 1c00 moveal %a4@(00000000,%d1:l:4),%a1 parent->color = RBT_BLACK; 49e3e: 42a8 000c clrl %a0@(12) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 49e42: 42a9 000c clrl %a1@(12) 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]; 49e46: 43f4 0c00 lea %a4@(00000000,%d0:l:4),%a1 49e4a: 2191 1c00 movel %a1@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 49e4e: 2274 0c00 moveal %a4@(00000000,%d0:l:4),%a1 49e52: 4a89 tstl %a1 49e54: 6702 beqs 49e58 <_RBTree_Extract_validate_unprotected+0x12c> c->child[dir]->parent = the_node; 49e56: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49e58: 2250 moveal %a0@,%a1 49e5a: 7201 moveq #1,%d1 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; 49e5c: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49e60: b1e9 0004 cmpal %a1@(4),%a0 49e64: 56c0 sne %d0 c->parent = the_node->parent; 49e66: 2889 movel %a1,%a4@ 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; 49e68: 49c0 extbl %d0 49e6a: 9280 subl %d0,%d1 c->parent = the_node->parent; the_node->parent = c; 49e6c: 208c movel %a4,%a0@ _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 49e6e: 2053 moveal %a3@,%a0 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; 49e70: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) 49e74: 4a90 tstl %a0@ 49e76: 6600 ff44 bnew 49dbc <_RBTree_Extract_validate_unprotected+0x90> 49e7a: 607e bras 49efa <_RBTree_Extract_validate_unprotected+0x1ce><== NOT EXECUTED * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 49e7c: b7e8 0004 cmpal %a0@(4),%a3 49e80: 56c1 sne %d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 49e82: 7001 moveq #1,%d0 * 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; 49e84: 7601 moveq #1,%d3 sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 49e86: 4481 negl %d1 49e88: b380 eorl %d1,%d0 * 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; 49e8a: 2143 000c movel %d3,%a0@(12) 49e8e: 0280 0000 00ff andil #255,%d0 sibling->color = RBT_BLACK; 49e94: 42a9 000c clrl %a1@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49e98: 5280 addql #1,%d0 49e9a: 2470 0c00 moveal %a0@(00000000,%d0:l:4),%a2 dir = the_node != parent->child[0]; 49e9e: 0281 0000 00ff andil #255,%d1 49ea4: 4a8a tstl %a2 49ea6: 674c beqs 49ef4 <_RBTree_Extract_validate_unprotected+0x1c8><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 49ea8: 5281 addql #1,%d1 49eaa: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 49eae: 2191 0c00 movel %a1@,%a0@(00000000,%d0:l:4) if (c->child[dir]) 49eb2: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 49eb6: 4a89 tstl %a1 49eb8: 6702 beqs 49ebc <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN c->child[dir]->parent = the_node; 49eba: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49ebc: 2250 moveal %a0@,%a1 49ebe: 7401 moveq #1,%d2 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; 49ec0: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 49ec4: b1e9 0004 cmpal %a1@(4),%a0 49ec8: 56c1 sne %d1 c->parent = the_node->parent; 49eca: 2489 movel %a1,%a2@ 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; 49ecc: 49c1 extbl %d1 49ece: 9481 subl %d1,%d2 49ed0: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4) 49ed4: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 c->parent = the_node->parent; the_node->parent = c; 49ed8: 208a movel %a2,%a0@ 49eda: 6000 fe86 braw 49d62 <_RBTree_Extract_validate_unprotected+0x36> 49ede: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49ee0: 204a moveal %a2,%a0 if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 49ee2: 226a 0008 moveal %a2@(8),%a1 49ee6: 6000 fec4 braw 49dac <_RBTree_Extract_validate_unprotected+0x80> 49eea: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49eec: 93c9 subal %a1,%a1 49eee: 204a moveal %a2,%a0 49ef0: 6000 feba braw 49dac <_RBTree_Extract_validate_unprotected+0x80> RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 49ef4: 93c9 subal %a1,%a1 <== NOT EXECUTED 49ef6: 6000 fe6a braw 49d62 <_RBTree_Extract_validate_unprotected+0x36><== NOT EXECUTED 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; 49efa: 42ab 000c clrl %a3@(12) } 49efe: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 49f02: 4e5e unlk %fp 49f04: 4e75 rts 49f06: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; 49f0a: 2368 000c 000c movel %a0@(12),%a1@(12) parent->color = RBT_BLACK; 49f10: 42a8 000c clrl %a0@(12) sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; 49f14: 42aa 000c clrl %a2@(12) 49f18: 4a8c tstl %a4 49f1a: 6700 fe98 beqw 49db4 <_RBTree_Extract_validate_unprotected+0x88> 49f1e: 5280 addql #1,%d0 49f20: 6000 ff24 braw 49e46 <_RBTree_Extract_validate_unprotected+0x11a> 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]; 49f24: 2268 0008 moveal %a0@(8),%a1 49f28: 6000 fe1e braw 49d48 <_RBTree_Extract_validate_unprotected+0x1c> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 49f2c: 42a8 000c clrl %a0@(12) 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; 49f30: 2053 moveal %a3@,%a0 49f32: 4a90 tstl %a0@ 49f34: 6600 fe86 bnew 49dbc <_RBTree_Extract_validate_unprotected+0x90> 49f38: 60c0 bras 49efa <_RBTree_Extract_validate_unprotected+0x1ce><== NOT EXECUTED =============================================================================== 0004a59c <_RBTree_Find>: { ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a59c: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 4a5a2: 4e56 ffec linkw %fp,#-20 4a5a6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4a5aa: 266e 0008 moveal %fp@(8),%a3 4a5ae: 242e 000c movel %fp@(12),%d2 ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 4a5b2: 40c4 movew %sr,%d4 4a5b4: 8084 orl %d4,%d0 4a5b6: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 4a5b8: 246b 0004 moveal %a3@(4),%a2 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 4a5bc: 4283 clrl %d3 4a5be: 4a8a tstl %a2 4a5c0: 672a beqs 4a5ec <_RBTree_Find+0x50> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); 4a5c2: 2f0a movel %a2,%sp@- 4a5c4: 206b 0010 moveal %a3@(16),%a0 4a5c8: 2f02 movel %d2,%sp@- 4a5ca: 4e90 jsr %a0@ if ( _RBTree_Is_equal( compare_result ) ) { 4a5cc: 508f addql #8,%sp 4a5ce: 4a80 tstl %d0 4a5d0: 6608 bnes 4a5da <_RBTree_Find+0x3e> found = iter_node; if ( the_rbtree->is_unique ) 4a5d2: 260a movel %a2,%d3 4a5d4: 4a2b 0014 tstb %a3@(20) 4a5d8: 6612 bnes 4a5ec <_RBTree_Find+0x50> RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; 4a5da: 4a80 tstl %d0 4a5dc: 5ec1 sgt %d1 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 4a5de: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater( int compare_result ) { return compare_result > 0; 4a5e0: 49c1 extbl %d1 break; } RBTree_Direction dir = (RBTree_Direction) _RBTree_Is_greater( compare_result ); iter_node = iter_node->child[dir]; 4a5e2: 9081 subl %d1,%d0 4a5e4: 2472 0c00 moveal %a2@(00000000,%d0:l:4),%a2 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 4a5e8: 4a8a tstl %a2 4a5ea: 66d6 bnes 4a5c2 <_RBTree_Find+0x26> return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 4a5ec: 46c4 movew %d4,%sr return return_node; } 4a5ee: 2003 movel %d3,%d0 4a5f0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a5f6: 4e5e unlk %fp ... =============================================================================== 0004a55c <_RBTree_Find_header>: { ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 4a55c: 203c 0000 0700 movel #1792,%d0 #include RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 4a562: 4e56 0000 linkw %fp,#0 4a566: 206e 0008 moveal %fp@(8),%a0 4a56a: 2f02 movel %d2,%sp@- ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 4a56c: 40c2 movew %sr,%d2 4a56e: 8082 orl %d2,%d0 4a570: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 4a572: 4a88 tstl %a0 4a574: 671a beqs 4a590 <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL; 4a576: 2050 moveal %a0@,%a0 4a578: 4a88 tstl %a0 4a57a: 670a beqs 4a586 <_RBTree_Find_header+0x2a> 4a57c: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 4a57e: 6706 beqs 4a586 <_RBTree_Find_header+0x2a> <== NEVER TAKEN 4a580: 2041 moveal %d1,%a0 4a582: 2210 movel %a0@,%d1 4a584: 66fa bnes 4a580 <_RBTree_Find_header+0x24> return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 4a586: 46c2 movew %d2,%sr return return_header; } 4a588: 241f movel %sp@+,%d2 4a58a: 2008 movel %a0,%d0 4a58c: 4e5e unlk %fp 4a58e: 4e75 rts */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 4a590: 91c8 subal %a0,%a0 RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 4a592: 46c2 movew %d2,%sr return return_header; } 4a594: 241f movel %sp@+,%d2 4a596: 2008 movel %a0,%d0 4a598: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8f0 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 4a8f0: 4e56 ffec linkw %fp,#-20 4a8f4: 202e 001c movel %fp@(28),%d0 4a8f8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4a8fc: 246e 0008 moveal %fp@(8),%a2 4a900: 242e 0014 movel %fp@(20),%d2 4a904: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 4a908: 4a8a tstl %a2 4a90a: 6736 beqs 4a942 <_RBTree_Initialize+0x52> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 4a90c: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 4a90e: 256e 000c 0010 movel %fp@(12),%a2@(16) the_rbtree->is_unique = is_unique; 4a914: 1540 0014 moveb %d0,%a2@(20) RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 4a918: 42aa 0004 clrl %a2@(4) the_rbtree->first[0] = NULL; 4a91c: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 4a920: 42aa 000c clrl %a2@(12) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 4a924: 4a82 tstl %d2 4a926: 671a beqs 4a942 <_RBTree_Initialize+0x52> <== NEVER TAKEN 4a928: 262e 0010 movel %fp@(16),%d3 4a92c: 47f9 0004 a638 lea 4a638 <_RBTree_Insert_unprotected>,%a3 _RBTree_Insert_unprotected(the_rbtree, next); 4a932: 2f03 movel %d3,%sp@- #include #include #include #include void _RBTree_Initialize( 4a934: d684 addl %d4,%d3 4a936: 5382 subql #1,%d2 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert_unprotected(the_rbtree, next); 4a938: 2f0a movel %a2,%sp@- 4a93a: 4e93 jsr %a3@ /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 4a93c: 508f addql #8,%sp 4a93e: 4a82 tstl %d2 4a940: 66f0 bnes 4a932 <_RBTree_Initialize+0x42> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 4a942: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a948: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a0bc <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4a0bc: 4e56 ffe4 linkw %fp,#-28 4a0c0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4a0c4: 286e 0008 moveal %fp@(8),%a4 4a0c8: 266e 000c moveal %fp@(12),%a3 if(!the_node) return (RBTree_Node*)-1; 4a0cc: 4a8b tstl %a3 4a0ce: 6700 01b6 beqw 4a286 <_RBTree_Insert_unprotected+0x1ca> RBTree_Node *iter_node = the_rbtree->root; 4a0d2: 246c 0004 moveal %a4@(4),%a2 int compare_result; if (!iter_node) { /* special case: first node inserted */ 4a0d6: 4a8a tstl %a2 4a0d8: 6700 01ba beqw 4a294 <_RBTree_Insert_unprotected+0x1d8> 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); 4a0dc: 2f0a movel %a2,%sp@- 4a0de: 206c 0010 moveal %a4@(16),%a0 4a0e2: 2f0b movel %a3,%sp@- 4a0e4: 4e90 jsr %a0@ if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 4a0e6: 508f addql #8,%sp return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 4a0e8: 2400 movel %d0,%d2 4a0ea: 4682 notl %d2 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 ) ) 4a0ec: 4a2c 0014 tstb %a4@(20) 4a0f0: 6706 beqs 4a0f8 <_RBTree_Insert_unprotected+0x3c> 4a0f2: 4a80 tstl %d0 4a0f4: 6700 0182 beqw 4a278 <_RBTree_Insert_unprotected+0x1bc> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 4a0f8: d482 addl %d2,%d2 4a0fa: 9582 subxl %d2,%d2 4a0fc: 4482 negl %d2 if (!iter_node->child[dir]) { 4a0fe: 2202 movel %d2,%d1 4a100: 5281 addql #1,%d1 4a102: 2632 1c00 movel %a2@(00000000,%d1:l:4),%d3 4a106: 6704 beqs 4a10c <_RBTree_Insert_unprotected+0x50> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; 4a108: 2443 moveal %d3,%a2 4a10a: 60d0 bras 4a0dc <_RBTree_Insert_unprotected+0x20> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( 4a10c: 206c 0010 moveal %a4@(16),%a0 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; 4a110: 7001 moveq #1,%d0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a112: 2a42 moveal %d2,%a5 4a114: 548d addql #2,%a5 compare_result = the_rbtree->compare_function(the_node, iter_node); 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; 4a116: 42ab 0008 clrl %a3@(8) 4a11a: 42ab 0004 clrl %a3@(4) the_node->color = RBT_RED; iter_node->child[dir] = the_node; 4a11e: 258b 1c00 movel %a3,%a2@(00000000,%d1:l:4) if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); if (!iter_node->child[dir]) { the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; the_node->color = RBT_RED; 4a122: 2740 000c movel %d0,%a3@(12) iter_node->child[dir] = the_node; the_node->parent = iter_node; 4a126: 268a movel %a2,%a3@ /* update min/max */ compare_result = the_rbtree->compare_function( 4a128: 2f34 dc00 movel %a4@(00000000,%a5:l:4),%sp@- 4a12c: 2f0b movel %a3,%sp@- 4a12e: 4e90 jsr %a0@ the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 4a130: 508f addql #8,%sp 4a132: 4a82 tstl %d2 4a134: 6600 0124 bnew 4a25a <_RBTree_Insert_unprotected+0x19e> 4a138: 4a80 tstl %d0 4a13a: 6d00 0124 bltw 4a260 <_RBTree_Insert_unprotected+0x1a4> _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 4a13e: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4a140: 2250 moveal %a0@,%a1 4a142: 2449 moveal %a1,%a2 4a144: 4a89 tstl %a1 4a146: 6700 00ee beqw 4a236 <_RBTree_Insert_unprotected+0x17a> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4a14a: 7801 moveq #1,%d4 4a14c: b8a8 000c cmpl %a0@(12),%d4 4a150: 670c beqs 4a15e <_RBTree_Insert_unprotected+0xa2> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a152: 2003 movel %d3,%d0 4a154: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a15a: 4e5e unlk %fp 4a15c: 4e75 rts ) { 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; 4a15e: 4a91 tstl %a1@ 4a160: 6700 0106 beqw 4a268 <_RBTree_Insert_unprotected+0x1ac> { 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]) 4a164: 2229 0004 movel %a1@(4),%d1 4a168: b288 cmpl %a0,%d1 4a16a: 6700 0104 beqw 4a270 <_RBTree_Insert_unprotected+0x1b4> 4a16e: 2841 moveal %d1,%a4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4a170: 4a8c tstl %a4 4a172: 670a beqs 4a17e <_RBTree_Insert_unprotected+0xc2> 4a174: 7401 moveq #1,%d2 4a176: b4ac 000c cmpl %a4@(12),%d2 4a17a: 6700 00ca beqw 4a246 <_RBTree_Insert_unprotected+0x18a> 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]; 4a17e: b7e8 0004 cmpal %a0@(4),%a3 4a182: 56c2 sne %d2 RBTree_Direction pdir = the_node->parent != g->child[0]; 4a184: b288 cmpl %a0,%d1 4a186: 56c1 sne %d1 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]; 4a188: 49c2 extbl %d2 RBTree_Direction pdir = the_node->parent != g->child[0]; 4a18a: 49c1 extbl %d1 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]; 4a18c: 2001 movel %d1,%d0 4a18e: 4480 negl %d0 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4a190: b282 cmpl %d2,%d1 4a192: 6748 beqs 4a1dc <_RBTree_Insert_unprotected+0x120> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a194: 4a80 tstl %d0 4a196: 57c2 seq %d2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a198: 7801 moveq #1,%d4 4a19a: 2200 movel %d0,%d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a19c: 49c2 extbl %d2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a19e: 9882 subl %d2,%d4 4a1a0: 5281 addql #1,%d1 4a1a2: 2870 4c00 moveal %a0@(00000000,%d4:l:4),%a4 4a1a6: 4a8c tstl %a4 4a1a8: 672c beqs 4a1d6 <_RBTree_Insert_unprotected+0x11a><== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 4a1aa: 4bf4 1c00 lea %a4@(00000000,%d1:l:4),%a5 4a1ae: 2195 4c00 movel %a5@,%a0@(00000000,%d4:l:4) if (c->child[dir]) 4a1b2: 2a74 1c00 moveal %a4@(00000000,%d1:l:4),%a5 4a1b6: 4a8d tstl %a5 4a1b8: 6704 beqs 4a1be <_RBTree_Insert_unprotected+0x102> c->child[dir]->parent = the_node; 4a1ba: 2a88 movel %a0,%a5@ 4a1bc: 2250 moveal %a0@,%a1 c->child[dir] = the_node; 4a1be: 2988 1c00 movel %a0,%a4@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a1c2: 7801 moveq #1,%d4 4a1c4: b1e9 0004 cmpal %a1@(4),%a0 4a1c8: 56c2 sne %d2 c->parent = the_node->parent; 4a1ca: 2889 movel %a1,%a4@ 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; 4a1cc: 49c2 extbl %d2 4a1ce: 9882 subl %d2,%d4 4a1d0: 238c 4c00 movel %a4,%a1@(00000000,%d4:l:4) c->parent = the_node->parent; the_node->parent = c; 4a1d4: 208c movel %a4,%a0@ _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 4a1d6: 2673 1c00 moveal %a3@(00000000,%d1:l:4),%a3 4a1da: 2053 moveal %a3@,%a0 } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 4a1dc: 7201 moveq #1,%d1 4a1de: 9280 subl %d0,%d1 4a1e0: 2001 movel %d1,%d0 4a1e2: 7201 moveq #1,%d1 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; 4a1e4: 7401 moveq #1,%d2 4a1e6: b181 eorl %d0,%d1 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; } the_node->parent->color = RBT_BLACK; 4a1e8: 42a8 000c clrl %a0@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4a1ec: 5281 addql #1,%d1 4a1ee: 2072 1c00 moveal %a2@(00000000,%d1:l:4),%a0 g->color = RBT_RED; 4a1f2: 2542 000c movel %d2,%a2@(12) 4a1f6: 4a88 tstl %a0 4a1f8: 6700 ff44 beqw 4a13e <_RBTree_Insert_unprotected+0x82> c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 4a1fc: 5280 addql #1,%d0 4a1fe: 43f0 0c00 lea %a0@(00000000,%d0:l:4),%a1 4a202: 2591 1c00 movel %a1@,%a2@(00000000,%d1:l:4) if (c->child[dir]) 4a206: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1 4a20a: 4a89 tstl %a1 4a20c: 6702 beqs 4a210 <_RBTree_Insert_unprotected+0x154> c->child[dir]->parent = the_node; 4a20e: 228a movel %a2,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a210: 2252 moveal %a2@,%a1 4a212: 7201 moveq #1,%d1 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; 4a214: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4a218: b5e9 0004 cmpal %a1@(4),%a2 4a21c: 56c0 sne %d0 c->parent = the_node->parent; 4a21e: 2089 movel %a1,%a0@ 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; 4a220: 49c0 extbl %d0 4a222: 9280 subl %d0,%d1 4a224: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4a228: 2488 movel %a0,%a2@ _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 4a22a: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4a22c: 2250 moveal %a0@,%a1 4a22e: 2449 moveal %a1,%a2 4a230: 4a89 tstl %a1 4a232: 6600 ff16 bnew 4a14a <_RBTree_Insert_unprotected+0x8e> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a236: 2003 movel %d3,%d0 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } } if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4a238: 42ab 000c clrl %a3@(12) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a23c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a242: 4e5e unlk %fp 4a244: 4e75 rts u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4a246: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4a24a: 7401 moveq #1,%d2 4a24c: 2649 moveal %a1,%a3 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; 4a24e: 42ac 000c clrl %a4@(12) g->color = RBT_RED; 4a252: 2342 000c movel %d2,%a1@(12) 4a256: 6000 fee6 braw 4a13e <_RBTree_Insert_unprotected+0x82> compare_result = the_rbtree->compare_function( the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || (dir && _RBTree_Is_greater(compare_result)) ) { 4a25a: 4a80 tstl %d0 4a25c: 6f00 fee0 blew 4a13e <_RBTree_Insert_unprotected+0x82> the_rbtree->first[dir] = the_node; 4a260: 298b dc00 movel %a3,%a4@(00000000,%a5:l:4) 4a264: 6000 fed8 braw 4a13e <_RBTree_Insert_unprotected+0x82> 4a268: 2229 0004 movel %a1@(4),%d1 <== NOT EXECUTED 4a26c: 6000 ff10 braw 4a17e <_RBTree_Insert_unprotected+0xc2><== NOT EXECUTED 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]; 4a270: 2869 0008 moveal %a1@(8),%a4 4a274: 6000 fefa braw 4a170 <_RBTree_Insert_unprotected+0xb4> 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 ) ) 4a278: 260a movel %a2,%d3 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a27a: 2003 movel %d3,%d0 4a27c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a282: 4e5e unlk %fp 4a284: 4e75 rts RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; 4a286: 76ff moveq #-1,%d3 /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a288: 2003 movel %d3,%d0 4a28a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a290: 4e5e unlk %fp 4a292: 4e75 rts RBTree_Node *iter_node = the_rbtree->root; int compare_result; if (!iter_node) { /* special case: first node inserted */ the_node->color = RBT_BLACK; 4a294: 42ab 000c clrl %a3@(12) } /* while(iter_node) */ /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; 4a298: 4283 clrl %d3 } 4a29a: 2003 movel %d3,%d0 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; 4a29c: 294b 0004 movel %a3,%a4@(4) the_rbtree->first[0] = the_rbtree->first[1] = the_node; 4a2a0: 294b 000c movel %a3,%a4@(12) 4a2a4: 294b 0008 movel %a3,%a4@(8) the_node->parent = (RBTree_Node *) the_rbtree; 4a2a8: 268c movel %a4,%a3@ the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 4a2aa: 42ab 0008 clrl %a3@(8) 4a2ae: 42ab 0004 clrl %a3@(4) /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 4a2b2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a2b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a2e8 <_RBTree_Iterate_unprotected>: RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a2e8: 7202 moveq #2,%d1 const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 4a2ea: 4e56 ffe8 linkw %fp,#-24 4a2ee: 206e 0008 moveal %fp@(8),%a0 4a2f2: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4a2f6: 262e 000c movel %fp@(12),%d3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a2fa: 57c0 seq %d0 4a2fc: 246e 0010 moveal %fp@(16),%a2 4a300: 49c0 extbl %d0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 4a302: 9280 subl %d0,%d1 4a304: 47f9 0004 a33c lea 4a33c <_RBTree_Next_unprotected>,%a3 4a30a: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2 4a30e: 2a2e 0014 movel %fp@(20),%d5 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a312: 4a82 tstl %d2 4a314: 671a beqs 4a330 <_RBTree_Iterate_unprotected+0x48> stop = (*visitor)( current, dir, visitor_arg ); 4a316: 2f05 movel %d5,%sp@- 4a318: 2f03 movel %d3,%sp@- 4a31a: 2f02 movel %d2,%sp@- 4a31c: 4e92 jsr %a2@ current = _RBTree_Next_unprotected( current, dir ); 4a31e: 2f03 movel %d3,%sp@- 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 ); 4a320: 1800 moveb %d0,%d4 current = _RBTree_Next_unprotected( current, dir ); 4a322: 2f02 movel %d2,%sp@- 4a324: 4e93 jsr %a3@ { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a326: 4fef 0014 lea %sp@(20),%sp stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); 4a32a: 2400 movel %d0,%d2 { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 4a32c: 4a04 tstb %d4 4a32e: 67e2 beqs 4a312 <_RBTree_Iterate_unprotected+0x2a><== ALWAYS TAKEN stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } 4a330: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4a336: 4e5e unlk %fp ... =============================================================================== 0004a33c <_RBTree_Next_unprotected>: RBTree_Node *_RBTree_Next_unprotected( const RBTree_Node *node, RBTree_Direction dir ) { 4a33c: 4e56 0000 linkw %fp,#0 4a340: 222e 000c movel %fp@(12),%d1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4a344: 57c0 seq %d0 4a346: 226e 0008 moveal %fp@(8),%a1 RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; 4a34a: 5281 addql #1,%d1 4a34c: 49c0 extbl %d0 4a34e: 4480 negl %d0 4a350: 2071 1c00 moveal %a1@(00000000,%d1:l:4),%a0 RBTree_Node *_RBTree_Next_unprotected( const RBTree_Node *node, RBTree_Direction dir ) { 4a354: 2f0a movel %a2,%sp@- RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; if ( current != NULL ) { 4a356: 4a88 tstl %a0 4a358: 6718 beqs 4a372 <_RBTree_Next_unprotected+0x36> 4a35a: 5280 addql #1,%d0 next = current; while ( (current = current->child [opp_dir]) != NULL ) { 4a35c: 2230 0c00 movel %a0@(00000000,%d0:l:4),%d1 4a360: 6708 beqs 4a36a <_RBTree_Next_unprotected+0x2e> 4a362: 2041 moveal %d1,%a0 4a364: 2230 0c00 movel %a0@(00000000,%d0:l:4),%d1 4a368: 66f8 bnes 4a362 <_RBTree_Next_unprotected+0x26> <== NEVER TAKEN } } } return next; } 4a36a: 245f moveal %sp@+,%a2 RBTree_Node *parent = node->parent; if ( parent->parent && node == parent->child [opp_dir] ) { next = parent; } else { while ( parent->parent && node == parent->child [dir] ) { 4a36c: 2008 movel %a0,%d0 } } } return next; } 4a36e: 4e5e unlk %fp 4a370: 4e75 rts next = current; while ( (current = current->child [opp_dir]) != NULL ) { next = current; } } else { RBTree_Node *parent = node->parent; 4a372: 2051 moveal %a1@,%a0 if ( parent->parent && node == parent->child [opp_dir] ) { 4a374: 2450 moveal %a0@,%a2 4a376: 4a8a tstl %a2 4a378: 6706 beqs 4a380 <_RBTree_Next_unprotected+0x44> 4a37a: b3f0 0c04 cmpal %a0@(00000004,%d0:l:4),%a1 4a37e: 67ea beqs 4a36a <_RBTree_Next_unprotected+0x2e> next = parent; } else { while ( parent->parent && node == parent->child [dir] ) { 4a380: 4a8a tstl %a2 4a382: 670e beqs 4a392 <_RBTree_Next_unprotected+0x56> 4a384: b3f0 1c00 cmpal %a0@(00000000,%d1:l:4),%a1 4a388: 66e0 bnes 4a36a <_RBTree_Next_unprotected+0x2e> 4a38a: 2248 moveal %a0,%a1 4a38c: 204a moveal %a2,%a0 4a38e: 2452 moveal %a2@,%a2 4a390: 60ee bras 4a380 <_RBTree_Next_unprotected+0x44> } } } return next; } 4a392: 245f moveal %sp@+,%a2 RBTree_Direction dir ) { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); RBTree_Node *current = node->child [dir]; RBTree_Node *next = NULL; 4a394: 4280 clrl %d0 } } } return next; } 4a396: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000486cc <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { 486cc: 4e56 ffec linkw %fp,#-20 486d0: 206e 0008 moveal %fp@(8),%a0 486d4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 486d8: 2468 00f8 moveal %a0@(248),%a2 if ( !api ) 486dc: 4a8a tstl %a2 486de: 671a beqs 486fa <_RTEMS_signal_Post_switch_hook+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 486e0: 203c 0000 0700 movel #1792,%d0 486e6: 40c1 movew %sr,%d1 486e8: 8081 orl %d1,%d0 486ea: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 486ec: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 486f0: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 486f4: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 486f6: 4a82 tstl %d2 486f8: 660a bnes 48704 <_RTEMS_signal_Post_switch_hook+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 486fa: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 48700: 4e5e unlk %fp 48702: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 48704: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 48708: 260e movel %fp,%d3 4870a: 5983 subql #4,%d3 4870c: 47f9 0004 8b5c lea 48b5c ,%a3 48712: 2f03 movel %d3,%sp@- 48714: 2f3c 0000 ffff movel #65535,%sp@- 4871a: 2f2a 000e movel %a2@(14),%sp@- 4871e: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 48720: 2f02 movel %d2,%sp@- 48722: 206a 000a moveal %a2@(10),%a0 48726: 4e90 jsr %a0@ asr->nest_level -= 1; 48728: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4872c: 2f03 movel %d3,%sp@- 4872e: 2f3c 0000 ffff movel #65535,%sp@- 48734: 2f2e fffc movel %fp@(-4),%sp@- 48738: 4e93 jsr %a3@ 4873a: 4fef 001c lea %sp@(28),%sp } 4873e: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 48744: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c3d6 <_RTEMS_tasks_Create_extension>: static bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c3d6: 4e56 0000 linkw %fp,#0 4c3da: 2f0a movel %a2,%sp@- 4c3dc: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4c3e0: 4a39 0005 e1a6 tstb 5e1a6 4c3e6: 675c beqs 4c444 <_RTEMS_tasks_Create_extension+0x6e> /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 4c3e8: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c3ea: 2f00 movel %d0,%sp@- 4c3ec: 4eb9 0004 abf4 jsr 4abf4 <_Workspace_Allocate> if ( !api ) 4c3f2: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c3f4: 2040 moveal %d0,%a0 if ( !api ) 4c3f6: 4a80 tstl %d0 4c3f8: 675c beqs 4c456 <_RTEMS_tasks_Create_extension+0x80> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c3fa: 2540 00f8 movel %d0,%a2@(248) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c3fe: 4200 clrb %d0 4c400: 4290 clrl %a0@ 4c402: 1140 0008 moveb %d0,%a0@(8) 4c406: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c40a: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c40e: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c412: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c416: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c41a: 42a8 001a clrl %a0@(26) _Event_Initialize( &api->Event ); _Event_Initialize( &api->System_event ); _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c41e: 42aa 0104 clrl %a2@(260) if ( rtems_configuration_get_notepads_enabled() ) { 4c422: 4a39 0005 e1a6 tstb 5e1a6 4c428: 6710 beqs 4c43a <_RTEMS_tasks_Create_extension+0x64> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ static bool _RTEMS_tasks_Create_extension( 4c42a: 41e8 001e lea %a0@(30),%a0 4c42e: 4280 clrl %d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4c430: 4298 clrl %a0@+ _Event_Initialize( &api->System_event ); _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4c432: 5280 addql #1,%d0 4c434: 7210 moveq #16,%d1 4c436: b280 cmpl %d0,%d1 4c438: 66f6 bnes 4c430 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c43a: 246e fffc moveal %fp@(-4),%a2 4c43e: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4c440: 7001 moveq #1,%d0 } 4c442: 4e75 rts * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4c444: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4c446: 2f00 movel %d0,%sp@- 4c448: 4eb9 0004 abf4 jsr 4abf4 <_Workspace_Allocate> if ( !api ) 4c44e: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c450: 2040 moveal %d0,%a0 if ( !api ) 4c452: 4a80 tstl %d0 4c454: 66a4 bnes 4c3fa <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c456: 246e fffc moveal %fp@(-4),%a2 4c45a: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4c45c: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 00047908 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 47908: 4e56 ffe4 linkw %fp,#-28 4790c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 47910: 2479 0005 e1cc moveal 5e1cc ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 47916: 2639 0005 e1c8 movel 5e1c8 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 4791c: 4a8a tstl %a2 4791e: 6754 beqs 47974 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 47920: 4a83 tstl %d3 47922: 6750 beqs 47974 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 47924: 280e movel %fp,%d4 47926: 4282 clrl %d2 47928: 5984 subql #4,%d4 4792a: 47f9 0004 76c4 lea 476c4 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 47930: 49f9 0004 7990 lea 47990 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 47936: 2f04 movel %d4,%sp@- 47938: 2f2a 000c movel %a2@(12),%sp@- 4793c: 2f2a 0014 movel %a2@(20),%sp@- 47940: 2f2a 0004 movel %a2@(4),%sp@- 47944: 2f2a 0008 movel %a2@(8),%sp@- 47948: 2f12 movel %a2@,%sp@- 4794a: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4794c: 4fef 0018 lea %sp@(24),%sp 47950: 4a80 tstl %d0 47952: 662a bnes 4797e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 47954: 2f2a 0018 movel %a2@(24),%sp@- 47958: 2f2a 0010 movel %a2@(16),%sp@- 4795c: 2f2e fffc movel %fp@(-4),%sp@- 47960: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 47962: 4fef 000c lea %sp@(12),%sp 47966: 4a80 tstl %d0 47968: 6614 bnes 4797e <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 4796a: 5282 addql #1,%d2 4796c: 45ea 001c lea %a2@(28),%a2 47970: b682 cmpl %d2,%d3 47972: 66c2 bnes 47936 <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 47974: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4797a: 4e5e unlk %fp 4797c: 4e75 rts 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 ); 4797e: 2f00 movel %d0,%sp@- 47980: 4878 0001 pea 1 47984: 4878 0001 pea 1 47988: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> ... =============================================================================== 0004c336 <_RTEMS_tasks_Switch_extension>: static void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4c336: 4e56 0000 linkw %fp,#0 4c33a: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4c33e: 2068 0104 moveal %a0@(260),%a0 while (tvp) { 4c342: 4a88 tstl %a0 4c344: 6712 beqs 4c358 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4c346: 2268 0004 moveal %a0@(4),%a1 4c34a: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4c34e: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c352: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4c354: 4a88 tstl %a0 4c356: 66ee bnes 4c346 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4c358: 206e 000c moveal %fp@(12),%a0 4c35c: 2068 0104 moveal %a0@(260),%a0 while (tvp) { 4c360: 4a88 tstl %a0 4c362: 6712 beqs 4c376 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4c364: 2268 0004 moveal %a0@(4),%a1 4c368: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4c36c: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c370: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4c372: 4a88 tstl %a0 4c374: 66ee bnes 4c364 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4c376: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00073c48 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 73c48: 4e56 fffc linkw %fp,#-4 73c4c: 2f0a movel %a2,%sp@- 73c4e: 486e fffc pea %fp@(-4) 73c52: 2f2e 0008 movel %fp@(8),%sp@- 73c56: 4879 000a 01c0 pea a01c0 <_Rate_monotonic_Information> 73c5c: 4eb9 0004 8c00 jsr 48c00 <_Objects_Get> /* * 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 ) { 73c62: 4fef 000c lea %sp@(12),%sp 73c66: 2440 moveal %d0,%a2 73c68: 4aae fffc tstl %fp@(-4) 73c6c: 6636 bnes 73ca4 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 73c6e: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 73c72: 2028 0010 movel %a0@(16),%d0 73c76: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 73c7c: 670a beqs 73c88 <_Rate_monotonic_Timeout+0x40> 73c7e: 202a 0008 movel %a2@(8),%d0 73c82: b0a8 0020 cmpl %a0@(32),%d0 73c86: 675e beqs 73ce6 <_Rate_monotonic_Timeout+0x9e> _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 ) { 73c88: 7001 moveq #1,%d0 73c8a: b0aa 0038 cmpl %a2@(56),%d0 73c8e: 671c beqs 73cac <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 73c90: 7004 moveq #4,%d0 73c92: 2540 0038 movel %d0,%a2@(56) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 73c96: 2039 0009 fe7a movel 9fe7a <_Thread_Dispatch_disable_level>,%d0 --level; 73c9c: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 73c9e: 23c0 0009 fe7a movel %d0,9fe7a <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 73ca4: 246e fff8 moveal %fp@(-8),%a2 73ca8: 4e5e unlk %fp 73caa: 4e75 rts _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; 73cac: 103c 0003 moveb #3,%d0 73cb0: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 73cb4: 2f0a movel %a2,%sp@- 73cb6: 4eb9 0007 3984 jsr 73984 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 73cbc: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 73cc2: 486a 0010 pea %a2@(16) 73cc6: 4879 0009 ff16 pea 9ff16 <_Watchdog_Ticks_chain> 73ccc: 4eb9 0004 a548 jsr 4a548 <_Watchdog_Insert> 73cd2: 4fef 000c lea %sp@(12),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 73cd6: 2039 0009 fe7a movel 9fe7a <_Thread_Dispatch_disable_level>,%d0 --level; 73cdc: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 73cde: 23c0 0009 fe7a movel %d0,9fe7a <_Thread_Dispatch_disable_level> 73ce4: 60be bras 73ca4 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 73ce6: 2f3c 1007 fff8 movel #268959736,%sp@- 73cec: 2f08 movel %a0,%sp@- 73cee: 4eb9 0004 94e8 jsr 494e8 <_Thread_Clear_state> 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 ); 73cf4: 2f0a movel %a2,%sp@- 73cf6: 4eb9 0007 3984 jsr 73984 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 73cfc: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 73d02: 486a 0010 pea %a2@(16) 73d06: 4879 0009 ff16 pea 9ff16 <_Watchdog_Ticks_chain> 73d0c: 4eb9 0004 a548 jsr 4a548 <_Watchdog_Insert> 73d12: 4fef 0014 lea %sp@(20),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 73d16: 2039 0009 fe7a movel 9fe7a <_Thread_Dispatch_disable_level>,%d0 --level; 73d1c: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 73d1e: 23c0 0009 fe7a movel %d0,9fe7a <_Thread_Dispatch_disable_level> 73d24: 6000 ff7e braw 73ca4 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 00049bc0 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 49bc0: 4e56 0000 linkw %fp,#0 49bc4: 2f0a movel %a2,%sp@- void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 49bc6: 4878 001c pea 1c #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 49bca: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 49bce: 4eb9 0004 b5e8 jsr 4b5e8 <_Workspace_Allocate> if ( sched ) { 49bd4: 588f addql #4,%sp 49bd6: 4a80 tstl %d0 49bd8: 6712 beqs 49bec <_Scheduler_CBS_Allocate+0x2c> <== NEVER TAKEN the_thread->scheduler_info = sched; 49bda: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 49bde: 2040 moveal %d0,%a0 schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49be0: 7202 moveq #2,%d1 sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 49be2: 208a movel %a2,%a0@ schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49be4: 2141 0014 movel %d1,%a0@(20) schinfo->cbs_server = NULL; 49be8: 42a8 0018 clrl %a0@(24) } return sched; } 49bec: 246e fffc moveal %fp@(-4),%a2 49bf0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b2f8 <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 4b2f8: 4e56 fffc linkw %fp,#-4 4b2fc: 2f0a movel %a2,%sp@- 4b2fe: 246e 0008 moveal %fp@(8),%a2 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; 4b302: 202a 00a8 movel %a2@(168),%d0 if ( the_thread->real_priority != new_priority ) 4b306: b0aa 0018 cmpl %a2@(24),%d0 4b30a: 6704 beqs 4b310 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN the_thread->real_priority = new_priority; 4b30c: 2540 0018 movel %d0,%a2@(24) if ( the_thread->current_priority != new_priority ) 4b310: b0aa 0014 cmpl %a2@(20),%d0 4b314: 6712 beqs 4b328 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); 4b316: 4878 0001 pea 1 4b31a: 2f00 movel %d0,%sp@- 4b31c: 2f0a movel %a2,%sp@- 4b31e: 4eb9 0004 b8d0 jsr 4b8d0 <_Thread_Change_priority> 4b324: 4fef 000c lea %sp@(12),%sp /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 4b328: 246a 0086 moveal %a2@(134),%a2 if ( sched_info->cbs_server->cbs_budget_overrun ) { 4b32c: 206a 0018 moveal %a2@(24),%a0 4b330: 4aa8 000c tstl %a0@(12) 4b334: 671e beqs 4b354 <_Scheduler_CBS_Budget_callout+0x5c> _Scheduler_CBS_Get_server_id( 4b336: 486e fffc pea %fp@(-4) 4b33a: 2f10 movel %a0@,%sp@- 4b33c: 4eb9 0004 b2b4 jsr 4b2b4 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 4b342: 206a 0018 moveal %a2@(24),%a0 4b346: 2f2e fffc movel %fp@(-4),%sp@- 4b34a: 2068 000c moveal %a0@(12),%a0 4b34e: 4e90 jsr %a0@ 4b350: 4fef 000c lea %sp@(12),%sp } } 4b354: 246e fff8 moveal %fp@(-8),%a2 4b358: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aeb0 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { 4aeb0: 4e56 0000 linkw %fp,#0 4aeb4: 2079 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a0 4aeba: 2f0a movel %a2,%sp@- 4aebc: 2f02 movel %d2,%sp@- unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4aebe: 4ab9 0006 18fc tstl 618fc <_Scheduler_CBS_Maximum_servers> 4aec4: 6724 beqs 4aeea <_Scheduler_CBS_Cleanup+0x3a> <== NEVER TAKEN 4aec6: 4282 clrl %d2 if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); 4aec8: 45f9 0004 afb8 lea 4afb8 <_Scheduler_CBS_Destroy_server>,%a2 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( _Scheduler_CBS_Server_list[ i ] ) 4aece: 4ab0 2c00 tstl %a0@(00000000,%d2:l:4) 4aed2: 670c beqs 4aee0 <_Scheduler_CBS_Cleanup+0x30> _Scheduler_CBS_Destroy_server( i ); 4aed4: 2f02 movel %d2,%sp@- 4aed6: 4e92 jsr %a2@ 4aed8: 2079 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a0 4aede: 588f addql #4,%sp int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4aee0: 5282 addql #1,%d2 4aee2: b4b9 0006 18fc cmpl 618fc <_Scheduler_CBS_Maximum_servers>,%d2 4aee8: 65e4 bcss 4aece <_Scheduler_CBS_Cleanup+0x1e> if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); 4aeea: 2f08 movel %a0,%sp@- 4aeec: 4eb9 0004 cd80 jsr 4cd80 <_Workspace_Free> return SCHEDULER_CBS_OK; } 4aef2: 242e fff8 movel %fp@(-8),%d2 4aef6: 4280 clrl %d0 4aef8: 246e fffc moveal %fp@(-4),%a2 4aefc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004af00 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 4af00: 4e56 fff0 linkw %fp,#-16 4af04: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4af08: 266e 0008 moveal %fp@(8),%a3 4af0c: 246e 0010 moveal %fp@(16),%a2 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 4af10: 4aab 0004 tstl %a3@(4) 4af14: 6f00 0088 blew 4af9e <_Scheduler_CBS_Create_server+0x9e> 4af18: 4a93 tstl %a3@ 4af1a: 6f00 0082 blew 4af9e <_Scheduler_CBS_Create_server+0x9e> 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++ ) { 4af1e: 2239 0006 18fc movel 618fc <_Scheduler_CBS_Maximum_servers>,%d1 4af24: 6766 beqs 4af8c <_Scheduler_CBS_Create_server+0x8c><== NEVER TAKEN if ( !_Scheduler_CBS_Server_list[i] ) 4af26: 2279 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a1 4af2c: 4a91 tstl %a1@ 4af2e: 6768 beqs 4af98 <_Scheduler_CBS_Create_server+0x98> #include #include #include #include int _Scheduler_CBS_Create_server ( 4af30: 41e9 0004 lea %a1@(4),%a0 4af34: 4280 clrl %d0 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++ ) { 4af36: 5280 addql #1,%d0 4af38: b280 cmpl %d0,%d1 4af3a: 6750 beqs 4af8c <_Scheduler_CBS_Create_server+0x8c> if ( !_Scheduler_CBS_Server_list[i] ) 4af3c: 4a98 tstl %a0@+ 4af3e: 66f6 bnes 4af36 <_Scheduler_CBS_Create_server+0x36> 4af40: 2200 movel %d0,%d1 4af42: e589 lsll #2,%d1 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 4af44: 4878 0010 pea 10 if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 4af48: 49f1 1800 lea %a1@(00000000,%d1:l),%a4 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 4af4c: 2480 movel %d0,%a2@ _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 4af4e: 4eb9 0004 cd64 jsr 4cd64 <_Workspace_Allocate> the_server = _Scheduler_CBS_Server_list[*server_id]; 4af54: 2212 movel %a2@,%d1 if ( !the_server ) 4af56: 588f addql #4,%sp if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) 4af58: 2880 movel %d0,%a4@ _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 4af5a: 2079 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a0 4af60: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0 if ( !the_server ) 4af64: 4a88 tstl %a0 4af66: 6742 beqs 4afaa <_Scheduler_CBS_Create_server+0xaa><== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 4af68: 4280 clrl %d0 _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; 4af6a: 2213 movel %a3@,%d1 4af6c: 242b 0004 movel %a3@(4),%d2 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 4af70: 216e 000c 000c movel %fp@(12),%a0@(12) _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; 4af76: 2141 0004 movel %d1,%a0@(4) 4af7a: 2142 0008 movel %d2,%a0@(8) the_server->task_id = -1; 4af7e: 72ff moveq #-1,%d1 the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4af80: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; 4af86: 2081 movel %d1,%a0@ the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4af88: 4e5e unlk %fp 4af8a: 4e75 rts if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 4af8c: 70e6 moveq #-26,%d0 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4af8e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4af94: 4e5e unlk %fp 4af96: 4e75 rts 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] ) 4af98: 4281 clrl %d1 4af9a: 4280 clrl %d0 4af9c: 60a6 bras 4af44 <_Scheduler_CBS_Create_server+0x44> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 4af9e: 70ee moveq #-18,%d0 the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4afa0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4afa6: 4e5e unlk %fp 4afa8: 4e75 rts *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; 4afaa: 70ef moveq #-17,%d0 <== NOT EXECUTED the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 4afac: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 4afb2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b058 <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 4b058: 4e56 fff0 linkw %fp,#-16 4b05c: 48d7 040c moveml %d2-%d3/%a2,%sp@ Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b060: 486e fffc pea %fp@(-4) int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 4b064: 242e 000c movel %fp@(12),%d2 4b068: 262e 0008 movel %fp@(8),%d3 Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b06c: 2f02 movel %d2,%sp@- 4b06e: 4eb9 0004 bdd4 jsr 4bdd4 <_Thread_Get> /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 4b074: 508f addql #8,%sp { Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4b076: 2440 moveal %d0,%a2 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 4b078: 4a80 tstl %d0 4b07a: 674a beqs 4b0c6 <_Scheduler_CBS_Detach_thread+0x6e> _Thread_Enable_dispatch(); 4b07c: 4eb9 0004 bdb4 jsr 4bdb4 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 4b082: b6b9 0006 18fc cmpl 618fc <_Scheduler_CBS_Maximum_servers>,%d3 4b088: 643c bccs 4b0c6 <_Scheduler_CBS_Detach_thread+0x6e> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 4b08a: 2079 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a0 4b090: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4b094: 4a88 tstl %a0 4b096: 673a beqs 4b0d2 <_Scheduler_CBS_Detach_thread+0x7a> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 4b098: b490 cmpl %a0@,%d2 4b09a: 662a bnes 4b0c6 <_Scheduler_CBS_Detach_thread+0x6e><== NEVER TAKEN return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 4b09c: 70ff moveq #-1,%d0 4b09e: 2080 movel %d0,%a0@ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 4b0a0: 206a 0086 moveal %a2@(134),%a0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; 4b0a4: 4280 clrl %d0 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; 4b0a6: 42a8 0018 clrl %a0@(24) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4b0aa: 256a 009c 0076 movel %a2@(156),%a2@(118) the_thread->budget_callout = the_thread->Start.budget_callout; 4b0b0: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->is_preemptible = the_thread->Start.is_preemptible; 4b0b6: 156a 009a 0070 moveb %a2@(154),%a2@(112) return SCHEDULER_CBS_OK; } 4b0bc: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b0c2: 4e5e unlk %fp 4b0c4: 4e75 rts if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 4b0c6: 70ee moveq #-18,%d0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 4b0c8: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b0ce: 4e5e unlk %fp 4b0d0: 4e75 rts return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; 4b0d2: 70e7 moveq #-25,%d0 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->is_preemptible = the_thread->Start.is_preemptible; return SCHEDULER_CBS_OK; } 4b0d4: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 4b0da: 4e5e unlk %fp ... =============================================================================== 0004b2b4 <_Scheduler_CBS_Get_server_id>: int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 4b2b4: 4e56 0000 linkw %fp,#0 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b2b8: 2239 0006 18fc movel 618fc <_Scheduler_CBS_Maximum_servers>,%d1 int _Scheduler_CBS_Get_server_id ( rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { 4b2be: 2f02 movel %d2,%sp@- 4b2c0: 242e 0008 movel %fp@(8),%d2 unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b2c4: 4a81 tstl %d1 4b2c6: 6718 beqs 4b2e0 <_Scheduler_CBS_Get_server_id+0x2c><== NEVER TAKEN 4b2c8: 2279 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a1 4b2ce: 4280 clrl %d0 if ( _Scheduler_CBS_Server_list[i] && 4b2d0: 2059 moveal %a1@+,%a0 4b2d2: 4a88 tstl %a0 4b2d4: 6704 beqs 4b2da <_Scheduler_CBS_Get_server_id+0x26> 4b2d6: b490 cmpl %a0@,%d2 4b2d8: 670e beqs 4b2e8 <_Scheduler_CBS_Get_server_id+0x34> rtems_id task_id, Scheduler_CBS_Server_id *server_id ) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { 4b2da: 5280 addql #1,%d0 4b2dc: b280 cmpl %d0,%d1 4b2de: 66f0 bnes 4b2d0 <_Scheduler_CBS_Get_server_id+0x1c> *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; } 4b2e0: 241f movel %sp@+,%d2 _Scheduler_CBS_Server_list[i]->task_id == task_id ) { *server_id = i; return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; 4b2e2: 70e7 moveq #-25,%d0 } 4b2e4: 4e5e unlk %fp 4b2e6: 4e75 rts { 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; 4b2e8: 206e 000c moveal %fp@(12),%a0 return SCHEDULER_CBS_OK; } } return SCHEDULER_CBS_ERROR_NOSERVER; } 4b2ec: 241f movel %sp@+,%d2 4b2ee: 4e5e unlk %fp { 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; 4b2f0: 2080 movel %d0,%a0@ return SCHEDULER_CBS_OK; 4b2f2: 4280 clrl %d0 } } return SCHEDULER_CBS_ERROR_NOSERVER; } ... =============================================================================== 0004b35c <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { 4b35c: 4e56 0000 linkw %fp,#0 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 4b360: 2039 0006 18fc movel 618fc <_Scheduler_CBS_Maximum_servers>,%d0 4b366: e588 lsll #2,%d0 4b368: 2f00 movel %d0,%sp@- 4b36a: 4eb9 0004 cd64 jsr 4cd64 <_Workspace_Allocate> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 4b370: 588f addql #4,%sp } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 4b372: 2040 moveal %d0,%a0 4b374: 23c0 0006 32d2 movel %d0,632d2 <_Scheduler_CBS_Server_list> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 4b37a: 672c beqs 4b3a8 <_Scheduler_CBS_Initialize+0x4c> <== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 4b37c: 2039 0006 18fc movel 618fc <_Scheduler_CBS_Maximum_servers>,%d0 4b382: 4281 clrl %d1 4b384: 4a80 tstl %d0 4b386: 671a beqs 4b3a2 <_Scheduler_CBS_Initialize+0x46> <== NEVER TAKEN _Scheduler_CBS_Server_list[i] = NULL; 4b388: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) 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++) { 4b38c: 5281 addql #1,%d1 4b38e: b081 cmpl %d1,%d0 4b390: 6710 beqs 4b3a2 <_Scheduler_CBS_Initialize+0x46> <== NEVER TAKEN 4b392: 2079 0006 32d2 moveal 632d2 <_Scheduler_CBS_Server_list>,%a0 _Scheduler_CBS_Server_list[i] = NULL; 4b398: 42b0 1c00 clrl %a0@(00000000,%d1:l:4) 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++) { 4b39c: 5281 addql #1,%d1 4b39e: b081 cmpl %d1,%d0 4b3a0: 66f0 bnes 4b392 <_Scheduler_CBS_Initialize+0x36> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 4b3a2: 4280 clrl %d0 } 4b3a4: 4e5e unlk %fp 4b3a6: 4e75 rts { 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; 4b3a8: 70ef moveq #-17,%d0 <== NOT EXECUTED for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; } 4b3aa: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00049bf4 <_Scheduler_CBS_Release_job>: void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 49bf4: 4e56 0000 linkw %fp,#0 49bf8: 206e 0008 moveal %fp@(8),%a0 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; 49bfc: 2268 0086 moveal %a0@(134),%a1 ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = 49c00: 2269 0018 moveal %a1@(24),%a1 (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { 49c04: 4aae 000c tstl %fp@(12) 49c08: 6732 beqs 49c3c <_Scheduler_CBS_Release_job+0x48> /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 49c0a: 2039 0006 13a2 movel 613a2 <_Watchdog_Ticks_since_boot>,%d0 Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { /* Initializing or shifting deadline. */ if (serv_info) 49c10: 4a89 tstl %a1 49c12: 6738 beqs 49c4c <_Scheduler_CBS_Release_job+0x58><== NEVER TAKEN new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 49c14: d0a9 0004 addl %a1@(4),%d0 49c18: 0880 001f bclr #31,%d0 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; 49c1c: 2169 0008 0072 movel %a1@(8),%a0@(114) the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49c22: 4878 0001 pea 1 49c26: 2f00 movel %d0,%sp@- /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 49c28: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 49c2c: 2f08 movel %a0,%sp@- 49c2e: 4eb9 0004 a0c0 jsr 4a0c0 <_Thread_Change_priority> 49c34: 4fef 000c lea %sp@(12),%sp } 49c38: 4e5e unlk %fp 49c3a: 4e75 rts new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 49c3c: 2028 00a8 movel %a0@(168),%d0 } /* Budget replenishment for the next job. */ if (serv_info) 49c40: 4a89 tstl %a1 49c42: 67de beqs 49c22 <_Scheduler_CBS_Release_job+0x2e><== NEVER TAKEN the_thread->cpu_time_budget = serv_info->parameters.budget; 49c44: 2169 0008 0072 movel %a1@(8),%a0@(114) 49c4a: 60d6 bras 49c22 <_Scheduler_CBS_Release_job+0x2e> /* 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) 49c4c: d0ae 000c addl %fp@(12),%d0 /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49c50: 4878 0001 pea 1 /* 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) 49c54: 0880 001f bclr #31,%d0 /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49c58: 2f00 movel %d0,%sp@- /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; 49c5a: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 49c5e: 2f08 movel %a0,%sp@- 49c60: 4eb9 0004 a0c0 jsr 4a0c0 <_Thread_Change_priority> 49c66: 4fef 000c lea %sp@(12),%sp } 49c6a: 4e5e unlk %fp ... =============================================================================== 00049c70 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 49c70: 4e56 0000 linkw %fp,#0 49c74: 2f0a movel %a2,%sp@- 49c76: 246e 0008 moveal %fp@(8),%a2 49c7a: 2f02 movel %d2,%sp@- Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 49c7c: 2f0a movel %a2,%sp@- 49c7e: 4eb9 0004 9d94 jsr 49d94 <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 49c84: 206a 0086 moveal %a2@(134),%a0 * 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) { 49c88: 588f addql #4,%sp _Scheduler_EDF_Enqueue(the_thread); /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; 49c8a: 2068 0018 moveal %a0@(24),%a0 * 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) { 49c8e: 4a88 tstl %a0 49c90: 6700 0094 beqw 49d26 <_Scheduler_CBS_Unblock+0xb6> 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 - 49c94: 222a 0018 movel %a2@(24),%d1 49c98: 2401 movel %d1,%d2 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 49c9a: 43e8 0004 lea %a0@(4),%a1 */ 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 - 49c9e: 2039 0006 13a2 movel 613a2 <_Watchdog_Ticks_since_boot>,%d0 49ca4: 9480 subl %d0,%d2 49ca6: 2002 movel %d2,%d0 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 49ca8: 4c11 0800 mulsl %a1@,%d0 49cac: 43ea 0072 lea %a2@(114),%a1 49cb0: 2428 0008 movel %a0@(8),%d2 49cb4: 4c11 2800 mulsl %a1@,%d2 49cb8: b480 cmpl %d0,%d2 49cba: 6c6a bges 49d26 <_Scheduler_CBS_Unblock+0xb6> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 49cbc: 206a 00a8 moveal %a2@(168),%a0 if ( the_thread->real_priority != new_priority ) 49cc0: b1c1 cmpal %d1,%a0 49cc2: 6704 beqs 49cc8 <_Scheduler_CBS_Unblock+0x58> the_thread->real_priority = new_priority; 49cc4: 2548 0018 movel %a0,%a2@(24) if ( the_thread->current_priority != new_priority ) 49cc8: 202a 0014 movel %a2@(20),%d0 49ccc: b1c0 cmpal %d0,%a0 49cce: 6716 beqs 49ce6 <_Scheduler_CBS_Unblock+0x76> _Thread_Change_priority(the_thread, new_priority, true); 49cd0: 4878 0001 pea 1 49cd4: 2f08 movel %a0,%sp@- 49cd6: 2f0a movel %a2,%sp@- 49cd8: 4eb9 0004 a0c0 jsr 4a0c0 <_Thread_Change_priority> 49cde: 202a 0014 movel %a2@(20),%d0 49ce2: 4fef 000c lea %sp@(12),%sp * 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, 49ce6: 2079 0006 143a moveal 6143a <_Per_CPU_Information+0x12>,%a0 49cec: 2f28 0014 movel %a0@(20),%sp@- 49cf0: 2079 0005 faa0 moveal 5faa0 <_Scheduler+0x30>,%a0 49cf6: 2f00 movel %d0,%sp@- 49cf8: 4e90 jsr %a0@ 49cfa: 508f addql #8,%sp 49cfc: 4a80 tstl %d0 49cfe: 6f1a bles 49d1a <_Scheduler_CBS_Unblock+0xaa> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49d00: 2079 0006 1436 moveal 61436 <_Per_CPU_Information+0xe>,%a0 * 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; 49d06: 23ca 0006 143a movel %a2,6143a <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 49d0c: 4a28 0070 tstb %a0@(112) 49d10: 671a beqs 49d2c <_Scheduler_CBS_Unblock+0xbc> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49d12: 7001 moveq #1,%d0 49d14: 13c0 0006 1434 moveb %d0,61434 <_Per_CPU_Information+0xc> } } 49d1a: 242e fff8 movel %fp@(-8),%d2 49d1e: 246e fffc moveal %fp@(-4),%a2 49d22: 4e5e unlk %fp 49d24: 4e75 rts 49d26: 202a 0014 movel %a2@(20),%d0 49d2a: 60ba bras 49ce6 <_Scheduler_CBS_Unblock+0x76> * 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 || 49d2c: 4aaa 0014 tstl %a2@(20) 49d30: 66e8 bnes 49d1a <_Scheduler_CBS_Unblock+0xaa> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49d32: 7001 moveq #1,%d0 <== NOT EXECUTED 49d34: 13c0 0006 1434 moveb %d0,61434 <_Per_CPU_Information+0xc> <== NOT EXECUTED 49d3a: 60de bras 49d1a <_Scheduler_CBS_Unblock+0xaa> <== NOT EXECUTED =============================================================================== 00049bc0 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 49bc0: 4e56 0000 linkw %fp,#0 49bc4: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 49bc6: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 49bca: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 49bce: 4eb9 0004 b55c jsr 4b55c <_Workspace_Allocate> if ( sched ) { 49bd4: 588f addql #4,%sp 49bd6: 4a80 tstl %d0 49bd8: 670e beqs 49be8 <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 49bda: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49bde: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49be0: 7202 moveq #2,%d1 sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); if ( sched ) { the_thread->scheduler_info = sched; schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 49be2: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 49be4: 2141 0014 movel %d1,%a0@(20) } return sched; } 49be8: 246e fffc moveal %fp@(-4),%a2 49bec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d3c <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 49d3c: 4e56 0000 linkw %fp,#0 49d40: 2f02 movel %d2,%sp@- 49d42: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 49d46: 2f02 movel %d2,%sp@- 49d48: 4eb9 0004 9dc4 jsr 49dc4 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49d4e: 588f addql #4,%sp 49d50: b4b9 0006 143a cmpl 6143a <_Per_CPU_Information+0x12>,%d2 49d56: 6720 beqs 49d78 <_Scheduler_EDF_Block+0x3c> _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49d58: b4b9 0006 1436 cmpl 61436 <_Per_CPU_Information+0xe>,%d2 49d5e: 6708 beqs 49d68 <_Scheduler_EDF_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49d60: 242e fffc movel %fp@(-4),%d2 49d64: 4e5e unlk %fp 49d66: 4e75 rts 49d68: 242e fffc movel %fp@(-4),%d2 49d6c: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49d6e: 7001 moveq #1,%d0 49d70: 13c0 0006 1434 moveb %d0,61434 <_Per_CPU_Information+0xc> } 49d76: 4e75 rts _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); 49d78: 4eb9 0004 9ea4 jsr 49ea4 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49d7e: b4b9 0006 1436 cmpl 61436 <_Per_CPU_Information+0xe>,%d2 49d84: 66da bnes 49d60 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN 49d86: 60e0 bras 49d68 <_Scheduler_EDF_Block+0x2c> =============================================================================== 00049df0 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 49df0: 4e56 0000 linkw %fp,#0 49df4: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 49df8: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 49dfe: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 49e00: 4ef9 0004 b604 jmp 4b604 <_Workspace_Free> ... =============================================================================== 00049dc4 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 49dc4: 4e56 0000 linkw %fp,#0 49dc8: 2f0a movel %a2,%sp@- 49dca: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 49dce: 2f0a movel %a2,%sp@- 49dd0: 4eb9 0004 9c48 jsr 49c48 <_Scheduler_EDF_Enqueue> 49dd6: 2f2a 0014 movel %a2@(20),%sp@- * 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( 49dda: 2079 0006 13ba moveal 613ba <_Per_CPU_Information+0x12>,%a0 49de0: 2f28 0014 movel %a0@(20),%sp@- 49de4: 2079 0005 fa20 moveal 5fa20 <_Scheduler+0x30>,%a0 49dea: 4e90 jsr %a0@ 49dec: 4fef 000c lea %sp@(12),%sp 49df0: 4a80 tstl %d0 49df2: 6d08 blts 49dfc <_Scheduler_EDF_Unblock+0x38> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } 49df4: 246e fffc moveal %fp@(-4),%a2 49df8: 4e5e unlk %fp 49dfa: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49dfc: 2079 0006 13b6 moveal 613b6 <_Per_CPU_Information+0xe>,%a0 * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; 49e02: 23ca 0006 13ba movel %a2,613ba <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 49e08: 4a28 0070 tstb %a0@(112) 49e0c: 6710 beqs 49e1e <_Scheduler_EDF_Unblock+0x5a> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49e0e: 7001 moveq #1,%d0 49e10: 13c0 0006 13b4 moveb %d0,613b4 <_Per_CPU_Information+0xc> } } 49e16: 246e fffc moveal %fp@(-4),%a2 49e1a: 4e5e unlk %fp 49e1c: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 49e1e: 4aaa 0014 tstl %a2@(20) 49e22: 66d0 bnes 49df4 <_Scheduler_EDF_Unblock+0x30> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49e24: 7001 moveq #1,%d0 <== NOT EXECUTED 49e26: 13c0 0006 13b4 moveb %d0,613b4 <_Per_CPU_Information+0xc> <== NOT EXECUTED 49e2c: 60e8 bras 49e16 <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED ... =============================================================================== 00049204 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 49204: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 49208: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 4920a: 2279 0005 e224 moveal 5e224 <_Scheduler+0x4>,%a1 49210: 4ed1 jmp %a1@ ... =============================================================================== 00049230 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 49230: 4e56 0000 linkw %fp,#0 49234: 206e 0008 moveal %fp@(8),%a0 49238: 2f0b movel %a3,%sp@- 4923a: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 4923c: 2468 0086 moveal %a0@(134),%a2 ready = sched_info->ready_chain; 49240: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 49242: 2029 0008 movel %a1@(8),%d0 49246: b091 cmpl %a1@,%d0 49248: 6700 0088 beqw 492d2 <_Scheduler_priority_Block+0xa2> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4924c: 2450 moveal %a0@,%a2 previous = the_node->previous; 4924e: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 49252: 2549 0004 movel %a1,%a2@(4) previous->next = next; 49256: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49258: b1f9 0005 fb82 cmpal 5fb82 <_Per_CPU_Information+0x12>,%a0 4925e: 6720 beqs 49280 <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 49260: b1f9 0005 fb7e cmpal 5fb7e <_Per_CPU_Information+0xe>,%a0 49266: 6708 beqs 49270 <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 49268: 245f moveal %sp@+,%a2 4926a: 265f moveal %sp@+,%a3 4926c: 4e5e unlk %fp 4926e: 4e75 rts 49270: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49272: 7001 moveq #1,%d0 } 49274: 265f moveal %sp@+,%a3 49276: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49278: 13c0 0005 fb7c moveb %d0,5fb7c <_Per_CPU_Information+0xc> } 4927e: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 49280: 3039 0005 fb94 movew 5fb94 <_Priority_Major_bit_map>,%d0 49286: 4840 swap %d0 49288: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4928a: 43f9 0005 fb98 lea 5fb98 <_Priority_Bit_map>,%a1 49290: 0280 0000 ffff andil #65535,%d0 49296: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 4929a: 4841 swap %d1 4929c: 04c1 ff1 %d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4929e: 2279 0005 e220 moveal 5e220 <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 492a4: 0281 0000 ffff andil #65535,%d1 492aa: e988 lsll #4,%d0 492ac: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 492ae: 2200 movel %d0,%d1 492b0: e988 lsll #4,%d0 492b2: e589 lsll #2,%d1 492b4: 9081 subl %d1,%d0 492b6: d3c0 addal %d0,%a1 492b8: 2019 movel %a1@+,%d0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 492ba: b3c0 cmpal %d0,%a1 492bc: 56c1 sne %d1 492be: 49c1 extbl %d1 * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 492c0: c081 andl %d1,%d0 492c2: 23c0 0005 fb82 movel %d0,5fb82 <_Per_CPU_Information+0x12> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 492c8: b1f9 0005 fb7e cmpal 5fb7e <_Per_CPU_Information+0xe>,%a0 492ce: 6698 bnes 49268 <_Scheduler_priority_Block+0x38> 492d0: 609e bras 49270 <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 492d2: 266a 0004 moveal %a2@(4),%a3 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 ); 492d6: 2209 movel %a1,%d1 492d8: 5881 addql #4,%d1 492da: 2281 movel %d1,%a1@ 492dc: 3013 movew %a3@,%d0 492de: 322a 000e movew %a2@(14),%d1 head->next = tail; head->previous = NULL; 492e2: 42a9 0004 clrl %a1@(4) 492e6: c081 andl %d1,%d0 tail->previous = head; 492e8: 2349 0008 movel %a1,%a1@(8) 492ec: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 492ee: 6600 ff68 bnew 49258 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 492f2: 3239 0005 fb94 movew 5fb94 <_Priority_Major_bit_map>,%d1 492f8: 302a 000c movew %a2@(12),%d0 492fc: c081 andl %d1,%d0 492fe: 33c0 0005 fb94 movew %d0,5fb94 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49304: b1f9 0005 fb82 cmpal 5fb82 <_Per_CPU_Information+0x12>,%a0 4930a: 6600 ff54 bnew 49260 <_Scheduler_priority_Block+0x30> 4930e: 6000 ff70 braw 49280 <_Scheduler_priority_Block+0x50> ... =============================================================================== 00049408 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 49408: 4e56 0000 linkw %fp,#0 4940c: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 49410: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 49416: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 49418: 4ef9 0004 ac10 jmp 4ac10 <_Workspace_Free> ... =============================================================================== 00049c1c <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 49c1c: 4e56 0000 linkw %fp,#0 49c20: 2f02 movel %d2,%sp@- 49c22: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 49c26: 2f02 movel %d2,%sp@- 49c28: 4eb9 0004 9c80 jsr 49c80 <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 49c2e: 588f addql #4,%sp 49c30: b4b9 0006 0aca cmpl 60aca <_Per_CPU_Information+0x12>,%d2 49c36: 6720 beqs 49c58 <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49c38: b4b9 0006 0ac6 cmpl 60ac6 <_Per_CPU_Information+0xe>,%d2 49c3e: 6708 beqs 49c48 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49c40: 242e fffc movel %fp@(-4),%d2 49c44: 4e5e unlk %fp 49c46: 4e75 rts 49c48: 242e fffc movel %fp@(-4),%d2 49c4c: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49c4e: 7001 moveq #1,%d0 49c50: 13c0 0006 0ac4 moveb %d0,60ac4 <_Per_CPU_Information+0xc> } 49c56: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 49c58: 4eb9 0004 9d7c jsr 49d7c <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49c5e: b4b9 0006 0ac6 cmpl 60ac6 <_Per_CPU_Information+0xe>,%d2 49c64: 66da bnes 49c40 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 49c66: 60e0 bras 49c48 <_Scheduler_simple_Block+0x2c> =============================================================================== 00049bfc <_TOD_Set_with_timestamp>: #include void _TOD_Set_with_timestamp( const Timestamp_Control *tod ) { 49bfc: 4e56 ffec linkw %fp,#-20 49c00: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49c04: 246e 0008 moveal %fp@(8),%a2 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 49c08: 47f9 0005 c83c lea 5c83c <__divdi3>,%a3 _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49c0e: 2412 movel %a2@,%d2 49c10: 262a 0004 movel %a2@(4),%d3 static inline uint32_t _Timestamp64_implementation_Get_nanoseconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time % 1000000000L); 49c14: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49c1a: 42a7 clrl %sp@- 49c1c: 2f03 movel %d3,%sp@- 49c1e: 2f02 movel %d2,%sp@- 49c20: 4eb9 0005 cc9c jsr 5cc9c <__moddi3> 49c26: 4fef 0010 lea %sp@(16),%sp 49c2a: 2801 movel %d1,%d4 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 49c2c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49c32: 42a7 clrl %sp@- 49c34: 2f03 movel %d3,%sp@- 49c36: 2f02 movel %d2,%sp@- 49c38: 4e93 jsr %a3@ * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 49c3a: 2039 0006 24a6 movel 624a6 <_Thread_Dispatch_disable_level>,%d0 ++level; 49c40: 5280 addql #1,%d0 49c42: 4fef 0010 lea %sp@(16),%sp 49c46: 2401 movel %d1,%d2 _Thread_Dispatch_disable_level = level; 49c48: 23c0 0006 24a6 movel %d0,624a6 <_Thread_Dispatch_disable_level> 49c4e: 2f3c 3b9a ca00 movel #1000000000,%sp@- 49c54: 42a7 clrl %sp@- 49c56: 2f39 0006 244c movel 6244c <_TOD+0x4>,%sp@- 49c5c: 2f39 0006 2448 movel 62448 <_TOD>,%sp@- 49c62: 4e93 jsr %a3@ 49c64: 4fef 0010 lea %sp@(16),%sp _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds_now = _TOD_Seconds_since_epoch(); if ( seconds_next < seconds_now ) 49c68: b282 cmpl %d2,%d1 49c6a: 6244 bhis 49cb0 <_TOD_Set_with_timestamp+0xb4> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 49c6c: 9481 subl %d1,%d2 49c6e: 2f02 movel %d2,%sp@- 49c70: 42a7 clrl %sp@- 49c72: 4879 0006 2536 pea 62536 <_Watchdog_Seconds_chain> 49c78: 4eb9 0004 c28c jsr 4c28c <_Watchdog_Adjust> 49c7e: 4fef 000c lea %sp@(12),%sp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49c82: 2012 movel %a2@,%d0 49c84: 222a 0004 movel %a2@(4),%d1 _TOD.seconds_trigger = nanoseconds; 49c88: 23c4 0006 2458 movel %d4,62458 <_TOD+0x10> if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49c8e: 23c0 0006 2448 movel %d0,62448 <_TOD> 49c94: 23c1 0006 244c movel %d1,6244c <_TOD+0x4> _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49c9a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49ca0: 7201 moveq #1,%d1 _TOD_Activate(); _Thread_Enable_dispatch(); } 49ca2: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49ca4: 13c1 0006 245c moveb %d1,6245c <_TOD+0x14> _TOD_Activate(); _Thread_Enable_dispatch(); 49caa: 4ef9 0004 b54c jmp 4b54c <_Thread_Enable_dispatch> 49cb0: 9282 subl %d2,%d1 49cb2: 2f01 movel %d1,%sp@- 49cb4: 4878 0001 pea 1 49cb8: 4879 0006 2536 pea 62536 <_Watchdog_Seconds_chain> 49cbe: 4eb9 0004 c28c jsr 4c28c <_Watchdog_Adjust> 49cc4: 4fef 000c lea %sp@(12),%sp if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49cc8: 2012 movel %a2@,%d0 49cca: 222a 0004 movel %a2@(4),%d1 _TOD.seconds_trigger = nanoseconds; 49cce: 23c4 0006 2458 movel %d4,62458 <_TOD+0x10> if ( seconds_next < seconds_now ) _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; 49cd4: 23c0 0006 2448 movel %d0,62448 <_TOD> 49cda: 23c1 0006 244c movel %d1,6244c <_TOD+0x4> _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49ce0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49ce6: 7201 moveq #1,%d1 _TOD_Activate(); _Thread_Enable_dispatch(); } 49ce8: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 49cea: 13c1 0006 245c moveb %d1,6245c <_TOD+0x14> _TOD_Activate(); _Thread_Enable_dispatch(); 49cf0: 4ef9 0004 b54c jmp 4b54c <_Thread_Enable_dispatch> ... =============================================================================== 00048218 <_TOD_Validate>: ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 48218: 43f9 0005 e70e lea 5e70e ,%a1 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 4821e: 4e56 0000 linkw %fp,#0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 48222: 203c 000f 4240 movel #1000000,%d0 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 48228: 206e 0008 moveal %fp@(8),%a0 4822c: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 4822e: 4c51 0000 remul %a1@,%d0,%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 48232: 4a88 tstl %a0 48234: 6758 beqs 4828e <_TOD_Validate+0x76> <== NEVER TAKEN 48236: b0a8 0018 cmpl %a0@(24),%d0 4823a: 6352 blss 4828e <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 4823c: 703b moveq #59,%d0 4823e: b0a8 0014 cmpl %a0@(20),%d0 48242: 654a bcss 4828e <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 48244: b0a8 0010 cmpl %a0@(16),%d0 48248: 6544 bcss 4828e <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 4824a: 7217 moveq #23,%d1 4824c: b2a8 000c cmpl %a0@(12),%d1 48250: 653c bcss 4828e <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 48252: 2028 0004 movel %a0@(4),%d0 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) || 48256: 6736 beqs 4828e <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 48258: 740c moveq #12,%d2 4825a: b480 cmpl %d0,%d2 4825c: 6530 bcss 4828e <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 4825e: 2210 movel %a0@,%d1 (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) || 48260: 0c81 0000 07c3 cmpil #1987,%d1 48266: 6326 blss 4828e <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 48268: 2068 0008 moveal %a0@(8),%a0 (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) || 4826c: 4a88 tstl %a0 4826e: 671e beqs 4828e <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 48270: 143c 0003 moveb #3,%d2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 48274: 43f9 0005 fa98 lea 5fa98 <_TOD_Days_per_month>,%a1 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 4827a: c282 andl %d2,%d1 4827c: 6618 bnes 48296 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4827e: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; if ( the_tod->day > days_in_month ) 48282: b1c0 cmpal %d0,%a0 48284: 53c0 sls %d0 48286: 4480 negl %d0 return false; return true; } 48288: 241f movel %sp@+,%d2 4828a: 4e5e unlk %fp 4828c: 4e75 rts 4828e: 241f movel %sp@+,%d2 48290: 4e5e unlk %fp (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; 48292: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 48294: 4e75 rts 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 ]; 48296: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 if ( the_tod->day > days_in_month ) 4829a: b1c0 cmpal %d0,%a0 4829c: 53c0 sls %d0 4829e: 4480 negl %d0 482a0: 60e6 bras 48288 <_TOD_Validate+0x70> ... =============================================================================== 00049760 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 49760: 4e56 fff0 linkw %fp,#-16 49764: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49768: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 4976c: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 49770: 242e 000c movel %fp@(12),%d2 /* * 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 ); 49774: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 49776: 182e 0013 moveb %fp@(19),%d4 /* * 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 ); 4977a: 4eb9 0004 a58c jsr 4a58c <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 49780: 588f addql #4,%sp 49782: b4aa 0014 cmpl %a2@(20),%d2 49786: 670c beqs 49794 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 49788: 2f02 movel %d2,%sp@- 4978a: 2f0a movel %a2,%sp@- 4978c: 4eb9 0004 a528 jsr 4a528 <_Thread_Set_priority> 49792: 508f addql #8,%sp _ISR_Disable( level ); 49794: 203c 0000 0700 movel #1792,%d0 4979a: 40c2 movew %sr,%d2 4979c: 8082 orl %d2,%d0 4979e: 46c0 movew %d0,%sr /* * 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; 497a0: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 497a4: 7204 moveq #4,%d1 497a6: b280 cmpl %d0,%d1 497a8: 6738 beqs 497e2 <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 497aa: 44c3 movew %d3,%ccr 497ac: 6708 beqs 497b6 <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 497ae: 72fb moveq #-5,%d1 497b0: c280 andl %d0,%d1 497b2: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 497b6: 46c2 movew %d2,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 497b8: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 497be: 660a bnes 497ca <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 497c0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 497c6: 4e5e unlk %fp 497c8: 4e75 rts /* 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 ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 497ca: 2d4a 000c movel %a2,%fp@(12) 497ce: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 497d4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 497da: 4e5e unlk %fp /* 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 ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 497dc: 4ef9 0004 a478 jmp 4a478 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 497e2: 44c3 movew %d3,%ccr 497e4: 6714 beqs 497fa <_Thread_Change_priority+0x9a> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 497e6: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 497ea: 4a04 tstb %d4 497ec: 6748 beqs 49836 <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 497ee: 2f0a movel %a2,%sp@- 497f0: 2079 0005 e248 moveal 5e248 <_Scheduler+0x28>,%a0 497f6: 4e90 jsr %a0@ 497f8: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 497fa: 203c 0000 0700 movel #1792,%d0 49800: 46c2 movew %d2,%sr 49802: 8082 orl %d2,%d0 49804: 46c0 movew %d0,%sr * 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(); 49806: 2079 0005 e228 moveal 5e228 <_Scheduler+0x8>,%a0 4980c: 4e90 jsr %a0@ * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 4980e: 2079 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a0 * 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() && 49814: b1f9 0005 fb82 cmpal 5fb82 <_Per_CPU_Information+0x12>,%a0 4981a: 670e beqs 4982a <_Thread_Change_priority+0xca> 4981c: 4a28 0070 tstb %a0@(112) 49820: 6708 beqs 4982a <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 49822: 7001 moveq #1,%d0 49824: 13c0 0005 fb7c moveb %d0,5fb7c <_Per_CPU_Information+0xc> _ISR_Enable( level ); 4982a: 46c2 movew %d2,%sr } 4982c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49832: 4e5e unlk %fp 49834: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 49836: 2f0a movel %a2,%sp@- 49838: 2079 0005 e244 moveal 5e244 <_Scheduler+0x24>,%a0 4983e: 4e90 jsr %a0@ 49840: 588f addql #4,%sp 49842: 60b6 bras 497fa <_Thread_Change_priority+0x9a> =============================================================================== 000498a0 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 498a0: 4e56 0000 linkw %fp,#0 498a4: 2f0b movel %a3,%sp@- 498a6: 266e 0008 moveal %fp@(8),%a3 498aa: 2f0a movel %a2,%sp@- 498ac: 246e 000c moveal %fp@(12),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 498b0: 202a 0008 movel %a2@(8),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 498b4: 206b 0018 moveal %a3@(24),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 498b8: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 498be: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) return ctx.ok; } static inline void _User_extensions_Thread_delete( Thread_Control *deleted ) { _User_extensions_Iterate( 498c2: 4879 0004 a710 pea 4a710 <_User_extensions_Thread_delete_visitor> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 498c8: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 --level; 498ce: 5380 subql #1,%d0 498d0: 2f0a movel %a2,%sp@- _Thread_Dispatch_disable_level = level; 498d2: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> 498d8: 4eb9 0004 a7b8 jsr 4a7b8 <_User_extensions_Iterate> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 498de: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 ++level; 498e4: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 498e6: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 498ec: 2f0a movel %a2,%sp@- 498ee: 2f0b movel %a3,%sp@- 498f0: 4eb9 0004 8a74 jsr 48a74 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 498f6: 4878 0001 pea 1 498fa: 2f0a movel %a2,%sp@- 498fc: 4eb9 0004 a540 jsr 4a540 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 49902: 2f0a movel %a2,%sp@- 49904: 4eb9 0004 a384 jsr 4a384 <_Thread_queue_Extract_with_proxy> 4990a: 4fef 001c lea %sp@(28),%sp 4990e: 4a00 tstb %d0 49910: 660a bnes 4991c <_Thread_Close+0x7c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 49912: 7002 moveq #2,%d0 49914: b0aa 0050 cmpl %a2@(80),%d0 49918: 6700 0088 beqw 499a2 <_Thread_Close+0x102> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 4991c: 2f0a movel %a2,%sp@- 4991e: 2079 0005 e23c moveal 5e23c <_Scheduler+0x1c>,%a0 49924: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 49926: 588f addql #4,%sp 49928: b5f9 0005 fa72 cmpal 5fa72 <_Thread_Allocated_fp>,%a2 4992e: 6736 beqs 49966 <_Thread_Close+0xc6> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 49930: 2f2a 00b4 movel %a2@(180),%sp@- 49934: 47f9 0004 ac10 lea 4ac10 <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 4993a: 42aa 00f0 clrl %a2@(240) _Workspace_Free( the_thread->Start.fp_context ); 4993e: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 49940: 2f0a movel %a2,%sp@- 49942: 4eb9 0004 a610 jsr 4a610 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 49948: 2f2a 0100 movel %a2@(256),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 4994c: 42aa 00b8 clrl %a2@(184) _Workspace_Free( the_thread->extensions ); 49950: 4e93 jsr %a3@ the_thread->extensions = NULL; } 49952: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 49956: 4fef 000c lea %sp@(12),%sp 4995a: 42aa 0100 clrl %a2@(256) } 4995e: 246e fff8 moveal %fp@(-8),%a2 49962: 4e5e unlk %fp 49964: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 49966: 2f2a 00b4 movel %a2@(180),%sp@- 4996a: 47f9 0004 ac10 lea 4ac10 <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 49970: 42aa 00f0 clrl %a2@(240) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 49974: 42b9 0005 fa72 clrl 5fa72 <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 4997a: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 4997c: 2f0a movel %a2,%sp@- 4997e: 4eb9 0004 a610 jsr 4a610 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 49984: 2f2a 0100 movel %a2@(256),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 49988: 42aa 00b8 clrl %a2@(184) _Workspace_Free( the_thread->extensions ); 4998c: 4e93 jsr %a3@ the_thread->extensions = NULL; } 4998e: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 49992: 4fef 000c lea %sp@(12),%sp 49996: 42aa 0100 clrl %a2@(256) } 4999a: 246e fff8 moveal %fp@(-8),%a2 4999e: 4e5e unlk %fp 499a0: 4e75 rts */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 499a2: 486a 0048 pea %a2@(72) 499a6: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 499ac: 588f addql #4,%sp 499ae: 2079 0005 e23c moveal 5e23c <_Scheduler+0x1c>,%a0 499b4: 2f0a movel %a2,%sp@- 499b6: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 499b8: 588f addql #4,%sp 499ba: b5f9 0005 fa72 cmpal 5fa72 <_Thread_Allocated_fp>,%a2 499c0: 6600 ff6e bnew 49930 <_Thread_Close+0x90> 499c4: 60a0 bras 49966 <_Thread_Close+0xc6> <== NOT EXECUTED ... =============================================================================== 00049a74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 49a74: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49a78: 486e fffc pea %fp@(-4) 49a7c: 2f2e 0008 movel %fp@(8),%sp@- 49a80: 4eb9 0004 9c64 jsr 49c64 <_Thread_Get> switch ( location ) { 49a86: 508f addql #8,%sp 49a88: 4aae fffc tstl %fp@(-4) 49a8c: 661e bnes 49aac <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 49a8e: 2f3c 1000 0018 movel #268435480,%sp@- 49a94: 2f00 movel %d0,%sp@- 49a96: 4eb9 0004 9844 jsr 49844 <_Thread_Clear_state> 49a9c: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 49a9e: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 --level; 49aa4: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 49aa6: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 49aac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ab0 <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { 49ab0: 4e56 ffd0 linkw %fp,#-48 49ab4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 49ab8: 283c 0000 0700 movel #1792,%d4 49abe: 2004 movel %d4,%d0 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 49ac0: 2479 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 49ac6: 40c1 movew %sr,%d1 49ac8: 8081 orl %d1,%d0 49aca: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 49acc: 1039 0005 fb7c moveb 5fb7c <_Per_CPU_Information+0xc>,%d0 49ad2: 6700 012e beqw 49c02 <_Thread_Dispatch+0x152> * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 49ad6: 7001 moveq #1,%d0 heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49ad8: 4207 clrb %d7 * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 49ada: 2679 0005 fb82 moveal 5fb82 <_Per_CPU_Information+0x12>,%a3 49ae0: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49ae6: 13c7 0005 fb7c moveb %d7,5fb7c <_Per_CPU_Information+0xc> _Thread_Executing = heir; 49aec: 23cb 0005 fb7e movel %a3,5fb7e <_Per_CPU_Information+0xe> /* * 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 ) 49af2: b7ca cmpal %a2,%a3 49af4: 6700 010c beqw 49c02 <_Thread_Dispatch+0x152> 49af8: 2a0e movel %fp,%d5 49afa: 5185 subql #8,%d5 49afc: 4bf9 0004 843c lea 4843c <_TOD_Get_with_nanoseconds>,%a5 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); _Context_Restore_fp( &executing->fp_context ); 49b02: 2c3c 0004 adc8 movel #306632,%d6 */ #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 ) 49b08: 7001 moveq #1,%d0 49b0a: b0ab 0076 cmpl %a3@(118),%d0 49b0e: 6700 0126 beqw 49c36 <_Thread_Dispatch+0x186> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 49b12: 46c1 movew %d1,%sr */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); 49b14: 4879 0005 f9b0 pea 5f9b0 <_TOD+0x8> 49b1a: 2f05 movel %d5,%sp@- 49b1c: 4e95 jsr %a5@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49b1e: 2079 0005 fa76 moveal 5fa76 <_Thread_libc_reent>,%a0 49b24: 508f addql #8,%sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 49b26: 202e fff8 movel %fp@(-8),%d0 49b2a: 222e fffc movel %fp@(-4),%d1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 49b2e: 2400 movel %d0,%d2 49b30: 2601 movel %d1,%d3 49b32: 2e39 0005 fb8a movel 5fb8a <_Per_CPU_Information+0x1a>,%d7 49b38: 96b9 0005 fb8e subl 5fb8e <_Per_CPU_Information+0x1e>,%d3 49b3e: 9587 subxl %d7,%d2 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 49b40: d7aa 0082 addl %d3,%a2@(130) 49b44: 2e2a 007e movel %a2@(126),%d7 49b48: df82 addxl %d2,%d7 49b4a: 2547 007e movel %d7,%a2@(126) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 49b4e: 23c0 0005 fb8a movel %d0,5fb8a <_Per_CPU_Information+0x1a> 49b54: 23c1 0005 fb8e movel %d1,5fb8e <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49b5a: 4a88 tstl %a0 49b5c: 6708 beqs 49b66 <_Thread_Dispatch+0xb6> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 49b5e: 2550 00f4 movel %a0@,%a2@(244) *_Thread_libc_reent = heir->libc_reent; 49b62: 20ab 00f4 movel %a3@(244),%a0@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 49b66: 2879 0005 e348 moveal 5e348 <_User_extensions_Switches_list>,%a4 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49b6c: b9fc 0005 e34c cmpal #385868,%a4 49b72: 6716 beqs 49b8a <_Thread_Dispatch+0xda> <== NEVER TAKEN const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); 49b74: 2f0b movel %a3,%sp@- 49b76: 2f0a movel %a2,%sp@- 49b78: 206c 0008 moveal %a4@(8),%a0 49b7c: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 49b7e: 2854 moveal %a4@,%a4 { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49b80: 508f addql #8,%sp 49b82: b9fc 0005 e34c cmpal #385868,%a4 49b88: 66ea bnes 49b74 <_Thread_Dispatch+0xc4> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 49b8a: 486b 00bc pea %a3@(188) 49b8e: 486a 00bc pea %a2@(188) 49b92: 4eb9 0004 ac60 jsr 4ac60 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 49b98: 508f addql #8,%sp 49b9a: 4aaa 00f0 tstl %a2@(240) 49b9e: 672a beqs 49bca <_Thread_Dispatch+0x11a> #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 ); 49ba0: 2079 0005 fa72 moveal 5fa72 <_Thread_Allocated_fp>,%a0 49ba6: b1ca cmpal %a2,%a0 49ba8: 6720 beqs 49bca <_Thread_Dispatch+0x11a> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 49baa: 4a88 tstl %a0 49bac: 670c beqs 49bba <_Thread_Dispatch+0x10a> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 49bae: 4868 00f0 pea %a0@(240) 49bb2: 4eb9 0004 ad90 jsr 4ad90 <_CPU_Context_save_fp> 49bb8: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 49bba: 486a 00f0 pea %a2@(240) 49bbe: 2046 moveal %d6,%a0 49bc0: 4e90 jsr %a0@ _Thread_Allocated_fp = executing; 49bc2: 588f addql #4,%sp 49bc4: 23ca 0005 fa72 movel %a2,5fa72 <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 49bca: 2479 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 49bd0: 2004 movel %d4,%d0 49bd2: 40c1 movew %sr,%d1 49bd4: 8081 orl %d1,%d0 49bd6: 46c0 movew %d0,%sr /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 49bd8: 1039 0005 fb7c moveb 5fb7c <_Per_CPU_Information+0xc>,%d0 49bde: 6722 beqs 49c02 <_Thread_Dispatch+0x152> * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; 49be0: 7001 moveq #1,%d0 heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49be2: 4207 clrb %d7 * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 49be4: 2679 0005 fb82 moveal 5fb82 <_Per_CPU_Information+0x12>,%a3 49bea: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 49bf0: 13c7 0005 fb7c moveb %d7,5fb7c <_Per_CPU_Information+0xc> _Thread_Executing = heir; 49bf6: 23cb 0005 fb7e movel %a3,5fb7e <_Per_CPU_Information+0xe> /* * 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 ) 49bfc: b5cb cmpal %a3,%a2 49bfe: 6600 ff08 bnew 49b08 <_Thread_Dispatch+0x58> 49c02: 42b9 0005 fa06 clrl 5fa06 <_Thread_Dispatch_disable_level> post_switch: #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 0 ); #endif _ISR_Enable( level ); 49c08: 46c1 movew %d1,%sr 49c0a: 2679 0005 fa7a moveal 5fa7a <_API_extensions_Post_switch_list>,%a3 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49c10: b7fc 0005 fa7e cmpal #391806,%a3 49c16: 6714 beqs 49c2c <_Thread_Dispatch+0x17c> const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); 49c18: 2f0a movel %a2,%sp@- 49c1a: 206b 0008 moveal %a3@(8),%a0 49c1e: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 49c20: 2653 moveal %a3@,%a3 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { 49c22: 588f addql #4,%sp 49c24: b7fc 0005 fa7e cmpal #391806,%a3 49c2a: 66ec bnes 49c18 <_Thread_Dispatch+0x168> <== NEVER TAKEN 49c2c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 49c32: 4e5e unlk %fp 49c34: 4e75 rts #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; 49c36: 41f9 0005 f9be lea 5f9be <_Thread_Ticks_per_timeslice>,%a0 49c3c: 2750 0072 movel %a0@,%a3@(114) 49c40: 6000 fed0 braw 49b12 <_Thread_Dispatch+0x62> =============================================================================== 0004df68 <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { 4df68: 4e56 fff4 linkw %fp,#-12 4df6c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4df70: 2479 0005 fb7e moveal 5fb7e <_Per_CPU_Information+0xe>,%a2 /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4df76: 222a 00a4 movel %a2@(164),%d1 _ISR_Set_level(level); 4df7a: 40c0 movew %sr,%d0 4df7c: e189 lsll #8,%d1 4df7e: 0280 0000 f8ff andil #63743,%d0 4df84: 8081 orl %d1,%d0 4df86: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4df88: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4df8a: 1439 0005 f208 moveb 5f208 ,%d2 doneConstructors = true; 4df90: 13c0 0005 f208 moveb %d0,5f208 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4df96: 4aaa 00f0 tstl %a2@(240) 4df9a: 6720 beqs 4dfbc <_Thread_Handler+0x54> #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 ); 4df9c: 2079 0005 fa72 moveal 5fa72 <_Thread_Allocated_fp>,%a0 4dfa2: b1ca cmpal %a2,%a0 4dfa4: 6716 beqs 4dfbc <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4dfa6: 4a88 tstl %a0 4dfa8: 670c beqs 4dfb6 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4dfaa: 4868 00f0 pea %a0@(240) 4dfae: 4eb9 0004 ad90 jsr 4ad90 <_CPU_Context_save_fp> 4dfb4: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4dfb6: 23ca 0005 fa72 movel %a2,5fa72 <_Thread_Allocated_fp> ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( 4dfbc: 4879 0004 a758 pea 4a758 <_User_extensions_Thread_begin_visitor> 4dfc2: 47f9 0004 a7b8 lea 4a7b8 <_User_extensions_Iterate>,%a3 4dfc8: 2f0a movel %a2,%sp@- 4dfca: 4e93 jsr %a3@ _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4dfcc: 4eb9 0004 9c44 jsr 49c44 <_Thread_Enable_dispatch> /* * _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) */ { 4dfd2: 508f addql #8,%sp 4dfd4: 4a02 tstb %d2 4dfd6: 674a beqs 4e022 <_Thread_Handler+0xba> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4dfd8: 4aaa 008e tstl %a2@(142) 4dfdc: 671a beqs 4dff8 <_Thread_Handler+0x90> <== ALWAYS TAKEN } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( 4dfde: 4879 0004 a770 pea 4a770 <_User_extensions_Thread_exitted_visitor><== NOT EXECUTED 4dfe4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4dfe6: 4e93 jsr %a3@ <== NOT EXECUTED * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4dfe8: 4878 0005 pea 5 <== NOT EXECUTED 4dfec: 4878 0001 pea 1 <== NOT EXECUTED 4dff0: 42a7 clrl %sp@- <== NOT EXECUTED 4dff2: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4dff8: 2f2a 0096 movel %a2@(150),%sp@- 4dffc: 206a 008a moveal %a2@(138),%a0 4e000: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4e002: 588f addql #4,%sp 4e004: 2540 0028 movel %d0,%a2@(40) 4e008: 4879 0004 a770 pea 4a770 <_User_extensions_Thread_exitted_visitor> 4e00e: 2f0a movel %a2,%sp@- 4e010: 4e93 jsr %a3@ * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4e012: 4878 0005 pea 5 4e016: 4878 0001 pea 1 4e01a: 42a7 clrl %sp@- 4e01c: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> * _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 (); 4e022: 4eb9 0005 c3a8 jsr 5c3a8 <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e028: 4aaa 008e tstl %a2@(142) 4e02c: 66b0 bnes 4dfde <_Thread_Handler+0x76> <== NEVER TAKEN 4e02e: 60c8 bras 4dff8 <_Thread_Handler+0x90> =============================================================================== 00049f1c <_Thread_Handler_initialization>: #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { 49f1c: 4e56 0000 linkw %fp,#0 uint32_t ticks_per_timeslice = rtems_configuration_get_ticks_per_timeslice(); uint32_t maximum_extensions = rtems_configuration_get_maximum_extensions(); rtems_stack_allocate_init_hook stack_allocate_init_hook = 49f20: 2079 0005 c5f8 moveal 5c5f8 ,%a0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 49f26: 4ab9 0005 c5fc tstl 5c5fc 49f2c: 6772 beqs 49fa0 <_Thread_Handler_initialization+0x84><== NEVER TAKEN 49f2e: 4ab9 0005 c600 tstl 5c600 49f34: 676a beqs 49fa0 <_Thread_Handler_initialization+0x84> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 49f36: 4a88 tstl %a0 49f38: 670a beqs 49f44 <_Thread_Handler_initialization+0x28> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 49f3a: 2f39 0005 c5d8 movel 5c5d8 ,%sp@- 49f40: 4e90 jsr %a0@ 49f42: 588f addql #4,%sp #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49f44: 4878 0008 pea 8 _Thread_Heir = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Maximum_extensions = maximum_extensions; 49f48: 41f9 0005 c5dc lea 5c5dc ,%a0 49f4e: 23d0 0005 fa86 movel %a0@,5fa86 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 49f54: 41f9 0005 c5e8 lea 5c5e8 ,%a0 49f5a: 23d0 0005 f9be movel %a0@,5f9be <_Thread_Ticks_per_timeslice> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 49f60: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49f62: 42a7 clrl %sp@- 49f64: 4878 0108 pea 108 49f68: 4878 0001 pea 1 49f6c: 4878 0001 pea 1 49f70: 4878 0001 pea 1 49f74: 4879 0005 faf2 pea 5faf2 <_Thread_Internal_information> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 49f7a: 13c0 0005 fb7c moveb %d0,5fb7c <_Per_CPU_Information+0xc> _Thread_Executing = NULL; 49f80: 42b9 0005 fb7e clrl 5fb7e <_Per_CPU_Information+0xe> _Thread_Heir = NULL; 49f86: 42b9 0005 fb82 clrl 5fb82 <_Per_CPU_Information+0x12> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 49f8c: 42b9 0005 fa72 clrl 5fa72 <_Thread_Allocated_fp> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49f92: 4eb9 0004 8f44 jsr 48f44 <_Objects_Initialize_information> 49f98: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49f9c: 4e5e unlk %fp 49f9e: 4e75 rts _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 49fa0: 4878 000e pea e 49fa4: 4878 0001 pea 1 49fa8: 42a7 clrl %sp@- 49faa: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> =============================================================================== 0004d614 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d614: 4e56 0000 linkw %fp,#0 4d618: 2f0a movel %a2,%sp@- 4d61a: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4d61e: 256a 009c 0076 movel %a2@(156),%a2@(118) the_thread->budget_callout = the_thread->Start.budget_callout; 4d624: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->Start.pointer_argument = pointer_argument; 4d62a: 256e 000c 0092 movel %fp@(12),%a2@(146) the_thread->Start.numeric_argument = numeric_argument; 4d630: 256e 0010 0096 movel %fp@(16),%a2@(150) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4d636: 156a 009a 0070 moveb %a2@(154),%a2@(112) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4d63c: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4d640: 2f0a movel %a2,%sp@- 4d642: 4eb9 0004 ac18 jsr 4ac18 <_Thread_queue_Extract_with_proxy> 4d648: 588f addql #4,%sp 4d64a: 4a00 tstb %d0 4d64c: 6608 bnes 4d656 <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d64e: 7002 moveq #2,%d0 4d650: b0aa 0050 cmpl %a2@(80),%d0 4d654: 672a beqs 4d680 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d656: 202a 00a8 movel %a2@(168),%d0 4d65a: b0aa 0014 cmpl %a2@(20),%d0 4d65e: 6718 beqs 4d678 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4d660: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d664: 2d4a 0008 movel %a2,%fp@(8) } } 4d668: 246e fffc moveal %fp@(-4),%a2 (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d66c: 2d40 000c movel %d0,%fp@(12) } } 4d670: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d672: 4ef9 0004 ae4c jmp 4ae4c <_Thread_Set_priority> } } 4d678: 246e fffc moveal %fp@(-4),%a2 4d67c: 4e5e unlk %fp 4d67e: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4d680: 486a 0048 pea %a2@(72) 4d684: 4eb9 0004 b2f8 jsr 4b2f8 <_Watchdog_Remove> 4d68a: 588f addql #4,%sp 4d68c: 60c8 bras 4d656 <_Thread_Reset+0x42> ... =============================================================================== 0004adbc <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4adbc: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4adbe: 4e56 0000 linkw %fp,#0 4adc2: 2f0a movel %a2,%sp@- 4adc4: 246e 0008 moveal %fp@(8),%a2 4adc8: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4adcc: 670a beqs 4add8 <_Thread_Restart+0x1c> _Thread_Restart_self(); return true; } return false; 4adce: 4200 clrb %d0 } 4add0: 246e fffc moveal %fp@(-4),%a2 4add4: 4e5e unlk %fp 4add6: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4add8: 2f0a movel %a2,%sp@- 4adda: 4eb9 0004 aeb0 jsr 4aeb0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4ade0: 2f2e 0010 movel %fp@(16),%sp@- 4ade4: 2f2e 000c movel %fp@(12),%sp@- 4ade8: 2f0a movel %a2,%sp@- 4adea: 4eb9 0004 d614 jsr 4d614 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4adf0: 2f0a movel %a2,%sp@- 4adf2: 4eb9 0004 d318 jsr 4d318 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4adf8: 2f0a movel %a2,%sp@- 4adfa: 4eb9 0004 d5e4 jsr 4d5e4 <_Thread_Ready> ); } static inline void _User_extensions_Thread_restart( Thread_Control *restarted ) { _User_extensions_Iterate( 4ae00: 4879 0004 b064 pea 4b064 <_User_extensions_Thread_restart_visitor> 4ae06: 2f0a movel %a2,%sp@- 4ae08: 4eb9 0004 b0dc jsr 4b0dc <_User_extensions_Iterate> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 4ae0e: 4fef 0020 lea %sp@(32),%sp _Thread_Restart_self(); return true; 4ae12: 7001 moveq #1,%d0 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 4ae14: b5f9 0006 06d6 cmpal 606d6 <_Per_CPU_Information+0xe>,%a2 4ae1a: 66b4 bnes 4add0 <_Thread_Restart+0x14> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4ae1c: 4aaa 00f0 tstl %a2@(240) 4ae20: 6712 beqs 4ae34 <_Thread_Restart+0x78> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4ae22: 486a 00f0 pea %a2@(240) 4ae26: 4eb9 0004 b6ec jsr 4b6ec <_CPU_Context_restore_fp> 4ae2c: 2479 0006 06d6 moveal 606d6 <_Per_CPU_Information+0xe>,%a2 4ae32: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4ae34: 486a 00bc pea %a2@(188) 4ae38: 4eb9 0004 b59a jsr 4b59a <_CPU_Context_Restart_self> return true; } return false; } 4ae3e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4ae42: 588f addql #4,%sp <== NOT EXECUTED 4ae44: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4ae46: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } ... =============================================================================== 000496f8 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 496f8: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 496fa: 4e56 0000 linkw %fp,#0 496fe: 202e 0010 movel %fp@(16),%d0 49702: 2f0a movel %a2,%sp@- 49704: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 49708: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4970c: b2aa 0050 cmpl %a2@(80),%d1 49710: 671c beqs 4972e <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 49712: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 49714: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 49718: 246e fffc moveal %fp@(-4),%a2 4971c: 203c 1007 fff8 movel #268959736,%d0 49722: 2d40 000c movel %d0,%fp@(12) 49726: 4e5e unlk %fp 49728: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4972e: 123c 0003 moveb #3,%d1 49732: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 49736: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 49738: 486a 0048 pea %a2@(72) 4973c: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 49742: 588f addql #4,%sp 49744: 203c 1007 fff8 movel #268959736,%d0 4974a: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4974e: 246e fffc moveal %fp@(-4),%a2 49752: 2d40 000c movel %d0,%fp@(12) 49756: 4e5e unlk %fp 49758: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> ... =============================================================================== 0004a02c <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4a02c: 203c 0000 0700 movel #1792,%d0 #include Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4a032: 4e56 ffe8 linkw %fp,#-24 4a036: 226e 0008 moveal %fp@(8),%a1 4a03a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4a03e: 40c3 movew %sr,%d3 4a040: 8083 orl %d3,%d0 4a042: 46c0 movew %d0,%sr for( index=0 ; 4a044: 4281 clrl %d1 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4a046: 2401 movel %d1,%d2 4a048: 2001 movel %d1,%d0 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4a04a: 5281 addql #1,%d1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4a04c: e58a lsll #2,%d2 4a04e: e988 lsll #4,%d0 4a050: 9082 subl %d2,%d0 4a052: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 4a056: 2458 moveal %a0@+,%a2 4a058: b1ca cmpal %a2,%a0 4a05a: 6616 bnes 4a072 <_Thread_queue_Dequeue_priority+0x46> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 4a05c: 7004 moveq #4,%d0 4a05e: b081 cmpl %d1,%d0 4a060: 66e4 bnes 4a046 <_Thread_queue_Dequeue_priority+0x1a> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 4a062: 46c3 movew %d3,%sr return NULL; 4a064: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a066: 200a movel %a2,%d0 4a068: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a06e: 4e5e unlk %fp 4a070: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4a072: 200a movel %a2,%d0 4a074: 0680 0000 003c addil #60,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a07a: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4a07e: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 4a080: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 4a084: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4a088: b088 cmpl %a0,%d0 4a08a: 6700 008a beqw 4a116 <_Thread_queue_Dequeue_priority+0xea> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a08e: 286a 0040 moveal %a2@(64),%a4 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4a092: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4a094: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4a098: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4a09a: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4a09e: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4a0a0: 226a 0040 moveal %a2@(64),%a1 4a0a4: b3ea 0038 cmpal %a2@(56),%a1 4a0a8: 6716 beqs 4a0c0 <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4a0aa: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4a0ae: 43e8 003c lea %a0@(60),%a1 4a0b2: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4a0b4: 43e8 0038 lea %a0@(56),%a1 4a0b8: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4a0bc: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4a0c0: 7002 moveq #2,%d0 4a0c2: b0aa 0050 cmpl %a2@(80),%d0 4a0c6: 671e beqs 4a0e6 <_Thread_queue_Dequeue_priority+0xba> _ISR_Enable( level ); 4a0c8: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4a0ca: 2f3c 1007 fff8 movel #268959736,%sp@- 4a0d0: 2f0a movel %a2,%sp@- 4a0d2: 4eb9 0004 9844 jsr 49844 <_Thread_Clear_state> 4a0d8: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a0da: 200a movel %a2,%d0 4a0dc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a0e2: 4e5e unlk %fp 4a0e4: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4a0e6: 7003 moveq #3,%d0 4a0e8: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4a0ec: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4a0ee: 486a 0048 pea %a2@(72) 4a0f2: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 4a0f8: 2f3c 1007 fff8 movel #268959736,%sp@- 4a0fe: 2f0a movel %a2,%sp@- 4a100: 4eb9 0004 9844 jsr 49844 <_Thread_Clear_state> 4a106: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4a10a: 200a movel %a2,%d0 4a10c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a112: 4e5e unlk %fp 4a114: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4a116: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4a118: 234b 0004 movel %a3,%a1@(4) 4a11c: 60a2 bras 4a0c0 <_Thread_queue_Dequeue_priority+0x94> ... =============================================================================== 0004a1cc <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4a1cc: 4e56 ffe0 linkw %fp,#-32 4a1d0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4a1d4: 266e 000c moveal %fp@(12),%a3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a1d8: 45eb 0038 lea %a3@(56),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 4a1dc: 41eb 003c lea %a3@(60),%a0 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 4a1e0: 222b 0014 movel %a3@(20),%d1 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 4a1e4: 2001 movel %d1,%d0 4a1e6: ec88 lsrl #6,%d0 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4a1e8: 2400 movel %d0,%d2 4a1ea: e988 lsll #4,%d0 4a1ec: e58a lsll #2,%d2 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 4a1ee: 286e 0008 moveal %fp@(8),%a4 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4a1f2: 9082 subl %d2,%d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a1f4: 274a 0040 movel %a2,%a3@(64) block_state = the_thread_queue->state; 4a1f8: 242c 0038 movel %a4@(56),%d2 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 4a1fc: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 Chain_Node *tail = _Chain_Tail( the_chain ); 4a200: 2748 0038 movel %a0,%a3@(56) head->next = tail; head->previous = NULL; 4a204: 42ab 003c clrl %a3@(60) block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4a208: 0801 0005 btst #5,%d1 4a20c: 6656 bnes 4a264 <_Thread_queue_Enqueue_priority+0x98> 4a20e: 2c0a movel %a2,%d6 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4a210: 2a3c 0000 0700 movel #1792,%d5 4a216: 5886 addql #4,%d6 4a218: 2005 movel %d5,%d0 4a21a: 40c3 movew %sr,%d3 4a21c: 8083 orl %d3,%d0 4a21e: 46c0 movew %d0,%sr 4a220: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a222: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a224: bc88 cmpl %a0,%d6 4a226: 6700 0148 beqw 4a370 <_Thread_queue_Enqueue_priority+0x1a4> search_priority = search_thread->current_priority; 4a22a: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 4a22e: b3c1 cmpal %d1,%a1 4a230: 6418 bccs 4a24a <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4a232: 2005 movel %d5,%d0 4a234: 46c3 movew %d3,%sr 4a236: 8083 orl %d3,%d0 4a238: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 4a23a: 2002 movel %d2,%d0 4a23c: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4a240: 6700 0092 beqw 4a2d4 <_Thread_queue_Enqueue_priority+0x108> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4a244: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a246: bc88 cmpl %a0,%d6 4a248: 66e0 bnes 4a22a <_Thread_queue_Enqueue_priority+0x5e> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a24a: 202c 0030 movel %a4@(48),%d0 4a24e: 7401 moveq #1,%d2 4a250: b480 cmpl %d0,%d2 4a252: 6700 00b6 beqw 4a30a <_Thread_queue_Enqueue_priority+0x13e> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 4a256: 206e 0010 moveal %fp@(16),%a0 4a25a: 2084 movel %d4,%a0@ return the_thread_queue->sync_state; } 4a25c: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a260: 4e5e unlk %fp 4a262: 4e75 rts return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4a264: 2a3c 0000 0700 movel #1792,%d5 4a26a: 2005 movel %d5,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a26c: 1c39 0005 e19c moveb 5e19c ,%d6 _ISR_Disable( level ); 4a272: 40c3 movew %sr,%d3 4a274: 8083 orl %d3,%d0 4a276: 46c0 movew %d0,%sr 4a278: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a27a: 206a 0008 moveal %a2@(8),%a0 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a27e: b5c8 cmpal %a0,%a2 4a280: 6700 00d4 beqw 4a356 <_Thread_queue_Enqueue_priority+0x18a> search_priority = search_thread->current_priority; 4a284: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 4a288: b3c1 cmpal %d1,%a1 4a28a: 6318 blss 4a2a4 <_Thread_queue_Enqueue_priority+0xd8> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4a28c: 2005 movel %d5,%d0 4a28e: 46c3 movew %d3,%sr 4a290: 8083 orl %d3,%d0 4a292: 46c0 movew %d0,%sr 4a294: 2002 movel %d2,%d0 4a296: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4a29a: 6750 beqs 4a2ec <_Thread_queue_Enqueue_priority+0x120> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4a29c: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a2a0: b5c8 cmpal %a0,%a2 4a2a2: 66e0 bnes 4a284 <_Thread_queue_Enqueue_priority+0xb8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a2a4: 202c 0030 movel %a4@(48),%d0 4a2a8: 7401 moveq #1,%d2 4a2aa: b480 cmpl %d0,%d2 4a2ac: 66a8 bnes 4a256 <_Thread_queue_Enqueue_priority+0x8a><== NEVER TAKEN THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a2ae: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4a2b2: b3c1 cmpal %d1,%a1 4a2b4: 677c beqs 4a332 <_Thread_queue_Enqueue_priority+0x166> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4a2b6: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4a2b8: 2748 0004 movel %a0,%a3@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4a2bc: 2689 movel %a1,%a3@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 4a2be: 234b 0004 movel %a3,%a1@(4) next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 4a2c2: 208b movel %a3,%a0@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4a2c4: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a2c8: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a2ca: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a2cc: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a2d0: 4e5e unlk %fp 4a2d2: 4e75 rts if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4a2d4: 46c3 movew %d3,%sr if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4a2d6: 2005 movel %d5,%d0 4a2d8: 40c3 movew %sr,%d3 4a2da: 8083 orl %d3,%d0 4a2dc: 46c0 movew %d0,%sr 4a2de: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a2e0: 2052 moveal %a2@,%a0 search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4a2e2: bc88 cmpl %a0,%d6 4a2e4: 6600 ff44 bnew 4a22a <_Thread_queue_Enqueue_priority+0x5e> 4a2e8: 6000 0086 braw 4a370 <_Thread_queue_Enqueue_priority+0x1a4> if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4a2ec: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4a2ee: 2005 movel %d5,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a2f0: 1c39 0005 e19c moveb 5e19c ,%d6 _ISR_Disable( level ); 4a2f6: 40c3 movew %sr,%d3 4a2f8: 8083 orl %d3,%d0 4a2fa: 46c0 movew %d0,%sr 4a2fc: 2803 movel %d3,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4a2fe: 206a 0008 moveal %a2@(8),%a0 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4a302: b5c8 cmpal %a0,%a2 4a304: 6600 ff7e bnew 4a284 <_Thread_queue_Enqueue_priority+0xb8> 4a308: 604c bras 4a356 <_Thread_queue_Enqueue_priority+0x18a> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a30a: 42ac 0030 clrl %a4@(48) if ( priority == search_priority ) 4a30e: b3c1 cmpal %d1,%a1 4a310: 6720 beqs 4a332 <_Thread_queue_Enqueue_priority+0x166> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4a312: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4a316: 2688 movel %a0,%a3@ the_node->previous = previous_node; 4a318: 2749 0004 movel %a1,%a3@(4) previous_node->next = the_node; 4a31c: 228b movel %a3,%a1@ search_node->previous = the_node; 4a31e: 214b 0004 movel %a3,%a0@(4) the_thread->Wait.queue = the_thread_queue; 4a322: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a326: 46c3 movew %d3,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a328: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a32a: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a32e: 4e5e unlk %fp 4a330: 4e75 rts _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4a332: 2268 0040 moveal %a0@(64),%a1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 4a336: 45e8 003c lea %a0@(60),%a2 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 4a33a: 2749 0004 movel %a1,%a3@(4) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 4a33e: 268a movel %a2,%a3@ the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; 4a340: 214b 0040 movel %a3,%a0@(64) previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 4a344: 228b movel %a3,%a1@ search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4a346: 274c 0044 movel %a4,%a3@(68) _ISR_Enable( level ); 4a34a: 46c4 movew %d4,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a34c: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4a34e: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4a352: 4e5e unlk %fp 4a354: 4e75 rts } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a356: 202c 0030 movel %a4@(48),%d0 4a35a: 7401 moveq #1,%d2 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4a35c: 0286 0000 00ff andil #255,%d6 4a362: 2246 moveal %d6,%a1 4a364: 5289 addql #1,%a1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4a366: b480 cmpl %d0,%d2 4a368: 6600 feec bnew 4a256 <_Thread_queue_Enqueue_priority+0x8a> 4a36c: 6000 ff40 braw 4a2ae <_Thread_queue_Enqueue_priority+0xe2> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a370: 202c 0030 movel %a4@(48),%d0 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 4a374: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 4a378: 7401 moveq #1,%d2 4a37a: b480 cmpl %d0,%d2 4a37c: 6600 fed8 bnew 4a256 <_Thread_queue_Enqueue_priority+0x8a> 4a380: 6088 bras 4a30a <_Thread_queue_Enqueue_priority+0x13e> ... =============================================================================== 0004e030 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4e030: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4e036: 4e56 0000 linkw %fp,#0 4e03a: 2f0a movel %a2,%sp@- 4e03c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4e040: 40c1 movew %sr,%d1 4e042: 8081 orl %d1,%d0 4e044: 46c0 movew %d0,%sr 4e046: 202a 0010 movel %a2@(16),%d0 4e04a: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4e050: 6734 beqs 4e086 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e052: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e054: 7002 moveq #2,%d0 previous = the_node->previous; 4e056: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4e05a: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e05e: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4e060: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4e064: b0aa 0050 cmpl %a2@(80),%d0 4e068: 6726 beqs 4e090 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4e06a: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4e06c: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e070: 246e fffc moveal %fp@(-4),%a2 4e074: 203c 1007 fff8 movel #268959736,%d0 4e07a: 2d40 000c movel %d0,%fp@(12) 4e07e: 4e5e unlk %fp 4e080: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4e086: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e088: 246e fffc moveal %fp@(-4),%a2 4e08c: 4e5e unlk %fp 4e08e: 4e75 rts 4e090: 7003 moveq #3,%d0 4e092: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4e096: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4e098: 486a 0048 pea %a2@(72) 4e09c: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 4e0a2: 588f addql #4,%sp 4e0a4: 203c 1007 fff8 movel #268959736,%d0 4e0aa: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4e0ae: 246e fffc moveal %fp@(-4),%a2 4e0b2: 2d40 000c movel %d0,%fp@(12) 4e0b6: 4e5e unlk %fp 4e0b8: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> ... =============================================================================== 0004cb94 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4cb94: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4cb9a: 4e56 ffec linkw %fp,#-20 4cb9e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4cba2: 246e 000c moveal %fp@(12),%a2 4cba6: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4cbaa: 40c1 movew %sr,%d1 4cbac: 8081 orl %d1,%d0 4cbae: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4cbb0: 202a 0010 movel %a2@(16),%d0 4cbb4: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4cbba: 6772 beqs 4cc2e <_Thread_queue_Extract_priority_helper+0x9a> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4cbbc: 200a movel %a2,%d0 4cbbe: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4cbc4: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4cbc6: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4cbca: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4cbce: b088 cmpl %a0,%d0 4cbd0: 6768 beqs 4cc3a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4cbd2: 286a 0040 moveal %a2@(64),%a4 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4cbd6: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4cbd8: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4cbdc: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4cbde: 214b 0004 movel %a3,%a0@(4) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4cbe2: 202a 0040 movel %a2@(64),%d0 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4cbe6: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4cbe8: b0aa 0038 cmpl %a2@(56),%d0 4cbec: 6716 beqs 4cc04 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4cbee: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4cbf2: 43e8 003c lea %a0@(60),%a1 4cbf6: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4cbf8: 43e8 0038 lea %a0@(56),%a1 4cbfc: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4cc00: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4cc04: 4a02 tstb %d2 4cc06: 6626 bnes 4cc2e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cc08: 7002 moveq #2,%d0 4cc0a: b0aa 0050 cmpl %a2@(80),%d0 4cc0e: 6736 beqs 4cc46 <_Thread_queue_Extract_priority_helper+0xb2> _ISR_Enable( level ); 4cc10: 46c1 movew %d1,%sr 4cc12: 2d4a 0008 movel %a2,%fp@(8) 4cc16: 227c 1007 fff8 moveal #268959736,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cc1c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cc22: 2d49 000c movel %a1,%fp@(12) 4cc26: 4e5e unlk %fp 4cc28: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4cc2e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cc30: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cc36: 4e5e unlk %fp 4cc38: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4cc3a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4cc3c: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4cc40: 4a02 tstb %d2 4cc42: 67c4 beqs 4cc08 <_Thread_queue_Extract_priority_helper+0x74> 4cc44: 60e8 bras 4cc2e <_Thread_queue_Extract_priority_helper+0x9a> 4cc46: 7003 moveq #3,%d0 4cc48: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4cc4c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4cc4e: 486a 0048 pea %a2@(72) 4cc52: 4eb9 0004 a9d4 jsr 4a9d4 <_Watchdog_Remove> 4cc58: 588f addql #4,%sp 4cc5a: 227c 1007 fff8 moveal #268959736,%a1 4cc60: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cc64: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cc6a: 2d49 000c movel %a1,%fp@(12) 4cc6e: 4e5e unlk %fp 4cc70: 4ef9 0004 9844 jmp 49844 <_Thread_Clear_state> ... =============================================================================== 0004a3f0 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a3f0: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4a3f2: 4e56 0000 linkw %fp,#0 4a3f6: 206e 0008 moveal %fp@(8),%a0 4a3fa: 2f02 movel %d2,%sp@- 4a3fc: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; 4a400: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4a406: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 4a40c: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4a410: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a414: b280 cmpl %d0,%d1 4a416: 6714 beqs 4a42c <_Thread_queue_Initialize+0x3c> 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 ); 4a418: 2008 movel %a0,%d0 4a41a: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 4a41c: 42a8 0004 clrl %a0@(4) 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 ); 4a420: 2080 movel %d0,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 4a422: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 4a426: 241f movel %sp@+,%d2 4a428: 4e5e unlk %fp 4a42a: 4e75 rts the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4a42c: 4280 clrl %d0 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a42e: 2400 movel %d0,%d2 4a430: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 4a432: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a434: e58a lsll #2,%d2 4a436: e989 lsll #4,%d1 4a438: 9282 subl %d2,%d1 4a43a: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 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 ); 4a43e: 2209 movel %a1,%d1 4a440: 5881 addql #4,%d1 4a442: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 4a444: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 4a446: 42a9 0004 clrl %a1@(4) tail->previous = head; 4a44a: 2349 0008 movel %a1,%a1@(8) 4a44e: b280 cmpl %d0,%d1 4a450: 67d4 beqs 4a426 <_Thread_queue_Initialize+0x36> <== NEVER TAKEN index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a452: 2400 movel %d0,%d2 4a454: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 4a456: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 4a458: e58a lsll #2,%d2 4a45a: e989 lsll #4,%d1 4a45c: 9282 subl %d2,%d1 4a45e: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 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 ); 4a462: 2209 movel %a1,%d1 4a464: 5881 addql #4,%d1 4a466: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 4a468: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 4a46a: 42a9 0004 clrl %a1@(4) tail->previous = head; 4a46e: 2349 0008 movel %a1,%a1@(8) 4a472: b280 cmpl %d0,%d1 4a474: 66b8 bnes 4a42e <_Thread_queue_Initialize+0x3e> 4a476: 60ae bras 4a426 <_Thread_queue_Initialize+0x36> =============================================================================== 0004cc78 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4cc78: 4e56 0000 linkw %fp,#0 4cc7c: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4cc80: 2268 0044 moveal %a0@(68),%a1 * 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. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4cc84: 2029 0030 movel %a1@(48),%d0 4cc88: 6708 beqs 4cc92 <_Thread_queue_Process_timeout+0x1a> 4cc8a: b1f9 0005 fb7e cmpal 5fb7e <_Per_CPU_Information+0xe>,%a0 4cc90: 6716 beqs 4cca8 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4cc92: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4cc98: 2f08 movel %a0,%sp@- 4cc9a: 2f09 movel %a1,%sp@- 4cc9c: 4eb9 0004 cb5c jsr 4cb5c <_Thread_queue_Extract> 4cca2: 508f addql #8,%sp } } 4cca4: 4e5e unlk %fp 4cca6: 4e75 rts * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4cca8: 7203 moveq #3,%d1 4ccaa: b280 cmpl %d0,%d1 4ccac: 67f6 beqs 4cca4 <_Thread_queue_Process_timeout+0x2c> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4ccae: 7002 moveq #2,%d0 } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 4ccb0: 4e5e unlk %fp */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4ccb2: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4ccb8: 2340 0030 movel %d0,%a1@(48) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } ... =============================================================================== 0004a478 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4a478: 4e56 fffc linkw %fp,#-4 4a47c: 2f0a movel %a2,%sp@- 4a47e: 246e 0008 moveal %fp@(8),%a2 4a482: 2f02 movel %d2,%sp@- /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 4a484: 4a8a tstl %a2 4a486: 6708 beqs 4a490 <_Thread_queue_Requeue+0x18> <== NEVER TAKEN /* * 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 ) { 4a488: 7001 moveq #1,%d0 4a48a: b0aa 0034 cmpl %a2@(52),%d0 4a48e: 670c beqs 4a49c <_Thread_queue_Requeue+0x24> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 4a490: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4a494: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4a498: 4e5e unlk %fp <== NOT EXECUTED 4a49a: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 4a49c: 303c 0700 movew #1792,%d0 4a4a0: 40c2 movew %sr,%d2 4a4a2: 8082 orl %d2,%d0 4a4a4: 46c0 movew %d0,%sr 4a4a6: 206e 000c moveal %fp@(12),%a0 4a4aa: 2028 0010 movel %a0@(16),%d0 4a4ae: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4a4b4: 660e bnes 4a4c4 <_Thread_queue_Requeue+0x4c> <== ALWAYS TAKEN _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 ); 4a4b6: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4a4b8: 242e fff4 movel %fp@(-12),%d2 4a4bc: 246e fff8 moveal %fp@(-8),%a2 4a4c0: 4e5e unlk %fp 4a4c2: 4e75 rts 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 ); 4a4c4: 4878 0001 pea 1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4a4c8: 7001 moveq #1,%d0 4a4ca: 2f08 movel %a0,%sp@- 4a4cc: 2540 0030 movel %d0,%a2@(48) 4a4d0: 2f0a movel %a2,%sp@- 4a4d2: 4eb9 0004 cb94 jsr 4cb94 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4a4d8: 486e fffc pea %fp@(-4) 4a4dc: 2f2e 000c movel %fp@(12),%sp@- 4a4e0: 2f0a movel %a2,%sp@- 4a4e2: 4eb9 0004 a1cc jsr 4a1cc <_Thread_queue_Enqueue_priority> 4a4e8: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4a4ec: 46c2 movew %d2,%sr 4a4ee: 60c8 bras 4a4b8 <_Thread_queue_Requeue+0x40> =============================================================================== 0004a4f0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 4a4f0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 4a4f4: 486e fffc pea %fp@(-4) 4a4f8: 2f2e 0008 movel %fp@(8),%sp@- 4a4fc: 4eb9 0004 9c64 jsr 49c64 <_Thread_Get> switch ( location ) { 4a502: 508f addql #8,%sp 4a504: 4aae fffc tstl %fp@(-4) 4a508: 6618 bnes 4a522 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4a50a: 2f00 movel %d0,%sp@- 4a50c: 4eb9 0004 cc78 jsr 4cc78 <_Thread_queue_Process_timeout> RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; --level; _Thread_Dispatch_disable_level = level; 4a512: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 4a514: 2039 0005 fa06 movel 5fa06 <_Thread_Dispatch_disable_level>,%d0 --level; 4a51a: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 4a51c: 23c0 0005 fa06 movel %d0,5fa06 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 4a522: 4e5e unlk %fp ... =============================================================================== 00057cc4 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 57cc4: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 57cc8: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57ccc: 200e movel %fp,%d0 57cce: 5180 subql #8,%d0 57cd0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57cd4: 246e 0008 moveal %fp@(8),%a2 57cd8: 2a0e movel %fp,%d5 57cda: 2c0e movel %fp,%d6 57cdc: 0685 ffff fff4 addil #-12,%d5 57ce2: 0686 ffff ffec addil #-20,%d6 57ce8: 260a movel %a2,%d3 57cea: 240a movel %a2,%d2 57cec: 4bf9 0005 bf6c lea 5bf6c <_Watchdog_Adjust_to_chain>,%a5 57cf2: 0683 0000 0030 addil #48,%d3 57cf8: 0682 0000 0068 addil #104,%d2 57cfe: 47f9 0005 878c lea 5878c <_Chain_Get>,%a3 57d04: 49f9 0005 bff8 lea 5bff8 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57d0a: 283c 0000 0700 movel #1792,%d4 head->previous = NULL; tail->previous = head; 57d10: 2d48 fff0 movel %a0,%fp@(-16) 57d14: 41ea 0008 lea %a2@(8),%a0 57d18: 2d48 ffe0 movel %a0,%fp@(-32) 57d1c: 41ea 0040 lea %a2@(64),%a0 57d20: 2d48 ffe4 movel %a0,%fp@(-28) { /* * 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; 57d24: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57d28: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 57d2c: 42ae ffec clrl %fp@(-20) 57d30: 42ae fff8 clrl %fp@(-8) tail->previous = head; 57d34: 2d45 fffc movel %d5,%fp@(-4) 57d38: 2d40 ffd8 movel %d0,%fp@(-40) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 57d3c: 2d46 ffe8 movel %d6,%fp@(-24) 57d40: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57d44: 2039 0007 c3e6 movel 7c3e6 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 57d4a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 57d4e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57d52: 9081 subl %d1,%d0 57d54: 2f05 movel %d5,%sp@- 57d56: 2f00 movel %d0,%sp@- 57d58: 2f03 movel %d3,%sp@- 57d5a: 4e95 jsr %a5@ 57d5c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 57d62: 42a7 clrl %sp@- 57d64: 2f39 0007 c2a8 movel 7c2a8 <_TOD+0x4>,%sp@- 57d6a: 2f39 0007 c2a4 movel 7c2a4 <_TOD>,%sp@- 57d70: 4eb9 0006 c3c0 jsr 6c3c0 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 57d76: 202a 0074 movel %a2@(116),%d0 /* * 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 ) { 57d7a: 4fef 001c lea %sp@(28),%sp 57d7e: b081 cmpl %d1,%d0 57d80: 6500 009a bcsw 57e1c <_Timer_server_Body+0x158> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 57d84: b081 cmpl %d1,%d0 57d86: 6200 00b8 bhiw 57e40 <_Timer_server_Body+0x17c> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57d8a: 2541 0074 movel %d1,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57d8e: 202a 0078 movel %a2@(120),%d0 57d92: 2f00 movel %d0,%sp@- 57d94: 4e93 jsr %a3@ if ( timer == NULL ) { 57d96: 588f addql #4,%sp 57d98: 4a80 tstl %d0 57d9a: 672e beqs 57dca <_Timer_server_Body+0x106> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57d9c: 2040 moveal %d0,%a0 57d9e: 7e01 moveq #1,%d7 57da0: 2228 0038 movel %a0@(56),%d1 57da4: be81 cmpl %d1,%d7 57da6: 6700 00bc beqw 57e64 <_Timer_server_Body+0x1a0> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57daa: 7e03 moveq #3,%d7 57dac: be81 cmpl %d1,%d7 57dae: 66de bnes 57d8e <_Timer_server_Body+0xca> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57db0: 2040 moveal %d0,%a0 57db2: 4868 0010 pea %a0@(16) 57db6: 2f02 movel %d2,%sp@- 57db8: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57dba: 202a 0078 movel %a2@(120),%d0 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57dbe: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57dc0: 2f00 movel %d0,%sp@- 57dc2: 4e93 jsr %a3@ if ( timer == NULL ) { 57dc4: 588f addql #4,%sp 57dc6: 4a80 tstl %d0 57dc8: 66d2 bnes 57d9c <_Timer_server_Body+0xd8> <== NEVER TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57dca: 2004 movel %d4,%d0 57dcc: 40c1 movew %sr,%d1 57dce: 8081 orl %d1,%d0 57dd0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 57dd2: bcae ffe8 cmpl %fp@(-24),%d6 57dd6: 6700 009a beqw 57e72 <_Timer_server_Body+0x1ae> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 57dda: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57ddc: 2039 0007 c3e6 movel 7c3e6 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 57de2: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 57de6: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57dea: 9081 subl %d1,%d0 <== NOT EXECUTED 57dec: 2f05 movel %d5,%sp@- <== NOT EXECUTED 57dee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 57df0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 57df2: 4e95 jsr %a5@ <== NOT EXECUTED 57df4: 2f3c 3b9a ca00 movel #1000000000,%sp@- <== NOT EXECUTED 57dfa: 42a7 clrl %sp@- <== NOT EXECUTED 57dfc: 2f39 0007 c2a8 movel 7c2a8 <_TOD+0x4>,%sp@- <== NOT EXECUTED 57e02: 2f39 0007 c2a4 movel 7c2a4 <_TOD>,%sp@- <== NOT EXECUTED 57e08: 4eb9 0006 c3c0 jsr 6c3c0 <__divdi3> <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 57e0e: 202a 0074 movel %a2@(116),%d0 <== NOT EXECUTED /* * 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 ) { 57e12: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 57e16: b081 cmpl %d1,%d0 <== NOT EXECUTED 57e18: 6400 ff6a bccw 57d84 <_Timer_server_Body+0xc0> <== NOT EXECUTED /* * 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 ); 57e1c: 2f05 movel %d5,%sp@- 57e1e: 2e01 movel %d1,%d7 57e20: 9e80 subl %d0,%d7 57e22: 2f07 movel %d7,%sp@- 57e24: 2d41 ffdc movel %d1,%fp@(-36) 57e28: 2f02 movel %d2,%sp@- 57e2a: 4eb9 0005 bf6c jsr 5bf6c <_Watchdog_Adjust_to_chain> 57e30: 222e ffdc movel %fp@(-36),%d1 57e34: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57e38: 2541 0074 movel %d1,%a2@(116) 57e3c: 6000 ff50 braw 57d8e <_Timer_server_Body+0xca> /* * 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 ); 57e40: 9081 subl %d1,%d0 57e42: 2f00 movel %d0,%sp@- 57e44: 4878 0001 pea 1 57e48: 2d41 ffdc movel %d1,%fp@(-36) 57e4c: 2f02 movel %d2,%sp@- 57e4e: 4eb9 0005 bed8 jsr 5bed8 <_Watchdog_Adjust> 57e54: 222e ffdc movel %fp@(-36),%d1 57e58: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 57e5c: 2541 0074 movel %d1,%a2@(116) 57e60: 6000 ff2c braw 57d8e <_Timer_server_Body+0xca> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 57e64: 4868 0010 pea %a0@(16) 57e68: 2f03 movel %d3,%sp@- 57e6a: 4e94 jsr %a4@ 57e6c: 508f addql #8,%sp 57e6e: 6000 ff1e braw 57d8e <_Timer_server_Body+0xca> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 57e72: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 57e76: 46c1 movew %d1,%sr _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 ) ) { 57e78: 2e2e ffd8 movel %fp@(-40),%d7 57e7c: beae fff4 cmpl %fp@(-12),%d7 57e80: 6758 beqs 57eda <_Timer_server_Body+0x216> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 57e82: 2004 movel %d4,%d0 57e84: 40c1 movew %sr,%d1 57e86: 8081 orl %d1,%d0 57e88: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57e8a: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57e8e: be88 cmpl %a0,%d7 57e90: 673a beqs 57ecc <_Timer_server_Body+0x208> <== NEVER TAKEN 57e92: 2e0a movel %a2,%d7 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 57e94: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 57e96: 45ee fff4 lea %fp@(-12),%a2 57e9a: 234a 0004 movel %a2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 57e9e: 42a8 0008 clrl %a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 57ea2: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 57ea6: 46c1 movew %d1,%sr /* * 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 ); 57ea8: 2f28 0024 movel %a0@(36),%sp@- 57eac: 2f28 0020 movel %a0@(32),%sp@- 57eb0: 2068 001c moveal %a0@(28),%a0 57eb4: 4e90 jsr %a0@ /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 57eb6: 2004 movel %d4,%d0 57eb8: 40c1 movew %sr,%d1 57eba: 8081 orl %d1,%d0 57ebc: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57ebe: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57ec0: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57ec4: b1ee ffd8 cmpal %fp@(-40),%a0 57ec8: 66ca bnes 57e94 <_Timer_server_Body+0x1d0> 57eca: 2447 moveal %d7,%a2 watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 57ecc: 46c1 movew %d1,%sr { /* * 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; 57ece: 41ee ffe8 lea %fp@(-24),%a0 57ed2: 2548 0078 movel %a0,%a2@(120) 57ed6: 6000 fe6c braw 57d44 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 57eda: 4200 clrb %d0 57edc: 1540 007c moveb %d0,%a2@(124) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 57ee0: 2039 0007 c302 movel 7c302 <_Thread_Dispatch_disable_level>,%d0 ++level; 57ee6: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 57ee8: 23c0 0007 c302 movel %d0,7c302 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57eee: 4878 0008 pea 8 57ef2: 2f12 movel %a2@,%sp@- _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 57ef4: 7e01 moveq #1,%d7 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57ef6: 4eb9 0005 bb74 jsr 5bb74 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 57efc: 2f0a movel %a2,%sp@- 57efe: 4eba fb7c jsr %pc@(57a7c <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 57f02: 2f0a movel %a2,%sp@- 57f04: 4eba fbe0 jsr %pc@(57ae6 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 57f08: 4eb9 0005 b1e8 jsr 5b1e8 <_Thread_Enable_dispatch> ts->active = true; 57f0e: 1547 007c moveb %d7,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 57f12: 2f2e ffe0 movel %fp@(-32),%sp@- 57f16: 4eb9 0005 c128 jsr 5c128 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 57f1c: 2f2e ffe4 movel %fp@(-28),%sp@- 57f20: 4eb9 0005 c128 jsr 5c128 <_Watchdog_Remove> 57f26: 4fef 0018 lea %sp@(24),%sp { /* * 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; 57f2a: 41ee ffe8 lea %fp@(-24),%a0 57f2e: 2548 0078 movel %a0,%a2@(120) 57f32: 6000 fe10 braw 57d44 <_Timer_server_Body+0x80> =============================================================================== 00057b54 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 57b54: 4e56 fff0 linkw %fp,#-16 57b58: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57b5c: 246e 0008 moveal %fp@(8),%a2 57b60: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 57b64: 202a 0078 movel %a2@(120),%d0 57b68: 671a beqs 57b84 <_Timer_server_Schedule_operation_method+0x30> * 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 ); 57b6a: 246a 0078 moveal %a2@(120),%a2 57b6e: 2d4b 000c movel %a3,%fp@(12) 57b72: 2d4a 0008 movel %a2,%fp@(8) } } 57b76: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57b7c: 4e5e unlk %fp * 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 ); 57b7e: 4ef9 0005 8754 jmp 58754 <_Chain_Append> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; 57b84: 2039 0007 c302 movel 7c302 <_Thread_Dispatch_disable_level>,%d0 ++level; 57b8a: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 57b8c: 23c0 0007 c302 movel %d0,7c302 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57b92: 202b 0038 movel %a3@(56),%d0 57b96: 7201 moveq #1,%d1 57b98: b280 cmpl %d0,%d1 57b9a: 6700 009e beqw 57c3a <_Timer_server_Schedule_operation_method+0xe6> _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 ) { 57b9e: 7603 moveq #3,%d3 57ba0: b680 cmpl %d0,%d3 57ba2: 670e beqs 57bb2 <_Timer_server_Schedule_operation_method+0x5e> * 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 ); } } 57ba4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57baa: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57bac: 4ef9 0005 b1e8 jmp 5b1e8 <_Thread_Enable_dispatch> } 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 ); 57bb2: 203c 0000 0700 movel #1792,%d0 57bb8: 40c2 movew %sr,%d2 57bba: 8082 orl %d2,%d0 57bbc: 46c0 movew %d0,%sr 57bbe: 2f3c 3b9a ca00 movel #1000000000,%sp@- 57bc4: 42a7 clrl %sp@- 57bc6: 2f39 0007 c2a8 movel 7c2a8 <_TOD+0x4>,%sp@- 57bcc: 2f39 0007 c2a4 movel 7c2a4 <_TOD>,%sp@- 57bd2: 4eb9 0006 c3c0 jsr 6c3c0 <__divdi3> snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 57bd8: 202a 0074 movel %a2@(116),%d0 57bdc: 4fef 0010 lea %sp@(16),%sp RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57be0: 43ea 006c lea %a2@(108),%a1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57be4: 206a 0068 moveal %a2@(104),%a0 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 57be8: b3c8 cmpal %a0,%a1 57bea: 671c beqs 57c08 <_Timer_server_Schedule_operation_method+0xb4> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 57bec: 2268 0010 moveal %a0@(16),%a1 if ( snapshot > last_snapshot ) { 57bf0: b081 cmpl %d1,%d0 57bf2: 6400 00ba bccw 57cae <_Timer_server_Schedule_operation_method+0x15a> /* * We advanced in time. */ delta = snapshot - last_snapshot; 57bf6: 2601 movel %d1,%d3 57bf8: 9680 subl %d0,%d3 if (delta_interval > delta) { 57bfa: b689 cmpl %a1,%d3 57bfc: 6400 00bc bccw 57cba <_Timer_server_Schedule_operation_method+0x166> delta_interval -= delta; 57c00: 93c3 subal %d3,%a1 57c02: 2009 movel %a1,%d0 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57c04: 2140 0010 movel %d0,%a0@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 57c08: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 57c0c: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57c0e: 486b 0010 pea %a3@(16) 57c12: 486a 0068 pea %a2@(104) 57c16: 4eb9 0005 bff8 jsr 5bff8 <_Watchdog_Insert> if ( !ts->active ) { 57c1c: 508f addql #8,%sp 57c1e: 102a 007c moveb %a2@(124),%d0 57c22: 6680 bnes 57ba4 <_Timer_server_Schedule_operation_method+0x50><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 57c24: 2f0a movel %a2,%sp@- 57c26: 4eba febe jsr %pc@(57ae6 <_Timer_server_Reset_tod_system_watchdog>) 57c2a: 588f addql #4,%sp * 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 ); } } 57c2c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57c32: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57c34: 4ef9 0005 b1e8 jmp 5b1e8 <_Thread_Enable_dispatch> 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 ); 57c3a: 203c 0000 0700 movel #1792,%d0 57c40: 40c2 movew %sr,%d2 57c42: 8082 orl %d2,%d0 57c44: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 57c46: 2039 0007 c3e6 movel 7c3e6 <_Watchdog_Ticks_since_boot>,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 57c4c: 220a movel %a2,%d1 57c4e: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 57c54: 262a 003c movel %a2@(60),%d3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57c58: 206a 0030 moveal %a2@(48),%a0 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 57c5c: b288 cmpl %a0,%d1 57c5e: 6712 beqs 57c72 <_Timer_server_Schedule_operation_method+0x11e> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 57c60: 2200 movel %d0,%d1 57c62: 9283 subl %d3,%d1 delta_interval = first_watchdog->delta_interval; 57c64: 2268 0010 moveal %a0@(16),%a1 if (delta_interval > delta) { 57c68: b3c1 cmpal %d1,%a1 57c6a: 633a blss 57ca6 <_Timer_server_Schedule_operation_method+0x152> delta_interval -= delta; 57c6c: 93c1 subal %d1,%a1 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 57c6e: 2149 0010 movel %a1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 57c72: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 57c76: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 57c78: 486b 0010 pea %a3@(16) 57c7c: 486a 0030 pea %a2@(48) 57c80: 4eb9 0005 bff8 jsr 5bff8 <_Watchdog_Insert> if ( !ts->active ) { 57c86: 508f addql #8,%sp 57c88: 102a 007c moveb %a2@(124),%d0 57c8c: 6600 ff16 bnew 57ba4 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 57c90: 2f0a movel %a2,%sp@- 57c92: 4eba fde8 jsr %pc@(57a7c <_Timer_server_Reset_interval_system_watchdog>) 57c96: 588f addql #4,%sp * 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 ); } } 57c98: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 57c9e: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57ca0: 4ef9 0005 b1e8 jmp 5b1e8 <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57ca6: 93c9 subal %a1,%a1 } first_watchdog->delta_interval = delta_interval; 57ca8: 2149 0010 movel %a1,%a0@(16) 57cac: 60c4 bras 57c72 <_Timer_server_Schedule_operation_method+0x11e> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 57cae: d089 addl %a1,%d0 delta_interval += delta; 57cb0: 9081 subl %d1,%d0 } first_watchdog->delta_interval = delta_interval; 57cb2: 2140 0010 movel %d0,%a0@(16) 57cb6: 6000 ff50 braw 57c08 <_Timer_server_Schedule_operation_method+0xb4> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57cba: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57cbc: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED 57cc0: 6000 ff46 braw 57c08 <_Timer_server_Schedule_operation_method+0xb4><== NOT EXECUTED =============================================================================== 0004ac84 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 4ac84: 4e56 0000 linkw %fp,#0 4ac88: 226e 000c moveal %fp@(12),%a1 4ac8c: 2f0a movel %a2,%sp@- 4ac8e: 246e 0008 moveal %fp@(8),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 4ac92: 206a 0004 moveal %a2@(4),%a0 4ac96: d1e9 0004 addal %a1@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4ac9a: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 4ac9c: 2011 movel %a1@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 4ac9e: d192 addl %d0,%a2@ time->tv_nsec += add->tv_nsec; 4aca0: 2548 0004 movel %a0,%a2@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4aca4: b1fc 3b9a c9ff cmpal #999999999,%a0 4acaa: 6320 blss 4accc <_Timespec_Add_to+0x48> 4acac: 2052 moveal %a2@,%a0 4acae: 5288 addql #1,%a0 #include #include #include #include uint32_t _Timespec_Add_to( 4acb0: 91c0 subal %d0,%a0 4acb2: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 4acb6: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 4acbc: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4acbe: 0c81 3b9a c9ff cmpil #999999999,%d1 4acc4: 62ec bhis 4acb2 <_Timespec_Add_to+0x2e> <== NEVER TAKEN 4acc6: 2541 0004 movel %d1,%a2@(4) 4acca: 2489 movel %a1,%a2@ time->tv_sec++; seconds++; } return seconds; } 4accc: 245f moveal %sp@+,%a2 4acce: 4e5e unlk %fp ... =============================================================================== 0004bfe0 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4bfe0: 4e56 fff4 linkw %fp,#-12 Timestamp64_Control answer; if ( *_rhs == 0 ) { 4bfe4: 206e 000c moveal %fp@(12),%a0 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4bfe8: 48d7 040c moveml %d2-%d3/%a2,%sp@ Timestamp64_Control answer; if ( *_rhs == 0 ) { 4bfec: 2410 movel %a0@,%d2 4bfee: 2628 0004 movel %a0@(4),%d3 4bff2: 2002 movel %d2,%d0 4bff4: 8083 orl %d3,%d0 4bff6: 676e beqs 4c066 <_Timestamp64_Divide+0x86> <== NEVER TAKEN * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 4bff8: 206e 0008 moveal %fp@(8),%a0 4bffc: 45f9 0005 c83c lea 5c83c <__divdi3>,%a2 4c002: 2f3c 0001 86a0 movel #100000,%sp@- 4c008: 42a7 clrl %sp@- 4c00a: 2f28 0004 movel %a0@(4),%sp@- 4c00e: 2f10 movel %a0@,%sp@- 4c010: 4eb9 0005 c7d4 jsr 5c7d4 <__muldi3> 4c016: 4fef 000c lea %sp@(12),%sp 4c01a: 2e83 movel %d3,%sp@ 4c01c: 2f02 movel %d2,%sp@- 4c01e: 2f01 movel %d1,%sp@- 4c020: 2f00 movel %d0,%sp@- 4c022: 4e92 jsr %a2@ 4c024: 4fef 0010 lea %sp@(16),%sp 4c028: 2400 movel %d0,%d2 *_ival_percentage = answer / 1000; 4c02a: 4878 03e8 pea 3e8 * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 4c02e: 2601 movel %d1,%d3 *_ival_percentage = answer / 1000; 4c030: 42a7 clrl %sp@- 4c032: 2f01 movel %d1,%sp@- 4c034: 2f02 movel %d2,%sp@- 4c036: 4e92 jsr %a2@ 4c038: 4fef 0010 lea %sp@(16),%sp *_fval_percentage = answer % 1000; 4c03c: 4878 03e8 pea 3e8 * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 4c040: 206e 0010 moveal %fp@(16),%a0 *_fval_percentage = answer % 1000; 4c044: 42a7 clrl %sp@- * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; 4c046: 2081 movel %d1,%a0@ *_fval_percentage = answer % 1000; 4c048: 2f03 movel %d3,%sp@- 4c04a: 2f02 movel %d2,%sp@- 4c04c: 4eb9 0005 cc9c jsr 5cc9c <__moddi3> 4c052: 206e 0014 moveal %fp@(20),%a0 4c056: 4fef 0010 lea %sp@(16),%sp } 4c05a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; 4c060: 2081 movel %d1,%a0@ } 4c062: 4e5e unlk %fp 4c064: 4e75 rts ) { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; 4c066: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4c06a: 4290 clrl %a0@ <== NOT EXECUTED *_fval_percentage = 0; 4c06c: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } 4c070: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; *_fval_percentage = 0; 4c076: 4290 clrl %a0@ <== NOT EXECUTED answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; *_fval_percentage = answer % 1000; } 4c078: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a86c <_User_extensions_Handler_initialization>: void _User_extensions_Handler_initialization(void) { 4a86c: 4e56 fffc linkw %fp,#-4 uint32_t number_of_initial_extensions = 4a870: 2039 0005 c614 movel 5c614 ,%d0 rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { 4a876: 6604 bnes 4a87c <_User_extensions_Handler_initialization+0x10><== ALWAYS TAKEN ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); } } 4a878: 4e5e unlk %fp <== NOT EXECUTED 4a87a: 4e75 rts <== NOT EXECUTED uint32_t number_of_initial_extensions = rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { User_extensions_Switch_control *initial_extension_switch_controls = _Workspace_Allocate_or_fatal_error( 4a87c: 2200 movel %d0,%d1 4a87e: e988 lsll #4,%d0 4a880: e589 lsll #2,%d1 { uint32_t number_of_initial_extensions = rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { User_extensions_Switch_control *initial_extension_switch_controls = 4a882: 9081 subl %d1,%d0 4a884: 2f00 movel %d0,%sp@- 4a886: 4eb9 0004 ac2a jsr 4ac2a <_Workspace_Allocate_or_fatal_error> _Workspace_Allocate_or_fatal_error( number_of_initial_extensions * sizeof( *initial_extension_switch_controls ) ); User_extensions_Switch_context ctx = { initial_extension_switch_controls }; 4a88c: 204e moveal %fp,%a0 4a88e: 2100 movel %d0,%a0@- _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); 4a890: 487a ff9a pea %pc@(4a82c <_User_extensions_Switch_visitor>) 4a894: 2f08 movel %a0,%sp@- 4a896: 4eb9 0004 a7b8 jsr 4a7b8 <_User_extensions_Iterate> 4a89c: 4fef 000c lea %sp@(12),%sp } } 4a8a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a7b8 <_User_extensions_Iterate>: void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a7b8: 4e56 ffec linkw %fp,#-20 Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); 4a7bc: 2039 0005 c614 movel 5c614 ,%d0 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a7c2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); 4a7c6: eb88 lsll #5,%d0 void *arg, User_extensions_Visitor visitor ) { Thread_Control *executing = _Thread_Executing; const User_extensions_Table *callouts_current = 4a7c8: 2439 0005 c618 movel 5c618 ,%d2 rtems_configuration_get_user_extension_table(); const User_extensions_Table *callouts_end = 4a7ce: 2442 moveal %d2,%a2 4a7d0: d5c0 addal %d0,%a2 void _User_extensions_Iterate( void *arg, User_extensions_Visitor visitor ) { 4a7d2: 282e 0008 movel %fp@(8),%d4 4a7d6: 266e 000c moveal %fp@(12),%a3 Thread_Control *executing = _Thread_Executing; 4a7da: 2639 0005 fb7e movel 5fb7e <_Per_CPU_Information+0xe>,%d3 const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { 4a7e0: b5c2 cmpal %d2,%a2 4a7e2: 6716 beqs 4a7fa <_User_extensions_Iterate+0x42> <== NEVER TAKEN (*visitor)( executing, arg, callouts_current ); 4a7e4: 2f02 movel %d2,%sp@- ++callouts_current; 4a7e6: 0682 0000 0020 addil #32,%d2 callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { (*visitor)( executing, arg, callouts_current ); 4a7ec: 2f04 movel %d4,%sp@- 4a7ee: 2f03 movel %d3,%sp@- 4a7f0: 4e93 jsr %a3@ const User_extensions_Table *callouts_end = callouts_current + rtems_configuration_get_number_of_initial_extensions(); const Chain_Node *node; const Chain_Node *tail; while ( callouts_current != callouts_end ) { 4a7f2: 4fef 000c lea %sp@(12),%sp 4a7f6: b48a cmpl %a2,%d2 4a7f8: 66ea bnes 4a7e4 <_User_extensions_Iterate+0x2c> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4a7fa: 2479 0005 e33c moveal 5e33c <_User_extensions_List>,%a2 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { 4a800: b5fc 0005 e340 cmpal #385856,%a2 4a806: 6718 beqs 4a820 <_User_extensions_Iterate+0x68> const User_extensions_Control *extension = (const User_extensions_Control *) node; (*visitor)( executing, arg, &extension->Callouts ); 4a808: 486a 0014 pea %a2@(20) 4a80c: 2f04 movel %d4,%sp@- 4a80e: 2f03 movel %d3,%sp@- 4a810: 4e93 jsr %a3@ node = _Chain_Immutable_next( node ); } } 4a812: 2452 moveal %a2@,%a2 ++callouts_current; } node = _Chain_Immutable_first( &_User_extensions_List ); tail = _Chain_Immutable_tail( &_User_extensions_List ); while ( node != tail ) { 4a814: 4fef 000c lea %sp@(12),%sp 4a818: b5fc 0005 e340 cmpal #385856,%a2 4a81e: 66e8 bnes 4a808 <_User_extensions_Iterate+0x50> (*visitor)( executing, arg, &extension->Callouts ); node = _Chain_Immutable_next( node ); } } 4a820: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a826: 4e5e unlk %fp ... =============================================================================== 0004c28c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4c28c: 4e56 ffe8 linkw %fp,#-24 4c290: 226e 000c moveal %fp@(12),%a1 4c294: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4c298: 263c 0000 0700 movel #1792,%d3 4c29e: 2003 movel %d3,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4c2a0: 266e 0008 moveal %fp@(8),%a3 4c2a4: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4c2a8: 40c1 movew %sr,%d1 4c2aa: 8081 orl %d1,%d0 4c2ac: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4c2ae: 244b moveal %a3,%a2 4c2b0: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4c2b2: b5c8 cmpal %a0,%a2 4c2b4: 6746 beqs 4c2fc <_Watchdog_Adjust+0x70> switch ( direction ) { 4c2b6: 4a89 tstl %a1 4c2b8: 664e bnes 4c308 <_Watchdog_Adjust+0x7c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4c2ba: 4a82 tstl %d2 4c2bc: 673e beqs 4c2fc <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4c2be: 2028 0010 movel %a0@(16),%d0 4c2c2: b082 cmpl %d2,%d0 4c2c4: 6230 bhis 4c2f6 <_Watchdog_Adjust+0x6a> <== NEVER TAKEN 4c2c6: 49f9 0004 c4f0 lea 4c4f0 <_Watchdog_Tickle>,%a4 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4c2cc: 7801 moveq #1,%d4 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4c2ce: 9480 subl %d0,%d2 _Watchdog_First( header )->delta_interval = 1; 4c2d0: 2144 0010 movel %d4,%a0@(16) _ISR_Enable( level ); 4c2d4: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4c2d6: 2f0b movel %a3,%sp@- 4c2d8: 4e94 jsr %a4@ _ISR_Disable( level ); 4c2da: 2003 movel %d3,%d0 4c2dc: 40c1 movew %sr,%d1 4c2de: 8081 orl %d1,%d0 4c2e0: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4c2e2: 588f addql #4,%sp 4c2e4: 2053 moveal %a3@,%a0 4c2e6: b1ca cmpal %a2,%a0 4c2e8: 6712 beqs 4c2fc <_Watchdog_Adjust+0x70> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4c2ea: 4a82 tstl %d2 4c2ec: 670e beqs 4c2fc <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4c2ee: 2028 0010 movel %a0@(16),%d0 4c2f2: b480 cmpl %d0,%d2 4c2f4: 64d6 bccs 4c2cc <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4c2f6: 9082 subl %d2,%d0 4c2f8: 2140 0010 movel %d0,%a0@(16) } break; } } _ISR_Enable( level ); 4c2fc: 46c1 movew %d1,%sr } 4c2fe: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4c304: 4e5e unlk %fp 4c306: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4c308: 7001 moveq #1,%d0 4c30a: b089 cmpl %a1,%d0 4c30c: 66ee bnes 4c2fc <_Watchdog_Adjust+0x70> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4c30e: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4c312: 46c1 movew %d1,%sr } 4c314: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4c31a: 4e5e unlk %fp ... =============================================================================== 0005bf6c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5bf6c: 4e56 ffe4 linkw %fp,#-28 5bf70: 226e 0010 moveal %fp@(16),%a1 5bf74: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); 5bf78: 263c 0000 0700 movel #1792,%d3 5bf7e: 2003 movel %d3,%d0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 5bf80: 242e 0008 movel %fp@(8),%d2 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); 5bf84: 40c1 movew %sr,%d1 5bf86: 8081 orl %d1,%d0 5bf88: 46c0 movew %d0,%sr 5bf8a: 2a42 moveal %d2,%a5 Watchdog_Interval units_arg, Chain_Control *to_fire ) { Watchdog_Interval units = units_arg; 5bf8c: 282e 000c movel %fp@(12),%d4 5bf90: 205d moveal %a5@+,%a0 Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { 5bf92: b1cd cmpal %a5,%a0 5bf94: 6748 beqs 5bfde <_Watchdog_Adjust_to_chain+0x72> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 5bf96: 2028 0010 movel %a0@(16),%d0 5bf9a: b084 cmpl %d4,%d0 5bf9c: 624a bhis 5bfe8 <_Watchdog_Adjust_to_chain+0x7c> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 5bf9e: 9880 subl %d0,%d4 first->delta_interval = 0; 5bfa0: 42a8 0010 clrl %a0@(16) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 5bfa4: 2850 moveal %a0@,%a4 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 5bfa6: 2009 movel %a1,%d0 5bfa8: 5880 addql #4,%d0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 5bfaa: 2668 0004 moveal %a0@(4),%a3 next->previous = previous; 5bfae: 294b 0004 movel %a3,%a4@(4) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 5bfb2: 2469 0008 moveal %a1@(8),%a2 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 5bfb6: 268c movel %a4,%a3@ { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 5bfb8: 2348 0008 movel %a0,%a1@(8) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 5bfbc: 2080 movel %d0,%a0@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; 5bfbe: 214a 0004 movel %a2,%a0@(4) Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; old_last->next = the_node; 5bfc2: 2488 movel %a0,%a2@ while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 5bfc4: 2003 movel %d3,%d0 5bfc6: 46c1 movew %d1,%sr 5bfc8: 8081 orl %d1,%d0 5bfca: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 5bfcc: 2442 moveal %d2,%a2 5bfce: 2052 moveal %a2@,%a0 if ( _Chain_Is_empty( header ) ) 5bfd0: b1cd cmpal %a5,%a0 5bfd2: 67be beqs 5bf92 <_Watchdog_Adjust_to_chain+0x26> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 5bfd4: 4aa8 0010 tstl %a0@(16) 5bfd8: 67ca beqs 5bfa4 <_Watchdog_Adjust_to_chain+0x38> Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { 5bfda: b1cd cmpal %a5,%a0 5bfdc: 66b8 bnes 5bf96 <_Watchdog_Adjust_to_chain+0x2a> <== ALWAYS TAKEN if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5bfde: 46c1 movew %d1,%sr } 5bfe0: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5bfe4: 4e5e unlk %fp 5bfe6: 4e75 rts /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 5bfe8: 9084 subl %d4,%d0 5bfea: 2140 0010 movel %d0,%a0@(16) if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 5bfee: 46c1 movew %d1,%sr } 5bff0: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5bff4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a8a4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4a8a4: 4e56 fff0 linkw %fp,#-16 4a8a8: 226e 000c moveal %fp@(12),%a1 4a8ac: 48d7 041c moveml %d2-%d4/%a2,%sp@ Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 4a8b0: 283c 0000 0700 movel #1792,%d4 4a8b6: 2004 movel %d4,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4a8b8: 2639 0005 fb78 movel 5fb78 <_Per_CPU_Information+0x8>,%d3 _ISR_Disable( level ); 4a8be: 40c2 movew %sr,%d2 4a8c0: 8082 orl %d2,%d0 4a8c2: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 4a8c4: 4aa9 0008 tstl %a1@(8) 4a8c8: 6600 009c bnew 4a966 <_Watchdog_Insert+0xc2> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4a8cc: 2039 0005 fae6 movel 5fae6 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a8d2: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 4a8d4: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4a8d6: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 4a8da: 23c0 0005 fae6 movel %d0,5fae6 <_Watchdog_Sync_count> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a8e0: 246e 0008 moveal %fp@(8),%a2 restart: delta_interval = the_watchdog->initial; 4a8e4: 2029 000c movel %a1@(12),%d0 4a8e8: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a8ea: 6740 beqs 4a92c <_Watchdog_Insert+0x88> 4a8ec: 4a90 tstl %a0@ 4a8ee: 673c beqs 4a92c <_Watchdog_Insert+0x88> break; if ( delta_interval < after->delta_interval ) { 4a8f0: 2228 0010 movel %a0@(16),%d1 4a8f4: b280 cmpl %d0,%d1 4a8f6: 622e bhis 4a926 <_Watchdog_Insert+0x82> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 4a8f8: 9081 subl %d1,%d0 _ISR_Flash( level ); 4a8fa: 2204 movel %d4,%d1 4a8fc: 46c2 movew %d2,%sr 4a8fe: 8282 orl %d2,%d1 4a900: 46c1 movew %d1,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4a902: 7201 moveq #1,%d1 4a904: b2a9 0008 cmpl %a1@(8),%d1 4a908: 6648 bnes 4a952 <_Watchdog_Insert+0xae> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4a90a: 2239 0005 fa8e movel 5fa8e <_Watchdog_Sync_level>,%d1 4a910: b283 cmpl %d3,%d1 4a912: 625c bhis 4a970 <_Watchdog_Insert+0xcc> exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 4a914: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4a916: 4a80 tstl %d0 4a918: 6712 beqs 4a92c <_Watchdog_Insert+0x88> 4a91a: 4a90 tstl %a0@ 4a91c: 670e beqs 4a92c <_Watchdog_Insert+0x88> break; if ( delta_interval < after->delta_interval ) { 4a91e: 2228 0010 movel %a0@(16),%d1 4a922: b081 cmpl %d1,%d0 4a924: 64d2 bccs 4a8f8 <_Watchdog_Insert+0x54> after->delta_interval -= delta_interval; 4a926: 9280 subl %d0,%d1 4a928: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4a92c: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4a930: 7202 moveq #2,%d1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4a932: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4a934: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4a938: 2039 0005 faea movel 5faea <_Watchdog_Ticks_since_boot>,%d0 4a93e: 2341 0008 movel %d1,%a1@(8) 4a942: 2340 0014 movel %d0,%a1@(20) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4a946: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 4a94a: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 4a94c: 2549 0004 movel %a1,%a2@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4a950: 228a movel %a2,%a1@ exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4a952: 23c3 0005 fa8e movel %d3,5fa8e <_Watchdog_Sync_level> _Watchdog_Sync_count--; 4a958: 2039 0005 fae6 movel 5fae6 <_Watchdog_Sync_count>,%d0 4a95e: 5380 subql #1,%d0 4a960: 23c0 0005 fae6 movel %d0,5fae6 <_Watchdog_Sync_count> _ISR_Enable( level ); 4a966: 46c2 movew %d2,%sr } 4a968: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4a96c: 4e5e unlk %fp 4a96e: 4e75 rts if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4a970: 23c3 0005 fa8e movel %d3,5fa8e <_Watchdog_Sync_level> goto restart; 4a976: 6000 ff68 braw 4a8e0 <_Watchdog_Insert+0x3c> ... =============================================================================== 0004a9d4 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a9d4: 203c 0000 0700 movel #1792,%d0 #include Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4a9da: 4e56 0000 linkw %fp,#0 4a9de: 206e 0008 moveal %fp@(8),%a0 4a9e2: 2f0a movel %a2,%sp@- 4a9e4: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a9e6: 40c1 movew %sr,%d1 4a9e8: 8081 orl %d1,%d0 4a9ea: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 4a9ec: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4a9f0: 7401 moveq #1,%d2 4a9f2: b480 cmpl %d0,%d2 4a9f4: 6764 beqs 4aa5a <_Watchdog_Remove+0x86> 4a9f6: 6314 blss 4aa0c <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a9f8: 2439 0005 faea movel 5faea <_Watchdog_Ticks_since_boot>,%d2 4a9fe: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4aa02: 46c1 movew %d1,%sr return( previous_state ); } 4aa04: 241f movel %sp@+,%d2 4aa06: 245f moveal %sp@+,%a2 4aa08: 4e5e unlk %fp 4aa0a: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4aa0c: 143c 0003 moveb #3,%d2 4aa10: b480 cmpl %d0,%d2 4aa12: 65e4 bcss 4a9f8 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 4aa14: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4aa16: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4aa1a: 4a91 tstl %a1@ 4aa1c: 6708 beqs 4aa26 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 4aa1e: 2428 0010 movel %a0@(16),%d2 4aa22: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 4aa26: 2479 0005 fae6 moveal 5fae6 <_Watchdog_Sync_count>,%a2 4aa2c: 4a8a tstl %a2 4aa2e: 670c beqs 4aa3c <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 4aa30: 45f9 0005 fb78 lea 5fb78 <_Per_CPU_Information+0x8>,%a2 4aa36: 23d2 0005 fa8e movel %a2@,5fa8e <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4aa3c: 2468 0004 moveal %a0@(4),%a2 _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4aa40: 2439 0005 faea movel 5faea <_Watchdog_Ticks_since_boot>,%d2 next->previous = previous; 4aa46: 234a 0004 movel %a2,%a1@(4) previous->next = next; 4aa4a: 2489 movel %a1,%a2@ 4aa4c: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4aa50: 46c1 movew %d1,%sr return( previous_state ); } 4aa52: 241f movel %sp@+,%d2 4aa54: 245f moveal %sp@+,%a2 4aa56: 4e5e unlk %fp 4aa58: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4aa5a: 2439 0005 faea movel 5faea <_Watchdog_Ticks_since_boot>,%d2 /* * 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; 4aa60: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4aa64: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 4aa68: 46c1 movew %d1,%sr return( previous_state ); } 4aa6a: 241f movel %sp@+,%d2 4aa6c: 245f moveal %sp@+,%a2 4aa6e: 4e5e unlk %fp ... =============================================================================== 0004bbcc <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4bbcc: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4bbd2: 4e56 ffe8 linkw %fp,#-24 4bbd6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4bbda: 242e 0008 movel %fp@(8),%d2 4bbde: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4bbe2: 40c3 movew %sr,%d3 4bbe4: 8083 orl %d3,%d0 4bbe6: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4bbe8: 2f0b movel %a3,%sp@- 4bbea: 4bf9 0004 4990 lea 44990 ,%a5 4bbf0: 2f02 movel %d2,%sp@- 4bbf2: 4879 0005 f213 pea 5f213 <_Copyright_Notice+0x4b> 4bbf8: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4bbfa: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4bbfc: 4fef 000c lea %sp@(12),%sp 4bc00: b7ca cmpal %a2,%a3 4bc02: 672c beqs 4bc30 <_Watchdog_Report_chain+0x64> 4bc04: 49f9 0004 bc48 lea 4bc48 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4bc0a: 2f0a movel %a2,%sp@- 4bc0c: 42a7 clrl %sp@- 4bc0e: 4e94 jsr %a4@ _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 ) 4bc10: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 4bc12: 508f addql #8,%sp 4bc14: b7ca cmpal %a2,%a3 4bc16: 66f2 bnes 4bc0a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4bc18: 2f02 movel %d2,%sp@- 4bc1a: 4879 0005 f22a pea 5f22a <_Copyright_Notice+0x62> 4bc20: 4e95 jsr %a5@ 4bc22: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4bc24: 46c3 movew %d3,%sr } 4bc26: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4bc2c: 4e5e unlk %fp 4bc2e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4bc30: 4879 0005 f239 pea 5f239 <_Copyright_Notice+0x71> 4bc36: 4e95 jsr %a5@ 4bc38: 588f addql #4,%sp } _ISR_Enable( level ); 4bc3a: 46c3 movew %d3,%sr } 4bc3c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4bc42: 4e5e unlk %fp ... =============================================================================== 0004aa74 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4aa74: 203c 0000 0700 movel #1792,%d0 #include void _Watchdog_Tickle( Chain_Control *header ) { 4aa7a: 4e56 ffe8 linkw %fp,#-24 4aa7e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4aa82: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4aa86: 40c2 movew %sr,%d2 4aa88: 8082 orl %d2,%d0 4aa8a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4aa8c: 264c moveal %a4,%a3 4aa8e: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4aa90: b7ca cmpal %a2,%a3 4aa92: 673c beqs 4aad0 <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 4aa94: 202a 0010 movel %a2@(16),%d0 4aa98: 6708 beqs 4aaa2 <_Watchdog_Tickle+0x2e> <== NEVER TAKEN the_watchdog->delta_interval--; 4aa9a: 5380 subql #1,%d0 4aa9c: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4aaa0: 662e bnes 4aad0 <_Watchdog_Tickle+0x5c> 4aaa2: 4bf9 0004 a9d4 lea 4a9d4 <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4aaa8: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4aaae: 2f0a movel %a2,%sp@- 4aab0: 4e95 jsr %a5@ _ISR_Enable( level ); 4aab2: 46c2 movew %d2,%sr switch( watchdog_state ) { 4aab4: 7202 moveq #2,%d1 4aab6: 588f addql #4,%sp 4aab8: b280 cmpl %d0,%d1 4aaba: 6720 beqs 4aadc <_Watchdog_Tickle+0x68> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4aabc: 2003 movel %d3,%d0 4aabe: 40c2 movew %sr,%d2 4aac0: 8082 orl %d2,%d0 4aac2: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4aac4: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4aac6: b5cb cmpal %a3,%a2 4aac8: 6706 beqs 4aad0 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4aaca: 4aaa 0010 tstl %a2@(16) 4aace: 67de beqs 4aaae <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4aad0: 46c2 movew %d2,%sr } 4aad2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4aad8: 4e5e unlk %fp 4aada: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4aadc: 2f2a 0024 movel %a2@(36),%sp@- 4aae0: 2f2a 0020 movel %a2@(32),%sp@- 4aae4: 206a 001c moveal %a2@(28),%a0 4aae8: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4aaea: 508f addql #8,%sp 4aaec: 60ce bras 4aabc <_Watchdog_Tickle+0x48> ... =============================================================================== 0004ac2a <_Workspace_Allocate_or_fatal_error>: void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4ac2a: 4e56 0000 linkw %fp,#0 4ac2e: 42a7 clrl %sp@- 4ac30: 42a7 clrl %sp@- 4ac32: 2f2e 0008 movel %fp@(8),%sp@- 4ac36: 4879 0005 fa16 pea 5fa16 <_Workspace_Area> 4ac3c: 4eb9 0004 c6b0 jsr 4c6b0 <_Heap_Allocate_aligned_with_boundary> __builtin_return_address( 1 ), memory ); #endif if ( memory == NULL ) 4ac42: 4fef 0010 lea %sp@(16),%sp 4ac46: 4a80 tstl %d0 4ac48: 6704 beqs 4ac4e <_Workspace_Allocate_or_fatal_error+0x24> true, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4ac4a: 4e5e unlk %fp 4ac4c: 4e75 rts memory ); #endif if ( memory == NULL ) _Internal_error_Occurred( 4ac4e: 4878 0003 pea 3 4ac52: 4878 0001 pea 1 4ac56: 42a7 clrl %sp@- 4ac58: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> ... =============================================================================== 0004aaf0 <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 4aaf0: 4e56 ffd8 linkw %fp,#-40 4aaf4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aaf8: 266e 0008 moveal %fp@(8),%a3 4aafc: 2c2e 000c movel %fp@(12),%d6 4ab00: 2a2e 0010 movel %fp@(16),%d5 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 4ab04: 4a39 0005 c606 tstb 5c606 4ab0a: 6600 00d2 bnew 4abde <_Workspace_Handler_initialization+0xee> 4ab0e: 2839 0005 c5d8 movel 5c5d8 ,%d4 4ab14: d8b9 0005 c5d4 addl 5c5d4 ,%d4 bool do_zero = rtems_configuration_get_do_zero_of_workspace(); 4ab1a: 1e39 0005 c604 moveb 5c604 ,%d7 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ab20: 4a86 tstl %d6 4ab22: 6768 beqs 4ab8c <_Workspace_Handler_initialization+0x9c><== NEVER TAKEN /* #define DEBUG_WORKSPACE */ #if defined(DEBUG_WORKSPACE) #include #endif void _Workspace_Handler_initialization( 4ab24: 45eb 0004 lea %a3@(4),%a2 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ab28: 4283 clrl %d3 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; 4ab2a: 49f9 0004 86b0 lea 486b0 <_Heap_Initialize>,%a4 for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); 4ab30: 4bf9 0004 e9d4 lea 4e9d4 ,%a5 size_t i; for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { 4ab36: 4a07 tstb %d7 4ab38: 6660 bnes 4ab9a <_Workspace_Handler_initialization+0xaa><== NEVER TAKEN memset( area->begin, 0, area->size ); } if ( area->size > overhead ) { 4ab3a: 2412 movel %a2@,%d2 4ab3c: 700e moveq #14,%d0 4ab3e: b082 cmpl %d2,%d0 4ab40: 6440 bccs 4ab82 <_Workspace_Handler_initialization+0x92> uintptr_t space_available; uintptr_t size; if ( unified ) { 4ab42: 4a39 0005 c605 tstb 5c605 4ab48: 6618 bnes 4ab62 <_Workspace_Handler_initialization+0x72> size = area->size; } else { if ( remaining > 0 ) { 4ab4a: 4a84 tstl %d4 4ab4c: 675a beqs 4aba8 <_Workspace_Handler_initialization+0xb8><== NEVER TAKEN size = remaining < area->size - overhead ? 4ab4e: 2002 movel %d2,%d0 4ab50: 0680 ffff fff2 addil #-14,%d0 remaining + overhead : area->size; 4ab56: b880 cmpl %d0,%d4 4ab58: 6408 bccs 4ab62 <_Workspace_Handler_initialization+0x72><== NEVER TAKEN 4ab5a: 2404 movel %d4,%d2 4ab5c: 0682 0000 000e addil #14,%d2 } else { size = 0; } } space_available = (*init_or_extend)( 4ab62: 4878 0004 pea 4 4ab66: 2f02 movel %d2,%sp@- 4ab68: 2f13 movel %a3@,%sp@- 4ab6a: 4879 0005 fa16 pea 5fa16 <_Workspace_Area> 4ab70: 4e94 jsr %a4@ ); area->begin = (char *) area->begin + size; area->size -= size; if ( space_available < remaining ) { 4ab72: 4fef 0010 lea %sp@(16),%sp area->begin, size, page_size ); area->begin = (char *) area->begin + size; 4ab76: d593 addl %d2,%a3@ area->size -= size; 4ab78: 9592 subl %d2,%a2@ if ( space_available < remaining ) { 4ab7a: b880 cmpl %d0,%d4 4ab7c: 634e blss 4abcc <_Workspace_Handler_initialization+0xdc><== ALWAYS TAKEN remaining -= space_available; 4ab7e: 9880 subl %d0,%d4 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; 4ab80: 2845 moveal %d5,%a4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4ab82: 5283 addql #1,%d3 4ab84: 508a addql #8,%a2 4ab86: 508b addql #8,%a3 4ab88: bc83 cmpl %d3,%d6 4ab8a: 66aa bnes 4ab36 <_Workspace_Handler_initialization+0x46><== NEVER TAKEN init_or_extend = extend; } } if ( remaining > 0 ) { 4ab8c: 4a84 tstl %d4 4ab8e: 6654 bnes 4abe4 <_Workspace_Handler_initialization+0xf4> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } 4ab90: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 4ab96: 4e5e unlk %fp 4ab98: 4e75 rts for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); 4ab9a: 2f12 movel %a2@,%sp@- 4ab9c: 42a7 clrl %sp@- 4ab9e: 2f13 movel %a3@,%sp@- 4aba0: 4e95 jsr %a5@ 4aba2: 4fef 000c lea %sp@(12),%sp 4aba6: 6092 bras 4ab3a <_Workspace_Handler_initialization+0x4a> } else { size = 0; } } space_available = (*init_or_extend)( 4aba8: 4878 0004 pea 4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4abac: 5283 addql #1,%d3 <== NOT EXECUTED 4abae: 508a addql #8,%a2 <== NOT EXECUTED } else { size = 0; } } space_available = (*init_or_extend)( 4abb0: 42a7 clrl %sp@- <== NOT EXECUTED 4abb2: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4abb4: 508b addql #8,%a3 <== NOT EXECUTED 4abb6: 4879 0005 fa16 pea 5fa16 <_Workspace_Area> <== NOT EXECUTED 4abbc: 4e94 jsr %a4@ <== NOT EXECUTED 4abbe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; 4abc2: 2845 moveal %d5,%a4 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4abc4: bc83 cmpl %d3,%d6 <== NOT EXECUTED 4abc6: 6600 ff6e bnew 4ab36 <_Workspace_Handler_initialization+0x46><== NOT EXECUTED 4abca: 60c0 bras 4ab8c <_Workspace_Handler_initialization+0x9c><== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; 4abcc: 2845 moveal %d5,%a4 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; 4abce: 4284 clrl %d4 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { 4abd0: 5283 addql #1,%d3 4abd2: 508a addql #8,%a2 4abd4: 508b addql #8,%a3 4abd6: bc83 cmpl %d3,%d6 4abd8: 6600 ff5c bnew 4ab36 <_Workspace_Handler_initialization+0x46> 4abdc: 60ae bras 4ab8c <_Workspace_Handler_initialization+0x9c> size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); 4abde: 4284 clrl %d4 4abe0: 6000 ff32 braw 4ab14 <_Workspace_Handler_initialization+0x24> init_or_extend = extend; } } if ( remaining > 0 ) { _Internal_error_Occurred( 4abe4: 4878 0002 pea 2 4abe8: 4878 0001 pea 1 4abec: 42a7 clrl %sp@- 4abee: 4eb9 0004 891c jsr 4891c <_Internal_error_Occurred> =============================================================================== 0004aefc <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { 4aefc: 4e56 0000 linkw %fp,#0 4af00: 2f0b movel %a3,%sp@- 4af02: 266e 000c moveal %fp@(12),%a3 4af06: 2f0a movel %a2,%sp@- char *dup = _Workspace_Allocate(len + 1); 4af08: 486b 0001 pea %a3@(1) 4af0c: 4eb9 0004 ae90 jsr 4ae90 <_Workspace_Allocate> if (dup != NULL) { 4af12: 588f addql #4,%sp char *_Workspace_String_duplicate( const char *string, size_t len ) { char *dup = _Workspace_Allocate(len + 1); 4af14: 2440 moveal %d0,%a2 if (dup != NULL) { 4af16: 4a80 tstl %d0 4af18: 6718 beqs 4af32 <_Workspace_String_duplicate+0x36><== NEVER TAKEN dup [len] = '\0'; 4af1a: 4200 clrb %d0 4af1c: 1580 b800 moveb %d0,%a2@(00000000,%a3:l) memcpy(dup, string, len); 4af20: 2f0b movel %a3,%sp@- 4af22: 2f2e 0008 movel %fp@(8),%sp@- 4af26: 2f0a movel %a2,%sp@- 4af28: 4eb9 0004 ecf4 jsr 4ecf4 4af2e: 4fef 000c lea %sp@(12),%sp } return dup; } 4af32: 200a movel %a2,%d0 4af34: 246e fff8 moveal %fp@(-8),%a2 4af38: 266e fffc moveal %fp@(-4),%a3 4af3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bd9c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5bd9c: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5bd9e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5bda2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005bbfc <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5bbfc: 4e56 0000 linkw %fp,#0 5bc00: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5bc04: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5bc0a: 2d40 0008 movel %d0,%fp@(8) return calloc( elements, size ); } 5bc0e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5bc10: 4ef9 0004 2e28 jmp 42e28 ... =============================================================================== 000529c4 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 529c4: 4e56 ffd8 linkw %fp,#-40 529c8: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 529cc: 246e 0008 moveal %fp@(8),%a2 529d0: 242e 0014 movel %fp@(20),%d2 529d4: 286e 0018 moveal %fp@(24),%a4 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 529d8: 6772 beqs 52a4c <_fat_block_read+0x88> <== NEVER TAKEN 529da: 2c0e movel %fp,%d6 529dc: 4283 clrl %d3 529de: 5986 subql #4,%d6 529e0: 47f9 0005 2908 lea 52908 ,%a3 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 529e6: 4bf9 0005 b188 lea 5b188 ,%a5 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 529ec: 2a2e 0010 movel %fp@(16),%d5 529f0: 282e 000c movel %fp@(12),%d4 { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 529f4: 2f06 movel %d6,%sp@- 529f6: 4878 0001 pea 1 529fa: 2f04 movel %d4,%sp@- c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); count -= c; cmpltd += c; sec_num++; 529fc: 5284 addql #1,%d4 uint8_t *sec_buf; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 529fe: 2f0a movel %a2,%sp@- 52a00: 4e93 jsr %a3@ if (rc != RC_OK) 52a02: 4fef 0010 lea %sp@(16),%sp 52a06: 4a80 tstl %d0 52a08: 6634 bnes 52a3e <_fat_block_read+0x7a> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 52a0a: 4281 clrl %d1 52a0c: 3212 movew %a2@,%d1 52a0e: 9285 subl %d5,%d1 52a10: b481 cmpl %d1,%d2 52a12: 6402 bccs 52a16 <_fat_block_read+0x52> <== ALWAYS TAKEN 52a14: 2202 movel %d2,%d1 <== NOT EXECUTED memcpy((buff + cmpltd), (sec_buf + ofs), c); 52a16: daae fffc addl %fp@(-4),%d5 count -= c; 52a1a: 9481 subl %d1,%d2 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 52a1c: 2f01 movel %d1,%sp@- 52a1e: 2f05 movel %d5,%sp@- 52a20: 4874 3800 pea %a4@(00000000,%d3:l) count -= c; cmpltd += c; 52a24: d681 addl %d1,%d3 sec_num++; ofs = 0; 52a26: 4285 clrl %d5 rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 52a28: 4e95 jsr %a5@ uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 52a2a: 4fef 000c lea %sp@(12),%sp 52a2e: 4a82 tstl %d2 52a30: 66c2 bnes 529f4 <_fat_block_read+0x30> cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52a32: 2003 movel %d3,%d0 52a34: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 52a3a: 4e5e unlk %fp 52a3c: 4e75 rts while (count > 0) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; 52a3e: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52a40: 2003 movel %d3,%d0 <== NOT EXECUTED 52a42: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52a48: 4e5e unlk %fp <== NOT EXECUTED 52a4a: 4e75 rts <== NOT EXECUTED uint32_t count, void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; 52a4c: 4283 clrl %d3 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 52a4e: 2003 movel %d3,%d0 <== NOT EXECUTED 52a50: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 52a56: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bc94 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5bc94: 4e56 0000 linkw %fp,#0 free( ptr ); 5bc98: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5bc9e: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5bca0: 4ef9 0004 30cc jmp 430cc ... =============================================================================== 0005bd44 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5bd44: 4e56 0000 linkw %fp,#0 5bd48: 202e 000c movel %fp@(12),%d0 return fstat( fd, buf ); 5bd4c: 2d6e 0010 000c movel %fp@(16),%fp@(12) int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5bd52: 2d40 0008 movel %d0,%fp@(8) return fstat( fd, buf ); } 5bd56: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 5bd58: 4ef9 0005 bca8 jmp 5bca8 ... =============================================================================== 00043206 <_gettimeofday>: */ int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 43206: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 4320a: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4320c: 4ef9 0004 315c jmp 4315c <== NOT EXECUTED ... =============================================================================== 0005bd74 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5bd74: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5bd78: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5bd7e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5bd80: 4ef9 0005 c314 jmp 5c314 ... =============================================================================== 0005be20 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 5be20: 4e56 0000 linkw %fp,#0 5be24: 202e 000c movel %fp@(12),%d0 5be28: 2d40 0008 movel %d0,%fp@(8) 5be2c: 202e 0010 movel %fp@(16),%d0 5be30: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 5be34: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5be3a: 2d40 000c movel %d0,%fp@(12) 5be3e: 2d41 0010 movel %d1,%fp@(16) } 5be42: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 5be44: 4ef9 0005 bda8 jmp 5bda8 ... =============================================================================== 00042f58 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 42f58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42f5c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 42f60: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 42f66: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 42f6a: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 42f6c: 4ef9 0004 2ef8 jmp 42ef8 <== NOT EXECUTED ... =============================================================================== 0005be4c <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5be4c: 4e56 0000 linkw %fp,#0 return malloc( size ); 5be50: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5be56: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5be58: 4ef9 0004 33cc jmp 433cc ... =============================================================================== 00043f28 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 43f28: 4e56 0000 linkw %fp,#0 43f2c: 202e 0010 movel %fp@(16),%d0 43f30: 222e 000c movel %fp@(12),%d1 return open( buf, oflag, mode ); 43f34: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 43f3a: 2d41 0008 movel %d1,%fp@(8) return open( buf, oflag, mode ); 43f3e: 2d40 000c movel %d0,%fp@(12) } 43f42: 4e5e unlk %fp const char *buf, int oflag, int mode ) { return open( buf, oflag, mode ); 43f44: 4ef9 0004 3d00 jmp 43d00 ... =============================================================================== 0005bf28 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5bf28: 4e56 0000 linkw %fp,#0 5bf2c: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5bf30: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5bf36: 2d40 0008 movel %d0,%fp@(8) return realloc( ptr, size ); } 5bf3a: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5bf3c: 4ef9 0005 bf68 jmp 5bf68 ... =============================================================================== 00043fd0 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 43fd0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43fd4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 43fd8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 43fde: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 43fe2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 43fe4: 4ef9 0004 3f70 jmp 43f70 <== NOT EXECUTED ... =============================================================================== 000469e8 <_times_r>: */ clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 469e8: 4e56 0000 linkw %fp,#0 return _times( ptms ); 469ec: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 469f2: 4e5e unlk %fp clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); 469f4: 4ef9 0004 6924 jmp 46924 <_times> ... =============================================================================== 000480d0 <_unlink_r>: */ int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 480d0: 4e56 0000 linkw %fp,#0 return unlink( path ); 480d4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 480da: 4e5e unlk %fp int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 480dc: 4ef9 0004 8030 jmp 48030 ... =============================================================================== 0005bf44 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5bf44: 4e56 0000 linkw %fp,#0 5bf48: 202e 0010 movel %fp@(16),%d0 5bf4c: 222e 000c movel %fp@(12),%d1 return write( fd, buf, nbytes ); 5bf50: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5bf56: 2d41 0008 movel %d1,%fp@(8) return write( fd, buf, nbytes ); 5bf5a: 2d40 000c movel %d0,%fp@(12) } 5bf5e: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5bf60: 4ef9 0005 c09c jmp 5c09c ... =============================================================================== 00048538 : rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { 48538: 72f8 moveq #-8,%d1 rtems_chain_control *free_chain, rtems_rbtree_control *chunk_tree, rtems_rbheap_chunk *a, rtems_rbheap_chunk *b ) { 4853a: 4e56 fff4 linkw %fp,#-12 4853e: 202e 000c movel %fp@(12),%d0 48542: 48d7 1c00 moveml %a2-%a4,%sp@ 48546: 266e 0008 moveal %fp@(8),%a3 4854a: 226e 0010 moveal %fp@(16),%a1 4854e: 206e 0014 moveal %fp@(20),%a0 if (b != NULL_PAGE && rtems_rbheap_is_chunk_free(b)) { 48552: b288 cmpl %a0,%d1 48554: 6754 beqs 485aa */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 48556: 2450 moveal %a0@,%a2 48558: 4a8a tstl %a2 4855a: 6748 beqs 485a4 if (b->begin < a->begin) { 4855c: 2229 0018 movel %a1@(24),%d1 48560: b2a8 0018 cmpl %a0@(24),%d1 48564: 6308 blss 4856e 48566: 2451 moveal %a1@,%a2 48568: 2209 movel %a1,%d1 4856a: 2248 moveal %a0,%a1 4856c: 2041 moveal %d1,%a0 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4856e: 2868 0004 moveal %a0@(4),%a4 a = b; b = t; } a->size += b->size; 48572: 2228 001c movel %a0@(28),%d1 48576: d3a9 001c addl %d1,%a1@(28) next->previous = previous; previous->next = next; 4857a: 288a movel %a2,%a4@ ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4857c: 2253 moveal %a3@,%a1 Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4857e: 254c 0004 movel %a4,%a2@(4) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 48582: 2688 movel %a0,%a3@ Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48584: 214b 0004 movel %a3,%a0@(4) rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); } } 48588: 4cd7 1c00 moveml %sp@,%a2-%a4 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4858c: 2089 movel %a1,%a0@ before_node->previous = the_node; 4858e: 2348 0004 movel %a0,%a1@(4) } a->size += b->size; rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); 48592: 5088 addql #8,%a0 48594: 2d40 0008 movel %d0,%fp@(8) 48598: 2d48 000c movel %a0,%fp@(12) } } 4859c: 4e5e unlk %fp } a->size += b->size; rtems_chain_extract_unprotected(&b->chain_node); add_to_chain(free_chain, b); _RBTree_Extract_unprotected(chunk_tree, &b->tree_node); 4859e: 4ef9 0004 9f3a jmp 49f3a <_RBTree_Extract_unprotected> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain( const Chain_Node *node ) { return (node->next == NULL) && (node->previous == NULL); 485a4: 4aa8 0004 tstl %a0@(4) 485a8: 66b2 bnes 4855c <== NEVER TAKEN } } 485aa: 4cd7 1c00 moveml %sp@,%a2-%a4 485ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429a8 : #include #include int chroot( const char *path ) { 429a8: 4e56 ffac linkw %fp,#-84 429ac: 2f0a movel %a2,%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( 429ae: 4879 0005 cfa8 pea 5cfa8 eval_flags, &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); 429b4: 45ee ffb0 lea %fp@(-80),%a2 /* * 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( 429b8: 4879 0005 cfac pea 5cfac 429be: 4878 0019 pea 19 429c2: 2f2e 0008 movel %fp@(8),%sp@- 429c6: 486e ffc8 pea %fp@(-56) 429ca: 4eb9 0004 3fd8 jsr 43fd8 429d0: 486e ffe0 pea %fp@(-32) 429d4: 2f0a movel %a2,%sp@- 429d6: 4eb9 0004 4504 jsr 44504 &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 ); 429dc: 2f0a movel %a2,%sp@- 429de: 45f9 0004 4624 lea 44624 ,%a2 429e4: 4eb9 0004 4748 jsr 44748 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 429ea: 4fef 0020 lea %sp@(32),%sp 429ee: 223c 0005 c104 movel #377092,%d1 429f4: 2040 moveal %d0,%a0 &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 ); 429f6: 2d40 ffac movel %d0,%fp@(-84) if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 429fa: b2a8 0010 cmpl %a0@(16),%d1 429fe: 674a beqs 42a4a rtems_filesystem_global_location_t *new_root_loc = 42a00: 486e ffac pea %fp@(-84) 42a04: 4eb9 0004 4698 jsr 44698 42a0a: 2440 moveal %d0,%a2 rtems_filesystem_global_location_obtain( &new_current_loc ); rtems_filesystem_node_types_t type = (*new_root_loc->location.mt_entry->ops->node_type_h)( 42a0c: 206a 0014 moveal %a2@(20),%a0 42a10: 2068 000c moveal %a0@(12),%a0 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 = 42a14: 2f00 movel %d0,%sp@- 42a16: 2068 0014 moveal %a0@(20),%a0 42a1a: 4e90 jsr %a0@ (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 42a1c: 508f addql #8,%sp 42a1e: 4a80 tstl %d0 42a20: 6644 bnes 42a66 sc = rtems_libio_set_private_env(); 42a22: 4eb9 0004 37f8 jsr 437f8 if (sc == RTEMS_SUCCESSFUL) { 42a28: 4a80 tstl %d0 42a2a: 6760 beqs 42a8c rtems_filesystem_global_location_assign( &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 42a2c: 720d moveq #13,%d1 42a2e: b280 cmpl %d0,%d1 42a30: 670c beqs 42a3e <== NEVER TAKEN errno = ENOMEM; 42a32: 4eb9 0004 a04c jsr 4a04c <__errno> 42a38: 720c moveq #12,%d1 42a3a: 2040 moveal %d0,%a0 42a3c: 2081 movel %d1,%a0@ rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 42a3e: 2f0a movel %a2,%sp@- 42a40: 45f9 0004 4624 lea 44624 ,%a2 42a46: 4e92 jsr %a2@ 42a48: 588f addql #4,%sp } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42a4a: 486e ffc8 pea %fp@(-56) 42a4e: 4eb9 0004 415e jsr 4415e if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 42a54: 2f2e ffac movel %fp@(-84),%sp@- 42a58: 4e92 jsr %a2@ } return rv; } 42a5a: 246e ffa8 moveal %fp@(-88),%a2 } rtems_filesystem_eval_path_cleanup( &ctx ); if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); 42a5e: 508f addql #8,%sp 42a60: 70ff moveq #-1,%d0 } return rv; } 42a62: 4e5e unlk %fp 42a64: 4e75 rts static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 42a66: 203c 0005 c104 movel #377092,%d0 42a6c: b0aa 0010 cmpl %a2@(16),%d0 42a70: 67cc beqs 42a3e <== NEVER TAKEN errno = eno; 42a72: 4eb9 0004 a04c jsr 4a04c <__errno> 42a78: 2040 moveal %d0,%a0 42a7a: 7014 moveq #20,%d0 42a7c: 2080 movel %d0,%a0@ rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 42a7e: 2f0a movel %a2,%sp@- 42a80: 45f9 0004 4624 lea 44624 ,%a2 42a86: 4e92 jsr %a2@ 42a88: 588f addql #4,%sp 42a8a: 60be bras 42a4a ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { sc = rtems_libio_set_private_env(); if (sc == RTEMS_SUCCESSFUL) { rtems_filesystem_global_location_assign( 42a8c: 2079 0005 cfa4 moveal 5cfa4 ,%a0 42a92: 5888 addql #4,%a0 42a94: 2f0a movel %a2,%sp@- 42a96: 45f9 0004 466e lea 4466e ,%a2 42a9c: 2f08 movel %a0,%sp@- 42a9e: 4e92 jsr %a2@ &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 42aa0: 2f2e ffac movel %fp@(-84),%sp@- 42aa4: 2f39 0005 cfa4 movel 5cfa4 ,%sp@- 42aaa: 4e92 jsr %a2@ } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42aac: 486e ffc8 pea %fp@(-56) 42ab0: 4eb9 0004 415e jsr 4415e if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 42ab6: 246e ffa8 moveal %fp@(-88),%a2 } } else { rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 42aba: 4fef 0014 lea %sp@(20),%sp 42abe: 4280 clrl %d0 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 42ac0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043332 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 43332: 4e56 ffe0 linkw %fp,#-32 43336: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 4333a: 242e 0008 movel %fp@(8),%d2 4333e: 262e 000c movel %fp@(12),%d3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 43342: 2c39 0006 3636 movel 63636 ,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 43348: 2802 movel %d2,%d4 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 4334a: 2a03 movel %d3,%d5 4334c: bc84 cmpl %d4,%d6 4334e: 6300 008e blsw 433de 43352: 2479 0006 363a moveal 6363a ,%a2 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 43358: e78c lsll #3,%d4 4335a: 47f2 4800 lea %a2@(00000000,%d4:l),%a3 4335e: 2453 moveal %a3@,%a2 43360: 282b 0004 movel %a3@(4),%d4 43364: 4a8a tstl %a2 43366: 671e beqs 43386 43368: b885 cmpl %d5,%d4 4336a: 631a blss 43386 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; 4336c: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 43370: 4a8a tstl %a2 43372: 675e beqs 433d2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; 43374: 700c moveq #12,%d0 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 43376: 4a92 tstl %a2@ 43378: 6700 00be beqw 43438 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 4337c: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 43382: 4e5e unlk %fp 43384: 4e75 rts 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) { 43386: 4a84 tstl %d4 43388: 6600 00a6 bnew 43430 new_size = DISKTAB_INITIAL_SIZE; 4338c: 7c08 moveq #8,%d6 } else { new_size = 2 * old_size; } if (minor >= new_size) { 4338e: bc85 cmpl %d5,%d6 43390: 6204 bhis 43396 new_size = minor + 1; 43392: 2c05 movel %d5,%d6 43394: 5286 addql #1,%d6 } table = realloc(table, new_size * sizeof(*table)); 43396: 2006 movel %d6,%d0 43398: e588 lsll #2,%d0 4339a: 2f00 movel %d0,%sp@- 4339c: 2f0a movel %a2,%sp@- 4339e: 4eb9 0004 556c jsr 4556c if (table == NULL) { 433a4: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 433a6: 2440 moveal %d0,%a2 if (table == NULL) { 433a8: 4a80 tstl %d0 433aa: 6726 beqs 433d2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 433ac: 2006 movel %d6,%d0 433ae: 9084 subl %d4,%d0 433b0: e588 lsll #2,%d0 433b2: 2f00 movel %d0,%sp@- 433b4: 42a7 clrl %sp@- 433b6: 4872 4c00 pea %a2@(00000000,%d4:l:4) 433ba: 4eb9 0005 3244 jsr 53244 disktab [major].minor = table; disktab [major].size = new_size; 433c0: 4fef 000c lea %sp@(12),%sp if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; 433c4: 268a movel %a2,%a3@ disktab [major].size = new_size; } return disktab [major].minor + minor; 433c6: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; 433ca: 2746 0004 movel %d6,%a3@(4) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 433ce: 4a8a tstl %a2 433d0: 66a2 bnes 43374 <== ALWAYS TAKEN alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); return RTEMS_NO_MEMORY; 433d2: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 433d4: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 433da: 4e5e unlk %fp 433dc: 4e75 rts rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 433de: 2e06 movel %d6,%d7 433e0: de87 addl %d7,%d7 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 433e2: 2039 0006 363a movel 6363a ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 433e8: be84 cmpl %d4,%d7 433ea: 6204 bhis 433f0 <== NEVER TAKEN new_size = major + 1; 433ec: 2e04 movel %d4,%d7 433ee: 5287 addql #1,%d7 } table = realloc(table, new_size * sizeof(*table)); 433f0: 2207 movel %d7,%d1 433f2: e789 lsll #3,%d1 433f4: 2f01 movel %d1,%sp@- 433f6: 2f00 movel %d0,%sp@- 433f8: 4eb9 0004 556c jsr 4556c if (table == NULL) { 433fe: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 43400: 2440 moveal %d0,%a2 if (table == NULL) { 43402: 4a80 tstl %d0 43404: 67cc beqs 433d2 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 43406: 2007 movel %d7,%d0 <== NOT EXECUTED 43408: 9086 subl %d6,%d0 <== NOT EXECUTED 4340a: e788 lsll #3,%d0 <== NOT EXECUTED 4340c: e78e lsll #3,%d6 <== NOT EXECUTED 4340e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43410: 42a7 clrl %sp@- <== NOT EXECUTED 43412: 4872 6800 pea %a2@(00000000,%d6:l) <== NOT EXECUTED 43416: 4eb9 0005 3244 jsr 53244 <== NOT EXECUTED disktab = table; disktab_size = new_size; 4341c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED if (table == NULL) { return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; 43420: 23ca 0006 363a movel %a2,6363a <== NOT EXECUTED disktab_size = new_size; 43426: 23c7 0006 3636 movel %d7,63636 <== NOT EXECUTED 4342c: 6000 ff2a braw 43358 <== NOT EXECUTED rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 43430: 2c04 movel %d4,%d6 43432: dc86 addl %d6,%d6 43434: 6000 ff58 braw 4338e if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 43438: 4878 0072 pea 72 4343c: 4eb9 0004 49d4 jsr 449d4 if (dd == NULL) { 43442: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 43444: 2800 movel %d0,%d4 if (dd == NULL) { 43446: 678a beqs 433d2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 43448: 4aae 0010 tstl %fp@(16) 4344c: 6760 beqs 434ae alloc_name = strdup(name); 4344e: 2f2e 0010 movel %fp@(16),%sp@- 43452: 4eb9 0005 380c jsr 5380c if (alloc_name == NULL) { 43458: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 4345a: 2a00 movel %d0,%d5 4345c: 2c00 movel %d0,%d6 if (alloc_name == NULL) { 4345e: 6762 beqs 434c2 <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 43460: 2f03 movel %d3,%sp@- 43462: 2f02 movel %d2,%sp@- 43464: 4878 61ff pea 61ff 43468: 2f00 movel %d0,%sp@- 4346a: 4eb9 0004 4b58 jsr 44b58 43470: 4fef 0010 lea %sp@(16),%sp 43474: 4a80 tstl %d0 43476: 6d1a blts 43492 <== NEVER TAKEN free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 43478: 2484 movel %d4,%a2@ *dd_ptr = dd; 4347a: 206e 0014 moveal %fp@(20),%a0 *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; 4347e: 4280 clrl %d0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; 43480: 2084 movel %d4,%a0@ *alloc_name_ptr = alloc_name; 43482: 206e 0018 moveal %fp@(24),%a0 43486: 2086 movel %d6,%a0@ return RTEMS_SUCCESSFUL; } 43488: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 4348e: 4e5e unlk %fp 43490: 4e75 rts } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 43492: 2f05 movel %d5,%sp@- <== NOT EXECUTED 43494: 45f9 0004 4528 lea 44528 ,%a2 <== NOT EXECUTED 4349a: 4e92 jsr %a2@ <== NOT EXECUTED free(dd); 4349c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4349e: 4e92 jsr %a2@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 434a0: 508f addql #8,%sp <== NOT EXECUTED 434a2: 700d moveq #13,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 434a4: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 434aa: 4e5e unlk %fp <== NOT EXECUTED 434ac: 4e75 rts <== NOT EXECUTED free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 434ae: 2484 movel %d4,%a2@ *dd_ptr = dd; 434b0: 206e 0014 moveal %fp@(20),%a0 char **alloc_name_ptr ) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 434b4: 4286 clrl %d6 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; 434b6: 4280 clrl %d0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; 434b8: 2084 movel %d4,%a0@ *alloc_name_ptr = alloc_name; 434ba: 206e 0018 moveal %fp@(24),%a0 434be: 2086 movel %d6,%a0@ 434c0: 60c6 bras 43488 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 434c2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 434c4: 4eb9 0004 4528 jsr 44528 <== NOT EXECUTED return RTEMS_NO_MEMORY; 434ca: 588f addql #4,%sp <== NOT EXECUTED 434cc: 701a moveq #26,%d0 <== NOT EXECUTED 434ce: 6000 ff04 braw 433d4 <== NOT EXECUTED =============================================================================== 00044322 : * 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) 44322: 4e56 ffdc linkw %fp,#-36 44326: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 4432a: 4878 0028 pea 28 4432e: 4878 0001 pea 1 * 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) 44332: 266e 000c moveal %fp@(12),%a3 44336: 286e 0008 moveal %fp@(8),%a4 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 4433a: 4293 clrl %a3@ if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 4433c: 4eb9 0004 5024 jsr 45024 44342: 508f addql #8,%sp 44344: 2440 moveal %d0,%a2 44346: 4a80 tstl %d0 44348: 6700 00be beqw 44408 /* 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)); 4434c: 202c 000c movel %a4@(12),%d0 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 44350: 7218 moveq #24,%d1 44352: 2e00 movel %d0,%d7 44354: e2af lsrl %d1,%d7 44356: 7618 moveq #24,%d3 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44358: 7a18 moveq #24,%d5 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4435a: 2800 movel %d0,%d4 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4435c: 7c18 moveq #24,%d6 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4435e: e08c lsrl #8,%d4 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)); 44360: 222c 0008 movel %a4@(8),%d1 uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 44364: 2401 movel %d1,%d2 44366: e6aa lsrl %d3,%d2 44368: 2042 moveal %d2,%a0 byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4436a: 2400 movel %d0,%d2 ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 4436c: 2601 movel %d1,%d3 4436e: e08b lsrl #8,%d3 byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44370: ebaa lsll %d5,%d2 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 44372: 2a00 movel %d0,%d5 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44374: 2001 movel %d1,%d0 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 44376: e18d lsll #8,%d5 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 44378: eda8 lsll %d6,%d0 { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 4437a: e189 lsll #8,%d1 byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 4437c: 2c08 movel %a0,%d6 4437e: 0285 00ff 0000 andil #16711680,%d5 44384: 8487 orl %d7,%d2 44386: 0281 00ff 0000 andil #16711680,%d1 4438c: 8086 orl %d6,%d0 4438e: 8485 orl %d5,%d2 44390: 8081 orl %d1,%d0 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 44392: 4285 clrl %d5 44394: 1a2c 0004 moveb %a4@(4),%d5 * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 44398: 2205 movel %d5,%d1 4439a: 0283 0000 ff00 andil #65280,%d3 443a0: 0284 0000 ff00 andil #65280,%d4 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 443a6: 1494 moveb %a4@,%a2@ 443a8: 8083 orl %d3,%d0 443aa: 8484 orl %d4,%d2 443ac: 2540 0004 movel %d0,%a2@(4) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 443b0: 7005 moveq #5,%d0 { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 443b2: 1545 0001 moveb %d5,%a2@(1) /* 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); 443b6: 2542 0008 movel %d2,%a2@(8) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 443ba: b081 cmpl %d1,%d0 443bc: 673c beqs 443fa 443be: 0c81 0000 0085 cmpil #133,%d1 443c4: 6734 beqs 443fa <== NEVER TAKEN DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 443c6: 4878 0006 pea 6 443ca: 2f01 movel %d1,%sp@- 443cc: 4879 0006 22a5 pea 622a5 443d2: 4eb9 0005 3fd0 jsr 53fd0 443d8: 4fef 000c lea %sp@(12),%sp * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 443dc: 4a80 tstl %d0 443de: 6704 beqs 443e4 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 443e0: 4a82 tstl %d2 443e2: 6616 bnes 443fa <== ALWAYS TAKEN *new_part_desc = part_desc; } else { /* empty partition */ free(part_desc); 443e4: 2f0a movel %a2,%sp@- 443e6: 4eb9 0004 5344 jsr 45344 443ec: 588f addql #4,%sp } return RTEMS_SUCCESSFUL; 443ee: 4280 clrl %d0 } 443f0: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 443f6: 4e5e unlk %fp 443f8: 4e75 rts * 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; 443fa: 268a movel %a2,%a3@ } else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; 443fc: 4280 clrl %d0 } 443fe: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 44404: 4e5e unlk %fp 44406: 4e75 rts *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; 44408: 701a moveq #26,%d0 <== NOT EXECUTED else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } 4440a: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 44410: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004251c : #endif #include "devfs.h" void devFS_Show(void) { 4251c: 4e56 ffe8 linkw %fp,#-24 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { 42520: 203c 0005 a39e movel #369566,%d0 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 42526: 2079 0005 b74c moveal 5b74c ,%a0 if (rootloc->mt_entry->ops == &devFS_ops) { 4252c: 2068 0004 moveal %a0@(4),%a0 42530: 2068 0014 moveal %a0@(20),%a0 #endif #include "devfs.h" void devFS_Show(void) { 42534: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { 42538: b0a8 000c cmpl %a0@(12),%d0 4253c: 670a beqs 42548 <== ALWAYS TAKEN (unsigned long) current->minor ); } } } } 4253e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 42544: 4e5e unlk %fp <== NOT EXECUTED 42546: 4e75 rts <== NOT EXECUTED static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 42548: 2068 0010 moveal %a0@(16),%a0 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { const devFS_data *data = devFS_get_data(rootloc); size_t i = 0; size_t n = data->count; 4254c: 2a28 0004 movel %a0@(4),%d5 devFS_node *nodes = data->nodes; 42550: 2450 moveal %a0@,%a2 for (i = 0; i < n; ++i) { 42552: 67ea beqs 4253e <== NEVER TAKEN 42554: 4284 clrl %d4 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 42556: 47f9 0004 36a8 lea 436a8 ,%a3 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { 4255c: 4a92 tstl %a2@ 4255e: 6742 beqs 425a2 size_t j = 0; size_t m = current->namelen; 42560: 262a 0004 movel %a2@(4),%d3 printk("/"); 42564: 4879 0005 a3f2 pea 5a3f2 for (j = 0; j < m; ++j) { 4256a: 4282 clrl %d2 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 4256c: 4e93 jsr %a3@ for (j = 0; j < m; ++j) { 4256e: 588f addql #4,%sp 42570: 4a83 tstl %d3 42572: 671a beqs 4258e <== NEVER TAKEN printk("%c", current->name [j]); 42574: 2052 moveal %a2@,%a0 42576: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 4257a: 5282 addql #1,%d2 printk("%c", current->name [j]); 4257c: 49c0 extbl %d0 4257e: 2f00 movel %d0,%sp@- 42580: 4879 0005 a3fe pea 5a3fe 42586: 4e93 jsr %a3@ if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 42588: 508f addql #8,%sp 4258a: b682 cmpl %d2,%d3 4258c: 66e6 bnes 42574 printk("%c", current->name [j]); } printk( 4258e: 2f2a 000c movel %a2@(12),%sp@- 42592: 2f2a 0008 movel %a2@(8),%sp@- 42596: 4879 0005 a3f4 pea 5a3f4 4259c: 4e93 jsr %a3@ 4259e: 4fef 000c lea %sp@(12),%sp 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) { 425a2: 5284 addql #1,%d4 425a4: 45ea 0014 lea %a2@(20),%a2 425a8: ba84 cmpl %d4,%d5 425aa: 66b0 bnes 4255c (unsigned long) current->minor ); } } } } 425ac: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 425b2: 4e5e unlk %fp ... =============================================================================== 0004c3bc : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 4c3bc: 4e56 ffdc linkw %fp,#-36 4c3c0: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4c3c4: 2a6e 0008 moveal %fp@(8),%a5 ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 4c3c8: 4283 clrl %d3 devFS_node *free_node = NULL; 4c3ca: 97cb subal %a3,%a3 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4c3cc: 4282 clrl %d2 devFS_node *current = nodes + i; if (current->name != NULL) { if ( current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4c3ce: 49f9 0004 e4f4 lea 4e4f4 ,%a4 static inline const devFS_data *devFS_get_data( const rtems_filesystem_location_info_t *loc ) { return (const devFS_data *) loc->mt_entry->immutable_fs_info; 4c3d4: 206d 002c moveal %a5@(44),%a0 4c3d8: 2068 0010 moveal %a0@(16),%a0 4c3dc: 2450 moveal %a0@,%a2 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) { devFS_node *current = nodes + i; 4c3de: 220a movel %a2,%d1 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c3e0: 282d 0004 movel %a5@(4),%d4 4c3e4: 2c15 movel %a5@,%d6 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 4c3e6: 2a28 0004 movel %a0@(4),%d5 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) { 4c3ea: ba82 cmpl %d2,%d5 4c3ec: 6722 beqs 4c410 devFS_node *current = nodes + i; if (current->name != NULL) { 4c3ee: 2012 movel %a2@,%d0 4c3f0: 6708 beqs 4c3fa if ( 4c3f2: 220b movel %a3,%d1 4c3f4: b8aa 0004 cmpl %a2@(4),%d4 4c3f8: 6736 beqs 4c430 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) { 4c3fa: 5282 addql #1,%d2 4c3fc: 4a81 tstl %d1 4c3fe: 6704 beqs 4c404 4c400: 4a83 tstl %d3 4c402: 6642 bnes 4c446 4c404: 45ea 0014 lea %a2@(20),%a2 4c408: 2641 moveal %d1,%a3 devFS_node *current = nodes + i; 4c40a: 220a movel %a2,%d1 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) { 4c40c: ba82 cmpl %d2,%d5 4c40e: 66de bnes 4c3ee } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c410: 202d 0010 movel %a5@(16),%d0 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 4c414: 4a83 tstl %d3 4c416: 6750 beqs 4c468 if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 4c418: 0800 0006 btst #6,%d0 4c41c: 6632 bnes 4c450 <== ALWAYS TAKEN currentloc->node_access = node; 4c41e: 2b43 0020 movel %d3,%a5@(32) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 4c422: 42ad 0004 clrl %a5@(4) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c426: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c42c: 4e5e unlk %fp 4c42e: 4e75 rts devFS_node *current = nodes + i; if (current->name != NULL) { if ( current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4c430: 2f04 movel %d4,%sp@- 4c432: 2f06 movel %d6,%sp@- 4c434: 2f00 movel %d0,%sp@- 4c436: 4e94 jsr %a4@ 4c438: 4fef 000c lea %sp@(12),%sp 4c43c: 220b movel %a3,%d1 4c43e: 4a80 tstl %d0 4c440: 66b8 bnes 4c3fa 4c442: 260a movel %a2,%d3 4c444: 60b4 bras 4c3fa } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c446: 202d 0010 movel %a5@(16),%d0 &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 4c44a: 0800 0006 btst #6,%d0 4c44e: 67ce beqs 4c41e <== ALWAYS TAKEN currentloc->node_access = node; rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 4c450: 4878 0011 pea 11 4c454: 2f0d movel %a5,%sp@- 4c456: 4eb9 0004 52ae jsr 452ae 4c45c: 508f addql #8,%sp } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c45e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c464: 4e5e unlk %fp 4c466: 4e75 rts rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 4c468: 0800 0005 btst #5,%d0 4c46c: 6728 beqs 4c496 <== NEVER TAKEN if (free_node != NULL) { 4c46e: 4a8b tstl %a3 4c470: 673c beqs 4c4ae free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 4c472: 203c 0000 01ff movel #511,%d0 4c478: 2740 0010 movel %d0,%a3@(16) currentloc->node_access = free_node; 4c47c: 2b4b 0020 movel %a3,%a5@(32) rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 4c480: 2b46 0008 movel %d6,%a5@(8) ctx->tokenlen = tokenlen; 4c484: 2b44 000c movel %d4,%a5@(12) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 4c488: 42ad 0004 clrl %a5@(4) } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c48c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c492: 4e5e unlk %fp 4c494: 4e75 rts rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, ENOSPC); } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 4c496: 4878 0002 pea 2 <== NOT EXECUTED 4c49a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4c49c: 4eb9 0004 52ae jsr 452ae <== NOT EXECUTED 4c4a2: 508f addql #8,%sp <== NOT EXECUTED } } } 4c4a4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4c4aa: 4e5e unlk %fp <== NOT EXECUTED 4c4ac: 4e75 rts <== 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); 4c4ae: 4878 001c pea 1c 4c4b2: 2f0d movel %a5,%sp@- 4c4b4: 4eb9 0004 52ae jsr 452ae 4c4ba: 508f addql #8,%sp } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4c4bc: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4c4c2: 4e5e unlk %fp ... =============================================================================== 00043e34 : dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43e34: 7003 moveq #3,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 43e36: 4e56 ffec linkw %fp,#-20 43e3a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 43e3e: 246e 000c moveal %fp@(12),%a2 43e42: 242e 0010 movel %fp@(16),%d2 43e46: 262e 0014 movel %fp@(20),%d3 43e4a: 2a2e 0018 movel %fp@(24),%d5 43e4e: 282e 001c movel %fp@(28),%d4 int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43e52: b082 cmpl %d2,%d0 43e54: 675e beqs 43eb4 if (S_ISBLK(mode) || S_ISCHR(mode)) { 43e56: 2003 movel %d3,%d0 43e58: 0280 0000 f000 andil #61440,%d0 43e5e: 0c80 0000 6000 cmpil #24576,%d0 43e64: 6708 beqs 43e6e 43e66: 0c80 0000 2000 cmpil #8192,%d0 43e6c: 667e bnes 43eec char *dupname = malloc(namelen); 43e6e: 2f02 movel %d2,%sp@- 43e70: 4eb9 0004 449c jsr 4449c if (dupname != NULL) { 43e76: 588f addql #4,%sp 43e78: 4a80 tstl %d0 43e7a: 6700 008a beqw 43f06 devFS_node *node = parentloc->node_access; 43e7e: 206e 0008 moveal %fp@(8),%a0 43e82: 2068 0008 moveal %a0@(8),%a0 node->name = dupname; 43e86: 2080 movel %d0,%a0@ node->namelen = namelen; 43e88: 2142 0004 movel %d2,%a0@(4) node->major = rtems_filesystem_dev_major_t(dev); 43e8c: 2145 0008 movel %d5,%a0@(8) node->minor = rtems_filesystem_dev_minor_t(dev); 43e90: 2144 000c movel %d4,%a0@(12) node->mode = mode; 43e94: 2143 0010 movel %d3,%a0@(16) memcpy(dupname, name, namelen); 43e98: 2f02 movel %d2,%sp@- 43e9a: 2f0a movel %a2,%sp@- 43e9c: 2f00 movel %d0,%sp@- 43e9e: 4eb9 0004 e584 jsr 4e584 43ea4: 4fef 000c lea %sp@(12),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43ea8: 4280 clrl %d0 rv = -1; } } return rv; } 43eaa: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 43eb0: 4e5e unlk %fp 43eb2: 4e75 rts dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43eb4: 7264 moveq #100,%d1 43eb6: 1012 moveb %a2@,%d0 43eb8: 49c0 extbl %d0 43eba: b280 cmpl %d0,%d1 43ebc: 6698 bnes 43e56 <== NEVER TAKEN 43ebe: 123c 0065 moveb #101,%d1 43ec2: 102a 0001 moveb %a2@(1),%d0 43ec6: 49c0 extbl %d0 43ec8: b280 cmpl %d0,%d1 43eca: 668a bnes 43e56 <== NEVER TAKEN 43ecc: 123c 0076 moveb #118,%d1 43ed0: 102a 0002 moveb %a2@(2),%d0 43ed4: 49c0 extbl %d0 43ed6: b280 cmpl %d0,%d1 43ed8: 6600 ff7c bnew 43e56 size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43edc: 4280 clrl %d0 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 43ede: 0283 0000 f000 andil #61440,%d3 43ee4: 0c83 0000 4000 cmpil #16384,%d3 43eea: 67be beqs 43eaa <== ALWAYS TAKEN errno = ENOTSUP; 43eec: 4eb9 0004 dc50 jsr 4dc50 <__errno> 43ef2: 2040 moveal %d0,%a0 rv = -1; 43ef4: 70ff moveq #-1,%d0 } } return rv; } 43ef6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { errno = ENOTSUP; 43efc: 20bc 0000 0086 movel #134,%a0@ rv = -1; } } return rv; } 43f02: 4e5e unlk %fp 43f04: 4e75 rts 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; 43f06: 4eb9 0004 dc50 jsr 4dc50 <__errno> 43f0c: 720c moveq #12,%d1 43f0e: 2040 moveal %d0,%a0 rv = -1; 43f10: 70ff moveq #-1,%d0 rv = -1; } } return rv; } 43f12: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 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; 43f18: 2081 movel %d1,%a0@ rv = -1; } } return rv; } 43f1a: 4e5e unlk %fp ... =============================================================================== 000432d6 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 432d6: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 432da: 42a7 clrl %sp@- 432dc: 42a7 clrl %sp@- 432de: 2f39 0006 3632 movel 63632 ,%sp@- 432e4: 4eb9 0004 8c48 jsr 48c48 if (sc == RTEMS_SUCCESSFUL) { 432ea: 4fef 000c lea %sp@(12),%sp 432ee: 4a80 tstl %d0 432f0: 6706 beqs 432f8 <== ALWAYS TAKEN diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; 432f2: 7016 moveq #22,%d0 <== NOT EXECUTED } } 432f4: 4e5e unlk %fp <== NOT EXECUTED 432f6: 4e75 rts <== NOT EXECUTED 432f8: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 432fa: 7201 moveq #1,%d1 432fc: 13c1 0006 3630 moveb %d1,63630 return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } =============================================================================== 00043304 : static void disk_unlock(void) { 43304: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 43308: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 4330a: 2f39 0006 3632 movel 63632 ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 43310: 13c0 0006 3630 moveb %d0,63630 sc = rtems_semaphore_release(diskdevs_mutex); 43316: 4eb9 0004 8da0 jsr 48da0 if (sc != RTEMS_SUCCESSFUL) { 4331c: 588f addql #4,%sp 4331e: 4a80 tstl %d0 43320: 6604 bnes 43326 <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 43322: 4e5e unlk %fp 43324: 4e75 rts diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 43326: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4332c: 4eb9 0004 93ec jsr 493ec <== NOT EXECUTED =============================================================================== 00044e0a : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 44e0a: 4e56 fff4 linkw %fp,#-12 44e0e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 44e12: 243c 0000 0700 movel #1792,%d2 44e18: 2002 movel %d2,%d0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 44e1a: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 44e1e: 40c1 movew %sr,%d1 44e20: 8081 orl %d1,%d0 44e22: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44e24: 206a 0084 moveal %a2@(132),%a0 44e28: 202a 0080 movel %a2@(128),%d0 44e2c: b088 cmpl %a0,%d0 44e2e: 6734 beqs 44e64 44e30: 47f9 0004 7458 lea 47458 ,%a3 tty->rawOutBufState = rob_wait; 44e36: 7002 moveq #2,%d0 44e38: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 44e3c: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain( 44e3e: 42a7 clrl %sp@- 44e40: 42a7 clrl %sp@- 44e42: 2f2a 008c movel %a2@(140),%sp@- 44e46: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44e48: 4fef 000c lea %sp@(12),%sp 44e4c: 4a80 tstl %d0 44e4e: 6620 bnes 44e70 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 44e50: 2002 movel %d2,%d0 44e52: 40c1 movew %sr,%d1 44e54: 8081 orl %d1,%d0 44e56: 46c0 movew %d0,%sr 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) { 44e58: 206a 0084 moveal %a2@(132),%a0 44e5c: 202a 0080 movel %a2@(128),%d0 44e60: b088 cmpl %a0,%d0 44e62: 66d2 bnes 44e36 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); 44e64: 46c1 movew %d1,%sr } } 44e66: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44e6c: 4e5e unlk %fp 44e6e: 4e75 rts 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); 44e70: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44e72: 4eb9 0004 7c4c jsr 47c4c <== NOT EXECUTED =============================================================================== 00043624 : */ int dup2( int fildes, int fildes2 ) { 43624: 4e56 ffa8 linkw %fp,#-88 43628: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 4362c: 240e movel %fp,%d2 4362e: 0682 ffff ffba addil #-70,%d2 43634: 45f9 0004 3cf0 lea 43cf0 ,%a2 4363a: 2f02 movel %d2,%sp@- */ int dup2( int fildes, int fildes2 ) { 4363c: 262e 0008 movel %fp@(8),%d3 43640: 282e 000c movel %fp@(12),%d4 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 43644: 2f03 movel %d3,%sp@- 43646: 4e92 jsr %a2@ if ( status == -1 ) 43648: 508f addql #8,%sp 4364a: 72ff moveq #-1,%d1 4364c: b280 cmpl %d0,%d1 4364e: 6728 beqs 43678 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 43650: 2f02 movel %d2,%sp@- 43652: 2f04 movel %d4,%sp@- 43654: 4e92 jsr %a2@ if ( status == -1 ) 43656: 508f addql #8,%sp 43658: 72ff moveq #-1,%d1 4365a: b280 cmpl %d0,%d1 4365c: 671a beqs 43678 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 4365e: 2f04 movel %d4,%sp@- 43660: 42a7 clrl %sp@- 43662: 2f03 movel %d3,%sp@- 43664: 4eb9 0004 38f4 jsr 438f4 4366a: 4fef 000c lea %sp@(12),%sp } 4366e: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 43674: 4e5e unlk %fp 43676: 4e75 rts * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); if ( status == -1 ) return -1; 43678: 70ff moveq #-1,%d0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); } 4367a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 43680: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c08 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45c08: 4e56 fff0 linkw %fp,#-16 45c0c: 222e 0008 movel %fp@(8),%d1 45c10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 45c14: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 45c18: 242a 003c movel %a2@(60),%d2 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45c1c: 1001 moveb %d1,%d0 if ((tty->termios.c_lflag & ECHOCTL) && 45c1e: 0282 0000 0200 andil #512,%d2 iscntrl(c) && (c != '\t') && (c != '\n')) { 45c24: 0280 0000 00ff andil #255,%d0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c2a: 4a82 tstl %d2 45c2c: 6720 beqs 45c4e <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 45c2e: 2079 0005 e3cc moveal 5e3cc <__ctype_ptr__>,%a0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c34: 7620 moveq #32,%d3 iscntrl(c) && (c != '\t') && (c != '\n')) { 45c36: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 45c3a: c483 andl %d3,%d2 45c3c: 4a02 tstb %d2 45c3e: 670e beqs 45c4e iscntrl(c) && (c != '\t') && (c != '\n')) { 45c40: 7409 moveq #9,%d2 45c42: b480 cmpl %d0,%d2 45c44: 6708 beqs 45c4e 45c46: 163c 000a moveb #10,%d3 45c4a: b680 cmpl %d0,%d3 45c4c: 6614 bnes 45c62 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 45c4e: 2f0a movel %a2,%sp@- 45c50: 2f00 movel %d0,%sp@- 45c52: 4eba fe04 jsr %pc@(45a58 ) 45c56: 508f addql #8,%sp } } 45c58: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 45c5e: 4e5e unlk %fp 45c60: 4e75 rts iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45c62: 2f0a movel %a2,%sp@- 45c64: 4878 0002 pea 2 if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 45c68: 7040 moveq #64,%d0 rtems_termios_puts (echobuf, 2, tty); 45c6a: 486e fffe pea %fp@(-2) if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 45c6e: b181 eorl %d0,%d1 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 45c70: 745e moveq #94,%d2 echobuf[1] = c ^ 0x40; 45c72: 1d41 ffff moveb %d1,%fp@(-1) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 45c76: 1d42 fffe moveb %d2,%fp@(-2) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45c7a: 4eb9 0004 5954 jsr 45954 45c80: 4fef 000c lea %sp@(12),%sp tty->column += 2; 45c84: 54aa 0028 addql #2,%a2@(40) } else { oproc (c, tty); } } 45c88: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 45c8e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00064e70 : void endgrent(void) { 64e70: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 64e74: 2039 0009 f3dc movel 9f3dc ,%d0 64e7a: 670a beqs 64e86 <== NEVER TAKEN fclose(group_fp); 64e7c: 2f00 movel %d0,%sp@- 64e7e: 4eb9 0007 78d4 jsr 778d4 64e84: 588f addql #4,%sp } 64e86: 4e5e unlk %fp ... =============================================================================== 00064d26 : void endpwent(void) { 64d26: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 64d2a: 2039 0009 f302 movel 9f302 ,%d0 64d30: 670a beqs 64d3c <== NEVER TAKEN fclose(passwd_fp); 64d32: 2f00 movel %d0,%sp@- 64d34: 4eb9 0007 78d4 jsr 778d4 64d3a: 588f addql #4,%sp } 64d3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045c92 : * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 45c92: 4e56 ffe0 linkw %fp,#-32 45c96: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 45c9a: 246e 0008 moveal %fp@(8),%a2 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 45c9e: 47f9 0004 5954 lea 45954 ,%a3 * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 45ca4: 282e 000c movel %fp@(12),%d4 echo ('\n', tty); return; } } while (tty->ccount) { 45ca8: 202a 0020 movel %a2@(32),%d0 45cac: 676e beqs 45d1c unsigned char c = tty->cbuf[--tty->ccount]; 45cae: 5380 subql #1,%d0 45cb0: 206a 001c moveal %a2@(28),%a0 if (tty->termios.c_lflag & ECHO) { 45cb4: 262a 003c movel %a2@(60),%d3 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 45cb8: 2540 0020 movel %d0,%a2@(32) 45cbc: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 if (tty->termios.c_lflag & ECHO) { 45cc0: 44c3 movew %d3,%ccr 45cc2: 6a54 bpls 45d18 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 45cc4: 4a84 tstl %d4 45cc6: 6608 bnes 45cd0 45cc8: 0803 0004 btst #4,%d3 45ccc: 6700 0142 beqw 45e10 echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 45cd0: 7409 moveq #9,%d2 45cd2: 0281 0000 00ff andil #255,%d1 45cd8: b481 cmpl %d1,%d2 45cda: 6700 0096 beqw 45d72 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 45cde: 2401 movel %d1,%d2 45ce0: 5282 addql #1,%d2 45ce2: 7a20 moveq #32,%d5 45ce4: 2079 0005 e3cc moveal 5e3cc <__ctype_ptr__>,%a0 45cea: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 45cee: c085 andl %d5,%d0 45cf0: 4a00 tstb %d0 45cf2: 6632 bnes 45d26 <== NEVER TAKEN 45cf4: 49f9 0004 5954 lea 45954 ,%a4 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); 45cfa: 2f0a movel %a2,%sp@- 45cfc: 4878 0003 pea 3 45d00: 4879 0005 d40b pea 5d40b 45d06: 4e94 jsr %a4@ if (tty->column) 45d08: 202a 0028 movel %a2@(40),%d0 45d0c: 4fef 000c lea %sp@(12),%sp 45d10: 6706 beqs 45d18 <== NEVER TAKEN tty->column--; 45d12: 5380 subql #1,%d0 45d14: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 45d18: 4a84 tstl %d4 45d1a: 668c bnes 45ca8 break; } } 45d1c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 45d22: 4e5e unlk %fp 45d24: 4e75 rts rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 45d26: 0803 0009 btst #9,%d3 <== NOT EXECUTED 45d2a: 67ec beqs 45d18 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 45d2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45d2e: 4878 0003 pea 3 <== NOT EXECUTED 45d32: 49f9 0004 5954 lea 45954 ,%a4 <== NOT EXECUTED 45d38: 4879 0005 d40b pea 5d40b <== NOT EXECUTED 45d3e: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 45d40: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 45d44: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45d48: 6600 00e0 bnew 45e2a <== NOT EXECUTED tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 45d4c: 2079 0005 e3cc moveal 5e3cc <__ctype_ptr__>,%a0 <== NOT EXECUTED 45d52: 7220 moveq #32,%d1 <== NOT EXECUTED 45d54: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 45d58: c081 andl %d1,%d0 <== NOT EXECUTED 45d5a: 4a00 tstb %d0 <== NOT EXECUTED 45d5c: 679c beqs 45cfa <== NOT EXECUTED 45d5e: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 45d62: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 45d68: 6690 bnes 45cfa <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 45d6a: 4a84 tstl %d4 <== NOT EXECUTED 45d6c: 6600 ff3a bnew 45ca8 <== NOT EXECUTED 45d70: 60aa bras 45d1c <== NOT EXECUTED 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; 45d72: 242a 002c movel %a2@(44),%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45d76: 4a80 tstl %d0 45d78: 6732 beqs 45dac c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 45d7a: 2c03 movel %d3,%d6 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; 45d7c: 4281 clrl %d1 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) 45d7e: 0286 0000 0200 andil #512,%d6 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 45d84: 2279 0005 e3cc moveal 5e3cc <__ctype_ptr__>,%a1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 45d8a: 4283 clrl %d3 45d8c: 1618 moveb %a0@+,%d3 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 45d8e: 5281 addql #1,%d1 if (c == '\t') { 45d90: 7a09 moveq #9,%d5 45d92: ba83 cmpl %d3,%d5 45d94: 676c beqs 45e02 col = (col | 7) + 1; } else if (iscntrl (c)) { 45d96: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 45d9a: 7620 moveq #32,%d3 45d9c: ca83 andl %d3,%d5 45d9e: 4a05 tstb %d5 45da0: 6758 beqs 45dfa <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 45da2: 4a86 tstl %d6 <== NOT EXECUTED 45da4: 6702 beqs 45da8 <== NOT EXECUTED col += 2; 45da6: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45da8: b280 cmpl %d0,%d1 <== NOT EXECUTED 45daa: 66de bnes 45d8a <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 45dac: b4aa 0028 cmpl %a2@(40),%d2 45db0: 6c00 ff66 bgew 45d18 rtems_termios_puts ("\b", 1, tty); 45db4: 2f0a movel %a2,%sp@- 45db6: 4878 0001 pea 1 45dba: 4879 0005 d40d pea 5d40d 45dc0: 4e93 jsr %a3@ tty->column--; 45dc2: 202a 0028 movel %a2@(40),%d0 45dc6: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45dc8: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45dcc: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 45dd0: b480 cmpl %d0,%d2 45dd2: 6c00 ff44 bgew 45d18 rtems_termios_puts ("\b", 1, tty); 45dd6: 2f0a movel %a2,%sp@- 45dd8: 4878 0001 pea 1 45ddc: 4879 0005 d40d pea 5d40d 45de2: 4e93 jsr %a3@ tty->column--; 45de4: 202a 0028 movel %a2@(40),%d0 45de8: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45dea: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45dee: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 45df2: b480 cmpl %d0,%d2 45df4: 6dbe blts 45db4 45df6: 6000 ff20 braw 45d18 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 45dfa: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45dfc: b280 cmpl %d0,%d1 45dfe: 668a bnes 45d8a 45e00: 60aa bras 45dac c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 45e02: 7607 moveq #7,%d3 45e04: 8483 orl %d3,%d2 45e06: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45e08: b280 cmpl %d0,%d1 45e0a: 6600 ff7e bnew 45d8a 45e0e: 609c bras 45dac <== NOT EXECUTED 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); 45e10: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 45e14: 4280 clrl %d0 <== NOT EXECUTED 45e16: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 45e1a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 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); 45e20: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 45e24: 4e5e unlk %fp <== NOT EXECUTED 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); 45e26: 6000 fde0 braw 45c08 <== NOT EXECUTED } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; 45e2a: 5380 subql #1,%d0 <== NOT EXECUTED 45e2c: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 45e30: 6000 ff1a braw 45d4c <== NOT EXECUTED =============================================================================== 00052908 : static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52908: 4281 clrl %d1 5290a: 4280 clrl %d0 int fat_buf_access(fat_fs_info_t *fs_info, const uint32_t sec_num, const int op_type, uint8_t **sec_buf) { 5290c: 4e56 fff0 linkw %fp,#-16 52910: 48d7 041c moveml %d2-%d4/%a2,%sp@ 52914: 246e 0008 moveal %fp@(8),%a2 52918: 122a 0002 moveb %a2@(2),%d1 5291c: 102a 000c moveb %a2@(12),%d0 52920: 9081 subl %d1,%d0 52922: 242e 000c movel %fp@(12),%d2 52926: 2802 movel %d2,%d4 52928: e0ac lsrl %d0,%d4 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 5292a: 2604 movel %d4,%d3 5292c: e1ab lsll %d0,%d3 5292e: 2003 movel %d3,%d0 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 52930: 2602 movel %d2,%d3 52932: 9680 subl %d0,%d3 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 52934: e3ab lsll %d1,%d3 sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info, sec_num, 0); if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) 52936: 4a2a 007f tstb %a2@(127) 5293a: 6706 beqs 52942 5293c: b4aa 007a cmpl %a2@(122),%d2 52940: 673a beqs 5297c { fat_buf_release(fs_info); 52942: 2f0a movel %a2,%sp@- 52944: 4eb9 0005 2738 jsr 52738 if (op_type == FAT_OP_TYPE_READ) 5294a: 588f addql #4,%sp 5294c: 7001 moveq #1,%d0 5294e: b0ae 0010 cmpl %fp@(16),%d0 52952: 6742 beqs 52996 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); 52954: 486a 0080 pea %a2@(128) 52958: 2f04 movel %d4,%sp@- 5295a: 2f2a 005a movel %a2@(90),%sp@- 5295e: 4eb9 0005 04f0 jsr 504f0 52964: 4fef 000c lea %sp@(12),%sp if (sc != RTEMS_SUCCESSFUL) 52968: 4a80 tstl %d0 5296a: 6640 bnes 529ac <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; 5296c: 2542 007a movel %d2,%a2@(122) fs_info->c.modified = 0; 52970: 4200 clrb %d0 52972: 1540 007e moveb %d0,%a2@(126) fs_info->c.state = FAT_CACHE_ACTUAL; 52976: 7001 moveq #1,%d0 52978: 1540 007f moveb %d0,%a2@(127) } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 5297c: 226a 0080 moveal %a2@(128),%a1 52980: d6a9 001a addl %a1@(26),%d3 return RC_OK; 52984: 4280 clrl %d0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 52986: 206e 0014 moveal %fp@(20),%a0 5298a: 2083 movel %d3,%a0@ return RC_OK; } 5298c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 52992: 4e5e unlk %fp 52994: 4e75 rts if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num) { fat_buf_release(fs_info); if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 52996: 486a 0080 pea %a2@(128) 5299a: 2f04 movel %d4,%sp@- 5299c: 2f2a 005a movel %a2@(90),%sp@- 529a0: 4eb9 0005 05f2 jsr 505f2 529a6: 4fef 000c lea %sp@(12),%sp 529aa: 60bc bras 52968 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); 529ac: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 529b2: 7605 moveq #5,%d3 <== NOT EXECUTED 529b4: 2040 moveal %d0,%a0 <== NOT EXECUTED 529b6: 70ff moveq #-1,%d0 <== NOT EXECUTED 529b8: 2083 movel %d3,%a0@ <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; return RC_OK; } 529ba: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 529c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052738 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 52738: 4e56 ffd4 linkw %fp,#-44 5273c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52740: 246e 0008 moveal %fp@(8),%a2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) 52744: 4a2a 007f tstb %a2@(127) 52748: 6700 0122 beqw 5286c return RC_OK; if (fs_info->c.modified) 5274c: 4a2a 007e tstb %a2@(126) 52750: 6700 0126 beqw 52878 { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 52754: 4281 clrl %d1 52756: 322a 0018 movew %a2@(24),%d1 if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; 5275a: 202a 007a movel %a2@(122),%d0 bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 5275e: b280 cmpl %d0,%d1 52760: 6200 0104 bhiw 52866 52764: b0aa 001e cmpl %a2@(30),%d0 52768: 6400 00fc bccw 52866 uint32_t ino ) { return (ino >= fs_info->uino_base); } 5276c: 162a 0002 moveb %a2@(2),%d3 52770: 122a 000c moveb %a2@(12),%d1 uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num); uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) 52774: 4a2a 004e tstb %a2@(78) 52778: 6700 0152 beqw 528cc return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 5277c: 7401 moveq #1,%d2 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer + blk_ofs, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 5277e: 2f2a 0080 movel %a2@(128),%sp@- 52782: 47f9 0005 087e lea 5087e ,%a3 52788: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 5278a: 588f addql #4,%sp 5278c: 4a80 tstl %d0 5278e: 6600 00f8 bnew 52888 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 52792: 4200 clrb %d0 52794: 1540 007e moveb %d0,%a2@(126) if (sec_of_fat && !fs_info->vol.mirror) 52798: 4a02 tstb %d2 5279a: 6700 00b8 beqw 52854 5279e: 4a2a 004e tstb %a2@(78) 527a2: 6600 00b0 bnew 52854 { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 527a6: 4280 clrl %d0 527a8: 102a 000d moveb %a2@(13),%d0 527ac: 7201 moveq #1,%d1 527ae: b280 cmpl %d0,%d1 527b0: 6400 00a2 bccw 52854 527b4: 260e movel %fp,%d3 527b6: 7001 moveq #1,%d0 527b8: 5983 subql #4,%d3 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 527ba: 4bf9 0005 05f2 lea 505f2 ,%a5 0); if (blk_ofs == 0 && fs_info->vol.bps == fs_info->vol.bytes_per_block) { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 527c0: 283c 0005 04f0 movel #328944,%d4 { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 527c6: 49f9 0005 b188 lea 5b188 ,%a4 if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 527cc: 7401 moveq #1,%d2 { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 527ce: 41ea 001a lea %a2@(26),%a0 527d2: 4c10 0800 mulsl %a0@,%d0 static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 527d6: 4286 clrl %d6 527d8: 4281 clrl %d1 527da: 1c2a 0002 moveb %a2@(2),%d6 527de: 122a 000c moveb %a2@(12),%d1 527e2: d0aa 007a addl %a2@(122),%d0 527e6: 9286 subl %d6,%d1 527e8: 2e00 movel %d0,%d7 527ea: e2af lsrl %d1,%d7 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 527ec: 2a07 movel %d7,%d5 527ee: e3ad lsll %d1,%d5 527f0: 2205 movel %d5,%d1 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 527f2: 2a00 movel %d0,%d5 527f4: 9a81 subl %d1,%d5 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 527f6: edad lsll %d6,%d5 blk = fat_sector_num_to_block_num(fs_info, sec_num); blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (blk_ofs == 0 527f8: 6610 bnes 5280a <== ALWAYS TAKEN && fs_info->vol.bps == fs_info->vol.bytes_per_block) 527fa: 4281 clrl %d1 <== NOT EXECUTED 527fc: 4280 clrl %d0 <== NOT EXECUTED 527fe: 3212 movew %a2@,%d1 <== NOT EXECUTED 52800: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 52804: b081 cmpl %d1,%d0 <== NOT EXECUTED 52806: 6700 0098 beqw 528a0 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 5280a: 2f03 movel %d3,%sp@- 5280c: 2f07 movel %d7,%sp@- 5280e: 2f2a 005a movel %a2@(90),%sp@- 52812: 4e95 jsr %a5@ 52814: 4fef 000c lea %sp@(12),%sp if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 52818: 5282 addql #1,%d2 } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); } if ( sc != RTEMS_SUCCESSFUL) 5281a: 4a80 tstl %d0 5281c: 6600 0096 bnew 528b4 rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 52820: 4280 clrl %d0 52822: 3012 movew %a2@,%d0 52824: 206e fffc moveal %fp@(-4),%a0 52828: 2f00 movel %d0,%sp@- 5282a: 2f2a 0084 movel %a2@(132),%sp@- 5282e: daa8 001a addl %a0@(26),%d5 52832: 2f05 movel %d5,%sp@- 52834: 4e94 jsr %a4@ sc = rtems_bdbuf_release_modified(bd); 52836: 2f2e fffc movel %fp@(-4),%sp@- 5283a: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 5283c: 4fef 0010 lea %sp@(16),%sp 52840: 4a80 tstl %d0 52842: 6670 bnes 528b4 <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 52844: 4281 clrl %d1 52846: 122a 000d moveb %a2@(13),%d1 5284a: 4280 clrl %d0 5284c: 1002 moveb %d2,%d0 5284e: b280 cmpl %d0,%d1 52850: 6200 ff7c bhiw 527ce sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; 52854: 4280 clrl %d0 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 52856: 4201 clrb %d1 52858: 1541 007f moveb %d1,%a2@(127) return RC_OK; } 5285c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 52862: 4e5e unlk %fp 52864: 4e75 rts return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 52866: 4202 clrb %d2 52868: 6000 ff14 braw 5277e fat_buf_release(fat_fs_info_t *fs_info) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 5286c: 4280 clrl %d0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 5286e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 52874: 4e5e unlk %fp 52876: 4e75 rts } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 52878: 2f2a 0080 movel %a2@(128),%sp@- 5287c: 4eb9 0005 07c4 jsr 507c4 if (sc != RTEMS_SUCCESSFUL) 52882: 588f addql #4,%sp 52884: 4a80 tstl %d0 52886: 67cc beqs 52854 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 52888: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5288e: 7205 moveq #5,%d1 <== NOT EXECUTED 52890: 2040 moveal %d0,%a0 <== NOT EXECUTED 52892: 70ff moveq #-1,%d0 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 52894: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED } else { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); 5289a: 2081 movel %d1,%a0@ <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 5289c: 4e5e unlk %fp <== NOT EXECUTED 5289e: 4e75 rts <== NOT EXECUTED 0); if (blk_ofs == 0 && fs_info->vol.bps == fs_info->vol.bytes_per_block) { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 528a0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 528a2: 2044 moveal %d4,%a0 <== NOT EXECUTED 528a4: 2f07 movel %d7,%sp@- <== NOT EXECUTED 528a6: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 528aa: 4e90 jsr %a0@ <== NOT EXECUTED 528ac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 528b0: 6000 ff66 braw 52818 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(bd); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 528b4: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 528ba: 740c moveq #12,%d2 <== NOT EXECUTED 528bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 528be: 70ff moveq #-1,%d0 <== NOT EXECUTED 528c0: 2082 movel %d2,%a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 528c2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 528c8: 4e5e unlk %fp <== NOT EXECUTED 528ca: 4e75 rts <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 528cc: 2400 movel %d0,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 528ce: 4284 clrl %d4 528d0: 0283 0000 00ff andil #255,%d3 528d6: 0281 0000 00ff andil #255,%d1 fs_info->c.buf->buffer + blk_ofs, 528dc: 206a 0080 moveal %a2@(128),%a0 528e0: 9283 subl %d3,%d1 528e2: e2aa lsrl %d1,%d2 static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 528e4: e3aa lsll %d1,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 528e6: 3812 movew %a2@,%d4 fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info, const uint32_t sector, const uint32_t sector_offset) { return sector_offset + ((sector - 528e8: 9082 subl %d2,%d0 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 528ea: e7a8 lsll %d3,%d0 528ec: 2f04 movel %d4,%sp@- 528ee: d0a8 001a addl %a0@(26),%d0 528f2: 2f00 movel %d0,%sp@- 528f4: 2f2a 0084 movel %a2@(132),%sp@- return RC_OK; if (fs_info->c.modified) { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 528f8: 7401 moveq #1,%d2 uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info, sec_num, 0); if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, 528fa: 4eb9 0005 b188 jsr 5b188 52900: 4fef 000c lea %sp@(12),%sp 52904: 6000 fe78 braw 5277e =============================================================================== 00052b1a : const uint32_t offset, const uint32_t count, const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52b1a: 4280 clrl %d0 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52b1c: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 52b20: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 52b24: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 52b28: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 52b2c: 162e 001b moveb %fp@(27),%d3 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52b30: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52b34: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52b38: 9081 subl %d1,%d0 <== NOT EXECUTED 52b3a: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED fat_fs_info_t *fs_info, const uint32_t start_cln, const uint32_t offset, const uint32_t count, const uint8_t pattern) { 52b3e: 3043 moveaw %d3,%a0 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52b40: b08d cmpl %a5,%d0 <== NOT EXECUTED 52b42: 6402 bccs 52b46 <== NOT EXECUTED 52b44: 2a40 moveal %d0,%a5 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52b46: 4a82 tstl %d2 <== NOT EXECUTED 52b48: 660e bnes 52b58 <== NOT EXECUTED 52b4a: 7c03 moveq #3,%d6 <== NOT EXECUTED 52b4c: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 52b50: c086 andl %d6,%d0 <== NOT EXECUTED 52b52: 4a00 tstb %d0 <== NOT EXECUTED 52b54: 6600 0106 bnew 52c5c <== NOT EXECUTED blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52b58: 4283 clrl %d3 <== NOT EXECUTED 52b5a: 162a 0008 moveb %a2@(8),%d3 <== NOT EXECUTED 52b5e: 4280 clrl %d0 <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52b60: 4285 clrl %d5 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; 52b62: 5582 subql #2,%d2 <== NOT EXECUTED 52b64: 1a2a 0002 moveb %a2@(2),%d5 <== NOT EXECUTED blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52b68: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52b6c: 282a 0030 movel %a2@(48),%d4 <== NOT EXECUTED 52b70: 1007 moveb %d7,%d0 <== NOT EXECUTED 52b72: 9680 subl %d0,%d3 <== NOT EXECUTED 52b74: 2c00 movel %d0,%d6 <== NOT EXECUTED 52b76: 9c85 subl %d5,%d6 <== NOT EXECUTED 52b78: ecac lsrl %d6,%d4 <== NOT EXECUTED 52b7a: e7aa lsll %d3,%d2 <== NOT EXECUTED blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 52b7c: d882 addl %d2,%d4 <== NOT EXECUTED const uint8_t pattern) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 52b7e: 2601 movel %d1,%d3 <== NOT EXECUTED 52b80: e0ab lsrl %d0,%d3 <== NOT EXECUTED uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; 52b82: d883 addl %d3,%d4 <== NOT EXECUTED { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52b84: 2841 moveal %d1,%a4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52b86: 4285 clrl %d5 <== NOT EXECUTED { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52b88: e1ab lsll %d0,%d3 <== NOT EXECUTED 52b8a: 99c3 subal %d3,%a4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52b8c: 4a8d tstl %a5 <== NOT EXECUTED 52b8e: 6700 00c0 beqw 52c50 <== NOT EXECUTED if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52b92: 2c0e movel %fp,%d6 <== NOT EXECUTED 52b94: 5986 subql #4,%d6 <== NOT EXECUTED 52b96: 47f9 0005 2908 lea 52908 ,%a3 <== NOT EXECUTED if (RC_OK == rc) { memset(blk_buf + offset, pattern, bytes_to_write); 52b9c: 3608 movew %a0,%d3 <== NOT EXECUTED 52b9e: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 52ba4: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) { uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 52ba8: 4280 clrl %d0 <== NOT EXECUTED 52baa: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 52bae: 2200 movel %d0,%d1 <== NOT EXECUTED 52bb0: 928c subl %a4,%d1 <== NOT EXECUTED 52bb2: 2401 movel %d1,%d2 <== NOT EXECUTED 52bb4: bbc1 cmpal %d1,%a5 <== NOT EXECUTED 52bb6: 6402 bccs 52bba <== NOT EXECUTED 52bb8: 240d movel %a5,%d2 <== NOT EXECUTED const uint32_t offset, const uint32_t count, const uint8_t pattern) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 52bba: 2602 movel %d2,%d3 <== NOT EXECUTED 52bbc: b282 cmpl %d2,%d1 <== NOT EXECUTED 52bbe: 6402 bccs 52bc2 <== NOT EXECUTED 52bc0: 2601 movel %d1,%d3 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52bc2: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 52bc6: 4a83 tstl %d3 <== NOT EXECUTED 52bc8: 6756 beqs 52c20 <== NOT EXECUTED static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52bca: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 52bd0: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED 52bd6: 9e81 subl %d1,%d7 <== NOT EXECUTED 52bd8: 2204 movel %d4,%d1 <== NOT EXECUTED 52bda: efa9 lsll %d7,%d1 <== NOT EXECUTED { if (bytes_to_write == fs_info->vol.bytes_per_block) 52bdc: b680 cmpl %d0,%d3 <== NOT EXECUTED 52bde: 675a beqs 52c3a <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52be0: 2f06 movel %d6,%sp@- <== NOT EXECUTED 52be2: 4878 0001 pea 1 <== NOT EXECUTED 52be6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52be8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52bea: 4e93 jsr %a3@ <== NOT EXECUTED 52bec: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (RC_OK == rc) 52bf0: 4a80 tstl %d0 <== NOT EXECUTED 52bf2: 6710 beqs 52c04 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52bf4: b480 cmpl %d0,%d2 <== NOT EXECUTED 52bf6: 672e beqs 52c26 <== NOT EXECUTED 52bf8: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52bfa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52c00: 4e5e unlk %fp <== NOT EXECUTED 52c02: 4e75 rts <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memset(blk_buf + offset, pattern, bytes_to_write); 52c04: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52c06: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 52c0a: d9ee fffc addal %fp@(-4),%a4 <== NOT EXECUTED 52c0e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 52c10: 4eb9 0005 b1f8 jsr 5b1f8 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52c16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52c1a: 7001 moveq #1,%d0 <== NOT EXECUTED 52c1c: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED } } if (RC_OK != rc) return rc; else return bytes_to_write; 52c20: 2003 movel %d3,%d0 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52c22: b480 cmpl %d0,%d2 <== NOT EXECUTED 52c24: 66d2 bnes 52bf8 <== NOT EXECUTED rc = -1; else { bytes_to_write -= ret; 52c26: 9bc0 subal %d0,%a5 <== NOT EXECUTED bytes_written += ret; 52c28: da80 addl %d0,%d5 <== NOT EXECUTED ++cur_blk; 52c2a: 5284 addql #1,%d4 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52c2c: 4a8d tstl %a5 <== NOT EXECUTED 52c2e: 6720 beqs 52c50 <== NOT EXECUTED 52c30: 99cc subal %a4,%a4 <== NOT EXECUTED 52c32: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52c36: 6000 ff70 braw 52ba8 <== NOT EXECUTED if (0 < bytes_to_write) { if (bytes_to_write == fs_info->vol.bytes_per_block) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52c3a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 52c3c: 4878 0002 pea 2 <== NOT EXECUTED 52c40: 2f01 movel %d1,%sp@- <== NOT EXECUTED 52c42: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52c44: 4e93 jsr %a3@ <== NOT EXECUTED 52c46: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) 52c4a: 4a80 tstl %d0 <== NOT EXECUTED 52c4c: 66a6 bnes 52bf4 <== NOT EXECUTED 52c4e: 60b4 bras 52c04 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 52c50: 2005 movel %d5,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52c52: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52c58: 4e5e unlk %fp <== NOT EXECUTED 52c5a: 4e75 rts <== NOT EXECUTED static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52c5c: 4282 clrl %d2 <== NOT EXECUTED 52c5e: 142a 0002 moveb %a2@(2),%d2 <== NOT EXECUTED 52c62: 4280 clrl %d0 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52c64: 1e2a 000c moveb %a2@(12),%d7 <== NOT EXECUTED 52c68: 282a 001e movel %a2@(30),%d4 <== NOT EXECUTED 52c6c: 1007 moveb %d7,%d0 <== NOT EXECUTED 52c6e: 2600 movel %d0,%d3 <== NOT EXECUTED 52c70: 9682 subl %d2,%d3 <== NOT EXECUTED 52c72: e6ac lsrl %d3,%d4 <== NOT EXECUTED 52c74: 6000 ff08 braw 52b7e <== NOT EXECUTED =============================================================================== 00052c78 : const uint32_t count, const void *buff, const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c78: 4280 clrl %d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52c7a: 4e56 ffcc linkw %fp,#-52 52c7e: 222e 0010 movel %fp@(16),%d1 52c82: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52c86: 246e 0008 moveal %fp@(8),%a2 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c8a: 302a 0006 movew %a2@(6),%d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52c8e: 242e 000c movel %fp@(12),%d2 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c92: 9081 subl %d1,%d0 52c94: 2a6e 0014 moveal %fp@(20),%a5 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 52c98: 1c2e 001f moveb %fp@(31),%d6 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 52c9c: b08d cmpl %a5,%d0 52c9e: 6402 bccs 52ca2 <== ALWAYS TAKEN 52ca0: 2a40 moveal %d0,%a5 <== NOT EXECUTED fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 52ca2: 4a82 tstl %d2 52ca4: 660e bnes 52cb4 <== NEVER TAKEN 52ca6: 7603 moveq #3,%d3 52ca8: 102a 000e moveb %a2@(14),%d0 52cac: c083 andl %d3,%d0 52cae: 4a00 tstb %d0 52cb0: 6600 0124 bnew 52dd6 blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52cb4: 4283 clrl %d3 52cb6: 162a 0008 moveb %a2@(8),%d3 52cba: 4285 clrl %d5 52cbc: 1a2a 0002 moveb %a2@(2),%d5 52cc0: 4280 clrl %d0 if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc); else { cln -= FAT_RSRVD_CLN; 52cc2: 5582 subql #2,%d2 52cc4: 2045 moveal %d5,%a0 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 52cc6: 1e2a 000c moveb %a2@(12),%d7 52cca: 282a 0030 movel %a2@(48),%d4 52cce: 1007 moveb %d7,%d0 52cd0: 9680 subl %d0,%d3 52cd2: 2240 moveal %d0,%a1 52cd4: 93c8 subal %a0,%a1 52cd6: 2a09 movel %a1,%d5 52cd8: eaac lsrl %d5,%d4 52cda: e7aa lsll %d3,%d2 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 52cdc: d882 addl %d2,%d4 const bool overwrite_cluster) { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 52cde: 2601 movel %d1,%d3 52ce0: e0ab lsrl %d0,%d3 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 52ce2: d883 addl %d3,%d4 { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52ce4: 2841 moveal %d1,%a4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52ce6: 4285 clrl %d5 { ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 52ce8: e1ab lsll %d0,%d3 52cea: 99c3 subal %d3,%a4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52cec: 4a8d tstl %a5 52cee: 6700 00da beqw 52dca if (0 < bytes_to_write) { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52cf2: 47f9 0005 2908 lea 52908 ,%a3 52cf8: 3247 moveaw %d7,%a1 52cfa: 2e0c movel %a4,%d7 52cfc: 284a moveal %a2,%a4 52cfe: 1d46 fffb moveb %d6,%fp@(-5) 52d02: 246e 0018 moveal %fp@(24),%a2 52d06: 2d45 fff6 movel %d5,%fp@(-10) cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) { c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk)); 52d0a: 4281 clrl %d1 52d0c: 322c 000a movew %a4@(10),%d1 52d10: 2001 movel %d1,%d0 52d12: 9087 subl %d7,%d0 52d14: 2400 movel %d0,%d2 52d16: bbc0 cmpal %d0,%a5 52d18: 6402 bccs 52d1c 52d1a: 240d movel %a5,%d2 const uint32_t count, const void *buf, const bool overwrite_block) { int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); 52d1c: 2602 movel %d2,%d3 52d1e: b082 cmpl %d2,%d0 52d20: 6402 bccs 52d24 <== ALWAYS TAKEN 52d22: 2600 movel %d0,%d3 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 52d24: 1c2c 0002 moveb %a4@(2),%d6 int rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset)); uint8_t *blk_buf; uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk); if (0 < bytes_to_write) 52d28: 4a83 tstl %d3 52d2a: 6764 beqs 52d90 <== NEVER TAKEN static inline uint32_t fat_block_num_to_sector_num (const fat_fs_info_t *fs_info, const uint32_t block_number) { return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52d2c: 4280 clrl %d0 52d2e: 3a09 movew %a1,%d5 52d30: 0286 0000 00ff andil #255,%d6 52d36: 1005 moveb %d5,%d0 52d38: 9086 subl %d6,%d0 52d3a: 2a04 movel %d4,%d5 52d3c: e1ad lsll %d0,%d5 52d3e: 2005 movel %d5,%d0 { if ( overwrite_block 52d40: 4a2e fffb tstb %fp@(-5) 52d44: 6668 bnes 52dae || (bytes_to_write == fs_info->vol.bytes_per_block)) 52d46: b681 cmpl %d1,%d3 52d48: 6764 beqs 52dae { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 52d4a: 486e fffc pea %fp@(-4) 52d4e: 4878 0001 pea 1 52d52: 2f05 movel %d5,%sp@- 52d54: 2f0c movel %a4,%sp@- 52d56: 4e93 jsr %a3@ 52d58: 4fef 0010 lea %sp@(16),%sp if (RC_OK == rc) 52d5c: 4a80 tstl %d0 52d5e: 6710 beqs 52d70 <== ALWAYS TAKEN cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52d60: b480 cmpl %d0,%d2 <== NOT EXECUTED 52d62: 6732 beqs 52d96 <== NOT EXECUTED 52d64: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 52d66: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52d6c: 4e5e unlk %fp <== NOT EXECUTED 52d6e: 4e75 rts <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) { memcpy(blk_buf + offset, buf, bytes_to_write); 52d70: 206e fff6 moveal %fp@(-10),%a0 52d74: deae fffc addl %fp@(-4),%d7 52d78: 2f03 movel %d3,%sp@- 52d7a: 4872 8800 pea %a2@(00000000,%a0:l) 52d7e: 2f07 movel %d7,%sp@- 52d80: 4eb9 0005 b188 jsr 5b188 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52d86: 4fef 000c lea %sp@(12),%sp 52d8a: 7001 moveq #1,%d0 52d8c: 1940 007e moveb %d0,%a4@(126) } } if (RC_OK != rc) return rc; else return bytes_to_write; 52d90: 2003 movel %d3,%d0 cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52d92: b480 cmpl %d0,%d2 52d94: 66ce bnes 52d64 <== NEVER TAKEN rc = -1; else { bytes_to_write -= ret; 52d96: 9bc0 subal %d0,%a5 bytes_written += ret; 52d98: d1ae fff6 addl %d0,%fp@(-10) ++cur_blk; 52d9c: 5284 addql #1,%d4 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 52d9e: 4a8d tstl %a5 52da0: 6724 beqs 52dc6 <== ALWAYS TAKEN 52da2: 4287 clrl %d7 <== NOT EXECUTED 52da4: 162c 000c moveb %a4@(12),%d3 <== NOT EXECUTED 52da8: 3243 moveaw %d3,%a1 <== NOT EXECUTED 52daa: 6000 ff5e braw 52d0a <== NOT EXECUTED if (0 < bytes_to_write) { if ( overwrite_block || (bytes_to_write == fs_info->vol.bytes_per_block)) { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 52dae: 486e fffc pea %fp@(-4) 52db2: 4878 0002 pea 2 52db6: 2f00 movel %d0,%sp@- 52db8: 2f0c movel %a4,%sp@- 52dba: 4e93 jsr %a3@ 52dbc: 4fef 0010 lea %sp@(16),%sp } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); if (RC_OK == rc) 52dc0: 4a80 tstl %d0 52dc2: 669c bnes 52d60 <== NEVER TAKEN 52dc4: 60aa bras 52d70 52dc6: 2a2e fff6 movel %fp@(-10),%d5 cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 52dca: 2005 movel %d5,%d0 } if (RC_OK != rc) return rc; else return bytes_written; } 52dcc: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 52dd2: 4e5e unlk %fp 52dd4: 4e75 rts static inline uint32_t fat_sector_num_to_block_num (const fat_fs_info_t *fs_info, const uint32_t sector_number) { return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2); 52dd6: 4282 clrl %d2 52dd8: 142a 0002 moveb %a2@(2),%d2 52ddc: 4280 clrl %d0 uint32_t ino ) { return (ino >= fs_info->uino_base); } 52dde: 1e2a 000c moveb %a2@(12),%d7 52de2: 282a 001e movel %a2@(30),%d4 52de6: 1007 moveb %d7,%d0 52de8: 2a00 movel %d0,%d5 52dea: 9a82 subl %d2,%d5 52dec: eaac lsrl %d5,%d4 52dee: 6000 feee braw 52cde =============================================================================== 00051f16 : /* * 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) 51f16: 7201 moveq #1,%d1 int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 51f18: 4e56 0000 linkw %fp,#0 51f1c: 2f0a movel %a2,%sp@- 51f1e: 246e 000c moveal %fp@(12),%a2 51f22: 2f02 movel %d2,%sp@- 51f24: 242e 0008 movel %fp@(8),%d2 /* * 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) 51f28: 202a 0008 movel %a2@(8),%d0 51f2c: b280 cmpl %d0,%d1 51f2e: 6414 bccs 51f44 { fat_fd->links_num--; 51f30: 5380 subql #1,%d0 51f32: 2540 0008 movel %d0,%a2@(8) return rc; 51f36: 4280 clrl %d0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 51f38: 242e fff8 movel %fp@(-8),%d2 51f3c: 246e fffc moveal %fp@(-4),%a2 51f40: 4e5e unlk %fp 51f42: 4e75 rts return rc; } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 51f44: 102a 0030 moveb %a2@(48),%d0 51f48: 0800 0000 btst #0,%d0 51f4c: 674e beqs 51f9c <== ALWAYS TAKEN { rc = fat_file_truncate(fs_info, fat_fd, 0); 51f4e: 42a7 clrl %sp@- <== NOT EXECUTED 51f50: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f52: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51f54: 4eb9 0005 1e22 jsr 51e22 <== NOT EXECUTED if ( rc != RC_OK ) 51f5a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51f5e: 4a80 tstl %d0 <== NOT EXECUTED 51f60: 66d6 bnes 51f38 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 51f62: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f64: 4eb9 0005 5698 jsr 55698 <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) 51f6a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 51f6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51f70: 4eb9 0005 3a70 jsr 53a70 <== NOT EXECUTED 51f76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51f7a: 4a00 tstb %d0 <== NOT EXECUTED 51f7c: 666e bnes 51fec <== NOT EXECUTED fat_free_unique_ino(fs_info, fat_fd->ino); free(fat_fd); 51f7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51f80: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED 51f86: 588f addql #4,%sp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51f88: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 51f8c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 51f90: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 51f94: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51f96: 4ef9 0005 2738 jmp 52738 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 51f9c: 2f2a 000c movel %a2@(12),%sp@- 51fa0: 2f02 movel %d2,%sp@- 51fa2: 4eb9 0005 3a70 jsr 53a70 51fa8: 508f addql #8,%sp 51faa: 4a00 tstb %d0 51fac: 6718 beqs 51fc6 <== ALWAYS TAKEN { fat_fd->links_num = 0; 51fae: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 51fb2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51fb6: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 51fba: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 51fbe: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51fc0: 4ef9 0005 2738 jmp 52738 <== NOT EXECUTED 51fc6: 2f0a movel %a2,%sp@- 51fc8: 4eb9 0005 5698 jsr 55698 <_Chain_Extract> fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 51fce: 2f0a movel %a2,%sp@- 51fd0: 4eb9 0004 4bec jsr 44bec * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 51fd6: 246e fffc moveal %fp@(-4),%a2 fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 51fda: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51fdc: 2d42 0008 movel %d2,%fp@(8) return rc; } 51fe0: 242e fff8 movel %fp@(-8),%d2 51fe4: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 51fe6: 4ef9 0005 2738 jmp 52738 return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(fs_info, fat_fd->ino) ) fat_free_unique_ino(fs_info, fat_fd->ino); 51fec: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 51ff0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51ff2: 4eb9 0005 3a3e jsr 53a3e <== NOT EXECUTED 51ff8: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 51ffa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51ffc: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED 52002: 588f addql #4,%sp <== NOT EXECUTED 52004: 6082 bras 51f88 <== NOT EXECUTED =============================================================================== 000520bc : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 520bc: 4e56 ffcc linkw %fp,#-52 520c0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 520c4: 242e 0014 movel %fp@(20),%d2 520c8: 286e 0018 moveal %fp@(24),%a4 520cc: 246e 000c moveal %fp@(12),%a2 uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; 520d0: 2882 movel %d2,%a4@ fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 520d2: 266e 0008 moveal %fp@(8),%a3 uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 520d6: 202a 0018 movel %a2@(24),%d0 fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 520da: 1a2e 0013 moveb %fp@(19),%d5 int rc = RC_OK; uint32_t chain = 0; 520de: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 520e2: 42ae fff8 clrl %fp@(-8) uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 520e6: b082 cmpl %d2,%d0 520e8: 6400 00d8 bccw 521c2 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 520ec: 7201 moveq #1,%d1 520ee: b2aa 0020 cmpl %a2@(32),%d1 520f2: 6700 00e2 beqw 521d6 (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))) & 520f6: 4283 clrl %d3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 520f8: 2042 moveal %d2,%a0 520fa: 91c0 subal %d0,%a0 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))) & 520fc: 362b 0006 movew %a3@(6),%d3 52100: 2203 movel %d3,%d1 52102: 5381 subql #1,%d1 52104: 2c01 movel %d1,%d6 52106: cc80 andl %d0,%d6 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 - 52108: 9686 subl %d6,%d3 5210a: c681 andl %d1,%d3 (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) 5210c: b1c3 cmpal %d3,%a0 5210e: 6300 00c0 blsw 521d0 bytes2add -= bytes_remain; 52112: 2e08 movel %a0,%d7 52114: 9e83 subl %d3,%d7 else bytes2add = 0; if (zero_fill && bytes_remain > 0) { 52116: 4a05 tstb %d5 52118: 6706 beqs 52120 <== ALWAYS TAKEN 5211a: 4a83 tstl %d3 <== NOT EXECUTED 5211c: 6600 00e8 bnew 52206 <== NOT EXECUTED /* * 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) 52120: 4a87 tstl %d7 52122: 6700 009e beqw 521c2 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 52126: 4281 clrl %d1 52128: 122b 0008 moveb %a3@(8),%d1 5212c: 2007 movel %d7,%d0 5212e: 5380 subql #1,%d0 52130: e2a8 lsrl %d1,%d0 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52132: 0285 0000 00ff andil #255,%d5 52138: 2f05 movel %d5,%sp@- 5213a: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 5213e: 2a00 movel %d0,%d5 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52140: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 52144: 5285 addql #1,%d5 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52146: 2f05 movel %d5,%sp@- 52148: 486e fff0 pea %fp@(-16) 5214c: 2f0b movel %a3,%sp@- 5214e: 4eb9 0005 8fe0 jsr 58fe0 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 52154: 4fef 0018 lea %sp@(24),%sp if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 52158: 2800 movel %d0,%d4 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 5215a: 665a bnes 521b6 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 5215c: 222e fffc movel %fp@(-4),%d1 52160: 6606 bnes 52168 <== ALWAYS TAKEN 52162: 4a83 tstl %d3 <== NOT EXECUTED 52164: 6700 0086 beqw 521ec <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 52168: b285 cmpl %d5,%d1 5216a: 6718 beqs 52184 <== ALWAYS TAKEN { new_length -= bytes2add & (fs_info->vol.bpc - 1); 5216c: 4283 clrl %d3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 5216e: 4280 clrl %d0 <== NOT EXECUTED 52170: 102b 0008 moveb %a3@(8),%d0 <== NOT EXECUTED 52174: 9a81 subl %d1,%d5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); 52176: 362b 0006 movew %a3@(6),%d3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 5217a: e1ad lsll %d0,%d5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) { new_length -= bytes2add & (fs_info->vol.bpc - 1); 5217c: 5383 subql #1,%d3 <== NOT EXECUTED 5217e: ce83 andl %d3,%d7 <== NOT EXECUTED 52180: 9487 subl %d7,%d2 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 52182: 9485 subl %d5,%d2 <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 52184: 206a 0018 moveal %a2@(24),%a0 52188: 4a88 tstl %a0 5218a: 6600 00c2 bnew 5224e { fat_fd->map.disk_cln = fat_fd->cln = chain; 5218e: 202e fff0 movel %fp@(-16),%d0 fat_fd->map.file_cln = 0; 52192: 42aa 0032 clrl %a2@(50) } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 52196: 2540 001c movel %d0,%a2@(28) 5219a: 2540 0036 movel %d0,%a2@(54) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 5219e: 4a81 tstl %d1 521a0: 670e beqs 521b0 <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; 521a2: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 521a8: 4aaa 0010 tstl %a2@(16) 521ac: 6700 00d6 beqw 52284 return rc; } } } *a_length = new_length; 521b0: 2882 movel %d2,%a4@ fat_fd->fat_file_size = new_length; 521b2: 2542 0018 movel %d2,%a2@(24) return RC_OK; } 521b6: 2004 movel %d4,%d0 521b8: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 521be: 4e5e unlk %fp 521c0: 4e75 rts ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; 521c2: 4284 clrl %d4 *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 521c4: 2004 movel %d4,%d0 521c6: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 521cc: 4e5e unlk %fp 521ce: 4e75 rts bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) bytes2add -= bytes_remain; else bytes2add = 0; 521d0: 4287 clrl %d7 <== NOT EXECUTED 521d2: 6000 ff42 braw 52116 <== 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)) && 521d6: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 521da: 6600 ff1a bnew 520f6 <== NOT EXECUTED 521de: 7603 moveq #3,%d3 <== NOT EXECUTED 521e0: 122b 000e moveb %a3@(14),%d1 <== NOT EXECUTED 521e4: c283 andl %d3,%d1 <== NOT EXECUTED 521e6: 4a01 tstb %d1 <== NOT EXECUTED 521e8: 6700 ff0c beqw 520f6 <== 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); 521ec: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 521f2: 78ff moveq #-1,%d4 <== NOT EXECUTED 521f4: 761c moveq #28,%d3 <== NOT EXECUTED 521f6: 2040 moveal %d0,%a0 <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 521f8: 2004 movel %d4,%d0 <== 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); 521fa: 2083 movel %d3,%a0@ <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 521fc: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 52202: 4e5e unlk %fp <== NOT EXECUTED 52204: 4e75 rts <== NOT EXECUTED uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 52206: 486e fffc pea %fp@(-4) <== NOT EXECUTED else bytes2add = 0; if (zero_fill && bytes_remain > 0) { uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; 5220a: 4281 clrl %d1 <== NOT EXECUTED 5220c: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED 52210: e2a8 lsrl %d1,%d0 <== NOT EXECUTED uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 52212: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52214: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52216: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52218: 4eba f64e jsr %pc@(51868 ) <== NOT EXECUTED if (rc != RC_OK) 5221c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED uint32_t start = fat_fd->fat_file_size; uint32_t cl_start = start >> fs_info->vol.bpc_log2; uint32_t ofs = start & (fs_info->vol.bpc - 1); uint32_t cur_cln; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 52220: 2801 movel %d1,%d4 <== NOT EXECUTED if (rc != RC_OK) 52222: 6692 bnes 521b6 <== NOT EXECUTED return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 52224: 42a7 clrl %sp@- <== NOT EXECUTED 52226: 2f03 movel %d3,%sp@- <== NOT EXECUTED 52228: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5222a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5222e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52230: 4eb9 0005 2b1a jsr 52b1a <== NOT EXECUTED if (bytes_remain != bytes_written) 52236: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5223a: b680 cmpl %d0,%d3 <== NOT EXECUTED 5223c: 6700 fee2 beqw 52120 <== NOT EXECUTED return -1; 52240: 78ff moveq #-1,%d4 <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 52242: 2004 movel %d4,%d0 <== NOT EXECUTED 52244: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 5224a: 4e5e unlk %fp <== NOT EXECUTED 5224c: 4e75 rts <== 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) 5224e: 202a 003a movel %a2@(58),%d0 52252: 72ff moveq #-1,%d1 52254: b280 cmpl %d0,%d1 52256: 675c beqs 522b4 <== NEVER TAKEN fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 52258: 2f2e fff0 movel %fp@(-16),%sp@- 5225c: 2f00 movel %d0,%sp@- } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) { old_last_cl = fat_fd->map.last_cln; 5225e: 2d40 fff4 movel %d0,%fp@(-12) fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 52262: 2f0b movel %a3,%sp@- 52264: 4eb9 0005 8c92 jsr 58c92 if ( rc != RC_OK ) 5226a: 4fef 000c lea %sp@(12),%sp 5226e: 4a80 tstl %d0 52270: 6626 bnes 52298 <== NEVER TAKEN { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); 52272: 2f0b movel %a3,%sp@- 52274: 4eb9 0005 2738 jsr 52738 5227a: 222e fffc movel %fp@(-4),%d1 5227e: 588f addql #4,%sp 52280: 6000 ff1c braw 5219e if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(fs_info, chain); 52284: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 52288: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5228a: 4eb9 0005 38fa jsr 538fa <== NOT EXECUTED if ( rc != RC_OK ) 52290: 508f addql #8,%sp <== NOT EXECUTED 52292: 4a80 tstl %d0 <== NOT EXECUTED 52294: 6700 ff1a beqw 521b0 <== NOT EXECUTED { fat_free_fat_clusters_chain(fs_info, chain); 52298: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 5229c: 2800 movel %d0,%d4 <== NOT EXECUTED 5229e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 522a0: 4eb9 0005 8f0e jsr 58f0e <== NOT EXECUTED 522a6: 508f addql #8,%sp <== NOT EXECUTED *a_length = new_length; fat_fd->fat_file_size = new_length; return RC_OK; } 522a8: 2004 movel %d4,%d0 <== NOT EXECUTED 522aa: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 <== NOT EXECUTED 522b0: 4e5e unlk %fp <== NOT EXECUTED 522b2: 4e75 rts <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 522b4: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 522b8: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 522bc: 4878 0001 pea 1 <== NOT EXECUTED 522c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 522c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 522c4: 4eb9 0005 2006 jsr 52006 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 522ca: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 522ce: 4a80 tstl %d0 <== NOT EXECUTED 522d0: 66c6 bnes 52298 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 522d2: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 522d6: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED 522da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 522dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 522de: 4eb9 0005 8c92 jsr 58c92 <== NOT EXECUTED if ( rc != RC_OK ) 522e4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 522e8: 4a80 tstl %d0 <== NOT EXECUTED 522ea: 6786 beqs 52272 <== NOT EXECUTED 522ec: 60aa bras 52298 <== NOT EXECUTED =============================================================================== 00052006 : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 52006: 7001 moveq #1,%d0 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 52008: 4e56 fffc linkw %fp,#-4 5200c: 226e 0008 moveal %fp@(8),%a1 52010: 2f0a movel %a2,%sp@- 52012: 206e 000c moveal %fp@(12),%a0 52016: 2f02 movel %d2,%sp@- int rc = RC_OK; uint32_t cur_cln = 0; 52018: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 5201c: b0ae 0010 cmpl %fp@(16),%d0 52020: 671a beqs 5203c <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; 52022: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 52028: 7216 moveq #22,%d1 <== NOT EXECUTED 5202a: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = -1; 5202c: 70ff moveq #-1,%d0 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 5202e: 2081 movel %d1,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 52030: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 52034: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 52038: 4e5e unlk %fp <== NOT EXECUTED 5203a: 4e75 rts <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 5203c: 202e 0014 movel %fp@(20),%d0 ret = va_arg(ap, uint32_t *); 52040: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 52044: b0a8 0018 cmpl %a0@(24),%d0 52048: 6458 bccs 520a2 <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5204a: 7201 moveq #1,%d1 5204c: b2a8 0020 cmpl %a0@(32),%d1 52050: 672e beqs 52080 <== ALWAYS TAKEN break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 52052: 486e fffc pea %fp@(-4) <== NOT EXECUTED *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 52056: 4281 clrl %d1 <== NOT EXECUTED 52058: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED 5205c: e2a8 lsrl %d1,%d0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 5205e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52060: 2f08 movel %a0,%sp@- <== NOT EXECUTED 52062: 2f09 movel %a1,%sp@- <== NOT EXECUTED 52064: 4eba f802 jsr %pc@(51868 ) <== NOT EXECUTED if ( rc != RC_OK ) 52068: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 5206c: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rc != RC_OK ) 5206e: 66c0 bnes 52030 <== NOT EXECUTED break; *ret = cur_cln; 52070: 24ae fffc movel %fp@(-4),%a2@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 52074: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 52078: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 5207c: 4e5e unlk %fp <== NOT EXECUTED 5207e: 4e75 rts <== NOT EXECUTED 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)) && 52080: 4aa8 0024 tstl %a0@(36) 52084: 66cc bnes 52052 <== NEVER TAKEN 52086: 7403 moveq #3,%d2 52088: 1229 000e moveb %a1@(14),%d1 5208c: c282 andl %d2,%d1 5208e: 4a01 tstb %d1 52090: 67c0 beqs 52052 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 52092: 4292 clrl %a2@ rc = -1; break; } va_end(ap); return rc; } 52094: 242e fff4 movel %fp@(-12),%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; rc = RC_OK; 52098: 4280 clrl %d0 rc = -1; break; } va_end(ap); return rc; } 5209a: 246e fff8 moveal %fp@(-8),%a2 5209e: 4e5e unlk %fp 520a0: 4e75 rts 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 ); 520a2: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 520a8: 7405 moveq #5,%d2 <== NOT EXECUTED 520aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 520ac: 70ff moveq #-1,%d0 <== NOT EXECUTED 520ae: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 520b0: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 520b4: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 520b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051868 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 51868: 4e56 ffe0 linkw %fp,#-32 5186c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 51870: 266e 000c moveal %fp@(12),%a3 51874: 282e 0008 movel %fp@(8),%d4 51878: 2c2e 0010 movel %fp@(16),%d6 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 5187c: 202b 0032 movel %a3@(50),%d0 51880: bc80 cmpl %d0,%d6 51882: 6776 beqs 518fa <== NEVER TAKEN 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; 51884: 2406 movel %d6,%d2 { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 51886: bc80 cmpl %d0,%d6 51888: 6354 blss 518de <== NEVER TAKEN { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 5188a: 9480 subl %d0,%d2 uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 5188c: 2d6b 0036 fffc movel %a3@(54),%fp@(-4) cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 51892: 4a82 tstl %d2 51894: 6724 beqs 518ba <== NEVER TAKEN 51896: 2a0e movel %fp,%d5 51898: 4283 clrl %d3 5189a: 5985 subql #4,%d5 5189c: 45f9 0005 8ac0 lea 58ac0 ,%a2 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 518a2: 2f05 movel %d5,%sp@- 518a4: 2f2e fffc movel %fp@(-4),%sp@- cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 518a8: 5283 addql #1,%d3 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 518aa: 2f04 movel %d4,%sp@- 518ac: 4e92 jsr %a2@ if ( rc != RC_OK ) 518ae: 4fef 000c lea %sp@(12),%sp 518b2: 4a80 tstl %d0 518b4: 6630 bnes 518e6 <== NEVER TAKEN cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 518b6: b483 cmpl %d3,%d2 518b8: 66e8 bnes 518a2 <== NEVER TAKEN return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 518ba: 202e fffc movel %fp@(-4),%d0 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 518be: 2746 0032 movel %d6,%a3@(50) fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 518c2: 206e 0014 moveal %fp@(20),%a0 return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 518c6: 2740 0036 movel %d0,%a3@(54) *disk_cln = cur_cln; } return RC_OK; 518ca: 4282 clrl %d2 518cc: 4283 clrl %d3 /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 518ce: 2080 movel %d0,%a0@ } return RC_OK; } 518d0: 2002 movel %d2,%d0 518d2: 2203 movel %d3,%d1 518d4: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 518da: 4e5e unlk %fp 518dc: 4e75 rts cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 518de: 2d6b 001c fffc movel %a3@(28),%fp@(-4) <== NOT EXECUTED 518e4: 60ac bras 51892 <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; 518e6: 2600 movel %d0,%d3 <== NOT EXECUTED 518e8: 5bc2 smi %d2 <== NOT EXECUTED 518ea: 49c2 extbl %d2 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 518ec: 2002 movel %d2,%d0 <== NOT EXECUTED 518ee: 2203 movel %d3,%d1 <== NOT EXECUTED 518f0: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 518f6: 4e5e unlk %fp <== NOT EXECUTED 518f8: 4e75 rts <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 518fa: 206e 0014 moveal %fp@(20),%a0 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 518fe: 4282 clrl %d2 51900: 4283 clrl %d3 ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 51902: 20ab 0036 movel %a3@(54),%a0@ fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 51906: 2002 movel %d2,%d0 51908: 2203 movel %d3,%d1 5190a: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 51910: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052582 : fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 52582: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_file_mark_removed( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 52584: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED 52588: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 5258c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 52590: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 52594: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 52598: b081 cmpl %d1,%d0 <== NOT EXECUTED 5259a: 6700 008c beqw 52628 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 5259e: 4a81 tstl %d1 <== NOT EXECUTED 525a0: 666e bnes 52610 <== NOT EXECUTED 525a2: 7403 moveq #3,%d2 <== NOT EXECUTED 525a4: 102b 000e moveb %a3@(14),%d0 <== NOT EXECUTED 525a8: c082 andl %d2,%d0 <== NOT EXECUTED 525aa: 4a00 tstb %d0 <== NOT EXECUTED 525ac: 6762 beqs 52610 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 525ae: 4280 clrl %d0 <== NOT EXECUTED 525b0: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 525b4: 222b 001e movel %a3@(30),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 525b8: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 525ba: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 525be: 7609 moveq #9,%d3 <== NOT EXECUTED 525c0: 2400 movel %d0,%d2 <== NOT EXECUTED 525c2: e6aa lsrl %d3,%d2 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 525c4: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 525c6: 740f moveq #15,%d2 <== NOT EXECUTED 525c8: ea88 lsrl #5,%d0 <== NOT EXECUTED _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; 525ca: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 525ce: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 525d0: c082 andl %d2,%d0 <== NOT EXECUTED 525d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 525d4: 2401 movel %d1,%d2 <== NOT EXECUTED 525d6: d480 addl %d0,%d2 <== NOT EXECUTED 525d8: 4eb9 0005 5698 jsr 55698 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 525de: 7001 moveq #1,%d0 <== NOT EXECUTED 525e0: c082 andl %d2,%d0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 525e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 525e4: 2200 movel %d0,%d1 <== NOT EXECUTED 525e6: e988 lsll #4,%d0 <== NOT EXECUTED 525e8: e589 lsll #2,%d1 <== NOT EXECUTED 525ea: 9081 subl %d1,%d0 <== NOT EXECUTED 525ec: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED 525f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 525f2: 4eb9 0004 a044 jsr 4a044 <_Chain_Append> <== NOT EXECUTED _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; 525f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 525fc: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 52600: 8083 orl %d3,%d0 <== NOT EXECUTED 52602: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 52606: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5260c: 4e5e unlk %fp <== NOT EXECUTED 5260e: 4e75 rts <== NOT EXECUTED ) { 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) + 52610: 4280 clrl %d0 <== NOT EXECUTED 52612: 102b 0005 moveb %a3@(5),%d0 <== NOT EXECUTED 52616: 5581 subql #2,%d1 <== NOT EXECUTED 52618: e1a9 lsll %d0,%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 5261a: 4280 clrl %d0 <== NOT EXECUTED 5261c: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED ) { 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) + 52620: d2ab 0030 addl %a3@(48),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 52624: e1a9 lsll %d0,%d1 <== NOT EXECUTED 52626: 6092 bras 525ba <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52628: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 5262c: 7609 moveq #9,%d3 <== NOT EXECUTED 5262e: 2400 movel %d0,%d2 <== NOT EXECUTED 52630: e6aa lsrl %d3,%d2 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 52632: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 52634: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52636: 740f moveq #15,%d2 <== NOT EXECUTED 52638: ea88 lsrl #5,%d0 <== NOT EXECUTED _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; 5263a: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5263e: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52640: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 52642: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 52644: 2401 movel %d1,%d2 <== NOT EXECUTED 52646: d480 addl %d0,%d2 <== NOT EXECUTED 52648: 4eb9 0005 5698 jsr 55698 <_Chain_Extract> <== NOT EXECUTED */ static inline void _hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t *el) { rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link); 5264e: 7001 moveq #1,%d0 <== NOT EXECUTED 52650: c082 andl %d2,%d0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 52652: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52654: 2200 movel %d0,%d1 <== NOT EXECUTED 52656: e988 lsll #4,%d0 <== NOT EXECUTED 52658: e589 lsll #2,%d1 <== NOT EXECUTED 5265a: 9081 subl %d1,%d0 <== NOT EXECUTED 5265c: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED 52660: 2f00 movel %d0,%sp@- <== NOT EXECUTED 52662: 4eb9 0004 a044 jsr 4a044 <_Chain_Append> <== NOT EXECUTED _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; 52668: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5266c: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 52670: 8083 orl %d3,%d0 <== NOT EXECUTED 52672: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 52676: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5267c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051914 : fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 51914: 7201 moveq #1,%d1 fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 51916: 4e56 ffe0 linkw %fp,#-32 5191a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5191e: 286e 000c moveal %fp@(12),%a4 51922: 246e 0008 moveal %fp@(8),%a2 51926: 266e 0010 moveal %fp@(16),%a3 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 5192a: 2014 movel %a4@,%d0 5192c: b280 cmpl %d0,%d1 5192e: 6700 020a beqw 51b3a fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51932: 4a80 tstl %d0 51934: 6600 016e bnew 51aa4 51938: 7403 moveq #3,%d2 5193a: 122a 000e moveb %a2@(14),%d1 5193e: c282 andl %d2,%d1 51940: 4a01 tstb %d1 51942: 6700 0160 beqw 51aa4 ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51946: 4281 clrl %d1 51948: 122a 0003 moveb %a2@(3),%d1 const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 5194c: 202a 001e movel %a2@(30),%d0 ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51950: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51952: 242c 0004 movel %a4@(4),%d2 51956: 7609 moveq #9,%d3 51958: 2202 movel %d2,%d1 5195a: e6a9 lsrl %d3,%d1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 5195c: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5195e: ea8a lsrl #5,%d2 51960: 780f moveq #15,%d4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 51962: 163c 0001 moveb #1,%d3 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51966: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51968: c484 andl %d4,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 5196a: 226a 0062 moveal %a2@(98),%a1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 5196e: d480 addl %d0,%d2 51970: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 51972: 2003 movel %d3,%d0 51974: e98b lsll #4,%d3 51976: e588 lsll #2,%d0 51978: 9680 subl %d0,%d3 5197a: d3c3 addal %d3,%a1 5197c: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 5197e: b3c8 cmpal %a0,%a1 51980: 6752 beqs 519d4 <== NEVER TAKEN 51982: 2228 0020 movel %a0@(32),%d1 ) { 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) + 51986: 2001 movel %d1,%d0 51988: 5580 subql #2,%d0 fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 5198a: 7a01 moveq #1,%d5 5198c: ba81 cmpl %d1,%d5 5198e: 6700 0158 beqw 51ae8 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51992: 4a81 tstl %d1 <== NOT EXECUTED 51994: 6600 0128 bnew 51abe <== NOT EXECUTED 51998: 7803 moveq #3,%d4 <== NOT EXECUTED 5199a: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED 5199e: c284 andl %d4,%d1 <== NOT EXECUTED 519a0: 4a01 tstb %d1 <== NOT EXECUTED 519a2: 6700 011a beqw 51abe <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 519a6: 4281 clrl %d1 <== NOT EXECUTED 519a8: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 519ac: 202a 001e movel %a2@(30),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 519b0: e3a8 lsll %d1,%d0 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 519b2: 2228 0024 movel %a0@(36),%d1 519b6: 7a09 moveq #9,%d5 519b8: 2801 movel %d1,%d4 519ba: eaac lsrl %d5,%d4 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 519bc: d084 addl %d4,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 519be: ea89 lsrl #5,%d1 519c0: 780f moveq #15,%d4 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 519c2: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 519c4: c284 andl %d4,%d1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 519c6: d081 addl %d1,%d0 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 519c8: b082 cmpl %d2,%d0 519ca: 6700 010a beqw 51ad6 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 519ce: 2050 moveal %a0@,%a0 ) { 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) ; ) 519d0: b1c9 cmpal %a1,%a0 519d2: 66ae bnes 51982 <== NEVER TAKEN 519d4: 226a 0066 moveal %a2@(102),%a1 519d8: d3c3 addal %d3,%a1 519da: 2059 moveal %a1@+,%a0 519dc: b3c8 cmpal %a0,%a1 519de: 674e beqs 51a2e <== ALWAYS TAKEN 519e0: 2228 0020 movel %a0@(32),%d1 <== NOT EXECUTED fat_cluster_num_to_sector512_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) 519e4: 7a01 moveq #1,%d5 <== NOT EXECUTED 519e6: ba81 cmpl %d1,%d5 <== NOT EXECUTED 519e8: 6700 0130 beqw 51b1a <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 519ec: 4a81 tstl %d1 <== NOT EXECUTED 519ee: 6600 0110 bnew 51b00 <== NOT EXECUTED 519f2: 7803 moveq #3,%d4 <== NOT EXECUTED 519f4: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 519f8: c084 andl %d4,%d0 <== NOT EXECUTED 519fa: 4a00 tstb %d0 <== NOT EXECUTED 519fc: 6700 0102 beqw 51b00 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a00: 4280 clrl %d0 <== NOT EXECUTED 51a02: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 51a06: 222a 001e movel %a2@(30),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51a0a: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a0c: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 51a10: 7a09 moveq #9,%d5 <== NOT EXECUTED 51a12: 2800 movel %d0,%d4 <== NOT EXECUTED 51a14: eaac lsrl %d5,%d4 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a16: d284 addl %d4,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a18: ea88 lsrl #5,%d0 <== NOT EXECUTED 51a1a: 780f moveq #15,%d4 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51a1c: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51a1e: c084 andl %d4,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51a20: d081 addl %d1,%d0 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 51a22: b082 cmpl %d2,%d0 <== NOT EXECUTED 51a24: 6700 00c8 beqw 51aee <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 51a28: 2050 moveal %a0@,%a0 <== 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) ; ) 51a2a: b3c8 cmpal %a0,%a1 <== NOT EXECUTED 51a2c: 66b2 bnes 519e0 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 51a2e: 78ff moveq #-1,%d4 } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 51a30: 4878 0042 pea 42 51a34: 4eb9 0004 50f4 jsr 450f4 if ( lfat_fd == NULL ) 51a3a: 588f addql #4,%sp } /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 51a3c: 2a40 moveal %d0,%a5 51a3e: 2680 movel %d0,%a3@ if ( lfat_fd == NULL ) 51a40: 6700 0164 beqw 51ba6 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 51a44: 4878 0042 pea 42 lfat_fd->links_num = 1; 51a48: 7a01 moveq #1,%d5 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 51a4a: 42a7 clrl %sp@- 51a4c: 2f00 movel %d0,%sp@- 51a4e: 4eb9 0005 b1f8 jsr 5b1f8 lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 51a54: 2b5c 0020 movel %a4@+,%a5@(32) 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; 51a58: 72fe moveq #-2,%d1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 51a5a: 4fef 000c lea %sp@(12),%sp lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 51a5e: 2b5c 0024 movel %a4@+,%a5@(36) 51a62: 2b5c 0028 movel %a4@+,%a5@(40) 51a66: 2b54 002c movel %a4@,%a5@(44) 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; 51a6a: 102d 0030 moveb %a5@(48),%d0 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; 51a6e: 2b45 0008 movel %d5,%a5@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 51a72: 7aff moveq #-1,%d5 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; 51a74: c081 andl %d1,%d0 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 51a76: 2b45 003a movel %d5,%a5@(58) 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; 51a7a: 1b40 0030 moveb %d0,%a5@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 51a7e: 4a84 tstl %d4 51a80: 6700 00f0 beqw 51b72 lfat_fd->ino = key; 51a84: 2b42 000c movel %d2,%a5@(12) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 51a88: 2f0d movel %a5,%sp@- 51a8a: d6aa 0062 addl %a2@(98),%d3 51a8e: 2f03 movel %d3,%sp@- 51a90: 4eb9 0004 a044 jsr 4a044 <_Chain_Append> 51a96: 508f addql #8,%sp /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 51a98: 4280 clrl %d0 } 51a9a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 51aa0: 4e5e unlk %fp 51aa2: 4e75 rts ) { 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) + 51aa4: 4281 clrl %d1 <== NOT EXECUTED 51aa6: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51aaa: 5580 subql #2,%d0 <== NOT EXECUTED 51aac: e3a8 lsll %d1,%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51aae: 4281 clrl %d1 <== NOT EXECUTED 51ab0: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED ) { 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) + 51ab4: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51ab8: e3a8 lsll %d1,%d0 <== NOT EXECUTED 51aba: 6000 fe96 braw 51952 <== NOT EXECUTED ) { 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) + 51abe: 4281 clrl %d1 <== NOT EXECUTED 51ac0: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51ac4: e3a8 lsll %d1,%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51ac6: 4281 clrl %d1 <== NOT EXECUTED 51ac8: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED ) { 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) + 51acc: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51ad0: e3a8 lsll %d1,%d0 <== NOT EXECUTED 51ad2: 6000 fede braw 519b2 <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 51ad6: 2688 movel %a0,%a3@ <== NOT EXECUTED lfat_fd->links_num++; 51ad8: 4280 clrl %d0 <== NOT EXECUTED 51ada: 52a8 0008 addql #1,%a0@(8) <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51ade: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 51ae4: 4e5e unlk %fp <== NOT EXECUTED 51ae6: 4e75 rts <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 51ae8: 7001 moveq #1,%d0 51aea: 6000 fec6 braw 519b2 fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 51aee: 4a82 tstl %d2 <== NOT EXECUTED 51af0: 6708 beqs 51afa <== NOT EXECUTED 51af2: b4a8 000c cmpl %a0@(12),%d2 <== NOT EXECUTED 51af6: 6600 ff30 bnew 51a28 <== NOT EXECUTED { *ret = (void *)the_node; return 0; 51afa: 4284 clrl %d4 <== NOT EXECUTED 51afc: 6000 ff32 braw 51a30 <== NOT EXECUTED ) { 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) + 51b00: 4280 clrl %d0 <== NOT EXECUTED 51b02: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED 51b06: 5581 subql #2,%d1 <== NOT EXECUTED 51b08: e1a9 lsll %d0,%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b0a: 4280 clrl %d0 <== NOT EXECUTED 51b0c: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED ) { 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) + 51b10: d2aa 0030 addl %a2@(48),%d1 <== NOT EXECUTED ) { if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(fs_info, cln) << 51b14: e1a9 lsll %d0,%d1 <== NOT EXECUTED 51b16: 6000 fef4 braw 51a0c <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51b1a: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 51b1e: 7a09 moveq #9,%d5 <== NOT EXECUTED 51b20: 2800 movel %d0,%d4 <== NOT EXECUTED 51b22: eaac lsrl %d5,%d4 <== NOT EXECUTED const fat_fs_info_t *fs_info, uint32_t cln ) { if (cln == 1) return 1; 51b24: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51b26: d284 addl %d4,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51b28: ea88 lsrl #5,%d0 <== NOT EXECUTED 51b2a: 780f moveq #15,%d4 <== NOT EXECUTED fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51b2c: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51b2e: c084 andl %d4,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51b30: d081 addl %d1,%d0 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); if ( (key1) == ck) 51b32: b082 cmpl %d2,%d0 <== NOT EXECUTED 51b34: 6600 fef2 bnew 51a28 <== NOT EXECUTED 51b38: 60b4 bras 51aee <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51b3a: 242c 0004 movel %a4@(4),%d2 51b3e: 7609 moveq #9,%d3 51b40: 2202 movel %d2,%d1 51b42: e6a9 lsrl %d3,%d1 51b44: 7001 moveq #1,%d0 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51b46: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51b48: ea8a lsrl #5,%d2 51b4a: 780f moveq #15,%d4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 51b4c: 163c 0001 moveb #1,%d3 fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 51b50: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 51b52: c484 andl %d4,%d2 51b54: 226a 0062 moveal %a2@(98),%a1 static inline uint32_t fat_construct_key( const fat_fs_info_t *fs_info, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) + 51b58: d480 addl %d0,%d2 51b5a: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 51b5c: 2003 movel %d3,%d0 51b5e: e98b lsll #4,%d3 51b60: e588 lsll #2,%d0 51b62: 9680 subl %d0,%d3 51b64: d3c3 addal %d3,%a1 51b66: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 51b68: b3c8 cmpal %a0,%a1 51b6a: 6600 fe16 bnew 51982 51b6e: 6000 fe64 braw 519d4 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); 51b72: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51b74: 4eb9 0005 3980 jsr 53980 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 51b7a: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); 51b7c: 2b40 000c movel %d0,%a5@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 51b80: 6600 ff06 bnew 51a88 <== NOT EXECUTED { free((*fat_fd)); 51b84: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 51b86: 4eb9 0004 4bec jsr 44bec <== 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 ); 51b8c: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 51b92: 588f addql #4,%sp <== NOT EXECUTED 51b94: 720c moveq #12,%d1 <== NOT EXECUTED 51b96: 2040 moveal %d0,%a0 <== NOT EXECUTED 51b98: 70ff moveq #-1,%d0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51b9a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED free((*fat_fd)); /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 51ba0: 2081 movel %d1,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51ba2: 4e5e unlk %fp <== NOT EXECUTED 51ba4: 4e75 rts <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 51ba6: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 51bac: 740c moveq #12,%d2 <== NOT EXECUTED 51bae: 2040 moveal %d0,%a0 <== NOT EXECUTED 51bb0: 70ff moveq #-1,%d0 <== NOT EXECUTED 51bb2: 2082 movel %d2,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 51bb4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 51bba: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00051bd0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 51bd0: 4e56 ffcc linkw %fp,#-52 51bd4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 51bd8: 246e 0008 moveal %fp@(8),%a2 51bdc: 266e 000c moveal %fp@(12),%a3 51be0: 282e 0010 movel %fp@(16),%d4 51be4: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 51be8: 42ae fffc clrl %fp@(-4) 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) 51bec: 4a82 tstl %d2 51bee: 6700 0106 beqw 51cf6 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 51bf2: 202b 0018 movel %a3@(24),%d0 51bf6: b880 cmpl %d0,%d4 51bf8: 6400 00fc bccw 51cf6 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 51bfc: b082 cmpl %d2,%d0 51bfe: 6400 0102 bccw 51d02 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 51c02: 2400 movel %d0,%d2 <== NOT EXECUTED 51c04: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 51c06: 7001 moveq #1,%d0 51c08: b0ab 0020 cmpl %a3@(32),%d0 51c0c: 6700 0106 beqw 51d14 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51c10: 4280 clrl %d0 <== NOT EXECUTED 51c12: 102a 0008 moveb %a2@(8),%d0 <== NOT EXECUTED 51c16: 2604 movel %d4,%d3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51c18: 486e fffc pea %fp@(-4) <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51c1c: e0ab lsrl %d0,%d3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51c1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 51c20: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51c24: 2f0b movel %a3,%sp@- <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 51c26: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51c2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51c2c: 4eba fc3a jsr %pc@(51868 ) <== NOT EXECUTED if (rc != RC_OK) 51c30: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 51c34: 4a81 tstl %d1 <== NOT EXECUTED 51c36: 6600 0138 bnew 51d70 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 51c3a: 0286 0000 ffff andil #65535,%d6 <== NOT EXECUTED 51c40: 5386 subql #1,%d6 <== NOT EXECUTED 51c42: c886 andl %d6,%d4 <== NOT EXECUTED 51c44: 2d44 fff4 movel %d4,%fp@(-12) <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51c48: 4a82 tstl %d2 <== NOT EXECUTED 51c4a: 6700 01b0 beqw 51dfc <== NOT EXECUTED 51c4e: 99cc subal %a4,%a4 <== NOT EXECUTED 51c50: 2a0c movel %a4,%d5 <== NOT EXECUTED 51c52: 284a moveal %a2,%a4 <== NOT EXECUTED 51c54: 4bf9 0005 29c4 lea 529c4 <_fat_block_read>,%a5 <== NOT EXECUTED 51c5a: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED 51c5e: 3252 moveaw %a2@,%a1 <== NOT EXECUTED 51c60: 2c2e fff4 movel %fp@(-12),%d6 <== NOT EXECUTED 51c64: 246e 0018 moveal %fp@(24),%a2 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); 51c68: 4280 clrl %d0 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 51c6a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED ) { 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) + 51c6e: 2208 movel %a0,%d1 <== NOT EXECUTED 51c70: 5581 subql #2,%d1 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 51c72: 302c 0006 movew %a4@(6),%d0 <== NOT EXECUTED 51c76: 9086 subl %d6,%d0 <== NOT EXECUTED 51c78: b480 cmpl %d0,%d2 <== NOT EXECUTED 51c7a: 6402 bccs 51c7e <== NOT EXECUTED 51c7c: 2002 movel %d2,%d0 <== NOT EXECUTED fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51c7e: 4a88 tstl %a0 <== NOT EXECUTED 51c80: 6600 00fa bnew 51d7c <== NOT EXECUTED 51c84: 7603 moveq #3,%d3 <== NOT EXECUTED 51c86: 182c 000e moveb %a4@(14),%d4 <== NOT EXECUTED 51c8a: c883 andl %d3,%d4 <== NOT EXECUTED 51c8c: 4a04 tstb %d4 <== NOT EXECUTED 51c8e: 6700 00ec beqw 51d7c <== NOT EXECUTED return fs_info->vol.rdir_loc; 51c92: 222c 001e movel %a4@(30),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51c96: 4284 clrl %d4 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51c98: 4872 5800 pea %a2@(00000000,%d5:l) <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; 51c9c: 9480 subl %d0,%d2 <== NOT EXECUTED cmpltd += c; 51c9e: da80 addl %d0,%d5 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51ca0: 2041 moveal %d1,%a0 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51ca2: 3809 movew %a1,%d4 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51ca4: 2f00 movel %d0,%sp@- <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 51ca6: 2244 moveal %d4,%a1 <== NOT EXECUTED 51ca8: 2009 movel %a1,%d0 <== NOT EXECUTED 51caa: 5380 subql #1,%d0 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 51cac: 0287 0000 00ff andil #255,%d7 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51cb2: c086 andl %d6,%d0 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 51cb4: eeae lsrl %d7,%d6 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 51cb6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 51cb8: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 51cbc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51cbe: 4e95 jsr %a5@ <== NOT EXECUTED if ( ret < 0 ) 51cc0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51cc4: 4a80 tstl %d0 <== NOT EXECUTED 51cc6: 6d00 009c bltw 51d64 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 51cca: 486e fffc pea %fp@(-4) <== NOT EXECUTED if ( rc != RC_OK ) return rc; ofs = 0; 51cce: 4286 clrl %d6 <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 51cd0: 2e2e fffc movel %fp@(-4),%d7 <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 51cd4: 2f07 movel %d7,%sp@- <== NOT EXECUTED 51cd6: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51cd8: 4eb9 0005 8ac0 jsr 58ac0 <== NOT EXECUTED if ( rc != RC_OK ) 51cde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51ce2: 4a80 tstl %d0 <== NOT EXECUTED 51ce4: 6612 bnes 51cf8 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51ce6: 4a82 tstl %d2 <== NOT EXECUTED 51ce8: 6700 00e4 beqw 51dce <== NOT EXECUTED 51cec: 1e2c 0002 moveb %a4@(2),%d7 <== NOT EXECUTED 51cf0: 3254 moveaw %a4@,%a1 <== NOT EXECUTED 51cf2: 6000 ff74 braw 51c68 <== NOT EXECUTED uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) return cmpltd; 51cf6: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51cf8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 51cfe: 4e5e unlk %fp 51d00: 4e75 rts */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) 51d02: 2200 movel %d0,%d1 51d04: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 51d06: b284 cmpl %d4,%d1 51d08: 6400 fefc bccw 51c06 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 51d0c: 2400 movel %d0,%d2 <== NOT EXECUTED 51d0e: 9484 subl %d4,%d2 <== NOT EXECUTED 51d10: 6000 fef4 braw 51c06 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 51d14: 4aab 0024 tstl %a3@(36) 51d18: 6600 fef6 bnew 51c10 51d1c: 7203 moveq #3,%d1 51d1e: 102a 000e moveb %a2@(14),%d0 51d22: c081 andl %d1,%d0 51d24: 4a00 tstb %d0 51d26: 6700 fee8 beqw 51c10 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 51d2a: 202b 001c movel %a3@(28),%d0 fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 51d2e: 665c bnes 51d8c <== NEVER TAKEN return fs_info->vol.rdir_loc; 51d30: 202a 001e movel %a2@(30),%d0 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51d34: 4281 clrl %d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 51d36: 2040 moveal %d0,%a0 51d38: 2f2e 0018 movel %fp@(24),%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51d3c: 3212 movew %a2@,%d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 51d3e: 2f02 movel %d2,%sp@- if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51d40: 2401 movel %d1,%d2 51d42: 5382 subql #1,%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51d44: 4281 clrl %d1 51d46: 122a 0002 moveb %a2@(2),%d1 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51d4a: c484 andl %d4,%d2 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51d4c: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51d4e: 2f02 movel %d2,%sp@- 51d50: 4870 4800 pea %a0@(00000000,%d4:l) 51d54: 2f0a movel %a2,%sp@- 51d56: 4eb9 0005 29c4 jsr 529c4 <_fat_block_read> if ( ret < 0 ) 51d5c: 4fef 0014 lea %sp@(20),%sp 51d60: 4a80 tstl %d0 51d62: 6c94 bges 51cf8 <== ALWAYS TAKEN sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 51d64: 70ff moveq #-1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51d66: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51d6c: 4e5e unlk %fp <== NOT EXECUTED 51d6e: 4e75 rts <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 51d70: 2001 movel %d1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51d72: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51d78: 4e5e unlk %fp <== NOT EXECUTED 51d7a: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 51d7c: 4283 clrl %d3 <== NOT EXECUTED 51d7e: 162c 0005 moveb %a4@(5),%d3 <== NOT EXECUTED 51d82: e7a9 lsll %d3,%d1 <== NOT EXECUTED 51d84: d2ac 0030 addl %a4@(48),%d1 <== NOT EXECUTED 51d88: 6000 ff0c braw 51c96 <== NOT EXECUTED 51d8c: 4281 clrl %d1 <== NOT EXECUTED 51d8e: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED 51d92: 5580 subql #2,%d0 <== NOT EXECUTED 51d94: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51d96: 4281 clrl %d1 <== NOT EXECUTED 51d98: d0aa 0030 addl %a2@(48),%d0 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, count, buf); 51d9c: 2040 moveal %d0,%a0 <== NOT EXECUTED 51d9e: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51da2: 3212 movew %a2@,%d1 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, count, buf); 51da4: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 51da6: 2401 movel %d1,%d2 <== NOT EXECUTED 51da8: 5382 subql #1,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51daa: 4281 clrl %d1 <== NOT EXECUTED 51dac: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51db0: c484 andl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 51db2: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 51db4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51db6: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 51dba: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51dbc: 4eb9 0005 29c4 jsr 529c4 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 51dc2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51dc6: 4a80 tstl %d0 <== NOT EXECUTED 51dc8: 6c00 ff2e bgew 51cf8 <== NOT EXECUTED 51dcc: 6096 bras 51d64 <== NOT EXECUTED 51dce: 244c moveal %a4,%a2 <== NOT EXECUTED 51dd0: 2845 moveal %d5,%a4 <== NOT EXECUTED } /* 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); 51dd2: 4282 clrl %d2 <== NOT EXECUTED 51dd4: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED 51dd8: 2005 movel %d5,%d0 <== NOT EXECUTED 51dda: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 51dde: 41f0 c8ff lea %a0@(ffffffff,%a4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 51de2: 2747 0036 movel %d7,%a3@(54) <== NOT EXECUTED } /* 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); 51de6: 2208 movel %a0,%d1 <== NOT EXECUTED 51de8: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 51dea: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 51dee: 2741 0032 movel %d1,%a3@(50) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 51df2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 51df8: 4e5e unlk %fp <== NOT EXECUTED 51dfa: 4e75 rts <== NOT EXECUTED } /* 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); 51dfc: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51e00: 99cc subal %a4,%a4 <== NOT EXECUTED } /* 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); 51e02: 4282 clrl %d2 <== NOT EXECUTED 51e04: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 51e08: 4287 clrl %d7 <== NOT EXECUTED 51e0a: 4280 clrl %d0 <== NOT EXECUTED } /* 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); 51e0c: 41f0 c8ff lea %a0@(ffffffff,%a4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 51e10: 2747 0036 movel %d7,%a3@(54) <== NOT EXECUTED } /* 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); 51e14: 2208 movel %a0,%d1 <== NOT EXECUTED 51e16: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 51e18: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 51e1c: 2741 0032 movel %d1,%a3@(50) <== NOT EXECUTED 51e20: 60d0 bras 51df2 <== NOT EXECUTED =============================================================================== 00052680 : int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52680: 7001 moveq #1,%d0 <== NOT EXECUTED int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 52682: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 52686: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 5268a: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 5268e: 242b 001c movel %a3@(28),%d2 <== NOT EXECUTED int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 52692: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 52696: 2d42 fffc movel %d2,%fp@(-4) <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5269a: b0ab 0020 cmpl %a3@(32),%d0 <== NOT EXECUTED 5269e: 6760 beqs 52700 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526a0: 2002 movel %d2,%d0 <== NOT EXECUTED 526a2: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 526a6: 42ab 0018 clrl %a3@(24) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526aa: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 526ae: 6474 bccs 52724 <== NOT EXECUTED 526b0: 280e movel %fp,%d4 <== NOT EXECUTED 526b2: 5984 subql #4,%d4 <== NOT EXECUTED 526b4: 49f9 0005 8ac0 lea 58ac0 ,%a4 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 526ba: 2f04 movel %d4,%sp@- <== NOT EXECUTED 526bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 526be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 526c0: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 526c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 526c6: 4a80 tstl %d0 <== NOT EXECUTED 526c8: 662c bnes 526f6 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526ca: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 526ce: 4283 clrl %d3 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526d0: 2200 movel %d0,%d1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 526d2: 362a 0006 movew %a2@(6),%d3 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526d6: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 526da: d7ab 0018 addl %d3,%a3@(24) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526de: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 526e2: 6442 bccs 52726 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 526e4: 2f04 movel %d4,%sp@- <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 526e6: 2400 movel %d0,%d2 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 526e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 526ea: 2f0a movel %a2,%sp@- <== NOT EXECUTED 526ec: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 526ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 526f2: 4a80 tstl %d0 <== NOT EXECUTED 526f4: 67d4 beqs 526ca <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 526f6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 526fc: 4e5e unlk %fp <== NOT EXECUTED 526fe: 4e75 rts <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52700: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 52704: 669a bnes 526a0 <== NOT EXECUTED 52706: 7203 moveq #3,%d1 <== NOT EXECUTED 52708: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED 5270c: c081 andl %d1,%d0 <== NOT EXECUTED 5270e: 4a00 tstb %d0 <== NOT EXECUTED 52710: 678e beqs 526a0 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; 52712: 4280 clrl %d0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 52714: 276a 0028 0018 movel %a2@(40),%a3@(24) <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 5271a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 52720: 4e5e unlk %fp <== NOT EXECUTED 52722: 4e75 rts <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 52724: 4282 clrl %d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 52726: 2742 003a movel %d2,%a3@(58) <== NOT EXECUTED 5272a: 4280 clrl %d0 <== NOT EXECUTED return rc; } 5272c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 52732: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00051e22 : ) { int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 51e22: 72ff moveq #-1,%d1 <== NOT EXECUTED fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 51e24: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 51e28: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 51e2c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED 51e30: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 51e34: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 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 ) 51e38: 202a 0018 movel %a2@(24),%d0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t new_length ) { int rc = RC_OK; uint32_t cur_cln = 0; 51e3c: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 51e40: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) 51e44: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 51e46: 646c bccs 51eb4 <== NOT EXECUTED return rc; assert(fat_fd->fat_file_size); 51e48: 4a80 tstl %d0 <== NOT EXECUTED 51e4a: 6700 00ae beqw 51efa <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 51e4e: 4282 clrl %d2 <== NOT EXECUTED 51e50: 4281 clrl %d1 <== NOT EXECUTED 51e52: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED 51e56: 342b 0006 movew %a3@(6),%d2 <== NOT EXECUTED 51e5a: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED 51e5e: 2408 movel %a0,%d2 <== NOT EXECUTED 51e60: e2aa lsrl %d1,%d2 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 51e62: 2602 movel %d2,%d3 <== NOT EXECUTED 51e64: e3ab lsll %d1,%d3 <== NOT EXECUTED 51e66: b680 cmpl %d0,%d3 <== NOT EXECUTED 51e68: 644a bccs 51eb4 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 51e6a: 4a82 tstl %d2 <== NOT EXECUTED 51e6c: 6752 beqs 51ec0 <== NOT EXECUTED { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 51e6e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 51e72: 2042 moveal %d2,%a0 <== NOT EXECUTED 51e74: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 51e78: 49fa f9ee lea %pc@(51868 ),%a4 <== NOT EXECUTED 51e7c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51e7e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51e80: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 51e82: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; if (cl_start != 0) { rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln); 51e86: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 51e88: 662c bnes 51eb6 <== NOT EXECUTED return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51e8a: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 51e8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51e90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 51e92: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51e94: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 51e96: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (rc != RC_OK) return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 51e9a: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 51e9c: 6618 bnes 51eb6 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 51e9e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 51ea2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51ea4: 4eb9 0005 8f0e jsr 58f0e <== NOT EXECUTED if (rc != RC_OK) 51eaa: 508f addql #8,%sp <== NOT EXECUTED 51eac: 4a80 tstl %d0 <== NOT EXECUTED 51eae: 6606 bnes 51eb6 <== NOT EXECUTED return rc; if (cl_start != 0) 51eb0: 4a82 tstl %d2 <== NOT EXECUTED 51eb2: 6612 bnes 51ec6 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) return rc; 51eb4: 4280 clrl %d0 <== NOT EXECUTED 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; } 51eb6: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 51ebc: 4e5e unlk %fp <== NOT EXECUTED 51ebe: 4e75 rts <== NOT EXECUTED 51ec0: 49fa f9a6 lea %pc@(51868 ),%a4 <== NOT EXECUTED 51ec4: 60c4 bras 51e8a <== NOT EXECUTED if (rc != RC_OK) return rc; if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 51ec6: 4878 ffff pea ffffffff <== NOT EXECUTED 51eca: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 51ece: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51ed0: 4eb9 0005 8c92 jsr 58c92 <== NOT EXECUTED if ( rc != RC_OK ) 51ed6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 51eda: 4a80 tstl %d0 <== NOT EXECUTED 51edc: 66d8 bnes 51eb6 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 51ede: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 51ee2: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 51ee4: 2541 0036 movel %d1,%a2@(54) <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 51ee8: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 51eec: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED } return RC_OK; } 51ef0: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 51ef6: 4e5e unlk %fp <== NOT EXECUTED 51ef8: 4e75 rts <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 51efa: 4879 0006 9d7e pea 69d7e <== NOT EXECUTED 51f00: 4879 0006 9ddc pea 69ddc <__FUNCTION__.7464> <== NOT EXECUTED 51f06: 4878 02d1 pea 2d1 <== NOT EXECUTED 51f0a: 4879 0006 9d94 pea 69d94 <== NOT EXECUTED 51f10: 4eb9 0005 43cc jsr 543cc <__assert_func> <== NOT EXECUTED =============================================================================== 000522ee : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 522ee: 4e56 ffc8 linkw %fp,#-56 522f2: 202e 0014 movel %fp@(20),%d0 522f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 522fa: 246e 000c moveal %fp@(12),%a2 522fe: 266e 0008 moveal %fp@(8),%a3 52302: 262e 0010 movel %fp@(16),%d3 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 52306: 222a 0018 movel %a2@(24),%d1 uint32_t file_cln_initial = fat_fd->map.file_cln; 5230a: 282a 0032 movel %a2@(50),%d4 { int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; 5230e: 42ae fff8 clrl %fp@(-8) bool zero_fill = start > fat_fd->fat_file_size; uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) 52312: 4a80 tstl %d0 52314: 6700 0146 beqw 5245c return cmpltd; if (start >= fat_fd->size_limit) 52318: 242a 0014 movel %a2@(20),%d2 5231c: b483 cmpl %d3,%d2 5231e: 6300 0204 blsw 52524 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) 52322: 9483 subl %d3,%d2 52324: b082 cmpl %d2,%d0 52326: 6500 0108 bcsw 52430 count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 5232a: 486e fff8 pea %fp@(-8) <== NOT EXECUTED int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 5232e: b681 cmpl %d1,%d3 <== NOT EXECUTED 52330: 52c0 shi %d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52332: 2a02 movel %d2,%d5 <== NOT EXECUTED 52334: da83 addl %d3,%d5 <== NOT EXECUTED int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 52336: 49c0 extbl %d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52338: 4480 negl %d0 <== NOT EXECUTED 5233a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5233c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5233e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52340: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52342: 4eb9 0005 20bc jsr 520bc <== NOT EXECUTED if (RC_OK == rc) 52348: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5234c: 4a80 tstl %d0 <== NOT EXECUTED 5234e: 6600 00d6 bnew 52426 <== NOT EXECUTED { /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 52352: 202e fff8 movel %fp@(-8),%d0 52356: b085 cmpl %d5,%d0 52358: 6704 beqs 5235e <== ALWAYS TAKEN count = c - start; 5235a: 2400 movel %d0,%d2 <== NOT EXECUTED 5235c: 9483 subl %d3,%d2 <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 5235e: 7201 moveq #1,%d1 */ if (c != (start + count)) count = c - start; /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) 52360: 102b 000e moveb %a3@(14),%d0 */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 52364: b2aa 0020 cmpl %a2@(32),%d1 52368: 6700 00fe beqw 52468 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 5236c: 2a4e moveal %fp,%a5 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; 5236e: 4286 clrl %d6 52370: 1c2b 0008 moveb %a3@(8),%d6 52374: 2a03 movel %d3,%d5 52376: ecad lsrl %d6,%d5 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 52378: 42a5 clrl %a5@- uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); 5237a: 2f0d movel %a5,%sp@- 5237c: 2f05 movel %d5,%sp@- 5237e: 2f0a movel %a2,%sp@- 52380: 2f0b movel %a3,%sp@- 52382: 4eba f4e4 jsr %pc@(51868 ) if (RC_OK == rc) 52386: 4fef 0010 lea %sp@(16),%sp 5238a: 4a81 tstl %d1 5238c: 6600 0090 bnew 5241e int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 52390: 2005 movel %d5,%d0 52392: eda8 lsll %d6,%d0 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 52394: 206e fffc moveal %fp@(-4),%a0 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 52398: 9680 subl %d0,%d3 bool overwrite_cluster = false; rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 5239a: 2e08 movel %a0,%d7 5239c: 9eaa 001c subl %a2@(28),%d7 int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2); 523a0: 2d43 fff4 movel %d3,%fp@(-12) rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) 523a4: 4a82 tstl %d2 523a6: 6700 0194 beqw 5253c 523aa: 2243 moveal %d3,%a1 523ac: 99cc subal %a4,%a4 523ae: 4283 clrl %d3 523b0: 4206 clrb %d6 523b2: 2d4d fff0 movel %a5,%fp@(-16) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 523b6: 4280 clrl %d0 if (file_cln_initial < file_cln_cnt) 523b8: 7201 moveq #1,%d1 { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); 523ba: 302b 0006 movew %a3@(6),%d0 523be: 9089 subl %a1,%d0 523c0: b480 cmpl %d0,%d2 523c2: 6402 bccs 523c6 523c4: 2002 movel %d2,%d0 if (file_cln_initial < file_cln_cnt) 523c6: be84 cmpl %d4,%d7 523c8: 6200 00f2 bhiw 524bc 523cc: 4281 clrl %d1 523ce: 1206 moveb %d6,%d1 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 523d0: 5287 addql #1,%d7 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 523d2: 2a6e 0018 moveal %fp@(24),%a5 523d6: 2f01 movel %d1,%sp@- 523d8: 4875 c800 pea %a5@(00000000,%a4:l) 523dc: 2f00 movel %d0,%sp@- 523de: 2f09 movel %a1,%sp@- 523e0: 2f08 movel %a0,%sp@- 523e2: 2f0b movel %a3,%sp@- 523e4: 4eb9 0005 2c78 jsr 52c78 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 523ea: 4fef 0018 lea %sp@(24),%sp 523ee: 4a80 tstl %d0 523f0: 6d00 00f0 bltw 524e2 if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; 523f4: 262e fffc movel %fp@(-4),%d3 rc = -1; if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; 523f8: 9480 subl %d0,%d2 cmpltd += ret; 523fa: d9c0 addal %d0,%a4 save_cln = cur_cln; if (0 < bytes_to_write) 523fc: 6600 0106 bnew 52504 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52400: 2a6e fff4 moveal %fp@(-12),%a5 52404: 4282 clrl %d2 52406: 142b 0008 moveb %a3@(8),%d2 5240a: 220c movel %a4,%d1 5240c: 4bf4 d8ff lea %a4@(ffffffff,%a5:l),%a5 fat_fd->map.disk_cln = save_cln; 52410: 2543 0036 movel %d3,%a2@(54) } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52414: 200d movel %a5,%d0 52416: e4a8 lsrl %d2,%d0 } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 52418: d085 addl %d5,%d0 5241a: 2540 0032 movel %d0,%a2@(50) fat_fd, start, count, buf, file_cln_initial); if (0 > ret) 5241e: 4a81 tstl %d1 52420: 6d00 008e bltw 524b0 rc = -1; else cmpltd = ret; 52424: 2001 movel %d1,%d0 } if (RC_OK != rc) return rc; else return cmpltd; } 52426: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 5242c: 4e5e unlk %fp 5242e: 4e75 rts 52430: 2400 movel %d0,%d2 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52432: 486e fff8 pea %fp@(-8) int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 52436: b681 cmpl %d1,%d3 52438: 52c0 shi %d0 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 5243a: 2a02 movel %d2,%d5 5243c: da83 addl %d3,%d5 int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; 5243e: 49c0 extbl %d0 rtems_set_errno_and_return_minus_one(EFBIG); if (count > fat_fd->size_limit - start) count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 52440: 4480 negl %d0 52442: 2f05 movel %d5,%sp@- 52444: 2f00 movel %d0,%sp@- 52446: 2f0a movel %a2,%sp@- 52448: 2f0b movel %a3,%sp@- 5244a: 4eb9 0005 20bc jsr 520bc if (RC_OK == rc) 52450: 4fef 0014 lea %sp@(20),%sp 52454: 4a80 tstl %d0 52456: 66ce bnes 52426 <== NEVER TAKEN 52458: 6000 fef8 braw 52352 uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) return cmpltd; 5245c: 4280 clrl %d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 5245e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52464: 4e5e unlk %fp <== NOT EXECUTED 52466: 4e75 rts <== NOT EXECUTED */ static bool fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd, const uint8_t volume_type) { return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16)); 52468: 4aaa 0024 tstl %a2@(36) 5246c: 6600 fefe bnew 5236c 52470: 123c 0003 moveb #3,%d1 52474: c081 andl %d1,%d0 52476: 4a00 tstb %d0 52478: 6700 fef2 beqw 5236c /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 5247c: 4281 clrl %d1 /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); 5247e: 4280 clrl %d0 byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 52480: 42a7 clrl %sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 52482: 322b 0006 movew %a3@(6),%d1 ret = fat_cluster_write(fs_info, 52486: 2f2e 0018 movel %fp@(24),%sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); 5248a: 5381 subql #1,%d1 ret = fat_cluster_write(fs_info, 5248c: c283 andl %d3,%d1 5248e: 2f02 movel %d2,%sp@- /* for the root directory of FAT12 and FAT16 we need this special handling */ if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type)) { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); 52490: 102b 0008 moveb %a3@(8),%d0 52494: e0ab lsrl %d0,%d3 byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 52496: 2f01 movel %d1,%sp@- 52498: d6aa 001c addl %a2@(28),%d3 5249c: 2f03 movel %d3,%sp@- 5249e: 2f0b movel %a3,%sp@- 524a0: 4eb9 0005 2c78 jsr 52c78 cln, byte, count, buf, false); if (0 > ret) 524a6: 4fef 0018 lea %sp@(24),%sp 524aa: 4a80 tstl %d0 524ac: 6c00 ff78 bgew 52426 start, count, buf, file_cln_initial); if (0 > ret) rc = -1; 524b0: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 524b2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 524b8: 4e5e unlk %fp <== NOT EXECUTED 524ba: 4e75 rts <== NOT EXECUTED c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 524bc: 2a6e 0018 moveal %fp@(24),%a5 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 524c0: 5287 addql #1,%d7 c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; ret = fat_cluster_write(fs_info, 524c2: 2f01 movel %d1,%sp@- 524c4: 4875 c800 pea %a5@(00000000,%a4:l) && (bytes_to_write > 0)) { c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln)); if (file_cln_initial < file_cln_cnt) overwrite_cluster = true; 524c8: 7c01 moveq #1,%d6 ret = fat_cluster_write(fs_info, 524ca: 2f00 movel %d0,%sp@- 524cc: 2f09 movel %a1,%sp@- 524ce: 2f08 movel %a0,%sp@- 524d0: 2f0b movel %a3,%sp@- 524d2: 4eb9 0005 2c78 jsr 52c78 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 524d8: 4fef 0018 lea %sp@(24),%sp 524dc: 4a80 tstl %d0 524de: 6c00 ff14 bgew 523f4 } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 524e2: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 524e6: 4282 clrl %d2 <== NOT EXECUTED 524e8: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 524ec: 72ff moveq #-1,%d1 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 524ee: 41f4 88ff lea %a4@(ffffffff,%a0:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 524f2: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 524f6: 2008 movel %a0,%d0 <== NOT EXECUTED 524f8: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 524fa: d085 addl %d5,%d0 <== NOT EXECUTED 524fc: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 52500: 6000 ff1c braw 5241e <== NOT EXECUTED ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; if (0 < bytes_to_write) rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 52504: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 52508: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5250a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5250c: 4eb9 0005 8ac0 jsr 58ac0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; while ( (RC_OK == rc) 52512: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52516: 93c9 subal %a1,%a1 <== NOT EXECUTED 52518: 4a80 tstl %d0 <== NOT EXECUTED 5251a: 6644 bnes 52560 <== NOT EXECUTED 5251c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 52520: 6000 fe94 braw 523b6 <== NOT EXECUTED if ( count == 0 ) return cmpltd; if (start >= fat_fd->size_limit) rtems_set_errno_and_return_minus_one(EFBIG); 52524: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5252a: 781b moveq #27,%d4 <== NOT EXECUTED 5252c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5252e: 70ff moveq #-1,%d0 <== NOT EXECUTED 52530: 2084 movel %d4,%a0@ <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 52532: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52538: 4e5e unlk %fp <== NOT EXECUTED 5253a: 4e75 rts <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 5253c: 2a6e fff4 moveal %fp@(-12),%a5 <== NOT EXECUTED const uint32_t count, const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; 52540: 99cc subal %a4,%a4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52542: 4282 clrl %d2 <== NOT EXECUTED 52544: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ 52548: 4283 clrl %d3 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 5254a: 4bf4 d8ff lea %a4@(ffffffff,%a5:l),%a5 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 5254e: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52552: 200d movel %a5,%d0 <== NOT EXECUTED 52554: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 52556: d085 addl %d5,%d0 <== NOT EXECUTED 52558: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 5255c: 6000 fec0 braw 5241e <== NOT EXECUTED ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52560: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 52564: 4282 clrl %d2 <== NOT EXECUTED 52566: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED 5256a: 2200 movel %d0,%d1 <== NOT EXECUTED 5256c: 41f4 88ff lea %a4@(ffffffff,%a0:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 52570: 2543 0036 movel %d3,%a2@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); 52574: 2008 movel %a0,%d0 <== NOT EXECUTED 52576: e4a8 lsrl %d2,%d0 <== NOT EXECUTED } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 52578: d085 addl %d5,%d0 <== NOT EXECUTED 5257a: 2540 0032 movel %d0,%a2@(50) <== NOT EXECUTED 5257e: 6000 fe9e braw 5241e <== NOT EXECUTED =============================================================================== 00058f0e : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 58f0e: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 58f12: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED 58f16: 2e2e 000c movel %fp@(12),%d7 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 58f1a: 2007 movel %d7,%d0 <== NOT EXECUTED int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 58f1c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 58f20: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 58f24: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 58f28: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 58f2c: 6400 009e bccw 58fcc <== NOT EXECUTED 58f30: 2a0e movel %fp,%d5 <== NOT EXECUTED 58f32: 2407 movel %d7,%d2 <== NOT EXECUTED 58f34: 4284 clrl %d4 <== NOT EXECUTED 58f36: 4286 clrl %d6 <== NOT EXECUTED 58f38: 5985 subql #4,%d5 <== NOT EXECUTED 58f3a: 47f9 0005 8ac0 lea 58ac0 ,%a3 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 58f40: 49f9 0005 8c92 lea 58c92 ,%a4 <== NOT EXECUTED 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(fs_info, cur_cln, &next_cln); 58f46: 2f05 movel %d5,%sp@- <== NOT EXECUTED 58f48: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58f4a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58f4c: 4e93 jsr %a3@ <== NOT EXECUTED if ( rc != RC_OK ) 58f4e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 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(fs_info, cur_cln, &next_cln); 58f52: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) 58f54: 6650 bnes 58fa6 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 58f56: 42a7 clrl %sp@- <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 58f58: 5284 addql #1,%d4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 58f5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 58f5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58f5e: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 58f60: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 58f64: 4a80 tstl %d0 <== NOT EXECUTED 58f66: 6702 beqs 58f6a <== NOT EXECUTED 58f68: 2c00 movel %d0,%d6 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 58f6a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 58f6e: 2002 movel %d2,%d0 <== NOT EXECUTED 58f70: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED 58f74: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 58f78: 65cc bcss 58f46 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58f7a: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 58f7e: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 58f80: 2547 0046 movel %d7,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58f84: b280 cmpl %d0,%d1 <== NOT EXECUTED 58f86: 6706 beqs 58f8e <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 58f88: d880 addl %d0,%d4 <== NOT EXECUTED 58f8a: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 58f8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58f90: 2606 movel %d6,%d3 <== NOT EXECUTED 58f92: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED 58f98: 588f addql #4,%sp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 58f9a: 2003 movel %d3,%d0 <== NOT EXECUTED 58f9c: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 <== NOT EXECUTED 58fa2: 4e5e unlk %fp <== NOT EXECUTED 58fa4: 4e75 rts <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); if ( rc != RC_OK ) { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58fa6: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 58faa: 72ff moveq #-1,%d1 <== NOT EXECUTED 58fac: b280 cmpl %d0,%d1 <== NOT EXECUTED 58fae: 6706 beqs 58fb6 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 58fb0: d880 addl %d0,%d4 <== NOT EXECUTED 58fb2: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 58fb6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58fb8: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED 58fbe: 588f addql #4,%sp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 58fc0: 2003 movel %d3,%d0 <== NOT EXECUTED 58fc2: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 <== NOT EXECUTED 58fc8: 4e5e unlk %fp <== NOT EXECUTED 58fca: 4e75 rts <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58fcc: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED ) { int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 58fd0: 4284 clrl %d4 <== NOT EXECUTED fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 58fd2: 4286 clrl %d6 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58fd4: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 58fd6: 2547 0046 movel %d7,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 58fda: b280 cmpl %d0,%d1 <== NOT EXECUTED 58fdc: 66aa bnes 58f88 <== NOT EXECUTED 58fde: 60ae bras 58f8e <== NOT EXECUTED =============================================================================== 00053a3e : fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53a3e: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 53a40: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53a44: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53a48: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED 53a4c: 92a9 0076 subl %a1@(118),%d1 <== NOT EXECUTED void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 53a50: 2f02 movel %d2,%sp@- <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53a52: 2401 movel %d1,%d2 <== NOT EXECUTED 53a54: e68a lsrl #3,%d2 <== NOT EXECUTED 53a56: 2069 006a moveal %a1@(106),%a0 <== NOT EXECUTED 53a5a: d1c2 addal %d2,%a0 <== NOT EXECUTED 53a5c: 7407 moveq #7,%d2 <== NOT EXECUTED 53a5e: c282 andl %d2,%d1 <== NOT EXECUTED 53a60: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53a62: 1210 moveb %a0@,%d1 <== NOT EXECUTED 53a64: 4680 notl %d0 <== NOT EXECUTED 53a66: c081 andl %d1,%d0 <== NOT EXECUTED 53a68: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 53a6a: 241f movel %sp@+,%d2 <== NOT EXECUTED 53a6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058ac0 : uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 58ac0: 7001 moveq #1,%d0 fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 58ac2: 4e56 ffe0 linkw %fp,#-32 58ac6: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 58aca: 246e 0008 moveal %fp@(8),%a2 58ace: 242e 000c movel %fp@(12),%d2 uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 58ad2: b082 cmpl %d2,%d0 58ad4: 6400 0164 bccw 58c3a 58ad8: 202a 0034 movel %a2@(52),%d0 58adc: 5280 addql #1,%d0 58ade: b082 cmpl %d2,%d0 58ae0: 6500 0158 bcsw 58c3a rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 58ae4: 102a 000e moveb %a2@(14),%d0 58ae8: 0800 0000 btst #0,%d0 58aec: 667a bnes 58b68 <== ALWAYS TAKEN 58aee: 7202 moveq #2,%d1 <== NOT EXECUTED 58af0: 2a02 movel %d2,%d5 <== NOT EXECUTED 58af2: c081 andl %d1,%d0 <== NOT EXECUTED 58af4: 4a00 tstb %d0 <== NOT EXECUTED 58af6: 6778 beqs 58b70 <== NOT EXECUTED 58af8: da85 addl %d5,%d5 <== NOT EXECUTED 58afa: 4280 clrl %d0 58afc: 102a 0002 moveb %a2@(2),%d0 58b00: 2605 movel %d5,%d3 58b02: e0ab lsrl %d0,%d3 58b04: d6aa 0050 addl %a2@(80),%d3 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, &sec_buf); 58b08: 47f9 0005 2908 lea 52908 ,%a3 58b0e: 486e fffc pea %fp@(-4) 58b12: 4878 0001 pea 1 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); 58b16: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 58b18: 2f03 movel %d3,%sp@- 58b1a: 2f0a movel %a2,%sp@- 58b1c: 4e93 jsr %a3@ if (rc != RC_OK) 58b1e: 4fef 0010 lea %sp@(16),%sp 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); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 58b22: 2800 movel %d0,%d4 if (rc != RC_OK) 58b24: 6636 bnes 58b5c <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 58b26: 4280 clrl %d0 58b28: 102a 000e moveb %a2@(14),%d0 58b2c: 7202 moveq #2,%d1 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); 58b2e: 0286 0000 ffff andil #65535,%d6 58b34: 5386 subql #1,%d6 58b36: ca86 andl %d6,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 58b38: b280 cmpl %d0,%d1 58b3a: 6738 beqs 58b74 <== NEVER TAKEN 58b3c: 123c 0004 moveb #4,%d1 58b40: b280 cmpl %d0,%d1 58b42: 6700 00a0 beqw 58be4 58b46: 123c 0001 moveb #1,%d1 58b4a: b280 cmpl %d0,%d1 58b4c: 6750 beqs 58b9e <== ALWAYS TAKEN *ret_val = *((uint32_t *)(sec_buf + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 58b4e: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 58b54: 78ff moveq #-1,%d4 <== NOT EXECUTED 58b56: 2240 moveal %d0,%a1 <== NOT EXECUTED 58b58: 7005 moveq #5,%d0 <== NOT EXECUTED 58b5a: 2280 movel %d0,%a1@ <== NOT EXECUTED break; } return RC_OK; } 58b5c: 2004 movel %d4,%d0 <== NOT EXECUTED 58b5e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 58b64: 4e5e unlk %fp <== NOT EXECUTED 58b66: 4e75 rts <== 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) + 58b68: 2a02 movel %d2,%d5 58b6a: e28d lsrl #1,%d5 58b6c: da82 addl %d2,%d5 58b6e: 608a bras 58afa 58b70: e58d lsll #2,%d5 <== NOT EXECUTED 58b72: 6086 bras 58afa <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); 58b74: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 58b78: 4281 clrl %d1 <== NOT EXECUTED 58b7a: 3230 5800 movew %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 58b7e: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 58b82: 2001 movel %d1,%d0 <== NOT EXECUTED 58b84: e089 lsrl #8,%d1 <== NOT EXECUTED 58b86: e188 lsll #8,%d0 <== NOT EXECUTED 58b88: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 58b8e: 8081 orl %d1,%d0 <== NOT EXECUTED 58b90: 2280 movel %d0,%a1@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58b92: 2004 movel %d4,%d0 <== NOT EXECUTED 58b94: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 58b9a: 4e5e unlk %fp <== NOT EXECUTED 58b9c: 4e75 rts <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 58b9e: 206e fffc moveal %fp@(-4),%a0 58ba2: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 58ba4: 4280 clrl %d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 58ba6: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 58baa: 3012 movew %a2@,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 58bac: 226e 0010 moveal %fp@(16),%a1 if ( ofs == (fs_info->vol.bps - 1) ) 58bb0: 5380 subql #1,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 58bb2: 2281 movel %d1,%a1@ if ( ofs == (fs_info->vol.bps - 1) ) 58bb4: ba80 cmpl %d0,%d5 58bb6: 6700 009c beqw 58c54 *ret_val |= *sec_buf << 8; } else { *ret_val |= *(sec_buf + ofs + 1) << 8; 58bba: 4280 clrl %d0 58bbc: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 58bc0: e188 lsll #8,%d0 58bc2: 206e 0010 moveal %fp@(16),%a0 58bc6: 8081 orl %d1,%d0 58bc8: 2080 movel %d0,%a0@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 58bca: 0802 0000 btst #0,%d2 58bce: 6752 beqs 58c22 *ret_val = (*ret_val) >> FAT12_SHIFT; 58bd0: 226e 0010 moveal %fp@(16),%a1 58bd4: e888 lsrl #4,%d0 58bd6: 2280 movel %d0,%a1@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58bd8: 2004 movel %d4,%d0 58bda: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 58be0: 4e5e unlk %fp 58be2: 4e75 rts *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); 58be4: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 58be8: 7018 moveq #24,%d0 <== NOT EXECUTED 58bea: 2230 5800 movel %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58bee: 7a18 moveq #24,%d5 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 58bf0: 2601 movel %d1,%d3 <== NOT EXECUTED 58bf2: e0ab lsrl %d0,%d3 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 58bf4: 2401 movel %d1,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58bf6: 2001 movel %d1,%d0 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 58bf8: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58bfa: eba8 lsll %d5,%d0 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 58bfc: e189 lsll #8,%d1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58bfe: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 58c04: 8083 orl %d3,%d0 <== NOT EXECUTED 58c06: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 58c0a: 0281 00ff 0000 andil #16711680,%d1 <== NOT EXECUTED 58c10: 8081 orl %d1,%d0 <== NOT EXECUTED 58c12: 8082 orl %d2,%d0 <== NOT EXECUTED 58c14: 2080 movel %d0,%a0@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58c16: 2004 movel %d4,%d0 <== NOT EXECUTED 58c18: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 58c1e: 4e5e unlk %fp <== NOT EXECUTED 58c20: 4e75 rts <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 58c22: 206e 0010 moveal %fp@(16),%a0 58c26: 0280 0000 0fff andil #4095,%d0 58c2c: 2080 movel %d0,%a0@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58c2e: 2004 movel %d4,%d0 58c30: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 58c36: 4e5e unlk %fp 58c38: 4e75 rts uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 58c3a: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 58c40: 78ff moveq #-1,%d4 <== NOT EXECUTED 58c42: 7205 moveq #5,%d1 <== NOT EXECUTED 58c44: 2040 moveal %d0,%a0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58c46: 2004 movel %d4,%d0 <== NOT EXECUTED 58c48: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); 58c4e: 2081 movel %d1,%a0@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58c50: 4e5e unlk %fp <== NOT EXECUTED 58c52: 4e75 rts <== NOT EXECUTED * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 58c54: 486e fffc pea %fp@(-4) <== NOT EXECUTED 58c58: 2043 moveal %d3,%a0 <== NOT EXECUTED 58c5a: 4878 0001 pea 1 <== NOT EXECUTED 58c5e: 4868 0001 pea %a0@(1) <== NOT EXECUTED 58c62: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58c64: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 58c66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 58c6a: 4a80 tstl %d0 <== NOT EXECUTED 58c6c: 6616 bnes 58c84 <== NOT EXECUTED return rc; *ret_val |= *sec_buf << 8; 58c6e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58c72: 4280 clrl %d0 <== NOT EXECUTED 58c74: 1010 moveb %a0@,%d0 <== NOT EXECUTED 58c76: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 58c7a: e188 lsll #8,%d0 <== NOT EXECUTED 58c7c: 8091 orl %a1@,%d0 <== NOT EXECUTED 58c7e: 2280 movel %d0,%a1@ <== NOT EXECUTED 58c80: 6000 ff48 braw 58bca <== NOT EXECUTED *ret_val = (*(sec_buf + ofs)); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) 58c84: 2800 movel %d0,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 58c86: 2004 movel %d4,%d0 <== NOT EXECUTED 58c88: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 58c8e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053980 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 53980: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 53984: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED 53988: 246e 0008 moveal %fp@(8),%a2 <== 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); 5398c: 47f9 0004 5c8c lea 45c8c ,%a3 <== NOT EXECUTED 53992: 242a 0072 movel %a2@(114),%d2 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53996: 4a82 tstl %d2 <== NOT EXECUTED 53998: 6768 beqs 53a02 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 5399a: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 5399e: 2200 movel %d0,%d1 <== NOT EXECUTED 539a0: e689 lsrl #3,%d1 <== NOT EXECUTED 539a2: 7807 moveq #7,%d4 <== NOT EXECUTED 539a4: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED 539a8: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 <== NOT EXECUTED 539ac: 1610 moveb %a0@,%d3 <== NOT EXECUTED 539ae: c880 andl %d0,%d4 <== NOT EXECUTED 539b0: 1203 moveb %d3,%d1 <== NOT EXECUTED 539b2: 49c1 extbl %d1 <== NOT EXECUTED 539b4: 0901 btst %d4,%d1 <== NOT EXECUTED 539b6: 6730 beqs 539e8 <== NOT EXECUTED 539b8: 4281 clrl %d1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 539ba: 5280 addql #1,%d0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 539bc: 5281 addql #1,%d1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 539be: 2540 006e movel %d0,%a2@(110) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 539c2: b480 cmpl %d0,%d2 <== NOT EXECUTED 539c4: 6204 bhis 539ca <== NOT EXECUTED fs_info->index = 0; 539c6: 42aa 006e clrl %a2@(110) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 539ca: b481 cmpl %d1,%d2 <== NOT EXECUTED 539cc: 6734 beqs 53a02 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 539ce: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 539d2: 2600 movel %d0,%d3 <== NOT EXECUTED 539d4: e68b lsrl #3,%d3 <== NOT EXECUTED 539d6: 41f1 3800 lea %a1@(00000000,%d3:l),%a0 <== NOT EXECUTED 539da: 7807 moveq #7,%d4 <== NOT EXECUTED 539dc: 1610 moveb %a0@,%d3 <== NOT EXECUTED 539de: c880 andl %d0,%d4 <== NOT EXECUTED 539e0: 1a03 moveb %d3,%d5 <== NOT EXECUTED 539e2: 49c5 extbl %d5 <== NOT EXECUTED 539e4: 0905 btst %d4,%d5 <== NOT EXECUTED 539e6: 66d2 bnes 539ba <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 539e8: 7001 moveq #1,%d0 <== NOT EXECUTED 539ea: e9a8 lsll %d4,%d0 <== NOT EXECUTED 539ec: 8083 orl %d3,%d0 <== NOT EXECUTED 539ee: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 539f0: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 539f4: d0aa 0076 addl %a2@(118),%d0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 539f8: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 539fe: 4e5e unlk %fp <== NOT EXECUTED 53a00: 4e75 rts <== 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)) 53a02: 203c 0fff ffff movel #268435455,%d0 <== NOT EXECUTED 53a08: 90aa 0076 subl %a2@(118),%d0 <== NOT EXECUTED 53a0c: d482 addl %d2,%d2 <== NOT EXECUTED 53a0e: b082 cmpl %d2,%d0 <== NOT EXECUTED 53a10: 620c bhis 53a1e <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 53a12: 4280 clrl %d0 <== NOT EXECUTED } 53a14: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53a1a: 4e5e unlk %fp <== NOT EXECUTED 53a1c: 4e75 rts <== 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); 53a1e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53a20: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 53a24: 2542 0072 movel %d2,%a2@(114) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53a28: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 53a2a: 508f addql #8,%sp <== 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); 53a2c: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED if (fs_info->uino != NULL) 53a30: 67e0 beqs 53a12 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 53a32: 242a 0072 movel %a2@(114),%d2 <== NOT EXECUTED 53a36: 2542 006e movel %d2,%a2@(110) <== NOT EXECUTED 53a3a: 6000 ff5a braw 53996 <== NOT EXECUTED =============================================================================== 000538fa : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 538fa: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 538fe: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53902: 2200 movel %d0,%d1 <== NOT EXECUTED int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 53904: 48d7 3c00 moveml %a2-%a5,%sp@ <== NOT EXECUTED 53908: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 5390c: 264e moveal %fp,%a3 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 5390e: 49f9 0005 2b1a lea 52b1a ,%a4 <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 53914: 4bf9 0005 8ac0 lea 58ac0 ,%a5 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5391a: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED uint32_t start_cln ) { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 5391e: 2700 movel %d0,%a3@- <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53920: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 53924: 6442 bccs 53968 <== NOT EXECUTED { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 53926: 4281 clrl %d1 <== NOT EXECUTED 53928: 42a7 clrl %sp@- <== NOT EXECUTED 5392a: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 5392e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53930: 42a7 clrl %sp@- <== NOT EXECUTED 53932: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53934: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53936: 4e94 jsr %a4@ <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) 53938: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5393c: 4281 clrl %d1 <== NOT EXECUTED 5393e: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 53942: b081 cmpl %d1,%d0 <== NOT EXECUTED 53944: 662e bnes 53974 <== NOT EXECUTED { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 53946: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53948: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5394c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5394e: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 53950: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53954: 4a80 tstl %d0 <== NOT EXECUTED 53956: 6612 bnes 5396a <== NOT EXECUTED 53958: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5395c: 2200 movel %d0,%d1 <== NOT EXECUTED 5395e: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED 53962: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 53966: 65be bcss 53926 <== NOT EXECUTED return rc; } } return rc; 53968: 4280 clrl %d0 <== NOT EXECUTED } 5396a: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED 53970: 4e5e unlk %fp <== NOT EXECUTED 53972: 4e75 rts <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); if ( ret != fs_info->vol.bpc ) { return -1; 53974: 70ff moveq #-1,%d0 <== NOT EXECUTED } } return rc; } 53976: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED 5397c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052df2 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 52df2: 4e56 ff60 linkw %fp,#-160 52df6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 52dfa: 4878 0002 pea 2 52dfe: 2f2e 000c movel %fp@(12),%sp@- * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(fat_fs_info_t *fs_info, const char *device) { 52e02: 246e 0008 moveal %fp@(8),%a2 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; 52e06: 42ae ffaa clrl %fp@(-86) vol->fd = open(device, O_RDWR); 52e0a: 4eb9 0004 5a28 jsr 45a28 if (vol->fd < 0) 52e10: 508f addql #8,%sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); 52e12: 2540 0056 movel %d0,%a2@(86) if (vol->fd < 0) 52e16: 6d00 07a4 bltw 535bc { rtems_set_errno_and_return_minus_one(ENXIO); } rc = fstat(vol->fd, &stat_buf); 52e1a: 486e ffba pea %fp@(-70) 52e1e: 2f00 movel %d0,%sp@- 52e20: 4eb9 0004 4c7c jsr 44c7c if (rc != 0) 52e26: 508f addql #8,%sp 52e28: 4a80 tstl %d0 52e2a: 6600 06e2 bnew 5350e close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 52e2e: 202e ffc6 movel %fp@(-58),%d0 52e32: 0280 0000 f000 andil #61440,%d0 52e38: 0c80 0000 6000 cmpil #24576,%d0 52e3e: 6600 06ce bnew 5350e static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 52e42: 486a 005a pea %a2@(90) 52e46: 2f3c 4004 4209 movel #1074020873,%sp@- 52e4c: 2f2a 0056 movel %a2@(86),%sp@- 52e50: 4eb9 0005 46f4 jsr 546f4 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) { 52e56: 4fef 000c lea %sp@(12),%sp 52e5a: 4a80 tstl %d0 52e5c: 6600 06b0 bnew 5350e 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); 52e60: 486e ffaa pea %fp@(-86) 52e64: 42a7 clrl %sp@- 52e66: 2f2a 005a movel %a2@(90),%sp@- 52e6a: 4eb9 0005 05f2 jsr 505f2 if (sc != RTEMS_SUCCESSFUL) 52e70: 4fef 000c lea %sp@(12),%sp 52e74: 4a80 tstl %d0 52e76: 6600 06f4 bnew 5356c { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 52e7a: 226e ffaa moveal %fp@(-86),%a1 52e7e: 2069 001a moveal %a1@(26),%a0 52e82: 1228 0010 moveb %a0@(16),%d1 52e86: 1a28 0011 moveb %a0@(17),%d5 52e8a: 1c28 0012 moveb %a0@(18),%d6 52e8e: 3841 moveaw %d1,%a4 52e90: 1228 0013 moveb %a0@(19),%d1 52e94: 1d45 ffa7 moveb %d5,%fp@(-89) 52e98: 1d41 ffa5 moveb %d1,%fp@(-91) 52e9c: 1228 0020 moveb %a0@(32),%d1 52ea0: 1a28 0014 moveb %a0@(20),%d5 52ea4: 1d41 ff96 moveb %d1,%fp@(-106) 52ea8: 1228 0021 moveb %a0@(33),%d1 52eac: 1d46 ffa6 moveb %d6,%fp@(-90) 52eb0: 1d41 ff9d moveb %d1,%fp@(-99) 52eb4: 1228 0022 moveb %a0@(34),%d1 52eb8: 1d45 ffa4 moveb %d5,%fp@(-92) 52ebc: 1d41 ff9c moveb %d1,%fp@(-100) 52ec0: 1228 0023 moveb %a0@(35),%d1 52ec4: 1028 000f moveb %a0@(15),%d0 52ec8: 1d41 ff9b moveb %d1,%fp@(-101) 52ecc: 1228 0024 moveb %a0@(36),%d1 52ed0: 1428 000b moveb %a0@(11),%d2 52ed4: 1d41 ff97 moveb %d1,%fp@(-105) 52ed8: 1228 0025 moveb %a0@(37),%d1 52edc: 1828 000c moveb %a0@(12),%d4 52ee0: 1d41 ff9f moveb %d1,%fp@(-97) 52ee4: 1228 0026 moveb %a0@(38),%d1 52ee8: 1628 000d moveb %a0@(13),%d3 52eec: 1d41 ff9e moveb %d1,%fp@(-98) 52ef0: 1228 0027 moveb %a0@(39),%d1 52ef4: 1e28 000e moveb %a0@(14),%d7 52ef8: 1a28 0016 moveb %a0@(22),%d5 52efc: 1c28 0017 moveb %a0@(23),%d6 52f00: 1d41 ffa3 moveb %d1,%fp@(-93) 52f04: 1228 0028 moveb %a0@(40),%d1 52f08: 3640 moveaw %d0,%a3 52f0a: 1d41 ff95 moveb %d1,%fp@(-107) 52f0e: 1228 002c moveb %a0@(44),%d1 52f12: 1d41 ff8f moveb %d1,%fp@(-113) 52f16: 1228 002d moveb %a0@(45),%d1 52f1a: 1d41 ff8e moveb %d1,%fp@(-114) 52f1e: 1228 002e moveb %a0@(46),%d1 52f22: 1d41 ff8d moveb %d1,%fp@(-115) 52f26: 1228 002f moveb %a0@(47),%d1 52f2a: 1d41 ff8b moveb %d1,%fp@(-117) 52f2e: 1228 0030 moveb %a0@(48),%d1 52f32: 1d41 ff91 moveb %d1,%fp@(-111) 52f36: 1228 0031 moveb %a0@(49),%d1 sc = rtems_bdbuf_release( block); 52f3a: 2f09 movel %a1,%sp@- { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 52f3c: 1d41 ff90 moveb %d1,%fp@(-112) sc = rtems_bdbuf_release( block); 52f40: 4eb9 0005 07c4 jsr 507c4 if (sc != RTEMS_SUCCESSFUL) 52f46: 588f addql #4,%sp 52f48: 4a80 tstl %d0 52f4a: 6600 0620 bnew 5356c } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); if ( (vol->bps != 512) && 52f4e: 4280 clrl %d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 52f50: 0284 0000 00ff andil #255,%d4 52f56: 0282 0000 00ff andil #255,%d2 52f5c: e18c lsll #8,%d4 52f5e: 8882 orl %d2,%d4 if ( (vol->bps != 512) && 52f60: 3004 movew %d4,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 52f62: 3484 movew %d4,%a2@ 52f64: 3a44 moveaw %d4,%a5 if ( (vol->bps != 512) && 52f66: 0c80 0000 0200 cmpil #512,%d0 52f6c: 6700 055e beqw 534cc 52f70: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 52f76: 6712 beqs 52f8a <== NOT EXECUTED (vol->bps != 1024) && 52f78: 0c80 0000 0800 cmpil #2048,%d0 <== NOT EXECUTED 52f7e: 670a beqs 52f8a <== NOT EXECUTED (vol->bps != 2048) && 52f80: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 52f86: 6600 05c0 bnew 53548 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 52f8a: 4281 clrl %d1 <== NOT EXECUTED 52f8c: 7409 moveq #9,%d2 <== NOT EXECUTED 52f8e: 320d movew %a5,%d1 <== NOT EXECUTED 52f90: 2241 moveal %d1,%a1 <== NOT EXECUTED 52f92: 2009 movel %a1,%d0 <== NOT EXECUTED 52f94: e4a8 lsrl %d2,%d0 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 52f96: e280 asrl #1,%d0 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 52f98: 7201 moveq #1,%d1 <== NOT EXECUTED 52f9a: 2401 movel %d1,%d2 <== NOT EXECUTED 52f9c: 5282 addql #1,%d2 <== NOT EXECUTED 52f9e: 0800 0000 btst #0,%d0 <== NOT EXECUTED 52fa2: 660e bnes 52fb2 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 52fa4: e280 asrl #1,%d0 <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 52fa6: 1202 moveb %d2,%d1 <== NOT EXECUTED 52fa8: 2401 movel %d1,%d2 <== NOT EXECUTED 52faa: 5282 addql #1,%d2 <== NOT EXECUTED 52fac: 0800 0000 btst #0,%d0 <== NOT EXECUTED 52fb0: 67f2 beqs 52fa4 <== NOT EXECUTED 52fb2: 1541 0003 moveb %d1,%a2@(3) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 52fb6: 4202 clrb %d2 52fb8: 1542 0002 moveb %d2,%a2@(2) 52fbc: 0804 0000 btst #0,%d4 52fc0: 6600 057a bnew 5353c 52fc4: 2009 movel %a1,%d0 i >>= 1, vol->sec_log2++); 52fc6: e280 asrl #1,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 52fc8: 7201 moveq #1,%d1 52fca: 2401 movel %d1,%d2 52fcc: 5282 addql #1,%d2 52fce: 0800 0000 btst #0,%d0 52fd2: 660e bnes 52fe2 <== NEVER TAKEN i >>= 1, vol->sec_log2++); 52fd4: e280 asrl #1,%d0 close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 52fd6: 1202 moveb %d2,%d1 52fd8: 2401 movel %d1,%d2 52fda: 5282 addql #1,%d2 52fdc: 0800 0000 btst #0,%d0 52fe0: 67f2 beqs 52fd4 52fe2: 1541 0002 moveb %d1,%a2@(2) i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; vol->bytes_per_block_log2 = vol->sec_log2; vol->sectors_per_block = 1; 52fe6: 7801 moveq #1,%d4 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; i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; 52fe8: 354d 000a movew %a5,%a2@(10) vol->bytes_per_block_log2 = vol->sec_log2; 52fec: 1541 000c moveb %d1,%a2@(12) vol->sectors_per_block = 1; 52ff0: 1544 0009 moveb %d4,%a2@(9) vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 52ff4: 1543 0004 moveb %d3,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 52ff8: 6700 054e beqw 53548 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 52ffc: 4282 clrl %d2 52ffe: 1403 moveb %d3,%d2 53000: 4200 clrb %d0 53002: 1540 0005 moveb %d0,%a2@(5) 53006: 2002 movel %d2,%d0 53008: 0803 0000 btst #0,%d3 5300c: 6600 0534 bnew 53542 i >>= 1, vol->spc_log2++); 53010: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 53012: 7601 moveq #1,%d3 53014: 2803 movel %d3,%d4 53016: 5284 addql #1,%d4 53018: 0800 0000 btst #0,%d0 5301c: 660e bnes 5302c <== ALWAYS TAKEN i >>= 1, vol->spc_log2++); 5301e: e280 asrl #1,%d0 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 53020: 1604 moveb %d4,%d3 <== NOT EXECUTED 53022: 2803 movel %d3,%d4 <== NOT EXECUTED 53024: 5284 addql #1,%d4 <== NOT EXECUTED 53026: 0800 0000 btst #0,%d0 <== NOT EXECUTED 5302a: 67f2 beqs 5301e <== NOT EXECUTED 5302c: 1543 0005 moveb %d3,%a2@(5) 53030: 0283 0000 00ff andil #255,%d3 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) 53036: 2809 movel %a1,%d4 53038: 4280 clrl %d0 5303a: e7ac lsll %d3,%d4 5303c: 3004 movew %d4,%d0 5303e: 3544 0006 movew %d4,%a2@(6) 53042: 0c80 0000 8000 cmpil #32768,%d0 53048: 6200 04fe bhiw 53548 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 5304c: 2004 movel %d4,%d0 5304e: 4203 clrb %d3 53050: 0280 0000 ffff andil #65535,%d0 53056: 1543 0008 moveb %d3,%a2@(8) 5305a: 7601 moveq #1,%d3 5305c: 0804 0000 btst #0,%d4 53060: 661e bnes 53080 <== NEVER TAKEN 53062: 2803 movel %d3,%d4 53064: 5284 addql #1,%d4 i >>= 1, vol->bpc_log2++); 53066: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 53068: 0800 0000 btst #0,%d0 5306c: 660e bnes 5307c <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 5306e: e280 asrl #1,%d0 { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 53070: 1604 moveb %d4,%d3 53072: 2803 movel %d3,%d4 53074: 5284 addql #1,%d4 53076: 0800 0000 btst #0,%d0 5307a: 67f2 beqs 5306e 5307c: 1543 0008 moveb %d3,%a2@(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); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 53080: 4280 clrl %d0 53082: 102e ffa7 moveb %fp@(-89),%d0 53086: 4284 clrl %d4 53088: 2040 moveal %d0,%a0 5308a: 182e ffa6 moveb %fp@(-90),%d4 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); 5308e: 4283 clrl %d3 53090: 300b movew %a3,%d0 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 53092: e18c lsll #8,%d4 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 53094: 0286 0000 00ff andil #255,%d6 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); 5309a: 1600 moveb %d0,%d3 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5309c: 2008 movel %a0,%d0 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5309e: 2646 moveal %d6,%a3 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)) / 530a0: 2c09 movel %a1,%d6 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); 530a2: 8880 orl %d0,%d4 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); 530a4: 0287 0000 00ff andil #255,%d7 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 530aa: 0281 0000 00ff andil #255,%d1 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)) / 530b0: 2004 movel %d4,%d0 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); 530b2: 2a47 moveal %d7,%a5 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)) / 530b4: eb88 lsll #5,%d0 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); 530b6: e18b lsll #8,%d3 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530b8: 0285 0000 00ff andil #255,%d5 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)) / 530be: 41f1 08ff lea %a1@(ffffffff,%d0:l),%a0 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); 530c2: 3544 0022 movew %d4,%a2@(34) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 530c6: 2008 movel %a0,%d0 530c8: 4c46 0800 remsl %d6,%d0,%d0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530cc: 2c0b movel %a3,%d6 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); 530ce: 2e0d movel %a5,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530d0: e18e lsll #8,%d6 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); 530d2: 8687 orl %d7,%d3 } 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); 530d4: 3e0c movew %a4,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530d6: 2646 moveal %d6,%a3 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 530d8: 2c00 movel %d0,%d6 530da: e3ae lsll %d1,%d6 } 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); 530dc: 1547 000d moveb %d7,%a2@(13) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 530e0: 3543 0018 movew %d3,%a2@(24) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 530e4: 2206 movel %d6,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530e6: 2c0b movel %a3,%d6 530e8: 8c85 orl %d5,%d6 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)) / 530ea: 2540 0024 movel %d0,%a2@(36) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 530ee: 2541 0028 movel %d1,%a2@(40) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 530f2: 4a46 tstw %d6 530f4: 6700 01d0 beqw 532c6 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) 530f8: 4284 clrl %d4 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 + 530fa: 4281 clrl %d1 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) 530fc: 182e ffa4 moveb %fp@(-92),%d4 53100: 4285 clrl %d5 53102: 1a2e ffa5 moveb %fp@(-91),%d5 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 + 53106: 3e0c movew %a4,%d7 vol->bps; 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); 53108: 0286 0000 ffff andil #65535,%d6 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5310e: 0283 0000 ffff andil #65535,%d3 53114: 1207 moveb %d7,%d1 53116: 4c06 1800 mulsl %d6,%d1 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) 5311a: e18c lsll #8,%d4 vol->bps; 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); 5311c: 2546 001a movel %d6,%a2@(26) else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 53120: d681 addl %d1,%d3 53122: d083 addl %d3,%d0 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) 53124: 8885 orl %d5,%d4 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 + 53126: 2540 0030 movel %d0,%a2@(48) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 5312a: 2543 001e movel %d3,%a2@(30) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5312e: 4a44 tstw %d4 53130: 6700 01f0 beqw 53322 vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 53134: 0284 0000 ffff andil #65535,%d4 5313a: 2544 002c movel %d4,%a2@(44) else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; 5313e: 9880 subl %d0,%d4 vol->data_cls = data_secs / vol->spc; 53140: 4c42 4004 remul %d2,%d4,%d4 53144: 2544 0034 movel %d4,%a2@(52) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 53148: 0c84 0000 0ff4 cmpil #4084,%d4 5314e: 6200 0210 bhiw 53360 else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 53152: 76ff moveq #-1,%d3 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 53154: 2c3c 0000 0fff movel #4095,%d6 vol->eoc_val = FAT_FAT12_EOC; 5315a: 307c 0ff8 moveaw #4088,%a0 } } else { vol->rdir_cl = 0; vol->mirror = 0; 5315e: 4204 clrb %d4 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 53160: 7e01 moveq #1,%d7 vol->mask = FAT_FAT12_MASK; 53162: 2546 0010 movel %d6,%a2@(16) vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 53166: 1547 000e moveb %d7,%a2@(14) vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 5316a: 2548 0014 movel %a0,%a2@(20) } } else { vol->rdir_cl = 0; vol->mirror = 0; 5316e: 1544 004e moveb %d4,%a2@(78) vol->afat = 0; 53172: 1544 0054 moveb %d4,%a2@(84) } } } else { vol->rdir_cl = 0; 53176: 42aa 0038 clrl %a2@(56) vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 5317a: 2543 003e movel %d3,%a2@(62) vol->next_cl = FAT_UNDEFINED_VALUE; 5317e: 2543 0046 movel %d3,%a2@(70) * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 53182: 2f0a movel %a2,%sp@- _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53184: 47f9 0004 48cc lea 448cc ,%a3 * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 5318a: 4eb9 0005 2738 jsr 52738 _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53190: 4878 000c pea c vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 53194: 4280 clrl %d0 /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 53196: 4878 0002 pea 2 vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 5319a: 102a 0054 moveb %a2@(84),%d0 5319e: 41ea 001a lea %a2@(26),%a0 531a2: 4c10 0800 mulsl %a0@,%d0 531a6: 4281 clrl %d1 531a8: 322a 0018 movew %a2@(24),%d1 531ac: d081 addl %d1,%d0 531ae: 2540 0050 movel %d0,%a2@(80) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 531b2: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 531b4: 4fef 000c lea %sp@(12),%sp _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 531b8: 2040 moveal %d0,%a0 531ba: 2540 0062 movel %d0,%a2@(98) if ( fs_info->vhash == NULL ) 531be: 6700 044c beqw 5360c } 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)); 531c2: 4878 000c pea c 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 ); 531c6: 2240 moveal %d0,%a1 531c8: 5889 addql #4,%a1 531ca: 2089 movel %a1,%a0@ 531cc: 43e8 0010 lea %a0@(16),%a1 531d0: 2149 000c movel %a1,%a0@(12) 531d4: 4878 0002 pea 2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 531d8: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 531dc: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 531e0: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 531e4: 2140 0008 movel %d0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 531e8: 42a8 0010 clrl %a0@(16) 531ec: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 531ee: 508f addql #8,%sp } 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)); 531f0: 2040 moveal %d0,%a0 531f2: 2540 0066 movel %d0,%a2@(102) if ( fs_info->rhash == NULL ) 531f6: 6700 0476 beqw 5366e } 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; 531fa: 222a 002c movel %a2@(44),%d1 fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 531fe: 4878 0001 pea 1 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 ); 53202: 43e8 0010 lea %a0@(16),%a1 53206: 5880 addql #4,%d0 53208: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5320c: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); 53210: 2080 movel %d0,%a0@ 53212: 4878 0100 pea 100 } 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; 53216: 4280 clrl %d0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 53218: 2149 0014 movel %a1,%a0@(20) 5321c: 102a 0003 moveb %a2@(3),%d0 53220: e1a9 lsll %d0,%d1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 53222: 42a8 0004 clrl %a0@(4) 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; 53226: 203c 0000 0100 movel #256,%d0 tail->previous = head; 5322c: 2148 0008 movel %a0,%a0@(8) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 53230: e989 lsll #4,%d1 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 53232: 42a8 0010 clrl %a0@(16) 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; 53236: 2540 0072 movel %d0,%a2@(114) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 5323a: 2541 0076 movel %d1,%a2@(118) fs_info->index = 0; 5323e: 42aa 006e clrl %a2@(110) fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 53242: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 53244: 508f addql #8,%sp 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; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 53246: 2540 006a movel %d0,%a2@(106) if ( fs_info->uino == NULL ) 5324a: 6700 0388 beqw 535d4 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)); 5324e: 4878 0001 pea 1 53252: 4280 clrl %d0 53254: 3012 movew %a2@,%d0 53256: 2f00 movel %d0,%sp@- 53258: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 5325a: 508f addql #8,%sp 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)); 5325c: 2540 0084 movel %d0,%a2@(132) if (fs_info->sec_buf == NULL) 53260: 6700 03ce beqw 53630 return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 53264: 4280 clrl %d0 53266: 102a 0004 moveb %a2@(4),%d0 5326a: 5380 subql #1,%d0 5326c: 2200 movel %d0,%d1 5326e: c2aa 0030 andl %a2@(48),%d1 /* * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) 53272: 6600 024c bnew 534c0 && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 53276: 4281 clrl %d1 53278: 122a 000e moveb %a2@(14),%d1 5327c: 7404 moveq #4,%d2 5327e: b481 cmpl %d1,%d2 53280: 6708 beqs 5328a <== NEVER TAKEN return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 53282: c0aa 001e andl %a2@(30),%d0 * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 53286: 6600 0238 bnew 534c0 { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 5328a: 4878 0001 pea 1 5328e: 4280 clrl %d0 53290: 302a 0006 movew %a2@(6),%d0 53294: 2f00 movel %d0,%sp@- 53296: 2f2a 005a movel %a2@(90),%sp@- 5329a: 4eb9 0005 0c52 jsr 50c52 if (sc == RTEMS_SUCCESSFUL) 532a0: 4fef 000c lea %sp@(12),%sp 532a4: 4a80 tstl %d0 532a6: 6600 0218 bnew 534c0 { vol->bytes_per_block = vol->bpc; vol->bytes_per_block_log2 = vol->bpc_log2; 532aa: 156a 0008 000c moveb %a2@(8),%a2@(12) vol->sectors_per_block = vol->spc; 532b0: 156a 0004 0009 moveb %a2@(4),%a2@(9) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); if (sc == RTEMS_SUCCESSFUL) { vol->bytes_per_block = vol->bpc; 532b6: 356a 0006 000a movew %a2@(6),%a2@(10) vol->sectors_per_block = vol->spc; } } return RC_OK; } 532bc: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 532c2: 4e5e unlk %fp 532c4: 4e75 rts 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); 532c6: 4286 clrl %d6 <== NOT EXECUTED 532c8: 4281 clrl %d1 <== NOT EXECUTED 532ca: 1c2e ff9f moveb %fp@(-97),%d6 <== NOT EXECUTED 532ce: 122e ff9e moveb %fp@(-98),%d1 <== NOT EXECUTED 532d2: 4284 clrl %d4 <== NOT EXECUTED 532d4: 182e ff97 moveb %fp@(-105),%d4 <== NOT EXECUTED 532d8: 7a18 moveq #24,%d5 <== NOT EXECUTED 532da: 4841 swap %d1 <== NOT EXECUTED 532dc: 4241 clrw %d1 <== NOT EXECUTED 532de: e18e lsll #8,%d6 <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 532e0: 3e0c movew %a4,%d7 <== NOT EXECUTED 532e2: 0283 0000 ffff andil #65535,%d3 <== 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); 532e8: 8c81 orl %d1,%d6 <== NOT EXECUTED 532ea: 122e ffa3 moveb %fp@(-93),%d1 <== NOT EXECUTED 532ee: 8c84 orl %d4,%d6 <== NOT EXECUTED 532f0: eba9 lsll %d5,%d1 <== NOT EXECUTED 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) 532f2: 4284 clrl %d4 <== NOT EXECUTED 532f4: 182e ffa4 moveb %fp@(-92),%d4 <== NOT EXECUTED 532f8: 4285 clrl %d5 <== NOT EXECUTED 532fa: 1a2e ffa5 moveb %fp@(-91),%d5 <== 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); 532fe: 8c81 orl %d1,%d6 <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 53300: 4281 clrl %d1 <== NOT EXECUTED 53302: 1207 moveb %d7,%d1 <== NOT EXECUTED 53304: 4c06 1800 mulsl %d6,%d1 <== NOT EXECUTED 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) 53308: e18c lsll #8,%d4 <== 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); 5330a: 2546 001a movel %d6,%a2@(26) <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5330e: d681 addl %d1,%d3 <== NOT EXECUTED 53310: d083 addl %d3,%d0 <== NOT EXECUTED 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) 53312: 8885 orl %d5,%d4 <== NOT EXECUTED 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 + 53314: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 53318: 2543 001e movel %d3,%a2@(30) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5331c: 4a44 tstw %d4 <== NOT EXECUTED 5331e: 6600 fe14 bnew 53134 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 53322: 4284 clrl %d4 <== NOT EXECUTED 53324: 4281 clrl %d1 <== NOT EXECUTED 53326: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 5332a: 122e ff9c moveb %fp@(-100),%d1 <== NOT EXECUTED 5332e: 4283 clrl %d3 <== NOT EXECUTED 53330: 162e ff96 moveb %fp@(-106),%d3 <== NOT EXECUTED 53334: 7a18 moveq #24,%d5 <== NOT EXECUTED 53336: 4841 swap %d1 <== NOT EXECUTED 53338: 4241 clrw %d1 <== NOT EXECUTED 5333a: e18c lsll #8,%d4 <== NOT EXECUTED 5333c: 8881 orl %d1,%d4 <== NOT EXECUTED 5333e: 122e ff9b moveb %fp@(-101),%d1 <== NOT EXECUTED 53342: 8883 orl %d3,%d4 <== NOT EXECUTED 53344: eba9 lsll %d5,%d1 <== NOT EXECUTED 53346: 8881 orl %d1,%d4 <== NOT EXECUTED 53348: 2544 002c movel %d4,%a2@(44) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 5334c: 9880 subl %d0,%d4 <== NOT EXECUTED vol->data_cls = data_secs / vol->spc; 5334e: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED 53352: 2544 0034 movel %d4,%a2@(52) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 53356: 0c84 0000 0ff4 cmpil #4084,%d4 <== NOT EXECUTED 5335c: 6300 fdf4 blsw 53152 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 53360: 0c84 0000 fff4 cmpil #65524,%d4 <== NOT EXECUTED 53366: 6300 0170 blsw 534d8 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5336a: 4280 clrl %d0 <== NOT EXECUTED 5336c: 4281 clrl %d1 <== NOT EXECUTED 5336e: 102e ff8e moveb %fp@(-114),%d0 <== NOT EXECUTED 53372: 122e ff8d moveb %fp@(-115),%d1 <== NOT EXECUTED 53376: 4283 clrl %d3 <== NOT EXECUTED 53378: 162e ff8f moveb %fp@(-113),%d3 <== NOT EXECUTED 5337c: 7818 moveq #24,%d4 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5337e: 7a80 moveq #-128,%d5 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 53380: 2e3c 0fff ffff movel #268435455,%d7 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 53386: 207c 0fff fff8 moveal #268435448,%a0 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5338c: 4841 swap %d1 <== NOT EXECUTED 5338e: 4241 clrw %d1 <== NOT EXECUTED 53390: e188 lsll #8,%d0 <== NOT EXECUTED 53392: 142e ff8b moveb %fp@(-117),%d2 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 53396: 7c04 moveq #4,%d6 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 53398: 2547 0010 movel %d7,%a2@(16) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5339c: 8081 orl %d1,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5339e: 122e ff95 moveb %fp@(-107),%d1 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 533a2: 2548 0014 movel %a0,%a2@(20) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 533a6: e9aa lsll %d4,%d2 <== NOT EXECUTED 533a8: 8083 orl %d3,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 533aa: c285 andl %d5,%d1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 533ac: 8082 orl %d2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 533ae: 1546 000e moveb %d6,%a2@(14) <== 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; 533b2: 1541 004e moveb %d1,%a2@(78) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 533b6: 2540 0038 movel %d0,%a2@(56) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 533ba: 4a01 tstb %d1 <== NOT EXECUTED 533bc: 6700 0174 beqw 53532 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 533c0: 720f moveq #15,%d1 <== NOT EXECUTED 533c2: 102e ff95 moveb %fp@(-107),%d0 <== NOT EXECUTED 533c6: c081 andl %d1,%d0 <== NOT EXECUTED 533c8: 1540 0054 moveb %d0,%a2@(84) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 533cc: 4280 clrl %d0 <== NOT EXECUTED 533ce: 102e ff90 moveb %fp@(-112),%d0 <== NOT EXECUTED 533d2: 4281 clrl %d1 <== NOT EXECUTED 533d4: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 533d8: e188 lsll #8,%d0 <== NOT EXECUTED 533da: 8081 orl %d1,%d0 <== NOT EXECUTED 533dc: 3540 003c movew %d0,%a2@(60) <== NOT EXECUTED if( vol->info_sec == 0 ) 533e0: 6700 0166 beqw 53548 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 533e4: 260e movel %fp,%d3 <== NOT EXECUTED 533e6: 0683 ffff ffae addil #-82,%d3 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, 533ec: 47f9 0005 29c4 lea 529c4 <_fat_block_read>,%a3 <== NOT EXECUTED 533f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 533f4: 4878 0004 pea 4 <== NOT EXECUTED 533f8: 42a7 clrl %sp@- <== NOT EXECUTED 533fa: 3f00 movew %d0,%sp@- <== NOT EXECUTED 533fc: 4267 clrw %sp@- <== NOT EXECUTED 533fe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53400: 4e93 jsr %a3@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 53402: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53406: 4a80 tstl %d0 <== NOT EXECUTED 53408: 6d00 0292 bltw 5369c <== NOT EXECUTED { close(vol->fd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 5340c: 4281 clrl %d1 <== NOT EXECUTED 5340e: 4282 clrl %d2 <== NOT EXECUTED 53410: 122e ffaf moveb %fp@(-81),%d1 <== NOT EXECUTED 53414: 142e ffb0 moveb %fp@(-80),%d2 <== NOT EXECUTED 53418: 4280 clrl %d0 <== NOT EXECUTED 5341a: 102e ffae moveb %fp@(-82),%d0 <== NOT EXECUTED 5341e: 7818 moveq #24,%d4 <== NOT EXECUTED 53420: 4842 swap %d2 <== NOT EXECUTED 53422: 4242 clrw %d2 <== NOT EXECUTED 53424: e189 lsll #8,%d1 <== NOT EXECUTED 53426: 8282 orl %d2,%d1 <== NOT EXECUTED 53428: 4282 clrl %d2 <== NOT EXECUTED 5342a: 142e ffb1 moveb %fp@(-79),%d2 <== NOT EXECUTED 5342e: 8280 orl %d0,%d1 <== NOT EXECUTED 53430: e9aa lsll %d4,%d2 <== NOT EXECUTED 53432: 8282 orl %d2,%d1 <== NOT EXECUTED 53434: 0c81 4161 5252 cmpil #1096897106,%d1 <== NOT EXECUTED 5343a: 6600 0154 bnew 53590 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 5343e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53440: 4878 000c pea c <== NOT EXECUTED 53444: 4280 clrl %d0 <== NOT EXECUTED 53446: 4878 01e4 pea 1e4 <== NOT EXECUTED 5344a: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 5344e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53450: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53452: 4e93 jsr %a3@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 53454: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53458: 4a80 tstl %d0 <== NOT EXECUTED 5345a: 6d00 0258 bltw 536b4 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5345e: 4281 clrl %d1 <== NOT EXECUTED 53460: 4283 clrl %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53462: 4280 clrl %d0 <== NOT EXECUTED 53464: 4282 clrl %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53466: 122e ffb3 moveb %fp@(-77),%d1 <== NOT EXECUTED 5346a: 162e ffb4 moveb %fp@(-76),%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5346e: 102e ffb7 moveb %fp@(-73),%d0 <== NOT EXECUTED 53472: 142e ffb8 moveb %fp@(-72),%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53476: 4285 clrl %d5 <== NOT EXECUTED 53478: 1a2e ffb2 moveb %fp@(-78),%d5 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5347c: 4284 clrl %d4 <== NOT EXECUTED 5347e: 182e ffb6 moveb %fp@(-74),%d4 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53482: 4843 swap %d3 <== NOT EXECUTED 53484: 4243 clrw %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53486: 4842 swap %d2 <== NOT EXECUTED 53488: 4242 clrw %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5348a: e189 lsll #8,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5348c: e188 lsll #8,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5348e: 8283 orl %d3,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53490: 8082 orl %d2,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53492: 4283 clrl %d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 53494: 4282 clrl %d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 53496: 162e ffb5 moveb %fp@(-75),%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5349a: 142e ffb9 moveb %fp@(-71),%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5349e: 8285 orl %d5,%d1 <== NOT EXECUTED 534a0: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 534a2: 8084 orl %d4,%d0 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 534a4: ebab lsll %d5,%d3 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 534a6: ebaa lsll %d5,%d2 <== NOT EXECUTED close(vol->fd); return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 534a8: 8283 orl %d3,%d1 <== NOT EXECUTED vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 534aa: 8082 orl %d2,%d0 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls_in_fs_info = 534ac: 2541 0042 movel %d1,%a2@(66) <== NOT EXECUTED FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; 534b0: 2541 003e movel %d1,%a2@(62) <== NOT EXECUTED vol->next_cl_in_fs_info = 534b4: 2540 004a movel %d0,%a2@(74) <== NOT EXECUTED FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); vol->next_cl = vol->next_cl_in_fs_info; 534b8: 2540 0046 movel %d0,%a2@(70) <== NOT EXECUTED 534bc: 6000 fcc4 braw 53182 <== NOT EXECUTED vol->bytes_per_block_log2 = vol->bpc_log2; vol->sectors_per_block = vol->spc; } } return RC_OK; 534c0: 4280 clrl %d0 <== NOT EXECUTED } 534c2: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 534c8: 4e5e unlk %fp <== NOT EXECUTED 534ca: 4e75 rts <== NOT EXECUTED 534cc: 2240 moveal %d0,%a1 (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 534ce: 4200 clrb %d0 534d0: 1540 0003 moveb %d0,%a2@(3) 534d4: 6000 fae0 braw 52fb6 else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 534d8: 76ff moveq #-1,%d3 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 534da: 227c 0000 ffff moveal #65535,%a1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 534e0: 223c 0000 fff8 movel #65528,%d1 <== NOT EXECUTED } } else { vol->rdir_cl = 0; vol->mirror = 0; 534e6: 4204 clrb %d4 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 534e8: 7002 moveq #2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 534ea: 2549 0010 movel %a1,%a2@(16) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 534ee: 1540 000e moveb %d0,%a2@(14) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 534f2: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 534f6: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED vol->mirror = 0; 534fa: 1544 004e moveb %d4,%a2@(78) <== NOT EXECUTED vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 534fe: 2543 003e movel %d3,%a2@(62) <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 53502: 1544 0054 moveb %d4,%a2@(84) <== NOT EXECUTED vol->free_cls = FAT_UNDEFINED_VALUE; vol->next_cl = FAT_UNDEFINED_VALUE; 53506: 2543 0046 movel %d3,%a2@(70) <== NOT EXECUTED 5350a: 6000 fc76 braw 53182 <== 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); 5350e: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 53512: 7806 moveq #6,%d4 <== 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); 53514: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 5351a: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 53520: 588f addql #4,%sp <== NOT EXECUTED 53522: 2040 moveal %d0,%a0 <== NOT EXECUTED 53524: 70ff moveq #-1,%d0 <== NOT EXECUTED 53526: 2084 movel %d4,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53528: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5352e: 4e5e unlk %fp <== NOT EXECUTED 53530: 4e75 rts <== 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; 53532: 4202 clrb %d2 <== NOT EXECUTED 53534: 1542 0054 moveb %d2,%a2@(84) <== NOT EXECUTED 53538: 6000 fe92 braw 533cc <== 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; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 5353c: 4201 clrb %d1 <== NOT EXECUTED 5353e: 6000 faa6 braw 52fe6 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 53542: 4283 clrl %d3 53544: 6000 faf0 braw 53036 vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 53548: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5354c: 7416 moveq #22,%d2 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { close(vol->fd); 5354e: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 53554: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5355a: 588f addql #4,%sp <== NOT EXECUTED 5355c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5355e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53560: 2082 movel %d2,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53562: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53568: 4e5e unlk %fp <== NOT EXECUTED 5356a: 4e75 rts <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 5356c: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 53570: 7605 moveq #5,%d3 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { close(vol->fd); 53572: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 53578: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5357e: 588f addql #4,%sp <== NOT EXECUTED 53580: 2040 moveal %d0,%a0 <== NOT EXECUTED 53582: 70ff moveq #-1,%d0 <== NOT EXECUTED 53584: 2083 movel %d3,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53586: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5358c: 4e5e unlk %fp <== NOT EXECUTED 5358e: 4e75 rts <== NOT EXECUTED * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 53590: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53592: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); 53598: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 5359c: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 535a2: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 535a8: 508f addql #8,%sp <== NOT EXECUTED 535aa: 7216 moveq #22,%d1 <== NOT EXECUTED 535ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 535ae: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 535b0: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); 535b6: 2081 movel %d1,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 535b8: 4e5e unlk %fp <== NOT EXECUTED 535ba: 4e75 rts <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; vol->fd = open(device, O_RDWR); if (vol->fd < 0) { rtems_set_errno_and_return_minus_one(ENXIO); 535bc: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 535c2: 7a06 moveq #6,%d5 <== NOT EXECUTED 535c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 535c6: 70ff moveq #-1,%d0 <== NOT EXECUTED 535c8: 2085 movel %d5,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 535ca: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 535d0: 4e5e unlk %fp <== NOT EXECUTED 535d2: 4e75 rts <== 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); 535d4: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 535d8: 47f9 0004 4bec lea 44bec ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 535de: 7a0c moveq #12,%d5 <== 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); 535e0: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 535e6: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 535ea: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 535ec: 2f2a 0066 movel %a2@(102),%sp@- <== NOT EXECUTED 535f0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 535f2: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 535f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 535fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 535fe: 70ff moveq #-1,%d0 <== NOT EXECUTED 53600: 2085 movel %d5,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53602: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53608: 4e5e unlk %fp <== NOT EXECUTED 5360a: 4e75 rts <== 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); 5360c: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53610: 7e0c moveq #12,%d7 <== 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); 53612: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53618: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5361e: 588f addql #4,%sp <== NOT EXECUTED 53620: 2040 moveal %d0,%a0 <== NOT EXECUTED 53622: 70ff moveq #-1,%d0 <== NOT EXECUTED 53624: 2087 movel %d7,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53626: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5362c: 4e5e unlk %fp <== NOT EXECUTED 5362e: 4e75 rts <== 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); 53630: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 53634: 47f9 0004 4bec lea 44bec ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 5363a: 780c moveq #12,%d4 <== 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); 5363c: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 53642: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 53646: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 53648: 2f2a 0066 movel %a2@(102),%sp@- <== NOT EXECUTED 5364c: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 5364e: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED 53652: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53654: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5365a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5365e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53660: 70ff moveq #-1,%d0 <== NOT EXECUTED 53662: 2084 movel %d4,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53664: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5366a: 4e5e unlk %fp <== NOT EXECUTED 5366c: 4e75 rts <== 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); 5366e: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 53672: 7c0c moveq #12,%d6 <== 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); 53674: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED free(fs_info->vhash); 5367a: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 5367e: 4eb9 0004 4bec jsr 44bec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 53684: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 5368a: 508f addql #8,%sp <== NOT EXECUTED 5368c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5368e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53690: 2086 movel %d6,%a0@ <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 53692: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53698: 4e5e unlk %fp <== NOT EXECUTED 5369a: 4e75 rts <== NOT EXECUTED { ret = _fat_block_read(fs_info, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { close(vol->fd); 5369c: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 536a0: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED 536a6: 588f addql #4,%sp <== NOT EXECUTED return -1; 536a8: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 536aa: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536b0: 4e5e unlk %fp <== NOT EXECUTED 536b2: 4e75 rts <== NOT EXECUTED * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release(fat_fs_info_t *fs_info) { return fat_buf_release(fs_info); 536b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 536b6: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(fs_info); close(vol->fd); 536bc: 2f2a 0056 movel %a2@(86),%sp@- <== NOT EXECUTED 536c0: 4eb9 0004 4918 jsr 44918 <== NOT EXECUTED 536c6: 508f addql #8,%sp <== NOT EXECUTED return -1; 536c8: 70ff moveq #-1,%d0 <== NOT EXECUTED vol->sectors_per_block = vol->spc; } } return RC_OK; } 536ca: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 536d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058fe0 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 58fe0: 4e56 ffd0 linkw %fp,#-48 58fe4: 122e 001f moveb %fp@(31),%d1 58fe8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 58fec: 246e 0008 moveal %fp@(8),%a2 58ff0: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 58ff4: 282a 0034 movel %a2@(52),%d4 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 58ff8: 1d41 fffb moveb %d1,%fp@(-5) int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 58ffc: 42ae fffc clrl %fp@(-4) uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; ssize_t bytes_written; *cls_added = 0; 59000: 4293 clrl %a3@ if (count == 0) 59002: 4aae 0010 tstl %fp@(16) 59006: 6700 0146 beqw 5914e return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 5900a: 2e2a 0046 movel %a2@(70),%d7 5900e: 70ff moveq #-1,%d0 59010: b087 cmpl %d7,%d0 59012: 6700 0148 beqw 5915c { int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 59016: 5484 addql #2,%d4 /* * 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) 59018: 7202 moveq #2,%d1 5901a: b284 cmpl %d4,%d1 5901c: 6400 01c2 bccw 591e0 59020: 2a0e movel %fp,%d5 59022: 7402 moveq #2,%d2 59024: 4286 clrl %d6 59026: 5985 subql #4,%d5 59028: 49f9 0005 8ac0 lea 58ac0 ,%a4 { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 5902e: 2f05 movel %d5,%sp@- 59030: 2f07 movel %d7,%sp@- 59032: 2f0a movel %a2,%sp@- 59034: 4e94 jsr %a4@ if ( rc != RC_OK ) 59036: 4fef 000c lea %sp@(12),%sp * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); 5903a: 2600 movel %d0,%d3 if ( rc != RC_OK ) 5903c: 6600 0124 bnew 59162 if (*cls_added != 0) fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 59040: 4aae fffc tstl %fp@(-4) 59044: 663c bnes 59082 /* * 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) 59046: 4a93 tstl %a3@ 59048: 6600 00ce bnew 59118 { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5904c: 4878 ffff pea ffffffff 59050: 4bf9 0005 8c92 lea 58c92 ,%a5 * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 59056: 206e 000c moveal %fp@(12),%a0 rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5905a: 2f07 movel %d7,%sp@- * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 5905c: 2087 movel %d7,%a0@ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5905e: 2f0a movel %a2,%sp@- 59060: 4e95 jsr %a5@ if ( rc != RC_OK ) 59062: 4fef 000c lea %sp@(12),%sp 59066: 4a80 tstl %d0 59068: 6600 014a bnew 591b4 rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) 5906c: 4a2e fffb tstb %fp@(-5) 59070: 6650 bnes 590c2 <== NEVER TAKEN goto cleanup; } } save_cln = cl4find; (*cls_added)++; 59072: 2013 movel %a3@,%d0 59074: 5280 addql #1,%d0 59076: 2680 movel %d0,%a3@ /* have we satisfied request ? */ if (*cls_added == count) 59078: b0ae 0010 cmpl %fp@(16),%d0 5907c: 6700 0106 beqw 59184 59080: 2c07 movel %d7,%d6 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 59082: 5282 addql #1,%d2 cl4find++; 59084: 5287 addql #1,%d7 if (cl4find >= data_cls_val) 59086: be84 cmpl %d4,%d7 59088: 6502 bcss 5908c <== ALWAYS TAKEN cl4find = 2; 5908a: 7e02 moveq #2,%d7 <== 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) 5908c: b484 cmpl %d4,%d2 5908e: 669e bnes 5902e <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59090: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 59094: 72ff moveq #-1,%d1 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 59096: 2546 0046 movel %d6,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5909a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5909c: 6706 beqs 590a4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 5909e: 9093 subl %a3@,%d0 <== NOT EXECUTED 590a0: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED *last_cl = save_cln; 590a4: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED fat_buf_release(fs_info); return RC_OK; 590a8: 4283 clrl %d3 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; 590aa: 2086 movel %d6,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 590ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 590ae: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED 590b4: 588f addql #4,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 590b6: 2003 movel %d3,%d0 <== NOT EXECUTED 590b8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 590be: 4e5e unlk %fp <== NOT EXECUTED 590c0: 4e75 rts <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 590c2: 4280 clrl %d0 <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 590c4: 4286 clrl %d6 <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 590c6: 42a7 clrl %sp@- <== NOT EXECUTED 590c8: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED 590cc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 590ce: 42a7 clrl %sp@- <== NOT EXECUTED 590d0: 2f07 movel %d7,%sp@- <== NOT EXECUTED 590d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 590d4: 4eb9 0005 2b1a jsr 52b1a <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 590da: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 590de: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED 590e2: b086 cmpl %d6,%d0 <== NOT EXECUTED 590e4: 678c beqs 59072 <== NOT EXECUTED { rc = -1; 590e6: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 590e8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; 590ec: 2600 movel %d0,%d3 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 590ee: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 590f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 590f2: 4eb9 0005 8f0e jsr 58f0e <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 590f8: 42a7 clrl %sp@- <== NOT EXECUTED 590fa: 2f07 movel %d7,%sp@- <== NOT EXECUTED 590fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 590fe: 4e95 jsr %a5@ <== NOT EXECUTED fat_buf_release(fs_info); 59100: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59102: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED 59108: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED return rc; } 5910c: 2003 movel %d3,%d0 <== NOT EXECUTED 5910e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59114: 4e5e unlk %fp <== NOT EXECUTED 59116: 4e75 rts <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 59118: 4878 ffff pea ffffffff <== NOT EXECUTED 5911c: 4bf9 0005 8c92 lea 58c92 ,%a5 <== NOT EXECUTED 59122: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59124: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59126: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 59128: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5912c: 4a80 tstl %d0 <== NOT EXECUTED 5912e: 6600 0092 bnew 591c2 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 59132: 2f07 movel %d7,%sp@- <== NOT EXECUTED 59134: 2f06 movel %d6,%sp@- <== NOT EXECUTED 59136: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59138: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5913a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5913e: 4a80 tstl %d0 <== NOT EXECUTED 59140: 66a6 bnes 590e8 <== NOT EXECUTED goto cleanup; } if (zero_fill) 59142: 4a2e fffb tstb %fp@(-5) <== NOT EXECUTED 59146: 6700 ff2a beqw 59072 <== NOT EXECUTED 5914a: 6000 ff76 braw 590c2 <== NOT EXECUTED ssize_t bytes_written; *cls_added = 0; if (count == 0) return rc; 5914e: 4283 clrl %d3 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59150: 2003 movel %d3,%d0 <== NOT EXECUTED 59152: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59158: 4e5e unlk %fp <== NOT EXECUTED 5915a: 4e75 rts <== NOT EXECUTED uint32_t *last_cl, bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; 5915c: 7e02 moveq #2,%d7 5915e: 6000 feb6 braw 59016 while (i < data_cls_val) { rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 59162: 4a93 tstl %a3@ <== NOT EXECUTED 59164: 6700 ff50 beqw 590b6 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 59168: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5916c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5916e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 59170: 4eb9 0005 8f0e jsr 58f0e <== NOT EXECUTED 59176: 508f addql #8,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 59178: 2003 movel %d3,%d0 <== NOT EXECUTED 5917a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 59180: 4e5e unlk %fp <== NOT EXECUTED 59182: 4e75 rts <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 59184: 202a 003e movel %a2@(62),%d0 59188: 72ff moveq #-1,%d1 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 5918a: 2547 0046 movel %d7,%a2@(70) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5918e: b280 cmpl %d0,%d1 59190: 6706 beqs 59198 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 59192: 9093 subl %a3@,%d0 <== NOT EXECUTED 59194: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED *last_cl = save_cln; 59198: 206e 0018 moveal %fp@(24),%a0 5919c: 2087 movel %d7,%a0@ fat_buf_release(fs_info); 5919e: 2f0a movel %a2,%sp@- 591a0: 4eb9 0005 2738 jsr 52738 591a6: 588f addql #4,%sp fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 591a8: 2003 movel %d3,%d0 591aa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 591b0: 4e5e unlk %fp 591b2: 4e75 rts * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 591b4: 2600 movel %d0,%d3 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 591b6: 2003 movel %d3,%d0 <== NOT EXECUTED 591b8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 591be: 4e5e unlk %fp <== NOT EXECUTED 591c0: 4e75 rts <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 591c2: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 591c6: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 591c8: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 591ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 591cc: 4eb9 0005 8f0e jsr 58f0e <== NOT EXECUTED 591d2: 508f addql #8,%sp <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); fat_buf_release(fs_info); return rc; } 591d4: 2003 movel %d3,%d0 <== NOT EXECUTED 591d6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 591dc: 4e5e unlk %fp <== NOT EXECUTED 591de: 4e75 rts <== 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) 591e0: 4286 clrl %d6 <== NOT EXECUTED 591e2: 6000 feac braw 59090 <== NOT EXECUTED ... =============================================================================== 00052a5a : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 52a5a: 4e56 ffd4 linkw %fp,#-44 52a5e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52a62: 246e 0008 moveal %fp@(8),%a2 52a66: 262e 0014 movel %fp@(20),%d3 52a6a: 286e 0018 moveal %fp@(24),%a4 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52a6e: 6700 009c beqw 52b0c 52a72: 2e0e movel %fp,%d7 52a74: 4284 clrl %d4 52a76: 5987 subql #4,%d7 52a78: 47f9 0005 2908 lea 52908 ,%a3 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52a7e: 4bf9 0005 b188 lea 5b188 ,%a5 uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52a84: 2c2e 0010 movel %fp@(16),%d6 52a88: 2a2e 000c movel %fp@(12),%d5 { c = MIN(count, (fs_info->vol.bps - ofs)); 52a8c: 4282 clrl %d2 52a8e: 3412 movew %a2@,%d2 52a90: 9486 subl %d6,%d2 52a92: b682 cmpl %d2,%d3 52a94: 6402 bccs 52a98 <== NEVER TAKEN 52a96: 2403 movel %d3,%d2 if (c == fs_info->vol.bytes_per_block) 52a98: 4280 clrl %d0 52a9a: 302a 000a movew %a2@(10),%d0 52a9e: b480 cmpl %d0,%d2 52aa0: 6744 beqs 52ae6 <== NEVER TAKEN rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52aa2: 2f07 movel %d7,%sp@- 52aa4: 4878 0001 pea 1 memcpy((sec_buf + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 52aa8: 9682 subl %d2,%d3 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52aaa: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; 52aac: 5285 addql #1,%d5 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 52aae: 2f0a movel %a2,%sp@- 52ab0: 4e93 jsr %a3@ 52ab2: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 52ab6: 4a80 tstl %d0 52ab8: 6644 bnes 52afe <== NEVER TAKEN return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52aba: 2f02 movel %d2,%sp@- 52abc: 4874 4800 pea %a4@(00000000,%d4:l) 52ac0: dcae fffc addl %fp@(-4),%d6 fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 52ac4: d882 addl %d2,%d4 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52ac6: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; 52ac8: 4286 clrl %d6 else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 52aca: 4e95 jsr %a5@ uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 52acc: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 52ad0: 7001 moveq #1,%d0 52ad2: 1540 007e moveb %d0,%a2@(126) 52ad6: 4a83 tstl %d3 52ad8: 66b2 bnes 52a8c <== NEVER TAKEN cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52ada: 2004 movel %d4,%d0 52adc: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 52ae2: 4e5e unlk %fp 52ae4: 4e75 rts while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52ae6: 2f07 movel %d7,%sp@- <== NOT EXECUTED 52ae8: 4878 0002 pea 2 <== NOT EXECUTED memcpy((sec_buf + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 52aec: 9682 subl %d2,%d3 <== NOT EXECUTED while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52aee: 2f05 movel %d5,%sp@- <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; 52af0: 5285 addql #1,%d5 <== NOT EXECUTED while(count > 0) { c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 52af2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52af4: 4e93 jsr %a3@ <== NOT EXECUTED 52af6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) 52afa: 4a80 tstl %d0 <== NOT EXECUTED 52afc: 67bc beqs 52aba <== NOT EXECUTED return -1; 52afe: 78ff moveq #-1,%d4 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52b00: 2004 movel %d4,%d0 <== NOT EXECUTED 52b02: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52b08: 4e5e unlk %fp <== NOT EXECUTED 52b0a: 4e75 rts <== NOT EXECUTED uint32_t offset, uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; 52b0c: 4284 clrl %d4 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 52b0e: 2004 movel %d4,%d0 <== NOT EXECUTED 52b10: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52b16: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00058c92 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 58c92: 7001 moveq #1,%d0 fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 58c94: 4e56 ffe4 linkw %fp,#-28 58c98: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 58c9c: 246e 0008 moveal %fp@(8),%a2 58ca0: 242e 000c movel %fp@(12),%d2 int rc = RC_OK; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; uint8_t *sec_buf = NULL; 58ca4: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 58ca8: b082 cmpl %d2,%d0 58caa: 6476 bccs 58d22 <== NEVER TAKEN 58cac: 202a 0034 movel %a2@(52),%d0 58cb0: 5280 addql #1,%d0 58cb2: b082 cmpl %d2,%d0 58cb4: 656c bcss 58d22 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 58cb6: 102a 000e moveb %a2@(14),%d0 58cba: 0800 0000 btst #0,%d0 58cbe: 667a bnes 58d3a 58cc0: 7202 moveq #2,%d1 <== NOT EXECUTED 58cc2: 2802 movel %d2,%d4 <== NOT EXECUTED 58cc4: c081 andl %d1,%d0 <== NOT EXECUTED 58cc6: 4a00 tstb %d0 <== NOT EXECUTED 58cc8: 6778 beqs 58d42 <== NOT EXECUTED 58cca: d884 addl %d4,%d4 <== NOT EXECUTED 58ccc: 4280 clrl %d0 58cce: 102a 0002 moveb %a2@(2),%d0 58cd2: 2604 movel %d4,%d3 58cd4: e0ab lsrl %d0,%d3 58cd6: d6aa 0050 addl %a2@(80),%d3 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, &sec_buf); 58cda: 47f9 0005 2908 lea 52908 ,%a3 58ce0: 486e fffc pea %fp@(-4) 58ce4: 4878 0001 pea 1 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); 58ce8: 3a12 movew %a2@,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 58cea: 2f03 movel %d3,%sp@- 58cec: 2f0a movel %a2,%sp@- 58cee: 4e93 jsr %a3@ if (rc != RC_OK) 58cf0: 4fef 0010 lea %sp@(16),%sp 58cf4: 4a80 tstl %d0 58cf6: 6638 bnes 58d30 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 58cf8: 4281 clrl %d1 58cfa: 122a 000e moveb %a2@(14),%d1 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); 58cfe: 0285 0000 ffff andil #65535,%d5 58d04: 5385 subql #1,%d5 58d06: c885 andl %d5,%d4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 58d08: 7a02 moveq #2,%d5 58d0a: ba81 cmpl %d1,%d5 58d0c: 6700 00ec beqw 58dfa 58d10: 1a3c 0004 moveb #4,%d5 58d14: ba81 cmpl %d1,%d5 58d16: 6700 0092 beqw 58daa 58d1a: 1a3c 0001 moveb #1,%d5 58d1e: ba81 cmpl %d1,%d5 58d20: 6724 beqs 58d46 <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 58d22: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 58d28: 7405 moveq #5,%d2 <== NOT EXECUTED 58d2a: 2040 moveal %d0,%a0 <== NOT EXECUTED 58d2c: 70ff moveq #-1,%d0 <== NOT EXECUTED 58d2e: 2082 movel %d2,%a0@ <== NOT EXECUTED break; } return RC_OK; } 58d30: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 58d36: 4e5e unlk %fp <== NOT EXECUTED 58d38: 4e75 rts <== 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) + 58d3a: 2802 movel %d2,%d4 58d3c: e28c lsrl #1,%d4 58d3e: d882 addl %d2,%d4 58d40: 608a bras 58ccc 58d42: e58c lsll #2,%d4 <== NOT EXECUTED 58d44: 6086 bras 58ccc <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 58d46: 206e fffc moveal %fp@(-4),%a0 return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 58d4a: 0802 0000 btst #0,%d2 58d4e: 6700 00d4 beqw 58e24 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 58d52: d1c4 addal %d4,%a0 58d54: 1a3c 000f moveb #15,%d5 58d58: 1210 moveb %a0@,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 58d5a: 242e 0010 movel %fp@(16),%d2 *(sec_buf + ofs) &= 0x0F; 58d5e: c285 andl %d5,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 58d60: e98a lsll #4,%d2 *(sec_buf + ofs) &= 0x0F; 58d62: 1081 moveb %d1,%a0@ *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 58d64: 206e fffc moveal %fp@(-4),%a0 58d68: d1c4 addal %d4,%a0 58d6a: 1210 moveb %a0@,%d1 58d6c: 8282 orl %d2,%d1 58d6e: 1081 moveb %d1,%a0@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 58d70: 7201 moveq #1,%d1 58d72: 1541 007e moveb %d1,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 58d76: 4281 clrl %d1 58d78: 3212 movew %a2@,%d1 58d7a: 5381 subql #1,%d1 58d7c: b881 cmpl %d1,%d4 58d7e: 6700 0100 beqw 58e80 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 58d82: 206e fffc moveal %fp@(-4),%a0 58d86: 5284 addql #1,%d4 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 58d88: 4281 clrl %d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 58d8a: 4203 clrb %d3 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 58d8c: 3202 movew %d2,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 58d8e: 1183 4800 moveb %d3,%a0@(00000000,%d4:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 58d92: e089 lsrl #8,%d1 58d94: 206e fffc moveal %fp@(-4),%a0 58d98: d1c4 addal %d4,%a0 58d9a: 1a10 moveb %a0@,%d5 58d9c: 8285 orl %d5,%d1 58d9e: 1081 moveb %d1,%a0@ break; } return RC_OK; } 58da0: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 58da6: 4e5e unlk %fp 58da8: 4e75 rts (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)); 58daa: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED 58dae: 7418 moveq #24,%d2 <== NOT EXECUTED 58db0: 0283 0fff ffff andil #268435455,%d3 <== NOT EXECUTED 58db6: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 58dba: 2a03 movel %d3,%d5 <== NOT EXECUTED 58dbc: e4ad lsrl %d2,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58dbe: e5a9 lsll %d2,%d1 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 58dc0: 2403 movel %d3,%d2 <== NOT EXECUTED 58dc2: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; 58dc4: e18b lsll #8,%d3 <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 58dc6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58dca: d1c4 addal %d4,%a0 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 58dcc: 8285 orl %d5,%d1 <== NOT EXECUTED 58dce: 0283 00ff 0000 andil #16711680,%d3 <== NOT EXECUTED 58dd4: 2810 movel %a0@,%d4 <== NOT EXECUTED 58dd6: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 58ddc: 8283 orl %d3,%d1 <== NOT EXECUTED 58dde: 0284 0000 00f0 andil #240,%d4 <== NOT EXECUTED 58de4: 7601 moveq #1,%d3 <== NOT EXECUTED 58de6: 8282 orl %d2,%d1 <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 58de8: 8284 orl %d4,%d1 <== NOT EXECUTED 58dea: 2081 movel %d1,%a0@ <== NOT EXECUTED 58dec: 1543 007e moveb %d3,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 58df0: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 58df6: 4e5e unlk %fp <== NOT EXECUTED 58df8: 4e75 rts <== NOT EXECUTED 58dfa: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 58dfe: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = 58e04: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 58e08: 2401 movel %d1,%d2 <== NOT EXECUTED 58e0a: e089 lsrl #8,%d1 <== NOT EXECUTED 58e0c: e18a lsll #8,%d2 <== NOT EXECUTED 58e0e: 8282 orl %d2,%d1 <== NOT EXECUTED 58e10: 3181 4800 movew %d1,%a0@(00000000,%d4:l) <== NOT EXECUTED 58e14: 7201 moveq #1,%d1 <== NOT EXECUTED 58e16: 1541 007e moveb %d1,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 58e1a: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 58e20: 4e5e unlk %fp <== NOT EXECUTED 58e22: 4e75 rts <== NOT EXECUTED *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 58e24: 242e 0010 movel %fp@(16),%d2 *(sec_buf + ofs) &= 0x00; 58e28: 4201 clrb %d1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 58e2a: 0282 0000 0fff andil #4095,%d2 *(sec_buf + ofs) &= 0x00; 58e30: 1181 4800 moveb %d1,%a0@(00000000,%d4:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 58e34: 3a02 movew %d2,%d5 *(sec_buf + ofs) &= 0x00; *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 58e36: 206e fffc moveal %fp@(-4),%a0 58e3a: d1c4 addal %d4,%a0 58e3c: 1210 moveb %a0@,%d1 58e3e: 8481 orl %d1,%d2 58e40: 1082 moveb %d2,%a0@ 58e42: 7401 moveq #1,%d2 58e44: 1542 007e moveb %d2,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 58e48: 4282 clrl %d2 58e4a: 3412 movew %a2@,%d2 58e4c: 2042 moveal %d2,%a0 58e4e: 5388 subql #1,%a0 58e50: b888 cmpl %a0,%d4 58e52: 6770 beqs 58ec4 <== NEVER TAKEN fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 58e54: 206e fffc moveal %fp@(-4),%a0 58e58: 5284 addql #1,%d4 58e5a: d1c4 addal %d4,%a0 58e5c: 76f0 moveq #-16,%d3 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58e5e: 4281 clrl %d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 58e60: 1410 moveb %a0@,%d2 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58e62: 3205 movew %d5,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 58e64: c483 andl %d3,%d2 *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58e66: e089 lsrl #8,%d1 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 58e68: 1082 moveb %d2,%a0@ *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58e6a: 206e fffc moveal %fp@(-4),%a0 58e6e: d1c4 addal %d4,%a0 58e70: 1a10 moveb %a0@,%d5 58e72: 8285 orl %d5,%d1 58e74: 1081 moveb %d1,%a0@ break; } return RC_OK; } 58e76: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 58e7c: 4e5e unlk %fp 58e7e: 4e75 rts 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, 58e80: 486e fffc pea %fp@(-4) <== NOT EXECUTED 58e84: 2043 moveal %d3,%a0 <== NOT EXECUTED 58e86: 4878 0001 pea 1 <== NOT EXECUTED 58e8a: 4868 0001 pea %a0@(1) <== NOT EXECUTED 58e8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58e90: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 58e92: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 58e96: 4a80 tstl %d0 <== NOT EXECUTED 58e98: 6600 fe96 bnew 58d30 <== NOT EXECUTED return rc; *sec_buf &= 0x00; 58e9c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58ea0: 4210 clrb %a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58ea2: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED 58ea8: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58eac: e08a lsrl #8,%d2 <== NOT EXECUTED 58eae: 1210 moveb %a0@,%d1 <== NOT EXECUTED 58eb0: 8481 orl %d1,%d2 <== NOT EXECUTED 58eb2: 1082 moveb %d2,%a0@ <== NOT EXECUTED 58eb4: 7401 moveq #1,%d2 <== NOT EXECUTED 58eb6: 1542 007e moveb %d2,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 58eba: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 58ec0: 4e5e unlk %fp <== NOT EXECUTED 58ec2: 4e75 rts <== 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, 58ec4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 58ec8: 2043 moveal %d3,%a0 <== NOT EXECUTED 58eca: 4878 0001 pea 1 <== NOT EXECUTED 58ece: 4868 0001 pea %a0@(1) <== NOT EXECUTED 58ed2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 58ed4: 4e93 jsr %a3@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 58ed6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 58eda: 4a80 tstl %d0 <== NOT EXECUTED 58edc: 6600 fe52 bnew 58d30 <== NOT EXECUTED return rc; *sec_buf &= 0xF0; 58ee0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58ee4: 74f0 moveq #-16,%d2 <== NOT EXECUTED 58ee6: 1210 moveb %a0@,%d1 <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58ee8: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; 58eee: c282 andl %d2,%d1 <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58ef0: e08d lsrl #8,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0xF0; 58ef2: 1081 moveb %d1,%a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 58ef4: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 58ef8: 1610 moveb %a0@,%d3 <== NOT EXECUTED 58efa: 8a83 orl %d3,%d5 <== NOT EXECUTED 58efc: 1085 moveb %d5,%a0@ <== NOT EXECUTED 58efe: 7a01 moveq #1,%d5 <== NOT EXECUTED 58f00: 1545 007e moveb %d5,%a2@(126) <== NOT EXECUTED break; } return RC_OK; } 58f04: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3 <== NOT EXECUTED 58f0a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053810 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 53810: 4e56 ffe8 linkw %fp,#-24 53814: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 53818: 286e 0008 moveal %fp@(8),%a4 int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 5381c: 2f0c movel %a4,%sp@- 5381e: 4eb9 0005 36d4 jsr 536d4 if ( rc != RC_OK ) 53824: 588f addql #4,%sp fat_shutdown_drive(fat_fs_info_t *fs_info) { int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 53826: 2800 movel %d0,%d4 if ( rc != RC_OK ) 53828: 6600 00bc bnew 538e6 rc = -1; 5382c: 4283 clrl %d3 5382e: 45f9 0004 4bec lea 44bec ,%a2 53834: 47f9 0004 a07c lea 4a07c <_Chain_Get>,%a3 for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 5383a: 242c 0062 movel %a4@(98),%d2 5383e: d483 addl %d3,%d2 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 53840: 2f02 movel %d2,%sp@- 53842: 4e93 jsr %a3@ while ( (node = rtems_chain_get(the_chain)) != NULL ) 53844: 588f addql #4,%sp 53846: 4a80 tstl %d0 53848: 6710 beqs 5385a <== ALWAYS TAKEN free(node); 5384a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5384c: 4e92 jsr %a2@ <== NOT EXECUTED 5384e: 588f addql #4,%sp <== NOT EXECUTED 53850: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53852: 4e93 jsr %a3@ <== NOT EXECUTED 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 ) 53854: 588f addql #4,%sp <== NOT EXECUTED 53856: 4a80 tstl %d0 <== NOT EXECUTED 53858: 66f0 bnes 5384a <== NOT EXECUTED 5385a: 0683 0000 000c addil #12,%d3 rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 53860: 103c 0018 moveb #24,%d0 53864: b083 cmpl %d3,%d0 53866: 66d2 bnes 5383a 53868: 4283 clrl %d3 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 5386a: 242c 0066 movel %a4@(102),%d2 5386e: d483 addl %d3,%d2 53870: 2f02 movel %d2,%sp@- 53872: 4e93 jsr %a3@ while ( (node = rtems_chain_get(the_chain)) != NULL ) 53874: 588f addql #4,%sp 53876: 4a80 tstl %d0 53878: 6710 beqs 5388a <== ALWAYS TAKEN free(node); 5387a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5387c: 4e92 jsr %a2@ <== NOT EXECUTED 5387e: 588f addql #4,%sp <== NOT EXECUTED 53880: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53882: 4e93 jsr %a3@ <== NOT EXECUTED 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 ) 53884: 588f addql #4,%sp <== NOT EXECUTED 53886: 4a80 tstl %d0 <== NOT EXECUTED 53888: 66f0 bnes 5387a <== NOT EXECUTED 5388a: 0683 0000 000c addil #12,%d3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 53890: 103c 0018 moveb #24,%d0 53894: b083 cmpl %d3,%d0 53896: 66d2 bnes 5386a while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 53898: 2f2c 0062 movel %a4@(98),%sp@- 5389c: 4e92 jsr %a2@ free(fs_info->rhash); 5389e: 2f2c 0066 movel %a4@(102),%sp@- 538a2: 4e92 jsr %a2@ free(fs_info->uino); 538a4: 2f2c 006a movel %a4@(106),%sp@- 538a8: 4e92 jsr %a2@ free(fs_info->sec_buf); 538aa: 2f2c 0084 movel %a4@(132),%sp@- 538ae: 4e92 jsr %a2@ close(fs_info->vol.fd); 538b0: 2f2c 0056 movel %a4@(86),%sp@- 538b4: 4eb9 0004 4918 jsr 44918 if (rc) 538ba: 4fef 0014 lea %sp@(20),%sp 538be: 4a84 tstl %d4 538c0: 660c bnes 538ce <== NEVER TAKEN errno = EIO; return rc; } 538c2: 2004 movel %d4,%d0 538c4: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 538ca: 4e5e unlk %fp 538cc: 4e75 rts free(fs_info->uino); free(fs_info->sec_buf); close(fs_info->vol.fd); if (rc) errno = EIO; 538ce: 4eb9 0005 a7e0 jsr 5a7e0 <__errno> <== NOT EXECUTED 538d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 538d6: 7005 moveq #5,%d0 <== NOT EXECUTED 538d8: 2080 movel %d0,%a0@ <== NOT EXECUTED return rc; } 538da: 2004 movel %d4,%d0 <== NOT EXECUTED 538dc: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 538e2: 4e5e unlk %fp <== NOT EXECUTED 538e4: 4e75 rts <== NOT EXECUTED int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; 538e6: 78ff moveq #-1,%d4 <== NOT EXECUTED 538e8: 4283 clrl %d3 <== NOT EXECUTED 538ea: 45f9 0004 4bec lea 44bec ,%a2 <== NOT EXECUTED 538f0: 47f9 0004 a07c lea 4a07c <_Chain_Get>,%a3 <== NOT EXECUTED 538f6: 6000 ff42 braw 5383a <== NOT EXECUTED =============================================================================== 000536d4 : static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) 536d4: 4280 clrl %d0 536d6: 7204 moveq #4,%d1 return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 536d8: 4e56 ffe0 linkw %fp,#-32 536dc: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 536e0: 246e 0008 moveal %fp@(8),%a2 static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) 536e4: 102a 000e moveb %a2@(14),%d0 536e8: b280 cmpl %d0,%d1 536ea: 6728 beqs 53714 <== NEVER TAKEN * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 536ec: 4282 clrl %d2 rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); 536ee: 2f0a movel %a2,%sp@- 536f0: 4eb9 0005 2738 jsr 52738 if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 536f6: 2f2a 005a movel %a2@(90),%sp@- 536fa: 4eb9 0005 0a20 jsr 50a20 53700: 508f addql #8,%sp 53702: 4a80 tstl %d0 53704: 6600 00fc bnew 53802 rc = -1; return rc; } 53708: 2002 movel %d2,%d0 5370a: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 53710: 4e5e unlk %fp 53712: 4e75 rts { ssize_t ret1 = 0, ret2 = 0; if (fs_info->vol.type == FAT_FAT32) { uint32_t free_count = fs_info->vol.free_cls; 53714: 222a 003e movel %a2@(62),%d1 <== NOT EXECUTED uint32_t next_free = fs_info->vol.next_cl; 53718: 242a 0046 movel %a2@(70),%d2 <== NOT EXECUTED if (free_count != fs_info->vol.free_cls_in_fs_info) 5371c: b2aa 0042 cmpl %a2@(66),%d1 <== NOT EXECUTED 53720: 677a beqs 5379c <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 53722: 2001 movel %d1,%d0 <== NOT EXECUTED 53724: 7618 moveq #24,%d3 <== NOT EXECUTED 53726: e6a8 lsrl %d3,%d0 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53728: 2601 movel %d1,%d3 <== NOT EXECUTED 5372a: 7a18 moveq #24,%d5 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 5372c: 2801 movel %d1,%d4 <== NOT EXECUTED 5372e: e08c lsrl #8,%d4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53730: 264e moveal %fp,%a3 <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 53732: 49f9 0005 2a5a lea 52a5a ,%a4 <== NOT EXECUTED 53738: ebab lsll %d5,%d3 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5373a: 2a01 movel %d1,%d5 <== NOT EXECUTED 5373c: e18d lsll #8,%d5 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5373e: 8680 orl %d0,%d3 <== NOT EXECUTED 53740: 0284 0000 ff00 andil #65280,%d4 <== NOT EXECUTED 53746: 0285 00ff 0000 andil #16711680,%d5 <== NOT EXECUTED if (free_count != fs_info->vol.free_cls_in_fs_info) { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; 5374c: 2541 0042 movel %d1,%a2@(66) <== NOT EXECUTED ret1 = fat_sector_write(fs_info, 53750: 4280 clrl %d0 <== NOT EXECUTED 53752: 8685 orl %d5,%d3 <== NOT EXECUTED 53754: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 53758: 8684 orl %d4,%d3 <== NOT EXECUTED 5375a: 2703 movel %d3,%a3@- <== NOT EXECUTED 5375c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5375e: 4878 0004 pea 4 <== NOT EXECUTED 53762: 4878 01e8 pea 1e8 <== NOT EXECUTED 53766: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53768: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5376a: 4e94 jsr %a4@ <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 5376c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 53770: 2800 movel %d0,%d4 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 53772: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED 53776: 6638 bnes 537b0 <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 53778: 4a80 tstl %d0 <== NOT EXECUTED 5377a: 6c00 ff70 bgew 536ec <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); 5377e: 2f0a movel %a2,%sp@- <== NOT EXECUTED { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; 53780: 74ff moveq #-1,%d2 <== NOT EXECUTED fat_buf_release(fs_info); 53782: 4eb9 0005 2738 jsr 52738 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 53788: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 5378c: 4eb9 0005 0a20 jsr 50a20 <== NOT EXECUTED 53792: 508f addql #8,%sp <== NOT EXECUTED 53794: 4a80 tstl %d0 <== NOT EXECUTED 53796: 6700 ff70 beqw 53708 <== NOT EXECUTED 5379a: 6066 bras 53802 <== NOT EXECUTED FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, sizeof(le_free_count), &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) 5379c: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED 537a0: 6700 ff4a beqw 536ec <== NOT EXECUTED * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 537a4: 4284 clrl %d4 <== NOT EXECUTED 537a6: 47ee fffc lea %fp@(-4),%a3 <== NOT EXECUTED 537aa: 49f9 0005 2a5a lea 52a5a ,%a4 <== NOT EXECUTED { uint32_t le_next_free = CT_LE_L(next_free); fs_info->vol.next_cl_in_fs_info = next_free; ret2 = fat_sector_write(fs_info, 537b0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 537b2: 4878 0004 pea 4 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 537b6: 7018 moveq #24,%d0 <== NOT EXECUTED 537b8: 4878 01ec pea 1ec <== NOT EXECUTED 537bc: 2a02 movel %d2,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 537be: 2602 movel %d2,%d3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 537c0: 2202 movel %d2,%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 537c2: e0ad lsrl %d0,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 537c4: e08b lsrl #8,%d3 <== NOT EXECUTED if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); fs_info->vol.next_cl_in_fs_info = next_free; 537c6: 2542 004a movel %d2,%a2@(74) <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 537ca: e1a9 lsll %d0,%d1 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 537cc: e18a lsll #8,%d2 <== NOT EXECUTED ret2 = fat_sector_write(fs_info, 537ce: 4280 clrl %d0 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 537d0: 8285 orl %d5,%d1 <== NOT EXECUTED 537d2: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 537d8: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 537dc: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 537e2: 8282 orl %d2,%d1 <== NOT EXECUTED 537e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 537e6: 8283 orl %d3,%d1 <== NOT EXECUTED 537e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 537ea: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED 537ee: 4e94 jsr %a4@ <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 537f0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 537f4: 4a84 tstl %d4 <== NOT EXECUTED 537f6: 6d86 blts 5377e <== NOT EXECUTED 537f8: 4a80 tstl %d0 <== NOT EXECUTED 537fa: 6d82 blts 5377e <== NOT EXECUTED * RC_OK on success, or -1 if error occured (errno set appropriately) */ static int fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info) { ssize_t ret1 = 0, ret2 = 0; 537fc: 4282 clrl %d2 <== NOT EXECUTED 537fe: 6000 feee braw 536ee <== NOT EXECUTED rc = -1; fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; 53802: 74ff moveq #-1,%d2 <== NOT EXECUTED return rc; } 53804: 2002 movel %d2,%d0 <== NOT EXECUTED 53806: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 <== NOT EXECUTED 5380c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00073120 : /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73120: 4e56 ff9c linkw %fp,#-100 rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; 73124: 4241 clrw %d1 /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73126: 202e 0008 movel %fp@(8),%d0 7312a: 2f0a movel %a2,%sp@- rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; 7312c: 3d41 ffcc movew %d1,%fp@(-52) /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 73130: 2f02 movel %d2,%sp@- struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; st.st_gid = 0; 73132: 3d41 ffce movew %d1,%fp@(-50) int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 73136: 42ae ffc6 clrl %fp@(-58) st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); 7313a: b0b9 0009 b1bc cmpl 9b1bc ,%d0 73140: 6400 0100 bccw 73242 iop = rtems_libio_iop( fd ); 73144: 2200 movel %d0,%d1 73146: ed88 lsll #6,%d0 73148: e989 lsll #4,%d1 7314a: 2479 0009 fd68 moveal 9fd68 ,%a2 73150: 9081 subl %d1,%d0 73152: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 73154: 202a 000c movel %a2@(12),%d0 73158: 0280 0000 0100 andil #256,%d0 7315e: 6700 00e2 beqw 73242 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73162: 206a 0024 moveal %a2@(36),%a0 rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st ); 73166: 240a movel %a2,%d2 73168: 0682 0000 0010 addil #16,%d2 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 7316e: 2268 000c moveal %a0@(12),%a1 73172: 2f08 movel %a0,%sp@- 73174: 2051 moveal %a1@,%a0 73176: 4e90 jsr %a0@ 73178: 206a 0020 moveal %a2@(32),%a0 7317c: 486e ffba pea %fp@(-70) 73180: 2f02 movel %d2,%sp@- 73182: 2068 0018 moveal %a0@(24),%a0 73186: 4e90 jsr %a0@ if ( rv == 0 ) { 73188: 4fef 000c lea %sp@(12),%sp 7318c: 4a80 tstl %d0 7318e: 6726 beqs 731b6 <== ALWAYS TAKEN if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73190: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 73194: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED 73198: 2f08 movel %a0,%sp@- <== NOT EXECUTED 7319a: 2069 0004 moveal %a1@(4),%a0 <== NOT EXECUTED 7319e: 2d40 ff9c movel %d0,%fp@(-100) <== NOT EXECUTED 731a2: 4e90 jsr %a0@ <== NOT EXECUTED 731a4: 202e ff9c movel %fp@(-100),%d0 <== NOT EXECUTED 731a8: 588f addql #4,%sp <== NOT EXECUTED 731aa: 242e ff94 movel %fp@(-108),%d2 731ae: 246e ff98 moveal %fp@(-104),%a2 731b2: 4e5e unlk %fp 731b4: 4e75 rts 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( 731b6: 4281 clrl %d1 731b8: 4280 clrl %d0 731ba: 322e ffce movew %fp@(-50),%d1 731be: 302e ffcc movew %fp@(-52),%d0 731c2: 2f01 movel %d1,%sp@- 731c4: 2f00 movel %d0,%sp@- 731c6: 2f2e ffc6 movel %fp@(-58),%sp@- 731ca: 4878 0001 pea 1 731ce: 4eb9 0004 e0f4 jsr 4e0f4 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 731d4: 4fef 0010 lea %sp@(16),%sp 731d8: 4a00 tstb %d0 731da: 673a beqs 73216 rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 731dc: 2f02 movel %d2,%sp@- 731de: 240e movel %fp,%d2 731e0: 0682 ffff ffa2 addil #-94,%d2 731e6: 2f02 movel %d2,%sp@- 731e8: 4eb9 0004 da78 jsr 4da78 if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 731ee: 206a 0024 moveal %a2@(36),%a0 731f2: 2268 000c moveal %a0@(12),%a1 731f6: 2f08 movel %a0,%sp@- 731f8: 2069 0004 moveal %a1@(4),%a0 731fc: 4e90 jsr %a0@ } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 731fe: 2f02 movel %d2,%sp@- 73200: 4eb9 0006 3ff0 jsr 63ff0 } return rv; } 73206: 242e ff94 movel %fp@(-108),%d2 } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); 7320a: 4fef 0010 lea %sp@(16),%sp } return rv; } 7320e: 246e ff98 moveal %fp@(-104),%a2 73212: 4e5e unlk %fp 73214: 4e75 rts ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 73216: 4eb9 0007 7798 jsr 77798 <__errno> 7321c: 720d moveq #13,%d1 7321e: 2040 moveal %d0,%a0 rv = -1; 73220: 70ff moveq #-1,%d0 ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 73222: 2081 movel %d1,%a0@ if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73224: 206a 0024 moveal %a2@(36),%a0 73228: 2268 000c moveal %a0@(12),%a1 7322c: 2f08 movel %a0,%sp@- 7322e: 2069 0004 moveal %a1@(4),%a0 73232: 2d40 ff9c movel %d0,%fp@(-100) 73236: 4e90 jsr %a0@ 73238: 202e ff9c movel %fp@(-100),%d0 7323c: 588f addql #4,%sp 7323e: 6000 ff6a braw 731aa st.st_uid = 0; st.st_gid = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 73242: 4eb9 0007 7798 jsr 77798 <__errno> 73248: 7409 moveq #9,%d2 7324a: 2040 moveal %d0,%a0 7324c: 70ff moveq #-1,%d0 7324e: 2082 movel %d2,%a0@ if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 73250: 242e ff94 movel %fp@(-108),%d2 73254: 246e ff98 moveal %fp@(-104),%a2 73258: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00064318 : /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { 64318: 4e56 fffc linkw %fp,#-4 6431c: 202e 0008 movel %fp@(8),%d0 64320: 2f0a movel %a2,%sp@- int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 64322: b0b9 0009 b1bc cmpl 9b1bc ,%d0 64328: 6400 0082 bccw 643ac iop = rtems_libio_iop( fd ); 6432c: 2200 movel %d0,%d1 6432e: ed88 lsll #6,%d0 64330: e989 lsll #4,%d1 64332: 2479 0009 fd68 moveal 9fd68 ,%a2 64338: 9081 subl %d1,%d0 6433a: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 6433c: 202a 000c movel %a2@(12),%d0 64340: 0280 0000 0100 andil #256,%d0 64346: 6764 beqs 643ac if (iop->pathinfo.mt_entry->writeable) { 64348: 206a 0024 moveal %a2@(36),%a0 6434c: 4a28 0029 tstb %a0@(41) 64350: 6744 beqs 64396 <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 64352: 2268 000c moveal %a0@(12),%a1 64356: 2f08 movel %a0,%sp@- 64358: 2051 moveal %a1@,%a0 6435a: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 6435c: 206a 0024 moveal %a2@(36),%a0 64360: 2068 000c moveal %a0@(12),%a0 64364: 2f2e 000c movel %fp@(12),%sp@- 64368: 486a 0010 pea %a2@(16) 6436c: 2068 0020 moveal %a0@(32),%a0 64370: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 64372: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 64376: 2268 000c moveal %a0@(12),%a1 6437a: 2f08 movel %a0,%sp@- 6437c: 2069 0004 moveal %a1@(4),%a0 64380: 2d40 fffc movel %d0,%fp@(-4) 64384: 4e90 jsr %a0@ 64386: 202e fffc movel %fp@(-4),%d0 6438a: 4fef 0010 lea %sp@(16),%sp 6438e: 246e fff8 moveal %fp@(-8),%a2 64392: 4e5e unlk %fp 64394: 4e75 rts if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64396: 4eb9 0007 7798 jsr 77798 <__errno> <== NOT EXECUTED rv = -1; } return rv; } 6439c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 643a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 643a2: 721e moveq #30,%d1 <== NOT EXECUTED rv = -1; 643a4: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 643a6: 4e5e unlk %fp <== NOT EXECUTED if (iop->pathinfo.mt_entry->writeable) { rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 643a8: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 643aa: 4e75 rts <== NOT EXECUTED int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 643ac: 4eb9 0007 7798 jsr 77798 <__errno> errno = EROFS; rv = -1; } return rv; } 643b2: 246e fff8 moveal %fp@(-8),%a2 int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 643b6: 2040 moveal %d0,%a0 643b8: 7209 moveq #9,%d1 643ba: 70ff moveq #-1,%d0 errno = EROFS; rv = -1; } return rv; } 643bc: 4e5e unlk %fp int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 643be: 2081 movel %d1,%a0@ errno = EROFS; rv = -1; } return rv; } ... =============================================================================== 000643c4 : /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { 643c4: 4e56 fff0 linkw %fp,#-16 643c8: 202e 0008 movel %fp@(8),%d0 643cc: 48d7 040c moveml %d2-%d3/%a2,%sp@ 643d0: 342e 000e movew %fp@(14),%d2 643d4: 362e 0012 movew %fp@(18),%d3 int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 643d8: b0b9 0009 b1bc cmpl 9b1bc ,%d0 643de: 6400 008a bccw 6446a iop = rtems_libio_iop( fd ); 643e2: 2200 movel %d0,%d1 643e4: ed88 lsll #6,%d0 643e6: e989 lsll #4,%d1 643e8: 2479 0009 fd68 moveal 9fd68 ,%a2 643ee: 9081 subl %d1,%d0 643f0: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 643f2: 202a 000c movel %a2@(12),%d0 643f6: 0280 0000 0100 andil #256,%d0 643fc: 676c beqs 6446a <== NEVER TAKEN if (iop->pathinfo.mt_entry->writeable) { 643fe: 206a 0024 moveal %a2@(36),%a0 64402: 4a28 0029 tstb %a0@(41) 64406: 674a beqs 64452 <== NEVER TAKEN const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 64408: 2268 000c moveal %a0@(12),%a1 6440c: 2f08 movel %a0,%sp@- 6440e: 2051 moveal %a1@,%a0 64410: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 64412: 206a 0024 moveal %a2@(36),%a0 64416: 2068 000c moveal %a0@(12),%a0 6441a: 3f03 movew %d3,%sp@- 6441c: 4267 clrw %sp@- 6441e: 3f02 movew %d2,%sp@- 64420: 4267 clrw %sp@- 64422: 486a 0010 pea %a2@(16) 64426: 2068 0024 moveal %a0@(36),%a0 6442a: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 6442c: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 64430: 2268 000c moveal %a0@(12),%a1 64434: 2f08 movel %a0,%sp@- 64436: 2069 0004 moveal %a1@(4),%a0 6443a: 2d40 fffc movel %d0,%fp@(-4) 6443e: 4e90 jsr %a0@ 64440: 202e fffc movel %fp@(-4),%d0 64444: 4fef 0014 lea %sp@(20),%sp 64448: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 6444e: 4e5e unlk %fp 64450: 4e75 rts owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64452: 4eb9 0007 7798 jsr 77798 <__errno> <== NOT EXECUTED 64458: 721e moveq #30,%d1 <== NOT EXECUTED 6445a: 2040 moveal %d0,%a0 <== NOT EXECUTED rv = -1; 6445c: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 6445e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 64464: 2081 movel %d1,%a0@ <== NOT EXECUTED rv = -1; } return rv; } 64466: 4e5e unlk %fp <== NOT EXECUTED 64468: 4e75 rts <== 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); 6446a: 4eb9 0007 7798 jsr 77798 <__errno> 64470: 7409 moveq #9,%d2 64472: 2040 moveal %d0,%a0 64474: 70ff moveq #-1,%d0 64476: 2082 movel %d2,%a0@ errno = EROFS; rv = -1; } return rv; } 64478: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 6447e: 4e5e unlk %fp ... =============================================================================== 0006ebf8 : int fcntl( int fd, int cmd, ... ) { 6ebf8: 4e56 ffec linkw %fp,#-20 6ebfc: 202e 0008 movel %fp@(8),%d0 6ec00: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 6ec04: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 6ec08: b0b9 0007 40d8 cmpl 740d8 ,%d0 6ec0e: 6400 0194 bccw 6eda4 iop = rtems_libio_iop( fd ); 6ec12: 2200 movel %d0,%d1 6ec14: ed88 lsll #6,%d0 6ec16: e989 lsll #4,%d1 6ec18: 2479 0008 58c4 moveal 858c4 ,%a2 6ec1e: 9081 subl %d1,%d0 6ec20: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 6ec22: 202a 000c movel %a2@(12),%d0 6ec26: 0800 0008 btst #8,%d0 6ec2a: 6700 0178 beqw 6eda4 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 6ec2e: 7209 moveq #9,%d1 6ec30: b283 cmpl %d3,%d1 6ec32: 641a bccs 6ec4e errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 6ec34: 4eb9 0006 0414 jsr 60414 <__errno> 6ec3a: 2040 moveal %d0,%a0 6ec3c: 7016 moveq #22,%d0 6ec3e: 2080 movel %d0,%a0@ int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6ec40: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6ec42: 2002 movel %d2,%d0 6ec44: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 6ec4a: 4e5e unlk %fp 6ec4c: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 6ec4e: 323b 3a08 movew %pc@(6ec58 ,%d3:l:2),%d1 6ec52: 48c1 extl %d1 6ec54: 4efb 1802 jmp %pc@(6ec58 ,%d1:l) 6ec58: 00b0 00a4 0090 oril #10748048,%d0 <== NOT EXECUTED 6ec5e: 0076 .short 0x0076 <== NOT EXECUTED 6ec60: 0026 .short 0x0026 <== NOT EXECUTED 6ec62: 0014 .short 0x0014 <== NOT EXECUTED 6ec64: 0014 .short 0x0014 <== NOT EXECUTED 6ec66: 0014 .short 0x0014 <== NOT EXECUTED 6ec68: 0014 .short 0x0014 <== NOT EXECUTED 6ec6a: 0014 .short 0x0014 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 6ec6c: 4eb9 0006 0414 jsr 60414 <__errno> int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6ec72: 74ff moveq #-1,%d2 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 6ec74: 2040 moveal %d0,%a0 6ec76: 20bc 0000 0086 movel #134,%a0@ 6ec7c: 60c4 bras 6ec42 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 ) ); 6ec7e: 2f2e 0010 movel %fp@(16),%sp@- { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 6ec82: 4282 clrl %d2 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 ) ); 6ec84: 4eb9 0004 7644 jsr 47644 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 6ec8a: 222a 000c movel %a2@(12),%d1 6ec8e: 588f addql #4,%sp 6ec90: 0280 0000 0201 andil #513,%d0 6ec96: 0281 ffff fdfe andil #-514,%d1 6ec9c: 8081 orl %d1,%d0 6ec9e: 2540 000c movel %d0,%a2@(12) * 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 ); 6eca2: 206a 0020 moveal %a2@(32),%a0 6eca6: 2f03 movel %d3,%sp@- 6eca8: 2f0a movel %a2,%sp@- 6ecaa: 2068 0028 moveal %a0@(40),%a0 6ecae: 4e90 jsr %a0@ if (err) { 6ecb0: 508f addql #8,%sp * 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 ); 6ecb2: 2600 movel %d0,%d3 if (err) { 6ecb4: 678c beqs 6ec42 <== ALWAYS TAKEN errno = err; 6ecb6: 4eb9 0006 0414 jsr 60414 <__errno> <== NOT EXECUTED ret = -1; 6ecbc: 74ff moveq #-1,%d2 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 6ecbe: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6ecc0: 2002 movel %d2,%d0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); if (err) { errno = err; 6ecc2: 2083 movel %d3,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6ecc4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 6ecca: 4e5e unlk %fp <== NOT EXECUTED 6eccc: 4e75 rts <== 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 ); 6ecce: 2f00 movel %d0,%sp@- 6ecd0: 4eb9 0004 7684 jsr 47684 6ecd6: 588f addql #4,%sp 6ecd8: 2400 movel %d0,%d2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6ecda: 6cc6 bges 6eca2 <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6ecdc: 2002 movel %d2,%d0 <== NOT EXECUTED 6ecde: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 6ece4: 4e5e unlk %fp <== NOT EXECUTED 6ece6: 4e75 rts <== NOT EXECUTED { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 6ece8: 4282 clrl %d2 * 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 ) ) 6ecea: 4aae 0010 tstl %fp@(16) 6ecee: 6700 00a8 beqw 6ed98 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 6ecf2: 08c0 000b bset #11,%d0 6ecf6: 2540 000c movel %d0,%a2@(12) 6ecfa: 60a6 bras 6eca2 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); 6ecfc: 2400 movel %d0,%d2 6ecfe: 720b moveq #11,%d1 6ed00: e2aa lsrl %d1,%d2 6ed02: 7001 moveq #1,%d0 6ed04: c480 andl %d0,%d2 6ed06: 609a bras 6eca2 /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 6ed08: 4eb9 0004 76d4 jsr 476d4 6ed0e: 2640 moveal %d0,%a3 if (diop != NULL) { 6ed10: 4a80 tstl %d0 6ed12: 6700 ff2c beqw 6ec40 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 6ed16: 2f2a 000c movel %a2@(12),%sp@- 6ed1a: 4eb9 0004 7684 jsr 47684 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 6ed20: 282b 000c movel %a3@(12),%d4 rtems_libio_t *diop = rtems_libio_allocate(); if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; 6ed24: 2400 movel %d0,%d2 6ed26: 0882 0009 bclr #9,%d2 diop->flags |= rtems_libio_fcntl_flags( oflag ); 6ed2a: 2f02 movel %d2,%sp@- 6ed2c: 4eb9 0004 7644 jsr 47644 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 6ed32: 206a 0024 moveal %a2@(36),%a0 if (diop != NULL) { int oflag = rtems_libio_to_fcntl_flags( iop->flags ); oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 6ed36: 8084 orl %d4,%d0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->lock_h)( mt_entry ); 6ed38: 2268 000c moveal %a0@(12),%a1 6ed3c: 2740 000c movel %d0,%a3@(12) 6ed40: 2f08 movel %a0,%sp@- 6ed42: 2051 moveal %a1@,%a0 6ed44: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 6ed46: 486a 0010 pea %a2@(16) 6ed4a: 486b 0010 pea %a3@(16) 6ed4e: 4eb9 0005 63d4 jsr 563d4 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 6ed54: 206a 0024 moveal %a2@(36),%a0 const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; (*mt_entry->ops->unlock_h)( mt_entry ); 6ed58: 2268 000c moveal %a0@(12),%a1 6ed5c: 2f08 movel %a0,%sp@- 6ed5e: 2069 0004 moveal %a1@(4),%a0 6ed62: 4e90 jsr %a0@ /* * 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 ); 6ed64: 206b 0020 moveal %a3@(32),%a0 6ed68: 42a7 clrl %sp@- 6ed6a: 2f02 movel %d2,%sp@- 6ed6c: 42a7 clrl %sp@- 6ed6e: 2f0b movel %a3,%sp@- 6ed70: 2050 moveal %a0@,%a0 6ed72: 4e90 jsr %a0@ if ( rv == 0 ) { 6ed74: 4fef 0028 lea %sp@(40),%sp /* * 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 ); 6ed78: 2400 movel %d0,%d2 if ( rv == 0 ) { 6ed7a: 6642 bnes 6edbe <== NEVER TAKEN rv = diop - rtems_libio_iops; 6ed7c: 240b movel %a3,%d2 6ed7e: 94b9 0008 58c4 subl 858c4 ,%d2 6ed84: 203c aaaa aaab movel #-1431655765,%d0 6ed8a: e882 asrl #4,%d2 6ed8c: 4c00 2800 mulsl %d0,%d2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6ed90: 6a00 ff10 bplw 6eca2 6ed94: 6000 ff46 braw 6ecdc <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 6ed98: 0880 000b bclr #11,%d0 6ed9c: 2540 000c movel %d0,%a2@(12) 6eda0: 6000 ff00 braw 6eca2 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6eda4: 4eb9 0006 0414 jsr 60414 <__errno> 6edaa: 74ff moveq #-1,%d2 6edac: 7209 moveq #9,%d1 6edae: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6edb0: 2002 movel %d2,%d0 6edb2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 6edb8: 2081 movel %d1,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 6edba: 4e5e unlk %fp 6edbc: 4e75 rts */ rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 ); if ( rv == 0 ) { rv = diop - rtems_libio_iops; } else { rtems_libio_free( diop ); 6edbe: 2f0b movel %a3,%sp@- <== NOT EXECUTED 6edc0: 4eb9 0004 773c jsr 4773c <== NOT EXECUTED 6edc6: 588f addql #4,%sp <== NOT EXECUTED /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 6edc8: 4a82 tstl %d2 <== NOT EXECUTED 6edca: 6c00 fed6 bgew 6eca2 <== NOT EXECUTED 6edce: 6000 ff0c braw 6ecdc <== NOT EXECUTED =============================================================================== 0004d784 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d784: 4e56 ffe8 linkw %fp,#-24 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d788: 2039 0006 1718 movel 61718 ,%d0 int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d78e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d792: 47f9 0004 8df0 lea 48df0 ,%a3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d798: 4a80 tstl %d0 4d79a: 6758 beqs 4d7f4 rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4d79c: 42a7 clrl %sp@- 4d79e: 42a7 clrl %sp@- 4d7a0: 2f00 movel %d0,%sp@- 4d7a2: 4e93 jsr %a3@ } if (sc == RTEMS_SUCCESSFUL) { 4d7a4: 4fef 000c lea %sp@(12),%sp 4d7a8: 4a80 tstl %d0 4d7aa: 6600 0208 bnew 4d9b4 err = pipe_lock(); if (err) return err; pipe = *pipep; 4d7ae: 206e 0008 moveal %fp@(8),%a0 4d7b2: 2850 moveal %a0@,%a4 if (pipe == NULL) { 4d7b4: 4a8c tstl %a4 4d7b6: 676e beqs 4d826 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d7b8: 42a7 clrl %sp@- 4d7ba: 42a7 clrl %sp@- 4d7bc: 2f2c 0028 movel %a4@(40),%sp@- 4d7c0: 4e93 jsr %a3@ 4d7c2: 4fef 000c lea %sp@(12),%sp 4d7c6: 4a80 tstl %d0 4d7c8: 6700 015c beqw 4d926 err = -EINTR; if (*pipep == NULL) { 4d7cc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4d7d0: 4a90 tstl %a0@ <== NOT EXECUTED 4d7d2: 6700 01f0 beqw 4d9c4 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d7d6: 2f39 0006 1718 movel 61718 ,%sp@- <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4d7dc: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d7e0: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 4d7e6: 588f addql #4,%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4d7e8: 200a movel %a2,%d0 4d7ea: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4d7f0: 4e5e unlk %fp 4d7f2: 4e75 rts */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4d7f4: 42a7 clrl %sp@- 4d7f6: 42a7 clrl %sp@- 4d7f8: 2f39 0006 1e10 movel 61e10 ,%sp@- 4d7fe: 4e93 jsr %a3@ rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4d800: 4fef 000c lea %sp@(12),%sp 4d804: 4ab9 0006 1718 tstl 61718 4d80a: 6700 0174 beqw 4d980 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4d80e: 2f39 0006 1e10 movel 61e10 ,%sp@- <== NOT EXECUTED 4d814: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 4d81a: 2039 0006 1718 movel 61718 ,%d0 <== NOT EXECUTED 4d820: 588f addql #4,%sp <== NOT EXECUTED 4d822: 6000 ff78 braw 4d79c <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d826: 4878 0034 pea 34 4d82a: 45f9 0004 47d4 lea 447d4 ,%a2 4d830: 4e92 jsr %a2@ if (pipe == NULL) 4d832: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d834: 2840 moveal %d0,%a4 if (pipe == NULL) 4d836: 4a80 tstl %d0 4d838: 6700 0202 beqw 4da3c return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d83c: 2040 moveal %d0,%a0 pipe->Size = PIPE_BUF; 4d83e: 203c 0000 0200 movel #512,%d0 int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d844: 4298 clrl %a0@+ 4d846: 5888 addql #4,%a0 4d848: 4298 clrl %a0@+ 4d84a: 4298 clrl %a0@+ 4d84c: 4298 clrl %a0@+ 4d84e: 4298 clrl %a0@+ 4d850: 4298 clrl %a0@+ 4d852: 4298 clrl %a0@+ 4d854: 4298 clrl %a0@+ 4d856: 4298 clrl %a0@+ 4d858: 4298 clrl %a0@+ 4d85a: 4298 clrl %a0@+ 4d85c: 4290 clrl %a0@ pipe->Size = PIPE_BUF; 4d85e: 2940 0004 movel %d0,%a4@(4) pipe->Buffer = malloc(pipe->Size); 4d862: 4878 0200 pea 200 4d866: 4e92 jsr %a2@ if (! pipe->Buffer) 4d868: 588f addql #4,%sp 4d86a: 45f9 0004 4394 lea 44394 ,%a2 if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4d870: 2880 movel %d0,%a4@ if (! pipe->Buffer) 4d872: 6700 01c2 beqw 4da36 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d876: 486c 002c pea %a4@(44) 4d87a: 45f9 0004 eaf8 lea 4eaf8 ,%a2 rtems_build_name ('P', 'I', 'r', c), 4d880: 1039 0006 0858 moveb 60858 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d886: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4d888: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d88a: 42a7 clrl %sp@- 4d88c: 0080 5049 7200 oril #1346990592,%d0 4d892: 2f00 movel %d0,%sp@- 4d894: 4e92 jsr %a2@ 4d896: 4fef 0010 lea %sp@(16),%sp 4d89a: 4a80 tstl %d0 4d89c: 6600 018c bnew 4da2a rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d8a0: 486c 0030 pea %a4@(48) rtems_build_name ('P', 'I', 'w', c), 4d8a4: 1039 0006 0858 moveb 60858 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d8aa: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4d8ac: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d8ae: 42a7 clrl %sp@- 4d8b0: 0080 5049 7700 oril #1346991872,%d0 4d8b6: 2f00 movel %d0,%sp@- 4d8b8: 4e92 jsr %a2@ 4d8ba: 4fef 0010 lea %sp@(16),%sp 4d8be: 45f9 0004 ebcc lea 4ebcc ,%a2 4d8c4: 4a80 tstl %d0 4d8c6: 6600 015a bnew 4da22 rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d8ca: 486c 0028 pea %a4@(40) rtems_build_name ('P', 'I', 's', c), 1, 4d8ce: 1039 0006 0858 moveb 60858 ,%d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d8d4: 42a7 clrl %sp@- 4d8d6: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4d8da: 49c0 extbl %d0 if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d8dc: 4878 0001 pea 1 4d8e0: 0080 5049 7300 oril #1346990848,%d0 4d8e6: 2f00 movel %d0,%sp@- 4d8e8: 4eb9 0004 8b2c jsr 48b2c 4d8ee: 4fef 0014 lea %sp@(20),%sp 4d8f2: 4a80 tstl %d0 4d8f4: 6600 011e bnew 4da14 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4d8f8: 747a moveq #122,%d2 4d8fa: 1039 0006 0858 moveb 60858 ,%d0 4d900: 1200 moveb %d0,%d1 4d902: 49c1 extbl %d1 4d904: b481 cmpl %d1,%d2 4d906: 6700 0100 beqw 4da08 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d90a: 42a7 clrl %sp@- #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4d90c: 5280 addql #1,%d0 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d90e: 42a7 clrl %sp@- 4d910: 2f2c 0028 movel %a4@(40),%sp@- #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4d914: 13c0 0006 0858 moveb %d0,60858 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d91a: 4e93 jsr %a3@ 4d91c: 4fef 000c lea %sp@(12),%sp 4d920: 4a80 tstl %d0 4d922: 6600 fea8 bnew 4d7cc err = -EINTR; if (*pipep == NULL) { 4d926: 206e 0008 moveal %fp@(8),%a0 4d92a: 4a90 tstl %a0@ 4d92c: 6700 012e beqw 4da5c #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d930: 2f39 0006 1718 movel 61718 ,%sp@- 4d936: 49f9 0004 8f48 lea 48f48 ,%a4 4d93c: 4e94 jsr %a4@ int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4d93e: 206e 0008 moveal %fp@(8),%a0 switch (LIBIO_ACCMODE(iop)) { 4d942: 7006 moveq #6,%d0 4d944: 588f addql #4,%sp 4d946: 7204 moveq #4,%d1 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4d948: 2450 moveal %a0@,%a2 switch (LIBIO_ACCMODE(iop)) { 4d94a: 206e 000c moveal %fp@(12),%a0 4d94e: c0a8 000c andl %a0@(12),%d0 4d952: b280 cmpl %d0,%d1 4d954: 6700 01f0 beqw 4db46 4d958: 7406 moveq #6,%d2 4d95a: b480 cmpl %d0,%d2 4d95c: 6700 018e beqw 4daec 4d960: 123c 0002 moveb #2,%d1 4d964: b280 cmpl %d0,%d1 4d966: 6700 00fe beqw 4da66 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d96a: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d96e: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d970: 4e94 jsr %a4@ return 0; 4d972: 588f addql #4,%sp out_error: pipe_release(pipep, iop); return err; } 4d974: 200a movel %a2,%d0 4d976: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4d97c: 4e5e unlk %fp 4d97e: 4e75 rts if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 4d980: 4879 0006 1718 pea 61718 4d986: 42a7 clrl %sp@- 4d988: 4878 0054 pea 54 4d98c: 4878 0001 pea 1 4d990: 2f3c 5049 5045 movel #1346981957,%sp@- 4d996: 4eb9 0004 8b2c jsr 48b2c 4d99c: 2f39 0006 1e10 movel 61e10 ,%sp@- 4d9a2: 2400 movel %d0,%d2 4d9a4: 4eb9 0004 8f48 jsr 48f48 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4d9aa: 4fef 0018 lea %sp@(24),%sp 4d9ae: 4a82 tstl %d2 4d9b0: 6700 00a0 beqw 4da52 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); err = -ENXIO; 4d9b4: 347c fff4 moveaw #-12,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4d9b8: 200a movel %a2,%d0 4d9ba: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4d9c0: 4e5e unlk %fp 4d9c2: 4e75 rts /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d9c4: 2f2c 002c movel %a4@(44),%sp@- <== NOT EXECUTED 4d9c8: 4bf9 0004 ebcc lea 4ebcc ,%a5 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4d9ce: 47f9 0004 4394 lea 44394 ,%a3 <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d9d4: 4e95 jsr %a5@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4d9d6: 2f2c 0030 movel %a4@(48),%sp@- <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4d9da: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); 4d9de: 4e95 jsr %a5@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4d9e0: 2f2c 0028 movel %a4@(40),%sp@- <== NOT EXECUTED 4d9e4: 4eb9 0004 8d18 jsr 48d18 <== NOT EXECUTED free(pipe->Buffer); 4d9ea: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4d9ec: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4d9ee: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d9f0: 4e93 jsr %a3@ <== NOT EXECUTED 4d9f2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4d9f6: 2f39 0006 1718 movel 61718 ,%sp@- <== NOT EXECUTED 4d9fc: 4eb9 0004 8f48 jsr 48f48 <== NOT EXECUTED 4da02: 588f addql #4,%sp <== NOT EXECUTED 4da04: 6000 fde2 braw 4d7e8 <== NOT EXECUTED pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') c = 'a'; 4da08: 7061 moveq #97,%d0 4da0a: 13c0 0006 0858 moveb %d0,60858 4da10: 6000 fda6 braw 4d7b8 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4da14: 2f2c 0030 movel %a4@(48),%sp@- 4da18: 45f9 0004 ebcc lea 4ebcc ,%a2 4da1e: 4e92 jsr %a2@ 4da20: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4da22: 2f2c 002c movel %a4@(44),%sp@- 4da26: 4e92 jsr %a2@ 4da28: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4da2a: 2f14 movel %a4@,%sp@- 4da2c: 45f9 0004 4394 lea 44394 ,%a2 4da32: 4e92 jsr %a2@ 4da34: 588f addql #4,%sp err_buf: free(pipe); 4da36: 2f0c movel %a4,%sp@- 4da38: 4e92 jsr %a2@ 4da3a: 588f addql #4,%sp #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4da3c: 2f39 0006 1718 movel 61718 ,%sp@- if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4da42: 347c fff4 moveaw #-12,%a2 #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4da46: 4eb9 0004 8f48 jsr 48f48 4da4c: 588f addql #4,%sp 4da4e: 6000 fd98 braw 4d7e8 4da52: 2039 0006 1718 movel 61718 ,%d0 4da58: 6000 fd42 braw 4d79c if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4da5c: 206e 0008 moveal %fp@(8),%a0 4da60: 208c movel %a4,%a0@ 4da62: 6000 fecc braw 4d930 pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4da66: 202a 0010 movel %a2@(16),%d0 4da6a: 2200 movel %d0,%d1 4da6c: 5281 addql #1,%d1 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4da6e: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4da72: 2541 0010 movel %d1,%a2@(16) 4da76: 4a80 tstl %d0 4da78: 6760 beqs 4dada <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4da7a: 4aaa 0014 tstl %a2@(20) 4da7e: 6600 feea bnew 4d96a /* Not an error */ if (LIBIO_NODELAY(iop)) 4da82: 206e 000c moveal %fp@(12),%a0 4da86: 7001 moveq #1,%d0 4da88: c0a8 000c andl %a0@(12),%d0 4da8c: 6600 fedc bnew 4d96a break; prevCounter = pipe->writerCounter; 4da90: 242a 0024 movel %a2@(36),%d2 4da94: 4bf9 0004 eccc lea 4eccc ,%a5 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4da9a: 2f2a 0028 movel %a2@(40),%sp@- 4da9e: 4e94 jsr %a4@ if (! PIPE_READWAIT(pipe)) 4daa0: 42a7 clrl %sp@- 4daa2: 2f2a 002c movel %a2@(44),%sp@- 4daa6: 4e95 jsr %a5@ 4daa8: 4fef 000c lea %sp@(12),%sp 4daac: 4a80 tstl %d0 4daae: 6600 0116 bnew 4dbc6 goto out_error; if (! PIPE_LOCK(pipe)) 4dab2: 42a7 clrl %sp@- 4dab4: 42a7 clrl %sp@- 4dab6: 2f2a 0028 movel %a2@(40),%sp@- 4daba: 4e93 jsr %a3@ 4dabc: 4fef 000c lea %sp@(12),%sp 4dac0: 4a80 tstl %d0 4dac2: 6600 0102 bnew 4dbc6 goto out_error; } while (prevCounter == pipe->writerCounter); 4dac6: b4aa 0024 cmpl %a2@(36),%d2 4daca: 67ce beqs 4da9a <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dacc: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4dad0: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dad2: 4e94 jsr %a4@ return 0; 4dad4: 588f addql #4,%sp 4dad6: 6000 fe9c braw 4d974 switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4dada: 486e fffc pea %fp@(-4) 4dade: 2f2a 0030 movel %a2@(48),%sp@- 4dae2: 4eb9 0004 ec70 jsr 4ec70 4dae8: 508f addql #8,%sp 4daea: 608e bras 4da7a } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4daec: 202a 0010 movel %a2@(16),%d0 4daf0: 2200 movel %d0,%d1 4daf2: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4daf4: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4daf8: 2541 0010 movel %d1,%a2@(16) 4dafc: 4a80 tstl %d0 4dafe: 6734 beqs 4db34 <== ALWAYS TAKEN PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4db00: 202a 0014 movel %a2@(20),%d0 4db04: 2400 movel %d0,%d2 4db06: 5282 addql #1,%d2 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4db08: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4db0c: 2542 0014 movel %d2,%a2@(20) 4db10: 4a80 tstl %d0 4db12: 6600 fe56 bnew 4d96a PIPE_WAKEUPREADERS(pipe); 4db16: 486e fffc pea %fp@(-4) 4db1a: 2f2a 002c movel %a2@(44),%sp@- 4db1e: 4eb9 0004 ec70 jsr 4ec70 4db24: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4db26: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4db2a: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4db2c: 4e94 jsr %a4@ return 0; 4db2e: 588f addql #4,%sp 4db30: 6000 fe42 braw 4d974 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4db34: 486e fffc pea %fp@(-4) 4db38: 2f2a 0030 movel %a2@(48),%sp@- 4db3c: 4eb9 0004 ec70 jsr 4ec70 4db42: 508f addql #8,%sp 4db44: 60ba bras 4db00 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4db46: 202a 0014 movel %a2@(20),%d0 4db4a: 2200 movel %d0,%d1 4db4c: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4db4e: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4db52: 2541 0014 movel %d1,%a2@(20) 4db56: 4a80 tstl %d0 4db58: 675a beqs 4dbb4 <== ALWAYS TAKEN PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4db5a: 4aaa 0010 tstl %a2@(16) 4db5e: 6600 fe0a bnew 4d96a 4db62: 206e 000c moveal %fp@(12),%a0 4db66: 7001 moveq #1,%d0 4db68: c0a8 000c andl %a0@(12),%d0 4db6c: 6678 bnes 4dbe6 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4db6e: 242a 0020 movel %a2@(32),%d2 4db72: 4bf9 0004 eccc lea 4eccc ,%a5 err = -EINTR; do { PIPE_UNLOCK(pipe); 4db78: 2f2a 0028 movel %a2@(40),%sp@- 4db7c: 4e94 jsr %a4@ if (! PIPE_WRITEWAIT(pipe)) 4db7e: 42a7 clrl %sp@- 4db80: 2f2a 0030 movel %a2@(48),%sp@- 4db84: 4e95 jsr %a5@ 4db86: 4fef 000c lea %sp@(12),%sp 4db8a: 4a80 tstl %d0 4db8c: 6638 bnes 4dbc6 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4db8e: 42a7 clrl %sp@- 4db90: 42a7 clrl %sp@- 4db92: 2f2a 0028 movel %a2@(40),%sp@- 4db96: 4e93 jsr %a3@ 4db98: 4fef 000c lea %sp@(12),%sp 4db9c: 4a80 tstl %d0 4db9e: 6626 bnes 4dbc6 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4dba0: b4aa 0020 cmpl %a2@(32),%d2 4dba4: 67d2 beqs 4db78 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dba6: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4dbaa: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4dbac: 4e94 jsr %a4@ return 0; 4dbae: 588f addql #4,%sp 4dbb0: 6000 fdc2 braw 4d974 case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4dbb4: 486e fffc pea %fp@(-4) 4dbb8: 2f2a 002c movel %a2@(44),%sp@- 4dbbc: 4eb9 0004 ec70 jsr 4ec70 4dbc2: 508f addql #8,%sp 4dbc4: 6094 bras 4db5a PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4dbc6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 4dbca: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4dbce: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4dbd2: 4eb9 0004 d69c jsr 4d69c <== NOT EXECUTED return err; 4dbd8: 508f addql #8,%sp <== NOT EXECUTED } 4dbda: 200a movel %a2,%d0 4dbdc: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4dbe2: 4e5e unlk %fp 4dbe4: 4e75 rts if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4dbe6: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4dbea: 347c fffa moveaw #-6,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4dbee: 4e94 jsr %a4@ err = -ENXIO; goto out_error; 4dbf0: 588f addql #4,%sp PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4dbf2: 2f2e 000c movel %fp@(12),%sp@- 4dbf6: 2f2e 0008 movel %fp@(8),%sp@- 4dbfa: 4eb9 0004 d69c jsr 4d69c return err; 4dc00: 508f addql #8,%sp 4dc02: 60d6 bras 4dbda =============================================================================== 000486f0 : */ long fpathconf( int fd, int name ) { 486f0: 4e56 0000 linkw %fp,#0 486f4: 202e 0008 movel %fp@(8),%d0 486f8: 222e 000c movel %fp@(12),%d1 486fc: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 486fe: b0b9 0005 cf94 cmpl 5cf94 ,%d0 48704: 6400 00f4 bccw 487fa iop = rtems_libio_iop(fd); 48708: 2400 movel %d0,%d2 <== NOT EXECUTED 4870a: ed88 lsll #6,%d0 <== NOT EXECUTED 4870c: e98a lsll #4,%d2 <== NOT EXECUTED 4870e: 2079 0005 df8c moveal 5df8c ,%a0 <== NOT EXECUTED 48714: 9082 subl %d2,%d0 <== NOT EXECUTED 48716: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 48718: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4871c: 0280 0000 0100 andil #256,%d0 <== NOT EXECUTED 48722: 6700 00d6 beqw 487fa <== NOT EXECUTED /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 48726: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED switch ( name ) { 4872a: 700b moveq #11,%d0 <== NOT EXECUTED /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 4872c: 2068 002a moveal %a0@(42),%a0 <== NOT EXECUTED switch ( name ) { 48730: b081 cmpl %d1,%d0 <== NOT EXECUTED 48732: 6416 bccs 4874a <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 48734: 4eb9 0004 a04c jsr 4a04c <__errno> <== NOT EXECUTED break; } return return_value; } 4873a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4873e: 2040 moveal %d0,%a0 <== NOT EXECUTED 48740: 7216 moveq #22,%d1 <== NOT EXECUTED 48742: 70ff moveq #-1,%d0 <== NOT EXECUTED break; } return return_value; } 48744: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 48746: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return return_value; } 48748: 4e75 rts <== NOT EXECUTED * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4874a: 303b 1a08 movew %pc@(48754 ,%d1:l:2),%d0<== NOT EXECUTED 4874e: 48c0 extl %d0 <== NOT EXECUTED 48750: 4efb 0802 jmp %pc@(48754 ,%d0:l) <== NOT EXECUTED 48754: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 4875a: 006c .short 0x006c <== NOT EXECUTED 4875c: 0060 .short 0x0060 <== NOT EXECUTED 4875e: 0054 .short 0x0054 <== NOT EXECUTED 48760: 0048 .short 0x0048 <== NOT EXECUTED 48762: 003c .short 0x003c <== NOT EXECUTED 48764: 0030 .short 0x0030 <== NOT EXECUTED 48766: 0024 .short 0x0024 <== NOT EXECUTED 48768: 0018 .short 0x0018 <== NOT EXECUTED 4876a: 009a 242e fffc oril #607059964,%d2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48770: 4e5e unlk %fp <== 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; 48772: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48776: 4e75 rts <== NOT EXECUTED 48778: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4877c: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4877e: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48782: 4e75 rts <== NOT EXECUTED 48784: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48788: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 4878a: 2028 002c movel %a0@(44),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4878e: 4e75 rts <== NOT EXECUTED 48790: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 48794: 4e5e unlk %fp <== 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; 48796: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 4879a: 4e75 rts <== NOT EXECUTED 4879c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487a0: 4e5e unlk %fp <== 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; 487a2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487a6: 4e75 rts <== NOT EXECUTED 487a8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487ac: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 487ae: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487b2: 4e75 rts <== NOT EXECUTED 487b4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487b8: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 487ba: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487be: 4e75 rts <== NOT EXECUTED 487c0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487c4: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 487c6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487ca: 4e75 rts <== NOT EXECUTED 487cc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487d0: 4e5e unlk %fp <== NOT EXECUTED break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 487d2: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487d6: 4e75 rts <== NOT EXECUTED 487d8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487dc: 4e5e unlk %fp <== 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; 487de: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487e2: 4e75 rts <== NOT EXECUTED 487e4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487e8: 4e5e unlk %fp <== NOT EXECUTED the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 487ea: 2010 movel %a0@,%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487ec: 4e75 rts <== NOT EXECUTED 487ee: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 487f2: 4e5e unlk %fp <== 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; 487f4: 2028 0028 movel %a0@(40),%d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 487f8: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; const rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 487fa: 4eb9 0004 a04c jsr 4a04c <__errno> 48800: 7409 moveq #9,%d2 48802: 2040 moveal %d0,%a0 48804: 70ff moveq #-1,%d0 48806: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 48808: 242e fffc movel %fp@(-4),%d2 4880c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430cc : #include void free( void *ptr ) { 430cc: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 430d0: 52b9 0005 f90c addql #1,5f90c #include void free( void *ptr ) { 430d6: 2f02 movel %d2,%sp@- 430d8: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 430dc: 6732 beqs 43110 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 430de: 7003 moveq #3,%d0 430e0: b0b9 0005 fb6c cmpl 5fb6c <_System_state_Current>,%d0 430e6: 6758 beqs 43140 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 430e8: 2079 0005 e8c4 moveal 5e8c4 ,%a0 430ee: 4a88 tstl %a0 430f0: 670a beqs 430fc (*rtems_malloc_statistics_helpers->at_free)(ptr); 430f2: 2f02 movel %d2,%sp@- 430f4: 2068 0008 moveal %a0@(8),%a0 430f8: 4e90 jsr %a0@ 430fa: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 430fc: 2f02 movel %d2,%sp@- 430fe: 2f39 0005 e21c movel 5e21c ,%sp@- 43104: 4eb9 0004 91bc jsr 491bc <_Protected_heap_Free> 4310a: 508f addql #8,%sp 4310c: 4a00 tstb %d0 4310e: 6708 beqs 43118 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43110: 242e fffc movel %fp@(-4),%d2 43114: 4e5e unlk %fp 43116: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 43118: 2079 0005 e21c moveal 5e21c ,%a0 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4311e: 2f28 001c movel %a0@(28),%sp@- 43122: 2f28 0018 movel %a0@(24),%sp@- 43126: 2f02 movel %d2,%sp@- 43128: 4879 0005 d224 pea 5d224 4312e: 4eb9 0004 3f4c jsr 43f4c RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43134: 242e fffc movel %fp@(-4),%d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 43138: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4313c: 4e5e unlk %fp 4313e: 4e75 rts /* * 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() ) { 43140: 4eb9 0004 32b8 jsr 432b8 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 43146: 4a00 tstb %d0 43148: 669e bnes 430e8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4314a: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4314e: 242e fffc movel %fp@(-4),%d2 43152: 4e5e unlk %fp /* * 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() ) { malloc_deferred_free(ptr); 43154: 4ef9 0004 331a jmp 4331a ... =============================================================================== 0005bca8 : int fstat( int fd, struct stat *sbuf ) { 5bca8: 4e56 0000 linkw %fp,#0 5bcac: 202e 0008 movel %fp@(8),%d0 5bcb0: 2f0a movel %a2,%sp@- 5bcb2: 2f02 movel %d2,%sp@- 5bcb4: 242e 000c movel %fp@(12),%d2 rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 5bcb8: 6770 beqs 5bd2a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 5bcba: b0b9 0005 e260 cmpl 5e260 ,%d0 5bcc0: 644e bccs 5bd10 5bcc2: 2200 movel %d0,%d1 5bcc4: ed88 lsll #6,%d0 5bcc6: e989 lsll #4,%d1 5bcc8: 2479 0005 f8f4 moveal 5f8f4 ,%a2 5bcce: 9081 subl %d1,%d0 5bcd0: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5bcd2: 202a 000c movel %a2@(12),%d0 5bcd6: 0280 0000 0100 andil #256,%d0 5bcdc: 6732 beqs 5bd10 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 5bcde: 4878 0046 pea 46 5bce2: 42a7 clrl %sp@- 5bce4: 2f02 movel %d2,%sp@- 5bce6: 4eb9 0004 e9d4 jsr 4e9d4 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5bcec: 206a 0020 moveal %a2@(32),%a0 5bcf0: 45ea 0010 lea %a2@(16),%a2 5bcf4: 4fef 000c lea %sp@(12),%sp 5bcf8: 2d4a 0008 movel %a2,%fp@(8) } 5bcfc: 246e fffc moveal %fp@(-4),%a2 * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5bd00: 2d42 000c movel %d2,%fp@(12) } 5bd04: 242e fff8 movel %fp@(-8),%d2 5bd08: 4e5e unlk %fp * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 5bd0a: 2268 0018 moveal %a0@(24),%a1 5bd0e: 4ed1 jmp %a1@ /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5bd10: 4eb9 0004 e144 jsr 4e144 <__errno> * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5bd16: 242e fff8 movel %fp@(-8),%d2 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5bd1a: 2040 moveal %d0,%a0 5bd1c: 7009 moveq #9,%d0 * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5bd1e: 246e fffc moveal %fp@(-4),%a2 5bd22: 4e5e unlk %fp /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 5bd24: 2080 movel %d0,%a0@ * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5bd26: 70ff moveq #-1,%d0 5bd28: 4e75 rts /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5bd2a: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5bd30: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5bd34: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bd36: 720e moveq #14,%d1 <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } 5bd38: 70ff moveq #-1,%d0 <== NOT EXECUTED 5bd3a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5bd3e: 4e5e unlk %fp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 5bd40: 2081 movel %d1,%a0@ <== NOT EXECUTED * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } =============================================================================== 00043224 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 43224: 4e56 0000 linkw %fp,#0 43228: 202e 0008 movel %fp@(8),%d0 4322c: 2f02 movel %d2,%sp@- 4322e: 206e 000c moveal %fp@(12),%a0 43232: 142e 0013 moveb %fp@(19),%d2 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) { 43236: b0b9 0006 3636 cmpl 63636 ,%d0 4323c: 6436 bccs 43274 <== NEVER TAKEN 4323e: 2239 0006 363a movel 6363a ,%d1 43244: 672e beqs 43274 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 43246: 2241 moveal %d1,%a1 43248: e788 lsll #3,%d0 4324a: d3c0 addal %d0,%a1 if (minor < dtab->size && dtab->minor != NULL) { 4324c: b1e9 0004 cmpal %a1@(4),%a0 43250: 6422 bccs 43274 <== NEVER TAKEN 43252: 2251 moveal %a1@,%a1 43254: 4a89 tstl %a1 43256: 671c beqs 43274 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 43258: 2031 8c00 movel %a1@(00000000,%a0:l:4),%d0 if (dd != NULL && !lookup_only) { 4325c: 6710 beqs 4326e 4325e: 4a02 tstb %d2 43260: 660c bnes 4326e if (!dd->deleted) { 43262: 2040 moveal %d0,%a0 43264: 4a28 0040 tstb %a0@(64) 43268: 660a bnes 43274 ++dd->uses; 4326a: 52a8 0014 addql #1,%a0@(20) return dd; } } return NULL; } 4326e: 241f movel %sp@+,%d2 43270: 4e5e unlk %fp 43272: 4e75 rts 43274: 241f movel %sp@+,%d2 return dd; } } return NULL; 43276: 4280 clrl %d0 } 43278: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000442ba : * NOTES: * get_sector() operates with device via bdbuf library, * and does not support devices with sector size other than 512 bytes */ static rtems_status_code get_sector(int fd, 442ba: 4e56 0000 linkw %fp,#0 442be: 2f0a movel %a2,%sp@- new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 442c0: 4878 0204 pea 204 442c4: 4eb9 0004 594c jsr 4594c if (s == NULL) 442ca: 588f addql #4,%sp new_off = lseek(fd, off, SEEK_SET); if (new_off != off) { return RTEMS_IO_ERROR; } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); 442cc: 2440 moveal %d0,%a2 if (s == NULL) 442ce: 4a80 tstl %d0 442d0: 6732 beqs 44304 <== NEVER TAKEN { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 442d2: 4878 0200 pea 200 442d6: 486a 0004 pea %a2@(4) 442da: 2f2e 0008 movel %fp@(8),%sp@- 442de: 4eb9 0004 64e4 jsr 464e4 if (n != RTEMS_IDE_SECTOR_SIZE) 442e4: 4fef 000c lea %sp@(12),%sp 442e8: 0c80 0000 0200 cmpil #512,%d0 442ee: 671e beqs 4430e <== ALWAYS TAKEN { free(s); 442f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 442f2: 4eb9 0004 5344 jsr 45344 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 442f8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); if (n != RTEMS_IDE_SECTOR_SIZE) { free(s); 442fc: 588f addql #4,%sp <== NOT EXECUTED return RTEMS_IO_ERROR; 442fe: 701b moveq #27,%d0 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 44300: 4e5e unlk %fp <== NOT EXECUTED 44302: 4e75 rts <== NOT EXECUTED 44304: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) { return RTEMS_NO_MEMORY; 44308: 701a moveq #26,%d0 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 4430a: 4e5e unlk %fp <== NOT EXECUTED 4430c: 4e75 rts <== NOT EXECUTED { free(s); return RTEMS_IO_ERROR; } s->sector_num = sector_num; 4430e: 24ae 000c movel %fp@(12),%a2@ *sector = s; return RTEMS_SUCCESSFUL; 44312: 4280 clrl %d0 return RTEMS_IO_ERROR; } s->sector_num = sector_num; *sector = s; 44314: 206e 0010 moveal %fp@(16),%a0 44318: 208a movel %a2,%a0@ return RTEMS_SUCCESSFUL; } 4431a: 246e fffc moveal %fp@(-4),%a2 4431e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0006ee08 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 6ee08: 4e56 fff4 linkw %fp,#-12 6ee0c: 202e 0008 movel %fp@(8),%d0 6ee10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 6ee14: 242e 000c movel %fp@(12),%d2 6ee18: 262e 0010 movel %fp@(16),%d3 rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 6ee1c: b0b9 0007 40d8 cmpl 740d8 ,%d0 6ee22: 643e bccs 6ee62 <== NEVER TAKEN 6ee24: 2200 movel %d0,%d1 6ee26: ed88 lsll #6,%d0 6ee28: e989 lsll #4,%d1 6ee2a: 2479 0008 58c4 moveal 858c4 ,%a2 6ee30: 9081 subl %d1,%d0 6ee32: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 6ee34: 486a 0010 pea %a2@(16) 6ee38: 4eb9 0004 9578 jsr 49578 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 6ee3e: 588f addql #4,%sp 6ee40: 4a80 tstl %d0 6ee42: 6622 bnes 6ee66 /* * 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 ); 6ee44: 206a 0020 moveal %a2@(32),%a0 6ee48: 2d43 0010 movel %d3,%fp@(16) 6ee4c: 2d42 000c movel %d2,%fp@(12) 6ee50: 2d4a 0008 movel %a2,%fp@(8) 6ee54: 2268 0008 moveal %a0@(8),%a1 } 6ee58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 6ee5e: 4e5e unlk %fp /* * 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 ); 6ee60: 4ed1 jmp %a1@ rtems_filesystem_node_types_t type; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 6ee62: 95ca subal %a2,%a2 <== NOT EXECUTED 6ee64: 60ce bras 6ee34 <== NOT EXECUTED /* * 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 ); 6ee66: 4eb9 0006 0414 jsr 60414 <__errno> 6ee6c: 2040 moveal %d0,%a0 6ee6e: 7014 moveq #20,%d0 /* * 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 ); } 6ee70: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 /* * 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 ); 6ee76: 2080 movel %d0,%a0@ /* * 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 ); } 6ee78: 70ff moveq #-1,%d0 6ee7a: 4e5e unlk %fp ... =============================================================================== 00064b24 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 64b24: 4e56 ffe4 linkw %fp,#-28 64b28: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 64b2c: 242e 0008 movel %fp@(8),%d2 64b30: 47fa fd1e lea %pc@(64850 ),%a3 for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); 64b34: 49f9 0007 d284 lea 7d284 ,%a4 struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 64b3a: 246e 0010 moveal %fp@(16),%a2 64b3e: 2a2e 0014 movel %fp@(20),%d5 64b42: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 64b46: 4eb9 0006 4948 jsr 64948 if ((fp = fopen("/etc/passwd", "r")) == NULL) 64b4c: 4879 0009 36aa pea 936aa 64b52: 4879 0009 6e4d pea 96e4d 64b58: 4eb9 0007 8172 jsr 78172 64b5e: 508f addql #8,%sp 64b60: 2600 movel %d0,%d3 64b62: 677a beqs 64bde rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) 64b64: 2f04 movel %d4,%sp@- 64b66: 2f05 movel %d5,%sp@- 64b68: 2f0a movel %a2,%sp@- 64b6a: 2f03 movel %d3,%sp@- 64b6c: 4e93 jsr %a3@ 64b6e: 4fef 0010 lea %sp@(16),%sp 64b72: 4a80 tstl %d0 64b74: 6746 beqs 64bbc goto error_einval; if (name) { 64b76: 4a82 tstl %d2 64b78: 672e beqs 64ba8 match = (strcmp(pwd->pw_name, name) == 0); 64b7a: 2f02 movel %d2,%sp@- 64b7c: 2f12 movel %a2@,%sp@- 64b7e: 4e94 jsr %a4@ 64b80: 508f addql #8,%sp 64b82: 4a80 tstl %d0 64b84: 57c1 seq %d1 64b86: 49c1 extbl %d1 64b88: 4481 negl %d1 } else { match = (pwd->pw_uid == uid); } if (match) { 64b8a: 67d8 beqs 64b64 <== NEVER TAKEN fclose(fp); 64b8c: 2f03 movel %d3,%sp@- 64b8e: 4eb9 0007 78d4 jsr 778d4 *result = pwd; 64b94: 206e 001c moveal %fp@(28),%a0 return 0; 64b98: 588f addql #4,%sp 64b9a: 4280 clrl %d0 match = (pwd->pw_uid == uid); } if (match) { fclose(fp); *result = pwd; 64b9c: 208a movel %a2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 64b9e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 64ba4: 4e5e unlk %fp 64ba6: 4e75 rts goto error_einval; if (name) { match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 64ba8: 4280 clrl %d0 64baa: 302a 0008 movew %a2@(8),%d0 64bae: b0ae 000c cmpl %fp@(12),%d0 64bb2: 57c1 seq %d1 64bb4: 49c1 extbl %d1 64bb6: 4481 negl %d1 } if (match) { 64bb8: 67aa beqs 64b64 64bba: 60d0 bras 64b8c *result = pwd; return 0; } } error_einval: fclose(fp); 64bbc: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EINVAL ); 64bbe: 7616 moveq #22,%d3 *result = pwd; return 0; } } error_einval: fclose(fp); 64bc0: 4eb9 0007 78d4 jsr 778d4 rtems_set_errno_and_return_minus_one( EINVAL ); 64bc6: 4eb9 0007 7798 jsr 77798 <__errno> 64bcc: 588f addql #4,%sp 64bce: 2040 moveal %d0,%a0 64bd0: 70ff moveq #-1,%d0 64bd2: 2083 movel %d3,%a0@ } 64bd4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 64bda: 4e5e unlk %fp 64bdc: 4e75 rts int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 64bde: 4eb9 0007 7798 jsr 77798 <__errno> 64be4: 7816 moveq #22,%d4 64be6: 2040 moveal %d0,%a0 64be8: 70ff moveq #-1,%d0 64bea: 2084 movel %d4,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 64bec: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 64bf2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004315c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4315c: 4e56 ffe8 linkw %fp,#-24 43160: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 43164: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 43168: 4a8a tstl %a2 4316a: 6768 beqs 431d4 <== NEVER TAKEN ) { Timestamp_Control snapshot_as_timestamp; Timestamp_Control *snapshot_as_timestamp_ptr; snapshot_as_timestamp_ptr = 4316c: 4879 0005 f9a8 pea 5f9a8 <_TOD> static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); 43172: 47f9 0005 a79c lea 5a79c <__divdi3>,%a3 43178: 486e fff8 pea %fp@(-8) 4317c: 4eb9 0004 843c jsr 4843c <_TOD_Get_with_nanoseconds> struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); } 43182: 2040 moveal %d0,%a0 43184: 2410 movel %a0@,%d2 43186: 2628 0004 movel %a0@(4),%d3 4318a: 2f3c 3b9a ca00 movel #1000000000,%sp@- 43190: 42a7 clrl %sp@- 43192: 2f03 movel %d3,%sp@- 43194: 2f02 movel %d2,%sp@- 43196: 4e93 jsr %a3@ _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); 43198: 4fef 000c lea %sp@(12),%sp 4319c: 2ebc 3b9a ca00 movel #1000000000,%sp@ 431a2: 42a7 clrl %sp@- static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); 431a4: 2481 movel %d1,%a2@ _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); 431a6: 2f03 movel %d3,%sp@- 431a8: 2f02 movel %d2,%sp@- 431aa: 4eb9 0005 abfc jsr 5abfc <__moddi3> 431b0: 4fef 0010 lea %sp@(16),%sp 431b4: 4878 03e8 pea 3e8 431b8: 42a7 clrl %sp@- 431ba: 2f01 movel %d1,%sp@- 431bc: 2f00 movel %d0,%sp@- 431be: 4e93 jsr %a3@ 431c0: 4fef 0018 lea %sp@(24),%sp * 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; 431c4: 4280 clrl %d0 431c6: 2541 0004 movel %d1,%a2@(4) } 431ca: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 431d0: 4e5e unlk %fp 431d2: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 431d4: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 431da: 720e moveq #14,%d1 <== NOT EXECUTED 431dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 431de: 70ff moveq #-1,%d0 <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 431e0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 431e6: 2081 movel %d1,%a0@ <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 431e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045e34 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 45e34: 4e56 fff0 linkw %fp,#-16 45e38: 222e 0008 movel %fp@(8),%d1 45e3c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 45e40: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 45e44: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 45e48: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 45e4a: 0800 0005 btst #5,%d0 45e4e: 6704 beqs 45e54 <== ALWAYS TAKEN c &= 0x7f; 45e50: 747f moveq #127,%d2 <== NOT EXECUTED 45e52: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 45e54: 0800 0009 btst #9,%d0 45e58: 671e beqs 45e78 c = tolower (c); 45e5a: 2079 0005 e3cc moveal 5e3cc <__ctype_ptr__>,%a0 45e60: 7603 moveq #3,%d3 45e62: 0282 0000 00ff andil #255,%d2 45e68: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 45e6c: c283 andl %d3,%d1 45e6e: 163c 0001 moveb #1,%d3 45e72: b681 cmpl %d1,%d3 45e74: 6700 00ee beqw 45f64 if (c == '\r') { 45e78: 4281 clrl %d1 45e7a: 1202 moveb %d2,%d1 45e7c: 760d moveq #13,%d3 45e7e: b681 cmpl %d1,%d3 45e80: 675c beqs 45ede 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)) { 45e82: 760a moveq #10,%d3 45e84: b681 cmpl %d1,%d3 45e86: 6700 00d2 beqw 45f5a c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45e8a: 4a02 tstb %d2 45e8c: 665c bnes 45eea <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 45e8e: 2039 0005 e2a4 movel 5e2a4 ,%d0 45e94: 5380 subql #1,%d0 45e96: 222a 0020 movel %a2@(32),%d1 45e9a: b081 cmpl %d1,%d0 45e9c: 6334 blss 45ed2 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 45e9e: 7008 moveq #8,%d0 45ea0: c0aa 003c andl %a2@(60),%d0 45ea4: 6600 00c8 bnew 45f6e echo (c, tty); tty->cbuf[tty->ccount++] = c; 45ea8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED } return 0; 45eac: 4280 clrl %d0 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45eae: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45eb2: 5281 addql #1,%d1 <== NOT EXECUTED 45eb4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 45eb8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45ebe: 4e5e unlk %fp 45ec0: 4e75 rts * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45ec2: 4aaa 0020 tstl %a2@(32) 45ec6: 670a beqs 45ed2 45ec8: 42a7 clrl %sp@- 45eca: 2f0a movel %a2,%sp@- 45ecc: 4eba fdc4 jsr %pc@(45c92 ) 45ed0: 508f addql #8,%sp } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; 45ed2: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45ed4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45eda: 4e5e unlk %fp 45edc: 4e75 rts if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 45ede: 4a00 tstb %d0 45ee0: 6df0 blts 45ed2 <== NEVER TAKEN return 0; if (tty->termios.c_iflag & ICRNL) 45ee2: 0800 0008 btst #8,%d0 45ee6: 6702 beqs 45eea <== NEVER TAKEN c = '\n'; 45ee8: 740a moveq #10,%d2 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45eea: 222a 003c movel %a2@(60),%d1 45eee: 0801 0001 btst #1,%d1 45ef2: 679a beqs 45e8e if (c == tty->termios.c_cc[VERASE]) { 45ef4: 4283 clrl %d3 45ef6: 162a 0043 moveb %a2@(67),%d3 45efa: 4280 clrl %d0 45efc: 1002 moveb %d2,%d0 45efe: b083 cmpl %d3,%d0 45f00: 67c0 beqs 45ec2 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 45f02: 4283 clrl %d3 45f04: 162a 0044 moveb %a2@(68),%d3 45f08: b083 cmpl %d3,%d0 45f0a: 6700 00a8 beqw 45fb4 erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 45f0e: 4283 clrl %d3 45f10: 162a 0045 moveb %a2@(69),%d3 45f14: b083 cmpl %d3,%d0 45f16: 6700 0110 beqw 46028 return 1; } else if (c == '\n') { 45f1a: 760a moveq #10,%d3 45f1c: b680 cmpl %d0,%d3 45f1e: 6700 00be beqw 45fde 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]) || 45f22: 4283 clrl %d3 45f24: 162a 004c moveb %a2@(76),%d3 45f28: b083 cmpl %d3,%d0 45f2a: 670c beqs 45f38 <== NEVER TAKEN 45f2c: 4283 clrl %d3 45f2e: 162a 0051 moveb %a2@(81),%d3 45f32: b083 cmpl %d3,%d0 45f34: 6600 ff58 bnew 45e8e (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 45f38: 44c1 movew %d1,%ccr <== NOT EXECUTED 45f3a: 6b58 bmis 45f94 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 45f3c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 45f40: 7001 moveq #1,%d0 <== NOT EXECUTED 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); tty->cbuf[tty->ccount++] = c; 45f42: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45f46: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45f4a: 5281 addql #1,%d1 <== NOT EXECUTED 45f4c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45f50: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 45f56: 4e5e unlk %fp <== NOT EXECUTED 45f58: 4e75 rts <== 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)) { 45f5a: 0800 0006 btst #6,%d0 45f5e: 678a beqs 45eea <== ALWAYS TAKEN c = '\r'; 45f60: 740d moveq #13,%d2 <== NOT EXECUTED 45f62: 6086 bras 45eea <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 45f64: 0682 0000 0020 addil #32,%d2 45f6a: 6000 ff0c braw 45e78 /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45f6e: 2f0a movel %a2,%sp@- 45f70: 4280 clrl %d0 45f72: 1002 moveb %d2,%d0 45f74: 2f00 movel %d0,%sp@- 45f76: 4eba fc90 jsr %pc@(45c08 ) 45f7a: 222a 0020 movel %a2@(32),%d1 45f7e: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; } return 0; 45f80: 4280 clrl %d0 * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45f82: 206a 001c moveal %a2@(28),%a0 45f86: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45f8a: 5281 addql #1,%d1 45f8c: 2541 0020 movel %d1,%a2@(32) 45f90: 6000 ff26 braw 45eb8 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); 45f94: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45f96: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45f98: 4eba fc6e jsr %pc@(45c08 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 45f9c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 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); 45fa0: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; 45fa2: 7001 moveq #1,%d0 <== NOT EXECUTED 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); tty->cbuf[tty->ccount++] = c; 45fa4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45fa8: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45fac: 5281 addql #1,%d1 <== NOT EXECUTED 45fae: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 45fb2: 609c bras 45f50 <== NOT EXECUTED * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45fb4: 4aaa 0020 tstl %a2@(32) 45fb8: 6700 ff18 beqw 45ed2 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 45fbc: 44c1 movew %d1,%ccr 45fbe: 6a74 bpls 46034 <== NEVER TAKEN tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 45fc0: 0801 0004 btst #4,%d1 45fc4: 677e beqs 46044 <== NEVER TAKEN 45fc6: 4878 0001 pea 1 45fca: 2f0a movel %a2,%sp@- 45fcc: 4eba fcc4 jsr %pc@(45c92 ) 45fd0: 508f addql #8,%sp erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 45fd2: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45fd4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45fda: 4e5e unlk %fp 45fdc: 4e75 rts return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 45fde: 7048 moveq #72,%d0 45fe0: c280 andl %d0,%d1 45fe2: 6620 bnes 46004 <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 45fe4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 45fe8: 7001 moveq #1,%d0 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45fea: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45fee: 740a moveq #10,%d2 <== NOT EXECUTED 45ff0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45ff4: 5281 addql #1,%d1 <== NOT EXECUTED 45ff6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45ffa: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46000: 4e5e unlk %fp 46002: 4e75 rts } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 46004: 2f0a movel %a2,%sp@- 46006: 4878 000a pea a tty->cbuf[tty->ccount++] = c; 4600a: 740a moveq #10,%d2 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4600c: 4eba fbfa jsr %pc@(45c08 ) tty->cbuf[tty->ccount++] = c; 46010: 222a 0020 movel %a2@(32),%d1 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 46014: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; return 1; 46016: 7001 moveq #1,%d0 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 46018: 206a 001c moveal %a2@(28),%a0 4601c: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 46020: 5281 addql #1,%d1 46022: 2541 0020 movel %d1,%a2@(32) 46026: 60d2 bras 45ffa else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 46028: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4602a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46030: 4e5e unlk %fp <== NOT EXECUTED 46032: 4e75 rts <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 46034: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 46038: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4603a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46040: 4e5e unlk %fp <== NOT EXECUTED 46042: 4e75 rts <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 46044: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46046: 47fa fbc0 lea %pc@(45c08 ),%a3 <== NOT EXECUTED 4604a: 2f03 movel %d3,%sp@- <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 4604c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 46050: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 46052: 508f addql #8,%sp <== NOT EXECUTED 46054: 7020 moveq #32,%d0 <== NOT EXECUTED 46056: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4605a: 6700 fe76 beqw 45ed2 <== NOT EXECUTED echo ('\n', tty); 4605e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46060: 4878 000a pea a <== NOT EXECUTED 46064: 4e93 jsr %a3@ <== NOT EXECUTED 46066: 508f addql #8,%sp <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; 46068: 4280 clrl %d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4606a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 46070: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bd88 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5bd88: 4280 clrl %d0 <== NOT EXECUTED * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 5bd8a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5bd8e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043980 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43980: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 43982: 4e56 0000 linkw %fp,#0 43986: 2f0a movel %a2,%sp@- /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43988: b0b9 0005 fb6c cmpl 5fb6c <_System_state_Current>,%d0 4398e: 6708 beqs 43998 <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 43990: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43994: 4e5e unlk %fp <== NOT EXECUTED 43996: 4e75 rts <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 43998: 2479 0005 d9d2 moveal 5d9d2 <_global_impure_ptr>,%a2 4399e: b5f9 0005 e3d0 cmpal 5e3d0 <_impure_ptr>,%a2 439a4: 6710 beqs 439b6 _wrapup_reent(_global_impure_ptr); 439a6: 2f0a movel %a2,%sp@- 439a8: 4eb9 0004 eb92 jsr 4eb92 <_wrapup_reent> /* 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; 439ae: 588f addql #4,%sp 439b0: 23ca 0005 e3d0 movel %a2,5e3d0 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 439b6: 2f2a 0004 movel %a2@(4),%sp@- 439ba: 45f9 0004 e280 lea 4e280 ,%a2 439c0: 4e92 jsr %a2@ fclose (stdout); 439c2: 2079 0005 e3d0 moveal 5e3d0 <_impure_ptr>,%a0 439c8: 2f28 0008 movel %a0@(8),%sp@- 439cc: 4e92 jsr %a2@ fclose (stderr); 439ce: 2079 0005 e3d0 moveal 5e3d0 <_impure_ptr>,%a0 439d4: 2f28 000c movel %a0@(12),%sp@- 439d8: 4e92 jsr %a2@ } 439da: 246e fffc moveal %fp@(-4),%a2 * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); 439de: 4fef 000c lea %sp@(12),%sp } 439e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000433cc : #include "malloc_p.h" void *malloc( size_t size ) { 433cc: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 433d0: 52b9 0005 f904 addql #1,5f904 #include "malloc_p.h" void *malloc( size_t size ) { 433d6: 2f03 movel %d3,%sp@- 433d8: 262e 0008 movel %fp@(8),%d3 433dc: 2f02 movel %d2,%sp@- MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 433de: 4eb9 0004 32d8 jsr 432d8 /* * Validate the parameters */ if ( !size ) 433e4: 4a83 tstl %d3 433e6: 6762 beqs 4344a return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 433e8: 7003 moveq #3,%d0 433ea: b0b9 0005 fb6c cmpl 5fb6c <_System_state_Current>,%d0 433f0: 674e beqs 43440 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 433f2: 42a7 clrl %sp@- 433f4: 42a7 clrl %sp@- 433f6: 2f03 movel %d3,%sp@- 433f8: 2f39 0005 e21c movel 5e21c ,%sp@- 433fe: 4eb9 0004 917c jsr 4917c <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 43404: 4fef 0010 lea %sp@(16),%sp 43408: 2400 movel %d0,%d2 4340a: 674e beqs 4345a } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4340c: 2079 0005 e8c0 moveal 5e8c0 ,%a0 43412: 4a88 tstl %a0 43414: 6708 beqs 4341e (*rtems_malloc_dirty_helper)( return_this, size ); 43416: 2f03 movel %d3,%sp@- 43418: 2f02 movel %d2,%sp@- 4341a: 4e90 jsr %a0@ 4341c: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4341e: 2079 0005 e8c4 moveal 5e8c4 ,%a0 43424: 4a88 tstl %a0 43426: 670a beqs 43432 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43428: 2f02 movel %d2,%sp@- 4342a: 2068 0004 moveal %a0@(4),%a0 4342e: 4e90 jsr %a0@ 43430: 588f addql #4,%sp return return_this; } 43432: 2002 movel %d2,%d0 43434: 242e fff8 movel %fp@(-8),%d2 43438: 262e fffc movel %fp@(-4),%d3 4343c: 4e5e unlk %fp 4343e: 4e75 rts /* * 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() ) 43440: 4eb9 0004 32b8 jsr 432b8 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43446: 4a00 tstb %d0 43448: 66a8 bnes 433f2 <== ALWAYS TAKEN /* * Validate the parameters */ if ( !size ) return (void *) 0; 4344a: 4282 clrl %d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 4344c: 2002 movel %d2,%d0 4344e: 242e fff8 movel %fp@(-8),%d2 43452: 262e fffc movel %fp@(-4),%d3 43456: 4e5e unlk %fp 43458: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 4345a: 2f03 movel %d3,%sp@- 4345c: 2f39 0005 e21c movel 5e21c ,%sp@- 43462: 2079 0005 c61c moveal 5c61c ,%a0 43468: 4e90 jsr %a0@ if ( !return_this ) { 4346a: 508f addql #8,%sp */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 4346c: 2400 movel %d0,%d2 if ( !return_this ) { 4346e: 669c bnes 4340c <== NEVER TAKEN errno = ENOMEM; 43470: 4eb9 0004 e144 jsr 4e144 <__errno> */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 43476: 262e fffc movel %fp@(-4),%d3 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); if ( !return_this ) { errno = ENOMEM; 4347a: 2040 moveal %d0,%a0 4347c: 700c moveq #12,%d0 4347e: 2080 movel %d0,%a0@ */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 43480: 2002 movel %d2,%d0 43482: 242e fff8 movel %fp@(-8),%d2 43486: 4e5e unlk %fp ... =============================================================================== 000432d8 : void malloc_deferred_frees_process(void) { 432d8: 4e56 0000 linkw %fp,#0 432dc: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 432de: 47f9 0004 30cc lea 430cc ,%a3 return true; } void malloc_deferred_frees_process(void) { 432e4: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 432e6: 4879 0005 e280 pea 5e280 432ec: 45f9 0004 7f74 lea 47f74 <_Chain_Get>,%a2 432f2: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 432f4: 588f addql #4,%sp 432f6: 4a80 tstl %d0 432f8: 6714 beqs 4330e free(to_be_freed); 432fa: 2f00 movel %d0,%sp@- 432fc: 4e93 jsr %a3@ 432fe: 588f addql #4,%sp 43300: 4879 0005 e280 pea 5e280 43306: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 43308: 588f addql #4,%sp 4330a: 4a80 tstl %d0 4330c: 66ec bnes 432fa <== NEVER TAKEN free(to_be_freed); } 4330e: 246e fff8 moveal %fp@(-8),%a2 43312: 266e fffc moveal %fp@(-4),%a3 43316: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cd34 : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4cd34: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4cd38: 2f39 0005 f0f0 movel 5f0f0 ,%sp@- 4cd3e: 4878 0001 pea 1 4cd42: 4eb9 0004 2e28 jsr 42e28 if ( memory ) 4cd48: 508f addql #8,%sp 4cd4a: 4a80 tstl %d0 4cd4c: 6706 beqs 4cd54 <== NEVER TAKEN memfile_blocks_allocated++; 4cd4e: 52b9 0005 f204 addql #1,5f204 return memory; } 4cd54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d206 : */ static void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4d206: 4e56 ffec linkw %fp,#-20 4d20a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d20e: 286e 0008 moveal %fp@(8),%a4 4d212: 47f9 0004 d1ec lea 4d1ec ,%a3 4d218: 262e 000c movel %fp@(12),%d3 IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 4d21c: 2454 moveal %a4@,%a2 for ( i=0 ; i<== NEVER TAKEN 4d220: 4282 clrl %d2 4d222: 47f9 0004 d1ec lea 4d1ec ,%a3 if ( b[i] ) { 4d228: 2012 movel %a2@,%d0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 4d230: 2f00 movel %d0,%sp@- 4d232: 4e93 jsr %a3@ b[i] = 0; 4d234: 588f addql #4,%sp 4d236: 4292 clrl %a2@ 4d238: 588a addql #4,%a2 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4d23e: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4d240: 2f0a movel %a2,%sp@- 4d242: 4e93 jsr %a3@ *block_table = 0; 4d244: 588f addql #4,%sp 4d246: 4294 clrl %a4@ } 4d248: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4d24e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d758 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4d758: 7004 moveq #4,%d0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4d75a: 4e56 0000 linkw %fp,#0 4d75e: 206e 0008 moveal %fp@(8),%a0 4d762: 2f03 movel %d3,%sp@- the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4d764: c0a8 000c andl %a0@(12),%d0 mode_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4d768: 2068 0018 moveal %a0@(24),%a0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4d76c: 2f02 movel %d2,%sp@- the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4d76e: 4a80 tstl %d0 4d770: 670a beqs 4d77c 4d772: 2268 004a moveal %a0@(74),%a1 && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 4d776: 7005 moveq #5,%d0 4d778: b091 cmpl %a1@,%d0 4d77a: 670e beqs 4d78a <== NEVER TAKEN && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; } 4d77c: 242e fff8 movel %fp@(-8),%d2 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 4d780: 4280 clrl %d0 } 4d782: 262e fffc movel %fp@(-4),%d3 4d786: 4e5e unlk %fp 4d788: 4e75 rts /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4d78a: 2028 0052 movel %a0@(82),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 4d78e: 243c 0005 d766 movel #382822,%d2 <== NOT EXECUTED 4d794: 2142 004a movel %d2,%a0@(74) <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4d798: 2228 0056 movel %a0@(86),%d1 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 4d79c: 4282 clrl %d2 <== NOT EXECUTED 4d79e: 4283 clrl %d3 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4d7a0: 42a8 0056 clrl %a0@(86) <== NOT EXECUTED && (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; the_jnode->info.file.size = 0; 4d7a4: 2142 004e movel %d2,%a0@(78) <== NOT EXECUTED 4d7a8: 2143 0052 movel %d3,%a0@(82) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4d7ac: 42a8 005a clrl %a0@(90) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4d7b0: 42a8 005e clrl %a0@(94) <== NOT EXECUTED if ((count != 0) 4d7b4: 4a80 tstl %d0 <== NOT EXECUTED 4d7b6: 67c4 beqs 4d77c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4d7b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED return -1; 4d7ba: 76ff moveq #-1,%d3 <== 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)) 4d7bc: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d7be: 42a7 clrl %sp@- <== NOT EXECUTED 4d7c0: 42a7 clrl %sp@- <== NOT EXECUTED 4d7c2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d7c4: 4eb9 0004 d518 jsr 4d518 <== NOT EXECUTED return -1; } return 0; } 4d7ca: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 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)) return -1; 4d7ce: b680 cmpl %d0,%d3 <== NOT EXECUTED 4d7d0: 57c0 seq %d0 <== NOT EXECUTED } return 0; } 4d7d2: 262e fffc movel %fp@(-4),%d3 <== 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)) 4d7d6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED return -1; 4d7da: 49c0 extbl %d0 <== NOT EXECUTED } return 0; } 4d7dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043614 : const void *data ) { int rv = 0; if ( 43614: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43616: 4e56 ff84 linkw %fp,#-124 4361a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4361e: 282e 0008 movel %fp@(8),%d4 43622: 262e 000c movel %fp@(12),%d3 43626: 2c2e 0010 movel %fp@(16),%d6 int rv = 0; if ( 4362a: b0ae 0014 cmpl %fp@(20),%d0 4362e: 6500 0286 bcsw 438b6 options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 43632: 2f06 movel %d6,%sp@- 43634: 4eb9 0004 bba4 jsr 4bba4 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 4363a: 588f addql #4,%sp if ( options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 4363c: 2e00 movel %d0,%d7 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 4363e: 6700 0276 beqw 438b6 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43642: 4a83 tstl %d3 43644: 6700 0212 beqw 43858 } return rv; } int mount( 43648: 2f03 movel %d3,%sp@- 4364a: 45f9 0004 f488 lea 4f488 ,%a2 43650: 2d43 ffac movel %d3,%fp@(-84) 43654: 4e92 jsr %a2@ 43656: 588f addql #4,%sp 43658: 2a40 moveal %d0,%a5 4365a: 528d addql #1,%a5 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; 4365c: 2f06 movel %d6,%sp@- 4365e: 4e92 jsr %a2@ 43660: 588f addql #4,%sp 43662: 2400 movel %d0,%d2 43664: 2640 moveal %d0,%a3 43666: 5282 addql #1,%d2 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43668: 4a84 tstl %d4 4366a: 6700 0212 beqw 4387e 4366e: 2f04 movel %d4,%sp@- 43670: 4eb9 0004 f488 jsr 4f488 43676: 588f addql #4,%sp 43678: 2440 moveal %d0,%a2 4367a: 528a addql #1,%a2 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 4367c: 41f5 b863 lea %a5@(00000063,%a3:l),%a0 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43680: 4870 a800 pea %a0@(00000000,%a2:l) 43684: 4878 0001 pea 1 43688: 4eb9 0004 2e28 jsr 42e28 if ( mt_entry != NULL ) { 4368e: 508f addql #8,%sp 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 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43690: 2840 moveal %d0,%a4 if ( mt_entry != NULL ) { 43692: 4a80 tstl %d0 43694: 6700 0206 beqw 4389c 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 ); 43698: 2f02 movel %d2,%sp@- if ( mt_entry != NULL ) { 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 ); 4369a: 2a00 movel %d0,%d5 4369c: 0685 0000 0062 addil #98,%d5 memcpy( str, filesystemtype, filesystemtype_size ); 436a2: 47f9 0004 e964 lea 4e964 ,%a3 mt_entry->type = str; str += filesystemtype_size; 436a8: d485 addl %d5,%d2 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 ); 436aa: 2f06 movel %d6,%sp@- + 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 = 436ac: 2c00 movel %d0,%d6 436ae: 0686 0000 003e addil #62,%d6 (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 ); 436b4: 2f05 movel %d5,%sp@- 436b6: 4e93 jsr %a3@ mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 436b8: 4fef 000c lea %sp@(12),%sp (rtems_filesystem_global_location_t *) ((char *) mt_entry + sizeof( *mt_entry )); char *str = (char *) mt_fs_root + sizeof( *mt_fs_root ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 436bc: 2945 0032 movel %d5,%a4@(50) str += filesystemtype_size; if ( source_or_null != NULL ) { 436c0: 4a84 tstl %d4 436c2: 6712 beqs 436d6 memcpy( str, source_or_null, source_size ); 436c4: 2f0a movel %a2,%sp@- 436c6: 2f04 movel %d4,%sp@- 436c8: 2f02 movel %d2,%sp@- 436ca: 4e93 jsr %a3@ mt_entry->dev = str; str += source_size; 436cc: 4fef 000c lea %sp@(12),%sp mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 436d0: 2942 0036 movel %d2,%a4@(54) str += source_size; 436d4: d48a addl %a2,%d2 } memcpy( str, target, target_size ); 436d6: 2f0d movel %a5,%sp@- 436d8: 2f2e ffac movel %fp@(-84),%sp@- filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 436dc: 7a01 moveq #1,%d5 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); 436de: 2f02 movel %d2,%sp@- 436e0: 4e93 jsr %a3@ void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 436e2: 4878 0024 pea 24 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; 436e6: 203c 0005 d25e movel #381534,%d0 436ec: 2940 002a movel %d0,%a4@(42) 436f0: 4878 0001 pea 1 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 436f4: 7001 moveq #1,%d0 436f6: 1940 0028 moveb %d0,%a4@(40) mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 436fa: 7001 moveq #1,%d0 436fc: 2f06 movel %d6,%sp@- 436fe: 486c 0014 pea %a4@(20) mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); mt_entry->target = str; 43702: 2942 002e movel %d2,%a4@(46) mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 43706: 2940 0056 movel %d0,%a4@(86) memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 4370a: 2946 0024 movel %d6,%a4@(36) mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; 4370e: 294c 0052 movel %a4,%a4@(82) 43712: 4eb9 0004 7fb0 jsr 47fb0 <_Chain_Initialize> ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 43718: 2f2e 0018 movel %fp@(24),%sp@- 4371c: 2047 moveal %d7,%a0 filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 4371e: caae 0014 andl %fp@(20),%d5 43722: 1945 0029 moveb %d5,%a4@(41) rv = (*fsmount_me_h)( mt_entry, data ); 43726: 2f0c movel %a4,%sp@- 43728: 4e90 jsr %a0@ if ( rv == 0 ) { 4372a: 4fef 0024 lea %sp@(36),%sp ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; rv = (*fsmount_me_h)( mt_entry, data ); 4372e: 2400 movel %d0,%d2 if ( rv == 0 ) { 43730: 6600 00f6 bnew 43828 if ( target != NULL ) { 43734: 4a83 tstl %d3 43736: 6700 0198 beqw 438d0 { 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 = 4373a: 4878 001f pea 1f rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); 4373e: 280e movel %fp,%d4 43740: 0684 ffff ffc8 addil #-56,%d4 { 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 = 43746: 2f03 movel %d3,%sp@- 43748: 2f04 movel %d4,%sp@- 4374a: 4eb9 0004 4382 jsr 44382 static inline bool rtems_filesystem_location_is_instance_root( const rtems_filesystem_location_info_t *loc ) { const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry; 43750: 2040 moveal %d0,%a0 43752: 2268 0014 moveal %a0@(20),%a1 return (*mt_entry->ops->are_nodes_equal_h)( 43756: 2469 000c moveal %a1@(12),%a2 4375a: 2f29 0024 movel %a1@(36),%sp@- 4375e: 2f00 movel %d0,%sp@- 43760: 226a 0010 moveal %a2@(16),%a1 43764: 4e91 jsr %a1@ rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { 43766: 4fef 0014 lea %sp@(20),%sp 4376a: 4a00 tstb %d0 4376c: 6600 01ee bnew 4395c 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( 43770: 486e ffe0 pea %fp@(-32) rtems_filesystem_location_info_t targetloc; rtems_filesystem_global_location_t *mt_point_node; rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc ); 43774: 240e movel %fp,%d2 43776: 0682 ffff ffb0 addil #-80,%d2 4377c: 2f02 movel %d2,%sp@- 4377e: 4eb9 0004 4834 jsr 44834 mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 43784: 2f02 movel %d2,%sp@- 43786: 4eb9 0004 4a78 jsr 44a78 4378c: 2440 moveal %d0,%a2 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 4378e: 226a 0014 moveal %a2@(20),%a1 43792: 2269 000c moveal %a1@(12),%a1 43796: 2f0c movel %a4,%sp@- 43798: 2269 0030 moveal %a1@(48),%a1 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; 4379c: 2940 0020 movel %d0,%a4@(32) rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 437a0: 4e91 jsr %a1@ if ( rv == 0 ) { 437a2: 4fef 0010 lea %sp@(16),%sp 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; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 437a6: 2400 movel %d0,%d2 if ( rv == 0 ) { 437a8: 6600 0094 bnew 4383e */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 437ac: 42a7 clrl %sp@- 437ae: 42a7 clrl %sp@- 437b0: 2f39 0005 f8fc movel 5f8fc ,%sp@- 437b6: 4eb9 0004 7458 jsr 47458 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 437bc: 2279 0005 e294 moveal 5e294 ,%a1 the_node->next = tail; 437c2: 28bc 0005 e290 movel #385680,%a4@ tail->previous = the_node; old_last->next = the_node; 437c8: 228c movel %a4,%a1@ } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 437ca: 2f39 0005 f8fc movel 5f8fc ,%sp@- { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 437d0: 23cc 0005 e294 movel %a4,5e294 old_last->next = the_node; the_node->previous = old_last; 437d6: 2949 0004 movel %a1,%a4@(4) 437da: 4eb9 0004 75b0 jsr 475b0 437e0: 4fef 0010 lea %sp@(16),%sp } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 437e4: 2f04 movel %d4,%sp@- 437e6: 4eb9 0004 44d6 jsr 444d6 437ec: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 437ee: 4a82 tstl %d2 437f0: 6628 bnes 4381a <== NEVER TAKEN errno = EINVAL; rv = -1; } return rv; } 437f2: 2002 movel %d2,%d0 437f4: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 437fa: 4e5e unlk %fp 437fc: 4e75 rts rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 437fe: 4eb9 0004 e144 jsr 4e144 <__errno> <== NOT EXECUTED 43804: 7616 moveq #22,%d3 <== NOT EXECUTED rv = -1; 43806: 74ff moveq #-1,%d2 <== NOT EXECUTED rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 43808: 2040 moveal %d0,%a0 <== NOT EXECUTED 4380a: 2083 movel %d3,%a0@ <== NOT EXECUTED 4380c: 2f39 0005 f8fc movel 5f8fc ,%sp@- <== NOT EXECUTED 43812: 4eb9 0004 75b0 jsr 475b0 <== NOT EXECUTED 43818: 588f addql #4,%sp <== NOT EXECUTED } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 4381a: 226c 000c moveal %a4@(12),%a1 4381e: 2f0c movel %a4,%sp@- 43820: 2269 003c moveal %a1@(60),%a1 43824: 4e91 jsr %a1@ 43826: 588f addql #4,%sp } } if ( rv != 0 ) { free( mt_entry ); 43828: 2f0c movel %a4,%sp@- 4382a: 4eb9 0004 30cc jsr 430cc 43830: 588f addql #4,%sp errno = EINVAL; rv = -1; } return rv; } 43832: 2002 movel %d2,%d0 43834: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 4383a: 4e5e unlk %fp 4383c: 4e75 rts &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 4383e: 2f0a movel %a2,%sp@- 43840: 4eb9 0004 4954 jsr 44954 43846: 588f addql #4,%sp } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 43848: 2f04 movel %d4,%sp@- 4384a: 4eb9 0004 44d6 jsr 444d6 43850: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 43852: 4a82 tstl %d2 43854: 679c beqs 437f2 <== NEVER TAKEN 43856: 60c2 bras 4381a const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43858: 41f9 0005 d25c lea 5d25c ,%a0 4385e: 45f9 0004 f488 lea 4f488 ,%a2 43864: 3a7c 0002 moveaw #2,%a5 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 43868: 2f06 movel %d6,%sp@- const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 4386a: 2d48 ffac movel %a0,%fp@(-84) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 4386e: 4e92 jsr %a2@ 43870: 588f addql #4,%sp 43872: 2400 movel %d0,%d2 43874: 2640 moveal %d0,%a3 43876: 5282 addql #1,%d2 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 43878: 4a84 tstl %d4 4387a: 6600 fdf2 bnew 4366e 4387e: 95ca subal %a2,%a2 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 43880: 41f5 b863 lea %a5@(00000063,%a3:l),%a0 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43884: 4870 a800 pea %a0@(00000000,%a2:l) 43888: 4878 0001 pea 1 4388c: 4eb9 0004 2e28 jsr 42e28 if ( mt_entry != NULL ) { 43892: 508f addql #8,%sp 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 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 43894: 2840 moveal %d0,%a4 if ( mt_entry != NULL ) { 43896: 4a80 tstl %d0 43898: 6600 fdfe bnew 43698 if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; 4389c: 4eb9 0004 e144 jsr 4e144 <__errno> rv = -1; 438a2: 74ff moveq #-1,%d2 if ( rv != 0 ) { free( mt_entry ); } } else { errno = ENOMEM; 438a4: 2040 moveal %d0,%a0 438a6: 700c moveq #12,%d0 438a8: 2080 movel %d0,%a0@ errno = EINVAL; rv = -1; } return rv; } 438aa: 2002 movel %d2,%d0 438ac: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 438b2: 4e5e unlk %fp 438b4: 4e75 rts } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438b6: 4eb9 0004 e144 jsr 4e144 <__errno> rv = -1; 438bc: 74ff moveq #-1,%d2 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438be: 7216 moveq #22,%d1 438c0: 2040 moveal %d0,%a0 rv = -1; } return rv; } 438c2: 2002 movel %d2,%d0 438c4: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 } else { errno = EINVAL; rv = -1; } } else { errno = EINVAL; 438ca: 2081 movel %d1,%a0@ rv = -1; } return rv; } 438cc: 4e5e unlk %fp 438ce: 4e75 rts */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 438d0: 42a7 clrl %sp@- 438d2: 42a7 clrl %sp@- 438d4: 2f39 0005 f8fc movel 5f8fc ,%sp@- 438da: 4eb9 0004 7458 jsr 47458 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 438e0: 4fef 000c lea %sp@(12),%sp 438e4: 203c 0005 e290 movel #385680,%d0 438ea: b0b9 0005 e28c cmpl 5e28c ,%d0 438f0: 6600 ff0c bnew 437fe Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 438f4: 2279 0005 e294 moveal 5e294 ,%a1 } 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 ); 438fa: 260c movel %a4,%d3 438fc: 0683 0000 0024 addil #36,%d3 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 43902: 47f9 0004 49c8 lea 449c8 ,%a3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 43908: 45f9 0004 499e lea 4499e ,%a2 the_node->next = tail; 4390e: 2880 movel %d0,%a4@ tail->previous = the_node; old_last->next = the_node; 43910: 228c movel %a4,%a1@ } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 43912: 2f39 0005 f8fc movel 5f8fc ,%sp@- { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 43918: 23cc 0005 e294 movel %a4,5e294 old_last->next = the_node; the_node->previous = old_last; 4391e: 2949 0004 movel %a1,%a4@(4) 43922: 4eb9 0004 75b0 jsr 475b0 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 43928: 2f03 movel %d3,%sp@- 4392a: 4e93 jsr %a3@ 4392c: 2800 movel %d0,%d4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 4392e: 2f03 movel %d3,%sp@- 43930: 4e93 jsr %a3@ rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 43932: 2079 0005 e2ac moveal 5e2ac ,%a0 43938: 5888 addql #4,%a0 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 = 4393a: 2600 movel %d0,%d3 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 4393c: 2f04 movel %d4,%sp@- 4393e: 2f08 movel %a0,%sp@- 43940: 4e92 jsr %a2@ &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 43942: 2f03 movel %d3,%sp@- 43944: 2f39 0005 e2ac movel 5e2ac ,%sp@- 4394a: 4e92 jsr %a2@ 4394c: 4fef 001c lea %sp@(28),%sp errno = EINVAL; rv = -1; } return rv; } 43950: 2002 movel %d2,%d0 43952: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 43958: 4e5e unlk %fp 4395a: 4e75 rts rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 4395c: 4878 0010 pea 10 rv = -1; 43960: 74ff moveq #-1,%d2 rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 43962: 2f04 movel %d4,%sp@- 43964: 4eb9 0004 402a jsr 4402a 4396a: 508f addql #8,%sp rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 4396c: 2f04 movel %d4,%sp@- 4396e: 4eb9 0004 44d6 jsr 444d6 43974: 588f addql #4,%sp rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 43976: 4a82 tstl %d2 43978: 6700 fe78 beqw 437f2 4397c: 6000 fe9c braw 4381a =============================================================================== 00047b94 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 47b94: 4e56 ffec linkw %fp,#-20 47b98: 48d7 007c moveml %d2-%d6,%sp@ 47b9c: 262e 0008 movel %fp@(8),%d3 47ba0: 242e 000c movel %fp@(12),%d2 47ba4: 282e 0010 movel %fp@(16),%d4 47ba8: 2a2e 0014 movel %fp@(20),%d5 47bac: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 47bb0: 4a82 tstl %d2 47bb2: 673e beqs 47bf2 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 47bb4: 4878 01ff pea 1ff 47bb8: 2f02 movel %d2,%sp@- 47bba: 4eb9 0004 883c jsr 4883c if (rv == 0) { 47bc0: 508f addql #8,%sp 47bc2: 4a80 tstl %d0 47bc4: 670a beqs 47bd0 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 47bc6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 47bcc: 4e5e unlk %fp <== NOT EXECUTED 47bce: 4e75 rts <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 47bd0: 2d46 0018 movel %d6,%fp@(24) 47bd4: 2d45 0014 movel %d5,%fp@(20) 47bd8: 2d44 0010 movel %d4,%fp@(16) 47bdc: 2d42 000c movel %d2,%fp@(12) 47be0: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 47be4: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 47bea: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 47bec: 4ef9 0004 7c0c jmp 47c0c options, data ); } } else { errno = EINVAL; 47bf2: 4eb9 0006 0414 jsr 60414 <__errno> 47bf8: 7216 moveq #22,%d1 47bfa: 2040 moveal %d0,%a0 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 47bfc: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 47bfe: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 options, data ); } } else { errno = EINVAL; 47c04: 2081 movel %d1,%a0@ } return rv; } 47c06: 4e5e unlk %fp ... =============================================================================== 00056aac : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 56aac: 72ff moveq #-1,%d1 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 56aae: 4e56 ff44 linkw %fp,#-188 ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 56ab2: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 56ab4: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 56ab8: 246e 0008 moveal %fp@(8),%a2 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 56abc: 47ee ff80 lea %fp@(-128),%a3 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; 56ac0: 206a 0014 moveal %a2@(20),%a0 56ac4: 2868 0008 moveal %a0@(8),%a4 uint32_t byte = 0; 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); 56ac8: 4878 0040 pea 40 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 56acc: 282e 0010 movel %fp@(16),%d4 uint32_t byte = 0; 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); 56ad0: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 56ad2: 262e 0014 movel %fp@(20),%d3 56ad6: 2d41 ff78 movel %d1,%fp@(-136) int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 56ada: 2a6a 0008 moveal %a2@(8),%a5 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 56ade: 2d41 ff7c movel %d1,%fp@(-132) fat_file_fd_t *fat_fd = NULL; time_t time_ret = 0; uint16_t time_val = 0; 56ae2: 3d40 ff68 movew %d0,%fp@(-152) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 56ae6: 42ae ff6c clrl %fp@(-148) time_t time_ret = 0; uint16_t time_val = 0; uint16_t date = 0; 56aea: 3d40 ff6a movew %d0,%fp@(-150) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 56aee: 42ae ff70 clrl %fp@(-144) dir_pos->sname.ofs = 0; 56af2: 42ae ff74 clrl %fp@(-140) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 56af6: 4293 clrl %a3@ 56af8: 42ae ff84 clrl %fp@(-124) 56afc: 42ae ff88 clrl %fp@(-120) 56b00: 42ae ff8c clrl %fp@(-116) 56b04: 42ae ff90 clrl %fp@(-112) 56b08: 42ae ff94 clrl %fp@(-108) 56b0c: 42ae ff98 clrl %fp@(-104) 56b10: 42ae ff9c clrl %fp@(-100) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 56b14: 486e ffc0 pea %fp@(-64) 56b18: 4eb9 0005 b1f8 jsr 5b1f8 if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 56b1e: 4fef 000c lea %sp@(12),%sp 56b22: 0c83 0000 0104 cmpil #260,%d3 56b28: 6e00 038c bgtw 56eb6 rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 56b2c: 4878 000b pea b 56b30: 2f0b movel %a3,%sp@- 56b32: 2f03 movel %d3,%sp@- 56b34: 2f04 movel %d4,%sp@- 56b36: 4eb9 0005 7050 jsr 57050 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 56b3c: 4fef 0010 lea %sp@(16),%sp if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { rtems_set_errno_and_return_minus_one(ENAMETOOLONG); } name_type = msdos_long_to_short (name, name_len, 56b40: 2a00 movel %d0,%d5 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 56b42: 6700 0384 beqw 56ec8 /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 56b46: 42a7 clrl %sp@- if (name_type == MSDOS_NAME_INVALID) { rtems_set_errno_and_return_minus_one(EINVAL); } /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 56b48: 4200 clrb %d0 56b4a: 1d40 ff8c moveb %d0,%fp@(-116) /* set up last write date and time */ time_ret = time(NULL); 56b4e: 4eb9 0005 eab8 jsr 5eab8