=============================================================================== 00049014 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49014: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 49016: 4e56 0000 linkw %fp,#0 4901a: 206e 0008 moveal %fp@(8),%a0 4901e: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49020: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49022: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 49026: 202a 0048 movel %a2@(72),%d0 4902a: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4902c: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 49030: b280 cmpl %d0,%d1 49032: 6546 bcss 4907a <== NEVER TAKEN 49034: 303b 0a08 movew %pc@(4903e ,%d0:l:2),%d0 49038: 48c0 extl %d0 4903a: 4efb 0802 jmp %pc@(4903e ,%d0:l) 4903e: 000e .short 0x000e <== NOT EXECUTED 49040: 0016 .short 0x0016 <== NOT EXECUTED 49042: 0022 .short 0x0022 <== NOT EXECUTED 49044: 0022 .short 0x0022 <== NOT EXECUTED 49046: 002e .short 0x002e <== NOT EXECUTED 49048: 002e .short 0x002e <== NOT EXECUTED 4904a: 0036 .short 0x0036 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4904c: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 49052: 6026 bras 4907a case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 49054: 203c 0005 b40e movel #373774,%d0 4905a: 2140 0008 movel %d0,%a0@(8) break; 4905e: 601a bras 4907a case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 49060: 223c 0005 b47e movel #373886,%d1 49066: 2141 0008 movel %d1,%a0@(8) break; 4906a: 600e bras 4907a case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4906c: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 49072: 6006 bras 4907a case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 49074: 2169 0010 0008 movel %a1@(16),%a0@(8) break; } return 0; } 4907a: 245f moveal %sp@+,%a2 4907c: 4280 clrl %d0 4907e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048e04 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 48e04: 4e56 fff8 linkw %fp,#-8 48e08: 2f0a movel %a2,%sp@- struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 48e0a: 4878 0060 pea 60 48e0e: 4878 0001 pea 1 48e12: 4eb9 0004 27cc jsr 427cc if ( !node ) 48e18: 508f addql #8,%sp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 48e1a: 2440 moveal %d0,%a2 if ( !node ) 48e1c: 4a80 tstl %d0 48e1e: 674e beqs 48e6e <== NEVER TAKEN /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 48e20: 4878 0020 pea 20 48e24: 2f2e 000c movel %fp@(12),%sp@- /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 48e28: 256e 0008 0048 movel %fp@(8),%a2@(72) strncpy( node->name, name, IMFS_NAME_MAX ); 48e2e: 486a 000c pea %a2@(12) return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 48e32: 7001 moveq #1,%d0 48e34: 3540 0032 movew %d0,%a2@(50) node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 48e38: 4eb9 0004 d3bc jsr 4d3bc /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 48e3e: 256e 0010 002e movel %fp@(16),%a2@(46) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 48e44: 42a7 clrl %sp@- 48e46: 486e fff8 pea %fp@(-8) node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 48e4a: 4240 clrw %d0 48e4c: 3540 0038 movew %d0,%a2@(56) node->st_gid = 0; 48e50: 3540 003a movew %d0,%a2@(58) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 48e54: 4eb9 0004 2bf0 jsr 42bf0 node->stat_atime = (time_t) tv.tv_sec; 48e5a: 202e fff8 movel %fp@(-8),%d0 node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; return node; 48e5e: 4fef 0014 lea %sp@(20),%sp /* * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 48e62: 2540 003c movel %d0,%a2@(60) node->stat_mtime = (time_t) tv.tv_sec; 48e66: 2540 0040 movel %d0,%a2@(64) node->stat_ctime = (time_t) tv.tv_sec; 48e6a: 2540 0044 movel %d0,%a2@(68) return node; } 48e6e: 200a movel %a2,%d0 48e70: 246e fff4 moveal %fp@(-12),%a2 48e74: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048e78 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 48e78: 4e56 ffec linkw %fp,#-20 48e7c: 206e 0008 moveal %fp@(8),%a0 48e80: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 48e84: 242e 000c movel %fp@(12),%d2 48e88: 246e 0018 moveal %fp@(24),%a2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 48e8c: 4a88 tstl %a0 48e8e: 6700 00ee beqw 48f7e return NULL; parent = parent_loc->node_access; 48e92: 2850 moveal %a0@,%a4 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48e94: 7007 moveq #7,%d0 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 48e96: 2068 0010 moveal %a0@(16),%a0 48e9a: 2668 0034 moveal %a0@(52),%a3 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48e9e: b082 cmpl %d2,%d0 48ea0: 660e bnes 48eb0 48ea2: 223c 0005 b39e movel #373662,%d1 48ea8: b2ab 0010 cmpl %a3@(16),%d1 48eac: 6700 00d0 beqw 48f7e return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 48eb0: 2079 0005 c130 moveal 5c130 ,%a0 48eb6: 2028 002c movel %a0@(44),%d0 48eba: 4680 notl %d0 48ebc: c0ae 0014 andl %fp@(20),%d0 48ec0: 2f00 movel %d0,%sp@- 48ec2: 2f2e 0010 movel %fp@(16),%sp@- 48ec6: 2f02 movel %d2,%sp@- 48ec8: 4eb9 0004 8e04 jsr 48e04 if ( !node ) 48ece: 4fef 000c lea %sp@(12),%sp return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 48ed2: 2a40 moveal %d0,%a5 if ( !node ) 48ed4: 4a80 tstl %d0 48ed6: 6700 00a8 beqw 48f80 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 48eda: 7001 moveq #1,%d0 48edc: b082 cmpl %d2,%d0 48ede: 6616 bnes 48ef6 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 ); 48ee0: 41ed 0050 lea %a5@(80),%a0 48ee4: 2b48 004c movel %a0,%a5@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48ee8: 41ed 004c lea %a5@(76),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48eec: 42ad 0050 clrl %a5@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 48ef0: 2b48 0054 movel %a0,%a5@(84) 48ef4: 6066 bras 48f5c rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 48ef6: 7003 moveq #3,%d0 48ef8: b082 cmpl %d2,%d0 48efa: 6706 beqs 48f02 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 48efc: 7204 moveq #4,%d1 48efe: b282 cmpl %d2,%d1 48f00: 6606 bnes 48f08 node->info.sym_link.name = info->sym_link.name; 48f02: 2b52 004c movel %a2@,%a5@(76) 48f06: 6054 bras 48f5c } else if ( type == IMFS_DEVICE ) { 48f08: 7002 moveq #2,%d0 48f0a: b082 cmpl %d2,%d0 48f0c: 660c bnes 48f1a node->info.device.major = info->device.major; 48f0e: 2b52 004c movel %a2@,%a5@(76) node->info.device.minor = info->device.minor; 48f12: 2b6a 0004 0050 movel %a2@(4),%a5@(80) 48f18: 6042 bras 48f5c } else if ( type == IMFS_LINEAR_FILE ) { 48f1a: 7206 moveq #6,%d1 48f1c: b282 cmpl %d2,%d1 48f1e: 6612 bnes 48f32 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 48f20: 42ad 0054 clrl %a5@(84) node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; 48f24: 4280 clrl %d0 48f26: 4281 clrl %d1 48f28: 2b40 004c movel %d0,%a5@(76) 48f2c: 2b41 0050 movel %d1,%a5@(80) 48f30: 602a bras 48f5c node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 48f32: 7205 moveq #5,%d1 48f34: b282 cmpl %d2,%d1 48f36: 661a bnes 48f52 node->info.file.size = 0; node->info.file.indirect = 0; 48f38: 42ad 0054 clrl %a5@(84) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 48f3c: 4280 clrl %d0 48f3e: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 48f40: 42ad 0058 clrl %a5@(88) node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; 48f44: 2b40 004c movel %d0,%a5@(76) 48f48: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 48f4c: 42ad 005c clrl %a5@(92) 48f50: 600a bras 48f5c } else if ( type == IMFS_FIFO ) { 48f52: 7207 moveq #7,%d1 48f54: b282 cmpl %d2,%d1 48f56: 6604 bnes 48f5c <== NEVER TAKEN node->info.fifo.pipe = NULL; 48f58: 42ad 004c clrl %a5@(76) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 48f5c: 202b 0004 movel %a3@(4),%d0 48f60: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 48f62: 2b4c 0008 movel %a4,%a5@(8) node->st_ino = ++fs_info->ino_count; 48f66: 2740 0004 movel %d0,%a3@(4) 48f6a: 2b40 0034 movel %d0,%a5@(52) 48f6e: 2f0d movel %a5,%sp@- 48f70: 486c 004c pea %a4@(76) 48f74: 4eb9 0004 635c jsr 4635c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 48f7a: 508f addql #8,%sp 48f7c: 6002 bras 48f80 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 48f7e: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 48f80: 200d movel %a5,%d0 48f82: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 48f88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049100 : IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 49100: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 49102: 4e56 ffac linkw %fp,#-84 49106: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4910a: 262e 0010 movel %fp@(16),%d3 IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4910e: c083 andl %d3,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 49110: 286e 0008 moveal %fp@(8),%a4 49114: 246e 0014 moveal %fp@(20),%a2 int i = 0; 49118: 42ae fff8 clrl %fp@(-8) IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 4911c: 4a80 tstl %d0 4911e: 6710 beqs 49130 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 49120: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 49126: 7c05 moveq #5,%d6 <== NOT EXECUTED 49128: 2040 moveal %d0,%a0 <== NOT EXECUTED 4912a: 2086 movel %d6,%a0@ <== NOT EXECUTED 4912c: 6000 0248 braw 49376 <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 49130: 280e movel %fp,%d4 * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); 49132: 2a0e movel %fp,%d5 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 49134: 0684 ffff ffd7 addil #-41,%d4 4913a: 2e3c 0004 981c movel #301084,%d7 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49140: 4bf9 0004 9082 lea 49082 ,%a5 * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); 49146: 0685 0000 000c addil #12,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4914c: 2652 moveal %a2@,%a3 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 4914e: 486e fffc pea %fp@(-4) 49152: 200c movel %a4,%d0 49154: d0ae fff8 addl %fp@(-8),%d0 49158: 2047 moveal %d7,%a0 4915a: 2f04 movel %d4,%sp@- 4915c: 2f2e 000c movel %fp@(12),%sp@- 49160: 2f00 movel %d0,%sp@- 49162: 4e90 jsr %a0@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 49164: 4fef 0010 lea %sp@(16),%sp * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 49168: 2400 movel %d0,%d2 pathnamelen -= len; 4916a: 202e fffc movel %fp@(-4),%d0 4916e: 91ae 000c subl %d0,%fp@(12) i += len; 49172: d1ae fff8 addl %d0,%fp@(-8) if ( !pathloc->node_access ) 49176: 4a92 tstl %a2@ 49178: 6700 00ea beqw 49264 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4917c: 4a82 tstl %d2 4917e: 6718 beqs 49198 if ( node->type == IMFS_DIRECTORY ) 49180: 7001 moveq #1,%d0 49182: b0ab 0048 cmpl %a3@(72),%d0 49186: 6610 bnes 49198 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49188: 4878 0001 pea 1 4918c: 2f0a movel %a2,%sp@- 4918e: 4e95 jsr %a5@ 49190: 508f addql #8,%sp 49192: 4a80 tstl %d0 49194: 6700 01d4 beqw 4936a rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49198: 2652 moveal %a2@,%a3 switch( type ) { 4919a: 7003 moveq #3,%d0 4919c: b082 cmpl %d2,%d0 4919e: 6762 beqs 49202 491a0: 7204 moveq #4,%d1 491a2: b282 cmpl %d2,%d1 491a4: 6700 0144 beqw 492ea 491a8: 7c02 moveq #2,%d6 491aa: bc82 cmpl %d2,%d6 491ac: 6600 014a bnew 492f8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 491b0: 2079 0005 c130 moveal 5c130 ,%a0 491b6: b7e8 0018 cmpal %a0@(24),%a3 491ba: 6792 beqs 4914e static inline bool rtems_filesystem_is_root_location( const rtems_filesystem_location_info_t *loc ) { return loc->mt_entry->mt_fs_root.node_access == loc->node_access; 491bc: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 491c0: b7e8 001c cmpal %a0@(28),%a3 491c4: 6630 bnes 491f6 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 491c6: 4878 0014 pea 14 491ca: 4868 0008 pea %a0@(8) 491ce: 2f0a movel %a2,%sp@- 491d0: 4eb9 0004 c854 jsr 4c854 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 491d6: 206a 000c moveal %a2@(12),%a0 491da: 202e fffc movel %fp@(-4),%d0 491de: 2200 movel %d0,%d1 491e0: d2ae 000c addl %fp@(12),%d1 491e4: 2f0a movel %a2,%sp@- 491e6: 2c2e fff8 movel %fp@(-8),%d6 491ea: 9c80 subl %d0,%d6 491ec: 2006 movel %d6,%d0 491ee: 2f03 movel %d3,%sp@- 491f0: 2f01 movel %d1,%sp@- 491f2: 6000 014c braw 49340 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 491f6: 266b 0008 moveal %a3@(8),%a3 491fa: 4a8b tstl %a3 491fc: 6600 00e6 bnew 492e4 49200: 6062 bras 49264 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 49202: 202b 0048 movel %a3@(72),%d0 49206: 7203 moveq #3,%d1 49208: b280 cmpl %d0,%d1 4920a: 6610 bnes 4921c IMFS_evaluate_hard_link( pathloc, 0 ); 4920c: 42a7 clrl %sp@- 4920e: 2f0a movel %a2,%sp@- 49210: 4eb9 0004 90ba jsr 490ba node = pathloc->node_access; 49216: 2652 moveal %a2@,%a3 49218: 508f addql #8,%sp 4921a: 601e bras 4923a * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 4921c: 7c04 moveq #4,%d6 4921e: bc80 cmpl %d0,%d6 49220: 6618 bnes 4923a result = IMFS_evaluate_sym_link( pathloc, 0 ); 49222: 42a7 clrl %sp@- 49224: 2f0a movel %a2,%sp@- 49226: 4eb9 0004 9384 jsr 49384 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 4922c: 2652 moveal %a2@,%a3 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4922e: 2400 movel %d0,%d2 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 49230: 508f addql #8,%sp 49232: 70ff moveq #-1,%d0 49234: b082 cmpl %d2,%d0 49236: 6700 0140 beqw 49378 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4923a: 7201 moveq #1,%d1 4923c: b2ab 0048 cmpl %a3@(72),%d1 49240: 6710 beqs 49252 rtems_set_errno_and_return_minus_one( ENOTDIR ); 49242: 4eb9 0004 c034 jsr 4c034 <__errno> 49248: 7a14 moveq #20,%d5 4924a: 2040 moveal %d0,%a0 4924c: 2085 movel %d5,%a0@ 4924e: 6000 0126 braw 49376 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 49252: 2f04 movel %d4,%sp@- 49254: 2f0b movel %a3,%sp@- 49256: 4eb9 0004 97b0 jsr 497b0 if ( !node ) 4925c: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4925e: 2640 moveal %d0,%a3 if ( !node ) 49260: 4a80 tstl %d0 49262: 6610 bnes 49274 rtems_set_errno_and_return_minus_one( ENOENT ); 49264: 4eb9 0004 c034 jsr 4c034 <__errno> 4926a: 7802 moveq #2,%d4 4926c: 2040 moveal %d0,%a0 4926e: 2084 movel %d4,%a0@ 49270: 6000 0104 braw 49376 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 49274: 7001 moveq #1,%d0 49276: b0ab 0048 cmpl %a3@(72),%d0 4927a: 6668 bnes 492e4 4927c: 4aab 0058 tstl %a3@(88) 49280: 6762 beqs 492e4 IMFS_skip_separator( pathname, &pathnamelen, &i); 49282: 486e fff8 pea %fp@(-8) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 49286: 240c movel %a4,%d2 49288: 7c2e moveq #46,%d6 * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); 4928a: 2f05 movel %d5,%sp@- 4928c: 2f0c movel %a4,%sp@- 4928e: 4eba fd38 jsr %pc@(48fc8 ) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 49292: 202e fff8 movel %fp@(-8),%d0 49296: d480 addl %d0,%d2 49298: 2042 moveal %d2,%a0 4929a: 4fef 000c lea %sp@(12),%sp 4929e: 1210 moveb %a0@,%d1 492a0: 49c1 extbl %d1 492a2: bc81 cmpl %d1,%d6 492a4: 660a bnes 492b0 492a6: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 492aa: 49c1 extbl %d1 492ac: bc81 cmpl %d1,%d6 492ae: 6726 beqs 492d6 *pathloc = node->info.directory.mt_fs->mt_fs_root; 492b0: 4878 0014 pea 14 492b4: 266b 0058 moveal %a3@(88),%a3 492b8: 47eb 001c lea %a3@(28),%a3 492bc: 2f0b movel %a3,%sp@- 492be: 2f0a movel %a2,%sp@- 492c0: 4eb9 0004 c854 jsr 4c854 return (*pathloc->ops->evalpath_h)( &pathname[i], 492c6: 206a 000c moveal %a2@(12),%a0 492ca: 2f0a movel %a2,%sp@- 492cc: 2f03 movel %d3,%sp@- 492ce: 2f2e 000c movel %fp@(12),%sp@- 492d2: 2f02 movel %d2,%sp@- 492d4: 606e bras 49344 pathnamelen, flags, pathloc ); } i += 2; 492d6: 5480 addql #2,%d0 pathnamelen -= 2; 492d8: 55ae 000c subql #2,%fp@(12) node = node->Parent; 492dc: 266b 0008 moveal %a3@(8),%a3 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 492e0: 2d40 fff8 movel %d0,%fp@(-8) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 492e4: 248b movel %a3,%a2@ break; 492e6: 6000 fe66 braw 4914e case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 492ea: 4eb9 0004 c034 jsr 4c034 <__errno> 492f0: 765b moveq #91,%d3 492f2: 2040 moveal %d0,%a0 492f4: 2083 movel %d3,%a0@ 492f6: 607e bras 49376 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 492f8: 4a82 tstl %d2 492fa: 6708 beqs 49304 492fc: 7004 moveq #4,%d0 492fe: b082 cmpl %d2,%d0 49300: 6600 fe4c bnew 4914e * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 49304: 7201 moveq #1,%d1 49306: b2ab 0048 cmpl %a3@(72),%d1 4930a: 6644 bnes 49350 if ( node->info.directory.mt_fs != NULL ) { 4930c: 206b 0058 moveal %a3@(88),%a0 49310: 4a88 tstl %a0 49312: 673c beqs 49350 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 49314: 4878 0014 pea 14 <== NOT EXECUTED 49318: 4868 001c pea %a0@(28) <== NOT EXECUTED 4931c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4931e: 4eb9 0004 c854 jsr 4c854 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 49324: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 49328: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4932c: 2c00 movel %d0,%d6 <== NOT EXECUTED 4932e: dcae 000c addl %fp@(12),%d6 <== NOT EXECUTED 49332: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49334: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED 49338: 9280 subl %d0,%d1 <== NOT EXECUTED 4933a: 2001 movel %d1,%d0 <== NOT EXECUTED 4933c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4933e: 2f06 movel %d6,%sp@- <== NOT EXECUTED 49340: 4874 0800 pea %a4@(00000000,%d0:l) 49344: 2050 moveal %a0@,%a0 49346: 4e90 jsr %a0@ 49348: 4fef 001c lea %sp@(28),%sp 4934c: 2400 movel %d0,%d2 4934e: 6028 bras 49378 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 49350: 2f0a movel %a2,%sp@- 49352: 4eb9 0004 9014 jsr 49014 49358: 2400 movel %d0,%d2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4935a: 2e83 movel %d3,%sp@ 4935c: 2f0a movel %a2,%sp@- 4935e: 4eb9 0004 9082 jsr 49082 49364: 508f addql #8,%sp 49366: 4a80 tstl %d0 49368: 660e bnes 49378 rtems_set_errno_and_return_minus_one( EACCES ); 4936a: 4eb9 0004 c034 jsr 4c034 <__errno> 49370: 740d moveq #13,%d2 49372: 2040 moveal %d0,%a0 49374: 2082 movel %d2,%a0@ 49376: 74ff moveq #-1,%d2 return result; } 49378: 2002 movel %d2,%d0 4937a: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 49380: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049498 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49498: 4e56 ffa8 linkw %fp,#-88 4949c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 494a0: 246e 000c moveal %fp@(12),%a2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 494a4: 260e movel %fp,%d3 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 494a6: 2a0e movel %fp,%d5 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 494a8: 0683 ffff ffd3 addil #-45,%d3 494ae: 2e3c 0004 981c movel #301084,%d7 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 494b4: 2c3c 0004 9082 movel #299138,%d6 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 494ba: 0685 ffff fff4 addil #-12,%d5 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 494c0: 286e 0008 moveal %fp@(8),%a4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 494c4: 2652 moveal %a2@,%a3 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 494c6: 42ae fff4 clrl %fp@(-12) int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 494ca: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 494ce: 2f0c movel %a4,%sp@- 494d0: 4eb9 0004 d3a0 jsr 4d3a0 494d6: 588f addql #4,%sp 494d8: 2d40 fffc movel %d0,%fp@(-4) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 494dc: 486e fff8 pea %fp@(-8) 494e0: 200c movel %a4,%d0 494e2: d0ae fff4 addl %fp@(-12),%d0 494e6: 2047 moveal %d7,%a0 494e8: 2f03 movel %d3,%sp@- 494ea: 2f2e fffc movel %fp@(-4),%sp@- 494ee: 2f00 movel %d0,%sp@- 494f0: 4e90 jsr %a0@ pathlen -= len; i += len; if ( !pathloc->node_access ) 494f2: 4fef 0010 lea %sp@(16),%sp * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 494f6: 2400 movel %d0,%d2 pathlen -= len; 494f8: 202e fff8 movel %fp@(-8),%d0 494fc: 91ae fffc subl %d0,%fp@(-4) i += len; 49500: d1ae fff4 addl %d0,%fp@(-12) if ( !pathloc->node_access ) 49504: 4a92 tstl %a2@ 49506: 6700 0198 beqw 496a0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4950a: 4a82 tstl %d2 4950c: 671a beqs 49528 if ( node->type == IMFS_DIRECTORY ) 4950e: 7001 moveq #1,%d0 49510: b0ab 0048 cmpl %a3@(72),%d0 49514: 6612 bnes 49528 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 49516: 4878 0001 pea 1 4951a: 2046 moveal %d6,%a0 4951c: 2f0a movel %a2,%sp@- 4951e: 4e90 jsr %a0@ 49520: 508f addql #8,%sp 49522: 4a80 tstl %d0 49524: 6700 01cc beqw 496f2 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49528: 2652 moveal %a2@,%a3 switch( type ) { 4952a: 7002 moveq #2,%d0 4952c: b082 cmpl %d2,%d0 4952e: 671a beqs 4954a 49530: 6508 bcss 4953a 49532: 4a82 tstl %d2 49534: 6700 012c beqw 49662 49538: 60a2 bras 494dc 4953a: 7203 moveq #3,%d1 4953c: b282 cmpl %d2,%d1 4953e: 6756 beqs 49596 49540: 7804 moveq #4,%d4 49542: b882 cmpl %d2,%d4 49544: 6696 bnes 494dc <== NEVER TAKEN 49546: 6000 012a braw 49672 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4954a: 2079 0005 c130 moveal 5c130 ,%a0 49550: b7e8 0018 cmpal %a0@(24),%a3 49554: 6786 beqs 494dc 49556: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 4955a: b7e8 001c cmpal %a0@(28),%a3 4955e: 6628 bnes 49588 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 49560: 4878 0014 pea 14 49564: 4868 0008 pea %a0@(8) 49568: 2f0a movel %a2,%sp@- 4956a: 4eb9 0004 c854 jsr 4c854 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 49570: 206a 000c moveal %a2@(12),%a0 49574: 202e fff4 movel %fp@(-12),%d0 49578: 90ae fff8 subl %fp@(-8),%d0 4957c: 2f0d movel %a5,%sp@- 4957e: 2f0a movel %a2,%sp@- 49580: 4874 0800 pea %a4@(00000000,%d0:l) 49584: 6000 00b8 braw 4963e } } else { if ( !node->Parent ) 49588: 266b 0008 moveal %a3@(8),%a3 4958c: 4a8b tstl %a3 4958e: 6600 00cc bnew 4965c 49592: 6000 010c braw 496a0 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 49596: 202b 0048 movel %a3@(72),%d0 4959a: 7203 moveq #3,%d1 4959c: b280 cmpl %d0,%d1 4959e: 6706 beqs 495a6 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 495a0: 7204 moveq #4,%d1 495a2: b280 cmpl %d0,%d1 495a4: 6616 bnes 495bc result = IMFS_evaluate_link( pathloc, 0 ); 495a6: 42a7 clrl %sp@- if ( result == -1 ) 495a8: 78ff moveq #-1,%d4 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 495aa: 2f0a movel %a2,%sp@- 495ac: 4eb9 0004 9400 jsr 49400 if ( result == -1 ) 495b2: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 495b4: 2400 movel %d0,%d2 if ( result == -1 ) 495b6: b880 cmpl %d0,%d4 495b8: 6700 0146 beqw 49700 return -1; } node = pathloc->node_access; 495bc: 2052 moveal %a2@,%a0 if ( !node ) 495be: 4a88 tstl %a0 495c0: 6700 0110 beqw 496d2 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 495c4: 7001 moveq #1,%d0 495c6: b0a8 0048 cmpl %a0@(72),%d0 495ca: 6600 0106 bnew 496d2 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 495ce: 2f03 movel %d3,%sp@- 495d0: 2f08 movel %a0,%sp@- 495d2: 4eb9 0004 97b0 jsr 497b0 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 495d8: 508f addql #8,%sp /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 495da: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 495dc: 4a80 tstl %d0 495de: 6700 00a0 beqw 49680 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 495e2: 7001 moveq #1,%d0 495e4: b0ab 0048 cmpl %a3@(72),%d0 495e8: 6672 bnes 4965c 495ea: 4aab 0058 tstl %a3@(88) 495ee: 676c beqs 4965c IMFS_skip_separator( path, &pathlen, &i); 495f0: 2f05 movel %d5,%sp@- 495f2: 486e fffc pea %fp@(-4) if ((path[i] != '.') || (path[i + 1] != '.')) { 495f6: 240c movel %a4,%d2 495f8: 782e moveq #46,%d4 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 495fa: 2f0c movel %a4,%sp@- 495fc: 4eba f9ca jsr %pc@(48fc8 ) if ((path[i] != '.') || (path[i + 1] != '.')) { 49600: 202e fff4 movel %fp@(-12),%d0 49604: d480 addl %d0,%d2 49606: 2042 moveal %d2,%a0 49608: 4fef 000c lea %sp@(12),%sp 4960c: 1210 moveb %a0@,%d1 4960e: 49c1 extbl %d1 49610: b881 cmpl %d1,%d4 49612: 660a bnes 4961e 49614: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 49618: 49c1 extbl %d1 4961a: b881 cmpl %d1,%d4 4961c: 6730 beqs 4964e <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 4961e: 4878 0014 pea 14 49622: 266b 0058 moveal %a3@(88),%a3 49626: 47eb 001c lea %a3@(28),%a3 4962a: 2f0b movel %a3,%sp@- 4962c: 2f0a movel %a2,%sp@- 4962e: 4eb9 0004 c854 jsr 4c854 return (*pathloc->ops->evalformake_h)( &path[i], 49634: 206a 000c moveal %a2@(12),%a0 49638: 2f0d movel %a5,%sp@- 4963a: 2f0a movel %a2,%sp@- 4963c: 2f02 movel %d2,%sp@- 4963e: 2068 0004 moveal %a0@(4),%a0 49642: 4e90 jsr %a0@ 49644: 4fef 0018 lea %sp@(24),%sp 49648: 2400 movel %d0,%d2 4964a: 6000 00b4 braw 49700 pathloc, name ); } i += 2; 4964e: 5480 addql #2,%d0 pathlen -= 2; 49650: 55ae fffc subql #2,%fp@(-4) node = node->Parent; 49654: 266b 0008 moveal %a3@(8),%a3 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 49658: 2d40 fff4 movel %d0,%fp@(-12) pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 4965c: 248b movel %a3,%a2@ 4965e: 6000 fe7c braw 494dc } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 49662: 4eb9 0004 c034 jsr 4c034 <__errno> 49668: 7c11 moveq #17,%d6 4966a: 2040 moveal %d0,%a0 4966c: 2086 movel %d6,%a0@ 4966e: 6000 008e braw 496fe break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49672: 4eb9 0004 c034 jsr 4c034 <__errno> 49678: 7a5b moveq #91,%d5 4967a: 2040 moveal %d0,%a0 4967c: 2085 movel %d5,%a0@ 4967e: 607e bras 496fe case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 49680: 202e fff4 movel %fp@(-12),%d0 49684: 90ae fff8 subl %fp@(-8),%d0 * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 49688: 47f9 0004 38a4 lea 438a4 ,%a3 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4968e: d08c addl %a4,%d0 49690: 2a80 movel %d0,%a5@ /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 49692: 601e bras 496b2 if ( !IMFS_is_separator( path[ i ] ) ) 49694: 49c0 extbl %d0 49696: 2f00 movel %d0,%sp@- 49698: 4e93 jsr %a3@ 4969a: 588f addql #4,%sp 4969c: 4a80 tstl %d0 4969e: 660e bnes 496ae rtems_set_errno_and_return_minus_one( ENOENT ); 496a0: 4eb9 0004 c034 jsr 4c034 <__errno> 496a6: 7802 moveq #2,%d4 496a8: 2040 moveal %d0,%a0 496aa: 2084 movel %d4,%a0@ 496ac: 6050 bras 496fe /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 496ae: 52ae fff4 addql #1,%fp@(-12) 496b2: 202e fff4 movel %fp@(-12),%d0 496b6: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 496ba: 66d8 bnes 49694 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 496bc: 2f0a movel %a2,%sp@- 496be: 4eb9 0004 9014 jsr 49014 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 496c4: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 496c6: 2400 movel %d0,%d2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 496c8: 588f addql #4,%sp 496ca: 7001 moveq #1,%d0 496cc: b0a8 0048 cmpl %a0@(72),%d0 496d0: 670e beqs 496e0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 496d2: 4eb9 0004 c034 jsr 4c034 <__errno> 496d8: 7614 moveq #20,%d3 496da: 2040 moveal %d0,%a0 496dc: 2083 movel %d3,%a0@ 496de: 601e bras 496fe /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 496e0: 4878 0003 pea 3 496e4: 2f0a movel %a2,%sp@- 496e6: 4eb9 0004 9082 jsr 49082 496ec: 508f addql #8,%sp 496ee: 4a80 tstl %d0 496f0: 660e bnes 49700 rtems_set_errno_and_return_minus_one( EACCES ); 496f2: 4eb9 0004 c034 jsr 4c034 <__errno> 496f8: 740d moveq #13,%d2 496fa: 2040 moveal %d0,%a0 496fc: 2082 movel %d2,%a0@ 496fe: 74ff moveq #-1,%d2 return result; } 49700: 2002 movel %d2,%d0 49702: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 49708: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049082 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 49082: 72f8 moveq #-8,%d1 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 49084: 4e56 0000 linkw %fp,#0 49088: 202e 000c movel %fp@(12),%d0 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4908c: c280 andl %d0,%d1 4908e: 6710 beqs 490a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 49090: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 49096: 2040 moveal %d0,%a0 <== NOT EXECUTED 49098: 7001 moveq #1,%d0 <== NOT EXECUTED 4909a: 2080 movel %d0,%a0@ <== NOT EXECUTED 4909c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4909e: 6016 bras 490b6 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 490a0: 206e 0008 moveal %fp@(8),%a0 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 490a4: ed88 lsll #6,%d0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 490a6: 2050 moveal %a0@,%a0 490a8: 2200 movel %d0,%d1 490aa: c2a8 002e andl %a0@(46),%d1 return 1; 490ae: b081 cmpl %d1,%d0 490b0: 57c0 seq %d0 490b2: 49c0 extbl %d0 490b4: 4480 negl %d0 return 0; } 490b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004305c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4305c: 4e56 fff4 linkw %fp,#-12 43060: 206e 0008 moveal %fp@(8),%a0 43064: 48d7 001c moveml %d2-%d4,%sp@ off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 43068: 2f08 movel %a0,%sp@- 4306a: 2f2e 0014 movel %fp@(20),%sp@- 4306e: 2f2e 0010 movel %fp@(16),%sp@- 43072: 2f2e 000c movel %fp@(12),%sp@- 43076: 2068 0018 moveal %a0@(24),%a0 4307a: 2f28 004c movel %a0@(76),%sp@- 4307e: 4eb9 0004 bbd6 jsr 4bbd6 IMFS_FIFO_RETURN(err); 43084: 4fef 0014 lea %sp@(20),%sp rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 43088: 2800 movel %d0,%d4 4308a: 2600 movel %d0,%d3 4308c: 5bc2 smi %d2 4308e: 49c2 extbl %d2 IMFS_FIFO_RETURN(err); 43090: 4a82 tstl %d2 43092: 6a10 bpls 430a4 <== NEVER TAKEN 43094: 4eb9 0004 d89c jsr 4d89c <__errno> 4309a: 4484 negl %d4 4309c: 2040 moveal %d0,%a0 4309e: 74ff moveq #-1,%d2 430a0: 76ff moveq #-1,%d3 430a2: 2084 movel %d4,%a0@ } 430a4: 2002 movel %d2,%d0 430a6: 2203 movel %d3,%d1 430a8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 430ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000430b2 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 430b2: 4e56 fff8 linkw %fp,#-8 430b6: 206e 0008 moveal %fp@(8),%a0 430ba: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; 430bc: 2468 0018 moveal %a0@(24),%a2 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 430c0: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 430c2: 2f08 movel %a0,%sp@- 430c4: 2f2e 0010 movel %fp@(16),%sp@- 430c8: 2f2e 000c movel %fp@(12),%sp@- 430cc: 2f2a 004c movel %a2@(76),%sp@- 430d0: 4eb9 0004 b9fe jsr 4b9fe if (err > 0) { 430d6: 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); 430da: 2400 movel %d0,%d2 if (err > 0) { 430dc: 6f1c bles 430fa IMFS_mtime_ctime_update(jnode); 430de: 42a7 clrl %sp@- 430e0: 486e fff8 pea %fp@(-8) 430e4: 4eb9 0004 4270 jsr 44270 430ea: 202e fff8 movel %fp@(-8),%d0 430ee: 508f addql #8,%sp 430f0: 2540 0040 movel %d0,%a2@(64) 430f4: 2540 0044 movel %d0,%a2@(68) 430f8: 6012 bras 4310c } IMFS_FIFO_RETURN(err); 430fa: 4a80 tstl %d0 430fc: 670e beqs 4310c <== NEVER TAKEN 430fe: 4eb9 0004 d89c jsr 4d89c <__errno> 43104: 4482 negl %d2 43106: 2040 moveal %d0,%a0 43108: 2082 movel %d2,%a0@ 4310a: 74ff moveq #-1,%d2 } 4310c: 2002 movel %d2,%d0 4310e: 242e fff0 movel %fp@(-16),%d2 43112: 246e fff4 moveal %fp@(-12),%a2 43116: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000497b0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 497b0: 4e56 fff0 linkw %fp,#-16 497b4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 497b8: 4879 0005 b406 pea 5b406 497be: 49f9 0004 cdec lea 4cdec ,%a4 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 497c4: 242e 000c movel %fp@(12),%d2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 497c8: 2f02 movel %d2,%sp@- IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 497ca: 246e 0008 moveal %fp@(8),%a2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 497ce: 4e94 jsr %a4@ 497d0: 508f addql #8,%sp 497d2: 4a80 tstl %d0 497d4: 673a beqs 49810 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 497d6: 4879 0005 b408 pea 5b408 497dc: 2f02 movel %d2,%sp@- 497de: 4e94 jsr %a4@ 497e0: 508f addql #8,%sp 497e2: 4a80 tstl %d0 497e4: 6606 bnes 497ec <== ALWAYS TAKEN return directory->Parent; 497e6: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 497ea: 6024 bras 49810 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 497ec: 266a 004c moveal %a2@(76),%a3 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 497f0: 45ea 0050 lea %a2@(80),%a2 the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 497f4: 6010 bras 49806 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 497f6: 486b 000c pea %a3@(12) 497fa: 2f02 movel %d2,%sp@- 497fc: 4e94 jsr %a4@ 497fe: 508f addql #8,%sp 49800: 4a80 tstl %d0 49802: 670a beqs 4980e the_chain = &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 ) { 49804: 2653 moveal %a3@,%a3 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 49806: b5cb cmpal %a3,%a2 49808: 66ec bnes 497f6 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 4980a: 95ca subal %a2,%a2 4980c: 6002 bras 49810 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4980e: 244b moveal %a3,%a2 return the_jnode; } return 0; } 49810: 200a movel %a2,%d0 49812: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49818: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004970c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4970c: 4e56 ffd8 linkw %fp,#-40 49710: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49714: 266e 0008 moveal %fp@(8),%a3 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 49718: 240e movel %fp,%d2 4971a: 0682 ffff ffec addil #-20,%d2 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 49720: 49f9 0004 9014 lea 49014 ,%a4 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 49726: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4972a: 4878 0014 pea 14 4972e: 486b 001c pea %a3@(28) 49732: 2f02 movel %d2,%sp@- 49734: 4eb9 0004 c854 jsr 4c854 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4973a: 4fef 000c lea %sp@(12),%sp 4973e: 42ab 001c clrl %a3@(28) next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 49742: 47f9 0004 24e8 lea 424e8 ,%a3 49748: 6002 bras 4974c if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4974a: 2440 moveal %d0,%a2 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4974c: 262a 0008 movel %a2@(8),%d3 loc.node_access = (void *)jnode; 49750: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 49754: 2f02 movel %d2,%sp@- 49756: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 49758: 588f addql #4,%sp 4975a: 7001 moveq #1,%d0 4975c: b0aa 0048 cmpl %a2@(72),%d0 49760: 660e bnes 49770 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 49762: 200a movel %a2,%d0 49764: 0680 0000 0050 addil #80,%d0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 4976a: b0aa 004c cmpl %a2@(76),%d0 4976e: 660e bnes 4977e result = IMFS_unlink( NULL, &loc ); 49770: 2f02 movel %d2,%sp@- 49772: 42a7 clrl %sp@- 49774: 4e93 jsr %a3@ if (result != 0) 49776: 508f addql #8,%sp 49778: 4a80 tstl %d0 4977a: 6624 bnes 497a0 <== NEVER TAKEN return -1; jnode = next; 4977c: 2443 moveal %d3,%a2 } if ( jnode != NULL ) { 4977e: 4a8a tstl %a2 49780: 6722 beqs 497a4 if ( jnode->type == IMFS_DIRECTORY ) { 49782: 7001 moveq #1,%d0 49784: b0aa 0048 cmpl %a2@(72),%d0 49788: 66c2 bnes 4974c <== NEVER TAKEN 4978a: 220a movel %a2,%d1 4978c: 0681 0000 0050 addil #80,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 49792: 202a 004c movel %a2@(76),%d0 if ( jnode_has_children( jnode ) ) 49796: b280 cmpl %d0,%d1 49798: 67b2 beqs 4974c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4979a: 4a80 tstl %d0 4979c: 66ac bnes 4974a <== ALWAYS TAKEN 4979e: 6006 bras 497a6 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 497a0: 70ff moveq #-1,%d0 <== NOT EXECUTED 497a2: 6002 bras 497a6 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 497a4: 4280 clrl %d0 } 497a6: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 497ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004981c : const char *path, int pathlen, char *token, int *token_len ) { 4981c: 4e56 ffe4 linkw %fp,#-28 49820: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 49824: 2a6e 0008 moveal %fp@(8),%a5 register int i = 0; 49828: 4282 clrl %d2 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4982a: 283c 0004 38a4 movel #276644,%d4 const char *path, int pathlen, char *token, int *token_len ) { 49830: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 49834: 284a moveal %a2,%a4 const char *path, int pathlen, char *token, int *token_len ) { 49836: 266e 000c moveal %fp@(12),%a3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4983a: 1615 moveb %a5@,%d3 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4983c: 600e bras 4984c token[i] = c; if ( i == IMFS_NAME_MAX ) 4983e: 7020 moveq #32,%d0 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; 49840: 18c3 moveb %d3,%a4@+ if ( i == IMFS_NAME_MAX ) 49842: b082 cmpl %d2,%d0 49844: 6776 beqs 498bc return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 49846: 5282 addql #1,%d2 49848: 1635 2800 moveb %a5@(00000000,%d2:l),%d3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4984c: 2044 moveal %d4,%a0 4984e: 1003 moveb %d3,%d0 49850: 49c0 extbl %d0 49852: 2f00 movel %d0,%sp@- 49854: 4e90 jsr %a0@ 49856: 588f addql #4,%sp 49858: 4a80 tstl %d0 4985a: 6604 bnes 49860 4985c: b7c2 cmpal %d2,%a3 4985e: 6ede bgts 4983e /* * Copy a seperator into token. */ if ( i == 0 ) { 49860: 4a82 tstl %d2 49862: 660a bnes 4986e token[i] = c; 49864: 1483 moveb %d3,%a2@ if ( (token[i] != '\0') && pathlen ) { 49866: 6714 beqs 4987c 49868: 4a8b tstl %a3 4986a: 6614 bnes 49880 4986c: 600e bras 4987c i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4986e: 4a32 28ff tstb %a2@(ffffffff,%d2:l) 49872: 6712 beqs 49886 <== NEVER TAKEN token[i] = '\0'; 49874: 4200 clrb %d0 49876: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) 4987a: 600a bras 49886 if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 4987c: 4283 clrl %d3 4987e: 6008 bras 49888 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 49880: 7601 moveq #1,%d3 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 49882: 7401 moveq #1,%d2 49884: 6002 bras 49888 char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 49886: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 49888: 206e 0014 moveal %fp@(20),%a0 /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 4988c: 7003 moveq #3,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4988e: 2082 movel %d2,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 49890: b083 cmpl %d3,%d0 49892: 6632 bnes 498c6 if ( strcmp( token, "..") == 0 ) 49894: 4879 0005 b40b pea 5b40b 4989a: 47f9 0004 cdec lea 4cdec ,%a3 498a0: 2f0a movel %a2,%sp@- 498a2: 4e93 jsr %a3@ 498a4: 508f addql #8,%sp 498a6: 4a80 tstl %d0 498a8: 6716 beqs 498c0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 498aa: 4879 0005 b40c pea 5b40c 498b0: 2f0a movel %a2,%sp@- 498b2: 4e93 jsr %a3@ 498b4: 508f addql #8,%sp 498b6: 4a80 tstl %d0 498b8: 670a beqs 498c4 498ba: 600a bras 498c6 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 498bc: 7604 moveq #4,%d3 498be: 6006 bras 498c6 * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 498c0: 7602 moveq #2,%d3 498c2: 6002 bras 498c6 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 498c4: 7601 moveq #1,%d3 } return type; } 498c6: 2003 movel %d3,%d0 498c8: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 498ce: 4e5e unlk %fp ... =============================================================================== 000420fc : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 420fc: 307c 0006 moveaw #6,%a0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 42100: 7210 moveq #16,%d1 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 42102: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 42106: 2039 0005 bfee movel 5bfee ,%d0 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 4210c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42110: 246e 0008 moveal %fp@(8),%a2 42114: 242e 0014 movel %fp@(20),%d2 /* * 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) { 42118: b081 cmpl %d1,%d0 4211a: 6710 beqs 4212c is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 4211c: 6d08 blts 42126 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4211e: 5388 subql #1,%a0 42120: d281 addl %d1,%d1 42122: 4a88 tstl %a0 42124: 66f2 bnes 42118 <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 42126: 203c 0000 0080 movel #128,%d0 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 4212c: 23c0 0005 ced8 movel %d0,5ced8 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 42132: 4eb9 0004 8f8c jsr 48f8c temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 42138: 256e 000c 0028 movel %fp@(12),%a2@(40) /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 4213e: 2640 moveal %d0,%a3 42140: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 42144: 2542 0024 movel %d2,%a2@(36) temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42148: 4878 0030 pea 30 4214c: 4879 0005 b3d6 pea 5b3d6 42152: 486a 0038 pea %a2@(56) 42156: 4eb9 0004 c854 jsr 4c854 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4215c: 4878 0014 pea 14 42160: 4878 0001 pea 1 42164: 4eb9 0004 27cc jsr 427cc if ( !fs_info ) { 4216a: 4fef 0014 lea %sp@(20),%sp temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4216e: 2040 moveal %d0,%a0 if ( !fs_info ) { 42170: 4a80 tstl %d0 42172: 661a bnes 4218e free(temp_mt_entry->mt_fs_root.node_access); 42174: 2f0b movel %a3,%sp@- 42176: 4eb9 0004 2b68 jsr 42b68 rtems_set_errno_and_return_minus_one(ENOMEM); 4217c: 4eb9 0004 c034 jsr 4c034 <__errno> 42182: 588f addql #4,%sp 42184: 2040 moveal %d0,%a0 42186: 700c moveq #12,%d0 42188: 2080 movel %d0,%a0@ 4218a: 70ff moveq #-1,%d0 4218c: 6030 bras 421be } temp_mt_entry->fs_info = fs_info; 4218e: 2540 0034 movel %d0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 42192: 2039 0005 cedc movel 5cedc ,%d0 42198: 2080 movel %d0,%a0@ 4219a: 5280 addql #1,%d0 4219c: 23c0 0005 cedc movel %d0,5cedc fs_info->ino_count = 1; 421a2: 7001 moveq #1,%d0 fs_info->memfile_handlers = memfile_handlers; 421a4: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 421aa: 216e 0018 0010 movel %fp@(24),%a0@(16) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 421b0: 2140 0004 movel %d0,%a0@(4) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 421b4: 2142 000c movel %d2,%a0@(12) fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 421b8: 2740 0034 movel %d0,%a3@(52) return 0; 421bc: 4200 clrb %d0 } 421be: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 421c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ad94 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4ad94: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4ad98: 2039 0005 ced8 movel 5ced8 ,%d0 4ad9e: e488 lsrl #2,%d0 4ada0: 2200 movel %d0,%d1 4ada2: 5381 subql #1,%d1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4ada4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4ada8: 246e 0008 moveal %fp@(8),%a2 4adac: 242e 000c movel %fp@(12),%d2 4adb0: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4adb4: b282 cmpl %d2,%d1 4adb6: 6536 bcss 4adee p = info->indirect; 4adb8: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4adbc: 4a88 tstl %a0 4adbe: 6720 beqs 4ade0 if ( !p ) { 4adc0: 4a89 tstl %a1 4adc2: 6610 bnes 4add4 p = memfile_alloc_block(); 4adc4: 4eb9 0004 ad70 jsr 4ad70 if ( !p ) 4adca: 4a80 tstl %d0 4adcc: 6700 00f8 beqw 4aec6 return 0; info->indirect = p; 4add0: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4add4: 206a 0054 moveal %a2@(84),%a0 4add8: e58a lsll #2,%d2 4adda: d1c2 addal %d2,%a0 4addc: 6000 00ea braw 4aec8 } if ( !p ) 4ade0: 4a89 tstl %a1 4ade2: 6700 00e2 beqw 4aec6 return 0; return &info->indirect[ my_block ]; 4ade6: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4adea: 6000 00dc braw 4aec8 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4adee: 2200 movel %d0,%d1 4adf0: 5281 addql #1,%d1 4adf2: 4c00 1800 mulsl %d0,%d1 4adf6: 2241 moveal %d1,%a1 4adf8: 5389 subql #1,%a1 4adfa: b3c2 cmpal %d2,%a1 4adfc: 653e bcss 4ae3c my_block -= FIRST_DOUBLY_INDIRECT; 4adfe: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4ae00: 4c40 2003 remul %d0,%d3,%d2 4ae04: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4ae08: 202a 0058 movel %a2@(88),%d0 if ( malloc_it ) { 4ae0c: 4a88 tstl %a0 4ae0e: 671c beqs 4ae2c if ( !p ) { 4ae10: 4a80 tstl %d0 4ae12: 6610 bnes 4ae24 p = memfile_alloc_block(); 4ae14: 4eb9 0004 ad70 jsr 4ad70 if ( !p ) 4ae1a: 4a80 tstl %d0 4ae1c: 6700 00a8 beqw 4aec6 return 0; info->doubly_indirect = p; 4ae20: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4ae24: 2040 moveal %d0,%a0 4ae26: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4ae2a: 6066 bras 4ae92 } return (block_p *)&p1[ singly ]; } if ( !p ) 4ae2c: 4a80 tstl %d0 4ae2e: 6700 0096 beqw 4aec6 return 0; p = (block_p *)p[ doubly ]; 4ae32: 2240 moveal %d0,%a1 4ae34: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 4ae38: 6000 0082 braw 4aebc } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4ae3c: 2601 movel %d1,%d3 4ae3e: 5283 addql #1,%d3 4ae40: 4c00 3800 mulsl %d0,%d3 4ae44: 5383 subql #1,%d3 4ae46: b682 cmpl %d2,%d3 4ae48: 657c bcss 4aec6 <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4ae4a: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4ae4c: 4c40 2003 remul %d0,%d3,%d2 4ae50: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4ae54: 4c40 2004 remul %d0,%d4,%d2 4ae58: 4c40 2002 remul %d0,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4ae5c: 202a 005c movel %a2@(92),%d0 if ( malloc_it ) { 4ae60: 4a88 tstl %a0 4ae62: 6746 beqs 4aeaa if ( !p ) { 4ae64: 4a80 tstl %d0 4ae66: 660e bnes 4ae76 p = memfile_alloc_block(); 4ae68: 4eb9 0004 ad70 jsr 4ad70 if ( !p ) 4ae6e: 4a80 tstl %d0 4ae70: 6754 beqs 4aec6 <== NEVER TAKEN return 0; info->triply_indirect = p; 4ae72: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4ae76: 2040 moveal %d0,%a0 4ae78: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4ae7c: 2012 movel %a2@,%d0 if ( !p1 ) { 4ae7e: 660c bnes 4ae8c p1 = memfile_alloc_block(); 4ae80: 4eb9 0004 ad70 jsr 4ad70 if ( !p1 ) 4ae86: 4a80 tstl %d0 4ae88: 673c beqs 4aec6 <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 4ae8a: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4ae8c: 2240 moveal %d0,%a1 4ae8e: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2 4ae92: 2012 movel %a2@,%d0 if ( !p2 ) { 4ae94: 660c bnes 4aea2 p2 = memfile_alloc_block(); 4ae96: 4eb9 0004 ad70 jsr 4ad70 if ( !p2 ) 4ae9c: 4a80 tstl %d0 4ae9e: 6726 beqs 4aec6 <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4aea0: 2480 movel %d0,%a2@ } return (block_p *)&p2[ singly ]; 4aea2: 2240 moveal %d0,%a1 4aea4: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 4aea8: 601e bras 4aec8 } if ( !p ) 4aeaa: 4a80 tstl %d0 4aeac: 6718 beqs 4aec6 <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4aeae: 2240 moveal %d0,%a1 4aeb0: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4aeb4: 4a88 tstl %a0 4aeb6: 670e beqs 4aec6 <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4aeb8: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 if ( !p2 ) 4aebc: 4a88 tstl %a0 4aebe: 6706 beqs 4aec6 <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4aec0: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4aec4: 6002 bras 4aec8 } return &info->indirect[ my_block ]; } if ( !p ) return 0; 4aec6: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4aec8: 2008 movel %a0,%d0 4aeca: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4aed0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004aed4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4aed4: 4e56 ffc8 linkw %fp,#-56 4aed8: 206e 0018 moveal %fp@(24),%a0 4aedc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4aee0: 246e 0008 moveal %fp@(8),%a2 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 4aee4: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4aee6: 2a2e 0014 movel %fp@(20),%d5 4aeea: 286e 000c moveal %fp@(12),%a4 4aeee: 2a6e 0010 moveal %fp@(16),%a5 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 4aef2: b4aa 0048 cmpl %a2@(72),%d2 4aef6: 665c bnes 4af54 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4aef8: 97cb subal %a3,%a3 4aefa: 242a 004c movel %a2@(76),%d2 4aefe: 262a 0050 movel %a2@(80),%d3 4af02: 2d48 fff4 movel %a0,%fp@(-12) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4af06: 226a 0054 moveal %a2@(84),%a1 if (my_length > (the_jnode->info.linearfile.size - start)) 4af0a: 2002 movel %d2,%d0 4af0c: 2203 movel %d3,%d1 4af0e: 2d4b fff0 movel %a3,%fp@(-16) 4af12: 280c movel %a4,%d4 4af14: 928d subl %a5,%d1 4af16: 9184 subxl %d4,%d0 4af18: 2c2e fff0 movel %fp@(-16),%d6 4af1c: 2e2e fff4 movel %fp@(-12),%d7 4af20: 9e81 subl %d1,%d7 4af22: 9d80 subxl %d0,%d6 4af24: 6f04 bles 4af2a <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4af26: 968d subl %a5,%d3 4af28: 6002 bras 4af2c /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4af2a: 2608 movel %a0,%d3 <== 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); 4af2c: 2f03 movel %d3,%sp@- 4af2e: 4871 d800 pea %a1@(00000000,%a5:l) 4af32: 2f05 movel %d5,%sp@- 4af34: 4eb9 0004 c854 jsr 4c854 IMFS_update_atime( the_jnode ); 4af3a: 42a7 clrl %sp@- 4af3c: 486e fff8 pea %fp@(-8) 4af40: 4eb9 0004 2bf0 jsr 42bf0 4af46: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4af4c: 4fef 0014 lea %sp@(20),%sp 4af50: 6000 0122 braw 4b074 /* * 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; 4af54: 2808 movel %a0,%d4 4af56: d88d addl %a5,%d4 if ( last_byte > the_jnode->info.file.size ) 4af58: 2204 movel %d4,%d1 4af5a: 4280 clrl %d0 4af5c: 242a 004c movel %a2@(76),%d2 4af60: 262a 0050 movel %a2@(80),%d3 4af64: 2c00 movel %d0,%d6 4af66: 2e01 movel %d1,%d7 4af68: 9e83 subl %d3,%d7 4af6a: 9d82 subxl %d2,%d6 4af6c: 6f06 bles 4af74 my_length = the_jnode->info.file.size - start; 4af6e: 2403 movel %d3,%d2 4af70: 948d subl %a5,%d2 4af72: 6002 bras 4af76 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4af74: 2408 movel %a0,%d2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4af76: 2639 0005 ced8 movel 5ced8 ,%d3 4af7c: 2e03 movel %d3,%d7 4af7e: 5bc6 smi %d6 4af80: 49c6 extbl %d6 4af82: 2f07 movel %d7,%sp@- 4af84: 2f06 movel %d6,%sp@- 4af86: 2f0d movel %a5,%sp@- 4af88: 2f0c movel %a4,%sp@- 4af8a: 4eb9 0005 8a10 jsr 58a10 <__moddi3> 4af90: 4fef 0010 lea %sp@(16),%sp 4af94: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4af96: 2f07 movel %d7,%sp@- 4af98: 2f06 movel %d6,%sp@- 4af9a: 2f0d movel %a5,%sp@- 4af9c: 2f0c movel %a4,%sp@- 4af9e: 4eb9 0005 85c8 jsr 585c8 <__divdi3> 4afa4: 4fef 0010 lea %sp@(16),%sp 4afa8: 2c01 movel %d1,%d6 if ( start_offset ) { 4afaa: 4a84 tstl %d4 4afac: 673e beqs 4afec 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 ); 4afae: 42a7 clrl %sp@- 4afb0: 2f01 movel %d1,%sp@- 4afb2: 2f0a movel %a2,%sp@- 4afb4: 4eb9 0004 ad94 jsr 4ad94 if ( !block_ptr ) 4afba: 4fef 000c lea %sp@(12),%sp 4afbe: 4a80 tstl %d0 4afc0: 6700 00b0 beqw 4b072 * 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; 4afc4: 2203 movel %d3,%d1 4afc6: 9284 subl %d4,%d1 4afc8: 2602 movel %d2,%d3 4afca: b282 cmpl %d2,%d1 4afcc: 6402 bccs 4afd0 4afce: 2601 movel %d1,%d3 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4afd0: 2f03 movel %d3,%sp@- 4afd2: 2040 moveal %d0,%a0 4afd4: d890 addl %a0@,%d4 dest += to_copy; block++; 4afd6: 5286 addql #1,%d6 my_length -= to_copy; 4afd8: 9483 subl %d3,%d2 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 ); 4afda: 2f04 movel %d4,%sp@- 4afdc: 2f05 movel %d5,%sp@- dest += to_copy; 4afde: da83 addl %d3,%d5 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 ); 4afe0: 4eb9 0004 c854 jsr 4c854 dest += to_copy; block++; my_length -= to_copy; 4afe6: 4fef 000c lea %sp@(12),%sp 4afea: 6002 bras 4afee */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4afec: 4283 clrl %d3 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4afee: 2839 0005 ced8 movel 5ced8 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4aff4: 47f9 0004 ad94 lea 4ad94 ,%a3 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4affa: 49f9 0004 c854 lea 4c854 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b000: 6026 bras 4b028 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b002: 42a7 clrl %sp@- 4b004: 2f06 movel %d6,%sp@- 4b006: 2f0a movel %a2,%sp@- 4b008: 4e93 jsr %a3@ if ( !block_ptr ) 4b00a: 4fef 000c lea %sp@(12),%sp 4b00e: 4a80 tstl %d0 4b010: 6762 beqs 4b074 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b012: 2040 moveal %d0,%a0 dest += to_copy; block++; 4b014: 5286 addql #1,%d6 my_length -= to_copy; 4b016: 9484 subl %d4,%d2 copied += to_copy; 4b018: d684 addl %d4,%d3 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b01a: 2f04 movel %d4,%sp@- 4b01c: 2f10 movel %a0@,%sp@- 4b01e: 2f05 movel %d5,%sp@- dest += to_copy; 4b020: da84 addl %d4,%d5 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 ); 4b022: 4e94 jsr %a4@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b024: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b028: b4b9 0005 ced8 cmpl 5ced8 ,%d2 4b02e: 64d2 bccs 4b002 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4b030: 4a82 tstl %d2 4b032: 6728 beqs 4b05c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b034: 42a7 clrl %sp@- 4b036: 2f06 movel %d6,%sp@- 4b038: 2f0a movel %a2,%sp@- 4b03a: 4eb9 0004 ad94 jsr 4ad94 if ( !block_ptr ) 4b040: 4fef 000c lea %sp@(12),%sp 4b044: 4a80 tstl %d0 4b046: 672c beqs 4b074 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4b048: 2640 moveal %d0,%a3 copied += my_length; 4b04a: d682 addl %d2,%d3 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 ); 4b04c: 2f02 movel %d2,%sp@- 4b04e: 2f13 movel %a3@,%sp@- 4b050: 2f05 movel %d5,%sp@- 4b052: 4eb9 0004 c854 jsr 4c854 copied += my_length; 4b058: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4b05c: 42a7 clrl %sp@- 4b05e: 486e fff8 pea %fp@(-8) 4b062: 4eb9 0004 2bf0 jsr 42bf0 4b068: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4b06e: 508f addql #8,%sp 4b070: 6002 bras 4b074 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; 4b072: 4283 clrl %d3 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4b074: 2003 movel %d3,%d0 4b076: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4b07c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b142 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4b142: 4e56 ffe4 linkw %fp,#-28 4b146: 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; 4b14a: 2439 0005 ced8 movel 5ced8 ,%d2 4b150: e48a lsrl #2,%d2 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4b152: 246e 0008 moveal %fp@(8),%a2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4b156: 4aaa 0054 tstl %a2@(84) 4b15a: 670e beqs 4b16a memfile_free_blocks_in_table( &info->indirect, to_free ); 4b15c: 2f02 movel %d2,%sp@- 4b15e: 486a 0054 pea %a2@(84) 4b162: 4eb9 0004 b0fc jsr 4b0fc 4b168: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4b16a: 4aaa 0058 tstl %a2@(88) 4b16e: 661c bnes 4b18c 4b170: 603c bras 4b1ae * 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. */ int IMFS_memfile_remove( 4b172: 2003 movel %d3,%d0 4b174: e588 lsll #2,%d0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4b176: 206a 0058 moveal %a2@(88),%a0 4b17a: d1c0 addal %d0,%a0 4b17c: 4a90 tstl %a0@ 4b17e: 6708 beqs 4b188 <== NEVER TAKEN memfile_free_blocks_in_table( 4b180: 2f02 movel %d2,%sp@- 4b182: 2f08 movel %a0,%sp@- 4b184: 4e93 jsr %a3@ 4b186: 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 ) { 4b18c: 4283 clrl %d3 for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4b18e: 47f9 0004 b0fc lea 4b0fc ,%a3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 4b19a: e488 lsrl #2,%d0 4b19c: b083 cmpl %d3,%d0 4b19e: 62d2 bhis 4b172 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 ); 4b1a0: 2f02 movel %d2,%sp@- 4b1a2: 486a 0058 pea %a2@(88) 4b1a6: 4eb9 0004 b0fc jsr 4b0fc 4b1ac: 508f addql #8,%sp } if ( info->triply_indirect ) { 4b1ae: 4aaa 005c tstl %a2@(92) 4b1b2: 6642 bnes 4b1f6 4b1b4: 6062 bras 4b218 * 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. */ int IMFS_memfile_remove( 4b1b6: 2c03 movel %d3,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b1b8: 206a 005c moveal %a2@(92),%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. */ int IMFS_memfile_remove( 4b1bc: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4b1be: 2a30 6800 movel %a0@(00000000,%d6:l),%d5 if ( !p ) /* ensure we have a valid pointer */ 4b1c2: 6746 beqs 4b20a <== NEVER TAKEN 4b1c4: 4284 clrl %d4 4b1c6: 6012 bras 4b1da break; for ( j=0 ; j <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4b1d0: 2f02 movel %d2,%sp@- 4b1d2: 2f08 movel %a0,%sp@- 4b1d4: 4e93 jsr %a3@ 4b1d6: 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 4b1e0: e488 lsrl #2,%d0 4b1e2: b084 cmpl %d4,%d0 4b1e4: 62e2 bhis 4b1c8 if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4b1e6: 2f02 movel %d2,%sp@- 4b1e8: dcaa 005c addl %a2@(92),%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 } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 4b1f6: 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 ) { for ( i=0 ; i,%d0 4b204: e488 lsrl #2,%d0 4b206: b083 cmpl %d3,%d0 4b208: 62ac bhis 4b1b6 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4b20a: 2f02 movel %d2,%sp@- 4b20c: 486a 005c pea %a2@(92) 4b210: 4eb9 0004 b0fc jsr 4b0fc 4b216: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return 0; } 4b218: 4280 clrl %d0 4b21a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4b220: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b35c : * 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 ) { 4b35c: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4b35e: 4e56 ffd0 linkw %fp,#-48 4b362: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b366: 286e 000c moveal %fp@(12),%a4 4b36a: 2a6e 0010 moveal %fp@(16),%a5 4b36e: 246e 0008 moveal %fp@(8),%a2 4b372: 242e 0018 movel %fp@(24),%d2 /* * 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; 4b376: 41f5 2800 lea %a5@(00000000,%d2:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4b37a: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4b37c: 262e 0014 movel %fp@(20),%d3 * 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 ) { 4b380: 282a 004c movel %a2@(76),%d4 4b384: 2a2a 0050 movel %a2@(80),%d5 4b388: 9a81 subl %d1,%d5 4b38a: 9980 subxl %d0,%d4 4b38c: 6c26 bges 4b3b4 status = IMFS_memfile_extend( the_jnode, last_byte ); 4b38e: 2f08 movel %a0,%sp@- 4b390: 2f00 movel %d0,%sp@- 4b392: 2f0a movel %a2,%sp@- 4b394: 4eb9 0004 b24c jsr 4b24c if ( status ) 4b39a: 4fef 000c lea %sp@(12),%sp 4b39e: 4a80 tstl %d0 4b3a0: 6712 beqs 4b3b4 rtems_set_errno_and_return_minus_one( ENOSPC ); 4b3a2: 4eb9 0004 c034 jsr 4c034 <__errno> 4b3a8: 741c moveq #28,%d2 4b3aa: 7aff moveq #-1,%d5 4b3ac: 2040 moveal %d0,%a0 4b3ae: 2082 movel %d2,%a0@ 4b3b0: 6000 0102 braw 4b4b4 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4b3b4: 2a39 0005 ced8 movel 5ced8 ,%d5 4b3ba: 2e05 movel %d5,%d7 4b3bc: 5bc6 smi %d6 4b3be: 49c6 extbl %d6 4b3c0: 2f07 movel %d7,%sp@- 4b3c2: 2f06 movel %d6,%sp@- 4b3c4: 2f0d movel %a5,%sp@- 4b3c6: 2f0c movel %a4,%sp@- 4b3c8: 4eb9 0005 8a10 jsr 58a10 <__moddi3> 4b3ce: 4fef 0010 lea %sp@(16),%sp 4b3d2: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b3d4: 2f07 movel %d7,%sp@- 4b3d6: 2f06 movel %d6,%sp@- 4b3d8: 2f0d movel %a5,%sp@- 4b3da: 2f0c movel %a4,%sp@- 4b3dc: 4eb9 0005 85c8 jsr 585c8 <__divdi3> 4b3e2: 4fef 0010 lea %sp@(16),%sp 4b3e6: 2c01 movel %d1,%d6 if ( start_offset ) { 4b3e8: 4a84 tstl %d4 4b3ea: 673a beqs 4b426 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 ); 4b3ec: 42a7 clrl %sp@- 4b3ee: 2f01 movel %d1,%sp@- 4b3f0: 2f0a movel %a2,%sp@- 4b3f2: 4eb9 0004 ad94 jsr 4ad94 if ( !block_ptr ) 4b3f8: 4fef 000c lea %sp@(12),%sp 4b3fc: 4a80 tstl %d0 4b3fe: 6700 00b2 beqw 4b4b2 * 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; 4b402: 9a84 subl %d4,%d5 4b404: b485 cmpl %d5,%d2 4b406: 6402 bccs 4b40a 4b408: 2a02 movel %d2,%d5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b40a: 2f05 movel %d5,%sp@- 4b40c: 2040 moveal %d0,%a0 src += to_copy; block++; 4b40e: 5286 addql #1,%d6 my_length -= to_copy; 4b410: 9485 subl %d5,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b412: 2f03 movel %d3,%sp@- 4b414: d890 addl %a0@,%d4 src += to_copy; 4b416: d685 addl %d5,%d3 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4b418: 2f04 movel %d4,%sp@- 4b41a: 4eb9 0004 c854 jsr 4c854 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b420: 4fef 000c lea %sp@(12),%sp 4b424: 6002 bras 4b428 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4b426: 4285 clrl %d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b428: 2839 0005 ced8 movel 5ced8 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b42e: 47f9 0004 ad94 lea 4ad94 ,%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 ); 4b434: 49f9 0004 c854 lea 4c854 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b43a: 6026 bras 4b462 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b43c: 42a7 clrl %sp@- 4b43e: 2f06 movel %d6,%sp@- 4b440: 2f0a movel %a2,%sp@- 4b442: 4e93 jsr %a3@ if ( !block_ptr ) 4b444: 4fef 000c lea %sp@(12),%sp 4b448: 4a80 tstl %d0 4b44a: 6768 beqs 4b4b4 <== 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 ); 4b44c: 2f04 movel %d4,%sp@- 4b44e: 2040 moveal %d0,%a0 src += to_copy; block++; 4b450: 5286 addql #1,%d6 my_length -= to_copy; 4b452: 9484 subl %d4,%d2 * 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( 4b454: da84 addl %d4,%d5 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 ); 4b456: 2f03 movel %d3,%sp@- 4b458: 2f10 movel %a0@,%sp@- src += to_copy; 4b45a: d684 addl %d4,%d3 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 4b45c: 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( 4b45e: 4fef 000c lea %sp@(12),%sp /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b462: b4b9 0005 ced8 cmpl 5ced8 ,%d2 4b468: 64d2 bccs 4b43c * 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 ) { 4b46a: 4a82 tstl %d2 4b46c: 6728 beqs 4b496 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b46e: 42a7 clrl %sp@- 4b470: 2f06 movel %d6,%sp@- 4b472: 2f0a movel %a2,%sp@- 4b474: 4eb9 0004 ad94 jsr 4ad94 if ( !block_ptr ) 4b47a: 4fef 000c lea %sp@(12),%sp 4b47e: 4a80 tstl %d0 4b480: 6732 beqs 4b4b4 <== 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 ); 4b482: 2f02 movel %d2,%sp@- 4b484: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4b486: da82 addl %d2,%d5 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 ); 4b488: 2f03 movel %d3,%sp@- 4b48a: 2f10 movel %a0@,%sp@- 4b48c: 4eb9 0004 c854 jsr 4c854 my_length = 0; copied += to_copy; 4b492: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4b496: 42a7 clrl %sp@- 4b498: 486e fff8 pea %fp@(-8) 4b49c: 4eb9 0004 2bf0 jsr 42bf0 4b4a2: 202e fff8 movel %fp@(-8),%d0 return copied; 4b4a6: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4b4a8: 2540 0040 movel %d0,%a2@(64) 4b4ac: 2540 0044 movel %d0,%a2@(68) return copied; 4b4b0: 6002 bras 4b4b4 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; 4b4b2: 4285 clrl %d5 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4b4b4: 2005 movel %d5,%d0 4b4b6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4b4bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042280 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 42280: 4e56 ffac linkw %fp,#-84 42284: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42288: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 4228c: 2f0a movel %a2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4228e: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 42292: 4eb9 0004 d3a0 jsr 4d3a0 42298: 588f addql #4,%sp 4229a: 486e fffc pea %fp@(-4) 4229e: 486e ffbf pea %fp@(-65) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 422a2: 262e 0010 movel %fp@(16),%d3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 422a6: 2f00 movel %d0,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 422a8: 266e 0014 moveal %fp@(20),%a3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 422ac: 2f0a movel %a2,%sp@- 422ae: 4eb9 0004 981c jsr 4981c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 422b4: 4fef 0010 lea %sp@(16),%sp 422b8: 2002 movel %d2,%d0 422ba: 0280 0000 f000 andil #61440,%d0 422c0: 0c80 0000 4000 cmpil #16384,%d0 422c6: 6730 beqs 422f8 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 422c8: 0c80 0000 8000 cmpil #32768,%d0 422ce: 672c beqs 422fc type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 422d0: 0c80 0000 6000 cmpil #24576,%d0 422d6: 6708 beqs 422e0 422d8: 0c80 0000 2000 cmpil #8192,%d0 422de: 660c bnes 422ec type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 422e0: 2d43 ffe0 movel %d3,%fp@(-32) if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; 422e4: 7002 moveq #2,%d0 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 422e6: 2d4b ffe4 movel %a3,%fp@(-28) 422ea: 6016 bras 42302 } else if (S_ISFIFO(mode)) 422ec: 0c80 0000 1000 cmpil #4096,%d0 422f2: 670c beqs 42300 <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 422f4: 4280 clrl %d0 <== NOT EXECUTED 422f6: 600a bras 42302 <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 422f8: 7001 moveq #1,%d0 422fa: 6006 bras 42302 else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 422fc: 7005 moveq #5,%d0 422fe: 6002 bras 42302 else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; 42300: 7007 moveq #7,%d0 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); 42302: 486e ffe0 pea %fp@(-32) 42306: 2f02 movel %d2,%sp@- 42308: 486e ffbf pea %fp@(-65) 4230c: 2f00 movel %d0,%sp@- 4230e: 2f2e 0018 movel %fp@(24),%sp@- 42312: 4eb9 0004 8e78 jsr 48e78 if ( !new_node ) 42318: 4fef 0014 lea %sp@(20),%sp * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); 4231c: 2440 moveal %d0,%a2 if ( !new_node ) 4231e: 4a80 tstl %d0 42320: 6610 bnes 42332 rtems_set_errno_and_return_minus_one( ENOMEM ); 42322: 4eb9 0004 c034 jsr 4c034 <__errno> 42328: 2040 moveal %d0,%a0 4232a: 700c moveq #12,%d0 4232c: 2080 movel %d0,%a0@ 4232e: 70ff moveq #-1,%d0 42330: 6034 bras 42366 IMFS_update_ctime(new_node->Parent); 42332: 42a7 clrl %sp@- 42334: 240e movel %fp,%d2 42336: 0682 ffff fff4 addil #-12,%d2 4233c: 47f9 0004 2bf0 lea 42bf0 ,%a3 42342: 2f02 movel %d2,%sp@- 42344: 4e93 jsr %a3@ 42346: 206a 0008 moveal %a2@(8),%a0 4234a: 216e fff4 0044 movel %fp@(-12),%a0@(68) IMFS_update_mtime(new_node->Parent); 42350: 42a7 clrl %sp@- 42352: 2f02 movel %d2,%sp@- 42354: 4e93 jsr %a3@ 42356: 206a 0008 moveal %a2@(8),%a0 return 0; 4235a: 4fef 0010 lea %sp@(16),%sp 4235e: 4280 clrl %d0 new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); 42360: 216e fff4 0040 movel %fp@(-12),%a0@(64) return 0; } 42366: 4cee 0c0c ffac moveml %fp@(-84),%d2-%d3/%a2-%a3 4236c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042370 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42370: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42372: 4e56 0000 linkw %fp,#0 42376: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4237a: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 4237e: b0a8 0048 cmpl %a0@(72),%d0 42382: 6710 beqs 42394 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 42384: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 4238a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4238c: 7014 moveq #20,%d0 <== NOT EXECUTED 4238e: 2080 movel %d0,%a0@ <== NOT EXECUTED 42390: 70ff moveq #-1,%d0 <== NOT EXECUTED 42392: 6006 bras 4239a <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42394: 2149 0058 movel %a1,%a0@(88) return 0; 42398: 4280 clrl %d0 } 4239a: 4e5e unlk %fp ... =============================================================================== 00044998 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 44998: 4e56 0000 linkw %fp,#0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4499c: 2079 0006 1c64 moveal 61c64 <_impure_ptr>,%a0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 449a2: 2f0a movel %a2,%sp@- 449a4: 246e 0008 moveal %fp@(8),%a2 449a8: 2f02 movel %d2,%sp@- IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 449aa: 2f28 0008 movel %a0@(8),%sp@- switch( the_jnode->type ) { 449ae: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 449b0: 486a 000c pea %a2@(12) 449b4: 4eb9 0005 029c jsr 5029c switch( the_jnode->type ) { 449ba: 202a 0048 movel %a2@(72),%d0 449be: 2200 movel %d0,%d1 449c0: 508f addql #8,%sp 449c2: 5381 subql #1,%d1 449c4: 2079 0006 1c64 moveal 61c64 <_impure_ptr>,%a0 449ca: b481 cmpl %d1,%d2 449cc: 6500 0096 bcsw 44a64 449d0: 303b 1a08 movew %pc@(449da ,%d1:l:2),%d0 449d4: 48c0 extl %d0 449d6: 4efb 0802 jmp %pc@(449da ,%d0:l) 449da: 000e .short 0x000e <== NOT EXECUTED 449dc: 0022 .short 0x0022 <== NOT EXECUTED 449de: 006a .short 0x006a <== NOT EXECUTED 449e0: 006a .short 0x006a <== NOT EXECUTED 449e2: 0050 .short 0x0050 <== NOT EXECUTED 449e4: 0032 .short 0x0032 <== NOT EXECUTED 449e6: 0076 .short 0x0076 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 449e8: 2f28 0008 movel %a0@(8),%sp@- 449ec: 4878 002f pea 2f 449f0: 4eb9 0005 01cc jsr 501cc break; 449f6: 508f addql #8,%sp 449f8: 6000 0082 braw 44a7c case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 449fc: 2f2a 0050 movel %a2@(80),%sp@- 44a00: 2f2a 004c movel %a2@(76),%sp@- 44a04: 4879 0006 04c5 pea 604c5 44a0a: 600e bras 44a1a the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 44a0c: 2f2a 0054 movel %a2@(84),%sp@- 44a10: 2f2a 0050 movel %a2@(80),%sp@- 44a14: 4879 0006 04d8 pea 604d8 44a1a: 2f28 0008 movel %a0@(8),%sp@- 44a1e: 4eb9 0005 014e jsr 5014e (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 44a24: 4fef 0010 lea %sp@(16),%sp 44a28: 6052 bras 44a7c the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 44a2a: 2f2a 0050 movel %a2@(80),%sp@- 44a2e: 4879 0006 04e7 pea 604e7 44a34: 2f28 0008 movel %a0@(8),%sp@- 44a38: 4eb9 0005 014e jsr 5014e (uint32_t)the_jnode->info.file.size ); #endif break; 44a3e: 4fef 000c lea %sp@(12),%sp 44a42: 6038 bras 44a7c case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 44a44: 2f28 0008 movel %a0@(8),%sp@- 44a48: 4879 0006 04f3 pea 604f3 44a4e: 600a bras 44a5a return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44a50: 2f28 0008 movel %a0@(8),%sp@- 44a54: 4879 0006 0507 pea 60507 44a5a: 4eb9 0005 029c jsr 5029c return; 44a60: 508f addql #8,%sp 44a62: 6032 bras 44a96 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 44a64: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44a66: 4879 0006 051a pea 6051a <== NOT EXECUTED 44a6c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44a70: 4eb9 0005 014e jsr 5014e <== NOT EXECUTED return; 44a76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44a7a: 601a bras 44a96 <== NOT EXECUTED } puts(""); } 44a7c: 242e fff8 movel %fp@(-8),%d2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44a80: 203c 0006 0bce movel #396238,%d0 } 44a86: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44a8a: 2d40 0008 movel %d0,%fp@(8) } 44a8e: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44a90: 4ef9 0005 1a1e jmp 51a1e } 44a96: 242e fff8 movel %fp@(-8),%d2 44a9a: 246e fffc moveal %fp@(-4),%a2 44a9e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000423e8 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 423e8: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 423ec: 206e 000c moveal %fp@(12),%a0 rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 423f0: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 423f2: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 423f4: 4878 0020 pea 20 423f8: 2f2e 0014 movel %fp@(20),%sp@- 423fc: 486a 000c pea %a2@(12) 42400: 4eb9 0004 d3bc jsr 4d3bc if ( the_jnode->Parent != NULL ) 42406: 4fef 000c lea %sp@(12),%sp 4240a: 4aaa 0008 tstl %a2@(8) 4240e: 670a beqs 4241a <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42410: 2f0a movel %a2,%sp@- 42412: 4eb9 0004 6394 jsr 46394 <_Chain_Extract> 42418: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 4241a: 206e 0010 moveal %fp@(16),%a0 4241e: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 42420: 2548 0008 movel %a0,%a2@(8) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 42424: 2f0a movel %a2,%sp@- 42426: 4868 004c pea %a0@(76) 4242a: 4eb9 0004 635c jsr 4635c <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42430: 42a7 clrl %sp@- 42432: 486e fff8 pea %fp@(-8) 42436: 4eb9 0004 2bf0 jsr 42bf0 4243c: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 42442: 4280 clrl %d0 42444: 246e fff4 moveal %fp@(-12),%a2 42448: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048fc8 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 48fc8: 4e56 fff0 linkw %fp,#-16 48fcc: 48d7 3c00 moveml %a2-%a5,%sp@ 48fd0: 286e 0008 moveal %fp@(8),%a4 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 48fd4: 4bf9 0004 38a4 lea 438a4 ,%a5 static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 48fda: 266e 000c moveal %fp@(12),%a3 48fde: 246e 0010 moveal %fp@(16),%a2 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 48fe2: 6008 bras 48fec ++(*index); 48fe4: 5281 addql #1,%d1 --(*len); 48fe6: 5380 subql #1,%d0 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 48fe8: 2481 movel %d1,%a2@ --(*len); 48fea: 2680 movel %d0,%a3@ const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 48fec: 2012 movel %a2@,%d0 48fee: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 48ff2: 49c0 extbl %d0 48ff4: 2f00 movel %d0,%sp@- 48ff6: 4e95 jsr %a5@ 48ff8: 588f addql #4,%sp 48ffa: 4a80 tstl %d0 48ffc: 670c beqs 4900a 48ffe: 2212 movel %a2@,%d1 49000: 4a34 1800 tstb %a4@(00000000,%d1:l) 49004: 6704 beqs 4900a 49006: 2013 movel %a3@,%d0 49008: 66da bnes 48fe4 <== ALWAYS TAKEN ++(*index); --(*len); } } 4900a: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 49010: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000499ac : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 499ac: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 499ae: 4e56 0000 linkw %fp,#0 499b2: 206e 000c moveal %fp@(12),%a0 499b6: 2f0a movel %a2,%sp@- 499b8: 246e 0008 moveal %fp@(8),%a2 IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 499bc: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 499be: 2029 0048 movel %a1@(72),%d0 499c2: 5580 subql #2,%d0 499c4: b280 cmpl %d0,%d1 499c6: 653e bcss 49a06 <== NEVER TAKEN 499c8: 303b 0a08 movew %pc@(499d2 ,%d0:l:2),%d0 499cc: 48c0 extl %d0 499ce: 4efb 0802 jmp %pc@(499d2 ,%d0:l) 499d2: 000c .short 0x000c <== NOT EXECUTED 499d4: 0034 .short 0x0034 <== NOT EXECUTED 499d6: 0026 .short 0x0026 <== NOT EXECUTED 499d8: 001c .short 0x001c <== NOT EXECUTED 499da: 001c .short 0x001c <== NOT EXECUTED 499dc: 0026 .short 0x0026 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 499de: 2029 0050 movel %a1@(80),%d0 499e2: 2169 004c 0016 movel %a1@(76),%a0@(22) 499e8: 2140 001a movel %d0,%a0@(26) break; 499ec: 602a bras 49a18 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 499ee: 2029 004c movel %a1@(76),%d0 499f2: 2229 0050 movel %a1@(80),%d1 499f6: 6004 bras 499fc case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 499f8: 4280 clrl %d0 499fa: 4281 clrl %d1 499fc: 2140 001e movel %d0,%a0@(30) 49a00: 2141 0022 movel %d1,%a0@(34) break; 49a04: 6012 bras 49a18 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 49a06: 4eb9 0004 c034 jsr 4c034 <__errno> 49a0c: 2040 moveal %d0,%a0 49a0e: 70ff moveq #-1,%d0 49a10: 20bc 0000 0086 movel #134,%a0@ 49a16: 6050 bras 49a68 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 49a18: 246a 0010 moveal %a2@(16),%a2 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 49a1c: 246a 0034 moveal %a2@(52),%a2 49a20: 2012 movel %a2@,%d0 buf->st_mode = the_jnode->st_mode; 49a22: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 49a28: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 49a2e: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 49a34: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 49a3a: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 49a40: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 49a46: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 49a4c: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 49a52: 43f9 0005 bfee lea 5bfee ,%a1 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 49a58: 2140 0004 movel %d0,%a0@(4) buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; 49a5c: 2151 003e movel %a1@,%a0@(62) return 0; 49a60: 4280 clrl %d0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 49a62: 20bc 0000 fffe movel #65534,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 49a68: 246e fffc moveal %fp@(-4),%a2 49a6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000424e8 : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 424e8: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 424ea: 4e56 ffd0 linkw %fp,#-48 424ee: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 424f2: 246e 000c moveal %fp@(12),%a2 424f6: 262e 0008 movel %fp@(8),%d3 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 424fa: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 424fc: b0ab 0048 cmpl %a3@(72),%d0 42500: 6600 0082 bnew 42584 if ( !node->info.hard_link.link_node ) 42504: 282b 004c movel %a3@(76),%d4 42508: 660e bnes 42518 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 4250a: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 42510: 2040 moveal %d0,%a0 <== NOT EXECUTED 42512: 7016 moveq #22,%d0 <== NOT EXECUTED 42514: 2080 movel %d0,%a0@ <== NOT EXECUTED 42516: 607e bras 42596 <== NOT EXECUTED the_link = *loc; 42518: 4878 0014 pea 14 4251c: 240e movel %fp,%d2 4251e: 0682 ffff ffe4 addil #-28,%d2 42524: 2f0a movel %a2,%sp@- 42526: 2f02 movel %d2,%sp@- 42528: 4eb9 0004 c854 jsr 4c854 the_link.node_access = node->info.hard_link.link_node; 4252e: 2d44 ffe4 movel %d4,%fp@(-28) /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 42532: 7801 moveq #1,%d4 if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42534: 2f02 movel %d2,%sp@- 42536: 4eb9 0004 9014 jsr 49014 /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 4253c: 206b 004c moveal %a3@(76),%a0 42540: 4281 clrl %d1 42542: 4fef 0010 lea %sp@(16),%sp 42546: 3028 0032 movew %a0@(50),%d0 4254a: 3200 movew %d0,%d1 4254c: b881 cmpl %d1,%d4 4254e: 6616 bnes 42566 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42550: 2f02 movel %d2,%sp@- 42552: 206e ffec moveal %fp@(-20),%a0 42556: 2f03 movel %d3,%sp@- 42558: 2068 0034 moveal %a0@(52),%a0 4255c: 4e90 jsr %a0@ if ( result != 0 ) 4255e: 508f addql #8,%sp 42560: 4a80 tstl %d0 42562: 6720 beqs 42584 42564: 6030 bras 42596 return -1; } else { node->info.hard_link.link_node->st_nlink --; 42566: 5380 subql #1,%d0 42568: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 4256c: 42a7 clrl %sp@- 4256e: 486e fff8 pea %fp@(-8) 42572: 4eb9 0004 2bf0 jsr 42bf0 42578: 206b 004c moveal %a3@(76),%a0 4257c: 508f addql #8,%sp 4257e: 216e fff8 0044 movel %fp@(-8),%a0@(68) /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 42584: 206a 0008 moveal %a2@(8),%a0 42588: 2f0a movel %a2,%sp@- 4258a: 2f03 movel %d3,%sp@- 4258c: 2068 0034 moveal %a0@(52),%a0 42590: 4e90 jsr %a0@ return result; 42592: 508f addql #8,%sp 42594: 6002 bras 42598 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 42596: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42598: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4259e: 4e5e unlk %fp ... =============================================================================== 000425a4 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 425a4: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 425a6: 4e56 0000 linkw %fp,#0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 425aa: 206e 0008 moveal %fp@(8),%a0 425ae: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 425b2: b0a8 0048 cmpl %a0@(72),%d0 425b6: 670e beqs 425c6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 425b8: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 425be: 7214 moveq #20,%d1 <== NOT EXECUTED 425c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 425c2: 2081 movel %d1,%a0@ <== NOT EXECUTED 425c4: 6012 bras 425d8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 425c6: 4aa8 0058 tstl %a0@(88) 425ca: 6610 bnes 425dc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 425cc: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 425d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 425d4: 7016 moveq #22,%d0 <== NOT EXECUTED 425d6: 2080 movel %d0,%a0@ <== NOT EXECUTED 425d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 425da: 6006 bras 425e2 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 425dc: 42a8 0058 clrl %a0@(88) return 0; 425e0: 4280 clrl %d0 } 425e2: 4e5e unlk %fp ... =============================================================================== 00041ed8 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41ed8: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 41eda: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 41ede: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 41ee2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 41ee6: b08a cmpl %a2,%d0 <== NOT EXECUTED 41ee8: 6616 bnes 41f00 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 41eea: 4ab9 0005 da64 tstl 5da64 <== NOT EXECUTED 41ef0: 6700 00f8 beqw 41fea <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 41ef4: 49f9 0005 da60 lea 5da60 ,%a4 <== NOT EXECUTED the_thread = 0; current = 0; 41efa: 4283 clrl %d3 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) return; stack = &Stack_check_Interrupt_stack; the_thread = 0; 41efc: 95ca subal %a2,%a2 <== NOT EXECUTED 41efe: 6008 bras 41f08 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 41f00: 262a 00f0 movel %a2@(240),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 41f04: 49ea 00b0 lea %a2@(176),%a4 <== 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); 41f08: 2414 movel %a4@,%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++) 41f0a: 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); 41f0c: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 41f12: 226c 0004 moveal %a4@(4),%a1 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 41f16: 41e9 0020 lea %a1@(32),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 41f1a: c082 andl %d2,%d0 <== NOT EXECUTED 41f1c: d088 addl %a0,%d0 <== NOT EXECUTED 41f1e: 600c bras 41f2c <== NOT EXECUTED if (*base != U32_PATTERN) 41f20: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 41f26: b290 cmpl %a0@,%d1 <== NOT EXECUTED 41f28: 6608 bnes 41f32 <== 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++) 41f2a: 5888 addql #4,%a0 <== NOT EXECUTED 41f2c: b088 cmpl %a0,%d0 <== NOT EXECUTED 41f2e: 62f0 bhis 41f20 <== NOT EXECUTED 41f30: 600c bras 41f3e <== 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 ) 41f32: 4a88 tstl %a0 <== NOT EXECUTED 41f34: 6708 beqs 41f3e <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 41f36: 47f1 2810 lea %a1@(00000010,%d2:l),%a3 <== NOT EXECUTED 41f3a: 97c8 subal %a0,%a3 <== NOT EXECUTED 41f3c: 6002 bras 41f40 <== NOT EXECUTED else used = 0; 41f3e: 97cb subal %a3,%a3 <== NOT EXECUTED 41f40: 2a79 0005 d24c moveal 5d24c ,%a5 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 41f46: 4a8a tstl %a2 <== NOT EXECUTED 41f48: 672c beqs 41f76 <== NOT EXECUTED #endif { (*print_handler)( 41f4a: 486e fffb pea %fp@(-5) <== NOT EXECUTED 41f4e: 4878 0005 pea 5 <== NOT EXECUTED 41f52: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41f56: 4eb9 0004 59bc jsr 459bc <== NOT EXECUTED 41f5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 41f5e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 41f62: 4879 0005 ae3b pea 5ae3b <== NOT EXECUTED 41f68: 2f39 0005 d250 movel 5d250 ,%sp@- <== NOT EXECUTED 41f6e: 4e95 jsr %a5@ <== NOT EXECUTED 41f70: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 41f74: 6016 bras 41f8c <== 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 ); 41f76: 4878 ffff pea ffffffff <== NOT EXECUTED 41f7a: 4879 0005 ae48 pea 5ae48 <== NOT EXECUTED 41f80: 2f39 0005 d250 movel 5d250 ,%sp@- <== NOT EXECUTED 41f86: 4e95 jsr %a5@ <== NOT EXECUTED 41f88: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 41f8c: 206c 0004 moveal %a4@(4),%a0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 41f90: 2f02 movel %d2,%sp@- <== NOT EXECUTED 41f92: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 41f94: 2014 movel %a4@,%d0 <== NOT EXECUTED 41f96: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 41f98: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 41f9c: 2f08 movel %a0,%sp@- <== NOT EXECUTED 41f9e: 4879 0005 ae56 pea 5ae56 <== NOT EXECUTED 41fa4: 2f39 0005 d250 movel 5d250 ,%sp@- <== NOT EXECUTED 41faa: 2079 0005 d24c moveal 5d24c ,%a0 <== NOT EXECUTED 41fb0: 4e90 jsr %a0@ <== NOT EXECUTED 41fb2: 2079 0005 d24c moveal 5d24c ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 41fb8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 41fbc: 4ab9 0005 d248 tstl 5d248 <== NOT EXECUTED 41fc2: 6612 bnes 41fd6 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 41fc4: 4879 0005 ae74 pea 5ae74 <== NOT EXECUTED 41fca: 2f39 0005 d250 movel 5d250 ,%sp@- <== NOT EXECUTED 41fd0: 4e90 jsr %a0@ <== NOT EXECUTED 41fd2: 508f addql #8,%sp <== NOT EXECUTED 41fd4: 6014 bras 41fea <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 41fd6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 41fd8: 4879 0005 ae81 pea 5ae81 <== NOT EXECUTED 41fde: 2f39 0005 d250 movel 5d250 ,%sp@- <== NOT EXECUTED 41fe4: 4e90 jsr %a0@ <== NOT EXECUTED 41fe6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 41fea: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 41ff0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00041ff4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 41ff4: 4e56 0000 linkw %fp,#0 static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if ( Stack_check_Initialized ) 41ff8: 4ab9 0005 d248 tstl 5d248 41ffe: 6668 bnes 42068 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 42000: 203c feed f00d movel #-17960947,%d0 42006: 23c0 0005 da50 movel %d0,5da50 4200c: 203c 0bad 0d06 movel #195890438,%d0 42012: 23c0 0005 da54 movel %d0,5da54 42018: 203c dead f00d movel #-559026163,%d0 4201e: 23c0 0005 da58 movel %d0,5da58 42024: 203c 600d 0d06 movel #1611468038,%d0 4202a: 23c0 0005 da5c movel %d0,5da5c /* * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { 42030: 2039 0005 dd44 movel 5dd44 <_Per_CPU_Information>,%d0 42036: 6728 beqs 42060 <== NEVER TAKEN 42038: 2239 0005 dd48 movel 5dd48 <_Per_CPU_Information+0x4>,%d1 4203e: 6720 beqs 42060 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42040: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42042: 2f01 movel %d1,%sp@- 42044: 4878 00a5 pea a5 * If appropriate, setup the interrupt stack for high water testing * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 42048: 23c0 0005 da64 movel %d0,5da64 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 4204e: 2f00 movel %d0,%sp@- * also. */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) { Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42050: 23c1 0005 da60 movel %d1,5da60 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42056: 4eb9 0004 cbd4 jsr 4cbd4 4205c: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 42060: 7001 moveq #1,%d0 42062: 23c0 0005 d248 movel %d0,5d248 } 42068: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000420ce : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 420ce: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 420d2: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 420d6: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 420da: 45f9 0004 3a28 lea 43a28 ,%a2 <== 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); 420e0: 286b 00b4 moveal %a3@(180),%a4 <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 420e4: 4879 0005 ae87 pea 5ae87 <== 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) { 420ea: 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"); 420ee: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 420f0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 420f2: 4879 0005 ae97 pea 5ae97 <== NOT EXECUTED 420f8: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 420fa: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 420fe: 4879 0005 aeb4 pea 5aeb4 <== NOT EXECUTED 42104: 4e92 jsr %a2@ <== NOT EXECUTED printk( 42106: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 4210a: 4879 0005 aec6 pea 5aec6 <== NOT EXECUTED 42110: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 42112: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 42116: 4878 0020 pea 20 <== NOT EXECUTED 4211a: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 4211e: 4eb9 0004 59bc jsr 459bc <== NOT EXECUTED 42124: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 42128: 2e80 movel %d0,%sp@ <== NOT EXECUTED 4212a: 4879 0005 aeda pea 5aeda <== NOT EXECUTED 42130: 4e92 jsr %a2@ <== 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) 42132: 206b 00b4 moveal %a3@(180),%a0 <== NOT EXECUTED 42136: 202b 00b0 movel %a3@(176),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 4213a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4213e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42140: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42142: 4879 0005 aef0 pea 5aef0 <== NOT EXECUTED 42148: 4e92 jsr %a2@ <== 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) { 4214a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4214e: 4a02 tstb %d2 <== NOT EXECUTED 42150: 6618 bnes 4216a <== NOT EXECUTED printk( 42152: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42156: 486c 0008 pea %a4@(8) <== NOT EXECUTED 4215a: 4878 0010 pea 10 <== NOT EXECUTED 4215e: 4879 0005 af21 pea 5af21 <== NOT EXECUTED 42164: 4e92 jsr %a2@ <== NOT EXECUTED 42166: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 4216a: 4878 0081 pea 81 <== NOT EXECUTED 4216e: 4eb9 0004 6278 jsr 46278 <== NOT EXECUTED =============================================================================== 0004af20 : * 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; 4af20: 41f9 0006 0b18 lea 60b18 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4af26: 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; 4af2a: 202e 0008 movel %fp@(8),%d0 4af2e: 4c50 0001 remul %a0@,%d1,%d0 4af32: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4af36: 4a81 tstl %d1 4af38: 6702 beqs 4af3c <== ALWAYS TAKEN ticks += 1; 4af3a: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4af3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046db0 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 46db0: 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(); 46db4: 2039 0005 cde8 movel 5cde8 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 46dba: 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(); 46dbc: 243c 0000 03e8 movel #1000,%d2 46dc2: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 46dc6: 242e 0008 movel %fp@(8),%d2 46dca: 4c40 2001 remul %d0,%d1,%d2 46dce: 4c40 2002 remul %d0,%d2,%d2 46dd2: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 46dd4: 4a81 tstl %d1 46dd6: 6702 beqs 46dda <== ALWAYS TAKEN ticks += 1; 46dd8: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 46dda: 241f movel %sp@+,%d2 46ddc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cd80 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4cd80: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cd86: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4cd8a: 2279 0005 fa10 moveal 5fa10 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cd90: 48d7 001c moveml %d2-%d4,%sp@ 4cd94: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4cd98: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4cd9c: 242e 000c movel %fp@(12),%d2 4cda0: 262e 0014 movel %fp@(20),%d3 4cda4: 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 ); 4cda8: 40c1 movew %sr,%d1 4cdaa: 8081 orl %d1,%d0 4cdac: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4cdae: 2028 0048 movel %a0@(72),%d0 4cdb2: 5280 addql #1,%d0 4cdb4: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4cdb8: 4aa8 0040 tstl %a0@(64) 4cdbc: 6626 bnes 4cde4 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == 4cdbe: b0a8 0044 cmpl %a0@(68),%d0 4cdc2: 6620 bnes 4cde4 <_CORE_barrier_Wait+0x64> the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4cdc4: 7001 moveq #1,%d0 4cdc6: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4cdca: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4cdcc: 2d44 0010 movel %d4,%fp@(16) 4cdd0: 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 ); } 4cdd4: 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 ); 4cdd8: 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 ); } 4cddc: 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 ); 4cdde: 4ef9 0004 cd4c jmp 4cd4c <_CORE_barrier_Release> 4cde4: 7001 moveq #1,%d0 4cde6: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4cdea: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4cdee: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4cdf2: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4cdf4: 2d43 000c movel %d3,%fp@(12) 4cdf8: 203c 0004 9eac movel #302764,%d0 4cdfe: 2d48 0008 movel %a0,%fp@(8) } 4ce02: 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 ); 4ce06: 2d40 0010 movel %d0,%fp@(16) } 4ce0a: 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 ); 4ce0c: 4ef9 0004 9bb4 jmp 49bb4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004e140 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4e140: 223c 0000 0700 movel #1792,%d1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e146: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 4e14a: 2079 0006 62b4 moveal 662b4 <_Per_CPU_Information+0xc>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 4e150: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4e154: 246e 0008 moveal %fp@(8),%a2 4e158: 282e 000c movel %fp@(12),%d4 4e15c: 242e 0010 movel %fp@(16),%d2 4e160: 226e 0014 moveal %fp@(20),%a1 4e164: 262e 001c movel %fp@(28),%d3 4e168: 1a2e 001b moveb %fp@(27),%d5 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 4e16c: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 4e170: 40c0 movew %sr,%d0 4e172: 8280 orl %d0,%d1 4e174: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e176: 220a movel %a2,%d1 4e178: 2c0a movel %a2,%d6 4e17a: 0681 0000 0050 addil #80,%d1 4e180: 0686 0000 0054 addil #84,%d6 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4e186: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4e18a: bc8b cmpl %a3,%d6 4e18c: 674a beqs 4e1d8 <_CORE_message_queue_Seize+0x98> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 4e18e: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4e190: 2141 0004 movel %d1,%a0@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 4e194: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 4e198: 2548 0050 movel %a0,%a2@(80) _ISR_Enable( level ); 4e19c: 46c0 movew %d0,%sr *size_p = the_message->Contents.size; 4e19e: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4e1a2: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 4e1a6: 2079 0006 62b4 moveal 662b4 <_Per_CPU_Information+0xc>,%a0 4e1ac: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 4e1b0: 2f11 movel %a1@,%sp@- 4e1b2: 486b 000c pea %a3@(12) 4e1b6: 2f02 movel %d2,%sp@- 4e1b8: 4eb9 0005 4810 jsr 54810 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 4e1be: 4fef 000c lea %sp@(12),%sp 4e1c2: 2d4b 000c movel %a3,%fp@(12) 4e1c6: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4e1ca: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4e1d0: 4e5e unlk %fp 4e1d2: 4ef9 0004 dfb8 jmp 4dfb8 <_Chain_Append> return; } #endif } if ( !wait ) { 4e1d8: 4a05 tstb %d5 4e1da: 6612 bnes 4e1ee <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 4e1dc: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e1de: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4e1e0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 4e1e6: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 4e1ea: 4e5e unlk %fp 4e1ec: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4e1ee: 7201 moveq #1,%d1 4e1f0: 2541 0030 movel %d1,%a2@(48) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 4e1f4: 2142 002c movel %d2,%a0@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 4e1f8: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 4e1fc: 2144 0020 movel %d4,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 4e200: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 4e204: 46c0 movew %d0,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e206: 2d43 000c movel %d3,%fp@(12) 4e20a: 203c 0005 032c movel #328492,%d0 4e210: 2d4a 0008 movel %a2,%fp@(8) } 4e214: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e21a: 2d40 0010 movel %d0,%fp@(16) } 4e21e: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 4e220: 4ef9 0005 0034 jmp 50034 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 000463fc <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 463fc: 4e56 fff4 linkw %fp,#-12 46400: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 46404: 4878 000e pea e CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 46408: 266e 000c moveal %fp@(12),%a3 4640c: 246e 0008 moveal %fp@(8),%a2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 46410: 2f0b movel %a3,%sp@- 46412: 486a 0040 pea %a2@(64) CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 46416: 242e 0010 movel %fp@(16),%d2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 4641a: 4eb9 0004 c854 jsr 4c854 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 46420: 4fef 000c lea %sp@(12),%sp rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; 46424: 2542 004e movel %d2,%a2@(78) the_mutex->blocked_count = 0; 46428: 42aa 0056 clrl %a2@(86) if ( initial_lock == CORE_MUTEX_LOCKED ) { 4642c: 4a82 tstl %d2 4642e: 6638 bnes 46468 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; 46430: 7001 moveq #1,%d0 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 46432: 7202 moveq #2,%d1 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 46434: 2079 0005 d9bc moveal 5d9bc <_Per_CPU_Information+0xc>,%a0 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 4643a: 2540 0052 movel %d0,%a2@(82) the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 4643e: 2568 0008 005e movel %a0@(8),%a2@(94) STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 46444: 202a 0046 movel %a2@(70),%d0 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 46448: 2548 005a movel %a0,%a2@(90) the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4644c: b280 cmpl %d0,%d1 4644e: 6708 beqs 46458 <_CORE_mutex_Initialize+0x5c> 46450: 123c 0003 moveb #3,%d1 46454: b280 cmpl %d0,%d1 46456: 661c bnes 46474 <_CORE_mutex_Initialize+0x78> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 46458: 202a 004a movel %a2@(74),%d0 4645c: b0a8 0014 cmpl %a0@(20),%d0 46460: 6236 bhis 46498 <_CORE_mutex_Initialize+0x9c> <== NEVER TAKEN _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 46462: 52a8 001c addql #1,%a0@(28) 46466: 600c bras 46474 <_CORE_mutex_Initialize+0x78> } } else { the_mutex->nest_count = 0; 46468: 42aa 0052 clrl %a2@(82) the_mutex->holder = NULL; 4646c: 42aa 005a clrl %a2@(90) the_mutex->holder_id = 0; 46470: 42aa 005e clrl %a2@(94) } _Thread_queue_Initialize( 46474: 4878 0004 pea 4 46478: 4878 0400 pea 400 4647c: 4aab 0006 tstl %a3@(6) 46480: 56c0 sne %d0 46482: 49c0 extbl %d0 46484: 4480 negl %d0 46486: 2f00 movel %d0,%sp@- 46488: 2f0a movel %a2,%sp@- 4648a: 4eb9 0004 8304 jsr 48304 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 46490: 4fef 0010 lea %sp@(16),%sp 46494: 4280 clrl %d0 46496: 6002 bras 4649a <_CORE_mutex_Initialize+0x9e> if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; 46498: 7005 moveq #5,%d0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 4649a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 464a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046704 <_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 ) { 46704: 4e56 0000 linkw %fp,#0 46708: 2f0a movel %a2,%sp@- 4670a: 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)) ) { 4670e: 2f0a movel %a2,%sp@- 46710: 4eb9 0004 7f98 jsr 47f98 <_Thread_queue_Dequeue> 46716: 588f addql #4,%sp 46718: 4a80 tstl %d0 4671a: 6624 bnes 46740 <_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 ); 4671c: 303c 0700 movew #1792,%d0 46720: 40c1 movew %sr,%d1 46722: 8081 orl %d1,%d0 46724: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 46726: 202a 0048 movel %a2@(72),%d0 4672a: b0aa 0040 cmpl %a2@(64),%d0 4672e: 640a bccs 4673a <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN the_semaphore->count += 1; 46730: 5280 addql #1,%d0 46732: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 46736: 4280 clrl %d0 46738: 6002 bras 4673c <_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; 4673a: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4673c: 46c1 movew %d1,%sr 4673e: 6002 bras 46742 <_CORE_semaphore_Surrender+0x3e> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 46740: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 46742: 246e fffc moveal %fp@(-4),%a2 46746: 4e5e unlk %fp ... =============================================================================== 000455d8 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 455d8: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 455de: 4e56 ffec linkw %fp,#-20 455e2: 48d7 043c moveml %d2-%d5/%a2,%sp@ 455e6: 246e 0008 moveal %fp@(8),%a2 rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 455ea: 206a 00fc moveal %a2@(252),%a0 option_set = (rtems_option) the_thread->Wait.option; 455ee: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 455f2: 40c1 movew %sr,%d1 455f4: 8081 orl %d1,%d0 455f6: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 455f8: 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 ); 455fc: 2003 movel %d3,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 455fe: 2410 movel %a0@,%d2 45600: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 45602: 6700 00ca beqw 456ce <_Event_Surrender+0xf6> /* * 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() && 45606: 4ab9 0005 d9b8 tstl 5d9b8 <_Per_CPU_Information+0x8> 4560c: 674a beqs 45658 <_Event_Surrender+0x80> 4560e: b5f9 0005 d9bc cmpal 5d9bc <_Per_CPU_Information+0xc>,%a2 45614: 6642 bnes 45658 <_Event_Surrender+0x80> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 45616: 2279 0005 d9f8 moveal 5d9f8 <_Event_Sync_state>,%a1 /* * 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 ) && 4561c: 7a02 moveq #2,%d5 4561e: ba89 cmpl %a1,%d5 45620: 670e beqs 45630 <_Event_Surrender+0x58> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 45622: 2279 0005 d9f8 moveal 5d9f8 <_Event_Sync_state>,%a1 * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 45628: 1a3c 0001 moveb #1,%d5 4562c: ba89 cmpl %a1,%d5 4562e: 6628 bnes 45658 <_Event_Surrender+0x80> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 45630: b680 cmpl %d0,%d3 45632: 6708 beqs 4563c <_Event_Surrender+0x64> 45634: 0804 0001 btst #1,%d4 45638: 6700 0094 beqw 456ce <_Event_Surrender+0xf6> 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) ); 4563c: 2600 movel %d0,%d3 4563e: 4683 notl %d3 45640: c682 andl %d2,%d3 45642: 2083 movel %d3,%a0@ api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45644: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 45648: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4564c: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4564e: 7003 moveq #3,%d0 45650: 23c0 0005 d9f8 movel %d0,5d9f8 <_Event_Sync_state> 45656: 6076 bras 456ce <_Event_Surrender+0xf6> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 45658: 2a2a 0010 movel %a2@(16),%d5 4565c: 0285 0000 0100 andil #256,%d5 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 45662: 676a beqs 456ce <_Event_Surrender+0xf6> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 45664: b680 cmpl %d0,%d3 45666: 6706 beqs 4566e <_Event_Surrender+0x96> 45668: 0804 0001 btst #1,%d4 4566c: 6760 beqs 456ce <_Event_Surrender+0xf6> <== NEVER TAKEN 4566e: 2600 movel %d0,%d3 45670: 4683 notl %d3 45672: c682 andl %d2,%d3 45674: 2083 movel %d3,%a0@ api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 45676: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 4567a: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 4567e: 2080 movel %d0,%a0@ _ISR_Flash( level ); 45680: 203c 0000 0700 movel #1792,%d0 45686: 46c1 movew %d1,%sr 45688: 8081 orl %d1,%d0 4568a: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4568c: 7a02 moveq #2,%d5 4568e: baaa 0050 cmpl %a2@(80),%d5 45692: 6714 beqs 456a8 <_Event_Surrender+0xd0> _ISR_Enable( level ); 45694: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 45696: 2f3c 1003 fff8 movel #268697592,%sp@- 4569c: 2f0a movel %a2,%sp@- 4569e: 4eb9 0004 7954 jsr 47954 <_Thread_Clear_state> 456a4: 508f addql #8,%sp 456a6: 6028 bras 456d0 <_Event_Surrender+0xf8> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 456a8: 7003 moveq #3,%d0 456aa: 2540 0050 movel %d0,%a2@(80) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 456ae: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 456b0: 486a 0048 pea %a2@(72) 456b4: 4eb9 0004 89c8 jsr 489c8 <_Watchdog_Remove> 456ba: 2f3c 1003 fff8 movel #268697592,%sp@- 456c0: 2f0a movel %a2,%sp@- 456c2: 4eb9 0004 7954 jsr 47954 <_Thread_Clear_state> 456c8: 4fef 000c lea %sp@(12),%sp 456cc: 6002 bras 456d0 <_Event_Surrender+0xf8> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 456ce: 46c1 movew %d1,%sr } 456d0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 456d6: 4e5e unlk %fp ... =============================================================================== 000456dc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 456dc: 4e56 fffc linkw %fp,#-4 456e0: 2f03 movel %d3,%sp@- 456e2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 456e4: 486e fffc pea %fp@(-4) 456e8: 2f2e 0008 movel %fp@(8),%sp@- 456ec: 4eb9 0004 7cf0 jsr 47cf0 <_Thread_Get> switch ( location ) { 456f2: 508f addql #8,%sp 456f4: 4aae fffc tstl %fp@(-4) 456f8: 665c bnes 45756 <_Event_Timeout+0x7a> <== 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 ); 456fa: 223c 0000 0700 movel #1792,%d1 45700: 40c2 movew %sr,%d2 45702: 8282 orl %d2,%d1 45704: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 45706: 2040 moveal %d0,%a0 45708: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 4570c: b0b9 0005 d9bc cmpl 5d9bc <_Per_CPU_Information+0xc>,%d0 45712: 6614 bnes 45728 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45714: 2239 0005 d9f8 movel 5d9f8 <_Event_Sync_state>,%d1 4571a: 7601 moveq #1,%d3 4571c: b681 cmpl %d1,%d3 4571e: 6608 bnes 45728 <_Event_Timeout+0x4c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 45720: 7202 moveq #2,%d1 45722: 23c1 0005 d9f8 movel %d1,5d9f8 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; 45728: 7606 moveq #6,%d3 4572a: 2040 moveal %d0,%a0 4572c: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 45730: 46c2 movew %d2,%sr 45732: 2f3c 1003 fff8 movel #268697592,%sp@- 45738: 2f00 movel %d0,%sp@- 4573a: 4eb9 0004 7954 jsr 47954 <_Thread_Clear_state> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 45740: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 45742: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 45748: 5380 subql #1,%d0 4574a: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 45750: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 45756: 242e fff4 movel %fp@(-12),%d2 4575a: 262e fff8 movel %fp@(-8),%d3 4575e: 4e5e unlk %fp ... =============================================================================== 0004a8e8 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4a8e8: 4e56 ffcc linkw %fp,#-52 4a8ec: 202e 0010 movel %fp@(16),%d0 4a8f0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a8f4: 246e 0008 moveal %fp@(8),%a2 4a8f8: 262e 000c movel %fp@(12),%d3 Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 4a8fc: 2403 movel %d3,%d2 4a8fe: d480 addl %d0,%d2 uintptr_t const free_size = stats->free_size; 4a900: 206a 0030 moveal %a2@(48),%a0 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4a904: 282a 0020 movel %a2@(32),%d4 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 4a908: 2a2a 0010 movel %a2@(16),%d5 uintptr_t const min_block_size = heap->min_block_size; 4a90c: 222a 0014 movel %a2@(20),%d1 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 4a910: 42ae fff8 clrl %fp@(-8) Heap_Block *extend_last_block = NULL; 4a914: 42ae fffc clrl %fp@(-4) uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 4a918: 2d48 fff4 movel %a0,%fp@(-12) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4a91c: b682 cmpl %d2,%d3 4a91e: 6200 01a6 bhiw 4aac6 <_Heap_Extend+0x1de> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4a922: 486e fffc pea %fp@(-4) 4a926: 486e fff8 pea %fp@(-8) 4a92a: 2f01 movel %d1,%sp@- 4a92c: 2f05 movel %d5,%sp@- 4a92e: 2f00 movel %d0,%sp@- 4a930: 2f03 movel %d3,%sp@- 4a932: 4eb9 0004 698e jsr 4698e <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4a938: 4fef 0018 lea %sp@(24),%sp 4a93c: 4a00 tstb %d0 4a93e: 6700 0186 beqw 4aac6 <_Heap_Extend+0x1de> 4a942: 2044 moveal %d4,%a0 4a944: 9bcd subal %a5,%a5 4a946: 4281 clrl %d1 4a948: 97cb subal %a3,%a3 4a94a: 99cc subal %a4,%a4 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4a94c: b888 cmpl %a0,%d4 4a94e: 6704 beqs 4a954 <_Heap_Extend+0x6c> 4a950: 2248 moveal %a0,%a1 4a952: 6004 bras 4a958 <_Heap_Extend+0x70> 4a954: 226a 0018 moveal %a2@(24),%a1 uintptr_t const sub_area_end = start_block->prev_size; 4a958: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4a95a: b680 cmpl %d0,%d3 4a95c: 6406 bccs 4a964 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4a95e: b3c2 cmpal %d2,%a1 4a960: 6500 0164 bcsw 4aac6 <_Heap_Extend+0x1de> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a964: b3c2 cmpal %d2,%a1 4a966: 6706 beqs 4a96e <_Heap_Extend+0x86> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a968: b082 cmpl %d2,%d0 4a96a: 6206 bhis 4a972 <_Heap_Extend+0x8a> 4a96c: 6006 bras 4a974 <_Heap_Extend+0x8c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4a96e: 2848 moveal %a0,%a4 4a970: 6002 bras 4a974 <_Heap_Extend+0x8c> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4a972: 2208 movel %a0,%d1 4a974: 2e00 movel %d0,%d7 4a976: 2240 moveal %d0,%a1 4a978: 5189 subql #8,%a1 4a97a: 4c45 7006 remul %d5,%d6,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4a97e: 93c6 subal %d6,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4a980: b680 cmpl %d0,%d3 4a982: 6606 bnes 4a98a <_Heap_Extend+0xa2> start_block->prev_size = extend_area_end; 4a984: 2082 movel %d2,%a0@ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4a986: 2649 moveal %a1,%a3 4a988: 6006 bras 4a990 <_Heap_Extend+0xa8> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4a98a: b680 cmpl %d0,%d3 4a98c: 6302 blss 4a990 <_Heap_Extend+0xa8> 4a98e: 2a49 moveal %a1,%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; 4a990: 70fe moveq #-2,%d0 4a992: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4a996: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4a99a: b888 cmpl %a0,%d4 4a99c: 66ae bnes 4a94c <_Heap_Extend+0x64> if ( extend_area_begin < heap->area_begin ) { 4a99e: b6aa 0018 cmpl %a2@(24),%d3 4a9a2: 6406 bccs 4a9aa <_Heap_Extend+0xc2> heap->area_begin = extend_area_begin; 4a9a4: 2543 0018 movel %d3,%a2@(24) 4a9a8: 600a bras 4a9b4 <_Heap_Extend+0xcc> } else if ( heap->area_end < extend_area_end ) { 4a9aa: b4aa 001c cmpl %a2@(28),%d2 4a9ae: 6304 blss 4a9b4 <_Heap_Extend+0xcc> heap->area_end = extend_area_end; 4a9b0: 2542 001c movel %d2,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4a9b4: 206e fffc moveal %fp@(-4),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4a9b8: 2008 movel %a0,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4a9ba: 7801 moveq #1,%d4 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4a9bc: 226e fff8 moveal %fp@(-8),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4a9c0: 9089 subl %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4a9c2: 8880 orl %d0,%d4 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4a9c4: 2282 movel %d2,%a1@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4a9c6: 2344 0004 movel %d4,%a1@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4a9ca: 2080 movel %d0,%a0@ extend_last_block->size_and_flag = 0; 4a9cc: 42a8 0004 clrl %a0@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4a9d0: b3ea 0020 cmpal %a2@(32),%a1 4a9d4: 6406 bccs 4a9dc <_Heap_Extend+0xf4> heap->first_block = extend_first_block; 4a9d6: 2549 0020 movel %a1,%a2@(32) 4a9da: 600a bras 4a9e6 <_Heap_Extend+0xfe> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4a9dc: b1ea 0024 cmpal %a2@(36),%a0 4a9e0: 6304 blss 4a9e6 <_Heap_Extend+0xfe> heap->last_block = extend_last_block; 4a9e2: 2548 0024 movel %a0,%a2@(36) } if ( merge_below_block != NULL ) { 4a9e6: 4a8c tstl %a4 4a9e8: 6732 beqs 4aa1c <_Heap_Extend+0x134> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4a9ea: 202a 0010 movel %a2@(16),%d0 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 4a9ee: 5083 addql #8,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4a9f0: 2803 movel %d3,%d4 4a9f2: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4a9f6: 4a81 tstl %d1 4a9f8: 6704 beqs 4a9fe <_Heap_Extend+0x116> return value - remainder + alignment; 4a9fa: d680 addl %d0,%d3 4a9fc: 9681 subl %d1,%d3 uintptr_t const new_first_block_begin = 4a9fe: 2043 moveal %d3,%a0 4aa00: 5188 subql #8,%a0 new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 4aa02: 200c movel %a4,%d0 4aa04: 9088 subl %a0,%d0 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4aa06: 7201 moveq #1,%d1 4aa08: 8280 orl %d0,%d1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 4aa0a: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4aa0c: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4aa10: 2f08 movel %a0,%sp@- 4aa12: 2f0a movel %a2,%sp@- 4aa14: 4eba feb6 jsr %pc@(4a8cc <_Heap_Free_block>) 4aa18: 508f addql #8,%sp 4aa1a: 600e bras 4aa2a <_Heap_Extend+0x142> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 4aa1c: 4a81 tstl %d1 4aa1e: 670a beqs 4aa2a <_Heap_Extend+0x142> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 4aa20: 9288 subl %a0,%d1 4aa22: 7801 moveq #1,%d4 4aa24: 8881 orl %d1,%d4 4aa26: 2144 0004 movel %d4,%a0@(4) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4aa2a: 4a8b tstl %a3 4aa2c: 6734 beqs 4aa62 <_Heap_Extend+0x17a> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 4aa2e: 5182 subql #8,%d2 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 4aa30: 948b subl %a3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4aa32: 2202 movel %d2,%d1 4aa34: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; 4aa3a: 7201 moveq #1,%d1 4aa3c: 9480 subl %d0,%d2 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 4aa3e: 202b 0004 movel %a3@(4),%d0 4aa42: 9082 subl %d2,%d0 | HEAP_PREV_BLOCK_USED; 4aa44: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4aa46: 7001 moveq #1,%d0 4aa48: 2781 2804 movel %d1,%a3@(00000004,%d2:l) 4aa4c: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4aa50: 8480 orl %d0,%d2 4aa52: 2742 0004 movel %d2,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4aa56: 2f0b movel %a3,%sp@- 4aa58: 2f0a movel %a2,%sp@- 4aa5a: 4eba fe70 jsr %pc@(4a8cc <_Heap_Free_block>) 4aa5e: 508f addql #8,%sp 4aa60: 6020 bras 4aa82 <_Heap_Extend+0x19a> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4aa62: 4a8d tstl %a5 4aa64: 671c beqs 4aa82 <_Heap_Extend+0x19a> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4aa66: 7201 moveq #1,%d1 uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 4aa68: 7801 moveq #1,%d4 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 4aa6a: 202e fff8 movel %fp@(-8),%d0 4aa6e: 908d subl %a5,%d0 4aa70: c2ad 0004 andl %a5@(4),%d1 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 4aa74: 206e fffc moveal %fp@(-4),%a0 block->size_and_flag = size | flag; 4aa78: 8280 orl %d0,%d1 4aa7a: 2b41 0004 movel %d1,%a5@(4) uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 4aa7e: 89a8 0004 orl %d4,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4aa82: 4a8c tstl %a4 4aa84: 6610 bnes 4aa96 <_Heap_Extend+0x1ae> 4aa86: 4a8b tstl %a3 4aa88: 660c bnes 4aa96 <_Heap_Extend+0x1ae> _Heap_Free_block( heap, extend_first_block ); 4aa8a: 2f2e fff8 movel %fp@(-8),%sp@- 4aa8e: 2f0a movel %a2,%sp@- 4aa90: 4eba fe3a jsr %pc@(4a8cc <_Heap_Free_block>) 4aa94: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block 4aa96: 206a 0024 moveal %a2@(36),%a0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4aa9a: 7201 moveq #1,%d1 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 4aa9c: 202a 0020 movel %a2@(32),%d0 4aaa0: 9088 subl %a0,%d0 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4aaa2: c2a8 0004 andl %a0@(4),%d1 block->size_and_flag = size | flag; 4aaa6: 8280 orl %d0,%d1 4aaa8: 2141 0004 movel %d1,%a0@(4) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4aaac: 202a 0030 movel %a2@(48),%d0 4aab0: 90ae fff4 subl %fp@(-12),%d0 /* Statistics */ stats->size += extended_size; 4aab4: d1aa 002c addl %d0,%a2@(44) if ( extended_size_ptr != NULL ) 4aab8: 4aae 0014 tstl %fp@(20) 4aabc: 670c beqs 4aaca <_Heap_Extend+0x1e2> <== NEVER TAKEN *extended_size_ptr = extended_size; 4aabe: 206e 0014 moveal %fp@(20),%a0 4aac2: 2080 movel %d0,%a0@ 4aac4: 6004 bras 4aaca <_Heap_Extend+0x1e2> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 4aac6: 4200 clrb %d0 4aac8: 6002 bras 4aacc <_Heap_Extend+0x1e4> stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4aaca: 7001 moveq #1,%d0 } 4aacc: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4aad2: 4e5e unlk %fp ... =============================================================================== 0004a898 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4a898: 4e56 ffe8 linkw %fp,#-24 4a89c: 206e 0008 moveal %fp@(8),%a0 4a8a0: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4a8a4: 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 ) { 4a8a8: 6700 014e beqw 4a9f8 <_Heap_Free+0x160> 4a8ac: 2240 moveal %d0,%a1 4a8ae: 5189 subql #8,%a1 4a8b0: 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 4a8b6: 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); 4a8ba: 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; 4a8bc: b889 cmpl %a1,%d4 4a8be: 620c bhis 4a8cc <_Heap_Free+0x34> 4a8c0: b3e8 0024 cmpal %a0@(36),%a1 4a8c4: 53c0 sls %d0 4a8c6: 49c0 extbl %d0 4a8c8: 4480 negl %d0 4a8ca: 6002 bras 4a8ce <_Heap_Free+0x36> 4a8cc: 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 ) ) { 4a8ce: 4a00 tstb %d0 4a8d0: 6700 012a beqw 4a9fc <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a8d4: 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; 4a8d8: 70fe moveq #-2,%d0 4a8da: 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); 4a8dc: 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; 4a8e0: b88a cmpl %a2,%d4 4a8e2: 620c bhis 4a8f0 <_Heap_Free+0x58> <== NEVER TAKEN 4a8e4: b5e8 0024 cmpal %a0@(36),%a2 4a8e8: 53c1 sls %d1 4a8ea: 49c1 extbl %d1 4a8ec: 4481 negl %d1 4a8ee: 6002 bras 4a8f2 <_Heap_Free+0x5a> 4a8f0: 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 ) ) { 4a8f2: 4a01 tstb %d1 4a8f4: 6700 0106 beqw 4a9fc <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a8f8: 242a 0004 movel %a2@(4),%d2 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4a8fc: 0802 0000 btst #0,%d2 4a900: 6700 00fa beqw 4a9fc <_Heap_Free+0x164> - 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; 4a904: 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 4a906: 2668 0024 moveal %a0@(36),%a3 4a90a: c481 andl %d1,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4a90c: b7ca cmpal %a2,%a3 4a90e: 670c beqs 4a91c <_Heap_Free+0x84> 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; 4a910: 7201 moveq #1,%d1 4a912: c2b2 2804 andl %a2@(00000004,%d2:l),%d1 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4a916: 5381 subql #1,%d1 4a918: 4481 negl %d1 4a91a: 6002 bras 4a91e <_Heap_Free+0x86> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4a91c: 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 4a91e: 1a01 moveb %d1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4a920: 0803 0000 btst #0,%d3 4a924: 6660 bnes 4a986 <_Heap_Free+0xee> uintptr_t const prev_size = block->prev_size; 4a926: 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); 4a928: 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; 4a92a: b889 cmpl %a1,%d4 4a92c: 620a bhis 4a938 <_Heap_Free+0xa0> <== NEVER TAKEN 4a92e: b3cb cmpal %a3,%a1 4a930: 53c1 sls %d1 4a932: 49c1 extbl %d1 4a934: 4481 negl %d1 4a936: 6002 bras 4a93a <_Heap_Free+0xa2> 4a938: 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 ) ) { 4a93a: 4a01 tstb %d1 4a93c: 6700 00be beqw 4a9fc <_Heap_Free+0x164> 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; 4a940: 7201 moveq #1,%d1 4a942: 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) ) { 4a946: 6700 00b4 beqw 4a9fc <_Heap_Free+0x164> 4a94a: d680 addl %d0,%d3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4a94c: 4a05 tstb %d5 4a94e: 6724 beqs 4a974 <_Heap_Free+0xdc> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 4a950: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + prev_size + next_block_size; 4a954: d483 addl %d3,%d2 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a956: 7201 moveq #1,%d1 Heap_Block *prev = block->prev; 4a958: 246a 000c moveal %a2@(12),%a2 prev->next = next; 4a95c: 254b 0008 movel %a3,%a2@(8) 4a960: 8282 orl %d2,%d1 next->prev = prev; 4a962: 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; 4a966: 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; 4a96a: 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; 4a96e: 2341 0004 movel %d1,%a1@(4) 4a972: 6078 bras 4a9ec <_Heap_Free+0x154> 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; 4a974: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a976: 72fe moveq #-2,%d1 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; 4a978: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4a97a: 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; 4a97c: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a980: c3aa 0004 andl %d1,%a2@(4) 4a984: 6066 bras 4a9ec <_Heap_Free+0x154> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4a986: 4a01 tstb %d1 4a988: 672a beqs 4a9b4 <_Heap_Free+0x11c> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 4a98a: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + next_block_size; 4a98e: 2202 movel %d2,%d1 4a990: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4a992: 7401 moveq #1,%d2 Heap_Block *prev = old_block->prev; 4a994: 246a 000c moveal %a2@(12),%a2 new_block->next = next; 4a998: 234b 0008 movel %a3,%a1@(8) 4a99c: 8481 orl %d1,%d2 new_block->prev = prev; 4a99e: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4a9a2: 2381 1800 movel %d1,%a1@(00000000,%d1:l) next->prev = new_block; 4a9a6: 2749 000c movel %a1,%a3@(12) prev->next = new_block; 4a9aa: 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; 4a9ae: 2342 0004 movel %d2,%a1@(4) 4a9b2: 6038 bras 4a9ec <_Heap_Free+0x154> 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; 4a9b4: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a9b6: 74fe moveq #-2,%d2 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; 4a9b8: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4a9ba: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4a9be: 2348 000c movel %a0,%a1@(12) 4a9c2: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4a9c6: 2228 0038 movel %a0@(56),%d1 4a9ca: 5281 addql #1,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4a9cc: 234b 0008 movel %a3,%a1@(8) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4a9d0: c5aa 0004 andl %d2,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4a9d4: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4a9d8: 2480 movel %d0,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4a9da: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4a9de: 2141 0038 movel %d1,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4a9e2: b2a8 003c cmpl %a0@(60),%d1 4a9e6: 6304 blss 4a9ec <_Heap_Free+0x154> stats->max_free_blocks = stats->free_blocks; 4a9e8: 2141 003c movel %d1,%a0@(60) } } /* Statistics */ --stats->used_blocks; 4a9ec: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4a9f0: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4a9f4: 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; 4a9f8: 7001 moveq #1,%d0 4a9fa: 6002 bras 4a9fe <_Heap_Free+0x166> /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 4a9fc: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4a9fe: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4aa02: 4e5e unlk %fp ... =============================================================================== 0005a070 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5a070: 4e56 0000 linkw %fp,#0 5a074: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5a078: 2040 moveal %d0,%a0 5a07a: 5188 subql #8,%a0 5a07c: 226e 0008 moveal %fp@(8),%a1 5a080: 2f02 movel %d2,%sp@- 5a082: 2400 movel %d0,%d2 5a084: 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 5a08a: 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); 5a08e: 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; 5a090: b488 cmpl %a0,%d2 5a092: 620c bhis 5a0a0 <_Heap_Size_of_alloc_area+0x30> 5a094: b1e9 0024 cmpal %a1@(36),%a0 5a098: 53c1 sls %d1 5a09a: 49c1 extbl %d1 5a09c: 4481 negl %d1 5a09e: 6002 bras 5a0a2 <_Heap_Size_of_alloc_area+0x32> 5a0a0: 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 ) ) { 5a0a2: 4a01 tstb %d1 5a0a4: 673a beqs 5a0e0 <_Heap_Size_of_alloc_area+0x70> - 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; 5a0a6: 72fe moveq #-2,%d1 5a0a8: 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); 5a0ac: 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; 5a0b0: b488 cmpl %a0,%d2 5a0b2: 620c bhis 5a0c0 <_Heap_Size_of_alloc_area+0x50> <== NEVER TAKEN 5a0b4: b1e9 0024 cmpal %a1@(36),%a0 5a0b8: 53c1 sls %d1 5a0ba: 49c1 extbl %d1 5a0bc: 4481 negl %d1 5a0be: 6002 bras 5a0c2 <_Heap_Size_of_alloc_area+0x52> 5a0c0: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5a0c2: 4a01 tstb %d1 5a0c4: 671a beqs 5a0e0 <_Heap_Size_of_alloc_area+0x70> <== 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; 5a0c6: 7201 moveq #1,%d1 5a0c8: c2a8 0004 andl %a0@(4),%d1 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5a0cc: 6712 beqs 5a0e0 <_Heap_Size_of_alloc_area+0x70> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5a0ce: 7204 moveq #4,%d1 5a0d0: 9280 subl %d0,%d1 5a0d2: 2001 movel %d1,%d0 5a0d4: d088 addl %a0,%d0 5a0d6: 226e 0010 moveal %fp@(16),%a1 5a0da: 2280 movel %d0,%a1@ return true; 5a0dc: 7001 moveq #1,%d0 5a0de: 6002 bras 5a0e2 <_Heap_Size_of_alloc_area+0x72> if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5a0e0: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 5a0e2: 241f movel %sp@+,%d2 5a0e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000473be <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 473be: 4e56 ffd0 linkw %fp,#-48 473c2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 473c6: 266e 0008 moveal %fp@(8),%a3 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 473ca: 45fa ffac lea %pc@(47378 <_Heap_Walk_print_nothing>),%a2 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 473ce: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 473d2: 282b 0010 movel %a3@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 473d6: 2a2b 0014 movel %a3@(20),%d5 Heap_Block *const first_block = heap->first_block; 473da: 2c2b 0020 movel %a3@(32),%d6 Heap_Block *const last_block = heap->last_block; 473de: 2e2b 0024 movel %a3@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 473e2: 4a2e 0013 tstb %fp@(19) 473e6: 6704 beqs 473ec <_Heap_Walk+0x2e> 473e8: 45fa ff96 lea %pc@(47380 <_Heap_Walk_print>),%a2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 473ec: 7003 moveq #3,%d0 473ee: b0b9 0005 fae0 cmpl 5fae0 <_System_state_Current>,%d0 473f4: 6600 02fc bnew 476f2 <_Heap_Walk+0x334> 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)( 473f8: 2f2b 000c movel %a3@(12),%sp@- 473fc: 2f2b 0008 movel %a3@(8),%sp@- 47400: 2f07 movel %d7,%sp@- 47402: 2f06 movel %d6,%sp@- 47404: 2f2b 001c movel %a3@(28),%sp@- 47408: 2f2b 0018 movel %a3@(24),%sp@- 4740c: 2f05 movel %d5,%sp@- 4740e: 2f04 movel %d4,%sp@- 47410: 4879 0005 bfa7 pea 5bfa7 <_Status_Object_name_errors_to_status+0x5d> 47416: 42a7 clrl %sp@- 47418: 2f02 movel %d2,%sp@- 4741a: 4e92 jsr %a2@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4741c: 4fef 002c lea %sp@(44),%sp 47420: 4a84 tstl %d4 47422: 6608 bnes 4742c <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 47424: 4879 0005 c038 pea 5c038 <_Status_Object_name_errors_to_status+0xee> 4742a: 606c bras 47498 <_Heap_Walk+0xda> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 4742c: 7003 moveq #3,%d0 4742e: c084 andl %d4,%d0 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47430: 670c beqs 4743e <_Heap_Walk+0x80> (*printer)( 47432: 2f04 movel %d4,%sp@- 47434: 4879 0005 c04b pea 5c04b <_Status_Object_name_errors_to_status+0x101> 4743a: 6000 02ca braw 47706 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4743e: 2205 movel %d5,%d1 47440: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 47444: 4a80 tstl %d0 47446: 670c beqs 47454 <_Heap_Walk+0x96> (*printer)( 47448: 2f05 movel %d5,%sp@- 4744a: 4879 0005 c069 pea 5c069 <_Status_Object_name_errors_to_status+0x11f> 47450: 6000 02b4 braw 47706 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 47454: 2006 movel %d6,%d0 47456: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47458: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( 4745c: 4a81 tstl %d1 4745e: 670c beqs 4746c <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 47460: 2f06 movel %d6,%sp@- 47462: 4879 0005 c08d pea 5c08d <_Status_Object_name_errors_to_status+0x143> 47468: 6000 029c braw 47706 <_Heap_Walk+0x348> 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; 4746c: 7001 moveq #1,%d0 4746e: 2046 moveal %d6,%a0 47470: c0a8 0004 andl %a0@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 47474: 6608 bnes 4747e <_Heap_Walk+0xc0> (*printer)( 47476: 4879 0005 c0be pea 5c0be <_Status_Object_name_errors_to_status+0x174> 4747c: 601a bras 47498 <_Heap_Walk+0xda> - 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; 4747e: 70fe moveq #-2,%d0 47480: 2047 moveal %d7,%a0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47482: 2847 moveal %d7,%a4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47484: 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); 47488: d9c0 addal %d0,%a4 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; 4748a: 7001 moveq #1,%d0 4748c: c0ac 0004 andl %a4@(4),%d0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 47490: 6616 bnes 474a8 <_Heap_Walk+0xea> (*printer)( 47492: 4879 0005 c0ec pea 5c0ec <_Status_Object_name_errors_to_status+0x1a2> 47498: 4878 0001 pea 1 4749c: 2f02 movel %d2,%sp@- 4749e: 4e92 jsr %a2@ 474a0: 4fef 000c lea %sp@(12),%sp 474a4: 6000 009e braw 47544 <_Heap_Walk+0x186> ); return false; } if ( 474a8: bc8c cmpl %a4,%d6 474aa: 6708 beqs 474b4 <_Heap_Walk+0xf6> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 474ac: 4879 0005 c101 pea 5c101 <_Status_Object_name_errors_to_status+0x1b7> 474b2: 60e4 bras 47498 <_Heap_Walk+0xda> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 474b4: 262b 0010 movel %a3@(16),%d3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 474b8: 220b movel %a3,%d1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 474ba: 206b 0008 moveal %a3@(8),%a0 474be: 2d44 fff8 movel %d4,%fp@(-8) 474c2: 2d43 fffc movel %d3,%fp@(-4) 474c6: 6000 0088 braw 47550 <_Heap_Walk+0x192> 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; 474ca: b1eb 0020 cmpal %a3@(32),%a0 474ce: 650c bcss 474dc <_Heap_Walk+0x11e> 474d0: b1eb 0024 cmpal %a3@(36),%a0 474d4: 53c0 sls %d0 474d6: 49c0 extbl %d0 474d8: 4480 negl %d0 474da: 6002 bras 474de <_Heap_Walk+0x120> 474dc: 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 ) ) { 474de: 4a00 tstb %d0 474e0: 660c bnes 474ee <_Heap_Walk+0x130> (*printer)( 474e2: 2f08 movel %a0,%sp@- 474e4: 4879 0005 c130 pea 5c130 <_Status_Object_name_errors_to_status+0x1e6> 474ea: 6000 021a braw 47706 <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 474ee: 4be8 0008 lea %a0@(8),%a5 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 474f2: 200d movel %a5,%d0 474f4: 262e fffc movel %fp@(-4),%d3 474f8: 4c43 0004 remul %d3,%d4,%d0 ); return false; } if ( 474fc: 4a84 tstl %d4 474fe: 670c beqs 4750c <_Heap_Walk+0x14e> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47500: 2f08 movel %a0,%sp@- 47502: 4879 0005 c150 pea 5c150 <_Status_Object_name_errors_to_status+0x206> 47508: 6000 01fc braw 47706 <_Heap_Walk+0x348> - 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; 4750c: 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; 4750e: 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; 47510: 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; 47514: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 47518: 670c beqs 47526 <_Heap_Walk+0x168> (*printer)( 4751a: 2f08 movel %a0,%sp@- 4751c: 4879 0005 c180 pea 5c180 <_Status_Object_name_errors_to_status+0x236> 47522: 6000 01e2 braw 47706 <_Heap_Walk+0x348> ); return false; } if ( free_block->prev != prev_block ) { 47526: 2028 000c movel %a0@(12),%d0 4752a: b280 cmpl %d0,%d1 4752c: 671c beqs 4754a <_Heap_Walk+0x18c> (*printer)( 4752e: 2f00 movel %d0,%sp@- 47530: 2f08 movel %a0,%sp@- 47532: 4879 0005 c19c pea 5c19c <_Status_Object_name_errors_to_status+0x252> 47538: 4878 0001 pea 1 4753c: 2f02 movel %d2,%sp@- 4753e: 4e92 jsr %a2@ 47540: 4fef 0014 lea %sp@(20),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 47544: 4200 clrb %d0 47546: 6000 01ac braw 476f4 <_Heap_Walk+0x336> return false; } prev_block = free_block; free_block = free_block->next; 4754a: 2208 movel %a0,%d1 4754c: 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 ) { 47550: b7c8 cmpal %a0,%a3 47552: 6600 ff76 bnew 474ca <_Heap_Walk+0x10c> 47556: 282e fff8 movel %fp@(-8),%d4 4755a: 6002 bras 4755e <_Heap_Walk+0x1a0> block->prev_size ); } block = next_block; } while ( block != first_block ); 4755c: 284d moveal %a5,%a4 return true; } 4755e: 202c 0004 movel %a4@(4),%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47562: 76fe moveq #-2,%d3 47564: c680 andl %d0,%d3 47566: 2d40 fffc movel %d0,%fp@(-4) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4756a: 4bf4 3800 lea %a4@(00000000,%d3:l),%a5 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; 4756e: bbeb 0020 cmpal %a3@(32),%a5 47572: 650c bcss 47580 <_Heap_Walk+0x1c2> <== NEVER TAKEN 47574: bbeb 0024 cmpal %a3@(36),%a5 47578: 53c0 sls %d0 4757a: 49c0 extbl %d0 4757c: 4480 negl %d0 4757e: 6002 bras 47582 <_Heap_Walk+0x1c4> 47580: 4280 clrl %d0 <== NOT EXECUTED bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 47582: 4a00 tstb %d0 47584: 660c bnes 47592 <_Heap_Walk+0x1d4> (*printer)( 47586: 2f0d movel %a5,%sp@- 47588: 2f0c movel %a4,%sp@- 4758a: 4879 0005 c1ce pea 5c1ce <_Status_Object_name_errors_to_status+0x284> 47590: 60a6 bras 47538 <_Heap_Walk+0x17a> 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; 47592: be8c cmpl %a4,%d7 47594: 56c0 sne %d0 47596: 2200 movel %d0,%d1 47598: 4481 negl %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4759a: 2003 movel %d3,%d0 4759c: 1d41 fffb moveb %d1,%fp@(-5) 475a0: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 475a4: 4a81 tstl %d1 475a6: 6714 beqs 475bc <_Heap_Walk+0x1fe> 475a8: 4a2e fffb tstb %fp@(-5) 475ac: 670e beqs 475bc <_Heap_Walk+0x1fe> (*printer)( 475ae: 2f03 movel %d3,%sp@- 475b0: 2f0c movel %a4,%sp@- 475b2: 4879 0005 c1fb pea 5c1fb <_Status_Object_name_errors_to_status+0x2b1> 475b8: 6000 ff7e braw 47538 <_Heap_Walk+0x17a> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 475bc: ba83 cmpl %d3,%d5 475be: 6322 blss 475e2 <_Heap_Walk+0x224> 475c0: 4a2e fffb tstb %fp@(-5) 475c4: 671c beqs 475e2 <_Heap_Walk+0x224> <== NEVER TAKEN (*printer)( 475c6: 2f05 movel %d5,%sp@- 475c8: 2f03 movel %d3,%sp@- 475ca: 2f0c movel %a4,%sp@- 475cc: 4879 0005 c229 pea 5c229 <_Status_Object_name_errors_to_status+0x2df> 475d2: 4878 0001 pea 1 475d6: 2f02 movel %d2,%sp@- 475d8: 4e92 jsr %a2@ block, block_size, min_block_size ); return false; 475da: 4fef 0018 lea %sp@(24),%sp 475de: 6000 ff64 braw 47544 <_Heap_Walk+0x186> } if ( next_block_begin <= block_begin && is_not_last_block ) { 475e2: b9cd cmpal %a5,%a4 475e4: 6514 bcss 475fa <_Heap_Walk+0x23c> 475e6: 4a2e fffb tstb %fp@(-5) 475ea: 670e beqs 475fa <_Heap_Walk+0x23c> (*printer)( 475ec: 2f0d movel %a5,%sp@- 475ee: 2f0c movel %a4,%sp@- 475f0: 4879 0005 c254 pea 5c254 <_Status_Object_name_errors_to_status+0x30a> 475f6: 6000 ff40 braw 47538 <_Heap_Walk+0x17a> 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; 475fa: 7001 moveq #1,%d0 475fc: c0ae fffc andl %fp@(-4),%d0 47600: 2d40 fffc movel %d0,%fp@(-4) 47604: 7001 moveq #1,%d0 47606: c0ad 0004 andl %a5@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4760a: 6600 00ae bnew 476ba <_Heap_Walk+0x2fc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4760e: 222b 0008 movel %a3@(8),%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 47612: 43f9 0005 bf74 lea 5bf74 <_Status_Object_name_errors_to_status+0x2a>,%a1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 47618: 206c 0008 moveal %a4@(8),%a0 4761c: 2d41 fff8 movel %d1,%fp@(-8) 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)( 47620: b1eb 000c cmpal %a3@(12),%a0 47624: 6710 beqs 47636 <_Heap_Walk+0x278> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 47626: 43f9 0005 bec0 lea 5bec0 ,%a1 4762c: b7c8 cmpal %a0,%a3 4762e: 6606 bnes 47636 <_Heap_Walk+0x278> 47630: 43f9 0005 bf83 lea 5bf83 <_Status_Object_name_errors_to_status+0x39>,%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 ? 47636: 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)( 4763a: 223c 0005 bf8d movel #376717,%d1 47640: b0ae fff8 cmpl %fp@(-8),%d0 47644: 6710 beqs 47656 <_Heap_Walk+0x298> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 47646: 223c 0005 bec0 movel #376512,%d1 4764c: b7c0 cmpal %d0,%a3 4764e: 6606 bnes 47656 <_Heap_Walk+0x298> 47650: 223c 0005 bf9d movel #376733,%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 47656: 2f09 movel %a1,%sp@- 47658: 2f08 movel %a0,%sp@- 4765a: 2f01 movel %d1,%sp@- 4765c: 2f00 movel %d0,%sp@- 4765e: 2f03 movel %d3,%sp@- 47660: 2f0c movel %a4,%sp@- 47662: 4879 0005 c288 pea 5c288 <_Status_Object_name_errors_to_status+0x33e> 47668: 42a7 clrl %sp@- 4766a: 2f02 movel %d2,%sp@- 4766c: 4e92 jsr %a2@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4766e: 2015 movel %a5@,%d0 47670: 4fef 0024 lea %sp@(36),%sp 47674: b083 cmpl %d3,%d0 47676: 671e beqs 47696 <_Heap_Walk+0x2d8> (*printer)( 47678: 2f0d movel %a5,%sp@- 4767a: 2f00 movel %d0,%sp@- 4767c: 2f03 movel %d3,%sp@- 4767e: 2f0c movel %a4,%sp@- 47680: 4879 0005 c2bd pea 5c2bd <_Status_Object_name_errors_to_status+0x373> 47686: 4878 0001 pea 1 4768a: 2f02 movel %d2,%sp@- 4768c: 4e92 jsr %a2@ 4768e: 4fef 001c lea %sp@(28),%sp 47692: 6000 feb0 braw 47544 <_Heap_Walk+0x186> ); return false; } if ( !prev_used ) { 47696: 4aae fffc tstl %fp@(-4) 4769a: 660a bnes 476a6 <_Heap_Walk+0x2e8> (*printer)( 4769c: 2f0c movel %a4,%sp@- 4769e: 4879 0005 c2f6 pea 5c2f6 <_Status_Object_name_errors_to_status+0x3ac> 476a4: 6060 bras 47706 <_Heap_Walk+0x348> 476a6: 206b 0008 moveal %a3@(8),%a0 476aa: 6008 bras 476b4 <_Heap_Walk+0x2f6> { 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 ) { 476ac: b9c8 cmpal %a0,%a4 476ae: 673c beqs 476ec <_Heap_Walk+0x32e> return true; } free_block = free_block->next; 476b0: 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 ) { 476b4: b7c8 cmpal %a0,%a3 476b6: 66f4 bnes 476ac <_Heap_Walk+0x2ee> 476b8: 6044 bras 476fe <_Heap_Walk+0x340> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 476ba: 4aae fffc tstl %fp@(-4) 476be: 6716 beqs 476d6 <_Heap_Walk+0x318> (*printer)( 476c0: 2f03 movel %d3,%sp@- 476c2: 2f0c movel %a4,%sp@- 476c4: 4879 0005 c325 pea 5c325 <_Status_Object_name_errors_to_status+0x3db> 476ca: 42a7 clrl %sp@- 476cc: 2f02 movel %d2,%sp@- 476ce: 4e92 jsr %a2@ 476d0: 4fef 0014 lea %sp@(20),%sp 476d4: 6016 bras 476ec <_Heap_Walk+0x32e> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 476d6: 2f14 movel %a4@,%sp@- 476d8: 2f03 movel %d3,%sp@- 476da: 2f0c movel %a4,%sp@- 476dc: 4879 0005 c33c pea 5c33c <_Status_Object_name_errors_to_status+0x3f2> 476e2: 42a7 clrl %sp@- 476e4: 2f02 movel %d2,%sp@- 476e6: 4e92 jsr %a2@ 476e8: 4fef 0018 lea %sp@(24),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 476ec: bc8d cmpl %a5,%d6 476ee: 6600 fe6c bnew 4755c <_Heap_Walk+0x19e> Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 476f2: 7001 moveq #1,%d0 block = next_block; } while ( block != first_block ); return true; } 476f4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 476fa: 4e5e unlk %fp 476fc: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 476fe: 2f0c movel %a4,%sp@- 47700: 4879 0005 c361 pea 5c361 <_Status_Object_name_errors_to_status+0x417> 47706: 4878 0001 pea 1 4770a: 2f02 movel %d2,%sp@- 4770c: 4e92 jsr %a2@ 4770e: 4fef 0010 lea %sp@(16),%sp 47712: 6000 fe30 braw 47544 <_Heap_Walk+0x186> ... =============================================================================== 00046b84 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46b84: 4e56 0000 linkw %fp,#0 46b88: 222e 000c movel %fp@(12),%d1 46b8c: 2f02 movel %d2,%sp@- 46b8e: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46b92: 13c1 0005 d8c2 moveb %d1,5d8c2 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46b98: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46b9a: 202e 0008 movel %fp@(8),%d0 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46b9e: 0281 0000 00ff andil #255,%d1 bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46ba4: 23c0 0005 d8be movel %d0,5d8be <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46baa: 2f01 movel %d1,%sp@- ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 46bac: 23c2 0005 d8c4 movel %d2,5d8c4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46bb2: 2f00 movel %d0,%sp@- 46bb4: 4eb9 0004 875a jsr 4875a <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46bba: 7005 moveq #5,%d0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46bbc: 2042 moveal %d2,%a0 46bbe: 243c 0000 0700 movel #1792,%d2 46bc4: 23c0 0005 d968 movel %d0,5d968 <_System_state_Current> 46bca: 40c0 movew %sr,%d0 46bcc: 8082 orl %d2,%d0 46bce: 46c0 movew %d0,%sr 46bd0: 2008 movel %a0,%d0 <== NOT EXECUTED 46bd2: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46bd8: 4ac8 halt <== NOT EXECUTED 46bda: 4fef 000c lea %sp@(12),%sp 46bde: 60fe bras 46bde <_Internal_error_Occurred+0x5a> =============================================================================== 00046c40 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46c40: 4e56 fff0 linkw %fp,#-16 46c44: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46c48: 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 ) 46c4c: 4aaa 0014 tstl %a2@(20) 46c50: 675e beqs 46cb0 <_Objects_Allocate+0x70> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46c52: 240a movel %a2,%d2 46c54: 0682 0000 001c addil #28,%d2 46c5a: 47f9 0004 63bc lea 463bc <_Chain_Get>,%a3 46c60: 2f02 movel %d2,%sp@- 46c62: 4e93 jsr %a3@ if ( information->auto_extend ) { 46c64: 588f addql #4,%sp 46c66: 4a2a 0010 tstb %a2@(16) 46c6a: 6746 beqs 46cb2 <_Objects_Allocate+0x72> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 46c6c: 4a80 tstl %d0 46c6e: 6612 bnes 46c82 <_Objects_Allocate+0x42> _Objects_Extend_information( information ); 46c70: 2f0a movel %a2,%sp@- 46c72: 4eb9 0004 6ce4 jsr 46ce4 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46c78: 2f02 movel %d2,%sp@- 46c7a: 4e93 jsr %a3@ } if ( the_object ) { 46c7c: 508f addql #8,%sp 46c7e: 4a80 tstl %d0 46c80: 6730 beqs 46cb2 <_Objects_Allocate+0x72> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46c82: 2040 moveal %d0,%a0 46c84: 4281 clrl %d1 46c86: 4282 clrl %d2 46c88: 3228 000a movew %a0@(10),%d1 46c8c: 342a 0008 movew %a2@(8),%d2 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46c90: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46c94: 9282 subl %d2,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 46c96: 342a 0012 movew %a2@(18),%d2 46c9a: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; 46c9e: e589 lsll #2,%d1 46ca0: d1c1 addal %d1,%a0 46ca2: 5390 subql #1,%a0@ information->inactive--; 46ca4: 322a 0028 movew %a2@(40),%d1 46ca8: 5381 subql #1,%d1 46caa: 3541 0028 movew %d1,%a2@(40) 46cae: 6002 bras 46cb2 <_Objects_Allocate+0x72> * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) return NULL; 46cb0: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 46cb2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46cb8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046cbc <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46cbc: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 46cbe: 4e56 0000 linkw %fp,#0 46cc2: 206e 0008 moveal %fp@(8),%a0 46cc6: 226e 000c moveal %fp@(12),%a1 46cca: 2f0a movel %a2,%sp@- 46ccc: 2468 0018 moveal %a0@(24),%a2 46cd0: 3029 000a movew %a1@(10),%d0 46cd4: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 46cd8: 245f moveal %sp@+,%a2 46cda: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46cdc: 4ef9 0004 71ec jmp 471ec <_Objects_Namespace_remove> ... =============================================================================== 00046fec <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 46fec: 4e56 0000 linkw %fp,#0 46ff0: 2f03 movel %d3,%sp@- 46ff2: 362e 000e movew %fp@(14),%d3 46ff6: 2f02 movel %d2,%sp@- 46ff8: 242e 0008 movel %fp@(8),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 46ffc: 4a43 tstw %d3 46ffe: 673a beqs 4703a <_Objects_Get_information+0x4e> /* * 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 ); 47000: 2f02 movel %d2,%sp@- 47002: 4eb9 0004 aa08 jsr 4aa08 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47008: 588f addql #4,%sp 4700a: 4a80 tstl %d0 4700c: 672c beqs 4703a <_Objects_Get_information+0x4e> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 4700e: 0283 0000 ffff andil #65535,%d3 47014: b083 cmpl %d3,%d0 47016: 6522 bcss 4703a <_Objects_Get_information+0x4e> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47018: 41f9 0005 d7e4 lea 5d7e4 <_Objects_Information_table>,%a0 4701e: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 47022: 4a88 tstl %a0 47024: 6714 beqs 4703a <_Objects_Get_information+0x4e> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 47026: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0 if ( !info ) 4702a: 6710 beqs 4703c <_Objects_Get_information+0x50> <== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 4702c: 2040 moveal %d0,%a0 4702e: 4a68 000e tstw %a0@(14) 47032: 56c1 sne %d1 47034: 49c1 extbl %d1 47036: c081 andl %d1,%d0 47038: 6002 bras 4703c <_Objects_Get_information+0x50> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 4703a: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 4703c: 242e fff8 movel %fp@(-8),%d2 47040: 262e fffc movel %fp@(-4),%d3 47044: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053ce0 <_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; 53ce0: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 53ce2: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53ce4: 4e56 0000 linkw %fp,#0 53ce8: 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; 53cec: 90a8 0006 subl %a0@(6),%d0 53cf0: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 53cf4: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53cf8: 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 ) { 53cfc: b081 cmpl %d1,%d0 53cfe: 620e bhis 53d0e <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 53d00: 2068 0018 moveal %a0@(24),%a0 53d04: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 53d08: 6704 beqs 53d0e <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 53d0a: 4291 clrl %a1@ return the_object; 53d0c: 6006 bras 53d14 <_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; 53d0e: 7001 moveq #1,%d0 53d10: 2280 movel %d0,%a1@ return NULL; 53d12: 4280 clrl %d0 } 53d14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000477a4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 477a4: 4e56 fffc linkw %fp,#-4 477a8: 222e 0008 movel %fp@(8),%d1 477ac: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 477ae: 4a81 tstl %d1 477b0: 660a bnes 477bc <_Objects_Id_to_name+0x18> 477b2: 2079 0005 e914 moveal 5e914 <_Per_CPU_Information+0xc>,%a0 477b8: 2228 0008 movel %a0@(8),%d1 477bc: 7418 moveq #24,%d2 477be: 2001 movel %d1,%d0 477c0: e4a8 lsrl %d2,%d0 477c2: 143c 0007 moveb #7,%d2 477c6: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 477c8: 143c 0002 moveb #2,%d2 477cc: 2040 moveal %d0,%a0 477ce: 5388 subql #1,%a0 477d0: b488 cmpl %a0,%d2 477d2: 6538 bcss 4780c <_Objects_Id_to_name+0x68> 477d4: 6040 bras 47816 <_Objects_Id_to_name+0x72> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 477d6: 2001 movel %d1,%d0 477d8: 741b moveq #27,%d2 477da: 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 ]; 477dc: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 477e0: 672a beqs 4780c <_Objects_Id_to_name+0x68> <== 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 ); 477e2: 486e fffc pea %fp@(-4) 477e6: 2f01 movel %d1,%sp@- 477e8: 2f00 movel %d0,%sp@- 477ea: 4eb9 0004 773c jsr 4773c <_Objects_Get> if ( !the_object ) 477f0: 4fef 000c lea %sp@(12),%sp 477f4: 4a80 tstl %d0 477f6: 6714 beqs 4780c <_Objects_Id_to_name+0x68> return OBJECTS_INVALID_ID; *name = the_object->name; 477f8: 206e 000c moveal %fp@(12),%a0 477fc: 2240 moveal %d0,%a1 477fe: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 47802: 4eb9 0004 8374 jsr 48374 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47808: 4280 clrl %d0 4780a: 6002 bras 4780e <_Objects_Id_to_name+0x6a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 4780c: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4780e: 242e fff8 movel %fp@(-8),%d2 47812: 4e5e unlk %fp 47814: 4e75 rts the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 47816: 41f9 0005 e73c lea 5e73c <_Objects_Information_table>,%a0 4781c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47820: 4a88 tstl %a0 47822: 66b2 bnes 477d6 <_Objects_Id_to_name+0x32> 47824: 60e6 bras 4780c <_Objects_Id_to_name+0x68> ... =============================================================================== 0004b31e <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4b31e: 4e56 ffec linkw %fp,#-20 4b322: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b326: 286e 0008 moveal %fp@(8),%a4 4b32a: 246e 000c moveal %fp@(12),%a2 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 4b32e: 4a8a tstl %a2 4b330: 6700 0110 beqw 4b442 <_RBTree_Extract_unprotected+0x124> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 4b334: b5ec 0008 cmpal %a4@(8),%a2 4b338: 661a bnes 4b354 <_RBTree_Extract_unprotected+0x36> if (the_node->child[RBT_RIGHT]) 4b33a: 202a 0008 movel %a2@(8),%d0 4b33e: 6706 beqs 4b346 <_RBTree_Extract_unprotected+0x28> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 4b340: 2940 0008 movel %d0,%a4@(8) 4b344: 600e bras 4b354 <_RBTree_Extract_unprotected+0x36> else { the_rbtree->first[RBT_LEFT] = the_node->parent; 4b346: 2012 movel %a2@,%d0 4b348: 2940 0008 movel %d0,%a4@(8) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4b34c: b08c cmpl %a4,%d0 4b34e: 6604 bnes 4b354 <_RBTree_Extract_unprotected+0x36> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 4b350: 42ac 0008 clrl %a4@(8) 4b354: 2a6a 0004 moveal %a2@(4),%a5 } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4b358: b5ec 000c cmpal %a4@(12),%a2 4b35c: 6618 bnes 4b376 <_RBTree_Extract_unprotected+0x58> if (the_node->child[RBT_LEFT]) 4b35e: 4a8d tstl %a5 4b360: 6706 beqs 4b368 <_RBTree_Extract_unprotected+0x4a> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 4b362: 294d 000c movel %a5,%a4@(12) 4b366: 600e bras 4b376 <_RBTree_Extract_unprotected+0x58> else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 4b368: 2012 movel %a2@,%d0 4b36a: 2940 000c movel %d0,%a4@(12) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4b36e: b08c cmpl %a4,%d0 4b370: 6604 bnes 4b376 <_RBTree_Extract_unprotected+0x58> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 4b372: 42ac 000c clrl %a4@(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]) { 4b376: 264d moveal %a5,%a3 4b378: 4a8d tstl %a5 4b37a: 6778 beqs 4b3f4 <_RBTree_Extract_unprotected+0xd6> 4b37c: 4aaa 0008 tstl %a2@(8) 4b380: 6604 bnes 4b386 <_RBTree_Extract_unprotected+0x68> 4b382: 6078 bras 4b3fc <_RBTree_Extract_unprotected+0xde> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 4b384: 2640 moveal %d0,%a3 4b386: 202b 0008 movel %a3@(8),%d0 4b38a: 66f8 bnes 4b384 <_RBTree_Extract_unprotected+0x66> * 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]; 4b38c: 2a6b 0004 moveal %a3@(4),%a5 if(leaf) { 4b390: 4a8d tstl %a5 4b392: 6704 beqs 4b398 <_RBTree_Extract_unprotected+0x7a> leaf->parent = target->parent; 4b394: 2a93 movel %a3@,%a5@ 4b396: 600a bras 4b3a2 <_RBTree_Extract_unprotected+0x84> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4b398: 2f0b movel %a3,%sp@- 4b39a: 4eb9 0004 b1d8 jsr 4b1d8 <_RBTree_Extract_validate_unprotected> 4b3a0: 588f addql #4,%sp } victim_color = target->color; dir = target != target->parent->child[0]; 4b3a2: 2053 moveal %a3@,%a0 4b3a4: b7e8 0004 cmpal %a0@(4),%a3 4b3a8: 56c1 sne %d1 target->parent->child[dir] = leaf; 4b3aa: 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]; 4b3ac: 49c1 extbl %d1 target->parent->child[dir] = leaf; 4b3ae: 9481 subl %d1,%d2 4b3b0: 218d 2c00 movel %a5,%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; 4b3b4: 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]; 4b3b6: 2052 moveal %a2@,%a0 4b3b8: b5e8 0004 cmpal %a0@(4),%a2 4b3bc: 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; 4b3be: 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]; 4b3c2: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4b3c4: 9481 subl %d1,%d2 4b3c6: 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]; 4b3ca: 276a 0008 0008 movel %a2@(8),%a3@(8) if (the_node->child[RBT_RIGHT]) 4b3d0: 206a 0008 moveal %a2@(8),%a0 4b3d4: 4a88 tstl %a0 4b3d6: 6702 beqs 4b3da <_RBTree_Extract_unprotected+0xbc><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4b3d8: 208b movel %a3,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4b3da: 276a 0004 0004 movel %a2@(4),%a3@(4) if (the_node->child[RBT_LEFT]) 4b3e0: 206a 0004 moveal %a2@(4),%a0 4b3e4: 4a88 tstl %a0 4b3e6: 6702 beqs 4b3ea <_RBTree_Extract_unprotected+0xcc> the_node->child[RBT_LEFT]->parent = target; 4b3e8: 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; 4b3ea: 2692 movel %a2@,%a3@ target->color = the_node->color; 4b3ec: 276a 000c 000c movel %a2@(12),%a3@(12) 4b3f2: 602c bras 4b420 <_RBTree_Extract_unprotected+0x102> * 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]; 4b3f4: 2a6a 0008 moveal %a2@(8),%a5 if( leaf ) { 4b3f8: 4a8d tstl %a5 4b3fa: 6704 beqs 4b400 <_RBTree_Extract_unprotected+0xe2> leaf->parent = the_node->parent; 4b3fc: 2a92 movel %a2@,%a5@ 4b3fe: 600a bras 4b40a <_RBTree_Extract_unprotected+0xec> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4b400: 2f0a movel %a2,%sp@- 4b402: 4eb9 0004 b1d8 jsr 4b1d8 <_RBTree_Extract_validate_unprotected> 4b408: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4b40a: 2052 moveal %a2@,%a0 4b40c: b5e8 0004 cmpal %a0@(4),%a2 4b410: 56c1 sne %d1 the_node->parent->child[dir] = leaf; 4b412: 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]; 4b414: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4b416: 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; 4b418: 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; 4b41c: 218d 2c00 movel %a5,%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 */ 4b420: 4a80 tstl %d0 4b422: 6608 bnes 4b42c <_RBTree_Extract_unprotected+0x10e> if (leaf) { 4b424: 4a8d tstl %a5 4b426: 6704 beqs 4b42c <_RBTree_Extract_unprotected+0x10e> leaf->color = RBT_BLACK; /* case 2 */ 4b428: 42ad 000c clrl %a5@(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; 4b42c: 206c 0004 moveal %a4@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 4b430: 42aa 0008 clrl %a2@(8) 4b434: 42aa 0004 clrl %a2@(4) 4b438: 4292 clrl %a2@ 4b43a: 4a88 tstl %a0 4b43c: 6704 beqs 4b442 <_RBTree_Extract_unprotected+0x124> 4b43e: 42a8 000c clrl %a0@(12) } 4b442: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b448: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b1d8 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 4b1d8: 4e56 ffe8 linkw %fp,#-24 4b1dc: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b1e0: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 4b1e4: 2453 moveal %a3@,%a2 if(!parent->parent) return; 4b1e6: 4a92 tstl %a2@ 4b1e8: 6700 012a beqw 4b314 <_RBTree_Extract_validate_unprotected+0x13c> sibling = _RBTree_Sibling(the_node); 4b1ec: 2f0b movel %a3,%sp@- 4b1ee: 49fa ff6c lea %pc@(4b15c <_RBTree_Sibling>),%a4 4b1f2: 4e94 jsr %a4@ 4b1f4: 588f addql #4,%sp */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); 4b1f6: 4bfa ff8e lea %pc@(4b186 <_RBTree_Rotate>),%a5 RBTree_Direction dir; parent = the_node->parent; if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); 4b1fa: 2040 moveal %d0,%a0 /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 4b1fc: 6000 00ec braw 4b2ea <_RBTree_Extract_validate_unprotected+0x112> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4b200: 4a88 tstl %a0 4b202: 6730 beqs 4b234 <_RBTree_Extract_validate_unprotected+0x5c><== NEVER TAKEN 4b204: 7001 moveq #1,%d0 4b206: b0a8 000c cmpl %a0@(12),%d0 4b20a: 6628 bnes 4b234 <_RBTree_Extract_validate_unprotected+0x5c> * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4b20c: b7ea 0004 cmpal %a2@(4),%a3 4b210: 56c2 sne %d2 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4b212: 2540 000c movel %d0,%a2@(12) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4b216: 49c2 extbl %d2 4b218: 4482 negl %d2 * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; 4b21a: 42a8 000c clrl %a0@(12) dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); 4b21e: 2f02 movel %d2,%sp@- 4b220: 2f0a movel %a2,%sp@- 4b222: 4e95 jsr %a5@ sibling = parent->child[!dir]; 4b224: 508f addql #8,%sp 4b226: 4a82 tstl %d2 4b228: 57c0 seq %d0 4b22a: 7201 moveq #1,%d1 4b22c: 49c0 extbl %d0 4b22e: 9280 subl %d0,%d1 4b230: 2072 1c00 moveal %a2@(00000000,%d1:l:4),%a0 } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 4b234: 2268 0008 moveal %a0@(8),%a1 4b238: 4a89 tstl %a1 4b23a: 670e beqs 4b24a <_RBTree_Extract_validate_unprotected+0x72> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 4b23c: 7001 moveq #1,%d0 4b23e: b0a9 000c cmpl %a1@(12),%d0 4b242: 57c0 seq %d0 4b244: 49c0 extbl %d0 4b246: 4480 negl %d0 4b248: 6002 bras 4b24c <_RBTree_Extract_validate_unprotected+0x74> 4b24a: 4280 clrl %d0 _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 4b24c: 4a00 tstb %d0 4b24e: 6630 bnes 4b280 <_RBTree_Extract_validate_unprotected+0xa8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 4b250: 2268 0004 moveal %a0@(4),%a1 4b254: 4a89 tstl %a1 4b256: 670e beqs 4b266 <_RBTree_Extract_validate_unprotected+0x8e> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 4b258: 7201 moveq #1,%d1 4b25a: b2a9 000c cmpl %a1@(12),%d1 4b25e: 57c0 seq %d0 4b260: 49c0 extbl %d0 4b262: 4480 negl %d0 4b264: 6002 bras 4b268 <_RBTree_Extract_validate_unprotected+0x90> 4b266: 4280 clrl %d0 _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && 4b268: 4a00 tstb %d0 4b26a: 6614 bnes 4b280 <_RBTree_Extract_validate_unprotected+0xa8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 4b26c: 7001 moveq #1,%d0 4b26e: 2140 000c movel %d0,%a0@(12) 4b272: b0aa 000c cmpl %a2@(12),%d0 4b276: 6600 008c bnew 4b304 <_RBTree_Extract_validate_unprotected+0x12c> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 4b27a: 42aa 000c clrl %a2@(12) break; 4b27e: 6078 bras 4b2f8 <_RBTree_Extract_validate_unprotected+0x120> * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; 4b280: b7ea 0004 cmpal %a2@(4),%a3 4b284: 56c2 sne %d2 4b286: 49c2 extbl %d2 4b288: 4482 negl %d2 if (!_RBTree_Is_red(sibling->child[!dir])) { 4b28a: 57c3 seq %d3 4b28c: 49c3 extbl %d3 4b28e: 4483 negl %d3 4b290: 2270 3c04 moveal %a0@(00000004,%d3:l:4),%a1 4b294: 4a89 tstl %a1 4b296: 670e beqs 4b2a6 <_RBTree_Extract_validate_unprotected+0xce> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ void _RBTree_Extract_validate_unprotected( 4b298: 7201 moveq #1,%d1 4b29a: b2a9 000c cmpl %a1@(12),%d1 4b29e: 57c0 seq %d0 4b2a0: 49c0 extbl %d0 4b2a2: 4480 negl %d0 4b2a4: 6002 bras 4b2a8 <_RBTree_Extract_validate_unprotected+0xd0> 4b2a6: 4280 clrl %d0 * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { 4b2a8: 4a00 tstb %d0 4b2aa: 6620 bnes 4b2cc <_RBTree_Extract_validate_unprotected+0xf4> sibling->color = RBT_RED; 4b2ac: 7001 moveq #1,%d0 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4b2ae: 7201 moveq #1,%d1 * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 4b2b0: 2270 2c04 moveal %a0@(00000004,%d2:l:4),%a1 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; 4b2b4: 2140 000c movel %d0,%a0@(12) sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4b2b8: b581 eorl %d2,%d1 * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[!dir])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; 4b2ba: 42a9 000c clrl %a1@(12) _RBTree_Rotate(sibling, !dir); 4b2be: 2f01 movel %d1,%sp@- 4b2c0: 2f08 movel %a0,%sp@- 4b2c2: 4eba fec2 jsr %pc@(4b186 <_RBTree_Rotate>) sibling = parent->child[!dir]; 4b2c6: 508f addql #8,%sp 4b2c8: 2072 3c04 moveal %a2@(00000004,%d3:l:4),%a0 } sibling->color = parent->color; 4b2cc: 216a 000c 000c movel %a2@(12),%a0@(12) parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 4b2d2: 2070 3c04 moveal %a0@(00000004,%d3:l:4),%a0 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; } sibling->color = parent->color; parent->color = RBT_BLACK; 4b2d6: 42aa 000c clrl %a2@(12) sibling->child[!dir]->color = RBT_BLACK; 4b2da: 42a8 000c clrl %a0@(12) _RBTree_Rotate(parent, dir); 4b2de: 2f02 movel %d2,%sp@- 4b2e0: 2f0a movel %a2,%sp@- 4b2e2: 4eba fea2 jsr %pc@(4b186 <_RBTree_Rotate>) break; /* done */ 4b2e6: 508f addql #8,%sp 4b2e8: 600e bras 4b2f8 <_RBTree_Extract_validate_unprotected+0x120> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 4b2ea: 7001 moveq #1,%d0 4b2ec: b0ab 000c cmpl %a3@(12),%d0 4b2f0: 6706 beqs 4b2f8 <_RBTree_Extract_validate_unprotected+0x120> 4b2f2: 4a92 tstl %a2@ 4b2f4: 6600 ff0a bnew 4b200 <_RBTree_Extract_validate_unprotected+0x28> sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4b2f8: 2053 moveal %a3@,%a0 4b2fa: 4a90 tstl %a0@ 4b2fc: 6616 bnes 4b314 <_RBTree_Extract_validate_unprotected+0x13c> 4b2fe: 42ab 000c clrl %a3@(12) 4b302: 6010 bras 4b314 <_RBTree_Extract_validate_unprotected+0x13c> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 4b304: 2412 movel %a2@,%d2 sibling = _RBTree_Sibling(the_node); 4b306: 264a moveal %a2,%a3 4b308: 2f0a movel %a2,%sp@- if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 4b30a: 2442 moveal %d2,%a2 sibling = _RBTree_Sibling(the_node); 4b30c: 4e94 jsr %a4@ 4b30e: 588f addql #4,%sp 4b310: 2040 moveal %d0,%a0 4b312: 60d6 bras 4b2ea <_RBTree_Extract_validate_unprotected+0x112> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4b314: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b31a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048a58 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 48a58: 4e56 ffec linkw %fp,#-20 48a5c: 202e 001c movel %fp@(28),%d0 48a60: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48a64: 246e 0008 moveal %fp@(8),%a2 48a68: 262e 0014 movel %fp@(20),%d3 48a6c: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 48a70: 4a8a tstl %a2 48a72: 6734 beqs 48aa8 <_RBTree_Initialize+0x50> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 48a74: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 48a76: 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; 48a7c: 242e 0010 movel %fp@(16),%d2 RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 48a80: 42aa 0004 clrl %a2@(4) while ( count-- ) { _RBTree_Insert(the_rbtree, next); 48a84: 47f9 0004 8a2c lea 48a2c <_RBTree_Insert>,%a3 the_rbtree->first[0] = NULL; 48a8a: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 48a8e: 42aa 000c clrl %a2@(12) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; 48a92: 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-- ) { 48a96: 600c bras 48aa4 <_RBTree_Initialize+0x4c> _RBTree_Insert(the_rbtree, next); 48a98: 2f02 movel %d2,%sp@- * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 48a9a: d484 addl %d4,%d2 48a9c: 5383 subql #1,%d3 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert(the_rbtree, next); 48a9e: 2f0a movel %a2,%sp@- 48aa0: 4e93 jsr %a3@ * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 48aa2: 508f addql #8,%sp /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 48aa4: 4a83 tstl %d3 48aa6: 66f0 bnes 48a98 <_RBTree_Initialize+0x40> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 48aa8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48aae: 4e5e unlk %fp ... =============================================================================== 0004b15c <_RBTree_Sibling>: * exists, and NULL if not. */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { 4b15c: 4e56 0000 linkw %fp,#0 4b160: 226e 0008 moveal %fp@(8),%a1 if(!the_node) return NULL; 4b164: 4a89 tstl %a1 4b166: 6718 beqs 4b180 <_RBTree_Sibling+0x24> if(!(the_node->parent)) return NULL; 4b168: 2051 moveal %a1@,%a0 4b16a: 4a88 tstl %a0 4b16c: 6712 beqs 4b180 <_RBTree_Sibling+0x24> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; 4b16e: 4a90 tstl %a0@ 4b170: 670e beqs 4b180 <_RBTree_Sibling+0x24> if(the_node == the_node->parent->child[RBT_LEFT]) 4b172: 2028 0004 movel %a0@(4),%d0 4b176: b089 cmpl %a1,%d0 4b178: 6608 bnes 4b182 <_RBTree_Sibling+0x26> return the_node->parent->child[RBT_RIGHT]; 4b17a: 2028 0008 movel %a0@(8),%d0 4b17e: 6002 bras 4b182 <_RBTree_Sibling+0x26> RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; 4b180: 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]; } 4b182: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b4ca <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 4b4ca: 4e56 fff0 linkw %fp,#-16 4b4ce: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b4d2: 266e 0008 moveal %fp@(8),%a3 } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 4b4d6: 49fa ffa0 lea %pc@(4b478 <_RBTree_Rotate>),%a4 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))) { 4b4da: 604e bras 4b52a <_RBTree_Validate_insert_unprotected+0x60> ) { 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; 4b4dc: 4a92 tstl %a2@ 4b4de: 6762 beqs 4b542 <_RBTree_Validate_insert_unprotected+0x78><== 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]) 4b4e0: 226a 0004 moveal %a2@(4),%a1 4b4e4: b3c8 cmpal %a0,%a1 4b4e6: 6604 bnes 4b4ec <_RBTree_Validate_insert_unprotected+0x22> return the_node->parent->child[RBT_RIGHT]; 4b4e8: 226a 0008 moveal %a2@(8),%a1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4b4ec: 4a89 tstl %a1 4b4ee: 6752 beqs 4b542 <_RBTree_Validate_insert_unprotected+0x78> 4b4f0: 7001 moveq #1,%d0 4b4f2: b0a9 000c cmpl %a1@(12),%d0 4b4f6: 664a bnes 4b542 <_RBTree_Validate_insert_unprotected+0x78> u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4b4f8: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4b4fc: 264a moveal %a2,%a3 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; 4b4fe: 42a9 000c clrl %a1@(12) g->color = RBT_RED; 4b502: 2540 000c movel %d0,%a2@(12) 4b506: 6022 bras 4b52a <_RBTree_Validate_insert_unprotected+0x60> RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); 4b508: 2f02 movel %d2,%sp@- 4b50a: 2f08 movel %a0,%sp@- 4b50c: 4e94 jsr %a4@ the_node = the_node->child[pdir]; 4b50e: 508f addql #8,%sp 4b510: 2673 2c04 moveal %a3@(00000004,%d2:l:4),%a3 } the_node->parent->color = RBT_BLACK; 4b514: 2053 moveal %a3@,%a0 g->color = RBT_RED; 4b516: 7001 moveq #1,%d0 /* 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; 4b518: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 4b51c: 2540 000c movel %d0,%a2@(12) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 4b520: 9082 subl %d2,%d0 4b522: 2f00 movel %d0,%sp@- 4b524: 2f0a movel %a2,%sp@- 4b526: 4e94 jsr %a4@ 4b528: 508f addql #8,%sp ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4b52a: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4b52c: 2450 moveal %a0@,%a2 4b52e: 4a8a tstl %a2 4b530: 670a beqs 4b53c <_RBTree_Validate_insert_unprotected+0x72> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4b532: 7001 moveq #1,%d0 4b534: b0a8 000c cmpl %a0@(12),%d0 4b538: 6622 bnes 4b55c <_RBTree_Validate_insert_unprotected+0x92> 4b53a: 60a0 bras 4b4dc <_RBTree_Validate_insert_unprotected+0x12> /* 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; 4b53c: 42ab 000c clrl %a3@(12) 4b540: 601a bras 4b55c <_RBTree_Validate_insert_unprotected+0x92> u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; 4b542: b1ea 0004 cmpal %a2@(4),%a0 4b546: 56c2 sne %d2 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]; 4b548: b7e8 0004 cmpal %a0@(4),%a3 4b54c: 56c0 sne %d0 RBTree_Direction pdir = the_node->parent != g->child[0]; 4b54e: 49c2 extbl %d2 4b550: 4482 negl %d2 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]; 4b552: 49c0 extbl %d0 4b554: 4480 negl %d0 RBTree_Direction pdir = the_node->parent != g->child[0]; /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4b556: b480 cmpl %d0,%d2 4b558: 66ae bnes 4b508 <_RBTree_Validate_insert_unprotected+0x3e> 4b55a: 60b8 bras 4b514 <_RBTree_Validate_insert_unprotected+0x4a> /* 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; } 4b55c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b562: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a35c <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4a35c: 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 ]; 4a360: 206e 0008 moveal %fp@(8),%a0 */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4a364: 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 ]; 4a368: 2468 00fc moveal %a0@(252),%a2 if ( !api ) 4a36c: 4a8a tstl %a2 4a36e: 6754 beqs 4a3c4 <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4a370: 203c 0000 0700 movel #1792,%d0 4a376: 40c1 movew %sr,%d1 4a378: 8081 orl %d1,%d0 4a37a: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4a37c: 262a 0012 movel %a2@(18),%d3 asr->signals_posted = 0; 4a380: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4a384: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4a386: 4a83 tstl %d3 4a388: 673a beqs 4a3c4 <_RTEMS_tasks_Post_switch_extension+0x68> return; asr->nest_level += 1; 4a38a: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4a38e: 240e movel %fp,%d2 4a390: 5982 subql #4,%d2 4a392: 47f9 0004 bc34 lea 4bc34 ,%a3 4a398: 2f02 movel %d2,%sp@- 4a39a: 2f3c 0000 ffff movel #65535,%sp@- 4a3a0: 2f2a 000e movel %a2@(14),%sp@- 4a3a4: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4a3a6: 2f03 movel %d3,%sp@- 4a3a8: 206a 000a moveal %a2@(10),%a0 4a3ac: 4e90 jsr %a0@ asr->nest_level -= 1; 4a3ae: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4a3b2: 2f02 movel %d2,%sp@- 4a3b4: 2f3c 0000 ffff movel #65535,%sp@- 4a3ba: 2f2e fffc movel %fp@(-4),%sp@- 4a3be: 4e93 jsr %a3@ 4a3c0: 4fef 001c lea %sp@(28),%sp } 4a3c4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4a3ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047a84 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 47a84: 4e56 0000 linkw %fp,#0 47a88: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 47a8a: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 47a8e: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 47a92: 4eb9 0004 924c jsr 4924c <_Workspace_Allocate> if ( sched ) { 47a98: 588f addql #4,%sp 47a9a: 4a80 tstl %d0 47a9c: 670e beqs 47aac <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 47a9e: 2540 008a movel %d0,%a2@(138) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 47aa2: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 47aa4: 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; 47aa6: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 47aa8: 2141 0014 movel %d1,%a0@(20) } return sched; } 47aac: 246e fffc moveal %fp@(-4),%a2 47ab0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047ab4 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 47ab4: 4e56 0000 linkw %fp,#0 47ab8: 2f02 movel %d2,%sp@- 47aba: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 47abe: 2f02 movel %d2,%sp@- 47ac0: 4eb9 0004 7b2c jsr 47b2c <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 47ac6: 588f addql #4,%sp 47ac8: b4b9 0005 ee58 cmpl 5ee58 <_Per_CPU_Information+0x10>,%d2 47ace: 6606 bnes 47ad6 <_Scheduler_EDF_Block+0x22> <== NEVER TAKEN _Scheduler_EDF_Schedule(); 47ad0: 4eb9 0004 7c4c jsr 47c4c <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 47ad6: b4b9 0005 ee54 cmpl 5ee54 <_Per_CPU_Information+0xc>,%d2 47adc: 6608 bnes 47ae6 <_Scheduler_EDF_Block+0x32> <== NEVER TAKEN _Thread_Dispatch_necessary = true; 47ade: 7001 moveq #1,%d0 47ae0: 13c0 0005 ee60 moveb %d0,5ee60 <_Per_CPU_Information+0x18> } 47ae6: 242e fffc movel %fp@(-4),%d2 47aea: 4e5e unlk %fp ... =============================================================================== 00047b58 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 47b58: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47b5c: 206e 0008 moveal %fp@(8),%a0 47b60: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 47b66: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 47b68: 4ef9 0004 9268 jmp 49268 <_Workspace_Free> ... =============================================================================== 00047c10 <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 47c10: 4e56 0000 linkw %fp,#0 47c14: 206e 0008 moveal %fp@(8),%a0 47c18: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; if (deadline) { 47c1c: 670e beqs 47c2c <_Scheduler_EDF_Release_job+0x1c><== NEVER TAKEN /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 47c1e: 2239 0005 edc0 movel 5edc0 <_Watchdog_Ticks_since_boot>,%d1 47c24: d081 addl %d1,%d0 47c26: 0880 001f bclr #31,%d0 47c2a: 6004 bras 47c30 <_Scheduler_EDF_Release_job+0x20> & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 47c2c: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED } the_thread->real_priority = new_priority; 47c30: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 47c34: 4878 0001 pea 1 47c38: 2f00 movel %d0,%sp@- 47c3a: 2f08 movel %a0,%sp@- 47c3c: 4eb9 0004 7f24 jsr 47f24 <_Thread_Change_priority> 47c42: 4fef 000c lea %sp@(12),%sp } 47c46: 4e5e unlk %fp ... =============================================================================== 00047c70 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 47c70: 4e56 0000 linkw %fp,#0 47c74: 2f0a movel %a2,%sp@- 47c76: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 47c7a: 2f0a movel %a2,%sp@- 47c7c: 4eb9 0004 7afc jsr 47afc <_Scheduler_EDF_Enqueue> 47c82: 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( 47c86: 2079 0005 ee58 moveal 5ee58 <_Per_CPU_Information+0x10>,%a0 47c8c: 2f28 0014 movel %a0@(20),%sp@- 47c90: 2079 0005 d40e moveal 5d40e <_Scheduler+0x30>,%a0 47c96: 4e90 jsr %a0@ 47c98: 4fef 000c lea %sp@(12),%sp 47c9c: 4a80 tstl %d0 47c9e: 6c20 bges 47cc0 <_Scheduler_EDF_Unblock+0x50> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47ca0: 2079 0005 ee54 moveal 5ee54 <_Per_CPU_Information+0xc>,%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; 47ca6: 23ca 0005 ee58 movel %a2,5ee58 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 47cac: 4a28 0074 tstb %a0@(116) 47cb0: 6606 bnes 47cb8 <_Scheduler_EDF_Unblock+0x48> <== ALWAYS TAKEN 47cb2: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 47cb6: 6608 bnes 47cc0 <_Scheduler_EDF_Unblock+0x50> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 47cb8: 7001 moveq #1,%d0 47cba: 13c0 0005 ee60 moveb %d0,5ee60 <_Per_CPU_Information+0x18> } } 47cc0: 246e fffc moveal %fp@(-4),%a2 47cc4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047cc8 <_Scheduler_EDF_Update>: { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 47cc8: 7002 moveq #2,%d0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 47cca: 4e56 0000 linkw %fp,#0 47cce: 2f0a movel %a2,%sp@- 47cd0: 246e 0008 moveal %fp@(8),%a2 Scheduler_EDF_Per_thread *sched_info = 47cd4: 206a 008a moveal %a2@(138),%a0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 47cd8: 2f02 movel %d2,%sp@- Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { 47cda: b0a8 0014 cmpl %a0@(20),%d0 47cde: 6618 bnes 47cf8 <_Scheduler_EDF_Update+0x30> /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 47ce0: 202a 00ac movel %a2@(172),%d0 47ce4: 08c0 001f bset #31,%d0 47ce8: 2540 00ac movel %d0,%a2@(172) the_thread->real_priority = the_thread->Start.initial_priority; 47cec: 2540 0018 movel %d0,%a2@(24) the_thread->current_priority = the_thread->Start.initial_priority; 47cf0: 2540 0014 movel %d0,%a2@(20) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 47cf4: 42a8 0014 clrl %a0@(20) } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { 47cf8: 7001 moveq #1,%d0 47cfa: b0a8 0014 cmpl %a0@(20),%d0 47cfe: 664c bnes 47d4c <_Scheduler_EDF_Update+0x84> <== ALWAYS TAKEN Thread_Control *the_thread ) { Scheduler_EDF_Per_thread *sched_info = (Scheduler_EDF_Per_thread*)the_thread->scheduler_info; RBTree_Node *the_node = &(sched_info->Node); 47d00: 2408 movel %a0,%d2 <== NOT EXECUTED 47d02: 5882 addql #4,%d2 <== NOT EXECUTED the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node); 47d04: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47d06: 4879 0005 ee6a pea 5ee6a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47d0c: 4eb9 0004 b44c jsr 4b44c <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); 47d12: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47d14: 4879 0005 ee6a pea 5ee6a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47d1a: 4eb9 0004 b610 jsr 4b610 <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); 47d20: 4eb9 0004 7c4c jsr 47c4c <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { 47d26: 2079 0005 ee54 moveal 5ee54 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 47d2c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 47d30: b1f9 0005 ee58 cmpal 5ee58 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 47d36: 6714 beqs 47d4c <_Scheduler_EDF_Update+0x84> <== NOT EXECUTED if ( _Thread_Executing->is_preemptible || 47d38: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 47d3c: 6606 bnes 47d44 <_Scheduler_EDF_Update+0x7c> <== NOT EXECUTED 47d3e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 47d42: 6608 bnes 47d4c <_Scheduler_EDF_Update+0x84> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 47d44: 7001 moveq #1,%d0 <== NOT EXECUTED 47d46: 13c0 0005 ee60 moveb %d0,5ee60 <_Per_CPU_Information+0x18> <== NOT EXECUTED } } } 47d4c: 242e fff8 movel %fp@(-8),%d2 47d50: 246e fffc moveal %fp@(-4),%a2 47d54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d58 <_Scheduler_EDF_Yield>: Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 47d58: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { 47d5e: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 47d62: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED Scheduler_EDF_Per_thread *first_info; RBTree_Node *first_node; ISR_Level level; Thread_Control *executing = _Thread_Executing; 47d66: 2479 0005 ee54 moveal 5ee54 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = 47d6c: 262a 008a movel %a2@(138),%d3 <== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); 47d70: 40c2 movew %sr,%d2 <== NOT EXECUTED 47d72: 8082 orl %d2,%d0 <== NOT EXECUTED 47d74: 46c0 movew %d0,%sr <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node( const RBTree_Control *the_rbtree ) { if(!the_rbtree) return NULL; /* TODO: expected behavior? */ return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL); 47d76: 2079 0005 ee6e moveal 5ee6e <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 47d7c: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 47d80: 660c bnes 47d8e <_Scheduler_EDF_Yield+0x36> <== NOT EXECUTED #include #include #include #include void _Scheduler_EDF_Yield(void) 47d82: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 47d86: 57c0 seq %d0 <== NOT EXECUTED 47d88: 49c0 extbl %d0 <== NOT EXECUTED 47d8a: 4480 negl %d0 <== NOT EXECUTED 47d8c: 6002 bras 47d90 <_Scheduler_EDF_Yield+0x38> <== NOT EXECUTED 47d8e: 4280 clrl %d0 <== NOT EXECUTED (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); _ISR_Disable( level ); if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { 47d90: 4a00 tstb %d0 <== NOT EXECUTED 47d92: 6652 bnes 47de6 <_Scheduler_EDF_Yield+0x8e> <== NOT EXECUTED ISR_Level level; Thread_Control *executing = _Thread_Executing; Scheduler_EDF_Per_thread *executing_info = (Scheduler_EDF_Per_thread *) executing->scheduler_info; RBTree_Node *executing_node = &(executing_info->Node); 47d94: 5883 addql #4,%d3 <== NOT EXECUTED if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) { /* * The RBTree has more than one node, enqueue behind the tasks * with the same priority in case there are such ones. */ _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node ); 47d96: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47d98: 4879 0005 ee6a pea 5ee6a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47d9e: 4eb9 0004 b44c jsr 4b44c <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); 47da4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47da6: 4879 0005 ee6a pea 5ee6a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47dac: 4eb9 0004 b610 jsr 4b610 <_RBTree_Insert> <== NOT EXECUTED _ISR_Flash( level ); 47db2: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 47db8: 46c2 movew %d2,%sr <== NOT EXECUTED 47dba: 8082 orl %d2,%d0 <== NOT EXECUTED 47dbc: 46c0 movew %d0,%sr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) { 47dbe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 47dc2: b5f9 0005 ee58 cmpal 5ee58 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 47dc8: 6624 bnes 47dee <_Scheduler_EDF_Yield+0x96> <== NOT EXECUTED first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); 47dca: 42a7 clrl %sp@- <== NOT EXECUTED 47dcc: 4879 0005 ee6a pea 5ee6a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47dd2: 4eb9 0004 b63c jsr 4b63c <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; 47dd8: 508f addql #8,%sp <== NOT EXECUTED 47dda: 2040 moveal %d0,%a0 <== NOT EXECUTED 47ddc: 5988 subql #4,%a0 <== NOT EXECUTED 47dde: 23d0 0005 ee58 movel %a0@,5ee58 <_Per_CPU_Information+0x10><== NOT EXECUTED 47de4: 6008 bras 47dee <_Scheduler_EDF_Yield+0x96> <== NOT EXECUTED } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 47de6: b5f9 0005 ee58 cmpal 5ee58 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 47dec: 6708 beqs 47df6 <_Scheduler_EDF_Yield+0x9e> <== NOT EXECUTED _Thread_Dispatch_necessary = true; 47dee: 7001 moveq #1,%d0 <== NOT EXECUTED 47df0: 13c0 0005 ee60 moveb %d0,5ee60 <_Per_CPU_Information+0x18> <== NOT EXECUTED _ISR_Enable( level ); 47df6: 46c2 movew %d2,%sr <== NOT EXECUTED } 47df8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 47dfe: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000473a8 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 473a8: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 473ac: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 473ae: 2279 0005 bfb2 moveal 5bfb2 <_Scheduler+0x4>,%a1 473b4: 4ed1 jmp %a1@ ... =============================================================================== 00047580 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 47580: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47584: 206e 0008 moveal %fp@(8),%a0 47588: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 4758e: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 47590: 4ef9 0004 8b3c jmp 48b3c <_Workspace_Free> ... =============================================================================== 000461e4 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 461e4: 4e56 0000 linkw %fp,#0 461e8: 206e 0008 moveal %fp@(8),%a0 461ec: 2f03 movel %d3,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 461ee: 2039 0005 dcd8 movel 5dcd8 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 461f4: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 461f6: 4a88 tstl %a0 461f8: 6762 beqs 4625c <_TOD_Validate+0x78> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 461fa: 243c 000f 4240 movel #1000000,%d2 46200: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 46204: b4a8 0018 cmpl %a0@(24),%d2 46208: 6352 blss 4625c <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 4620a: 763b moveq #59,%d3 4620c: b6a8 0014 cmpl %a0@(20),%d3 46210: 654a bcss 4625c <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 46212: b6a8 0010 cmpl %a0@(16),%d3 46216: 6544 bcss 4625c <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46218: 7017 moveq #23,%d0 4621a: b0a8 000c cmpl %a0@(12),%d0 4621e: 653c bcss 4625c <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 46220: 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) || 46224: 6736 beqs 4625c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 46226: 720c moveq #12,%d1 46228: b280 cmpl %d0,%d1 4622a: 6530 bcss 4625c <_TOD_Validate+0x78> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 4622c: 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) || 4622e: 0c82 0000 07c3 cmpil #1987,%d2 46234: 6326 blss 4625c <_TOD_Validate+0x78> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 46236: 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) || 4623a: 6720 beqs 4625c <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 4623c: 163c 0003 moveb #3,%d3 46240: 41f9 0005 cf28 lea 5cf28 <_TOD_Days_per_month>,%a0 46246: c483 andl %d3,%d2 46248: 6606 bnes 46250 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 4624a: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 4624e: 6004 bras 46254 <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 46250: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 46254: b081 cmpl %d1,%d0 46256: 54c0 scc %d0 46258: 4480 negl %d0 4625a: 6002 bras 4625e <_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; 4625c: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4625e: 241f movel %sp@+,%d2 46260: 261f movel %sp@+,%d3 46262: 4e5e unlk %fp ... =============================================================================== 00047878 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47878: 4e56 fff0 linkw %fp,#-16 4787c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47880: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 47884: 282a 0010 movel %a2@(16),%d4 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47888: 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 ); 4788c: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 4788e: 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 ); 47892: 4eb9 0004 8464 jsr 48464 <_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 ) 47898: 588f addql #4,%sp 4789a: b4aa 0014 cmpl %a2@(20),%d2 4789e: 670c beqs 478ac <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 478a0: 2f02 movel %d2,%sp@- 478a2: 2f0a movel %a2,%sp@- 478a4: 4eb9 0004 8408 jsr 48408 <_Thread_Set_priority> 478aa: 508f addql #8,%sp _ISR_Disable( level ); 478ac: 203c 0000 0700 movel #1792,%d0 478b2: 40c2 movew %sr,%d2 478b4: 8082 orl %d2,%d0 478b6: 46c0 movew %d0,%sr 478b8: 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; 478ba: 202a 0010 movel %a2@(16),%d0 478be: c284 andl %d4,%d1 if ( state != STATES_TRANSIENT ) { 478c0: 7804 moveq #4,%d4 478c2: b880 cmpl %d0,%d4 478c4: 672e beqs 478f4 <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 478c6: 4a81 tstl %d1 478c8: 6608 bnes 478d2 <_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); 478ca: 72fb moveq #-5,%d1 478cc: c280 andl %d0,%d1 478ce: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 478d2: 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); 478d4: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 478da: 676c beqs 47948 <_Thread_Change_priority+0xd0> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 478dc: 2d4a 000c movel %a2,%fp@(12) 478e0: 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 ); } 478e6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 478ec: 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 ); 478ee: 4ef9 0004 8368 jmp 48368 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 478f4: 4a81 tstl %d1 478f6: 661e bnes 47916 <_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 ); 478f8: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 478fc: 4a03 tstb %d3 478fe: 670a beqs 4790a <_Thread_Change_priority+0x92> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 47900: 2f0a movel %a2,%sp@- 47902: 2079 0005 bfd6 moveal 5bfd6 <_Scheduler+0x28>,%a0 47908: 6008 bras 47912 <_Thread_Change_priority+0x9a> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 4790a: 2079 0005 bfd2 moveal 5bfd2 <_Scheduler+0x24>,%a0 47910: 2f0a movel %a2,%sp@- 47912: 4e90 jsr %a0@ 47914: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 47916: 203c 0000 0700 movel #1792,%d0 4791c: 46c2 movew %d2,%sr 4791e: 8082 orl %d2,%d0 47920: 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(); 47922: 2079 0005 bfb6 moveal 5bfb6 <_Scheduler+0x8>,%a0 47928: 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 ); 4792a: 2079 0005 d9bc moveal 5d9bc <_Per_CPU_Information+0xc>,%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() && 47930: b1f9 0005 d9c0 cmpal 5d9c0 <_Per_CPU_Information+0x10>,%a0 47936: 670e beqs 47946 <_Thread_Change_priority+0xce> 47938: 4a28 0074 tstb %a0@(116) 4793c: 6708 beqs 47946 <_Thread_Change_priority+0xce> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 4793e: 7801 moveq #1,%d4 47940: 13c4 0005 d9c8 moveb %d4,5d9c8 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 47946: 46c2 movew %d2,%sr } 47948: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4794e: 4e5e unlk %fp ... =============================================================================== 00047b2c <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47b2c: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47b30: 486e fffc pea %fp@(-4) 47b34: 2f2e 0008 movel %fp@(8),%sp@- 47b38: 4eb9 0004 7cf0 jsr 47cf0 <_Thread_Get> switch ( location ) { 47b3e: 508f addql #8,%sp 47b40: 4aae fffc tstl %fp@(-4) 47b44: 6624 bnes 47b6a <_Thread_Delay_ended+0x3e> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47b46: 2f3c 1000 0018 movel #268435480,%sp@- 47b4c: 2f00 movel %d0,%sp@- 47b4e: 4eb9 0004 7954 jsr 47954 <_Thread_Clear_state> 47b54: 508f addql #8,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47b56: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 47b5c: 5380 subql #1,%d0 47b5e: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47b64: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47b6a: 4e5e unlk %fp ... =============================================================================== 00047b70 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47b70: 4e56 ffd0 linkw %fp,#-48 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 47b74: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 47b7a: 5280 addql #1,%d0 47b7c: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47b82: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 47b88: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 47b8c: 223c 0000 0700 movel #1792,%d1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 47b92: 2479 0005 d9bc moveal 5d9bc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 47b98: 40c0 movew %sr,%d0 47b9a: 8280 orl %d0,%d1 47b9c: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47b9e: 260e movel %fp,%d3 _Timestamp_Subtract( 47ba0: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47ba2: 0683 ffff fff0 addil #-16,%d3 47ba8: 2a3c 0004 a6c8 movel #304840,%d5 _Timestamp_Subtract( 47bae: 5182 subql #8,%d2 47bb0: 283c 0004 85ec movel #296428,%d4 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47bb6: 4bf9 0004 85b4 lea 485b4 <_Timespec_Add_to>,%a5 if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; *_Thread_libc_reent = heir->libc_reent; } _User_extensions_Thread_switch( executing, heir ); 47bbc: 49f9 0004 886c lea 4886c <_User_extensions_Thread_switch>,%a4 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 47bc2: 6000 00d2 braw 47c96 <_Thread_Dispatch+0x126> heir = _Thread_Heir; 47bc6: 2679 0005 d9c0 moveal 5d9c0 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 47bcc: 4201 clrb %d1 _Thread_Executing = heir; 47bce: 23cb 0005 d9bc movel %a3,5d9bc <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 47bd4: 13c1 0005 d9c8 moveb %d1,5d9c8 <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 47bda: b5cb cmpal %a3,%a2 47bdc: 6700 00c2 beqw 47ca0 <_Thread_Dispatch+0x130> */ #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 ) 47be0: 7201 moveq #1,%d1 47be2: b2ab 007a cmpl %a3@(122),%d1 47be6: 660a bnes 47bf2 <_Thread_Dispatch+0x82> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47be8: 41f9 0005 d7e0 lea 5d7e0 <_Thread_Ticks_per_timeslice>,%a0 47bee: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 47bf2: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47bf4: 2f03 movel %d3,%sp@- 47bf6: 2045 moveal %d5,%a0 47bf8: 4e90 jsr %a0@ _Timestamp_Subtract( 47bfa: 2044 moveal %d4,%a0 47bfc: 2f02 movel %d2,%sp@- 47bfe: 2f03 movel %d3,%sp@- 47c00: 4879 0005 d9ca pea 5d9ca <_Per_CPU_Information+0x1a> 47c06: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47c08: 2f02 movel %d2,%sp@- 47c0a: 486a 0082 pea %a2@(130) 47c0e: 4e95 jsr %a5@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47c10: 2079 0005 d8ae moveal 5d8ae <_Thread_libc_reent>,%a0 47c16: 4fef 0018 lea %sp@(24),%sp &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 47c1a: 202e fff0 movel %fp@(-16),%d0 47c1e: 222e fff4 movel %fp@(-12),%d1 47c22: 23c0 0005 d9ca movel %d0,5d9ca <_Per_CPU_Information+0x1a> 47c28: 23c1 0005 d9ce movel %d1,5d9ce <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47c2e: 4a88 tstl %a0 47c30: 6708 beqs 47c3a <_Thread_Dispatch+0xca> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 47c32: 2550 00f8 movel %a0@,%a2@(248) *_Thread_libc_reent = heir->libc_reent; 47c36: 20ab 00f8 movel %a3@(248),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47c3a: 2f0b movel %a3,%sp@- 47c3c: 2f0a movel %a2,%sp@- 47c3e: 4e94 jsr %a4@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47c40: 486b 00c0 pea %a3@(192) 47c44: 486a 00c0 pea %a2@(192) 47c48: 4eb9 0004 8b8c jsr 48b8c <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47c4e: 4fef 0010 lea %sp@(16),%sp 47c52: 4aaa 00f4 tstl %a2@(244) 47c56: 672c beqs 47c84 <_Thread_Dispatch+0x114> #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 ); 47c58: 2079 0005 d8aa moveal 5d8aa <_Thread_Allocated_fp>,%a0 47c5e: b1ca cmpal %a2,%a0 47c60: 6722 beqs 47c84 <_Thread_Dispatch+0x114> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47c62: 4a88 tstl %a0 47c64: 670c beqs 47c72 <_Thread_Dispatch+0x102> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47c66: 4868 00f4 pea %a0@(244) 47c6a: 4eb9 0004 8cd2 jsr 48cd2 <_CPU_Context_save_fp> 47c70: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47c72: 486a 00f4 pea %a2@(244) 47c76: 4eb9 0004 8cf4 jsr 48cf4 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47c7c: 588f addql #4,%sp 47c7e: 23ca 0005 d8aa movel %a2,5d8aa <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47c84: 2479 0005 d9bc moveal 5d9bc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 47c8a: 223c 0000 0700 movel #1792,%d1 47c90: 40c0 movew %sr,%d0 47c92: 8280 orl %d0,%d1 47c94: 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 ) { 47c96: 1239 0005 d9c8 moveb 5d9c8 <_Per_CPU_Information+0x18>,%d1 47c9c: 6600 ff28 bnew 47bc6 <_Thread_Dispatch+0x56> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 47ca0: 46c0 movew %d0,%sr * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47ca2: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 47ca8: 5380 subql #1,%d0 47caa: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47cb0: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 47cb6: 4eb9 0004 6230 jsr 46230 <_API_extensions_Run_postswitch> } 47cbc: 4cee 3c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a5 47cc2: 4e5e unlk %fp ... =============================================================================== 00047cf0 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 47cf0: 4e56 0000 linkw %fp,#0 47cf4: 202e 0008 movel %fp@(8),%d0 47cf8: 2f03 movel %d3,%sp@- 47cfa: 206e 000c moveal %fp@(12),%a0 47cfe: 2f02 movel %d2,%sp@- uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 47d00: 4a80 tstl %d0 47d02: 661e bnes 47d22 <_Thread_Get+0x32> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 47d04: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 47d0a: 5280 addql #1,%d0 47d0c: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47d12: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 47d18: 4290 clrl %a0@ tp = _Thread_Executing; 47d1a: 2039 0005 d9bc movel 5d9bc <_Per_CPU_Information+0xc>,%d0 goto done; 47d20: 6044 bras 47d66 <_Thread_Get+0x76> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47d22: 7418 moveq #24,%d2 47d24: 2200 movel %d0,%d1 47d26: e4a9 lsrl %d2,%d1 47d28: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47d2a: 143c 0002 moveb #2,%d2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 47d2e: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47d30: 2241 moveal %d1,%a1 47d32: 5389 subql #1,%a1 47d34: b489 cmpl %a1,%d2 47d36: 643a bccs 47d72 <_Thread_Get+0x82> 47d38: 6014 bras 47d4e <_Thread_Get+0x5e> if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 47d3a: 43f9 0005 d7e4 lea 5d7e4 <_Objects_Information_table>,%a1 47d40: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1 * There is no way for this to happen if POSIX is enabled. But there * is actually a test case in sp43 for this which trips it whether or * not POSIX is enabled. So in the interest of safety, this is left * on in all configurations. */ if ( !api_information ) { 47d44: 4a89 tstl %a1 47d46: 6706 beqs 47d4e <_Thread_Get+0x5e> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 47d48: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 47d4c: 6608 bnes 47d56 <_Thread_Get+0x66> *location = OBJECTS_ERROR; 47d4e: 7001 moveq #1,%d0 47d50: 2080 movel %d0,%a0@ { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; 47d52: 4280 clrl %d0 } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; goto done; 47d54: 6010 bras 47d66 <_Thread_Get+0x76> } tp = (Thread_Control *) _Objects_Get( information, id, location ); 47d56: 2f08 movel %a0,%sp@- 47d58: 2f00 movel %d0,%sp@- 47d5a: 2f01 movel %d1,%sp@- 47d5c: 4eb9 0004 70a0 jsr 470a0 <_Objects_Get> 47d62: 4fef 000c lea %sp@(12),%sp done: return tp; } 47d66: 242e fff8 movel %fp@(-8),%d2 47d6a: 262e fffc movel %fp@(-4),%d3 47d6e: 4e5e unlk %fp 47d70: 4e75 rts */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 47d72: 761b moveq #27,%d3 47d74: 2400 movel %d0,%d2 47d76: e6aa lsrl %d3,%d2 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 47d78: 163c 0001 moveb #1,%d3 47d7c: b682 cmpl %d2,%d3 47d7e: 67ba beqs 47d3a <_Thread_Get+0x4a> 47d80: 60cc bras 47d4e <_Thread_Get+0x5e> ... =============================================================================== 0004beb4 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4beb4: 4e56 0000 linkw %fp,#0 4beb8: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4beba: 2479 0005 d9bc moveal 5d9bc <_Per_CPU_Information+0xc>,%a2 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4bec0: 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; 4bec2: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4bec6: 40c0 movew %sr,%d0 4bec8: e189 lsll #8,%d1 4beca: 0280 0000 f8ff andil #63743,%d0 4bed0: 8081 orl %d1,%d0 4bed2: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4bed4: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4bed6: 1439 0005 cfec moveb 5cfec ,%d2 doneConstructors = true; 4bedc: 13c0 0005 cfec moveb %d0,5cfec #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4bee2: 4aaa 00f4 tstl %a2@(244) 4bee6: 6720 beqs 4bf08 <_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 ); 4bee8: 2079 0005 d8aa moveal 5d8aa <_Thread_Allocated_fp>,%a0 4beee: b1ca cmpal %a2,%a0 4bef0: 6716 beqs 4bf08 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4bef2: 4a88 tstl %a0 4bef4: 670c beqs 4bf02 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4bef6: 4868 00f4 pea %a0@(244) 4befa: 4eb9 0004 8cd2 jsr 48cd2 <_CPU_Context_save_fp> 4bf00: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4bf02: 23ca 0005 d8aa movel %a2,5d8aa <_Thread_Allocated_fp> /* * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4bf08: 2f0a movel %a2,%sp@- 4bf0a: 4eb9 0004 86e8 jsr 486e8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4bf10: 4eb9 0004 7cc8 jsr 47cc8 <_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) */ { 4bf16: 588f addql #4,%sp 4bf18: 4a02 tstb %d2 4bf1a: 6606 bnes 4bf22 <_Thread_Handler+0x6e> INIT_NAME (); 4bf1c: 4eb9 0005 a17c jsr 5a17c <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4bf22: 4aaa 0092 tstl %a2@(146) 4bf26: 6610 bnes 4bf38 <_Thread_Handler+0x84> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4bf28: 2f2a 009a movel %a2@(154),%sp@- 4bf2c: 206a 008e moveal %a2@(142),%a0 4bf30: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4bf32: 588f addql #4,%sp 4bf34: 2540 0028 movel %d0,%a2@(40) * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4bf38: 2f0a movel %a2,%sp@- 4bf3a: 4eb9 0004 8720 jsr 48720 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4bf40: 4878 0005 pea 5 4bf44: 4878 0001 pea 1 4bf48: 42a7 clrl %sp@- 4bf4a: 4eb9 0004 6b84 jsr 46b84 <_Internal_error_Occurred> =============================================================================== 00048a04 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 48a04: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 48a06: 4e56 0000 linkw %fp,#0 48a0a: 2f0a movel %a2,%sp@- 48a0c: 246e 0008 moveal %fp@(8),%a2 48a10: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 48a14: 6664 bnes 48a7a <_Thread_Restart+0x76> _Thread_Set_transient( the_thread ); 48a16: 2f0a movel %a2,%sp@- 48a18: 4eb9 0004 8ae4 jsr 48ae4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 48a1e: 2f2e 0010 movel %fp@(16),%sp@- 48a22: 2f2e 000c movel %fp@(12),%sp@- 48a26: 2f0a movel %a2,%sp@- 48a28: 4eb9 0004 b3ac jsr 4b3ac <_Thread_Reset> _Thread_Load_environment( the_thread ); 48a2e: 2f0a movel %a2,%sp@- 48a30: 4eb9 0004 b0f0 jsr 4b0f0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 48a36: 2f0a movel %a2,%sp@- 48a38: 4eb9 0004 b37c jsr 4b37c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 48a3e: 2f0a movel %a2,%sp@- 48a40: 4eb9 0004 8eac jsr 48eac <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 48a46: 4fef 001c lea %sp@(28),%sp 48a4a: b5f9 0005 e2c4 cmpal 5e2c4 <_Per_CPU_Information+0xc>,%a2 48a50: 662c bnes 48a7e <_Thread_Restart+0x7a> */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 48a52: 4aaa 00f4 tstl %a2@(244) 48a56: 670c beqs 48a64 <_Thread_Restart+0x60> _Context_Restore_fp( &_Thread_Executing->fp_context ); 48a58: 486a 00f4 pea %a2@(244) 48a5c: 4eb9 0004 93b4 jsr 493b4 <_CPU_Context_restore_fp> 48a62: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 48a64: 2079 0005 e2c4 moveal 5e2c4 <_Per_CPU_Information+0xc>,%a0 48a6a: 41e8 00c0 lea %a0@(192),%a0 48a6e: 2f08 movel %a0,%sp@- 48a70: 4eb9 0004 9262 jsr 49262 <_CPU_Context_Restart_self> 48a76: 588f addql #4,%sp <== NOT EXECUTED 48a78: 6004 bras 48a7e <_Thread_Restart+0x7a> <== NOT EXECUTED _Thread_Restart_self(); return true; } return false; 48a7a: 4200 clrb %d0 48a7c: 6002 bras 48a80 <_Thread_Restart+0x7c> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 48a7e: 7001 moveq #1,%d0 } return false; } 48a80: 246e fffc moveal %fp@(-4),%a2 48a84: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047828 <_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 ) ) { 47828: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 4782a: 4e56 0000 linkw %fp,#0 4782e: 202e 0010 movel %fp@(16),%d0 47832: 2f0a movel %a2,%sp@- 47834: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 47838: 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 ) ) { 4783c: b2aa 0050 cmpl %a2@(80),%d1 47840: 6618 bnes 4785a <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 47842: 123c 0003 moveb #3,%d1 47846: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4784a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4784c: 486a 0048 pea %a2@(72) 47850: 4eb9 0004 89c8 jsr 489c8 <_Watchdog_Remove> 47856: 588f addql #4,%sp 47858: 6002 bras 4785c <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 4785a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4785c: 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 } 47860: 246e fffc moveal %fp@(-4),%a2 47864: 203c 1003 fff8 movel #268697592,%d0 4786a: 2d40 000c movel %d0,%fp@(12) 4786e: 4e5e unlk %fp 47870: 4ef9 0004 7954 jmp 47954 <_Thread_Clear_state> ... =============================================================================== 0004bf50 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4bf50: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4bf56: 4e56 0000 linkw %fp,#0 4bf5a: 2f0a movel %a2,%sp@- 4bf5c: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4bf60: 40c0 movew %sr,%d0 4bf62: 8280 orl %d0,%d1 4bf64: 46c1 movew %d1,%sr 4bf66: 222a 0010 movel %a2@(16),%d1 4bf6a: 0281 0003 bee0 andil #245472,%d1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4bf70: 660a bnes 4bf7c <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4bf72: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4bf74: 246e fffc moveal %fp@(-4),%a2 4bf78: 4e5e unlk %fp 4bf7a: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4bf7c: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bf7e: 7202 moveq #2,%d1 previous = the_node->previous; 4bf80: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4bf84: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4bf88: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4bf8a: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4bf8e: b2aa 0050 cmpl %a2@(80),%d1 4bf92: 6704 beqs 4bf98 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4bf94: 46c0 movew %d0,%sr 4bf96: 6014 bras 4bfac <_Thread_queue_Extract_fifo+0x5c> 4bf98: 7203 moveq #3,%d1 4bf9a: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4bf9e: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4bfa0: 486a 0048 pea %a2@(72) 4bfa4: 4eb9 0004 89c8 jsr 489c8 <_Watchdog_Remove> 4bfaa: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4bfac: 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 } 4bfb0: 246e fffc moveal %fp@(-4),%a2 4bfb4: 203c 1003 fff8 movel #268697592,%d0 4bfba: 2d40 000c movel %d0,%fp@(12) 4bfbe: 4e5e unlk %fp 4bfc0: 4ef9 0004 7954 jmp 47954 <_Thread_Clear_state> ... =============================================================================== 00048368 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 48368: 4e56 fff0 linkw %fp,#-16 4836c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48370: 246e 0008 moveal %fp@(8),%a2 48374: 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 ) 48378: 4a8a tstl %a2 4837a: 6746 beqs 483c2 <_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 ) { 4837c: 7001 moveq #1,%d0 4837e: b0aa 0034 cmpl %a2@(52),%d0 48382: 663e bnes 483c2 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48384: 303c 0700 movew #1792,%d0 48388: 40c2 movew %sr,%d2 4838a: 8082 orl %d2,%d0 4838c: 46c0 movew %d0,%sr 4838e: 202b 0010 movel %a3@(16),%d0 48392: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 48398: 6726 beqs 483c0 <_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; 4839a: 7001 moveq #1,%d0 4839c: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 483a0: 4878 0001 pea 1 483a4: 2f0b movel %a3,%sp@- 483a6: 2f0a movel %a2,%sp@- 483a8: 4eb9 0004 abb4 jsr 4abb4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 483ae: 486e fffc pea %fp@(-4) 483b2: 2f0b movel %a3,%sp@- 483b4: 2f0a movel %a2,%sp@- 483b6: 4eb9 0004 816c jsr 4816c <_Thread_queue_Enqueue_priority> 483bc: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 483c0: 46c2 movew %d2,%sr } } 483c2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 483c8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000483cc <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 483cc: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 483d0: 486e fffc pea %fp@(-4) 483d4: 2f2e 0008 movel %fp@(8),%sp@- 483d8: 4eb9 0004 7cf0 jsr 47cf0 <_Thread_Get> switch ( location ) { 483de: 508f addql #8,%sp 483e0: 4aae fffc tstl %fp@(-4) 483e4: 661e bnes 48404 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 483e6: 2f00 movel %d0,%sp@- 483e8: 4eb9 0004 ac78 jsr 4ac78 <_Thread_queue_Process_timeout> * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; return _Thread_Dispatch_disable_level; 483ee: 588f addql #4,%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 483f0: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 483f6: 5380 subql #1,%d0 483f8: 23c0 0005 d828 movel %d0,5d828 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 483fe: 2039 0005 d828 movel 5d828 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 48404: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000519e0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 519e0: 4e56 ffc0 linkw %fp,#-64 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 519e4: 200e movel %fp,%d0 519e6: 41ee ffec lea %fp@(-20),%a0 519ea: 5180 subql #8,%d0 519ec: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 519f0: 246e 0008 moveal %fp@(8),%a2 519f4: 2e0e movel %fp,%d7 519f6: 260e movel %fp,%d3 519f8: 0687 ffff ffe8 addil #-24,%d7 519fe: 0683 ffff fff4 addil #-12,%d3 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51a04: 2a0a movel %a2,%d5 /* * 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 ); 51a06: 240a movel %a2,%d2 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51a08: 0685 0000 0030 addil #48,%d5 /* * 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 ); 51a0e: 0682 0000 0068 addil #104,%d2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 51a14: 2c08 movel %a0,%d6 51a16: 2800 movel %d0,%d4 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 51a18: 2d48 ffe8 movel %a0,%fp@(-24) head->previous = NULL; 51a1c: 42ae ffec clrl %fp@(-20) tail->previous = head; 51a20: 2d47 fff0 movel %d7,%fp@(-16) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 51a24: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 51a28: 42ae fff8 clrl %fp@(-8) tail->previous = head; 51a2c: 2d43 fffc movel %d3,%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; 51a30: 2547 0078 movel %d7,%a2@(120) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51a34: 47f9 0005 56c0 lea 556c0 <_Watchdog_Adjust_to_chain>,%a3 /* * 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 ); 51a3a: 4bf9 0005 5640 lea 55640 <_Watchdog_Adjust>,%a5 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 51a40: 2039 0007 5764 movel 75764 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 51a46: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 51a4a: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 51a4e: 9081 subl %d1,%d0 51a50: 2f03 movel %d3,%sp@- 51a52: 2f00 movel %d0,%sp@- 51a54: 2f05 movel %d5,%sp@- 51a56: 4e93 jsr %a3@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 51a58: 2879 0007 56ee moveal 756ee <_TOD_Now>,%a4 /* * 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 ) { 51a5e: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 51a62: 202a 0074 movel %a2@(116),%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 51a66: b08c cmpl %a4,%d0 51a68: 640e bccs 51a78 <_Timer_server_Body+0x98> /* * 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 ); 51a6a: 2f03 movel %d3,%sp@- 51a6c: 220c movel %a4,%d1 51a6e: 9280 subl %d0,%d1 51a70: 2f01 movel %d1,%sp@- 51a72: 2f02 movel %d2,%sp@- 51a74: 4e93 jsr %a3@ 51a76: 6010 bras 51a88 <_Timer_server_Body+0xa8> } else if ( snapshot < last_snapshot ) { 51a78: b08c cmpl %a4,%d0 51a7a: 6310 blss 51a8c <_Timer_server_Body+0xac> /* * 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 ); 51a7c: 908c subl %a4,%d0 51a7e: 2f00 movel %d0,%sp@- 51a80: 4878 0001 pea 1 51a84: 2f02 movel %d2,%sp@- 51a86: 4e95 jsr %a5@ 51a88: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 51a8c: 254c 0074 movel %a4,%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 ); 51a90: 49f9 0005 574c lea 5574c <_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 ); 51a96: 202a 0078 movel %a2@(120),%d0 51a9a: 2f00 movel %d0,%sp@- 51a9c: 4eb9 0005 2468 jsr 52468 <_Chain_Get> if ( timer == NULL ) { 51aa2: 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 ); 51aa4: 2040 moveal %d0,%a0 if ( timer == NULL ) { 51aa6: 4a80 tstl %d0 51aa8: 6724 beqs 51ace <_Timer_server_Body+0xee> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51aaa: 2028 0038 movel %a0@(56),%d0 51aae: 7201 moveq #1,%d1 51ab0: b280 cmpl %d0,%d1 51ab2: 6608 bnes 51abc <_Timer_server_Body+0xdc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51ab4: 4868 0010 pea %a0@(16) 51ab8: 2f05 movel %d5,%sp@- 51aba: 600c bras 51ac8 <_Timer_server_Body+0xe8> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51abc: 7203 moveq #3,%d1 51abe: b280 cmpl %d0,%d1 51ac0: 66d4 bnes 51a96 <_Timer_server_Body+0xb6> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51ac2: 4868 0010 pea %a0@(16) 51ac6: 2f02 movel %d2,%sp@- 51ac8: 4e94 jsr %a4@ 51aca: 508f addql #8,%sp 51acc: 60c8 bras 51a96 <_Timer_server_Body+0xb6> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 51ace: 203c 0000 0700 movel #1792,%d0 51ad4: 40c1 movew %sr,%d1 51ad6: 8081 orl %d1,%d0 51ad8: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 51ada: bcae ffe8 cmpl %fp@(-24),%d6 51ade: 6612 bnes 51af2 <_Timer_server_Body+0x112> <== NEVER TAKEN ts->insert_chain = NULL; 51ae0: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 51ae4: 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 ); 51ae6: 367c 0700 moveaw #1792,%a3 _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 ) ) { 51aea: b8ae fff4 cmpl %fp@(-12),%d4 51aee: 6608 bnes 51af8 <_Timer_server_Body+0x118> 51af0: 603e bras 51b30 <_Timer_server_Body+0x150> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 51af2: 46c1 movew %d1,%sr <== NOT EXECUTED 51af4: 6000 ff4a braw 51a40 <_Timer_server_Body+0x60> <== 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 ); 51af8: 200b movel %a3,%d0 51afa: 40c1 movew %sr,%d1 51afc: 8081 orl %d1,%d0 51afe: 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; 51b00: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 51b04: b888 cmpl %a0,%d4 51b06: 6722 beqs 51b2a <_Timer_server_Body+0x14a> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 51b08: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 51b0a: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 51b0e: 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; 51b12: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 51b16: 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 ); 51b18: 2f28 0024 movel %a0@(36),%sp@- 51b1c: 2f28 0020 movel %a0@(32),%sp@- 51b20: 2068 001c moveal %a0@(28),%a0 51b24: 4e90 jsr %a0@ } 51b26: 508f addql #8,%sp 51b28: 60ce bras 51af8 <_Timer_server_Body+0x118> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 51b2a: 46c1 movew %d1,%sr 51b2c: 6000 ff02 braw 51a30 <_Timer_server_Body+0x50> static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 51b30: 47f9 0005 5870 lea 55870 <_Watchdog_Remove>,%a3 * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 51b36: 4200 clrb %d0 51b38: 1540 007c moveb %d0,%a2@(124) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 51b3c: 4eba fdc2 jsr %pc@(51900 <_Thread_Disable_dispatch>) _Thread_Set_state( ts->thread, STATES_DELAYING ); 51b40: 4878 0008 pea 8 51b44: 2f12 movel %a2@,%sp@- 51b46: 4eb9 0005 511c jsr 5511c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 51b4c: 2f0a movel %a2,%sp@- 51b4e: 4eba fdcc jsr %pc@(5191c <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 51b52: 2f0a movel %a2,%sp@- 51b54: 4eba fe26 jsr %pc@(5197c <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 51b58: 4eb9 0005 4940 jsr 54940 <_Thread_Enable_dispatch> ts->active = true; 51b5e: 7201 moveq #1,%d1 51b60: 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 ); 51b64: 486a 0008 pea %a2@(8) 51b68: 4e93 jsr %a3@ static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 51b6a: 486a 0040 pea %a2@(64) 51b6e: 4e93 jsr %a3@ 51b70: 4fef 0018 lea %sp@(24),%sp 51b74: 6000 feba braw 51a30 <_Timer_server_Body+0x50> =============================================================================== 00051b78 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 51b78: 4e56 fff0 linkw %fp,#-16 51b7c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 51b80: 246e 0008 moveal %fp@(8),%a2 51b84: 266e 000c moveal %fp@(12),%a3 if ( ts->insert_chain == NULL ) { 51b88: 202a 0078 movel %a2@(120),%d0 51b8c: 6600 00ea bnew 51c78 <_Timer_server_Schedule_operation_method+0x100> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); 51b90: 4eba fd6e jsr %pc@(51900 <_Thread_Disable_dispatch>) if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 51b94: 202b 0038 movel %a3@(56),%d0 51b98: 7201 moveq #1,%d1 51b9a: b280 cmpl %d0,%d1 51b9c: 665c bnes 51bfa <_Timer_server_Schedule_operation_method+0x82> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 51b9e: 203c 0000 0700 movel #1792,%d0 51ba4: 40c2 movew %sr,%d2 51ba6: 8082 orl %d2,%d0 51ba8: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 51baa: 2039 0007 5764 movel 75764 <_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 ); 51bb0: 43ea 0034 lea %a2@(52),%a1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 51bb4: 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; 51bb8: 206a 0030 moveal %a2@(48),%a0 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 51bbc: b3c8 cmpal %a0,%a1 51bbe: 6716 beqs 51bd6 <_Timer_server_Schedule_operation_method+0x5e> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 51bc0: 2240 moveal %d0,%a1 51bc2: 93c1 subal %d1,%a1 delta_interval = first_watchdog->delta_interval; 51bc4: 2228 0010 movel %a0@(16),%d1 if (delta_interval > delta) { 51bc8: b3c1 cmpal %d1,%a1 51bca: 6404 bccs 51bd0 <_Timer_server_Schedule_operation_method+0x58> delta_interval -= delta; 51bcc: 9289 subl %a1,%d1 51bce: 6002 bras 51bd2 <_Timer_server_Schedule_operation_method+0x5a> } else { delta_interval = 0; 51bd0: 4281 clrl %d1 } first_watchdog->delta_interval = delta_interval; 51bd2: 2141 0010 movel %d1,%a0@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 51bd6: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 51bda: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51bdc: 486b 0010 pea %a3@(16) 51be0: 486a 0030 pea %a2@(48) 51be4: 4eb9 0005 574c jsr 5574c <_Watchdog_Insert> if ( !ts->active ) { 51bea: 508f addql #8,%sp 51bec: 102a 007c moveb %a2@(124),%d0 51bf0: 6678 bnes 51c6a <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_interval_system_watchdog( ts ); 51bf2: 2f0a movel %a2,%sp@- 51bf4: 4eba fd26 jsr %pc@(5191c <_Timer_server_Reset_interval_system_watchdog>) 51bf8: 606e bras 51c68 <_Timer_server_Schedule_operation_method+0xf0> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51bfa: 7203 moveq #3,%d1 51bfc: b280 cmpl %d0,%d1 51bfe: 666a bnes 51c6a <_Timer_server_Schedule_operation_method+0xf2> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 51c00: 203c 0000 0700 movel #1792,%d0 51c06: 40c2 movew %sr,%d2 51c08: 8082 orl %d2,%d0 51c0a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 51c0c: 200a movel %a2,%d0 51c0e: 0680 0000 006c addil #108,%d0 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 51c14: 2239 0007 56ee movel 756ee <_TOD_Now>,%d1 last_snapshot = ts->TOD_watchdogs.last_snapshot; 51c1a: 226a 0074 moveal %a2@(116),%a1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 51c1e: 206a 0068 moveal %a2@(104),%a0 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 51c22: b088 cmpl %a0,%d0 51c24: 6720 beqs 51c46 <_Timer_server_Schedule_operation_method+0xce> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 51c26: 2028 0010 movel %a0@(16),%d0 if ( snapshot > last_snapshot ) { 51c2a: b3c1 cmpal %d1,%a1 51c2c: 640c bccs 51c3a <_Timer_server_Schedule_operation_method+0xc2> /* * We advanced in time. */ delta = snapshot - last_snapshot; 51c2e: 2841 moveal %d1,%a4 51c30: 99c9 subal %a1,%a4 if (delta_interval > delta) { 51c32: b9c0 cmpal %d0,%a4 51c34: 640a bccs 51c40 <_Timer_server_Schedule_operation_method+0xc8><== NEVER TAKEN delta_interval -= delta; 51c36: 908c subl %a4,%d0 51c38: 6008 bras 51c42 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 51c3a: d089 addl %a1,%d0 delta_interval += delta; 51c3c: 9081 subl %d1,%d0 51c3e: 6002 bras 51c42 <_Timer_server_Schedule_operation_method+0xca> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 51c40: 4280 clrl %d0 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 51c42: 2140 0010 movel %d0,%a0@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 51c46: 2541 0074 movel %d1,%a2@(116) _ISR_Enable( level ); 51c4a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51c4c: 486b 0010 pea %a3@(16) 51c50: 486a 0068 pea %a2@(104) 51c54: 4eb9 0005 574c jsr 5574c <_Watchdog_Insert> if ( !ts->active ) { 51c5a: 508f addql #8,%sp 51c5c: 102a 007c moveb %a2@(124),%d0 51c60: 6608 bnes 51c6a <_Timer_server_Schedule_operation_method+0xf2> _Timer_server_Reset_tod_system_watchdog( ts ); 51c62: 2f0a movel %a2,%sp@- 51c64: 4eba fd16 jsr %pc@(5197c <_Timer_server_Reset_tod_system_watchdog>) 51c68: 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 ); } } 51c6a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 51c70: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 51c72: 4ef9 0005 4940 jmp 54940 <_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 ); 51c78: 202a 0078 movel %a2@(120),%d0 51c7c: 2d4b 000c movel %a3,%fp@(12) } } 51c80: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 * 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 ); 51c86: 2d40 0008 movel %d0,%fp@(8) } } 51c8a: 4e5e unlk %fp * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 51c8c: 4ef9 0005 2408 jmp 52408 <_Chain_Append> =============================================================================== 00048634 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48634: 4e56 ffe8 linkw %fp,#-24 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48638: 203c 0005 d970 movel #383344,%d0 4863e: 23c0 0005 d96c movel %d0,5d96c <_User_extensions_List> head->previous = NULL; tail->previous = head; 48644: 203c 0005 d96c movel #383340,%d0 4864a: 23c0 0005 d974 movel %d0,5d974 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48650: 203c 0005 d830 movel #383024,%d0 48656: 23c0 0005 d82c movel %d0,5d82c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 4865c: 203c 0005 d82c movel #383020,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48662: 42b9 0005 d970 clrl 5d970 <_User_extensions_List+0x4> 48668: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 4866c: 2839 0005 bf02 movel 5bf02 ,%d4 initial_extensions = Configuration.User_extension_table; 48672: 2639 0005 bf06 movel 5bf06 ,%d3 48678: 42b9 0005 d830 clrl 5d830 <_User_extensions_Switches_list+0x4> tail->previous = head; 4867e: 23c0 0005 d834 movel %d0,5d834 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48684: 4a83 tstl %d3 48686: 6754 beqs 486dc <_User_extensions_Handler_initialization+0xa8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 48688: 7434 moveq #52,%d2 4868a: 4c04 2800 mulsl %d4,%d2 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 4868e: 49f9 0004 c854 lea 4c854 ,%a4 _User_extensions_Add_set( extension ); 48694: 47f9 0004 acec lea 4acec <_User_extensions_Add_set>,%a3 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 4869a: 2f02 movel %d2,%sp@- 4869c: 4eb9 0004 8b56 jsr 48b56 <_Workspace_Allocate_or_fatal_error> 486a2: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 486a4: 2f02 movel %d2,%sp@- extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 486a6: 4282 clrl %d2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 486a8: 42a7 clrl %sp@- 486aa: 2f00 movel %d0,%sp@- 486ac: 4eb9 0004 c8c4 jsr 4c8c4 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 486b2: 4fef 0010 lea %sp@(16),%sp 486b6: 6020 bras 486d8 <_User_extensions_Handler_initialization+0xa4> RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 486b8: 4878 0020 pea 20 486bc: 5282 addql #1,%d2 486be: 2f03 movel %d3,%sp@- 486c0: 486a 0014 pea %a2@(20) 486c4: 0683 0000 0020 addil #32,%d3 486ca: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 486cc: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 486ce: 45ea 0034 lea %a2@(52),%a2 486d2: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 486d4: 4fef 0010 lea %sp@(16),%sp 486d8: b882 cmpl %d2,%d4 486da: 66dc bnes 486b8 <_User_extensions_Handler_initialization+0x84> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 486dc: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 486e2: 4e5e unlk %fp ... =============================================================================== 00049b64 <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49b64: 327c 0700 moveaw #1792,%a1 49b68: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49b6a: 4e56 ffec linkw %fp,#-20 49b6e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49b72: 266e 0008 moveal %fp@(8),%a3 49b76: 262e 000c movel %fp@(12),%d3 49b7a: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49b7e: 40c0 movew %sr,%d0 49b80: 8280 orl %d0,%d1 49b82: 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; 49b84: 244b moveal %a3,%a2 49b86: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 49b88: b5c8 cmpal %a0,%a2 49b8a: 674c beqs 49bd8 <_Watchdog_Adjust+0x74> switch ( direction ) { 49b8c: 4a83 tstl %d3 49b8e: 673c beqs 49bcc <_Watchdog_Adjust+0x68> 49b90: 7201 moveq #1,%d1 49b92: b283 cmpl %d3,%d1 49b94: 6642 bnes 49bd8 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 49b96: d5a8 0010 addl %d2,%a0@(16) break; 49b9a: 603c bras 49bd8 <_Watchdog_Adjust+0x74> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49b9c: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49b9e: 2228 0010 movel %a0@(16),%d1 49ba2: b282 cmpl %d2,%d1 49ba4: 6308 blss 49bae <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 49ba6: 9282 subl %d2,%d1 49ba8: 2141 0010 movel %d1,%a0@(16) break; 49bac: 602a bras 49bd8 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; 49bae: 9481 subl %d1,%d2 _Watchdog_First( header )->delta_interval = 1; 49bb0: 7201 moveq #1,%d1 49bb2: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 49bb6: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 49bb8: 2f0b movel %a3,%sp@- 49bba: 4e94 jsr %a4@ _ISR_Disable( level ); 49bbc: 2203 movel %d3,%d1 49bbe: 40c0 movew %sr,%d0 49bc0: 8280 orl %d0,%d1 49bc2: 46c1 movew %d1,%sr if ( _Chain_Is_empty( header ) ) 49bc4: 588f addql #4,%sp 49bc6: b5d3 cmpal %a3@,%a2 49bc8: 660a bnes 49bd4 <_Watchdog_Adjust+0x70> 49bca: 600c bras 49bd8 <_Watchdog_Adjust+0x74> units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49bcc: 49f9 0004 9d84 lea 49d84 <_Watchdog_Tickle>,%a4 _ISR_Disable( level ); 49bd2: 2609 movel %a1,%d3 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49bd4: 4a82 tstl %d2 49bd6: 66c4 bnes 49b9c <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49bd8: 46c0 movew %d0,%sr } 49bda: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49be0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000488a4 <_Watchdog_Insert>: Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 488a4: 327c 0700 moveaw #1792,%a1 488a8: 2009 movel %a1,%d0 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 488aa: 4e56 ffec linkw %fp,#-20 488ae: 206e 000c moveal %fp@(12),%a0 488b2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 488b6: 266e 0008 moveal %fp@(8),%a3 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 488ba: 2439 0005 d9b8 movel 5d9b8 <_Per_CPU_Information+0x8>,%d2 _ISR_Disable( level ); 488c0: 40c1 movew %sr,%d1 488c2: 8081 orl %d1,%d0 488c4: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 488c6: 4aa8 0008 tstl %a0@(8) 488ca: 6600 0098 bnew 48964 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 488ce: 7001 moveq #1,%d0 break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 488d0: 2449 moveal %a1,%a2 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 488d2: 2140 0008 movel %d0,%a0@(8) _Watchdog_Sync_count++; 488d6: 2039 0005 d924 movel 5d924 <_Watchdog_Sync_count>,%d0 488dc: 5280 addql #1,%d0 488de: 23c0 0005 d924 movel %d0,5d924 <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 488e4: 2028 000c movel %a0@(12),%d0 488e8: 2253 moveal %a3@,%a1 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 488ea: 4a80 tstl %d0 488ec: 673c beqs 4892a <_Watchdog_Insert+0x86> 488ee: 4a91 tstl %a1@ 488f0: 6738 beqs 4892a <_Watchdog_Insert+0x86> break; if ( delta_interval < after->delta_interval ) { 488f2: 2629 0010 movel %a1@(16),%d3 488f6: b680 cmpl %d0,%d3 488f8: 6308 blss 48902 <_Watchdog_Insert+0x5e> after->delta_interval -= delta_interval; 488fa: 9680 subl %d0,%d3 488fc: 2343 0010 movel %d3,%a1@(16) break; 48900: 6028 bras 4892a <_Watchdog_Insert+0x86> } delta_interval -= after->delta_interval; _ISR_Flash( level ); 48902: 280a movel %a2,%d4 48904: 46c1 movew %d1,%sr 48906: 8881 orl %d1,%d4 48908: 46c4 movew %d4,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4890a: 7801 moveq #1,%d4 4890c: b8a8 0008 cmpl %a0@(8),%d4 48910: 663e bnes 48950 <_Watchdog_Insert+0xac> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 48912: 2839 0005 d8cc movel 5d8cc <_Watchdog_Sync_level>,%d4 48918: b484 cmpl %d4,%d2 4891a: 6408 bccs 48924 <_Watchdog_Insert+0x80> _Watchdog_Sync_level = insert_isr_nest_level; 4891c: 23c2 0005 d8cc movel %d2,5d8cc <_Watchdog_Sync_level> goto restart; 48922: 60c0 bras 488e4 <_Watchdog_Insert+0x40> exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 48924: 2251 moveal %a1@,%a1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 48926: 9083 subl %d3,%d0 if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; goto restart; } } 48928: 60c0 bras 488ea <_Watchdog_Insert+0x46> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4892a: 2269 0004 moveal %a1@(4),%a1 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4892e: 7602 moveq #2,%d3 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48930: 2451 moveal %a1@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 48932: 2140 0010 movel %d0,%a0@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 48936: 2039 0005 d928 movel 5d928 <_Watchdog_Ticks_since_boot>,%d0 4893c: 2143 0008 movel %d3,%a0@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48940: 2149 0004 movel %a1,%a0@(4) before_node = after_node->next; after_node->next = the_node; 48944: 2288 movel %a0,%a1@ the_node->next = before_node; before_node->previous = the_node; 48946: 2548 0004 movel %a0,%a2@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4894a: 208a movel %a2,%a0@ 4894c: 2140 0014 movel %d0,%a0@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 48950: 23c2 0005 d8cc movel %d2,5d8cc <_Watchdog_Sync_level> _Watchdog_Sync_count--; 48956: 2039 0005 d924 movel 5d924 <_Watchdog_Sync_count>,%d0 4895c: 5380 subql #1,%d0 4895e: 23c0 0005 d924 movel %d0,5d924 <_Watchdog_Sync_count> _ISR_Enable( level ); 48964: 46c1 movew %d1,%sr } 48966: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 4896a: 4e5e unlk %fp ... =============================================================================== 000489c8 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 489c8: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 489ce: 4e56 0000 linkw %fp,#0 489d2: 206e 0008 moveal %fp@(8),%a0 489d6: 2f0a movel %a2,%sp@- 489d8: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 489da: 40c1 movew %sr,%d1 489dc: 8081 orl %d1,%d0 489de: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 489e0: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 489e4: 7401 moveq #1,%d2 489e6: b480 cmpl %d0,%d2 489e8: 670c beqs 489f6 <_Watchdog_Remove+0x2e> 489ea: 6242 bhis 48a2e <_Watchdog_Remove+0x66> 489ec: 143c 0003 moveb #3,%d2 489f0: b480 cmpl %d0,%d2 489f2: 653a bcss 48a2e <_Watchdog_Remove+0x66> <== NEVER TAKEN 489f4: 6006 bras 489fc <_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; 489f6: 42a8 0008 clrl %a0@(8) break; 489fa: 6032 bras 48a2e <_Watchdog_Remove+0x66> } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 489fc: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 489fe: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48a02: 4a91 tstl %a1@ 48a04: 6708 beqs 48a0e <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 48a06: 2428 0010 movel %a0@(16),%d2 48a0a: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48a0e: 2479 0005 d924 moveal 5d924 <_Watchdog_Sync_count>,%a2 48a14: 4a8a tstl %a2 48a16: 670c beqs 48a24 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 48a18: 45f9 0005 d9b8 lea 5d9b8 <_Per_CPU_Information+0x8>,%a2 48a1e: 23d2 0005 d8cc movel %a2@,5d8cc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48a24: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 48a28: 234a 0004 movel %a2,%a1@(4) previous->next = next; 48a2c: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48a2e: 2279 0005 d928 moveal 5d928 <_Watchdog_Ticks_since_boot>,%a1 48a34: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48a38: 46c1 movew %d1,%sr return( previous_state ); } 48a3a: 241f movel %sp@+,%d2 48a3c: 245f moveal %sp@+,%a2 48a3e: 4e5e unlk %fp ... =============================================================================== 00059b78 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 59b78: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 59b7a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59b7e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00059a60 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 59a60: 4e56 0000 linkw %fp,#0 59a64: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 59a68: 2d6e 0010 000c movel %fp@(16),%fp@(12) 59a6e: 2d40 0008 movel %d0,%fp@(8) } 59a72: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 59a74: 4ef9 0004 27cc jmp 427cc ... =============================================================================== 00049be0 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 49be0: 4e56 0000 linkw %fp,#0 return close( fd ); 49be4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 49bea: 4e5e unlk %fp int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 49bec: 4ef9 0004 9b70 jmp 49b70 ... =============================================================================== 00043334 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 43334: 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(); 43338: 4eb9 0005 a190 jsr 5a190 <_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(); 4333e: 4eb9 0004 32d0 jsr 432d0 rtems_shutdown_executive(status); 43344: 2f2e 0008 movel %fp@(8),%sp@- 43348: 4eb9 0004 602c jsr 4602c ... =============================================================================== 000507c2 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 507c2: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 507c6: 206e 0008 moveal %fp@(8),%a0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 507ca: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 507ce: 244e moveal %fp,%a2 void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 507d0: 4283 clrl %d3 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 507d2: 4bf9 0005 04b0 lea 504b0 ,%a5 if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 507d8: 49f9 0005 87d8 lea 587d8 ,%a4 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 507de: 282e 0014 movel %fp@(20),%d4 507e2: 2e2e 0018 movel %fp@(24),%d7 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 507e6: 2668 0034 moveal %a0@(52),%a3 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 507ea: 42a2 clrl %a2@- { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; 507ec: 2c2e 0010 movel %fp@(16),%d6 ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; 507f0: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 507f4: 6040 bras 50836 <_fat_block_read+0x74> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 507f6: 2f0a movel %a2,%sp@- 507f8: 4878 0001 pea 1 507fc: 2f05 movel %d5,%sp@- 507fe: 2f0b movel %a3,%sp@- 50800: 4e95 jsr %a5@ if (rc != RC_OK) 50802: 4fef 0010 lea %sp@(16),%sp 50806: 4a80 tstl %d0 50808: 6632 bnes 5083c <_fat_block_read+0x7a> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 5080a: 4282 clrl %d2 5080c: 3413 movew %a3@,%d2 5080e: 9486 subl %d6,%d2 50810: b882 cmpl %d2,%d4 50812: 6402 bccs 50816 <_fat_block_read+0x54> 50814: 2404 movel %d4,%d2 memcpy((buff + cmpltd), (block->buffer + ofs), c); 50816: 206e fffc moveal %fp@(-4),%a0 count -= c; 5081a: 9882 subl %d2,%d4 cmpltd += c; blk++; 5081c: 5285 addql #1,%d5 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 5081e: 2f02 movel %d2,%sp@- 50820: dca8 001e addl %a0@(30),%d6 50824: 2047 moveal %d7,%a0 50826: 2f06 movel %d6,%sp@- 50828: 4870 3800 pea %a0@(00000000,%d3:l) count -= c; cmpltd += c; blk++; ofs = 0; 5082c: 4286 clrl %d6 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; 5082e: d682 addl %d2,%d3 rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 50830: 4e94 jsr %a4@ count -= c; cmpltd += c; blk++; ofs = 0; 50832: 4fef 000c lea %sp@(12),%sp uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 50836: 4a84 tstl %d4 50838: 66bc bnes 507f6 <_fat_block_read+0x34> 5083a: 6002 bras 5083e <_fat_block_read+0x7c> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 5083c: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 5083e: 2003 movel %d3,%d0 50840: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 50846: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000508e6 <_fat_block_release>: * 0 on success, or -1 if error occured and errno set appropriately */ int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { 508e6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 508ea: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 508ee: 2d68 0034 0008 movel %a0@(52),%fp@(8) <== NOT EXECUTED } 508f4: 4e5e unlk %fp <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 508f6: 4ef9 0005 0690 jmp 50690 <== NOT EXECUTED =============================================================================== 0005084a <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 5084a: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5084e: 206e 0008 moveal %fp@(8),%a0 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 50852: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 50856: 244e moveal %fp,%a2 uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 50858: 4283 clrl %d3 c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 5085a: 49f9 0005 04b0 lea 504b0 ,%a4 if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 50860: 4bf9 0005 87d8 lea 587d8 ,%a5 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 50866: 282e 0014 movel %fp@(20),%d4 5086a: 2e2e 0018 movel %fp@(24),%d7 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5086e: 2668 0034 moveal %a0@(52),%a3 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 50872: 42a2 clrl %a2@- { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; 50874: 2c2e 0010 movel %fp@(16),%d6 const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; 50878: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 5087c: 6054 bras 508d2 <_fat_block_write+0x88> { c = MIN(count, (fs_info->vol.bps - ofs)); 5087e: 4280 clrl %d0 50880: 3013 movew %a3@,%d0 50882: 2400 movel %d0,%d2 50884: 9486 subl %d6,%d2 50886: b882 cmpl %d2,%d4 50888: 6402 bccs 5088c <_fat_block_write+0x42> 5088a: 2404 movel %d4,%d2 if (c == fs_info->vol.bps) 5088c: b082 cmpl %d2,%d0 5088e: 6608 bnes 50898 <_fat_block_write+0x4e> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 50890: 2f0a movel %a2,%sp@- 50892: 4878 0002 pea 2 50896: 6006 bras 5089e <_fat_block_write+0x54> else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 50898: 2f0a movel %a2,%sp@- 5089a: 4878 0001 pea 1 5089e: 2f05 movel %d5,%sp@- 508a0: 2f0b movel %a3,%sp@- 508a2: 4e94 jsr %a4@ 508a4: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 508a8: 4a80 tstl %d0 508aa: 662c bnes 508d8 <_fat_block_write+0x8e> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 508ac: 2f02 movel %d2,%sp@- 508ae: 2047 moveal %d7,%a0 508b0: 4870 3800 pea %a0@(00000000,%d3:l) fat_buf_mark_modified(fs_info); count -= c; 508b4: 9882 subl %d2,%d4 cmpltd +=c; 508b6: d682 addl %d2,%d3 blk++; 508b8: 5285 addql #1,%d5 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 508ba: 206e fffc moveal %fp@(-4),%a0 508be: dca8 001e addl %a0@(30),%d6 508c2: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 508c4: 4286 clrl %d6 else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 508c6: 4e95 jsr %a5@ fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 508c8: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 508cc: 7001 moveq #1,%d0 508ce: 1740 0076 moveb %d0,%a3@(118) uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 508d2: 4a84 tstl %d4 508d4: 66a8 bnes 5087e <_fat_block_write+0x34> 508d6: 6002 bras 508da <_fat_block_write+0x90> if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 508d8: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 508da: 2003 movel %d3,%d0 508dc: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 508e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b0bc <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 5b0bc: 4e56 0000 linkw %fp,#0 5b0c0: 222e 0010 movel %fp@(16),%d1 5b0c4: 202e 000c movel %fp@(12),%d0 return fcntl( fd, cmd, arg ); 5b0c8: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5b0ce: 2d41 000c movel %d1,%fp@(12) 5b0d2: 2d40 0008 movel %d0,%fp@(8) } 5b0d6: 4e5e unlk %fp int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 5b0d8: 4ef9 0005 af54 jmp 5af54 ... =============================================================================== 00059a7c <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 59a7c: 4e56 0000 linkw %fp,#0 free( ptr ); 59a80: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59a86: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 59a88: 4ef9 0004 2b68 jmp 42b68 ... =============================================================================== 00042c68 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 42c68: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 42c6c: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 42c6e: 4ef9 0004 2bf0 jmp 42bf0 <== NOT EXECUTED =============================================================================== 0004f9c6 <_hash_search>: uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4f9c6: 7001 moveq #1,%d0 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4f9c8: 4e56 ffe8 linkw %fp,#-24 4f9cc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4f9d0: 242e 0010 movel %fp@(16),%d2 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(mt_entry, &ffd->dir_pos.sname); 4f9d4: 49fa ff9e lea %pc@(4f974 ),%a4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4f9d8: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4f9da: 266e 000c moveal %fp@(12),%a3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4f9de: 2200 movel %d0,%d1 4f9e0: e988 lsll #4,%d0 4f9e2: e589 lsll #2,%d1 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4f9e4: 282e 0008 movel %fp@(8),%d4 uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4f9e8: 9081 subl %d1,%d0 4f9ea: d7c0 addal %d0,%a3 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4f9ec: 262e 0014 movel %fp@(20),%d3 4f9f0: 245b moveal %a3@+,%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) ; ) 4f9f2: 6024 bras 4fa18 <_hash_search+0x52> { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); 4f9f4: 486a 0020 pea %a2@(32) 4f9f8: 2f04 movel %d4,%sp@- 4f9fa: 4e94 jsr %a4@ 4f9fc: 508f addql #8,%sp if ( (key1) == ck) 4f9fe: b082 cmpl %d2,%d0 4fa00: 6614 bnes 4fa16 <_hash_search+0x50> { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 4fa02: 4a83 tstl %d3 4fa04: 6706 beqs 4fa0c <_hash_search+0x46> <== ALWAYS TAKEN 4fa06: b6aa 000c cmpl %a2@(12),%d3 <== NOT EXECUTED 4fa0a: 660a bnes 4fa16 <_hash_search+0x50> <== NOT EXECUTED { *ret = (void *)the_node; 4fa0c: 206e 0018 moveal %fp@(24),%a0 return 0; 4fa10: 4280 clrl %d0 if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) { *ret = (void *)the_node; 4fa12: 208a movel %a2,%a0@ return 0; 4fa14: 6008 bras 4fa1e <_hash_search+0x58> } } the_node = the_node->next; 4fa16: 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) ; ) 4fa18: b7ca cmpal %a2,%a3 4fa1a: 66d8 bnes 4f9f4 <_hash_search+0x2e> return 0; } } the_node = the_node->next; } return -1; 4fa1c: 70ff moveq #-1,%d0 } 4fa1e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4fa24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059b50 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 59b50: 4e56 0000 linkw %fp,#0 return isatty( fd ); 59b54: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59b5a: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 59b5c: 4ef9 0005 a0e8 jmp 5a0e8 ... =============================================================================== 00059c50 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 59c50: 4e56 0000 linkw %fp,#0 59c54: 206e 000c moveal %fp@(12),%a0 59c58: 202e 0010 movel %fp@(16),%d0 59c5c: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 59c60: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 59c66: 2d40 000c movel %d0,%fp@(12) 59c6a: 2d41 0010 movel %d1,%fp@(16) 59c6e: 2d48 0008 movel %a0,%fp@(8) } 59c72: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 59c74: 4ef9 0005 9b84 jmp 59b84 ... =============================================================================== 00059c7c <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 59c7c: 4e56 0000 linkw %fp,#0 return malloc( size ); 59c80: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 59c86: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 59c88: 4ef9 0004 2e54 jmp 42e54 ... =============================================================================== 00059d2c <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 59d2c: 4e56 0000 linkw %fp,#0 59d30: 222e 0010 movel %fp@(16),%d1 59d34: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 59d38: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 59d3e: 2d41 000c movel %d1,%fp@(12) 59d42: 2d40 0008 movel %d0,%fp@(8) } 59d46: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 59d48: 4ef9 0005 9c90 jmp 59c90 ... =============================================================================== 00059d50 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 59d50: 4e56 0000 linkw %fp,#0 59d54: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 59d58: 2d6e 0010 000c movel %fp@(16),%fp@(12) 59d5e: 2d40 0008 movel %d0,%fp@(8) } 59d62: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 59d64: 4ef9 0005 9d90 jmp 59d90 ... =============================================================================== 00043514 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 43514: 4e56 0000 linkw %fp,#0 43518: 202e 000c movel %fp@(12),%d0 return _STAT_NAME( path, buf ); 4351c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 43522: 2d40 0008 movel %d0,%fp@(8) } 43526: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 43528: 4ef9 0004 348c jmp 4348c ... =============================================================================== 000451d4 <_times_r>: clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { 451d4: 4e56 0000 linkw %fp,#0 return _times( ptms ); 451d8: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 451de: 4e5e unlk %fp clock_t _times_r( struct _reent *ptr __attribute__((unused)), struct tms *ptms ) { return _times( ptms ); 451e0: 4ef9 0004 5130 jmp 45130 <_times> ... =============================================================================== 00059d6c <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 59d6c: 4e56 0000 linkw %fp,#0 59d70: 222e 0010 movel %fp@(16),%d1 59d74: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 59d78: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 59d7e: 2d41 000c movel %d1,%fp@(12) 59d82: 2d40 0008 movel %d0,%fp@(8) } 59d86: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 59d88: 4ef9 0005 9e74 jmp 59e74 ... =============================================================================== 00044008 : int chmod( const char *path, mode_t mode ) { 44008: 4e56 ffe8 linkw %fp,#-24 4400c: 2f03 movel %d3,%sp@- 4400e: 262e 0008 movel %fp@(8),%d3 44012: 2f02 movel %d2,%sp@- int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 44014: 240e movel %fp,%d2 44016: 0682 ffff ffec addil #-20,%d2 4401c: 2f03 movel %d3,%sp@- 4401e: 4eb9 0004 f8e4 jsr 4f8e4 44024: 7201 moveq #1,%d1 44026: 2e81 movel %d1,%sp@ 44028: 2f02 movel %d2,%sp@- 4402a: 42a7 clrl %sp@- 4402c: 2f00 movel %d0,%sp@- 4402e: 2f03 movel %d3,%sp@- 44030: 4eb9 0004 44c0 jsr 444c0 if ( status != 0 ) 44036: 4fef 0014 lea %sp@(20),%sp 4403a: 4a80 tstl %d0 4403c: 6626 bnes 44064 <== NEVER TAKEN return -1; result = (*loc.handlers->fchmod_h)( &loc, mode ); 4403e: 2f2e 000c movel %fp@(12),%sp@- 44042: 206e fff4 moveal %fp@(-12),%a0 44046: 2f02 movel %d2,%sp@- 44048: 2068 001c moveal %a0@(28),%a0 4404c: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4404e: 2f02 movel %d2,%sp@- 44050: 2d40 ffe8 movel %d0,%fp@(-24) 44054: 4eb9 0004 468c jsr 4468c return result; 4405a: 202e ffe8 movel %fp@(-24),%d0 4405e: 4fef 000c lea %sp@(12),%sp 44062: 6002 bras 44066 rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; 44064: 70ff moveq #-1,%d0 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 44066: 242e ffe0 movel %fp@(-32),%d2 4406a: 262e ffe4 movel %fp@(-28),%d3 4406e: 4e5e unlk %fp ... =============================================================================== 00044640 : #include int chroot( const char *pathname ) { 44640: 4e56 ffe0 linkw %fp,#-32 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 44644: 203c 0006 0348 movel #394056,%d0 #include int chroot( const char *pathname ) { 4464a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 4464e: b0b9 0005 ed50 cmpl 5ed50 ,%d0 44654: 6624 bnes 4467a rtems_libio_set_private_env(); /* try to set a new private env*/ 44656: 4eb9 0004 5c28 jsr 45c28 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4465c: 41f9 0006 0348 lea 60348 ,%a0 44662: b1f9 0005 ed50 cmpal 5ed50 ,%a0 44668: 6610 bnes 4467a rtems_set_errno_and_return_minus_one( ENOTSUP ); 4466a: 4eb9 0004 e7e8 jsr 4e7e8 <__errno> 44670: 2040 moveal %d0,%a0 44672: 20bc 0000 0086 movel #134,%a0@ 44678: 6020 bras 4469a } result = chdir(pathname); 4467a: 2f2e 0008 movel %fp@(8),%sp@- 4467e: 4eb9 0004 458c jsr 4458c if (result) { 44684: 588f addql #4,%sp 44686: 4a80 tstl %d0 44688: 6714 beqs 4469e rtems_set_errno_and_return_minus_one( errno ); 4468a: 45f9 0004 e7e8 lea 4e7e8 <__errno>,%a2 44690: 4e92 jsr %a2@ 44692: 2640 moveal %d0,%a3 44694: 4e92 jsr %a2@ 44696: 2040 moveal %d0,%a0 44698: 2690 movel %a0@,%a3@ 4469a: 70ff moveq #-1,%d0 4469c: 6056 bras 446f4 } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 4469e: 42a7 clrl %sp@- 446a0: 240e movel %fp,%d2 446a2: 0682 ffff ffec addil #-20,%d2 446a8: 2f02 movel %d2,%sp@- 446aa: 42a7 clrl %sp@- 446ac: 4878 0001 pea 1 446b0: 4879 0005 cd25 pea 5cd25 <_rodata_start+0x1b5> 446b6: 4eb9 0004 49f4 jsr 449f4 446bc: 4fef 0014 lea %sp@(20),%sp 446c0: 4a80 tstl %d0 446c2: 66c6 bnes 4468a <== NEVER TAKEN /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 446c4: 2079 0005 ed50 moveal 5ed50 ,%a0 446ca: 41e8 0018 lea %a0@(24),%a0 446ce: 2f08 movel %a0,%sp@- 446d0: 4eb9 0004 4bc0 jsr 44bc0 rtems_filesystem_root = loc; 446d6: 4878 0014 pea 14 446da: 2079 0005 ed50 moveal 5ed50 ,%a0 446e0: 41e8 0018 lea %a0@(24),%a0 446e4: 2f02 movel %d2,%sp@- 446e6: 2f08 movel %a0,%sp@- 446e8: 4eb9 0004 f008 jsr 4f008 return 0; 446ee: 4fef 0010 lea %sp@(16),%sp 446f2: 4280 clrl %d0 } 446f4: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 446fa: 4e5e unlk %fp ... =============================================================================== 00042534 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 42534: 4e56 ffe0 linkw %fp,#-32 42538: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 4253c: 242e 0008 movel %fp@(8),%d2 42540: 262e 000c movel %fp@(12),%d3 42544: 2e2e 0010 movel %fp@(16),%d7 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 42548: 2c02 movel %d2,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 4254a: 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) { 4254c: 2479 0006 025e moveal 6025e ,%a2 42552: b5c6 cmpal %d6,%a2 42554: 6252 bhis 425a8 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 42556: 280a movel %a2,%d4 42558: 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; 4255a: 2039 0006 0262 movel 60262 ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 42560: b886 cmpl %d6,%d4 42562: 6204 bhis 42568 <== NEVER TAKEN new_size = major + 1; 42564: 2806 movel %d6,%d4 42566: 5284 addql #1,%d4 } table = realloc(table, new_size * sizeof(*table)); 42568: 2204 movel %d4,%d1 4256a: e789 lsll #3,%d1 4256c: 2f01 movel %d1,%sp@- 4256e: 2f00 movel %d0,%sp@- 42570: 4eb9 0004 4308 jsr 44308 if (table == NULL) { 42576: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 42578: 2640 moveal %d0,%a3 if (table == NULL) { 4257a: 4a80 tstl %d0 4257c: 6700 0104 beqw 42682 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 42580: 2004 movel %d4,%d0 <== NOT EXECUTED 42582: 908a subl %a2,%d0 <== NOT EXECUTED 42584: 220a movel %a2,%d1 <== NOT EXECUTED 42586: e788 lsll #3,%d0 <== NOT EXECUTED 42588: e789 lsll #3,%d1 <== NOT EXECUTED 4258a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4258c: 42a7 clrl %sp@- <== NOT EXECUTED 4258e: 4873 1800 pea %a3@(00000000,%d1:l) <== NOT EXECUTED 42592: 4eb9 0004 fecc jsr 4fecc <== NOT EXECUTED disktab = table; disktab_size = new_size; 42598: 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; 4259c: 23cb 0006 0262 movel %a3,60262 <== NOT EXECUTED disktab_size = new_size; 425a2: 23c4 0006 025e movel %d4,6025e <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 425a8: 2479 0006 0262 moveal 60262 ,%a2 425ae: e78e lsll #3,%d6 425b0: d5c6 addal %d6,%a2 425b2: 2012 movel %a2@,%d0 425b4: 6706 beqs 425bc 425b6: baaa 0004 cmpl %a2@(4),%d5 425ba: 654c bcss 42608 <== ALWAYS TAKEN rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 425bc: 2c2a 0004 movel %a2@(4),%d6 rtems_device_minor_number new_size = 0; if (old_size == 0) { 425c0: 6706 beqs 425c8 <== ALWAYS TAKEN new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 425c2: 2806 movel %d6,%d4 <== NOT EXECUTED 425c4: d884 addl %d4,%d4 <== NOT EXECUTED 425c6: 6002 bras 425ca <== NOT EXECUTED 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; 425c8: 7808 moveq #8,%d4 } else { new_size = 2 * old_size; } if (minor >= new_size) { 425ca: b885 cmpl %d5,%d4 425cc: 6204 bhis 425d2 new_size = minor + 1; 425ce: 2805 movel %d5,%d4 425d0: 5284 addql #1,%d4 } table = realloc(table, new_size * sizeof(*table)); 425d2: 2204 movel %d4,%d1 425d4: e589 lsll #2,%d1 425d6: 2f01 movel %d1,%sp@- 425d8: 2f00 movel %d0,%sp@- 425da: 4eb9 0004 4308 jsr 44308 if (table == NULL) { 425e0: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 425e2: 2640 moveal %d0,%a3 if (table == NULL) { 425e4: 4a80 tstl %d0 425e6: 6700 009a beqw 42682 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 425ea: 2004 movel %d4,%d0 425ec: 9086 subl %d6,%d0 425ee: e588 lsll #2,%d0 425f0: 2f00 movel %d0,%sp@- 425f2: 42a7 clrl %sp@- 425f4: 4873 6c00 pea %a3@(00000000,%d6:l:4) 425f8: 4eb9 0004 fecc jsr 4fecc disktab [major].minor = table; disktab [major].size = new_size; 425fe: 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; 42602: 248b movel %a3,%a2@ disktab [major].size = new_size; 42604: 2544 0004 movel %d4,%a2@(4) } return disktab [major].minor + minor; 42608: 2652 moveal %a2@,%a3 4260a: e58d lsll #2,%d5 4260c: d7c5 addal %d5,%a3 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 4260e: 4a8b tstl %a3 42610: 6770 beqs 42682 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 42612: 4a93 tstl %a3@ 42614: 6668 bnes 4267e return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42616: 4878 0032 pea 32 4261a: 4eb9 0004 391c jsr 4391c if (dd == NULL) { 42620: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42622: 2440 moveal %d0,%a2 if (dd == NULL) { 42624: 4a80 tstl %d0 42626: 675a beqs 42682 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 42628: 4a87 tstl %d7 4262a: 6730 beqs 4265c alloc_name = strdup(name); 4262c: 2f07 movel %d7,%sp@- 4262e: 4eb9 0005 04bc jsr 504bc if (alloc_name == NULL) { 42634: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 42636: 2800 movel %d0,%d4 42638: 2a00 movel %d0,%d5 if (alloc_name == NULL) { 4263a: 6652 bnes 4268e <== ALWAYS TAKEN free(dd); 4263c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4263e: 4eb9 0004 3630 jsr 43630 <== NOT EXECUTED return RTEMS_NO_MEMORY; 42644: 588f addql #4,%sp <== NOT EXECUTED 42646: 603a bras 42682 <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 42648: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4264a: 47f9 0004 3630 lea 43630 ,%a3 <== NOT EXECUTED 42650: 4e93 jsr %a3@ <== NOT EXECUTED free(dd); 42652: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42654: 4e93 jsr %a3@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 42656: 508f addql #8,%sp <== NOT EXECUTED 42658: 700d moveq #13,%d0 <== NOT EXECUTED 4265a: 6028 bras 42684 <== NOT EXECUTED static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; 4265c: 4285 clrl %d5 return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 4265e: 2545 0010 movel %d5,%a2@(16) dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 42662: 206e 0014 moveal %fp@(20),%a0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 42666: 42aa 0014 clrl %a2@(20) dd->deleted = false; 4266a: 4200 clrb %d0 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 4266c: 2482 movel %d2,%a2@ 4266e: 2543 0004 movel %d3,%a2@(4) dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42672: 1540 0030 moveb %d0,%a2@(48) *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 42676: 4280 clrl %d0 dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; *dd_entry = dd; 42678: 268a movel %a2,%a3@ *dd_ptr = dd; 4267a: 208a movel %a2,%a0@ return RTEMS_SUCCESSFUL; 4267c: 6006 bras 42684 if (dd_entry == NULL) { return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; 4267e: 700c moveq #12,%d0 42680: 6002 bras 42684 } dd = malloc(sizeof(*dd)); if (dd == NULL) { return RTEMS_NO_MEMORY; 42682: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42684: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 4268a: 4e5e unlk %fp 4268c: 4e75 rts return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 4268e: 2f03 movel %d3,%sp@- 42690: 2f02 movel %d2,%sp@- 42692: 4878 61ff pea 61ff 42696: 2f00 movel %d0,%sp@- 42698: 4eb9 0004 39e8 jsr 439e8 4269e: 4fef 0010 lea %sp@(16),%sp 426a2: 4a80 tstl %d0 426a4: 6cb8 bges 4265e <== ALWAYS TAKEN 426a6: 60a0 bras 42648 <== NOT EXECUTED =============================================================================== 0004a15c : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4a15c: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4a15e: 4e56 ffe4 linkw %fp,#-28 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4a162: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4a166: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4a16a: 282e 0008 movel %fp@(8),%d4 4a16e: 262e 000c movel %fp@(12),%d3 4a172: 246e 0014 moveal %fp@(20),%a2 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4a176: 4a80 tstl %d0 4a178: 670e beqs 4a188 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 4a17a: 4eb9 0004 bab4 jsr 4bab4 <__errno> <== NOT EXECUTED 4a180: 7401 moveq #1,%d2 <== NOT EXECUTED 4a182: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a184: 2082 movel %d2,%a0@ <== NOT EXECUTED 4a186: 607a bras 4a202 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4a188: 2652 moveal %a2@,%a3 if (!device_name_table) 4a18a: 4a8b tstl %a3 4a18c: 670a beqs 4a198 4a18e: 4282 clrl %d2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4a190: 4bf9 0004 d3d4 lea 4d3d4 ,%a5 4a196: 6056 bras 4a1ee rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 4a198: 4eb9 0004 bab4 jsr 4bab4 <__errno> 4a19e: 720e moveq #14,%d1 4a1a0: 2040 moveal %d0,%a0 4a1a2: 2081 movel %d1,%a0@ 4a1a4: 605c bras 4a202 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4a1a6: 2853 moveal %a3@,%a4 4a1a8: 4a8c tstl %a4 4a1aa: 673c beqs 4a1e8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4a1ac: 2f03 movel %d3,%sp@- 4a1ae: 2f0c movel %a4,%sp@- 4a1b0: 2f04 movel %d4,%sp@- 4a1b2: 4e95 jsr %a5@ 4a1b4: 4fef 000c lea %sp@(12),%sp 4a1b8: 4a80 tstl %d0 4a1ba: 662c bnes 4a1e8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4a1bc: 4a34 3800 tstb %a4@(00000000,%d3:l) 4a1c0: 6626 bnes 4a1e8 <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 4a1c2: 41f9 0005 ad80 lea 5ad80 ,%a0 4a1c8: 2548 000c movel %a0,%a2@(12) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4a1cc: 2079 0005 aee4 moveal 5aee4 ,%a0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4a1d2: 203c 0005 ad48 movel #372040,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4a1d8: 2568 0028 0010 movel %a0@(40),%a2@(16) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 4a1de: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4a1e2: 4280 clrl %d0 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4a1e4: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4a1e6: 601c bras 4a204 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4a1e8: 5282 addql #1,%d2 4a1ea: 47eb 0014 lea %a3@(20),%a3 4a1ee: b4b9 0005 ad06 cmpl 5ad06 ,%d2 4a1f4: 65b0 bcss 4a1a6 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4a1f6: 4eb9 0004 bab4 jsr 4bab4 <__errno> 4a1fc: 2040 moveal %d0,%a0 4a1fe: 7002 moveq #2,%d0 4a200: 2080 movel %d0,%a0@ 4a202: 70ff moveq #-1,%d0 } 4a204: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a20a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043944 : * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 43944: 7264 moveq #100,%d1 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 43946: 4e56 ffdc linkw %fp,#-36 4394a: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4394e: 246e 0008 moveal %fp@(8),%a2 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 43952: 1012 moveb %a2@,%d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 43954: 282e 000c movel %fp@(12),%d4 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 43958: 49c0 extbl %d0 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 4395a: 2c2e 0010 movel %fp@(16),%d6 4395e: 2a2e 0014 movel %fp@(20),%d5 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 43962: b280 cmpl %d0,%d1 43964: 6624 bnes 4398a 43966: 123c 0065 moveb #101,%d1 4396a: 102a 0001 moveb %a2@(1),%d0 4396e: 49c0 extbl %d0 43970: b280 cmpl %d0,%d1 43972: 6616 bnes 4398a <== NEVER TAKEN 43974: 123c 0076 moveb #118,%d1 43978: 102a 0002 moveb %a2@(2),%d0 4397c: 49c0 extbl %d0 4397e: b280 cmpl %d0,%d1 43980: 6608 bnes 4398a <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 43982: 4a2a 0003 tstb %a2@(3) 43986: 6700 00c8 beqw 43a50 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 4398a: 2004 movel %d4,%d0 4398c: 0280 0000 f000 andil #61440,%d0 43992: 0c80 0000 6000 cmpil #24576,%d0 43998: 6716 beqs 439b0 4399a: 0c80 0000 2000 cmpil #8192,%d0 439a0: 670e beqs 439b0 rtems_set_errno_and_return_minus_one( EINVAL ); 439a2: 4eb9 0004 bab4 jsr 4bab4 <__errno> 439a8: 7616 moveq #22,%d3 439aa: 2040 moveal %d0,%a0 439ac: 2083 movel %d3,%a0@ 439ae: 6066 bras 43a16 else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 439b0: 206e 0018 moveal %fp@(24),%a0 439b4: 2650 moveal %a0@,%a3 if (!device_name_table) 439b6: 4a8b tstl %a3 439b8: 670e beqs 439c8 439ba: 284b moveal %a3,%a4 439bc: 74ff moveq #-1,%d2 439be: 4283 clrl %d3 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 439c0: 4bf9 0004 ce80 lea 4ce80 ,%a5 439c6: 6034 bras 439fc rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 439c8: 4eb9 0004 bab4 jsr 4bab4 <__errno> 439ce: 740e moveq #14,%d2 439d0: 2240 moveal %d0,%a1 439d2: 2282 movel %d2,%a1@ 439d4: 6040 bras 43a16 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 439d6: 2014 movel %a4@,%d0 439d8: 671a beqs 439f4 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 439da: 2f00 movel %d0,%sp@- 439dc: 2f0a movel %a2,%sp@- 439de: 4e95 jsr %a5@ 439e0: 508f addql #8,%sp 439e2: 4a80 tstl %d0 439e4: 6610 bnes 439f6 rtems_set_errno_and_return_minus_one( EEXIST ); 439e6: 4eb9 0004 bab4 jsr 4bab4 <__errno> 439ec: 7211 moveq #17,%d1 439ee: 2040 moveal %d0,%a0 439f0: 2081 movel %d1,%a0@ 439f2: 6022 bras 43a16 if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; 439f4: 2403 movel %d3,%d2 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 439f6: 5283 addql #1,%d3 439f8: 49ec 0014 lea %a4@(20),%a4 439fc: b6b9 0005 ad06 cmpl 5ad06 ,%d3 43a02: 65d2 bcss 439d6 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 43a04: 70ff moveq #-1,%d0 43a06: b082 cmpl %d2,%d0 43a08: 6610 bnes 43a1a rtems_set_errno_and_return_minus_one( ENOMEM ); 43a0a: 4eb9 0004 bab4 jsr 4bab4 <__errno> 43a10: 2040 moveal %d0,%a0 43a12: 700c moveq #12,%d0 43a14: 2080 movel %d0,%a0@ 43a16: 70ff moveq #-1,%d0 43a18: 6038 bras 43a52 _ISR_Disable(level); 43a1a: 203c 0000 0700 movel #1792,%d0 43a20: 40c3 movew %sr,%d3 43a22: 8083 orl %d3,%d0 43a24: 46c0 movew %d0,%sr device_name_table[slot].device_name = (char *)path; 43a26: 2002 movel %d2,%d0 43a28: e988 lsll #4,%d0 43a2a: 2240 moveal %d0,%a1 43a2c: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 43a30: d7c8 addal %a0,%a3 43a32: 268a movel %a2,%a3@ device_name_table[slot].device_name_length = strlen(path); 43a34: 2f0a movel %a2,%sp@- 43a36: 4eb9 0004 d3b8 jsr 4d3b8 43a3c: 588f addql #4,%sp 43a3e: 2740 0004 movel %d0,%a3@(4) device_name_table[slot].major = major; 43a42: 2746 0008 movel %d6,%a3@(8) device_name_table[slot].minor = minor; 43a46: 2745 000c movel %d5,%a3@(12) device_name_table[slot].mode = mode; 43a4a: 2744 0010 movel %d4,%a3@(16) _ISR_Enable(level); 43a4e: 46c3 movew %d3,%sr * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && (path[2] == 'v') && (path[3] == '\0')) return 0; 43a50: 4280 clrl %d0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 43a52: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 43a58: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000424d8 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 424d8: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 424dc: 42a7 clrl %sp@- 424de: 42a7 clrl %sp@- 424e0: 2f39 0006 025a movel 6025a ,%sp@- 424e6: 4eb9 0004 66c8 jsr 466c8 if (sc == RTEMS_SUCCESSFUL) { 424ec: 4fef 000c lea %sp@(12),%sp 424f0: 4a80 tstl %d0 424f2: 660c bnes 42500 <== NEVER TAKEN diskdevs_protected = true; 424f4: 7001 moveq #1,%d0 424f6: 13c0 0006 0258 moveb %d0,60258 return RTEMS_SUCCESSFUL; 424fc: 4280 clrl %d0 424fe: 6002 bras 42502 } else { return RTEMS_NOT_CONFIGURED; 42500: 7016 moveq #22,%d0 <== NOT EXECUTED } } 42502: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042506 : static void disk_unlock(void) { 42506: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 4250a: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 4250c: 2f39 0006 025a movel 6025a ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42512: 13c0 0006 0258 moveb %d0,60258 sc = rtems_semaphore_release(diskdevs_mutex); 42518: 4eb9 0004 67d4 jsr 467d4 if (sc != RTEMS_SUCCESSFUL) { 4251e: 588f addql #4,%sp 42520: 4a80 tstl %d0 42522: 670c beqs 42530 <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 42524: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4252a: 4eb9 0004 6d3c jsr 46d3c <== NOT EXECUTED } } 42530: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004393c : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 4393c: 4e56 fff4 linkw %fp,#-12 43940: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43944: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 43948: 243c 0000 0700 movel #1792,%d2 4394e: 2202 movel %d2,%d1 43950: 40c0 movew %sr,%d0 43952: 8280 orl %d0,%d1 43954: 46c1 movew %d1,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 43956: 47f9 0004 59e0 lea 459e0 ,%a3 4395c: 602a bras 43988 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; 4395e: 7202 moveq #2,%d1 43960: 2541 0094 movel %d1,%a2@(148) rtems_interrupt_enable (level); 43964: 46c0 movew %d0,%sr sc = rtems_semaphore_obtain( 43966: 42a7 clrl %sp@- 43968: 42a7 clrl %sp@- 4396a: 2f2a 008c movel %a2@(140),%sp@- 4396e: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 43970: 4fef 000c lea %sp@(12),%sp 43974: 4a80 tstl %d0 43976: 6708 beqs 43980 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 43978: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4397a: 4eb9 0004 60a0 jsr 460a0 <== NOT EXECUTED rtems_interrupt_disable (level); 43980: 2202 movel %d2,%d1 43982: 40c0 movew %sr,%d0 43984: 8280 orl %d0,%d1 43986: 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) { 43988: 206a 0084 moveal %a2@(132),%a0 4398c: 222a 0080 movel %a2@(128),%d1 43990: b288 cmpl %a0,%d1 43992: 66ca bnes 4395e 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); 43994: 46c0 movew %d0,%sr } } 43996: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4399c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044460 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44460: 4e56 fff0 linkw %fp,#-16 44464: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44468: 246e 000c moveal %fp@(12),%a2 if ((tty->termios.c_lflag & ECHOCTL) && 4446c: 202a 003c movel %a2@(60),%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 44470: 242e 0008 movel %fp@(8),%d2 if ((tty->termios.c_lflag & ECHOCTL) && 44474: 0280 0000 0200 andil #512,%d0 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4447a: 1202 moveb %d2,%d1 if ((tty->termios.c_lflag & ECHOCTL) && 4447c: 4a80 tstl %d0 4447e: 674e beqs 444ce <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 44480: 4280 clrl %d0 44482: 1002 moveb %d2,%d0 44484: 2079 0005 c1b0 moveal 5c1b0 <__ctype_ptr__>,%a0 4448a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3 4448e: 49c3 extbl %d3 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 44490: 0803 0005 btst #5,%d3 44494: 6738 beqs 444ce iscntrl(c) && (c != '\t') && (c != '\n')) { 44496: 7609 moveq #9,%d3 44498: b680 cmpl %d0,%d3 4449a: 6732 beqs 444ce 4449c: 163c 000a moveb #10,%d3 444a0: b680 cmpl %d0,%d3 444a2: 672a beqs 444ce char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 444a4: 2f0a movel %a2,%sp@- 444a6: 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; 444aa: 163c 0040 moveb #64,%d3 rtems_termios_puts (echobuf, 2, tty); 444ae: 486e fffe pea %fp@(-2) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 444b2: 705e moveq #94,%d0 echobuf[1] = c ^ 0x40; 444b4: b782 eorl %d3,%d2 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 444b6: 1d40 fffe moveb %d0,%fp@(-2) echobuf[1] = c ^ 0x40; 444ba: 1d42 ffff moveb %d2,%fp@(-1) rtems_termios_puts (echobuf, 2, tty); 444be: 4eb9 0004 4230 jsr 44230 tty->column += 2; 444c4: 4fef 000c lea %sp@(12),%sp 444c8: 54aa 0028 addql #2,%a2@(40) 444cc: 6010 bras 444de } else { oproc (c, tty); 444ce: 2f0a movel %a2,%sp@- 444d0: 0281 0000 00ff andil #255,%d1 444d6: 2f01 movel %d1,%sp@- 444d8: 4eba fe44 jsr %pc@(4431e ) 444dc: 508f addql #8,%sp } } 444de: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 444e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000437d2 : void endgrent(void) { 437d2: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 437d6: 2039 0005 e7b4 movel 5e7b4 ,%d0 437dc: 670a beqs 437e8 <== NEVER TAKEN fclose(group_fp); 437de: 2f00 movel %d0,%sp@- 437e0: 4eb9 0004 cd24 jsr 4cd24 437e6: 588f addql #4,%sp } 437e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004368c : void endpwent(void) { 4368c: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 43690: 2039 0005 e6da movel 5e6da ,%d0 43696: 670a beqs 436a2 <== NEVER TAKEN fclose(passwd_fp); 43698: 2f00 movel %d0,%sp@- 4369a: 4eb9 0004 cd24 jsr 4cd24 436a0: 588f addql #4,%sp } 436a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000444e8 : * 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) { 444e8: 4e56 ffe4 linkw %fp,#-28 444ec: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 444f0: 246e 0008 moveal %fp@(8),%a2 444f4: 262e 000c movel %fp@(12),%d3 if (tty->ccount == 0) 444f8: 4aaa 0020 tstl %a2@(32) 444fc: 6700 0172 beqw 44670 return; if (lineFlag) { 44500: 4a83 tstl %d3 44502: 6700 015c beqw 44660 if (!(tty->termios.c_lflag & ECHO)) { 44506: 202a 003c movel %a2@(60),%d0 4450a: 44c0 movew %d0,%ccr 4450c: 6b08 bmis 44516 <== ALWAYS TAKEN tty->ccount = 0; 4450e: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED return; 44512: 6000 015c braw 44670 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 44516: 0800 0004 btst #4,%d0 4451a: 6600 0144 bnew 44660 tty->ccount = 0; 4451e: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 44522: 4280 clrl %d0 <== NOT EXECUTED 44524: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44526: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED 4452a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4452c: 4eba ff32 jsr %pc@(44460 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 44530: 508f addql #8,%sp <== NOT EXECUTED 44532: 7020 moveq #32,%d0 <== NOT EXECUTED 44534: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44538: 6700 0136 beqw 44670 <== NOT EXECUTED echo ('\n', tty); 4453c: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 44540: 700a moveq #10,%d0 <== NOT EXECUTED 44542: 602c bras 44570 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 44544: 5388 subql #1,%a0 44546: 286a 001c moveal %a2@(28),%a4 if (tty->termios.c_lflag & ECHO) { 4454a: 202a 003c movel %a2@(60),%d0 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4454e: 2548 0020 movel %a0,%a2@(32) 44552: 1434 8800 moveb %a4@(00000000,%a0:l),%d2 if (tty->termios.c_lflag & ECHO) { 44556: 44c0 movew %d0,%ccr 44558: 6a00 0100 bplw 4465a if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 4455c: 4a83 tstl %d3 4455e: 6620 bnes 44580 44560: 0800 0004 btst #4,%d0 44564: 661a bnes 44580 <== ALWAYS TAKEN echo (tty->termios.c_cc[VERASE], tty); 44566: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4456a: 4280 clrl %d0 <== NOT EXECUTED 4456c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED 44570: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 44574: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 4457a: 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); 4457c: 6000 fee2 braw 44460 <== NOT EXECUTED 44580: 2279 0005 c1b0 moveal 5c1b0 <__ctype_ptr__>,%a1 } else if (c == '\t') { 44586: 7209 moveq #9,%d1 44588: 0282 0000 00ff andil #255,%d2 4458e: b282 cmpl %d2,%d1 44590: 665a bnes 445ec int col = tty->read_start_column; 44592: 242a 002c movel %a2@(44),%d2 int i = 0; 44596: 4201 clrb %d1 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 44598: 0280 0000 0200 andil #512,%d0 4459e: 6028 bras 445c8 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 445a0: 4284 clrl %d4 445a2: 181c moveb %a4@+,%d4 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 445a4: 5281 addql #1,%d1 if (c == '\t') { 445a6: 7a09 moveq #9,%d5 445a8: ba84 cmpl %d4,%d5 445aa: 6606 bnes 445b2 col = (col | 7) + 1; 445ac: 7807 moveq #7,%d4 445ae: 8484 orl %d4,%d2 445b0: 6014 bras 445c6 } else if (iscntrl (c)) { 445b2: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 445b6: 49c4 extbl %d4 445b8: 0804 0005 btst #5,%d4 445bc: 6708 beqs 445c6 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 445be: 4a80 tstl %d0 <== NOT EXECUTED 445c0: 6706 beqs 445c8 <== NOT EXECUTED col += 2; 445c2: 5482 addql #2,%d2 <== NOT EXECUTED 445c4: 6002 bras 445c8 <== NOT EXECUTED } else { col++; 445c6: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 445c8: b1c1 cmpal %d1,%a0 445ca: 66d4 bnes 445a0 445cc: 6016 bras 445e4 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 445ce: 2f0a movel %a2,%sp@- 445d0: 4878 0001 pea 1 445d4: 4879 0005 b1ff pea 5b1ff 445da: 4e93 jsr %a3@ tty->column--; 445dc: 4fef 000c lea %sp@(12),%sp 445e0: 53aa 0028 subql #1,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 445e4: b4aa 0028 cmpl %a2@(40),%d2 445e8: 6de4 blts 445ce 445ea: 606e bras 4465a rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 445ec: 5282 addql #1,%d2 445ee: 1231 2800 moveb %a1@(00000000,%d2:l),%d1 445f2: 49c1 extbl %d1 445f4: 0801 0005 btst #5,%d1 445f8: 6724 beqs 4461e <== ALWAYS TAKEN 445fa: 0800 0009 btst #9,%d0 <== NOT EXECUTED 445fe: 671e beqs 4461e <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 44600: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44602: 4878 0003 pea 3 <== NOT EXECUTED 44606: 4879 0005 b1fd pea 5b1fd <== NOT EXECUTED 4460c: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4460e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44612: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44616: 6706 beqs 4461e <== NOT EXECUTED tty->column--; 44618: 5380 subql #1,%d0 <== NOT EXECUTED 4461a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 4461e: 2079 0005 c1b0 moveal 5c1b0 <__ctype_ptr__>,%a0 44624: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 44628: 49c0 extbl %d0 4462a: 0800 0005 btst #5,%d0 4462e: 670c beqs 4463c <== ALWAYS TAKEN 44630: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 44634: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 4463a: 671e beqs 4465a <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 4463c: 2f0a movel %a2,%sp@- 4463e: 4878 0003 pea 3 44642: 4879 0005 b1fd pea 5b1fd 44648: 4e93 jsr %a3@ if (tty->column) 4464a: 202a 0028 movel %a2@(40),%d0 4464e: 4fef 000c lea %sp@(12),%sp 44652: 6706 beqs 4465a <== NEVER TAKEN tty->column--; 44654: 5380 subql #1,%d0 44656: 2540 0028 movel %d0,%a2@(40) } } } if (!lineFlag) 4465a: 4a83 tstl %d3 4465c: 6608 bnes 44666 4465e: 6010 bras 44670 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); 44660: 47f9 0004 4230 lea 44230 ,%a3 echo ('\n', tty); return; } } while (tty->ccount) { 44666: 206a 0020 moveal %a2@(32),%a0 4466a: 4a88 tstl %a0 4466c: 6600 fed6 bnew 44544 } } if (!lineFlag) break; } } 44670: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 44676: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000504b0 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 504b0: 4e56 ffdc linkw %fp,#-36 504b4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 504b8: 246e 0008 moveal %fp@(8),%a2 504bc: 242e 000c movel %fp@(12),%d2 504c0: 282e 0010 movel %fp@(16),%d4 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 504c4: 4a2a 0077 tstb %a2@(119) 504c8: 664e bnes 50518 504ca: 200a movel %a2,%d0 504cc: 0680 0000 0078 addil #120,%d0 { if (op_type == FAT_OP_TYPE_READ) 504d2: 7201 moveq #1,%d1 504d4: b284 cmpl %d4,%d1 504d6: 6614 bnes 504ec sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 504d8: 2f00 movel %d0,%sp@- 504da: 2f02 movel %d2,%sp@- 504dc: 2f2a 004e movel %a2@(78),%sp@- 504e0: 2f2a 004a movel %a2@(74),%sp@- 504e4: 4eb9 0004 eefc jsr 4eefc 504ea: 6012 bras 504fe else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 504ec: 2f00 movel %d0,%sp@- 504ee: 2f02 movel %d2,%sp@- 504f0: 2f2a 004e movel %a2@(78),%sp@- 504f4: 2f2a 004a movel %a2@(74),%sp@- 504f8: 4eb9 0004 ee38 jsr 4ee38 504fe: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 50502: 4a80 tstl %d0 50504: 6600 015c bnew 50662 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 50508: 2542 0072 movel %d2,%a2@(114) fs_info->c.modified = 0; 5050c: 4200 clrb %d0 fs_info->c.state = FAT_CACHE_ACTUAL; 5050e: 7201 moveq #1,%d1 else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 50510: 1540 0076 moveb %d0,%a2@(118) fs_info->c.state = FAT_CACHE_ACTUAL; 50514: 1541 0077 moveb %d1,%a2@(119) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 50518: 4281 clrl %d1 5051a: 322a 0014 movew %a2@(20),%d1 5051e: 202a 0072 movel %a2@(114),%d0 50522: b280 cmpl %d0,%d1 50524: 620c bhis 50532 <== NEVER TAKEN 50526: b0aa 001a cmpl %a2@(26),%d0 5052a: 55c3 scs %d3 5052c: 49c3 extbl %d3 5052e: 4483 negl %d3 50530: 6002 bras 50534 50532: 4283 clrl %d3 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 50534: b480 cmpl %d0,%d2 50536: 6700 0144 beqw 5067c { if (fs_info->c.modified) 5053a: 4a2a 0076 tstb %a2@(118) 5053e: 6700 00d0 beqw 50610 { if (sec_of_fat && !fs_info->vol.mirror) 50542: 4a03 tstb %d3 50544: 6722 beqs 50568 <== ALWAYS TAKEN 50546: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 5054a: 661c bnes 50568 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 5054c: 4280 clrl %d0 <== NOT EXECUTED 5054e: 206a 0078 moveal %a2@(120),%a0 <== NOT EXECUTED 50552: 3012 movew %a2@,%d0 <== NOT EXECUTED 50554: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50556: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 5055a: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 5055e: 4eb9 0005 87d8 jsr 587d8 <== NOT EXECUTED 50564: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 50568: 2f2a 0078 movel %a2@(120),%sp@- 5056c: 47f9 0004 f1c0 lea 4f1c0 ,%a3 50572: 4e93 jsr %a3@ fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 50574: 588f addql #4,%sp if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 50576: 4201 clrb %d1 50578: 1541 0077 moveb %d1,%a2@(119) fs_info->c.modified = 0; 5057c: 1541 0076 moveb %d1,%a2@(118) if (sc != RTEMS_SUCCESSFUL) 50580: 4a80 tstl %d0 50582: 6600 00de bnew 50662 rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 50586: 4a03 tstb %d3 50588: 6700 009c beqw 50626 5058c: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 50590: 675c beqs 505ee <== NOT EXECUTED 50592: 6000 0092 braw 50626 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 50596: 2f05 movel %d5,%sp@- <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, 50598: 41ea 0016 lea %a2@(22),%a0 <== NOT EXECUTED 5059c: 4c10 0800 mulsl %a0@,%d0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 505a0: d0aa 0072 addl %a2@(114),%d0 <== NOT EXECUTED 505a4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 505a6: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 505aa: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 505ae: 4e95 jsr %a5@ <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 505b0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 505b4: 4a80 tstl %d0 <== NOT EXECUTED 505b6: 6622 bnes 505da <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 505b8: 4280 clrl %d0 <== NOT EXECUTED 505ba: 3012 movew %a2@,%d0 <== NOT EXECUTED 505bc: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 505c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 505c2: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 505c6: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 505ca: 4e94 jsr %a4@ <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 505cc: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 505d0: 4e93 jsr %a3@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 505d2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 505d6: 4a80 tstl %d0 <== NOT EXECUTED 505d8: 6710 beqs 505ea <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 505da: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 505e0: 720c moveq #12,%d1 <== NOT EXECUTED 505e2: 2040 moveal %d0,%a0 <== NOT EXECUTED 505e4: 2081 movel %d1,%a0@ <== NOT EXECUTED 505e6: 6000 0086 braw 5066e <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 505ea: 5283 addql #1,%d3 <== NOT EXECUTED 505ec: 6012 bras 50600 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 505ee: 2a0e movel %fp,%d5 <== NOT EXECUTED 505f0: 5985 subql #4,%d5 <== NOT EXECUTED 505f2: 4bf9 0004 ee38 lea 4ee38 ,%a5 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 505f8: 49f9 0005 87d8 lea 587d8 ,%a4 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 505fe: 7601 moveq #1,%d3 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 50600: 4281 clrl %d1 <== NOT EXECUTED 50602: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED 50606: 4280 clrl %d0 <== NOT EXECUTED 50608: 1003 moveb %d3,%d0 <== NOT EXECUTED 5060a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5060c: 6288 bhis 50596 <== NOT EXECUTED 5060e: 6016 bras 50626 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 50610: 2f2a 0078 movel %a2@(120),%sp@- 50614: 4eb9 0004 f116 jsr 4f116 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 5061a: 588f addql #4,%sp } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 5061c: 4201 clrb %d1 5061e: 1541 0077 moveb %d1,%a2@(119) if (sc != RTEMS_SUCCESSFUL) 50622: 4a80 tstl %d0 50624: 663c bnes 50662 <== NEVER TAKEN 50626: 200a movel %a2,%d0 50628: 0680 0000 0078 addil #120,%d0 rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 5062e: 7201 moveq #1,%d1 50630: b284 cmpl %d4,%d1 50632: 6614 bnes 50648 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 50634: 2f00 movel %d0,%sp@- 50636: 2f02 movel %d2,%sp@- 50638: 2f2a 004e movel %a2@(78),%sp@- 5063c: 2f2a 004a movel %a2@(74),%sp@- 50640: 4eb9 0004 eefc jsr 4eefc 50646: 6012 bras 5065a else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 50648: 2f00 movel %d0,%sp@- 5064a: 2f02 movel %d2,%sp@- 5064c: 2f2a 004e movel %a2@(78),%sp@- 50650: 2f2a 004a movel %a2@(74),%sp@- 50654: 4eb9 0004 ee38 jsr 4ee38 5065a: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 5065e: 4a80 tstl %d0 50660: 6710 beqs 50672 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 50662: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50668: 2040 moveal %d0,%a0 <== NOT EXECUTED 5066a: 7005 moveq #5,%d0 <== NOT EXECUTED 5066c: 2080 movel %d0,%a0@ <== NOT EXECUTED 5066e: 70ff moveq #-1,%d0 <== NOT EXECUTED 50670: 6014 bras 50686 <== NOT EXECUTED fs_info->c.blk_num = blk; 50672: 2542 0072 movel %d2,%a2@(114) fs_info->c.state = FAT_CACHE_ACTUAL; 50676: 7001 moveq #1,%d0 50678: 1540 0077 moveb %d0,%a2@(119) } *buf = fs_info->c.buf; 5067c: 206e 0014 moveal %fp@(20),%a0 return RC_OK; 50680: 4280 clrl %d0 if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; 50682: 20aa 0078 movel %a2@(120),%a0@ return RC_OK; } 50686: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 5068c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050690 : int fat_buf_release(fat_fs_info_t *fs_info) { 50690: 4e56 ffe4 linkw %fp,#-28 50694: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 50698: 246e 0008 moveal %fp@(8),%a2 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 5069c: 4a2a 0077 tstb %a2@(119) 506a0: 6700 0114 beqw 507b6 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 506a4: 4281 clrl %d1 506a6: 322a 0014 movew %a2@(20),%d1 506aa: 202a 0072 movel %a2@(114),%d0 506ae: b280 cmpl %d0,%d1 506b0: 620c bhis 506be <== NEVER TAKEN *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 506b2: b0aa 001a cmpl %a2@(26),%d0 506b6: 55c2 scs %d2 506b8: 49c2 extbl %d2 506ba: 4482 negl %d2 506bc: 6002 bras 506c0 bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 506be: 4282 clrl %d2 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 506c0: 4a2a 0076 tstb %a2@(118) 506c4: 6700 00ca beqw 50790 { if (sec_of_fat && !fs_info->vol.mirror) 506c8: 4a02 tstb %d2 506ca: 6722 beqs 506ee 506cc: 4a2a 0042 tstb %a2@(66) 506d0: 661c bnes 506ee <== NEVER TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 506d2: 4280 clrl %d0 506d4: 206a 0078 moveal %a2@(120),%a0 506d8: 3012 movew %a2@,%d0 506da: 2f00 movel %d0,%sp@- 506dc: 2f28 001e movel %a0@(30),%sp@- 506e0: 2f2a 007c movel %a2@(124),%sp@- 506e4: 4eb9 0005 87d8 jsr 587d8 506ea: 4fef 000c lea %sp@(12),%sp sc = rtems_bdbuf_release_modified(fs_info->c.buf); 506ee: 2f2a 0078 movel %a2@(120),%sp@- 506f2: 47f9 0004 f1c0 lea 4f1c0 ,%a3 506f8: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 506fa: 588f addql #4,%sp 506fc: 4a80 tstl %d0 506fe: 6600 00a0 bnew 507a0 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 50702: 4200 clrb %d0 50704: 1540 0076 moveb %d0,%a2@(118) if (sec_of_fat && !fs_info->vol.mirror) 50708: 4a02 tstb %d2 5070a: 6700 00a4 beqw 507b0 5070e: 4a2a 0042 tstb %a2@(66) 50712: 675a beqs 5076e <== ALWAYS TAKEN 50714: 6000 009a braw 507b0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 50718: 2f03 movel %d3,%sp@- fs_info->c.blk_num + fs_info->vol.fat_length * i, 5071a: 41ea 0016 lea %a2@(22),%a0 5071e: 4c10 0800 mulsl %a0@,%d0 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 50722: d0aa 0072 addl %a2@(114),%d0 50726: 2f00 movel %d0,%sp@- 50728: 2f2a 004e movel %a2@(78),%sp@- 5072c: 2f2a 004a movel %a2@(74),%sp@- 50730: 4e95 jsr %a5@ fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 50732: 4fef 0010 lea %sp@(16),%sp 50736: 4a80 tstl %d0 50738: 6622 bnes 5075c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 5073a: 4280 clrl %d0 5073c: 3012 movew %a2@,%d0 5073e: 206e fffc moveal %fp@(-4),%a0 50742: 2f00 movel %d0,%sp@- 50744: 2f2a 007c movel %a2@(124),%sp@- 50748: 2f28 001e movel %a0@(30),%sp@- 5074c: 4e94 jsr %a4@ sc = rtems_bdbuf_release_modified(b); 5074e: 2f2e fffc movel %fp@(-4),%sp@- 50752: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 50754: 4fef 0010 lea %sp@(16),%sp 50758: 4a80 tstl %d0 5075a: 670e beqs 5076a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 5075c: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50762: 760c moveq #12,%d3 <== NOT EXECUTED 50764: 2040 moveal %d0,%a0 <== NOT EXECUTED 50766: 2083 movel %d3,%a0@ <== NOT EXECUTED 50768: 6042 bras 507ac <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 5076a: 5282 addql #1,%d2 5076c: 6012 bras 50780 { sc = rtems_bdbuf_get(fs_info->vol.dev, 5076e: 260e movel %fp,%d3 50770: 5983 subql #4,%d3 50772: 4bf9 0004 ee38 lea 4ee38 ,%a5 fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 50778: 49f9 0005 87d8 lea 587d8 ,%a4 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) 5077e: 7401 moveq #1,%d2 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 50780: 4281 clrl %d1 50782: 122a 0009 moveb %a2@(9),%d1 50786: 4280 clrl %d0 50788: 1002 moveb %d2,%d0 5078a: b280 cmpl %d0,%d1 5078c: 628a bhis 50718 5078e: 6020 bras 507b0 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 50790: 2f2a 0078 movel %a2@(120),%sp@- 50794: 4eb9 0004 f116 jsr 4f116 if (sc != RTEMS_SUCCESSFUL) 5079a: 588f addql #4,%sp 5079c: 4a80 tstl %d0 5079e: 6710 beqs 507b0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 507a0: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 507a6: 7405 moveq #5,%d2 <== NOT EXECUTED 507a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 507aa: 2082 movel %d2,%a0@ <== NOT EXECUTED 507ac: 70ff moveq #-1,%d0 <== NOT EXECUTED 507ae: 6008 bras 507b8 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 507b0: 4200 clrb %d0 507b2: 1540 0077 moveb %d0,%a2@(119) rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 507b6: 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; } 507b8: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 507be: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f93c : dir_pos->lname.cln = FAT_FILE_SHORT_NAME; dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; } static inline uint32_t fat_cluster_num_to_sector_num( 4f93c: 4e56 0000 linkw %fp,#0 4f940: 206e 0008 moveal %fp@(8),%a0 4f944: 202e 000c movel %fp@(12),%d0 4f948: 2f02 movel %d2,%sp@- uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 4f94a: 4a80 tstl %d0 4f94c: 6612 bnes 4f960 4f94e: 4281 clrl %d1 4f950: 1228 000a moveb %a0@(10),%d1 4f954: 7403 moveq #3,%d2 4f956: c282 andl %d2,%d1 4f958: 6706 beqs 4f960 <== NEVER TAKEN return fs_info->vol.rdir_loc; 4f95a: 2028 001a movel %a0@(26),%d0 4f95e: 600e bras 4f96e return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 4f960: 4281 clrl %d1 4f962: 1228 0005 moveb %a0@(5),%d1 4f966: 5580 subql #2,%d0 4f968: e3a8 lsll %d1,%d0 4f96a: d0a8 002c addl %a0@(44),%d0 fs_info->vol.data_fsec); } 4f96e: 241f movel %sp@+,%d2 4f970: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000508fc : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 508fc: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 50900: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 50904: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 50908: 4282 clrl %d2 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 5090a: 246b 0034 moveal %a3@(52),%a2 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 5090e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 50912: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50914: 4eba fb62 jsr %pc@(50478 )<== NOT EXECUTED return _fat_block_read(mt_entry, fsec, 0, 50918: 588f addql #4,%sp <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 5091a: 4281 clrl %d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 5091c: 2eae 0010 movel %fp@(16),%sp@ <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 50920: 122a 0004 moveb %a2@(4),%d1 <== NOT EXECUTED 50924: 142a 0002 moveb %a2@(2),%d2 <== NOT EXECUTED 50928: e5a9 lsll %d2,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 5092a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 5092c: 42a7 clrl %sp@- <== NOT EXECUTED 5092e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50930: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50932: 4eb9 0005 07c2 jsr 507c2 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 50938: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 5093e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050b26 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 50b26: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 50b2a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 50b2e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 50b32: 47fa f90c lea %pc@(50440 ),%a3 <== NOT EXECUTED uint32_t free_count, uint32_t next_free ) { ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 50b36: 286a 0034 moveal %a2@(52),%a4 <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 50b3a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 50b3e: 4e93 jsr %a3@ <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 50b40: 2eae 0010 movel %fp@(16),%sp@ <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 50b44: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 50b48: 4e93 jsr %a3@ <== NOT EXECUTED 50b4a: 588f addql #4,%sp <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 50b4c: 47f9 0005 084a lea 5084a <_fat_block_write>,%a3 <== NOT EXECUTED 50b52: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 50b56: 4878 0004 pea 4 <== NOT EXECUTED 50b5a: 4878 01e8 pea 1e8 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); 50b5e: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 50b62: 4280 clrl %d0 <== NOT EXECUTED 50b64: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 50b68: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50b6a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50b6c: 4e93 jsr %a3@ <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 50b6e: 486e fffc pea %fp@(-4) <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 50b72: 2400 movel %d0,%d2 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 50b74: 4878 0004 pea 4 <== NOT EXECUTED 50b78: 4280 clrl %d0 <== NOT EXECUTED 50b7a: 4878 01ec pea 1ec <== NOT EXECUTED 50b7e: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 50b82: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50b84: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50b86: 4e93 jsr %a3@ <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 50b88: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 50b8c: 4a82 tstl %d2 <== NOT EXECUTED 50b8e: 6d08 blts 50b98 <== NOT EXECUTED return -1; 50b90: 4a80 tstl %d0 <== NOT EXECUTED 50b92: 5dc0 slt %d0 <== NOT EXECUTED 50b94: 49c0 extbl %d0 <== NOT EXECUTED 50b96: 6002 bras 50b9a <== NOT EXECUTED 50b98: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; } 50b9a: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED 50ba0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fdc6 : /* * 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) 4fdc6: 7201 moveq #1,%d1 int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 4fdc8: 4e56 fff4 linkw %fp,#-12 4fdcc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4fdd0: 266e 0008 moveal %fp@(8),%a3 4fdd4: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fdd8: 242b 0034 movel %a3@(52),%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) 4fddc: 202a 0008 movel %a2@(8),%d0 4fde0: b280 cmpl %d0,%d1 4fde2: 640c bccs 4fdf0 { fat_fd->links_num--; 4fde4: 5380 subql #1,%d0 4fde6: 2540 0008 movel %d0,%a2@(8) return rc; 4fdea: 4280 clrl %d0 4fdec: 6000 0094 braw 4fe82 } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 4fdf0: 4280 clrl %d0 4fdf2: 102a 0030 moveb %a2@(48),%d0 4fdf6: 0800 0000 btst #0,%d0 4fdfa: 674a beqs 4fe46 <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); 4fdfc: 42a7 clrl %sp@- <== NOT EXECUTED 4fdfe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fe00: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fe02: 4eb9 0004 fcdc jsr 4fcdc <== NOT EXECUTED if ( rc != RC_OK ) 4fe08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fe0c: 4a80 tstl %d0 <== NOT EXECUTED 4fe0e: 6672 bnes 4fe82 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4fe10: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fe12: 4eb9 0004 99e4 jsr 499e4 <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 4fe18: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4fe1c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fe1e: 4eb9 0005 0b0a jsr 50b0a <== NOT EXECUTED 4fe24: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fe28: 4a00 tstb %d0 <== NOT EXECUTED 4fe2a: 670e beqs 4fe3a <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 4fe2c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4fe30: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fe32: 4eb9 0005 0ad8 jsr 50ad8 <== NOT EXECUTED 4fe38: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 4fe3a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fe3c: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED 4fe42: 588f addql #4,%sp <== NOT EXECUTED 4fe44: 602a bras 4fe70 <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 4fe46: 2f2a 000c movel %a2@(12),%sp@- 4fe4a: 2f0b movel %a3,%sp@- 4fe4c: 4eb9 0005 0b0a jsr 50b0a 4fe52: 508f addql #8,%sp 4fe54: 4a00 tstb %d0 4fe56: 6706 beqs 4fe5e <== ALWAYS TAKEN { fat_fd->links_num = 0; 4fe58: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED 4fe5c: 6012 bras 4fe70 <== NOT EXECUTED 4fe5e: 2f0a movel %a2,%sp@- 4fe60: 4eb9 0004 99e4 jsr 499e4 <_Chain_Extract> } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 4fe66: 2f0a movel %a2,%sp@- 4fe68: 4eb9 0004 54d0 jsr 454d0 4fe6e: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4fe70: 2d42 0008 movel %d2,%fp@(8) return rc; } 4fe74: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4fe7a: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4fe7c: 4ef9 0005 0690 jmp 50690 return rc; } 4fe82: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4fe88: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000502c8 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 502c8: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 502cc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 502d0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 502d4: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 502d8: 2d68 001c fff8 movel %a0@(28),%fp@(-8) <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 502de: 246c 0034 moveal %a4@(52),%a2 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 502e2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 502e6: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 502ea: 6700 00b8 beqw 503a4 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 502ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 502f0: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED if (rc != RC_OK) 502f6: 588f addql #4,%sp <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 502f8: 2400 movel %d0,%d2 <== NOT EXECUTED if (rc != RC_OK) 502fa: 6774 beqs 50370 <== NOT EXECUTED 502fc: 6000 00ac braw 503aa <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 50300: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50302: 2f2c 0034 movel %a4@(52),%sp@- <== NOT EXECUTED 50306: 2047 moveal %d7,%a0 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 50308: 97cb subal %a3,%a3 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 5030a: 4e90 jsr %a0@ <== NOT EXECUTED 5030c: 508f addql #8,%sp <== NOT EXECUTED 5030e: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 50312: 603e bras 50352 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 50314: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 50318: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5031a: 4873 8800 pea %a3@(00000000,%a0:l) <== NOT EXECUTED 5031e: 2045 moveal %d5,%a0 <== NOT EXECUTED 50320: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 50324: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 50328: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 5032a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5032e: 4a80 tstl %d0 <== NOT EXECUTED 50330: 660e bnes 50340 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 50332: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 50336: 2044 moveal %d4,%a0 <== NOT EXECUTED 50338: 4e90 jsr %a0@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 5033a: 588f addql #4,%sp <== NOT EXECUTED 5033c: 4a80 tstl %d0 <== NOT EXECUTED 5033e: 6710 beqs 50350 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 50340: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50346: 7605 moveq #5,%d3 <== NOT EXECUTED 50348: 74ff moveq #-1,%d2 <== NOT EXECUTED 5034a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5034c: 2083 movel %d3,%a0@ <== NOT EXECUTED 5034e: 605a bras 503aa <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 50350: 528b addql #1,%a3 <== NOT EXECUTED 50352: 4280 clrl %d0 <== NOT EXECUTED 50354: 102a 0004 moveb %a2@(4),%d0 <== NOT EXECUTED 50358: b08b cmpl %a3,%d0 <== NOT EXECUTED 5035a: 62b8 bhis 50314 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5035c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5035e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 50362: 2f0c movel %a4,%sp@- <== NOT EXECUTED 50364: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 50366: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5036a: 4a80 tstl %d0 <== NOT EXECUTED 5036c: 6722 beqs 50390 <== NOT EXECUTED 5036e: 6038 bras 503a8 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 50370: 2c0e movel %fp,%d6 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50372: 260e movel %fp,%d3 <== NOT EXECUTED return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 50374: 2e3c 0004 f93c movel #325948,%d7 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 5037a: 5986 subql #4,%d6 <== NOT EXECUTED 5037c: 2a3c 0004 eefc movel #323324,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 50382: 283c 0004 f22e movel #324142,%d4 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50388: 5183 subql #8,%d3 <== NOT EXECUTED 5038a: 4bf9 0005 67b8 lea 567b8 ,%a5 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 50390: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 50394: 2200 movel %d0,%d1 <== NOT EXECUTED 50396: c2aa 000c andl %a2@(12),%d1 <== NOT EXECUTED 5039a: b2aa 0010 cmpl %a2@(16),%d1 <== NOT EXECUTED 5039e: 6500 ff60 bcsw 50300 <== NOT EXECUTED 503a2: 6006 bras 503aa <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) return RC_OK; 503a4: 4282 clrl %d2 <== NOT EXECUTED 503a6: 6002 bras 503aa <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 503a8: 2400 movel %d0,%d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 503aa: 2002 movel %d2,%d0 <== NOT EXECUTED 503ac: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 503b2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ff24 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 4ff24: 4e56 ffcc linkw %fp,#-52 4ff28: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4ff2c: 266e 0008 moveal %fp@(8),%a3 4ff30: 262e 0010 movel %fp@(16),%d3 4ff34: 2a6e 0014 moveal %fp@(20),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4ff38: 286b 0034 moveal %a3@(52),%a4 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 4ff3c: 246e 000c moveal %fp@(12),%a2 uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 4ff40: 2a83 movel %d3,%a5@ if (new_length <= fat_fd->fat_file_size) 4ff42: 202a 0018 movel %a2@(24),%d0 uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 4ff46: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 4ff4a: 42ae fff8 clrl %fp@(-8) uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 4ff4e: b083 cmpl %d3,%d0 4ff50: 6400 0152 bccw 500a4 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4ff54: 7201 moveq #1,%d1 4ff56: b2aa 0020 cmpl %a2@(32),%d1 4ff5a: 6612 bnes 4ff6e <== ALWAYS TAKEN 4ff5c: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 4ff60: 660c bnes 4ff6e <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 4ff62: 4281 clrl %d1 <== NOT EXECUTED 4ff64: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED 4ff68: 7403 moveq #3,%d2 <== NOT EXECUTED 4ff6a: c282 andl %d2,%d1 <== NOT EXECUTED *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4ff6c: 665a bnes 4ffc8 <== 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))) & 4ff6e: 4284 clrl %d4 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 4ff70: 2a03 movel %d3,%d5 4ff72: 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))) & 4ff74: 382c 0006 movew %a4@(6),%d4 4ff78: 2204 movel %d4,%d1 4ff7a: 5381 subql #1,%d1 4ff7c: 2401 movel %d1,%d2 4ff7e: c480 andl %d0,%d2 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 - 4ff80: 9882 subl %d2,%d4 4ff82: 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) 4ff84: b885 cmpl %d5,%d4 4ff86: 6400 011c bccw 500a4 bytes2add -= bytes_remain; 4ff8a: 9a84 subl %d4,%d5 /* * 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) 4ff8c: 6700 0116 beqw 500a4 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 4ff90: 4280 clrl %d0 4ff92: 102c 0008 moveb %a4@(8),%d0 4ff96: 2c05 movel %d5,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 4ff98: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 4ff9c: 5386 subql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 4ff9e: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 4ffa2: e0ae lsrl %d0,%d6 4ffa4: 5286 addql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 4ffa6: 2f06 movel %d6,%sp@- 4ffa8: 486e fff0 pea %fp@(-16) 4ffac: 2f0b movel %a3,%sp@- 4ffae: 4eb9 0005 6c38 jsr 56c38 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 4ffb4: 4fef 0014 lea %sp@(20),%sp if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 4ffb8: 2400 movel %d0,%d2 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 4ffba: 6600 00ea bnew 500a6 return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 4ffbe: 202e fffc movel %fp@(-4),%d0 4ffc2: 6616 bnes 4ffda <== ALWAYS TAKEN 4ffc4: 4a84 tstl %d4 <== NOT EXECUTED 4ffc6: 6612 bnes 4ffda <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 4ffc8: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 4ffce: 74ff moveq #-1,%d2 <== NOT EXECUTED 4ffd0: 721c moveq #28,%d1 <== NOT EXECUTED 4ffd2: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ffd4: 2081 movel %d1,%a0@ <== NOT EXECUTED 4ffd6: 6000 00ce braw 500a6 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 4ffda: b086 cmpl %d6,%d0 4ffdc: 671e beqs 4fffc <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 4ffde: 4680 notl %d0 <== NOT EXECUTED 4ffe0: dc80 addl %d0,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 4ffe2: 4281 clrl %d1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 4ffe4: 4280 clrl %d0 <== NOT EXECUTED 4ffe6: 102c 0008 moveb %a4@(8),%d0 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 4ffea: 322c 0006 movew %a4@(6),%d1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 4ffee: e1ae lsll %d0,%d6 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 4fff0: 2003 movel %d3,%d0 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 4fff2: 5381 subql #1,%d1 <== NOT EXECUTED if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - 4fff4: 9086 subl %d6,%d0 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 4fff6: ca81 andl %d1,%d5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 4fff8: 9085 subl %d5,%d0 <== NOT EXECUTED 4fffa: 2a80 movel %d0,%a5@ <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 4fffc: 206a 0018 moveal %a2@(24),%a0 50000: 4a88 tstl %a0 50002: 6612 bnes 50016 { fat_fd->map.disk_cln = fat_fd->cln = chain; 50004: 202e fff0 movel %fp@(-16),%d0 fat_fd->map.file_cln = 0; 50008: 42aa 0032 clrl %a2@(50) (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 5000c: 2540 001c movel %d0,%a2@(28) 50010: 2540 0036 movel %d0,%a2@(54) 50014: 6050 bras 50066 fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 50016: 202a 003a movel %a2@(58),%d0 5001a: 72ff moveq #-1,%d1 5001c: b280 cmpl %d0,%d1 5001e: 6706 beqs 50026 <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; 50020: 2d40 fff4 movel %d0,%fp@(-12) 50024: 601e bras 50044 } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 50026: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 5002a: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 5002e: 4878 0001 pea 1 <== NOT EXECUTED 50032: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50034: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50036: 4eb9 0004 fe8c jsr 4fe8c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 5003c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 50040: 2800 movel %d0,%d4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 50042: 6648 bnes 5008c <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 50044: 2f2e fff0 movel %fp@(-16),%sp@- 50048: 2f2e fff4 movel %fp@(-12),%sp@- 5004c: 2f0b movel %a3,%sp@- 5004e: 4eb9 0005 6930 jsr 56930 if ( rc != RC_OK ) 50054: 4fef 000c lea %sp@(12),%sp fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 50058: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5005a: 6630 bnes 5008c <== NEVER TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 5005c: 2f0c movel %a4,%sp@- 5005e: 4eb9 0005 0690 jsr 50690 50064: 588f addql #4,%sp } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 50066: 4aae fffc tstl %fp@(-4) 5006a: 6732 beqs 5009e <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 5006c: 7001 moveq #1,%d0 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; 5006e: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 50074: b0aa 0010 cmpl %a2@(16),%d0 50078: 6624 bnes 5009e { rc = fat_init_clusters_chain(mt_entry, chain); 5007a: 2f2e fff0 movel %fp@(-16),%sp@- 5007e: 2f0b movel %a3,%sp@- 50080: 4eb9 0005 0988 jsr 50988 if ( rc != RC_OK ) 50086: 508f addql #8,%sp if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 50088: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5008a: 6712 beqs 5009e <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); 5008c: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED return rc; 50090: 2404 movel %d4,%d2 <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); 50092: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50094: 4eb9 0005 6b8e jsr 56b8e <== NOT EXECUTED return rc; 5009a: 508f addql #8,%sp <== NOT EXECUTED 5009c: 6008 bras 500a6 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 5009e: 2543 0018 movel %d3,%a2@(24) return RC_OK; 500a2: 6002 bras 500a6 * 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) return RC_OK; 500a4: 4282 clrl %d2 } fat_fd->fat_file_size = new_length; return RC_OK; } 500a6: 2002 movel %d2,%d0 500a8: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 500ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fe8c : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4fe8c: 7001 moveq #1,%d0 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 4fe8e: 4e56 fff0 linkw %fp,#-16 4fe92: 226e 0008 moveal %fp@(8),%a1 4fe96: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4fe9a: 206e 000c moveal %fp@(12),%a0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fe9e: 2669 0034 moveal %a1@(52),%a3 uint32_t cur_cln = 0; 4fea2: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4fea6: b0ae 0010 cmpl %fp@(16),%d0 4feaa: 6660 bnes 4ff0c <== NEVER TAKEN { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 4feac: 222e 0014 movel %fp@(20),%d1 ret = va_arg(ap, uint32_t *); 4feb0: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 4feb4: b2a8 0018 cmpl %a0@(24),%d1 4feb8: 650e bcss 4fec8 <== ALWAYS TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 4feba: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 4fec0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fec2: 7005 moveq #5,%d0 <== NOT EXECUTED 4fec4: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fec6: 6050 bras 4ff18 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4fec8: 7001 moveq #1,%d0 4feca: b0a8 0020 cmpl %a0@(32),%d0 4fece: 6618 bnes 4fee8 4fed0: 4aa8 0024 tstl %a0@(36) 4fed4: 6612 bnes 4fee8 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 4fed6: 4280 clrl %d0 4fed8: 102b 000a moveb %a3@(10),%d0 4fedc: 7403 moveq #3,%d2 4fede: c082 andl %d2,%d0 if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4fee0: 6706 beqs 4fee8 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 4fee2: 4292 clrl %a2@ rc = RC_OK; 4fee4: 4280 clrl %d0 break; 4fee6: 6032 bras 4ff1a } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fee8: 486e fffc pea %fp@(-4) *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 4feec: 4280 clrl %d0 4feee: 102b 0008 moveb %a3@(8),%d0 4fef2: e0a9 lsrl %d0,%d1 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fef4: 2f01 movel %d1,%sp@- 4fef6: 2f08 movel %a0,%sp@- 4fef8: 2f09 movel %a1,%sp@- 4fefa: 4eba f9b8 jsr %pc@(4f8b4 ) if ( rc != RC_OK ) 4fefe: 4fef 0010 lea %sp@(16),%sp break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4ff02: 2001 movel %d1,%d0 if ( rc != RC_OK ) 4ff04: 6614 bnes 4ff1a <== NEVER TAKEN break; *ret = cur_cln; 4ff06: 24ae fffc movel %fp@(-4),%a2@ break; 4ff0a: 600e bras 4ff1a default: errno = EINVAL; 4ff0c: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 4ff12: 7416 moveq #22,%d2 <== NOT EXECUTED 4ff14: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ff16: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; 4ff18: 70ff moveq #-1,%d0 <== NOT EXECUTED break; } va_end(ap); return rc; } 4ff1a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4ff20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f8b4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 4f8b4: 4e56 ffdc linkw %fp,#-36 4f8b8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4f8bc: 246e 000c moveal %fp@(12),%a2 4f8c0: 2c2e 0008 movel %fp@(8),%d6 4f8c4: 242e 0010 movel %fp@(16),%d2 4f8c8: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 4f8cc: 202a 0032 movel %a2@(50),%d0 4f8d0: b082 cmpl %d2,%d0 4f8d2: 6606 bnes 4f8da <== NEVER TAKEN *disk_cln = fat_fd->map.disk_cln; 4f8d4: 26aa 0036 movel %a2@(54),%a3@ 4f8d8: 6054 bras 4f92e { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 4f8da: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f8dc: 640c bccs 4f8ea <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 4f8de: 2802 movel %d2,%d4 <== NOT EXECUTED 4f8e0: 9880 subl %d0,%d4 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 4f8e2: 2d6a 0036 fffc movel %a2@(54),%fp@(-4) <== NOT EXECUTED 4f8e8: 6008 bras 4f8f2 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 4f8ea: 2802 movel %d2,%d4 <== NOT EXECUTED 4f8ec: 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(mt_entry, cur_cln, &cur_cln); 4f8f2: 2a0e movel %fp,%d5 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f8f4: 4283 clrl %d3 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4f8f6: 5985 subql #4,%d5 <== NOT EXECUTED 4f8f8: 49f9 0005 67b8 lea 567b8 ,%a4 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f8fe: 601c bras 4f91c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4f900: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f902: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f906: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f908: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 4f90a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f90e: 4a80 tstl %d0 <== NOT EXECUTED 4f910: 6708 beqs 4f91a <== NOT EXECUTED return rc; 4f912: 2200 movel %d0,%d1 <== NOT EXECUTED 4f914: 5bc0 smi %d0 <== NOT EXECUTED 4f916: 49c0 extbl %d0 <== NOT EXECUTED 4f918: 6018 bras 4f932 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f91a: 5283 addql #1,%d3 <== NOT EXECUTED 4f91c: b883 cmpl %d3,%d4 <== NOT EXECUTED 4f91e: 66e0 bnes 4f900 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 4f920: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 4f924: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 4f928: 2540 0036 movel %d0,%a2@(54) <== NOT EXECUTED *disk_cln = cur_cln; 4f92c: 2680 movel %d0,%a3@ <== NOT EXECUTED } return RC_OK; 4f92e: 4280 clrl %d0 4f930: 4281 clrl %d1 } 4f932: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4f938: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005026a : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 5026a: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 5026e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 50272: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 50276: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 5027a: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); 5027e: 486a 0020 pea %a2@(32) <== NOT EXECUTED 50282: 2f08 movel %a0,%sp@- <== NOT EXECUTED 50284: 4eba f6ee jsr %pc@(4f974 ) <== NOT EXECUTED 50288: 508f addql #8,%sp <== NOT EXECUTED 5028a: 2400 movel %d0,%d2 <== NOT EXECUTED 5028c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5028e: 4eb9 0004 99e4 jsr 499e4 <_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); 50294: 7001 moveq #1,%d0 <== NOT EXECUTED 50296: 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 ); 50298: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5029a: 2200 movel %d0,%d1 <== NOT EXECUTED 5029c: e988 lsll #4,%d0 <== NOT EXECUTED 5029e: e589 lsll #2,%d1 <== NOT EXECUTED 502a0: 9081 subl %d1,%d0 <== NOT EXECUTED 502a2: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 502a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 502a8: 4eb9 0004 99ac jsr 499ac <_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; 502ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 502b2: 7201 moveq #1,%d1 <== NOT EXECUTED 502b4: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 502b8: 8081 orl %d1,%d0 <== NOT EXECUTED 502ba: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 502be: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 502c4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fa28 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4fa28: 4e56 ffe0 linkw %fp,#-32 4fa2c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4fa30: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; 4fa34: 244e moveal %fp,%a2 /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 4fa36: 283c 0004 f9c6 movel #326086,%d4 fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fa3c: 286b 0034 moveal %a3@(52),%a4 fat_file_fd_t *lfat_fd = NULL; 4fa40: 42a2 clrl %a2@- fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4fa42: 262e 000c movel %fp@(12),%d3 fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 4fa46: 2f03 movel %d3,%sp@- fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4fa48: 2a6e 0010 moveal %fp@(16),%a5 fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 4fa4c: 2f0b movel %a3,%sp@- 4fa4e: 4eba ff24 jsr %pc@(4f974 ) 4fa52: 508f addql #8,%sp /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 4fa54: 2044 moveal %d4,%a0 fat_fs_info_t *fs_info = mt_entry->fs_info; fat_file_fd_t *lfat_fd = NULL; uint32_t key = 0; /* construct key */ key = fat_construct_key(mt_entry, &dir_pos->sname); 4fa56: 2400 movel %d0,%d2 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 4fa58: 2f0a movel %a2,%sp@- 4fa5a: 42a7 clrl %sp@- 4fa5c: 2f00 movel %d0,%sp@- 4fa5e: 2f2c 005a movel %a4@(90),%sp@- 4fa62: 2f0b movel %a3,%sp@- 4fa64: 4e90 jsr %a0@ if ( rc == RC_OK ) 4fa66: 4fef 0014 lea %sp@(20),%sp 4fa6a: 4a80 tstl %d0 4fa6c: 660e bnes 4fa7c { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 4fa6e: 206e fffc moveal %fp@(-4),%a0 4fa72: 2a88 movel %a0,%a5@ lfat_fd->links_num++; 4fa74: 52a8 0008 addql #1,%a0@(8) return rc; 4fa78: 6000 00d0 braw 4fb4a } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 4fa7c: 2f0a movel %a2,%sp@- 4fa7e: 2044 moveal %d4,%a0 4fa80: 2f02 movel %d2,%sp@- 4fa82: 2f02 movel %d2,%sp@- 4fa84: 2f2c 005e movel %a4@(94),%sp@- 4fa88: 2f0b movel %a3,%sp@- 4fa8a: 4e90 jsr %a0@ lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 4fa8c: 4878 0042 pea 42 lfat_fd->links_num++; return rc; } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 4fa90: 2800 movel %d0,%d4 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 4fa92: 4eb9 0004 5af0 jsr 45af0 if ( lfat_fd == NULL ) 4fa98: 4fef 0018 lea %sp@(24),%sp } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 4fa9c: 2440 moveal %d0,%a2 4fa9e: 2a80 movel %d0,%a5@ 4faa0: 2d40 fffc movel %d0,%fp@(-4) if ( lfat_fd == NULL ) 4faa4: 660e bnes 4fab4 rtems_set_errno_and_return_minus_one( ENOMEM ); 4faa6: 4eb9 0005 7e64 jsr 57e64 <__errno> 4faac: 720c moveq #12,%d1 4faae: 2040 moveal %d0,%a0 4fab0: 2081 movel %d1,%a0@ 4fab2: 6072 bras 4fb26 memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 4fab4: 4878 0042 pea 42 4fab8: 42a7 clrl %sp@- 4faba: 2f00 movel %d0,%sp@- 4fabc: 4eb9 0005 8848 jsr 58848 lfat_fd->links_num = 1; 4fac2: 7001 moveq #1,%d0 lfat_fd->flags &= ~FAT_FILE_REMOVED; 4fac4: 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; 4fac6: 2540 0008 movel %d0,%a2@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; 4faca: 102a 0030 moveb %a2@(48),%d0 4face: c081 andl %d1,%d0 4fad0: 1540 0030 moveb %d0,%a2@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4fad4: 70ff moveq #-1,%d0 4fad6: 2540 003a movel %d0,%a2@(58) lfat_fd->dir_pos = *dir_pos; 4fada: 4878 0010 pea 10 4fade: 2f03 movel %d3,%sp@- 4fae0: 486a 0020 pea %a2@(32) 4fae4: 4eb9 0005 87d8 jsr 587d8 if ( rc != RC_OK ) 4faea: 4fef 0018 lea %sp@(24),%sp 4faee: 4a84 tstl %d4 4faf0: 6706 beqs 4faf8 <== NEVER TAKEN lfat_fd->ino = key; 4faf2: 2542 000c movel %d2,%a2@(12) 4faf6: 6032 bras 4fb2a else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 4faf8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fafa: 4eb9 0005 0a40 jsr 50a40 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4fb00: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4fb04: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 4fb06: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4fb0a: 4aa8 000c tstl %a0@(12) <== NOT EXECUTED 4fb0e: 661a bnes 4fb2a <== NOT EXECUTED { free((*fat_fd)); 4fb10: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4fb12: 4eb9 0004 54d0 jsr 454d0 <== 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 ); 4fb18: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 4fb1e: 588f addql #4,%sp <== NOT EXECUTED 4fb20: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fb22: 700c moveq #12,%d0 <== NOT EXECUTED 4fb24: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fb26: 70ff moveq #-1,%d0 4fb28: 6020 bras 4fb4a */ 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); 4fb2a: 7001 moveq #1,%d0 4fb2c: c480 andl %d0,%d2 4fb2e: 2f2e fffc movel %fp@(-4),%sp@- 4fb32: 2002 movel %d2,%d0 4fb34: e98a lsll #4,%d2 4fb36: e588 lsll #2,%d0 4fb38: 9480 subl %d0,%d2 4fb3a: d4ac 005a addl %a4@(90),%d2 4fb3e: 2f02 movel %d2,%sp@- 4fb40: 4eb9 0004 99ac jsr 499ac <_Chain_Append> /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 4fb46: 508f addql #8,%sp 4fb48: 4280 clrl %d0 } 4fb4a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4fb50: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fb66 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 4fb66: 4e56 ffd4 linkw %fp,#-44 4fb6a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fb6e: 286e 0008 moveal %fp@(8),%a4 4fb72: 266e 000c moveal %fp@(12),%a3 4fb76: 2e2e 0010 movel %fp@(16),%d7 4fb7a: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fb7e: 246c 0034 moveal %a4@(52),%a2 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 4fb82: 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) 4fb86: 4a82 tstl %d2 4fb88: 6700 013e beqw 4fcc8 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 4fb8c: 202b 0018 movel %a3@(24),%d0 4fb90: b087 cmpl %d7,%d0 4fb92: 6300 0134 blsw 4fcc8 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4fb96: b082 cmpl %d2,%d0 4fb98: 6508 bcss 4fba2 <== NEVER TAKEN (start > fat_fd->fat_file_size - count)) 4fb9a: 2200 movel %d0,%d1 4fb9c: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4fb9e: b287 cmpl %d7,%d1 4fba0: 6404 bccs 4fba6 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 4fba2: 2400 movel %d0,%d2 <== NOT EXECUTED 4fba4: 9487 subl %d7,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4fba6: 7001 moveq #1,%d0 4fba8: b0ab 0020 cmpl %a3@(32),%d0 4fbac: 6652 bnes 4fc00 4fbae: 4aab 0024 tstl %a3@(36) 4fbb2: 664c bnes 4fc00 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 4fbb4: 4280 clrl %d0 4fbb6: 102a 000a moveb %a2@(10),%d0 4fbba: 7203 moveq #3,%d1 4fbbc: c081 andl %d1,%d0 if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4fbbe: 6740 beqs 4fc00 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 4fbc0: 2f2b 001c movel %a3@(28),%sp@- 4fbc4: 2f0a movel %a2,%sp@- 4fbc6: 4eba fd74 jsr %pc@(4f93c ) sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fbca: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 4fbcc: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fbce: 2040 moveal %d0,%a0 4fbd0: 2eae 0018 movel %fp@(24),%sp@ 4fbd4: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 4fbd6: 3212 movew %a2@,%d1 4fbd8: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fbda: c287 andl %d7,%d1 4fbdc: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 4fbde: 4281 clrl %d1 4fbe0: 122a 0002 moveb %a2@(2),%d1 4fbe4: e2af lsrl %d1,%d7 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fbe6: 4870 7800 pea %a0@(00000000,%d7:l) 4fbea: 2f0c movel %a4,%sp@- 4fbec: 4eb9 0005 07c2 jsr 507c2 <_fat_block_read> if ( ret < 0 ) 4fbf2: 4fef 0014 lea %sp@(20),%sp 4fbf6: 4a80 tstl %d0 4fbf8: 6c00 00d8 bgew 4fcd2 4fbfc: 6000 00d2 braw 4fcd0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4fc00: 4280 clrl %d0 4fc02: 102a 0008 moveb %a2@(8),%d0 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fc06: 280e movel %fp,%d4 4fc08: 5984 subql #4,%d4 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4fc0a: 2607 movel %d7,%d3 4fc0c: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4fc0e: 3a2a 0006 movew %a2@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fc12: 2f04 movel %d4,%sp@- 4fc14: 2f03 movel %d3,%sp@- 4fc16: 2f0b movel %a3,%sp@- 4fc18: 2f0c movel %a4,%sp@- 4fc1a: 4eba fc98 jsr %pc@(4f8b4 ) if (rc != RC_OK) 4fc1e: 4fef 0010 lea %sp@(16),%sp 4fc22: 4a81 tstl %d1 4fc24: 6600 00a6 bnew 4fccc return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4fc28: 4286 clrl %d6 4fc2a: 9bcd subal %a5,%a5 4fc2c: 0285 0000 ffff andil #65535,%d5 4fc32: 5385 subql #1,%d5 4fc34: ce85 andl %d5,%d7 4fc36: 2a07 movel %d7,%d5 4fc38: 606e bras 4fca8 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 4fc3a: 4284 clrl %d4 4fc3c: 382a 0006 movew %a2@(6),%d4 4fc40: 9885 subl %d5,%d4 4fc42: b484 cmpl %d4,%d2 4fc44: 6402 bccs 4fc48 4fc46: 2802 movel %d2,%d4 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 4fc48: 2f2e fffc movel %fp@(-4),%sp@- 4fc4c: 2f2c 0034 movel %a4@(52),%sp@- 4fc50: 4eba fcea jsr %pc@(4f93c ) sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fc54: 206e 0018 moveal %fp@(24),%a0 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 4fc58: 508f addql #8,%sp sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fc5a: 4870 d800 pea %a0@(00000000,%a5:l) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 4fc5e: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fc60: 2040 moveal %d0,%a0 4fc62: 2f04 movel %d4,%sp@- { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 4fc64: 3212 movew %a2@,%d1 4fc66: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fc68: c285 andl %d5,%d1 4fc6a: 2f01 movel %d1,%sp@- while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 4fc6c: 4281 clrl %d1 4fc6e: 122a 0002 moveb %a2@(2),%d1 4fc72: e2ad lsrl %d1,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fc74: 4870 5800 pea %a0@(00000000,%d5:l) 4fc78: 2f0c movel %a4,%sp@- 4fc7a: 4eb9 0005 07c2 jsr 507c2 <_fat_block_read> if ( ret < 0 ) 4fc80: 4fef 0014 lea %sp@(20),%sp 4fc84: 4a80 tstl %d0 4fc86: 6d48 blts 4fcd0 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4fc88: 486e fffc pea %fp@(-4) ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 4fc8c: 9484 subl %d4,%d2 cmpltd += c; 4fc8e: dbc4 addal %d4,%a5 save_cln = cur_cln; 4fc90: 2c2e fffc movel %fp@(-4),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4fc94: 2f06 movel %d6,%sp@- 4fc96: 2f0c movel %a4,%sp@- 4fc98: 4eb9 0005 67b8 jsr 567b8 if ( rc != RC_OK ) 4fc9e: 4fef 000c lea %sp@(12),%sp 4fca2: 4a80 tstl %d0 4fca4: 662c bnes 4fcd2 <== NEVER TAKEN return rc; ofs = 0; 4fca6: 4285 clrl %d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 4fca8: 4a82 tstl %d2 4fcaa: 668e bnes 4fc3a } /* 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); 4fcac: 4281 clrl %d1 4fcae: 122a 0008 moveb %a2@(8),%d1 4fcb2: 41f5 78ff lea %a5@(ffffffff,%d7:l),%a0 fat_fd->map.disk_cln = save_cln; 4fcb6: 2746 0036 movel %d6,%a3@(54) } /* 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); 4fcba: 2008 movel %a0,%d0 4fcbc: e2a8 lsrl %d1,%d0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 4fcbe: d083 addl %d3,%d0 4fcc0: 2740 0032 movel %d0,%a3@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 4fcc4: 200d movel %a5,%d0 4fcc6: 600a bras 4fcd2 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; 4fcc8: 4280 clrl %d0 <== NOT EXECUTED 4fcca: 6006 bras 4fcd2 <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 4fccc: 2001 movel %d1,%d0 <== NOT EXECUTED 4fcce: 6002 bras 4fcd2 <== NOT EXECUTED sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 4fcd0: 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; } 4fcd2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4fcd8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000503b6 : fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 503b6: 7001 moveq #1,%d0 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 503b8: 4e56 ffe4 linkw %fp,#-28 503bc: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 503c0: 286e 0008 moveal %fp@(8),%a4 503c4: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 503c8: 266c 0034 moveal %a4@(52),%a3 uint32_t cur_cln = fat_fd->cln; 503cc: 2d6a 001c fffc movel %a2@(28),%fp@(-4) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 503d2: b0aa 0020 cmpl %a2@(32),%d0 503d6: 661a bnes 503f2 <== ALWAYS TAKEN 503d8: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 503dc: 6614 bnes 503f2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 503de: 4280 clrl %d0 <== NOT EXECUTED 503e0: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 503e4: 7203 moveq #3,%d1 <== NOT EXECUTED 503e6: c081 andl %d1,%d0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 503e8: 6708 beqs 503f2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 503ea: 256b 0024 0018 movel %a3@(36),%a2@(24) <== NOT EXECUTED 503f0: 6042 bras 50434 <== 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(mt_entry, cur_cln, &cur_cln); 503f2: 260e movel %fp,%d3 ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; 503f4: 4280 clrl %d0 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(mt_entry, cur_cln, &cur_cln); 503f6: 5983 subql #4,%d3 503f8: 4bf9 0005 67b8 lea 567b8 ,%a5 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 503fe: 42aa 0018 clrl %a2@(24) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 50402: 601c bras 50420 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50404: 2f03 movel %d3,%sp@- 50406: 2f02 movel %d2,%sp@- 50408: 2f0c movel %a4,%sp@- 5040a: 4e95 jsr %a5@ if ( rc != RC_OK ) 5040c: 4fef 000c lea %sp@(12),%sp 50410: 4a80 tstl %d0 50412: 6622 bnes 50436 <== NEVER TAKEN return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 50414: 4280 clrl %d0 50416: 302b 0006 movew %a3@(6),%d0 5041a: d1aa 0018 addl %d0,%a2@(24) fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; 5041e: 2002 movel %d2,%d0 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 50420: 242e fffc movel %fp@(-4),%d2 50424: 2202 movel %d2,%d1 50426: c2ab 000c andl %a3@(12),%d1 5042a: b2ab 0010 cmpl %a3@(16),%d1 5042e: 65d4 bcss 50404 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 50430: 2540 003a movel %d0,%a2@(58) return rc; 50434: 4280 clrl %d0 } 50436: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 5043c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fcdc : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 4fcdc: 70ff moveq #-1,%d0 fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 4fcde: 4e56 ffe8 linkw %fp,#-24 4fce2: 206e 0010 moveal %fp@(16),%a0 4fce6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fcea: 266e 0008 moveal %fp@(8),%a3 4fcee: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 4fcf2: 2d40 fffc movel %d0,%fp@(-4) fat_file_fd_t *fat_fd, uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fcf6: 226b 0034 moveal %a3@(52),%a1 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 ) 4fcfa: 202a 0018 movel %a2@(24),%d0 uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 4fcfe: 42ae fff8 clrl %fp@(-8) uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 4fd02: b088 cmpl %a0,%d0 4fd04: 6300 00b4 blsw 4fdba return rc; assert(fat_fd->fat_file_size); 4fd08: 4a80 tstl %d0 4fd0a: 661c bnes 4fd28 <== ALWAYS TAKEN 4fd0c: 4879 0006 792e pea 6792e <== NOT EXECUTED 4fd12: 4879 0006 798c pea 6798c <__FUNCTION__.6120> <== NOT EXECUTED 4fd18: 4878 026d pea 26d <== NOT EXECUTED 4fd1c: 4879 0006 7944 pea 67944 <== NOT EXECUTED 4fd22: 4eb9 0005 20dc jsr 520dc <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 4fd28: 4282 clrl %d2 4fd2a: 4281 clrl %d1 4fd2c: 1229 0008 moveb %a1@(8),%d1 4fd30: 3429 0006 movew %a1@(6),%d2 4fd34: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 4fd38: 2408 movel %a0,%d2 4fd3a: e2aa lsrl %d1,%d2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 4fd3c: 2602 movel %d2,%d3 4fd3e: e3ab lsll %d1,%d3 4fd40: b083 cmpl %d3,%d0 4fd42: 6376 blss 4fdba <== NEVER TAKEN return RC_OK; if (cl_start != 0) 4fd44: 4a82 tstl %d2 4fd46: 671a beqs 4fd62 <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 4fd48: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4fd4c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4fd4e: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 4fd52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd54: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fd56: 4eba fb5c jsr %pc@(4f8b4 ) <== NOT EXECUTED if (rc != RC_OK) 4fd5a: 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(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 4fd5e: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 4fd60: 665a bnes 4fdbc <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fd62: 486e fff8 pea %fp@(-8) 4fd66: 2f02 movel %d2,%sp@- 4fd68: 2f0a movel %a2,%sp@- 4fd6a: 2f0b movel %a3,%sp@- 4fd6c: 4eba fb46 jsr %pc@(4f8b4 ) if (rc != RC_OK) 4fd70: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fd74: 2001 movel %d1,%d0 if (rc != RC_OK) 4fd76: 6644 bnes 4fdbc <== NEVER TAKEN return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 4fd78: 2f2e fff8 movel %fp@(-8),%sp@- 4fd7c: 2f0b movel %a3,%sp@- 4fd7e: 4eb9 0005 6b8e jsr 56b8e if (rc != RC_OK) 4fd84: 508f addql #8,%sp 4fd86: 4a80 tstl %d0 4fd88: 6632 bnes 4fdbc <== NEVER TAKEN return rc; if (cl_start != 0) 4fd8a: 4a82 tstl %d2 4fd8c: 672e beqs 4fdbc <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 4fd8e: 4878 ffff pea ffffffff <== NOT EXECUTED 4fd92: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4fd96: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fd98: 4eb9 0005 6930 jsr 56930 <== NOT EXECUTED if ( rc != RC_OK ) 4fd9e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fda2: 4a80 tstl %d0 <== NOT EXECUTED 4fda4: 6616 bnes 4fdbc <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 4fda6: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 4fdaa: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 4fdac: 2541 0036 movel %d1,%a2@(54) <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 4fdb0: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 4fdb4: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED 4fdb8: 6002 bras 4fdbc <== NOT EXECUTED assert(fat_fd->fat_file_size); cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) return RC_OK; 4fdba: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; } return RC_OK; } 4fdbc: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4fdc2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000500b2 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 500b2: 4e56 ffd0 linkw %fp,#-48 500b6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 500ba: 286e 0008 moveal %fp@(8),%a4 500be: 246e 000c moveal %fp@(12),%a2 500c2: 2e2e 0010 movel %fp@(16),%d7 500c6: 242e 0014 movel %fp@(20),%d2 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 500ca: 266c 0034 moveal %a4@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 500ce: 42ae fff8 clrl %fp@(-8) uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 500d2: 42ae fffc clrl %fp@(-4) if ( count == 0 ) 500d6: 4a82 tstl %d2 500d8: 6700 0180 beqw 5025a return cmpltd; if ( start > fat_fd->fat_file_size ) 500dc: beaa 0018 cmpl %a2@(24),%d7 500e0: 620e bhis 500f0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 500e2: 202a 0014 movel %a2@(20),%d0 500e6: b082 cmpl %d2,%d0 500e8: 6506 bcss 500f0 <== NEVER TAKEN (start > fat_fd->size_limit - count)) 500ea: 9082 subl %d2,%d0 return cmpltd; if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 500ec: b087 cmpl %d7,%d0 500ee: 6410 bccs 50100 <== ALWAYS TAKEN (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 500f0: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 500f6: 7405 moveq #5,%d2 <== NOT EXECUTED 500f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 500fa: 2082 movel %d2,%a0@ <== NOT EXECUTED 500fc: 6000 0160 braw 5025e <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 50100: 486e fffc pea %fp@(-4) 50104: 2602 movel %d2,%d3 50106: d687 addl %d7,%d3 50108: 2f03 movel %d3,%sp@- 5010a: 2f0a movel %a2,%sp@- 5010c: 2f0c movel %a4,%sp@- 5010e: 4eb9 0004 ff24 jsr 4ff24 if (rc != RC_OK) 50114: 4fef 0010 lea %sp@(16),%sp 50118: 4a80 tstl %d0 5011a: 6600 0144 bnew 50260 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 5011e: 202e fffc movel %fp@(-4),%d0 50122: b680 cmpl %d0,%d3 50124: 6704 beqs 5012a <== ALWAYS TAKEN count = c - start; 50126: 2400 movel %d0,%d2 <== NOT EXECUTED 50128: 9487 subl %d7,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5012a: 7001 moveq #1,%d0 5012c: b0aa 0020 cmpl %a2@(32),%d0 50130: 6654 bnes 50186 50132: 4aaa 0024 tstl %a2@(36) 50136: 664e bnes 50186 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 50138: 4280 clrl %d0 5013a: 102b 000a moveb %a3@(10),%d0 5013e: 7203 moveq #3,%d1 50140: c081 andl %d1,%d0 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 50142: 6742 beqs 50186 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 50144: 2f2a 001c movel %a2@(28),%sp@- 50148: 2f2c 0034 movel %a4@(52),%sp@- 5014c: 4eba f7ee jsr %pc@(4f93c ) sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50150: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 50152: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50154: 2040 moveal %d0,%a0 50156: 2eae 0018 movel %fp@(24),%sp@ 5015a: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 5015c: 3213 movew %a3@,%d1 5015e: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50160: c287 andl %d7,%d1 50162: 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(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 50164: 4281 clrl %d1 50166: 122b 0002 moveb %a3@(2),%d1 5016a: e2af lsrl %d1,%d7 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 5016c: 4870 7800 pea %a0@(00000000,%d7:l) 50170: 2f0c movel %a4,%sp@- 50172: 4eb9 0005 084a jsr 5084a <_fat_block_write> if ( ret < 0 ) 50178: 4fef 0014 lea %sp@(20),%sp 5017c: 4a80 tstl %d0 5017e: 6c00 00e0 bgew 50260 50182: 6000 00da braw 5025e <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 50186: 4280 clrl %d0 50188: 102b 0008 moveb %a3@(8),%d0 save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 5018c: 280e movel %fp,%d4 5018e: 5184 subql #8,%d4 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 50190: 2607 movel %d7,%d3 50192: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 50194: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 50198: 2f04 movel %d4,%sp@- 5019a: 2f03 movel %d3,%sp@- 5019c: 2f0a movel %a2,%sp@- 5019e: 2f0c movel %a4,%sp@- 501a0: 4eba f712 jsr %pc@(4f8b4 ) if (rc != RC_OK) 501a4: 4fef 0010 lea %sp@(16),%sp } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 501a8: 2001 movel %d1,%d0 if (rc != RC_OK) 501aa: 6600 00b4 bnew 50260 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 501ae: 4286 clrl %d6 501b0: 9bcd subal %a5,%a5 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 501b2: 283c 0005 67b8 movel #354232,%d4 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 501b8: 0285 0000 ffff andil #65535,%d5 501be: 5385 subql #1,%d5 501c0: ce85 andl %d5,%d7 501c2: 2a07 movel %d7,%d5 501c4: 6074 bras 5023a if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 501c6: 4286 clrl %d6 501c8: 3c2b 0006 movew %a3@(6),%d6 501cc: 9c85 subl %d5,%d6 501ce: b486 cmpl %d6,%d2 501d0: 6402 bccs 501d4 501d2: 2c02 movel %d2,%d6 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 501d4: 2f2e fff8 movel %fp@(-8),%sp@- 501d8: 2f2c 0034 movel %a4@(52),%sp@- if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 501dc: 2d46 fffc movel %d6,%fp@(-4) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 501e0: 4eba f75a jsr %pc@(4f93c ) sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 501e4: 206e 0018 moveal %fp@(24),%a0 while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 501e8: 508f addql #8,%sp sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 501ea: 4870 d800 pea %a0@(00000000,%a5:l) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 501ee: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 501f0: 2040 moveal %d0,%a0 501f2: 2f06 movel %d6,%sp@- { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 501f4: 3213 movew %a3@,%d1 501f6: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 501f8: c285 andl %d5,%d1 501fa: 2f01 movel %d1,%sp@- while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 501fc: 4281 clrl %d1 501fe: 122b 0002 moveb %a3@(2),%d1 50202: e2ad lsrl %d1,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 50204: 4870 5800 pea %a0@(00000000,%d5:l) 50208: 2f0c movel %a4,%sp@- 5020a: 4eb9 0005 084a jsr 5084a <_fat_block_write> if ( ret < 0 ) 50210: 4fef 0014 lea %sp@(20),%sp 50214: 4a80 tstl %d0 50216: 6d46 blts 5025e <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50218: 486e fff8 pea %fp@(-8) 5021c: 2044 moveal %d4,%a0 if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 5021e: 2c2e fff8 movel %fp@(-8),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50222: 2f06 movel %d6,%sp@- ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 50224: 202e fffc movel %fp@(-4),%d0 50228: 9480 subl %d0,%d2 cmpltd += c; 5022a: dbc0 addal %d0,%a5 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5022c: 2f0c movel %a4,%sp@- 5022e: 4e90 jsr %a0@ if ( rc != RC_OK ) 50230: 4fef 000c lea %sp@(12),%sp 50234: 4a80 tstl %d0 50236: 6628 bnes 50260 <== NEVER TAKEN return rc; ofs = 0; 50238: 4285 clrl %d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5023a: 4a82 tstl %d2 5023c: 6688 bnes 501c6 } /* 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); 5023e: 4281 clrl %d1 50240: 122b 0008 moveb %a3@(8),%d1 50244: 41f5 78ff lea %a5@(ffffffff,%d7:l),%a0 fat_fd->map.disk_cln = save_cln; 50248: 2546 0036 movel %d6,%a2@(54) } /* 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); 5024c: 2008 movel %a0,%d0 5024e: e2a8 lsrl %d1,%d0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 50250: d083 addl %d3,%d0 50252: 2540 0032 movel %d0,%a2@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 50256: 200d movel %a5,%d0 50258: 6006 bras 50260 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; 5025a: 4280 clrl %d0 <== NOT EXECUTED 5025c: 6002 bras 50260 <== NOT EXECUTED sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; 5025e: 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; } 50260: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 50266: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00056b8e : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 56b8e: 4e56 ffd4 linkw %fp,#-44 56b92: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 56b96: 286e 0008 moveal %fp@(8),%a4 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 56b9a: 264e moveal %fp,%a3 uint32_t freed_cls_cnt = 0; 56b9c: 4282 clrl %d2 fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 56b9e: 4285 clrl %d5 uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 56ba0: 2e3c 0005 67b8 movel #354232,%d7 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 56ba6: 4bf9 0005 6930 lea 56930 ,%a5 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 56bac: 2c2e 000c movel %fp@(12),%d6 int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; 56bb0: 2606 movel %d6,%d3 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 56bb2: 246c 0034 moveal %a4@(52),%a2 uint32_t cur_cln = chain; uint32_t next_cln = 0; 56bb6: 42a3 clrl %a3@- uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 56bb8: 6046 bras 56c00 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 56bba: 2f0b movel %a3,%sp@- 56bbc: 2047 moveal %d7,%a0 56bbe: 2f03 movel %d3,%sp@- 56bc0: 2f0c movel %a4,%sp@- 56bc2: 4e90 jsr %a0@ if ( rc != RC_OK ) 56bc4: 4fef 000c lea %sp@(12),%sp uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 56bc8: 2800 movel %d0,%d4 if ( rc != RC_OK ) 56bca: 671c beqs 56be8 <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 56bcc: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 56bd0: 72ff moveq #-1,%d1 <== NOT EXECUTED 56bd2: b280 cmpl %d0,%d1 <== NOT EXECUTED 56bd4: 6706 beqs 56bdc <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 56bd6: d480 addl %d0,%d2 <== NOT EXECUTED 56bd8: 2542 003a movel %d2,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 56bdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 56bde: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED return rc; 56be4: 588f addql #4,%sp <== NOT EXECUTED 56be6: 6044 bras 56c2c <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 56be8: 42a7 clrl %sp@- 56bea: 2f03 movel %d3,%sp@- 56bec: 2f0c movel %a4,%sp@- 56bee: 4e95 jsr %a5@ if ( rc != RC_OK ) 56bf0: 4fef 000c lea %sp@(12),%sp 56bf4: 4a80 tstl %d0 56bf6: 6702 beqs 56bfa <== ALWAYS TAKEN 56bf8: 2a00 movel %d0,%d5 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 56bfa: 262e fffc movel %fp@(-4),%d3 rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 56bfe: 5282 addql #1,%d2 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 56c00: 2003 movel %d3,%d0 56c02: c0aa 000c andl %a2@(12),%d0 56c06: b0aa 0010 cmpl %a2@(16),%d0 56c0a: 65ae bcss 56bba freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 56c0c: 202a 003a movel %a2@(58),%d0 56c10: 72ff moveq #-1,%d1 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 56c12: 2546 003e movel %d6,%a2@(62) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 56c16: b280 cmpl %d0,%d1 56c18: 6706 beqs 56c20 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; 56c1a: d480 addl %d0,%d2 <== NOT EXECUTED 56c1c: 2542 003a movel %d2,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 56c20: 2f0a movel %a2,%sp@- 56c22: 2805 movel %d5,%d4 56c24: 4eb9 0005 0690 jsr 50690 56c2a: 588f addql #4,%sp if (rc1 != RC_OK) return rc1; return RC_OK; } 56c2c: 2004 movel %d4,%d0 56c2e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 56c34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050ad8 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 50ad8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 50adc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 50ae0: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 50ae4: 2268 0034 moveal %a0@(52),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 50ae8: 90a9 006e subl %a1@(110),%d0 <== NOT EXECUTED 50aec: 2200 movel %d0,%d1 <== NOT EXECUTED 50aee: e689 lsrl #3,%d1 <== NOT EXECUTED 50af0: 2069 0062 moveal %a1@(98),%a0 <== NOT EXECUTED 50af4: d1c1 addal %d1,%a0 <== NOT EXECUTED 50af6: 7207 moveq #7,%d1 <== NOT EXECUTED 50af8: c280 andl %d0,%d1 <== NOT EXECUTED 50afa: 7001 moveq #1,%d0 <== NOT EXECUTED 50afc: e3a8 lsll %d1,%d0 <== NOT EXECUTED 50afe: 1210 moveb %a0@,%d1 <== NOT EXECUTED 50b00: 4680 notl %d0 <== NOT EXECUTED 50b02: c081 andl %d1,%d0 <== NOT EXECUTED 50b04: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 50b06: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000567b8 : rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 567b8: 7001 moveq #1,%d0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 567ba: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 567be: 206e 0008 moveal %fp@(8),%a0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 567c2: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 567c6: 242e 000c movel %fp@(12),%d2 567ca: 246e 0010 moveal %fp@(16),%a2 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 567ce: 2668 0034 moveal %a0@(52),%a3 rtems_bdbuf_buffer *block0 = NULL; 567d2: 42ae fffc clrl %fp@(-4) uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 567d6: b082 cmpl %d2,%d0 567d8: 6400 0138 bccw 56912 567dc: 202b 0030 movel %a3@(48),%d0 567e0: 5280 addql #1,%d0 567e2: b082 cmpl %d2,%d0 567e4: 6500 012c bcsw 56912 rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 567e8: 4280 clrl %d0 567ea: 102b 000a moveb %a3@(10),%d0 567ee: 7201 moveq #1,%d1 567f0: 2802 movel %d2,%d4 567f2: c280 andl %d0,%d1 567f4: 6706 beqs 567fc <== NEVER TAKEN 567f6: e28c lsrl #1,%d4 567f8: d882 addl %d2,%d4 567fa: 600c bras 56808 567fc: 0800 0001 btst #1,%d0 <== NOT EXECUTED 56800: 6704 beqs 56806 <== NOT EXECUTED 56802: d884 addl %d4,%d4 <== NOT EXECUTED 56804: 6002 bras 56808 <== NOT EXECUTED 56806: e58c lsll #2,%d4 <== NOT EXECUTED 56808: 4283 clrl %d3 5680a: 162b 0002 moveb %a3@(2),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 5680e: 2a02 movel %d2,%d5 /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 56810: e6ac lsrl %d3,%d4 56812: d8ab 0044 addl %a3@(68),%d4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 56816: 4a81 tstl %d1 56818: 6706 beqs 56820 <== NEVER TAKEN 5681a: e28d lsrl #1,%d5 5681c: da82 addl %d2,%d5 5681e: 600c bras 5682c 56820: 0800 0001 btst #1,%d0 <== NOT EXECUTED 56824: 6704 beqs 5682a <== NOT EXECUTED 56826: da85 addl %d5,%d5 <== NOT EXECUTED 56828: 6002 bras 5682c <== NOT EXECUTED 5682a: e58d lsll #2,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5682c: 2c0e movel %fp,%d6 5682e: 5986 subql #4,%d6 56830: 49f9 0005 04b0 lea 504b0 ,%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); 56836: 3e13 movew %a3@,%d7 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 56838: 2f06 movel %d6,%sp@- 5683a: 4878 0001 pea 1 5683e: 2f04 movel %d4,%sp@- 56840: 2f0b movel %a3,%sp@- 56842: 4e94 jsr %a4@ if (rc != RC_OK) 56844: 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, &block0); 56848: 2600 movel %d0,%d3 if (rc != RC_OK) 5684a: 6600 00d8 bnew 56924 return rc; switch ( fs_info->vol.type ) 5684e: 4280 clrl %d0 56850: 102b 000a moveb %a3@(10),%d0 56854: 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); 56856: 0287 0000 ffff andil #65535,%d7 5685c: 5387 subql #1,%d7 5685e: ca87 andl %d7,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 56860: b280 cmpl %d0,%d1 56862: 677a beqs 568de <== NEVER TAKEN 56864: 123c 0004 moveb #4,%d1 56868: b280 cmpl %d0,%d1 5686a: 6700 0090 beqw 568fc 5686e: 123c 0001 moveb #1,%d1 56872: b280 cmpl %d0,%d1 56874: 6600 009c bnew 56912 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 56878: 206e fffc moveal %fp@(-4),%a0 5687c: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 5687e: 4280 clrl %d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 56880: 2068 001e moveal %a0@(30),%a0 56884: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 56888: 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 = (*((uint8_t *)(block0->buffer + ofs))); 5688a: 2481 movel %d1,%a2@ if ( ofs == (fs_info->vol.bps - 1) ) 5688c: 5380 subql #1,%d0 5688e: b085 cmpl %d5,%d0 56890: 662a bnes 568bc <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 56892: 2f06 movel %d6,%sp@- <== NOT EXECUTED 56894: 4878 0001 pea 1 <== NOT EXECUTED 56898: 2044 moveal %d4,%a0 <== NOT EXECUTED 5689a: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5689e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 568a0: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 568a2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 568a6: 4a80 tstl %d0 <== NOT EXECUTED 568a8: 6678 bnes 56922 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 568aa: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 568ae: 4280 clrl %d0 <== NOT EXECUTED 568b0: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 568b4: 1010 moveb %a0@,%d0 <== NOT EXECUTED 568b6: e188 lsll #8,%d0 <== NOT EXECUTED 568b8: 8192 orl %d0,%a2@ <== NOT EXECUTED 568ba: 600c bras 568c8 <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 568bc: 4280 clrl %d0 568be: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 568c2: e188 lsll #8,%d0 568c4: 8081 orl %d1,%d0 568c6: 2480 movel %d0,%a2@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 568c8: 0802 0000 btst #0,%d2 568cc: 6706 beqs 568d4 *ret_val = (*ret_val) >> FAT12_SHIFT; 568ce: 2012 movel %a2@,%d0 568d0: e888 lsrl #4,%d0 568d2: 603a bras 5690e else *ret_val = (*ret_val) & FAT_FAT12_MASK; 568d4: 203c 0000 0fff movel #4095,%d0 568da: c192 andl %d0,%a2@ 568dc: 6046 bras 56924 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 568de: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 568e2: 4281 clrl %d1 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 568e4: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 568e8: 3230 5800 movew %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 568ec: 2001 movel %d1,%d0 <== NOT EXECUTED 568ee: e089 lsrl #8,%d1 <== NOT EXECUTED 568f0: e188 lsll #8,%d0 <== NOT EXECUTED 568f2: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 568f8: 8081 orl %d1,%d0 <== NOT EXECUTED 568fa: 6012 bras 5690e <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 568fc: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 56900: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 56904: 2f30 5800 movel %a0@(00000000,%d5:l),%sp@- <== NOT EXECUTED 56908: 4eba fe76 jsr %pc@(56780 ) <== NOT EXECUTED 5690c: 588f addql #4,%sp <== NOT EXECUTED 5690e: 2480 movel %d0,%a2@ break; 56910: 6012 bras 56924 default: rtems_set_errno_and_return_minus_one(EIO); 56912: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 56918: 76ff moveq #-1,%d3 <== NOT EXECUTED 5691a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5691c: 7005 moveq #5,%d0 <== NOT EXECUTED 5691e: 2080 movel %d0,%a0@ <== NOT EXECUTED 56920: 6002 bras 56924 <== NOT EXECUTED *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) 56922: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 56924: 2003 movel %d3,%d0 56926: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 5692c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050a40 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 50a40: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 50a44: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 50a48: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 50a4c: 2468 0034 moveal %a0@(52),%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); 50a50: 47f9 0004 6750 lea 46750 ,%a3 <== NOT EXECUTED { register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) 50a56: 606c bras 50ac4 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 50a58: 222a 0066 movel %a2@(102),%d1 <== NOT EXECUTED 50a5c: 2401 movel %d1,%d2 <== NOT EXECUTED 50a5e: e68a lsrl #3,%d2 <== NOT EXECUTED 50a60: 7607 moveq #7,%d3 <== NOT EXECUTED 50a62: 206a 0062 moveal %a2@(98),%a0 <== NOT EXECUTED 50a66: d1c2 addal %d2,%a0 <== NOT EXECUTED 50a68: 1410 moveb %a0@,%d2 <== NOT EXECUTED 50a6a: c681 andl %d1,%d3 <== NOT EXECUTED 50a6c: 1802 moveb %d2,%d4 <== NOT EXECUTED 50a6e: 49c4 extbl %d4 <== NOT EXECUTED 50a70: 0704 btst %d3,%d4 <== NOT EXECUTED 50a72: 6612 bnes 50a86 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 50a74: 7001 moveq #1,%d0 <== NOT EXECUTED 50a76: e7a8 lsll %d3,%d0 <== NOT EXECUTED 50a78: 8082 orl %d2,%d0 <== NOT EXECUTED 50a7a: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 50a7c: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 50a80: d0aa 006e addl %a2@(110),%d0 <== NOT EXECUTED 50a84: 6048 bras 50ace <== NOT EXECUTED } fs_info->index++; 50a86: 5281 addql #1,%d1 <== NOT EXECUTED 50a88: 2541 0066 movel %d1,%a2@(102) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 50a8c: b3c1 cmpal %d1,%a1 <== NOT EXECUTED 50a8e: 6204 bhis 50a94 <== NOT EXECUTED fs_info->index = 0; 50a90: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 50a94: 5280 addql #1,%d0 <== NOT EXECUTED 50a96: b3c0 cmpal %d0,%a1 <== NOT EXECUTED 50a98: 66be bnes 50a58 <== 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)) 50a9a: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED 50aa0: 92aa 006e subl %a2@(110),%d1 <== NOT EXECUTED 50aa4: d080 addl %d0,%d0 <== NOT EXECUTED 50aa6: b280 cmpl %d0,%d1 <== NOT EXECUTED 50aa8: 6322 blss 50acc <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 50aaa: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 50aae: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50ab0: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 50ab4: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 50ab6: 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); 50ab8: 2540 0062 movel %d0,%a2@(98) <== NOT EXECUTED if (fs_info->uino != NULL) 50abc: 670e beqs 50acc <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 50abe: 256a 006a 0066 movel %a2@(106),%a2@(102) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 50ac4: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED 50ac8: 4280 clrl %d0 <== NOT EXECUTED 50aca: 60ca bras 50a96 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 50acc: 4280 clrl %d0 <== NOT EXECUTED } 50ace: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 50ad4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050988 : ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 50988: 4280 clrl %d0 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 5098a: 4e56 ffe0 linkw %fp,#-32 int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; 5098e: 2d6e 000c fffc movel %fp@(12),%fp@(-4) int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 50994: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 50998: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 5099c: 246b 0034 moveal %a3@(52),%a2 uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 509a0: 4878 0001 pea 1 509a4: 302a 0006 movew %a2@(6),%d0 509a8: 2f00 movel %d0,%sp@- 509aa: 4eb9 0004 4e3c jsr 44e3c if ( buf == NULL ) 509b0: 508f addql #8,%sp ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 509b2: 2400 movel %d0,%d2 if ( buf == NULL ) 509b4: 6654 bnes 50a0a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 509b6: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 509bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 509be: 7005 moveq #5,%d0 <== NOT EXECUTED 509c0: 2080 movel %d0,%a0@ <== NOT EXECUTED 509c2: 601c bras 509e0 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 509c4: 2f02 movel %d2,%sp@- 509c6: 2f00 movel %d0,%sp@- 509c8: 2f0b movel %a3,%sp@- 509ca: 4e95 jsr %a5@ if ( ret == -1 ) 509cc: 4fef 000c lea %sp@(12),%sp 509d0: 72ff moveq #-1,%d1 509d2: b280 cmpl %d0,%d1 509d4: 660e bnes 509e4 <== ALWAYS TAKEN { free(buf); 509d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 509d8: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED return -1; 509de: 588f addql #4,%sp <== NOT EXECUTED 509e0: 70ff moveq #-1,%d0 <== NOT EXECUTED 509e2: 6052 bras 50a36 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 509e4: 2f03 movel %d3,%sp@- 509e6: 2f2e fffc movel %fp@(-4),%sp@- 509ea: 2f0b movel %a3,%sp@- 509ec: 4e94 jsr %a4@ if ( rc != RC_OK ) 509ee: 4fef 000c lea %sp@(12),%sp 509f2: 4a80 tstl %d0 509f4: 6724 beqs 50a1a <== ALWAYS TAKEN { free(buf); 509f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 509f8: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 509fc: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED return rc; 50a02: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 50a06: 588f addql #4,%sp <== NOT EXECUTED 50a08: 602c bras 50a36 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50a0a: 260e movel %fp,%d3 if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 50a0c: 4bf9 0005 0942 lea 50942 ,%a5 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50a12: 5983 subql #4,%d3 50a14: 49f9 0005 67b8 lea 567b8 ,%a4 buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 50a1a: 202e fffc movel %fp@(-4),%d0 50a1e: 2200 movel %d0,%d1 50a20: c2aa 000c andl %a2@(12),%d1 50a24: b2aa 0010 cmpl %a2@(16),%d1 50a28: 659a bcss 509c4 free(buf); return rc; } } free(buf); 50a2a: 2f02 movel %d2,%sp@- 50a2c: 4eb9 0004 54d0 jsr 454d0 return rc; 50a32: 588f addql #4,%sp 50a34: 4280 clrl %d0 } 50a36: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 50a3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050cac : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 50cac: 4e56 ff64 linkw %fp,#-156 50cb0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50cb4: 266e 0008 moveal %fp@(8),%a3 rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 50cb8: 246b 0034 moveal %a3@(52),%a2 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 50cbc: 486e ffaa pea %fp@(-86) 50cc0: 2f2b 0070 movel %a3@(112),%sp@- 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; 50cc4: 42ae fffc clrl %fp@(-4) rc = stat(mt_entry->dev, &stat_buf); 50cc8: 4eb9 0004 6960 jsr 46960 if (rc == -1) 50cce: 508f addql #8,%sp ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 50cd0: 2400 movel %d0,%d2 if (rc == -1) 50cd2: 70ff moveq #-1,%d0 50cd4: b082 cmpl %d2,%d0 50cd6: 6700 0756 beqw 5142e return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 50cda: 202e ffb6 movel %fp@(-74),%d0 50cde: 0280 0000 f000 andil #61440,%d0 50ce4: 0c80 0000 6000 cmpil #24576,%d0 50cea: 6710 beqs 50cfc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOTTY); 50cec: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50cf2: 7619 moveq #25,%d3 <== NOT EXECUTED 50cf4: 2040 moveal %d0,%a0 <== NOT EXECUTED 50cf6: 2083 movel %d3,%a0@ <== NOT EXECUTED 50cf8: 6000 072e braw 51428 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 50cfc: 2f2e ffc4 movel %fp@(-60),%sp@- 50d00: 2f2e ffc0 movel %fp@(-64),%sp@- 50d04: 4eb9 0004 44ba jsr 444ba if (vol->dd == NULL) 50d0a: 508f addql #8,%sp /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 50d0c: 2540 0052 movel %d0,%a2@(82) if (vol->dd == NULL) 50d10: 6610 bnes 50d22 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 50d12: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50d18: 7405 moveq #5,%d2 <== NOT EXECUTED 50d1a: 2240 moveal %d0,%a1 <== NOT EXECUTED 50d1c: 2282 movel %d2,%a1@ <== NOT EXECUTED 50d1e: 6000 0708 braw 51428 <== NOT EXECUTED vol->dev = stat_buf.st_rdev; 50d22: 202e ffc0 movel %fp@(-64),%d0 50d26: 222e ffc4 movel %fp@(-60),%d1 50d2a: 2540 004a movel %d0,%a2@(74) 50d2e: 2541 004e movel %d1,%a2@(78) /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 50d32: 486e fffc pea %fp@(-4) 50d36: 42a7 clrl %sp@- 50d38: 2f01 movel %d1,%sp@- 50d3a: 2f00 movel %d0,%sp@- 50d3c: 4eb9 0004 eefc jsr 4eefc if (sc != RTEMS_SUCCESSFUL) 50d42: 4fef 0010 lea %sp@(16),%sp 50d46: 4a80 tstl %d0 50d48: 6600 00d4 bnew 50e1e { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 50d4c: 206e fffc moveal %fp@(-4),%a0 50d50: 2268 001e moveal %a0@(30),%a1 50d54: 1229 000b moveb %a1@(11),%d1 50d58: 1829 000e moveb %a1@(14),%d4 50d5c: 1029 000f moveb %a1@(15),%d0 50d60: 1d41 ff95 moveb %d1,%fp@(-107) 50d64: 1229 0011 moveb %a1@(17),%d1 50d68: 3844 moveaw %d4,%a4 50d6a: 1d41 ff9c moveb %d1,%fp@(-100) 50d6e: 1229 0012 moveb %a1@(18),%d1 50d72: 1c29 000c moveb %a1@(12),%d6 50d76: 1d41 ff9b moveb %d1,%fp@(-101) 50d7a: 1229 0013 moveb %a1@(19),%d1 50d7e: 1429 000d moveb %a1@(13),%d2 50d82: 1d41 ff9a moveb %d1,%fp@(-102) 50d86: 1229 0014 moveb %a1@(20),%d1 50d8a: 1829 0010 moveb %a1@(16),%d4 50d8e: 1d41 ff99 moveb %d1,%fp@(-103) 50d92: 1229 0016 moveb %a1@(22),%d1 50d96: 3a40 moveaw %d0,%a5 50d98: 1d41 ff97 moveb %d1,%fp@(-105) 50d9c: 1229 0017 moveb %a1@(23),%d1 50da0: 1d41 ff96 moveb %d1,%fp@(-106) 50da4: 1229 0020 moveb %a1@(32),%d1 50da8: 1d41 ff9f moveb %d1,%fp@(-97) 50dac: 1229 0021 moveb %a1@(33),%d1 50db0: 1d41 ff9e moveb %d1,%fp@(-98) 50db4: 1229 0022 moveb %a1@(34),%d1 50db8: 1d41 ff9d moveb %d1,%fp@(-99) 50dbc: 1229 0023 moveb %a1@(35),%d1 50dc0: 1d41 ff8f moveb %d1,%fp@(-113) 50dc4: 1229 0024 moveb %a1@(36),%d1 50dc8: 1d41 ffa1 moveb %d1,%fp@(-95) 50dcc: 1229 0025 moveb %a1@(37),%d1 50dd0: 1d41 ffa0 moveb %d1,%fp@(-96) 50dd4: 1229 0026 moveb %a1@(38),%d1 50dd8: 1d41 ffa5 moveb %d1,%fp@(-91) 50ddc: 1229 002c moveb %a1@(44),%d1 50de0: 1e29 0027 moveb %a1@(39),%d7 50de4: 1629 0028 moveb %a1@(40),%d3 50de8: 1d41 ffa4 moveb %d1,%fp@(-92) 50dec: 1229 002d moveb %a1@(45),%d1 50df0: 1a29 002f moveb %a1@(47),%d5 50df4: 1d41 ffa3 moveb %d1,%fp@(-93) 50df8: 1229 002e moveb %a1@(46),%d1 50dfc: 1d41 ffa2 moveb %d1,%fp@(-94) 50e00: 1229 0030 moveb %a1@(48),%d1 50e04: 1d41 ffa7 moveb %d1,%fp@(-89) 50e08: 1229 0031 moveb %a1@(49),%d1 sc = rtems_bdbuf_release( block); 50e0c: 2f08 movel %a0,%sp@- { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 50e0e: 1d41 ffa6 moveb %d1,%fp@(-90) sc = rtems_bdbuf_release( block); 50e12: 4eb9 0004 f116 jsr 4f116 if (sc != RTEMS_SUCCESSFUL) 50e18: 588f addql #4,%sp 50e1a: 4a80 tstl %d0 50e1c: 671a beqs 50e38 <== ALWAYS TAKEN { rtems_disk_release(vol->dd); 50e1e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50e22: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 50e28: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50e2e: 7205 moveq #5,%d1 <== NOT EXECUTED 50e30: 2040 moveal %d0,%a0 <== NOT EXECUTED 50e32: 2081 movel %d1,%a0@ <== NOT EXECUTED 50e34: 6000 04fe braw 51334 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 50e38: 4280 clrl %d0 50e3a: 1006 moveb %d6,%d0 50e3c: 4281 clrl %d1 50e3e: 122e ff95 moveb %fp@(-107),%d1 50e42: e188 lsll #8,%d0 50e44: 8081 orl %d1,%d0 if ( (vol->bps != 512) && 50e46: 3200 movew %d0,%d1 rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 50e48: 3480 movew %d0,%a2@ 50e4a: 3040 moveaw %d0,%a0 if ( (vol->bps != 512) && 50e4c: 0c81 0000 0200 cmpil #512,%d1 50e52: 6732 beqs 50e86 <== ALWAYS TAKEN 50e54: 0c81 0000 0400 cmpil #1024,%d1 <== NOT EXECUTED 50e5a: 672a beqs 50e86 <== NOT EXECUTED (vol->bps != 1024) && 50e5c: 0c81 0000 0800 cmpil #2048,%d1 <== NOT EXECUTED 50e62: 6722 beqs 50e86 <== NOT EXECUTED (vol->bps != 2048) && 50e64: 0c81 0000 1000 cmpil #4096,%d1 <== NOT EXECUTED 50e6a: 671a beqs 50e86 <== NOT EXECUTED (vol->bps != 4096)) { rtems_disk_release(vol->dd); 50e6c: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50e70: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 50e76: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50e7c: 2240 moveal %d0,%a1 <== NOT EXECUTED 50e7e: 7016 moveq #22,%d0 <== NOT EXECUTED 50e80: 2280 movel %d0,%a1@ <== NOT EXECUTED 50e82: 6000 04b0 braw 51334 <== NOT EXECUTED } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 50e86: 7c09 moveq #9,%d6 50e88: eca9 lsrl %d6,%d1 50e8a: 4200 clrb %d0 50e8c: 1c2e ff8f moveb %fp@(-113),%d6 50e90: 1540 0003 moveb %d0,%a2@(3) 50e94: 600c bras 50ea2 i >>= 1, vol->sec_mul++); 50e96: e281 asrl #1,%d1 <== NOT EXECUTED 50e98: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED 50e9c: 5280 addql #1,%d0 <== NOT EXECUTED 50e9e: 1540 0003 moveb %d0,%a2@(3) <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 50ea2: 0801 0000 btst #0,%d1 50ea6: 67ee beqs 50e96 <== NEVER TAKEN i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 50ea8: 4281 clrl %d1 50eaa: 3208 movew %a0,%d1 50eac: 4200 clrb %d0 50eae: 1d46 ff8f moveb %d6,%fp@(-113) 50eb2: 2d41 ff90 movel %d1,%fp@(-112) 50eb6: 2241 moveal %d1,%a1 50eb8: 1540 0002 moveb %d0,%a2@(2) 50ebc: 6010 bras 50ece i >>= 1, vol->sec_log2++); 50ebe: e281 asrl #1,%d1 50ec0: 102a 0002 moveb %a2@(2),%d0 50ec4: 3040 moveaw %d0,%a0 50ec6: 5288 addql #1,%a0 50ec8: 3008 movew %a0,%d0 50eca: 1540 0002 moveb %d0,%a2@(2) rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 50ece: 0801 0000 btst #0,%d1 50ed2: 67ea beqs 50ebe 50ed4: 2d49 ff90 movel %a1,%fp@(-112) 50ed8: 1d46 ff8f moveb %d6,%fp@(-113) i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 50edc: 1542 0004 moveb %d2,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 50ee0: 6700 0258 beqw 5113a { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 50ee4: 4281 clrl %d1 50ee6: 1202 moveb %d2,%d1 50ee8: 4200 clrb %d0 50eea: 226e ff90 moveal %fp@(-112),%a1 50eee: 1540 0005 moveb %d0,%a2@(5) 50ef2: 1c2e ff8f moveb %fp@(-113),%d6 50ef6: 6010 bras 50f08 i >>= 1, vol->spc_log2++); 50ef8: e281 asrl #1,%d1 50efa: 102a 0005 moveb %a2@(5),%d0 50efe: 3040 moveaw %d0,%a0 50f00: 5288 addql #1,%a0 50f02: 3008 movew %a0,%d0 50f04: 1540 0005 moveb %d0,%a2@(5) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 50f08: 0801 0000 btst #0,%d1 50f0c: 67ea beqs 50ef8 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) 50f0e: 4281 clrl %d1 50f10: 122a 0005 moveb %a2@(5),%d1 50f14: 4280 clrl %d0 50f16: 1d46 ff8f moveb %d6,%fp@(-113) 50f1a: 2c09 movel %a1,%d6 50f1c: e3ae lsll %d1,%d6 50f1e: 2d49 ff90 movel %a1,%fp@(-112) 50f22: 3006 movew %d6,%d0 50f24: 3546 0006 movew %d6,%a2@(6) 50f28: 2040 moveal %d0,%a0 50f2a: b1fc 0000 8000 cmpal #32768,%a0 50f30: 6200 0208 bhiw 5113a 50f34: 226e ff90 moveal %fp@(-112),%a1 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 50f38: 2208 movel %a0,%d1 50f3a: 4200 clrb %d0 50f3c: 1c2e ff8f moveb %fp@(-113),%d6 50f40: 1540 0008 moveb %d0,%a2@(8) 50f44: 6010 bras 50f56 i >>= 1, vol->bpc_log2++); 50f46: e281 asrl #1,%d1 50f48: 102a 0008 moveb %a2@(8),%d0 50f4c: 3040 moveaw %d0,%a0 50f4e: 5288 addql #1,%a0 50f50: 3008 movew %a0,%d0 50f52: 1540 0008 moveb %d0,%a2@(8) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 50f56: 0801 0000 btst #0,%d1 50f5a: 67ea beqs 50f46 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 50f5c: 4280 clrl %d0 50f5e: 102e ff9b moveb %fp@(-101),%d0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 50f62: 320d movew %a5,%d1 50f64: 1d46 ff8f moveb %d6,%fp@(-113) 50f68: 3c0c movew %a4,%d6 50f6a: 0281 0000 00ff andil #255,%d1 50f70: 2d49 ff90 movel %a1,%fp@(-112) 50f74: 0286 0000 00ff andil #255,%d6 50f7a: e189 lsll #8,%d1 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 50f7c: e188 lsll #8,%d0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 50f7e: 8286 orl %d6,%d1 } 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); 50f80: 1544 0009 moveb %d4,%a2@(9) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 50f84: 3041 moveaw %d1,%a0 50f86: 3541 0014 movew %d1,%a2@(20) vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 50f8a: 4281 clrl %d1 50f8c: 122e ff9c moveb %fp@(-100),%d1 50f90: 8081 orl %d1,%d0 /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 50f92: 2200 movel %d0,%d1 50f94: eb89 lsll #5,%d1 i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 50f96: 3540 001e movew %d0,%a2@(30) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 50f9a: 49f1 18ff lea %a1@(ffffffff,%d1:l),%a4 50f9e: 2209 movel %a1,%d1 50fa0: 200c movel %a4,%d0 50fa2: 4c41 0800 remsl %d1,%d0,%d0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50fa6: 4286 clrl %d6 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 50fa8: 2840 moveal %d0,%a4 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 50faa: 220c movel %a4,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50fac: 1c2e ff97 moveb %fp@(-105),%d6 vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 50fb0: 2540 0020 movel %d0,%a2@(32) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 50fb4: 4280 clrl %d0 50fb6: 102a 0002 moveb %a2@(2),%d0 50fba: e1a9 lsll %d0,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50fbc: 4280 clrl %d0 50fbe: 102e ff96 moveb %fp@(-106),%d0 50fc2: e188 lsll #8,%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; 50fc4: 2541 0024 movel %d1,%a2@(36) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 50fc8: 8086 orl %d6,%d0 50fca: 4a40 tstw %d0 50fcc: 6708 beqs 50fd6 <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 50fce: 0280 0000 ffff andil #65535,%d0 50fd4: 6022 bras 50ff8 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 50fd6: 4280 clrl %d0 <== NOT EXECUTED 50fd8: 4281 clrl %d1 <== NOT EXECUTED 50fda: 102e ffa0 moveb %fp@(-96),%d0 <== NOT EXECUTED 50fde: 122e ffa5 moveb %fp@(-91),%d1 <== NOT EXECUTED 50fe2: 4286 clrl %d6 <== NOT EXECUTED 50fe4: 1c2e ffa1 moveb %fp@(-95),%d6 <== NOT EXECUTED 50fe8: 4841 swap %d1 <== NOT EXECUTED 50fea: 4241 clrw %d1 <== NOT EXECUTED 50fec: e188 lsll #8,%d0 <== NOT EXECUTED 50fee: 8081 orl %d1,%d0 <== NOT EXECUTED 50ff0: 7218 moveq #24,%d1 <== NOT EXECUTED 50ff2: 8086 orl %d6,%d0 <== NOT EXECUTED 50ff4: e3af lsll %d1,%d7 <== NOT EXECUTED 50ff6: 8087 orl %d7,%d0 <== NOT EXECUTED 50ff8: 2540 0016 movel %d0,%a2@(22) vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 50ffc: 4280 clrl %d0 50ffe: 220c movel %a4,%d1 51000: 0284 0000 00ff andil #255,%d4 51006: 3008 movew %a0,%d0 51008: 41ea 0016 lea %a2@(22),%a0 5100c: 4c10 4800 mulsl %a0@,%d4 51010: d880 addl %d0,%d4 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) 51012: 4280 clrl %d0 51014: 102e ff99 moveb %fp@(-103),%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 + 51018: d284 addl %d4,%d1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 5101a: 2544 001a movel %d4,%a2@(26) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5101e: 4284 clrl %d4 51020: 182e ff9a moveb %fp@(-102),%d4 51024: 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 + 51026: 2541 002c movel %d1,%a2@(44) 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) 5102a: 8084 orl %d4,%d0 5102c: 4a40 tstw %d0 5102e: 6708 beqs 51038 <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 51030: 0280 0000 ffff andil #65535,%d0 51036: 6026 bras 5105e else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 51038: 4280 clrl %d0 <== NOT EXECUTED 5103a: 4284 clrl %d4 <== NOT EXECUTED 5103c: 102e ff9e moveb %fp@(-98),%d0 <== NOT EXECUTED 51040: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 51044: e188 lsll #8,%d0 <== NOT EXECUTED 51046: 4844 swap %d4 <== NOT EXECUTED 51048: 4244 clrw %d4 <== NOT EXECUTED 5104a: 1c2e ff8f moveb %fp@(-113),%d6 <== NOT EXECUTED 5104e: 8084 orl %d4,%d0 <== NOT EXECUTED 51050: 4284 clrl %d4 <== NOT EXECUTED 51052: 182e ff9f moveb %fp@(-97),%d4 <== NOT EXECUTED 51056: 8084 orl %d4,%d0 <== NOT EXECUTED 51058: 7818 moveq #24,%d4 <== NOT EXECUTED 5105a: e9ae lsll %d4,%d6 <== NOT EXECUTED 5105c: 8086 orl %d6,%d0 <== NOT EXECUTED 5105e: 2540 0028 movel %d0,%a2@(40) data_secs = vol->tot_secs - vol->data_fsec; 51062: 2c2a 0028 movel %a2@(40),%d6 51066: 9c81 subl %d1,%d6 51068: 2206 movel %d6,%d1 vol->data_cls = data_secs / vol->spc; 5106a: 0282 0000 00ff andil #255,%d2 51070: 4c42 1001 remul %d2,%d1,%d1 51074: 2541 0030 movel %d1,%a2@(48) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 51078: 0c81 0000 0ff4 cmpil #4084,%d1 5107e: 6218 bhis 51098 <== NEVER TAKEN { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 51080: 223c 0000 0fff movel #4095,%d1 vol->eoc_val = FAT_FAT12_EOC; 51086: 243c 0000 0ff8 movel #4088,%d2 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 5108c: 7001 moveq #1,%d0 vol->mask = FAT_FAT12_MASK; 5108e: 2541 000c movel %d1,%a2@(12) vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 51092: 1540 000a moveb %d0,%a2@(10) 51096: 603a bras 510d2 vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 51098: 0c81 0000 fff4 cmpil #65524,%d1 <== NOT EXECUTED 5109e: 621c bhis 510bc <== NOT EXECUTED { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 510a0: 2c3c 0000 ffff movel #65535,%d6 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 510a6: 207c 0000 fff8 moveal #65528,%a0 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 510ac: 7802 moveq #2,%d4 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 510ae: 2546 000c movel %d6,%a2@(12) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 510b2: 1544 000a moveb %d4,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 510b6: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 510ba: 601a bras 510d6 <== NOT EXECUTED } else { vol->type = FAT_FAT32; 510bc: 7004 moveq #4,%d0 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 510be: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 510c4: 1540 000a moveb %d0,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 510c8: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 510cc: 243c 0fff fff8 movel #268435448,%d2 <== NOT EXECUTED 510d2: 2542 0010 movel %d2,%a2@(16) } } if (vol->type == FAT_FAT32) 510d6: 4280 clrl %d0 510d8: 102a 000a moveb %a2@(10),%d0 510dc: 7804 moveq #4,%d4 510de: b880 cmpl %d0,%d4 510e0: 6600 01ac bnew 5128e { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 510e4: 4280 clrl %d0 <== NOT EXECUTED 510e6: 4281 clrl %d1 <== NOT EXECUTED 510e8: 102e ffa3 moveb %fp@(-93),%d0 <== NOT EXECUTED 510ec: 122e ffa2 moveb %fp@(-94),%d1 <== NOT EXECUTED 510f0: 7c18 moveq #24,%d6 <== NOT EXECUTED 510f2: 4841 swap %d1 <== NOT EXECUTED 510f4: 4241 clrw %d1 <== NOT EXECUTED 510f6: e188 lsll #8,%d0 <== NOT EXECUTED 510f8: edad lsll %d6,%d5 <== NOT EXECUTED 510fa: 8081 orl %d1,%d0 <== NOT EXECUTED 510fc: 4281 clrl %d1 <== NOT EXECUTED 510fe: 122e ffa4 moveb %fp@(-92),%d1 <== NOT EXECUTED 51102: 8081 orl %d1,%d0 <== NOT EXECUTED 51104: 8085 orl %d5,%d0 <== NOT EXECUTED 51106: 2540 0034 movel %d0,%a2@(52) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5110a: 7080 moveq #-128,%d0 <== NOT EXECUTED 5110c: c083 andl %d3,%d0 <== NOT EXECUTED 5110e: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED if (vol->mirror) 51112: 670a beqs 5111e <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 51114: 700f moveq #15,%d0 <== NOT EXECUTED 51116: c680 andl %d0,%d3 <== NOT EXECUTED 51118: 1543 0048 moveb %d3,%a2@(72) <== NOT EXECUTED 5111c: 6006 bras 51124 <== NOT EXECUTED else vol->afat = 0; 5111e: 4201 clrb %d1 <== NOT EXECUTED 51120: 1541 0048 moveb %d1,%a2@(72) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 51124: 4280 clrl %d0 <== NOT EXECUTED 51126: 102e ffa6 moveb %fp@(-90),%d0 <== NOT EXECUTED 5112a: 4281 clrl %d1 <== NOT EXECUTED 5112c: 122e ffa7 moveb %fp@(-89),%d1 <== NOT EXECUTED 51130: e188 lsll #8,%d0 <== NOT EXECUTED 51132: 8081 orl %d1,%d0 <== NOT EXECUTED 51134: 3540 0038 movew %d0,%a2@(56) <== NOT EXECUTED if( vol->info_sec == 0 ) 51138: 661a bnes 51154 <== NOT EXECUTED { rtems_disk_release(vol->dd); 5113a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5113e: 7e16 moveq #22,%d7 <== NOT EXECUTED vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); 51140: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 51146: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 5114c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5114e: 2087 movel %d7,%a0@ <== NOT EXECUTED 51150: 6000 01e2 braw 51334 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 51154: 49ee fff0 lea %fp@(-16),%a4 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 51158: 4bf9 0005 07c2 lea 507c2 <_fat_block_read>,%a5 <== NOT EXECUTED 5115e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51160: 4878 0004 pea 4 <== NOT EXECUTED 51164: 42a7 clrl %sp@- <== NOT EXECUTED 51166: 3f00 movew %d0,%sp@- <== NOT EXECUTED 51168: 4267 clrw %sp@- <== NOT EXECUTED 5116a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5116c: 4e95 jsr %a5@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 5116e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51172: 4a80 tstl %d0 <== NOT EXECUTED 51174: 6c0e bges 51184 <== NOT EXECUTED { rtems_disk_release(vol->dd); 51176: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 5117a: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED 51180: 6000 01b2 braw 51334 <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 51184: 4280 clrl %d0 <== NOT EXECUTED 51186: 4281 clrl %d1 <== NOT EXECUTED 51188: 102c 0001 moveb %a4@(1),%d0 <== NOT EXECUTED 5118c: 122c 0002 moveb %a4@(2),%d1 <== NOT EXECUTED 51190: 7418 moveq #24,%d2 <== NOT EXECUTED 51192: 4841 swap %d1 <== NOT EXECUTED 51194: 4241 clrw %d1 <== NOT EXECUTED 51196: e188 lsll #8,%d0 <== NOT EXECUTED 51198: 8081 orl %d1,%d0 <== NOT EXECUTED 5119a: 4281 clrl %d1 <== NOT EXECUTED 5119c: 1214 moveb %a4@,%d1 <== NOT EXECUTED 5119e: 8081 orl %d1,%d0 <== NOT EXECUTED 511a0: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED 511a4: e5a9 lsll %d2,%d1 <== NOT EXECUTED 511a6: 8081 orl %d1,%d0 <== NOT EXECUTED 511a8: 0c80 4161 5252 cmpil #1096897106,%d0 <== NOT EXECUTED 511ae: 6724 beqs 511d4 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 511b0: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 511b4: 7c16 moveq #22,%d6 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 511b6: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 511bc: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 511c0: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 511c6: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 511cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 511ce: 2086 movel %d6,%a0@ <== NOT EXECUTED 511d0: 6000 01de braw 513b0 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 511d4: 2f0c movel %a4,%sp@- <== NOT EXECUTED 511d6: 4878 000c pea c <== NOT EXECUTED 511da: 4280 clrl %d0 <== NOT EXECUTED 511dc: 4878 01e4 pea 1e4 <== NOT EXECUTED 511e0: 302a 0038 movew %a2@(56),%d0 <== NOT EXECUTED 511e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 511e6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 511e8: 4e95 jsr %a5@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 511ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 511ee: 4a80 tstl %d0 <== NOT EXECUTED 511f0: 6c18 bges 5120a <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 511f2: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 511f6: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 511fc: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 51200: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED 51206: 6000 01a8 braw 513b0 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 5120a: 4280 clrl %d0 <== NOT EXECUTED 5120c: 4281 clrl %d1 <== NOT EXECUTED 5120e: 102c 0005 moveb %a4@(5),%d0 <== NOT EXECUTED 51212: 122c 0006 moveb %a4@(6),%d1 <== NOT EXECUTED 51216: 7418 moveq #24,%d2 <== NOT EXECUTED 51218: 4841 swap %d1 <== NOT EXECUTED 5121a: 4241 clrw %d1 <== NOT EXECUTED 5121c: e188 lsll #8,%d0 <== NOT EXECUTED 5121e: 8081 orl %d1,%d0 <== NOT EXECUTED 51220: 4281 clrl %d1 <== NOT EXECUTED 51222: 122c 0004 moveb %a4@(4),%d1 <== NOT EXECUTED 51226: 8081 orl %d1,%d0 <== NOT EXECUTED 51228: 122c 0007 moveb %a4@(7),%d1 <== NOT EXECUTED 5122c: e5a9 lsll %d2,%d1 <== NOT EXECUTED 5122e: 8081 orl %d1,%d0 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 51230: 4281 clrl %d1 <== NOT EXECUTED 51232: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 51236: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5123a: 4280 clrl %d0 <== NOT EXECUTED 5123c: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 51240: 4841 swap %d1 <== NOT EXECUTED 51242: 4241 clrw %d1 <== NOT EXECUTED 51244: e188 lsll #8,%d0 <== NOT EXECUTED 51246: 8081 orl %d1,%d0 <== NOT EXECUTED 51248: 4281 clrl %d1 <== NOT EXECUTED 5124a: 122c 0008 moveb %a4@(8),%d1 <== NOT EXECUTED 5124e: 8081 orl %d1,%d0 <== NOT EXECUTED 51250: 122c 000b moveb %a4@(11),%d1 <== NOT EXECUTED 51254: e5a9 lsll %d2,%d1 <== NOT EXECUTED 51256: 8081 orl %d1,%d0 <== NOT EXECUTED 51258: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 5125c: 4878 ffff pea ffffffff <== NOT EXECUTED 51260: 4878 ffff pea ffffffff <== NOT EXECUTED 51264: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51266: 4eb9 0005 0b26 jsr 50b26 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 5126c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 51270: 2400 movel %d0,%d2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 51272: 6732 beqs 512a6 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 51274: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 51278: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 5127e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 51282: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED return rc; 51288: 508f addql #8,%sp <== NOT EXECUTED 5128a: 6000 01a2 braw 5142e <== NOT EXECUTED else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 5128e: 7cff moveq #-1,%d6 } } else { vol->rdir_cl = 0; vol->mirror = 0; 51290: 4204 clrb %d4 } } } else { vol->rdir_cl = 0; 51292: 42aa 0034 clrl %a2@(52) vol->mirror = 0; 51296: 1544 0042 moveb %d4,%a2@(66) vol->afat = 0; 5129a: 1544 0048 moveb %d4,%a2@(72) vol->free_cls = 0xFFFFFFFF; 5129e: 2546 003a movel %d6,%a2@(58) vol->next_cl = 0xFFFFFFFF; 512a2: 2546 003e movel %d6,%a2@(62) int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 512a6: 2f2b 0034 movel %a3@(52),%sp@- _fat_block_release(mt_entry); 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)); 512aa: 47f9 0004 4e3c lea 44e3c ,%a3 int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 512b0: 4eb9 0005 0690 jsr 50690 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 512b6: 4280 clrl %d0 512b8: 102a 0048 moveb %a2@(72),%d0 512bc: 41ea 0016 lea %a2@(22),%a0 512c0: 4c10 0800 mulsl %a0@,%d0 512c4: 4281 clrl %d1 512c6: 322a 0014 movew %a2@(20),%d1 512ca: d081 addl %d1,%d0 512cc: 2540 0044 movel %d0,%a2@(68) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 512d0: 4878 000c pea c 512d4: 4878 0002 pea 2 512d8: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 512da: 4fef 000c lea %sp@(12),%sp _fat_block_release(mt_entry); 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)); 512de: 2040 moveal %d0,%a0 512e0: 2540 005a movel %d0,%a2@(90) if ( fs_info->vhash == NULL ) 512e4: 6738 beqs 5131e <== 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 ); 512e6: 2240 moveal %d0,%a1 512e8: 5889 addql #4,%a1 512ea: 2089 movel %a1,%a0@ 512ec: 43e8 0010 lea %a0@(16),%a1 512f0: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 512f4: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 512f8: 42a8 0004 clrl %a0@(4) tail->previous = head; 512fc: 2140 0008 movel %d0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 51300: 42a8 0010 clrl %a0@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 51304: 2149 0014 movel %a1,%a0@(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)); 51308: 4878 000c pea c 5130c: 4878 0002 pea 2 51310: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 51312: 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)); 51314: 2040 moveal %d0,%a0 51316: 2540 005e movel %d0,%a2@(94) if ( fs_info->rhash == NULL ) 5131a: 661e bnes 5133a <== ALWAYS TAKEN 5131c: 6072 bras 51390 <== 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 ) { rtems_disk_release(vol->dd); 5131e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 51322: 7a0c moveq #12,%d5 <== 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 ) { rtems_disk_release(vol->dd); 51324: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5132a: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 51330: 2040 moveal %d0,%a0 <== NOT EXECUTED 51332: 2085 movel %d5,%a0@ <== NOT EXECUTED 51334: 588f addql #4,%sp <== NOT EXECUTED 51336: 6000 00f0 braw 51428 <== NOT EXECUTED Chain_Node *tail = _Chain_Tail( the_chain ); 5133a: 2240 moveal %d0,%a1 5133c: 5889 addql #4,%a1 } 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; 5133e: 4281 clrl %d1 51340: 2089 movel %a1,%a0@ 51342: 43e8 0010 lea %a0@(16),%a1 51346: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5134a: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 5134e: 2140 0008 movel %d0,%a0@(8) 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; 51352: 203c 0000 0100 movel #256,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 51358: 42a8 0004 clrl %a0@(4) 5135c: 42a8 0010 clrl %a0@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 51360: 2149 0014 movel %a1,%a0@(20) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 51364: 122a 0003 moveb %a2@(3),%d1 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; 51368: 2540 006a movel %d0,%a2@(106) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 5136c: 202a 0028 movel %a2@(40),%d0 51370: e3a8 lsll %d1,%d0 fs_info->index = 0; 51372: 42aa 0066 clrl %a2@(102) } 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; 51376: e988 lsll #4,%d0 51378: 2540 006e movel %d0,%a2@(110) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 5137c: 4878 0001 pea 1 51380: 4878 0100 pea 100 51384: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 51386: 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)); 51388: 2540 0062 movel %d0,%a2@(98) if ( fs_info->uino == NULL ) 5138c: 6654 bnes 513e2 <== ALWAYS TAKEN 5138e: 6024 bras 513b4 <== 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 ) { rtems_disk_release(vol->dd); 51390: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 51394: 780c moveq #12,%d4 <== 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 ) { rtems_disk_release(vol->dd); 51396: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 5139c: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 513a0: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 513a6: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 513ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 513ae: 2084 movel %d4,%a0@ <== NOT EXECUTED 513b0: 508f addql #8,%sp <== NOT EXECUTED 513b2: 6074 bras 51428 <== 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 ) { rtems_disk_release(vol->dd); 513b4: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 513b8: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 513be: 760c moveq #12,%d3 <== 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 ) { rtems_disk_release(vol->dd); 513c0: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 513c6: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 513ca: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 513cc: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 513d0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 513d2: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 513d8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 513dc: 2240 moveal %d0,%a1 <== NOT EXECUTED 513de: 2283 movel %d3,%a1@ <== NOT EXECUTED 513e0: 6046 bras 51428 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 513e2: 4878 0001 pea 1 513e6: 4280 clrl %d0 513e8: 3012 movew %a2@,%d0 513ea: 2f00 movel %d0,%sp@- 513ec: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 513ee: 508f addql #8,%sp rtems_disk_release(vol->dd); 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)); 513f0: 2540 007c movel %d0,%a2@(124) if (fs_info->sec_buf == NULL) 513f4: 6636 bnes 5142c <== ALWAYS TAKEN { rtems_disk_release(vol->dd); 513f6: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 513fa: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 51400: 740c moveq #12,%d2 <== 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) { rtems_disk_release(vol->dd); 51402: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 51408: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 5140c: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 5140e: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 51412: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 51414: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 51418: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5141a: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 51420: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 51424: 2040 moveal %d0,%a0 <== NOT EXECUTED 51426: 2082 movel %d2,%a0@ <== NOT EXECUTED 51428: 74ff moveq #-1,%d2 <== NOT EXECUTED 5142a: 6002 bras 5142e <== NOT EXECUTED } return RC_OK; 5142c: 4282 clrl %d2 } 5142e: 2002 movel %d2,%d0 51430: 4cee 3cfc ff64 moveml %fp@(-156),%d2-%d7/%a2-%a5 51436: 4e5e unlk %fp ... =============================================================================== 00056c38 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 56c38: 4e56 ffd4 linkw %fp,#-44 56c3c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 56c40: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 56c44: 246b 0034 moveal %a3@(52),%a2 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 56c48: 286e 0014 moveal %fp@(20),%a4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 56c4c: 2e2a 0030 movel %a2@(48),%d7 56c50: 5487 addql #2,%d7 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 56c52: 2a6e 000c moveal %fp@(12),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; 56c56: 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; *cls_added = 0; 56c5a: 4294 clrl %a4@ if (count == 0) 56c5c: 4aae 0010 tstl %fp@(16) 56c60: 6700 0138 beqw 56d9a return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 56c64: 242a 003e movel %a2@(62),%d2 56c68: 70ff moveq #-1,%d0 56c6a: b082 cmpl %d2,%d0 56c6c: 6602 bnes 56c70 uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; 56c6e: 7402 moveq #2,%d2 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 56c70: 7c02 moveq #2,%d6 56c72: 4284 clrl %d4 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 56c74: 2a3c 0005 6930 movel #354608,%d5 56c7a: 6000 00f4 braw 56d70 * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 56c7e: 486e fffc pea %fp@(-4) 56c82: 2f02 movel %d2,%sp@- 56c84: 2f0b movel %a3,%sp@- 56c86: 4eb9 0005 67b8 jsr 567b8 if ( rc != RC_OK ) 56c8c: 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(mt_entry, cl4find, &next_cln); 56c90: 2600 movel %d0,%d3 if ( rc != RC_OK ) 56c92: 6716 beqs 56caa <== ALWAYS TAKEN { if (*cls_added != 0) 56c94: 4a94 tstl %a4@ <== NOT EXECUTED 56c96: 6700 0108 beqw 56da0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 56c9a: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 56c9c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56c9e: 4eb9 0005 6b8e jsr 56b8e <== NOT EXECUTED 56ca4: 508f addql #8,%sp <== NOT EXECUTED 56ca6: 6000 00f8 braw 56da0 <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 56caa: 4aae fffc tstl %fp@(-4) 56cae: 6600 00b6 bnew 56d66 /* * 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) 56cb2: 4a94 tstl %a4@ 56cb4: 661a bnes 56cd0 <== NEVER TAKEN { *chain = cl4find; 56cb6: 2a82 movel %d2,%a5@ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 56cb8: 4878 ffff pea ffffffff 56cbc: 2045 moveal %d5,%a0 56cbe: 2f02 movel %d2,%sp@- 56cc0: 2f0b movel %a3,%sp@- 56cc2: 4e90 jsr %a0@ if ( rc != RC_OK ) 56cc4: 4fef 000c lea %sp@(12),%sp 56cc8: 4a80 tstl %d0 56cca: 6766 beqs 56d32 <== ALWAYS TAKEN 56ccc: 6000 00d0 braw 56d9e <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 56cd0: 4878 ffff pea ffffffff <== NOT EXECUTED 56cd4: 2045 moveal %d5,%a0 <== NOT EXECUTED 56cd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 56cd8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56cda: 4e90 jsr %a0@ <== NOT EXECUTED if ( rc != RC_OK ) 56cdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 56ce0: 4a80 tstl %d0 <== NOT EXECUTED 56ce2: 6714 beqs 56cf8 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 56ce4: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 56ce6: 2e00 movel %d0,%d7 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 56ce8: 2607 movel %d7,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 56cea: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56cec: 4eb9 0005 6b8e jsr 56b8e <== NOT EXECUTED return rc; 56cf2: 508f addql #8,%sp <== NOT EXECUTED 56cf4: 6000 00aa braw 56da0 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 56cf8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 56cfa: 2045 moveal %d5,%a0 <== NOT EXECUTED 56cfc: 2f04 movel %d4,%sp@- <== NOT EXECUTED 56cfe: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56d00: 4e90 jsr %a0@ <== NOT EXECUTED if ( rc != RC_OK ) 56d02: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 56d06: 4a80 tstl %d0 <== NOT EXECUTED 56d08: 6728 beqs 56d32 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 56d0a: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 56d0c: 2800 movel %d0,%d4 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 56d0e: 2604 movel %d4,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 56d10: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56d12: 4eb9 0005 6b8e jsr 56b8e <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 56d18: 42a7 clrl %sp@- <== NOT EXECUTED 56d1a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 56d1c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 56d1e: 4eb9 0005 6930 jsr 56930 <== NOT EXECUTED fat_buf_release(fs_info); 56d24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 56d26: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED return rc; 56d2c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 56d30: 606e bras 56da0 <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 56d32: 2014 movel %a4@,%d0 56d34: 5280 addql #1,%d0 56d36: 2880 movel %d0,%a4@ /* have we satisfied request ? */ if (*cls_added == count) 56d38: b0ae 0010 cmpl %fp@(16),%d0 56d3c: 6626 bnes 56d64 <== NEVER TAKEN { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 56d3e: 202a 003a movel %a2@(58),%d0 56d42: 72ff moveq #-1,%d1 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 56d44: 2542 003e movel %d2,%a2@(62) if (fs_info->vol.free_cls != 0xFFFFFFFF) 56d48: b280 cmpl %d0,%d1 56d4a: 6706 beqs 56d52 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 56d4c: 9094 subl %a4@,%d0 <== NOT EXECUTED 56d4e: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED *last_cl = save_cln; 56d52: 206e 0018 moveal %fp@(24),%a0 56d56: 2082 movel %d2,%a0@ fat_buf_release(fs_info); 56d58: 2f0a movel %a2,%sp@- 56d5a: 4eb9 0005 0690 jsr 50690 return rc; 56d60: 588f addql #4,%sp 56d62: 603c bras 56da0 save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 56d64: 2802 movel %d2,%d4 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 56d66: 5286 addql #1,%d6 cl4find++; 56d68: 5282 addql #1,%d2 if (cl4find >= data_cls_val) 56d6a: be82 cmpl %d2,%d7 56d6c: 6202 bhis 56d70 <== ALWAYS TAKEN cl4find = 2; 56d6e: 7402 moveq #2,%d2 <== 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) 56d70: be86 cmpl %d6,%d7 56d72: 6200 ff0a bhiw 56c7e if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 56d76: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 56d7a: 72ff moveq #-1,%d1 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 56d7c: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 56d80: b280 cmpl %d0,%d1 <== NOT EXECUTED 56d82: 6706 beqs 56d8a <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 56d84: 9094 subl %a4@,%d0 <== NOT EXECUTED 56d86: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED *last_cl = save_cln; 56d8a: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED 56d8e: 2084 movel %d4,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 56d90: 2f0a movel %a2,%sp@- <== NOT EXECUTED 56d92: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED return RC_OK; 56d98: 588f addql #4,%sp <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; 56d9a: 4283 clrl %d3 <== NOT EXECUTED 56d9c: 6002 bras 56da0 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 56d9e: 2600 movel %d0,%d3 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 56da0: 2003 movel %d3,%d0 56da2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 56da8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00056930 : uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 56930: 7001 moveq #1,%d0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 56932: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 56936: 206e 0008 moveal %fp@(8),%a0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 5693a: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 5693e: 242e 000c movel %fp@(12),%d2 56942: 2a2e 0010 movel %fp@(16),%d5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 56946: 2468 0034 moveal %a0@(52),%a2 uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 5694a: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5694e: b082 cmpl %d2,%d0 56950: 6400 0222 bccw 56b74 56954: 202a 0030 movel %a2@(48),%d0 56958: 5280 addql #1,%d0 5695a: b082 cmpl %d2,%d0 5695c: 6500 0216 bcsw 56b74 rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 56960: 4280 clrl %d0 56962: 102a 000a moveb %a2@(10),%d0 56966: 7601 moveq #1,%d3 56968: 2202 movel %d2,%d1 5696a: c680 andl %d0,%d3 5696c: 6706 beqs 56974 <== NEVER TAKEN 5696e: e289 lsrl #1,%d1 56970: d282 addl %d2,%d1 56972: 600c bras 56980 56974: 0800 0001 btst #1,%d0 <== NOT EXECUTED 56978: 6704 beqs 5697e <== NOT EXECUTED 5697a: d281 addl %d1,%d1 <== NOT EXECUTED 5697c: 6002 bras 56980 <== NOT EXECUTED 5697e: e589 lsll #2,%d1 <== NOT EXECUTED 56980: 4284 clrl %d4 56982: 182a 0002 moveb %a2@(2),%d4 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 56986: 2e02 movel %d2,%d7 /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 56988: e8a9 lsrl %d4,%d1 5698a: 2641 moveal %d1,%a3 5698c: d7ea 0044 addal %a2@(68),%a3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 56990: 4a83 tstl %d3 56992: 6706 beqs 5699a <== NEVER TAKEN 56994: e28f lsrl #1,%d7 56996: de82 addl %d2,%d7 56998: 600c bras 569a6 5699a: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5699e: 6704 beqs 569a4 <== NOT EXECUTED 569a0: de87 addl %d7,%d7 <== NOT EXECUTED 569a2: 6002 bras 569a6 <== NOT EXECUTED 569a4: e58f lsll #2,%d7 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 569a6: 2c0e movel %fp,%d6 569a8: 5986 subql #4,%d6 569aa: 49f9 0005 04b0 lea 504b0 ,%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); 569b0: 3612 movew %a2@,%d3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 569b2: 2f06 movel %d6,%sp@- 569b4: 4878 0001 pea 1 569b8: 2f0b movel %a3,%sp@- 569ba: 2f0a movel %a2,%sp@- 569bc: 4e94 jsr %a4@ if (rc != RC_OK) 569be: 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, &block0); 569c2: 2800 movel %d0,%d4 if (rc != RC_OK) 569c4: 6600 01bc bnew 56b82 return rc; switch ( fs_info->vol.type ) 569c8: 4280 clrl %d0 569ca: 102a 000a moveb %a2@(10),%d0 569ce: 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); 569d0: 0283 0000 ffff andil #65535,%d3 569d6: 5383 subql #1,%d3 569d8: c687 andl %d7,%d3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 569da: b280 cmpl %d0,%d1 569dc: 6700 0142 beqw 56b20 569e0: 123c 0004 moveb #4,%d1 569e4: b280 cmpl %d0,%d1 569e6: 6700 015a beqw 56b42 569ea: 123c 0001 moveb #1,%d1 569ee: b280 cmpl %d0,%d1 569f0: 6600 0182 bnew 56b74 569f4: 206e fffc moveal %fp@(-4),%a0 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 569f8: 0802 0000 btst #0,%d2 569fc: 6700 0084 beqw 56a82 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 56a00: 2068 001e moveal %a0@(30),%a0 56a04: d1c3 addal %d3,%a0 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 56a06: 123c 000f moveb #15,%d1 56a0a: 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; 56a0c: e98d lsll #4,%d5 *((uint8_t *)(block0->buffer + ofs)) = 56a0e: c081 andl %d1,%d0 56a10: 1080 moveb %d0,%a0@ (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 56a12: 206e fffc moveal %fp@(-4),%a0 56a16: 2068 001e moveal %a0@(30),%a0 56a1a: d1c3 addal %d3,%a0 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 56a1c: 1010 moveb %a0@,%d0 56a1e: 8085 orl %d5,%d0 56a20: 1080 moveb %d0,%a0@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 56a22: 7001 moveq #1,%d0 56a24: 1540 0076 moveb %d0,%a2@(118) (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 56a28: 4280 clrl %d0 56a2a: 3012 movew %a2@,%d0 56a2c: 5380 subql #1,%d0 56a2e: b083 cmpl %d3,%d0 56a30: 663c bnes 56a6e <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 56a32: 2f06 movel %d6,%sp@- <== NOT EXECUTED 56a34: 4878 0001 pea 1 <== NOT EXECUTED 56a38: 486b 0001 pea %a3@(1) <== NOT EXECUTED 56a3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 56a3e: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 56a40: 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, 56a44: 2800 movel %d0,%d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 56a46: 6600 013a bnew 56b82 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 56a4a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 56a4e: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 56a52: 4210 clrb %a0@ <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 56a54: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 56a5a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); 56a5e: e08d lsrl #8,%d5 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 56a60: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 56a64: 1010 moveb %a0@,%d0 <== NOT EXECUTED 56a66: 8a80 orl %d0,%d5 <== NOT EXECUTED 56a68: 1085 moveb %d5,%a0@ <== NOT EXECUTED 56a6a: 6000 0100 braw 56b6c <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 56a6e: 206e fffc moveal %fp@(-4),%a0 56a72: 5283 addql #1,%d3 56a74: 2068 001e moveal %a0@(30),%a0 56a78: 4200 clrb %d0 56a7a: 1180 3800 moveb %d0,%a0@(00000000,%d3:l) 56a7e: 6000 0086 braw 56b06 } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 56a82: 2068 001e moveal %a0@(30),%a0 56a86: 4201 clrb %d1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 56a88: 0285 0000 0fff andil #4095,%d5 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 56a8e: 1181 3800 moveb %d1,%a0@(00000000,%d3:l) *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 56a92: 206e fffc moveal %fp@(-4),%a0 56a96: 2068 001e moveal %a0@(30),%a0 56a9a: d1c3 addal %d3,%a0 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 56a9c: 1010 moveb %a0@,%d0 56a9e: 8085 orl %d5,%d0 56aa0: 1080 moveb %d0,%a0@ 56aa2: 7001 moveq #1,%d0 56aa4: 1540 0076 moveb %d0,%a2@(118) (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 56aa8: 4280 clrl %d0 56aaa: 3012 movew %a2@,%d0 56aac: 5380 subql #1,%d0 56aae: b083 cmpl %d3,%d0 56ab0: 6640 bnes 56af2 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 56ab2: 2f06 movel %d6,%sp@- <== NOT EXECUTED 56ab4: 4878 0001 pea 1 <== NOT EXECUTED 56ab8: 486b 0001 pea %a3@(1) <== NOT EXECUTED 56abc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 56abe: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 56ac0: 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, 56ac4: 2800 movel %d0,%d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 56ac6: 6600 00ba bnew 56b82 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 56aca: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 56ace: 72f0 moveq #-16,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; 56ad0: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 56ad4: 1010 moveb %a0@,%d0 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 56ad6: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 56adc: c081 andl %d1,%d0 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 56ade: e08d lsrl #8,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 56ae0: 1080 moveb %d0,%a0@ <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 56ae2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 56ae6: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 56aea: 1010 moveb %a0@,%d0 <== NOT EXECUTED 56aec: 8a80 orl %d0,%d5 <== NOT EXECUTED 56aee: 1085 moveb %d5,%a0@ <== NOT EXECUTED 56af0: 6048 bras 56b3a <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 56af2: 206e fffc moveal %fp@(-4),%a0 56af6: 5283 addql #1,%d3 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 56af8: 72f0 moveq #-16,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 56afa: 2068 001e moveal %a0@(30),%a0 56afe: d1c3 addal %d3,%a0 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 56b00: 1010 moveb %a0@,%d0 56b02: c081 andl %d1,%d0 56b04: 1080 moveb %d0,%a0@ (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 56b06: 206e fffc moveal %fp@(-4),%a0 56b0a: 2068 001e moveal %a0@(30),%a0 56b0e: d1c3 addal %d3,%a0 (uint8_t )((fat16_clv & 0xFF00)>>8); 56b10: 0285 0000 ffff andil #65535,%d5 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 56b16: 1010 moveb %a0@,%d0 (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 56b18: e08d lsrl #8,%d5 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 56b1a: 8a80 orl %d0,%d5 56b1c: 1085 moveb %d5,%a0@ 56b1e: 6062 bras 56b82 } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 56b20: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 56b24: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 56b2a: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 56b2e: 2005 movel %d5,%d0 <== NOT EXECUTED 56b30: e08d lsrl #8,%d5 <== NOT EXECUTED 56b32: e188 lsll #8,%d0 <== NOT EXECUTED 56b34: 8085 orl %d5,%d0 <== NOT EXECUTED 56b36: 3180 3800 movew %d0,%a0@(00000000,%d3:l) <== NOT EXECUTED 56b3a: 7001 moveq #1,%d0 <== NOT EXECUTED 56b3c: 1540 0076 moveb %d0,%a2@(118) <== NOT EXECUTED 56b40: 6040 bras 56b82 <== 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)); 56b42: 49fa fc3c lea %pc@(56780 ),%a4 <== NOT EXECUTED 56b46: 0285 0fff ffff andil #268435455,%d5 <== NOT EXECUTED 56b4c: 2f05 movel %d5,%sp@- <== NOT EXECUTED 56b4e: 4e94 jsr %a4@ <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 56b50: 206e fffc moveal %fp@(-4),%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)); 56b54: 2400 movel %d0,%d2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 56b56: 2668 001e moveal %a0@(30),%a3 <== NOT EXECUTED 56b5a: d7c3 addal %d3,%a3 <== NOT EXECUTED 56b5c: 2ebc f000 0000 movel #-268435456,%sp@ <== NOT EXECUTED 56b62: 4e94 jsr %a4@ <== NOT EXECUTED 56b64: 588f addql #4,%sp <== NOT EXECUTED 56b66: c093 andl %a3@,%d0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 56b68: 8082 orl %d2,%d0 <== NOT EXECUTED 56b6a: 2680 movel %d0,%a3@ <== NOT EXECUTED 56b6c: 7201 moveq #1,%d1 <== NOT EXECUTED 56b6e: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED 56b72: 600e bras 56b82 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 56b74: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 56b7a: 78ff moveq #-1,%d4 <== NOT EXECUTED 56b7c: 7205 moveq #5,%d1 <== NOT EXECUTED 56b7e: 2040 moveal %d0,%a0 <== NOT EXECUTED 56b80: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return RC_OK; } 56b82: 2004 movel %d4,%d0 56b84: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 56b8a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050ba4 : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 50ba4: 4280 clrl %d0 <== NOT EXECUTED * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 50ba6: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 50baa: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 50bae: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 50bb2: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 50bb6: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 50bba: 44c0 movew %d0,%ccr <== NOT EXECUTED 50bbc: 661c bnes 50bda <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 50bbe: 2f2a 003e movel %a2@(62),%sp@- <== NOT EXECUTED 50bc2: 2f2a 003a movel %a2@(58),%sp@- <== NOT EXECUTED 50bc6: 2f08 movel %a0,%sp@- <== NOT EXECUTED 50bc8: 4eb9 0005 0b26 jsr 50b26 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 50bce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 50bd2: 2400 movel %d0,%d2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 50bd4: 6706 beqs 50bdc <== NOT EXECUTED rc = -1; 50bd6: 74ff moveq #-1,%d2 <== NOT EXECUTED 50bd8: 6002 bras 50bdc <== NOT EXECUTED * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { int rc = RC_OK; 50bda: 4282 clrl %d2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 50bdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50bde: 4eb9 0005 0690 jsr 50690 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 50be4: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 50be8: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 50bec: 4eb9 0004 f356 jsr 4f356 <== NOT EXECUTED 50bf2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 50bf6: 4a80 tstl %d0 <== NOT EXECUTED 50bf8: 6702 beqs 50bfc <== NOT EXECUTED rc = -1; 50bfa: 74ff moveq #-1,%d2 <== NOT EXECUTED 50bfc: 4283 clrl %d3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 50bfe: 49f9 0004 9a0c lea 49a0c <_Chain_Get>,%a4 <== NOT EXECUTED { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); 50c04: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 50c0a: 282a 005a movel %a2@(90),%d4 <== NOT EXECUTED 50c0e: d883 addl %d3,%d4 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 50c10: 6006 bras 50c18 <== NOT EXECUTED free(node); 50c12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50c14: 4e93 jsr %a3@ <== NOT EXECUTED 50c16: 588f addql #4,%sp <== NOT EXECUTED 50c18: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50c1a: 4e94 jsr %a4@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 50c1c: 588f addql #4,%sp <== NOT EXECUTED 50c1e: 4a80 tstl %d0 <== NOT EXECUTED 50c20: 66f0 bnes 50c12 <== NOT EXECUTED 50c22: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 50c28: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 50c2c: b083 cmpl %d3,%d0 <== NOT EXECUTED 50c2e: 66da bnes 50c0a <== NOT EXECUTED 50c30: 4283 clrl %d3 <== NOT EXECUTED 50c32: 49f9 0004 9a0c lea 49a0c <_Chain_Get>,%a4 <== NOT EXECUTED { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); 50c38: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 50c3e: 282a 005e movel %a2@(94),%d4 <== NOT EXECUTED 50c42: d883 addl %d3,%d4 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 50c44: 6006 bras 50c4c <== NOT EXECUTED free(node); 50c46: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50c48: 4e93 jsr %a3@ <== NOT EXECUTED 50c4a: 588f addql #4,%sp <== NOT EXECUTED 50c4c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50c4e: 4e94 jsr %a4@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 50c50: 588f addql #4,%sp <== NOT EXECUTED 50c52: 4a80 tstl %d0 <== NOT EXECUTED 50c54: 66f0 bnes 50c46 <== NOT EXECUTED 50c56: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 50c5c: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 50c60: b083 cmpl %d3,%d0 <== NOT EXECUTED 50c62: 66da bnes 50c3e <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 50c64: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 50c68: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED 50c6e: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 50c70: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 50c74: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 50c76: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 50c7a: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->sec_buf); 50c7c: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 50c80: 4e93 jsr %a3@ <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 50c82: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50c86: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED if (rc) 50c8c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50c90: 4a82 tstl %d2 <== NOT EXECUTED 50c92: 670c beqs 50ca0 <== NOT EXECUTED errno = EIO; 50c94: 4eb9 0005 7e64 jsr 57e64 <__errno> <== NOT EXECUTED 50c9a: 7205 moveq #5,%d1 <== NOT EXECUTED 50c9c: 2040 moveal %d0,%a0 <== NOT EXECUTED 50c9e: 2081 movel %d1,%a0@ <== NOT EXECUTED return rc; } 50ca0: 2002 movel %d2,%d0 <== NOT EXECUTED 50ca2: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 50ca8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005af54 : int fcntl( int fd, int cmd, ... ) { 5af54: 4e56 fff0 linkw %fp,#-16 5af58: 202e 0008 movel %fp@(8),%d0 5af5c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 5af60: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 5af64: 2239 0005 d9b2 movel 5d9b2 ,%d1 5af6a: b280 cmpl %d0,%d1 5af6c: 631c blss 5af8a iop = rtems_libio_iop( fd ); 5af6e: 2400 movel %d0,%d2 5af70: ed88 lsll #6,%d0 5af72: e78a lsll #3,%d2 5af74: 2679 0005 f118 moveal 5f118 ,%a3 5af7a: 9082 subl %d2,%d0 5af7c: 45f3 0800 lea %a3@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 5af80: 202a 0014 movel %a2@(20),%d0 5af84: 0800 0008 btst #8,%d0 5af88: 6610 bnes 5af9a 5af8a: 4eb9 0004 cc98 jsr 4cc98 <__errno> 5af90: 7209 moveq #9,%d1 5af92: 2040 moveal %d0,%a0 5af94: 2081 movel %d1,%a0@ 5af96: 6000 0116 braw 5b0ae /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5af9a: 7409 moveq #9,%d2 5af9c: b483 cmpl %d3,%d2 5af9e: 6500 00de bcsw 5b07e 5afa2: 307b 3a06 moveaw %pc@(5afaa ,%d3:l:2),%a0 5afa6: 4efb 8802 jmp %pc@(5afaa ,%a0:l) 5afaa: 0014 .short 0x0014 <== NOT EXECUTED 5afac: 006e .short 0x006e <== NOT EXECUTED 5afae: 007a .short 0x007a <== NOT EXECUTED 5afb0: 0090 009e 00c4 oril #10354884,%d0 <== NOT EXECUTED 5afb6: 00c4 bitrev %d4 <== NOT EXECUTED 5afb8: 00c4 bitrev %d4 <== NOT EXECUTED 5afba: 00c4 bitrev %d4 <== NOT EXECUTED 5afbc: 00c4 bitrev %d4 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 5afbe: 242e 0010 movel %fp@(16),%d2 if ( fd2 ) 5afc2: 6710 beqs 5afd4 diop = rtems_libio_iop( fd2 ); 5afc4: b282 cmpl %d2,%d1 5afc6: 631c blss 5afe4 <== NEVER TAKEN 5afc8: 2002 movel %d2,%d0 5afca: ed8a lsll #6,%d2 5afcc: e788 lsll #3,%d0 5afce: 9480 subl %d0,%d2 5afd0: d7c2 addal %d2,%a3 5afd2: 6012 bras 5afe6 else { /* allocate a file control block */ diop = rtems_libio_allocate(); 5afd4: 4eb9 0004 358c jsr 4358c 5afda: 2640 moveal %d0,%a3 if ( diop == 0 ) { 5afdc: 4a80 tstl %d0 5afde: 6606 bnes 5afe6 <== ALWAYS TAKEN 5afe0: 6000 00cc braw 5b0ae <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 5afe4: 97cb subal %a3,%a3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5afe6: 240b movel %a3,%d2 ret = -1; break; } } diop->flags = iop->flags; 5afe8: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 5afee: 4878 0014 pea 14 5aff2: 486a 0018 pea %a2@(24) 5aff6: 486b 0018 pea %a3@(24) 5affa: 4eb9 0004 d988 jsr 4d988 ret = (int) (diop - rtems_libio_iops); 5b000: 4fef 000c lea %sp@(12),%sp 5b004: 94b9 0005 f118 subl 5f118 ,%d2 5b00a: 203c b6db 6db7 movel #-1227133513,%d0 5b010: e682 asrl #3,%d2 5b012: 4c00 2800 mulsl %d0,%d2 5b016: 6074 bras 5b08c break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 5b018: 0800 000b btst #11,%d0 5b01c: 56c2 sne %d2 5b01e: 49c2 extbl %d2 5b020: 4482 negl %d2 5b022: 606c bras 5b090 * 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 ) ) 5b024: 4aae 0010 tstl %fp@(16) 5b028: 6706 beqs 5b030 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 5b02a: 08c0 000b bset #11,%d0 5b02e: 6004 bras 5b034 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 5b030: 0880 000b bclr #11,%d0 5b034: 2540 0014 movel %d0,%a2@(20) 5b038: 6030 bras 5b06a break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 5b03a: 2f00 movel %d0,%sp@- 5b03c: 4eb9 0004 353e jsr 4353e 5b042: 588f addql #4,%sp 5b044: 2400 movel %d0,%d2 5b046: 6044 bras 5b08c break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5b048: 2f2e 0010 movel %fp@(16),%sp@- 5b04c: 4eb9 0004 34fe jsr 434fe /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 5b052: 222a 0014 movel %a2@(20),%d1 5b056: 588f addql #4,%sp 5b058: 0280 0000 0201 andil #513,%d0 5b05e: 0281 ffff fdfe andil #-514,%d1 5b064: 8081 orl %d1,%d0 5b066: 2540 0014 movel %d0,%a2@(20) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5b06a: 4282 clrl %d2 5b06c: 6022 bras 5b090 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5b06e: 4eb9 0004 cc98 jsr 4cc98 <__errno> 5b074: 2040 moveal %d0,%a0 5b076: 20bc 0000 0086 movel #134,%a0@ 5b07c: 6030 bras 5b0ae ret = -1; break; default: errno = EINVAL; 5b07e: 4eb9 0004 cc98 jsr 4cc98 <__errno> 5b084: 2040 moveal %d0,%a0 5b086: 7016 moveq #22,%d0 5b088: 2080 movel %d0,%a0@ 5b08a: 6022 bras 5b0ae /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5b08c: 4a82 tstl %d2 5b08e: 6d20 blts 5b0b0 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 5b090: 206a 0020 moveal %a2@(32),%a0 5b094: 2f0a movel %a2,%sp@- 5b096: 2f03 movel %d3,%sp@- 5b098: 2068 0030 moveal %a0@(48),%a0 5b09c: 4e90 jsr %a0@ if (err) { 5b09e: 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)( cmd, iop ); 5b0a0: 2600 movel %d0,%d3 if (err) { 5b0a2: 670c beqs 5b0b0 <== ALWAYS TAKEN errno = err; 5b0a4: 4eb9 0004 cc98 jsr 4cc98 <__errno> <== NOT EXECUTED 5b0aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b0ac: 2083 movel %d3,%a0@ <== NOT EXECUTED ret = -1; 5b0ae: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5b0b0: 2002 movel %d2,%d0 5b0b2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 5b0b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b51a : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b51a: 4e56 ffdc linkw %fp,#-36 4b51e: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b522: 266e 0008 moveal %fp@(8),%a3 4b526: 286e 000c moveal %fp@(12),%a4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4b52a: 4ab9 0005 f03c tstl 5f03c 4b530: 6656 bnes 4b588 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4b532: 42a7 clrl %sp@- 4b534: 42a7 clrl %sp@- 4b536: 2f39 0005 f734 movel 5f734 ,%sp@- 4b53c: 4eb9 0004 7550 jsr 47550 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4b542: 4fef 000c lea %sp@(12),%sp 4b546: 4ab9 0005 f03c tstl 5f03c 4b54c: 6624 bnes 4b572 <== NEVER TAKEN sc = rtems_semaphore_create( 4b54e: 4879 0005 f03c pea 5f03c 4b554: 42a7 clrl %sp@- 4b556: 4878 0054 pea 54 4b55a: 4878 0001 pea 1 4b55e: 2f3c 5049 5045 movel #1346981957,%sp@- 4b564: 4eb9 0004 7314 jsr 47314 4b56a: 4fef 0014 lea %sp@(20),%sp 4b56e: 2400 movel %d0,%d2 4b570: 6002 bras 4b574 free(pipe); } static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 4b572: 4282 clrl %d2 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4b574: 2f39 0005 f734 movel 5f734 ,%sp@- 4b57a: 4eb9 0004 765c jsr 4765c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4b580: 588f addql #4,%sp 4b582: 4a82 tstl %d2 4b584: 6600 0310 bnew 4b896 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4b588: 42a7 clrl %sp@- 4b58a: 42a7 clrl %sp@- 4b58c: 2f39 0005 f03c movel 5f03c ,%sp@- 4b592: 4eb9 0004 7550 jsr 47550 } if (sc == RTEMS_SUCCESSFUL) { 4b598: 4fef 000c lea %sp@(12),%sp 4b59c: 4a80 tstl %d0 4b59e: 6600 02f6 bnew 4b896 err = pipe_lock(); if (err) return err; pipe = *pipep; 4b5a2: 2453 moveal %a3@,%a2 if (pipe == NULL) { 4b5a4: 4a8a tstl %a2 4b5a6: 6600 010a bnew 4b6b2 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b5aa: 4878 0034 pea 34 4b5ae: 4bf9 0004 48c4 lea 448c4 ,%a5 4b5b4: 4e95 jsr %a5@ if (pipe == NULL) 4b5b6: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b5b8: 2440 moveal %d0,%a2 if (pipe == NULL) 4b5ba: 4a80 tstl %d0 4b5bc: 6700 00f0 beqw 4b6ae return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b5c0: 4878 0034 pea 34 4b5c4: 42a7 clrl %sp@- 4b5c6: 2f00 movel %d0,%sp@- 4b5c8: 4eb9 0004 e828 jsr 4e828 pipe->Size = PIPE_BUF; 4b5ce: 203c 0000 0200 movel #512,%d0 4b5d4: 2540 0004 movel %d0,%a2@(4) pipe->Buffer = malloc(pipe->Size); 4b5d8: 4878 0200 pea 200 4b5dc: 4e95 jsr %a5@ if (! pipe->Buffer) 4b5de: 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); 4b5e2: 2480 movel %d0,%a2@ if (! pipe->Buffer) 4b5e4: 6700 00be beqw 4b6a4 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b5e8: 486a 002c pea %a2@(44) 4b5ec: 4bf9 0004 c530 lea 4c530 ,%a5 rtems_build_name ('P', 'I', 'r', c), 4b5f2: 1039 0005 e178 moveb 5e178 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b5f8: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4b5fa: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b5fc: 42a7 clrl %sp@- 4b5fe: 0080 5049 7200 oril #1346990592,%d0 4b604: 2f00 movel %d0,%sp@- 4b606: 4e95 jsr %a5@ 4b608: 4fef 0010 lea %sp@(16),%sp 4b60c: 4a80 tstl %d0 4b60e: 6600 008a bnew 4b69a rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4b612: 486a 0030 pea %a2@(48) rtems_build_name ('P', 'I', 'w', c), 4b616: 1039 0005 e178 moveb 5e178 ,%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( 4b61c: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4b61e: 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( 4b620: 42a7 clrl %sp@- 4b622: 0080 5049 7700 oril #1346991872,%d0 4b628: 2f00 movel %d0,%sp@- 4b62a: 4e95 jsr %a5@ 4b62c: 4fef 0010 lea %sp@(16),%sp 4b630: 4a80 tstl %d0 4b632: 665a bnes 4b68e rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4b634: 486a 0028 pea %a2@(40) rtems_build_name ('P', 'I', 's', c), 1, 4b638: 1039 0005 e178 moveb 5e178 ,%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( 4b63e: 42a7 clrl %sp@- 4b640: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4b644: 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( 4b646: 4878 0001 pea 1 4b64a: 0080 5049 7300 oril #1346990848,%d0 4b650: 2f00 movel %d0,%sp@- 4b652: 4eb9 0004 7314 jsr 47314 4b658: 4fef 0014 lea %sp@(20),%sp 4b65c: 4a80 tstl %d0 4b65e: 6622 bnes 4b682 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b660: 1039 0005 e178 moveb 5e178 ,%d0 4b666: 49c0 extbl %d0 4b668: 2200 movel %d0,%d1 4b66a: 5281 addql #1,%d1 4b66c: 13c1 0005 e178 moveb %d1,5e178 4b672: 727a moveq #122,%d1 4b674: b280 cmpl %d0,%d1 4b676: 663a bnes 4b6b2 c = 'a'; 4b678: 7061 moveq #97,%d0 4b67a: 13c0 0005 e178 moveb %d0,5e178 4b680: 6030 bras 4b6b2 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b682: 2f2a 0030 movel %a2@(48),%sp@- 4b686: 4eb9 0004 c5ec jsr 4c5ec 4b68c: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b68e: 2f2a 002c movel %a2@(44),%sp@- 4b692: 4eb9 0004 c5ec jsr 4c5ec 4b698: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4b69a: 2f12 movel %a2@,%sp@- 4b69c: 4eb9 0004 41e8 jsr 441e8 4b6a2: 588f addql #4,%sp err_buf: free(pipe); 4b6a4: 2f0a movel %a2,%sp@- 4b6a6: 4eb9 0004 41e8 jsr 441e8 4b6ac: 588f addql #4,%sp if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4b6ae: 74f4 moveq #-12,%d2 4b6b0: 6030 bras 4b6e2 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b6b2: 42a7 clrl %sp@- 4b6b4: 42a7 clrl %sp@- 4b6b6: 2f2a 0028 movel %a2@(40),%sp@- 4b6ba: 4eb9 0004 7550 jsr 47550 4b6c0: 4fef 000c lea %sp@(12),%sp 4b6c4: 4a80 tstl %d0 4b6c6: 6604 bnes 4b6cc <== NEVER TAKEN 4b6c8: 4282 clrl %d2 4b6ca: 6002 bras 4b6ce err = -EINTR; 4b6cc: 74fc moveq #-4,%d2 <== NOT EXECUTED if (*pipep == NULL) { 4b6ce: 4a93 tstl %a3@ 4b6d0: 6610 bnes 4b6e2 if (err) 4b6d2: 4a82 tstl %d2 4b6d4: 670a beqs 4b6e0 <== ALWAYS TAKEN pipe_free(pipe); 4b6d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b6d8: 4eba fd66 jsr %pc@(4b440 ) <== NOT EXECUTED 4b6dc: 588f addql #4,%sp <== NOT EXECUTED 4b6de: 6002 bras 4b6e2 <== NOT EXECUTED else *pipep = pipe; 4b6e0: 268a movel %a2,%a3@ static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4b6e2: 2f39 0005 f03c movel 5f03c ,%sp@- 4b6e8: 4eb9 0004 765c jsr 4765c pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4b6ee: 588f addql #4,%sp 4b6f0: 4a82 tstl %d2 4b6f2: 6600 01a4 bnew 4b898 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b6f6: 7006 moveq #6,%d0 4b6f8: 7204 moveq #4,%d1 4b6fa: c0ac 0014 andl %a4@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b6fe: 2453 moveal %a3@,%a2 switch (LIBIO_ACCMODE(iop)) { 4b700: b280 cmpl %d0,%d1 4b702: 6700 009c beqw 4b7a0 4b706: 123c 0006 moveb #6,%d1 4b70a: b280 cmpl %d0,%d1 4b70c: 6700 0122 beqw 4b830 4b710: 123c 0002 moveb #2,%d1 4b714: b280 cmpl %d0,%d1 4b716: 6600 0160 bnew 4b878 case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b71a: 202a 0010 movel %a2@(16),%d0 4b71e: 2040 moveal %d0,%a0 4b720: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b722: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4b726: 2548 0010 movel %a0,%a2@(16) 4b72a: 4a80 tstl %d0 4b72c: 6610 bnes 4b73e <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4b72e: 486e fffc pea %fp@(-4) 4b732: 2f2a 0030 movel %a2@(48),%sp@- 4b736: 4eb9 0004 c688 jsr 4c688 4b73c: 508f addql #8,%sp if (pipe->Writers == 0) { 4b73e: 4aaa 0014 tstl %a2@(20) 4b742: 6600 0134 bnew 4b878 /* Not an error */ if (LIBIO_NODELAY(iop)) 4b746: 7001 moveq #1,%d0 4b748: c0ac 0014 andl %a4@(20),%d0 4b74c: 6600 012a bnew 4b878 break; prevCounter = pipe->writerCounter; 4b750: 2a2a 0024 movel %a2@(36),%d5 /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b754: 4bf9 0004 7550 lea 47550 ,%a5 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b75a: 283c 0004 765c movel #292444,%d4 if (! PIPE_READWAIT(pipe)) 4b760: 263c 0004 c6ec movel #313068,%d3 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b766: 2f2a 0028 movel %a2@(40),%sp@- 4b76a: 2044 moveal %d4,%a0 4b76c: 4e90 jsr %a0@ if (! PIPE_READWAIT(pipe)) 4b76e: 2043 moveal %d3,%a0 4b770: 42a7 clrl %sp@- 4b772: 2f2a 002c movel %a2@(44),%sp@- 4b776: 4e90 jsr %a0@ 4b778: 4fef 000c lea %sp@(12),%sp 4b77c: 4a80 tstl %d0 4b77e: 6600 0106 bnew 4b886 goto out_error; if (! PIPE_LOCK(pipe)) 4b782: 42a7 clrl %sp@- 4b784: 42a7 clrl %sp@- 4b786: 2f2a 0028 movel %a2@(40),%sp@- 4b78a: 4e95 jsr %a5@ 4b78c: 4fef 000c lea %sp@(12),%sp 4b790: 4a80 tstl %d0 4b792: 6600 00f2 bnew 4b886 goto out_error; } while (prevCounter == pipe->writerCounter); 4b796: baaa 0024 cmpl %a2@(36),%d5 4b79a: 67ca beqs 4b766 <== NEVER TAKEN 4b79c: 6000 00da braw 4b878 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b7a0: 202a 0014 movel %a2@(20),%d0 4b7a4: 2200 movel %d0,%d1 4b7a6: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4b7a8: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4b7ac: 2541 0014 movel %d1,%a2@(20) 4b7b0: 4a80 tstl %d0 4b7b2: 6610 bnes 4b7c4 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4b7b4: 486e fffc pea %fp@(-4) 4b7b8: 2f2a 002c movel %a2@(44),%sp@- 4b7bc: 4eb9 0004 c688 jsr 4c688 4b7c2: 508f addql #8,%sp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4b7c4: 4aaa 0010 tstl %a2@(16) 4b7c8: 6600 00ae bnew 4b878 4b7cc: 7001 moveq #1,%d0 4b7ce: c0ac 0014 andl %a4@(20),%d0 4b7d2: 6712 beqs 4b7e6 PIPE_UNLOCK(pipe); 4b7d4: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4b7d8: 74fa moveq #-6,%d2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4b7da: 4eb9 0004 765c jsr 4765c err = -ENXIO; goto out_error; 4b7e0: 588f addql #4,%sp 4b7e2: 6000 00a4 braw 4b888 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4b7e6: 2a2a 0020 movel %a2@(32),%d5 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4b7ea: 4bf9 0004 7550 lea 47550 ,%a5 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b7f0: 283c 0004 765c movel #292444,%d4 if (! PIPE_WRITEWAIT(pipe)) 4b7f6: 263c 0004 c6ec movel #313068,%d3 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4b7fc: 2f2a 0028 movel %a2@(40),%sp@- 4b800: 2044 moveal %d4,%a0 4b802: 4e90 jsr %a0@ if (! PIPE_WRITEWAIT(pipe)) 4b804: 2043 moveal %d3,%a0 4b806: 42a7 clrl %sp@- 4b808: 2f2a 0030 movel %a2@(48),%sp@- 4b80c: 4e90 jsr %a0@ 4b80e: 4fef 000c lea %sp@(12),%sp 4b812: 4a80 tstl %d0 4b814: 6670 bnes 4b886 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4b816: 42a7 clrl %sp@- 4b818: 42a7 clrl %sp@- 4b81a: 2f2a 0028 movel %a2@(40),%sp@- 4b81e: 4e95 jsr %a5@ 4b820: 4fef 000c lea %sp@(12),%sp 4b824: 4a80 tstl %d0 4b826: 665e bnes 4b886 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4b828: baaa 0020 cmpl %a2@(32),%d5 4b82c: 67ce beqs 4b7fc <== NEVER TAKEN 4b82e: 6048 bras 4b878 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b830: 202a 0010 movel %a2@(16),%d0 4b834: 2200 movel %d0,%d1 4b836: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4b838: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4b83c: 2541 0010 movel %d1,%a2@(16) 4b840: 4a80 tstl %d0 4b842: 6610 bnes 4b854 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4b844: 486e fffc pea %fp@(-4) 4b848: 2f2a 0030 movel %a2@(48),%sp@- 4b84c: 4eb9 0004 c688 jsr 4c688 4b852: 508f addql #8,%sp pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b854: 202a 0014 movel %a2@(20),%d0 4b858: 2040 moveal %d0,%a0 4b85a: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4b85c: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4b860: 2548 0014 movel %a0,%a2@(20) 4b864: 4a80 tstl %d0 4b866: 6610 bnes 4b878 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4b868: 486e fffc pea %fp@(-4) 4b86c: 2f2a 002c movel %a2@(44),%sp@- 4b870: 4eb9 0004 c688 jsr 4c688 4b876: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4b878: 2f2a 0028 movel %a2@(40),%sp@- 4b87c: 4eb9 0004 765c jsr 4765c return 0; 4b882: 588f addql #4,%sp 4b884: 6012 bras 4b898 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4b886: 74fc moveq #-4,%d2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4b888: 2f0c movel %a4,%sp@- 4b88a: 2f0b movel %a3,%sp@- 4b88c: 4eb9 0004 b488 jsr 4b488 return err; 4b892: 508f addql #8,%sp 4b894: 6002 bras 4b898 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { 4b896: 74f4 moveq #-12,%d2 return 0; out_error: pipe_release(pipep, iop); return err; } 4b898: 2002 movel %d2,%d0 4b89a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 4b8a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000434a4 : long fpathconf( int fd, int name ) { 434a4: 4e56 0000 linkw %fp,#0 434a8: 202e 0008 movel %fp@(8),%d0 434ac: 222e 000c movel %fp@(12),%d1 434b0: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 434b2: b0b9 0005 d822 cmpl 5d822 ,%d0 434b8: 641c bccs 434d6 iop = rtems_libio_iop(fd); 434ba: 2400 movel %d0,%d2 434bc: ed88 lsll #6,%d0 434be: e78a lsll #3,%d2 434c0: 2079 0005 ef08 moveal 5ef08 ,%a0 434c6: 9082 subl %d2,%d0 434c8: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 434ca: 2028 0014 movel %a0@(20),%d0 434ce: 0280 0000 0100 andil #256,%d0 434d4: 6610 bnes 434e6 <== ALWAYS TAKEN 434d6: 4eb9 0004 cdac jsr 4cdac <__errno> 434dc: 7209 moveq #9,%d1 434de: 2040 moveal %d0,%a0 434e0: 2081 movel %d1,%a0@ 434e2: 6000 0082 braw 43566 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 434e6: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 434ea: 700b moveq #11,%d0 434ec: b081 cmpl %d1,%d0 434ee: 656a bcss 4355a 434f0: 303b 1a08 movew %pc@(434fa ,%d1:l:2),%d0 434f4: 48c0 extl %d0 434f6: 4efb 0802 jmp %pc@(434fa ,%d0:l) 434fa: 0018 .short 0x0018 <== NOT EXECUTED 434fc: 001e .short 0x001e <== NOT EXECUTED 434fe: 0024 .short 0x0024 <== NOT EXECUTED 43500: 002a .short 0x002a <== NOT EXECUTED 43502: 0030 .short 0x0030 <== NOT EXECUTED 43504: 0036 .short 0x0036 <== NOT EXECUTED 43506: 003c .short 0x003c <== NOT EXECUTED 43508: 0042 .short 0x0042 <== NOT EXECUTED 4350a: 0048 .short 0x0048 <== NOT EXECUTED 4350c: 004e .short 0x004e <== NOT EXECUTED 4350e: 0054 .short 0x0054 <== NOT EXECUTED 43510: 005a .short 0x005a <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 43512: 2028 0038 movel %a0@(56),%d0 break; 43516: 6050 bras 43568 case _PC_MAX_CANON: return_value = the_limits->max_canon; 43518: 2028 003c movel %a0@(60),%d0 break; 4351c: 604a bras 43568 case _PC_MAX_INPUT: return_value = the_limits->max_input; 4351e: 2028 0040 movel %a0@(64),%d0 break; 43522: 6044 bras 43568 case _PC_NAME_MAX: return_value = the_limits->name_max; 43524: 2028 0044 movel %a0@(68),%d0 break; 43528: 603e bras 43568 case _PC_PATH_MAX: return_value = the_limits->path_max; 4352a: 2028 0048 movel %a0@(72),%d0 break; 4352e: 6038 bras 43568 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43530: 2028 004c movel %a0@(76),%d0 break; 43534: 6032 bras 43568 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43536: 2028 0054 movel %a0@(84),%d0 break; 4353a: 602c bras 43568 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 4353c: 2028 0058 movel %a0@(88),%d0 break; 43540: 6026 bras 43568 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43542: 2028 0064 movel %a0@(100),%d0 break; 43546: 6020 bras 43568 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43548: 2028 0050 movel %a0@(80),%d0 break; 4354c: 601a bras 43568 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 4354e: 2028 005c movel %a0@(92),%d0 break; 43552: 6014 bras 43568 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43554: 2028 0060 movel %a0@(96),%d0 break; 43558: 600e bras 43568 default: rtems_set_errno_and_return_minus_one( EINVAL ); 4355a: 4eb9 0004 cdac jsr 4cdac <__errno> 43560: 2040 moveal %d0,%a0 43562: 7016 moveq #22,%d0 43564: 2080 movel %d0,%a0@ 43566: 70ff moveq #-1,%d0 break; } return return_value; } 43568: 242e fffc movel %fp@(-4),%d2 4356c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042b68 : #include void free( void *ptr ) { 42b68: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 42b6c: 52b9 0005 d6fc addql #1,5d6fc #include void free( void *ptr ) { 42b72: 2f02 movel %d2,%sp@- 42b74: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 42b78: 676c beqs 42be6 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42b7a: 7003 moveq #3,%d0 42b7c: b0b9 0005 d968 cmpl 5d968 <_System_state_Current>,%d0 42b82: 661a bnes 42b9e <== NEVER TAKEN !malloc_is_system_state_OK() ) { 42b84: 4eb9 0004 2d0c jsr 42d0c return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 42b8a: 4a00 tstb %d0 42b8c: 6610 bnes 42b9e !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 42b8e: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42b92: 242e fffc movel %fp@(-4),%d2 42b96: 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); 42b98: 4ef9 0004 2d80 jmp 42d80 } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42b9e: 2079 0005 c6a8 moveal 5c6a8 ,%a0 42ba4: 4a88 tstl %a0 42ba6: 670a beqs 42bb2 (*rtems_malloc_statistics_helpers->at_free)(ptr); 42ba8: 2f02 movel %d2,%sp@- 42baa: 2068 0008 moveal %a0@(8),%a0 42bae: 4e90 jsr %a0@ 42bb0: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 42bb2: 2f02 movel %d2,%sp@- 42bb4: 2f39 0005 bfaa movel 5bfaa ,%sp@- 42bba: 4eb9 0004 7360 jsr 47360 <_Protected_heap_Free> 42bc0: 508f addql #8,%sp 42bc2: 4a00 tstb %d0 42bc4: 6620 bnes 42be6 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 42bc6: 2079 0005 bfaa moveal 5bfaa ,%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", 42bcc: 2f28 001c movel %a0@(28),%sp@- 42bd0: 2f28 0018 movel %a0@(24),%sp@- 42bd4: 2f02 movel %d2,%sp@- 42bd6: 4879 0005 b114 pea 5b114 42bdc: 4eb9 0004 3828 jsr 43828 42be2: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 42be6: 242e fffc movel %fp@(-4),%d2 42bea: 4e5e unlk %fp ... =============================================================================== 00045be0 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 45be0: 4e56 0000 linkw %fp,#0 45be4: 2f0b movel %a3,%sp@- 45be6: 2f0a movel %a2,%sp@- 45be8: 246e 0008 moveal %fp@(8),%a2 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 45bec: b5fc 0006 0348 cmpal #394056,%a2 45bf2: 6728 beqs 45c1c <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 45bf4: 486a 0004 pea %a2@(4) 45bf8: 47f9 0004 4bc0 lea 44bc0 ,%a3 45bfe: 4e93 jsr %a3@ rtems_filesystem_freenode( &env->root_directory); 45c00: 486a 0018 pea %a2@(24) 45c04: 4e93 jsr %a3@ free(env); } } 45c06: 266e fffc moveal %fp@(-4),%a3 && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 45c0a: 508f addql #8,%sp 45c0c: 2d4a 0008 movel %a2,%fp@(8) } } 45c10: 246e fff8 moveal %fp@(-8),%a2 45c14: 4e5e unlk %fp && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 45c16: 4ef9 0004 4bd4 jmp 44bd4 } } 45c1c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 45c20: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 45c24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436b8 : #include int fsync( int fd ) { 436b8: 4e56 0000 linkw %fp,#0 436bc: 202e 0008 movel %fp@(8),%d0 rtems_libio_t *iop; rtems_libio_check_fd( fd ); 436c0: b0b9 0005 d822 cmpl 5d822 ,%d0 436c6: 641c bccs 436e4 iop = rtems_libio_iop( fd ); 436c8: 2200 movel %d0,%d1 436ca: ed88 lsll #6,%d0 436cc: e789 lsll #3,%d1 436ce: 2079 0005 ef08 moveal 5ef08 ,%a0 436d4: 9081 subl %d1,%d0 436d6: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 436d8: 2028 0014 movel %a0@(20),%d0 436dc: 0280 0000 0100 andil #256,%d0 436e2: 6612 bnes 436f6 436e4: 4eb9 0004 cdac jsr 4cdac <__errno> /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 436ea: 4e5e unlk %fp { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 436ec: 2040 moveal %d0,%a0 436ee: 7009 moveq #9,%d0 436f0: 2080 movel %d0,%a0@ /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); } 436f2: 70ff moveq #-1,%d0 436f4: 4e75 rts /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 436f6: 2268 0020 moveal %a0@(32),%a1 436fa: 2d48 0008 movel %a0,%fp@(8) } 436fe: 4e5e unlk %fp /* * Now process the fsync(). */ return (*iop->pathinfo.handlers->fsync_h)( iop ); 43700: 2269 0028 moveal %a1@(40),%a1 43704: 4ed1 jmp %a1@ ... =============================================================================== 00049bf4 : int ftruncate( int fd, off_t length ) { 49bf4: 4e56 ffec linkw %fp,#-20 49bf8: 202e 0008 movel %fp@(8),%d0 49bfc: 2f0a movel %a2,%sp@- 49bfe: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 49c00: b0b9 0005 bff2 cmpl 5bff2 ,%d0 49c06: 641a bccs 49c22 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 49c08: 2200 movel %d0,%d1 49c0a: ed88 lsll #6,%d0 49c0c: e789 lsll #3,%d1 49c0e: 2479 0005 d6d8 moveal 5d6d8 ,%a2 49c14: 9081 subl %d1,%d0 49c16: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 49c18: 202a 0014 movel %a2@(20),%d0 49c1c: 0800 0008 btst #8,%d0 49c20: 660e bnes 49c30 49c22: 4eb9 0004 c034 jsr 4c034 <__errno> 49c28: 7409 moveq #9,%d2 49c2a: 2040 moveal %d0,%a0 49c2c: 2082 movel %d2,%a0@ 49c2e: 604c bras 49c7c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 49c30: 44c0 movew %d0,%ccr 49c32: 670e beqs 49c42 49c34: 4eb9 0004 c034 jsr 4c034 <__errno> 49c3a: 7216 moveq #22,%d1 49c3c: 2040 moveal %d0,%a0 49c3e: 2081 movel %d1,%a0@ 49c40: 603a bras 49c7c /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 49c42: 4878 0014 pea 14 49c46: 240e movel %fp,%d2 49c48: 486a 0018 pea %a2@(24) 49c4c: 0682 ffff ffec addil #-20,%d2 49c52: 2f02 movel %d2,%sp@- 49c54: 4eb9 0004 c854 jsr 4c854 if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 49c5a: 206e fff8 moveal %fp@(-8),%a0 49c5e: 2f02 movel %d2,%sp@- 49c60: 2068 0010 moveal %a0@(16),%a0 49c64: 4e90 jsr %a0@ 49c66: 4fef 0010 lea %sp@(16),%sp 49c6a: 7201 moveq #1,%d1 49c6c: b280 cmpl %d0,%d1 49c6e: 6610 bnes 49c80 rtems_set_errno_and_return_minus_one( EISDIR ); 49c70: 4eb9 0004 c034 jsr 4c034 <__errno> 49c76: 2040 moveal %d0,%a0 49c78: 7015 moveq #21,%d0 49c7a: 2080 movel %d0,%a0@ 49c7c: 70ff moveq #-1,%d0 49c7e: 6018 bras 49c98 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 49c80: 206a 0020 moveal %a2@(32),%a0 49c84: 2f2e 0010 movel %fp@(16),%sp@- 49c88: 2f2e 000c movel %fp@(12),%sp@- 49c8c: 2f0a movel %a2,%sp@- 49c8e: 2068 0020 moveal %a0@(32),%a0 49c92: 4e90 jsr %a0@ 49c94: 4fef 000c lea %sp@(12),%sp } 49c98: 242e ffe4 movel %fp@(-28),%d2 49c9c: 246e ffe8 moveal %fp@(-24),%a2 49ca0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042430 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 42430: 4e56 0000 linkw %fp,#0 42434: 202e 000c movel %fp@(12),%d0 42438: 2f03 movel %d3,%sp@- 4243a: 162e 0013 moveb %fp@(19),%d3 4243e: 2f02 movel %d2,%sp@- 42440: 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) { 42444: b4b9 0006 025e cmpl 6025e ,%d2 4244a: 6432 bccs 4247e <== NEVER TAKEN 4244c: 2239 0006 0262 movel 60262 ,%d1 42452: 672a beqs 4247e <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 42454: 2041 moveal %d1,%a0 42456: e78a lsll #3,%d2 42458: d1c2 addal %d2,%a0 if (minor < dtab->size && dtab->minor != NULL) { 4245a: b0a8 0004 cmpl %a0@(4),%d0 4245e: 641e bccs 4247e <== NEVER TAKEN 42460: 2050 moveal %a0@,%a0 42462: 4a88 tstl %a0 42464: 6718 beqs 4247e <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 42466: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if (dd != NULL && !lookup_only) { 4246a: 4a88 tstl %a0 4246c: 6712 beqs 42480 4246e: 4a03 tstb %d3 42470: 660e bnes 42480 if (!dd->deleted) { 42472: 4a28 0030 tstb %a0@(48) 42476: 6606 bnes 4247e ++dd->uses; 42478: 52a8 0014 addql #1,%a0@(20) 4247c: 6002 bras 42480 } else { dd = NULL; 4247e: 91c8 subal %a0,%a0 return dd; } } return NULL; } 42480: 241f movel %sp@+,%d2 42482: 2008 movel %a0,%d0 42484: 261f movel %sp@+,%d3 42486: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b1a0 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5b1a0: 4e56 ffec linkw %fp,#-20 5b1a4: 202e 0008 movel %fp@(8),%d0 5b1a8: 2f0a movel %a2,%sp@- 5b1aa: 2f02 movel %d2,%sp@- rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5b1ac: b0b9 0005 d9b2 cmpl 5d9b2 ,%d0 5b1b2: 6412 bccs 5b1c6 <== NEVER TAKEN 5b1b4: 2200 movel %d0,%d1 5b1b6: ed88 lsll #6,%d0 5b1b8: e789 lsll #3,%d1 5b1ba: 2479 0005 f118 moveal 5f118 ,%a2 5b1c0: 9081 subl %d1,%d0 5b1c2: d5c0 addal %d0,%a2 5b1c4: 6002 bras 5b1c8 5b1c6: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5b1c8: 4878 0014 pea 14 5b1cc: 240e movel %fp,%d2 5b1ce: 486a 0018 pea %a2@(24) 5b1d2: 0682 ffff ffec addil #-20,%d2 5b1d8: 2f02 movel %d2,%sp@- 5b1da: 4eb9 0004 d988 jsr 4d988 if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5b1e0: 206e fff8 moveal %fp@(-8),%a0 5b1e4: 2f02 movel %d2,%sp@- 5b1e6: 2068 0010 moveal %a0@(16),%a0 5b1ea: 4e90 jsr %a0@ 5b1ec: 4fef 0010 lea %sp@(16),%sp 5b1f0: 7201 moveq #1,%d1 5b1f2: b280 cmpl %d0,%d1 5b1f4: 6710 beqs 5b206 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5b1f6: 4eb9 0004 cc98 jsr 4cc98 <__errno> 5b1fc: 2040 moveal %d0,%a0 5b1fe: 7014 moveq #20,%d0 5b200: 2080 movel %d0,%a0@ 5b202: 70ff moveq #-1,%d0 5b204: 6018 bras 5b21e /* * 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 ); 5b206: 206a 0020 moveal %a2@(32),%a0 5b20a: 2f2e 0010 movel %fp@(16),%sp@- 5b20e: 2f2e 000c movel %fp@(12),%sp@- 5b212: 2f0a movel %a2,%sp@- 5b214: 2068 0008 moveal %a0@(8),%a0 5b218: 4e90 jsr %a0@ 5b21a: 4fef 000c lea %sp@(12),%sp } 5b21e: 242e ffe4 movel %fp@(-28),%d2 5b222: 246e ffe8 moveal %fp@(-24),%a2 5b226: 4e5e unlk %fp ... =============================================================================== 000433e8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 433e8: 4e56 ffe0 linkw %fp,#-32 433ec: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 433f0: 262e 0008 movel %fp@(8),%d3 433f4: 282e 000c movel %fp@(12),%d4 433f8: 246e 0010 moveal %fp@(16),%a2 433fc: 2a2e 0014 movel %fp@(20),%d5 43400: 2c2e 0018 movel %fp@(24),%d6 FILE *fp; int match; init_etc_passwd_group(); 43404: 4eb9 0004 3308 jsr 43308 if ((fp = fopen("/etc/group", "r")) == NULL) 4340a: 4879 0005 cedb pea 5cedb <_global_impure_ptr+0xc7> 43410: 4879 0005 c830 pea 5c830 43416: 4eb9 0004 d3e6 jsr 4d3e6 4341c: 508f addql #8,%sp 4341e: 2400 movel %d0,%d2 43420: 660e bnes 43430 rtems_set_errno_and_return_minus_one( EINVAL ); 43422: 4eb9 0004 cbf0 jsr 4cbf0 <__errno> 43428: 7216 moveq #22,%d1 4342a: 2040 moveal %d0,%a0 4342c: 2081 movel %d1,%a0@ 4342e: 6068 bras 43498 for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 43430: 49fa fcf4 lea %pc@(43126 ),%a4 goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 43434: 47f9 0004 ead4 lea 4ead4 ,%a3 if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 4343a: 2f06 movel %d6,%sp@- 4343c: 2f05 movel %d5,%sp@- 4343e: 2f0a movel %a2,%sp@- 43440: 2f02 movel %d2,%sp@- 43442: 4e94 jsr %a4@ 43444: 4fef 0010 lea %sp@(16),%sp 43448: 4a80 tstl %d0 4344a: 6736 beqs 43482 goto error_einval; if (name) { 4344c: 4a83 tstl %d3 4344e: 670e beqs 4345e match = (strcmp(grp->gr_name, name) == 0); 43450: 2f03 movel %d3,%sp@- 43452: 2f12 movel %a2@,%sp@- 43454: 4e93 jsr %a3@ 43456: 508f addql #8,%sp 43458: 4a80 tstl %d0 4345a: 57c0 seq %d0 4345c: 600a bras 43468 } else { match = (grp->gr_gid == gid); 4345e: 4280 clrl %d0 43460: 302a 0008 movew %a2@(8),%d0 43464: b880 cmpl %d0,%d4 43466: 57c0 seq %d0 43468: 49c0 extbl %d0 4346a: 4480 negl %d0 } if (match) { 4346c: 67cc beqs 4343a <== NEVER TAKEN fclose(fp); 4346e: 2f02 movel %d2,%sp@- 43470: 4eb9 0004 cd24 jsr 4cd24 *result = grp; 43476: 206e 001c moveal %fp@(28),%a0 return 0; 4347a: 588f addql #4,%sp 4347c: 4280 clrl %d0 match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 4347e: 208a movel %a2,%a0@ return 0; 43480: 6018 bras 4349a } } error_einval: fclose(fp); 43482: 2f02 movel %d2,%sp@- 43484: 4eb9 0004 cd24 jsr 4cd24 rtems_set_errno_and_return_minus_one( EINVAL ); 4348a: 4eb9 0004 cbf0 jsr 4cbf0 <__errno> 43490: 588f addql #4,%sp 43492: 2040 moveal %d0,%a0 43494: 7016 moveq #22,%d0 43496: 2080 movel %d0,%a0@ 43498: 70ff moveq #-1,%d0 } 4349a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 434a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042bf0 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 42bf0: 4e56 fff8 linkw %fp,#-8 42bf4: 2f0a movel %a2,%sp@- 42bf6: 246e 0008 moveal %fp@(8),%a2 42bfa: 2f02 movel %d2,%sp@- /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 42bfc: 4a8a tstl %a2 42bfe: 6610 bnes 42c10 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 42c00: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 42c06: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c08: 700e moveq #14,%d0 <== NOT EXECUTED 42c0a: 2080 movel %d0,%a0@ <== NOT EXECUTED 42c0c: 70ff moveq #-1,%d0 <== NOT EXECUTED 42c0e: 6032 bras 42c42 <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 42c10: 203c 0000 0700 movel #1792,%d0 42c16: 40c2 movew %sr,%d2 42c18: 8082 orl %d2,%d0 42c1a: 46c0 movew %d0,%sr _TOD_Get( &now ); 42c1c: 486e fff8 pea %fp@(-8) 42c20: 4eb9 0004 674c jsr 4674c <_TOD_Get> _ISR_Enable(level); 42c26: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 42c28: 243c 0000 03e8 movel #1000,%d2 * 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; 42c2e: 588f addql #4,%sp _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 42c30: 202e fffc movel %fp@(-4),%d0 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 42c34: 4c42 0800 remsl %d2,%d0,%d0 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 42c38: 24ae fff8 movel %fp@(-8),%a2@ time->tv_usec = useconds; 42c3c: 2540 0004 movel %d0,%a2@(4) 42c40: 4280 clrl %d0 } 42c42: 242e fff0 movel %fp@(-16),%d2 42c46: 246e fff4 moveal %fp@(-12),%a2 42c4a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b8f0 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 4b8f0: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b8f2: 4e56 0000 linkw %fp,#0 4b8f6: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) 4b8fa: 2268 0018 moveal %a0@(24),%a1 4b8fe: b0a9 0048 cmpl %a1@(72),%d0 4b902: 6610 bnes 4b914 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4b904: 4280 clrl %d0 4b906: 4281 clrl %d1 4b908: 2140 000c movel %d0,%a0@(12) 4b90c: 2141 0010 movel %d1,%a0@(16) return 0; 4b910: 4280 clrl %d0 4b912: 6002 bras 4b916 /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ 4b914: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4b916: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bb2e : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4bb2e: 4e56 0000 linkw %fp,#0 4bb32: 206e 000c moveal %fp@(12),%a0 4bb36: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4bb38: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4bb3a: 200a movel %a2,%d0 4bb3c: 0680 0000 0050 addil #80,%d0 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 4bb42: b0aa 004c cmpl %a2@(76),%d0 4bb46: 670e beqs 4bb56 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4bb48: 4eb9 0004 c034 jsr 4c034 <__errno> 4bb4e: 2040 moveal %d0,%a0 4bb50: 705a moveq #90,%d0 4bb52: 2080 movel %d0,%a0@ 4bb54: 6016 bras 4bb6c 4bb56: 2068 0010 moveal %a0@(16),%a0 /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 4bb5a: b5e8 001c cmpal %a0@(28),%a2 4bb5e: 6610 bnes 4bb70 rtems_set_errno_and_return_minus_one( EBUSY ); 4bb60: 4eb9 0004 c034 jsr 4c034 <__errno> 4bb66: 7210 moveq #16,%d1 4bb68: 2040 moveal %d0,%a0 4bb6a: 2081 movel %d1,%a0@ 4bb6c: 70ff moveq #-1,%d0 4bb6e: 601a bras 4bb8a /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4bb70: 4aaa 0058 tstl %a2@(88) 4bb74: 66ea bnes 4bb60 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4bb76: 2f0a movel %a2,%sp@- 4bb78: 4eb9 0004 98d4 jsr 498d4 IMFS_check_node_remove( the_jnode ); 4bb7e: 2f0a movel %a2,%sp@- 4bb80: 4eb9 0004 9918 jsr 49918 return 0; 4bb86: 508f addql #8,%sp 4bb88: 4280 clrl %d0 } 4bb8a: 246e fffc moveal %fp@(-4),%a2 4bb8e: 4e5e unlk %fp ... =============================================================================== 00043308 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 43308: 4e56 0000 linkw %fp,#0 4330c: 2f0a movel %a2,%sp@- 4330e: 2f02 movel %d2,%sp@- FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 43310: 4a39 0005 e5f4 tstb 5e5f4 43316: 6600 00c4 bnew 433dc return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4331a: 4878 01ff pea 1ff /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4331e: 45f9 0004 d3e6 lea 4d3e6 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43324: 4879 0005 c7b6 pea 5c7b6 FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4332a: 7001 moveq #1,%d0 4332c: 13c0 0005 e5f4 moveb %d0,5e5f4 mkdir("/etc", 0777); 43332: 4eb9 0004 3b1c jsr 43b1c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 43338: 4879 0005 cedb pea 5cedb <_global_impure_ptr+0xc7> 4333e: 4879 0005 c7bb pea 5c7bb 43344: 4e92 jsr %a2@ 43346: 4fef 0010 lea %sp@(16),%sp 4334a: 4a80 tstl %d0 4334c: 670c beqs 4335a fclose(fp); 4334e: 2f00 movel %d0,%sp@- 43350: 4eb9 0004 cd24 jsr 4cd24 43356: 588f addql #4,%sp 43358: 602e bras 43388 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 4335a: 4879 0005 c7c7 pea 5c7c7 43360: 4879 0005 c7bb pea 5c7bb 43366: 4e92 jsr %a2@ 43368: 508f addql #8,%sp 4336a: 2400 movel %d0,%d2 4336c: 671a beqs 43388 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4336e: 2f00 movel %d0,%sp@- 43370: 4879 0005 c7c9 pea 5c7c9 43376: 4eb9 0004 d4c8 jsr 4d4c8 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4337c: 2f02 movel %d2,%sp@- 4337e: 4eb9 0004 cd24 jsr 4cd24 43384: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 43388: 4879 0005 cedb pea 5cedb <_global_impure_ptr+0xc7> 4338e: 45f9 0004 d3e6 lea 4d3e6 ,%a2 43394: 4879 0005 c830 pea 5c830 4339a: 4e92 jsr %a2@ 4339c: 508f addql #8,%sp 4339e: 4a80 tstl %d0 433a0: 670c beqs 433ae fclose(fp); 433a2: 2f00 movel %d0,%sp@- 433a4: 4eb9 0004 cd24 jsr 4cd24 433aa: 588f addql #4,%sp 433ac: 602e bras 433dc } else if ((fp = fopen("/etc/group", "w")) != NULL) { 433ae: 4879 0005 c7c7 pea 5c7c7 433b4: 4879 0005 c830 pea 5c830 433ba: 4e92 jsr %a2@ 433bc: 508f addql #8,%sp 433be: 2400 movel %d0,%d2 433c0: 671a beqs 433dc <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 433c2: 2f00 movel %d0,%sp@- 433c4: 4879 0005 c83b pea 5c83b 433ca: 4eb9 0004 d4c8 jsr 4d4c8 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 433d0: 2f02 movel %d2,%sp@- 433d2: 4eb9 0004 cd24 jsr 4cd24 433d8: 4fef 000c lea %sp@(12),%sp } } 433dc: 242e fff8 movel %fp@(-8),%d2 433e0: 246e fffc moveal %fp@(-4),%a2 433e4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004467a : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4467a: 4e56 fff4 linkw %fp,#-12 4467e: 222e 0008 movel %fp@(8),%d1 44682: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44686: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 4468a: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 4468e: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 44690: 0800 0005 btst #5,%d0 44694: 6704 beqs 4469a <== ALWAYS TAKEN c &= 0x7f; 44696: 747f moveq #127,%d2 <== NOT EXECUTED 44698: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 4469a: 0800 0009 btst #9,%d0 4469e: 6724 beqs 446c4 c = tolower (c); 446a0: 2079 0005 c1b0 moveal 5c1b0 <__ctype_ptr__>,%a0 446a6: 7603 moveq #3,%d3 446a8: 0282 0000 00ff andil #255,%d2 446ae: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 446b2: 49c1 extbl %d1 446b4: c283 andl %d3,%d1 446b6: 163c 0001 moveb #1,%d3 446ba: b681 cmpl %d1,%d3 446bc: 6606 bnes 446c4 446be: 0682 0000 0020 addil #32,%d2 if (c == '\r') { 446c4: 4281 clrl %d1 446c6: 1202 moveb %d2,%d1 446c8: 760d moveq #13,%d3 446ca: b681 cmpl %d1,%d3 446cc: 6610 bnes 446de if (tty->termios.c_iflag & IGNCR) 446ce: 4a00 tstb %d0 446d0: 6d00 0104 bltw 447d6 return 0; if (tty->termios.c_iflag & ICRNL) 446d4: 0800 0008 btst #8,%d0 446d8: 671a beqs 446f4 <== NEVER TAKEN c = '\n'; 446da: 740a moveq #10,%d2 446dc: 6016 bras 446f4 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 446de: 760a moveq #10,%d3 446e0: b681 cmpl %d1,%d3 446e2: 660a bnes 446ee 446e4: 0800 0006 btst #6,%d0 446e8: 670a beqs 446f4 <== ALWAYS TAKEN c = '\r'; 446ea: 740d moveq #13,%d2 <== NOT EXECUTED 446ec: 6006 bras 446f4 <== NOT EXECUTED } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 446ee: 4a02 tstb %d2 446f0: 6700 00a8 beqw 4479a 446f4: 222a 003c movel %a2@(60),%d1 446f8: 0801 0001 btst #1,%d1 446fc: 6700 009c beqw 4479a if (c == tty->termios.c_cc[VERASE]) { 44700: 4283 clrl %d3 44702: 162a 0043 moveb %a2@(67),%d3 44706: 4280 clrl %d0 44708: 1002 moveb %d2,%d0 4470a: b680 cmpl %d0,%d3 4470c: 6604 bnes 44712 erase (tty, 0); 4470e: 42a7 clrl %sp@- 44710: 600e bras 44720 return 0; } else if (c == tty->termios.c_cc[VKILL]) { 44712: 4283 clrl %d3 44714: 162a 0044 moveb %a2@(68),%d3 44718: b680 cmpl %d0,%d3 4471a: 6610 bnes 4472c erase (tty, 1); 4471c: 4878 0001 pea 1 44720: 2f0a movel %a2,%sp@- 44722: 4eba fdc4 jsr %pc@(444e8 ) return 0; 44726: 508f addql #8,%sp 44728: 6000 00ac braw 447d6 } else if (c == tty->termios.c_cc[VEOF]) { 4472c: 4283 clrl %d3 4472e: 162a 0045 moveb %a2@(69),%d3 44732: b680 cmpl %d0,%d3 44734: 6700 009c beqw 447d2 return 1; } else if (c == '\n') { 44738: 760a moveq #10,%d3 4473a: b680 cmpl %d0,%d3 4473c: 6622 bnes 44760 if (tty->termios.c_lflag & (ECHO | ECHONL)) 4473e: 7048 moveq #72,%d0 44740: c280 andl %d0,%d1 44742: 670c beqs 44750 <== NEVER TAKEN echo (c, tty); 44744: 2f0a movel %a2,%sp@- 44746: 4878 000a pea a 4474a: 4eba fd14 jsr %pc@(44460 ) 4474e: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 44750: 202a 0020 movel %a2@(32),%d0 44754: 206a 001c moveal %a2@(28),%a0 44758: 720a moveq #10,%d1 4475a: 1181 0800 moveb %d1,%a0@(00000000,%d0:l) 4475e: 6032 bras 44792 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 44760: 4283 clrl %d3 44762: 162a 004c moveb %a2@(76),%d3 44766: b680 cmpl %d0,%d3 44768: 670a beqs 44774 <== NEVER TAKEN 4476a: 4283 clrl %d3 4476c: 162a 0051 moveb %a2@(81),%d3 44770: b680 cmpl %d0,%d3 44772: 6626 bnes 4479a <== ALWAYS TAKEN (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 44774: 44c1 movew %d1,%ccr <== NOT EXECUTED 44776: 6a0e bpls 44786 <== NOT EXECUTED echo (c, tty); 44778: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4477a: 4280 clrl %d0 <== NOT EXECUTED 4477c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4477e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44780: 4eba fcde jsr %pc@(44460 ) <== NOT EXECUTED 44784: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 44786: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 4478a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 4478e: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED 44792: 5280 addql #1,%d0 44794: 2540 0020 movel %d0,%a2@(32) 44798: 6038 bras 447d2 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 4479a: 2039 0005 c128 movel 5c128 ,%d0 447a0: 5380 subql #1,%d0 447a2: b0aa 0020 cmpl %a2@(32),%d0 447a6: 6f2e bles 447d6 <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 447a8: 7008 moveq #8,%d0 447aa: c0aa 003c andl %a2@(60),%d0 447ae: 670e beqs 447be <== NEVER TAKEN echo (c, tty); 447b0: 2f0a movel %a2,%sp@- 447b2: 4280 clrl %d0 447b4: 1002 moveb %d2,%d0 447b6: 2f00 movel %d0,%sp@- 447b8: 4eba fca6 jsr %pc@(44460 ) 447bc: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; 447be: 202a 0020 movel %a2@(32),%d0 447c2: 206a 001c moveal %a2@(28),%a0 447c6: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) 447ca: 5280 addql #1,%d0 447cc: 2540 0020 movel %d0,%a2@(32) 447d0: 6004 bras 447d6 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 447d2: 7001 moveq #1,%d0 447d4: 6002 bras 447d8 if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 447d6: 4280 clrl %d0 } 447d8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 447de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00059b64 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 59b64: 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 ) { 59b66: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 59b6a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000432d0 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 432d0: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 432d2: 4e56 0000 linkw %fp,#0 432d6: 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())) 432d8: b0b9 0005 d968 cmpl 5d968 <_System_state_Current>,%d0 432de: 664c bnes 4332c <== NEVER TAKEN /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 432e0: 2479 0005 b6fa moveal 5b6fa <_global_impure_ptr>,%a2 432e6: b5f9 0005 c1b4 cmpal 5c1b4 <_impure_ptr>,%a2 432ec: 6710 beqs 432fe _wrapup_reent(_global_impure_ptr); 432ee: 2f0a movel %a2,%sp@- 432f0: 4eb9 0004 ca9e jsr 4ca9e <_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; 432f6: 588f addql #4,%sp 432f8: 23ca 0005 c1b4 movel %a2,5c1b4 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 432fe: 2079 0005 c1b4 moveal 5c1b4 <_impure_ptr>,%a0 43304: 45f9 0004 c168 lea 4c168 ,%a2 4330a: 2f28 0004 movel %a0@(4),%sp@- 4330e: 4e92 jsr %a2@ fclose (stdout); 43310: 2079 0005 c1b4 moveal 5c1b4 <_impure_ptr>,%a0 43316: 2f28 0008 movel %a0@(8),%sp@- 4331a: 4e92 jsr %a2@ fclose (stderr); 4331c: 2079 0005 c1b4 moveal 5c1b4 <_impure_ptr>,%a0 43322: 2f28 000c movel %a0@(12),%sp@- 43326: 4e92 jsr %a2@ 43328: 4fef 000c lea %sp@(12),%sp } 4332c: 246e fffc moveal %fp@(-4),%a2 43330: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00044b78 : int _STAT_NAME( const char *path, struct stat *buf ) { 44b78: 4e56 ffdc linkw %fp,#-36 44b7c: 48d7 001c moveml %d2-%d4,%sp@ 44b80: 282e 0008 movel %fp@(8),%d4 44b84: 262e 000c movel %fp@(12),%d3 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 44b88: 660e bnes 44b98 rtems_set_errno_and_return_minus_one( EFAULT ); 44b8a: 4eb9 0004 e3fc jsr 4e3fc <__errno> 44b90: 2040 moveal %d0,%a0 44b92: 700e moveq #14,%d0 44b94: 2080 movel %d0,%a0@ 44b96: 605a bras 44bf2 status = rtems_filesystem_evaluate_path( path, strlen( path ), 44b98: 2f04 movel %d4,%sp@- 44b9a: 240e movel %fp,%d2 44b9c: 0682 ffff ffec addil #-20,%d2 44ba2: 4eb9 0004 f8e4 jsr 4f8e4 44ba8: 4297 clrl %sp@ 44baa: 2f02 movel %d2,%sp@- 44bac: 42a7 clrl %sp@- 44bae: 2f00 movel %d0,%sp@- 44bb0: 2f04 movel %d4,%sp@- 44bb2: 4eb9 0004 44c0 jsr 444c0 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 44bb8: 4fef 0014 lea %sp@(20),%sp 44bbc: 4a80 tstl %d0 44bbe: 6632 bnes 44bf2 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 44bc0: 4878 0046 pea 46 44bc4: 42a7 clrl %sp@- 44bc6: 2f03 movel %d3,%sp@- 44bc8: 4eb9 0004 ec8c jsr 4ec8c status = (*loc.handlers->fstat_h)( &loc, buf ); 44bce: 206e fff4 moveal %fp@(-12),%a0 44bd2: 2f03 movel %d3,%sp@- 44bd4: 2f02 movel %d2,%sp@- 44bd6: 2068 0018 moveal %a0@(24),%a0 44bda: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 44bdc: 2f02 movel %d2,%sp@- 44bde: 2d40 ffe8 movel %d0,%fp@(-24) 44be2: 4eb9 0004 468c jsr 4468c return status; 44be8: 202e ffe8 movel %fp@(-24),%d0 44bec: 4fef 0018 lea %sp@(24),%sp 44bf0: 6002 bras 44bf4 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; 44bf2: 70ff moveq #-1,%d0 status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 44bf4: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 44bfa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042e54 : #include "malloc_p.h" void *malloc( size_t size ) { 42e54: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 42e58: 52b9 0005 d6f4 addql #1,5d6f4 #include "malloc_p.h" void *malloc( size_t size ) { 42e5e: 2f03 movel %d3,%sp@- 42e60: 2f02 movel %d2,%sp@- 42e62: 242e 0008 movel %fp@(8),%d2 MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 42e66: 4eb9 0004 2d4a jsr 42d4a /* * Validate the parameters */ if ( !size ) 42e6c: 4a82 tstl %d2 42e6e: 677e beqs 42eee return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42e70: 7003 moveq #3,%d0 42e72: b0b9 0005 d968 cmpl 5d968 <_System_state_Current>,%d0 42e78: 660a bnes 42e84 !malloc_is_system_state_OK() ) 42e7a: 4eb9 0004 2d0c jsr 42d0c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 42e80: 4a00 tstb %d0 42e82: 676a beqs 42eee <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 42e84: 42a7 clrl %sp@- 42e86: 42a7 clrl %sp@- 42e88: 2f02 movel %d2,%sp@- 42e8a: 2f39 0005 bfaa movel 5bfaa ,%sp@- 42e90: 4eb9 0004 7320 jsr 47320 <_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 ) { 42e96: 4fef 0010 lea %sp@(16),%sp 42e9a: 4a80 tstl %d0 42e9c: 6626 bnes 42ec4 if (rtems_malloc_sbrk_helpers) 42e9e: 2079 0005 c6a4 moveal 5c6a4 ,%a0 42ea4: 4a88 tstl %a0 42ea6: 670e beqs 42eb6 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42ea8: 2f02 movel %d2,%sp@- 42eaa: 2068 0004 moveal %a0@(4),%a0 42eae: 4e90 jsr %a0@ if ( !return_this ) { 42eb0: 588f addql #4,%sp return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 42eb2: 2600 movel %d0,%d3 if ( !return_this ) { 42eb4: 6610 bnes 42ec6 errno = ENOMEM; 42eb6: 4eb9 0004 c034 jsr 4c034 <__errno> 42ebc: 2040 moveal %d0,%a0 42ebe: 700c moveq #12,%d0 42ec0: 2080 movel %d0,%a0@ 42ec2: 602a bras 42eee * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 42ec4: 2600 movel %d0,%d3 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 42ec6: 2079 0005 c6a0 moveal 5c6a0 ,%a0 42ecc: 4a88 tstl %a0 42ece: 6708 beqs 42ed8 (*rtems_malloc_dirty_helper)( return_this, size ); 42ed0: 2f02 movel %d2,%sp@- 42ed2: 2f03 movel %d3,%sp@- 42ed4: 4e90 jsr %a0@ 42ed6: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 42ed8: 2079 0005 c6a8 moveal 5c6a8 ,%a0 42ede: 4a88 tstl %a0 42ee0: 670e beqs 42ef0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 42ee2: 2f03 movel %d3,%sp@- 42ee4: 2068 0004 moveal %a0@(4),%a0 42ee8: 4e90 jsr %a0@ 42eea: 588f addql #4,%sp 42eec: 6002 bras 42ef0 /* * 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() ) return NULL; 42eee: 4283 clrl %d3 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 42ef0: 2003 movel %d3,%d0 42ef2: 242e fff8 movel %fp@(-8),%d2 42ef6: 262e fffc movel %fp@(-4),%d3 42efa: 4e5e unlk %fp ... =============================================================================== 00042be0 : #include "malloc_p.h" int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { 42be0: 4e56 0000 linkw %fp,#0 42be4: 2f02 movel %d2,%sp@- 42be6: 242e 0008 movel %fp@(8),%d2 if ( !stats ) 42bea: 6732 beqs 42c1e <== NEVER TAKEN return -1; _RTEMS_Lock_allocator(); 42bec: 2f39 0005 d598 movel 5d598 <_RTEMS_Allocator_Mutex>,%sp@- 42bf2: 4eb9 0004 6104 jsr 46104 <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 42bf8: 4878 002c pea 2c 42bfc: 4879 0005 d3c0 pea 5d3c0 42c02: 2f02 movel %d2,%sp@- 42c04: 4eb9 0004 c620 jsr 4c620 _RTEMS_Unlock_allocator(); 42c0a: 2f39 0005 d598 movel 5d598 <_RTEMS_Allocator_Mutex>,%sp@- 42c10: 4eb9 0004 6164 jsr 46164 <_API_Mutex_Unlock> return 0; 42c16: 4fef 0014 lea %sp@(20),%sp 42c1a: 4280 clrl %d0 42c1c: 6002 bras 42c20 int malloc_get_statistics( rtems_malloc_statistics_t *stats ) { if ( !stats ) return -1; 42c1e: 70ff moveq #-1,%d0 _RTEMS_Lock_allocator(); *stats = rtems_malloc_statistics; _RTEMS_Unlock_allocator(); return 0; } 42c20: 242e fffc movel %fp@(-4),%d2 42c24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042ed4 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 42ed4: 4e56 fff4 linkw %fp,#-12 * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 42ed8: 2039 0005 d9f4 movel 5d9f4 ,%d0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { 42ede: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42ee2: 262e 0008 movel %fp@(8),%d3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 42ee6: 4a80 tstl %d0 42ee8: 676a beqs 42f54 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 42eea: 2403 movel %d3,%d2 42eec: d480 addl %d0,%d2 starting_address = (void *) sbrk(the_size); 42eee: 45f9 0004 072e lea 4072e ,%a2 sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 42ef4: 4c40 2002 remul %d0,%d2,%d2 42ef8: 4c00 2800 mulsl %d0,%d2 starting_address = (void *) sbrk(the_size); 42efc: 2f02 movel %d2,%sp@- 42efe: 4e92 jsr %a2@ if ( starting_address == (void*) -1 ) 42f00: 588f addql #4,%sp 42f02: 72ff moveq #-1,%d1 42f04: b280 cmpl %d0,%d1 42f06: 674c beqs 42f54 return (void *) 0; if ( !_Protected_heap_Extend( 42f08: 2f02 movel %d2,%sp@- 42f0a: 2f00 movel %d0,%sp@- 42f0c: 2f39 0005 c13a movel 5c13a ,%sp@- 42f12: 4eb9 0004 7354 jsr 47354 <_Protected_heap_Extend> 42f18: 4fef 000c lea %sp@(12),%sp 42f1c: 4a00 tstb %d0 42f1e: 6616 bnes 42f36 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 42f20: 4482 negl %d2 42f22: 2f02 movel %d2,%sp@- 42f24: 4e92 jsr %a2@ errno = ENOMEM; 42f26: 4eb9 0004 c274 jsr 4c274 <__errno> return (void *) 0; 42f2c: 588f addql #4,%sp return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 42f2e: 2040 moveal %d0,%a0 42f30: 700c moveq #12,%d0 42f32: 2080 movel %d0,%a0@ 42f34: 601e bras 42f54 42f36: 42a7 clrl %sp@- return (void *) 0; } MSBUMP(space_available, the_size); 42f38: d5b9 0005 d9c8 addl %d2,5d9c8 42f3e: 42a7 clrl %sp@- 42f40: 2f03 movel %d3,%sp@- 42f42: 2f39 0005 c13a movel 5c13a ,%sp@- 42f48: 4eb9 0004 7314 jsr 47314 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 42f4e: 4fef 0010 lea %sp@(16),%sp 42f52: 6002 bras 42f56 the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 42f54: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 42f56: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 42f5c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f60 : void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 42f60: 4e56 0000 linkw %fp,#0 42f64: 222e 000c movel %fp@(12),%d1 42f68: 202e 0008 movel %fp@(8),%d0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 42f6c: 23c1 0005 d9f4 movel %d1,5d9f4 * If the starting address is 0 then we are to attempt to * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { 42f72: 4a80 tstl %d0 42f74: 6626 bnes 42f9c uaddress = (uintptr_t)sbrk(length); 42f76: 2f01 movel %d1,%sp@- 42f78: 4eb9 0004 072e jsr 4072e if (uaddress == (uintptr_t) -1) { 42f7e: 588f addql #4,%sp 42f80: 72ff moveq #-1,%d1 42f82: b280 cmpl %d0,%d1 42f84: 660a bnes 42f90 <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 42f86: 4878 001a pea 1a 42f8a: 4eb9 0004 6108 jsr 46108 /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 42f90: 7203 moveq #3,%d1 <== NOT EXECUTED 42f92: c280 andl %d0,%d1 <== NOT EXECUTED 42f94: 6706 beqs 42f9c <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 42f96: 5880 addql #4,%d0 <== NOT EXECUTED 42f98: 72fc moveq #-4,%d1 <== NOT EXECUTED 42f9a: c081 andl %d1,%d0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 42f9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b60e : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4b60e: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4b610: 4e56 fff0 linkw %fp,#-16 4b614: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b618: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b61c: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4b620: b0ab 0048 cmpl %a3@(72),%d0 4b624: 6620 bnes 4b646 if (iop->offset > the_jnode->info.linearfile.size) 4b626: 202b 004c movel %a3@(76),%d0 4b62a: 222b 0050 movel %a3@(80),%d1 4b62e: 242a 000c movel %a2@(12),%d2 4b632: 262a 0010 movel %a2@(16),%d3 4b636: 9681 subl %d1,%d3 4b638: 9580 subxl %d0,%d2 4b63a: 6f44 bles 4b680 <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 4b63c: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4b640: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4b644: 603a bras 4b680 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4b646: 2f2a 0010 movel %a2@(16),%sp@- 4b64a: 2f2a 000c movel %a2@(12),%sp@- 4b64e: 2f0b movel %a3,%sp@- 4b650: 4eb9 0004 b24c jsr 4b24c 4b656: 4fef 000c lea %sp@(12),%sp 4b65a: 4a80 tstl %d0 4b65c: 6712 beqs 4b670 rtems_set_errno_and_return_minus_one( ENOSPC ); 4b65e: 4eb9 0004 c034 jsr 4c034 <__errno> 4b664: 761c moveq #28,%d3 4b666: 2040 moveal %d0,%a0 4b668: 2083 movel %d3,%a0@ 4b66a: 70ff moveq #-1,%d0 4b66c: 72ff moveq #-1,%d1 4b66e: 6018 bras 4b688 iop->size = the_jnode->info.file.size; 4b670: 202b 004c movel %a3@(76),%d0 4b674: 222b 0050 movel %a3@(80),%d1 4b678: 2540 0004 movel %d0,%a2@(4) 4b67c: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4b680: 202a 000c movel %a2@(12),%d0 4b684: 222a 0010 movel %a2@(16),%d1 } 4b688: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b68e: 4e5e unlk %fp ... =============================================================================== 0004b502 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4b502: 4e56 fff0 linkw %fp,#-16 4b506: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b50a: 266e 0008 moveal %fp@(8),%a3 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4b50e: 202b 0014 movel %a3@(20),%d0 4b512: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4b518: 246b 0018 moveal %a3@(24),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4b51c: 674c beqs 4b56a && (the_jnode->type == IMFS_LINEAR_FILE)) { 4b51e: 7006 moveq #6,%d0 4b520: b0aa 0048 cmpl %a2@(72),%d0 4b524: 6644 bnes 4b56a <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; 4b526: 7405 moveq #5,%d2 <== NOT EXECUTED 4b528: 2542 0048 movel %d2,%a2@(72) <== NOT EXECUTED /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 4b52c: 202a 0050 movel %a2@(80),%d0 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4b530: 4282 clrl %d2 <== NOT EXECUTED 4b532: 4283 clrl %d3 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4b534: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4b538: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4b53c: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4b540: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 4b544: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4b548: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4b54c: 4a80 tstl %d0 <== NOT EXECUTED 4b54e: 671a beqs 4b56a <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4b550: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b552: 76ff moveq #-1,%d3 <== NOT EXECUTED 4b554: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4b556: 42a7 clrl %sp@- <== NOT EXECUTED 4b558: 42a7 clrl %sp@- <== NOT EXECUTED 4b55a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b55c: 4eb9 0004 b35c jsr 4b35c <== NOT EXECUTED 4b562: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4b566: b680 cmpl %d0,%d3 <== NOT EXECUTED 4b568: 6730 beqs 4b59a <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4b56a: 202b 0014 movel %a3@(20),%d0 4b56e: 0280 0000 0200 andil #512,%d0 4b574: 6710 beqs 4b586 iop->offset = the_jnode->info.file.size; 4b576: 202a 004c movel %a2@(76),%d0 4b57a: 222a 0050 movel %a2@(80),%d1 4b57e: 2740 000c movel %d0,%a3@(12) 4b582: 2741 0010 movel %d1,%a3@(16) iop->size = the_jnode->info.file.size; return 0; 4b586: 4280 clrl %d0 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 4b588: 222a 004c movel %a2@(76),%d1 4b58c: 242a 0050 movel %a2@(80),%d2 4b590: 2741 0004 movel %d1,%a3@(4) 4b594: 2742 0008 movel %d2,%a3@(8) return 0; 4b598: 6002 bras 4b59c the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; 4b59a: 70ff moveq #-1,%d0 <== NOT EXECUTED if (iop->flags & LIBIO_FLAGS_APPEND) iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; return 0; } 4b59c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b5a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042f20 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42f20: 4e56 ffd4 linkw %fp,#-44 42f24: 48d7 001c moveml %d2-%d4,%sp@ 42f28: 262e 000c movel %fp@(12),%d3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 42f2c: 2003 movel %d3,%d0 42f2e: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 42f34: 282e 0008 movel %fp@(8),%d4 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 42f38: 0c80 0000 4000 cmpil #16384,%d0 42f3e: 6732 beqs 42f72 42f40: 6212 bhis 42f54 42f42: 0c80 0000 1000 cmpil #4096,%d0 42f48: 6728 beqs 42f72 42f4a: 0c80 0000 2000 cmpil #8192,%d0 42f50: 6612 bnes 42f64 42f52: 601e bras 42f72 42f54: 0c80 0000 6000 cmpil #24576,%d0 42f5a: 6716 beqs 42f72 42f5c: 0c80 0000 8000 cmpil #32768,%d0 42f62: 670e beqs 42f72 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 42f64: 4eb9 0004 c034 jsr 4c034 <__errno> 42f6a: 2040 moveal %d0,%a0 42f6c: 7016 moveq #22,%d0 42f6e: 2080 movel %d0,%a0@ 42f70: 6064 bras 42fd6 } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 42f72: 240e movel %fp,%d2 42f74: 0682 ffff ffe4 addil #-28,%d2 42f7a: 2f02 movel %d2,%sp@- 42f7c: 486e fff8 pea %fp@(-8) 42f80: 2f04 movel %d4,%sp@- 42f82: 4eb9 0004 3840 jsr 43840 result = (*temp_loc.ops->evalformake_h)( 42f88: 486e fffc pea %fp@(-4) 42f8c: d8ae fff8 addl %fp@(-8),%d4 42f90: 2f02 movel %d2,%sp@- 42f92: 206e fff0 moveal %fp@(-16),%a0 42f96: 2f04 movel %d4,%sp@- 42f98: 2068 0004 moveal %a0@(4),%a0 42f9c: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 42f9e: 4fef 0018 lea %sp@(24),%sp 42fa2: 4a80 tstl %d0 42fa4: 6630 bnes 42fd6 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 42fa6: 2f02 movel %d2,%sp@- 42fa8: 2f2e 0014 movel %fp@(20),%sp@- 42fac: 2f2e 0010 movel %fp@(16),%sp@- 42fb0: 206e fff0 moveal %fp@(-16),%a0 42fb4: 2f03 movel %d3,%sp@- 42fb6: 2f2e fffc movel %fp@(-4),%sp@- 42fba: 2068 0014 moveal %a0@(20),%a0 42fbe: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 42fc0: 2f02 movel %d2,%sp@- 42fc2: 2d40 ffe0 movel %d0,%fp@(-32) 42fc6: 4eb9 0004 2b54 jsr 42b54 return result; 42fcc: 202e ffe0 movel %fp@(-32),%d0 42fd0: 4fef 0018 lea %sp@(24),%sp 42fd4: 6002 bras 42fd8 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 42fd6: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 42fd8: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 42fde: 4e5e unlk %fp ... =============================================================================== 00043066 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 43066: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43068: 4e56 ffbc linkw %fp,#-68 4306c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43070: 2a2e 0008 movel %fp@(8),%d5 43074: 262e 000c movel %fp@(12),%d3 43078: 266e 0010 moveal %fp@(16),%a3 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4307c: b0ae 0014 cmpl %fp@(20),%d0 43080: 6510 bcss 43092 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 43082: 2f0b movel %a3,%sp@- 43084: 4eb9 0004 9fb4 jsr 49fb4 if ( !mount_h ) 4308a: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 4308c: 2a40 moveal %d0,%a5 if ( !mount_h ) 4308e: 4a80 tstl %d0 43090: 6610 bnes 430a2 rtems_set_errno_and_return_minus_one( EINVAL ); 43092: 4eb9 0004 c034 jsr 4c034 <__errno> 43098: 7816 moveq #22,%d4 4309a: 2040 moveal %d0,%a0 4309c: 2084 movel %d4,%a0@ 4309e: 6000 0222 braw 432c2 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 430a2: 4a83 tstl %d3 430a4: 56c2 sne %d2 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 430a6: 283c 0005 ac98 movel #371864,%d4 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 430ac: 4482 negl %d2 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 430ae: 4a02 tstb %d2 430b0: 6702 beqs 430b4 430b2: 2803 movel %d3,%d4 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 430b4: 2f0b movel %a3,%sp@- 430b6: 45f9 0004 d3a0 lea 4d3a0 ,%a2 430bc: 4e92 jsr %a2@ 430be: 588f addql #4,%sp 430c0: 2c00 movel %d0,%d6 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 430c2: 4a85 tstl %d5 430c4: 670c beqs 430d2 430c6: 2f05 movel %d5,%sp@- 430c8: 4e92 jsr %a2@ 430ca: 588f addql #4,%sp 430cc: 2840 moveal %d0,%a4 430ce: 528c addql #1,%a4 430d0: 6002 bras 430d4 430d2: 99cc subal %a4,%a4 size_t target_size = strlen( target ) + 1; 430d4: 2f04 movel %d4,%sp@- 430d6: 4eb9 0004 d3a0 jsr 4d3a0 430dc: 588f addql #4,%sp 430de: 2200 movel %d0,%d1 430e0: 5281 addql #1,%d1 430e2: 2e00 movel %d0,%d7 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 430e4: 41f4 6875 lea %a4@(00000075,%d6:l),%a0 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 430e8: 2d41 ffe8 movel %d1,%fp@(-24) size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 430ec: 4870 1800 pea %a0@(00000000,%d1:l) 430f0: 4878 0001 pea 1 430f4: 4eb9 0004 27cc jsr 427cc if ( mt_entry != NULL ) { 430fa: 508f addql #8,%sp size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 430fc: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 430fe: 4a80 tstl %d0 43100: 6770 beqs 43172 <== NEVER TAKEN const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 43102: 2206 movel %d6,%d1 43104: 5281 addql #1,%d1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); 43106: 2c00 movel %d0,%d6 43108: 0686 0000 0074 addil #116,%d6 memcpy( str, filesystemtype, filesystemtype_size ); 4310e: 2f01 movel %d1,%sp@- 43110: 2f0b movel %a3,%sp@- 43112: 47f9 0004 c854 lea 4c854 ,%a3 43118: 2f06 movel %d6,%sp@- 4311a: 2d41 ffe4 movel %d1,%fp@(-28) 4311e: 4e93 jsr %a3@ mt_entry->type = str; str += filesystemtype_size; 43120: 222e ffe4 movel %fp@(-28),%d1 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 43124: 2546 006c movel %d6,%a2@(108) str += filesystemtype_size; 43128: dc81 addl %d1,%d6 memcpy( str, source_or_null, source_size ); 4312a: 2f0c movel %a4,%sp@- 4312c: 2f05 movel %d5,%sp@- 4312e: 2f06 movel %d6,%sp@- 43130: 4e93 jsr %a3@ mt_entry->dev = str; 43132: 2546 0070 movel %d6,%a2@(112) str += source_size; memcpy( str, target, target_size ); 43136: 2f2e ffe8 movel %fp@(-24),%sp@- mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 4313a: dc8c addl %a4,%d6 memcpy( str, target, target_size ); 4313c: 2f04 movel %d4,%sp@- 4313e: 2f06 movel %d6,%sp@- 43140: 4e93 jsr %a3@ ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 43142: 206e 0014 moveal %fp@(20),%a0 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43146: 4fef 0024 lea %sp@(36),%sp memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 4314a: 2546 0068 movel %d6,%a2@(104) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 4314e: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; 43152: 2548 0030 movel %a0,%a2@(48) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43156: 4878 0030 pea 30 4315a: 4879 0005 b14c pea 5b14c 43160: 486a 0038 pea %a2@(56) 43164: 4e93 jsr %a3@ /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 43166: 4fef 000c lea %sp@(12),%sp 4316a: 4a02 tstb %d2 4316c: 6700 00b2 beqw 43220 43170: 6010 bras 43182 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43172: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 43178: 760c moveq #12,%d3 <== NOT EXECUTED 4317a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4317c: 2083 movel %d3,%a0@ <== NOT EXECUTED 4317e: 6000 0142 braw 432c2 <== NOT EXECUTED * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 43182: 4878 0001 pea 1 43186: 280e movel %fp,%d4 43188: 0684 ffff ffec addil #-20,%d4 4318e: 2f04 movel %d4,%sp@- 43190: 4878 0007 pea 7 43194: 2f07 movel %d7,%sp@- 43196: 2f03 movel %d3,%sp@- 43198: 4eb9 0004 2a88 jsr 42a88 4319e: 4fef 0014 lea %sp@(20),%sp 431a2: 72ff moveq #-1,%d1 431a4: b280 cmpl %d0,%d1 431a6: 6700 00fa beqw 432a2 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 431aa: 206e fff8 moveal %fp@(-8),%a0 431ae: 2f04 movel %d4,%sp@- 431b0: 2068 0010 moveal %a0@(16),%a0 431b4: 4e90 jsr %a0@ 431b6: 588f addql #4,%sp 431b8: 7201 moveq #1,%d1 431ba: b280 cmpl %d0,%d1 431bc: 670e beqs 431cc errno = ENOTDIR; 431be: 4eb9 0004 c034 jsr 4c034 <__errno> 431c4: 7414 moveq #20,%d2 431c6: 2040 moveal %d0,%a0 431c8: 2082 movel %d2,%a0@ 431ca: 6020 bras 431ec /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 431cc: 2f2e ffec movel %fp@(-20),%sp@- 431d0: 487a fe12 pea %pc@(42fe4 ) 431d4: 4eb9 0004 3018 jsr 43018 431da: 508f addql #8,%sp 431dc: 4a00 tstb %d0 431de: 6712 beqs 431f2 errno = EBUSY; 431e0: 4eb9 0004 c034 jsr 4c034 <__errno> 431e6: 7210 moveq #16,%d1 431e8: 2040 moveal %d0,%a0 431ea: 2081 movel %d1,%a0@ if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 431ec: 2604 movel %d4,%d3 * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { errno = EBUSY; goto cleanup_and_bail; 431ee: 6000 00b4 braw 432a4 * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 431f2: 206e fff8 moveal %fp@(-8),%a0 if ( has_target ) { if ( rtems_filesystem_evaluate_path( target, target_length, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) goto cleanup_and_bail; loc_to_free = &loc; 431f6: 2604 movel %d4,%d3 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 431f8: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 431fe: 256e fff4 0010 movel %fp@(-12),%a2@(16) mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 43204: 256e fffc 0018 movel %fp@(-4),%a2@(24) * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 4320a: 2548 0014 movel %a0,%a2@(20) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 4320e: 2f0a movel %a2,%sp@- 43210: 2068 0020 moveal %a0@(32),%a0 43214: 4e90 jsr %a0@ 43216: 588f addql #4,%sp 43218: 4a80 tstl %d0 4321a: 6600 0088 bnew 432a4 4321e: 601e bras 4323e } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 43220: 203c 0005 c018 movel #376856,%d0 43226: b0b9 0005 c014 cmpl 5c014 ,%d0 4322c: 670e beqs 4323c <== ALWAYS TAKEN errno = EINVAL; 4322e: 4eb9 0004 c034 jsr 4c034 <__errno> <== NOT EXECUTED 43234: 2040 moveal %d0,%a0 <== NOT EXECUTED 43236: 7016 moveq #22,%d0 <== NOT EXECUTED 43238: 2080 movel %d0,%a0@ <== NOT EXECUTED 4323a: 6066 bras 432a2 <== NOT EXECUTED ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 4323c: 4283 clrl %d3 * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 4323e: 2f2e 0018 movel %fp@(24),%sp@- 43242: 2f0a movel %a2,%sp@- 43244: 4e95 jsr %a5@ 43246: 508f addql #8,%sp 43248: 4a80 tstl %d0 4324a: 6710 beqs 4325c /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 4324c: 206e fff8 moveal %fp@(-8),%a0 43250: 2f0a movel %a2,%sp@- 43252: 2068 0028 moveal %a0@(40),%a0 43256: 4e90 jsr %a0@ goto cleanup_and_bail; 43258: 588f addql #4,%sp 4325a: 6048 bras 432a4 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 4325c: 4eba fd9e jsr %pc@(42ffc ) 43260: 2f0a movel %a2,%sp@- 43262: 4879 0005 c014 pea 5c014 43268: 4eb9 0004 635c jsr 4635c <_Chain_Append> 4326e: 2f39 0005 d6e0 movel 5d6e0 ,%sp@- 43274: 4eb9 0004 5aec jsr 45aec rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 4327a: 4fef 000c lea %sp@(12),%sp 4327e: 4a02 tstb %d2 43280: 663c bnes 432be rtems_filesystem_root = mt_entry->mt_fs_root; 43282: 4878 0014 pea 14 43286: 486a 001c pea %a2@(28) 4328a: 2079 0005 c130 moveal 5c130 ,%a0 43290: 41e8 0018 lea %a0@(24),%a0 43294: 2f08 movel %a0,%sp@- 43296: 4eb9 0004 c854 jsr 4c854 4329c: 4fef 000c lea %sp@(12),%sp 432a0: 601c bras 432be ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 432a2: 4283 clrl %d3 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 432a4: 2f0a movel %a2,%sp@- 432a6: 4eb9 0004 2b68 jsr 42b68 if ( loc_to_free ) 432ac: 588f addql #4,%sp 432ae: 4a83 tstl %d3 432b0: 6710 beqs 432c2 <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 432b2: 2f03 movel %d3,%sp@- 432b4: 4eb9 0004 2b54 jsr 42b54 432ba: 588f addql #4,%sp 432bc: 6004 bras 432c2 rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 432be: 4280 clrl %d0 432c0: 6002 bras 432c4 free( mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 432c2: 70ff moveq #-1,%d0 } 432c4: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 432ca: 4e5e unlk %fp ... =============================================================================== 00043454 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43454: 4e56 ffec linkw %fp,#-20 43458: 48d7 007c moveml %d2-%d6,%sp@ 4345c: 262e 0008 movel %fp@(8),%d3 43460: 242e 000c movel %fp@(12),%d2 43464: 282e 0010 movel %fp@(16),%d4 43468: 2a2e 0014 movel %fp@(20),%d5 4346c: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 43470: 4a82 tstl %d2 43472: 6734 beqs 434a8 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 43474: 4878 01ff pea 1ff 43478: 2f02 movel %d2,%sp@- 4347a: 4eb9 0004 3d1c jsr 43d1c if (rv == 0) { 43480: 508f addql #8,%sp 43482: 4a80 tstl %d0 43484: 6630 bnes 434b6 <== NEVER TAKEN rv = mount( 43486: 2d46 0018 movel %d6,%fp@(24) 4348a: 2d45 0014 movel %d5,%fp@(20) 4348e: 2d44 0010 movel %d4,%fp@(16) 43492: 2d42 000c movel %d2,%fp@(12) 43496: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 4349a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 434a0: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 434a2: 4ef9 0004 3542 jmp 43542 options, data ); } } else { errno = EINVAL; 434a8: 4eb9 0004 c4bc jsr 4c4bc <__errno> 434ae: 2040 moveal %d0,%a0 434b0: 7016 moveq #22,%d0 434b2: 2080 movel %d0,%a0@ const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 434b4: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 434b6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 434bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054084 : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 54084: 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) { 54086: 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; 5408a: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 5408c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 54090: 246e 0008 moveal %fp@(8),%a2 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 54094: 47ee ffa8 lea %fp@(-88),%a3 54098: 2a3c 0005 8848 movel #362568,%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; 5409e: 206a 0010 moveal %a2@(16),%a0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 540a2: 2612 movel %a2@,%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; 540a4: 2868 0034 moveal %a0@(52),%a4 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 540a8: 4878 0020 pea 20 540ac: 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) { 540ae: 242e 0010 movel %fp@(16),%d2 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 540b2: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 540b4: 2c2e 0014 movel %fp@(20),%d6 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 540b8: 2f0b movel %a3,%sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 540ba: 2a6e 000c moveal %fp@(12),%a5 540be: 2d41 fff0 movel %d1,%fp@(-16) 540c2: 282e 001c movel %fp@(28),%d4 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 540c6: 2d41 fff4 movel %d1,%fp@(-12) 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; 540ca: 3d40 fffc movew %d0,%fp@(-4) { 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; 540ce: 42ae fff8 clrl %fp@(-8) time_t time_ret = 0; uint16_t time_val = 0; uint16_t date = 0; 540d2: 3d40 fffe movew %d0,%fp@(-2) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 540d6: 42ae ffe8 clrl %fp@(-24) dir_pos->sname.ofs = 0; 540da: 42ae ffec clrl %fp@(-20) uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 540de: 4e90 jsr %a0@ memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 540e0: 4878 0040 pea 40 540e4: 2045 moveal %d5,%a0 540e6: 42a7 clrl %sp@- 540e8: 486e ff68 pea %fp@(-152) 540ec: 4e90 jsr %a0@ name_type = msdos_long_to_short (name, name_len, 540ee: 4878 000b pea b 540f2: 2f0b movel %a3,%sp@- 540f4: 2f06 movel %d6,%sp@- 540f6: 2f02 movel %d2,%sp@- 540f8: 4eb9 0005 4fe8 jsr 54fe8 /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 540fe: 4fef 0024 lea %sp@(36),%sp fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); name_type = msdos_long_to_short (name, name_len, 54102: 2e00 movel %d0,%d7 MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 54104: 4200 clrb %d0 /* set up last write date and time */ time_ret = time(NULL); 54106: 4297 clrl %sp@ name_type = msdos_long_to_short (name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 54108: 1d40 ffb4 moveb %d0,%fp@(-76) /* set up last write date and time */ time_ret = time(NULL); 5410c: 4eb9 0005 bc80 jsr 5bc80