=============================================================================== 000448f4 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 448f4: 4e56 ffdc linkw %fp,#-36 448f8: 206e 0008 moveal %fp@(8),%a0 448fc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 44900: 262e 000c movel %fp@(12),%d3 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 )); 44904: 2808 movel %a0,%d4 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 ); 44906: 2c03 movel %d3,%d6 44908: 0684 0000 0052 addil #82,%d4 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 4490e: 47f9 0005 01e2 lea 501e2 ,%a3 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 44914: 49f9 0005 008e lea 5008e ,%a4 return; } puts(""); 4491a: 4bf9 0005 19d8 lea 519d8 ,%a5 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 44920: 2a3c 0005 010c movel #327948,%d5 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 ); 44926: 5286 addql #1,%d6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 44928: 2468 004e moveal %a0@(78),%a2 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 ); 4492c: 6000 00f6 braw 44a24 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 44930: 2f28 0008 movel %a0@(8),%sp@- !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++ ) 44934: 5282 addql #1,%d2 fprintf(stdout, "...." ); 44936: 4879 0006 03b9 pea 603b9 4493c: 4e93 jsr %a3@ !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++ ) 4493e: 508f addql #8,%sp 44940: 6002 bras 44944 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 ); 44942: 4282 clrl %d2 44944: 2079 0006 1c80 moveal 61c80 <_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++ ) 4494a: b682 cmpl %d2,%d3 4494c: 6ce2 bges 44930 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4494e: 2f28 0008 movel %a0@(8),%sp@- 44952: 486a 000c pea %a2@(12) 44956: 4e93 jsr %a3@ rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 44958: 206a 004a moveal %a2@(74),%a0 switch( IMFS_type( the_jnode ) ) { 4495c: 508f addql #8,%sp 4495e: 7206 moveq #6,%d1 44960: 2010 movel %a0@,%d0 44962: 2079 0006 1c80 moveal 61c80 <_impure_ptr>,%a0 44968: b280 cmpl %d0,%d1 4496a: 6500 0086 bcsw 449f2 4496e: 303b 0a08 movew %pc@(44978 ,%d0:l:2),%d0 44972: 48c0 extl %d0 44974: 4efb 0802 jmp %pc@(44978 ,%d0:l) 44978: 000e .short 0x000e <== NOT EXECUTED 4497a: 001e .short 0x001e <== NOT EXECUTED 4497c: 005e .short 0x005e <== NOT EXECUTED 4497e: 005e .short 0x005e <== NOT EXECUTED 44980: 0048 .short 0x0048 <== NOT EXECUTED 44982: 002e .short 0x002e <== NOT EXECUTED 44984: 006a .short 0x006a <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 44986: 2f28 0008 movel %a0@(8),%sp@- 4498a: 2045 moveal %d5,%a0 4498c: 4878 002f pea 2f 44990: 4e90 jsr %a0@ 44992: 508f addql #8,%sp 44994: 6070 bras 44a06 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 44996: 2f2a 0052 movel %a2@(82),%sp@- 4499a: 2f2a 004e movel %a2@(78),%sp@- 4499e: 4879 0006 03be pea 603be 449a4: 600e bras 449b4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 449a6: 2f2a 0056 movel %a2@(86),%sp@- 449aa: 2f2a 0052 movel %a2@(82),%sp@- 449ae: 4879 0006 03d1 pea 603d1 449b4: 2f28 0008 movel %a0@(8),%sp@- 449b8: 4e94 jsr %a4@ 449ba: 4fef 0010 lea %sp@(16),%sp 449be: 6046 bras 44a06 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 449c0: 2f2a 0052 movel %a2@(82),%sp@- 449c4: 4879 0006 03e0 pea 603e0 449ca: 2f28 0008 movel %a0@(8),%sp@- 449ce: 4e94 jsr %a4@ 449d0: 4fef 000c lea %sp@(12),%sp 449d4: 6030 bras 44a06 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 449d6: 2f28 0008 movel %a0@(8),%sp@- 449da: 4879 0006 03ec pea 603ec 449e0: 600a bras 449ec return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 449e2: 2f28 0008 movel %a0@(8),%sp@- 449e6: 4879 0006 0400 pea 60400 449ec: 4e93 jsr %a3@ 449ee: 508f addql #8,%sp 449f0: 601e bras 44a10 return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 449f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 449f4: 4879 0006 0413 pea 60413 <== NOT EXECUTED 449fa: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 449fe: 4e94 jsr %a4@ <== NOT EXECUTED 44a00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44a04: 600a bras 44a10 <== NOT EXECUTED return; } puts(""); 44a06: 4879 0006 0bfa pea 60bfa 44a0c: 4e95 jsr %a5@ 44a0e: 588f addql #4,%sp } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 44a10: 206a 004a moveal %a2@(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 ) ) 44a14: 4a90 tstl %a0@ 44a16: 660a bnes 44a22 IMFS_dump_directory( the_jnode, level + 1 ); 44a18: 2f06 movel %d6,%sp@- 44a1a: 2f0a movel %a2,%sp@- 44a1c: 4eba fed6 jsr %pc@(448f4 ) 44a20: 508f addql #8,%sp 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 ) { 44a22: 2452 moveal %a2@,%a2 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 ); 44a24: b88a cmpl %a2,%d4 44a26: 6600 ff1a bnew 44942 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 44a2a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 44a30: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000498c2 : 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( 498c2: 4280 clrl %d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 498c4: 4e56 ffe4 linkw %fp,#-28 498c8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 498cc: 266e 0008 moveal %fp@(8),%a3 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; 498d0: 286b 0020 moveal %a3@(32),%a4 bool access_ok = rtems_filesystem_eval_path_check_access( 498d4: 302c 003c movew %a4@(60),%d0 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 498d8: 2a6e 0010 moveal %fp@(16),%a5 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( 498dc: 2f00 movel %d0,%sp@- rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 498de: 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( 498e2: 302c 003a movew %a4@(58),%d0 498e6: 2f00 movel %d0,%sp@- 498e8: 2f2c 002e movel %a4@(46),%sp@- 498ec: 4878 0001 pea 1 498f0: 2f0b movel %a3,%sp@- 498f2: 4eb9 0004 a45a jsr 4a45a dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 498f8: 4fef 0014 lea %sp@(20),%sp 498fc: 4a00 tstb %d0 498fe: 6604 bnes 49904 49900: 6000 013c braw 49a3e static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 49904: 7001 moveq #1,%d0 49906: b082 cmpl %d2,%d0 49908: 6610 bnes 4991a 4990a: 722e moveq #46,%d1 4990c: 1015 moveb %a5@,%d0 4990e: b380 eorl %d1,%d0 49910: 4a00 tstb %d0 49912: 57c0 seq %d0 49914: 49c0 extbl %d0 49916: 4480 negl %d0 49918: 6002 bras 4991c 4991a: 4280 clrl %d0 IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 4991c: 0800 0000 btst #0,%d0 49920: 667c bnes 4999e static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 49922: 7602 moveq #2,%d3 49924: b682 cmpl %d2,%d3 49926: 661a bnes 49942 49928: 722e moveq #46,%d1 4992a: 1015 moveb %a5@,%d0 4992c: 49c0 extbl %d0 4992e: b280 cmpl %d0,%d1 49930: 6610 bnes 49942 49932: 102d 0001 moveb %a5@(1),%d0 49936: b380 eorl %d1,%d0 49938: 4a00 tstb %d0 4993a: 57c0 seq %d0 4993c: 49c0 extbl %d0 4993e: 4480 negl %d0 49940: 6002 bras 49944 49942: 4280 clrl %d0 return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { 49944: 0800 0000 btst #0,%d0 49948: 6706 beqs 49950 return dir->Parent; 4994a: 246c 0008 moveal %a4@(8),%a2 4994e: 6046 bras 49996 } 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 ); 49950: 260c movel %a4,%d3 49952: 0683 0000 0052 addil #82,%d3 while ( current != tail ) { IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 49958: 283c 0004 d6ac movel #317100,%d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4995e: 246c 004e moveal %a4@(78),%a2 49962: 602a bras 4998e 49964: 2f02 movel %d2,%sp@- 49966: 2044 moveal %d4,%a0 49968: 2f0d movel %a5,%sp@- 4996a: 486a 000c pea %a2@(12) 4996e: 4e90 jsr %a0@ 49970: 4fef 000c lea %sp@(12),%sp && entry->name [tokenlen] == '\0'; 49974: 4a80 tstl %d0 49976: 660c bnes 49984 49978: 4a32 280c tstb %a2@(0000000c,%d2:l) 4997c: 57c0 seq %d0 4997e: 49c0 extbl %d0 49980: 4480 negl %d0 49982: 6002 bras 49986 49984: 4280 clrl %d0 if ( match ) { 49986: 0800 0000 btst #0,%d0 4998a: 660a bnes 49996 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 4998c: 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 ) { 4998e: b68a cmpl %a2,%d3 49990: 66d2 bnes 49964 49992: 6000 00ae braw 49a42 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 49996: 4a8a tstl %a2 49998: 6606 bnes 499a0 4999a: 6000 00a6 braw 49a42 IMFS_jnode_t *dir, const char *token, size_t tokenlen ) { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { 4999e: 244c moveal %a4,%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; 499a0: 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)) { 499a4: 7602 moveq #2,%d3 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 ); 499a6: 4aab 0004 tstl %a3@(4) 499aa: 57c0 seq %d0 499ac: 2210 movel %a0@,%d1 499ae: 4480 negl %d0 }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config ); } 499b0: 242b 0010 movel %a3@(16),%d2 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 499b4: 42ab 000c clrl %a3@(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)) { 499b8: b681 cmpl %d1,%d3 499ba: 6610 bnes 499cc 499bc: 44c2 movew %d2,%ccr 499be: 6b06 bmis 499c6 499c0: 4a00 tstb %d0 499c2: 6600 0082 bnew 49a46 entry = entry->info.hard_link.link_node; 499c6: 246a 004e moveal %a2@(78),%a2 499ca: 607a bras 49a46 } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 499cc: 7603 moveq #3,%d3 499ce: b681 cmpl %d1,%d3 499d0: 6628 bnes 499fa 499d2: 0802 0004 btst #4,%d2 499d6: 6604 bnes 499dc 499d8: 4a00 tstb %d0 499da: 666a bnes 49a46 const char *target = entry->info.sym_link.name; 499dc: 242a 004e movel %a2@(78),%d2 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 499e0: 2f02 movel %d2,%sp@- 499e2: 4eb9 0004 d690 jsr 4d690 499e8: 2e80 movel %d0,%sp@ 499ea: 2f02 movel %d2,%sp@- 499ec: 2f0b movel %a3,%sp@- 499ee: 4eb9 0004 3c4a jsr 43c4a 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)) { 499f4: 4fef 000c lea %sp@(12),%sp 499f8: 6044 bras 49a3e IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 499fa: 4a81 tstl %d1 499fc: 6648 bnes 49a46 if ( node->info.directory.mt_fs != NULL ) { 499fe: 222a 005a movel %a2@(90),%d1 49a02: 6742 beqs 49a46 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 49a04: 4280 clrl %d0 { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root; 49a06: 2401 movel %d1,%d2 49a08: 0682 0000 0024 addil #36,%d2 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 49a0e: 302a 003c movew %a2@(60),%d0 49a12: 2f00 movel %d0,%sp@- 49a14: 302a 003a movew %a2@(58),%d0 49a18: 2f00 movel %d0,%sp@- 49a1a: 2f2a 002e movel %a2@(46),%sp@- 49a1e: 4878 0001 pea 1 49a22: 2f0b movel %a3,%sp@- 49a24: 4eb9 0004 a45a jsr 4a45a RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 49a2a: 4fef 0014 lea %sp@(20),%sp 49a2e: 4a00 tstb %d0 49a30: 670c beqs 49a3e <== NEVER TAKEN rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 49a32: 2f02 movel %d2,%sp@- 49a34: 2f0b movel %a3,%sp@- 49a36: 4eb9 0004 3bd6 jsr 43bd6 49a3c: 508f addql #8,%sp void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 49a3e: 7001 moveq #1,%d0 49a40: 602c bras 49a6e rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 49a42: 7002 moveq #2,%d0 49a44: 6028 bras 49a6e 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; 49a46: 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; 49a4a: 322c 0032 movew %a4@(50),%d1 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 49a4e: 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; 49a54: 5381 subql #1,%d1 49a56: 3941 0032 movew %d1,%a4@(50) ++entry->reference_count; 49a5a: 322a 0032 movew %a2@(50),%d1 49a5e: 5281 addql #1,%d1 49a60: 3541 0032 movew %d1,%a2@(50) currentloc->node_access = entry; 49a64: 274a 0020 movel %a2,%a3@(32) 49a68: 2768 0004 0028 movel %a0@(4),%a3@(40) status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 49a6e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 49a74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042b6c : static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 42b6c: 4e56 fff8 linkw %fp,#-8 42b70: 206e 0008 moveal %fp@(8),%a0 42b74: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; 42b76: 2468 0018 moveal %a0@(24),%a2 static ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 42b7a: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 42b7c: 2f08 movel %a0,%sp@- 42b7e: 2f2e 0010 movel %fp@(16),%sp@- 42b82: 2f2e 000c movel %fp@(12),%sp@- 42b86: 2f2a 004e movel %a2@(78),%sp@- 42b8a: 4eb9 0004 be68 jsr 4be68 if (err > 0) { 42b90: 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); 42b94: 2400 movel %d0,%d2 if (err > 0) { 42b96: 6f1c bles 42bb4 IMFS_mtime_ctime_update(jnode); 42b98: 42a7 clrl %sp@- 42b9a: 486e fff8 pea %fp@(-8) 42b9e: 4eb9 0004 3b3c jsr 43b3c 42ba4: 202e fff8 movel %fp@(-8),%d0 42ba8: 508f addql #8,%sp 42baa: 2540 0042 movel %d0,%a2@(66) 42bae: 2540 0046 movel %d0,%a2@(70) 42bb2: 6012 bras 42bc6 } IMFS_FIFO_RETURN(err); 42bb4: 4a80 tstl %d0 42bb6: 670e beqs 42bc6 <== NEVER TAKEN 42bb8: 4eb9 0004 db38 jsr 4db38 <__errno> 42bbe: 4482 negl %d2 42bc0: 2040 moveal %d0,%a0 42bc2: 2082 movel %d2,%a0@ 42bc4: 74ff moveq #-1,%d2 } 42bc6: 2002 movel %d2,%d0 42bc8: 242e fff0 movel %fp@(-16),%d2 42bcc: 246e fff4 moveal %fp@(-12),%a2 42bd0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049adc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49adc: 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; 49ae0: 206e 0008 moveal %fp@(8),%a0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49ae4: 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; 49ae8: 2668 0024 moveal %a0@(36),%a3 49aec: 4878 0018 pea 18 49af0: 240e movel %fp,%d2 49af2: 0682 ffff ffe8 addil #-24,%d2 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 ); 49af8: 49f9 0004 25d0 lea 425d0 ,%a4 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); 49afe: 4bf9 0004 22b6 lea 422b6 ,%a5 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; 49b04: 2f0b movel %a3,%sp@- 49b06: 2f02 movel %d2,%sp@- 49b08: 4eb9 0004 cb50 jsr 4cb50 jnode = (IMFS_jnode_t *)loc.node_access; 49b0e: 246e fff0 moveal %fp@(-16),%a2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; 49b12: 4fef 000c lea %sp@(12),%sp 49b16: 42ab 0008 clrl %a3@(8) 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 ); 49b1a: 2642 moveal %d2,%a3 49b1c: 6002 bras 49b20 if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 49b1e: 2440 moveal %d0,%a2 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; 49b20: 242a 0008 movel %a2@(8),%d2 49b24: 206a 004a moveal %a2@(74),%a0 49b28: 2d68 0004 fff8 movel %a0@(4),%fp@(-8) loc.node_access = (void *)jnode; 49b2e: 2d4a fff0 movel %a2,%fp@(-16) IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { 49b32: 4a90 tstl %a0@ 49b34: 660e bnes 49b44 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 49b36: 200a movel %a2,%d0 49b38: 0680 0000 0052 addil #82,%d0 49b3e: b0aa 004e cmpl %a2@(78),%d0 49b42: 6624 bnes 49b68 result = IMFS_rmnod( NULL, &loc ); 49b44: 2f0b movel %a3,%sp@- 49b46: 42a7 clrl %sp@- 49b48: 4e94 jsr %a4@ if ( result != 0 ) 49b4a: 508f addql #8,%sp 49b4c: 4a80 tstl %d0 49b4e: 670c beqs 49b5c <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xdeadbeef ); 49b50: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 49b56: 4eb9 0004 69ec jsr 469ec <== NOT EXECUTED IMFS_node_destroy( jnode ); 49b5c: 2f0a movel %a2,%sp@- 49b5e: 4e95 jsr %a5@ jnode = next; } if ( jnode != NULL ) { 49b60: 588f addql #4,%sp 49b62: 4a82 tstl %d2 49b64: 671e beqs 49b84 49b66: 2442 moveal %d2,%a2 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 49b68: 206a 004a moveal %a2@(74),%a0 if ( IMFS_is_directory( jnode ) ) { 49b6c: 4a90 tstl %a0@ 49b6e: 66b0 bnes 49b20 <== NEVER TAKEN 49b70: 220a movel %a2,%d1 49b72: 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; 49b78: 202a 004e movel %a2@(78),%d0 if ( jnode_has_children( jnode ) ) 49b7c: b280 cmpl %d0,%d1 49b7e: 67a0 beqs 49b20 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 49b80: 4a80 tstl %d0 49b82: 669a bnes 49b1e <== ALWAYS TAKEN } 49b84: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 49b8a: 4e5e unlk %fp ... =============================================================================== 000421b4 : 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] ) { 421b4: 4e56 0000 linkw %fp,#0 421b8: 2f0b movel %a3,%sp@- 421ba: 266e 0008 moveal %fp@(8),%a3 421be: 2f0a movel %a2,%sp@- static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 421c0: 4878 0024 pea 24 421c4: 4878 0001 pea 1 421c8: 4eb9 0004 2818 jsr 42818 if ( fs_info != NULL ) { 421ce: 508f addql #8,%sp ) { static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 421d0: 2440 moveal %d0,%a2 if ( fs_info != NULL ) { 421d2: 4a80 tstl %d0 421d4: 6700 008a beqw 42260 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 421d8: 2039 0005 d2e4 movel 5d2e4 ,%d0 421de: 2480 movel %d0,%a2@ memcpy( 421e0: 4878 001c pea 1c 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++; 421e4: 5280 addql #1,%d0 memcpy( 421e6: 2f2e 0010 movel %fp@(16),%sp@- 421ea: 486a 0008 pea %a2@(8) 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++; 421ee: 23c0 0005 d2e4 movel %d0,5d2e4 memcpy( 421f4: 4eb9 0004 cb50 jsr 4cb50 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 421fa: 42a7 clrl %sp@- 421fc: 4878 41ed pea 41ed 42200: 42a7 clrl %sp@- 42202: 4879 0005 b5fe pea 5b5fe 42208: 2f2a 0008 movel %a2@(8),%sp@- 4220c: 2f0a movel %a2,%sp@- 4220e: 4eb9 0004 977c jsr 4977c "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 42214: 4fef 0024 lea %sp@(36),%sp 42218: 4a80 tstl %d0 4221a: 6736 beqs 42252 <== NEVER TAKEN mt_entry->fs_info = fs_info; 4221c: 274a 0008 movel %a2,%a3@(8) 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; 42220: 2440 moveal %d0,%a2 mt_entry->ops = op_table; 42222: 276e 000c 000c movel %fp@(12),%a3@(12) mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 42228: 223c 0005 b836 movel #374838,%d1 mt_entry->mt_fs_root->location.node_access = root_node; 4222e: 206b 0024 moveal %a3@(36),%a0 42232: 226a 004a moveal %a2@(74),%a1 NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 42236: 2741 002a movel %d1,%a3@(42) 4223a: 2169 0004 0010 movel %a1@(4),%a0@(16) int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 42240: 7210 moveq #16,%d1 ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 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; 42242: 2140 0008 movel %d0,%a0@(8) errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 42246: 2039 0005 c44c movel 5c44c ,%d0 4224c: 307c 0006 moveaw #6,%a0 42250: 601c bras 4226e 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; 42252: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 42258: 720c moveq #12,%d1 <== NOT EXECUTED 4225a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4225c: 2081 movel %d1,%a0@ <== NOT EXECUTED 4225e: 602c bras 4228c <== NOT EXECUTED rv = -1; } } else { errno = ENOMEM; 42260: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 42266: 2440 moveal %d0,%a2 <== NOT EXECUTED 42268: 700c moveq #12,%d0 <== NOT EXECUTED 4226a: 2480 movel %d0,%a2@ <== NOT EXECUTED 4226c: 601e bras 4228c <== NOT EXECUTED /* * 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) { 4226e: b081 cmpl %d1,%d0 42270: 6710 beqs 42282 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 42272: 6d08 blts 4227c 42274: 5388 subql #1,%a0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 42276: d281 addl %d1,%d1 42278: 4a88 tstl %a0 4227a: 66f2 bnes 4226e <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 4227c: 203c 0000 0080 movel #128,%d0 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 42282: 23c0 0005 d2e0 movel %d0,5d2e0 const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; 42288: 4280 clrl %d0 4228a: 6002 bras 4228e if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 4228c: 70ff moveq #-1,%d0 <== NOT EXECUTED IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 4228e: 246e fff8 moveal %fp@(-8),%a2 42292: 266e fffc moveal %fp@(-4),%a3 42296: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043910 : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 43910: 4e56 ff9c linkw %fp,#-100 int rv = 0; mode &= ~rtems_filesystem_umask; 43914: 2079 0006 0378 moveal 60378 ,%a0 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 4391a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ int rv = 0; mode &= ~rtems_filesystem_umask; 4391e: 2428 0008 movel %a0@(8),%d2 43922: 4682 notl %d2 43924: c4ae 000c andl %fp@(12),%d2 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 43928: 266e 0010 moveal %fp@(16),%a3 int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { 4392c: 2002 movel %d2,%d0 4392e: 0280 0000 f000 andil #61440,%d0 43934: 0c80 0000 2000 cmpil #8192,%d0 4393a: 6700 00da beqw 43a16 4393e: 620e bhis 4394e <== ALWAYS TAKEN 43940: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 43946: 6600 00be bnew 43a06 <== NOT EXECUTED 4394a: 6000 00ca braw 43a16 <== NOT EXECUTED 4394e: 0c80 0000 6000 cmpil #24576,%d0 43954: 6700 00c0 beqw 43a16 43958: 0c80 0000 8000 cmpil #32768,%d0 4395e: 6700 00b6 beqw 43a16 43962: 6000 00a2 braw 43a06 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 = 43966: 4878 0078 pea 78 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); 4396a: 260e movel %fp,%d3 4396c: 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 = 43972: 2f2e 0008 movel %fp@(8),%sp@- 43976: 2f03 movel %d3,%sp@- 43978: 4eb9 0004 56de jsr 456de 4397e: 2440 moveal %d0,%a2 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 43980: 2f00 movel %d0,%sp@- 43982: 4eb9 0004 38be jsr 438be 43988: 4fef 0010 lea %sp@(16),%sp 4398c: 4a00 tstb %d0 4398e: 6758 beqs 439e8 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( 43990: 486e ffb4 pea %fp@(-76) if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 43994: 2d6e 0014 ffb4 movel %fp@(20),%fp@(-76) new_node = IMFS_create_node_with_control( 4399a: 2f02 movel %d2,%sp@- 4399c: 2f2e ffd4 movel %fp@(-44),%sp@- 439a0: 2f2e ffd0 movel %fp@(-48),%sp@- 439a4: 2f0b movel %a3,%sp@- 439a6: 2f0a movel %a2,%sp@- 439a8: 4eb9 0004 d8e0 jsr 4d8e0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 439ae: 4fef 0018 lea %sp@(24),%sp 439b2: 4a80 tstl %d0 439b4: 6740 beqs 439f6 IMFS_jnode_t *parent = currentloc->node_access; 439b6: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 439ba: 240e movel %fp,%d2 439bc: 0682 ffff ffac addil #-84,%d2 439c2: 47f9 0004 42e4 lea 442e4 ,%a3 439c8: 42a7 clrl %sp@- 439ca: 2f02 movel %d2,%sp@- 439cc: 4e93 jsr %a3@ 439ce: 256e ffac 0046 movel %fp@(-84),%a2@(70) IMFS_update_mtime( parent ); 439d4: 42a7 clrl %sp@- 439d6: 2f02 movel %d2,%sp@- 439d8: 4282 clrl %d2 439da: 4e93 jsr %a3@ 439dc: 256e ffac 0042 movel %fp@(-84),%a2@(66) 439e2: 4fef 0010 lea %sp@(16),%sp 439e6: 6010 bras 439f8 } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 439e8: 4878 0086 pea 86 439ec: 2f03 movel %d3,%sp@- 439ee: 4eb9 0004 546e jsr 4546e 439f4: 508f addql #8,%sp rv = -1; 439f6: 74ff moveq #-1,%d2 } rtems_filesystem_eval_path_cleanup( &ctx ); 439f8: 486e ffc8 pea %fp@(-56) 439fc: 4eb9 0004 57d0 jsr 457d0 43a02: 588f addql #4,%sp 43a04: 601a bras 43a20 } else { errno = EINVAL; 43a06: 4eb9 0005 0554 jsr 50554 <__errno> rv = -1; 43a0c: 74ff moveq #-1,%d2 rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; 43a0e: 2040 moveal %d0,%a0 43a10: 7016 moveq #22,%d0 43a12: 2080 movel %d0,%a0@ 43a14: 600a bras 43a20 rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 43a16: 7007 moveq #7,%d0 43a18: b093 cmpl %a3@,%d0 43a1a: 6700 ff4a beqw 43966 43a1e: 60e6 bras 43a06 rv = -1; } } return rv; } 43a20: 2002 movel %d2,%d0 43a22: 4cee 0c0c ff9c moveml %fp@(-100),%d2-%d3/%a2-%a3 43a28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b544 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4b544: 4e56 0000 linkw %fp,#0 4b548: 2f0a movel %a2,%sp@- 4b54a: 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 ); 4b54c: 4878 0001 pea 1 if ( *block_entry_ptr ) return 0; 4b550: 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 ); 4b552: 2f2e 000c movel %fp@(12),%sp@- 4b556: 2f2e 0008 movel %fp@(8),%sp@- 4b55a: 4eb9 0004 b204 jsr 4b204 if ( *block_entry_ptr ) 4b560: 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 ); 4b564: 2440 moveal %d0,%a2 if ( *block_entry_ptr ) 4b566: 4a92 tstl %a2@ 4b568: 6610 bnes 4b57a return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); 4b56a: 4eb9 0004 b1e0 jsr 4b1e0 if ( !memory ) 4b570: 4a80 tstl %d0 4b572: 6704 beqs 4b578 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 4b574: 2480 movel %d0,%a2@ return 0; 4b576: 6002 bras 4b57a /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; 4b578: 7401 moveq #1,%d2 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } 4b57a: 2002 movel %d2,%d0 4b57c: 242e fff8 movel %fp@(-8),%d2 4b580: 246e fffc moveal %fp@(-4),%a2 4b584: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b6e4 : IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4b6e4: 4280 clrl %d0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4b6e6: 4e56 ffc8 linkw %fp,#-56 4b6ea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b6ee: 182e 000f moveb %fp@(15),%d4 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4b6f2: 2a79 0005 d2e0 moveal 5d2e0 ,%a5 4b6f8: 2a0d movel %a5,%d5 4b6fa: e48d lsrl #2,%d5 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4b6fc: 1d44 fff3 moveb %d4,%fp@(-13) IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4b700: 2805 movel %d5,%d4 4b702: 5284 addql #1,%d4 4b704: 4c05 4800 mulsl %d5,%d4 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 4b708: 242e 0010 movel %fp@(16),%d2 4b70c: 262e 0014 movel %fp@(20),%d3 4b710: 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 ) 4b714: 5284 addql #1,%d4 4b716: 4c05 4800 mulsl %d5,%d4 4b71a: 2a0d movel %a5,%d5 4b71c: 5384 subql #1,%d4 4b71e: 4c05 4800 mulsl %d5,%d4 4b722: 2204 movel %d4,%d1 4b724: 2802 movel %d2,%d4 4b726: 2a03 movel %d3,%d5 4b728: 9a81 subl %d1,%d5 4b72a: 9980 subxl %d0,%d4 4b72c: 6d10 blts 4b73e rtems_set_errno_and_return_minus_one( EFBIG ); 4b72e: 4eb9 0004 c330 jsr 4c330 <__errno> 4b734: 721b moveq #27,%d1 4b736: 2040 moveal %d0,%a0 4b738: 2081 movel %d1,%a0@ 4b73a: 6000 00c4 braw 4b800 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 4b73e: 282a 004e movel %a2@(78),%d4 4b742: 2a2a 0052 movel %a2@(82),%d5 4b746: 2002 movel %d2,%d0 4b748: 2203 movel %d3,%d1 4b74a: 9285 subl %d5,%d1 4b74c: 9184 subxl %d4,%d0 4b74e: 6f00 00e8 blew 4b838 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b752: 49f9 0005 89ec lea 589ec <__divdi3>,%a4 4b758: 2e0d movel %a5,%d7 4b75a: 5bc6 smi %d6 4b75c: 49c6 extbl %d6 4b75e: 2f07 movel %d7,%sp@- 4b760: 2f06 movel %d6,%sp@- 4b762: 2f03 movel %d3,%sp@- 4b764: 2f02 movel %d2,%sp@- 4b766: 4e94 jsr %a4@ 4b768: 4fef 0010 lea %sp@(16),%sp 4b76c: 2641 moveal %d1,%a3 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b76e: 2f07 movel %d7,%sp@- 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); 4b770: 2e3c 0004 cbc0 movel #314304,%d7 /* * 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; 4b776: 2f06 movel %d6,%sp@- 4b778: 2f05 movel %d5,%sp@- 4b77a: 2f04 movel %d4,%sp@- offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4b77c: 2805 movel %d5,%d4 */ 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 = 4b77e: 2a3c 0004 b204 movel #307716,%d5 /* * 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; 4b784: 4e94 jsr %a4@ 4b786: 4fef 0010 lea %sp@(16),%sp offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4b78a: 200d movel %a5,%d0 4b78c: 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; 4b790: 2c01 movel %d1,%d6 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++ ) { 4b792: 2841 moveal %d1,%a4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 4b794: 9880 subl %d0,%d4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 4b796: 4bf9 0004 b544 lea 4b544 ,%a5 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++ ) { 4b79c: 6068 bras 4b806 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 4b79e: 2f0c movel %a4,%sp@- 4b7a0: 2f0a movel %a2,%sp@- 4b7a2: 4e95 jsr %a5@ 4b7a4: 508f addql #8,%sp 4b7a6: 4a80 tstl %d0 4b7a8: 6640 bnes 4b7ea <== NEVER TAKEN if ( zero_fill ) { 4b7aa: 4a2e fff3 tstb %fp@(-13) 4b7ae: 6754 beqs 4b804 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 4b7b0: 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; 4b7b2: 2239 0005 d2e0 movel 5d2e0 ,%d1 4b7b8: 9284 subl %d4,%d1 block_p *block_ptr = 4b7ba: 2045 moveal %d5,%a0 4b7bc: 2f0c movel %a4,%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; 4b7be: 2d41 fff4 movel %d1,%fp@(-12) block_p *block_ptr = 4b7c2: 2f0a movel %a2,%sp@- 4b7c4: 4e90 jsr %a0@ IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 4b7c6: 2f2e fff4 movel %fp@(-12),%sp@- 4b7ca: 2040 moveal %d0,%a0 4b7cc: 42a7 clrl %sp@- 4b7ce: d890 addl %a0@,%d4 4b7d0: 2047 moveal %d7,%a0 4b7d2: 2f04 movel %d4,%sp@- offset = 0; 4b7d4: 4284 clrl %d4 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); 4b7d6: 4e90 jsr %a0@ 4b7d8: 4fef 0018 lea %sp@(24),%sp 4b7dc: 6026 bras 4b804 offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4b7de: 2f0c movel %a4,%sp@- <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4b7e0: 538c subql #1,%a4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4b7e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b7e4: 4e93 jsr %a3@ <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4b7e6: 508f addql #8,%sp <== NOT EXECUTED 4b7e8: 6006 bras 4b7f0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4b7ea: 47f9 0004 b6bc lea 4b6bc ,%a3 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 4b7f0: bc8c cmpl %a4,%d6 <== NOT EXECUTED 4b7f2: 63ea blss 4b7de <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4b7f4: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 4b7fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b7fc: 701c moveq #28,%d0 <== NOT EXECUTED 4b7fe: 2080 movel %d0,%a0@ <== NOT EXECUTED 4b800: 70ff moveq #-1,%d0 4b802: 6036 bras 4b83a 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++ ) { 4b804: 528c addql #1,%a4 4b806: b7cc cmpal %a4,%a3 4b808: 6494 bccs 4b79e /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 4b80a: 47f9 0004 2ae8 lea 42ae8 ,%a3 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4b810: 2542 004e movel %d2,%a2@(78) 4b814: 2543 0052 movel %d3,%a2@(82) IMFS_update_ctime(the_jnode); 4b818: 240e movel %fp,%d2 4b81a: 5182 subql #8,%d2 4b81c: 42a7 clrl %sp@- 4b81e: 2f02 movel %d2,%sp@- 4b820: 4e93 jsr %a3@ 4b822: 256e fff8 0046 movel %fp@(-8),%a2@(70) IMFS_update_mtime(the_jnode); 4b828: 42a7 clrl %sp@- 4b82a: 2f02 movel %d2,%sp@- 4b82c: 4e93 jsr %a3@ 4b82e: 256e fff8 0042 movel %fp@(-8),%a2@(66) return 0; 4b834: 4fef 0010 lea %sp@(16),%sp /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 4b838: 4280 clrl %d0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4b83a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4b840: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b204 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4b204: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4b208: 2239 0005 d2e0 movel 5d2e0 ,%d1 4b20e: e489 lsrl #2,%d1 4b210: 2001 movel %d1,%d0 4b212: 5380 subql #1,%d0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4b214: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4b218: 246e 0008 moveal %fp@(8),%a2 4b21c: 242e 000c movel %fp@(12),%d2 4b220: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4b224: b082 cmpl %d2,%d0 4b226: 6538 bcss 4b260 p = info->indirect; 4b228: 226a 0056 moveal %a2@(86),%a1 if ( malloc_it ) { 4b22c: 4a88 tstl %a0 4b22e: 6724 beqs 4b254 if ( !p ) { 4b230: 4a89 tstl %a1 4b232: 6614 bnes 4b248 p = memfile_alloc_block(); 4b234: 4eb9 0004 b1e0 jsr 4b1e0 if ( !p ) 4b23a: 4a80 tstl %d0 4b23c: 6606 bnes 4b244 <== ALWAYS TAKEN return 0; 4b23e: 91c8 subal %a0,%a0 <== NOT EXECUTED 4b240: 6000 00fc braw 4b33e <== NOT EXECUTED info->indirect = p; 4b244: 2540 0056 movel %d0,%a2@(86) } return &info->indirect[ my_block ]; 4b248: 206a 0056 moveal %a2@(86),%a0 4b24c: e58a lsll #2,%d2 4b24e: d1c2 addal %d2,%a0 4b250: 6000 00ec braw 4b33e } if ( !p ) 4b254: 4a89 tstl %a1 4b256: 67e6 beqs 4b23e <== NEVER TAKEN return 0; return &info->indirect[ my_block ]; 4b258: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4b25c: 6000 00e0 braw 4b33e /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4b260: 2001 movel %d1,%d0 4b262: 5280 addql #1,%d0 4b264: 4c01 0800 mulsl %d1,%d0 4b268: 2240 moveal %d0,%a1 4b26a: 5389 subql #1,%a1 4b26c: b3c2 cmpal %d2,%a1 4b26e: 653a bcss 4b2aa my_block -= FIRST_DOUBLY_INDIRECT; 4b270: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4b272: 202a 005a movel %a2@(90),%d0 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b276: 4c41 2003 remul %d1,%d3,%d2 4b27a: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4b27e: 4a88 tstl %a0 4b280: 671a beqs 4b29c if ( !p ) { 4b282: 4a80 tstl %d0 4b284: 660e bnes 4b294 p = memfile_alloc_block(); 4b286: 4eb9 0004 b1e0 jsr 4b1e0 if ( !p ) 4b28c: 4a80 tstl %d0 4b28e: 67ae beqs 4b23e <== NEVER TAKEN return 0; info->doubly_indirect = p; 4b290: 2540 005a movel %d0,%a2@(90) } p1 = (block_p *)p[ doubly ]; 4b294: 2040 moveal %d0,%a0 4b296: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4b29a: 6068 bras 4b304 } return (block_p *)&p1[ singly ]; } if ( !p ) 4b29c: 4a80 tstl %d0 4b29e: 679e beqs 4b23e <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 4b2a0: 2240 moveal %d0,%a1 4b2a2: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 4b2a6: 6000 008c braw 4b334 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4b2aa: 2600 movel %d0,%d3 4b2ac: 5283 addql #1,%d3 4b2ae: 4c01 3800 mulsl %d1,%d3 4b2b2: 5383 subql #1,%d3 4b2b4: b682 cmpl %d2,%d3 4b2b6: 6586 bcss 4b23e <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4b2b8: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b2ba: 4c41 2003 remul %d1,%d3,%d2 4b2be: 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; 4b2c2: 202a 005e movel %a2@(94),%d0 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; 4b2c6: 4c41 2004 remul %d1,%d4,%d2 4b2ca: 4c41 2002 remul %d1,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4b2ce: 4a88 tstl %a0 4b2d0: 674c beqs 4b31e if ( !p ) { 4b2d2: 4a80 tstl %d0 4b2d4: 6610 bnes 4b2e6 p = memfile_alloc_block(); 4b2d6: 4eb9 0004 b1e0 jsr 4b1e0 if ( !p ) 4b2dc: 4a80 tstl %d0 4b2de: 6700 ff5e beqw 4b23e return 0; info->triply_indirect = p; 4b2e2: 2540 005e movel %d0,%a2@(94) } p1 = (block_p *) p[ triply ]; 4b2e6: 2040 moveal %d0,%a0 4b2e8: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4b2ec: 2012 movel %a2@,%d0 if ( !p1 ) { 4b2ee: 660e bnes 4b2fe p1 = memfile_alloc_block(); 4b2f0: 4eb9 0004 b1e0 jsr 4b1e0 if ( !p1 ) 4b2f6: 4a80 tstl %d0 4b2f8: 6700 ff44 beqw 4b23e return 0; p[ triply ] = (block_p) p1; 4b2fc: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4b2fe: 2240 moveal %d0,%a1 4b300: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2 4b304: 2012 movel %a2@,%d0 if ( !p2 ) { 4b306: 660e bnes 4b316 p2 = memfile_alloc_block(); 4b308: 4eb9 0004 b1e0 jsr 4b1e0 if ( !p2 ) 4b30e: 4a80 tstl %d0 4b310: 6700 ff2c beqw 4b23e return 0; p1[ doubly ] = (block_p) p2; 4b314: 2480 movel %d0,%a2@ } return (block_p *)&p2[ singly ]; 4b316: 2240 moveal %d0,%a1 4b318: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 4b31c: 6020 bras 4b33e } if ( !p ) 4b31e: 4a80 tstl %d0 4b320: 6700 ff1c beqw 4b23e return 0; p1 = (block_p *) p[ triply ]; 4b324: 2240 moveal %d0,%a1 4b326: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4b32a: 4a88 tstl %a0 4b32c: 6700 ff10 beqw 4b23e return 0; p2 = (block_p *)p1[ doubly ]; 4b330: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 if ( !p2 ) 4b334: 4a88 tstl %a0 4b336: 6700 ff06 beqw 4b23e return 0; return (block_p *)&p2[ singly ]; 4b33a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 /* * This means the requested block number is out of range. */ return 0; } 4b33e: 2008 movel %a0,%d0 4b340: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4b346: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b34a : * 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 ) { 4b34a: 7005 moveq #5,%d0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4b34c: 4e56 ffd0 linkw %fp,#-48 4b350: 226e 0018 moveal %fp@(24),%a1 4b354: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b358: 246e 0008 moveal %fp@(8),%a2 4b35c: 266e 0014 moveal %fp@(20),%a3 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 4b360: 206a 004a moveal %a2@(74),%a0 4b364: 242e 000c movel %fp@(12),%d2 4b368: 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 ) { 4b36c: b090 cmpl %a0@,%d0 4b36e: 6654 bnes 4b3c4 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4b370: 2a49 moveal %a1,%a5 4b372: 99cc subal %a4,%a4 4b374: 282a 004e movel %a2@(78),%d4 4b378: 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; 4b37c: 206a 0056 moveal %a2@(86),%a0 if (my_length > (the_jnode->info.linearfile.size - start)) 4b380: 2004 movel %d4,%d0 4b382: 2205 movel %d5,%d1 4b384: 2c0c movel %a4,%d6 4b386: 2e0d movel %a5,%d7 4b388: 9283 subl %d3,%d1 4b38a: 9182 subxl %d2,%d0 4b38c: 9e81 subl %d1,%d7 4b38e: 9d80 subxl %d0,%d6 4b390: 6f06 bles 4b398 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4b392: 2805 movel %d5,%d4 4b394: 9883 subl %d3,%d4 4b396: 6002 bras 4b39a /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4b398: 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); 4b39a: 2f04 movel %d4,%sp@- 4b39c: 4870 3800 pea %a0@(00000000,%d3:l) 4b3a0: 2f0b movel %a3,%sp@- 4b3a2: 4eb9 0004 cb50 jsr 4cb50 IMFS_update_atime( the_jnode ); 4b3a8: 42a7 clrl %sp@- 4b3aa: 486e fff8 pea %fp@(-8) 4b3ae: 4eb9 0004 2ae8 jsr 42ae8 4b3b4: 256e fff8 003e movel %fp@(-8),%a2@(62) return my_length; 4b3ba: 2004 movel %d4,%d0 4b3bc: 4fef 0014 lea %sp@(20),%sp 4b3c0: 6000 012c braw 4b4ee /* * 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; 4b3c4: 2c09 movel %a1,%d6 4b3c6: dc83 addl %d3,%d6 if ( last_byte > the_jnode->info.file.size ) 4b3c8: 2a06 movel %d6,%d5 4b3ca: 4284 clrl %d4 4b3cc: 202a 004e movel %a2@(78),%d0 4b3d0: 222a 0052 movel %a2@(82),%d1 4b3d4: 2c04 movel %d4,%d6 4b3d6: 2e05 movel %d5,%d7 4b3d8: 9e81 subl %d1,%d7 4b3da: 9d80 subxl %d0,%d6 4b3dc: 6f06 bles 4b3e4 my_length = the_jnode->info.file.size - start; 4b3de: 2c01 movel %d1,%d6 4b3e0: 9c83 subl %d3,%d6 4b3e2: 6002 bras 4b3e6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4b3e4: 2c09 movel %a1,%d6 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4b3e6: 2879 0005 d2e0 moveal 5d2e0 ,%a4 4b3ec: 2a0c movel %a4,%d5 4b3ee: 5bc4 smi %d4 4b3f0: 49c4 extbl %d4 4b3f2: 2f05 movel %d5,%sp@- 4b3f4: 2f04 movel %d4,%sp@- 4b3f6: 2f03 movel %d3,%sp@- 4b3f8: 2f02 movel %d2,%sp@- 4b3fa: 4eb9 0005 8e4c jsr 58e4c <__moddi3> 4b400: 4fef 0010 lea %sp@(16),%sp 4b404: 2e01 movel %d1,%d7 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b406: 2f05 movel %d5,%sp@- 4b408: 2f04 movel %d4,%sp@- 4b40a: 2f03 movel %d3,%sp@- 4b40c: 2f02 movel %d2,%sp@- 4b40e: 4eb9 0005 89ec jsr 589ec <__divdi3> 4b414: 4fef 0010 lea %sp@(16),%sp 4b418: 2601 movel %d1,%d3 if ( start_offset ) { 4b41a: 4a87 tstl %d7 4b41c: 673c beqs 4b45a to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4b41e: 99c7 subal %d7,%a4 4b420: 2406 movel %d6,%d2 4b422: b9c6 cmpal %d6,%a4 4b424: 6402 bccs 4b428 4b426: 240c movel %a4,%d2 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b428: 42a7 clrl %sp@- 4b42a: 2f03 movel %d3,%sp@- 4b42c: 2f0a movel %a2,%sp@- 4b42e: 4eb9 0004 b204 jsr 4b204 if ( !block_ptr ) 4b434: 4fef 000c lea %sp@(12),%sp 4b438: 4a80 tstl %d0 4b43a: 6700 00b0 beqw 4b4ec return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4b43e: 2f02 movel %d2,%sp@- 4b440: 2040 moveal %d0,%a0 4b442: de90 addl %a0@,%d7 dest += to_copy; block++; 4b444: 5283 addql #1,%d3 my_length -= to_copy; 4b446: 9c82 subl %d2,%d6 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 ); 4b448: 2f07 movel %d7,%sp@- 4b44a: 2f0b movel %a3,%sp@- dest += to_copy; 4b44c: d7c2 addal %d2,%a3 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 ); 4b44e: 4eb9 0004 cb50 jsr 4cb50 dest += to_copy; block++; my_length -= to_copy; 4b454: 4fef 000c lea %sp@(12),%sp 4b458: 6002 bras 4b45c */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4b45a: 4282 clrl %d2 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b45c: 2839 0005 d2e0 movel 5d2e0 ,%d4 * is considered an error. Read from an offset for more bytes than * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( 4b462: 97c2 subal %d2,%a3 /* * 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 ); 4b464: 49f9 0004 b204 lea 4b204 ,%a4 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b46a: 4bf9 0004 cb50 lea 4cb50 ,%a5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b470: 6026 bras 4b498 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b472: 42a7 clrl %sp@- 4b474: 2f03 movel %d3,%sp@- 4b476: 2f0a movel %a2,%sp@- 4b478: 4e94 jsr %a4@ if ( !block_ptr ) 4b47a: 4fef 000c lea %sp@(12),%sp 4b47e: 4a80 tstl %d0 4b480: 6602 bnes 4b484 <== ALWAYS TAKEN 4b482: 6038 bras 4b4bc <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b484: 2040 moveal %d0,%a0 dest += to_copy; block++; 4b486: 5283 addql #1,%d3 my_length -= to_copy; 4b488: 9c84 subl %d4,%d6 copied += to_copy; 4b48a: d484 addl %d4,%d2 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 ); 4b48c: 2f04 movel %d4,%sp@- 4b48e: 2f10 movel %a0@,%sp@- 4b490: 2f05 movel %d5,%sp@- 4b492: 4e95 jsr %a5@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b494: 4fef 000c lea %sp@(12),%sp * is considered an error. Read from an offset for more bytes than * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( 4b498: 2a0b movel %a3,%d5 4b49a: da82 addl %d2,%d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b49c: bcb9 0005 d2e0 cmpl 5d2e0 ,%d6 4b4a2: 64ce bccs 4b472 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4b4a4: 4a86 tstl %d6 4b4a6: 672c beqs 4b4d4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b4a8: 42a7 clrl %sp@- 4b4aa: 2f03 movel %d3,%sp@- 4b4ac: 2f0a movel %a2,%sp@- 4b4ae: 4eb9 0004 b204 jsr 4b204 if ( !block_ptr ) 4b4b4: 4fef 000c lea %sp@(12),%sp 4b4b8: 4a80 tstl %d0 4b4ba: 6604 bnes 4b4c0 <== ALWAYS TAKEN return copied; 4b4bc: 2002 movel %d2,%d0 <== NOT EXECUTED 4b4be: 602e bras 4b4ee <== NOT EXECUTED memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4b4c0: 2040 moveal %d0,%a0 copied += my_length; 4b4c2: d486 addl %d6,%d2 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 ); 4b4c4: 2f06 movel %d6,%sp@- 4b4c6: 2f10 movel %a0@,%sp@- 4b4c8: 2f05 movel %d5,%sp@- 4b4ca: 4eb9 0004 cb50 jsr 4cb50 copied += my_length; 4b4d0: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4b4d4: 42a7 clrl %sp@- 4b4d6: 486e fff8 pea %fp@(-8) 4b4da: 4eb9 0004 2ae8 jsr 42ae8 4b4e0: 256e fff8 003e movel %fp@(-8),%a2@(62) return copied; 4b4e6: 2002 movel %d2,%d0 4b4e8: 508f addql #8,%sp 4b4ea: 6002 bras 4b4ee 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; 4b4ec: 4280 clrl %d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4b4ee: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4b4f4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b5e6 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4b5e6: 4e56 ffe4 linkw %fp,#-28 4b5ea: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%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; 4b5ee: 2439 0005 d2e0 movel 5d2e0 ,%d2 4b5f4: e48a lsrl #2,%d2 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4b5f6: 246e 0008 moveal %fp@(8),%a2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4b5fa: 4aaa 0056 tstl %a2@(86) 4b5fe: 670c beqs 4b60c memfile_free_blocks_in_table( &info->indirect, to_free ); 4b600: 2f02 movel %d2,%sp@- 4b602: 486a 0056 pea %a2@(86) 4b606: 4eba ff9a jsr %pc@(4b5a2 ) 4b60a: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4b60c: 4aaa 005a tstl %a2@(90) 4b610: 661c bnes 4b62e 4b612: 6038 bras 4b64c * 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( 4b614: 2003 movel %d3,%d0 4b616: e588 lsll #2,%d0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4b618: 206a 005a moveal %a2@(90),%a0 4b61c: d1c0 addal %d0,%a0 4b61e: 4a90 tstl %a0@ 4b620: 6708 beqs 4b62a <== NEVER TAKEN memfile_free_blocks_in_table( 4b622: 2f02 movel %d2,%sp@- 4b624: 2f08 movel %a0,%sp@- 4b626: 4e93 jsr %a3@ 4b628: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 4b62e: 4283 clrl %d3 for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4b630: 47fa ff70 lea %pc@(4b5a2 ),%a3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 4b63a: e488 lsrl #2,%d0 4b63c: b083 cmpl %d3,%d0 4b63e: 62d4 bhis 4b614 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 ); 4b640: 2f02 movel %d2,%sp@- 4b642: 486a 005a pea %a2@(90) 4b646: 4eba ff5a jsr %pc@(4b5a2 ) 4b64a: 508f addql #8,%sp } if ( info->triply_indirect ) { 4b64c: 4283 clrl %d3 p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j),%a3 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4b652: 4aaa 005e tstl %a2@(94) 4b656: 6640 bnes 4b698 4b658: 6056 bras 4b6b0 * 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( 4b65a: 2c03 movel %d3,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b65c: 206a 005e moveal %a2@(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( 4b660: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b662: 2a30 6800 movel %a0@(00000000,%d6:l),%d5 if ( !p ) /* ensure we have a valid pointer */ 4b666: 673c beqs 4b6a4 <== NEVER TAKEN 4b668: 4284 clrl %d4 4b66a: 6012 bras 4b67e break; for ( j=0 ; j <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4b674: 2f02 movel %d2,%sp@- 4b676: 2f08 movel %a0,%sp@- 4b678: 4e93 jsr %a3@ 4b67a: 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,%d0 4b684: e488 lsrl #2,%d0 4b686: b084 cmpl %d4,%d0 4b688: 62e2 bhis 4b66c if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4b68a: 2f02 movel %d2,%sp@- 4b68c: dcaa 005e addl %a2@(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,%d0 4b69e: e488 lsrl #2,%d0 4b6a0: b083 cmpl %d3,%d0 4b6a2: 62b6 bhis 4b65a } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4b6a4: 2f02 movel %d2,%sp@- 4b6a6: 486a 005e pea %a2@(94) 4b6aa: 4eba fef6 jsr %pc@(4b5a2 ) 4b6ae: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 4b6b0: 200a movel %a2,%d0 4b6b2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4b6b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b6bc : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4b6bc: 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 ); 4b6c0: 42a7 clrl %sp@- <== NOT EXECUTED 4b6c2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b6c6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4b6ca: 4eb9 0004 b204 jsr 4b204 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 4b6d0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6d2: 2210 movel %a0@,%d1 <== NOT EXECUTED *block_ptr = 0; 4b6d4: 4290 clrl %a0@ <== NOT EXECUTED memfile_free_block( ptr ); 4b6d6: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b6d8: 4eb9 0004 b588 jsr 4b588 <== NOT EXECUTED return 1; } 4b6de: 7001 moveq #1,%d0 <== NOT EXECUTED 4b6e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b844 : * 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 ) { 4b844: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4b846: 4e56 ffd4 linkw %fp,#-44 /* * 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; 4b84a: 206e 0010 moveal %fp@(16),%a0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4b84e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4b852: 2c2e 0018 movel %fp@(24),%d6 /* * 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; 4b856: d1c6 addal %d6,%a0 if ( last_byte > the_jnode->info.file.size ) { 4b858: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4b85a: 246e 0008 moveal %fp@(8),%a2 4b85e: 2e2e 0014 movel %fp@(20),%d7 * 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 ) { 4b862: 282a 004e movel %a2@(78),%d4 4b866: 2a2a 0052 movel %a2@(82),%d5 4b86a: 2400 movel %d0,%d2 4b86c: 2601 movel %d1,%d3 4b86e: 9685 subl %d5,%d3 4b870: 9584 subxl %d4,%d2 4b872: 6e44 bgts 4b8b8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4b874: 2879 0005 d2e0 moveal 5d2e0 ,%a4 4b87a: 2a0c movel %a4,%d5 4b87c: 5bc4 smi %d4 4b87e: 49c4 extbl %d4 4b880: 2f05 movel %d5,%sp@- 4b882: 2f04 movel %d4,%sp@- 4b884: 2f2e 0010 movel %fp@(16),%sp@- 4b888: 2f2e 000c movel %fp@(12),%sp@- 4b88c: 4eb9 0005 8e4c jsr 58e4c <__moddi3> 4b892: 4fef 0010 lea %sp@(16),%sp 4b896: 2641 moveal %d1,%a3 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b898: 2f05 movel %d5,%sp@- 4b89a: 2f04 movel %d4,%sp@- 4b89c: 2f2e 0010 movel %fp@(16),%sp@- 4b8a0: 2f2e 000c movel %fp@(12),%sp@- 4b8a4: 4eb9 0005 89ec jsr 589ec <__divdi3> 4b8aa: 4fef 0010 lea %sp@(16),%sp 4b8ae: 2601 movel %d1,%d3 if ( start_offset ) { 4b8b0: 4a8b tstl %a3 4b8b2: 6632 bnes 4b8e6 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); if ( status ) return status; } copied = 0; 4b8b4: 4282 clrl %d2 4b8b6: 6068 bras 4b920 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 ); 4b8b8: 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; 4b8ba: b8ae 000c cmpl %fp@(12),%d4 4b8be: 6608 bnes 4b8c8 <== NEVER TAKEN 4b8c0: baae 0010 cmpl %fp@(16),%d5 4b8c4: 55c4 scs %d4 4b8c6: 6002 bras 4b8ca 4b8c8: 5dc4 slt %d4 <== NOT EXECUTED status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4b8ca: 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; 4b8cc: 49c4 extbl %d4 status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 4b8ce: 4484 negl %d4 4b8d0: 2f04 movel %d4,%sp@- 4b8d2: 2f0a movel %a2,%sp@- 4b8d4: 4eb9 0004 b6e4 jsr 4b6e4 if ( status ) 4b8da: 4fef 0010 lea %sp@(16),%sp 4b8de: 4a80 tstl %d0 4b8e0: 6792 beqs 4b874 4b8e2: 6000 00d0 braw 4b9b4 * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 4b8e6: 240c movel %a4,%d2 4b8e8: 948b subl %a3,%d2 4b8ea: bc82 cmpl %d2,%d6 4b8ec: 6402 bccs 4b8f0 4b8ee: 2406 movel %d6,%d2 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b8f0: 42a7 clrl %sp@- 4b8f2: 2f03 movel %d3,%sp@- 4b8f4: 2f0a movel %a2,%sp@- 4b8f6: 4eb9 0004 b204 jsr 4b204 if ( !block_ptr ) 4b8fc: 4fef 000c lea %sp@(12),%sp 4b900: 4a80 tstl %d0 4b902: 6700 00aa beqw 4b9ae block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b906: 2f02 movel %d2,%sp@- 4b908: 2040 moveal %d0,%a0 src += to_copy; block++; 4b90a: 5283 addql #1,%d3 my_length -= to_copy; 4b90c: 9c82 subl %d2,%d6 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b90e: 2f07 movel %d7,%sp@- 4b910: d7d0 addal %a0@,%a3 src += to_copy; 4b912: de82 addl %d2,%d7 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b914: 2f0b movel %a3,%sp@- 4b916: 4eb9 0004 cb50 jsr 4cb50 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b91c: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b920: 2839 0005 d2e0 movel 5d2e0 ,%d4 * 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( 4b926: 9e82 subl %d2,%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 ); 4b928: 47f9 0004 b204 lea 4b204 ,%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 ); 4b92e: 49f9 0004 cb50 lea 4cb50 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b934: 6024 bras 4b95a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b936: 42a7 clrl %sp@- 4b938: 2f03 movel %d3,%sp@- 4b93a: 2f0a movel %a2,%sp@- 4b93c: 4e93 jsr %a3@ if ( !block_ptr ) 4b93e: 4fef 000c lea %sp@(12),%sp 4b942: 4a80 tstl %d0 4b944: 676c beqs 4b9b2 <== NEVER TAKEN 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 ); 4b946: 2f04 movel %d4,%sp@- 4b948: 2040 moveal %d0,%a0 src += to_copy; block++; 4b94a: 5283 addql #1,%d3 my_length -= to_copy; 4b94c: 9c84 subl %d4,%d6 * 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( 4b94e: d484 addl %d4,%d2 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 ); 4b950: 2f05 movel %d5,%sp@- 4b952: 2f10 movel %a0@,%sp@- 4b954: 4e94 jsr %a4@ * 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( 4b956: 4fef 000c lea %sp@(12),%sp 4b95a: 2a07 movel %d7,%d5 4b95c: da82 addl %d2,%d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b95e: bcb9 0005 d2e0 cmpl 5d2e0 ,%d6 4b964: 64d0 bccs 4b936 * 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 ) { 4b966: 4a86 tstl %d6 4b968: 6728 beqs 4b992 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b96a: 42a7 clrl %sp@- 4b96c: 2f03 movel %d3,%sp@- 4b96e: 2f0a movel %a2,%sp@- 4b970: 4eb9 0004 b204 jsr 4b204 if ( !block_ptr ) 4b976: 4fef 000c lea %sp@(12),%sp 4b97a: 4a80 tstl %d0 4b97c: 6734 beqs 4b9b2 <== NEVER TAKEN 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 ); 4b97e: 2f06 movel %d6,%sp@- 4b980: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4b982: d486 addl %d6,%d2 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 ); 4b984: 2f05 movel %d5,%sp@- 4b986: 2f10 movel %a0@,%sp@- 4b988: 4eb9 0004 cb50 jsr 4cb50 my_length = 0; copied += to_copy; 4b98e: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4b992: 42a7 clrl %sp@- 4b994: 486e fff8 pea %fp@(-8) 4b998: 4eb9 0004 2ae8 jsr 42ae8 4b99e: 202e fff8 movel %fp@(-8),%d0 return copied; 4b9a2: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4b9a4: 2540 0042 movel %d0,%a2@(66) 4b9a8: 2540 0046 movel %d0,%a2@(70) 4b9ac: 6004 bras 4b9b2 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; 4b9ae: 4280 clrl %d0 <== NOT EXECUTED 4b9b0: 6002 bras 4b9b4 <== NOT EXECUTED 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 ) 4b9b2: 2002 movel %d2,%d0 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4b9b4: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 4b9ba: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000423b0 : const char *name, size_t namelen, mode_t mode, dev_t dev ) { 423b0: 4e56 ffd8 linkw %fp,#-40 423b4: 226e 0018 moveal %fp@(24),%a1 423b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 423bc: 242e 0014 movel %fp@(20),%d2 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 423c0: 2002 movel %d2,%d0 423c2: 0280 0000 f000 andil #61440,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 423c8: 246e 0008 moveal %fp@(8),%a2 423cc: 206e 001c moveal %fp@(28),%a0 dev_t dev, IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { 423d0: 0c80 0000 4000 cmpil #16384,%d0 423d6: 672e beqs 42406 *type = IMFS_DIRECTORY; } else if ( S_ISREG( mode ) ) { 423d8: 0c80 0000 8000 cmpil #32768,%d0 423de: 672a beqs 4240a *type = IMFS_MEMORY_FILE; } else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) { 423e0: 0c80 0000 6000 cmpil #24576,%d0 423e6: 6708 beqs 423f0 423e8: 0c80 0000 2000 cmpil #8192,%d0 423ee: 660c bnes 423fc *type = IMFS_DEVICE; rtems_filesystem_split_dev_t( 423f0: 2d49 ffec movel %a1,%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; 423f4: 7201 moveq #1,%d1 rtems_filesystem_split_dev_t( 423f6: 2d48 fff0 movel %a0,%fp@(-16) 423fa: 6014 bras 42410 dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { 423fc: 0c80 0000 1000 cmpil #4096,%d0 42402: 660c bnes 42410 <== NEVER TAKEN 42404: 6008 bras 4240e IMFS_jnode_types_t *type, IMFS_types_union *info ) { if ( S_ISDIR( mode ) ) { *type = IMFS_DIRECTORY; 42406: 4281 clrl %d1 42408: 6006 bras 42410 } else if ( S_ISREG( mode ) ) { *type = IMFS_MEMORY_FILE; 4240a: 7204 moveq #4,%d1 4240c: 6002 bras 42410 dev, info->device.major, info->device.minor ); } else if (S_ISFIFO( mode )) { *type = IMFS_FIFO; 4240e: 7206 moveq #6,%d1 42410: 486e ffec pea %fp@(-20) 42414: 2f02 movel %d2,%sp@- 42416: 2f2e 0010 movel %fp@(16),%sp@- 4241a: 2f2e 000c movel %fp@(12),%sp@- size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 4241e: 206a 0014 moveal %a2@(20),%a0 (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 42422: 2068 0008 moveal %a0@(8),%a0 42426: 2f30 1c08 movel %a0@(00000008,%d1:l:4),%sp@- 4242a: 2f0a movel %a2,%sp@- 4242c: 4eb9 0004 9844 jsr 49844 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 ) { 42432: 4fef 0018 lea %sp@(24),%sp 42436: 4a80 tstl %d0 42438: 6732 beqs 4246c IMFS_jnode_t *parent = parentloc->node_access; 4243a: 246a 0008 moveal %a2@(8),%a2 IMFS_update_ctime( parent ); 4243e: 240e movel %fp,%d2 42440: 0682 ffff ffe4 addil #-28,%d2 42446: 47f9 0004 2ae8 lea 42ae8 ,%a3 4244c: 42a7 clrl %sp@- 4244e: 2f02 movel %d2,%sp@- 42450: 4e93 jsr %a3@ 42452: 256e ffe4 0046 movel %fp@(-28),%a2@(70) IMFS_update_mtime( parent ); 42458: 42a7 clrl %sp@- 4245a: 2f02 movel %d2,%sp@- 4245c: 4e93 jsr %a3@ 4245e: 256e ffe4 0042 movel %fp@(-28),%a2@(66) 42464: 4fef 0010 lea %sp@(16),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 42468: 4280 clrl %d0 4246a: 6002 bras 4246e IMFS_jnode_t *parent = parentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 4246c: 70ff moveq #-1,%d0 } return rv; } 4246e: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3 42474: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042478 : #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42478: 4e56 0000 linkw %fp,#0 4247c: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 42480: 2069 0020 moveal %a1@(32),%a0 42484: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42488: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 4248a: 2468 004a moveal %a0@(74),%a2 4248e: 4a92 tstl %a2@ 42490: 661c bnes 424ae if ( node->info.directory.mt_fs == NULL ) { 42492: 4aa8 005a tstl %a0@(90) 42496: 6608 bnes 424a0 <== NEVER TAKEN node->info.directory.mt_fs = mt_entry; 42498: 2149 005a movel %a1,%a0@(90) #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 4249c: 4280 clrl %d0 4249e: 601c bras 424bc if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 424a0: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 424a6: 7210 moveq #16,%d1 <== NOT EXECUTED 424a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 424aa: 2081 movel %d1,%a0@ <== NOT EXECUTED 424ac: 600c bras 424ba <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 424ae: 4eb9 0004 c330 jsr 4c330 <__errno> 424b4: 2440 moveal %d0,%a2 424b6: 7014 moveq #20,%d0 424b8: 2480 movel %d0,%a2@ rv = -1; 424ba: 70ff moveq #-1,%d0 } return rv; } 424bc: 246e fffc moveal %fp@(-4),%a2 424c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c42 : } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 49c42: 4e56 0000 linkw %fp,#0 49c46: 202e 0008 movel %fp@(8),%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 49c4a: 2200 movel %d0,%d1 49c4c: 0681 0000 0052 addil #82,%d1 if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 49c52: 2040 moveal %d0,%a0 49c54: b2a8 004e cmpl %a0@(78),%d1 49c58: 670e beqs 49c68 errno = ENOTEMPTY; 49c5a: 4eb9 0004 c330 jsr 4c330 <__errno> 49c60: 725a moveq #90,%d1 49c62: 2040 moveal %d0,%a0 49c64: 2081 movel %d1,%a0@ 49c66: 6014 bras 49c7c node = NULL; } else if ( IMFS_is_mount_point( node ) ) { 49c68: 2040 moveal %d0,%a0 49c6a: 4aa8 005a tstl %a0@(90) 49c6e: 670e beqs 49c7e <== ALWAYS TAKEN errno = EBUSY; 49c70: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 49c76: 2040 moveal %d0,%a0 <== NOT EXECUTED 49c78: 7010 moveq #16,%d0 <== NOT EXECUTED 49c7a: 2080 movel %d0,%a0@ <== NOT EXECUTED 49c7c: 4280 clrl %d0 node = NULL; } return node; } 49c7e: 4e5e unlk %fp ... =============================================================================== 000424c4 : { 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 ) { 424c4: 7202 moveq #2,%d1 #include "imfs.h" rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { 424c6: 4e56 0000 linkw %fp,#0 const IMFS_jnode_t *node = loc->node_access; 424ca: 206e 0008 moveal %fp@(8),%a0 424ce: 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; 424d2: 2268 004a moveal %a0@(74),%a1 424d6: 2011 movel %a1@,%d0 IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 424d8: b280 cmpl %d0,%d1 424da: 670c beqs 424e8 424dc: 123c 0005 moveb #5,%d1 424e0: b280 cmpl %d0,%d1 424e2: 660e bnes 424f2 <== ALWAYS TAKEN case IMFS_HARD_LINK: type = IMFS_type( node->info.hard_link.link_node ); break; case IMFS_LINEAR_FILE: type = RTEMS_FILESYSTEM_MEMORY_FILE; 424e4: 7004 moveq #4,%d0 <== NOT EXECUTED 424e6: 600a bras 424f2 <== NOT EXECUTED type = imfs_type; break; } return type; } 424e8: 2068 004e moveal %a0@(78),%a0 424ec: 2068 004a moveal %a0@(74),%a0 424f0: 2010 movel %a0@,%d0 424f2: 4e5e unlk %fp ... =============================================================================== 0004252c : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 4252c: 4e56 ffec linkw %fp,#-20 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42530: 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 ) { 42534: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 42538: 2468 0008 moveal %a0@(8),%a2 IMFS_jnode_t *new_parent = newparentloc->node_access; 4253c: 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 ) { 42540: 242e 0018 movel %fp@(24),%d2 int rv = 0; IMFS_jnode_t *node = oldloc->node_access; IMFS_jnode_t *new_parent = newparentloc->node_access; 42544: 2668 0008 moveal %a0@(8),%a3 /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 42548: 4aaa 0008 tstl %a2@(8) 4254c: 6768 beqs 425b6 <== NEVER TAKEN if ( namelen < IMFS_NAME_MAX ) { 4254e: 701f moveq #31,%d0 42550: b082 cmpl %d2,%d0 42552: 6554 bcss 425a8 <== NEVER TAKEN memcpy( node->name, name, namelen ); 42554: 2f02 movel %d2,%sp@- 42556: 2f2e 0014 movel %fp@(20),%sp@- 4255a: 486a 000c pea %a2@(12) 4255e: 4eb9 0004 cb50 jsr 4cb50 node->name [namelen] = '\0'; 42564: 4200 clrb %d0 42566: 1580 280c moveb %d0,%a2@(0000000c,%d2:l) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4256a: 2252 moveal %a2@,%a1 previous = the_node->previous; 4256c: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 42570: 2348 0004 movel %a0,%a1@(4) previous->next = next; 42574: 2089 movel %a1,%a0@ Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 42576: 206b 0056 moveal %a3@(86),%a0 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 4257a: 43eb 0052 lea %a3@(82),%a1 static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 4257e: 254b 0008 movel %a3,%a2@(8) 42582: 2489 movel %a1,%a2@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 42584: 274a 0056 movel %a2,%a3@(86) old_last->next = the_node; 42588: 208a movel %a2,%a0@ the_node->previous = old_last; 4258a: 2548 0004 movel %a0,%a2@(4) IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 4258e: 42a7 clrl %sp@- 42590: 486e fff8 pea %fp@(-8) 42594: 4eb9 0004 2ae8 jsr 42ae8 4259a: 256e fff8 0046 movel %fp@(-8),%a2@(70) 425a0: 4fef 0014 lea %sp@(20),%sp const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 425a4: 4280 clrl %d0 425a6: 601c bras 425c4 IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; 425a8: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 425ae: 725b moveq #91,%d1 <== NOT EXECUTED 425b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 425b2: 2081 movel %d1,%a0@ <== NOT EXECUTED 425b4: 600c bras 425c2 <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 425b6: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 425bc: 2240 moveal %d0,%a1 <== NOT EXECUTED 425be: 7016 moveq #22,%d0 <== NOT EXECUTED 425c0: 2280 movel %d0,%a1@ <== NOT EXECUTED rv = -1; 425c2: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 425c4: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 425ca: 4e5e unlk %fp ... =============================================================================== 00049bac : static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49bac: 4e56 0000 linkw %fp,#0 49bb0: 226e 0008 moveal %fp@(8),%a1 49bb4: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; 49bb6: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_device( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49bba: 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 ); 49bbe: 202a 0052 movel %a2@(82),%d0 49bc2: 216a 004e 0016 movel %a2@(78),%a0@(22) return IMFS_stat( loc, buf ); } 49bc8: 245f moveal %sp@+,%a2 49bca: 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 ); 49bcc: 2140 001a movel %d0,%a0@(26) return IMFS_stat( loc, buf ); 49bd0: 4ef9 0004 9de4 jmp 49de4 ... =============================================================================== 00049dac : static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49dac: 4e56 0000 linkw %fp,#0 49db0: 226e 0008 moveal %fp@(8),%a1 49db4: 2f0a movel %a2,%sp@- const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 49db6: 2469 0008 moveal %a1@(8),%a2 static int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49dba: 206e 000c moveal %fp@(12),%a0 const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 49dbe: 202a 004e movel %a2@(78),%d0 49dc2: 222a 0052 movel %a2@(82),%d1 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 49dc6: 45f9 0005 c44c lea 5c44c ,%a2 49dcc: 2152 003e movel %a2@,%a0@(62) return IMFS_stat( loc, buf ); } 49dd0: 245f moveal %sp@+,%a2 49dd2: 4e5e unlk %fp struct stat *buf ) { const IMFS_jnode_t *node = loc->node_access; buf->st_size = node->info.file.size; 49dd4: 2140 001e movel %d0,%a0@(30) 49dd8: 2141 0022 movel %d1,%a0@(34) buf->st_blksize = imfs_rq_memfile_bytes_per_block; return IMFS_stat( loc, buf ); 49ddc: 4ef9 0004 9de4 jmp 49de4 ... =============================================================================== 000426a8 : #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 426a8: 4e56 0000 linkw %fp,#0 426ac: 226e 0008 moveal %fp@(8),%a1 int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 426b0: 2069 0020 moveal %a1@(32),%a0 426b4: 2068 0008 moveal %a0@(8),%a0 #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 426b8: 2f0a movel %a2,%sp@- int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { 426ba: 2468 004a moveal %a0@(74),%a2 426be: 4a92 tstl %a2@ 426c0: 661c bnes 426de <== NEVER TAKEN if ( node->info.directory.mt_fs == mt_entry ) { 426c2: b3e8 005a cmpal %a0@(90),%a1 426c6: 6608 bnes 426d0 <== NEVER TAKEN node->info.directory.mt_fs = NULL; 426c8: 42a8 005a clrl %a0@(90) #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 426cc: 4280 clrl %d0 426ce: 601c bras 426ec if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 426d0: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 426d6: 7216 moveq #22,%d1 <== NOT EXECUTED 426d8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426da: 2081 movel %d1,%a0@ <== NOT EXECUTED 426dc: 600c bras 426ea <== NOT EXECUTED rv = -1; } } else { errno = ENOTDIR; 426de: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 426e4: 2440 moveal %d0,%a2 <== NOT EXECUTED 426e6: 7014 moveq #20,%d0 <== NOT EXECUTED 426e8: 2480 movel %d0,%a2@ <== NOT EXECUTED rv = -1; 426ea: 70ff moveq #-1,%d0 <== NOT EXECUTED } return rv; } 426ec: 246e fffc moveal %fp@(-4),%a2 426f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ca0 : void RTEMS_Malloc_Initialize( const Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 42ca0: 4e56 fff0 linkw %fp,#-16 42ca4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ Heap_Control *heap = RTEMS_Malloc_Heap; 42ca8: 2639 0005 c40c movel 5c40c ,%d3 if ( !rtems_configuration_get_unified_work_area() ) { 42cae: 4a39 0005 a7f5 tstb 5a7f5 42cb4: 664a bnes 42d00 42cb6: 246e 0008 moveal %fp@(8),%a2 42cba: 4282 clrl %d2 42cbc: 47f9 0004 7304 lea 47304 <_Heap_Initialize>,%a3 42cc2: 601e bras 42ce2 uintptr_t page_size = CPU_HEAP_ALIGNMENT; size_t i; for (i = 0; i < area_count; ++i) { const Heap_Area *area = &areas [i]; uintptr_t space_available = (*init_or_extend)( 42cc4: 4878 0004 pea 4 42cc8: 2f2a 0004 movel %a2@(4),%sp@- 42ccc: 2f12 movel %a2@,%sp@- 42cce: 2f03 movel %d3,%sp@- 42cd0: 4e93 jsr %a3@ area->begin, area->size, page_size ); if ( space_available > 0 ) { 42cd2: 4fef 0010 lea %sp@(16),%sp 42cd6: 4a80 tstl %d0 42cd8: 6704 beqs 42cde <== NEVER TAKEN init_or_extend = extend; 42cda: 266e 0010 moveal %fp@(16),%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) { 42cde: 5282 addql #1,%d2 42ce0: 508a addql #8,%a2 42ce2: b4ae 000c cmpl %fp@(12),%d2 42ce6: 66dc bnes 42cc4 if ( space_available > 0 ) { init_or_extend = extend; } } if ( init_or_extend == _Heap_Initialize ) { 42ce8: b7fc 0004 7304 cmpal #291588,%a3 42cee: 6610 bnes 42d00 _Internal_error_Occurred( 42cf0: 4878 0017 pea 17 42cf4: 4878 0001 pea 1 42cf8: 42a7 clrl %sp@- 42cfa: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred> } /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 42d00: 2079 0005 cab4 moveal 5cab4 ,%a0 42d06: 4a88 tstl %a0 42d08: 6704 beqs 42d0e (*rtems_malloc_statistics_helpers->initialize)(); 42d0a: 2050 moveal %a0@,%a0 42d0c: 4e90 jsr %a0@ } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 42d0e: 2439 0005 daf0 movel 5daf0 ,%d2 42d14: 2f03 movel %d3,%sp@- 42d16: 4eb9 0004 7d20 jsr 47d20 <_Protected_heap_Get_size> 42d1c: 588f addql #4,%sp 42d1e: d082 addl %d2,%d0 } 42d20: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); } MSBUMP( space_available, _Protected_heap_Get_size( heap ) ); 42d26: 23c0 0005 daf0 movel %d0,5daf0 } 42d2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c674 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 5c674: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; static void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 5c676: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 5c67a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 5c67e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 5c682: b08a cmpl %a2,%d0 <== NOT EXECUTED 5c684: 6616 bnes 5c69c <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 5c686: 4ab9 0009 64fc tstl 964fc <== NOT EXECUTED 5c68c: 6700 00fe beqw 5c78c <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 5c690: 47f9 0009 64f8 lea 964f8 ,%a3 <== NOT EXECUTED the_thread = 0; current = 0; 5c696: 4284 clrl %d4 <== 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; 5c698: 95ca subal %a2,%a2 <== NOT EXECUTED 5c69a: 6008 bras 5c6a4 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 5c69c: 282a 00ec movel %a2@(236),%d4 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 5c6a0: 47ea 00ac lea %a2@(172),%a3 <== 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); 5c6a4: 2613 movel %a3@,%d3 <== 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++) 5c6a6: 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); 5c6a8: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 5c6ae: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED 5c6b2: 2408 movel %a0,%d2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 5c6b4: 41e8 0020 lea %a0@(32),%a0 <== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 5c6b8: 0682 0000 0010 addil #16,%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++) 5c6be: c083 andl %d3,%d0 <== NOT EXECUTED 5c6c0: d088 addl %a0,%d0 <== NOT EXECUTED 5c6c2: 600c bras 5c6d0 <== NOT EXECUTED if (*base != U32_PATTERN) 5c6c4: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 5c6ca: b290 cmpl %a0@,%d1 <== NOT EXECUTED 5c6cc: 6608 bnes 5c6d6 <== 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++) 5c6ce: 5888 addql #4,%a0 <== NOT EXECUTED 5c6d0: b088 cmpl %a0,%d0 <== NOT EXECUTED 5c6d2: 62f0 bhis 5c6c4 <== NOT EXECUTED 5c6d4: 600a bras 5c6e0 <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 5c6d6: 4a88 tstl %a0 <== NOT EXECUTED 5c6d8: 6706 beqs 5c6e0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 5c6da: d483 addl %d3,%d2 <== NOT EXECUTED 5c6dc: 9488 subl %a0,%d2 <== NOT EXECUTED 5c6de: 6002 bras 5c6e2 <== NOT EXECUTED else used = 0; 5c6e0: 4282 clrl %d2 <== NOT EXECUTED 5c6e2: 2879 0009 55b8 moveal 955b8 ,%a4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 5c6e8: 4a8a tstl %a2 <== NOT EXECUTED 5c6ea: 672c beqs 5c718 <== NOT EXECUTED #endif { (*print_handler)( 5c6ec: 486e fffb pea %fp@(-5) <== NOT EXECUTED 5c6f0: 4878 0005 pea 5 <== NOT EXECUTED 5c6f4: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 5c6f8: 4eb9 0004 c610 jsr 4c610 <== NOT EXECUTED 5c6fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c700: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 5c704: 4879 0008 cd80 pea 8cd80 <== NOT EXECUTED 5c70a: 2f39 0009 55b4 movel 955b4 ,%sp@- <== NOT EXECUTED 5c710: 4e94 jsr %a4@ <== NOT EXECUTED 5c712: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 5c716: 6016 bras 5c72e <== 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 ); 5c718: 4878 ffff pea ffffffff <== NOT EXECUTED 5c71c: 4879 0008 cd8d pea 8cd8d <== NOT EXECUTED 5c722: 2f39 0009 55b4 movel 955b4 ,%sp@- <== NOT EXECUTED 5c728: 4e94 jsr %a4@ <== NOT EXECUTED 5c72a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 5c72e: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 5c732: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5c734: 2f04 movel %d4,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 5c736: 2013 movel %a3@,%d0 <== NOT EXECUTED 5c738: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 5c73a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 5c73e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5c740: 4879 0008 cd9b pea 8cd9b <== NOT EXECUTED 5c746: 2f39 0009 55b4 movel 955b4 ,%sp@- <== NOT EXECUTED 5c74c: 2079 0009 55b8 moveal 955b8 ,%a0 <== NOT EXECUTED 5c752: 4e90 jsr %a0@ <== NOT EXECUTED 5c754: 2079 0009 55b8 moveal 955b8 ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 5c75a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5c75e: 4ab9 0009 55b0 tstl 955b0 <== NOT EXECUTED 5c764: 6612 bnes 5c778 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 5c766: 4879 0008 cdb9 pea 8cdb9 <== NOT EXECUTED 5c76c: 2f39 0009 55b4 movel 955b4 ,%sp@- <== NOT EXECUTED 5c772: 4e90 jsr %a0@ <== NOT EXECUTED 5c774: 508f addql #8,%sp <== NOT EXECUTED 5c776: 6014 bras 5c78c <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 5c778: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5c77a: 4879 0008 cdc6 pea 8cdc6 <== NOT EXECUTED 5c780: 2f39 0009 55b4 movel 955b4 ,%sp@- <== NOT EXECUTED 5c786: 4e90 jsr %a0@ <== NOT EXECUTED 5c788: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 5c78c: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5c792: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005c862 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 5c862: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 5c866: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 5c86a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 5c86e: 47f9 0004 3564 lea 43564 ,%a3 <== NOT EXECUTED ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 5c874: 286a 00b0 moveal %a2@(176),%a4 <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 5c878: 4879 0008 cdcc pea 8cdcc <== 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) { 5c87e: 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"); 5c882: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 5c884: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c886: 4879 0008 cddc pea 8cddc <== NOT EXECUTED 5c88c: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 5c88e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 5c892: 4879 0008 cdf9 pea 8cdf9 <== NOT EXECUTED 5c898: 4e93 jsr %a3@ <== NOT EXECUTED printk( 5c89a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5c89e: 4879 0008 ce0b pea 8ce0b <== NOT EXECUTED 5c8a4: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 5c8a6: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 5c8aa: 4878 0020 pea 20 <== NOT EXECUTED 5c8ae: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 5c8b2: 4eb9 0004 c610 jsr 4c610 <== NOT EXECUTED 5c8b8: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 5c8bc: 2e80 movel %d0,%sp@ <== NOT EXECUTED 5c8be: 4879 0008 ce1f pea 8ce1f <== NOT EXECUTED 5c8c4: 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) 5c8c6: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 5c8ca: 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( 5c8ce: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 5c8d2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5c8d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5c8d6: 4879 0008 ce35 pea 8ce35 <== NOT EXECUTED 5c8dc: 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) { 5c8de: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 5c8e2: 4a02 tstb %d2 <== NOT EXECUTED 5c8e4: 6618 bnes 5c8fe <== NOT EXECUTED printk( 5c8e6: 486c 0018 pea %a4@(24) <== NOT EXECUTED 5c8ea: 486c 0008 pea %a4@(8) <== NOT EXECUTED 5c8ee: 4878 0010 pea 10 <== NOT EXECUTED 5c8f2: 4879 0008 ce66 pea 8ce66 <== NOT EXECUTED 5c8f8: 4e93 jsr %a3@ <== NOT EXECUTED 5c8fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal( 5c8fe: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 5c902: 4878 0009 pea 9 <== NOT EXECUTED 5c906: 4eb9 0004 67c4 jsr 467c4 <== NOT EXECUTED =============================================================================== 0004b61c : * 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; 4b61c: 41f9 0005 f404 lea 5f404 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4b622: 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; 4b626: 202e 0008 movel %fp@(8),%d0 4b62a: 4c50 0001 remul %a0@,%d1,%d0 4b62e: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4b632: 4a81 tstl %d1 4b634: 6702 beqs 4b638 <== ALWAYS TAKEN ticks += 1; 4b636: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4b638: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004775c : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 4775c: 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(); 47760: 2039 0005 b664 movel 5b664 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 47766: 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(); 47768: 243c 0000 03e8 movel #1000,%d2 4776e: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 47772: 242e 0008 movel %fp@(8),%d2 47776: 4c40 2001 remul %d0,%d1,%d2 4777a: 4c40 2002 remul %d0,%d2,%d2 4777e: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 47780: 4a81 tstl %d1 47782: 6702 beqs 47786 <== ALWAYS TAKEN ticks += 1; 47784: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 47786: 241f movel %sp@+,%d2 47788: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046c98 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 46c98: 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; 46c9c: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0 ++level; 46ca2: 5280 addql #1,%d0 46ca4: 206e 0008 moveal %fp@(8),%a0 _Thread_Dispatch_disable_level = level; 46ca8: 23c0 0005 dbf6 movel %d0,5dbf6 <_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( 46cae: 42a7 clrl %sp@- 46cb0: 2f28 0008 movel %a0@(8),%sp@- 46cb4: 4868 0010 pea %a0@(16) 46cb8: 4eb9 0004 6f4c jsr 46f4c <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46cbe: 4fef 000c lea %sp@(12),%sp } 46cc2: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 46cc4: 4ef9 0004 8678 jmp 48678 <_Thread_Enable_dispatch> ... =============================================================================== 0004d1c0 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4d1c0: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d1c6: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4d1ca: 2279 0005 fd72 moveal 5fd72 <_Per_CPU_Information+0xe>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d1d0: 48d7 001c moveml %d2-%d4,%sp@ 4d1d4: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4d1d8: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4d1dc: 242e 000c movel %fp@(12),%d2 4d1e0: 262e 0014 movel %fp@(20),%d3 4d1e4: 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 ); 4d1e8: 40c1 movew %sr,%d1 4d1ea: 8081 orl %d1,%d0 4d1ec: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4d1ee: 2028 0048 movel %a0@(72),%d0 4d1f2: 5280 addql #1,%d0 4d1f4: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4d1f8: 4aa8 0040 tstl %a0@(64) 4d1fc: 6626 bnes 4d224 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == 4d1fe: b0a8 0044 cmpl %a0@(68),%d0 4d202: 6620 bnes 4d224 <_CORE_barrier_Wait+0x64> the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4d204: 7001 moveq #1,%d0 4d206: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4d20a: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4d20c: 2d44 0010 movel %d4,%fp@(16) 4d210: 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 ); } 4d214: 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 ); 4d218: 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 ); } 4d21c: 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 ); 4d21e: 4ef9 0004 d18c jmp 4d18c <_CORE_barrier_Release> 4d224: 7001 moveq #1,%d0 4d226: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4d22a: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4d22e: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4d232: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4d234: 2d43 000c movel %d3,%fp@(12) 4d238: 203c 0004 a394 movel #304020,%d0 4d23e: 2d48 0008 movel %a0,%fp@(8) } 4d242: 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 ); 4d246: 2d40 0010 movel %d0,%fp@(16) } 4d24a: 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 ); 4d24c: 4ef9 0004 a0a4 jmp 4a0a4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004e6fc <_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)) { 4e6fc: 7003 moveq #3,%d0 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 ) { 4e6fe: 4e56 ffe4 linkw %fp,#-28 4e702: 222e 0014 movel %fp@(20),%d1 4e706: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 4e70a: 246e 0008 moveal %fp@(8),%a2 4e70e: 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)) { 4e712: c081 andl %d1,%d0 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 4e714: 2544 0044 movel %d4,%a2@(68) the_message_queue->number_of_pending_messages = 0; 4e718: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 4e71c: 2541 004c movel %d1,%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)) { 4e720: 4a80 tstl %d0 4e722: 6712 beqs 4e736 <_CORE_message_queue_Initialize+0x3a> allocated_message_size += sizeof(uintptr_t); 4e724: 2001 movel %d1,%d0 4e726: 5880 addql #4,%d0 allocated_message_size &= ~(sizeof(uintptr_t) - 1); 4e728: 74fc moveq #-4,%d2 4e72a: c082 andl %d2,%d0 /* * 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) 4e72c: b280 cmpl %d0,%d1 4e72e: 6308 blss 4e738 <_CORE_message_queue_Initialize+0x3c> return false; 4e730: 4200 clrb %d0 4e732: 6000 0086 braw 4e7ba <_CORE_message_queue_Initialize+0xbe> /* * 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)) { 4e736: 2001 movel %d1,%d0 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 4e738: 2a00 movel %d0,%d5 4e73a: 0685 0000 0010 addil #16,%d5 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 4e740: 2f05 movel %d5,%sp@- if ( x > SIZE_MAX ) 4e742: 4286 clrl %d6 4e744: 7eff moveq #-1,%d7 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 4e746: 42a7 clrl %sp@- 4e748: 2f04 movel %d4,%sp@- 4e74a: 42a7 clrl %sp@- 4e74c: 4eb9 0006 0948 jsr 60948 <__muldi3> 4e752: 4fef 0010 lea %sp@(16),%sp 4e756: 2400 movel %d0,%d2 4e758: 2601 movel %d1,%d3 if ( x > SIZE_MAX ) 4e75a: 9e83 subl %d3,%d7 4e75c: 9d82 subxl %d2,%d6 4e75e: 6dd0 blts 4e730 <_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 ); 4e760: 2f01 movel %d1,%sp@- 4e762: 4eb9 0005 1050 jsr 51050 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 4e768: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 4e76a: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 4e76e: 67c0 beqs 4e730 <_CORE_message_queue_Initialize+0x34><== NEVER TAKEN /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 4e770: 2f05 movel %d5,%sp@- 4e772: 2f04 movel %d4,%sp@- 4e774: 2f00 movel %d0,%sp@- 4e776: 486a 0060 pea %a2@(96) 4e77a: 4eb9 0004 e6b8 jsr 4e6b8 <_Chain_Initialize> 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 ); 4e780: 41ea 0054 lea %a2@(84),%a0 */ RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority( CORE_message_queue_Attributes *the_attribute ) { return 4e784: 7001 moveq #1,%d0 4e786: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e78a: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4e78e: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e792: 2548 0058 movel %a0,%a2@(88) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 4e796: 4878 0006 pea 6 4e79a: 206e 000c moveal %fp@(12),%a0 4e79e: 4878 0080 pea 80 4e7a2: b090 cmpl %a0@,%d0 4e7a4: 57c0 seq %d0 4e7a6: 49c0 extbl %d0 4e7a8: 4480 negl %d0 4e7aa: 2f00 movel %d0,%sp@- 4e7ac: 2f0a movel %a2,%sp@- 4e7ae: 4eb9 0005 0910 jsr 50910 <_Thread_queue_Initialize> 4e7b4: 4fef 0020 lea %sp@(32),%sp THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 4e7b8: 7001 moveq #1,%d0 } 4e7ba: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 4e7c0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047084 <_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 ) { 47084: 4e56 0000 linkw %fp,#0 47088: 2f0a movel %a2,%sp@- 4708a: 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)) ) { 4708e: 2f0a movel %a2,%sp@- 47090: 4eb9 0004 895c jsr 4895c <_Thread_queue_Dequeue> 47096: 588f addql #4,%sp 47098: 4a80 tstl %d0 4709a: 6624 bnes 470c0 <_CORE_semaphore_Surrender+0x3c> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 4709c: 303c 0700 movew #1792,%d0 470a0: 40c1 movew %sr,%d1 470a2: 8081 orl %d1,%d0 470a4: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 470a6: 202a 0048 movel %a2@(72),%d0 470aa: b0aa 0040 cmpl %a2@(64),%d0 470ae: 640a bccs 470ba <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN the_semaphore->count += 1; 470b0: 5280 addql #1,%d0 470b2: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 470b6: 4280 clrl %d0 470b8: 6002 bras 470bc <_CORE_semaphore_Surrender+0x38> } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 470ba: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 470bc: 46c1 movew %d1,%sr 470be: 6002 bras 470c2 <_CORE_semaphore_Surrender+0x3e> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 470c0: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 470c2: 246e fffc moveal %fp@(-4),%a2 470c6: 4e5e unlk %fp ... =============================================================================== 00045ed8 <_Event_Surrender>: rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 45ed8: 203c 0000 0700 movel #1792,%d0 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 45ede: 4e56 ffe4 linkw %fp,#-28 45ee2: 206e 0010 moveal %fp@(16),%a0 45ee6: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 45eea: 246e 0008 moveal %fp@(8),%a2 45eee: 242e 000c movel %fp@(12),%d2 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; 45ef2: 282a 0030 movel %a2@(48),%d4 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { 45ef6: 226e 0014 moveal %fp@(20),%a1 45efa: 2a2e 0018 movel %fp@(24),%d5 rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; _ISR_Disable( level ); 45efe: 40c1 movew %sr,%d1 45f00: 8081 orl %d1,%d0 45f02: 46c0 movew %d0,%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; 45f04: 8490 orl %a0@,%d2 45f06: 2082 movel %d2,%a0@ _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; 45f08: 262a 0024 movel %a2@(36),%d3 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 ); 45f0c: 2002 movel %d2,%d0 45f0e: c083 andl %d3,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 45f10: 6604 bnes 45f16 <_Event_Surrender+0x3e> 45f12: 6000 00aa braw 45fbe <_Event_Surrender+0xe6> /* * 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() && 45f16: 4ab9 0005 dd68 tstl 5dd68 <_Per_CPU_Information+0x8> 45f1c: 6736 beqs 45f54 <_Event_Surrender+0x7c> 45f1e: b5f9 0005 dd6e cmpal 5dd6e <_Per_CPU_Information+0xe>,%a2 45f24: 662e bnes 45f54 <_Event_Surrender+0x7c> _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 45f26: 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 ) && 45f28: 7e01 moveq #1,%d7 ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 45f2a: 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 ) && 45f2c: be86 cmpl %d6,%d7 45f2e: 6524 bcss 45f54 <_Event_Surrender+0x7c> <== 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) ) { 45f30: b680 cmpl %d0,%d3 45f32: 6708 beqs 45f3c <_Event_Surrender+0x64> <== NEVER TAKEN 45f34: 0804 0001 btst #1,%d4 45f38: 6700 0084 beqw 45fbe <_Event_Surrender+0xe6> 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) ); 45f3c: 2600 movel %d0,%d3 45f3e: 4683 notl %d3 45f40: c682 andl %d2,%d3 45f42: 2083 movel %d3,%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; 45f44: 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; 45f48: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45f4c: 2080 movel %d0,%a0@ *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 45f4e: 7003 moveq #3,%d0 45f50: 2280 movel %d0,%a1@ 45f52: 606a bras 45fbe <_Event_Surrender+0xe6> RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 45f54: caaa 0010 andl %a2@(16),%d5 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { 45f58: 6764 beqs 45fbe <_Event_Surrender+0xe6> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 45f5a: b680 cmpl %d0,%d3 45f5c: 6706 beqs 45f64 <_Event_Surrender+0x8c> 45f5e: 0804 0001 btst #1,%d4 45f62: 675a beqs 45fbe <_Event_Surrender+0xe6> <== NEVER TAKEN 45f64: 2600 movel %d0,%d3 45f66: 4683 notl %d3 45f68: c682 andl %d2,%d3 45f6a: 2083 movel %d3,%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; 45f6c: 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; 45f70: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45f74: 2080 movel %d0,%a0@ _ISR_Flash( level ); 45f76: 203c 0000 0700 movel #1792,%d0 45f7c: 46c1 movew %d1,%sr 45f7e: 8081 orl %d1,%d0 45f80: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 45f82: 7002 moveq #2,%d0 45f84: b0aa 0050 cmpl %a2@(80),%d0 45f88: 6704 beqs 45f8e <_Event_Surrender+0xb6> _ISR_Enable( level ); 45f8a: 46c1 movew %d1,%sr 45f8c: 6014 bras 45fa2 <_Event_Surrender+0xca> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 45f8e: 7003 moveq #3,%d0 45f90: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 45f94: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 45f96: 486a 0048 pea %a2@(72) 45f9a: 4eb9 0004 923c jsr 4923c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45fa0: 588f addql #4,%sp 45fa2: 2d4a 0008 movel %a2,%fp@(8) 45fa6: 2e3c 1007 fff8 movel #268959736,%d7 45fac: 2d47 000c movel %d7,%fp@(12) } return; } } _ISR_Enable( level ); } 45fb0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 45fb6: 4e5e unlk %fp 45fb8: 4ef9 0004 8304 jmp 48304 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 45fbe: 46c1 movew %d1,%sr } 45fc0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 45fc6: 4e5e unlk %fp ... =============================================================================== 00045fcc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { 45fcc: 4e56 fffc linkw %fp,#-4 45fd0: 2f0a movel %a2,%sp@- 45fd2: 246e 000c moveal %fp@(12),%a2 45fd6: 2f02 movel %d2,%sp@- ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); 45fd8: 486e fffc pea %fp@(-4) 45fdc: 2f2e 0008 movel %fp@(8),%sp@- 45fe0: 4eb9 0004 8698 jsr 48698 <_Thread_Get> switch ( location ) { 45fe6: 508f addql #8,%sp 45fe8: 4aae fffc tstl %fp@(-4) 45fec: 664c bnes 4603a <_Event_Timeout+0x6e> <== 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 ); 45fee: 223c 0000 0700 movel #1792,%d1 45ff4: 40c2 movew %sr,%d2 45ff6: 8282 orl %d2,%d1 45ff8: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 45ffa: 2040 moveal %d0,%a0 45ffc: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 46000: b0b9 0005 dd6e cmpl 5dd6e <_Per_CPU_Information+0xe>,%d0 46006: 660a bnes 46012 <_Event_Timeout+0x46> if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 46008: 7201 moveq #1,%d1 4600a: b292 cmpl %a2@,%d1 4600c: 6604 bnes 46012 <_Event_Timeout+0x46> *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4600e: 7202 moveq #2,%d1 46010: 2481 movel %d1,%a2@ } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46012: 7206 moveq #6,%d1 46014: 2040 moveal %d0,%a0 46016: 2141 0034 movel %d1,%a0@(52) _ISR_Enable( level ); 4601a: 46c2 movew %d2,%sr 4601c: 2f3c 1007 fff8 movel #268959736,%sp@- 46022: 2f00 movel %d0,%sp@- 46024: 4eb9 0004 8304 jsr 48304 <_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; 4602a: 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; 4602c: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0 --level; 46032: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 46034: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4603a: 242e fff4 movel %fp@(-12),%d2 4603e: 246e fff8 moveal %fp@(-8),%a2 46042: 4e5e unlk %fp ... =============================================================================== 0004ad3c <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4ad3c: 4e56 ffe8 linkw %fp,#-24 4ad40: 206e 0008 moveal %fp@(8),%a0 4ad44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4ad48: 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 ) { 4ad4c: 6700 0154 beqw 4aea2 <_Heap_Free+0x166> 4ad50: 2240 moveal %d0,%a1 4ad52: 5189 subql #8,%a1 4ad54: 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 4ad5a: 2828 0020 movel %a0@(32),%d4 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4ad5e: 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; 4ad60: b889 cmpl %a1,%d4 4ad62: 620c bhis 4ad70 <_Heap_Free+0x34> 4ad64: b3e8 0024 cmpal %a0@(36),%a1 4ad68: 53c0 sls %d0 4ad6a: 49c0 extbl %d0 4ad6c: 4480 negl %d0 4ad6e: 6002 bras 4ad72 <_Heap_Free+0x36> 4ad70: 4280 clrl %d0 } 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 ) ) { 4ad72: 0800 0000 btst #0,%d0 4ad76: 6700 012e beqw 4aea6 <_Heap_Free+0x16a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4ad7a: 2629 0004 movel %a1@(4),%d3 - 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; 4ad7e: 70fe moveq #-2,%d0 4ad80: c083 andl %d3,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4ad82: 45f1 0800 lea %a1@(00000000,%d0: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; 4ad86: b88a cmpl %a2,%d4 4ad88: 620c bhis 4ad96 <_Heap_Free+0x5a> <== NEVER TAKEN 4ad8a: b5e8 0024 cmpal %a0@(36),%a2 4ad8e: 53c1 sls %d1 4ad90: 49c1 extbl %d1 4ad92: 4481 negl %d1 4ad94: 6002 bras 4ad98 <_Heap_Free+0x5c> 4ad96: 4281 clrl %d1 <== NOT EXECUTED _Heap_Protection_block_check( heap, block ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 4ad98: 0801 0000 btst #0,%d1 4ad9c: 6700 0108 beqw 4aea6 <_Heap_Free+0x16a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4ada0: 242a 0004 movel %a2@(4),%d2 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4ada4: 0802 0000 btst #0,%d2 4ada8: 6700 00fc beqw 4aea6 <_Heap_Free+0x16a> - 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; 4adac: 72fe moveq #-2,%d1 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 4adae: 2668 0024 moveal %a0@(36),%a3 4adb2: c481 andl %d1,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4adb4: b7ca cmpal %a2,%a3 4adb6: 670c beqs 4adc4 <_Heap_Free+0x88> 4adb8: 2232 2804 movel %a2@(00000004,%d2:l),%d1 4adbc: 7a01 moveq #1,%d5 4adbe: bb81 eorl %d5,%d1 4adc0: c285 andl %d5,%d1 4adc2: 6002 bras 4adc6 <_Heap_Free+0x8a> 4adc4: 4281 clrl %d1 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 4adc6: 1a01 moveb %d1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4adc8: 0803 0000 btst #0,%d3 4adcc: 6662 bnes 4ae30 <_Heap_Free+0xf4> uintptr_t const prev_size = block->prev_size; 4adce: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4add0: 93c3 subal %d3,%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; 4add2: b889 cmpl %a1,%d4 4add4: 620a bhis 4ade0 <_Heap_Free+0xa4> <== NEVER TAKEN 4add6: b3cb cmpal %a3,%a1 4add8: 53c1 sls %d1 4adda: 49c1 extbl %d1 4addc: 4481 negl %d1 4adde: 6002 bras 4ade2 <_Heap_Free+0xa6> 4ade0: 4281 clrl %d1 <== NOT EXECUTED Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 4ade2: 0801 0000 btst #0,%d1 4ade6: 6700 00be beqw 4aea6 <_Heap_Free+0x16a> 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; 4adea: 7201 moveq #1,%d1 4adec: c2a9 0004 andl %a1@(4),%d1 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) ) { 4adf0: 6700 00b4 beqw 4aea6 <_Heap_Free+0x16a> 4adf4: d680 addl %d0,%d3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4adf6: 4a05 tstb %d5 4adf8: 6724 beqs 4ae1e <_Heap_Free+0xe2> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4adfa: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + prev_size + next_block_size; 4adfe: d483 addl %d3,%d2 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ae00: 7201 moveq #1,%d1 Heap_Block *prev = block->prev; 4ae02: 246a 000c moveal %a2@(12),%a2 prev->next = next; 4ae06: 254b 0008 movel %a3,%a2@(8) 4ae0a: 8282 orl %d2,%d1 next->prev = prev; 4ae0c: 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; 4ae10: 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; 4ae14: 2382 2800 movel %d2,%a1@(00000000,%d2: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; 4ae18: 2341 0004 movel %d1,%a1@(4) 4ae1c: 6078 bras 4ae96 <_Heap_Free+0x15a> 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; 4ae1e: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ae20: 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; 4ae22: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4ae24: 2483 movel %d3,%a2@ 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; 4ae26: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ae2a: cbaa 0004 andl %d5,%a2@(4) 4ae2e: 6066 bras 4ae96 <_Heap_Free+0x15a> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4ae30: 4a01 tstb %d1 4ae32: 672a beqs 4ae5e <_Heap_Free+0x122> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4ae34: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + next_block_size; 4ae38: 2202 movel %d2,%d1 4ae3a: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ae3c: 7401 moveq #1,%d2 Heap_Block *prev = old_block->prev; 4ae3e: 246a 000c moveal %a2@(12),%a2 new_block->next = next; 4ae42: 234b 0008 movel %a3,%a1@(8) 4ae46: 8481 orl %d1,%d2 new_block->prev = prev; 4ae48: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4ae4c: 2381 1800 movel %d1,%a1@(00000000,%d1:l) next->prev = new_block; 4ae50: 2749 000c movel %a1,%a3@(12) prev->next = new_block; 4ae54: 2549 0008 movel %a1,%a2@(8) 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; 4ae58: 2342 0004 movel %d2,%a1@(4) 4ae5c: 6038 bras 4ae96 <_Heap_Free+0x15a> 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; 4ae5e: 7a01 moveq #1,%d5 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ae60: 72fe moveq #-2,%d1 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; 4ae62: 8a80 orl %d0,%d5 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4ae64: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4ae68: 2348 000c movel %a0,%a1@(12) 4ae6c: 2345 0004 movel %d5,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ae70: c3aa 0004 andl %d1,%a2@(4) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4ae74: 2228 0038 movel %a0@(56),%d1 4ae78: 5281 addql #1,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4ae7a: 234b 0008 movel %a3,%a1@(8) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4ae7e: 2749 000c movel %a1,%a3@(12) /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; 4ae82: 2480 movel %d0,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4ae84: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4ae88: 2141 0038 movel %d1,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4ae8c: b2a8 003c cmpl %a0@(60),%d1 4ae90: 6304 blss 4ae96 <_Heap_Free+0x15a> stats->max_free_blocks = stats->free_blocks; 4ae92: 2141 003c movel %d1,%a0@(60) } } /* Statistics */ --stats->used_blocks; 4ae96: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4ae9a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4ae9e: d1a8 0030 addl %d0,%a0@(48) * 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; 4aea2: 7001 moveq #1,%d0 4aea4: 6002 bras 4aea8 <_Heap_Free+0x16c> 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; 4aea6: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4aea8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4aeac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048f20 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { 48f20: 4e56 ffe8 linkw %fp,#-24 48f24: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 48f28: 246e 0008 moveal %fp@(8),%a2 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 48f2c: 4282 clrl %d2 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; 48f2e: 97cb subal %a3,%a3 * @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 ); 48f30: 4bf9 0004 eda8 lea 4eda8 <_Heap_Allocate_aligned_with_boundary>,%a5 48f36: 286e 000c moveal %fp@(12),%a4 Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 48f3a: 6026 bras 48f62 <_Heap_Greedy_allocate+0x42> 48f3c: 42a7 clrl %sp@- 48f3e: 42a7 clrl %sp@- 48f40: 2f1c movel %a4@+,%sp@- 48f42: 2f0a movel %a2,%sp@- 48f44: 4e95 jsr %a5@ void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { 48f46: 4fef 0010 lea %sp@(16),%sp 48f4a: 4a80 tstl %d0 48f4c: 6712 beqs 48f60 <_Heap_Greedy_allocate+0x40> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 48f4e: 2040 moveal %d0,%a0 48f50: 5188 subql #8,%a0 48f52: 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); 48f58: 91c1 subal %d1,%a0 Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; 48f5a: 214b 0008 movel %a3,%a0@(8) 48f5e: 2648 moveal %a0,%a3 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { 48f60: 5282 addql #1,%d2 48f62: b4ae 0010 cmpl %fp@(16),%d2 48f66: 66d4 bnes 48f3c <_Heap_Greedy_allocate+0x1c> 48f68: 4282 clrl %d2 allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { _Heap_Block_allocate( 48f6a: 4bf9 0004 922e lea 4922e <_Heap_Block_allocate>,%a5 48f70: 6020 bras 48f92 <_Heap_Greedy_allocate+0x72> } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48f72: 70fe moveq #-2,%d0 48f74: c0ac 0004 andl %a4@(4),%d0 48f78: 2040 moveal %d0,%a0 48f7a: 4868 fff8 pea %a0@(-8) 48f7e: 486c 0008 pea %a4@(8) 48f82: 2f0c movel %a4,%sp@- 48f84: 2f0a movel %a2,%sp@- 48f86: 4e95 jsr %a5@ 48f88: 4fef 0010 lea %sp@(16),%sp current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; 48f8c: 2942 0008 movel %d2,%a4@(8) 48f90: 240c movel %a4,%d2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 48f92: 286a 0008 moveal %a2@(8),%a4 next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { 48f96: b5cc cmpal %a4,%a2 48f98: 66d8 bnes 48f72 <_Heap_Greedy_allocate+0x52> 48f9a: 6012 bras 48fae <_Heap_Greedy_allocate+0x8e> blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 48f9c: 262b 0008 movel %a3@(8),%d3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 48fa0: 486b 0008 pea %a3@(8) blocks = current; } while ( allocated_blocks != NULL ) { current = allocated_blocks; allocated_blocks = allocated_blocks->next; 48fa4: 2643 moveal %d3,%a3 _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); 48fa6: 2f0a movel %a2,%sp@- 48fa8: 4e94 jsr %a4@ 48faa: 508f addql #8,%sp 48fac: 6006 bras 48fb4 <_Heap_Greedy_allocate+0x94> 48fae: 49f9 0004 ef08 lea 4ef08 <_Heap_Free>,%a4 current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { 48fb4: 4a8b tstl %a3 48fb6: 66e4 bnes 48f9c <_Heap_Greedy_allocate+0x7c> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } 48fb8: 2002 movel %d2,%d0 48fba: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 48fc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f48c <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 4f48c: 4e56 0000 linkw %fp,#0 4f490: 226e 0008 moveal %fp@(8),%a1 4f494: 2f0a movel %a2,%sp@- Heap_Block *current = heap->first_block; 4f496: 2069 0020 moveal %a1@(32),%a0 void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { 4f49a: 2f02 movel %d2,%sp@- Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; 4f49c: 2429 0024 movel %a1@(36),%d2 4f4a0: 602a bras 4f4cc <_Heap_Iterate+0x40> 4f4a2: 70fe moveq #-2,%d0 while ( !stop && current != end ) { uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); 4f4a4: 7201 moveq #1,%d1 4f4a6: c0a8 0004 andl %a0@(4),%d0 4f4aa: 2f2e 0010 movel %fp@(16),%sp@- RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4f4ae: 45f0 0800 lea %a0@(00000000,%d0:l),%a2 4f4b2: c2aa 0004 andl %a2@(4),%d1 4f4b6: 2f01 movel %d1,%sp@- 4f4b8: 2f00 movel %d0,%sp@- 4f4ba: 2f08 movel %a0,%sp@- 4f4bc: 206e 000c moveal %fp@(12),%a0 4f4c0: 4e90 jsr %a0@ { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { 4f4c2: 4fef 0010 lea %sp@(16),%sp 4f4c6: 204a moveal %a2,%a0 4f4c8: 4a00 tstb %d0 4f4ca: 6604 bnes 4f4d0 <_Heap_Iterate+0x44> <== NEVER TAKEN 4f4cc: b488 cmpl %a0,%d2 4f4ce: 66d2 bnes 4f4a2 <_Heap_Iterate+0x16> stop = (*visitor)( current, size, used, visitor_arg ); current = next; } } 4f4d0: 242e fff8 movel %fp@(-8),%d2 4f4d4: 246e fffc moveal %fp@(-4),%a2 4f4d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a488 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5a488: 4e56 0000 linkw %fp,#0 5a48c: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5a490: 2040 moveal %d0,%a0 5a492: 5188 subql #8,%a0 5a494: 226e 0008 moveal %fp@(8),%a1 5a498: 2f02 movel %d2,%sp@- 5a49a: 2400 movel %d0,%d2 5a49c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 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 5a4a2: 2429 0020 movel %a1@(32),%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5a4a6: 91c1 subal %d1,%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; 5a4a8: b488 cmpl %a0,%d2 5a4aa: 620c bhis 5a4b8 <_Heap_Size_of_alloc_area+0x30> 5a4ac: b1e9 0024 cmpal %a1@(36),%a0 5a4b0: 53c1 sls %d1 5a4b2: 49c1 extbl %d1 5a4b4: 4481 negl %d1 5a4b6: 6002 bras 5a4ba <_Heap_Size_of_alloc_area+0x32> 5a4b8: 4281 clrl %d1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 5a4ba: 0801 0000 btst #0,%d1 5a4be: 673c beqs 5a4fc <_Heap_Size_of_alloc_area+0x74> - 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; 5a4c0: 72fe moveq #-2,%d1 5a4c2: c2a8 0004 andl %a0@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5a4c6: 41f0 1800 lea %a0@(00000000,%d1: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; 5a4ca: b488 cmpl %a0,%d2 5a4cc: 620c bhis 5a4da <_Heap_Size_of_alloc_area+0x52> <== NEVER TAKEN 5a4ce: b1e9 0024 cmpal %a1@(36),%a0 5a4d2: 53c1 sls %d1 5a4d4: 49c1 extbl %d1 5a4d6: 4481 negl %d1 5a4d8: 6002 bras 5a4dc <_Heap_Size_of_alloc_area+0x54> 5a4da: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5a4dc: 0801 0000 btst #0,%d1 5a4e0: 671a beqs 5a4fc <_Heap_Size_of_alloc_area+0x74> <== 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; 5a4e2: 7201 moveq #1,%d1 5a4e4: c2a8 0004 andl %a0@(4),%d1 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5a4e8: 6712 beqs 5a4fc <_Heap_Size_of_alloc_area+0x74> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5a4ea: 7204 moveq #4,%d1 5a4ec: 9280 subl %d0,%d1 5a4ee: 2001 movel %d1,%d0 5a4f0: d088 addl %a0,%d0 5a4f2: 226e 0010 moveal %fp@(16),%a1 5a4f6: 2280 movel %d0,%a1@ return true; 5a4f8: 7001 moveq #1,%d0 5a4fa: 6002 bras 5a4fe <_Heap_Size_of_alloc_area+0x76> 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; 5a4fc: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 5a4fe: 241f movel %sp@+,%d2 5a500: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d1a <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47d1a: 4e56 ffd0 linkw %fp,#-48 47d1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47d22: 266e 0008 moveal %fp@(8),%a3 47d26: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 47d2a: 282b 0010 movel %a3@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 47d2e: 2a2b 0014 movel %a3@(20),%d5 Heap_Block *const first_block = heap->first_block; 47d32: 286b 0020 moveal %a3@(32),%a4 Heap_Block *const last_block = heap->last_block; 47d36: 2c2b 0024 movel %a3@(36),%d6 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 47d3a: 4a2e 0013 tstb %fp@(19) 47d3e: 6706 beqs 47d46 <_Heap_Walk+0x2c> 47d40: 45fa ff9a lea %pc@(47cdc <_Heap_Walk_print>),%a2 47d44: 6004 bras 47d4a <_Heap_Walk+0x30> 47d46: 45fa ff8c lea %pc@(47cd4 <_Heap_Walk_print_nothing>),%a2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 47d4a: 7003 moveq #3,%d0 47d4c: b0b9 0005 fe84 cmpl 5fe84 <_System_state_Current>,%d0 47d52: 6706 beqs 47d5a <_Heap_Walk+0x40> return true; 47d54: 7001 moveq #1,%d0 47d56: 6000 02fc braw 48054 <_Heap_Walk+0x33a> 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)( 47d5a: 2f2b 000c movel %a3@(12),%sp@- 47d5e: 2f2b 0008 movel %a3@(8),%sp@- 47d62: 2f06 movel %d6,%sp@- 47d64: 2f0c movel %a4,%sp@- 47d66: 2f2b 001c movel %a3@(28),%sp@- 47d6a: 2f2b 0018 movel %a3@(24),%sp@- 47d6e: 2f05 movel %d5,%sp@- 47d70: 2f04 movel %d4,%sp@- 47d72: 4879 0005 c3e2 pea 5c3e2 <_Copyright_Notice+0x94> 47d78: 42a7 clrl %sp@- 47d7a: 2f02 movel %d2,%sp@- 47d7c: 4e92 jsr %a2@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 47d7e: 4fef 002c lea %sp@(44),%sp 47d82: 4a84 tstl %d4 47d84: 6608 bnes 47d8e <_Heap_Walk+0x74> (*printer)( source, true, "page size is zero\n" ); 47d86: 4879 0005 c473 pea 5c473 <_Copyright_Notice+0x125> 47d8c: 6076 bras 47e04 <_Heap_Walk+0xea> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 47d8e: 7003 moveq #3,%d0 47d90: c084 andl %d4,%d0 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47d92: 670c beqs 47da0 <_Heap_Walk+0x86> (*printer)( 47d94: 2f04 movel %d4,%sp@- 47d96: 4879 0005 c486 pea 5c486 <_Copyright_Notice+0x138> 47d9c: 6000 02a8 braw 48046 <_Heap_Walk+0x32c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47da0: 2205 movel %d5,%d1 47da2: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47da6: 4a80 tstl %d0 47da8: 670c beqs 47db6 <_Heap_Walk+0x9c> (*printer)( 47daa: 2f05 movel %d5,%sp@- 47dac: 4879 0005 c4a4 pea 5c4a4 <_Copyright_Notice+0x156> 47db2: 6000 0292 braw 48046 <_Heap_Walk+0x32c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 47db6: 200c movel %a4,%d0 47db8: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47dba: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( 47dbe: 4a81 tstl %d1 47dc0: 670c beqs 47dce <_Heap_Walk+0xb4> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47dc2: 2f0c movel %a4,%sp@- 47dc4: 4879 0005 c4c8 pea 5c4c8 <_Copyright_Notice+0x17a> 47dca: 6000 027a braw 48046 <_Heap_Walk+0x32c> 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; 47dce: 7001 moveq #1,%d0 47dd0: c0ac 0004 andl %a4@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47dd4: 6608 bnes 47dde <_Heap_Walk+0xc4> (*printer)( 47dd6: 4879 0005 c4f9 pea 5c4f9 <_Copyright_Notice+0x1ab> 47ddc: 6026 bras 47e04 <_Heap_Walk+0xea> - 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; 47dde: 70fe moveq #-2,%d0 47de0: 2046 moveal %d6,%a0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47de2: 2a46 moveal %d6,%a5 - 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; 47de4: c0a8 0004 andl %a0@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47de8: dbc0 addal %d0,%a5 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; 47dea: 7001 moveq #1,%d0 47dec: c0ad 0004 andl %a5@(4),%d0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 47df0: 6608 bnes 47dfa <_Heap_Walk+0xe0> (*printer)( 47df2: 4879 0005 c527 pea 5c527 <_Copyright_Notice+0x1d9> 47df8: 600a bras 47e04 <_Heap_Walk+0xea> ); return false; } if ( 47dfa: b9cd cmpal %a5,%a4 47dfc: 6716 beqs 47e14 <_Heap_Walk+0xfa> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 47dfe: 4879 0005 c53c pea 5c53c <_Copyright_Notice+0x1ee> 47e04: 4878 0001 pea 1 47e08: 2f02 movel %d2,%sp@- 47e0a: 4e92 jsr %a2@ 47e0c: 4fef 000c lea %sp@(12),%sp 47e10: 6000 0228 braw 4803a <_Heap_Walk+0x320> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 47e14: 222b 0010 movel %a3@(16),%d1 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 47e18: 224b moveal %a3,%a1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47e1a: 206b 0008 moveal %a3@(8),%a0 47e1e: 6074 bras 47e94 <_Heap_Walk+0x17a> 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; 47e20: b1eb 0020 cmpal %a3@(32),%a0 47e24: 650c bcss 47e32 <_Heap_Walk+0x118> 47e26: b1eb 0024 cmpal %a3@(36),%a0 47e2a: 53c0 sls %d0 47e2c: 49c0 extbl %d0 47e2e: 4480 negl %d0 47e30: 6002 bras 47e34 <_Heap_Walk+0x11a> 47e32: 4280 clrl %d0 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 47e34: 0800 0000 btst #0,%d0 47e38: 660c bnes 47e46 <_Heap_Walk+0x12c> (*printer)( 47e3a: 2f08 movel %a0,%sp@- 47e3c: 4879 0005 c56b pea 5c56b <_Copyright_Notice+0x21d> 47e42: 6000 0202 braw 48046 <_Heap_Walk+0x32c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 47e46: 2008 movel %a0,%d0 47e48: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47e4a: 4c41 0003 remul %d1,%d3,%d0 ); return false; } if ( 47e4e: 4a83 tstl %d3 47e50: 670c beqs 47e5e <_Heap_Walk+0x144> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47e52: 2f08 movel %a0,%sp@- 47e54: 4879 0005 c58b pea 5c58b <_Copyright_Notice+0x23d> 47e5a: 6000 01ea braw 48046 <_Heap_Walk+0x32c> - 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; 47e5e: 70fe moveq #-2,%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; 47e60: 7601 moveq #1,%d3 - 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; 47e62: c0a8 0004 andl %a0@(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; 47e66: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 47e6a: 670c beqs 47e78 <_Heap_Walk+0x15e> (*printer)( 47e6c: 2f08 movel %a0,%sp@- 47e6e: 4879 0005 c5bb pea 5c5bb <_Copyright_Notice+0x26d> 47e74: 6000 01d0 braw 48046 <_Heap_Walk+0x32c> ); return false; } if ( free_block->prev != prev_block ) { 47e78: 2028 000c movel %a0@(12),%d0 47e7c: b3c0 cmpal %d0,%a1 47e7e: 670e beqs 47e8e <_Heap_Walk+0x174> (*printer)( 47e80: 2f00 movel %d0,%sp@- 47e82: 2f08 movel %a0,%sp@- 47e84: 4879 0005 c5d7 pea 5c5d7 <_Copyright_Notice+0x289> 47e8a: 6000 00aa braw 47f36 <_Heap_Walk+0x21c> return false; } prev_block = free_block; free_block = free_block->next; 47e8e: 2248 moveal %a0,%a1 47e90: 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 ) { 47e94: b7c8 cmpal %a0,%a3 47e96: 6688 bnes 47e20 <_Heap_Walk+0x106> 47e98: 284d moveal %a5,%a4 block = next_block; } while ( block != first_block ); return true; } 47e9a: 202c 0004 movel %a4@(4),%d0 47e9e: 7201 moveq #1,%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; 47ea0: 76fe moveq #-2,%d3 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; 47ea2: c280 andl %d0,%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; 47ea4: c680 andl %d0,%d3 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; 47ea6: 2d41 fffc movel %d1,%fp@(-4) 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; 47eaa: bc8c cmpl %a4,%d6 47eac: 56c1 sne %d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47eae: 2e03 movel %d3,%d7 47eb0: de8c addl %a4,%d7 47eb2: 2001 movel %d1,%d0 47eb4: 4480 negl %d0 47eb6: 1d40 fffb moveb %d0,%fp@(-5) 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; 47eba: beab 0020 cmpl %a3@(32),%d7 47ebe: 650c bcss 47ecc <_Heap_Walk+0x1b2> <== NEVER TAKEN 47ec0: beab 0024 cmpl %a3@(36),%d7 47ec4: 53c0 sls %d0 47ec6: 49c0 extbl %d0 47ec8: 4480 negl %d0 47eca: 6002 bras 47ece <_Heap_Walk+0x1b4> 47ecc: 4280 clrl %d0 <== NOT EXECUTED if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 47ece: 0800 0000 btst #0,%d0 47ed2: 660c bnes 47ee0 <_Heap_Walk+0x1c6> (*printer)( 47ed4: 2f07 movel %d7,%sp@- 47ed6: 2f0c movel %a4,%sp@- 47ed8: 4879 0005 c609 pea 5c609 <_Copyright_Notice+0x2bb> 47ede: 6056 bras 47f36 <_Heap_Walk+0x21c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47ee0: 2203 movel %d3,%d1 47ee2: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 47ee6: 4a80 tstl %d0 47ee8: 6712 beqs 47efc <_Heap_Walk+0x1e2> 47eea: 4a2e fffb tstb %fp@(-5) 47eee: 6756 beqs 47f46 <_Heap_Walk+0x22c> (*printer)( 47ef0: 2f03 movel %d3,%sp@- 47ef2: 2f0c movel %a4,%sp@- 47ef4: 4879 0005 c636 pea 5c636 <_Copyright_Notice+0x2e8> 47efa: 603a bras 47f36 <_Heap_Walk+0x21c> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 47efc: ba83 cmpl %d3,%d5 47efe: 6322 blss 47f22 <_Heap_Walk+0x208> 47f00: 4a2e fffb tstb %fp@(-5) 47f04: 6740 beqs 47f46 <_Heap_Walk+0x22c> <== NEVER TAKEN (*printer)( 47f06: 2f05 movel %d5,%sp@- 47f08: 2f03 movel %d3,%sp@- 47f0a: 2f0c movel %a4,%sp@- 47f0c: 4879 0005 c664 pea 5c664 <_Copyright_Notice+0x316> 47f12: 4878 0001 pea 1 47f16: 2f02 movel %d2,%sp@- 47f18: 4e92 jsr %a2@ block, block_size, min_block_size ); return false; 47f1a: 4fef 0018 lea %sp@(24),%sp 47f1e: 6000 011a braw 4803a <_Heap_Walk+0x320> } if ( next_block_begin <= block_begin && is_not_last_block ) { 47f22: b9c7 cmpal %d7,%a4 47f24: 6520 bcss 47f46 <_Heap_Walk+0x22c> 47f26: 4a2e fffb tstb %fp@(-5) 47f2a: 671a beqs 47f46 <_Heap_Walk+0x22c> (*printer)( 47f2c: 2f07 movel %d7,%sp@- 47f2e: 2f0c movel %a4,%sp@- 47f30: 4879 0005 c68f pea 5c68f <_Copyright_Notice+0x341> 47f36: 4878 0001 pea 1 47f3a: 2f02 movel %d2,%sp@- 47f3c: 4e92 jsr %a2@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 47f3e: 4fef 0014 lea %sp@(20),%sp 47f42: 6000 00f6 braw 4803a <_Heap_Walk+0x320> 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; 47f46: 7001 moveq #1,%d0 47f48: 2047 moveal %d7,%a0 47f4a: c0a8 0004 andl %a0@(4),%d0 } if ( !_Heap_Is_prev_used( next_block ) ) { 47f4e: 6600 00ac bnew 47ffc <_Heap_Walk+0x2e2> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 47f52: 222b 0008 movel %a3@(8),%d1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 47f56: 206c 0008 moveal %a4@(8),%a0 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)( 47f5a: b1eb 000c cmpal %a3@(12),%a0 47f5e: 6712 beqs 47f72 <_Heap_Walk+0x258> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 47f60: 43f9 0005 c28e lea 5c28e ,%a1 47f66: b7c8 cmpal %a0,%a3 47f68: 660e bnes 47f78 <_Heap_Walk+0x25e> 47f6a: 43f9 0005 c3be lea 5c3be <_Copyright_Notice+0x70>,%a1 47f70: 6006 bras 47f78 <_Heap_Walk+0x25e> 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)( 47f72: 43f9 0005 c3af lea 5c3af <_Copyright_Notice+0x61>,%a1 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 ? 47f78: 202c 000c movel %a4@(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)( 47f7c: b280 cmpl %d0,%d1 47f7e: 6712 beqs 47f92 <_Heap_Walk+0x278> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 47f80: 223c 0005 c28e movel #377486,%d1 47f86: b7c0 cmpal %d0,%a3 47f88: 660e bnes 47f98 <_Heap_Walk+0x27e> 47f8a: 223c 0005 c3d8 movel #377816,%d1 47f90: 6006 bras 47f98 <_Heap_Walk+0x27e> 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)( 47f92: 223c 0005 c3c8 movel #377800,%d1 47f98: 2f09 movel %a1,%sp@- 47f9a: 2f08 movel %a0,%sp@- 47f9c: 2f01 movel %d1,%sp@- 47f9e: 2f00 movel %d0,%sp@- 47fa0: 2f03 movel %d3,%sp@- 47fa2: 2f0c movel %a4,%sp@- 47fa4: 4879 0005 c6c3 pea 5c6c3 <_Copyright_Notice+0x375> 47faa: 42a7 clrl %sp@- 47fac: 2f02 movel %d2,%sp@- 47fae: 4e92 jsr %a2@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 47fb0: 4fef 0024 lea %sp@(36),%sp 47fb4: 2047 moveal %d7,%a0 47fb6: 2010 movel %a0@,%d0 47fb8: b083 cmpl %d3,%d0 47fba: 671c beqs 47fd8 <_Heap_Walk+0x2be> (*printer)( 47fbc: 2f07 movel %d7,%sp@- 47fbe: 2f00 movel %d0,%sp@- 47fc0: 2f03 movel %d3,%sp@- 47fc2: 2f0c movel %a4,%sp@- 47fc4: 4879 0005 c6f8 pea 5c6f8 <_Copyright_Notice+0x3aa> 47fca: 4878 0001 pea 1 47fce: 2f02 movel %d2,%sp@- 47fd0: 4e92 jsr %a2@ 47fd2: 4fef 001c lea %sp@(28),%sp 47fd6: 6062 bras 4803a <_Heap_Walk+0x320> ); return false; } if ( !prev_used ) { 47fd8: 4aae fffc tstl %fp@(-4) 47fdc: 660a bnes 47fe8 <_Heap_Walk+0x2ce> (*printer)( 47fde: 2f0c movel %a4,%sp@- 47fe0: 4879 0005 c731 pea 5c731 <_Copyright_Notice+0x3e3> 47fe6: 605e bras 48046 <_Heap_Walk+0x32c> 47fe8: 206b 0008 moveal %a3@(8),%a0 47fec: 6008 bras 47ff6 <_Heap_Walk+0x2dc> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 47fee: b9c8 cmpal %a0,%a4 47ff0: 673c beqs 4802e <_Heap_Walk+0x314> return true; } free_block = free_block->next; 47ff2: 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 ) { 47ff6: b7c8 cmpal %a0,%a3 47ff8: 66f4 bnes 47fee <_Heap_Walk+0x2d4> 47ffa: 6042 bras 4803e <_Heap_Walk+0x324> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 47ffc: 4aae fffc tstl %fp@(-4) 48000: 6716 beqs 48018 <_Heap_Walk+0x2fe> (*printer)( 48002: 2f03 movel %d3,%sp@- 48004: 2f0c movel %a4,%sp@- 48006: 4879 0005 c760 pea 5c760 <_Copyright_Notice+0x412> 4800c: 42a7 clrl %sp@- 4800e: 2f02 movel %d2,%sp@- 48010: 4e92 jsr %a2@ 48012: 4fef 0014 lea %sp@(20),%sp 48016: 6016 bras 4802e <_Heap_Walk+0x314> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 48018: 2f14 movel %a4@,%sp@- 4801a: 2f03 movel %d3,%sp@- 4801c: 2f0c movel %a4,%sp@- 4801e: 4879 0005 c777 pea 5c777 <_Copyright_Notice+0x429> 48024: 42a7 clrl %sp@- 48026: 2f02 movel %d2,%sp@- 48028: 4e92 jsr %a2@ 4802a: 4fef 0018 lea %sp@(24),%sp 4802e: 2847 moveal %d7,%a4 block->prev_size ); } block = next_block; } while ( block != first_block ); 48030: bbc7 cmpal %d7,%a5 48032: 6600 fe66 bnew 47e9a <_Heap_Walk+0x180> 48036: 6000 fd1c braw 47d54 <_Heap_Walk+0x3a> if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4803a: 4200 clrb %d0 4803c: 6016 bras 48054 <_Heap_Walk+0x33a> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4803e: 2f0c movel %a4,%sp@- 48040: 4879 0005 c79c pea 5c79c <_Copyright_Notice+0x44e> 48046: 4878 0001 pea 1 4804a: 2f02 movel %d2,%sp@- 4804c: 4e92 jsr %a2@ 4804e: 4fef 0010 lea %sp@(16),%sp 48052: 60e6 bras 4803a <_Heap_Walk+0x320> block = next_block; } while ( block != first_block ); return true; } 48054: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4805a: 4e5e unlk %fp ... =============================================================================== 000474f8 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 474f8: 4e56 ffe8 linkw %fp,#-24 474fc: 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 ); 47500: 4879 0004 900a pea 4900a <_User_extensions_Fatal_visitor> 47506: 262e 0008 movel %fp@(8),%d3 4750a: 486e fff6 pea %fp@(-10) 4750e: 242e 0010 movel %fp@(16),%d2 47512: 282e 000c movel %fp@(12),%d4 Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; 47516: 2d43 fff6 movel %d3,%fp@(-10) 4751a: 1d44 fffa moveb %d4,%fp@(-6) 4751e: 2d42 fffc movel %d2,%fp@(-4) _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); 47522: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47528: 7005 moveq #5,%d0 <== NOT EXECUTED _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; 4752a: 23c3 0005 dd52 movel %d3,5dd52 <_Internal_errors_What_happened><== NOT EXECUTED _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47530: 263c 0000 0700 movel #1792,%d3 <== NOT EXECUTED ) { _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; 47536: 13c4 0005 dd56 moveb %d4,5dd56 <_Internal_errors_What_happened+0x4><== NOT EXECUTED _Internal_errors_What_happened.the_error = the_error; 4753c: 23c2 0005 dd58 movel %d2,5dd58 <_Internal_errors_What_happened+0x6><== NOT EXECUTED 47542: 23c0 0005 dd5c movel %d0,5dd5c <_System_state_Current> <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47548: 40c0 movew %sr,%d0 <== NOT EXECUTED 4754a: 8083 orl %d3,%d0 <== NOT EXECUTED 4754c: 46c0 movew %d0,%sr <== NOT EXECUTED 4754e: 2002 movel %d2,%d0 <== NOT EXECUTED 47550: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47556: 4ac8 halt <== NOT EXECUTED 47558: 508f addql #8,%sp <== NOT EXECUTED 4755a: 60fe bras 4755a <_Internal_error_Occurred+0x62> <== NOT EXECUTED =============================================================================== 000475bc <_Objects_Allocate>: #endif Objects_Control *_Objects_Allocate( Objects_Information *information ) { 475bc: 4e56 fff0 linkw %fp,#-16 475c0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 475c4: 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 ) 475c8: 4aaa 0014 tstl %a2@(20) 475cc: 6604 bnes 475d2 <_Objects_Allocate+0x16> <== ALWAYS TAKEN return NULL; 475ce: 4280 clrl %d0 475d0: 6066 bras 47638 <_Objects_Allocate+0x7c> /* * 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 ); 475d2: 240a movel %a2,%d2 475d4: 0682 0000 001c addil #28,%d2 475da: 47f9 0004 6d04 lea 46d04 <_Chain_Get>,%a3 475e0: 2f02 movel %d2,%sp@- 475e2: 4e93 jsr %a3@ if ( information->auto_extend ) { 475e4: 588f addql #4,%sp 475e6: 4a2a 0010 tstb %a2@(16) 475ea: 674c beqs 47638 <_Objects_Allocate+0x7c> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 475ec: 4a80 tstl %d0 475ee: 6612 bnes 47602 <_Objects_Allocate+0x46> _Objects_Extend_information( information ); 475f0: 2f0a movel %a2,%sp@- 475f2: 4eb9 0004 7670 jsr 47670 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 475f8: 2f02 movel %d2,%sp@- 475fa: 4e93 jsr %a3@ } if ( the_object ) { 475fc: 508f addql #8,%sp 475fe: 4a80 tstl %d0 47600: 67cc beqs 475ce <_Objects_Allocate+0x12> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47602: 2040 moveal %d0,%a0 47604: 242a 0006 movel %a2@(6),%d2 47608: 2228 0008 movel %a0@(8),%d1 4760c: 0282 0000 ffff andil #65535,%d2 47612: 0281 0000 ffff andil #65535,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47618: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 4761c: 9282 subl %d2,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 4761e: 4282 clrl %d2 47620: 342a 0012 movew %a2@(18),%d2 47624: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; 47628: e589 lsll #2,%d1 4762a: d1c1 addal %d1,%a0 4762c: 5390 subql #1,%a0@ information->inactive--; 4762e: 322a 0028 movew %a2@(40),%d1 47632: 5381 subql #1,%d1 47634: 3541 0028 movew %d1,%a2@(40) ); } #endif return the_object; } 47638: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4763e: 4e5e unlk %fp ... =============================================================================== 00047644 <_Objects_Close>: void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47644: 4e56 0000 linkw %fp,#0 47648: 226e 000c moveal %fp@(12),%a1 4764c: 206e 0008 moveal %fp@(8),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 47650: 2029 0008 movel %a1@(8),%d0 47654: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47656: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 4765a: 0280 0000 ffff andil #65535,%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47660: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 47664: 245f moveal %sp@+,%a2 47666: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47668: 4ef9 0004 7b74 jmp 47b74 <_Objects_Namespace_remove> ... =============================================================================== 00047984 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 47984: 4e56 0000 linkw %fp,#0 47988: 2f03 movel %d3,%sp@- 4798a: 362e 000e movew %fp@(14),%d3 4798e: 2f02 movel %d2,%sp@- 47990: 242e 0008 movel %fp@(8),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47994: 4a43 tstw %d3 47996: 6604 bnes 4799c <_Objects_Get_information+0x18> return NULL; 47998: 4280 clrl %d0 4799a: 6034 bras 479d0 <_Objects_Get_information+0x4c> /* * 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 ); 4799c: 2f02 movel %d2,%sp@- 4799e: 4eb9 0004 aeb0 jsr 4aeb0 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 479a4: 588f addql #4,%sp 479a6: 4a80 tstl %d0 479a8: 67ee beqs 47998 <_Objects_Get_information+0x14> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 479aa: 0283 0000 ffff andil #65535,%d3 479b0: b083 cmpl %d3,%d0 479b2: 65e4 bcss 47998 <_Objects_Get_information+0x14> return NULL; if ( !_Objects_Information_table[ the_api ] ) 479b4: 41f9 0005 dbb2 lea 5dbb2 <_Objects_Information_table>,%a0 479ba: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 479be: 4a88 tstl %a0 479c0: 67d6 beqs 47998 <_Objects_Get_information+0x14> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 479c2: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0 if ( !info ) 479c6: 67d0 beqs 47998 <_Objects_Get_information+0x14> <== 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 ) 479c8: 2040 moveal %d0,%a0 479ca: 4a68 000e tstw %a0@(14) 479ce: 67c8 beqs 47998 <_Objects_Get_information+0x14> return NULL; #endif return info; } 479d0: 242e fff8 movel %fp@(-8),%d2 479d4: 262e fffc movel %fp@(-4),%d3 479d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054af8 <_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; 54af8: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 54afa: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 54afc: 4e56 0000 linkw %fp,#0 54b00: 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; 54b04: 90a8 0006 subl %a0@(6),%d0 54b08: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 54b0c: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 54b10: 226e 0010 moveal %fp@(16),%a1 * 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; if ( information->maximum >= index ) { 54b14: b081 cmpl %d1,%d0 54b16: 620e bhis 54b26 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 54b18: 2068 0018 moveal %a0@(24),%a0 54b1c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 54b20: 6704 beqs 54b26 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 54b22: 4291 clrl %a1@ return the_object; 54b24: 6006 bras 54b2c <_Objects_Get_no_protection+0x34> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 54b26: 7001 moveq #1,%d0 54b28: 2280 movel %d0,%a1@ return NULL; 54b2a: 4280 clrl %d0 } 54b2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004afcc <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4afcc: 4e56 fffc linkw %fp,#-4 4afd0: 222e 0008 movel %fp@(8),%d1 4afd4: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 4afd6: 4a81 tstl %d1 4afd8: 660a bnes 4afe4 <_Objects_Id_to_name+0x18> 4afda: 2079 0006 8e52 moveal 68e52 <_Per_CPU_Information+0xe>,%a0 4afe0: 2228 0008 movel %a0@(8),%d1 4afe4: 7418 moveq #24,%d2 4afe6: 2001 movel %d1,%d0 4afe8: e4a8 lsrl %d2,%d0 4afea: 143c 0007 moveb #7,%d2 4afee: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 4aff0: 143c 0002 moveb #2,%d2 4aff4: 2040 moveal %d0,%a0 4aff6: 5388 subql #1,%a0 4aff8: b488 cmpl %a0,%d2 4affa: 643a bccs 4b036 <_Objects_Id_to_name+0x6a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; 4affc: 7003 moveq #3,%d0 4affe: 6046 bras 4b046 <_Objects_Id_to_name+0x7a> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 4b000: 2001 movel %d1,%d0 4b002: 741b moveq #27,%d2 4b004: e4a8 lsrl %d2,%d0 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 4b006: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 4b00a: 67f0 beqs 4affc <_Objects_Id_to_name+0x30> <== 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 ); 4b00c: 486e fffc pea %fp@(-4) 4b010: 2f01 movel %d1,%sp@- 4b012: 2f00 movel %d0,%sp@- 4b014: 4eb9 0004 af6c jsr 4af6c <_Objects_Get> if ( !the_object ) 4b01a: 4fef 000c lea %sp@(12),%sp 4b01e: 4a80 tstl %d0 4b020: 67da beqs 4affc <_Objects_Id_to_name+0x30> return OBJECTS_INVALID_ID; *name = the_object->name; 4b022: 206e 000c moveal %fp@(12),%a0 4b026: 2240 moveal %d0,%a1 4b028: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 4b02c: 4eb9 0004 bc34 jsr 4bc34 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 4b032: 4280 clrl %d0 4b034: 6010 bras 4b046 <_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 ] ) 4b036: 41f9 0006 8c5e lea 68c5e <_Objects_Information_table>,%a0 4b03c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4b040: 4a88 tstl %a0 4b042: 66bc bnes 4b000 <_Objects_Id_to_name+0x34> 4b044: 60b6 bras 4affc <_Objects_Id_to_name+0x30> return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4b046: 242e fff8 movel %fp@(-8),%d2 4b04a: 4e5e unlk %fp ... =============================================================================== 00047b84 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 47b84: 4e56 fff4 linkw %fp,#-12 47b88: 226e 0008 moveal %fp@(8),%a1 47b8c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47b90: 222e 000c movel %fp@(12),%d1 47b94: 202e 0010 movel %fp@(16),%d0 47b98: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 47b9c: 4a8a tstl %a2 47b9e: 674a beqs 47bea <_Objects_Name_to_id_u32+0x66> <== NEVER TAKEN return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 47ba0: 4a81 tstl %d1 47ba2: 674a beqs 47bee <_Objects_Name_to_id_u32+0x6a> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 47ba4: 3429 000e movew %a1@(14),%d2 47ba8: 6744 beqs 47bee <_Objects_Name_to_id_u32+0x6a> 47baa: 4a80 tstl %d0 47bac: 672e beqs 47bdc <_Objects_Name_to_id_u32+0x58> (node == OBJECTS_SEARCH_ALL_NODES || 47bae: 0c80 7fff ffff cmpil #2147483647,%d0 47bb4: 6726 beqs 47bdc <_Objects_Name_to_id_u32+0x58> node == OBJECTS_SEARCH_LOCAL_NODE || 47bb6: 7601 moveq #1,%d3 47bb8: b680 cmpl %d0,%d3 47bba: 6720 beqs 47bdc <_Objects_Name_to_id_u32+0x58> 47bbc: 6030 bras 47bee <_Objects_Name_to_id_u32+0x6a> )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 47bbe: 2069 0018 moveal %a1@(24),%a0 47bc2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !the_object ) 47bc6: 4a88 tstl %a0 47bc8: 670e beqs 47bd8 <_Objects_Name_to_id_u32+0x54> continue; if ( name == the_object->name.name_u32 ) { 47bca: b2a8 000c cmpl %a0@(12),%d1 47bce: 6608 bnes 47bd8 <_Objects_Name_to_id_u32+0x54> *id = the_object->id; 47bd0: 24a8 0008 movel %a0@(8),%a2@ return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47bd4: 4280 clrl %d0 47bd6: 6018 bras 47bf0 <_Objects_Name_to_id_u32+0x6c> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 47bd8: 5280 addql #1,%d0 47bda: 6008 bras 47be4 <_Objects_Name_to_id_u32+0x60> search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || node == OBJECTS_SEARCH_LOCAL_NODE || 47bdc: 7001 moveq #1,%d0 _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 47bde: 0282 0000 ffff andil #65535,%d2 47be4: b480 cmpl %d0,%d2 47be6: 64d6 bccs 47bbe <_Objects_Name_to_id_u32+0x3a> 47be8: 6004 bras 47bee <_Objects_Name_to_id_u32+0x6a> #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 47bea: 7002 moveq #2,%d0 47bec: 6002 bras 47bf0 <_Objects_Name_to_id_u32+0x6c> if ( name == 0 ) return OBJECTS_INVALID_NAME; 47bee: 7001 moveq #1,%d0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 47bf0: 4cd7 040c moveml %sp@,%d2-%d3/%a2 47bf4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048796 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 48796: 4e56 ffec linkw %fp,#-20 4879a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4879e: 2a6e 0008 moveal %fp@(8),%a5 487a2: 246e 000c moveal %fp@(12),%a2 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 487a6: 4a8a tstl %a2 487a8: 6700 00fe beqw 488a8 <_RBTree_Extract_unprotected+0x112> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 487ac: b5ed 0008 cmpal %a5@(8),%a2 487b0: 6612 bnes 487c4 <_RBTree_Extract_unprotected+0x2e> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_RIGHT ); 487b2: 4878 0001 pea 1 487b6: 2f0a movel %a2,%sp@- 487b8: 4eb9 0004 8b28 jsr 48b28 <_RBTree_Next_unprotected> RBTree_Node *next; next = _RBTree_Successor_unprotected(the_node); the_rbtree->first[RBT_LEFT] = next; 487be: 508f addql #8,%sp 487c0: 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]) { 487c4: b5ed 000c cmpal %a5@(12),%a2 487c8: 6610 bnes 487da <_RBTree_Extract_unprotected+0x44> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected( const RBTree_Node *node ) { return _RBTree_Next_unprotected( node, RBT_LEFT ); 487ca: 42a7 clrl %sp@- 487cc: 2f0a movel %a2,%sp@- 487ce: 4eb9 0004 8b28 jsr 48b28 <_RBTree_Next_unprotected> RBTree_Node *previous; previous = _RBTree_Predecessor_unprotected(the_node); the_rbtree->first[RBT_RIGHT] = previous; 487d4: 508f addql #8,%sp 487d6: 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]) { 487da: 266a 0004 moveal %a2@(4),%a3 487de: 4a8b tstl %a3 487e0: 6776 beqs 48858 <_RBTree_Extract_unprotected+0xc2> 487e2: 4aaa 0008 tstl %a2@(8) 487e6: 6604 bnes 487ec <_RBTree_Extract_unprotected+0x56> 487e8: 6078 bras 48862 <_RBTree_Extract_unprotected+0xcc> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 487ea: 2640 moveal %d0,%a3 487ec: 202b 0008 movel %a3@(8),%d0 487f0: 66f8 bnes 487ea <_RBTree_Extract_unprotected+0x54> * 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]; 487f2: 286b 0004 moveal %a3@(4),%a4 if(leaf) { 487f6: 4a8c tstl %a4 487f8: 6704 beqs 487fe <_RBTree_Extract_unprotected+0x68> leaf->parent = target->parent; 487fa: 2893 movel %a3@,%a4@ 487fc: 6008 bras 48806 <_RBTree_Extract_unprotected+0x70> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 487fe: 2f0b movel %a3,%sp@- 48800: 4eba fe60 jsr %pc@(48662 <_RBTree_Extract_validate_unprotected>) 48804: 588f addql #4,%sp } victim_color = target->color; dir = target != target->parent->child[0]; 48806: 2053 moveal %a3@,%a0 48808: b7e8 0004 cmpal %a0@(4),%a3 4880c: 56c1 sne %d1 target->parent->child[dir] = leaf; 4880e: 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]; 48810: 49c1 extbl %d1 target->parent->child[dir] = leaf; 48812: 9481 subl %d1,%d2 48814: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 48818: 7401 moveq #1,%d2 victim_color = target->color; 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]; 4881a: 2052 moveal %a2@,%a0 4881c: b5e8 0004 cmpal %a0@(4),%a2 48820: 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; 48822: 202b 000c movel %a3@(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]; 48826: 49c1 extbl %d1 the_node->parent->child[dir] = target; 48828: 9481 subl %d1,%d2 4882a: 218b 2c00 movel %a3,%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]; 4882e: 276a 0008 0008 movel %a2@(8),%a3@(8) if (the_node->child[RBT_RIGHT]) 48834: 206a 0008 moveal %a2@(8),%a0 48838: 4a88 tstl %a0 4883a: 6702 beqs 4883e <_RBTree_Extract_unprotected+0xa8><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4883c: 208b movel %a3,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4883e: 276a 0004 0004 movel %a2@(4),%a3@(4) if (the_node->child[RBT_LEFT]) 48844: 206a 0004 moveal %a2@(4),%a0 48848: 4a88 tstl %a0 4884a: 6702 beqs 4884e <_RBTree_Extract_unprotected+0xb8> the_node->child[RBT_LEFT]->parent = target; 4884c: 208b movel %a3,%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; 4884e: 2692 movel %a2@,%a3@ target->color = the_node->color; 48850: 276a 000c 000c movel %a2@(12),%a3@(12) 48856: 602e bras 48886 <_RBTree_Extract_unprotected+0xf0> * 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]; 48858: 286a 0008 moveal %a2@(8),%a4 if( leaf ) { 4885c: 4a8c tstl %a4 4885e: 6604 bnes 48864 <_RBTree_Extract_unprotected+0xce> 48860: 6006 bras 48868 <_RBTree_Extract_unprotected+0xd2> * 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]) { 48862: 284b moveal %a3,%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; 48864: 2892 movel %a2@,%a4@ 48866: 6008 bras 48870 <_RBTree_Extract_unprotected+0xda> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 48868: 2f0a movel %a2,%sp@- 4886a: 4eba fdf6 jsr %pc@(48662 <_RBTree_Extract_validate_unprotected>) 4886e: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 48870: 2052 moveal %a2@,%a0 48872: b5e8 0004 cmpal %a0@(4),%a2 48876: 56c1 sne %d1 the_node->parent->child[dir] = leaf; 48878: 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]; 4887a: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4887c: 9481 subl %d1,%d2 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; 4887e: 202a 000c movel %a2@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 48882: 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 */ 48886: 4a80 tstl %d0 48888: 6608 bnes 48892 <_RBTree_Extract_unprotected+0xfc> if (leaf) { 4888a: 4a8c tstl %a4 4888c: 6704 beqs 48892 <_RBTree_Extract_unprotected+0xfc> leaf->color = RBT_BLACK; /* case 2 */ 4888e: 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; 48892: 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; 48896: 42aa 0008 clrl %a2@(8) 4889a: 42aa 0004 clrl %a2@(4) 4889e: 4292 clrl %a2@ 488a0: 4a88 tstl %a0 488a2: 6704 beqs 488a8 <_RBTree_Extract_unprotected+0x112> 488a4: 42a8 000c clrl %a0@(12) } 488a8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 488ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049458 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 49458: 4e56 fff0 linkw %fp,#-16 4945c: 202e 001c movel %fp@(28),%d0 49460: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 49464: 246e 0008 moveal %fp@(8),%a2 49468: 242e 0014 movel %fp@(20),%d2 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 4946c: 4a8a tstl %a2 4946e: 6736 beqs 494a6 <_RBTree_Initialize+0x4e> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 49470: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 49472: 256e 000c 0010 movel %fp@(12),%a2@(16) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 49478: 262e 0010 movel %fp@(16),%d3 RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 4947c: 42aa 0004 clrl %a2@(4) while ( count-- ) { _RBTree_Insert_unprotected(the_rbtree, next); 49480: 47f9 0004 9238 lea 49238 <_RBTree_Insert_unprotected>,%a3 the_rbtree->first[0] = NULL; 49486: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 4948a: 42aa 000c clrl %a2@(12) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; 4948e: 1540 0014 moveb %d0,%a2@(20) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49492: 600e bras 494a2 <_RBTree_Initialize+0x4a> _RBTree_Insert_unprotected(the_rbtree, next); 49494: 2f03 movel %d3,%sp@- 49496: 5382 subql #1,%d2 49498: 2f0a movel %a2,%sp@- 4949a: 4e93 jsr %a3@ 4949c: 508f addql #8,%sp #include #include #include #include void _RBTree_Initialize( 4949e: d6ae 0018 addl %fp@(24),%d3 /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 494a2: 4a82 tstl %d2 494a4: 66ee bnes 49494 <_RBTree_Initialize+0x3c> _RBTree_Insert_unprotected(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 494a6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 494ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004893c <_RBTree_Insert_unprotected>: */ RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4893c: 4e56 ffec linkw %fp,#-20 48940: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 48944: 266e 0008 moveal %fp@(8),%a3 48948: 246e 000c moveal %fp@(12),%a2 if(!the_node) return (RBTree_Node*)-1; 4894c: 4a8a tstl %a2 4894e: 6700 013a beqw 48a8a <_RBTree_Insert_unprotected+0x14e> RBTree_Node *iter_node = the_rbtree->root; 48952: 286b 0004 moveal %a3@(4),%a4 int compare_result; if (!iter_node) { /* special case: first node inserted */ 48956: 2a4c moveal %a4,%a5 48958: 4a8c tstl %a4 4895a: 6620 bnes 4897c <_RBTree_Insert_unprotected+0x40> the_node->color = RBT_BLACK; 4895c: 42aa 000c clrl %a2@(12) the_rbtree->root = the_node; 48960: 274a 0004 movel %a2,%a3@(4) the_rbtree->first[0] = the_rbtree->first[1] = the_node; 48964: 274a 000c movel %a2,%a3@(12) 48968: 274a 0008 movel %a2,%a3@(8) the_node->parent = (RBTree_Node *) the_rbtree; 4896c: 248b movel %a3,%a2@ the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 4896e: 42aa 0008 clrl %a2@(8) 48972: 42aa 0004 clrl %a2@(4) 48976: 6000 0126 braw 48a9e <_RBTree_Insert_unprotected+0x162> (dir && _RBTree_Is_greater(compare_result)) ) { the_rbtree->first[dir] = the_node; } break; } else { iter_node = iter_node->child[dir]; 4897a: 2a4c moveal %a4,%a5 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); 4897c: 2f0c movel %a4,%sp@- 4897e: 2f0a movel %a2,%sp@- 48980: 206b 0010 moveal %a3@(16),%a0 48984: 4e90 jsr %a0@ if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) ) 48986: 508f addql #8,%sp 48988: 4a2b 0014 tstb %a3@(20) 4898c: 6706 beqs 48994 <_RBTree_Insert_unprotected+0x58> 4898e: 4a80 tstl %d0 48990: 6700 010c beqw 48a9e <_RBTree_Insert_unprotected+0x162> return iter_node; RBTree_Direction dir = !_RBTree_Is_lesser( compare_result ); 48994: 2400 movel %d0,%d2 48996: 4682 notl %d2 48998: d482 addl %d2,%d2 4899a: 9582 subxl %d2,%d2 4899c: 4482 negl %d2 if (!iter_node->child[dir]) { 4899e: 2002 movel %d2,%d0 489a0: 5280 addql #1,%d0 489a2: 2874 0c00 moveal %a4@(00000000,%d0:l:4),%a4 489a6: 4a8c tstl %a4 489a8: 66d0 bnes 4897a <_RBTree_Insert_unprotected+0x3e> the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; 489aa: 42aa 0008 clrl %a2@(8) the_node->color = RBT_RED; 489ae: 7201 moveq #1,%d1 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; 489b0: 42aa 0004 clrl %a2@(4) the_node->color = RBT_RED; iter_node->child[dir] = the_node; 489b4: 2b8a 0c00 movel %a2,%a5@(00000000,%d0:l:4) the_node->parent = iter_node; 489b8: 248d movel %a5,%a2@ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 489ba: 2a42 moveal %d2,%a5 489bc: 548d addql #2,%a5 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; 489be: 2541 000c movel %d1,%a2@(12) iter_node->child[dir] = the_node; the_node->parent = iter_node; /* update min/max */ compare_result = the_rbtree->compare_function( 489c2: 2f33 dc00 movel %a3@(00000000,%a5:l:4),%sp@- 489c6: 2f0a movel %a2,%sp@- 489c8: 206b 0010 moveal %a3@(16),%a0 489cc: 4e90 jsr %a0@ the_node, _RBTree_First(the_rbtree, dir) ); if ( (!dir && _RBTree_Is_lesser(compare_result)) || 489ce: 508f addql #8,%sp 489d0: 4a82 tstl %d2 489d2: 6608 bnes 489dc <_RBTree_Insert_unprotected+0xa0> 489d4: 4a80 tstl %d0 489d6: 6c00 0092 bgew 48a6a <_RBTree_Insert_unprotected+0x12e> 489da: 6006 bras 489e2 <_RBTree_Insert_unprotected+0xa6> (dir && _RBTree_Is_greater(compare_result)) ) { 489dc: 4a80 tstl %d0 489de: 6f00 008a blew 48a6a <_RBTree_Insert_unprotected+0x12e> the_rbtree->first[dir] = the_node; 489e2: 278a dc00 movel %a2,%a3@(00000000,%a5:l:4) 489e6: 6000 0082 braw 48a6a <_RBTree_Insert_unprotected+0x12e> const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; 489ea: 4a8b tstl %a3 489ec: 671e beqs 48a0c <_RBTree_Insert_unprotected+0xd0><== NEVER TAKEN if(!(the_node->parent->parent->parent)) return NULL; 489ee: 4a93 tstl %a3@ 489f0: 671a beqs 48a0c <_RBTree_Insert_unprotected+0xd0><== NEVER TAKEN { 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]) 489f2: 226b 0004 moveal %a3@(4),%a1 489f6: b3c8 cmpal %a0,%a1 489f8: 6604 bnes 489fe <_RBTree_Insert_unprotected+0xc2> return the_node->parent->child[RBT_RIGHT]; 489fa: 226b 0008 moveal %a3@(8),%a1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 489fe: 4a89 tstl %a1 48a00: 670c beqs 48a0e <_RBTree_Insert_unprotected+0xd2> 48a02: 7001 moveq #1,%d0 48a04: b0a9 000c cmpl %a1@(12),%d0 48a08: 6604 bnes 48a0e <_RBTree_Insert_unprotected+0xd2> 48a0a: 6006 bras 48a12 <_RBTree_Insert_unprotected+0xd6> ) { 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; 48a0c: 93c9 subal %a1,%a1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 48a0e: 4280 clrl %d0 48a10: 6002 bras 48a14 <_RBTree_Insert_unprotected+0xd8> 48a12: 7001 moveq #1,%d0 while (_RBTree_Is_red(_RBTree_Parent(the_node))) { u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { 48a14: 4a80 tstl %d0 48a16: 6710 beqs 48a28 <_RBTree_Insert_unprotected+0xec> the_node->parent->color = RBT_BLACK; 48a18: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 48a1c: 7201 moveq #1,%d1 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; 48a1e: 42a9 000c clrl %a1@(12) g->color = RBT_RED; 48a22: 2741 000c movel %d1,%a3@(12) 48a26: 603e bras 48a66 <_RBTree_Insert_unprotected+0x12a> the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 48a28: b1eb 0004 cmpal %a3@(4),%a0 48a2c: 56c0 sne %d0 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]; 48a2e: b5e8 0004 cmpal %a0@(4),%a2 48a32: 56c1 sne %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 48a34: 49c0 extbl %d0 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]; 48a36: 2400 movel %d0,%d2 48a38: 49c1 extbl %d1 48a3a: 4482 negl %d2 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 48a3c: b081 cmpl %d1,%d0 48a3e: 670c beqs 48a4c <_RBTree_Insert_unprotected+0x110> _RBTree_Rotate(the_node->parent, pdir); 48a40: 2f02 movel %d2,%sp@- 48a42: 2f08 movel %a0,%sp@- 48a44: 4e95 jsr %a5@ the_node = the_node->child[pdir]; 48a46: 508f addql #8,%sp 48a48: 2472 2c04 moveal %a2@(00000004,%d2:l:4),%a2 } the_node->parent->color = RBT_BLACK; 48a4c: 2052 moveal %a2@,%a0 g->color = RBT_RED; 48a4e: 7001 moveq #1,%d0 /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 48a50: 7201 moveq #1,%d1 48a52: 9282 subl %d2,%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; 48a54: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 48a58: 2740 000c movel %d0,%a3@(12) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 48a5c: 2f01 movel %d1,%sp@- 48a5e: 2f0b movel %a3,%sp@- 48a60: 264a moveal %a2,%a3 48a62: 4e95 jsr %a5@ 48a64: 508f addql #8,%sp 48a66: 244b moveal %a3,%a2 48a68: 6004 bras 48a6e <_RBTree_Insert_unprotected+0x132> 48a6a: 4bfa fe74 lea %pc@(488e0 <_RBTree_Rotate>),%a5 _ISR_Disable( level ); return_node = _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); return return_node; } 48a6e: 2052 moveal %a2@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( const RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 48a70: 2650 moveal %a0@,%a3 48a72: 4a8b tstl %a3 48a74: 661a bnes 48a90 <_RBTree_Insert_unprotected+0x154> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 48a76: 4280 clrl %d0 RBTree_Node *u,*g; /* note: the insert root case is handled already */ /* if the parent is black, nothing needs to be done * otherwise may need to loop a few times */ while (_RBTree_Is_red(_RBTree_Parent(the_node))) { 48a78: 0800 0000 btst #0,%d0 48a7c: 6600 ff6c bnew 489ea <_RBTree_Insert_unprotected+0xae> /* 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; 48a80: 4a8b tstl %a3 48a82: 661a bnes 48a9e <_RBTree_Insert_unprotected+0x162> 48a84: 42aa 000c clrl %a2@(12) 48a88: 6014 bras 48a9e <_RBTree_Insert_unprotected+0x162> RBTree_Node *_RBTree_Insert_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { if(!the_node) return (RBTree_Node*)-1; 48a8a: 387c ffff moveaw #-1,%a4 48a8e: 600e bras 48a9e <_RBTree_Insert_unprotected+0x162> 48a90: 7001 moveq #1,%d0 48a92: b0a8 000c cmpl %a0@(12),%d0 48a96: 57c0 seq %d0 48a98: 49c0 extbl %d0 48a9a: 4480 negl %d0 48a9c: 60da bras 48a78 <_RBTree_Insert_unprotected+0x13c> /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } return (RBTree_Node*)0; } 48a9e: 200c movel %a4,%d0 48aa0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48aa6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ad4 <_RBTree_Iterate_unprotected>: RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 48ad4: 7202 moveq #2,%d1 const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg ) { 48ad6: 4e56 fff0 linkw %fp,#-16 48ada: 206e 0008 moveal %fp@(8),%a0 48ade: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48ae2: 262e 000c movel %fp@(12),%d3 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 48ae6: 57c0 seq %d0 bool stop = false; while ( !stop && current != NULL ) { stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); 48ae8: 45f9 0004 8b28 lea 48b28 <_RBTree_Next_unprotected>,%a2 48aee: 49c0 extbl %d0 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First( const RBTree_Control *the_rbtree, RBTree_Direction dir ) { return the_rbtree->first[dir]; 48af0: 9280 subl %d0,%d1 48af2: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2 48af6: 6020 bras 48b18 <_RBTree_Iterate_unprotected+0x44> 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 ); 48af8: 2f2e 0014 movel %fp@(20),%sp@- 48afc: 206e 0010 moveal %fp@(16),%a0 48b00: 2f03 movel %d3,%sp@- 48b02: 2f02 movel %d2,%sp@- 48b04: 4e90 jsr %a0@ current = _RBTree_Next_unprotected( current, dir ); 48b06: 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 ); 48b08: 1800 moveb %d0,%d4 current = _RBTree_Next_unprotected( current, dir ); 48b0a: 2f02 movel %d2,%sp@- 48b0c: 4e92 jsr %a2@ { RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir ); const RBTree_Node *current = _RBTree_First( rbtree, opp_dir ); bool stop = false; while ( !stop && current != NULL ) { 48b0e: 4fef 0014 lea %sp@(20),%sp stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); 48b12: 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 ) { 48b14: 4a04 tstb %d4 48b16: 6604 bnes 48b1c <_RBTree_Iterate_unprotected+0x48><== NEVER TAKEN 48b18: 4a82 tstl %d2 48b1a: 66dc bnes 48af8 <_RBTree_Iterate_unprotected+0x24> stop = (*visitor)( current, dir, visitor_arg ); current = _RBTree_Next_unprotected( current, dir ); } } 48b1c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48b22: 4e5e unlk %fp ... =============================================================================== 00048606 <_RBTree_Rotate>: */ RTEMS_INLINE_ROUTINE void _RBTree_Rotate( RBTree_Node *the_node, RBTree_Direction dir ) { 48606: 4e56 0000 linkw %fp,#0 4860a: 206e 0008 moveal %fp@(8),%a0 4860e: 2f0a movel %a2,%sp@- 48610: 202e 000c movel %fp@(12),%d0 48614: 2f02 movel %d2,%sp@- RBTree_Node *c; if (the_node == NULL) return; 48616: 4a88 tstl %a0 48618: 6740 beqs 4865a <_RBTree_Rotate+0x54> <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 4861a: 4a80 tstl %d0 4861c: 57c1 seq %d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 4861e: 7401 moveq #1,%d2 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); 48620: 49c1 extbl %d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; 48622: 9481 subl %d1,%d2 48624: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1 48628: 4a89 tstl %a1 4862a: 672e beqs 4865a <_RBTree_Rotate+0x54> <== NEVER TAKEN c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; 4862c: 5280 addql #1,%d0 4862e: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2 48632: 2192 2c00 movel %a2@,%a0@(00000000,%d2:l:4) if (c->child[dir]) 48636: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 4863a: 4a8a tstl %a2 4863c: 6702 beqs 48640 <_RBTree_Rotate+0x3a> c->child[dir]->parent = the_node; 4863e: 2488 movel %a0,%a2@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 48640: 2450 moveal %a0@,%a2 48642: 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; 48644: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 48648: b1ea 0004 cmpal %a2@(4),%a0 4864c: 56c0 sne %d0 c->parent = the_node->parent; 4864e: 228a movel %a2,%a1@ 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; 48650: 49c0 extbl %d0 48652: 9280 subl %d0,%d1 48654: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 48658: 2089 movel %a1,%a0@ } 4865a: 241f movel %sp@+,%d2 4865c: 245f moveal %sp@+,%a2 4865e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000485dc <_RBTree_Sibling>: * exists, and NULL if not. */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { 485dc: 4e56 0000 linkw %fp,#0 485e0: 226e 0008 moveal %fp@(8),%a1 if(!the_node) return NULL; 485e4: 4a89 tstl %a1 485e6: 6718 beqs 48600 <_RBTree_Sibling+0x24> <== NEVER TAKEN if(!(the_node->parent)) return NULL; 485e8: 2051 moveal %a1@,%a0 485ea: 4a88 tstl %a0 485ec: 6712 beqs 48600 <_RBTree_Sibling+0x24> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; 485ee: 4a90 tstl %a0@ 485f0: 670e beqs 48600 <_RBTree_Sibling+0x24> if(the_node == the_node->parent->child[RBT_LEFT]) 485f2: 2028 0004 movel %a0@(4),%d0 485f6: b089 cmpl %a1,%d0 485f8: 6608 bnes 48602 <_RBTree_Sibling+0x26> return the_node->parent->child[RBT_RIGHT]; 485fa: 2028 0008 movel %a0@(8),%d0 485fe: 6002 bras 48602 <_RBTree_Sibling+0x26> */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; 48600: 4280 clrl %d0 if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; else return the_node->parent->child[RBT_LEFT]; } 48602: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047028 <_RTEMS_signal_Post_switch_hook>: #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { 47028: 4e56 ffec linkw %fp,#-20 RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4702c: 206e 0008 moveal %fp@(8),%a0 #include #include #include static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing ) { 47030: 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 ]; 47034: 2468 00f8 moveal %a0@(248),%a2 if ( !api ) 47038: 4a8a tstl %a2 4703a: 6754 beqs 47090 <_RTEMS_signal_Post_switch_hook+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4703c: 203c 0000 0700 movel #1792,%d0 47042: 40c1 movew %sr,%d1 47044: 8081 orl %d1,%d0 47046: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 47048: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 4704c: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 47050: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 47052: 4a83 tstl %d3 47054: 673a beqs 47090 <_RTEMS_signal_Post_switch_hook+0x68> return; asr->nest_level += 1; 47056: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4705a: 240e movel %fp,%d2 4705c: 5982 subql #4,%d2 4705e: 47f9 0004 7434 lea 47434 ,%a3 47064: 2f02 movel %d2,%sp@- 47066: 2f3c 0000 ffff movel #65535,%sp@- 4706c: 2f2a 000e movel %a2@(14),%sp@- 47070: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 47072: 2f03 movel %d3,%sp@- 47074: 206a 000a moveal %a2@(10),%a0 47078: 4e90 jsr %a0@ asr->nest_level -= 1; 4707a: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4707e: 2f02 movel %d2,%sp@- 47080: 2f3c 0000 ffff movel #65535,%sp@- 47086: 2f2e fffc movel %fp@(-4),%sp@- 4708a: 4e93 jsr %a3@ 4708c: 4fef 001c lea %sp@(28),%sp } 47090: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 47096: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057ac0 <_Region_Process_queue>: #include void _Region_Process_queue( Region_Control *the_region ) { 57ac0: 4e56 ffe4 linkw %fp,#-28 * * 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; 57ac4: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0 ++level; 57aca: 5280 addql #1,%d0 57acc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 57ad0: 266e 0008 moveal %fp@(8),%a3 _Thread_Dispatch_disable_level = level; 57ad4: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level> * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57ada: 2f39 0007 60c6 movel 760c6 <_RTEMS_Allocator_Mutex>,%sp@- /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57ae0: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 57ae2: 260b movel %a3,%d3 57ae4: 0682 0000 0010 addil #16,%d2 57aea: 4bf9 0005 8158 lea 58158 <_Thread_queue_First>,%a5 57af0: 0683 0000 0068 addil #104,%d3 if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57af6: 49f9 0005 8054 lea 58054 <_Thread_queue_Extract>,%a4 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57afc: 4eb9 0005 315c jsr 5315c <_API_Mutex_Unlock> 57b02: 588f addql #4,%sp 57b04: 283c 0005 3b24 movel #342820,%d4 /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57b0a: 2f02 movel %d2,%sp@- 57b0c: 4e95 jsr %a5@ if ( the_thread == NULL ) 57b0e: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57b10: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 57b12: 4a80 tstl %d0 57b14: 672e beqs 57b44 <_Region_Process_queue+0x84> 57b16: 42a7 clrl %sp@- 57b18: 2044 moveal %d4,%a0 57b1a: 42a7 clrl %sp@- 57b1c: 2f2a 0024 movel %a2@(36),%sp@- 57b20: 2f03 movel %d3,%sp@- 57b22: 4e90 jsr %a0@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 57b24: 4fef 0010 lea %sp@(16),%sp 57b28: 4a80 tstl %d0 57b2a: 6718 beqs 57b44 <_Region_Process_queue+0x84> break; *(void **)the_thread->Wait.return_argument = the_segment; 57b2c: 206a 0028 moveal %a2@(40),%a0 57b30: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 57b32: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57b36: 2f0a movel %a2,%sp@- 57b38: 2f02 movel %d2,%sp@- 57b3a: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 57b3c: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 57b3e: 42aa 0034 clrl %a2@(52) } 57b42: 60c6 bras 57b0a <_Region_Process_queue+0x4a> _Thread_Enable_dispatch(); } 57b44: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 57b4a: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57b4c: 4ef9 0005 5774 jmp 55774 <_Thread_Enable_dispatch> ... =============================================================================== 000484a4 <_Scheduler_CBS_Allocate>: #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 484a4: 4e56 0000 linkw %fp,#0 484a8: 2f0a movel %a2,%sp@- void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 484aa: 4878 001c pea 1c #include void *_Scheduler_CBS_Allocate( Thread_Control *the_thread ) { 484ae: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_CBS_Per_thread *schinfo; sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread)); 484b2: 4eb9 0004 9b90 jsr 49b90 <_Workspace_Allocate> if ( sched ) { 484b8: 588f addql #4,%sp 484ba: 4a80 tstl %d0 484bc: 6712 beqs 484d0 <_Scheduler_CBS_Allocate+0x2c> <== NEVER TAKEN the_thread->scheduler_info = sched; 484be: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info); schinfo->edf_per_thread.thread = the_thread; 484c2: 2040 moveal %d0,%a0 schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 484c4: 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; 484c6: 208a movel %a2,%a0@ schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 484c8: 2141 0014 movel %d1,%a0@(20) schinfo->cbs_server = NULL; 484cc: 42a8 0018 clrl %a0@(24) } return sched; } 484d0: 246e fffc moveal %fp@(-4),%a2 484d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004996c <_Scheduler_CBS_Budget_callout>: Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { 4996c: 4e56 fffc linkw %fp,#-4 49970: 2f0a movel %a2,%sp@- 49972: 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; 49976: 202a 00a8 movel %a2@(168),%d0 if ( the_thread->real_priority != new_priority ) 4997a: b0aa 0018 cmpl %a2@(24),%d0 4997e: 6704 beqs 49984 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN the_thread->real_priority = new_priority; 49980: 2540 0018 movel %d0,%a2@(24) if ( the_thread->current_priority != new_priority ) 49984: b0aa 0014 cmpl %a2@(20),%d0 49988: 6712 beqs 4999c <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN _Thread_Change_priority(the_thread, new_priority, true); 4998a: 4878 0001 pea 1 4998e: 2f00 movel %d0,%sp@- 49990: 2f0a movel %a2,%sp@- 49992: 4eb9 0004 9ec0 jsr 49ec0 <_Thread_Change_priority> 49998: 4fef 000c lea %sp@(12),%sp /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; 4999c: 246a 0086 moveal %a2@(134),%a2 if ( sched_info->cbs_server->cbs_budget_overrun ) { 499a0: 206a 0018 moveal %a2@(24),%a0 499a4: 4aa8 000c tstl %a0@(12) 499a8: 671e beqs 499c8 <_Scheduler_CBS_Budget_callout+0x5c> _Scheduler_CBS_Get_server_id( 499aa: 486e fffc pea %fp@(-4) 499ae: 2f10 movel %a0@,%sp@- 499b0: 4eb9 0004 9930 jsr 49930 <_Scheduler_CBS_Get_server_id> sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); 499b6: 206a 0018 moveal %a2@(24),%a0 499ba: 2f2e fffc movel %fp@(-4),%sp@- 499be: 2068 000c moveal %a0@(12),%a0 499c2: 4e90 jsr %a0@ 499c4: 4fef 000c lea %sp@(12),%sp } } 499c8: 246e fff8 moveal %fp@(-8),%a2 499cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049640 <_Scheduler_CBS_Create_server>: int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { 49640: 4e56 fff4 linkw %fp,#-12 49644: 48d7 1c00 moveml %a2-%a4,%sp@ 49648: 246e 0008 moveal %fp@(8),%a2 4964c: 266e 0010 moveal %fp@(16),%a3 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || 49650: 4aaa 0004 tstl %a2@(4) 49654: 6f3e bles 49694 <_Scheduler_CBS_Create_server+0x54> 49656: 4a92 tstl %a2@ 49658: 6f3a bles 49694 <_Scheduler_CBS_Create_server+0x54> 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++ ) { 4965a: 2239 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d1 if ( !_Scheduler_CBS_Server_list[i] ) 49660: 4280 clrl %d0 49662: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0 49668: 6006 bras 49670 <_Scheduler_CBS_Create_server+0x30> 4966a: 4a98 tstl %a0@+ 4966c: 672e beqs 4969c <_Scheduler_CBS_Create_server+0x5c> 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++ ) { 4966e: 5280 addql #1,%d0 49670: b280 cmpl %d0,%d1 49672: 66f6 bnes 4966a <_Scheduler_CBS_Create_server+0x2a> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; 49674: 70e6 moveq #-26,%d0 49676: 6050 bras 496c8 <_Scheduler_CBS_Create_server+0x88> _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; 49678: 2012 movel %a2@,%d0 4967a: 222a 0004 movel %a2@(4),%d1 the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; 4967e: 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; 49684: 2140 0004 movel %d0,%a0@(4) 49688: 2141 0008 movel %d1,%a0@(8) the_server->task_id = -1; 4968c: 70ff moveq #-1,%d0 4968e: 2080 movel %d0,%a0@ the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; 49690: 4280 clrl %d0 49692: 6034 bras 496c8 <_Scheduler_CBS_Create_server+0x88> 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; 49694: 70ee moveq #-18,%d0 49696: 6030 bras 496c8 <_Scheduler_CBS_Create_server+0x88> *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; 49698: 70ef moveq #-17,%d0 <== NOT EXECUTED 4969a: 602c bras 496c8 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; 4969c: 2680 movel %d0,%a3@ _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 4969e: 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 *) 496a2: 2879 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a4 496a8: e588 lsll #2,%d0 496aa: d9c0 addal %d0,%a4 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); 496ac: 4eb9 0004 b094 jsr 4b094 <_Workspace_Allocate> the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) 496b2: 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 *) 496b4: 2880 movel %d0,%a4@ _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; 496b6: 2013 movel %a3@,%d0 496b8: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0 496be: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !the_server ) 496c2: 4a88 tstl %a0 496c4: 66b2 bnes 49678 <_Scheduler_CBS_Create_server+0x38><== ALWAYS TAKEN 496c6: 60d0 bras 49698 <_Scheduler_CBS_Create_server+0x58><== NOT EXECUTED the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } 496c8: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 496ce: 4e5e unlk %fp ... =============================================================================== 0004974c <_Scheduler_CBS_Detach_thread>: int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 4974c: 4e56 fff0 linkw %fp,#-16 49750: 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); 49754: 486e fffc pea %fp@(-4) int _Scheduler_CBS_Detach_thread ( Scheduler_CBS_Server_id server_id, rtems_id task_id ) { 49758: 242e 000c movel %fp@(12),%d2 4975c: 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); 49760: 2f02 movel %d2,%sp@- 49762: 4eb9 0004 a330 jsr 4a330 <_Thread_Get> /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 49768: 508f addql #8,%sp { Objects_Locations location; Thread_Control *the_thread; Scheduler_CBS_Per_thread *sched_info; the_thread = _Thread_Get(task_id, &location); 4976a: 2440 moveal %d0,%a2 /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { 4976c: 4a80 tstl %d0 4976e: 6706 beqs 49776 <_Scheduler_CBS_Detach_thread+0x2a> _Thread_Enable_dispatch(); 49770: 4eb9 0004 a310 jsr 4a310 <_Thread_Enable_dispatch> } if ( server_id >= _Scheduler_CBS_Maximum_servers ) 49776: b6b9 0005 f54c cmpl 5f54c <_Scheduler_CBS_Maximum_servers>,%d3 4977c: 643c bccs 497ba <_Scheduler_CBS_Detach_thread+0x6e> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !the_thread ) 4977e: 4a8a tstl %a2 49780: 6738 beqs 497ba <_Scheduler_CBS_Detach_thread+0x6e> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; /* Server is not valid. */ if ( !_Scheduler_CBS_Server_list[server_id] ) 49782: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0 49788: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 4978c: 4a88 tstl %a0 4978e: 6726 beqs 497b6 <_Scheduler_CBS_Detach_thread+0x6a> return SCHEDULER_CBS_ERROR_NOSERVER; /* Thread and server are not attached. */ if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id ) 49790: b490 cmpl %a0@,%d2 49792: 6626 bnes 497ba <_Scheduler_CBS_Detach_thread+0x6e><== NEVER TAKEN return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; _Scheduler_CBS_Server_list[server_id]->task_id = -1; 49794: 70ff moveq #-1,%d0 49796: 2080 movel %d0,%a0@ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; sched_info->cbs_server = NULL; 49798: 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; 4979c: 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; 4979e: 42a8 0018 clrl %a0@(24) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 497a2: 256a 009c 0076 movel %a2@(156),%a2@(118) the_thread->budget_callout = the_thread->Start.budget_callout; 497a8: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->is_preemptible = the_thread->Start.is_preemptible; 497ae: 156a 009a 0070 moveb %a2@(154),%a2@(112) 497b4: 6006 bras 497bc <_Scheduler_CBS_Detach_thread+0x70> 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; 497b6: 70e7 moveq #-25,%d0 497b8: 6002 bras 497bc <_Scheduler_CBS_Detach_thread+0x70> if ( the_thread ) { _Thread_Enable_dispatch(); } if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; 497ba: 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; } 497bc: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 497c2: 4e5e unlk %fp ... =============================================================================== 000499d0 <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { 499d0: 4e56 0000 linkw %fp,#0 unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 499d4: 2039 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d0 499da: e588 lsll #2,%d0 499dc: 2f00 movel %d0,%sp@- 499de: 4eb9 0004 b094 jsr 4b094 <_Workspace_Allocate> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 499e4: 588f addql #4,%sp } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( 499e6: 23c0 0006 0f22 movel %d0,60f22 <_Scheduler_CBS_Server_list> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) 499ec: 671e beqs 49a0c <_Scheduler_CBS_Initialize+0x3c> <== NEVER TAKEN return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { 499ee: 2239 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d1 499f4: 4280 clrl %d0 499f6: 600c bras 49a04 <_Scheduler_CBS_Initialize+0x34> _Scheduler_CBS_Server_list[i] = NULL; 499f8: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0 499fe: 42b0 0c00 clrl %a0@(00000000,%d0: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++) { 49a02: 5280 addql #1,%d0 49a04: b280 cmpl %d0,%d1 49a06: 66f0 bnes 499f8 <_Scheduler_CBS_Initialize+0x28> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; 49a08: 4280 clrl %d0 49a0a: 6002 bras 49a0e <_Scheduler_CBS_Initialize+0x3e> { 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; 49a0c: 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; } 49a0e: 4e5e unlk %fp ... =============================================================================== 000484d8 <_Scheduler_CBS_Release_job>: void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 484d8: 4e56 0000 linkw %fp,#0 484dc: 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; 484e0: 2268 0086 moveal %a0@(134),%a1 void _Scheduler_CBS_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 484e4: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = 484e8: 2269 0018 moveal %a1@(24),%a1 (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { 484ec: 6722 beqs 48510 <_Scheduler_CBS_Release_job+0x38> /* Initializing or shifting deadline. */ if (serv_info) 484ee: 4a89 tstl %a1 484f0: 6710 beqs 48502 <_Scheduler_CBS_Release_job+0x2a> new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) 484f2: 2039 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d0 484f8: d0a9 0004 addl %a1@(4),%d0 484fc: 0880 001f bclr #31,%d0 48500: 6016 bras 48518 <_Scheduler_CBS_Release_job+0x40> & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) 48502: 2239 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d1 48508: d081 addl %d1,%d0 4850a: 0880 001f bclr #31,%d0 4850e: 600e bras 4851e <_Scheduler_CBS_Release_job+0x46> & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 48510: 2028 00a8 movel %a0@(168),%d0 } /* Budget replenishment for the next job. */ if (serv_info) 48514: 4a89 tstl %a1 48516: 6706 beqs 4851e <_Scheduler_CBS_Release_job+0x46><== NEVER TAKEN the_thread->cpu_time_budget = serv_info->parameters.budget; 48518: 2169 0008 0072 movel %a1@(8),%a0@(114) the_thread->real_priority = new_priority; 4851e: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 48522: 4878 0001 pea 1 48526: 2f00 movel %d0,%sp@- 48528: 2f08 movel %a0,%sp@- 4852a: 4eb9 0004 893c jsr 4893c <_Thread_Change_priority> 48530: 4fef 000c lea %sp@(12),%sp } 48534: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048538 <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { 48538: 4e56 0000 linkw %fp,#0 4853c: 2f0a movel %a2,%sp@- 4853e: 246e 0008 moveal %fp@(8),%a2 48542: 2f02 movel %d2,%sp@- Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); 48544: 2f0a movel %a2,%sp@- 48546: 4eb9 0004 8638 jsr 48638 <_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; 4854c: 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) { 48550: 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; 48552: 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) { 48556: 4a88 tstl %a0 48558: 674c beqs 485a6 <_Scheduler_CBS_Unblock+0x6e> 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 - 4855a: 222a 0018 movel %a2@(24),%d1 4855e: 2401 movel %d1,%d2 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 48560: 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 - 48564: 2039 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d0 4856a: 9480 subl %d0,%d2 4856c: 2002 movel %d2,%d0 _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { 4856e: 4c11 0800 mulsl %a1@,%d0 48572: 43ea 0072 lea %a2@(114),%a1 48576: 2428 0008 movel %a0@(8),%d2 4857a: 4c11 2800 mulsl %a1@,%d2 4857e: b480 cmpl %d0,%d2 48580: 6c24 bges 485a6 <_Scheduler_CBS_Unblock+0x6e> /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; 48582: 202a 00a8 movel %a2@(168),%d0 if ( the_thread->real_priority != new_priority ) 48586: b081 cmpl %d1,%d0 48588: 6704 beqs 4858e <_Scheduler_CBS_Unblock+0x56> the_thread->real_priority = new_priority; 4858a: 2540 0018 movel %d0,%a2@(24) if ( the_thread->current_priority != new_priority ) 4858e: b0aa 0014 cmpl %a2@(20),%d0 48592: 6712 beqs 485a6 <_Scheduler_CBS_Unblock+0x6e> _Thread_Change_priority(the_thread, new_priority, true); 48594: 4878 0001 pea 1 48598: 2f00 movel %d0,%sp@- 4859a: 2f0a movel %a2,%sp@- 4859c: 4eb9 0004 893c jsr 4893c <_Thread_Change_priority> 485a2: 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, 485a6: 2079 0005 f32a moveal 5f32a <_Per_CPU_Information+0x12>,%a0 485ac: 2f28 0014 movel %a0@(20),%sp@- 485b0: 2f2a 0014 movel %a2@(20),%sp@- 485b4: 2079 0005 d990 moveal 5d990 <_Scheduler+0x30>,%a0 485ba: 4e90 jsr %a0@ 485bc: 508f addql #8,%sp 485be: 4a80 tstl %d0 485c0: 6f20 bles 485e2 <_Scheduler_CBS_Unblock+0xaa> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 485c2: 2079 0005 f326 moveal 5f326 <_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; 485c8: 23ca 0005 f32a movel %a2,5f32a <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 485ce: 4a28 0070 tstb %a0@(112) 485d2: 6606 bnes 485da <_Scheduler_CBS_Unblock+0xa2> 485d4: 4aaa 0014 tstl %a2@(20) 485d8: 6608 bnes 485e2 <_Scheduler_CBS_Unblock+0xaa> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 485da: 7001 moveq #1,%d0 485dc: 13c0 0005 f324 moveb %d0,5f324 <_Per_CPU_Information+0xc> } } 485e2: 242e fff8 movel %fp@(-8),%d2 485e6: 246e fffc moveal %fp@(-4),%a2 485ea: 4e5e unlk %fp ... =============================================================================== 000484a4 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 484a4: 4e56 0000 linkw %fp,#0 484a8: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 484aa: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 484ae: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 484b2: 4eb9 0004 9b08 jsr 49b08 <_Workspace_Allocate> if ( sched ) { 484b8: 588f addql #4,%sp 484ba: 4a80 tstl %d0 484bc: 670e beqs 484cc <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 484be: 2540 0086 movel %d0,%a2@(134) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 484c2: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 484c4: 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; 484c6: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 484c8: 2141 0014 movel %d1,%a0@(20) } return sched; } 484cc: 246e fffc moveal %fp@(-4),%a2 484d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048694 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 48694: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 48698: 206e 0008 moveal %fp@(8),%a0 4869c: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 486a2: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 486a4: 4ef9 0004 9bac jmp 49bac <_Workspace_Free> ... =============================================================================== 00048680 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 48680: 4e56 0000 linkw %fp,#0 48684: 2f0a movel %a2,%sp@- 48686: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 4868a: 2f0a movel %a2,%sp@- 4868c: 4eb9 0004 851c jsr 4851c <_Scheduler_EDF_Enqueue> 48692: 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( 48696: 2079 0005 f2aa moveal 5f2aa <_Per_CPU_Information+0x12>,%a0 4869c: 2f28 0014 movel %a0@(20),%sp@- 486a0: 2079 0005 d910 moveal 5d910 <_Scheduler+0x30>,%a0 486a6: 4e90 jsr %a0@ 486a8: 4fef 000c lea %sp@(12),%sp 486ac: 4a80 tstl %d0 486ae: 6c20 bges 486d0 <_Scheduler_EDF_Unblock+0x50> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 486b0: 2079 0005 f2a6 moveal 5f2a6 <_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; 486b6: 23ca 0005 f2aa movel %a2,5f2aa <_Per_CPU_Information+0x12> if ( _Thread_Executing->is_preemptible || 486bc: 4a28 0070 tstb %a0@(112) 486c0: 6606 bnes 486c8 <_Scheduler_EDF_Unblock+0x48> 486c2: 4aaa 0014 tstl %a2@(20) 486c6: 6608 bnes 486d0 <_Scheduler_EDF_Unblock+0x50> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 486c8: 7001 moveq #1,%d0 486ca: 13c0 0005 f2a4 moveb %d0,5f2a4 <_Per_CPU_Information+0xc> } } 486d0: 246e fffc moveal %fp@(-4),%a2 486d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d30 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 47d30: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 47d34: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 47d36: 2279 0005 c414 moveal 5c414 <_Scheduler+0x4>,%a1 47d3c: 4ed1 jmp %a1@ ... =============================================================================== 00047f08 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 47f08: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47f0c: 206e 0008 moveal %fp@(8),%a0 47f10: 2d68 0086 0008 movel %a0@(134),%fp@(8) } 47f16: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 47f18: 4ef9 0004 9418 jmp 49418 <_Workspace_Free> ... =============================================================================== 000482ac <_TOD_Set_with_timestamp>: #include void _TOD_Set_with_timestamp( const Timestamp_Control *tod ) { 482ac: 4e56 ffec linkw %fp,#-20 482b0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 482b4: 246e 0008 moveal %fp@(8),%a2 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 482b8: 47f9 0005 a434 lea 5a434 <__divdi3>,%a3 _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 482be: 2412 movel %a2@,%d2 482c0: 262a 0004 movel %a2@(4),%d3 static inline uint32_t _Timestamp64_implementation_Get_nanoseconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time % 1000000000L); 482c4: 2f3c 3b9a ca00 movel #1000000000,%sp@- 482ca: 42a7 clrl %sp@- 482cc: 2f03 movel %d3,%sp@- 482ce: 2f02 movel %d2,%sp@- 482d0: 4eb9 0005 a894 jsr 5a894 <__moddi3> 482d6: 4fef 0010 lea %sp@(16),%sp 482da: 2801 movel %d1,%d4 static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); 482dc: 2f3c 3b9a ca00 movel #1000000000,%sp@- 482e2: 42a7 clrl %sp@- 482e4: 2f03 movel %d3,%sp@- 482e6: 2f02 movel %d2,%sp@- 482e8: 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; 482ea: 2039 0006 0036 movel 60036 <_Thread_Dispatch_disable_level>,%d0 ++level; 482f0: 5280 addql #1,%d0 482f2: 4fef 0010 lea %sp@(16),%sp 482f6: 2401 movel %d1,%d2 _Thread_Dispatch_disable_level = level; 482f8: 23c0 0006 0036 movel %d0,60036 <_Thread_Dispatch_disable_level> 482fe: 2f3c 3b9a ca00 movel #1000000000,%sp@- 48304: 42a7 clrl %sp@- 48306: 2f39 0005 ffdc movel 5ffdc <_TOD+0x4>,%sp@- 4830c: 2f39 0005 ffd8 movel 5ffd8 <_TOD>,%sp@- 48312: 4e93 jsr %a3@ 48314: 4fef 0010 lea %sp@(16),%sp _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds_now = _TOD_Seconds_since_epoch(); if ( seconds_next < seconds_now ) 48318: b282 cmpl %d2,%d1 4831a: 630a blss 48326 <_TOD_Set_with_timestamp+0x7a> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 4831c: 9282 subl %d2,%d1 4831e: 2f01 movel %d1,%sp@- 48320: 4878 0001 pea 1 48324: 6006 bras 4832c <_TOD_Set_with_timestamp+0x80> 48326: 9481 subl %d1,%d2 48328: 2f02 movel %d2,%sp@- 4832a: 42a7 clrl %sp@- 4832c: 4879 0006 00c6 pea 600c6 <_Watchdog_Seconds_chain> 48332: 4eb9 0004 a4bc jsr 4a4bc <_Watchdog_Adjust> 48338: 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; 4833c: 2012 movel %a2@,%d0 4833e: 222a 0004 movel %a2@(4),%d1 _TOD.seconds_trigger = nanoseconds; 48342: 23c4 0005 ffe8 movel %d4,5ffe8 <_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; 48348: 23c0 0005 ffd8 movel %d0,5ffd8 <_TOD> 4834e: 23c1 0005 ffdc movel %d1,5ffdc <_TOD+0x4> _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 48354: 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; 4835a: 7201 moveq #1,%d1 _TOD_Activate(); _Thread_Enable_dispatch(); } 4835c: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now ); _TOD.now = *tod; _TOD.seconds_trigger = nanoseconds; _TOD.is_set = true; 4835e: 13c1 0005 ffec moveb %d1,5ffec <_TOD+0x14> _TOD_Activate(); _Thread_Enable_dispatch(); 48364: 4ef9 0004 994c jmp 4994c <_Thread_Enable_dispatch> ... =============================================================================== 00046c20 <_TOD_Validate>: ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 46c20: 43f9 0005 c2ae lea 5c2ae ,%a1 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c26: 4e56 0000 linkw %fp,#0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 46c2a: 203c 000f 4240 movel #1000000,%d0 }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 46c30: 2f03 movel %d3,%sp@- 46c32: 206e 0008 moveal %fp@(8),%a0 46c36: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 46c38: 4c51 0000 remul %a1@,%d0,%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46c3c: 4a88 tstl %a0 46c3e: 6758 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN 46c40: b0a8 0018 cmpl %a0@(24),%d0 46c44: 6352 blss 46c98 <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 46c46: 703b moveq #59,%d0 46c48: b0a8 0014 cmpl %a0@(20),%d0 46c4c: 654a bcss 46c98 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46c4e: b0a8 0010 cmpl %a0@(16),%d0 46c52: 6544 bcss 46c98 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46c54: 7217 moveq #23,%d1 46c56: b2a8 000c cmpl %a0@(12),%d1 46c5a: 653c bcss 46c98 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 46c5c: 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) || 46c60: 6736 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 46c62: 760c moveq #12,%d3 46c64: b680 cmpl %d0,%d3 46c66: 6530 bcss 46c98 <_TOD_Validate+0x78> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 46c68: 2410 movel %a0@,%d2 (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) || 46c6a: 0c82 0000 07c3 cmpil #1987,%d2 46c70: 6326 blss 46c98 <_TOD_Validate+0x78> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 46c72: 2228 0008 movel %a0@(8),%d1 (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) || 46c76: 6720 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 46c78: 163c 0003 moveb #3,%d3 46c7c: 41f9 0005 d638 lea 5d638 <_TOD_Days_per_month>,%a0 46c82: c483 andl %d3,%d2 46c84: 6606 bnes 46c8c <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46c86: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 46c8a: 6004 bras 46c90 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 46c8c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( the_tod->day > days_in_month ) 46c90: b081 cmpl %d1,%d0 46c92: 54c0 scc %d0 46c94: 4480 negl %d0 46c96: 6002 bras 46c9a <_TOD_Validate+0x7a> (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; 46c98: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46c9a: 241f movel %sp@+,%d2 46c9c: 261f movel %sp@+,%d3 46c9e: 4e5e unlk %fp ... =============================================================================== 00048228 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48228: 4e56 fff0 linkw %fp,#-16 4822c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48230: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 48234: 282a 0010 movel %a2@(16),%d4 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48238: 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 ); 4823c: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4823e: 162e 0013 moveb %fp@(19),%d3 /* * 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 ); 48242: 4eb9 0004 8e18 jsr 48e18 <_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 ) 48248: 588f addql #4,%sp 4824a: b4aa 0014 cmpl %a2@(20),%d2 4824e: 670c beqs 4825c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48250: 2f02 movel %d2,%sp@- 48252: 2f0a movel %a2,%sp@- 48254: 4eb9 0004 8dbc jsr 48dbc <_Thread_Set_priority> 4825a: 508f addql #8,%sp _ISR_Disable( level ); 4825c: 203c 0000 0700 movel #1792,%d0 48262: 40c2 movew %sr,%d2 48264: 8082 orl %d2,%d0 48266: 46c0 movew %d0,%sr 48268: 7204 moveq #4,%d1 /* * 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; 4826a: 202a 0010 movel %a2@(16),%d0 4826e: c284 andl %d4,%d1 if ( state != STATES_TRANSIENT ) { 48270: 7804 moveq #4,%d4 48272: b880 cmpl %d0,%d4 48274: 672e beqs 482a4 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 48276: 4a81 tstl %d1 48278: 6608 bnes 48282 <_Thread_Change_priority+0x5a> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4827a: 72fb moveq #-5,%d1 4827c: c280 andl %d0,%d1 4827e: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 48282: 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); 48284: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 4828a: 676c beqs 482f8 <_Thread_Change_priority+0xd0> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 4828c: 2d4a 000c movel %a2,%fp@(12) 48290: 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 ); } 48296: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4829c: 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 ); 4829e: 4ef9 0004 8d20 jmp 48d20 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 482a4: 4a81 tstl %d1 482a6: 661e bnes 482c6 <_Thread_Change_priority+0x9e> <== 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 ); 482a8: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 482ac: 4a03 tstb %d3 482ae: 670a beqs 482ba <_Thread_Change_priority+0x92> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 482b0: 2f0a movel %a2,%sp@- 482b2: 2079 0005 c438 moveal 5c438 <_Scheduler+0x28>,%a0 482b8: 6008 bras 482c2 <_Thread_Change_priority+0x9a> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 482ba: 2079 0005 c434 moveal 5c434 <_Scheduler+0x24>,%a0 482c0: 2f0a movel %a2,%sp@- 482c2: 4e90 jsr %a0@ 482c4: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 482c6: 203c 0000 0700 movel #1792,%d0 482cc: 46c2 movew %d2,%sr 482ce: 8082 orl %d2,%d0 482d0: 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(); 482d2: 2079 0005 c418 moveal 5c418 <_Scheduler+0x8>,%a0 482d8: 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 ); 482da: 2079 0005 dd6e moveal 5dd6e <_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() && 482e0: b1f9 0005 dd72 cmpal 5dd72 <_Per_CPU_Information+0x12>,%a0 482e6: 670e beqs 482f6 <_Thread_Change_priority+0xce> 482e8: 4a28 0070 tstb %a0@(112) 482ec: 6708 beqs 482f6 <_Thread_Change_priority+0xce> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 482ee: 7801 moveq #1,%d4 482f0: 13c4 0005 dd6c moveb %d4,5dd6c <_Per_CPU_Information+0xc> _ISR_Enable( level ); 482f6: 46c2 movew %d2,%sr } 482f8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 482fe: 4e5e unlk %fp ... =============================================================================== 000484d0 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 484d0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 484d4: 486e fffc pea %fp@(-4) 484d8: 2f2e 0008 movel %fp@(8),%sp@- 484dc: 4eb9 0004 8698 jsr 48698 <_Thread_Get> switch ( location ) { 484e2: 508f addql #8,%sp 484e4: 4aae fffc tstl %fp@(-4) 484e8: 661e bnes 48508 <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 484ea: 2f3c 1000 0018 movel #268435480,%sp@- 484f0: 2f00 movel %d0,%sp@- 484f2: 4eb9 0004 8304 jsr 48304 <_Thread_Clear_state> 484f8: 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; 484fa: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0 --level; 48500: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 48502: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48508: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004850c <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { 4850c: 4e56 ffd0 linkw %fp,#-48 48510: 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 ); 48514: 283c 0000 0700 movel #1792,%d4 4851a: 2204 movel %d4,%d1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 4851c: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 48522: 40c0 movew %sr,%d0 48524: 8280 orl %d0,%d1 48526: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 48528: 240e movel %fp,%d2 4852a: 5182 subql #8,%d2 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); 4852c: 2a3c 0004 70cc movel #291020,%d5 if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 48532: 49f9 0004 9468 lea 49468 <_CPU_Context_switch>,%a4 #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 ); 48538: 4bf9 0004 95d0 lea 495d0 <_CPU_Context_restore_fp>,%a5 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #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 ); 4853e: 263c 0004 95ae movel #300462,%d3 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 48544: 6000 0104 braw 4864a <_Thread_Dispatch+0x13e> * 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; 48548: 7201 moveq #1,%d1 heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 4854a: 4206 clrb %d6 * 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; 4854c: 2679 0005 dd72 moveal 5dd72 <_Per_CPU_Information+0x12>,%a3 48552: 23c1 0005 dbf6 movel %d1,5dbf6 <_Thread_Dispatch_disable_level> #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; 48558: 13c6 0005 dd6c moveb %d6,5dd6c <_Per_CPU_Information+0xc> _Thread_Executing = heir; 4855e: 23cb 0005 dd6e movel %a3,5dd6e <_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 ) 48564: b5cb cmpal %a3,%a2 48566: 6612 bnes 4857a <_Thread_Dispatch+0x6e> 48568: 42b9 0005 dbf6 clrl 5dbf6 <_Thread_Dispatch_disable_level> post_switch: #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 0 ); #endif _ISR_Enable( level ); 4856e: 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; 48570: 2679 0005 dc6a moveal 5dc6a <_API_extensions_Post_switch_list>,%a3 48576: 6000 00ec braw 48664 <_Thread_Dispatch+0x158> */ #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 ) 4857a: 7201 moveq #1,%d1 4857c: b2ab 0076 cmpl %a3@(118),%d1 48580: 660a bnes 4858c <_Thread_Dispatch+0x80> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 48582: 41f9 0005 dbae lea 5dbae <_Thread_Ticks_per_timeslice>,%a0 48588: 2750 0072 movel %a0@,%a3@(114) _ISR_Enable( level ); 4858c: 46c0 movew %d0,%sr 4858e: 4879 0005 dba0 pea 5dba0 <_TOD+0x8> 48594: 2245 moveal %d5,%a1 48596: 2f02 movel %d2,%sp@- 48598: 4e91 jsr %a1@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4859a: 508f addql #8,%sp #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 4859c: 206e fff8 moveal %fp@(-8),%a0 485a0: 226e fffc moveal %fp@(-4),%a1 const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; 485a4: 2008 movel %a0,%d0 485a6: 2209 movel %a1,%d1 485a8: 2c39 0005 dd7a movel 5dd7a <_Per_CPU_Information+0x1a>,%d6 485ae: 92b9 0005 dd7e subl 5dd7e <_Per_CPU_Information+0x1e>,%d1 485b4: 9186 subxl %d6,%d0 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; 485b6: d3aa 0082 addl %d1,%a2@(130) 485ba: 2c2a 007e movel %a2@(126),%d6 485be: dd80 addxl %d0,%d6 485c0: 2546 007e movel %d6,%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; 485c4: 23c8 0005 dd7a movel %a0,5dd7a <_Per_CPU_Information+0x1a> 485ca: 23c9 0005 dd7e movel %a1,5dd7e <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 485d0: 2079 0005 dc66 moveal 5dc66 <_Thread_libc_reent>,%a0 485d6: 4a88 tstl %a0 485d8: 6708 beqs 485e2 <_Thread_Dispatch+0xd6> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 485da: 2550 00f4 movel %a0@,%a2@(244) *_Thread_libc_reent = heir->libc_reent; 485de: 20ab 00f4 movel %a3@(244),%a0@ 485e2: 2c39 0005 c538 movel 5c538 <_User_extensions_Switches_list>,%d6 485e8: 6012 bras 485fc <_Thread_Dispatch+0xf0> while ( node != tail ) { const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); 485ea: 2f0b movel %a3,%sp@- 485ec: 2246 moveal %d6,%a1 485ee: 2f0a movel %a2,%sp@- 485f0: 2069 0008 moveal %a1@(8),%a0 485f4: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 485f6: 508f addql #8,%sp 485f8: 2046 moveal %d6,%a0 485fa: 2c10 movel %a0@,%d6 { 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 ) { 485fc: 0c86 0005 c53c cmpil #378172,%d6 48602: 66e6 bnes 485ea <_Thread_Dispatch+0xde> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 48604: 486b 00bc pea %a3@(188) 48608: 486a 00bc pea %a2@(188) 4860c: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4860e: 508f addql #8,%sp 48610: 4aaa 00f0 tstl %a2@(240) 48614: 6726 beqs 4863c <_Thread_Dispatch+0x130> #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 ); 48616: 2079 0005 dc62 moveal 5dc62 <_Thread_Allocated_fp>,%a0 4861c: b1ca cmpal %a2,%a0 4861e: 671c beqs 4863c <_Thread_Dispatch+0x130> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 48620: 4a88 tstl %a0 48622: 670a beqs 4862e <_Thread_Dispatch+0x122> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 48624: 4868 00f0 pea %a0@(240) 48628: 2243 moveal %d3,%a1 4862a: 4e91 jsr %a1@ 4862c: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 4862e: 486a 00f0 pea %a2@(240) 48632: 4e95 jsr %a5@ _Thread_Allocated_fp = executing; 48634: 588f addql #4,%sp 48636: 23ca 0005 dc62 movel %a2,5dc62 <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 4863c: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2 _ISR_Disable( level ); 48642: 2204 movel %d4,%d1 48644: 40c0 movew %sr,%d0 48646: 8280 orl %d0,%d1 48648: 46c1 movew %d1,%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 ) { 4864a: 1239 0005 dd6c moveb 5dd6c <_Per_CPU_Information+0xc>,%d1 48650: 6600 fef6 bnew 48548 <_Thread_Dispatch+0x3c> 48654: 6000 ff12 braw 48568 <_Thread_Dispatch+0x5c> while ( node != tail ) { const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); 48658: 2f0a movel %a2,%sp@- 4865a: 206b 0008 moveal %a3@(8),%a0 4865e: 4e90 jsr %a0@ #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } 48660: 2653 moveal %a3@,%a3 48662: 588f addql #4,%sp { 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 ) { 48664: b7fc 0005 dc6e cmpal #384110,%a3 4866a: 66ec bnes 48658 <_Thread_Dispatch+0x14c> 4866c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 48672: 4e5e unlk %fp ... =============================================================================== 0004c1a4 <_Thread_Handler>: #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { 4c1a4: 4e56 0000 linkw %fp,#0 4c1a8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4c1aa: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2 #define INIT_NAME __main #define EXECUTE_GLOBAL_CONSTRUCTORS #endif void _Thread_Handler( void ) { 4c1b0: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4c1b2: 222a 00a4 movel %a2@(164),%d1 _ISR_Set_level(level); 4c1b6: 40c0 movew %sr,%d0 4c1b8: e189 lsll #8,%d1 4c1ba: 0280 0000 f8ff andil #63743,%d0 4c1c0: 8081 orl %d1,%d0 4c1c2: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4c1c4: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4c1c6: 1439 0005 d3f8 moveb 5d3f8 ,%d2 doneConstructors = true; 4c1cc: 13c0 0005 d3f8 moveb %d0,5d3f8 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4c1d2: 4aaa 00f0 tstl %a2@(240) 4c1d6: 6720 beqs 4c1f8 <_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 ); 4c1d8: 2079 0005 dc62 moveal 5dc62 <_Thread_Allocated_fp>,%a0 4c1de: b1ca cmpal %a2,%a0 4c1e0: 6716 beqs 4c1f8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4c1e2: 4a88 tstl %a0 4c1e4: 670c beqs 4c1f2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4c1e6: 4868 00f0 pea %a0@(240) 4c1ea: 4eb9 0004 95ae jsr 495ae <_CPU_Context_save_fp> 4c1f0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4c1f2: 23ca 0005 dc62 movel %a2,5dc62 <_Thread_Allocated_fp> ); } static inline void _User_extensions_Thread_begin( Thread_Control *executing ) { _User_extensions_Iterate( 4c1f8: 4879 0004 8fda pea 48fda <_User_extensions_Thread_begin_visitor> 4c1fe: 2f0a movel %a2,%sp@- 4c200: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate> _User_extensions_Thread_begin( executing ); /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4c206: 4eb9 0004 8678 jsr 48678 <_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) */ { 4c20c: 508f addql #8,%sp 4c20e: 4a02 tstb %d2 4c210: 6606 bnes 4c218 <_Thread_Handler+0x74> INIT_NAME (); 4c212: 4eb9 0005 a598 jsr 5a598 <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4c218: 4aaa 008e tstl %a2@(142) 4c21c: 6610 bnes 4c22e <_Thread_Handler+0x8a> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4c21e: 2f2a 0096 movel %a2@(150),%sp@- 4c222: 206a 008a moveal %a2@(138),%a0 4c226: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4c228: 588f addql #4,%sp 4c22a: 2540 0028 movel %d0,%a2@(40) } } static inline void _User_extensions_Thread_exitted( Thread_Control *executing ) { _User_extensions_Iterate( 4c22e: 4879 0004 8ff2 pea 48ff2 <_User_extensions_Thread_exitted_visitor> 4c234: 2f0a movel %a2,%sp@- 4c236: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate> * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); _Internal_error_Occurred( 4c23c: 4878 0005 pea 5 4c240: 4878 0001 pea 1 4c244: 42a7 clrl %sp@- 4c246: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred> =============================================================================== 000488c8 <_Thread_Handler_initialization>: #if defined(RTEMS_SMP) #include #endif void _Thread_Handler_initialization(void) { 488c8: 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 = 488cc: 2079 0005 a7e8 moveal 5a7e8 ,%a0 #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies = _Configuration_MP_table->maximum_proxies; #endif if ( rtems_configuration_get_stack_allocate_hook() == NULL || 488d2: 4ab9 0005 a7ec tstl 5a7ec 488d8: 6708 beqs 488e2 <_Thread_Handler_initialization+0x1a><== NEVER TAKEN 488da: 4ab9 0005 a7f0 tstl 5a7f0 488e0: 6610 bnes 488f2 <_Thread_Handler_initialization+0x2a> rtems_configuration_get_stack_free_hook() == NULL) _Internal_error_Occurred( 488e2: 4878 000e pea e 488e6: 4878 0001 pea 1 488ea: 42a7 clrl %sp@- 488ec: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); if ( stack_allocate_init_hook != NULL ) 488f2: 4a88 tstl %a0 488f4: 670a beqs 48900 <_Thread_Handler_initialization+0x38> (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); 488f6: 2f39 0005 a7c8 movel 5a7c8 ,%sp@- 488fc: 4e90 jsr %a0@ 488fe: 588f addql #4,%sp #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 48900: 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; 48904: 41f9 0005 a7cc lea 5a7cc ,%a0 4890a: 23d0 0005 dc76 movel %a0@,5dc76 <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 48910: 41f9 0005 a7d8 lea 5a7d8 ,%a0 48916: 23d0 0005 dbae movel %a0@,5dbae <_Thread_Ticks_per_timeslice> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 4891c: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4891e: 42a7 clrl %sp@- 48920: 4878 0108 pea 108 48924: 4878 0001 pea 1 48928: 4878 0001 pea 1 4892c: 4878 0001 pea 1 48930: 4879 0005 dce2 pea 5dce2 <_Thread_Internal_information> ); if ( stack_allocate_init_hook != NULL ) (*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() ); _Thread_Dispatch_necessary = false; 48936: 13c0 0005 dd6c moveb %d0,5dd6c <_Per_CPU_Information+0xc> _Thread_Executing = NULL; 4893c: 42b9 0005 dd6e clrl 5dd6e <_Per_CPU_Information+0xe> _Thread_Heir = NULL; 48942: 42b9 0005 dd72 clrl 5dd72 <_Per_CPU_Information+0x12> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 48948: 42b9 0005 dc62 clrl 5dc62 <_Thread_Allocated_fp> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4894e: 4eb9 0004 7a94 jsr 47a94 <_Objects_Initialize_information> 48954: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 48958: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000493b8 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 493b8: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 493ba: 4e56 0000 linkw %fp,#0 493be: 2f0a movel %a2,%sp@- 493c0: 246e 0008 moveal %fp@(8),%a2 493c4: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 493c8: 666e bnes 49438 <_Thread_Restart+0x80> _Thread_Set_transient( the_thread ); 493ca: 2f0a movel %a2,%sp@- 493cc: 4eb9 0004 94a0 jsr 494a0 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 493d2: 2f2e 0010 movel %fp@(16),%sp@- 493d6: 2f2e 000c movel %fp@(12),%sp@- 493da: 2f0a movel %a2,%sp@- 493dc: 4eb9 0004 b824 jsr 4b824 <_Thread_Reset> _Thread_Load_environment( the_thread ); 493e2: 2f0a movel %a2,%sp@- 493e4: 4eb9 0004 b560 jsr 4b560 <_Thread_Load_environment> _Thread_Ready( the_thread ); 493ea: 2f0a movel %a2,%sp@- 493ec: 4eb9 0004 b7f4 jsr 4b7f4 <_Thread_Ready> ); } static inline void _User_extensions_Thread_restart( Thread_Control *restarted ) { _User_extensions_Iterate( 493f2: 4879 0004 964a pea 4964a <_User_extensions_Thread_restart_visitor> 493f8: 2f0a movel %a2,%sp@- 493fa: 4eb9 0004 96c2 jsr 496c2 <_User_extensions_Iterate> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 49400: 4fef 0020 lea %sp@(32),%sp _Thread_Restart_self(); return true; 49404: 7001 moveq #1,%d0 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) 49406: b5f9 0005 e626 cmpal 5e626 <_Per_CPU_Information+0xe>,%a2 4940c: 662c bnes 4943a <_Thread_Restart+0x82> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4940e: 4aaa 00f0 tstl %a2@(240) 49412: 670c beqs 49420 <_Thread_Restart+0x68> _Context_Restore_fp( &_Thread_Executing->fp_context ); 49414: 486a 00f0 pea %a2@(240) 49418: 4eb9 0004 9c58 jsr 49c58 <_CPU_Context_restore_fp> 4941e: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 49420: 2079 0005 e626 moveal 5e626 <_Per_CPU_Information+0xe>,%a0 49426: 41e8 00bc lea %a0@(188),%a0 4942a: 2f08 movel %a0,%sp@- 4942c: 4eb9 0004 9b06 jsr 49b06 <_CPU_Context_Restart_self> 49432: 588f addql #4,%sp <== NOT EXECUTED _Thread_Restart_self(); return true; 49434: 7001 moveq #1,%d0 <== NOT EXECUTED 49436: 6002 bras 4943a <_Thread_Restart+0x82> <== NOT EXECUTED } return false; 49438: 4200 clrb %d0 } 4943a: 246e fffc moveal %fp@(-4),%a2 4943e: 4e5e unlk %fp ... =============================================================================== 000481d8 <_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 ) ) { 481d8: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 481da: 4e56 0000 linkw %fp,#0 481de: 202e 0010 movel %fp@(16),%d0 481e2: 2f0a movel %a2,%sp@- 481e4: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 481e8: 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 ) ) { 481ec: b2aa 0050 cmpl %a2@(80),%d1 481f0: 6618 bnes 4820a <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 481f2: 123c 0003 moveb #3,%d1 481f6: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 481fa: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 481fc: 486a 0048 pea %a2@(72) 48200: 4eb9 0004 923c jsr 4923c <_Watchdog_Remove> 48206: 588f addql #4,%sp 48208: 6002 bras 4820c <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 4820a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4820c: 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 } 48210: 246e fffc moveal %fp@(-4),%a2 48214: 203c 1007 fff8 movel #268959736,%d0 4821a: 2d40 000c movel %d0,%fp@(12) 4821e: 4e5e unlk %fp 48220: 4ef9 0004 8304 jmp 48304 <_Thread_Clear_state> ... =============================================================================== 00048b2c <_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 ) { 48b2c: 4e56 ffdc linkw %fp,#-36 48b30: 206e 000c moveal %fp@(12),%a0 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 ); 48b34: 43e8 003c lea %a0@(60),%a1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 48b38: 2028 0014 movel %a0@(20),%d0 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 48b3c: 2200 movel %d0,%d1 48b3e: ec89 lsrl #6,%d1 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 48b40: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ _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 ]; 48b44: 2401 movel %d1,%d2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48b46: 49e8 0038 lea %a0@(56),%a4 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 48b4a: 2a3c 0000 0700 movel #1792,%d5 _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 ]; 48b50: e58a lsll #2,%d2 48b52: e989 lsll #4,%d1 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 48b54: 246e 0008 moveal %fp@(8),%a2 _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 ]; 48b58: 9282 subl %d2,%d1 48b5a: 47f2 1800 lea %a2@(00000000,%d1:l),%a3 block_state = the_thread_queue->state; 48b5e: 282a 0038 movel %a2@(56),%d4 Chain_Node *tail = _Chain_Tail( the_chain ); 48b62: 2149 0038 movel %a1,%a0@(56) head->next = tail; head->previous = NULL; 48b66: 42a8 003c clrl %a0@(60) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48b6a: 214c 0040 movel %a4,%a0@(64) if ( _Thread_queue_Is_reverse_search( priority ) ) 48b6e: 0800 0005 btst #5,%d0 48b72: 665a bnes 48bce <_Thread_queue_Enqueue_priority+0xa2> 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 )); 48b74: 2e0b movel %a3,%d7 48b76: 5887 addql #4,%d7 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 48b78: 2405 movel %d5,%d2 48b7a: 40c1 movew %sr,%d1 48b7c: 8481 orl %d1,%d2 48b7e: 46c2 movew %d2,%sr 48b80: 2401 movel %d1,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 48b82: 2253 moveal %a3@,%a1 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 48b84: 76ff moveq #-1,%d3 _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 48b86: 601e bras 48ba6 <_Thread_queue_Enqueue_priority+0x7a> search_priority = search_thread->current_priority; 48b88: 2629 0014 movel %a1@(20),%d3 if ( priority <= search_priority ) 48b8c: b680 cmpl %d0,%d3 48b8e: 641a bccs 48baa <_Thread_queue_Enqueue_priority+0x7e> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 48b90: 2c05 movel %d5,%d6 48b92: 46c1 movew %d1,%sr 48b94: 8c81 orl %d1,%d6 48b96: 46c6 movew %d6,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 48b98: 2c04 movel %d4,%d6 48b9a: cca9 0010 andl %a1@(16),%d6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48b9e: 6604 bnes 48ba4 <_Thread_queue_Enqueue_priority+0x78><== ALWAYS TAKEN _ISR_Enable( level ); 48ba0: 46c1 movew %d1,%sr <== NOT EXECUTED goto restart_forward_search; 48ba2: 60d4 bras 48b78 <_Thread_queue_Enqueue_priority+0x4c><== NOT EXECUTED } search_thread = 48ba4: 2251 moveal %a1@,%a1 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 ) ) { 48ba6: be89 cmpl %a1,%d7 48ba8: 66de bnes 48b88 <_Thread_queue_Enqueue_priority+0x5c> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 48baa: 7801 moveq #1,%d4 48bac: b8aa 0030 cmpl %a2@(48),%d4 48bb0: 6600 009e bnew 48c50 <_Thread_queue_Enqueue_priority+0x124> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48bb4: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 48bb8: b680 cmpl %d0,%d3 48bba: 6778 beqs 48c34 <_Thread_queue_Enqueue_priority+0x108> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 48bbc: 2669 0004 moveal %a1@(4),%a3 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 48bc0: 2089 movel %a1,%a0@ the_node->previous = previous_node; 48bc2: 214b 0004 movel %a3,%a0@(4) previous_node->next = the_node; 48bc6: 2688 movel %a0,%a3@ search_node->previous = the_node; 48bc8: 2348 0004 movel %a0,%a1@(4) 48bcc: 605c bras 48c2a <_Thread_queue_Enqueue_priority+0xfe> the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 48bce: 4283 clrl %d3 48bd0: 1639 0005 c38c moveb 5c38c ,%d3 _ISR_Disable( level ); 48bd6: 2405 movel %d5,%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; 48bd8: 5283 addql #1,%d3 _ISR_Disable( level ); 48bda: 40c1 movew %sr,%d1 48bdc: 8481 orl %d1,%d2 48bde: 46c2 movew %d2,%sr 48be0: 2401 movel %d1,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 48be2: 226b 0008 moveal %a3@(8),%a1 search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 48be6: 6020 bras 48c08 <_Thread_queue_Enqueue_priority+0xdc> search_priority = search_thread->current_priority; 48be8: 2629 0014 movel %a1@(20),%d3 if ( priority >= search_priority ) 48bec: b680 cmpl %d0,%d3 48bee: 631c blss 48c0c <_Thread_queue_Enqueue_priority+0xe0> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 48bf0: 2c05 movel %d5,%d6 48bf2: 46c1 movew %d1,%sr 48bf4: 8c81 orl %d1,%d6 48bf6: 46c6 movew %d6,%sr 48bf8: 2c04 movel %d4,%d6 48bfa: cca9 0010 andl %a1@(16),%d6 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 48bfe: 6604 bnes 48c04 <_Thread_queue_Enqueue_priority+0xd8> _ISR_Enable( level ); 48c00: 46c1 movew %d1,%sr goto restart_reverse_search; 48c02: 60ca bras 48bce <_Thread_queue_Enqueue_priority+0xa2> } search_thread = (Thread_Control *) 48c04: 2269 0004 moveal %a1@(4),%a1 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 ) ) { 48c08: b7c9 cmpal %a1,%a3 48c0a: 66dc bnes 48be8 <_Thread_queue_Enqueue_priority+0xbc> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 48c0c: 7801 moveq #1,%d4 48c0e: b8aa 0030 cmpl %a2@(48),%d4 48c12: 663c bnes 48c50 <_Thread_queue_Enqueue_priority+0x124> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 48c14: 42aa 0030 clrl %a2@(48) if ( priority == search_priority ) 48c18: b680 cmpl %d0,%d3 48c1a: 6718 beqs 48c34 <_Thread_queue_Enqueue_priority+0x108> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 48c1c: 2651 moveal %a1@,%a3 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 48c1e: 2149 0004 movel %a1,%a0@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 48c22: 208b movel %a3,%a0@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 48c24: 2748 0004 movel %a0,%a3@(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; 48c28: 2288 movel %a0,%a1@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48c2a: 214a 0044 movel %a2,%a0@(68) _ISR_Enable( level ); 48c2e: 46c1 movew %d1,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 48c30: 7001 moveq #1,%d0 48c32: 6026 bras 48c5a <_Thread_queue_Enqueue_priority+0x12e> equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 48c34: 2669 0040 moveal %a1@(64),%a3 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 ); 48c38: 49e9 003c lea %a1@(60),%a4 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 48c3c: 214b 0004 movel %a3,%a0@(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 ); 48c40: 208c movel %a4,%a0@ 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; 48c42: 2348 0040 movel %a0,%a1@(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; 48c46: 2688 movel %a0,%a3@ search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 48c48: 214a 0044 movel %a2,%a0@(68) _ISR_Enable( level ); 48c4c: 46c2 movew %d2,%sr 48c4e: 60e0 bras 48c30 <_Thread_queue_Enqueue_priority+0x104> * 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; 48c50: 206e 0010 moveal %fp@(16),%a0 return the_thread_queue->sync_state; 48c54: 202a 0030 movel %a2@(48),%d0 * 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; 48c58: 2082 movel %d2,%a0@ return the_thread_queue->sync_state; } 48c5a: 4cd7 1cfc moveml %sp@,%d2-%d7/%a2-%a4 48c5e: 4e5e unlk %fp ... =============================================================================== 0004b128 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4b128: 4e56 0000 linkw %fp,#0 4b12c: 226e 0008 moveal %fp@(8),%a1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4b130: 2069 0044 moveal %a1@(68),%a0 * 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 && 4b134: 2028 0030 movel %a0@(48),%d0 4b138: 671c beqs 4b156 <_Thread_queue_Process_timeout+0x2e> 4b13a: b3f9 0005 dd6e cmpal 5dd6e <_Per_CPU_Information+0xe>,%a1 4b140: 6614 bnes 4b156 <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4b142: 7203 moveq #3,%d1 4b144: b280 cmpl %d0,%d1 4b146: 6720 beqs 4b168 <_Thread_queue_Process_timeout+0x40> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4b148: 7002 moveq #2,%d0 */ 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; 4b14a: 2368 003c 0034 movel %a0@(60),%a1@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4b150: 2140 0030 movel %d0,%a0@(48) 4b154: 6012 bras 4b168 <_Thread_queue_Process_timeout+0x40> } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4b156: 2368 003c 0034 movel %a0@(60),%a1@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4b15c: 2f09 movel %a1,%sp@- 4b15e: 2f08 movel %a0,%sp@- 4b160: 4eb9 0004 b024 jsr 4b024 <_Thread_queue_Extract> 4b166: 508f addql #8,%sp } } 4b168: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d20 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 48d20: 4e56 fff0 linkw %fp,#-16 48d24: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48d28: 246e 0008 moveal %fp@(8),%a2 48d2c: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 48d30: 4a8a tstl %a2 48d32: 6746 beqs 48d7a <_Thread_queue_Requeue+0x5a> <== 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 ) { 48d34: 7001 moveq #1,%d0 48d36: b0aa 0034 cmpl %a2@(52),%d0 48d3a: 663e bnes 48d7a <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48d3c: 303c 0700 movew #1792,%d0 48d40: 40c2 movew %sr,%d2 48d42: 8082 orl %d2,%d0 48d44: 46c0 movew %d0,%sr 48d46: 202b 0010 movel %a3@(16),%d0 48d4a: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48d50: 6726 beqs 48d78 <_Thread_queue_Requeue+0x58> <== NEVER 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; 48d52: 7001 moveq #1,%d0 48d54: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48d58: 4878 0001 pea 1 48d5c: 2f0b movel %a3,%sp@- 48d5e: 2f0a movel %a2,%sp@- 48d60: 4eb9 0004 b060 jsr 4b060 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48d66: 486e fffc pea %fp@(-4) 48d6a: 2f0b movel %a3,%sp@- 48d6c: 2f0a movel %a2,%sp@- 48d6e: 4eb9 0004 8b2c jsr 48b2c <_Thread_queue_Enqueue_priority> 48d74: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 48d78: 46c2 movew %d2,%sr } } 48d7a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48d80: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048d84 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 48d84: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48d88: 486e fffc pea %fp@(-4) 48d8c: 2f2e 0008 movel %fp@(8),%sp@- 48d90: 4eb9 0004 8698 jsr 48698 <_Thread_Get> switch ( location ) { 48d96: 508f addql #8,%sp 48d98: 4aae fffc tstl %fp@(-4) 48d9c: 6618 bnes 48db6 <_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 ); 48d9e: 2f00 movel %d0,%sp@- 48da0: 4eb9 0004 b128 jsr 4b128 <_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; 48da6: 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; 48da8: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0 --level; 48dae: 5380 subql #1,%d0 _Thread_Dispatch_disable_level = level; 48db0: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 48db6: 4e5e unlk %fp ... =============================================================================== 000526b8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 526b8: 4e56 ffc0 linkw %fp,#-64 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 526bc: 200e movel %fp,%d0 526be: 220e movel %fp,%d1 526c0: 41ee ffec lea %fp@(-20),%a0 526c4: 5181 subql #8,%d1 526c6: 0680 ffff ffe8 addil #-24,%d0 526cc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 526d0: 246e 0008 moveal %fp@(8),%a2 526d4: 240e movel %fp,%d2 526d6: 0682 ffff fff4 addil #-12,%d2 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 526dc: 280a movel %a2,%d4 /* * 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 ); 526de: 260a movel %a2,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 526e0: 0684 0000 0030 addil #48,%d4 /* * 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 ); 526e6: 0683 0000 0068 addil #104,%d3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 526ec: 2c08 movel %a0,%d6 526ee: 2a01 movel %d1,%d5 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 526f0: 2d48 ffe8 movel %a0,%fp@(-24) head->previous = NULL; 526f4: 42ae ffec clrl %fp@(-20) tail->previous = head; 526f8: 2d40 fff0 movel %d0,%fp@(-16) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 526fc: 2d41 fff4 movel %d1,%fp@(-12) head->previous = NULL; 52700: 42ae fff8 clrl %fp@(-8) tail->previous = head; 52704: 2d42 fffc movel %d2,%fp@(-4) { /* * 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; 52708: 41ee ffe8 lea %fp@(-24),%a0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5270c: 47f9 0005 6320 lea 56320 <_Watchdog_Adjust_to_chain>,%a3 52712: 4bf9 0006 618c lea 6618c <__divdi3>,%a5 { /* * 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; 52718: 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; 5271c: 2039 0007 6126 movel 76126 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 52722: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 52726: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5272a: 9081 subl %d1,%d0 5272c: 2f02 movel %d2,%sp@- 5272e: 2f00 movel %d0,%sp@- 52730: 2f04 movel %d4,%sp@- 52732: 4e93 jsr %a3@ 52734: 2f3c 3b9a ca00 movel #1000000000,%sp@- 5273a: 42a7 clrl %sp@- 5273c: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@- 52742: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@- 52748: 4e95 jsr %a5@ Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 5274a: 202a 0074 movel %a2@(116),%d0 5274e: 2e01 movel %d1,%d7 /* * 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 ) { 52750: 4fef 001c lea %sp@(28),%sp 52754: b081 cmpl %d1,%d0 52756: 640c bccs 52764 <_Timer_server_Body+0xac> /* * 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 ); 52758: 2f02 movel %d2,%sp@- 5275a: 9280 subl %d0,%d1 5275c: 2f01 movel %d1,%sp@- 5275e: 2f03 movel %d3,%sp@- 52760: 4e93 jsr %a3@ 52762: 6014 bras 52778 <_Timer_server_Body+0xc0> } else if ( snapshot < last_snapshot ) { 52764: b081 cmpl %d1,%d0 52766: 6314 blss 5277c <_Timer_server_Body+0xc4> /* * 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 ); 52768: 9081 subl %d1,%d0 5276a: 2f00 movel %d0,%sp@- 5276c: 4878 0001 pea 1 52770: 2f03 movel %d3,%sp@- 52772: 4eb9 0005 62a0 jsr 562a0 <_Watchdog_Adjust> 52778: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 5277c: 2547 0074 movel %d7,%a2@(116) ) { 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 ); 52780: 49f9 0005 63a4 lea 563a4 <_Watchdog_Insert>,%a4 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 52786: 2e3c 0005 31c8 movel #340424,%d7 5278c: 202a 0078 movel %a2@(120),%d0 52790: 2047 moveal %d7,%a0 52792: 2f00 movel %d0,%sp@- 52794: 4e90 jsr %a0@ if ( timer == NULL ) { 52796: 588f addql #4,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 52798: 2040 moveal %d0,%a0 if ( timer == NULL ) { 5279a: 4a80 tstl %d0 5279c: 6724 beqs 527c2 <_Timer_server_Body+0x10a> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5279e: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED 527a2: 7201 moveq #1,%d1 <== NOT EXECUTED 527a4: b280 cmpl %d0,%d1 <== NOT EXECUTED 527a6: 6608 bnes 527b0 <_Timer_server_Body+0xf8> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 527a8: 4868 0010 pea %a0@(16) <== NOT EXECUTED 527ac: 2f04 movel %d4,%sp@- <== NOT EXECUTED 527ae: 600c bras 527bc <_Timer_server_Body+0x104> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 527b0: 7203 moveq #3,%d1 <== NOT EXECUTED 527b2: b280 cmpl %d0,%d1 <== NOT EXECUTED 527b4: 66d6 bnes 5278c <_Timer_server_Body+0xd4> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 527b6: 4868 0010 pea %a0@(16) <== NOT EXECUTED 527ba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 527bc: 4e94 jsr %a4@ <== NOT EXECUTED 527be: 508f addql #8,%sp <== NOT EXECUTED 527c0: 60ca bras 5278c <_Timer_server_Body+0xd4> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 527c2: 203c 0000 0700 movel #1792,%d0 527c8: 40c1 movew %sr,%d1 527ca: 8081 orl %d1,%d0 527cc: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 527ce: bcae ffe8 cmpl %fp@(-24),%d6 527d2: 6614 bnes 527e8 <_Timer_server_Body+0x130> <== NEVER TAKEN ts->insert_chain = NULL; 527d4: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 527d8: 46c1 movew %d1,%sr /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 527da: 2e3c 0000 0700 movel #1792,%d7 _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 ) ) { 527e0: baae fff4 cmpl %fp@(-12),%d5 527e4: 6608 bnes 527ee <_Timer_server_Body+0x136> 527e6: 603e bras 52826 <_Timer_server_Body+0x16e> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 527e8: 46c1 movew %d1,%sr <== NOT EXECUTED 527ea: 6000 ff30 braw 5271c <_Timer_server_Body+0x64> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 527ee: 2007 movel %d7,%d0 527f0: 40c1 movew %sr,%d1 527f2: 8081 orl %d1,%d0 527f4: 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; 527f6: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 527fa: ba88 cmpl %a0,%d5 527fc: 6722 beqs 52820 <_Timer_server_Body+0x168> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 527fe: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 52800: 2342 0004 movel %d2,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 52804: 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; 52808: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 5280c: 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 ); 5280e: 2f28 0024 movel %a0@(36),%sp@- 52812: 2f28 0020 movel %a0@(32),%sp@- 52816: 2068 001c moveal %a0@(28),%a0 5281a: 4e90 jsr %a0@ } 5281c: 508f addql #8,%sp 5281e: 60ce bras 527ee <_Timer_server_Body+0x136> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 52820: 46c1 movew %d1,%sr 52822: 6000 fee4 braw 52708 <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 52826: 4200 clrb %d0 52828: 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; 5282c: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0 ++level; 52832: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 52834: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5283a: 4878 0008 pea 8 static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5283e: 47f9 0005 64c8 lea 564c8 <_Watchdog_Remove>,%a3 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 52844: 2f12 movel %a2@,%sp@- 52846: 4eb9 0005 5f5c jsr 55f5c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 5284c: 2f0a movel %a2,%sp@- 5284e: 4eba fda4 jsr %pc@(525f4 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 52852: 2f0a movel %a2,%sp@- 52854: 4eba fdfe jsr %pc@(52654 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 52858: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch> ts->active = true; 5285e: 7201 moveq #1,%d1 52860: 1541 007c moveb %d1,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 52864: 486a 0008 pea %a2@(8) 52868: 4e93 jsr %a3@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 5286a: 486a 0040 pea %a2@(64) 5286e: 4e93 jsr %a3@ 52870: 4fef 0018 lea %sp@(24),%sp 52874: 6000 fe92 braw 52708 <_Timer_server_Body+0x50> =============================================================================== 00052878 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 52878: 4e56 fff0 linkw %fp,#-16 5287c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 52880: 246e 0008 moveal %fp@(8),%a2 52884: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 52888: 202a 0078 movel %a2@(120),%d0 5288c: 6600 0112 bnew 529a0 <_Timer_server_Schedule_operation_method+0x128> * * 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; 52890: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0 ++level; 52896: 5280 addql #1,%d0 _Thread_Dispatch_disable_level = level; 52898: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5289e: 202b 0038 movel %a3@(56),%d0 528a2: 7201 moveq #1,%d1 528a4: b280 cmpl %d0,%d1 528a6: 6660 bnes 52908 <_Timer_server_Schedule_operation_method+0x90> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 528a8: 203c 0000 0700 movel #1792,%d0 528ae: 40c2 movew %sr,%d2 528b0: 8082 orl %d2,%d0 528b2: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 528b4: 2039 0007 6126 movel 76126 <_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 ); 528ba: 43ea 0034 lea %a2@(52),%a1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 528be: 222a 003c movel %a2@(60),%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 528c2: 206a 0030 moveal %a2@(48),%a0 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 528c6: b3c8 cmpal %a0,%a1 528c8: 6716 beqs 528e0 <_Timer_server_Schedule_operation_method+0x68> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 528ca: 2240 moveal %d0,%a1 528cc: 93c1 subal %d1,%a1 delta_interval = first_watchdog->delta_interval; 528ce: 2228 0010 movel %a0@(16),%d1 if (delta_interval > delta) { 528d2: b3c1 cmpal %d1,%a1 528d4: 6404 bccs 528da <_Timer_server_Schedule_operation_method+0x62> delta_interval -= delta; 528d6: 9289 subl %a1,%d1 528d8: 6002 bras 528dc <_Timer_server_Schedule_operation_method+0x64> } else { delta_interval = 0; 528da: 4281 clrl %d1 } first_watchdog->delta_interval = delta_interval; 528dc: 2141 0010 movel %d1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 528e0: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 528e4: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 528e6: 486b 0010 pea %a3@(16) 528ea: 486a 0030 pea %a2@(48) 528ee: 4eb9 0005 63a4 jsr 563a4 <_Watchdog_Insert> if ( !ts->active ) { 528f4: 508f addql #8,%sp 528f6: 102a 007c moveb %a2@(124),%d0 528fa: 6600 0096 bnew 52992 <_Timer_server_Schedule_operation_method+0x11a> _Timer_server_Reset_interval_system_watchdog( ts ); 528fe: 2f0a movel %a2,%sp@- 52900: 4eba fcf2 jsr %pc@(525f4 <_Timer_server_Reset_interval_system_watchdog>) 52904: 6000 008a braw 52990 <_Timer_server_Schedule_operation_method+0x118> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 52908: 7203 moveq #3,%d1 5290a: b280 cmpl %d0,%d1 5290c: 6600 0084 bnew 52992 <_Timer_server_Schedule_operation_method+0x11a> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 52910: 203c 0000 0700 movel #1792,%d0 52916: 40c2 movew %sr,%d2 52918: 8082 orl %d2,%d0 5291a: 46c0 movew %d0,%sr 5291c: 2f3c 3b9a ca00 movel #1000000000,%sp@- 52922: 42a7 clrl %sp@- 52924: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@- 5292a: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@- 52930: 4eb9 0006 618c jsr 6618c <__divdi3> snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; 52936: 226a 0074 moveal %a2@(116),%a1 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 5293a: 200a movel %a2,%d0 5293c: 4fef 0010 lea %sp@(16),%sp 52940: 0680 0000 006c addil #108,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 52946: 206a 0068 moveal %a2@(104),%a0 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 5294a: b088 cmpl %a0,%d0 5294c: 6720 beqs 5296e <_Timer_server_Schedule_operation_method+0xf6> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5294e: 2028 0010 movel %a0@(16),%d0 if ( snapshot > last_snapshot ) { 52952: b3c1 cmpal %d1,%a1 52954: 640c bccs 52962 <_Timer_server_Schedule_operation_method+0xea> /* * We advanced in time. */ delta = snapshot - last_snapshot; 52956: 2841 moveal %d1,%a4 52958: 99c9 subal %a1,%a4 if (delta_interval > delta) { 5295a: b9c0 cmpal %d0,%a4 5295c: 640a bccs 52968 <_Timer_server_Schedule_operation_method+0xf0><== NEVER TAKEN delta_interval -= delta; 5295e: 908c subl %a4,%d0 52960: 6008 bras 5296a <_Timer_server_Schedule_operation_method+0xf2> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 52962: d089 addl %a1,%d0 delta_interval += delta; 52964: 9081 subl %d1,%d0 52966: 6002 bras 5296a <_Timer_server_Schedule_operation_method+0xf2> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 52968: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 5296a: 2140 0010 movel %d0,%a0@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 5296e: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 52972: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 52974: 486b 0010 pea %a3@(16) 52978: 486a 0068 pea %a2@(104) 5297c: 4eb9 0005 63a4 jsr 563a4 <_Watchdog_Insert> if ( !ts->active ) { 52982: 508f addql #8,%sp 52984: 102a 007c moveb %a2@(124),%d0 52988: 6608 bnes 52992 <_Timer_server_Schedule_operation_method+0x11a><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); 5298a: 2f0a movel %a2,%sp@- 5298c: 4eba fcc6 jsr %pc@(52654 <_Timer_server_Reset_tod_system_watchdog>) 52990: 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 ); } } 52992: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 52998: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 5299a: 4ef9 0005 5774 jmp 55774 <_Thread_Enable_dispatch> * 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 ); 529a0: 246a 0078 moveal %a2@(120),%a2 <== NOT EXECUTED 529a4: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED 529a8: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED } } 529ac: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 529b2: 4e5e unlk %fp <== NOT EXECUTED * 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 ); 529b4: 4ef9 0005 3190 jmp 53190 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0004a228 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4a228: 4e56 ffec linkw %fp,#-20 Timestamp64_Control answer; if ( *_rhs == 0 ) { 4a22c: 206e 000c moveal %fp@(12),%a0 const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { 4a230: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4a234: 266e 0010 moveal %fp@(16),%a3 4a238: 246e 0014 moveal %fp@(20),%a2 Timestamp64_Control answer; if ( *_rhs == 0 ) { 4a23c: 2410 movel %a0@,%d2 4a23e: 2628 0004 movel %a0@(4),%d3 4a242: 2002 movel %d2,%d0 4a244: 8083 orl %d3,%d0 4a246: 6606 bnes 4a24e <_Timestamp64_Divide+0x26> <== ALWAYS TAKEN *_ival_percentage = 0; 4a248: 4293 clrl %a3@ <== NOT EXECUTED *_fval_percentage = 0; 4a24a: 4292 clrl %a2@ <== NOT EXECUTED return; 4a24c: 605c bras 4a2aa <_Timestamp64_Divide+0x82> <== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; 4a24e: 206e 0008 moveal %fp@(8),%a0 4a252: 49f9 0005 a434 lea 5a434 <__divdi3>,%a4 4a258: 2f3c 0001 86a0 movel #100000,%sp@- 4a25e: 42a7 clrl %sp@- 4a260: 2f28 0004 movel %a0@(4),%sp@- 4a264: 2f10 movel %a0@,%sp@- 4a266: 4eb9 0005 a384 jsr 5a384 <__muldi3> 4a26c: 4fef 0010 lea %sp@(16),%sp 4a270: 2f03 movel %d3,%sp@- 4a272: 2f02 movel %d2,%sp@- 4a274: 2f01 movel %d1,%sp@- 4a276: 2f00 movel %d0,%sp@- 4a278: 4e94 jsr %a4@ 4a27a: 4fef 0010 lea %sp@(16),%sp 4a27e: 2400 movel %d0,%d2 *_ival_percentage = answer / 1000; 4a280: 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; 4a284: 2601 movel %d1,%d3 *_ival_percentage = answer / 1000; 4a286: 42a7 clrl %sp@- 4a288: 2f01 movel %d1,%sp@- 4a28a: 2f02 movel %d2,%sp@- 4a28c: 4e94 jsr %a4@ 4a28e: 4fef 0010 lea %sp@(16),%sp 4a292: 2681 movel %d1,%a3@ *_fval_percentage = answer % 1000; 4a294: 4878 03e8 pea 3e8 4a298: 42a7 clrl %sp@- 4a29a: 2f03 movel %d3,%sp@- 4a29c: 2f02 movel %d2,%sp@- 4a29e: 4eb9 0005 a894 jsr 5a894 <__moddi3> 4a2a4: 4fef 0010 lea %sp@(16),%sp 4a2a8: 2481 movel %d1,%a2@ } 4a2aa: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a2b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000490e4 <_User_extensions_Handler_initialization>: void _User_extensions_Handler_initialization(void) { 490e4: 4e56 fffc linkw %fp,#-4 uint32_t number_of_initial_extensions = 490e8: 2039 0005 a804 movel 5a804 ,%d0 rtems_configuration_get_number_of_initial_extensions(); if ( number_of_initial_extensions > 0 ) { 490ee: 6724 beqs 49114 <_User_extensions_Handler_initialization+0x30><== NEVER TAKEN User_extensions_Switch_control *initial_extension_switch_controls = _Workspace_Allocate_or_fatal_error( 490f0: 2200 movel %d0,%d1 490f2: e988 lsll #4,%d0 490f4: 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 = 490f6: 9081 subl %d1,%d0 490f8: 2f00 movel %d0,%sp@- 490fa: 4eb9 0004 9432 jsr 49432 <_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 }; 49100: 204e moveal %fp,%a0 49102: 2100 movel %d0,%a0@- _User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor ); 49104: 487a ff9e pea %pc@(490a4 <_User_extensions_Switch_visitor>) 49108: 2f08 movel %a0,%sp@- 4910a: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate> 49110: 4fef 000c lea %sp@(12),%sp } } 49114: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a4bc <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 4a4bc: 327c 0700 moveaw #1792,%a1 4a4c0: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4a4c2: 4e56 ffec linkw %fp,#-20 4a4c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4a4ca: 246e 0008 moveal %fp@(8),%a2 4a4ce: 262e 000c movel %fp@(12),%d3 4a4d2: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4a4d6: 40c0 movew %sr,%d0 4a4d8: 8280 orl %d0,%d1 4a4da: 46c1 movew %d1,%sr */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4a4dc: 264a moveal %a2,%a3 4a4de: 205b moveal %a3@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4a4e0: b7c8 cmpal %a0,%a3 4a4e2: 674c beqs 4a530 <_Watchdog_Adjust+0x74> switch ( direction ) { 4a4e4: 4a83 tstl %d3 4a4e6: 673c beqs 4a524 <_Watchdog_Adjust+0x68> 4a4e8: 7201 moveq #1,%d1 4a4ea: b283 cmpl %d3,%d1 4a4ec: 6642 bnes 4a530 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4a4ee: d5a8 0010 addl %d2,%a0@(16) break; 4a4f2: 603c bras 4a530 <_Watchdog_Adjust+0x74> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a4f4: 2052 moveal %a2@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 4a4f6: 2228 0010 movel %a0@(16),%d1 4a4fa: b282 cmpl %d2,%d1 4a4fc: 6308 blss 4a506 <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 4a4fe: 9282 subl %d2,%d1 4a500: 2141 0010 movel %d1,%a0@(16) break; 4a504: 602a bras 4a530 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; 4a506: 9481 subl %d1,%d2 _Watchdog_First( header )->delta_interval = 1; 4a508: 7201 moveq #1,%d1 4a50a: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 4a50e: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 4a510: 2f0a movel %a2,%sp@- 4a512: 4e94 jsr %a4@ _ISR_Disable( level ); 4a514: 2203 movel %d3,%d1 4a516: 40c0 movew %sr,%d0 4a518: 8280 orl %d0,%d1 4a51a: 46c1 movew %d1,%sr if ( _Chain_Is_empty( header ) ) 4a51c: 588f addql #4,%sp 4a51e: b7d2 cmpal %a2@,%a3 4a520: 660a bnes 4a52c <_Watchdog_Adjust+0x70> 4a522: 600c bras 4a530 <_Watchdog_Adjust+0x74> units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 4a524: 49f9 0004 a6dc lea 4a6dc <_Watchdog_Tickle>,%a4 _ISR_Disable( level ); 4a52a: 2609 movel %a1,%d3 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4a52c: 4a82 tstl %d2 4a52e: 66c4 bnes 4a4f4 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 4a530: 46c0 movew %d0,%sr } 4a532: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a538: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004923c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4923c: 203c 0000 0700 movel #1792,%d0 #include Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 49242: 4e56 0000 linkw %fp,#0 49246: 206e 0008 moveal %fp@(8),%a0 4924a: 2f0a movel %a2,%sp@- 4924c: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4924e: 40c1 movew %sr,%d1 49250: 8081 orl %d1,%d0 49252: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 49254: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 49258: 7401 moveq #1,%d2 4925a: b480 cmpl %d0,%d2 4925c: 670c beqs 4926a <_Watchdog_Remove+0x2e> 4925e: 6242 bhis 492a2 <_Watchdog_Remove+0x66> 49260: 143c 0003 moveb #3,%d2 49264: b480 cmpl %d0,%d2 49266: 653a bcss 492a2 <_Watchdog_Remove+0x66> <== NEVER TAKEN 49268: 6006 bras 49270 <_Watchdog_Remove+0x34> /* * 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; 4926a: 42a8 0008 clrl %a0@(8) break; 4926e: 6032 bras 492a2 <_Watchdog_Remove+0x66> } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 49270: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 49272: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 49276: 4a91 tstl %a1@ 49278: 6708 beqs 49282 <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 4927a: 2428 0010 movel %a0@(16),%d2 4927e: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 49282: 2479 0005 dcd6 moveal 5dcd6 <_Watchdog_Sync_count>,%a2 49288: 4a8a tstl %a2 4928a: 670c beqs 49298 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 4928c: 45f9 0005 dd68 lea 5dd68 <_Per_CPU_Information+0x8>,%a2 49292: 23d2 0005 dc7e movel %a2@,5dc7e <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49298: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 4929c: 234a 0004 movel %a2,%a1@(4) previous->next = next; 492a0: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 492a2: 2439 0005 dcda movel 5dcda <_Watchdog_Ticks_since_boot>,%d2 492a8: 2142 0018 movel %d2,%a0@(24) _ISR_Enable( level ); 492ac: 46c1 movew %d1,%sr return( previous_state ); } 492ae: 241f movel %sp@+,%d2 492b0: 245f moveal %sp@+,%a2 492b2: 4e5e unlk %fp ... =============================================================================== 000492b8 <_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 ); 492b8: 203c 0000 0700 movel #1792,%d0 #include void _Watchdog_Tickle( Chain_Control *header ) { 492be: 4e56 ffe8 linkw %fp,#-24 492c2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 492c6: 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 ); 492ca: 40c2 movew %sr,%d2 492cc: 8082 orl %d2,%d0 492ce: 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; 492d0: 264c moveal %a4,%a3 492d2: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 492d4: b7ca cmpal %a2,%a3 492d6: 674c beqs 49324 <_Watchdog_Tickle+0x6c> * 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) { 492d8: 202a 0010 movel %a2@(16),%d0 492dc: 6708 beqs 492e6 <_Watchdog_Tickle+0x2e> <== NEVER TAKEN the_watchdog->delta_interval--; 492de: 5380 subql #1,%d0 492e0: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 492e4: 663e bnes 49324 <_Watchdog_Tickle+0x6c> goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 492e6: 4bf9 0004 923c lea 4923c <_Watchdog_Remove>,%a5 case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 492ec: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 492f2: 2f0a movel %a2,%sp@- 492f4: 4e95 jsr %a5@ _ISR_Enable( level ); 492f6: 46c2 movew %d2,%sr switch( watchdog_state ) { 492f8: 7202 moveq #2,%d1 492fa: 588f addql #4,%sp 492fc: b280 cmpl %d0,%d1 492fe: 6610 bnes 49310 <_Watchdog_Tickle+0x58> <== NEVER TAKEN case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 49300: 2f2a 0024 movel %a2@(36),%sp@- 49304: 2f2a 0020 movel %a2@(32),%sp@- 49308: 206a 001c moveal %a2@(28),%a0 4930c: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4930e: 508f addql #8,%sp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49310: 2003 movel %d3,%d0 49312: 40c2 movew %sr,%d2 49314: 8082 orl %d2,%d0 49316: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49318: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4931a: b7ca cmpal %a2,%a3 4931c: 6706 beqs 49324 <_Watchdog_Tickle+0x6c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4931e: 4aaa 0010 tstl %a2@(16) 49322: 67ce beqs 492f2 <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 49324: 46c2 movew %d2,%sr } 49326: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4932c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049330 <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { 49330: 4e56 ffe4 linkw %fp,#-28 49334: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 49338: 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(); 4933c: 4a39 0005 a7f6 tstb 5a7f6 49342: 6608 bnes 4934c <_Workspace_Handler_initialization+0x1c> 49344: 2439 0005 a7c8 movel 5a7c8 ,%d2 4934a: 6002 bras 4934e <_Workspace_Handler_initialization+0x1e> 4934c: 4282 clrl %d2 4934e: d4b9 0005 a7c4 addl 5a7c4 ,%d2 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) { 49354: 4284 clrl %d4 Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; 49356: 47f9 0004 7304 lea 47304 <_Heap_Initialize>,%a3 for (i = 0; i < area_count; ++i) { Heap_Area *area = &areas [i]; if ( do_zero ) { memset( area->begin, 0, area->size ); 4935c: 49f9 0004 cbc0 lea 4cbc0 ,%a4 49362: 246e 0008 moveal %fp@(8),%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) { 49366: 6070 bras 493d8 <_Workspace_Handler_initialization+0xa8> Heap_Area *area = &areas [i]; if ( do_zero ) { 49368: 4a39 0005 a7f4 tstb 5a7f4 4936e: 670e beqs 4937e <_Workspace_Handler_initialization+0x4e> memset( area->begin, 0, area->size ); 49370: 2f2a 0004 movel %a2@(4),%sp@- 49374: 42a7 clrl %sp@- 49376: 2f12 movel %a2@,%sp@- 49378: 4e94 jsr %a4@ 4937a: 4fef 000c lea %sp@(12),%sp } if ( area->size > overhead ) { 4937e: 262a 0004 movel %a2@(4),%d3 49382: 700e moveq #14,%d0 49384: b083 cmpl %d3,%d0 49386: 644c bccs 493d4 <_Workspace_Handler_initialization+0xa4> uintptr_t space_available; uintptr_t size; if ( unified ) { 49388: 4a39 0005 a7f5 tstb 5a7f5 4938e: 661c bnes 493ac <_Workspace_Handler_initialization+0x7c> size = area->size; } else { if ( remaining > 0 ) { 49390: 4a82 tstl %d2 49392: 6716 beqs 493aa <_Workspace_Handler_initialization+0x7a><== NEVER TAKEN size = remaining < area->size - overhead ? 49394: 2003 movel %d3,%d0 49396: 0680 ffff fff2 addil #-14,%d0 remaining + overhead : area->size; 4939c: b082 cmpl %d2,%d0 4939e: 630c blss 493ac <_Workspace_Handler_initialization+0x7c><== NEVER TAKEN 493a0: 2602 movel %d2,%d3 493a2: 0683 0000 000e addil #14,%d3 493a8: 6002 bras 493ac <_Workspace_Handler_initialization+0x7c> } else { size = 0; 493aa: 4283 clrl %d3 <== NOT EXECUTED } } space_available = (*init_or_extend)( 493ac: 4878 0004 pea 4 493b0: 2f03 movel %d3,%sp@- 493b2: 2f12 movel %a2@,%sp@- 493b4: 4879 0005 dc06 pea 5dc06 <_Workspace_Area> 493ba: 4e93 jsr %a3@ ); area->begin = (char *) area->begin + size; area->size -= size; if ( space_available < remaining ) { 493bc: 4fef 0010 lea %sp@(16),%sp area->begin, size, page_size ); area->begin = (char *) area->begin + size; 493c0: d792 addl %d3,%a2@ area->size -= size; 493c2: 97aa 0004 subl %d3,%a2@(4) if ( space_available < remaining ) { 493c6: b480 cmpl %d0,%d2 493c8: 6306 blss 493d0 <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN remaining -= space_available; 493ca: 9480 subl %d0,%d2 <== NOT EXECUTED } else { remaining = 0; } init_or_extend = extend; 493cc: 2645 moveal %d5,%a3 <== NOT EXECUTED 493ce: 6004 bras 493d4 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED 493d0: 2645 moveal %d5,%a3 area->size -= size; if ( space_available < remaining ) { remaining -= space_available; } else { remaining = 0; 493d2: 4282 clrl %d2 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) { 493d4: 5284 addql #1,%d4 493d6: 508a addql #8,%a2 493d8: b8ae 000c cmpl %fp@(12),%d4 493dc: 668a bnes 49368 <_Workspace_Handler_initialization+0x38> init_or_extend = extend; } } if ( remaining > 0 ) { 493de: 4a82 tstl %d2 493e0: 6710 beqs 493f2 <_Workspace_Handler_initialization+0xc2> _Internal_error_Occurred( 493e2: 4878 0002 pea 2 493e6: 4878 0001 pea 1 493ea: 42a7 clrl %sp@- 493ec: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } 493f2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 493f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000495d0 <_Workspace_String_duplicate>: char *_Workspace_String_duplicate( const char *string, size_t len ) { 495d0: 4e56 0000 linkw %fp,#0 495d4: 2f0b movel %a3,%sp@- 495d6: 266e 000c moveal %fp@(12),%a3 495da: 2f0a movel %a2,%sp@- char *dup = _Workspace_Allocate(len + 1); 495dc: 486b 0001 pea %a3@(1) 495e0: 4eb9 0004 9564 jsr 49564 <_Workspace_Allocate> if (dup != NULL) { 495e6: 588f addql #4,%sp char *_Workspace_String_duplicate( const char *string, size_t len ) { char *dup = _Workspace_Allocate(len + 1); 495e8: 2440 moveal %d0,%a2 if (dup != NULL) { 495ea: 4a80 tstl %d0 495ec: 6718 beqs 49606 <_Workspace_String_duplicate+0x36><== NEVER TAKEN dup [len] = '\0'; 495ee: 4200 clrb %d0 495f0: 1580 b800 moveb %d0,%a2@(00000000,%a3:l) memcpy(dup, string, len); 495f4: 2f0b movel %a3,%sp@- 495f6: 2f2e 0008 movel %fp@(8),%sp@- 495fa: 2f0a movel %a2,%sp@- 495fc: 4eb9 0004 cdac jsr 4cdac 49602: 4fef 000c lea %sp@(12),%sp } return dup; } 49606: 200a movel %a2,%d0 49608: 246e fff8 moveal %fp@(-8),%a2 4960c: 266e fffc moveal %fp@(-4),%a3 49610: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045338 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 45338: 4e56 0000 linkw %fp,#0 4533c: 2f02 movel %d2,%sp@- 4533e: 242e 0010 movel %fp@(16),%d2 printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 45342: 660a bnes 4534e <__assert_func+0x16> 45344: 203c 0005 e5e0 movel #386528,%d0 4534a: 2200 movel %d0,%d1 4534c: 6008 bras 45356 <__assert_func+0x1e> 4534e: 2002 movel %d2,%d0 45350: 223c 0005 df40 movel #384832,%d1 45356: 2f00 movel %d0,%sp@- 45358: 2f01 movel %d1,%sp@- 4535a: 2f2e 000c movel %fp@(12),%sp@- 4535e: 2f2e 0008 movel %fp@(8),%sp@- 45362: 2f2e 0014 movel %fp@(20),%sp@- 45366: 4879 0005 df4d pea 5df4d 4536c: 4eb9 0004 62f4 jsr 462f4 file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal( RTEMS_FATAL_SOURCE_ASSERT, (rtems_fatal_code) func ); 45372: 2f02 movel %d2,%sp@- 45374: 4878 0008 pea 8 45378: 4eb9 0004 9978 jsr 49978 ... =============================================================================== 00059fdc <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 59fdc: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 59fde: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59fe2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00059e4c <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59e4c: 4e56 0000 linkw %fp,#0 59e50: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 59e54: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59e5a: 2d40 0008 movel %d0,%fp@(8) return calloc( elements, size ); } 59e5e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 59e60: 4ef9 0004 2818 jmp 42818 ... =============================================================================== 00043270 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 43270: 4e56 0000 linkw %fp,#0 /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(FINI_SYMBOL) FINI_SYMBOL(); 43274: 4eb9 0005 a5ac jsr 5a5ac <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 4327a: 4eb9 0004 320c jsr 4320c rtems_shutdown_executive(status); 43280: 2f2e 0008 movel %fp@(8),%sp@- 43284: 4eb9 0004 6964 jsr 46964 ... =============================================================================== 0004fd40 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 4fd40: 4e56 ffd8 linkw %fp,#-40 4fd44: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 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); 4fd48: 2e0e movel %fp,%d7 uint32_t count, void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; 4fd4a: 4284 clrl %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); 4fd4c: 5987 subql #4,%d7 4fd4e: 47f9 0004 fc8c lea 4fc8c ,%a3 if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); 4fd54: 49f9 0005 7168 lea 57168 ,%a4 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 4fd5a: 246e 0008 moveal %fp@(8),%a2 4fd5e: 262e 0014 movel %fp@(20),%d3 int rc = RC_OK; ssize_t cmpltd = 0; uint32_t sec_num = start; uint32_t ofs = offset; 4fd62: 2c2e 0010 movel %fp@(16),%d6 void *buff ) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t sec_num = start; 4fd66: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 4fd6a: 603e bras 4fdaa <_fat_block_read+0x6a> { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 4fd6c: 2f07 movel %d7,%sp@- 4fd6e: 4878 0001 pea 1 4fd72: 2f05 movel %d5,%sp@- 4fd74: 2f0a movel %a2,%sp@- 4fd76: 4e93 jsr %a3@ if (rc != RC_OK) 4fd78: 4fef 0010 lea %sp@(16),%sp 4fd7c: 4a80 tstl %d0 4fd7e: 6630 bnes 4fdb0 <_fat_block_read+0x70> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 4fd80: 4282 clrl %d2 4fd82: 3412 movew %a2@,%d2 4fd84: 9486 subl %d6,%d2 4fd86: b682 cmpl %d2,%d3 4fd88: 6402 bccs 4fd8c <_fat_block_read+0x4c> <== ALWAYS TAKEN 4fd8a: 2403 movel %d3,%d2 <== NOT EXECUTED memcpy((buff + cmpltd), (sec_buf + ofs), c); 4fd8c: dcae fffc addl %fp@(-4),%d6 count -= c; 4fd90: 9682 subl %d2,%d3 cmpltd += c; sec_num++; 4fd92: 5285 addql #1,%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); 4fd94: 2f02 movel %d2,%sp@- 4fd96: 206e 0018 moveal %fp@(24),%a0 4fd9a: 2f06 movel %d6,%sp@- 4fd9c: 4870 4800 pea %a0@(00000000,%d4:l) count -= c; cmpltd += c; sec_num++; ofs = 0; 4fda0: 4286 clrl %d6 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (sec_buf + ofs), c); count -= c; cmpltd += c; 4fda2: d882 addl %d2,%d4 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); 4fda4: 4e94 jsr %a4@ count -= c; cmpltd += c; sec_num++; ofs = 0; 4fda6: 4fef 000c lea %sp@(12),%sp uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while (count > 0) 4fdaa: 4a83 tstl %d3 4fdac: 66be bnes 4fd6c <_fat_block_read+0x2c> <== NEVER TAKEN 4fdae: 6002 bras 4fdb2 <_fat_block_read+0x72> { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; 4fdb0: 78ff moveq #-1,%d4 <== NOT EXECUTED cmpltd += c; sec_num++; ofs = 0; } return cmpltd; } 4fdb2: 2004 movel %d4,%d0 4fdb4: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 4fdba: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059ee0 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 59ee0: 4e56 0000 linkw %fp,#0 free( ptr ); 59ee4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59eea: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 59eec: 4ef9 0004 2a60 jmp 42a60 ... =============================================================================== 00042b8a <_gettimeofday>: */ int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 42b8a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42b8e: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42b90: 4ef9 0004 2ae8 jmp 42ae8 <== NOT EXECUTED ... =============================================================================== 00059fb4 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 59fb4: 4e56 0000 linkw %fp,#0 return isatty( fd ); 59fb8: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59fbe: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 59fc0: 4ef9 0005 a504 jmp 5a504 ... =============================================================================== 000428f4 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *path1, const char *path2 ) { 428f4: 4e56 0000 linkw %fp,#0 428f8: 202e 000c movel %fp@(12),%d0 return link( path1, path2 ); 428fc: 2d6e 0010 000c movel %fp@(16),%fp@(12) int _link_r( struct _reent *ptr __attribute__((unused)), const char *path1, const char *path2 ) { 42902: 2d40 0008 movel %d0,%fp@(8) return link( path1, path2 ); } 42906: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path1, const char *path2 ) { return link( path1, path2 ); 42908: 4ef9 0004 2870 jmp 42870 ... =============================================================================== 0005a064 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 5a064: 4e56 0000 linkw %fp,#0 5a068: 202e 000c movel %fp@(12),%d0 5a06c: 2d40 0008 movel %d0,%fp@(8) 5a070: 202e 0010 movel %fp@(16),%d0 5a074: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 5a078: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5a07e: 2d40 000c movel %d0,%fp@(12) 5a082: 2d41 0010 movel %d1,%fp@(16) } 5a086: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 5a088: 4ef9 0005 9fe8 jmp 59fe8 ... =============================================================================== 00042970 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 42970: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 42974: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 42978: 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 ) { 4297e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 42982: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 42984: 4ef9 0004 2910 jmp 42910 <== NOT EXECUTED ... =============================================================================== 0005a090 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5a090: 4e56 0000 linkw %fp,#0 return malloc( size ); 5a094: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a09a: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5a09c: 4ef9 0004 2d30 jmp 42d30 ... =============================================================================== 00043708 <_open_r>: struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 43708: 4e56 0000 linkw %fp,#0 4370c: 202e 000c movel %fp@(12),%d0 43710: 2d40 0008 movel %d0,%fp@(8) 43714: 202e 0010 movel %fp@(16),%d0 return open( buf, oflag, mode ); 43718: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), const char *buf, int oflag, int mode ) { 4371e: 2d40 000c movel %d0,%fp@(12) return open( buf, oflag, mode ); } 43722: 4e5e unlk %fp const char *buf, int oflag, int mode ) { return open( buf, oflag, mode ); 43724: 4ef9 0004 3554 jmp 43554 ... =============================================================================== 0005a138 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 5a138: 4e56 0000 linkw %fp,#0 5a13c: 202e 000c movel %fp@(12),%d0 5a140: 2d40 0008 movel %d0,%fp@(8) 5a144: 202e 0010 movel %fp@(16),%d0 return read( fd, buf, nbytes ); 5a148: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 5a14e: 2d40 000c movel %d0,%fp@(12) return read( fd, buf, nbytes ); } 5a152: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 5a154: 4ef9 0005 a0a4 jmp 5a0a4 ... =============================================================================== 0005a15c <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5a15c: 4e56 0000 linkw %fp,#0 5a160: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5a164: 2d6e 0010 000c movel %fp@(16),%fp@(12) void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5a16a: 2d40 0008 movel %d0,%fp@(8) return realloc( ptr, size ); } 5a16e: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5a170: 4ef9 0005 a19c jmp 5a19c ... =============================================================================== 000437b0 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 437b0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 437b4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED return _STAT_NAME( path, buf ); 437b8: 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 ) { 437be: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED return _STAT_NAME( path, buf ); } 437c2: 4e5e unlk %fp <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 437c4: 4ef9 0004 3750 jmp 43750 <== NOT EXECUTED ... =============================================================================== 0005a178 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5a178: 4e56 0000 linkw %fp,#0 5a17c: 202e 000c movel %fp@(12),%d0 5a180: 2d40 0008 movel %d0,%fp@(8) 5a184: 202e 0010 movel %fp@(16),%d0 return write( fd, buf, nbytes ); 5a188: 2d6e 0014 0010 movel %fp@(20),%fp@(16) struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5a18e: 2d40 000c movel %d0,%fp@(12) return write( fd, buf, nbytes ); } 5a192: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5a194: 4ef9 0005 a284 jmp 5a284 ... =============================================================================== 0004245c : #include #include int chroot( const char *path ) { 4245c: 4e56 ffac linkw %fp,#-84 42460: 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( 42462: 4879 0005 b3a8 pea 5b3a8 eval_flags, &rtems_global_user_env.root_directory, &rtems_global_user_env.current_directory ); rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc ); 42468: 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( 4246c: 4879 0005 b3ac pea 5b3ac 42472: 4878 0019 pea 19 42476: 2f2e 0008 movel %fp@(8),%sp@- 4247a: 486e ffc8 pea %fp@(-56) 4247e: 4eb9 0004 3750 jsr 43750 42484: 486e ffe0 pea %fp@(-32) 42488: 2f0a movel %a2,%sp@- 4248a: 4eb9 0004 3be4 jsr 43be4 &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 ); 42490: 2f0a movel %a2,%sp@- 42492: 4eb9 0004 3da4 jsr 43da4 if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 42498: 4fef 0020 lea %sp@(32),%sp 4249c: 223c 0005 a514 movel #369940,%d1 424a2: 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 ); 424a4: 2d40 ffac movel %d0,%fp@(-84) if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) { 424a8: b2a8 0010 cmpl %a0@(16),%d1 424ac: 6700 0084 beqw 42532 rtems_filesystem_global_location_t *new_root_loc = 424b0: 486e ffac pea %fp@(-84) 424b4: 4eb9 0004 3d04 jsr 43d04 424ba: 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)( 424bc: 206a 0014 moveal %a2@(20),%a0 424c0: 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 = 424c4: 2f00 movel %d0,%sp@- 424c6: 2068 0014 moveal %a0@(20),%a0 424ca: 4e90 jsr %a0@ (*new_root_loc->location.mt_entry->ops->node_type_h)( &new_root_loc->location ); if ( type == RTEMS_FILESYSTEM_DIRECTORY ) { 424cc: 508f addql #8,%sp 424ce: 4a80 tstl %d0 424d0: 6646 bnes 42518 sc = rtems_libio_set_private_env(); 424d2: 4eb9 0004 3108 jsr 43108 if (sc == RTEMS_SUCCESSFUL) { 424d8: 4a80 tstl %d0 424da: 6628 bnes 42504 rtems_filesystem_global_location_assign( 424dc: 2079 0005 b3a4 moveal 5b3a4 ,%a0 424e2: 5888 addql #4,%a0 424e4: 2f0a movel %a2,%sp@- 424e6: 45f9 0004 3cda lea 43cda ,%a2 424ec: 2f08 movel %a0,%sp@- 424ee: 4e92 jsr %a2@ &rtems_filesystem_root, new_root_loc ); rtems_filesystem_global_location_assign( 424f0: 2f2e ffac movel %fp@(-84),%sp@- 424f4: 2f39 0005 b3a4 movel 5b3a4 ,%sp@- 424fa: 4e92 jsr %a2@ 424fc: 4fef 0010 lea %sp@(16),%sp 42500: 95ca subal %a2,%a2 42502: 6032 bras 42536 &rtems_filesystem_current, new_current_loc ); } else { if (sc != RTEMS_UNSATISFIED) { 42504: 720d moveq #13,%d1 42506: b280 cmpl %d0,%d1 42508: 674a beqs 42554 <== NEVER TAKEN errno = ENOMEM; 4250a: 4eb9 0004 8c20 jsr 48c20 <__errno> 42510: 720c moveq #12,%d1 42512: 2040 moveal %d0,%a0 42514: 2081 movel %d1,%a0@ 42516: 603c bras 42554 static inline void rtems_filesystem_location_error( const rtems_filesystem_location_info_t *loc, int eno ) { if ( !rtems_filesystem_location_is_null( loc ) ) { 42518: 203c 0005 a514 movel #369940,%d0 4251e: b0aa 0010 cmpl %a2@(16),%d0 42522: 6730 beqs 42554 <== NEVER TAKEN errno = eno; 42524: 4eb9 0004 8c20 jsr 48c20 <__errno> 4252a: 2040 moveal %d0,%a0 4252c: 7014 moveq #20,%d0 4252e: 2080 movel %d0,%a0@ 42530: 6022 bras 42554 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); } } else { rv = -1; 42532: 347c ffff moveaw #-1,%a2 } rtems_filesystem_eval_path_cleanup( &ctx ); 42536: 486e ffc8 pea %fp@(-56) 4253a: 4eb9 0004 3874 jsr 43874 if ( rv != 0 ) { 42540: 588f addql #4,%sp 42542: 4a8a tstl %a2 42544: 671a beqs 42560 rtems_filesystem_global_location_release( new_current_loc ); 42546: 2f2e ffac movel %fp@(-84),%sp@- 4254a: 4eb9 0004 3c8e jsr 43c8e 42550: 588f addql #4,%sp 42552: 600c bras 42560 rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR ); rv = -1; } if ( rv != 0 ) { rtems_filesystem_global_location_release( new_root_loc ); 42554: 2f0a movel %a2,%sp@- 42556: 4eb9 0004 3c8e jsr 43c8e 4255c: 588f addql #4,%sp 4255e: 60d2 bras 42532 if ( rv != 0 ) { rtems_filesystem_global_location_release( new_current_loc ); } return rv; } 42560: 200a movel %a2,%d0 42562: 246e ffa8 moveal %fp@(-88),%a2 42566: 4e5e unlk %fp ... =============================================================================== 00042842 : dev_t dev, const char *name, rtems_disk_device **dd_ptr, char **alloc_name_ptr ) { 42842: 4e56 ffdc linkw %fp,#-36 42846: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4284a: 242e 0008 movel %fp@(8),%d2 4284e: 262e 000c movel %fp@(12),%d3 42852: 286e 0010 moveal %fp@(16),%a4 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 42856: 2c02 movel %d2,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 42858: 2a03 movel %d3,%d5 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 4285a: 2e39 0006 0b76 movel 60b76 ,%d7 42860: be86 cmpl %d6,%d7 42862: 6252 bhis 428b6 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 42864: 2807 movel %d7,%d4 42866: d884 addl %d4,%d4 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 42868: 2039 0006 0b7a movel 60b7a ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 4286e: b886 cmpl %d6,%d4 42870: 6204 bhis 42876 <== NEVER TAKEN new_size = major + 1; 42872: 2806 movel %d6,%d4 42874: 5284 addql #1,%d4 } table = realloc(table, new_size * sizeof(*table)); 42876: 2204 movel %d4,%d1 42878: e789 lsll #3,%d1 4287a: 2f01 movel %d1,%sp@- 4287c: 2f00 movel %d0,%sp@- 4287e: 4eb9 0004 4698 jsr 44698 if (table == NULL) { 42884: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 42886: 2640 moveal %d0,%a3 if (table == NULL) { 42888: 4a80 tstl %d0 4288a: 6700 010e beqw 4299a return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 4288e: 2004 movel %d4,%d0 <== NOT EXECUTED 42890: 9087 subl %d7,%d0 <== NOT EXECUTED 42892: 2207 movel %d7,%d1 <== NOT EXECUTED 42894: e788 lsll #3,%d0 <== NOT EXECUTED 42896: e789 lsll #3,%d1 <== NOT EXECUTED 42898: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4289a: 42a7 clrl %sp@- <== NOT EXECUTED 4289c: 4873 1800 pea %a3@(00000000,%d1:l) <== NOT EXECUTED 428a0: 4eb9 0005 074c jsr 5074c <== NOT EXECUTED disktab = table; disktab_size = new_size; 428a6: 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; 428aa: 23cb 0006 0b7a movel %a3,60b7a <== NOT EXECUTED disktab_size = new_size; 428b0: 23c4 0006 0b76 movel %d4,60b76 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 428b6: 2479 0006 0b7a moveal 60b7a ,%a2 428bc: e78e lsll #3,%d6 428be: d5c6 addal %d6,%a2 428c0: 2012 movel %a2@,%d0 428c2: 6706 beqs 428ca 428c4: baaa 0004 cmpl %a2@(4),%d5 428c8: 654c bcss 42916 rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 428ca: 2c2a 0004 movel %a2@(4),%d6 rtems_device_minor_number new_size = 0; if (old_size == 0) { 428ce: 6706 beqs 428d6 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 428d0: 2806 movel %d6,%d4 428d2: d884 addl %d4,%d4 428d4: 6002 bras 428d8 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) { new_size = DISKTAB_INITIAL_SIZE; 428d6: 7808 moveq #8,%d4 } else { new_size = 2 * old_size; } if (minor >= new_size) { 428d8: b885 cmpl %d5,%d4 428da: 6204 bhis 428e0 new_size = minor + 1; 428dc: 2805 movel %d5,%d4 428de: 5284 addql #1,%d4 } table = realloc(table, new_size * sizeof(*table)); 428e0: 2204 movel %d4,%d1 428e2: e589 lsll #2,%d1 428e4: 2f01 movel %d1,%sp@- 428e6: 2f00 movel %d0,%sp@- 428e8: 4eb9 0004 4698 jsr 44698 if (table == NULL) { 428ee: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 428f0: 2640 moveal %d0,%a3 if (table == NULL) { 428f2: 4a80 tstl %d0 428f4: 6700 00a4 beqw 4299a return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 428f8: 2004 movel %d4,%d0 428fa: 9086 subl %d6,%d0 428fc: e588 lsll #2,%d0 428fe: 2f00 movel %d0,%sp@- 42900: 42a7 clrl %sp@- 42902: 4873 6c00 pea %a3@(00000000,%d6:l:4) 42906: 4eb9 0005 074c jsr 5074c disktab [major].minor = table; disktab [major].size = new_size; 4290c: 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; 42910: 248b movel %a3,%a2@ disktab [major].size = new_size; 42912: 2544 0004 movel %d4,%a2@(4) } return disktab [major].minor + minor; 42916: 2452 moveal %a2@,%a2 42918: e58d lsll #2,%d5 4291a: d5c5 addal %d5,%a2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 4291c: 4a8a tstl %a2 4291e: 6602 bnes 42922 <== ALWAYS TAKEN 42920: 6078 bras 4299a <== NOT EXECUTED return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; 42922: 700c moveq #12,%d0 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 42924: 4a92 tstl %a2@ 42926: 6674 bnes 4299c return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42928: 4878 0072 pea 72 4292c: 4eb9 0004 3c84 jsr 43c84 if (dd == NULL) { 42932: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42934: 2800 movel %d0,%d4 if (dd == NULL) { 42936: 6762 beqs 4299a <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 42938: 4a8c tstl %a4 4293a: 6730 beqs 4296c alloc_name = strdup(name); 4293c: 2f0c movel %a4,%sp@- 4293e: 4eb9 0005 0d30 jsr 50d30 if (alloc_name == NULL) { 42944: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 42946: 2c00 movel %d0,%d6 42948: 2a00 movel %d0,%d5 if (alloc_name == NULL) { 4294a: 6634 bnes 42980 <== ALWAYS TAKEN free(dd); 4294c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4294e: 4eb9 0004 3810 jsr 43810 <== NOT EXECUTED return RTEMS_NO_MEMORY; 42954: 588f addql #4,%sp <== NOT EXECUTED 42956: 6042 bras 4299a <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 42958: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4295a: 45f9 0004 3810 lea 43810 ,%a2 <== NOT EXECUTED 42960: 4e92 jsr %a2@ <== NOT EXECUTED free(dd); 42962: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42964: 4e92 jsr %a2@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 42966: 508f addql #8,%sp <== NOT EXECUTED 42968: 700d moveq #13,%d0 <== NOT EXECUTED 4296a: 6030 bras 4299c <== NOT EXECUTED char **alloc_name_ptr ) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 4296c: 4285 clrl %d5 free(dd); return RTEMS_UNSATISFIED; } } *dd_entry = dd; 4296e: 2484 movel %d4,%a2@ *dd_ptr = dd; 42970: 206e 0014 moveal %fp@(20),%a0 *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; 42974: 4280 clrl %d0 return RTEMS_UNSATISFIED; } } *dd_entry = dd; *dd_ptr = dd; 42976: 2084 movel %d4,%a0@ *alloc_name_ptr = alloc_name; 42978: 206e 0018 moveal %fp@(24),%a0 4297c: 2085 movel %d5,%a0@ return RTEMS_SUCCESSFUL; 4297e: 601c bras 4299c return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 42980: 2f03 movel %d3,%sp@- 42982: 2f02 movel %d2,%sp@- 42984: 4878 61ff pea 61ff 42988: 2f00 movel %d0,%sp@- 4298a: 4eb9 0004 3df6 jsr 43df6 42990: 4fef 0010 lea %sp@(16),%sp 42994: 4a80 tstl %d0 42996: 6cd6 bges 4296e <== ALWAYS TAKEN 42998: 60be bras 42958 <== NOT EXECUTED rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { return RTEMS_NO_MEMORY; 4299a: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; *alloc_name_ptr = alloc_name; return RTEMS_SUCCESSFUL; } 4299c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 429a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000439f0 : * 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) 439f0: 4e56 ffec linkw %fp,#-20 439f4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 439f8: 286e 000c moveal %fp@(12),%a4 if (new_part_desc == NULL) { return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; 439fc: 4294 clrl %a4@ if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 439fe: 4878 0028 pea 28 43a02: 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) 43a06: 266e 0008 moveal %fp@(8),%a3 return RTEMS_INTERNAL_ERROR; } *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) 43a0a: 4eb9 0004 4584 jsr 44584 43a10: 508f addql #8,%sp 43a12: 2440 moveal %d0,%a2 43a14: 4a80 tstl %d0 43a16: 677c beqs 43a94 <== NEVER TAKEN /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); 43a18: 4bfa fea6 lea %pc@(438c0 ),%a5 if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; } part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET); 43a1c: 1493 moveb %a3@,%a2@ part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET); 43a1e: 142b 0004 moveb %a3@(4),%d2 43a22: 1542 0001 moveb %d2,%a2@(1) /* read the offset start position and partition size in sectors */ /* due to incorrect data alignment one have to align data first */ memcpy(&temp, data + RTEMS_IDE_PARTITION_START_OFFSET, sizeof(uint32_t)); part_desc->start = LE_TO_CPU_U32(temp); 43a26: 2f2b 0008 movel %a3@(8),%sp@- 43a2a: 4e95 jsr %a5@ 43a2c: 2540 0004 movel %d0,%a2@(4) memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t)); part_desc->size = LE_TO_CPU_U32(temp); 43a30: 2eab 000c movel %a3@(12),%sp@ 43a34: 4e95 jsr %a5@ 43a36: 588f addql #4,%sp * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 43a38: 7205 moveq #5,%d1 /* 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); 43a3a: 2640 moveal %d0,%a3 43a3c: 2540 0008 movel %d0,%a2@(8) * true if partition type is extended, false otherwise */ static bool is_extended(uint8_t type) { return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED)); 43a40: 4280 clrl %d0 43a42: 1002 moveb %d2,%d0 43a44: b280 cmpl %d0,%d1 43a46: 670e beqs 43a56 43a48: 7085 moveq #-123,%d0 43a4a: b580 eorl %d2,%d0 43a4c: 4a00 tstb %d0 43a4e: 57c1 seq %d1 43a50: 49c1 extbl %d1 43a52: 4481 negl %d1 43a54: 6002 bras 43a58 43a56: 7201 moveq #1,%d1 * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 43a58: 0801 0000 btst #0,%d1 43a5c: 6624 bnes 43a82 DOS_P32MB_PARTITION, FAT32_PARTITION ,FAT32_LBA_PARTITION, FAT16_LBA_PARTITION }; return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types))); 43a5e: 4878 0006 pea 6 43a62: 0282 0000 00ff andil #255,%d2 43a68: 2f02 movel %d2,%sp@- 43a6a: 4879 0005 fa15 pea 5fa15 43a70: 4eb9 0005 16f0 jsr 516f0 43a76: 4fef 000c lea %sp@(12),%sp * use partitions that are * - extended * or * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || 43a7a: 4a80 tstl %d0 43a7c: 6708 beqs 43a86 ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { 43a7e: 4a8b tstl %a3 43a80: 6704 beqs 43a86 <== NEVER TAKEN *new_part_desc = part_desc; 43a82: 288a movel %a2,%a4@ 43a84: 600a bras 43a90 } else { /* empty partition */ free(part_desc); 43a86: 2f0a movel %a2,%sp@- 43a88: 4eb9 0004 4844 jsr 44844 43a8e: 588f addql #4,%sp } return RTEMS_SUCCESSFUL; 43a90: 4280 clrl %d0 43a92: 6002 bras 43a96 *new_part_desc = NULL; if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL) { return RTEMS_NO_MEMORY; 43a94: 701a moveq #26,%d0 <== NOT EXECUTED else { /* empty partition */ free(part_desc); } return RTEMS_SUCCESSFUL; } 43a96: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 43a9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042068 : #endif #include "devfs.h" void devFS_Show(void) { 42068: 4e56 ffe8 linkw %fp,#-24 rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; if (rootloc->mt_entry->ops == &devFS_ops) { 4206c: 203c 0005 8a2e movel #363054,%d0 #include "devfs.h" void devFS_Show(void) { rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location; 42072: 2079 0005 9ddc moveal 59ddc ,%a0 if (rootloc->mt_entry->ops == &devFS_ops) { 42078: 2068 0004 moveal %a0@(4),%a0 4207c: 2068 0014 moveal %a0@(20),%a0 #endif #include "devfs.h" void devFS_Show(void) { 42080: 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) { 42084: b0a8 000c cmpl %a0@(12),%d0 42088: 6662 bnes 420ec <== NEVER TAKEN 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; 4208a: 2068 0010 moveal %a0@(16),%a0 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) { 4208e: 4283 clrl %d3 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 42090: 47f9 0004 2fec lea 42fec ,%a3 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; 42096: 2828 0004 movel %a0@(4),%d4 4209a: 2450 moveal %a0@,%a2 devFS_node *nodes = data->nodes; for (i = 0; i < n; ++i) { 4209c: 604a bras 420e8 devFS_node *current = nodes + i; if (current->name != NULL) { 4209e: 4a92 tstl %a2@ 420a0: 6740 beqs 420e2 size_t j = 0; size_t m = current->namelen; 420a2: 2a2a 0004 movel %a2@(4),%d5 printk("/"); 420a6: 4879 0005 8a82 pea 58a82 for (j = 0; j < m; ++j) { 420ac: 4282 clrl %d2 if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); 420ae: 4e93 jsr %a3@ for (j = 0; j < m; ++j) { 420b0: 588f addql #4,%sp 420b2: 6016 bras 420ca printk("%c", current->name [j]); 420b4: 2052 moveal %a2@,%a0 420b6: 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) { 420ba: 5282 addql #1,%d2 printk("%c", current->name [j]); 420bc: 49c0 extbl %d0 420be: 2f00 movel %d0,%sp@- 420c0: 4879 0005 8a84 pea 58a84 420c6: 4e93 jsr %a3@ if (current->name != NULL) { size_t j = 0; size_t m = current->namelen; printk("/"); for (j = 0; j < m; ++j) { 420c8: 508f addql #8,%sp 420ca: ba82 cmpl %d2,%d5 420cc: 66e6 bnes 420b4 printk("%c", current->name [j]); } printk( 420ce: 2f2a 000c movel %a2@(12),%sp@- 420d2: 2f2a 0008 movel %a2@(8),%sp@- 420d6: 4879 0005 8a87 pea 58a87 420dc: 4e93 jsr %a3@ 420de: 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) { 420e2: 5283 addql #1,%d3 420e4: 45ea 0014 lea %a2@(20),%a2 420e8: b883 cmpl %d3,%d4 420ea: 66b2 bnes 4209e (unsigned long) current->minor ); } } } } 420ec: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 420f2: 4e5e unlk %fp ... =============================================================================== 0004acd8 : } void devFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { 4acd8: 4e56 ffdc linkw %fp,#-36 4acdc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4ace0: 246e 0008 moveal %fp@(8),%a2 ) { size_t i = 0; size_t n = data->count; devFS_node *nodes = data->nodes; devFS_node *node = NULL; 4ace4: 4282 clrl %d2 devFS_node *free_node = NULL; 4ace6: 97cb subal %a3,%a3 for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { 4ace8: 4284 clrl %d4 devFS_node *current = nodes + i; if (current->name != NULL) { if ( current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4acea: 4bf9 0004 d08c lea 4d08c ,%a5 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; 4acf0: 206a 002c moveal %a2@(44),%a0 4acf4: 2068 0010 moveal %a0@(16),%a0 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4acf8: 262a 0004 movel %a2@(4),%d3 4acfc: 2a12 movel %a2@,%d5 size_t pathlen, devFS_node **free_node_ptr ) { size_t i = 0; size_t n = data->count; 4acfe: 2c28 0004 movel %a0@(4),%d6 4ad02: 2850 moveal %a0@,%a4 4ad04: 6034 bras 4ad3a devFS_node *free_node = NULL; for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) { devFS_node *current = nodes + i; if (current->name != NULL) { 4ad06: 2214 movel %a4@,%d1 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; 4ad08: 200c movel %a4,%d0 if (current->name != NULL) { 4ad0a: 4a81 tstl %d1 4ad0c: 671c beqs 4ad2a if ( 4ad0e: b6ac 0004 cmpl %a4@(4),%d3 4ad12: 6614 bnes 4ad28 current->namelen == pathlen && memcmp(current->name, path, pathlen) == 0 4ad14: 2f03 movel %d3,%sp@- 4ad16: 2f05 movel %d5,%sp@- 4ad18: 2f01 movel %d1,%sp@- 4ad1a: 4e95 jsr %a5@ 4ad1c: 4fef 000c lea %sp@(12),%sp 4ad20: 4a80 tstl %d0 4ad22: 6702 beqs 4ad26 4ad24: 6002 bras 4ad28 4ad26: 240c movel %a4,%d2 4ad28: 200b movel %a3,%d0 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) { 4ad2a: 5284 addql #1,%d4 4ad2c: 4a80 tstl %d0 4ad2e: 6704 beqs 4ad34 4ad30: 4a82 tstl %d2 4ad32: 660c bnes 4ad40 4ad34: 49ec 0014 lea %a4@(20),%a4 4ad38: 2640 moveal %d0,%a3 4ad3a: bc84 cmpl %d4,%d6 4ad3c: 66c8 bnes 4ad06 4ad3e: 6002 bras 4ad42 4ad40: 2640 moveal %d0,%a3 } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); } } } 4ad42: 202a 0010 movel %a2@(16),%d0 rtems_filesystem_eval_path_get_pathlen(ctx), &free_node ); int eval_flags = rtems_filesystem_eval_path_get_flags(ctx); if (node != NULL) { 4ad46: 4a82 tstl %d2 4ad48: 6712 beqs 4ad5c if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) { 4ad4a: 0800 0006 btst #6,%d0 4ad4e: 6606 bnes 4ad56 currentloc->node_access = node; 4ad50: 2542 0020 movel %d2,%a2@(32) 4ad54: 6026 bras 4ad7c rtems_filesystem_eval_path_clear_path(ctx); } else { rtems_filesystem_eval_path_error(ctx, EEXIST); 4ad56: 4878 0011 pea 11 4ad5a: 6030 bras 4ad8c } } else { if ((eval_flags & RTEMS_FS_MAKE) != 0) { 4ad5c: 0800 0005 btst #5,%d0 4ad60: 6726 beqs 4ad88 <== NEVER TAKEN if (free_node != NULL) { 4ad62: 4a8b tstl %a3 4ad64: 671c beqs 4ad82 free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO; 4ad66: 203c 0000 01ff movel #511,%d0 4ad6c: 2740 0010 movel %d0,%a3@(16) currentloc->node_access = free_node; 4ad70: 254b 0020 movel %a3,%a2@(32) rtems_filesystem_eval_path_context_t *ctx, const char *token, size_t tokenlen ) { ctx->token = token; 4ad74: 2545 0008 movel %d5,%a2@(8) ctx->tokenlen = tokenlen; 4ad78: 2543 000c movel %d3,%a2@(12) static inline void rtems_filesystem_eval_path_clear_path( rtems_filesystem_eval_path_context_t *ctx ) { ctx->pathlen = 0; 4ad7c: 42aa 0004 clrl %a2@(4) 4ad80: 6014 bras 4ad96 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); 4ad82: 4878 001c pea 1c 4ad86: 6004 bras 4ad8c } } else { rtems_filesystem_eval_path_error(ctx, ENOENT); 4ad88: 4878 0002 pea 2 <== NOT EXECUTED 4ad8c: 2f0a movel %a2,%sp@- 4ad8e: 4eb9 0004 4bda jsr 44bda 4ad94: 508f addql #8,%sp } } } 4ad96: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4ad9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043984 : dev_t dev ) { int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 43984: 7003 moveq #3,%d0 const char *name, size_t namelen, mode_t mode, dev_t dev ) { 43986: 4e56 ffec linkw %fp,#-20 4398a: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4398e: 246e 000c moveal %fp@(12),%a2 43992: 242e 0010 movel %fp@(16),%d2 43996: 262e 0014 movel %fp@(20),%d3 4399a: 2a2e 0018 movel %fp@(24),%d5 4399e: 282e 001c movel %fp@(28),%d4 int rv = 0; if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') { 439a2: b082 cmpl %d2,%d0 439a4: 6626 bnes 439cc 439a6: 7264 moveq #100,%d1 439a8: 1012 moveb %a2@,%d0 439aa: 49c0 extbl %d0 439ac: b280 cmpl %d0,%d1 439ae: 661c bnes 439cc <== NEVER TAKEN 439b0: 123c 0065 moveb #101,%d1 439b4: 102a 0001 moveb %a2@(1),%d0 439b8: 49c0 extbl %d0 439ba: b280 cmpl %d0,%d1 439bc: 660e bnes 439cc <== NEVER TAKEN 439be: 123c 0076 moveb #118,%d1 439c2: 102a 0002 moveb %a2@(2),%d0 439c6: 49c0 extbl %d0 439c8: b280 cmpl %d0,%d1 439ca: 6762 beqs 43a2e <== ALWAYS TAKEN if (S_ISBLK(mode) || S_ISCHR(mode)) { 439cc: 2003 movel %d3,%d0 439ce: 0280 0000 f000 andil #61440,%d0 439d4: 0c80 0000 6000 cmpil #24576,%d0 439da: 6708 beqs 439e4 439dc: 0c80 0000 2000 cmpil #8192,%d0 439e2: 665a bnes 43a3e char *dupname = malloc(namelen); 439e4: 2f02 movel %d2,%sp@- 439e6: 4eb9 0004 3f5c jsr 43f5c if (dupname != NULL) { 439ec: 588f addql #4,%sp 439ee: 4a80 tstl %d0 439f0: 672e beqs 43a20 devFS_node *node = parentloc->node_access; 439f2: 206e 0008 moveal %fp@(8),%a0 439f6: 2068 0008 moveal %a0@(8),%a0 node->name = dupname; 439fa: 2080 movel %d0,%a0@ node->namelen = namelen; 439fc: 2142 0004 movel %d2,%a0@(4) node->major = rtems_filesystem_dev_major_t(dev); 43a00: 2145 0008 movel %d5,%a0@(8) node->minor = rtems_filesystem_dev_minor_t(dev); 43a04: 2144 000c movel %d4,%a0@(12) node->mode = mode; 43a08: 2143 0010 movel %d3,%a0@(16) memcpy(dupname, name, namelen); 43a0c: 2f02 movel %d2,%sp@- 43a0e: 2f0a movel %a2,%sp@- 43a10: 2f00 movel %d0,%sp@- 43a12: 4eb9 0004 d11c jsr 4d11c 43a18: 4fef 000c lea %sp@(12),%sp size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43a1c: 4280 clrl %d0 43a1e: 602e bras 43a4e 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; 43a20: 4eb9 0004 c2f0 jsr 4c2f0 <__errno> 43a26: 2040 moveal %d0,%a0 43a28: 700c moveq #12,%d0 43a2a: 2080 movel %d0,%a0@ 43a2c: 601e bras 43a4c size_t namelen, mode_t mode, dev_t dev ) { int rv = 0; 43a2e: 4280 clrl %d0 } else { errno = ENOTSUP; rv = -1; } } else { if (!S_ISDIR(mode)) { 43a30: 0283 0000 f000 andil #61440,%d3 43a36: 0c83 0000 4000 cmpil #16384,%d3 43a3c: 6710 beqs 43a4e <== ALWAYS TAKEN errno = ENOTSUP; 43a3e: 4eb9 0004 c2f0 jsr 4c2f0 <__errno> 43a44: 2040 moveal %d0,%a0 43a46: 20bc 0000 0086 movel #134,%a0@ rv = -1; 43a4c: 70ff moveq #-1,%d0 } } return rv; } 43a4e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 43a54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000427e6 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 427e6: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 427ea: 42a7 clrl %sp@- 427ec: 42a7 clrl %sp@- 427ee: 2f39 0006 0b72 movel 60b72 ,%sp@- 427f4: 4eb9 0004 73a4 jsr 473a4 if (sc == RTEMS_SUCCESSFUL) { 427fa: 4fef 000c lea %sp@(12),%sp 427fe: 4a80 tstl %d0 42800: 660c bnes 4280e <== NEVER TAKEN diskdevs_protected = true; 42802: 7001 moveq #1,%d0 42804: 13c0 0006 0b70 moveb %d0,60b70 return RTEMS_SUCCESSFUL; 4280a: 4280 clrl %d0 4280c: 6002 bras 42810 } else { return RTEMS_NOT_CONFIGURED; 4280e: 7016 moveq #22,%d0 <== NOT EXECUTED } } 42810: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042814 : static void disk_unlock(void) { 42814: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42818: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 4281a: 2f39 0006 0b72 movel 60b72 ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42820: 13c0 0006 0b70 moveb %d0,60b70 sc = rtems_semaphore_release(diskdevs_mutex); 42826: 4eb9 0004 74ac jsr 474ac if (sc != RTEMS_SUCCESSFUL) { 4282c: 588f addql #4,%sp 4282e: 4a80 tstl %d0 42830: 670c beqs 4283e <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 42832: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 42838: 4eb9 0004 7a80 jsr 47a80 <== NOT EXECUTED } } 4283e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004434e : { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 4434e: 307c 0700 moveaw #1792,%a0 44352: 2208 movel %a0,%d1 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 44354: 4e56 fff4 linkw %fp,#-12 44358: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4435c: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 44360: 40c0 movew %sr,%d0 44362: 8280 orl %d0,%d1 44364: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 44366: 47f9 0004 62c4 lea 462c4 ,%a3 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 4436c: 2408 movel %a0,%d2 4436e: 602a bras 4439a rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 44370: 7202 moveq #2,%d1 44372: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 44376: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain( 44378: 42a7 clrl %sp@- 4437a: 42a7 clrl %sp@- 4437c: 2f2a 008c movel %a2@(140),%sp@- 44380: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44382: 4fef 000c lea %sp@(12),%sp 44386: 4a80 tstl %d0 44388: 6708 beqs 44392 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 4438a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4438c: 4eb9 0004 69ec jsr 469ec <== NOT EXECUTED rtems_interrupt_disable (level); 44392: 2202 movel %d2,%d1 44394: 40c0 movew %sr,%d0 44396: 8280 orl %d0,%d1 44398: 46c1 movew %d1,%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) { 4439a: 206a 0084 moveal %a2@(132),%a0 4439e: 222a 0080 movel %a2@(128),%d1 443a2: b288 cmpl %a0,%d1 443a4: 66ca bnes 44370 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); 443a6: 46c0 movew %d0,%sr } } 443a8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 443ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f58 : */ int dup2( int fildes, int fildes2 ) { 42f58: 4e56 ffa8 linkw %fp,#-88 42f5c: 48d7 041c moveml %d2-%d4/%a2,%sp@ /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42f60: 280e movel %fp,%d4 42f62: 0684 ffff ffba addil #-70,%d4 42f68: 45f9 0004 3538 lea 43538 ,%a2 42f6e: 2f04 movel %d4,%sp@- */ int dup2( int fildes, int fildes2 ) { 42f70: 242e 0008 movel %fp@(8),%d2 42f74: 262e 000c movel %fp@(12),%d3 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 42f78: 2f02 movel %d2,%sp@- 42f7a: 4e92 jsr %a2@ if ( status == -1 ) 42f7c: 508f addql #8,%sp 42f7e: 72ff moveq #-1,%d1 42f80: b280 cmpl %d0,%d1 42f82: 6604 bnes 42f88 return -1; 42f84: 70ff moveq #-1,%d0 42f86: 601e bras 42fa6 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 42f88: 2f04 movel %d4,%sp@- 42f8a: 2f03 movel %d3,%sp@- 42f8c: 4e92 jsr %a2@ if ( status == -1 ) 42f8e: 508f addql #8,%sp 42f90: 72ff moveq #-1,%d1 42f92: b280 cmpl %d0,%d1 42f94: 67ee beqs 42f84 <== NEVER TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 42f96: 2f03 movel %d3,%sp@- 42f98: 42a7 clrl %sp@- 42f9a: 2f02 movel %d2,%sp@- 42f9c: 4eb9 0004 31c4 jsr 431c4 42fa2: 4fef 000c lea %sp@(12),%sp } 42fa6: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2 42fac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044efe : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44efe: 4e56 ffec linkw %fp,#-20 44f02: 48d7 041c moveml %d2-%d4/%a2,%sp@ 44f06: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 44f0a: 202a 003c movel %a2@(60),%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44f0e: 242e 0008 movel %fp@(8),%d2 if ((tty->termios.c_lflag & ECHOCTL) && 44f12: 0280 0000 0200 andil #512,%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44f18: 1202 moveb %d2,%d1 if ((tty->termios.c_lflag & ECHOCTL) && 44f1a: 4a80 tstl %d0 44f1c: 674e beqs 44f6c <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 44f1e: 4280 clrl %d0 44f20: 1002 moveb %d2,%d0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 44f22: 7820 moveq #32,%d4 iscntrl(c) && (c != '\t') && (c != '\n')) { 44f24: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0 44f2a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 44f2e: c684 andl %d4,%d3 44f30: 4a03 tstb %d3 44f32: 6738 beqs 44f6c iscntrl(c) && (c != '\t') && (c != '\n')) { 44f34: 7609 moveq #9,%d3 44f36: b680 cmpl %d0,%d3 44f38: 6732 beqs 44f6c 44f3a: 183c 000a moveb #10,%d4 44f3e: b880 cmpl %d0,%d4 44f40: 672a beqs 44f6c char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 44f42: 2f0a movel %a2,%sp@- 44f44: 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; 44f48: 163c 0040 moveb #64,%d3 rtems_termios_puts (echobuf, 2, tty); 44f4c: 486e fffe pea %fp@(-2) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 44f50: 705e moveq #94,%d0 echobuf[1] = c ^ 0x40; 44f52: b782 eorl %d3,%d2 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 44f54: 1d40 fffe moveb %d0,%fp@(-2) echobuf[1] = c ^ 0x40; 44f58: 1d42 ffff moveb %d2,%fp@(-1) rtems_termios_puts (echobuf, 2, tty); 44f5c: 4eb9 0004 4cd4 jsr 44cd4 44f62: 4fef 000c lea %sp@(12),%sp tty->column += 2; 44f66: 54aa 0028 addql #2,%a2@(40) 44f6a: 6010 bras 44f7c } else { oproc (c, tty); 44f6c: 2f0a movel %a2,%sp@- 44f6e: 0281 0000 00ff andil #255,%d1 44f74: 2f01 movel %d1,%sp@- 44f76: 4eba fe4a jsr %pc@(44dc2 ) 44f7a: 508f addql #8,%sp } } 44f7c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 44f82: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005e560 : void endgrent(void) { 5e560: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 5e564: 2039 0009 578c movel 9578c ,%d0 5e56a: 670a beqs 5e576 <== NEVER TAKEN fclose(group_fp); 5e56c: 2f00 movel %d0,%sp@- 5e56e: 4eb9 0006 db88 jsr 6db88 5e574: 588f addql #4,%sp } 5e576: 4e5e unlk %fp ... =============================================================================== 0005e41c : void endpwent(void) { 5e41c: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 5e420: 2039 0009 56b2 movel 956b2 ,%d0 5e426: 670a beqs 5e432 <== NEVER TAKEN fclose(passwd_fp); 5e428: 2f00 movel %d0,%sp@- 5e42a: 4eb9 0006 db88 jsr 6db88 5e430: 588f addql #4,%sp } 5e432: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044f86 : * 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) 44f86: 4e56 ffe4 linkw %fp,#-28 44f8a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 44f8e: 246e 0008 moveal %fp@(8),%a2 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); 44f92: 47f9 0004 4cd4 lea 44cd4 ,%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) 44f98: 262e 000c movel %fp@(12),%d3 44f9c: 6000 011e braw 450bc return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 44fa0: 5381 subql #1,%d1 44fa2: 206a 001c moveal %a2@(28),%a0 if (tty->termios.c_lflag & ECHO) { 44fa6: 202a 003c movel %a2@(60),%d0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 44faa: 2541 0020 movel %d1,%a2@(32) 44fae: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 if (tty->termios.c_lflag & ECHO) { 44fb2: 44c0 movew %d0,%ccr 44fb4: 6a00 0102 bplw 450b8 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 44fb8: 4a83 tstl %d3 44fba: 6620 bnes 44fdc 44fbc: 0800 0004 btst #4,%d0 44fc0: 661a bnes 44fdc <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 44fc2: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 44fc6: 4280 clrl %d0 <== NOT EXECUTED 44fc8: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 44fcc: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%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); 44fd2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44fd6: 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); 44fd8: 6000 ff24 braw 44efe <== NOT EXECUTED 44fdc: 2879 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a4 } else if (c == '\t') { 44fe2: 7809 moveq #9,%d4 44fe4: 0282 0000 00ff andil #255,%d2 44fea: b882 cmpl %d2,%d4 44fec: 665c bnes 4504a int col = tty->read_start_column; 44fee: 242a 002c movel %a2@(44),%d2 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 44ff2: 2248 moveal %a0,%a1 if (tty->termios.c_lflag & ECHOCTL) 44ff4: 0280 0000 0200 andil #512,%d0 44ffa: 6026 bras 45022 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 44ffc: 4284 clrl %d4 44ffe: 1819 moveb %a1@+,%d4 45000: 7a09 moveq #9,%d5 45002: ba84 cmpl %d4,%d5 45004: 6606 bnes 4500c col = (col | 7) + 1; 45006: 7807 moveq #7,%d4 45008: 8484 orl %d4,%d2 4500a: 6014 bras 45020 } else if (iscntrl (c)) { 4500c: 7a20 moveq #32,%d5 4500e: 1834 4801 moveb %a4@(00000001,%d4:l),%d4 45012: c885 andl %d5,%d4 45014: 4a04 tstb %d4 45016: 6708 beqs 45020 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 45018: 4a80 tstl %d0 <== NOT EXECUTED 4501a: 6706 beqs 45022 <== NOT EXECUTED col += 2; 4501c: 5482 addql #2,%d2 <== NOT EXECUTED 4501e: 6002 bras 45022 <== NOT EXECUTED } else { col++; 45020: 5282 addql #1,%d2 * 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) 45022: 2809 movel %a1,%d4 45024: 9888 subl %a0,%d4 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45026: b284 cmpl %d4,%d1 45028: 66d2 bnes 44ffc 4502a: 6016 bras 45042 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 4502c: 2f0a movel %a2,%sp@- 4502e: 4878 0001 pea 1 45032: 4879 0005 b5fd pea 5b5fd 45038: 4e93 jsr %a3@ tty->column--; 4503a: 4fef 000c lea %sp@(12),%sp 4503e: 53aa 0028 subql #1,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 45042: b4aa 0028 cmpl %a2@(40),%d2 45046: 6de4 blts 4502c 45048: 606e bras 450b8 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 4504a: 5282 addql #1,%d2 4504c: 7820 moveq #32,%d4 4504e: 1234 2800 moveb %a4@(00000000,%d2:l),%d1 45052: c284 andl %d4,%d1 45054: 4a01 tstb %d1 45056: 6724 beqs 4507c <== ALWAYS TAKEN 45058: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4505c: 671e beqs 4507c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 4505e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45060: 4878 0003 pea 3 <== NOT EXECUTED 45064: 4879 0005 b5fb pea 5b5fb <== NOT EXECUTED 4506a: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4506c: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 45070: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45074: 6706 beqs 4507c <== NOT EXECUTED tty->column--; 45076: 5380 subql #1,%d0 <== NOT EXECUTED 45078: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 4507c: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0 45082: 7a20 moveq #32,%d5 45084: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 45088: c085 andl %d5,%d0 4508a: 4a00 tstb %d0 4508c: 670c beqs 4509a <== ALWAYS TAKEN 4508e: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 45092: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 45098: 671e beqs 450b8 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 4509a: 2f0a movel %a2,%sp@- 4509c: 4878 0003 pea 3 450a0: 4879 0005 b5fb pea 5b5fb 450a6: 4e93 jsr %a3@ if (tty->column) 450a8: 202a 0028 movel %a2@(40),%d0 450ac: 4fef 000c lea %sp@(12),%sp 450b0: 6706 beqs 450b8 <== NEVER TAKEN tty->column--; 450b2: 5380 subql #1,%d0 450b4: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 450b8: 4a83 tstl %d3 450ba: 6708 beqs 450c4 echo ('\n', tty); return; } } while (tty->ccount) { 450bc: 222a 0020 movel %a2@(32),%d1 450c0: 6600 fede bnew 44fa0 } } if (!lineFlag) break; } } 450c4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 450ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fc8c : 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); 4fc8c: 4281 clrl %d1 4fc8e: 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) { 4fc90: 4e56 fff0 linkw %fp,#-16 4fc94: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4fc98: 246e 0008 moveal %fp@(8),%a2 4fc9c: 122a 0002 moveb %a2@(2),%d1 4fca0: 102a 000c moveb %a2@(12),%d0 4fca4: 9081 subl %d1,%d0 4fca6: 242e 000c movel %fp@(12),%d2 4fcaa: 2802 movel %d2,%d4 4fcac: 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); 4fcae: 2604 movel %d4,%d3 4fcb0: e1ab lsll %d0,%d3 4fcb2: 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 - 4fcb4: 2602 movel %d2,%d3 4fcb6: 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); 4fcb8: 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) 4fcba: 4a2a 007f tstb %a2@(127) 4fcbe: 6706 beqs 4fcc6 4fcc0: b4aa 007a cmpl %a2@(122),%d2 4fcc4: 6760 beqs 4fd26 { fat_buf_release(fs_info); 4fcc6: 2f0a movel %a2,%sp@- 4fcc8: 4eb9 0004 faee jsr 4faee if (op_type == FAT_OP_TYPE_READ) 4fcce: 588f addql #4,%sp 4fcd0: 200a movel %a2,%d0 4fcd2: 0680 0000 0080 addil #128,%d0 4fcd8: 7201 moveq #1,%d1 4fcda: b2ae 0010 cmpl %fp@(16),%d1 4fcde: 6610 bnes 4fcf0 sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf); 4fce0: 2f00 movel %d0,%sp@- 4fce2: 2f04 movel %d4,%sp@- 4fce4: 2f2a 005a movel %a2@(90),%sp@- 4fce8: 4eb9 0004 dfcc jsr 4dfcc 4fcee: 600e bras 4fcfe else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); 4fcf0: 2f00 movel %d0,%sp@- 4fcf2: 2f04 movel %d4,%sp@- 4fcf4: 2f2a 005a movel %a2@(90),%sp@- 4fcf8: 4eb9 0004 df0e jsr 4df0e 4fcfe: 4fef 000c lea %sp@(12),%sp if (sc != RTEMS_SUCCESSFUL) 4fd02: 4a80 tstl %d0 4fd04: 6710 beqs 4fd16 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 4fd06: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4fd0c: 7405 moveq #5,%d2 <== NOT EXECUTED 4fd0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fd10: 70ff moveq #-1,%d0 <== NOT EXECUTED 4fd12: 2082 movel %d2,%a0@ <== NOT EXECUTED 4fd14: 6020 bras 4fd36 <== NOT EXECUTED fs_info->c.blk_num = sec_num; 4fd16: 2542 007a movel %d2,%a2@(122) fs_info->c.modified = 0; 4fd1a: 4200 clrb %d0 fs_info->c.state = FAT_CACHE_ACTUAL; 4fd1c: 7201 moveq #1,%d1 else sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = sec_num; fs_info->c.modified = 0; 4fd1e: 1540 007e moveb %d0,%a2@(126) fs_info->c.state = FAT_CACHE_ACTUAL; 4fd22: 1541 007f moveb %d1,%a2@(127) } *sec_buf = &fs_info->c.buf->buffer[blk_ofs]; 4fd26: 226a 0080 moveal %a2@(128),%a1 4fd2a: d6a9 001a addl %a1@(26),%d3 return RC_OK; 4fd2e: 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]; 4fd30: 206e 0014 moveal %fp@(20),%a0 4fd34: 2083 movel %d3,%a0@ return RC_OK; } 4fd36: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4fd3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004faee : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 4faee: 4e56 ffd4 linkw %fp,#-44 4faf2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4faf6: 246e 0008 moveal %fp@(8),%a2 rtems_status_code sc = RTEMS_SUCCESSFUL; if (fs_info->c.state == FAT_CACHE_EMPTY) 4fafa: 4a2a 007f tstb %a2@(127) 4fafe: 6700 0180 beqw 4fc80 return RC_OK; if (fs_info->c.modified) 4fb02: 4a2a 007e tstb %a2@(126) 4fb06: 6700 0152 beqw 4fc5a { uint32_t sec_num = fs_info->c.blk_num; bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 4fb0a: 4281 clrl %d1 4fb0c: 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; 4fb10: 202a 007a movel %a2@(122),%d0 bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) && 4fb14: b280 cmpl %d0,%d1 4fb16: 620c bhis 4fb24 <== NEVER TAKEN 4fb18: b0aa 001e cmpl %a2@(30),%d0 4fb1c: 55c1 scs %d1 4fb1e: 49c1 extbl %d1 4fb20: 4481 negl %d1 4fb22: 6002 bras 4fb26 4fb24: 4281 clrl %d1 <== NOT EXECUTED 4fb26: 7601 moveq #1,%d3 4fb28: c681 andl %d1,%d3 uint32_t ino ) { return (ino >= fs_info->uino_base); } 4fb2a: 182a 0002 moveb %a2@(2),%d4 4fb2e: 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) 4fb32: 4a03 tstb %d3 4fb34: 673c beqs 4fb72 4fb36: 4a2a 004e tstb %a2@(78) 4fb3a: 6636 bnes 4fb72 <== NEVER TAKEN 4fb3c: 2400 movel %d0,%d2 memcpy(fs_info->sec_buf, 4fb3e: 4285 clrl %d5 4fb40: 0284 0000 00ff andil #255,%d4 4fb46: 0281 0000 00ff andil #255,%d1 fs_info->c.buf->buffer + blk_ofs, 4fb4c: 206a 0080 moveal %a2@(128),%a0 4fb50: 9284 subl %d4,%d1 4fb52: 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); 4fb54: 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, 4fb56: 3a12 movew %a2@,%d5 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 - 4fb58: 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); 4fb5a: e9a8 lsll %d4,%d0 4fb5c: 2f05 movel %d5,%sp@- 4fb5e: d0a8 001a addl %a0@(26),%d0 4fb62: 2f00 movel %d0,%sp@- 4fb64: 2f2a 0084 movel %a2@(132),%sp@- 4fb68: 4eb9 0005 7168 jsr 57168 4fb6e: 4fef 000c lea %sp@(12),%sp fs_info->c.buf->buffer + blk_ofs, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 4fb72: 2f2a 0080 movel %a2@(128),%sp@- 4fb76: 2a3c 0004 e1fa movel #319994,%d5 4fb7c: 2045 moveal %d5,%a0 4fb7e: 4e90 jsr %a0@ if (sc != RTEMS_SUCCESSFUL) 4fb80: 588f addql #4,%sp 4fb82: 4a80 tstl %d0 4fb84: 6704 beqs 4fb8a <== ALWAYS TAKEN 4fb86: 6000 00e2 braw 4fc6a <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 4fb8a: 4200 clrb %d0 4fb8c: 1540 007e moveb %d0,%a2@(126) if (sec_of_fat && !fs_info->vol.mirror) 4fb90: 4a03 tstb %d3 4fb92: 6700 00e6 beqw 4fc7a 4fb96: 4a2a 004e tstb %a2@(78) 4fb9a: 6700 0094 beqw 4fc30 4fb9e: 6000 00da braw 4fc7a <== NOT EXECUTED for (i = 1; i < fs_info->vol.fats; i++) { rtems_bdbuf_buffer *bd; sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i, 4fba2: 41ea 001a lea %a2@(26),%a0 4fba6: 4c10 2800 mulsl %a0@,%d2 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); 4fbaa: 4286 clrl %d6 4fbac: 4280 clrl %d0 4fbae: 1c2a 0002 moveb %a2@(2),%d6 4fbb2: 102a 000c moveb %a2@(12),%d0 4fbb6: d4aa 007a addl %a2@(122),%d2 4fbba: 9086 subl %d6,%d0 4fbbc: 2202 movel %d2,%d1 4fbbe: e0a9 lsrl %d0,%d1 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); 4fbc0: 2e01 movel %d1,%d7 4fbc2: e1af lsll %d0,%d7 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 - 4fbc4: 9487 subl %d7,%d2 fat_block_num_to_sector_num (fs_info, fat_sector_num_to_block_num (fs_info, sector))) << fs_info->vol.sec_log2); 4fbc6: edaa lsll %d6,%d2 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 4fbc8: 661a bnes 4fbe4 <== ALWAYS TAKEN && fs_info->vol.bps == fs_info->vol.bytes_per_block) 4fbca: 4286 clrl %d6 <== NOT EXECUTED 4fbcc: 4280 clrl %d0 <== NOT EXECUTED 4fbce: 3c12 movew %a2@,%d6 <== NOT EXECUTED 4fbd0: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 4fbd4: b086 cmpl %d6,%d0 <== NOT EXECUTED 4fbd6: 660c bnes 4fbe4 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); 4fbd8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4fbda: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4fbdc: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 4fbe0: 4e94 jsr %a4@ <== NOT EXECUTED 4fbe2: 600a bras 4fbee <== NOT EXECUTED } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 4fbe4: 2f04 movel %d4,%sp@- 4fbe6: 2f01 movel %d1,%sp@- 4fbe8: 2f2a 005a movel %a2@(90),%sp@- 4fbec: 4e93 jsr %a3@ 4fbee: 4fef 000c lea %sp@(12),%sp } if ( sc != RTEMS_SUCCESSFUL) 4fbf2: 4a80 tstl %d0 4fbf4: 6702 beqs 4fbf8 <== ALWAYS TAKEN 4fbf6: 6026 bras 4fc1e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps); 4fbf8: 4280 clrl %d0 4fbfa: 3012 movew %a2@,%d0 4fbfc: 206e fffc moveal %fp@(-4),%a0 4fc00: 2f00 movel %d0,%sp@- 4fc02: 2f2a 0084 movel %a2@(132),%sp@- 4fc06: d4a8 001a addl %a0@(26),%d2 4fc0a: 2f02 movel %d2,%sp@- 4fc0c: 4e95 jsr %a5@ sc = rtems_bdbuf_release_modified(bd); 4fc0e: 2f2e fffc movel %fp@(-4),%sp@- 4fc12: 2045 moveal %d5,%a0 4fc14: 4e90 jsr %a0@ if ( sc != RTEMS_SUCCESSFUL) 4fc16: 4fef 0010 lea %sp@(16),%sp 4fc1a: 4a80 tstl %d0 4fc1c: 670e beqs 4fc2c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 4fc1e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4fc24: 720c moveq #12,%d1 <== NOT EXECUTED 4fc26: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fc28: 2081 movel %d1,%a0@ <== NOT EXECUTED 4fc2a: 604a bras 4fc76 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 4fc2c: 5283 addql #1,%d3 4fc2e: 6018 bras 4fc48 { sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd); } else { sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd); 4fc30: 280e movel %fp,%d4 4fc32: 5984 subql #4,%d4 4fc34: 47f9 0004 dfcc lea 4dfcc ,%a3 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); 4fc3a: 49f9 0004 df0e lea 4df0e ,%a4 { 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); 4fc40: 4bf9 0005 7168 lea 57168 ,%a5 sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 4fc46: 7601 moveq #1,%d3 { uint8_t i; for (i = 1; i < fs_info->vol.fats; i++) 4fc48: 4280 clrl %d0 4fc4a: 102a 000d moveb %a2@(13),%d0 4fc4e: 4282 clrl %d2 4fc50: 1403 moveb %d3,%d2 4fc52: b082 cmpl %d2,%d0 4fc54: 6200 ff4c bhiw 4fba2 4fc58: 6020 bras 4fc7a } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 4fc5a: 2f2a 0080 movel %a2@(128),%sp@- 4fc5e: 4eb9 0004 e158 jsr 4e158 if (sc != RTEMS_SUCCESSFUL) 4fc64: 588f addql #4,%sp 4fc66: 4a80 tstl %d0 4fc68: 6710 beqs 4fc7a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 4fc6a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4fc70: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fc72: 7005 moveq #5,%d0 <== NOT EXECUTED 4fc74: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fc76: 70ff moveq #-1,%d0 <== NOT EXECUTED 4fc78: 6008 bras 4fc82 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 4fc7a: 4200 clrb %d0 4fc7c: 1540 007f moveb %d0,%a2@(127) 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; 4fc80: 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; } 4fc82: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4fc88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fa94 : void *buff); static inline uint32_t fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info, uint32_t cln) { 4fa94: 4e56 0000 linkw %fp,#0 4fa98: 206e 0008 moveal %fp@(8),%a0 4fa9c: 2f03 movel %d3,%sp@- 4fa9e: 202e 000c movel %fp@(12),%d0 4faa2: 2f02 movel %d2,%sp@- 4faa4: 4282 clrl %d2 4faa6: 1428 0002 moveb %a0@(2),%d2 uint32_t blk; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4faaa: 4a80 tstl %d0 4faac: 661c bnes 4faca 4faae: 7603 moveq #3,%d3 4fab0: 1228 000e moveb %a0@(14),%d1 4fab4: c283 andl %d3,%d1 4fab6: 4a01 tstb %d1 4fab8: 6710 beqs 4faca <== NEVER TAKEN 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); 4faba: 4281 clrl %d1 4fabc: 1228 000c moveb %a0@(12),%d1 4fac0: 9282 subl %d2,%d1 4fac2: 2028 001e movel %a0@(30),%d0 4fac6: e2a8 lsrl %d1,%d0 4fac8: 601c bras 4fae6 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); 4faca: 4283 clrl %d3 4facc: 4281 clrl %d1 4face: 1628 000c moveb %a0@(12),%d3 4fad2: 1228 0008 moveb %a0@(8),%d1 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; 4fad6: 5580 subql #2,%d0 blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2); 4fad8: 9283 subl %d3,%d1 4fada: 9682 subl %d2,%d3 4fadc: e3a8 lsll %d1,%d0 4fade: 2228 0030 movel %a0@(48),%d1 4fae2: e6a9 lsrl %d3,%d1 blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec); 4fae4: d081 addl %d1,%d0 } return blk; } 4fae6: 241f movel %sp@+,%d2 4fae8: 261f movel %sp@+,%d3 4faea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004efa0 : static inline uint32_t fat_cluster_num_to_sector_num( const fat_fs_info_t *fs_info, uint32_t cln ) { 4efa0: 4e56 0000 linkw %fp,#0 4efa4: 206e 0008 moveal %fp@(8),%a0 4efa8: 202e 000c movel %fp@(12),%d0 4efac: 2f02 movel %d2,%sp@- if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4efae: 4a80 tstl %d0 4efb0: 6612 bnes 4efc4 <== NEVER TAKEN 4efb2: 7403 moveq #3,%d2 4efb4: 1228 000e moveb %a0@(14),%d1 4efb8: c282 andl %d2,%d1 4efba: 4a01 tstb %d1 4efbc: 6706 beqs 4efc4 <== NEVER TAKEN return fs_info->vol.rdir_loc; 4efbe: 2028 001e movel %a0@(30),%d0 4efc2: 600e bras 4efd2 return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 4efc4: 4281 clrl %d1 <== NOT EXECUTED 4efc6: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 4efca: 5580 subql #2,%d0 <== NOT EXECUTED 4efcc: e3a8 lsll %d1,%d0 <== NOT EXECUTED 4efce: d0a8 0030 addl %a0@(48),%d0 <== NOT EXECUTED fs_info->vol.data_fsec); } 4efd2: 241f movel %sp@+,%d2 4efd4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fe54 : 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)); 4fe54: 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) { 4fe56: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4fe5a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4fe5e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4fe62: 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) { 4fe66: 2e2e 0010 movel %fp@(16),%d7 <== NOT EXECUTED ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4fe6a: 9087 subl %d7,%d0 <== NOT EXECUTED 4fe6c: 242e 0014 movel %fp@(20),%d2 <== 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) { 4fe70: 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)); 4fe74: b082 cmpl %d2,%d0 <== NOT EXECUTED 4fe76: 6402 bccs 4fe7a <== NOT EXECUTED 4fe78: 2400 movel %d0,%d2 <== NOT EXECUTED uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 4fe7a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 4fe7e: 2a07 movel %d7,%d5 <== NOT EXECUTED uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; 4fe80: 4286 clrl %d6 <== NOT EXECUTED 4fe82: 47ee fffc lea %fp@(-4),%a3 <== 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); 4fe86: 4bf9 0005 71d8 lea 571d8 ,%a5 <== 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); 4fe8c: 49f9 0004 fc8c lea 4fc8c ,%a4 <== NOT EXECUTED 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)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 4fe92: 2f0a movel %a2,%sp@- <== 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); 4fe94: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 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)); uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 4fe9a: 4eba fbf8 jsr %pc@(4fa94 )<== NOT EXECUTED 4fe9e: 508f addql #8,%sp <== NOT EXECUTED uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2; 4fea0: 4281 clrl %d1 <== NOT EXECUTED 4fea2: 122a 000c moveb %a2@(12),%d1 <== NOT EXECUTED 4fea6: e2ad lsrl %d1,%d5 <== NOT EXECUTED uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4fea8: 2805 movel %d5,%d4 <== NOT EXECUTED ssize_t bytes_written = 0; ssize_t ret; cur_blk += blocks_in_offset; 4feaa: da80 addl %d0,%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); 4feac: e3ac lsll %d1,%d4 <== 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); 4feae: 2d43 fff8 movel %d3,%fp@(-8) <== 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); 4feb2: 9e84 subl %d4,%d7 <== NOT EXECUTED 4feb4: 6000 0082 braw 4ff38 <== 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)); 4feb8: 4280 clrl %d0 <== NOT EXECUTED 4feba: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED 4febe: 2240 moveal %d0,%a1 <== NOT EXECUTED 4fec0: 9087 subl %d7,%d0 <== NOT EXECUTED 4fec2: 2600 movel %d0,%d3 <== NOT EXECUTED 4fec4: b480 cmpl %d0,%d2 <== NOT EXECUTED 4fec6: 6402 bccs 4feca <== NOT EXECUTED 4fec8: 2602 movel %d2,%d3 <== 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)); 4feca: 2803 movel %d3,%d4 <== NOT EXECUTED 4fecc: b083 cmpl %d3,%d0 <== NOT EXECUTED 4fece: 6402 bccs 4fed2 <== NOT EXECUTED 4fed0: 2800 movel %d0,%d4 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 4fed2: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED 4fed6: 102a 000c moveb %a2@(12),%d0 <== 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) 4feda: 4a84 tstl %d4 <== NOT EXECUTED 4fedc: 6768 beqs 4ff46 <== 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); 4fede: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED 4fee4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4feea: 9081 subl %d1,%d0 <== NOT EXECUTED 4feec: 2205 movel %d5,%d1 <== NOT EXECUTED 4feee: e1a9 lsll %d0,%d1 <== NOT EXECUTED 4fef0: 2001 movel %d1,%d0 <== NOT EXECUTED { if (bytes_to_write == fs_info->vol.bytes_per_block) 4fef2: b3c4 cmpal %d4,%a1 <== NOT EXECUTED 4fef4: 6608 bnes 4fefe <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4fef6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fef8: 4878 0002 pea 2 <== NOT EXECUTED 4fefc: 6006 bras 4ff04 <== NOT EXECUTED } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 4fefe: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ff00: 4878 0001 pea 1 <== NOT EXECUTED 4ff04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ff06: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ff08: 4e94 jsr %a4@ <== NOT EXECUTED 4ff0a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (RC_OK == rc) 4ff0e: 4a80 tstl %d0 <== NOT EXECUTED 4ff10: 661a bnes 4ff2c <== NOT EXECUTED { memset(blk_buf + offset, pattern, bytes_to_write); 4ff12: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4ff14: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4ff18: deae fffc addl %fp@(-4),%d7 <== NOT EXECUTED 4ff1c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4ff1e: 4e95 jsr %a5@ <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 4ff20: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ff24: 7001 moveq #1,%d0 <== NOT EXECUTED 4ff26: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED 4ff2a: 601a bras 4ff46 <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 4ff2c: b083 cmpl %d3,%d0 <== NOT EXECUTED 4ff2e: 6612 bnes 4ff42 <== NOT EXECUTED rc = -1; else { bytes_to_write -= ret; 4ff30: 9483 subl %d3,%d2 <== NOT EXECUTED bytes_written += ret; 4ff32: dc83 addl %d3,%d6 <== NOT EXECUTED ++cur_blk; 4ff34: 5285 addql #1,%d5 <== NOT EXECUTED 4ff36: 4287 clrl %d7 <== NOT EXECUTED ssize_t ret; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 4ff38: 4a82 tstl %d2 <== NOT EXECUTED 4ff3a: 6600 ff7c bnew 4feb8 <== NOT EXECUTED 4ff3e: 2006 movel %d6,%d0 <== NOT EXECUTED 4ff40: 6008 bras 4ff4a <== NOT EXECUTED fs_info, cur_blk, ofs_blk, c, pattern); if (c != ret) 4ff42: 70ff moveq #-1,%d0 <== NOT EXECUTED 4ff44: 6004 bras 4ff4a <== NOT EXECUTED } } if (RC_OK != rc) return rc; else return bytes_to_write; 4ff46: 2004 movel %d4,%d0 <== NOT EXECUTED 4ff48: 60e2 bras 4ff2c <== NOT EXECUTED } if (RC_OK != rc) return rc; else return bytes_written; } 4ff4a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ff50: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ff54 : 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)); 4ff54: 4280 clrl %d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 4ff56: 4e56 ffd0 linkw %fp,#-48 4ff5a: 122e 001f moveb %fp@(31),%d1 4ff5e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ff62: 246e 0008 moveal %fp@(8),%a2 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4ff66: 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) { 4ff6a: 2e2e 0010 movel %fp@(16),%d7 ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4ff6e: 9087 subl %d7,%d0 const uint32_t start_cln, const uint32_t offset, const uint32_t count, const void *buff, const bool overwrite_cluster) { 4ff70: 1d41 fffb moveb %d1,%fp@(-5) ssize_t rc = RC_OK; uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset)); 4ff74: 242e 0014 movel %fp@(20),%d2 4ff78: b082 cmpl %d2,%d0 4ff7a: 6402 bccs 4ff7e <== ALWAYS TAKEN 4ff7c: 2400 movel %d0,%d2 <== NOT EXECUTED uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln); 4ff7e: 2f2e 000c movel %fp@(12),%sp@- uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 4ff82: 2c07 movel %d7,%d6 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); ssize_t bytes_written = 0; 4ff84: 4285 clrl %d5 4ff86: 47ee fffc lea %fp@(-4),%a3 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); 4ff8a: 4bf9 0005 7168 lea 57168 ,%a5 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); 4ff90: 49f9 0004 fc8c lea 4fc8c ,%a4 const void *buff, 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); 4ff96: 2f0a movel %a2,%sp@- 4ff98: 4eba fafa jsr %pc@(4fa94 ) 4ff9c: 508f addql #8,%sp uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2); 4ff9e: 4281 clrl %d1 4ffa0: 122a 000c moveb %a2@(12),%d1 4ffa4: e2ae lsrl %d1,%d6 uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2); 4ffa6: 2606 movel %d6,%d3 ssize_t bytes_written = 0; uint8_t *buffer = (uint8_t*)buff; ssize_t ret; uint32_t c; cur_blk += blocks_in_offset; 4ffa8: dc80 addl %d0,%d6 { 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); 4ffaa: e3ab lsll %d1,%d3 4ffac: 9e83 subl %d3,%d7 4ffae: 6000 008c braw 5003c 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)); 4ffb2: 4280 clrl %d0 4ffb4: 302a 000a movew %a2@(10),%d0 4ffb8: 2240 moveal %d0,%a1 4ffba: 9087 subl %d7,%d0 4ffbc: 2600 movel %d0,%d3 4ffbe: b480 cmpl %d0,%d2 4ffc0: 6402 bccs 4ffc4 4ffc2: 2602 movel %d2,%d3 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)); 4ffc4: 2803 movel %d3,%d4 4ffc6: b083 cmpl %d3,%d0 4ffc8: 6402 bccs 4ffcc <== ALWAYS TAKEN 4ffca: 2800 movel %d0,%d4 <== NOT EXECUTED uint32_t ino ) { return (ino >= fs_info->uino_base); } 4ffcc: 122a 0002 moveb %a2@(2),%d1 4ffd0: 102a 000c moveb %a2@(12),%d0 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) 4ffd4: 4a84 tstl %d4 4ffd6: 6772 beqs 5004a <== 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); 4ffd8: 0281 0000 00ff andil #255,%d1 4ffde: 0280 0000 00ff andil #255,%d0 4ffe4: 9081 subl %d1,%d0 4ffe6: 2206 movel %d6,%d1 4ffe8: e1a9 lsll %d0,%d1 4ffea: 2001 movel %d1,%d0 { if ( overwrite_block 4ffec: 4a2e fffb tstb %fp@(-5) 4fff0: 6604 bnes 4fff6 || (bytes_to_write == fs_info->vol.bytes_per_block)) 4fff2: b3c4 cmpal %d4,%a1 4fff4: 6608 bnes 4fffe { rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf); 4fff6: 2f0b movel %a3,%sp@- 4fff8: 4878 0002 pea 2 4fffc: 6006 bras 50004 } else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf); 4fffe: 2f0b movel %a3,%sp@- 50000: 4878 0001 pea 1 50004: 2f00 movel %d0,%sp@- 50006: 2f0a movel %a2,%sp@- 50008: 4e94 jsr %a4@ 5000a: 4fef 0010 lea %sp@(16),%sp if (RC_OK == rc) 5000e: 4a80 tstl %d0 50010: 661e bnes 50030 <== NEVER TAKEN { memcpy(blk_buf + offset, buf, bytes_to_write); 50012: 206e 0018 moveal %fp@(24),%a0 50016: deae fffc addl %fp@(-4),%d7 5001a: 2f04 movel %d4,%sp@- 5001c: 4870 5800 pea %a0@(00000000,%d5:l) 50020: 2f07 movel %d7,%sp@- 50022: 4e95 jsr %a5@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 50024: 4fef 000c lea %sp@(12),%sp 50028: 7001 moveq #1,%d0 5002a: 1540 007e moveb %d0,%a2@(126) 5002e: 601a bras 5004a cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 50030: b083 cmpl %d3,%d0 50032: 6612 bnes 50046 <== NEVER TAKEN rc = -1; else { bytes_to_write -= ret; 50034: 9483 subl %d3,%d2 bytes_written += ret; 50036: da83 addl %d3,%d5 ++cur_blk; 50038: 5286 addql #1,%d6 5003a: 4287 clrl %d7 uint32_t c; cur_blk += blocks_in_offset; while ( (RC_OK == rc) && (0 < bytes_to_write)) 5003c: 4a82 tstl %d2 5003e: 6600 ff72 bnew 4ffb2 50042: 2005 movel %d5,%d0 50044: 6008 bras 5004e cur_blk, ofs_blk, c, &buffer[bytes_written], overwrite_cluster); if (c != ret) 50046: 70ff moveq #-1,%d0 <== NOT EXECUTED 50048: 6004 bras 5004e <== NOT EXECUTED } } if (RC_OK != rc) return rc; else return bytes_to_write; 5004a: 2004 movel %d4,%d0 5004c: 60e2 bras 50030 } if (RC_OK != rc) return rc; else return bytes_written; } 5004e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 50054: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f462 : /* * 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) 4f462: 7201 moveq #1,%d1 int fat_file_close( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 4f464: 4e56 0000 linkw %fp,#0 4f468: 2f0a movel %a2,%sp@- 4f46a: 246e 000c moveal %fp@(12),%a2 4f46e: 2f02 movel %d2,%sp@- 4f470: 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) 4f474: 202a 0008 movel %a2@(8),%d0 4f478: b280 cmpl %d0,%d1 4f47a: 640c bccs 4f488 { fat_fd->links_num--; 4f47c: 5380 subql #1,%d0 4f47e: 2540 0008 movel %d0,%a2@(8) return rc; 4f482: 4280 clrl %d0 4f484: 6000 0094 braw 4f51a } key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 4f488: 102a 0030 moveb %a2@(48),%d0 4f48c: 0800 0000 btst #0,%d0 4f490: 674a beqs 4f4dc <== ALWAYS TAKEN { rc = fat_file_truncate(fs_info, fat_fd, 0); 4f492: 42a7 clrl %sp@- <== NOT EXECUTED 4f494: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f496: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f498: 4eb9 0004 f376 jsr 4f376 <== NOT EXECUTED if ( rc != RC_OK ) 4f49e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f4a2: 4a80 tstl %d0 <== NOT EXECUTED 4f4a4: 6674 bnes 4f51a <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4f4a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f4a8: 4eb9 0005 2380 jsr 52380 <_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) ) 4f4ae: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4f4b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f4b4: 4eb9 0005 0abc jsr 50abc <== NOT EXECUTED 4f4ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f4be: 4a00 tstb %d0 <== NOT EXECUTED 4f4c0: 670e beqs 4f4d0 <== NOT EXECUTED fat_free_unique_ino(fs_info, fat_fd->ino); 4f4c2: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4f4c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f4c8: 4eb9 0005 0a8e jsr 50a8e <== NOT EXECUTED 4f4ce: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 4f4d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f4d2: 4eb9 0004 3f4c jsr 43f4c <== NOT EXECUTED 4f4d8: 588f addql #4,%sp <== NOT EXECUTED 4f4da: 602a bras 4f506 <== NOT EXECUTED } else { if (fat_ino_is_unique(fs_info, fat_fd->ino)) 4f4dc: 2f2a 000c movel %a2@(12),%sp@- 4f4e0: 2f02 movel %d2,%sp@- 4f4e2: 4eb9 0005 0abc jsr 50abc 4f4e8: 508f addql #8,%sp 4f4ea: 4a00 tstb %d0 4f4ec: 6706 beqs 4f4f4 <== ALWAYS TAKEN { fat_fd->links_num = 0; 4f4ee: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED 4f4f2: 6012 bras 4f506 <== NOT EXECUTED 4f4f4: 2f0a movel %a2,%sp@- 4f4f6: 4eb9 0005 2380 jsr 52380 <_Chain_Extract> } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 4f4fc: 2f0a movel %a2,%sp@- 4f4fe: 4eb9 0004 3f4c jsr 43f4c 4f504: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4f506: 2d42 0008 movel %d2,%fp@(8) return rc; } 4f50a: 242e fff8 movel %fp@(-8),%d2 4f50e: 246e fffc moveal %fp@(-4),%a2 4f512: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4f514: 4ef9 0004 faee jmp 4faee return rc; } 4f51a: 242e fff8 movel %fp@(-8),%d2 4f51e: 246e fffc moveal %fp@(-4),%a2 4f522: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f5bc : fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 4f5bc: 4e56 ffcc linkw %fp,#-52 4f5c0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4f5c4: 262e 0014 movel %fp@(20),%d3 4f5c8: 286e 0018 moveal %fp@(24),%a4 4f5cc: 266e 000c moveal %fp@(12),%a3 uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; 4f5d0: 2883 movel %d3,%a4@ fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 4f5d2: 246e 0008 moveal %fp@(8),%a2 uint32_t cls_added; ssize_t bytes_written; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 4f5d6: 202b 0018 movel %a3@(24),%d0 fat_file_fd_t *fat_fd, bool zero_fill, uint32_t new_length, uint32_t *a_length ) { 4f5da: 1e2e 0013 moveb %fp@(19),%d7 int rc = RC_OK; uint32_t chain = 0; 4f5de: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 4f5e2: 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) 4f5e6: b083 cmpl %d3,%d0 4f5e8: 6506 bcss 4f5f0 return RC_OK; 4f5ea: 4282 clrl %d2 4f5ec: 6000 01a2 braw 4f790 if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4f5f0: 7201 moveq #1,%d1 4f5f2: b2ab 0020 cmpl %a3@(32),%d1 4f5f6: 6616 bnes 4f60e <== ALWAYS TAKEN 4f5f8: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 4f5fc: 6610 bnes 4f60e <== NOT EXECUTED 4f5fe: 7403 moveq #3,%d2 <== NOT EXECUTED 4f600: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED 4f604: c282 andl %d2,%d1 <== NOT EXECUTED 4f606: 4a01 tstb %d1 <== NOT EXECUTED 4f608: 6704 beqs 4f60e <== NOT EXECUTED 4f60a: 6000 00ac braw 4f6b8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 4f60e: 4284 clrl %d4 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 4f610: 2a03 movel %d3,%d5 4f612: 9a80 subl %d0,%d5 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))) & 4f614: 382a 0006 movew %a2@(6),%d4 4f618: 2204 movel %d4,%d1 4f61a: 5381 subql #1,%d1 4f61c: 2c01 movel %d1,%d6 4f61e: 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 - 4f620: 9886 subl %d6,%d4 4f622: c881 andl %d1,%d4 (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) 4f624: b885 cmpl %d5,%d4 4f626: 6404 bccs 4f62c <== NEVER TAKEN bytes2add -= bytes_remain; 4f628: 9a84 subl %d4,%d5 4f62a: 6002 bras 4f62e else bytes2add = 0; 4f62c: 4285 clrl %d5 <== NOT EXECUTED if (zero_fill && bytes_remain > 0) { 4f62e: 4a07 tstb %d7 4f630: 6740 beqs 4f672 <== ALWAYS TAKEN 4f632: 4a84 tstl %d4 <== NOT EXECUTED 4f634: 673c beqs 4f672 <== 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); 4f636: 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; 4f63a: 4281 clrl %d1 <== NOT EXECUTED 4f63c: 122a 0008 moveb %a2@(8),%d1 <== NOT EXECUTED 4f640: 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); 4f642: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f644: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f646: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f648: 4eba f9dc jsr %pc@(4f026 ) <== NOT EXECUTED if (rc != RC_OK) 4f64c: 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); 4f650: 2401 movel %d1,%d2 <== NOT EXECUTED if (rc != RC_OK) 4f652: 6600 013c bnew 4f790 <== NOT EXECUTED return rc; bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0); 4f656: 42a7 clrl %sp@- <== NOT EXECUTED 4f658: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f65a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f65c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f660: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f662: 4eb9 0004 fe54 jsr 4fe54 <== NOT EXECUTED if (bytes_remain != bytes_written) 4f668: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f66c: b084 cmpl %d4,%d0 <== NOT EXECUTED 4f66e: 6702 beqs 4f672 <== NOT EXECUTED 4f670: 6052 bras 4f6c4 <== 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) 4f672: 4a85 tstl %d5 4f674: 6700 ff74 beqw 4f5ea return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 4f678: 4280 clrl %d0 4f67a: 102a 0008 moveb %a2@(8),%d0 4f67e: 2c05 movel %d5,%d6 4f680: 5386 subql #1,%d6 4f682: e0ae lsrl %d0,%d6 4f684: 5286 addql #1,%d6 rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add, 4f686: 0287 0000 00ff andil #255,%d7 4f68c: 2f07 movel %d7,%sp@- 4f68e: 486e fff8 pea %fp@(-8) 4f692: 486e fffc pea %fp@(-4) 4f696: 2f06 movel %d6,%sp@- 4f698: 486e fff0 pea %fp@(-16) 4f69c: 2f0a movel %a2,%sp@- 4f69e: 4eb9 0005 53d8 jsr 553d8 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 4f6a4: 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, 4f6a8: 2400 movel %d0,%d2 &cls_added, &last_cl, zero_fill); /* this means that low level I/O error occured */ if (rc != RC_OK) 4f6aa: 6600 00e4 bnew 4f790 return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 4f6ae: 202e fffc movel %fp@(-4),%d0 4f6b2: 6616 bnes 4f6ca <== ALWAYS TAKEN 4f6b4: 4a84 tstl %d4 <== NOT EXECUTED 4f6b6: 6612 bnes 4f6ca <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 4f6b8: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f6be: 721c moveq #28,%d1 <== NOT EXECUTED 4f6c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f6c2: 2081 movel %d1,%a0@ <== NOT EXECUTED 4f6c4: 74ff moveq #-1,%d2 <== NOT EXECUTED 4f6c6: 6000 00c8 braw 4f790 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 4f6ca: b086 cmpl %d6,%d0 4f6cc: 6718 beqs 4f6e6 <== ALWAYS TAKEN { new_length -= bytes2add & (fs_info->vol.bpc - 1); 4f6ce: 4281 clrl %d1 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 4f6d0: 9c80 subl %d0,%d6 <== NOT EXECUTED 4f6d2: 4280 clrl %d0 <== NOT EXECUTED 4f6d4: 102a 0008 moveb %a2@(8),%d0 <== 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); 4f6d8: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 4f6dc: e1ae lsll %d0,%d6 <== 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); 4f6de: 5381 subql #1,%d1 <== NOT EXECUTED 4f6e0: ca81 andl %d1,%d5 <== NOT EXECUTED 4f6e2: 9685 subl %d5,%d3 <== NOT EXECUTED new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2; 4f6e4: 9686 subl %d6,%d3 <== NOT EXECUTED } /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 4f6e6: 206b 0018 moveal %a3@(24),%a0 4f6ea: 4a88 tstl %a0 4f6ec: 6612 bnes 4f700 { fat_fd->map.disk_cln = fat_fd->cln = chain; 4f6ee: 202e fff0 movel %fp@(-16),%d0 fat_fd->map.file_cln = 0; 4f6f2: 42ab 0032 clrl %a3@(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; 4f6f6: 2740 001c movel %d0,%a3@(28) 4f6fa: 2740 0036 movel %d0,%a3@(54) 4f6fe: 6054 bras 4f754 fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 4f700: 202b 003a movel %a3@(58),%d0 4f704: 72ff moveq #-1,%d1 4f706: b280 cmpl %d0,%d1 4f708: 6706 beqs 4f710 <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; 4f70a: 2d40 fff4 movel %d0,%fp@(-12) 4f70e: 6020 bras 4f730 } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 4f710: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 4f714: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 4f718: 4878 0001 pea 1 <== NOT EXECUTED 4f71c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f71e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f720: 4eb9 0004 f526 jsr 4f526 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 4f726: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM, 4f72a: 2800 movel %d0,%d4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 4f72c: 6702 beqs 4f730 <== NOT EXECUTED 4f72e: 6048 bras 4f778 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 4f730: 2f2e fff0 movel %fp@(-16),%sp@- 4f734: 2f2e fff4 movel %fp@(-12),%sp@- 4f738: 2f0a movel %a2,%sp@- 4f73a: 4eb9 0005 5100 jsr 55100 if ( rc != RC_OK ) 4f740: 4fef 000c lea %sp@(12),%sp fat_free_fat_clusters_chain(fs_info, chain); return rc; } } rc = fat_set_fat_cluster(fs_info, old_last_cl, chain); 4f744: 2800 movel %d0,%d4 if ( rc != RC_OK ) 4f746: 6702 beqs 4f74a <== ALWAYS TAKEN 4f748: 602e bras 4f778 <== NOT EXECUTED { fat_free_fat_clusters_chain(fs_info, chain); return rc; } fat_buf_release(fs_info); 4f74a: 2f0a movel %a2,%sp@- 4f74c: 4eb9 0004 faee jsr 4faee 4f752: 588f addql #4,%sp } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 4f754: 4aae fffc tstl %fp@(-4) 4f758: 6730 beqs 4f78a <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; 4f75a: 276e fff8 003a movel %fp@(-8),%a3@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 4f760: 4aab 0010 tstl %a3@(16) 4f764: 6624 bnes 4f78a <== ALWAYS TAKEN { rc = fat_init_clusters_chain(fs_info, chain); 4f766: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 4f76a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f76c: 4eb9 0005 0984 jsr 50984 <== NOT EXECUTED if ( rc != RC_OK ) 4f772: 508f addql #8,%sp <== NOT EXECUTED 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); 4f774: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) 4f776: 6712 beqs 4f78a <== NOT EXECUTED { fat_free_fat_clusters_chain(fs_info, chain); 4f778: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 4f77c: 2404 movel %d4,%d2 <== NOT EXECUTED 4f77e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f780: 4eb9 0005 5334 jsr 55334 <== NOT EXECUTED 4f786: 508f addql #8,%sp <== NOT EXECUTED 4f788: 6006 bras 4f790 <== NOT EXECUTED return rc; } } } *a_length = new_length; 4f78a: 2883 movel %d3,%a4@ fat_fd->fat_file_size = new_length; 4f78c: 2743 0018 movel %d3,%a3@(24) return RC_OK; } 4f790: 2002 movel %d2,%d0 4f792: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4 4f798: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f526 : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4f526: 7001 moveq #1,%d0 fat_file_ioctl( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, int cmd, ...) { 4f528: 4e56 fffc linkw %fp,#-4 4f52c: 226e 0008 moveal %fp@(8),%a1 4f530: 2f0a movel %a2,%sp@- 4f532: 206e 000c moveal %fp@(12),%a0 4f536: 2f02 movel %d2,%sp@- int rc = RC_OK; uint32_t cur_cln = 0; 4f538: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4f53c: b0ae 0010 cmpl %fp@(16),%d0 4f540: 6660 bnes 4f5a2 <== NEVER TAKEN { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 4f542: 202e 0014 movel %fp@(20),%d0 ret = va_arg(ap, uint32_t *); 4f546: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 4f54a: b0a8 0018 cmpl %a0@(24),%d0 4f54e: 650e bcss 4f55e <== ALWAYS TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 4f550: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f556: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f558: 7005 moveq #5,%d0 <== NOT EXECUTED 4f55a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4f55c: 6050 bras 4f5ae <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4f55e: 7201 moveq #1,%d1 4f560: b2a8 0020 cmpl %a0@(32),%d1 4f564: 6618 bnes 4f57e <== NEVER TAKEN 4f566: 4aa8 0024 tstl %a0@(36) 4f56a: 6612 bnes 4f57e <== NEVER TAKEN 4f56c: 7403 moveq #3,%d2 4f56e: 1229 000e moveb %a1@(14),%d1 4f572: c282 andl %d2,%d1 4f574: 4a01 tstb %d1 4f576: 6706 beqs 4f57e <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 4f578: 4292 clrl %a2@ rc = RC_OK; 4f57a: 4280 clrl %d0 break; 4f57c: 6032 bras 4f5b0 } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 4f57e: 486e fffc pea %fp@(-4) <== NOT EXECUTED *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 4f582: 4281 clrl %d1 <== NOT EXECUTED 4f584: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED 4f588: e2a8 lsrl %d1,%d0 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 4f58a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f58c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4f58e: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4f590: 4eba fa94 jsr %pc@(4f026 ) <== NOT EXECUTED if ( rc != RC_OK ) 4f594: 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); 4f598: 2001 movel %d1,%d0 <== NOT EXECUTED if ( rc != RC_OK ) 4f59a: 6614 bnes 4f5b0 <== NOT EXECUTED break; *ret = cur_cln; 4f59c: 24ae fffc movel %fp@(-4),%a2@ <== NOT EXECUTED break; 4f5a0: 600e bras 4f5b0 <== NOT EXECUTED default: errno = EINVAL; 4f5a2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f5a8: 7416 moveq #22,%d2 <== NOT EXECUTED 4f5aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f5ac: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; 4f5ae: 70ff moveq #-1,%d0 <== NOT EXECUTED break; } va_end(ap); return rc; } 4f5b0: 242e fff4 movel %fp@(-12),%d2 4f5b4: 246e fff8 moveal %fp@(-8),%a2 4f5b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f026 : fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 4f026: 4e56 ffe0 linkw %fp,#-32 4f02a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4f02e: 246e 000c moveal %fp@(12),%a2 4f032: 262e 0010 movel %fp@(16),%d3 4f036: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 4f03a: 202a 0032 movel %a2@(50),%d0 4f03e: b083 cmpl %d3,%d0 4f040: 6606 bnes 4f048 *disk_cln = fat_fd->map.disk_cln; 4f042: 26aa 0036 movel %a2@(54),%a3@ 4f046: 6056 bras 4f09e { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 4f048: b083 cmpl %d3,%d0 4f04a: 640c bccs 4f058 <== NEVER TAKEN { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 4f04c: 2a03 movel %d3,%d5 4f04e: 9a80 subl %d0,%d5 uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 4f050: 2d6a 0036 fffc movel %a2@(54),%fp@(-4) 4f056: 6008 bras 4f060 count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 4f058: 2a03 movel %d3,%d5 <== NOT EXECUTED 4f05a: 2d6a 001c fffc movel %a2@(28),%fp@(-4) <== NOT EXECUTED } /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4f060: 240e movel %fp,%d2 cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f062: 4284 clrl %d4 { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4f064: 5982 subql #4,%d2 4f066: 49f9 0005 4f94 lea 54f94 ,%a4 cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f06c: 601e bras 4f08c { rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4f06e: 2f02 movel %d2,%sp@- 4f070: 2f2e fffc movel %fp@(-4),%sp@- 4f074: 2f2e 0008 movel %fp@(8),%sp@- 4f078: 4e94 jsr %a4@ if ( rc != RC_OK ) 4f07a: 4fef 000c lea %sp@(12),%sp 4f07e: 4a80 tstl %d0 4f080: 6708 beqs 4f08a <== ALWAYS TAKEN return rc; 4f082: 2600 movel %d0,%d3 <== NOT EXECUTED 4f084: 5bc2 smi %d2 <== NOT EXECUTED 4f086: 49c2 extbl %d2 <== NOT EXECUTED 4f088: 6018 bras 4f0a2 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f08a: 5284 addql #1,%d4 4f08c: ba84 cmpl %d4,%d5 4f08e: 66de bnes 4f06e return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 4f090: 202e fffc movel %fp@(-4),%d0 if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 4f094: 2543 0032 movel %d3,%a2@(50) fat_fd->map.disk_cln = cur_cln; 4f098: 2540 0036 movel %d0,%a2@(54) *disk_cln = cur_cln; 4f09c: 2680 movel %d0,%a3@ } return RC_OK; 4f09e: 4282 clrl %d2 4f0a0: 4283 clrl %d3 } 4f0a2: 2002 movel %d2,%d0 4f0a4: 2203 movel %d3,%d1 4f0a6: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4 4f0ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f97c : void fat_file_mark_removed( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 4f97c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4f980: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4f984: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); 4f988: 486a 0020 pea %a2@(32) <== NOT EXECUTED void fat_file_mark_removed( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 4f98c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname); 4f990: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f992: 4eba f644 jsr %pc@(4efd8 ) <== NOT EXECUTED 4f996: 508f addql #8,%sp <== NOT EXECUTED 4f998: 2400 movel %d0,%d2 <== NOT EXECUTED 4f99a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f99c: 4eb9 0005 2380 jsr 52380 <_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); 4f9a2: 7001 moveq #1,%d0 <== NOT EXECUTED 4f9a4: 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 ); 4f9a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f9a8: 2200 movel %d0,%d1 <== NOT EXECUTED 4f9aa: e988 lsll #4,%d0 <== NOT EXECUTED 4f9ac: e589 lsll #2,%d1 <== NOT EXECUTED 4f9ae: 9081 subl %d1,%d0 <== NOT EXECUTED 4f9b0: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED 4f9b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f9b6: 4eb9 0004 8700 jsr 48700 <_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; 4f9bc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f9c0: 7201 moveq #1,%d1 <== NOT EXECUTED 4f9c2: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 4f9c6: 8081 orl %d1,%d0 <== NOT EXECUTED 4f9c8: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 4f9cc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4f9d2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f0b0 : fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4f0b0: 4e56 ffe0 linkw %fp,#-32 4f0b4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4f0b8: 2a2e 000c movel %fp@(12),%d5 int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 4f0bc: 283c 0004 efd8 movel #323544,%d4 4f0c2: 2044 moveal %d4,%a0 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4f0c4: 7601 moveq #1,%d3 int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 4f0c6: 2f05 movel %d5,%sp@- fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4f0c8: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 4f0cc: 2f0b movel %a3,%sp@- fat_file_open( fat_fs_info_t *fs_info, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4f0ce: 286e 0010 moveal %fp@(16),%a4 int rc = RC_OK; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(fs_info, &dir_pos->sname); 4f0d2: 4e90 jsr %a0@ */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4f0d4: 2a6b 0062 moveal %a3@(98),%a5 4f0d8: 2400 movel %d0,%d2 4f0da: 508f addql #8,%sp uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4f0dc: c680 andl %d0,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4f0de: 2003 movel %d3,%d0 4f0e0: e98b lsll #4,%d3 4f0e2: e588 lsll #2,%d0 4f0e4: 9680 subl %d0,%d3 4f0e6: dbc3 addal %d3,%a5 4f0e8: 245d moveal %a5@+,%a2 4f0ea: 601c bras 4f108 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); 4f0ec: 486a 0020 pea %a2@(32) 4f0f0: 2044 moveal %d4,%a0 4f0f2: 2f0b movel %a3,%sp@- 4f0f4: 4e90 jsr %a0@ 4f0f6: 508f addql #8,%sp if ( (key1) == ck) 4f0f8: b082 cmpl %d2,%d0 4f0fa: 660a bnes 4f106 <== ALWAYS TAKEN /* 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; 4f0fc: 288a movel %a2,%a4@ <== NOT EXECUTED lfat_fd->links_num++; 4f0fe: 52aa 0008 addql #1,%a2@(8) <== NOT EXECUTED 4f102: 6000 00d0 braw 4f1d4 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 4f106: 2452 moveal %a2@,%a2 ) { 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) ; ) 4f108: bbca cmpal %a2,%a5 4f10a: 66e0 bnes 4f0ec 4f10c: 6000 00ca braw 4f1d8 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname); 4f110: 486a 0020 pea %a2@(32) <== NOT EXECUTED 4f114: 2044 moveal %d4,%a0 <== NOT EXECUTED 4f116: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f118: 4e90 jsr %a0@ <== NOT EXECUTED 4f11a: 508f addql #8,%sp <== NOT EXECUTED if ( (key1) == ck) 4f11c: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f11e: 660a bnes 4f12a <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 4f120: 4a82 tstl %d2 <== NOT EXECUTED 4f122: 6710 beqs 4f134 <== NOT EXECUTED 4f124: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED 4f128: 670a beqs 4f134 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 4f12a: 2452 moveal %a2@,%a2 <== 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) ; ) 4f12c: bbca cmpal %a2,%a5 4f12e: 66e0 bnes 4f110 <== NEVER TAKEN return 0; } } the_node = the_node->next; } return -1; 4f130: 78ff moveq #-1,%d4 4f132: 6002 bras 4f136 if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) { *ret = (void *)the_node; return 0; 4f134: 4284 clrl %d4 <== 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)); 4f136: 4878 0042 pea 42 4f13a: 4eb9 0004 4410 jsr 44410 if ( lfat_fd == NULL ) 4f140: 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)); 4f142: 2440 moveal %d0,%a2 4f144: 2880 movel %d0,%a4@ if ( lfat_fd == NULL ) 4f146: 660e bnes 4f156 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 4f148: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f14e: 720c moveq #12,%d1 <== NOT EXECUTED 4f150: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f152: 2081 movel %d1,%a0@ <== NOT EXECUTED 4f154: 606a bras 4f1c0 <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 4f156: 4878 0042 pea 42 4f15a: 42a7 clrl %sp@- 4f15c: 2f00 movel %d0,%sp@- 4f15e: 4eb9 0005 71d8 jsr 571d8 lfat_fd->links_num = 1; 4f164: 7001 moveq #1,%d0 lfat_fd->flags &= ~FAT_FILE_REMOVED; 4f166: 72fe moveq #-2,%d1 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; 4f168: 2540 0008 movel %d0,%a2@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; 4f16c: 102a 0030 moveb %a2@(48),%d0 4f170: c081 andl %d1,%d0 4f172: 1540 0030 moveb %d0,%a2@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4f176: 70ff moveq #-1,%d0 4f178: 2540 003a movel %d0,%a2@(58) lfat_fd->dir_pos = *dir_pos; 4f17c: 4878 0010 pea 10 4f180: 2f05 movel %d5,%sp@- 4f182: 486a 0020 pea %a2@(32) 4f186: 4eb9 0005 7168 jsr 57168 if ( rc != RC_OK ) 4f18c: 4fef 0018 lea %sp@(24),%sp 4f190: 4a84 tstl %d4 4f192: 6706 beqs 4f19a <== NEVER TAKEN lfat_fd->ino = key; 4f194: 2542 000c movel %d2,%a2@(12) 4f198: 602a bras 4f1c4 else { lfat_fd->ino = fat_get_unique_ino(fs_info); 4f19a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f19c: 4eb9 0005 09f6 jsr 509f6 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4f1a2: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(fs_info); 4f1a4: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4f1a8: 661a bnes 4f1c4 <== NOT EXECUTED { free((*fat_fd)); 4f1aa: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4f1ac: 4eb9 0004 3f4c jsr 43f4c <== 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 ); 4f1b2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f1b8: 588f addql #4,%sp <== NOT EXECUTED 4f1ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f1bc: 700c moveq #12,%d0 <== NOT EXECUTED 4f1be: 2080 movel %d0,%a0@ <== NOT EXECUTED 4f1c0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4f1c2: 6026 bras 4f1ea <== 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 ); 4f1c4: 2f0a movel %a2,%sp@- 4f1c6: d6ab 0062 addl %a3@(98),%d3 4f1ca: 2f03 movel %d3,%sp@- 4f1cc: 4eb9 0004 8700 jsr 48700 <_Chain_Append> 4f1d2: 508f addql #8,%sp /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 4f1d4: 4280 clrl %d0 4f1d6: 6012 bras 4f1ea 4f1d8: 2a6b 0066 moveal %a3@(102),%a5 4f1dc: dbc3 addal %d3,%a5 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 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); 4f1de: 283c 0004 efd8 movel #323544,%d4 4f1e4: 245d moveal %a5@+,%a2 4f1e6: 6000 ff44 braw 4f12c * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 4f1ea: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4f1f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f206 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 4f206: 4e56 ffd4 linkw %fp,#-44 4f20a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4f20e: 246e 0008 moveal %fp@(8),%a2 4f212: 266e 000c moveal %fp@(12),%a3 4f216: 282e 0010 movel %fp@(16),%d4 4f21a: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 4f21e: 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) 4f222: 4a82 tstl %d2 4f224: 6700 013c beqw 4f362 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 4f228: 202b 0018 movel %a3@(24),%d0 4f22c: b084 cmpl %d4,%d0 4f22e: 6300 0132 blsw 4f362 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4f232: b082 cmpl %d2,%d0 4f234: 6508 bcss 4f23e <== NEVER TAKEN (start > fat_fd->fat_file_size - count)) 4f236: 2200 movel %d0,%d1 4f238: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4f23a: b284 cmpl %d4,%d1 4f23c: 6404 bccs 4f242 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 4f23e: 2400 movel %d0,%d2 <== NOT EXECUTED 4f240: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4f242: 7001 moveq #1,%d0 4f244: b0ab 0020 cmpl %a3@(32),%d0 4f248: 6652 bnes 4f29c <== NEVER TAKEN 4f24a: 4aab 0024 tstl %a3@(36) 4f24e: 664c bnes 4f29c <== NEVER TAKEN 4f250: 7203 moveq #3,%d1 4f252: 102a 000e moveb %a2@(14),%d0 4f256: c081 andl %d1,%d0 4f258: 4a00 tstb %d0 4f25a: 6740 beqs 4f29c <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln); 4f25c: 2f2b 001c movel %a3@(28),%sp@- 4f260: 2f0a movel %a2,%sp@- 4f262: 4eba fd3c jsr %pc@(4efa0 ) sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 4f266: 588f addql #4,%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); 4f268: 4281 clrl %d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 4f26a: 2040 moveal %d0,%a0 4f26c: 2eae 0018 movel %fp@(24),%sp@ 4f270: 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); 4f272: 3212 movew %a2@,%d1 4f274: 5381 subql #1,%d1 ret = _fat_block_read(fs_info, sec, byte, count, buf); 4f276: c284 andl %d4,%d1 4f278: 2f01 movel %d1,%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); 4f27a: 4281 clrl %d1 4f27c: 122a 0002 moveb %a2@(2),%d1 4f280: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, count, buf); 4f282: 4870 4800 pea %a0@(00000000,%d4:l) 4f286: 2f0a movel %a2,%sp@- 4f288: 4eb9 0004 fd40 jsr 4fd40 <_fat_block_read> if ( ret < 0 ) 4f28e: 4fef 0014 lea %sp@(20),%sp 4f292: 4a80 tstl %d0 4f294: 6c00 00d6 bgew 4f36c 4f298: 6000 00d0 braw 4f36a <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4f29c: 4280 clrl %d0 <== NOT EXECUTED 4f29e: 102a 0008 moveb %a2@(8),%d0 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 4f2a2: 2c0e movel %fp,%d6 <== NOT EXECUTED 4f2a4: 5986 subql #4,%d6 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4f2a6: 2604 movel %d4,%d3 <== NOT EXECUTED 4f2a8: e0ab lsrl %d0,%d3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4f2aa: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 4f2ae: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f2b0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4f2b2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f2b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f2b6: 4eba fd6e jsr %pc@(4f026 ) <== NOT EXECUTED if (rc != RC_OK) 4f2ba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4f2be: 4a81 tstl %d1 <== NOT EXECUTED 4f2c0: 6600 00a4 bnew 4f366 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4f2c4: 99cc subal %a4,%a4 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 4f2c6: 4bfa fcd8 lea %pc@(4efa0 ),%a5<== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4f2ca: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED 4f2d0: 5385 subql #1,%d5 <== NOT EXECUTED 4f2d2: c885 andl %d5,%d4 <== NOT EXECUTED 4f2d4: 4285 clrl %d5 <== NOT EXECUTED 4f2d6: 2e04 movel %d4,%d7 <== NOT EXECUTED 4f2d8: 6068 bras 4f342 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 4f2da: 4285 clrl %d5 <== NOT EXECUTED 4f2dc: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED 4f2e0: 9a87 subl %d7,%d5 <== NOT EXECUTED 4f2e2: b485 cmpl %d5,%d2 <== NOT EXECUTED 4f2e4: 6402 bccs 4f2e8 <== NOT EXECUTED 4f2e6: 2a02 movel %d2,%d5 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 4f2e8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f2ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f2ee: 4e95 jsr %a5@ <== NOT EXECUTED 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); 4f2f0: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(fs_info, cur_cln); 4f2f4: 508f addql #8,%sp <== NOT EXECUTED 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); 4f2f6: 4870 c800 pea %a0@(00000000,%a4:l) <== 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); 4f2fa: 4281 clrl %d1 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 4f2fc: 2f05 movel %d5,%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); 4f2fe: 3212 movew %a2@,%d1 <== NOT EXECUTED 4f300: 5381 subql #1,%d1 <== NOT EXECUTED ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 4f302: c287 andl %d7,%d1 <== NOT EXECUTED 4f304: 2f01 movel %d1,%sp@- <== 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); 4f306: 4281 clrl %d1 <== NOT EXECUTED 4f308: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED 4f30c: e2af lsrl %d1,%d7 <== NOT EXECUTED 4f30e: 2047 moveal %d7,%a0 <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd); 4f310: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4f314: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f316: 4eb9 0004 fd40 jsr 4fd40 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 4f31c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4f320: 4a80 tstl %d0 <== NOT EXECUTED 4f322: 6d46 blts 4f36a <== NOT EXECUTED return -1; count -= c; 4f324: 9485 subl %d5,%d2 <== NOT EXECUTED cmpltd += c; 4f326: d9c5 addal %d5,%a4 <== NOT EXECUTED save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 4f328: 4287 clrl %d7 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4f32a: 2f06 movel %d6,%sp@- <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 4f32c: 2a2e fffc movel %fp@(-4),%d5 <== NOT EXECUTED rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4f330: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f332: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f334: 4eb9 0005 4f94 jsr 54f94 <== NOT EXECUTED if ( rc != RC_OK ) 4f33a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f33e: 4a80 tstl %d0 <== NOT EXECUTED 4f340: 662a bnes 4f36c <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 4f342: 4a82 tstl %d2 <== NOT EXECUTED 4f344: 6694 bnes 4f2da <== 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); 4f346: 4282 clrl %d2 <== NOT EXECUTED 4f348: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED 4f34c: 41f4 48ff lea %a4@(ffffffff,%d4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 4f350: 2745 0036 movel %d5,%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); 4f354: 2008 movel %a0,%d0 <== NOT EXECUTED 4f356: e4a8 lsrl %d2,%d0 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 4f358: d083 addl %d3,%d0 <== NOT EXECUTED 4f35a: 2740 0032 movel %d0,%a3@(50) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 4f35e: 200c movel %a4,%d0 <== NOT EXECUTED 4f360: 600a bras 4f36c <== 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; 4f362: 4280 clrl %d0 <== NOT EXECUTED 4f364: 6006 bras 4f36c <== 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) 4f366: 2001 movel %d1,%d0 <== NOT EXECUTED 4f368: 6002 bras 4f36c <== NOT EXECUTED 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; 4f36a: 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; } 4f36c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4f372: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f9d6 : 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)) && 4f9d6: 7001 moveq #1,%d0 <== NOT EXECUTED int fat_file_size( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd ) { 4f9d8: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4f9dc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED 4f9e0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4f9e4: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; 4f9e8: 2d6a 001c fffc movel %a2@(28),%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)) && 4f9ee: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 4f9f2: 661a bnes 4fa0e <== NOT EXECUTED 4f9f4: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 4f9f8: 6614 bnes 4fa0e <== NOT EXECUTED 4f9fa: 7203 moveq #3,%d1 <== NOT EXECUTED 4f9fc: 102b 000e moveb %a3@(14),%d0 <== NOT EXECUTED 4fa00: c081 andl %d1,%d0 <== NOT EXECUTED 4fa02: 4a00 tstb %d0 <== NOT EXECUTED 4fa04: 6708 beqs 4fa0e <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 4fa06: 256b 0028 0018 movel %a3@(40),%a2@(24) <== NOT EXECUTED 4fa0c: 6042 bras 4fa50 <== NOT EXECUTED fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4fa0e: 260e movel %fp,%d3 <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 4fa10: 4280 clrl %d0 <== NOT EXECUTED fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4fa12: 5983 subql #4,%d3 <== NOT EXECUTED 4fa14: 49f9 0005 4f94 lea 54f94 ,%a4 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 4fa1a: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 4fa1e: 601c bras 4fa3c <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 4fa20: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4fa22: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4fa24: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fa26: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 4fa28: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fa2c: 4a80 tstl %d0 <== NOT EXECUTED 4fa2e: 6622 bnes 4fa52 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 4fa30: 4280 clrl %d0 <== NOT EXECUTED 4fa32: 302b 0006 movew %a3@(6),%d0 <== NOT EXECUTED 4fa36: d1aa 0018 addl %d0,%a2@(24) <== NOT EXECUTED fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; 4fa3a: 2002 movel %d2,%d0 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 4fa3c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4fa40: 2202 movel %d2,%d1 <== NOT EXECUTED 4fa42: c2ab 0010 andl %a3@(16),%d1 <== NOT EXECUTED 4fa46: b2ab 0014 cmpl %a3@(20),%d1 <== NOT EXECUTED 4fa4a: 65d4 bcss 4fa20 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 4fa4c: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED 4fa50: 4280 clrl %d0 <== NOT EXECUTED return rc; } 4fa52: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4fa58: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f376 : ) { int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 4f376: 70ff moveq #-1,%d0 <== NOT EXECUTED fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 4f378: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4f37c: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4f380: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 4f384: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED int rc = RC_OK; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 4f388: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED fat_file_truncate( fat_fs_info_t *fs_info, fat_file_fd_t *fat_fd, uint32_t new_length ) { 4f38c: 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 ) 4f390: 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; 4f394: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 4f398: b088 cmpl %a0,%d0 <== NOT EXECUTED 4f39a: 6206 bhis 4f3a2 <== NOT EXECUTED return rc; 4f39c: 4280 clrl %d0 <== NOT EXECUTED 4f39e: 6000 00b8 braw 4f458 <== NOT EXECUTED assert(fat_fd->fat_file_size); 4f3a2: 4a80 tstl %d0 <== NOT EXECUTED 4f3a4: 661c bnes 4f3c2 <== NOT EXECUTED 4f3a6: 4879 0006 5dce pea 65dce <== NOT EXECUTED 4f3ac: 4879 0006 5e2c pea 65e2c <__FUNCTION__.7464> <== NOT EXECUTED 4f3b2: 4878 02d1 pea 2d1 <== NOT EXECUTED 4f3b6: 4879 0006 5de4 pea 65de4 <== NOT EXECUTED 4f3bc: 4eb9 0005 1354 jsr 51354 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 4f3c2: 4282 clrl %d2 <== NOT EXECUTED 4f3c4: 4281 clrl %d1 <== NOT EXECUTED 4f3c6: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED 4f3ca: 342b 0006 movew %a3@(6),%d2 <== NOT EXECUTED 4f3ce: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED 4f3d2: 2408 movel %a0,%d2 <== NOT EXECUTED 4f3d4: e2aa lsrl %d1,%d2 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 4f3d6: 2602 movel %d2,%d3 <== NOT EXECUTED 4f3d8: e3ab lsll %d1,%d3 <== NOT EXECUTED 4f3da: b083 cmpl %d3,%d0 <== NOT EXECUTED 4f3dc: 63be blss 4f39c <== NOT EXECUTED return RC_OK; if (cl_start != 0) 4f3de: 4a82 tstl %d2 <== NOT EXECUTED 4f3e0: 6618 bnes 4f3fa <== NOT EXECUTED if (rc != RC_OK) return rc; } rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); 4f3e2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4f3e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f3e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f3ea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f3ec: 4eba fc38 jsr %pc@(4f026 ) <== NOT EXECUTED if (rc != RC_OK) 4f3f0: 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); 4f3f4: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 4f3f6: 6660 bnes 4f458 <== NOT EXECUTED 4f3f8: 601c bras 4f416 <== 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); 4f3fa: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4f3fe: 2042 moveal %d2,%a0 <== NOT EXECUTED 4f400: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 4f404: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f406: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f408: 4eba fc1c jsr %pc@(4f026 ) <== NOT EXECUTED if (rc != RC_OK) 4f40c: 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); 4f410: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 4f412: 67ce beqs 4f3e2 <== NOT EXECUTED 4f414: 6042 bras 4f458 <== NOT EXECUTED rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(fs_info, cur_cln); 4f416: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 4f41a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f41c: 4eb9 0005 5334 jsr 55334 <== NOT EXECUTED if (rc != RC_OK) 4f422: 508f addql #8,%sp <== NOT EXECUTED 4f424: 4a80 tstl %d0 <== NOT EXECUTED 4f426: 6630 bnes 4f458 <== NOT EXECUTED return rc; if (cl_start != 0) 4f428: 4a82 tstl %d2 <== NOT EXECUTED 4f42a: 6700 ff70 beqw 4f39c <== NOT EXECUTED { rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC); 4f42e: 4878 ffff pea ffffffff <== NOT EXECUTED 4f432: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f436: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f438: 4eb9 0005 5100 jsr 55100 <== NOT EXECUTED if ( rc != RC_OK ) 4f43e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f442: 4a80 tstl %d0 <== NOT EXECUTED 4f444: 6612 bnes 4f458 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 4f446: 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; 4f44a: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 4f44c: 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; 4f450: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 4f454: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED } return RC_OK; } 4f458: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4f45e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f79c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 4f79c: 4e56 ffc4 linkw %fp,#-60 4f7a0: 202e 0014 movel %fp@(20),%d0 4f7a4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4f7a8: 246e 000c moveal %fp@(12),%a2 ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; bool zero_fill = start > fat_fd->fat_file_size; uint32_t file_cln_initial = fat_fd->map.file_cln; 4f7ac: 2a2a 0032 movel %a2@(50),%d5 fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 4f7b0: 266e 0008 moveal %fp@(8),%a3 4f7b4: 282e 0010 movel %fp@(16),%d4 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; 4f7b8: 222a 0018 movel %a2@(24),%d1 { int rc = RC_OK; ssize_t ret; uint32_t cmpltd = 0; uint32_t byte; uint32_t c = 0; 4f7bc: 42ae fff8 clrl %fp@(-8) bool zero_fill = start > fat_fd->fat_file_size; uint32_t file_cln_initial = fat_fd->map.file_cln; 4f7c0: 2d45 fff0 movel %d5,%fp@(-16) uint32_t cln; if ( count == 0 ) 4f7c4: 4a80 tstl %d0 4f7c6: 6700 0192 beqw 4f95a return cmpltd; if (start >= fat_fd->size_limit) 4f7ca: 242a 0014 movel %a2@(20),%d2 4f7ce: b484 cmpl %d4,%d2 4f7d0: 6210 bhis 4f7e2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EFBIG); 4f7d2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 4f7d8: 741b moveq #27,%d2 <== NOT EXECUTED 4f7da: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f7dc: 2082 movel %d2,%a0@ <== NOT EXECUTED 4f7de: 6000 0190 braw 4f970 <== NOT EXECUTED if (count > fat_fd->size_limit - start) 4f7e2: 9484 subl %d4,%d2 4f7e4: b082 cmpl %d2,%d0 4f7e6: 6402 bccs 4f7ea <== NEVER TAKEN 4f7e8: 2400 movel %d0,%d2 count = fat_fd->size_limit - start; rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c); 4f7ea: 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; 4f7ee: b284 cmpl %d4,%d1 4f7f0: 55c0 scs %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); 4f7f2: 2602 movel %d2,%d3 4f7f4: d684 addl %d4,%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; 4f7f6: 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); 4f7f8: 4480 negl %d0 4f7fa: 2f03 movel %d3,%sp@- 4f7fc: 2f00 movel %d0,%sp@- 4f7fe: 2f0a movel %a2,%sp@- 4f800: 2f0b movel %a3,%sp@- 4f802: 4eb9 0004 f5bc jsr 4f5bc if (RC_OK == rc) 4f808: 4fef 0014 lea %sp@(20),%sp 4f80c: 4a80 tstl %d0 4f80e: 6600 0162 bnew 4f972 { /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 4f812: 202e fff8 movel %fp@(-8),%d0 4f816: b680 cmpl %d0,%d3 4f818: 6704 beqs 4f81e <== ALWAYS TAKEN count = c - start; 4f81a: 2400 movel %d0,%d2 <== NOT EXECUTED 4f81c: 9484 subl %d4,%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)); 4f81e: 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)) 4f820: 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)); 4f824: b2aa 0020 cmpl %a2@(32),%d1 4f828: 6614 bnes 4f83e 4f82a: 4aaa 0024 tstl %a2@(36) 4f82e: 660e bnes 4f83e <== NEVER TAKEN 4f830: 7a03 moveq #3,%d5 4f832: c085 andl %d5,%d0 4f834: 4a00 tstb %d0 4f836: 56c0 sne %d0 4f838: 49c0 extbl %d0 4f83a: 4480 negl %d0 4f83c: 6002 bras 4f840 4f83e: 4280 clrl %d0 4f840: 4285 clrl %d5 4f842: 1a2b 0008 moveb %a3@(8),%d5 */ 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)) 4f846: 0800 0000 btst #0,%d0 4f84a: 6732 beqs 4f87e { cln = fat_fd->cln; cln += (start >> fs_info->vol.bpc_log2); byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 4f84c: 42a7 clrl %sp@- 4f84e: 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); 4f852: 4280 clrl %d0 ret = fat_cluster_write(fs_info, 4f854: 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); byte = start & (fs_info->vol.bpc -1); 4f856: 302b 0006 movew %a3@(6),%d0 4f85a: 5380 subql #1,%d0 ret = fat_cluster_write(fs_info, 4f85c: c084 andl %d4,%d0 /* 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); 4f85e: eaac lsrl %d5,%d4 byte = start & (fs_info->vol.bpc -1); ret = fat_cluster_write(fs_info, 4f860: 2f00 movel %d0,%sp@- 4f862: d8aa 001c addl %a2@(28),%d4 4f866: 2f04 movel %d4,%sp@- 4f868: 2f0b movel %a3,%sp@- 4f86a: 4eb9 0004 ff54 jsr 4ff54 cln, byte, count, buf, false); if (0 > ret) 4f870: 4fef 0018 lea %sp@(24),%sp 4f874: 4a80 tstl %d0 4f876: 6d00 00f8 bltw 4f970 4f87a: 6000 00f6 braw 4f972 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 4f87e: 2e0e movel %fp,%d7 4f880: 5987 subql #4,%d7 4f882: 2047 moveal %d7,%a0 uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */ uint32_t start_cln = start >> fs_info->vol.bpc_log2; 4f884: 2604 movel %d4,%d3 4f886: eaab lsrl %d5,%d3 const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 4f888: 4290 clrl %a0@ 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); 4f88a: 2f07 movel %d7,%sp@- 4f88c: 2f03 movel %d3,%sp@- 4f88e: 2f0a movel %a2,%sp@- 4f890: 2f0b movel %a3,%sp@- 4f892: 4eba f792 jsr %pc@(4f026 ) if (RC_OK == rc) 4f896: 4fef 0010 lea %sp@(16),%sp 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); 4f89a: 2a41 moveal %d1,%a5 if (RC_OK == rc) 4f89c: 4a81 tstl %d1 4f89e: 6600 00b2 bnew 4f952 { file_cln_cnt = cur_cln - fat_fd->cln; 4f8a2: 222e fffc movel %fp@(-4),%d1 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); 4f8a6: 2003 movel %d3,%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; 4f8a8: 92aa 001c subl %a2@(28),%d1 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); 4f8ac: 2844 moveal %d4,%a4 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 */ 4f8ae: 4284 clrl %d4 const uint32_t count, const uint8_t *buf, const uint32_t file_cln_initial) { int rc = RC_OK; uint32_t cmpltd = 0; 4f8b0: 4286 clrl %d6 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); 4f8b2: eba8 lsll %d5,%d0 uint32_t ofs_cln_save = ofs_cln; uint32_t bytes_to_write = count; uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; 4f8b4: 4205 clrb %d5 rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln); if (RC_OK == rc) { file_cln_cnt = cur_cln - fat_fd->cln; 4f8b6: 2d41 ffec movel %d1,%fp@(-20) 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); 4f8ba: 99c0 subal %d0,%a4 4f8bc: 200c movel %a4,%d0 uint32_t ofs_cln_save = ofs_cln; uint32_t bytes_to_write = count; uint32_t file_cln_cnt; ssize_t ret; uint32_t c; bool overwrite_cluster = false; 4f8be: 1d45 fff7 moveb %d5,%fp@(-9) 4f8c2: 6062 bras 4f926 { 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)); 4f8c4: 4281 clrl %d1 4f8c6: 322b 0006 movew %a3@(6),%d1 4f8ca: 9280 subl %d0,%d1 4f8cc: b481 cmpl %d1,%d2 4f8ce: 6402 bccs 4f8d2 4f8d0: 2202 movel %d2,%d1 if (file_cln_initial < file_cln_cnt) 4f8d2: 2e2e ffec movel %fp@(-20),%d7 4f8d6: beae fff0 cmpl %fp@(-16),%d7 4f8da: 6306 blss 4f8e2 overwrite_cluster = true; 4f8dc: 7a01 moveq #1,%d5 4f8de: 1d45 fff7 moveb %d5,%fp@(-9) ret = fat_cluster_write(fs_info, 4f8e2: 7a01 moveq #1,%d5 4f8e4: 1e2e fff7 moveb %fp@(-9),%d7 4f8e8: 206e 0018 moveal %fp@(24),%a0 4f8ec: ce85 andl %d5,%d7 4f8ee: 2f07 movel %d7,%sp@- 4f8f0: 4870 6800 pea %a0@(00000000,%d6:l) 4f8f4: 2f01 movel %d1,%sp@- 4f8f6: 2f00 movel %d0,%sp@- 4f8f8: 2f2e fffc movel %fp@(-4),%sp@- 4f8fc: 2f0b movel %a3,%sp@- 4f8fe: 4eb9 0004 ff54 jsr 4ff54 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 4f904: 4fef 0018 lea %sp@(24),%sp 4f908: 4a80 tstl %d0 4f90a: 6c52 bges 4f95e <== ALWAYS TAKEN 4f90c: 601e bras 4f92c <== 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); 4f90e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4f912: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4f914: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4f916: 4eb9 0005 4f94 jsr 54f94 <== 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) 4f91c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f920: 4a80 tstl %d0 <== NOT EXECUTED 4f922: 660e bnes 4f932 <== NOT EXECUTED 4f924: 4280 clrl %d0 && (bytes_to_write > 0)) 4f926: 4a82 tstl %d2 4f928: 669a bnes 4f8c4 4f92a: 6008 bras 4f934 cur_cln, ofs_cln, c, &buf[cmpltd], overwrite_cluster); if (0 > ret) 4f92c: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED 4f930: 6002 bras 4f934 <== 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) 4f932: 2a40 moveal %d0,%a5 <== 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); 4f934: 4282 clrl %d2 4f936: 142b 0008 moveb %a3@(8),%d2 4f93a: 49f4 68ff lea %a4@(ffffffff,%d6:l),%a4 fat_fd->map.disk_cln = save_cln; 4f93e: 2544 0036 movel %d4,%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); 4f942: 200c movel %a4,%d0 4f944: e4a8 lsrl %d2,%d0 } } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = start_cln + 4f946: d083 addl %d3,%d0 4f948: 2540 0032 movel %d0,%a2@(50) ((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; } if (RC_OK != rc) 4f94c: 4a8d tstl %a5 4f94e: 6602 bnes 4f952 <== NEVER TAKEN return rc; else return cmpltd; 4f950: 2a46 moveal %d6,%a5 fat_fd, start, count, buf, file_cln_initial); if (0 > ret) 4f952: 4a8d tstl %a5 4f954: 6d1a blts 4f970 <== NEVER TAKEN rc = -1; else cmpltd = ret; 4f956: 200d movel %a5,%d0 4f958: 6018 bras 4f972 uint32_t file_cln_initial = fat_fd->map.file_cln; uint32_t cln; if ( count == 0 ) return cmpltd; 4f95a: 4280 clrl %d0 <== NOT EXECUTED 4f95c: 6014 bras 4f972 <== NOT EXECUTED if (RC_OK == rc) { ++file_cln_cnt; bytes_to_write -= ret; cmpltd += ret; save_cln = cur_cln; 4f95e: 282e fffc movel %fp@(-4),%d4 if (0 > ret) rc = -1; if (RC_OK == rc) { ++file_cln_cnt; 4f962: 52ae ffec addql #1,%fp@(-20) bytes_to_write -= ret; 4f966: 9480 subl %d0,%d2 cmpltd += ret; 4f968: dc80 addl %d0,%d6 save_cln = cur_cln; if (0 < bytes_to_write) 4f96a: 4a82 tstl %d2 4f96c: 67b6 beqs 4f924 <== ALWAYS TAKEN 4f96e: 609e bras 4f90e <== NOT EXECUTED start, count, buf, file_cln_initial); if (0 > ret) rc = -1; 4f970: 70ff moveq #-1,%d0 <== NOT EXECUTED } if (RC_OK != rc) return rc; else return cmpltd; } 4f972: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4f978: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00055334 : int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 55334: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 55338: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; uint32_t next_cln = 0; 5533c: 264e moveal %fp,%a3 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; 5533e: 4282 clrl %d2 <== NOT EXECUTED fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 55340: 4285 clrl %d5 <== 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); 55342: 49f9 0005 4f94 lea 54f94 ,%a4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 55348: 4bf9 0005 5100 lea 55100 ,%a5 <== NOT EXECUTED int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 5534e: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; uint32_t cur_cln = chain; 55352: 2606 movel %d6,%d3 <== NOT EXECUTED int fat_free_fat_clusters_chain( fat_fs_info_t *fs_info, uint32_t chain ) { 55354: 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; 55358: 42a3 clrl %a3@- <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5535a: 6044 bras 553a0 <== NOT EXECUTED { rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln); 5535c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5535e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 55360: 2f0a movel %a2,%sp@- <== NOT EXECUTED 55362: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 55364: 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); 55368: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) 5536a: 671c beqs 55388 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5536c: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 55370: 72ff moveq #-1,%d1 <== NOT EXECUTED 55372: b280 cmpl %d0,%d1 <== NOT EXECUTED 55374: 6706 beqs 5537c <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 55376: d480 addl %d0,%d2 <== NOT EXECUTED 55378: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 5537c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5537e: 4eb9 0004 faee jsr 4faee <== NOT EXECUTED 55384: 588f addql #4,%sp <== NOT EXECUTED 55386: 6044 bras 553cc <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); 55388: 42a7 clrl %sp@- <== NOT EXECUTED 5538a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5538c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5538e: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 55390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 55394: 4a80 tstl %d0 <== NOT EXECUTED 55396: 6702 beqs 5539a <== NOT EXECUTED 55398: 2a00 movel %d0,%d5 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 5539a: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 5539e: 5282 addql #1,%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) 553a0: 2003 movel %d3,%d0 <== NOT EXECUTED 553a2: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED 553a6: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 553aa: 65b0 bcss 5535c <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 553ac: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED 553b0: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 553b2: 2546 0046 movel %d6,%a2@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 553b6: b280 cmpl %d0,%d1 <== NOT EXECUTED 553b8: 6706 beqs 553c0 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 553ba: d480 addl %d0,%d2 <== NOT EXECUTED 553bc: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED fat_buf_release(fs_info); 553c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 553c2: 2805 movel %d5,%d4 <== NOT EXECUTED 553c4: 4eb9 0004 faee jsr 4faee <== NOT EXECUTED 553ca: 588f addql #4,%sp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 553cc: 2004 movel %d4,%d0 <== NOT EXECUTED 553ce: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 553d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050a8e : void fat_free_unique_ino( fat_fs_info_t *fs_info, uint32_t ino ) { 50a8e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 50a92: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 50a96: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 50a9a: 90a9 0076 subl %a1@(118),%d0 <== NOT EXECUTED 50a9e: 2200 movel %d0,%d1 <== NOT EXECUTED 50aa0: e689 lsrl #3,%d1 <== NOT EXECUTED 50aa2: 2069 006a moveal %a1@(106),%a0 <== NOT EXECUTED 50aa6: d1c1 addal %d1,%a0 <== NOT EXECUTED 50aa8: 7207 moveq #7,%d1 <== NOT EXECUTED 50aaa: c280 andl %d0,%d1 <== NOT EXECUTED 50aac: 7001 moveq #1,%d0 <== NOT EXECUTED 50aae: e3a8 lsll %d1,%d0 <== NOT EXECUTED 50ab0: 1210 moveb %a0@,%d1 <== NOT EXECUTED 50ab2: 4680 notl %d0 <== NOT EXECUTED 50ab4: c081 andl %d1,%d0 <== NOT EXECUTED 50ab6: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 50ab8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054f94 : uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 54f94: 7001 moveq #1,%d0 fat_get_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t *ret_val ) { 54f96: 4e56 ffd8 linkw %fp,#-40 54f9a: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 54f9e: 266e 0008 moveal %fp@(8),%a3 54fa2: 242e 000c movel %fp@(12),%d2 54fa6: 246e 0010 moveal %fp@(16),%a2 uint8_t *sec_buf; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 54faa: b082 cmpl %d2,%d0 54fac: 6400 0134 bccw 550e2 54fb0: 202b 0034 movel %a3@(52),%d0 54fb4: 5280 addql #1,%d0 54fb6: b082 cmpl %d2,%d0 54fb8: 6404 bccs 54fbe <== ALWAYS TAKEN 54fba: 6000 0126 braw 550e2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 54fbe: 7201 moveq #1,%d1 54fc0: 102b 000e moveb %a3@(14),%d0 54fc4: c280 andl %d0,%d1 54fc6: 4a01 tstb %d1 54fc8: 6708 beqs 54fd2 <== NEVER TAKEN 54fca: 2802 movel %d2,%d4 54fcc: e28c lsrl #1,%d4 54fce: d882 addl %d2,%d4 54fd0: 6010 bras 54fe2 54fd2: 7602 moveq #2,%d3 <== NOT EXECUTED 54fd4: 2802 movel %d2,%d4 <== NOT EXECUTED 54fd6: c680 andl %d0,%d3 <== NOT EXECUTED 54fd8: 4a03 tstb %d3 <== NOT EXECUTED 54fda: 6704 beqs 54fe0 <== NOT EXECUTED 54fdc: d884 addl %d4,%d4 <== NOT EXECUTED 54fde: 6002 bras 54fe2 <== NOT EXECUTED 54fe0: e58c lsll #2,%d4 <== NOT EXECUTED 54fe2: 4283 clrl %d3 54fe4: 162b 0002 moveb %a3@(2),%d3 54fe8: e6ac lsrl %d3,%d4 54fea: d8ab 0050 addl %a3@(80),%d4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 54fee: 4a01 tstb %d1 54ff0: 6708 beqs 54ffa <== NEVER TAKEN 54ff2: 2a02 movel %d2,%d5 54ff4: e28d lsrl #1,%d5 54ff6: da82 addl %d2,%d5 54ff8: 6010 bras 5500a 54ffa: 7202 moveq #2,%d1 <== NOT EXECUTED 54ffc: 2a02 movel %d2,%d5 <== NOT EXECUTED 54ffe: c081 andl %d1,%d0 <== NOT EXECUTED 55000: 4a00 tstb %d0 <== NOT EXECUTED 55002: 6704 beqs 55008 <== NOT EXECUTED 55004: da85 addl %d5,%d5 <== NOT EXECUTED 55006: 6002 bras 5500a <== NOT EXECUTED 55008: e58d lsll #2,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 5500a: 2c0e movel %fp,%d6 5500c: 5986 subql #4,%d6 5500e: 49f9 0004 fc8c lea 4fc8c ,%a4 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); 55014: 3e13 movew %a3@,%d7 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 55016: 2f06 movel %d6,%sp@- 55018: 4878 0001 pea 1 5501c: 2f04 movel %d4,%sp@- 5501e: 2f0b movel %a3,%sp@- 55020: 4e94 jsr %a4@ if (rc != RC_OK) 55022: 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); 55026: 2600 movel %d0,%d3 if (rc != RC_OK) 55028: 6600 00ca bnew 550f4 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); 5502c: 4281 clrl %d1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 5502e: 7002 moveq #2,%d0 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); 55030: 3207 movew %d7,%d1 55032: 5381 subql #1,%d1 55034: c285 andl %d5,%d1 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 55036: 4285 clrl %d5 55038: 1a2b 000e moveb %a3@(14),%d5 5503c: b085 cmpl %d5,%d0 5503e: 6772 beqs 550b2 <== NEVER TAKEN 55040: 103c 0004 moveb #4,%d0 55044: b085 cmpl %d5,%d0 55046: 6700 0088 beqw 550d0 5504a: 103c 0001 moveb #1,%d0 5504e: b085 cmpl %d5,%d0 55050: 6600 0090 bnew 550e2 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*(sec_buf + ofs)); 55054: 206e fffc moveal %fp@(-4),%a0 55058: 4285 clrl %d5 5505a: 1a30 1800 moveb %a0@(00000000,%d1:l),%d5 if ( ofs == (fs_info->vol.bps - 1) ) 5505e: 4280 clrl %d0 55060: 3013 movew %a3@,%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)); 55062: 2485 movel %d5,%a2@ if ( ofs == (fs_info->vol.bps - 1) ) 55064: 5380 subql #1,%d0 55066: b081 cmpl %d1,%d0 55068: 6626 bnes 55090 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5506a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5506c: 4878 0001 pea 1 <== NOT EXECUTED 55070: 2044 moveal %d4,%a0 <== NOT EXECUTED 55072: 4868 0001 pea %a0@(1) <== NOT EXECUTED 55076: 2f0b movel %a3,%sp@- <== NOT EXECUTED 55078: 4e94 jsr %a4@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 5507a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5507e: 4a80 tstl %d0 <== NOT EXECUTED 55080: 6670 bnes 550f2 <== NOT EXECUTED return rc; *ret_val |= *sec_buf << 8; 55082: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 55086: 4280 clrl %d0 <== NOT EXECUTED 55088: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5508a: e188 lsll #8,%d0 <== NOT EXECUTED 5508c: 8192 orl %d0,%a2@ <== NOT EXECUTED 5508e: 600c bras 5509c <== NOT EXECUTED } else { *ret_val |= *(sec_buf + ofs + 1) << 8; 55090: 4280 clrl %d0 55092: 1030 1801 moveb %a0@(00000001,%d1:l),%d0 55096: e188 lsll #8,%d0 55098: 8085 orl %d5,%d0 5509a: 2480 movel %d0,%a2@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 5509c: 0802 0000 btst #0,%d2 550a0: 6706 beqs 550a8 *ret_val = (*ret_val) >> FAT12_SHIFT; 550a2: 2012 movel %a2@,%d0 550a4: e888 lsrl #4,%d0 550a6: 6036 bras 550de else *ret_val = (*ret_val) & FAT_FAT12_MASK; 550a8: 203c 0000 0fff movel #4095,%d0 550ae: c192 andl %d0,%a2@ 550b0: 6042 bras 550f4 static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 550b2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 550b6: 3230 1800 movew %a0@(00000000,%d1:l),%d1 <== NOT EXECUTED 550ba: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED 550c0: 2001 movel %d1,%d0 <== NOT EXECUTED 550c2: e089 lsrl #8,%d1 <== NOT EXECUTED 550c4: e188 lsll #8,%d0 <== NOT EXECUTED break; case FAT_FAT16: *ret_val = *((uint16_t *)(sec_buf + ofs)); *ret_val = CF_LE_W(*ret_val); 550c6: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 550cc: 8081 orl %d1,%d0 <== NOT EXECUTED 550ce: 600e bras 550de <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(sec_buf + ofs)); 550d0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 550d4: 2f30 1800 movel %a0@(00000000,%d1:l),%sp@- <== NOT EXECUTED 550d8: 4eba fe82 jsr %pc@(54f5c ) <== NOT EXECUTED 550dc: 588f addql #4,%sp <== NOT EXECUTED 550de: 2480 movel %d0,%a2@ break; 550e0: 6012 bras 550f4 default: rtems_set_errno_and_return_minus_one(EIO); 550e2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 550e8: 76ff moveq #-1,%d3 <== NOT EXECUTED 550ea: 2040 moveal %d0,%a0 <== NOT EXECUTED 550ec: 7005 moveq #5,%d0 <== NOT EXECUTED 550ee: 2080 movel %d0,%a0@ <== NOT EXECUTED 550f0: 6002 bras 550f4 <== 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) 550f2: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 550f4: 2003 movel %d3,%d0 550f6: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 550fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000509f6 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(fat_fs_info_t *fs_info) { 509f6: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 509fa: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 509fe: 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); 50a02: 47f9 0004 4e24 lea 44e24 ,%a3 <== NOT EXECUTED fat_get_unique_ino(fat_fs_info_t *fs_info) { uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 50a08: 6072 bras 50a7c <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 50a0a: 222a 006e movel %a2@(110),%d1 <== NOT EXECUTED 50a0e: 2401 movel %d1,%d2 <== NOT EXECUTED 50a10: e68a lsrl #3,%d2 <== NOT EXECUTED 50a12: 7607 moveq #7,%d3 <== NOT EXECUTED 50a14: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED 50a18: d3c2 addal %d2,%a1 <== NOT EXECUTED 50a1a: 1411 moveb %a1@,%d2 <== NOT EXECUTED 50a1c: c681 andl %d1,%d3 <== NOT EXECUTED 50a1e: 1802 moveb %d2,%d4 <== NOT EXECUTED 50a20: 49c4 extbl %d4 <== NOT EXECUTED 50a22: 0704 btst %d3,%d4 <== NOT EXECUTED 50a24: 6612 bnes 50a38 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 50a26: 7001 moveq #1,%d0 <== NOT EXECUTED 50a28: e7a8 lsll %d3,%d0 <== NOT EXECUTED 50a2a: 8082 orl %d2,%d0 <== NOT EXECUTED 50a2c: 1280 moveb %d0,%a1@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 50a2e: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED 50a32: d0aa 0076 addl %a2@(118),%d0 <== NOT EXECUTED 50a36: 604c bras 50a84 <== NOT EXECUTED } fs_info->index++; 50a38: 5281 addql #1,%d1 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 50a3a: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 50a3c: 6306 blss 50a44 <== 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++; 50a3e: 2541 006e movel %d1,%a2@(110) <== NOT EXECUTED 50a42: 6004 bras 50a48 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 50a44: 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++) 50a48: 5280 addql #1,%d0 <== NOT EXECUTED 50a4a: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 50a4c: 66bc bnes 50a0a <== 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)) 50a4e: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED 50a54: 92aa 0076 subl %a2@(118),%d1 <== NOT EXECUTED 50a58: d080 addl %d0,%d0 <== NOT EXECUTED 50a5a: b280 cmpl %d0,%d1 <== NOT EXECUTED 50a5c: 6204 bhis 50a62 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 50a5e: 4280 clrl %d0 <== NOT EXECUTED 50a60: 6022 bras 50a84 <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 50a62: 2540 0072 movel %d0,%a2@(114) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 50a66: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50a68: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED 50a6c: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 50a6e: 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); 50a70: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED if (fs_info->uino != NULL) 50a74: 67e8 beqs 50a5e <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 50a76: 256a 0072 006e movel %a2@(114),%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++) 50a7c: 206a 0072 moveal %a2@(114),%a0 <== NOT EXECUTED 50a80: 4280 clrl %d0 <== NOT EXECUTED 50a82: 60c6 bras 50a4a <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 50a84: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 50a8a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050984 : int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 50984: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 50988: 48d7 3c00 moveml %a2-%a5,%sp@ <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 5098c: 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); 5098e: 49f9 0004 fe54 lea 4fe54 ,%a4 <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 50994: 4bf9 0005 4f94 lea 54f94 ,%a5 <== NOT EXECUTED uint32_t start_cln ) { int rc = RC_OK; ssize_t ret = 0; uint32_t cur_cln = start_cln; 5099a: 272e 000c movel %fp@(12),%a3@- <== NOT EXECUTED int fat_init_clusters_chain( fat_fs_info_t *fs_info, uint32_t start_cln ) { 5099e: 246e 0008 moveal %fp@(8),%a2 <== 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) 509a2: 6032 bras 509d6 <== NOT EXECUTED { ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0); 509a4: 4281 clrl %d1 <== NOT EXECUTED 509a6: 42a7 clrl %sp@- <== NOT EXECUTED 509a8: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 509ac: 2f01 movel %d1,%sp@- <== NOT EXECUTED 509ae: 42a7 clrl %sp@- <== NOT EXECUTED 509b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 509b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 509b4: 4e94 jsr %a4@ <== NOT EXECUTED if ( ret != fs_info->vol.bpc ) 509b6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 509ba: 4281 clrl %d1 <== NOT EXECUTED 509bc: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED 509c0: b280 cmpl %d0,%d1 <== NOT EXECUTED 509c2: 6626 bnes 509ea <== NOT EXECUTED { return -1; } rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln); 509c4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 509c6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 509ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED 509cc: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 509ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 509d2: 4a80 tstl %d0 <== NOT EXECUTED 509d4: 6616 bnes 509ec <== 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) 509d6: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 509da: 2200 movel %d0,%d1 <== NOT EXECUTED 509dc: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED 509e0: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 509e4: 65be bcss 509a4 <== NOT EXECUTED return rc; } } return rc; 509e6: 4280 clrl %d0 <== NOT EXECUTED 509e8: 6002 bras 509ec <== 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; 509ea: 70ff moveq #-1,%d0 <== NOT EXECUTED } } return rc; } 509ec: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED 509f2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050058 : * 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) { 50058: 4e56 ff64 linkw %fp,#-156 5005c: 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); 50060: 4878 0002 pea 2 50064: 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) { 50068: 266e 0008 moveal %fp@(8),%a3 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; 5006c: 42ae ffaa clrl %fp@(-86) vol->fd = open(device, O_RDWR); 50070: 4eb9 0004 4c34 jsr 44c34 if (vol->fd < 0) 50076: 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); 50078: 2740 0056 movel %d0,%a3@(86) if (vol->fd < 0) 5007c: 6c10 bges 5008e <== ALWAYS TAKEN { rtems_set_errno_and_return_minus_one(ENXIO); 5007e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 50084: 7606 moveq #6,%d3 <== NOT EXECUTED 50086: 2040 moveal %d0,%a0 <== NOT EXECUTED 50088: 2083 movel %d3,%a0@ <== NOT EXECUTED 5008a: 6000 06fc braw 50788 <== NOT EXECUTED } rc = fstat(vol->fd, &stat_buf); 5008e: 486e ffba pea %fp@(-70) 50092: 2f00 movel %d0,%sp@- 50094: 4eb9 0004 3fd4 jsr 43fd4 if (rc != 0) 5009a: 508f addql #8,%sp 5009c: 4a80 tstl %d0 5009e: 6702 beqs 500a2 <== ALWAYS TAKEN 500a0: 6030 bras 500d2 <== NOT EXECUTED close(vol->fd); rtems_set_errno_and_return_minus_one(ENXIO); } /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 500a2: 202e ffc6 movel %fp@(-58),%d0 500a6: 0280 0000 f000 andil #61440,%d0 500ac: 0c80 0000 6000 cmpil #24576,%d0 500b2: 6702 beqs 500b6 <== ALWAYS TAKEN 500b4: 601c bras 500d2 <== NOT EXECUTED static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 500b6: 486b 005a pea %a3@(90) 500ba: 2f3c 4004 4209 movel #1074020873,%sp@- 500c0: 2f2b 0056 movel %a3@(86),%sp@- 500c4: 4eb9 0005 1600 jsr 51600 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) { 500ca: 4fef 000c lea %sp@(12),%sp 500ce: 4a80 tstl %d0 500d0: 671a beqs 500ec <== ALWAYS TAKEN close(vol->fd); 500d2: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 500d6: 7406 moveq #6,%d2 <== 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); 500d8: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENXIO); 500de: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 500e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 500e6: 2082 movel %d2,%a0@ <== NOT EXECUTED 500e8: 6000 05ac braw 50696 <== NOT EXECUTED } /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dd, 0, &block); 500ec: 486e ffaa pea %fp@(-86) 500f0: 42a7 clrl %sp@- 500f2: 2f2b 005a movel %a3@(90),%sp@- 500f6: 4eb9 0004 dfcc jsr 4dfcc if (sc != RTEMS_SUCCESSFUL) 500fc: 4fef 000c lea %sp@(12),%sp 50100: 4a80 tstl %d0 50102: 6704 beqs 50108 <== ALWAYS TAKEN 50104: 6000 00d6 braw 501dc <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 50108: 206e ffaa moveal %fp@(-86),%a0 5010c: 2268 001a moveal %a0@(26),%a1 50110: 1229 000e moveb %a1@(14),%d1 50114: 1e29 0013 moveb %a1@(19),%d7 50118: 1829 000f moveb %a1@(15),%d4 5011c: 3441 moveaw %d1,%a2 5011e: 1229 0014 moveb %a1@(20),%d1 50122: 1d47 ff95 moveb %d7,%fp@(-107) 50126: 1e29 0016 moveb %a1@(22),%d7 5012a: 1d41 ff94 moveb %d1,%fp@(-108) 5012e: 1229 0017 moveb %a1@(23),%d1 50132: 1d47 ff93 moveb %d7,%fp@(-109) 50136: 1e29 0020 moveb %a1@(32),%d7 5013a: 1d41 ff92 moveb %d1,%fp@(-110) 5013e: 1229 0021 moveb %a1@(33),%d1 50142: 1d47 ff91 moveb %d7,%fp@(-111) 50146: 1e29 0022 moveb %a1@(34),%d7 5014a: 1d41 ff9c moveb %d1,%fp@(-100) 5014e: 1229 0023 moveb %a1@(35),%d1 50152: 1d47 ff9b moveb %d7,%fp@(-101) 50156: 1e29 0024 moveb %a1@(36),%d7 5015a: 1d41 ff99 moveb %d1,%fp@(-103) 5015e: 1229 0025 moveb %a1@(37),%d1 50162: 1a29 0011 moveb %a1@(17),%d5 50166: 1d47 ff9a moveb %d7,%fp@(-102) 5016a: 1e29 0026 moveb %a1@(38),%d7 5016e: 1d41 ffa2 moveb %d1,%fp@(-94) 50172: 1229 0027 moveb %a1@(39),%d1 50176: 1d44 ff90 moveb %d4,%fp@(-112) 5017a: 3845 moveaw %d5,%a4 5017c: 1029 000c moveb %a1@(12),%d0 50180: 1c29 000b moveb %a1@(11),%d6 50184: 1429 000d moveb %a1@(13),%d2 50188: 1829 0010 moveb %a1@(16),%d4 5018c: 1a29 0012 moveb %a1@(18),%d5 50190: 1d47 ff9d moveb %d7,%fp@(-99) 50194: 1d41 ff8f moveb %d1,%fp@(-113) 50198: 1e29 002c moveb %a1@(44),%d7 5019c: 1229 002d moveb %a1@(45),%d1 501a0: 1d47 ffa5 moveb %d7,%fp@(-91) 501a4: 1d41 ffa4 moveb %d1,%fp@(-92) 501a8: 1e29 002e moveb %a1@(46),%d7 501ac: 1229 002f moveb %a1@(47),%d1 501b0: 1d47 ffa3 moveb %d7,%fp@(-93) 501b4: 1d41 ffa1 moveb %d1,%fp@(-95) 501b8: 1e29 0030 moveb %a1@(48),%d7 501bc: 1229 0031 moveb %a1@(49),%d1 501c0: 1629 0028 moveb %a1@(40),%d3 sc = rtems_bdbuf_release( block); 501c4: 2f08 movel %a0,%sp@- { close(vol->fd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 501c6: 3a40 moveaw %d0,%a5 501c8: 1d47 ffa7 moveb %d7,%fp@(-89) 501cc: 1d41 ffa6 moveb %d1,%fp@(-90) sc = rtems_bdbuf_release( block); 501d0: 4eb9 0004 e158 jsr 4e158 if (sc != RTEMS_SUCCESSFUL) 501d6: 588f addql #4,%sp 501d8: 4a80 tstl %d0 501da: 671a beqs 501f6 <== ALWAYS TAKEN { close(vol->fd); 501dc: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED 501e0: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 501e6: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 501ec: 7205 moveq #5,%d1 <== NOT EXECUTED 501ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 501f0: 2081 movel %d1,%a0@ <== NOT EXECUTED 501f2: 6000 04a2 braw 50696 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 501f6: 4280 clrl %d0 501f8: 320d movew %a5,%d1 501fa: 1001 moveb %d1,%d0 501fc: 4281 clrl %d1 501fe: 1206 moveb %d6,%d1 50200: e188 lsll #8,%d0 50202: 8081 orl %d1,%d0 50204: 3240 moveaw %d0,%a1 50206: 3680 movew %d0,%a3@ if ( (vol->bps != 512) && 50208: 4280 clrl %d0 5020a: 3009 movew %a1,%d0 5020c: 0c80 0000 0200 cmpil #512,%d0 50212: 671c beqs 50230 <== ALWAYS TAKEN 50214: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 5021a: 6714 beqs 50230 <== NOT EXECUTED (vol->bps != 1024) && 5021c: 0c80 0000 0800 cmpil #2048,%d0 <== NOT EXECUTED 50222: 670c beqs 50230 <== NOT EXECUTED (vol->bps != 2048) && 50224: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED 5022a: 6704 beqs 50230 <== NOT EXECUTED 5022c: 6000 0296 braw 504c4 <== 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; 50230: 7209 moveq #9,%d1 50232: 4200 clrb %d0 50234: 1740 0003 moveb %d0,%a3@(3) 50238: 4280 clrl %d0 5023a: 3009 movew %a1,%d0 5023c: e2a8 lsrl %d1,%d0 5023e: 600c bras 5024c i >>= 1, vol->sec_mul++); 50240: e280 asrl #1,%d0 <== NOT EXECUTED 50242: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED 50246: 5281 addql #1,%d1 <== NOT EXECUTED 50248: 1741 0003 moveb %d1,%a3@(3) <== NOT EXECUTED (vol->bps != 4096)) { close(vol->fd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 5024c: 0800 0000 btst #0,%d0 50250: 67ee beqs 50240 <== NEVER TAKEN i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 50252: 4280 clrl %d0 50254: 4206 clrb %d6 50256: 3009 movew %a1,%d0 50258: 1746 0002 moveb %d6,%a3@(2) 5025c: 2c00 movel %d0,%d6 5025e: 6008 bras 50268 i >>= 1, vol->sec_log2++); 50260: 5281 addql #1,%d1 50262: e286 asrl #1,%d6 50264: 1741 0002 moveb %d1,%a3@(2) 50268: 122b 0002 moveb %a3@(2),%d1 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; 5026c: 0806 0000 btst #0,%d6 50270: 67ee beqs 50260 i >>= 1, vol->sec_log2++); vol->bytes_per_block = vol->bps; vol->bytes_per_block_log2 = vol->sec_log2; vol->sectors_per_block = 1; 50272: 7e01 moveq #1,%d7 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; 50274: 3749 000a movew %a1,%a3@(10) vol->bytes_per_block_log2 = vol->sec_log2; 50278: 1741 000c moveb %d1,%a3@(12) vol->sectors_per_block = 1; 5027c: 1747 0009 moveb %d7,%a3@(9) vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 50280: 1742 0004 moveb %d2,%a3@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 50284: 6604 bnes 5028a <== ALWAYS TAKEN 50286: 6000 023c braw 504c4 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 5028a: 4206 clrb %d6 5028c: 1746 0005 moveb %d6,%a3@(5) 50290: 4286 clrl %d6 50292: 1c02 moveb %d2,%d6 50294: 6010 bras 502a6 i >>= 1, vol->spc_log2++); 50296: e286 asrl #1,%d6 50298: 1e2b 0005 moveb %a3@(5),%d7 5029c: 3a47 moveaw %d7,%a5 5029e: 528d addql #1,%a5 502a0: 3e0d movew %a5,%d7 502a2: 1747 0005 moveb %d7,%a3@(5) { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 502a6: 0806 0000 btst #0,%d6 502aa: 67ea beqs 50296 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) 502ac: 4286 clrl %d6 502ae: 1c2b 0005 moveb %a3@(5),%d6 502b2: 2e00 movel %d0,%d7 502b4: edaf lsll %d6,%d7 502b6: 2c07 movel %d7,%d6 502b8: 3747 0006 movew %d7,%a3@(6) 502bc: 4287 clrl %d7 502be: 3e06 movew %d6,%d7 502c0: 2a47 moveal %d7,%a5 502c2: bbfc 0000 8000 cmpal #32768,%a5 502c8: 6304 blss 502ce <== ALWAYS TAKEN 502ca: 6000 01f8 braw 504c4 <== NOT EXECUTED { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 502ce: 4207 clrb %d7 502d0: 0286 0000 ffff andil #65535,%d6 502d6: 1747 0008 moveb %d7,%a3@(8) 502da: 6010 bras 502ec i >>= 1, vol->bpc_log2++); 502dc: e286 asrl #1,%d6 502de: 1e2b 0008 moveb %a3@(8),%d7 502e2: 3a47 moveaw %d7,%a5 502e4: 528d addql #1,%a5 502e6: 3e0d movew %a5,%d7 502e8: 1747 0008 moveb %d7,%a3@(8) { close(vol->fd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 502ec: 0806 0000 btst #0,%d6 502f0: 67ea beqs 502dc 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); 502f2: 4286 clrl %d6 502f4: 1c2e ff90 moveb %fp@(-112),%d6 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)) / 502f8: 2040 moveal %d0,%a0 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); 502fa: 3e0a movew %a2,%d7 502fc: 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); 502fe: 1744 000d moveb %d4,%a3@(13) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 50302: 0287 0000 00ff andil #255,%d7 50308: 8c87 orl %d7,%d6 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5030a: 4287 clrl %d7 5030c: 1e05 moveb %d5,%d7 5030e: 3a0c movew %a4,%d5 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); 50310: 3246 moveaw %d6,%a1 50312: 3746 0018 movew %d6,%a3@(24) vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 50316: e18f lsll #8,%d7 50318: 4286 clrl %d6 5031a: 1c05 moveb %d5,%d6 5031c: 8e86 orl %d6,%d7 5031e: 3747 0022 movew %d7,%a3@(34) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 50322: eb8f lsll #5,%d7 50324: 41f0 78ff lea %a0@(ffffffff,%d7:l),%a0 50328: 2c08 movel %a0,%d6 5032a: 4c40 6806 remsl %d0,%d6,%d6 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 5032e: 4280 clrl %d0 50330: 1001 moveb %d1,%d0 50332: 2206 movel %d6,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50334: 4287 clrl %d7 50336: 1e2e ff93 moveb %fp@(-109),%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; 5033a: e1a9 lsll %d0,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5033c: 4280 clrl %d0 5033e: 102e ff92 moveb %fp@(-110),%d0 50342: e188 lsll #8,%d0 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)) / 50344: 2746 0024 movel %d6,%a3@(36) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50348: 8087 orl %d7,%d0 /* 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; 5034a: 2741 0028 movel %d1,%a3@(40) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5034e: 4a40 tstw %d0 50350: 6708 beqs 5035a <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 50352: 0280 0000 ffff andil #65535,%d0 50358: 6026 bras 50380 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 5035a: 4280 clrl %d0 <== NOT EXECUTED 5035c: 4287 clrl %d7 <== NOT EXECUTED 5035e: 102e ffa2 moveb %fp@(-94),%d0 <== NOT EXECUTED 50362: 1e2e ff9d moveb %fp@(-99),%d7 <== NOT EXECUTED 50366: e188 lsll #8,%d0 <== NOT EXECUTED 50368: 4847 swap %d7 <== NOT EXECUTED 5036a: 4247 clrw %d7 <== NOT EXECUTED 5036c: 1a2e ff8f moveb %fp@(-113),%d5 <== NOT EXECUTED 50370: 8087 orl %d7,%d0 <== NOT EXECUTED 50372: 4287 clrl %d7 <== NOT EXECUTED 50374: 1e2e ff9a moveb %fp@(-102),%d7 <== NOT EXECUTED 50378: 8087 orl %d7,%d0 <== NOT EXECUTED 5037a: 7e18 moveq #24,%d7 <== NOT EXECUTED 5037c: efad lsll %d7,%d5 <== NOT EXECUTED 5037e: 8085 orl %d5,%d0 <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 50380: 4281 clrl %d1 50382: 1204 moveb %d4,%d1 50384: 41eb 001a lea %a3@(26),%a0 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); 50388: 2740 001a movel %d0,%a3@(26) vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5038c: 4c10 1800 mulsl %a0@,%d1 50390: 4280 clrl %d0 50392: 3009 movew %a1,%d0 50394: d280 addl %d0,%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) 50396: 4280 clrl %d0 50398: 102e ff94 moveb %fp@(-108),%d0 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 + 5039c: dc81 addl %d1,%d6 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 5039e: 2741 001e movel %d1,%a3@(30) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 503a2: 4281 clrl %d1 503a4: 122e ff95 moveb %fp@(-107),%d1 503a8: e188 lsll #8,%d0 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 + 503aa: 2746 0030 movel %d6,%a3@(48) 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) 503ae: 8081 orl %d1,%d0 503b0: 4a40 tstw %d0 503b2: 6708 beqs 503bc <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 503b4: 0280 0000 ffff andil #65535,%d0 503ba: 6026 bras 503e2 else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 503bc: 4280 clrl %d0 <== NOT EXECUTED 503be: 4281 clrl %d1 <== NOT EXECUTED 503c0: 102e ff9c moveb %fp@(-100),%d0 <== NOT EXECUTED 503c4: 122e ff9b moveb %fp@(-101),%d1 <== NOT EXECUTED 503c8: 7818 moveq #24,%d4 <== NOT EXECUTED 503ca: 4841 swap %d1 <== NOT EXECUTED 503cc: 4241 clrw %d1 <== NOT EXECUTED 503ce: e188 lsll #8,%d0 <== NOT EXECUTED 503d0: 8081 orl %d1,%d0 <== NOT EXECUTED 503d2: 4281 clrl %d1 <== NOT EXECUTED 503d4: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 503d8: 8081 orl %d1,%d0 <== NOT EXECUTED 503da: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED 503de: e9a9 lsll %d4,%d1 <== NOT EXECUTED 503e0: 8081 orl %d1,%d0 <== NOT EXECUTED 503e2: 2740 002c movel %d0,%a3@(44) data_secs = vol->tot_secs - vol->data_fsec; 503e6: 2a2b 002c movel %a3@(44),%d5 503ea: 9a86 subl %d6,%d5 503ec: 2c05 movel %d5,%d6 vol->data_cls = data_secs / vol->spc; 503ee: 0282 0000 00ff andil #255,%d2 503f4: 4c42 6006 remul %d2,%d6,%d6 503f8: 2746 0034 movel %d6,%a3@(52) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 503fc: 0c86 0000 0ff4 cmpil #4084,%d6 50402: 621a bhis 5041e <== NEVER TAKEN { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 50404: 2e3c 0000 0fff movel #4095,%d7 vol->eoc_val = FAT_FAT12_EOC; 5040a: 307c 0ff8 moveaw #4088,%a0 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 5040e: 7c01 moveq #1,%d6 vol->mask = FAT_FAT12_MASK; 50410: 2747 0010 movel %d7,%a3@(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; 50414: 1746 000e moveb %d6,%a3@(14) vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 50418: 2748 0014 movel %a0,%a3@(20) 5041c: 603e bras 5045c } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 5041e: 0c86 0000 fff4 cmpil #65524,%d6 <== NOT EXECUTED 50424: 621c bhis 50442 <== NOT EXECUTED { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 50426: 223c 0000 ffff movel #65535,%d1 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 5042c: 243c 0000 fff8 movel #65528,%d2 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 50432: 7002 moveq #2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 50434: 2741 0010 movel %d1,%a3@(16) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 50438: 1740 000e moveb %d0,%a3@(14) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 5043c: 2742 0014 movel %d2,%a3@(20) <== NOT EXECUTED 50440: 601a bras 5045c <== NOT EXECUTED } else { vol->type = FAT_FAT32; 50442: 7804 moveq #4,%d4 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 50444: 2a3c 0fff ffff movel #268435455,%d5 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 5044a: 2c3c 0fff fff8 movel #268435448,%d6 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 50450: 1744 000e moveb %d4,%a3@(14) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 50454: 2745 0010 movel %d5,%a3@(16) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 50458: 2746 0014 movel %d6,%a3@(20) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) 5045c: 4280 clrl %d0 5045e: 102b 000e moveb %a3@(14),%d0 50462: 7e04 moveq #4,%d7 50464: be80 cmpl %d0,%d7 50466: 6600 018c bnew 505f4 { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5046a: 4280 clrl %d0 <== NOT EXECUTED 5046c: 4281 clrl %d1 <== NOT EXECUTED 5046e: 102e ffa4 moveb %fp@(-92),%d0 <== NOT EXECUTED 50472: 122e ffa3 moveb %fp@(-93),%d1 <== NOT EXECUTED 50476: e188 lsll #8,%d0 <== NOT EXECUTED 50478: 4841 swap %d1 <== NOT EXECUTED 5047a: 4241 clrw %d1 <== NOT EXECUTED 5047c: 182e ffa1 moveb %fp@(-95),%d4 <== NOT EXECUTED 50480: 8081 orl %d1,%d0 <== NOT EXECUTED 50482: 4281 clrl %d1 <== NOT EXECUTED 50484: 122e ffa5 moveb %fp@(-91),%d1 <== NOT EXECUTED 50488: 8081 orl %d1,%d0 <== NOT EXECUTED 5048a: 7218 moveq #24,%d1 <== NOT EXECUTED 5048c: e3ac lsll %d1,%d4 <== NOT EXECUTED 5048e: 8084 orl %d4,%d0 <== NOT EXECUTED 50490: 2740 0038 movel %d0,%a3@(56) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 50494: 7080 moveq #-128,%d0 <== NOT EXECUTED 50496: c083 andl %d3,%d0 <== NOT EXECUTED 50498: 1740 004e moveb %d0,%a3@(78) <== NOT EXECUTED if (vol->mirror) 5049c: 670a beqs 504a8 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 5049e: 740f moveq #15,%d2 <== NOT EXECUTED 504a0: c682 andl %d2,%d3 <== NOT EXECUTED 504a2: 1743 0054 moveb %d3,%a3@(84) <== NOT EXECUTED 504a6: 6006 bras 504ae <== NOT EXECUTED else vol->afat = 0; 504a8: 4204 clrb %d4 <== NOT EXECUTED 504aa: 1744 0054 moveb %d4,%a3@(84) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 504ae: 4280 clrl %d0 <== NOT EXECUTED 504b0: 102e ffa6 moveb %fp@(-90),%d0 <== NOT EXECUTED 504b4: 4281 clrl %d1 <== NOT EXECUTED 504b6: 122e ffa7 moveb %fp@(-89),%d1 <== NOT EXECUTED 504ba: e188 lsll #8,%d0 <== NOT EXECUTED 504bc: 8081 orl %d1,%d0 <== NOT EXECUTED 504be: 3740 003c movew %d0,%a3@(60) <== NOT EXECUTED if( vol->info_sec == 0 ) 504c2: 661a bnes 504de <== NOT EXECUTED { close(vol->fd); 504c4: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED 504c8: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 504ce: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 504d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 504d6: 7016 moveq #22,%d0 <== NOT EXECUTED 504d8: 2080 movel %d0,%a0@ <== NOT EXECUTED 504da: 6000 01ba braw 50696 <== NOT EXECUTED } else { ret = _fat_block_read(fs_info, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 504de: 260e movel %fp,%d3 <== NOT EXECUTED 504e0: 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, 504e6: 45f9 0004 fd40 lea 4fd40 <_fat_block_read>,%a2 <== NOT EXECUTED 504ec: 2f03 movel %d3,%sp@- <== NOT EXECUTED 504ee: 4878 0004 pea 4 <== NOT EXECUTED 504f2: 42a7 clrl %sp@- <== NOT EXECUTED 504f4: 3f00 movew %d0,%sp@- <== NOT EXECUTED 504f6: 4267 clrw %sp@- <== NOT EXECUTED 504f8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 504fa: 4e92 jsr %a2@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 504fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50500: 4a80 tstl %d0 <== NOT EXECUTED 50502: 6c0e bges 50512 <== NOT EXECUTED { close(vol->fd); 50504: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED 50508: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED 5050e: 6000 0186 braw 50696 <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 50512: 4281 clrl %d1 <== NOT EXECUTED 50514: 4282 clrl %d2 <== NOT EXECUTED 50516: 122e ffaf moveb %fp@(-81),%d1 <== NOT EXECUTED 5051a: 142e ffb0 moveb %fp@(-80),%d2 <== NOT EXECUTED 5051e: 4280 clrl %d0 <== NOT EXECUTED 50520: 102e ffae moveb %fp@(-82),%d0 <== NOT EXECUTED 50524: 4842 swap %d2 <== NOT EXECUTED 50526: 4242 clrw %d2 <== NOT EXECUTED 50528: e189 lsll #8,%d1 <== NOT EXECUTED 5052a: 8282 orl %d2,%d1 <== NOT EXECUTED 5052c: 4282 clrl %d2 <== NOT EXECUTED 5052e: 142e ffb1 moveb %fp@(-79),%d2 <== NOT EXECUTED 50532: 8280 orl %d0,%d1 <== NOT EXECUTED 50534: 7018 moveq #24,%d0 <== NOT EXECUTED 50536: e1aa lsll %d0,%d2 <== NOT EXECUTED 50538: 8282 orl %d2,%d1 <== NOT EXECUTED 5053a: 0c81 4161 5252 cmpil #1096897106,%d1 <== NOT EXECUTED 50540: 6722 beqs 50564 <== 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); 50542: 2f0b movel %a3,%sp@- <== 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 ); 50544: 7e16 moveq #22,%d7 <== 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); 50546: 4eb9 0004 faee jsr 4faee <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(fs_info); close(vol->fd); 5054c: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED 50550: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 50556: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 5055c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5055e: 2087 movel %d7,%a0@ <== NOT EXECUTED 50560: 6000 01ae braw 50710 <== NOT EXECUTED } else { ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO, 50564: 2f03 movel %d3,%sp@- <== NOT EXECUTED 50566: 4878 000c pea c <== NOT EXECUTED 5056a: 4280 clrl %d0 <== NOT EXECUTED 5056c: 4878 01e4 pea 1e4 <== NOT EXECUTED 50570: 302b 003c movew %a3@(60),%d0 <== NOT EXECUTED 50574: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50576: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50578: 4e92 jsr %a2@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 5057a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5057e: 4a80 tstl %d0 <== NOT EXECUTED 50580: 6c16 bges 50598 <== 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); 50582: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50584: 4eb9 0004 faee jsr 4faee <== 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); 5058a: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED 5058e: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED 50594: 6000 017a braw 50710 <== NOT EXECUTED return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 50598: 4280 clrl %d0 <== NOT EXECUTED 5059a: 4281 clrl %d1 <== NOT EXECUTED 5059c: 102e ffb3 moveb %fp@(-77),%d0 <== NOT EXECUTED 505a0: 122e ffb4 moveb %fp@(-76),%d1 <== NOT EXECUTED 505a4: 7418 moveq #24,%d2 <== NOT EXECUTED 505a6: 4841 swap %d1 <== NOT EXECUTED 505a8: 4241 clrw %d1 <== NOT EXECUTED 505aa: e188 lsll #8,%d0 <== NOT EXECUTED 505ac: 8081 orl %d1,%d0 <== NOT EXECUTED 505ae: 4281 clrl %d1 <== NOT EXECUTED 505b0: 122e ffb2 moveb %fp@(-78),%d1 <== NOT EXECUTED 505b4: 8081 orl %d1,%d0 <== NOT EXECUTED 505b6: 122e ffb5 moveb %fp@(-75),%d1 <== NOT EXECUTED 505ba: e5a9 lsll %d2,%d1 <== NOT EXECUTED 505bc: 8081 orl %d1,%d0 <== 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); 505be: 4281 clrl %d1 <== NOT EXECUTED 505c0: 122e ffb8 moveb %fp@(-72),%d1 <== NOT EXECUTED _fat_block_release(fs_info); close(vol->fd); return -1; } vol->free_cls_in_fs_info = 505c4: 2740 0042 movel %d0,%a3@(66) <== NOT EXECUTED FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 505c8: 4841 swap %d1 <== NOT EXECUTED 505ca: 4241 clrw %d1 <== NOT EXECUTED return -1; } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; 505cc: 2740 003e movel %d0,%a3@(62) <== NOT EXECUTED vol->next_cl_in_fs_info = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 505d0: 4280 clrl %d0 <== NOT EXECUTED 505d2: 102e ffb7 moveb %fp@(-73),%d0 <== NOT EXECUTED 505d6: e188 lsll #8,%d0 <== NOT EXECUTED 505d8: 8081 orl %d1,%d0 <== NOT EXECUTED 505da: 4281 clrl %d1 <== NOT EXECUTED 505dc: 122e ffb6 moveb %fp@(-74),%d1 <== NOT EXECUTED 505e0: 8081 orl %d1,%d0 <== NOT EXECUTED 505e2: 122e ffb9 moveb %fp@(-71),%d1 <== NOT EXECUTED 505e6: e5a9 lsll %d2,%d1 <== NOT EXECUTED 505e8: 8081 orl %d1,%d0 <== NOT EXECUTED } vol->free_cls_in_fs_info = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->free_cls = vol->free_cls_in_fs_info; vol->next_cl_in_fs_info = 505ea: 2740 004a movel %d0,%a3@(74) <== NOT EXECUTED FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); vol->next_cl = vol->next_cl_in_fs_info; 505ee: 2740 0046 movel %d0,%a3@(70) <== NOT EXECUTED 505f2: 6018 bras 5060c <== NOT EXECUTED else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = FAT_UNDEFINED_VALUE; 505f4: 7aff moveq #-1,%d5 } } else { vol->rdir_cl = 0; vol->mirror = 0; 505f6: 4204 clrb %d4 } } } else { vol->rdir_cl = 0; 505f8: 42ab 0038 clrl %a3@(56) vol->mirror = 0; 505fc: 1744 004e moveb %d4,%a3@(78) vol->afat = 0; 50600: 1744 0054 moveb %d4,%a3@(84) vol->free_cls = FAT_UNDEFINED_VALUE; 50604: 2745 003e movel %d5,%a3@(62) vol->next_cl = FAT_UNDEFINED_VALUE; 50608: 2745 0046 movel %d5,%a3@(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); 5060c: 2f0b movel %a3,%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)); 5060e: 45f9 0004 3c8c lea 43c8c ,%a2 * 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); 50614: 4eb9 0004 faee jsr 4faee vol->next_cl = FAT_UNDEFINED_VALUE; } _fat_block_release(fs_info); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 5061a: 4280 clrl %d0 5061c: 102b 0054 moveb %a3@(84),%d0 50620: 41eb 001a lea %a3@(26),%a0 50624: 4c10 0800 mulsl %a0@,%d0 50628: 4281 clrl %d1 5062a: 322b 0018 movew %a3@(24),%d1 5062e: d081 addl %d1,%d0 50630: 2740 0050 movel %d0,%a3@(80) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 50634: 4878 000c pea c 50638: 4878 0002 pea 2 5063c: 4e92 jsr %a2@ if ( fs_info->vhash == NULL ) 5063e: 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)); 50642: 2240 moveal %d0,%a1 50644: 2740 0062 movel %d0,%a3@(98) if ( fs_info->vhash == NULL ) 50648: 6736 beqs 50680 <== NEVER TAKEN 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 ); 5064a: 41e9 0010 lea %a1@(16),%a0 5064e: 5880 addql #4,%d0 50650: 2348 000c movel %a0,%a1@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50654: 41e9 000c lea %a1@(12),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); 50658: 2280 movel %d0,%a1@ head->next = tail; head->previous = NULL; 5065a: 42a9 0004 clrl %a1@(4) tail->previous = head; 5065e: 2349 0008 movel %a1,%a1@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 50662: 42a9 0010 clrl %a1@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50666: 2348 0014 movel %a0,%a1@(20) } 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)); 5066a: 4878 000c pea c 5066e: 4878 0002 pea 2 50672: 4e92 jsr %a2@ if ( fs_info->rhash == NULL ) 50674: 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)); 50676: 2240 moveal %d0,%a1 50678: 2740 0066 movel %d0,%a3@(102) if ( fs_info->rhash == NULL ) 5067c: 661e bnes 5069c <== ALWAYS TAKEN 5067e: 6070 bras 506f0 <== 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); 50680: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 50684: 7c0c moveq #12,%d6 <== 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); 50686: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5068c: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 50692: 2040 moveal %d0,%a0 <== NOT EXECUTED 50694: 2086 movel %d6,%a0@ <== NOT EXECUTED 50696: 588f addql #4,%sp <== NOT EXECUTED 50698: 6000 00ee braw 50788 <== NOT EXECUTED Chain_Node *tail = _Chain_Tail( the_chain ); 5069c: 41e9 0010 lea %a1@(16),%a0 506a0: 5880 addql #4,%d0 506a2: 2348 000c movel %a0,%a1@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 506a6: 41e9 000c lea %a1@(12),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); 506aa: 2280 movel %d0,%a1@ 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; 506ac: 203c 0000 0100 movel #256,%d0 head->next = tail; head->previous = NULL; 506b2: 42a9 0004 clrl %a1@(4) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 506b6: 222b 002c movel %a3@(44),%d1 tail->previous = head; 506ba: 2349 0008 movel %a1,%a1@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 506be: 42a9 0010 clrl %a1@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 506c2: 2348 0014 movel %a0,%a1@(20) 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; 506c6: 2740 0072 movel %d0,%a3@(114) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 506ca: 4280 clrl %d0 506cc: 102b 0003 moveb %a3@(3),%d0 506d0: e1a9 lsll %d0,%d1 fs_info->index = 0; 506d2: 42ab 006e clrl %a3@(110) } 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; 506d6: e989 lsll #4,%d1 506d8: 2741 0076 movel %d1,%a3@(118) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 506dc: 4878 0001 pea 1 506e0: 4878 0100 pea 100 506e4: 4e92 jsr %a2@ if ( fs_info->uino == NULL ) 506e6: 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)); 506e8: 2740 006a movel %d0,%a3@(106) if ( fs_info->uino == NULL ) 506ec: 6654 bnes 50742 <== ALWAYS TAKEN 506ee: 6024 bras 50714 <== 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); 506f0: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 506f4: 7a0c moveq #12,%d5 <== 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); 506f6: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED free(fs_info->vhash); 506fc: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED 50700: 4eb9 0004 3f4c jsr 43f4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 50706: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 5070c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5070e: 2085 movel %d5,%a0@ <== NOT EXECUTED 50710: 508f addql #8,%sp <== NOT EXECUTED 50712: 6074 bras 50788 <== 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); 50714: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 50718: 45f9 0004 3f4c lea 43f4c ,%a2 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 5071e: 780c moveq #12,%d4 <== 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); 50720: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED free(fs_info->vhash); 50726: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED 5072a: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->rhash); 5072c: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED 50730: 4e92 jsr %a2@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 50732: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 50738: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5073c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5073e: 2084 movel %d4,%a0@ <== NOT EXECUTED 50740: 6046 bras 50788 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 50742: 4878 0001 pea 1 50746: 4280 clrl %d0 50748: 3013 movew %a3@,%d0 5074a: 2f00 movel %d0,%sp@- 5074c: 4e92 jsr %a2@ if (fs_info->sec_buf == NULL) 5074e: 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)); 50750: 2740 0084 movel %d0,%a3@(132) if (fs_info->sec_buf == NULL) 50754: 6636 bnes 5078c <== ALWAYS TAKEN { close(vol->fd); 50756: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED free(fs_info->vhash); 5075a: 45f9 0004 3f4c lea 43f4c ,%a2 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 50760: 760c moveq #12,%d3 <== 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); 50762: 4eb9 0004 3cd8 jsr 43cd8 <== NOT EXECUTED free(fs_info->vhash); 50768: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED 5076c: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->rhash); 5076e: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED 50772: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->uino); 50774: 2f2b 006a movel %a3@(106),%sp@- <== NOT EXECUTED 50778: 4e92 jsr %a2@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5077a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 50780: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 50784: 2040 moveal %d0,%a0 <== NOT EXECUTED 50786: 2083 movel %d3,%a0@ <== NOT EXECUTED 50788: 70ff moveq #-1,%d0 <== NOT EXECUTED 5078a: 6056 bras 507e2 <== NOT EXECUTED return bytes_written; } static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num) { return (sec_num & (vol->spc - 1)) == 0; 5078c: 4280 clrl %d0 5078e: 102b 0004 moveb %a3@(4),%d0 50792: 5380 subql #1,%d0 50794: 2200 movel %d0,%d1 50796: c2ab 0030 andl %a3@(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) 5079a: 6704 beqs 507a0 <== ALWAYS TAKEN vol->bytes_per_block_log2 = vol->bpc_log2; vol->sectors_per_block = vol->spc; } } return RC_OK; 5079c: 4280 clrl %d0 <== NOT EXECUTED 5079e: 6042 bras 507e2 <== NOT EXECUTED * If possible we will use the cluster size as bdbuf block size for faster * file access. This requires that certain sectors are aligned to cluster * borders. */ if (is_cluster_aligned(vol, vol->data_fsec) && (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc))) 507a0: 4281 clrl %d1 507a2: 122b 000e moveb %a3@(14),%d1 507a6: 7404 moveq #4,%d2 507a8: b481 cmpl %d1,%d2 507aa: 6706 beqs 507b2 <== 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; 507ac: c0ab 001e andl %a3@(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))) 507b0: 66ea bnes 5079c <== NEVER TAKEN { sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true); 507b2: 4878 0001 pea 1 507b6: 4280 clrl %d0 507b8: 302b 0006 movew %a3@(6),%d0 507bc: 2f00 movel %d0,%sp@- 507be: 2f2b 005a movel %a3@(90),%sp@- 507c2: 4eb9 0004 e506 jsr 4e506 if (sc == RTEMS_SUCCESSFUL) 507c8: 4fef 000c lea %sp@(12),%sp 507cc: 4a80 tstl %d0 507ce: 66cc bnes 5079c <== NEVER TAKEN { vol->bytes_per_block = vol->bpc; 507d0: 376b 0006 000a movew %a3@(6),%a3@(10) vol->bytes_per_block_log2 = vol->bpc_log2; 507d6: 176b 0008 000c moveb %a3@(8),%a3@(12) vol->sectors_per_block = vol->spc; 507dc: 176b 0004 0009 moveb %a3@(4),%a3@(9) } } return RC_OK; } 507e2: 4cee 3cfc ff64 moveml %fp@(-156),%d2-%d7/%a2-%a5 507e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000553d8 : uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 553d8: 4e56 ffd0 linkw %fp,#-48 553dc: 122e 001f moveb %fp@(31),%d1 553e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 553e4: 2a6e 0008 moveal %fp@(8),%a5 553e8: 246e 0014 moveal %fp@(20),%a2 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; 553ec: 2a2d 0034 movel %a5@(52),%d5 uint32_t count, uint32_t *cls_added, uint32_t *last_cl, bool zero_fill ) { 553f0: 266e 000c moveal %fp@(12),%a3 553f4: 1d41 fffb moveb %d1,%fp@(-5) int rc = RC_OK; uint32_t cl4find = 2; uint32_t next_cln = 0; 553f8: 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; 553fc: 4292 clrl %a2@ if (count == 0) 553fe: 4aae 0010 tstl %fp@(16) 55402: 6700 0166 beqw 5556a return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 55406: 2e2d 0046 movel %a5@(70),%d7 5540a: 70ff moveq #-1,%d0 5540c: b087 cmpl %d7,%d0 5540e: 6602 bnes 55412 uint32_t *last_cl, bool zero_fill ) { int rc = RC_OK; uint32_t cl4find = 2; 55410: 7e02 moveq #2,%d7 uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 55412: 5485 addql #2,%d5 55414: 7802 moveq #2,%d4 55416: 4283 clrl %d3 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 55418: 49f9 0005 5100 lea 55100 ,%a4 5541e: 6000 00f6 braw 55516 * 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); 55422: 486e fffc pea %fp@(-4) 55426: 2f07 movel %d7,%sp@- 55428: 2f0d movel %a5,%sp@- 5542a: 4eb9 0005 4f94 jsr 54f94 if ( rc != RC_OK ) 55430: 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); 55434: 2400 movel %d0,%d2 if ( rc != RC_OK ) 55436: 6716 beqs 5544e <== ALWAYS TAKEN { if (*cls_added != 0) 55438: 4a92 tstl %a2@ <== NOT EXECUTED 5543a: 6700 0134 beqw 55570 <== NOT EXECUTED fat_free_fat_clusters_chain(fs_info, (*chain)); 5543e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 55440: 2f0d movel %a5,%sp@- <== NOT EXECUTED 55442: 4eb9 0005 5334 jsr 55334 <== NOT EXECUTED 55448: 508f addql #8,%sp <== NOT EXECUTED 5544a: 6000 0124 braw 55570 <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 5544e: 4aae fffc tstl %fp@(-4) 55452: 6600 00b8 bnew 5550c /* * 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) 55456: 4a92 tstl %a2@ 55458: 661e bnes 55478 <== NEVER TAKEN { *chain = cl4find; 5545a: 2687 movel %d7,%a3@ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5545c: 4878 ffff pea ffffffff 55460: 2f07 movel %d7,%sp@- 55462: 2f0d movel %a5,%sp@- 55464: 4e94 jsr %a4@ if ( rc != RC_OK ) 55466: 4fef 000c lea %sp@(12),%sp 5546a: 4a80 tstl %d0 5546c: 6600 0100 bnew 5556e rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); if ( rc != RC_OK ) goto cleanup; } if (zero_fill) 55470: 4a2e fffb tstb %fp@(-5) 55474: 673a beqs 554b0 <== ALWAYS TAKEN 55476: 6048 bras 554c0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 55478: 4878 ffff pea ffffffff <== NOT EXECUTED 5547c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5547e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 55480: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 55482: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 55486: 2c00 movel %d0,%d6 <== NOT EXECUTED if ( rc != RC_OK ) 55488: 6712 beqs 5549c <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 5548a: 2f13 movel %a3@,%sp@- <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5548c: 2406 movel %d6,%d2 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 5548e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 55490: 4eb9 0005 5334 jsr 55334 <== NOT EXECUTED 55496: 508f addql #8,%sp <== NOT EXECUTED 55498: 6000 00d6 braw 55570 <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 5549c: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5549e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 554a0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 554a2: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 554a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); return rc; } rc = fat_set_fat_cluster(fs_info, save_cln, cl4find); 554a8: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) 554aa: 67c4 beqs 55470 <== NOT EXECUTED 554ac: 6000 0096 braw 55544 <== NOT EXECUTED goto cleanup; } } save_cln = cl4find; (*cls_added)++; 554b0: 2012 movel %a2@,%d0 554b2: 5280 addql #1,%d0 554b4: 2480 movel %d0,%a2@ /* have we satisfied request ? */ if (*cls_added == count) 554b6: b0ae 0010 cmpl %fp@(16),%d0 554ba: 672a beqs 554e6 <== ALWAYS TAKEN 554bc: 2607 movel %d7,%d3 <== NOT EXECUTED 554be: 604c bras 5550c <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 554c0: 4280 clrl %d0 <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 554c2: 4283 clrl %d3 <== NOT EXECUTED goto cleanup; } if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); 554c4: 42a7 clrl %sp@- <== NOT EXECUTED 554c6: 302d 0006 movew %a5@(6),%d0 <== NOT EXECUTED 554ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED 554cc: 42a7 clrl %sp@- <== NOT EXECUTED 554ce: 2f07 movel %d7,%sp@- <== NOT EXECUTED 554d0: 2f0d movel %a5,%sp@- <== NOT EXECUTED 554d2: 4eb9 0004 fe54 jsr 4fe54 <== NOT EXECUTED if (fs_info->vol.bpc != bytes_written) 554d8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 554dc: 362d 0006 movew %a5@(6),%d3 <== NOT EXECUTED 554e0: b083 cmpl %d3,%d0 <== NOT EXECUTED 554e2: 67cc beqs 554b0 <== NOT EXECUTED 554e4: 605c bras 55542 <== 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) 554e6: 202d 003e movel %a5@(62),%d0 554ea: 72ff moveq #-1,%d1 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 554ec: 2b47 0046 movel %d7,%a5@(70) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 554f0: b280 cmpl %d0,%d1 554f2: 6706 beqs 554fa <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 554f4: 9092 subl %a2@,%d0 <== NOT EXECUTED 554f6: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED *last_cl = save_cln; 554fa: 206e 0018 moveal %fp@(24),%a0 554fe: 2087 movel %d7,%a0@ fat_buf_release(fs_info); 55500: 2f0d movel %a5,%sp@- 55502: 4eb9 0004 faee jsr 4faee 55508: 588f addql #4,%sp 5550a: 6064 bras 55570 return rc; } } i++; 5550c: 5284 addql #1,%d4 cl4find++; 5550e: 5287 addql #1,%d7 if (cl4find >= data_cls_val) 55510: ba87 cmpl %d7,%d5 55512: 6202 bhis 55516 <== ALWAYS TAKEN cl4find = 2; 55514: 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) 55516: ba84 cmpl %d4,%d5 55518: 6200 ff08 bhiw 55422 if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5551c: 202d 003e movel %a5@(62),%d0 <== NOT EXECUTED 55520: 72ff moveq #-1,%d1 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 55522: 2b43 0046 movel %d3,%a5@(70) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 55526: b280 cmpl %d0,%d1 <== NOT EXECUTED 55528: 6706 beqs 55530 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 5552a: 9092 subl %a2@,%d0 <== NOT EXECUTED 5552c: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED *last_cl = save_cln; 55530: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED 55534: 2083 movel %d3,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 55536: 2f0d movel %a5,%sp@- <== NOT EXECUTED 55538: 4eb9 0004 faee jsr 4faee <== NOT EXECUTED 5553e: 588f addql #4,%sp <== NOT EXECUTED 55540: 6028 bras 5556a <== NOT EXECUTED if (zero_fill) { bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0); if (fs_info->vol.bpc != bytes_written) { rc = -1; 55542: 76ff moveq #-1,%d3 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 55544: 2f13 movel %a3@,%sp@- <== 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; 55546: 2403 movel %d3,%d2 <== NOT EXECUTED return RC_OK; cleanup: /* cleanup activity */ fat_free_fat_clusters_chain(fs_info, (*chain)); 55548: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5554a: 4eb9 0005 5334 jsr 55334 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE); 55550: 42a7 clrl %sp@- <== NOT EXECUTED 55552: 2f07 movel %d7,%sp@- <== NOT EXECUTED 55554: 2f0d movel %a5,%sp@- <== NOT EXECUTED 55556: 4eb9 0005 5100 jsr 55100 <== NOT EXECUTED fat_buf_release(fs_info); 5555c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 5555e: 4eb9 0004 faee jsr 4faee <== NOT EXECUTED 55564: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 55568: 6006 bras 55570 <== NOT EXECUTED ssize_t bytes_written; *cls_added = 0; if (count == 0) return rc; 5556a: 4282 clrl %d2 <== NOT EXECUTED 5556c: 6002 bras 55570 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC); 5556e: 2400 movel %d0,%d2 <== 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; } 55570: 2002 movel %d2,%d0 55572: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 55578: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fdbe : fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 4fdbe: 4e56 ffd8 linkw %fp,#-40 4fdc2: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4fdc6: 2e0e movel %fp,%d7 int rc = RC_OK; ssize_t cmpltd = 0; 4fdc8: 4283 clrl %d3 4fdca: 5987 subql #4,%d7 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); 4fdcc: 47f9 0004 fc8c lea 4fc8c ,%a3 if (rc != RC_OK) return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 4fdd2: 49f9 0005 7168 lea 57168 ,%a4 fat_fs_info_t *fs_info, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 4fdd8: 246e 0008 moveal %fp@(8),%a2 4fddc: 282e 0014 movel %fp@(20),%d4 int rc = RC_OK; ssize_t cmpltd = 0; uint32_t sec_num = start; uint32_t ofs = offset; 4fde0: 2c2e 0010 movel %fp@(16),%d6 uint32_t count, const void *buff) { int rc = RC_OK; ssize_t cmpltd = 0; uint32_t sec_num = start; 4fde4: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 4fde8: 6056 bras 4fe40 { c = MIN(count, (fs_info->vol.bps - ofs)); 4fdea: 4282 clrl %d2 4fdec: 3412 movew %a2@,%d2 4fdee: 9486 subl %d6,%d2 4fdf0: b882 cmpl %d2,%d4 4fdf2: 6402 bccs 4fdf6 <== NEVER TAKEN 4fdf4: 2404 movel %d4,%d2 if (c == fs_info->vol.bytes_per_block) 4fdf6: 4280 clrl %d0 4fdf8: 302a 000a movew %a2@(10),%d0 4fdfc: b082 cmpl %d2,%d0 4fdfe: 6608 bnes 4fe08 <== ALWAYS TAKEN rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); 4fe00: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4fe02: 4878 0002 pea 2 <== NOT EXECUTED 4fe06: 6006 bras 4fe0e <== NOT EXECUTED else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); 4fe08: 2f07 movel %d7,%sp@- 4fe0a: 4878 0001 pea 1 4fe0e: 2f05 movel %d5,%sp@- 4fe10: 2f0a movel %a2,%sp@- 4fe12: 4e93 jsr %a3@ 4fe14: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 4fe18: 4a80 tstl %d0 4fe1a: 662a bnes 4fe46 <== NEVER TAKEN return -1; memcpy((sec_buf + ofs), (buff + cmpltd), c); 4fe1c: 206e 0018 moveal %fp@(24),%a0 4fe20: dcae fffc addl %fp@(-4),%d6 fat_buf_mark_modified(fs_info); count -= c; 4fe24: 9882 subl %d2,%d4 cmpltd +=c; sec_num++; 4fe26: 5285 addql #1,%d5 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); 4fe28: 2f02 movel %d2,%sp@- 4fe2a: 4870 3800 pea %a0@(00000000,%d3:l) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 4fe2e: d682 addl %d2,%d3 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); 4fe30: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; 4fe32: 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); 4fe34: 4e94 jsr %a4@ fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; sec_num++; ofs = 0; 4fe36: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 4fe3a: 7001 moveq #1,%d0 4fe3c: 1540 007e moveb %d0,%a2@(126) uint32_t sec_num = start; uint32_t ofs = offset; uint8_t *sec_buf; uint32_t c = 0; while(count > 0) 4fe40: 4a84 tstl %d4 4fe42: 66a6 bnes 4fdea 4fe44: 6002 bras 4fe48 if (c == fs_info->vol.bytes_per_block) rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf); else rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return -1; 4fe46: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd +=c; sec_num++; ofs = 0; } return cmpltd; } 4fe48: 2003 movel %d3,%d0 4fe4a: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 4fe50: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00055100 : 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)) ) 55100: 7001 moveq #1,%d0 fat_set_fat_cluster( fat_fs_info_t *fs_info, uint32_t cln, uint32_t in_val ) { 55102: 4e56 ffd8 linkw %fp,#-40 55106: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 5510a: 246e 0008 moveal %fp@(8),%a2 5510e: 242e 000c movel %fp@(12),%d2 55112: 2a2e 0010 movel %fp@(16),%d5 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; 55116: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5511a: b082 cmpl %d2,%d0 5511c: 6400 01fc bccw 5531a 55120: 202a 0034 movel %a2@(52),%d0 55124: 5280 addql #1,%d0 55126: b082 cmpl %d2,%d0 55128: 6404 bccs 5512e <== ALWAYS TAKEN 5512a: 6000 01ee braw 5531a <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5512e: 7601 moveq #1,%d3 55130: 102a 000e moveb %a2@(14),%d0 55134: c680 andl %d0,%d3 55136: 4a03 tstb %d3 55138: 6708 beqs 55142 <== NEVER TAKEN 5513a: 2202 movel %d2,%d1 5513c: e289 lsrl #1,%d1 5513e: d282 addl %d2,%d1 55140: 6012 bras 55154 55142: 7202 moveq #2,%d1 <== NOT EXECUTED 55144: c280 andl %d0,%d1 <== NOT EXECUTED 55146: 4a01 tstb %d1 <== NOT EXECUTED 55148: 6706 beqs 55150 <== NOT EXECUTED 5514a: 2202 movel %d2,%d1 <== NOT EXECUTED 5514c: d281 addl %d1,%d1 <== NOT EXECUTED 5514e: 6004 bras 55154 <== NOT EXECUTED 55150: 2202 movel %d2,%d1 <== NOT EXECUTED 55152: e589 lsll #2,%d1 <== NOT EXECUTED 55154: 4284 clrl %d4 55156: 182a 0002 moveb %a2@(2),%d4 5515a: e8a9 lsrl %d4,%d1 5515c: 2641 moveal %d1,%a3 5515e: d7ea 0050 addal %a2@(80),%a3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 55162: 4a03 tstb %d3 55164: 6708 beqs 5516e <== NEVER TAKEN 55166: 2e02 movel %d2,%d7 55168: e28f lsrl #1,%d7 5516a: de82 addl %d2,%d7 5516c: 6010 bras 5517e 5516e: 7202 moveq #2,%d1 <== NOT EXECUTED 55170: 2e02 movel %d2,%d7 <== NOT EXECUTED 55172: c081 andl %d1,%d0 <== NOT EXECUTED 55174: 4a00 tstb %d0 <== NOT EXECUTED 55176: 6704 beqs 5517c <== NOT EXECUTED 55178: de87 addl %d7,%d7 <== NOT EXECUTED 5517a: 6002 bras 5517e <== NOT EXECUTED 5517c: e58f lsll #2,%d7 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 5517e: 2c0e movel %fp,%d6 55180: 5986 subql #4,%d6 55182: 49f9 0004 fc8c lea 4fc8c ,%a4 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); 55188: 3612 movew %a2@,%d3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); 5518a: 2f06 movel %d6,%sp@- 5518c: 4878 0001 pea 1 55190: 2f0b movel %a3,%sp@- 55192: 2f0a movel %a2,%sp@- 55194: 4e94 jsr %a4@ if (rc != RC_OK) 55196: 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); 5519a: 2800 movel %d0,%d4 if (rc != RC_OK) 5519c: 6600 018a bnew 55328 return rc; switch ( fs_info->vol.type ) 551a0: 4280 clrl %d0 551a2: 102a 000e moveb %a2@(14),%d0 551a6: 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); 551a8: 0283 0000 ffff andil #65535,%d3 551ae: 5383 subql #1,%d3 551b0: c687 andl %d7,%d3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 551b2: b280 cmpl %d0,%d1 551b4: 6700 011e beqw 552d4 551b8: 123c 0004 moveb #4,%d1 551bc: b280 cmpl %d0,%d1 551be: 6700 0132 beqw 552f2 551c2: 123c 0001 moveb #1,%d1 551c6: b280 cmpl %d0,%d1 551c8: 6600 0150 bnew 5531a { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 551cc: 0802 0000 btst #0,%d2 551d0: 677a beqs 5524c <== NEVER TAKEN { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *(sec_buf + ofs) &= 0x0F; 551d2: 206e fffc moveal %fp@(-4),%a0 551d6: d1c3 addal %d3,%a0 551d8: 123c 000f moveb #15,%d1 551dc: 1010 moveb %a0@,%d0 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 551de: e98d lsll #4,%d5 *(sec_buf + ofs) &= 0x0F; 551e0: c081 andl %d1,%d0 551e2: 1080 moveb %d0,%a0@ *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0); 551e4: 206e fffc moveal %fp@(-4),%a0 551e8: d1c3 addal %d3,%a0 551ea: 1010 moveb %a0@,%d0 551ec: 8085 orl %d5,%d0 551ee: 1080 moveb %d0,%a0@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 551f0: 7001 moveq #1,%d0 551f2: 1540 007e moveb %d0,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 551f6: 4280 clrl %d0 551f8: 3012 movew %a2@,%d0 551fa: 5380 subql #1,%d0 551fc: b083 cmpl %d3,%d0 551fe: 6628 bnes 55228 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 55200: 2f06 movel %d6,%sp@- <== NOT EXECUTED 55202: 4878 0001 pea 1 <== NOT EXECUTED 55206: 486b 0001 pea %a3@(1) <== NOT EXECUTED 5520a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5520c: 4e94 jsr %a4@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 5520e: 4fef 0010 lea %sp@(16),%sp <== 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, 55212: 2800 movel %d0,%d4 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 55214: 6600 0112 bnew 55328 <== NOT EXECUTED return rc; *sec_buf &= 0x00; 55218: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 5521c: 4280 clrl %d0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &sec_buf); if (rc != RC_OK) return rc; *sec_buf &= 0x00; 5521e: 4210 clrb %a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 55220: 3005 movew %d5,%d0 <== NOT EXECUTED 55222: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 55226: 607e bras 552a6 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 55228: 206e fffc moveal %fp@(-4),%a0 5522c: 5283 addql #1,%d3 5522e: 4201 clrb %d1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 55230: 0285 0000 ffff andil #65535,%d5 fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0x00; 55236: 1181 3800 moveb %d1,%a0@(00000000,%d3:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); 5523a: e08d lsrl #8,%d5 5523c: 206e fffc moveal %fp@(-4),%a0 55240: d1c3 addal %d3,%a0 55242: 1010 moveb %a0@,%d0 55244: 8a80 orl %d0,%d5 55246: 1085 moveb %d5,%a0@ 55248: 6000 00de braw 55328 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *(sec_buf + ofs) &= 0x00; 5524c: 206e fffc moveal %fp@(-4),%a0 55250: 4201 clrb %d1 *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 55252: 0285 0000 0fff andil #4095,%d5 *(sec_buf + ofs) &= 0x00; 55258: 1181 3800 moveb %d1,%a0@(00000000,%d3:l) *(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 5525c: 3405 movew %d5,%d2 *(sec_buf + ofs) &= 0x00; *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 5525e: 206e fffc moveal %fp@(-4),%a0 55262: d1c3 addal %d3,%a0 55264: 1010 moveb %a0@,%d0 55266: 7201 moveq #1,%d1 55268: 8a80 orl %d0,%d5 fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 5526a: 4280 clrl %d0 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *(sec_buf + ofs) &= 0x00; *(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF); 5526c: 1085 moveb %d5,%a0@ 5526e: 1541 007e moveb %d1,%a2@(126) fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 55272: 3012 movew %a2@,%d0 55274: 5380 subql #1,%d0 55276: b083 cmpl %d3,%d0 55278: 6636 bnes 552b0 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5527a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5527c: 4878 0001 pea 1 <== NOT EXECUTED 55280: 486b 0001 pea %a3@(1) <== NOT EXECUTED 55284: 2f0a movel %a2,%sp@- <== NOT EXECUTED 55286: 4e94 jsr %a4@ <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 55288: 4fef 0010 lea %sp@(16),%sp <== 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, 5528c: 2800 movel %d0,%d4 <== NOT EXECUTED &sec_buf); if (rc != RC_OK) 5528e: 6600 0098 bnew 55328 <== NOT EXECUTED return rc; *sec_buf &= 0xF0; 55292: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 55296: 72f0 moveq #-16,%d1 <== NOT EXECUTED 55298: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5529a: c081 andl %d1,%d0 <== NOT EXECUTED 5529c: 1080 moveb %d0,%a0@ <== NOT EXECUTED *sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8); 5529e: 4280 clrl %d0 <== NOT EXECUTED 552a0: 3002 movew %d2,%d0 <== NOT EXECUTED 552a2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 552a6: e088 lsrl #8,%d0 <== NOT EXECUTED 552a8: 1210 moveb %a0@,%d1 <== NOT EXECUTED 552aa: 8081 orl %d1,%d0 <== NOT EXECUTED 552ac: 1080 moveb %d0,%a0@ <== NOT EXECUTED 552ae: 603a bras 552ea <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *(sec_buf + ofs + 1) &= 0xF0; 552b0: 206e fffc moveal %fp@(-4),%a0 552b4: 5283 addql #1,%d3 552b6: d1c3 addal %d3,%a0 552b8: 72f0 moveq #-16,%d1 552ba: 1010 moveb %a0@,%d0 552bc: c081 andl %d1,%d0 552be: 1080 moveb %d0,%a0@ *(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8); 552c0: 4280 clrl %d0 552c2: 206e fffc moveal %fp@(-4),%a0 552c6: d1c3 addal %d3,%a0 552c8: 3002 movew %d2,%d0 552ca: 1210 moveb %a0@,%d1 552cc: e088 lsrl #8,%d0 552ce: 8081 orl %d1,%d0 552d0: 1080 moveb %d0,%a0@ 552d2: 6054 bras 55328 } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = 552d4: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED break; } return RC_OK; } 552d8: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED 552de: 2205 movel %d5,%d1 <== NOT EXECUTED 552e0: e089 lsrl #8,%d1 <== NOT EXECUTED 552e2: e18d lsll #8,%d5 <== NOT EXECUTED 552e4: 8285 orl %d5,%d1 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(sec_buf + ofs)) = 552e6: 3181 3800 movew %d1,%a0@(00000000,%d3:l) <== NOT EXECUTED 552ea: 7001 moveq #1,%d0 <== NOT EXECUTED 552ec: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED 552f0: 6036 bras 55328 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 552f2: 0285 0fff ffff andil #268435455,%d5 <== NOT EXECUTED 552f8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 552fa: 4eba fc60 jsr %pc@(54f5c ) <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 552fe: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 55302: d1c3 addal %d3,%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); fat_buf_mark_modified(fs_info); break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); 55304: 588f addql #4,%sp <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000); 55306: 2210 movel %a0@,%d1 <== NOT EXECUTED 55308: 0281 0000 00f0 andil #240,%d1 <== NOT EXECUTED *((uint32_t *)(sec_buf + ofs)) |= fat32_clv; 5530e: 8081 orl %d1,%d0 <== NOT EXECUTED 55310: 7201 moveq #1,%d1 <== NOT EXECUTED 55312: 2080 movel %d0,%a0@ <== NOT EXECUTED 55314: 1541 007e moveb %d1,%a2@(126) <== NOT EXECUTED 55318: 600e bras 55328 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 5531a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 55320: 78ff moveq #-1,%d4 <== NOT EXECUTED 55322: 7205 moveq #5,%d1 <== NOT EXECUTED 55324: 2040 moveal %d0,%a0 <== NOT EXECUTED 55326: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return RC_OK; } 55328: 2004 movel %d4,%d0 5532a: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 55330: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000508bc : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(fat_fs_info_t *fs_info) { 508bc: 4e56 ffe8 linkw %fp,#-24 508c0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 508c4: 246e 0008 moveal %fp@(8),%a2 int rc = RC_OK; int i = 0; rc = fat_sync(fs_info); 508c8: 2f0a movel %a2,%sp@- 508ca: 4eb9 0005 07ec jsr 507ec if ( rc != RC_OK ) 508d0: 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); 508d2: 2400 movel %d0,%d2 if ( rc != RC_OK ) 508d4: 6702 beqs 508d8 <== ALWAYS TAKEN rc = -1; 508d6: 74ff moveq #-1,%d2 <== NOT EXECUTED 508d8: 97cb subal %a3,%a3 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 508da: 49f9 0004 8738 lea 48738 <_Chain_Get>,%a4 { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); 508e0: 4bf9 0004 3f4c lea 43f4c ,%a5 rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 508e6: 262a 0062 movel %a2@(98),%d3 508ea: d68b addl %a3,%d3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 508ec: 6006 bras 508f4 free(node); 508ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED 508f0: 4e95 jsr %a5@ <== NOT EXECUTED 508f2: 588f addql #4,%sp <== NOT EXECUTED 508f4: 2f03 movel %d3,%sp@- 508f6: 4e94 jsr %a4@ 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 ) 508f8: 588f addql #4,%sp 508fa: 4a80 tstl %d0 508fc: 66f0 bnes 508ee <== NEVER TAKEN 508fe: 47eb 000c lea %a3@(12),%a3 rc = fat_sync(fs_info); if ( rc != RC_OK ) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 50902: 103c 0018 moveb #24,%d0 50906: b08b cmpl %a3,%d0 50908: 66dc bnes 508e6 5090a: 97cb subal %a3,%a3 5090c: 49f9 0004 8738 lea 48738 <_Chain_Get>,%a4 { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); 50912: 4bf9 0004 3f4c lea 43f4c ,%a5 } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 50918: 262a 0066 movel %a2@(102),%d3 5091c: d68b addl %a3,%d3 while ( (node = rtems_chain_get(the_chain)) != NULL ) 5091e: 6006 bras 50926 free(node); 50920: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50922: 4e95 jsr %a5@ <== NOT EXECUTED 50924: 588f addql #4,%sp <== NOT EXECUTED 50926: 2f03 movel %d3,%sp@- 50928: 4e94 jsr %a4@ 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 ) 5092a: 588f addql #4,%sp 5092c: 4a80 tstl %d0 5092e: 66f0 bnes 50920 <== NEVER TAKEN 50930: 47eb 000c lea %a3@(12),%a3 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 50934: 103c 0018 moveb #24,%d0 50938: b08b cmpl %a3,%d0 5093a: 66dc bnes 50918 while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 5093c: 2f2a 0062 movel %a2@(98),%sp@- 50940: 47f9 0004 3f4c lea 43f4c ,%a3 50946: 4e93 jsr %a3@ free(fs_info->rhash); 50948: 2f2a 0066 movel %a2@(102),%sp@- 5094c: 4e93 jsr %a3@ free(fs_info->uino); 5094e: 2f2a 006a movel %a2@(106),%sp@- 50952: 4e93 jsr %a3@ free(fs_info->sec_buf); 50954: 2f2a 0084 movel %a2@(132),%sp@- 50958: 4e93 jsr %a3@ close(fs_info->vol.fd); 5095a: 2f2a 0056 movel %a2@(86),%sp@- 5095e: 4eb9 0004 3cd8 jsr 43cd8 if (rc) 50964: 4fef 0014 lea %sp@(20),%sp 50968: 4a82 tstl %d2 5096a: 670c beqs 50978 <== ALWAYS TAKEN errno = EIO; 5096c: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 50972: 2040 moveal %d0,%a0 <== NOT EXECUTED 50974: 7005 moveq #5,%d0 <== NOT EXECUTED 50976: 2080 movel %d0,%a0@ <== NOT EXECUTED return rc; } 50978: 2002 movel %d2,%d0 5097a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 50980: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000507ec : 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) 507ec: 4280 clrl %d0 507ee: 7204 moveq #4,%d1 return RC_OK; } int fat_sync(fat_fs_info_t *fs_info) { 507f0: 4e56 fff0 linkw %fp,#-16 507f4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 507f8: 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) 507fc: 102a 000e moveb %a2@(14),%d0 50800: b280 cmpl %d0,%d1 50802: 6706 beqs 5080a <== 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; 50804: 4282 clrl %d2 50806: 6000 0084 braw 5088c if (fs_info->vol.type == FAT_FAT32) { uint32_t free_count = fs_info->vol.free_cls; 5080a: 262a 003e movel %a2@(62),%d3 <== NOT EXECUTED uint32_t next_free = fs_info->vol.next_cl; 5080e: 242a 0046 movel %a2@(70),%d2 <== NOT EXECUTED if (free_count != fs_info->vol.free_cls_in_fs_info) 50812: b6aa 0042 cmpl %a2@(66),%d3 <== NOT EXECUTED 50816: 6730 beqs 50848 <== NOT EXECUTED { uint32_t le_free_count = CT_LE_L(free_count); 50818: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5081a: 4eba f240 jsr %pc@(4fa5c ) <== NOT EXECUTED 5081e: 204e moveal %fp,%a0 <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; 50820: 2543 0042 movel %d3,%a2@(66) <== NOT EXECUTED uint32_t free_count = fs_info->vol.free_cls; uint32_t next_free = fs_info->vol.next_cl; if (free_count != fs_info->vol.free_cls_in_fs_info) { uint32_t le_free_count = CT_LE_L(free_count); 50824: 2100 movel %d0,%a0@- <== NOT EXECUTED fs_info->vol.free_cls_in_fs_info = free_count; ret1 = fat_sector_write(fs_info, 50826: 4280 clrl %d0 <== NOT EXECUTED 50828: 2e88 movel %a0,%sp@ <== NOT EXECUTED 5082a: 4878 0004 pea 4 <== NOT EXECUTED 5082e: 4878 01e8 pea 1e8 <== NOT EXECUTED 50832: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 50836: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50838: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5083a: 4eb9 0004 fdbe jsr 4fdbe <== NOT EXECUTED 50840: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50844: 2600 movel %d0,%d3 <== NOT EXECUTED 50846: 6002 bras 5084a <== 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; 50848: 4283 clrl %d3 <== 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) 5084a: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED 5084e: 6758 beqs 508a8 <== NOT EXECUTED { uint32_t le_next_free = CT_LE_L(next_free); 50850: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50852: 4eba f208 jsr %pc@(4fa5c ) <== NOT EXECUTED 50856: 204e moveal %fp,%a0 <== NOT EXECUTED fs_info->vol.next_cl_in_fs_info = next_free; 50858: 2542 004a movel %d2,%a2@(74) <== NOT EXECUTED &le_free_count); } if (next_free != fs_info->vol.next_cl_in_fs_info) { uint32_t le_next_free = CT_LE_L(next_free); 5085c: 2100 movel %d0,%a0@- <== NOT EXECUTED fs_info->vol.next_cl_in_fs_info = next_free; ret2 = fat_sector_write(fs_info, 5085e: 4280 clrl %d0 <== NOT EXECUTED 50860: 2e88 movel %a0,%sp@ <== NOT EXECUTED 50862: 4878 0004 pea 4 <== NOT EXECUTED 50866: 4878 01ec pea 1ec <== NOT EXECUTED 5086a: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED 5086e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50870: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50872: 4eb9 0004 fdbe jsr 4fdbe <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 50878: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 5087c: 4a83 tstl %d3 <== NOT EXECUTED 5087e: 6c04 bges 50884 <== NOT EXECUTED { int rc = RC_OK; rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; 50880: 74ff moveq #-1,%d2 <== NOT EXECUTED 50882: 6008 bras 5088c <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 50884: 4a80 tstl %d0 <== NOT EXECUTED 50886: 6c00 ff7c bgew 50804 <== NOT EXECUTED 5088a: 60f4 bras 50880 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(fs_info); if ( rc != RC_OK ) rc = -1; fat_buf_release(fs_info); 5088c: 2f0a movel %a2,%sp@- 5088e: 4eb9 0004 faee jsr 4faee if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) 50894: 2f2a 005a movel %a2@(90),%sp@- 50898: 4eb9 0004 e346 jsr 4e346 5089e: 508f addql #8,%sp 508a0: 4a80 tstl %d0 508a2: 670c beqs 508b0 <== ALWAYS TAKEN rc = -1; 508a4: 74ff moveq #-1,%d2 <== NOT EXECUTED 508a6: 6008 bras 508b0 <== NOT EXECUTED sizeof(le_next_free), &le_next_free); } } if ( (ret1 < 0) || (ret2 < 0) ) 508a8: 4a83 tstl %d3 <== NOT EXECUTED 508aa: 6c00 ff58 bgew 50804 <== NOT EXECUTED 508ae: 60d0 bras 50880 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL) rc = -1; return rc; } 508b0: 2002 movel %d2,%d0 508b2: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 508b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0006a0e8 : /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 6a0e8: 4e56 ff94 linkw %fp,#-108 rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; st.st_uid = 0; 6a0ec: 4241 clrw %d1 /** * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory */ int fchdir( int fd ) { 6a0ee: 202e 0008 movel %fp@(8),%d0 6a0f2: 48d7 040c moveml %d2-%d3/%a2,%sp@ int rv = 0; rtems_libio_t *iop; struct stat st; rtems_filesystem_location_info_t loc; st.st_mode = 0; 6a0f6: 42ae ffc6 clrl %fp@(-58) st.st_uid = 0; 6a0fa: 3d41 ffcc movew %d1,%fp@(-52) st.st_gid = 0; 6a0fe: 3d41 ffce movew %d1,%fp@(-50) rtems_libio_check_fd( fd ); 6a102: b0b9 0009 156c cmpl 9156c ,%d0 6a108: 6502 bcss 6a10c 6a10a: 601c bras 6a128 iop = rtems_libio_iop( fd ); 6a10c: 2200 movel %d0,%d1 6a10e: ed88 lsll #6,%d0 6a110: e989 lsll #4,%d1 6a112: 2479 0009 6118 moveal 96118 ,%a2 6a118: 9081 subl %d1,%d0 6a11a: d5c0 addal %d0,%a2 rtems_libio_check_is_open( iop ); 6a11c: 202a 000c movel %a2@(12),%d0 6a120: 0280 0000 0100 andil #256,%d0 6a126: 6612 bnes 6a13a 6a128: 4eb9 0006 da4c jsr 6da4c <__errno> 6a12e: 74ff moveq #-1,%d2 6a130: 7209 moveq #9,%d1 6a132: 2040 moveal %d0,%a0 6a134: 2081 movel %d1,%a0@ 6a136: 6000 0096 braw 6a1ce if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 6a13a: 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 ); 6a13e: 260a movel %a2,%d3 6a140: 0683 0000 0010 addil #16,%d3 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 ); 6a146: 2268 000c moveal %a0@(12),%a1 6a14a: 2f08 movel %a0,%sp@- 6a14c: 2051 moveal %a1@,%a0 6a14e: 4e90 jsr %a0@ 6a150: 206a 0020 moveal %a2@(32),%a0 6a154: 486e ffba pea %fp@(-70) 6a158: 2f03 movel %d3,%sp@- 6a15a: 2068 0018 moveal %a0@(24),%a0 6a15e: 4e90 jsr %a0@ if ( rv == 0 ) { 6a160: 4fef 000c lea %sp@(12),%sp 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 ); 6a164: 2400 movel %d0,%d2 if ( rv == 0 ) { 6a166: 6642 bnes 6a1aa <== NEVER TAKEN bool access_ok = rtems_filesystem_check_access( 6a168: 4280 clrl %d0 6a16a: 302e ffce movew %fp@(-50),%d0 6a16e: 2f00 movel %d0,%sp@- 6a170: 302e ffcc movew %fp@(-52),%d0 6a174: 2f00 movel %d0,%sp@- 6a176: 2f2e ffc6 movel %fp@(-58),%sp@- 6a17a: 4878 0001 pea 1 6a17e: 4eb9 0004 c1e4 jsr 4c1e4 st.st_mode, st.st_uid, st.st_gid ); if ( access_ok ) { 6a184: 4fef 0010 lea %sp@(16),%sp 6a188: 4a00 tstb %d0 6a18a: 6710 beqs 6a19c rtems_filesystem_location_clone( &loc, &iop->pathinfo ); 6a18c: 2f03 movel %d3,%sp@- 6a18e: 486e ffa2 pea %fp@(-94) 6a192: 4eb9 0004 bc3c jsr 4bc3c 6a198: 508f addql #8,%sp 6a19a: 600e bras 6a1aa } else { errno = EACCES; 6a19c: 4eb9 0006 da4c jsr 6da4c <__errno> rv = -1; 6a1a2: 74ff moveq #-1,%d2 ); if ( access_ok ) { rtems_filesystem_location_clone( &loc, &iop->pathinfo ); } else { errno = EACCES; 6a1a4: 2040 moveal %d0,%a0 6a1a6: 700d moveq #13,%d0 6a1a8: 2080 movel %d0,%a0@ if ( rv == 0 ) { rv = rtems_filesystem_chdir( &loc ); } return rv; } 6a1aa: 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 ); 6a1ae: 2268 000c moveal %a0@(12),%a1 6a1b2: 2f08 movel %a0,%sp@- 6a1b4: 2069 0004 moveal %a1@(4),%a0 6a1b8: 4e90 jsr %a0@ rv = -1; } } rtems_filesystem_instance_unlock( &iop->pathinfo ); if ( rv == 0 ) { 6a1ba: 588f addql #4,%sp 6a1bc: 4a82 tstl %d2 6a1be: 660e bnes 6a1ce rv = rtems_filesystem_chdir( &loc ); 6a1c0: 486e ffa2 pea %fp@(-94) 6a1c4: 4eb9 0005 d7f4 jsr 5d7f4 6a1ca: 588f addql #4,%sp 6a1cc: 2400 movel %d0,%d2 } return rv; } 6a1ce: 2002 movel %d2,%d0 6a1d0: 4cee 040c ff94 moveml %fp@(-108),%d2-%d3/%a2 6a1d6: 4e5e unlk %fp ... =============================================================================== 0005db00 : /** * POSIX 1003.1b 5.6.4 - Change File Modes */ int fchmod( int fd, mode_t mode ) { 5db00: 4e56 fffc linkw %fp,#-4 5db04: 202e 0008 movel %fp@(8),%d0 5db08: 2f0a movel %a2,%sp@- int rv; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5db0a: b0b9 0009 156c cmpl 9156c ,%d0 5db10: 6502 bcss 5db14 5db12: 601c bras 5db30 iop = rtems_libio_iop( fd ); 5db14: 2200 movel %d0,%d1 5db16: ed88 lsll #6,%d0 5db18: e989 lsll #4,%d1 5db1a: 2479 0009 6118 moveal 96118 ,%a2 5db20: 9081 subl %d1,%d0 5db22: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 5db24: 202a 000c movel %a2@(12),%d0 5db28: 0280 0000 0100 andil #256,%d0 5db2e: 660e bnes 5db3e 5db30: 4eb9 0006 da4c jsr 6da4c <__errno> 5db36: 7209 moveq #9,%d1 5db38: 2040 moveal %d0,%a0 5db3a: 2081 movel %d1,%a0@ 5db3c: 6054 bras 5db92 if (iop->pathinfo.mt_entry->writeable) { 5db3e: 206a 0024 moveal %a2@(36),%a0 5db42: 4a28 0029 tstb %a0@(41) 5db46: 673e beqs 5db86 <== 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 ); 5db48: 2268 000c moveal %a0@(12),%a1 5db4c: 2f08 movel %a0,%sp@- 5db4e: 2051 moveal %a1@,%a0 5db50: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode ); 5db52: 206a 0024 moveal %a2@(36),%a0 5db56: 2068 000c moveal %a0@(12),%a0 5db5a: 2f2e 000c movel %fp@(12),%sp@- 5db5e: 486a 0010 pea %a2@(16) 5db62: 2068 0020 moveal %a0@(32),%a0 5db66: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 5db68: 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 ); 5db6c: 2268 000c moveal %a0@(12),%a1 5db70: 2f08 movel %a0,%sp@- 5db72: 2069 0004 moveal %a1@(4),%a0 5db76: 2d40 fffc movel %d0,%fp@(-4) 5db7a: 4e90 jsr %a0@ 5db7c: 202e fffc movel %fp@(-4),%d0 5db80: 4fef 0010 lea %sp@(16),%sp 5db84: 600e bras 5db94 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; 5db86: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED 5db8c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5db8e: 701e moveq #30,%d0 <== NOT EXECUTED 5db90: 2080 movel %d0,%a0@ <== NOT EXECUTED rv = -1; 5db92: 70ff moveq #-1,%d0 } return rv; } 5db94: 246e fff8 moveal %fp@(-8),%a2 5db98: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005db9c : /** * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File */ int fchown( int fd, uid_t owner, gid_t group ) { 5db9c: 4e56 fff0 linkw %fp,#-16 5dba0: 202e 0008 movel %fp@(8),%d0 5dba4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5dba8: 342e 000e movew %fp@(14),%d2 5dbac: 362e 0012 movew %fp@(18),%d3 int rv = 0; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 5dbb0: b0b9 0009 156c cmpl 9156c ,%d0 5dbb6: 6502 bcss 5dbba 5dbb8: 601c bras 5dbd6 iop = rtems_libio_iop( fd ); 5dbba: 2200 movel %d0,%d1 5dbbc: ed88 lsll #6,%d0 5dbbe: e989 lsll #4,%d1 5dbc0: 2479 0009 6118 moveal 96118 ,%a2 5dbc6: 9081 subl %d1,%d0 5dbc8: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 5dbca: 202a 000c movel %a2@(12),%d0 5dbce: 0280 0000 0100 andil #256,%d0 5dbd4: 660e bnes 5dbe4 5dbd6: 4eb9 0006 da4c jsr 6da4c <__errno> 5dbdc: 7209 moveq #9,%d1 5dbde: 2040 moveal %d0,%a0 5dbe0: 2081 movel %d1,%a0@ 5dbe2: 6058 bras 5dc3c if (iop->pathinfo.mt_entry->writeable) { 5dbe4: 206a 0024 moveal %a2@(36),%a0 5dbe8: 4a28 0029 tstb %a0@(41) 5dbec: 6742 beqs 5dc30 <== 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 ); 5dbee: 2268 000c moveal %a0@(12),%a1 5dbf2: 2f08 movel %a0,%sp@- 5dbf4: 2051 moveal %a1@,%a0 5dbf6: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rv = (*iop->pathinfo.mt_entry->ops->chown_h)( 5dbf8: 206a 0024 moveal %a2@(36),%a0 5dbfc: 2068 000c moveal %a0@(12),%a0 5dc00: 3f03 movew %d3,%sp@- 5dc02: 4267 clrw %sp@- 5dc04: 3f02 movew %d2,%sp@- 5dc06: 4267 clrw %sp@- 5dc08: 486a 0010 pea %a2@(16) 5dc0c: 2068 0024 moveal %a0@(36),%a0 5dc10: 4e90 jsr %a0@ errno = EROFS; rv = -1; } return rv; } 5dc12: 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 ); 5dc16: 2268 000c moveal %a0@(12),%a1 5dc1a: 2f08 movel %a0,%sp@- 5dc1c: 2069 0004 moveal %a1@(4),%a0 5dc20: 2d40 fffc movel %d0,%fp@(-4) 5dc24: 4e90 jsr %a0@ 5dc26: 202e fffc movel %fp@(-4),%d0 5dc2a: 4fef 0014 lea %sp@(20),%sp 5dc2e: 600e bras 5dc3e owner, group ); rtems_filesystem_instance_unlock( &iop->pathinfo ); } else { errno = EROFS; 5dc30: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED 5dc36: 2040 moveal %d0,%a0 <== NOT EXECUTED 5dc38: 701e moveq #30,%d0 <== NOT EXECUTED 5dc3a: 2080 movel %d0,%a0@ <== NOT EXECUTED rv = -1; 5dc3c: 70ff moveq #-1,%d0 } return rv; } 5dc3e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 5dc44: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00069820 : int fcntl( int fd, int cmd, ... ) { 69820: 4e56 ffec linkw %fp,#-20 69824: 202e 0008 movel %fp@(8),%d0 69828: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 6982c: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 69830: b0b9 0006 ed48 cmpl 6ed48 ,%d0 69836: 6502 bcss 6983a 69838: 601a bras 69854 iop = rtems_libio_iop( fd ); 6983a: 2200 movel %d0,%d1 6983c: ed88 lsll #6,%d0 6983e: e989 lsll #4,%d1 69840: 2479 0008 0534 moveal 80534 ,%a2 69846: 9081 subl %d1,%d0 69848: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 6984a: 242a 000c movel %a2@(12),%d2 6984e: 0802 0008 btst #8,%d2 69852: 6610 bnes 69864 69854: 4eb9 0005 b09c jsr 5b09c <__errno> 6985a: 7209 moveq #9,%d1 6985c: 2040 moveal %d0,%a0 6985e: 2081 movel %d1,%a0@ 69860: 6000 0152 braw 699b4 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 69864: 7009 moveq #9,%d0 69866: b083 cmpl %d3,%d0 69868: 6500 011a bcsw 69984 6986c: 303b 3a08 movew %pc@(69876 ,%d3:l:2),%d0 69870: 48c0 extl %d0 69872: 4efb 0802 jmp %pc@(69876 ,%d0:l) 69876: 0014 .short 0x0014 <== NOT EXECUTED 69878: 00a8 00b4 00ca oril #11796682,%d0 <== NOT EXECUTED 6987e: 00d8 .short 0x00d8 <== NOT EXECUTED 69880: 00fe .short 0x00fe <== NOT EXECUTED 69882: 00fe .short 0x00fe <== NOT EXECUTED 69884: 00fe .short 0x00fe <== NOT EXECUTED 69886: 00fe .short 0x00fe <== NOT EXECUTED 69888: 00fe .short 0x00fe <== NOT EXECUTED /* * FIXME: We ignore the start value fd2 for the file descriptor search. This * is not POSIX conform. */ rtems_libio_t *diop = rtems_libio_allocate(); 6988a: 4eb9 0004 66b0 jsr 466b0 69890: 2640 moveal %d0,%a3 if (diop != NULL) { 69892: 4a80 tstl %d0 69894: 6700 011e beqw 699b4 int oflag = rtems_libio_to_fcntl_flags( iop->flags ); 69898: 2f2a 000c movel %a2@(12),%sp@- 6989c: 4eb9 0004 6660 jsr 46660 oflag &= ~O_CREAT; diop->flags |= rtems_libio_fcntl_flags( oflag ); 698a2: 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; 698a6: 2400 movel %d0,%d2 698a8: 0882 0009 bclr #9,%d2 diop->flags |= rtems_libio_fcntl_flags( oflag ); 698ac: 2f02 movel %d2,%sp@- 698ae: 4eb9 0004 6620 jsr 46620 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 698b4: 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 ); 698b8: 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 ); 698ba: 2268 000c moveal %a0@(12),%a1 698be: 2740 000c movel %d0,%a3@(12) 698c2: 2f08 movel %a0,%sp@- 698c4: 2051 moveal %a1@,%a0 698c6: 4e90 jsr %a0@ rtems_filesystem_instance_lock( &iop->pathinfo ); rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo ); 698c8: 486a 0010 pea %a2@(16) 698cc: 486b 0010 pea %a3@(16) 698d0: 4eb9 0005 30e0 jsr 530e0 int cmd, int arg ) { return fcntl( fd, cmd, arg ); } 698d6: 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 ); 698da: 2268 000c moveal %a0@(12),%a1 698de: 2f08 movel %a0,%sp@- 698e0: 2069 0004 moveal %a1@(4),%a0 698e4: 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 ); 698e6: 206b 0020 moveal %a3@(32),%a0 698ea: 42a7 clrl %sp@- 698ec: 2f02 movel %d2,%sp@- 698ee: 42a7 clrl %sp@- 698f0: 2f0b movel %a3,%sp@- 698f2: 2050 moveal %a0@,%a0 698f4: 4e90 jsr %a0@ if ( rv == 0 ) { 698f6: 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 ); 698fa: 2400 movel %d0,%d2 if ( rv == 0 ) { 698fc: 6616 bnes 69914 <== NEVER TAKEN rv = diop - rtems_libio_iops; 698fe: 240b movel %a3,%d2 69900: 94b9 0008 0534 subl 80534 ,%d2 69906: 203c aaaa aaab movel #-1431655765,%d0 6990c: e882 asrl #4,%d2 6990e: 4c00 2800 mulsl %d0,%d2 69912: 607e bras 69992 } else { rtems_libio_free( diop ); 69914: 2f0b movel %a3,%sp@- <== NOT EXECUTED 69916: 4eb9 0004 6710 jsr 46710 <== NOT EXECUTED 6991c: 602c bras 6994a <== NOT EXECUTED fd2 = va_arg( ap, int ); ret = duplicate_iop( iop, fd2 ); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 6991e: 700b moveq #11,%d0 69920: e0aa lsrl %d0,%d2 69922: 103c 0001 moveb #1,%d0 69926: c480 andl %d0,%d2 69928: 606c bras 69996 * 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 ) ) 6992a: 4aae 0010 tstl %fp@(16) 6992e: 6706 beqs 69936 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 69930: 08c2 000b bset #11,%d2 69934: 6004 bras 6993a else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 69936: 0882 000b bclr #11,%d2 6993a: 2542 000c movel %d2,%a2@(12) 6993e: 6030 bras 69970 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 69940: 2f02 movel %d2,%sp@- 69942: 4eb9 0004 6660 jsr 46660 69948: 2400 movel %d0,%d2 6994a: 588f addql #4,%sp 6994c: 6044 bras 69992 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 6994e: 2f2e 0010 movel %fp@(16),%sp@- 69952: 4eb9 0004 6620 jsr 46620 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 69958: 222a 000c movel %a2@(12),%d1 6995c: 588f addql #4,%sp 6995e: 0280 0000 0201 andil #513,%d0 69964: 0281 ffff fdfe andil #-514,%d1 6996a: 8081 orl %d1,%d0 6996c: 2540 000c movel %d0,%a2@(12) { rtems_libio_t *iop; int fd2; int flags; int mask; int ret = 0; 69970: 4282 clrl %d2 69972: 6022 bras 69996 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 69974: 4eb9 0005 b09c jsr 5b09c <__errno> 6997a: 2040 moveal %d0,%a0 6997c: 20bc 0000 0086 movel #134,%a0@ 69982: 6030 bras 699b4 ret = -1; break; default: errno = EINVAL; 69984: 4eb9 0005 b09c jsr 5b09c <__errno> 6998a: 2040 moveal %d0,%a0 6998c: 7016 moveq #22,%d0 6998e: 2080 movel %d0,%a0@ 69990: 6022 bras 699b4 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 69992: 4a82 tstl %d2 69994: 6d20 blts 699b6 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd ); 69996: 206a 0020 moveal %a2@(32),%a0 6999a: 2f03 movel %d3,%sp@- 6999c: 2f0a movel %a2,%sp@- 6999e: 2068 0028 moveal %a0@(40),%a0 699a2: 4e90 jsr %a0@ if (err) { 699a4: 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 ); 699a6: 2600 movel %d0,%d3 if (err) { 699a8: 670c beqs 699b6 <== ALWAYS TAKEN errno = err; 699aa: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED 699b0: 2040 moveal %d0,%a0 <== NOT EXECUTED 699b2: 2083 movel %d3,%a0@ <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 699b4: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 699b6: 2002 movel %d2,%d0 699b8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 699be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b968 : int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b968: 4e56 ffdc linkw %fp,#-36 4b96c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b970: 266e 0008 moveal %fp@(8),%a3 4b974: 286e 000c moveal %fp@(12),%a4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4b978: 4ab9 0005 f3f8 tstl 5f3f8 4b97e: 671c beqs 4b99c rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4b980: 42a7 clrl %sp@- 4b982: 42a7 clrl %sp@- 4b984: 2f39 0005 f3f8 movel 5f3f8 ,%sp@- 4b98a: 4eb9 0004 78b8 jsr 478b8 } if (sc == RTEMS_SUCCESSFUL) { 4b990: 4fef 000c lea %sp@(12),%sp 4b994: 4a80 tstl %d0 4b996: 6700 0340 beqw 4bcd8 4b99a: 6054 bras 4b9f0 <== NOT EXECUTED */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4b99c: 42a7 clrl %sp@- 4b99e: 42a7 clrl %sp@- 4b9a0: 2f39 0005 faf0 movel 5faf0 ,%sp@- 4b9a6: 4eb9 0004 78b8 jsr 478b8 rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4b9ac: 4fef 000c lea %sp@(12),%sp 4b9b0: 4ab9 0005 f3f8 tstl 5f3f8 4b9b6: 6624 bnes 4b9dc <== NEVER TAKEN sc = rtems_semaphore_create( 4b9b8: 4879 0005 f3f8 pea 5f3f8 4b9be: 42a7 clrl %sp@- 4b9c0: 4878 0054 pea 54 4b9c4: 4878 0001 pea 1 4b9c8: 2f3c 5049 5045 movel #1346981957,%sp@- 4b9ce: 4eb9 0004 767c jsr 4767c 4b9d4: 4fef 0014 lea %sp@(20),%sp 4b9d8: 2400 movel %d0,%d2 4b9da: 6002 bras 4b9de free(pipe); } static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 4b9dc: 4282 clrl %d2 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4b9de: 2f39 0005 faf0 movel 5faf0 ,%sp@- 4b9e4: 4eb9 0004 79c0 jsr 479c0 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4b9ea: 588f addql #4,%sp 4b9ec: 4a82 tstl %d2 4b9ee: 6790 beqs 4b980 } if (sc == RTEMS_SUCCESSFUL) { return 0; } else { return -ENOMEM; 4b9f0: 74f4 moveq #-12,%d2 4b9f2: 6000 0302 braw 4bcf6 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b9f6: 4878 0034 pea 34 4b9fa: 4bf9 0004 3ea0 lea 43ea0 ,%a5 4ba00: 4e95 jsr %a5@ if (pipe == NULL) 4ba02: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4ba04: 2440 moveal %d0,%a2 if (pipe == NULL) 4ba06: 4a80 tstl %d0 4ba08: 6700 02da beqw 4bce4 return err; memset(pipe, 0, sizeof(pipe_control_t)); 4ba0c: 4878 0034 pea 34 4ba10: 42a7 clrl %sp@- 4ba12: 2f00 movel %d0,%sp@- 4ba14: 4eb9 0004 eb20 jsr 4eb20 pipe->Size = PIPE_BUF; 4ba1a: 203c 0000 0200 movel #512,%d0 4ba20: 2540 0004 movel %d0,%a2@(4) pipe->Buffer = malloc(pipe->Size); 4ba24: 4878 0200 pea 200 4ba28: 4e95 jsr %a5@ if (! pipe->Buffer) 4ba2a: 4fef 0010 lea %sp@(16),%sp if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4ba2e: 2480 movel %d0,%a2@ if (! pipe->Buffer) 4ba30: 6700 00b2 beqw 4bae4 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ba34: 486a 002c pea %a2@(44) 4ba38: 4bf9 0004 c9f8 lea 4c9f8 ,%a5 rtems_build_name ('P', 'I', 'r', c), 4ba3e: 1039 0005 e538 moveb 5e538 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ba44: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4ba46: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4ba48: 42a7 clrl %sp@- 4ba4a: 0080 5049 7200 oril #1346990592,%d0 4ba50: 2f00 movel %d0,%sp@- 4ba52: 4e95 jsr %a5@ 4ba54: 4fef 0010 lea %sp@(16),%sp 4ba58: 4a80 tstl %d0 4ba5a: 667e bnes 4bada rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4ba5c: 486a 0030 pea %a2@(48) rtems_build_name ('P', 'I', 'w', c), 4ba60: 1039 0005 e538 moveb 5e538 ,%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( 4ba66: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4ba68: 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( 4ba6a: 42a7 clrl %sp@- 4ba6c: 0080 5049 7700 oril #1346991872,%d0 4ba72: 2f00 movel %d0,%sp@- 4ba74: 4e95 jsr %a5@ 4ba76: 4fef 0010 lea %sp@(16),%sp 4ba7a: 4a80 tstl %d0 4ba7c: 6650 bnes 4bace rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4ba7e: 486a 0028 pea %a2@(40) rtems_build_name ('P', 'I', 's', c), 1, 4ba82: 1039 0005 e538 moveb 5e538 ,%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( 4ba88: 42a7 clrl %sp@- 4ba8a: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4ba8e: 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( 4ba90: 4878 0001 pea 1 4ba94: 0080 5049 7300 oril #1346990848,%d0 4ba9a: 2f00 movel %d0,%sp@- 4ba9c: 4eb9 0004 767c jsr 4767c 4baa2: 4fef 0014 lea %sp@(20),%sp 4baa6: 4a80 tstl %d0 4baa8: 6618 bnes 4bac2 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4baaa: 747a moveq #122,%d2 4baac: 1039 0005 e538 moveb 5e538 ,%d0 4bab2: 1200 moveb %d0,%d1 4bab4: 49c1 extbl %d1 4bab6: b481 cmpl %d1,%d2 4bab8: 6600 0230 bnew 4bcea c = 'a'; 4babc: 7061 moveq #97,%d0 4babe: 6000 022c braw 4bcec return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4bac2: 2f2a 0030 movel %a2@(48),%sp@- 4bac6: 4eb9 0004 cab0 jsr 4cab0 4bacc: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4bace: 2f2a 002c movel %a2@(44),%sp@- 4bad2: 4eb9 0004 cab0 jsr 4cab0 4bad8: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4bada: 2f12 movel %a2@,%sp@- 4badc: 4eb9 0004 3ab4 jsr 43ab4 4bae2: 588f addql #4,%sp err_buf: free(pipe); 4bae4: 2f0a movel %a2,%sp@- 4bae6: 4eb9 0004 3ab4 jsr 43ab4 4baec: 588f addql #4,%sp 4baee: 6000 01f4 braw 4bce4 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4baf2: 42a7 clrl %sp@- 4baf4: 42a7 clrl %sp@- 4baf6: 2f2a 0028 movel %a2@(40),%sp@- 4bafa: 4eb9 0004 78b8 jsr 478b8 4bb00: 4fef 000c lea %sp@(12),%sp 4bb04: 4a80 tstl %d0 4bb06: 6604 bnes 4bb0c <== NEVER TAKEN 4bb08: 4282 clrl %d2 4bb0a: 6002 bras 4bb0e err = -EINTR; 4bb0c: 74fc moveq #-4,%d2 <== NOT EXECUTED if (*pipep == NULL) { 4bb0e: 4a93 tstl %a3@ 4bb10: 6610 bnes 4bb22 if (err) 4bb12: 4a82 tstl %d2 4bb14: 670a beqs 4bb20 <== ALWAYS TAKEN pipe_free(pipe); 4bb16: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4bb18: 4eba fd72 jsr %pc@(4b88c ) <== NOT EXECUTED 4bb1c: 588f addql #4,%sp <== NOT EXECUTED 4bb1e: 6002 bras 4bb22 <== NOT EXECUTED else *pipep = pipe; 4bb20: 268a movel %a2,%a3@ #ifdef RTEMS_DEBUG rtems_status_code sc = RTEMS_SUCCESSFUL; sc = #endif rtems_semaphore_release(pipe_semaphore); 4bb22: 2f39 0005 f3f8 movel 5f3f8 ,%sp@- 4bb28: 4eb9 0004 79c0 jsr 479c0 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4bb2e: 588f addql #4,%sp 4bb30: 4a82 tstl %d2 4bb32: 6600 01c2 bnew 4bcf6 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4bb36: 7006 moveq #6,%d0 4bb38: 7204 moveq #4,%d1 4bb3a: c0ac 000c andl %a4@(12),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4bb3e: 2453 moveal %a3@,%a2 switch (LIBIO_ACCMODE(iop)) { 4bb40: b280 cmpl %d0,%d1 4bb42: 6700 009c beqw 4bbe0 4bb46: 123c 0006 moveb #6,%d1 4bb4a: b280 cmpl %d0,%d1 4bb4c: 6700 0124 beqw 4bc72 4bb50: 123c 0002 moveb #2,%d1 4bb54: b280 cmpl %d0,%d1 4bb56: 6600 0162 bnew 4bcba case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4bb5a: 202a 0010 movel %a2@(16),%d0 4bb5e: 2040 moveal %d0,%a0 4bb60: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4bb62: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4bb66: 2548 0010 movel %a0,%a2@(16) 4bb6a: 4a80 tstl %d0 4bb6c: 6610 bnes 4bb7e <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4bb6e: 486e fffc pea %fp@(-4) 4bb72: 2f2a 0030 movel %a2@(48),%sp@- 4bb76: 4eb9 0004 cb4c jsr 4cb4c 4bb7c: 508f addql #8,%sp if (pipe->Writers == 0) { 4bb7e: 4aaa 0014 tstl %a2@(20) 4bb82: 6600 0136 bnew 4bcba /* Not an error */ if (LIBIO_NODELAY(iop)) 4bb86: 7001 moveq #1,%d0 4bb88: c0ac 000c andl %a4@(12),%d0 4bb8c: 6600 012c bnew 4bcba break; prevCounter = pipe->writerCounter; 4bb90: 262a 0024 movel %a2@(36),%d3 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4bb94: 4bf9 0004 79c0 lea 479c0 ,%a5 if (! PIPE_READWAIT(pipe)) 4bb9a: 283c 0004 cbb0 movel #314288,%d4 goto out_error; if (! PIPE_LOCK(pipe)) 4bba0: 2a3c 0004 78b8 movel #293048,%d5 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4bba6: 2f2a 0028 movel %a2@(40),%sp@- 4bbaa: 4e95 jsr %a5@ if (! PIPE_READWAIT(pipe)) 4bbac: 2044 moveal %d4,%a0 4bbae: 42a7 clrl %sp@- 4bbb0: 2f2a 002c movel %a2@(44),%sp@- 4bbb4: 4e90 jsr %a0@ 4bbb6: 4fef 000c lea %sp@(12),%sp 4bbba: 4a80 tstl %d0 4bbbc: 6600 010a bnew 4bcc8 goto out_error; if (! PIPE_LOCK(pipe)) 4bbc0: 42a7 clrl %sp@- 4bbc2: 2045 moveal %d5,%a0 4bbc4: 42a7 clrl %sp@- 4bbc6: 2f2a 0028 movel %a2@(40),%sp@- 4bbca: 4e90 jsr %a0@ 4bbcc: 4fef 000c lea %sp@(12),%sp 4bbd0: 4a80 tstl %d0 4bbd2: 6600 00f4 bnew 4bcc8 goto out_error; } while (prevCounter == pipe->writerCounter); 4bbd6: b6aa 0024 cmpl %a2@(36),%d3 4bbda: 67ca beqs 4bba6 <== NEVER TAKEN 4bbdc: 6000 00dc braw 4bcba break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4bbe0: 202a 0014 movel %a2@(20),%d0 4bbe4: 2200 movel %d0,%d1 4bbe6: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4bbe8: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4bbec: 2541 0014 movel %d1,%a2@(20) 4bbf0: 4a80 tstl %d0 4bbf2: 6610 bnes 4bc04 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4bbf4: 486e fffc pea %fp@(-4) 4bbf8: 2f2a 002c movel %a2@(44),%sp@- 4bbfc: 4eb9 0004 cb4c jsr 4cb4c 4bc02: 508f addql #8,%sp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4bc04: 4aaa 0010 tstl %a2@(16) 4bc08: 6600 00b0 bnew 4bcba 4bc0c: 7001 moveq #1,%d0 4bc0e: c0ac 000c andl %a4@(12),%d0 4bc12: 6712 beqs 4bc26 PIPE_UNLOCK(pipe); 4bc14: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4bc18: 74fa moveq #-6,%d2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4bc1a: 4eb9 0004 79c0 jsr 479c0 err = -ENXIO; goto out_error; 4bc20: 588f addql #4,%sp 4bc22: 6000 00a6 braw 4bcca } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4bc26: 2a6a 0020 moveal %a2@(32),%a5 err = -EINTR; do { PIPE_UNLOCK(pipe); 4bc2a: 263c 0004 79c0 movel #293312,%d3 if (! PIPE_WRITEWAIT(pipe)) 4bc30: 283c 0004 cbb0 movel #314288,%d4 goto out_error; if (! PIPE_LOCK(pipe)) 4bc36: 2a3c 0004 78b8 movel #293048,%d5 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4bc3c: 2f2a 0028 movel %a2@(40),%sp@- 4bc40: 2043 moveal %d3,%a0 4bc42: 4e90 jsr %a0@ if (! PIPE_WRITEWAIT(pipe)) 4bc44: 2044 moveal %d4,%a0 4bc46: 42a7 clrl %sp@- 4bc48: 2f2a 0030 movel %a2@(48),%sp@- 4bc4c: 4e90 jsr %a0@ 4bc4e: 4fef 000c lea %sp@(12),%sp 4bc52: 4a80 tstl %d0 4bc54: 6672 bnes 4bcc8 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4bc56: 42a7 clrl %sp@- 4bc58: 2045 moveal %d5,%a0 4bc5a: 42a7 clrl %sp@- 4bc5c: 2f2a 0028 movel %a2@(40),%sp@- 4bc60: 4e90 jsr %a0@ 4bc62: 4fef 000c lea %sp@(12),%sp 4bc66: 4a80 tstl %d0 4bc68: 665e bnes 4bcc8 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4bc6a: bbea 0020 cmpal %a2@(32),%a5 4bc6e: 67cc beqs 4bc3c <== NEVER TAKEN 4bc70: 6048 bras 4bcba } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4bc72: 202a 0010 movel %a2@(16),%d0 4bc76: 2200 movel %d0,%d1 4bc78: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4bc7a: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4bc7e: 2541 0010 movel %d1,%a2@(16) 4bc82: 4a80 tstl %d0 4bc84: 6610 bnes 4bc96 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4bc86: 486e fffc pea %fp@(-4) 4bc8a: 2f2a 0030 movel %a2@(48),%sp@- 4bc8e: 4eb9 0004 cb4c jsr 4cb4c 4bc94: 508f addql #8,%sp pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4bc96: 202a 0014 movel %a2@(20),%d0 4bc9a: 2040 moveal %d0,%a0 4bc9c: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4bc9e: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4bca2: 2548 0014 movel %a0,%a2@(20) 4bca6: 4a80 tstl %d0 4bca8: 6610 bnes 4bcba <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4bcaa: 486e fffc pea %fp@(-4) 4bcae: 2f2a 002c movel %a2@(44),%sp@- 4bcb2: 4eb9 0004 cb4c jsr 4cb4c 4bcb8: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4bcba: 2f2a 0028 movel %a2@(40),%sp@- 4bcbe: 4eb9 0004 79c0 jsr 479c0 return 0; 4bcc4: 588f addql #4,%sp 4bcc6: 602e bras 4bcf6 /* Not an error */ if (LIBIO_NODELAY(iop)) break; prevCounter = pipe->writerCounter; err = -EINTR; 4bcc8: 74fc moveq #-4,%d2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4bcca: 2f0c movel %a4,%sp@- 4bccc: 2f0b movel %a3,%sp@- 4bcce: 4eb9 0004 b8d4 jsr 4b8d4 return err; 4bcd4: 508f addql #8,%sp 4bcd6: 601e bras 4bcf6 err = pipe_lock(); if (err) return err; pipe = *pipep; 4bcd8: 2453 moveal %a3@,%a2 if (pipe == NULL) { 4bcda: 4a8a tstl %a2 4bcdc: 6600 fe14 bnew 4baf2 4bce0: 6000 fd14 braw 4b9f6 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4bce4: 74f4 moveq #-12,%d2 4bce6: 6000 fe3a braw 4bb22 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4bcea: 5280 addql #1,%d0 4bcec: 13c0 0005 e538 moveb %d0,5e538 4bcf2: 6000 fdfe braw 4baf2 return 0; out_error: pipe_release(pipep, iop); return err; } 4bcf6: 2002 movel %d2,%d0 4bcf8: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 4bcfe: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004754c : */ long fpathconf( int fd, int name ) { 4754c: 4e56 0000 linkw %fp,#0 47550: 202e 0008 movel %fp@(8),%d0 47554: 222e 000c movel %fp@(12),%d1 47558: 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); 4755a: b0b9 0005 b394 cmpl 5b394 ,%d0 47560: 6502 bcss 47564 <== NEVER TAKEN 47562: 601c bras 47580 iop = rtems_libio_iop(fd); 47564: 2400 movel %d0,%d2 <== NOT EXECUTED 47566: ed88 lsll #6,%d0 <== NOT EXECUTED 47568: e98a lsll #4,%d2 <== NOT EXECUTED 4756a: 2079 0005 c38c moveal 5c38c ,%a0 <== NOT EXECUTED 47570: 9082 subl %d2,%d0 <== NOT EXECUTED 47572: d1c0 addal %d0,%a0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 47574: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 47578: 0280 0000 0100 andil #256,%d0 <== NOT EXECUTED 4757e: 6610 bnes 47590 <== NOT EXECUTED 47580: 4eb9 0004 8c20 jsr 48c20 <__errno> 47586: 7209 moveq #9,%d1 47588: 2040 moveal %d0,%a0 4758a: 2081 movel %d1,%a0@ 4758c: 6000 0084 braw 47612 /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 47590: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED switch ( name ) { 47594: 700b moveq #11,%d0 <== NOT EXECUTED /* * Now process the information request. */ the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options; 47596: 2068 002a moveal %a0@(42),%a0 <== NOT EXECUTED switch ( name ) { 4759a: b081 cmpl %d1,%d0 <== NOT EXECUTED 4759c: 6568 bcss 47606 <== NOT EXECUTED 4759e: 303b 1a08 movew %pc@(475a8 ,%d1:l:2),%d0<== NOT EXECUTED 475a2: 48c0 extl %d0 <== NOT EXECUTED 475a4: 4efb 0802 jmp %pc@(475a8 ,%d0:l) <== NOT EXECUTED 475a8: 0018 .short 0x0018 <== NOT EXECUTED 475aa: 001c .short 0x001c <== NOT EXECUTED 475ac: 0022 .short 0x0022 <== NOT EXECUTED 475ae: 0028 .short 0x0028 <== NOT EXECUTED 475b0: 002e .short 0x002e <== NOT EXECUTED 475b2: 0034 .short 0x0034 <== NOT EXECUTED 475b4: 003a .short 0x003a <== NOT EXECUTED 475b6: 0040 .short 0x0040 <== NOT EXECUTED 475b8: 0046 .short 0x0046 <== NOT EXECUTED 475ba: 004c .short 0x004c <== NOT EXECUTED 475bc: 0052 .short 0x0052 <== NOT EXECUTED 475be: 0058 .short 0x0058 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 475c0: 2010 movel %a0@,%d0 <== NOT EXECUTED break; 475c2: 6050 bras 47614 <== NOT EXECUTED case _PC_MAX_CANON: return_value = the_limits->max_canon; 475c4: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED break; 475c8: 604a bras 47614 <== NOT EXECUTED case _PC_MAX_INPUT: return_value = the_limits->max_input; 475ca: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED break; 475ce: 6044 bras 47614 <== NOT EXECUTED case _PC_NAME_MAX: return_value = the_limits->name_max; 475d0: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED break; 475d4: 603e bras 47614 <== NOT EXECUTED case _PC_PATH_MAX: return_value = the_limits->path_max; 475d6: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED break; 475da: 6038 bras 47614 <== NOT EXECUTED case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 475dc: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED break; 475e0: 6032 bras 47614 <== NOT EXECUTED case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 475e2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED break; 475e6: 602c bras 47614 <== NOT EXECUTED case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 475e8: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED break; 475ec: 6026 bras 47614 <== NOT EXECUTED case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 475ee: 2028 002c movel %a0@(44),%d0 <== NOT EXECUTED break; 475f2: 6020 bras 47614 <== NOT EXECUTED case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 475f4: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED break; 475f8: 601a bras 47614 <== NOT EXECUTED case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 475fa: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED break; 475fe: 6014 bras 47614 <== NOT EXECUTED case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 47600: 2028 0028 movel %a0@(40),%d0 <== NOT EXECUTED break; 47604: 600e bras 47614 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( EINVAL ); 47606: 4eb9 0004 8c20 jsr 48c20 <__errno> <== NOT EXECUTED 4760c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4760e: 7016 moveq #22,%d0 <== NOT EXECUTED 47610: 2080 movel %d0,%a0@ <== NOT EXECUTED 47612: 70ff moveq #-1,%d0 break; } return return_value; } 47614: 242e fffc movel %fp@(-4),%d2 47618: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a60 : #include void free( void *ptr ) { 42a60: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 42a64: 52b9 0005 dafc addql #1,5dafc #include void free( void *ptr ) { 42a6a: 2f02 movel %d2,%sp@- 42a6c: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 42a70: 676c beqs 42ade return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42a72: 7003 moveq #3,%d0 42a74: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0 42a7a: 661a bnes 42a96 <== NEVER TAKEN !malloc_is_system_state_OK() ) { 42a7c: 4eb9 0004 2c30 jsr 42c30 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42a82: 4a00 tstb %d0 42a84: 6610 bnes 42a96 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 42a86: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42a8a: 242e fffc movel %fp@(-4),%d2 42a8e: 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); 42a90: 4ef9 0004 2c84 jmp 42c84 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42a96: 2079 0005 cab4 moveal 5cab4 ,%a0 42a9c: 4a88 tstl %a0 42a9e: 670a beqs 42aaa (*rtems_malloc_statistics_helpers->at_free)(ptr); 42aa0: 2f02 movel %d2,%sp@- 42aa2: 2068 0008 moveal %a0@(8),%a0 42aa6: 4e90 jsr %a0@ 42aa8: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 42aaa: 2f02 movel %d2,%sp@- 42aac: 2f39 0005 c40c movel 5c40c ,%sp@- 42ab2: 4eb9 0004 7ce8 jsr 47ce8 <_Protected_heap_Free> 42ab8: 508f addql #8,%sp 42aba: 4a00 tstb %d0 42abc: 6620 bnes 42ade printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 42abe: 2079 0005 c40c moveal 5c40c ,%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", 42ac4: 2f28 001c movel %a0@(28),%sp@- 42ac8: 2f28 0018 movel %a0@(24),%sp@- 42acc: 2f02 movel %d2,%sp@- 42ace: 4879 0005 b414 pea 5b414 42ad4: 4eb9 0004 372c jsr 4372c 42ada: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42ade: 242e fffc movel %fp@(-4),%d2 42ae2: 4e5e unlk %fp ... =============================================================================== 00059ef4 : int fstat( int fd, struct stat *sbuf ) { 59ef4: 4e56 0000 linkw %fp,#0 59ef8: 202e 0008 movel %fp@(8),%d0 59efc: 2f0a movel %a2,%sp@- 59efe: 2f02 movel %d2,%sp@- 59f00: 242e 000c movel %fp@(12),%d2 rtems_libio_t *iop; /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 59f04: 660e bnes 59f14 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 59f06: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 59f0c: 720e moveq #14,%d1 <== NOT EXECUTED 59f0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 59f10: 2081 movel %d1,%a0@ <== NOT EXECUTED 59f12: 6064 bras 59f78 <== NOT EXECUTED /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 59f14: b0b9 0005 c450 cmpl 5c450 ,%d0 59f1a: 641c bccs 59f38 59f1c: 2200 movel %d0,%d1 59f1e: ed88 lsll #6,%d0 59f20: e989 lsll #4,%d1 59f22: 2479 0005 dae4 moveal 5dae4 ,%a2 59f28: 9081 subl %d1,%d0 59f2a: d5c0 addal %d0,%a2 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 59f2c: 202a 000c movel %a2@(12),%d0 59f30: 0280 0000 0100 andil #256,%d0 59f36: 660e bnes 59f46 59f38: 4eb9 0004 c330 jsr 4c330 <__errno> 59f3e: 2040 moveal %d0,%a0 59f40: 7009 moveq #9,%d0 59f42: 2080 movel %d0,%a0@ 59f44: 6032 bras 59f78 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 59f46: 4878 0046 pea 46 59f4a: 42a7 clrl %sp@- 59f4c: 2f02 movel %d2,%sp@- 59f4e: 4eb9 0004 cbc0 jsr 4cbc0 return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); 59f54: 206a 0020 moveal %a2@(32),%a0 59f58: 45ea 0010 lea %a2@(16),%a2 59f5c: 4fef 000c lea %sp@(12),%sp 59f60: 2d42 000c movel %d2,%fp@(12) } 59f64: 242e fff8 movel %fp@(-8),%d2 * 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 ); 59f68: 2d4a 0008 movel %a2,%fp@(8) } 59f6c: 246e fffc moveal %fp@(-4),%a2 59f70: 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 ); 59f72: 2268 0018 moveal %a0@(24),%a1 59f76: 4ed1 jmp %a1@ } 59f78: 242e fff8 movel %fp@(-8),%d2 59f7c: 70ff moveq #-1,%d0 59f7e: 246e fffc moveal %fp@(-4),%a2 59f82: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042734 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 42734: 4e56 0000 linkw %fp,#0 42738: 202e 000c movel %fp@(12),%d0 4273c: 2f03 movel %d3,%sp@- 4273e: 162e 0013 moveb %fp@(19),%d3 42742: 2f02 movel %d2,%sp@- 42744: 242e 0008 movel %fp@(8),%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) { 42748: b4b9 0006 0b76 cmpl 60b76 ,%d2 4274e: 6432 bccs 42782 <== NEVER TAKEN 42750: 2239 0006 0b7a movel 60b7a ,%d1 42756: 672a beqs 42782 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 42758: 2041 moveal %d1,%a0 4275a: e78a lsll #3,%d2 4275c: d1c2 addal %d2,%a0 if (minor < dtab->size && dtab->minor != NULL) { 4275e: b0a8 0004 cmpl %a0@(4),%d0 42762: 641e bccs 42782 <== NEVER TAKEN 42764: 2050 moveal %a0@,%a0 42766: 4a88 tstl %a0 42768: 6718 beqs 42782 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 4276a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if (dd != NULL && !lookup_only) { 4276e: 4a88 tstl %a0 42770: 6712 beqs 42784 42772: 4a03 tstb %d3 42774: 660e bnes 42784 if (!dd->deleted) { 42776: 4a28 0040 tstb %a0@(64) 4277a: 6606 bnes 42782 ++dd->uses; 4277c: 52a8 0014 addql #1,%a0@(20) 42780: 6002 bras 42784 return dd; } } return NULL; 42782: 91c8 subal %a0,%a0 } 42784: 241f movel %sp@+,%d2 42786: 2008 movel %a0,%d0 42788: 261f movel %sp@+,%d3 4278a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000438f8 : * 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, 438f8: 4e56 0000 linkw %fp,#0 438fc: 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); 438fe: 4878 0204 pea 204 43902: 4eb9 0004 4e0c jsr 44e0c if (s == NULL) 43908: 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); 4390a: 2440 moveal %d0,%a2 if (s == NULL) 4390c: 4a80 tstl %d0 4390e: 673a beqs 4394a <== NEVER TAKEN { return RTEMS_NO_MEMORY; } n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE); 43910: 4878 0200 pea 200 43914: 486a 0004 pea %a2@(4) 43918: 2f2e 0008 movel %fp@(8),%sp@- 4391c: 4eb9 0004 5820 jsr 45820 if (n != RTEMS_IDE_SECTOR_SIZE) 43922: 4fef 000c lea %sp@(12),%sp 43926: 0c80 0000 0200 cmpil #512,%d0 4392c: 670e beqs 4393c <== ALWAYS TAKEN { free(s); 4392e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43930: 4eb9 0004 4844 jsr 44844 <== NOT EXECUTED 43936: 588f addql #4,%sp <== NOT EXECUTED return RTEMS_IO_ERROR; 43938: 701b moveq #27,%d0 <== NOT EXECUTED 4393a: 6010 bras 4394c <== NOT EXECUTED } s->sector_num = sector_num; 4393c: 24ae 000c movel %fp@(12),%a2@ *sector = s; return RTEMS_SUCCESSFUL; 43940: 4280 clrl %d0 return RTEMS_IO_ERROR; } s->sector_num = sector_num; *sector = s; 43942: 206e 0010 moveal %fp@(16),%a0 43946: 208a movel %a2,%a0@ 43948: 6002 bras 4394c } s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE); if (s == NULL) { return RTEMS_NO_MEMORY; 4394a: 701a moveq #26,%d0 <== NOT EXECUTED s->sector_num = sector_num; *sector = s; return RTEMS_SUCCESSFUL; } 4394c: 246e fffc moveal %fp@(-4),%a2 43950: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000699f8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 699f8: 4e56 fff4 linkw %fp,#-12 699fc: 202e 0008 movel %fp@(8),%d0 69a00: 48d7 040c moveml %d2-%d3/%a2,%sp@ 69a04: 242e 000c movel %fp@(12),%d2 69a08: 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 ); 69a0c: b0b9 0006 ed48 cmpl 6ed48 ,%d0 69a12: 6412 bccs 69a26 <== NEVER TAKEN 69a14: 2200 movel %d0,%d1 69a16: ed88 lsll #6,%d0 69a18: e989 lsll #4,%d1 69a1a: 2479 0008 0534 moveal 80534 ,%a2 69a20: 9081 subl %d1,%d0 69a22: d5c0 addal %d0,%a2 69a24: 6002 bras 69a28 69a26: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ type = rtems_filesystem_node_type( &iop->pathinfo ); 69a28: 486a 0010 pea %a2@(16) 69a2c: 4eb9 0004 80d4 jsr 480d4 if ( type != RTEMS_FILESYSTEM_DIRECTORY ) 69a32: 588f addql #4,%sp 69a34: 4a80 tstl %d0 69a36: 661e bnes 69a56 /* * 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 ); 69a38: 206a 0020 moveal %a2@(32),%a0 69a3c: 2d43 0010 movel %d3,%fp@(16) 69a40: 2d42 000c movel %d2,%fp@(12) 69a44: 2d4a 0008 movel %a2,%fp@(8) 69a48: 2268 0008 moveal %a0@(8),%a1 } 69a4c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 69a52: 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 ); 69a54: 4ed1 jmp %a1@ /* * 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 ); 69a56: 4eb9 0005 b09c jsr 5b09c <__errno> 69a5c: 2040 moveal %d0,%a0 69a5e: 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 ); } 69a60: 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 ); 69a66: 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 ); } 69a68: 70ff moveq #-1,%d0 69a6a: 4e5e unlk %fp ... =============================================================================== 00042ae8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 42ae8: 4e56 ffe8 linkw %fp,#-24 42aec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42af0: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 42af4: 4a8a tstl %a2 42af6: 6610 bnes 42b08 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 42af8: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 42afe: 2040 moveal %d0,%a0 <== NOT EXECUTED 42b00: 700e moveq #14,%d0 <== NOT EXECUTED 42b02: 2080 movel %d0,%a0@ <== NOT EXECUTED 42b04: 70ff moveq #-1,%d0 <== NOT EXECUTED 42b06: 605e bras 42b66 <== NOT EXECUTED ) { Timestamp_Control snapshot_as_timestamp; Timestamp_Control *snapshot_as_timestamp_ptr; snapshot_as_timestamp_ptr = 42b08: 4879 0005 db98 pea 5db98 <_TOD> static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); 42b0e: 47f9 0005 89ec lea 589ec <__divdi3>,%a3 42b14: 486e fff8 pea %fp@(-8) 42b18: 4eb9 0004 70cc jsr 470cc <_TOD_Get_with_nanoseconds> struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); } 42b1e: 2040 moveal %d0,%a0 42b20: 2410 movel %a0@,%d2 42b22: 2628 0004 movel %a0@(4),%d3 42b26: 2f3c 3b9a ca00 movel #1000000000,%sp@- 42b2c: 42a7 clrl %sp@- 42b2e: 2f03 movel %d3,%sp@- 42b30: 2f02 movel %d2,%sp@- 42b32: 4e93 jsr %a3@ 42b34: 4fef 0010 lea %sp@(16),%sp 42b38: 2481 movel %d1,%a2@ _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); 42b3a: 2f3c 3b9a ca00 movel #1000000000,%sp@- 42b40: 42a7 clrl %sp@- 42b42: 2f03 movel %d3,%sp@- 42b44: 2f02 movel %d2,%sp@- 42b46: 4eb9 0005 8e4c jsr 58e4c <__moddi3> 42b4c: 4fef 0010 lea %sp@(16),%sp 42b50: 4878 03e8 pea 3e8 42b54: 42a7 clrl %sp@- 42b56: 2f01 movel %d1,%sp@- 42b58: 2f00 movel %d0,%sp@- 42b5a: 4e93 jsr %a3@ 42b5c: 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; 42b60: 4280 clrl %d0 42b62: 2541 0004 movel %d1,%a2@(4) } 42b66: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 42b6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005e0a6 : /** * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 5e0a6: 4e56 0000 linkw %fp,#0 5e0aa: 2f0a movel %a2,%sp@- 5e0ac: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 5e0ae: 4a39 0009 55cc tstb 955cc 5e0b4: 6600 00c4 bnew 5e17a return; etc_passwd_initted = 1; mkdir("/etc", 0777); 5e0b8: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 5e0bc: 45f9 0006 e426 lea 6e426 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 5e0c2: 4879 0008 d186 pea 8d186 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 5e0c8: 7001 moveq #1,%d0 5e0ca: 13c0 0009 55cc moveb %d0,955cc mkdir("/etc", 0777); 5e0d0: 4eb9 0004 2c14 jsr 42c14 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 5e0d6: 4879 0008 99c1 pea 899c1 5e0dc: 4879 0008 d18b pea 8d18b 5e0e2: 4e92 jsr %a2@ 5e0e4: 4fef 0010 lea %sp@(16),%sp 5e0e8: 4a80 tstl %d0 5e0ea: 670c beqs 5e0f8 fclose(fp); 5e0ec: 2f00 movel %d0,%sp@- 5e0ee: 4eb9 0006 db88 jsr 6db88 5e0f4: 588f addql #4,%sp 5e0f6: 602e bras 5e126 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 5e0f8: 4879 0008 99be pea 899be 5e0fe: 4879 0008 d18b pea 8d18b 5e104: 4e92 jsr %a2@ 5e106: 508f addql #8,%sp 5e108: 2400 movel %d0,%d2 5e10a: 671a beqs 5e126 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 5e10c: 2f00 movel %d0,%sp@- 5e10e: 4879 0008 d197 pea 8d197 5e114: 4eb9 0006 e5b6 jsr 6e5b6 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 5e11a: 2f02 movel %d2,%sp@- 5e11c: 4eb9 0006 db88 jsr 6db88 5e122: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 5e126: 4879 0008 99c1 pea 899c1 5e12c: 45f9 0006 e426 lea 6e426 ,%a2 5e132: 4879 0008 d1fe pea 8d1fe 5e138: 4e92 jsr %a2@ 5e13a: 508f addql #8,%sp 5e13c: 4a80 tstl %d0 5e13e: 670c beqs 5e14c fclose(fp); 5e140: 2f00 movel %d0,%sp@- 5e142: 4eb9 0006 db88 jsr 6db88 5e148: 588f addql #4,%sp 5e14a: 602e bras 5e17a } else if ((fp = fopen("/etc/group", "w")) != NULL) { 5e14c: 4879 0008 99be pea 899be 5e152: 4879 0008 d1fe pea 8d1fe 5e158: 4e92 jsr %a2@ 5e15a: 508f addql #8,%sp 5e15c: 2400 movel %d0,%d2 5e15e: 671a beqs 5e17a <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 5e160: 2f00 movel %d0,%sp@- 5e162: 4879 0008 d209 pea 8d209 5e168: 4eb9 0006 e5b6 jsr 6e5b6 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 5e16e: 2f02 movel %d2,%sp@- 5e170: 4eb9 0006 db88 jsr 6db88 5e176: 4fef 000c lea %sp@(12),%sp } } 5e17a: 242e fff8 movel %fp@(-8),%d2 5e17e: 246e fffc moveal %fp@(-4),%a2 5e182: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000450ce : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 450ce: 4e56 fff0 linkw %fp,#-16 450d2: 222e 0008 movel %fp@(8),%d1 450d6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 450da: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 450de: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 450e2: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 450e4: 0800 0005 btst #5,%d0 450e8: 6704 beqs 450ee <== ALWAYS TAKEN c &= 0x7f; 450ea: 747f moveq #127,%d2 <== NOT EXECUTED 450ec: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 450ee: 0800 0009 btst #9,%d0 450f2: 6722 beqs 45116 c = tolower (c); 450f4: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0 450fa: 7603 moveq #3,%d3 450fc: 0282 0000 00ff andil #255,%d2 45102: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 45106: c283 andl %d3,%d1 45108: 163c 0001 moveb #1,%d3 4510c: b681 cmpl %d1,%d3 4510e: 6606 bnes 45116 45110: 0682 0000 0020 addil #32,%d2 if (c == '\r') { 45116: 4281 clrl %d1 45118: 1202 moveb %d2,%d1 4511a: 760d moveq #13,%d3 4511c: b681 cmpl %d1,%d3 4511e: 6612 bnes 45132 if (tty->termios.c_iflag & IGNCR) 45120: 4a00 tstb %d0 45122: 6c04 bges 45128 <== ALWAYS TAKEN 45124: 6000 0144 braw 4526a <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 45128: 0800 0008 btst #8,%d0 4512c: 671a beqs 45148 <== NEVER TAKEN c = '\n'; 4512e: 740a moveq #10,%d2 45130: 6016 bras 45148 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 45132: 760a moveq #10,%d3 45134: b681 cmpl %d1,%d3 45136: 660a bnes 45142 45138: 0800 0006 btst #6,%d0 4513c: 670a beqs 45148 <== ALWAYS TAKEN c = '\r'; 4513e: 740d moveq #13,%d2 <== NOT EXECUTED 45140: 6006 bras 45148 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45142: 4a02 tstb %d2 45144: 6700 00ee beqw 45234 45148: 222a 003c movel %a2@(60),%d1 4514c: 0801 0001 btst #1,%d1 45150: 6700 00e2 beqw 45234 if (c == tty->termios.c_cc[VERASE]) { 45154: 4283 clrl %d3 45156: 162a 0043 moveb %a2@(67),%d3 4515a: 4280 clrl %d0 4515c: 1002 moveb %d2,%d0 4515e: b680 cmpl %d0,%d3 45160: 660c bnes 4516e * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45162: 4aaa 0020 tstl %a2@(32) 45166: 6700 0102 beqw 4526a 4516a: 42a7 clrl %sp@- 4516c: 604c bras 451ba if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 4516e: 4283 clrl %d3 45170: 162a 0044 moveb %a2@(68),%d3 45174: b680 cmpl %d0,%d3 45176: 664e bnes 451c6 * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 45178: 4aaa 0020 tstl %a2@(32) 4517c: 6700 00ec beqw 4526a return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 45180: 44c1 movew %d1,%ccr 45182: 6b08 bmis 4518c <== ALWAYS TAKEN tty->ccount = 0; 45184: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 45188: 6000 00e0 braw 4526a <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 4518c: 0801 0004 btst #4,%d1 45190: 6624 bnes 451b6 <== ALWAYS TAKEN tty->ccount = 0; 45192: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 45196: 47fa fd66 lea %pc@(44efe ),%a3 <== NOT EXECUTED 4519a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4519c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4519e: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 451a0: 508f addql #8,%sp <== NOT EXECUTED 451a2: 7020 moveq #32,%d0 <== NOT EXECUTED 451a4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 451a8: 6700 00c0 beqw 4526a <== NOT EXECUTED echo ('\n', tty); 451ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 451ae: 4878 000a pea a <== NOT EXECUTED 451b2: 4e93 jsr %a3@ <== NOT EXECUTED 451b4: 600a bras 451c0 <== NOT EXECUTED 451b6: 4878 0001 pea 1 451ba: 2f0a movel %a2,%sp@- 451bc: 4eba fdc8 jsr %pc@(44f86 ) 451c0: 508f addql #8,%sp 451c2: 6000 00a6 braw 4526a } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 451c6: 4283 clrl %d3 451c8: 162a 0045 moveb %a2@(69),%d3 451cc: b680 cmpl %d0,%d3 451ce: 6700 009e beqw 4526e return 1; } else if (c == '\n') { 451d2: 760a moveq #10,%d3 451d4: b680 cmpl %d0,%d3 451d6: 6622 bnes 451fa if (tty->termios.c_lflag & (ECHO | ECHONL)) 451d8: 7048 moveq #72,%d0 451da: c280 andl %d0,%d1 451dc: 670c beqs 451ea <== NEVER TAKEN echo (c, tty); 451de: 2f0a movel %a2,%sp@- 451e0: 4878 000a pea a 451e4: 4eba fd18 jsr %pc@(44efe ) 451e8: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 451ea: 202a 0020 movel %a2@(32),%d0 451ee: 206a 001c moveal %a2@(28),%a0 451f2: 720a moveq #10,%d1 451f4: 1181 0800 moveb %d1,%a0@(00000000,%d0:l) 451f8: 6032 bras 4522c return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 451fa: 4283 clrl %d3 451fc: 162a 004c moveb %a2@(76),%d3 45200: b680 cmpl %d0,%d3 45202: 670a beqs 4520e <== NEVER TAKEN 45204: 4283 clrl %d3 45206: 162a 0051 moveb %a2@(81),%d3 4520a: b680 cmpl %d0,%d3 4520c: 6626 bnes 45234 <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 4520e: 44c1 movew %d1,%ccr <== NOT EXECUTED 45210: 6a0e bpls 45220 <== NOT EXECUTED echo (c, tty); 45212: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45214: 4280 clrl %d0 <== NOT EXECUTED 45216: 1002 moveb %d2,%d0 <== NOT EXECUTED 45218: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4521a: 4eba fce2 jsr %pc@(44efe ) <== NOT EXECUTED 4521e: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 45220: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 45224: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45228: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED 4522c: 5280 addql #1,%d0 4522e: 2540 0020 movel %d0,%a2@(32) 45232: 603a bras 4526e } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 45234: 2039 0005 c494 movel 5c494 ,%d0 4523a: 5380 subql #1,%d0 4523c: b0aa 0020 cmpl %a2@(32),%d0 45240: 6328 blss 4526a <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 45242: 7008 moveq #8,%d0 45244: c0aa 003c andl %a2@(60),%d0 45248: 670e beqs 45258 <== NEVER TAKEN echo (c, tty); 4524a: 2f0a movel %a2,%sp@- 4524c: 4280 clrl %d0 4524e: 1002 moveb %d2,%d0 45250: 2f00 movel %d0,%sp@- 45252: 4eba fcaa jsr %pc@(44efe ) 45256: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 45258: 202a 0020 movel %a2@(32),%d0 4525c: 206a 001c moveal %a2@(28),%a0 45260: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) 45264: 5280 addql #1,%d0 45266: 2540 0020 movel %d0,%a2@(32) } return 0; 4526a: 4280 clrl %d0 4526c: 6002 bras 45270 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 4526e: 7001 moveq #1,%d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45270: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 45276: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059fc8 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 59fc8: 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 ) { 59fca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59fce: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004320c : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 4320c: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 4320e: 4e56 0000 linkw %fp,#0 43212: 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())) 43214: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0 4321a: 664c bnes 43268 <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 4321c: 2479 0005 bbba moveal 5bbba <_global_impure_ptr>,%a2 43222: b5f9 0005 c5c0 cmpal 5c5c0 <_impure_ptr>,%a2 43228: 6710 beqs 4323a _wrapup_reent(_global_impure_ptr); 4322a: 2f0a movel %a2,%sp@- 4322c: 4eb9 0004 cd7e jsr 4cd7e <_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; 43232: 588f addql #4,%sp 43234: 23ca 0005 c5c0 movel %a2,5c5c0 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4323a: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0 43240: 45f9 0004 c46c lea 4c46c ,%a2 43246: 2f28 0004 movel %a0@(4),%sp@- 4324a: 4e92 jsr %a2@ fclose (stdout); 4324c: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0 43252: 2f28 0008 movel %a0@(8),%sp@- 43256: 4e92 jsr %a2@ fclose (stderr); 43258: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0 4325e: 2f28 000c movel %a0@(12),%sp@- 43262: 4e92 jsr %a2@ 43264: 4fef 000c lea %sp@(12),%sp } 43268: 246e fffc moveal %fp@(-4),%a2 4326c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042d30 : #include "malloc_p.h" void *malloc( size_t size ) { 42d30: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 42d34: 52b9 0005 daf4 addql #1,5daf4 #include "malloc_p.h" void *malloc( size_t size ) { 42d3a: 2f03 movel %d3,%sp@- 42d3c: 262e 0008 movel %fp@(8),%d3 42d40: 2f02 movel %d2,%sp@- MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 42d42: 4eb9 0004 2c4e jsr 42c4e /* * Validate the parameters */ if ( !size ) 42d48: 4a83 tstl %d3 42d4a: 6604 bnes 42d50 return (void *) 0; 42d4c: 4282 clrl %d2 42d4e: 607c bras 42dcc /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42d50: 7003 moveq #3,%d0 42d52: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0 42d58: 671c beqs 42d76 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 42d5a: 42a7 clrl %sp@- 42d5c: 42a7 clrl %sp@- 42d5e: 2f03 movel %d3,%sp@- 42d60: 2f39 0005 c40c movel 5c40c ,%sp@- 42d66: 4eb9 0004 7ca8 jsr 47ca8 <_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 ) { 42d6c: 4fef 0010 lea %sp@(16),%sp 42d70: 2400 movel %d0,%d2 42d72: 6632 bnes 42da6 42d74: 600c bras 42d82 /* * 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() ) 42d76: 4eb9 0004 2c30 jsr 42c30 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42d7c: 4a00 tstb %d0 42d7e: 66da bnes 42d5a <== ALWAYS TAKEN 42d80: 60ca bras 42d4c <== NOT EXECUTED */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size ); 42d82: 2f03 movel %d3,%sp@- 42d84: 2f39 0005 c40c movel 5c40c ,%sp@- 42d8a: 2079 0005 a80c moveal 5a80c ,%a0 42d90: 4e90 jsr %a0@ if ( !return_this ) { 42d92: 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 ); 42d94: 2400 movel %d0,%d2 if ( !return_this ) { 42d96: 660e bnes 42da6 <== NEVER TAKEN errno = ENOMEM; 42d98: 4eb9 0004 c330 jsr 4c330 <__errno> 42d9e: 2040 moveal %d0,%a0 42da0: 700c moveq #12,%d0 42da2: 2080 movel %d0,%a0@ return (void *) 0; 42da4: 6026 bras 42dcc } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 42da6: 2079 0005 cab0 moveal 5cab0 ,%a0 42dac: 4a88 tstl %a0 42dae: 6708 beqs 42db8 (*rtems_malloc_dirty_helper)( return_this, size ); 42db0: 2f03 movel %d3,%sp@- 42db2: 2f02 movel %d2,%sp@- 42db4: 4e90 jsr %a0@ 42db6: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42db8: 2079 0005 cab4 moveal 5cab4 ,%a0 42dbe: 4a88 tstl %a0 42dc0: 670a beqs 42dcc (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 42dc2: 2f02 movel %d2,%sp@- 42dc4: 2068 0004 moveal %a0@(4),%a0 42dc8: 4e90 jsr %a0@ 42dca: 588f addql #4,%sp return return_this; } 42dcc: 2002 movel %d2,%d0 42dce: 242e fff8 movel %fp@(-8),%d2 42dd2: 262e fffc movel %fp@(-4),%d3 42dd6: 4e5e unlk %fp ... =============================================================================== 0004b1e0 : * Allocate a block for an in-memory file. */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 4b1e0: 4e56 0000 linkw %fp,#0 void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 4b1e4: 2f39 0005 d2e0 movel 5d2e0 ,%sp@- 4b1ea: 4878 0001 pea 1 4b1ee: 4eb9 0004 2818 jsr 42818 if ( memory ) 4b1f4: 508f addql #8,%sp 4b1f6: 4a80 tstl %d0 4b1f8: 6706 beqs 4b200 <== NEVER TAKEN memfile_blocks_allocated++; 4b1fa: 52b9 0005 d3f4 addql #1,5d3f4 return memory; } 4b200: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba28 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4ba28: 7004 moveq #4,%d0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4ba2a: 4e56 0000 linkw %fp,#0 4ba2e: 226e 0008 moveal %fp@(8),%a1 4ba32: 2f03 movel %d3,%sp@- IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4ba34: 2069 0018 moveal %a1@(24),%a0 /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4ba38: c0a9 000c andl %a1@(12),%d0 rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 4ba3c: 2f02 movel %d2,%sp@- the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) 4ba3e: 4a80 tstl %d0 4ba40: 6604 bnes 4ba46 if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } return 0; 4ba42: 4280 clrl %d0 4ba44: 6054 bras 4ba9a 4ba46: 2268 004a moveal %a0@(74),%a1 /* * Perform 'copy on write' for linear files */ if ((iop->flags & LIBIO_FLAGS_WRITE) && (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) { 4ba4a: 7005 moveq #5,%d0 4ba4c: b091 cmpl %a1@,%d0 4ba4e: 66f2 bnes 4ba42 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 4ba50: 2028 0052 movel %a0@(82),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->control = &IMFS_node_control_memfile; 4ba54: 243c 0005 b956 movel #375126,%d2 <== NOT EXECUTED 4ba5a: 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; 4ba5e: 2228 0056 movel %a0@(86),%d1 <== NOT EXECUTED the_jnode->control = &IMFS_node_control_memfile; the_jnode->info.file.size = 0; 4ba62: 4282 clrl %d2 <== NOT EXECUTED 4ba64: 4283 clrl %d3 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4ba66: 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; 4ba6a: 2142 004e movel %d2,%a0@(78) <== NOT EXECUTED 4ba6e: 2143 0052 movel %d3,%a0@(82) <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4ba72: 42a8 005a clrl %a0@(90) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4ba76: 42a8 005e clrl %a0@(94) <== NOT EXECUTED if ((count != 0) 4ba7a: 4a80 tstl %d0 <== NOT EXECUTED 4ba7c: 67c4 beqs 4ba42 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4ba7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED return -1; 4ba80: 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)) 4ba82: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4ba84: 42a7 clrl %sp@- <== NOT EXECUTED 4ba86: 42a7 clrl %sp@- <== NOT EXECUTED 4ba88: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4ba8a: 4eb9 0004 b844 jsr 4b844 <== NOT EXECUTED 4ba90: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED return -1; 4ba94: b680 cmpl %d0,%d3 <== NOT EXECUTED 4ba96: 57c0 seq %d0 <== NOT EXECUTED 4ba98: 49c0 extbl %d0 <== NOT EXECUTED } return 0; } 4ba9a: 242e fff8 movel %fp@(-8),%d2 4ba9e: 262e fffc movel %fp@(-4),%d3 4baa2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f18 : const void *data ) { int rv = 0; if ( 42f18: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 42f1a: 4e56 ff84 linkw %fp,#-124 42f1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42f22: 262e 0008 movel %fp@(8),%d3 42f26: 242e 000c movel %fp@(12),%d2 42f2a: 2a2e 0010 movel %fp@(16),%d5 int rv = 0; if ( 42f2e: b0ae 0014 cmpl %fp@(20),%d0 42f32: 6500 02a2 bcsw 431d6 options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 42f36: 2f05 movel %d5,%sp@- 42f38: 4eb9 0004 a288 jsr 4a288 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 42f3e: 588f addql #4,%sp if ( options == RTEMS_FILESYSTEM_READ_ONLY || options == RTEMS_FILESYSTEM_READ_WRITE ) { rtems_filesystem_fsmount_me_t fsmount_me_h = 42f40: 2840 moveal %d0,%a4 rtems_filesystem_get_mount_handler( filesystemtype ); if ( fsmount_me_h != NULL ) { 42f42: 4a80 tstl %d0 42f44: 6700 0282 beqw 431c8 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 42f48: 283c 0005 b44c movel #373836,%d4 42f4e: 4a82 tstl %d2 42f50: 6702 beqs 42f54 42f52: 2802 movel %d2,%d4 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 42f54: 2f05 movel %d5,%sp@- 42f56: 47f9 0004 d690 lea 4d690 ,%a3 42f5c: 4e93 jsr %a3@ 42f5e: 588f addql #4,%sp 42f60: 2e00 movel %d0,%d7 42f62: 2440 moveal %d0,%a2 42f64: 5287 addql #1,%d7 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 42f66: 4a83 tstl %d3 42f68: 670c beqs 42f76 42f6a: 2f03 movel %d3,%sp@- 42f6c: 4e93 jsr %a3@ 42f6e: 588f addql #4,%sp 42f70: 2640 moveal %d0,%a3 42f72: 528b addql #1,%a3 42f74: 6002 bras 42f78 42f76: 97cb subal %a3,%a3 size_t target_size = strlen( target ) + 1; 42f78: 2f04 movel %d4,%sp@- 42f7a: 4eb9 0004 d690 jsr 4d690 42f80: 588f addql #4,%sp 42f82: 2a40 moveal %d0,%a5 42f84: 528d addql #1,%a5 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size 42f86: 41f2 b863 lea %a2@(00000063,%a3:l),%a0 + sizeof( rtems_filesystem_global_location_t ); rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 42f8a: 4870 d800 pea %a0@(00000000,%a5:l) 42f8e: 4878 0001 pea 1 42f92: 4eb9 0004 2818 jsr 42818 if ( mt_entry != NULL ) { 42f98: 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 ); 42f9a: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 42f9c: 4a80 tstl %d0 42f9e: 6700 0250 beqw 431f0 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 ); 42fa2: 2f07 movel %d7,%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 ); 42fa4: 2200 movel %d0,%d1 42fa6: 0681 0000 0062 addil #98,%d1 + 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 = 42fac: 2c00 movel %d0,%d6 42fae: 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 ); 42fb4: 2f05 movel %d5,%sp@- 42fb6: 2a3c 0004 cb50 movel #314192,%d5 42fbc: 2045 moveal %d5,%a0 42fbe: 2f01 movel %d1,%sp@- 42fc0: 2d41 ffac movel %d1,%fp@(-84) 42fc4: 4e90 jsr %a0@ mt_entry->type = str; 42fc6: 222e ffac movel %fp@(-84),%d1 str += filesystemtype_size; if ( source_or_null != NULL ) { 42fca: 4fef 000c lea %sp@(12),%sp ((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; str += filesystemtype_size; 42fce: de81 addl %d1,%d7 (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; 42fd0: 2541 0032 movel %d1,%a2@(50) str += filesystemtype_size; if ( source_or_null != NULL ) { 42fd4: 4a83 tstl %d3 42fd6: 6714 beqs 42fec memcpy( str, source_or_null, source_size ); 42fd8: 2f0b movel %a3,%sp@- 42fda: 2245 moveal %d5,%a1 42fdc: 2f03 movel %d3,%sp@- 42fde: 2f07 movel %d7,%sp@- 42fe0: 4e91 jsr %a1@ mt_entry->dev = str; str += source_size; 42fe2: 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; 42fe6: 2547 0036 movel %d7,%a2@(54) str += source_size; 42fea: de8b addl %a3,%d7 } memcpy( str, target, target_size ); 42fec: 2f0d movel %a5,%sp@- 42fee: 2f04 movel %d4,%sp@- 42ff0: 2f07 movel %d7,%sp@- 42ff2: 4eb9 0004 cb50 jsr 4cb50 mt_entry->target = str; str += target_size; mt_entry->mounted = true; 42ff8: 7001 moveq #1,%d0 mt_entry->mt_fs_root = mt_fs_root; mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; 42ffa: 41f9 0005 b44e lea 5b44e ,%a0 memcpy( str, target, target_size ); mt_entry->target = str; str += target_size; mt_entry->mounted = true; 43000: 1540 0028 moveb %d0,%a2@(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; 43004: 7001 moveq #1,%d0 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; 43006: 2548 002a movel %a0,%a2@(42) mt_fs_root->location.mt_entry = mt_entry; mt_fs_root->reference_count = 1; 4300a: 2540 0056 movel %d0,%a2@(86) mt_entry->dev = str; str += source_size; } memcpy( str, target, target_size ); mt_entry->target = str; 4300e: 2547 002e movel %d7,%a2@(46) str += target_size; mt_entry->mounted = true; mt_entry->mt_fs_root = mt_fs_root; 43012: 2546 0024 movel %d6,%a2@(36) mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf; mt_fs_root->location.mt_entry = mt_entry; 43016: 254a 0052 movel %a2,%a2@(82) void *starting_address, size_t number_nodes, size_t node_size ) { _Chain_Initialize( the_chain, starting_address, number_nodes, node_size ); 4301a: 4878 0024 pea 24 4301e: 4878 0001 pea 1 43022: 2f06 movel %d6,%sp@- 43024: 486a 0014 pea %a2@(20) 43028: 4eb9 0004 6d38 jsr 46d38 <_Chain_Initialize> filesystemtype, &target_length ); if ( mt_entry != NULL ) { mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE; 4302e: 7001 moveq #1,%d0 43030: c0ae 0014 andl %fp@(20),%d0 43034: 1540 0029 moveb %d0,%a2@(41) rv = (*fsmount_me_h)( mt_entry, data ); 43038: 2f2e 0018 movel %fp@(24),%sp@- 4303c: 2f0a movel %a2,%sp@- 4303e: 4e94 jsr %a4@ if ( rv == 0 ) { 43040: 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 ); 43044: 2600 movel %d0,%d3 if ( rv == 0 ) { 43046: 6600 019c bnew 431e4 if ( target != NULL ) { 4304a: 4a82 tstl %d2 4304c: 6700 00d4 beqw 43122 { 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 = 43050: 4878 001f pea 1f 43054: 2f02 movel %d2,%sp@- rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); 43056: 240e movel %fp,%d2 43058: 0682 ffff ffc8 addil #-56,%d2 { 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 = 4305e: 2f02 movel %d2,%sp@- 43060: 4eb9 0004 3a7a jsr 43a7a 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; 43066: 2240 moveal %d0,%a1 43068: 2069 0014 moveal %a1@(20),%a0 return (*mt_entry->ops->are_nodes_equal_h)( 4306c: 2268 000c moveal %a0@(12),%a1 43070: 2f28 0024 movel %a0@(36),%sp@- 43074: 2f00 movel %d0,%sp@- 43076: 2069 0010 moveal %a1@(16),%a0 4307a: 4e90 jsr %a0@ rtems_filesystem_eval_path_start( &ctx, target, eval_flags ); if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) { 4307c: 4fef 0014 lea %sp@(20),%sp 43080: 4a00 tstb %d0 43082: 667e bnes 43102 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( 43084: 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 ); 43088: 0682 ffff ffe8 addil #-24,%d2 4308e: 2f02 movel %d2,%sp@- 43090: 4eb9 0004 3ea0 jsr 43ea0 mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc ); 43096: 2f02 movel %d2,%sp@- 43098: 4eb9 0004 4060 jsr 44060 4309e: 2640 moveal %d0,%a3 mt_entry->mt_point_node = mt_point_node; rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 430a0: 206b 0014 moveal %a3@(20),%a0 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; 430a4: 2540 0020 movel %d0,%a2@(32) rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry ); 430a8: 2068 000c moveal %a0@(12),%a0 430ac: 2f0a movel %a2,%sp@- 430ae: 2068 0030 moveal %a0@(48),%a0 430b2: 4e90 jsr %a0@ if ( rv == 0 ) { 430b4: 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 ); 430b8: 2600 movel %d0,%d3 if ( rv == 0 ) { 430ba: 663a bnes 430f6 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 430bc: 42a7 clrl %sp@- 430be: 42a7 clrl %sp@- 430c0: 2f39 0005 daec movel 5daec ,%sp@- 430c6: 4eb9 0004 62c4 jsr 462c4 Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 430cc: 2079 0005 c484 moveal 5c484 ,%a0 the_node->next = tail; 430d2: 24bc 0005 c480 movel #377984,%a2@ tail->previous = the_node; old_last->next = the_node; the_node->previous = old_last; 430d8: 2548 0004 movel %a0,%a2@(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; 430dc: 208a movel %a2,%a0@ } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 430de: 2f39 0005 daec movel 5daec ,%sp@- { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 430e4: 23ca 0005 c484 movel %a2,5c484 430ea: 4eb9 0004 63cc jsr 463cc 430f0: 4fef 0010 lea %sp@(16),%sp 430f4: 601c bras 43112 &rtems_filesystem_mount_table, &mt_entry->mt_node ); rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); 430f6: 2f0b movel %a3,%sp@- 430f8: 4eb9 0004 3f4a jsr 43f4a 430fe: 588f addql #4,%sp 43100: 6010 bras 43112 } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 43102: 4878 0010 pea 10 rv = -1; 43106: 76ff moveq #-1,%d3 rtems_filesystem_mt_unlock(); } else { rtems_filesystem_global_location_release( mt_point_node ); } } else { rtems_filesystem_eval_path_error( &ctx, EBUSY ); 43108: 2f02 movel %d2,%sp@- 4310a: 4eb9 0004 380a jsr 4380a 43110: 508f addql #8,%sp rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 43112: 486e ffc8 pea %fp@(-56) 43116: 4eb9 0004 3b6c jsr 43b6c 4311c: 588f addql #4,%sp 4311e: 6000 0094 braw 431b4 */ #include static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 43122: 42a7 clrl %sp@- 43124: 42a7 clrl %sp@- 43126: 2f39 0005 daec movel 5daec ,%sp@- 4312c: 4eb9 0004 62c4 jsr 462c4 ) { int rv = 0; rtems_filesystem_mt_lock(); if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) { 43132: 4fef 000c lea %sp@(12),%sp 43136: 203c 0005 c480 movel #377984,%d0 4313c: b0b9 0005 c47c cmpl 5c47c ,%d0 43142: 6616 bnes 4315a <== NEVER TAKEN Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 43144: 2079 0005 c484 moveal 5c484 ,%a0 the_node->next = tail; 4314a: 2480 movel %d0,%a2@ tail->previous = the_node; 4314c: 23ca 0005 c484 movel %a2,5c484 old_last->next = the_node; 43152: 208a movel %a2,%a0@ the_node->previous = old_last; 43154: 2548 0004 movel %a0,%a2@(4) 43158: 600e bras 43168 rtems_chain_append_unprotected( &rtems_filesystem_mount_table, &mt_entry->mt_node ); } else { errno = EINVAL; 4315a: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED 43160: 7616 moveq #22,%d3 <== NOT EXECUTED 43162: 2040 moveal %d0,%a0 <== NOT EXECUTED 43164: 2083 movel %d3,%a0@ <== NOT EXECUTED rv = -1; 43166: 76ff moveq #-1,%d3 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 43168: 2f39 0005 daec movel 5daec ,%sp@- 4316e: 4eb9 0004 63cc jsr 463cc } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { 43174: 588f addql #4,%sp 43176: 4a83 tstl %d3 43178: 663a bnes 431b4 <== NEVER TAKEN rtems_filesystem_global_location_t *new_fs_root = rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); 4317a: 45ea 0024 lea %a2@(36),%a2 rv = -1; } rtems_filesystem_mt_unlock(); if ( rv == 0 ) { rtems_filesystem_global_location_t *new_fs_root = 4317e: 47f9 0004 3fc0 lea 43fc0 ,%a3 43184: 2f0a movel %a2,%sp@- 43186: 4e93 jsr %a3@ 43188: 2400 movel %d0,%d2 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_t *new_fs_current = 4318a: 2f0a movel %a2,%sp@- rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 4318c: 45f9 0004 3f96 lea 43f96 ,%a2 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 = 43192: 4e93 jsr %a3@ rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 43194: 2279 0005 c49c moveal 5c49c ,%a1 4319a: 5889 addql #4,%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 ); rtems_filesystem_global_location_t *new_fs_current = 4319c: 2800 movel %d0,%d4 rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root ); rtems_filesystem_global_location_assign( 4319e: 2f02 movel %d2,%sp@- 431a0: 2f09 movel %a1,%sp@- 431a2: 4e92 jsr %a2@ &rtems_filesystem_root, new_fs_root ); rtems_filesystem_global_location_assign( 431a4: 2f04 movel %d4,%sp@- 431a6: 2f39 0005 c49c movel 5c49c ,%sp@- 431ac: 4e92 jsr %a2@ 431ae: 4fef 0018 lea %sp@(24),%sp 431b2: 604a bras 431fe rv = register_subordinate_file_system( mt_entry, target ); } else { rv = register_root_file_system( mt_entry ); } if ( rv != 0 ) { 431b4: 4a83 tstl %d3 431b6: 6746 beqs 431fe (*mt_entry->ops->fsunmount_me_h)( mt_entry ); 431b8: 206a 000c moveal %a2@(12),%a0 431bc: 2f0a movel %a2,%sp@- 431be: 2068 003c moveal %a0@(60),%a0 431c2: 4e90 jsr %a0@ 431c4: 588f addql #4,%sp 431c6: 601c bras 431e4 } else { errno = ENOMEM; rv = -1; } } else { errno = EINVAL; 431c8: 4eb9 0004 c330 jsr 4c330 <__errno> 431ce: 7416 moveq #22,%d2 431d0: 2040 moveal %d0,%a0 431d2: 2082 movel %d2,%a0@ 431d4: 6026 bras 431fc rv = -1; } } else { errno = EINVAL; 431d6: 4eb9 0004 c330 jsr 4c330 <__errno> 431dc: 7216 moveq #22,%d1 431de: 2240 moveal %d0,%a1 431e0: 2281 movel %d1,%a1@ 431e2: 6018 bras 431fc (*mt_entry->ops->fsunmount_me_h)( mt_entry ); } } if ( rv != 0 ) { free( mt_entry ); 431e4: 2f0a movel %a2,%sp@- 431e6: 4eb9 0004 2a60 jsr 42a60 431ec: 588f addql #4,%sp 431ee: 600e bras 431fe } } else { errno = ENOMEM; 431f0: 4eb9 0004 c330 jsr 4c330 <__errno> 431f6: 2040 moveal %d0,%a0 431f8: 700c moveq #12,%d0 431fa: 2080 movel %d0,%a0@ rv = -1; 431fc: 76ff moveq #-1,%d3 errno = EINVAL; rv = -1; } return rv; } 431fe: 2003 movel %d3,%d0 43200: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5 43206: 4e5e unlk %fp ... =============================================================================== 00046af8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 46af8: 4e56 ffec linkw %fp,#-20 46afc: 48d7 007c moveml %d2-%d6,%sp@ 46b00: 262e 0008 movel %fp@(8),%d3 46b04: 242e 000c movel %fp@(12),%d2 46b08: 282e 0010 movel %fp@(16),%d4 46b0c: 2a2e 0014 movel %fp@(20),%d5 46b10: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 46b14: 4a82 tstl %d2 46b16: 6734 beqs 46b4c rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 46b18: 4878 01ff pea 1ff 46b1c: 2f02 movel %d2,%sp@- 46b1e: 4eb9 0004 75e4 jsr 475e4 if (rv == 0) { 46b24: 508f addql #8,%sp 46b26: 4a80 tstl %d0 46b28: 6630 bnes 46b5a <== NEVER TAKEN rv = mount( 46b2a: 2d46 0018 movel %d6,%fp@(24) 46b2e: 2d45 0014 movel %d5,%fp@(20) 46b32: 2d44 0010 movel %d4,%fp@(16) 46b36: 2d42 000c movel %d2,%fp@(12) 46b3a: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 46b3e: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 46b44: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 46b46: 4ef9 0004 6b64 jmp 46b64 options, data ); } } else { errno = EINVAL; 46b4c: 4eb9 0005 b09c jsr 5b09c <__errno> 46b52: 2040 moveal %d0,%a0 46b54: 7016 moveq #22,%d0 46b56: 2080 movel %d0,%a0@ const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 46b58: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 46b5a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 46b60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053514 : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 53514: 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) { 53516: 4e56 ff40 linkw %fp,#-192 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; 5351a: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5351c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53520: 266e 0008 moveal %fp@(8),%a3 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 53524: 2c0e movel %fp,%d6 53526: 0686 ffff ff80 addil #-128,%d6 5352c: 2a3c 0005 71d8 movel #356824,%d5 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; 53532: 206b 0014 moveal %a3@(20),%a0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 53536: 262b 0008 movel %a3@(8),%d3 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; 5353a: 2468 0008 moveal %a0@(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); 5353e: 4878 0020 pea 20 53542: 2045 moveal %d5,%a0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 53544: 286e 000c moveal %fp@(12),%a4 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 53548: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5354a: 2e2e 0010 movel %fp@(16),%d7 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 5354e: 2f06 movel %d6,%sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 53550: 242e 0014 movel %fp@(20),%d2 53554: 2d41 ff78 movel %d1,%fp@(-136) 53558: 2a6e 001c moveal %fp@(28),%a5 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 5355c: 2d41 ff7c movel %d1,%fp@(-132) 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; 53560: 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; 53564: 42ae ff6c clrl %fp@(-148) time_t time_ret = 0; uint16_t time_val = 0; uint16_t date = 0; 53568: 3d40 ff6a movew %d0,%fp@(-150) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 5356c: 42ae ff70 clrl %fp@(-144) dir_pos->sname.ofs = 0; 53570: 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); 53574: 4e90 jsr %a0@ memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 53576: 4878 0040 pea 40 5357a: 2045 moveal %d5,%a0 5357c: 42a7 clrl %sp@- 5357e: 486e ffc0 pea %fp@(-64) 53582: 4e90 jsr %a0@ if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) { 53584: 4fef 0018 lea %sp@(24),%sp 53588: 0c82 0000 0104 cmpil #260,%d2 5358e: 6f0e bles 5359e <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENAMETOOLONG); 53590: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 53596: 725b moveq #91,%d1 <== NOT EXECUTED 53598: 2040 moveal %d0,%a0 <== NOT EXECUTED 5359a: 2081 movel %d1,%a0@ <== NOT EXECUTED 5359c: 6024 bras 535c2 <== NOT EXECUTED } name_type = msdos_long_to_short (name, name_len, 5359e: 4878 000b pea b 535a2: 2f06 movel %d6,%sp@- 535a4: 2f02 movel %d2,%sp@- 535a6: 2f07 movel %d7,%sp@- 535a8: 4eb9 0005 3a64 jsr 53a64 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 535ae: 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, 535b2: 2a00 movel %d0,%d5 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); if (name_type == MSDOS_NAME_INVALID) { 535b4: 6612 bnes 535c8 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EINVAL); 535b6: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED 535bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 535be: 7016 moveq #22,%d0 <== NOT EXECUTED 535c0: 2080 movel %d0,%a0@ <== NOT EXECUTED 535c2: 74ff moveq #-1,%d2 <== NOT EXECUTED 535c4: 6000 02cc braw 53892 <== NOT EXECUTED /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 535c8: 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; 535ca: 4200 clrb %d0 535cc: 1d40 ff8c moveb %d0,%fp@(-116) /* set up last write date and time */ time_ret = time(NULL); 535d0: 4eb9 0005 aab4 jsr 5aab4