=============================================================================== 00049140 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 49140: 7206 moveq #6,%d1 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 49142: 4e56 0000 linkw %fp,#0 49146: 206e 0008 moveal %fp@(8),%a0 4914a: 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 ) { 4914c: 2450 moveal %a0@,%a2 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4914e: 2268 0010 moveal %a0@(16),%a1 switch( node->type ) { 49152: 202a 0048 movel %a2@(72),%d0 49156: 5380 subql #1,%d0 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 49158: 2269 0034 moveal %a1@(52),%a1 switch( node->type ) { 4915c: b280 cmpl %d0,%d1 4915e: 6546 bcss 491a6 <== NEVER TAKEN 49160: 303b 0a08 movew %pc@(4916a ,%d0:l:2),%d0 49164: 48c0 extl %d0 49166: 4efb 0802 jmp %pc@(4916a ,%d0:l) 4916a: 000e .short 0x000e <== NOT EXECUTED 4916c: 0016 .short 0x0016 <== NOT EXECUTED 4916e: 0022 .short 0x0022 <== NOT EXECUTED 49170: 0022 .short 0x0022 <== NOT EXECUTED 49172: 002e .short 0x002e <== NOT EXECUTED 49174: 002e .short 0x002e <== NOT EXECUTED 49176: 0036 .short 0x0036 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 49178: 2169 000c 0008 movel %a1@(12),%a0@(8) break; 4917e: 6026 bras 491a6 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 49180: 203c 0005 c542 movel #378178,%d0 49186: 2140 0008 movel %d0,%a0@(8) break; 4918a: 601a bras 491a6 case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4918c: 223c 0005 c5b2 movel #378290,%d1 49192: 2141 0008 movel %d1,%a0@(8) break; 49196: 600e bras 491a6 case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 49198: 2169 0008 0008 movel %a1@(8),%a0@(8) break; 4919e: 6006 bras 491a6 case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 491a0: 2169 0010 0008 movel %a1@(16),%a0@(8) break; } return 0; } 491a6: 245f moveal %sp@+,%a2 491a8: 4280 clrl %d0 491aa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ec0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 48ec0: 4e56 ffe8 linkw %fp,#-24 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 48ec4: 206e 0008 moveal %fp@(8),%a0 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 48ec8: 48d7 041c moveml %d2-%d4/%a2,%sp@ IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 48ecc: 2450 moveal %a0@,%a2 */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 48ece: 4284 clrl %d4 int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 48ed0: 362e 000e movew %fp@(14),%d3 48ed4: 342e 0012 movew %fp@(18),%d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 48ed8: 4eb9 0004 9e20 jsr 49e20 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 48ede: 4281 clrl %d1 48ee0: 3800 movew %d0,%d4 48ee2: 322a 0038 movew %a2@(56),%d1 48ee6: b284 cmpl %d4,%d1 48ee8: 6714 beqs 48efe 48eea: 4a40 tstw %d0 48eec: 6710 beqs 48efe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 48eee: 4eb9 0004 cd68 jsr 4cd68 <__errno> 48ef4: 2040 moveal %d0,%a0 48ef6: 7001 moveq #1,%d0 48ef8: 2080 movel %d0,%a0@ 48efa: 70ff moveq #-1,%d0 48efc: 601e bras 48f1c #endif jnode->st_uid = owner; 48efe: 3543 0038 movew %d3,%a2@(56) jnode->st_gid = group; 48f02: 3542 003a movew %d2,%a2@(58) IMFS_update_ctime( jnode ); 48f06: 42a7 clrl %sp@- 48f08: 486e fff8 pea %fp@(-8) 48f0c: 4eb9 0004 2bf0 jsr 42bf0 48f12: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 48f18: 508f addql #8,%sp 48f1a: 4280 clrl %d0 } 48f1c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 48f22: 4e5e unlk %fp ... =============================================================================== 00048fa6 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 48fa6: 4e56 ffec linkw %fp,#-20 48faa: 206e 0008 moveal %fp@(8),%a0 48fae: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 48fb2: 242e 000c movel %fp@(12),%d2 48fb6: 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 ) 48fba: 4a88 tstl %a0 48fbc: 6700 00ee beqw 490ac return NULL; parent = parent_loc->node_access; 48fc0: 2850 moveal %a0@,%a4 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48fc2: 7007 moveq #7,%d0 */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 48fc4: 2068 0010 moveal %a0@(16),%a0 48fc8: 2668 0034 moveal %a0@(52),%a3 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 48fcc: b082 cmpl %d2,%d0 48fce: 660e bnes 48fde 48fd0: 223c 0005 c4d2 movel #378066,%d1 48fd6: b2ab 0010 cmpl %a3@(16),%d1 48fda: 6700 00d0 beqw 490ac return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 48fde: 2079 0005 d420 moveal 5d420 ,%a0 48fe4: 2028 002c movel %a0@(44),%d0 48fe8: 4680 notl %d0 48fea: c0ae 0014 andl %fp@(20),%d0 48fee: 2f00 movel %d0,%sp@- 48ff0: 2f2e 0010 movel %fp@(16),%sp@- 48ff4: 2f02 movel %d2,%sp@- 48ff6: 4eb9 0004 8f28 jsr 48f28 if ( !node ) 48ffc: 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 ); 49000: 2a40 moveal %d0,%a5 if ( !node ) 49002: 4a80 tstl %d0 49004: 6700 00a8 beqw 490ae return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 49008: 7001 moveq #1,%d0 4900a: b082 cmpl %d2,%d0 4900c: 6616 bnes 49024 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 ); 4900e: 41ed 0050 lea %a5@(80),%a0 49012: 2b48 004c movel %a0,%a5@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 49016: 41ed 004c lea %a5@(76),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4901a: 42ad 0050 clrl %a5@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4901e: 2b48 0054 movel %a0,%a5@(84) 49022: 6066 bras 4908a rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 49024: 7003 moveq #3,%d0 49026: b082 cmpl %d2,%d0 49028: 6706 beqs 49030 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 4902a: 7204 moveq #4,%d1 4902c: b282 cmpl %d2,%d1 4902e: 6606 bnes 49036 node->info.sym_link.name = info->sym_link.name; 49030: 2b52 004c movel %a2@,%a5@(76) 49034: 6054 bras 4908a } else if ( type == IMFS_DEVICE ) { 49036: 7002 moveq #2,%d0 49038: b082 cmpl %d2,%d0 4903a: 660c bnes 49048 node->info.device.major = info->device.major; 4903c: 2b52 004c movel %a2@,%a5@(76) node->info.device.minor = info->device.minor; 49040: 2b6a 0004 0050 movel %a2@(4),%a5@(80) 49046: 6042 bras 4908a } else if ( type == IMFS_LINEAR_FILE ) { 49048: 7206 moveq #6,%d1 4904a: b282 cmpl %d2,%d1 4904c: 6612 bnes 49060 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; 4904e: 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; 49052: 4280 clrl %d0 49054: 4281 clrl %d1 49056: 2b40 004c movel %d0,%a5@(76) 4905a: 2b41 0050 movel %d1,%a5@(80) 4905e: 602a bras 4908a node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 49060: 7205 moveq #5,%d1 49062: b282 cmpl %d2,%d1 49064: 661a bnes 49080 node->info.file.size = 0; node->info.file.indirect = 0; 49066: 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; 4906a: 4280 clrl %d0 4906c: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4906e: 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; 49072: 2b40 004c movel %d0,%a5@(76) 49076: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4907a: 42ad 005c clrl %a5@(92) 4907e: 600a bras 4908a } else if ( type == IMFS_FIFO ) { 49080: 7207 moveq #7,%d1 49082: b282 cmpl %d2,%d1 49084: 6604 bnes 4908a <== NEVER TAKEN node->info.fifo.pipe = NULL; 49086: 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; 4908a: 202b 0004 movel %a3@(4),%d0 4908e: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 49090: 2b4c 0008 movel %a4,%a5@(8) node->st_ino = ++fs_info->ino_count; 49094: 2740 0004 movel %d0,%a3@(4) 49098: 2b40 0034 movel %d0,%a5@(52) 4909c: 2f0d movel %a5,%sp@- 4909e: 486c 004c pea %a4@(76) 490a2: 4eb9 0004 63b4 jsr 463b4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 490a8: 508f addql #8,%sp 490aa: 6002 bras 490ae /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 490ac: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 490ae: 200d movel %a5,%d0 490b0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 490b6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049268 : 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 ) ) { 49268: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4926a: 4e56 ffac linkw %fp,#-84 4926e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49272: 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 ) ) { 49276: c083 andl %d3,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 49278: 286e 0008 moveal %fp@(8),%a4 4927c: 246e 0014 moveal %fp@(20),%a2 int i = 0; 49280: 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 ) ) { 49284: 4a80 tstl %d0 49286: 6710 beqs 49298 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 49288: 4eb9 0004 cd68 jsr 4cd68 <__errno> <== NOT EXECUTED 4928e: 7c05 moveq #5,%d6 <== NOT EXECUTED 49290: 2040 moveal %d0,%a0 <== NOT EXECUTED 49292: 2086 movel %d6,%a0@ <== NOT EXECUTED 49294: 6000 0248 braw 494de <== 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 ); 49298: 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); 4929a: 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 ); 4929c: 0684 ffff ffd7 addil #-41,%d4 492a2: 2e3c 0004 9984 movel #301444,%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 ) ) 492a8: 4bf9 0004 91ae lea 491ae ,%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); 492ae: 0685 0000 000c addil #12,%d5 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 492b4: 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 ); 492b6: 486e fffc pea %fp@(-4) 492ba: 200c movel %a4,%d0 492bc: d0ae fff8 addl %fp@(-8),%d0 492c0: 2047 moveal %d7,%a0 492c2: 2f04 movel %d4,%sp@- 492c4: 2f2e 000c movel %fp@(12),%sp@- 492c8: 2f00 movel %d0,%sp@- 492ca: 4e90 jsr %a0@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 492cc: 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 ); 492d0: 2400 movel %d0,%d2 pathnamelen -= len; 492d2: 202e fffc movel %fp@(-4),%d0 492d6: 91ae 000c subl %d0,%fp@(12) i += len; 492da: d1ae fff8 addl %d0,%fp@(-8) if ( !pathloc->node_access ) 492de: 4a92 tstl %a2@ 492e0: 6700 00ea beqw 493cc rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 492e4: 4a82 tstl %d2 492e6: 6718 beqs 49300 if ( node->type == IMFS_DIRECTORY ) 492e8: 7001 moveq #1,%d0 492ea: b0ab 0048 cmpl %a3@(72),%d0 492ee: 6610 bnes 49300 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 492f0: 4878 0001 pea 1 492f4: 2f0a movel %a2,%sp@- 492f6: 4e95 jsr %a5@ 492f8: 508f addql #8,%sp 492fa: 4a80 tstl %d0 492fc: 6700 01d4 beqw 494d2 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49300: 2652 moveal %a2@,%a3 switch( type ) { 49302: 7003 moveq #3,%d0 49304: b082 cmpl %d2,%d0 49306: 6762 beqs 4936a 49308: 7204 moveq #4,%d1 4930a: b282 cmpl %d2,%d1 4930c: 6700 0144 beqw 49452 49310: 7c02 moveq #2,%d6 49312: bc82 cmpl %d2,%d6 49314: 6600 014a bnew 49460 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 49318: 2079 0005 d420 moveal 5d420 ,%a0 4931e: b7e8 0018 cmpal %a0@(24),%a3 49322: 6792 beqs 492b6 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; 49324: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 49328: b7e8 001c cmpal %a0@(28),%a3 4932c: 6630 bnes 4935e */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 4932e: 4878 0014 pea 14 49332: 4868 0008 pea %a0@(8) 49336: 2f0a movel %a2,%sp@- 49338: 4eb9 0004 d588 jsr 4d588 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 4933e: 206a 000c moveal %a2@(12),%a0 49342: 202e fffc movel %fp@(-4),%d0 49346: 2200 movel %d0,%d1 49348: d2ae 000c addl %fp@(12),%d1 4934c: 2f0a movel %a2,%sp@- 4934e: 2c2e fff8 movel %fp@(-8),%d6 49352: 9c80 subl %d0,%d6 49354: 2006 movel %d6,%d0 49356: 2f03 movel %d3,%sp@- 49358: 2f01 movel %d1,%sp@- 4935a: 6000 014c braw 494a8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4935e: 266b 0008 moveal %a3@(8),%a3 49362: 4a8b tstl %a3 49364: 6600 00e6 bnew 4944c 49368: 6062 bras 493cc case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4936a: 202b 0048 movel %a3@(72),%d0 4936e: 7203 moveq #3,%d1 49370: b280 cmpl %d0,%d1 49372: 6610 bnes 49384 IMFS_evaluate_hard_link( pathloc, 0 ); 49374: 42a7 clrl %sp@- 49376: 2f0a movel %a2,%sp@- 49378: 4eb9 0004 9222 jsr 49222 node = pathloc->node_access; 4937e: 2652 moveal %a2@,%a3 49380: 508f addql #8,%sp 49382: 601e bras 493a2 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 49384: 7c04 moveq #4,%d6 49386: bc80 cmpl %d0,%d6 49388: 6618 bnes 493a2 result = IMFS_evaluate_sym_link( pathloc, 0 ); 4938a: 42a7 clrl %sp@- 4938c: 2f0a movel %a2,%sp@- 4938e: 4eb9 0004 94ec jsr 494ec /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 49394: 2652 moveal %a2@,%a3 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 49396: 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 ) 49398: 508f addql #8,%sp 4939a: 70ff moveq #-1,%d0 4939c: b082 cmpl %d2,%d0 4939e: 6700 0140 beqw 494e0 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 493a2: 7201 moveq #1,%d1 493a4: b2ab 0048 cmpl %a3@(72),%d1 493a8: 6710 beqs 493ba rtems_set_errno_and_return_minus_one( ENOTDIR ); 493aa: 4eb9 0004 cd68 jsr 4cd68 <__errno> 493b0: 7a14 moveq #20,%d5 493b2: 2040 moveal %d0,%a0 493b4: 2085 movel %d5,%a0@ 493b6: 6000 0126 braw 494de /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 493ba: 2f04 movel %d4,%sp@- 493bc: 2f0b movel %a3,%sp@- 493be: 4eb9 0004 9918 jsr 49918 if ( !node ) 493c4: 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 ); 493c6: 2640 moveal %d0,%a3 if ( !node ) 493c8: 4a80 tstl %d0 493ca: 6610 bnes 493dc rtems_set_errno_and_return_minus_one( ENOENT ); 493cc: 4eb9 0004 cd68 jsr 4cd68 <__errno> 493d2: 7802 moveq #2,%d4 493d4: 2040 moveal %d0,%a0 493d6: 2084 movel %d4,%a0@ 493d8: 6000 0104 braw 494de * 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 )) { 493dc: 7001 moveq #1,%d0 493de: b0ab 0048 cmpl %a3@(72),%d0 493e2: 6668 bnes 4944c 493e4: 4aab 0058 tstl %a3@(88) 493e8: 6762 beqs 4944c IMFS_skip_separator( pathname, &pathnamelen, &i); 493ea: 486e fff8 pea %fp@(-8) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 493ee: 240c movel %a4,%d2 493f0: 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); 493f2: 2f05 movel %d5,%sp@- 493f4: 2f0c movel %a4,%sp@- 493f6: 4eba fcfc jsr %pc@(490f4 ) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 493fa: 202e fff8 movel %fp@(-8),%d0 493fe: d480 addl %d0,%d2 49400: 2042 moveal %d2,%a0 49402: 4fef 000c lea %sp@(12),%sp 49406: 1210 moveb %a0@,%d1 49408: 49c1 extbl %d1 4940a: bc81 cmpl %d1,%d6 4940c: 660a bnes 49418 4940e: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 49412: 49c1 extbl %d1 49414: bc81 cmpl %d1,%d6 49416: 6726 beqs 4943e *pathloc = node->info.directory.mt_fs->mt_fs_root; 49418: 4878 0014 pea 14 4941c: 266b 0058 moveal %a3@(88),%a3 49420: 47eb 001c lea %a3@(28),%a3 49424: 2f0b movel %a3,%sp@- 49426: 2f0a movel %a2,%sp@- 49428: 4eb9 0004 d588 jsr 4d588 return (*pathloc->ops->evalpath_h)( &pathname[i], 4942e: 206a 000c moveal %a2@(12),%a0 49432: 2f0a movel %a2,%sp@- 49434: 2f03 movel %d3,%sp@- 49436: 2f2e 000c movel %fp@(12),%sp@- 4943a: 2f02 movel %d2,%sp@- 4943c: 606e bras 494ac pathnamelen, flags, pathloc ); } i += 2; 4943e: 5480 addql #2,%d0 pathnamelen -= 2; 49440: 55ae 000c subql #2,%fp@(12) node = node->Parent; 49444: 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; 49448: 2d40 fff8 movel %d0,%fp@(-8) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4944c: 248b movel %a3,%a2@ break; 4944e: 6000 fe66 braw 492b6 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 49452: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49458: 765b moveq #91,%d3 4945a: 2040 moveal %d0,%a0 4945c: 2083 movel %d3,%a0@ 4945e: 607e bras 494de /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 49460: 4a82 tstl %d2 49462: 6708 beqs 4946c 49464: 7004 moveq #4,%d0 49466: b082 cmpl %d2,%d0 49468: 6600 fe4c bnew 492b6 * 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 ) { 4946c: 7201 moveq #1,%d1 4946e: b2ab 0048 cmpl %a3@(72),%d1 49472: 6644 bnes 494b8 if ( node->info.directory.mt_fs != NULL ) { 49474: 206b 0058 moveal %a3@(88),%a0 49478: 4a88 tstl %a0 4947a: 673c beqs 494b8 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 4947c: 4878 0014 pea 14 <== NOT EXECUTED 49480: 4868 001c pea %a0@(28) <== NOT EXECUTED 49484: 2f0a movel %a2,%sp@- <== NOT EXECUTED 49486: 4eb9 0004 d588 jsr 4d588 <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4948c: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 49490: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 49494: 2c00 movel %d0,%d6 <== NOT EXECUTED 49496: dcae 000c addl %fp@(12),%d6 <== NOT EXECUTED 4949a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4949c: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED 494a0: 9280 subl %d0,%d1 <== NOT EXECUTED 494a2: 2001 movel %d1,%d0 <== NOT EXECUTED 494a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED 494a6: 2f06 movel %d6,%sp@- <== NOT EXECUTED 494a8: 4874 0800 pea %a4@(00000000,%d0:l) 494ac: 2050 moveal %a0@,%a0 494ae: 4e90 jsr %a0@ 494b0: 4fef 001c lea %sp@(28),%sp 494b4: 2400 movel %d0,%d2 494b6: 6028 bras 494e0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 494b8: 2f0a movel %a2,%sp@- 494ba: 4eb9 0004 9140 jsr 49140 494c0: 2400 movel %d0,%d2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 494c2: 2e83 movel %d3,%sp@ 494c4: 2f0a movel %a2,%sp@- 494c6: 4eb9 0004 91ae jsr 491ae 494cc: 508f addql #8,%sp 494ce: 4a80 tstl %d0 494d0: 660e bnes 494e0 rtems_set_errno_and_return_minus_one( EACCES ); 494d2: 4eb9 0004 cd68 jsr 4cd68 <__errno> 494d8: 740d moveq #13,%d2 494da: 2040 moveal %d0,%a0 494dc: 2082 movel %d2,%a0@ 494de: 74ff moveq #-1,%d2 return result; } 494e0: 2002 movel %d2,%d0 494e2: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 494e8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049600 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 49600: 4e56 ffa8 linkw %fp,#-88 49604: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 49608: 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 ); 4960c: 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); 4960e: 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 ); 49610: 0683 ffff ffd3 addil #-45,%d3 49616: 2e3c 0004 9984 movel #301444,%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 ) ) 4961c: 2c3c 0004 91ae movel #299438,%d6 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 49622: 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 */ ) { 49628: 286e 0008 moveal %fp@(8),%a4 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4962c: 2652 moveal %a2@,%a3 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 4962e: 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 */ ) { 49632: 2a6e 0010 moveal %fp@(16),%a5 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 49636: 2f0c movel %a4,%sp@- 49638: 4eb9 0004 e0d4 jsr 4e0d4 4963e: 588f addql #4,%sp 49640: 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 ); 49644: 486e fff8 pea %fp@(-8) 49648: 200c movel %a4,%d0 4964a: d0ae fff4 addl %fp@(-12),%d0 4964e: 2047 moveal %d7,%a0 49650: 2f03 movel %d3,%sp@- 49652: 2f2e fffc movel %fp@(-4),%sp@- 49656: 2f00 movel %d0,%sp@- 49658: 4e90 jsr %a0@ pathlen -= len; i += len; if ( !pathloc->node_access ) 4965a: 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 ); 4965e: 2400 movel %d0,%d2 pathlen -= len; 49660: 202e fff8 movel %fp@(-8),%d0 49664: 91ae fffc subl %d0,%fp@(-4) i += len; 49668: d1ae fff4 addl %d0,%fp@(-12) if ( !pathloc->node_access ) 4966c: 4a92 tstl %a2@ 4966e: 6700 0198 beqw 49808 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 49672: 4a82 tstl %d2 49674: 671a beqs 49690 if ( node->type == IMFS_DIRECTORY ) 49676: 7001 moveq #1,%d0 49678: b0ab 0048 cmpl %a3@(72),%d0 4967c: 6612 bnes 49690 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4967e: 4878 0001 pea 1 49682: 2046 moveal %d6,%a0 49684: 2f0a movel %a2,%sp@- 49686: 4e90 jsr %a0@ 49688: 508f addql #8,%sp 4968a: 4a80 tstl %d0 4968c: 6700 01cc beqw 4985a rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 49690: 2652 moveal %a2@,%a3 switch( type ) { 49692: 7002 moveq #2,%d0 49694: b082 cmpl %d2,%d0 49696: 671a beqs 496b2 49698: 6508 bcss 496a2 4969a: 4a82 tstl %d2 4969c: 6700 012c beqw 497ca 496a0: 60a2 bras 49644 496a2: 7203 moveq #3,%d1 496a4: b282 cmpl %d2,%d1 496a6: 6756 beqs 496fe 496a8: 7804 moveq #4,%d4 496aa: b882 cmpl %d2,%d4 496ac: 6696 bnes 49644 <== NEVER TAKEN 496ae: 6000 012a braw 497da case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 496b2: 2079 0005 d420 moveal 5d420 ,%a0 496b8: b7e8 0018 cmpal %a0@(24),%a3 496bc: 6786 beqs 49644 496be: 206a 0010 moveal %a2@(16),%a0 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 496c2: b7e8 001c cmpal %a0@(28),%a3 496c6: 6628 bnes 496f0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 496c8: 4878 0014 pea 14 496cc: 4868 0008 pea %a0@(8) 496d0: 2f0a movel %a2,%sp@- 496d2: 4eb9 0004 d588 jsr 4d588 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 496d8: 206a 000c moveal %a2@(12),%a0 496dc: 202e fff4 movel %fp@(-12),%d0 496e0: 90ae fff8 subl %fp@(-8),%d0 496e4: 2f0d movel %a5,%sp@- 496e6: 2f0a movel %a2,%sp@- 496e8: 4874 0800 pea %a4@(00000000,%d0:l) 496ec: 6000 00b8 braw 497a6 } } else { if ( !node->Parent ) 496f0: 266b 0008 moveal %a3@(8),%a3 496f4: 4a8b tstl %a3 496f6: 6600 00cc bnew 497c4 496fa: 6000 010c braw 49808 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 496fe: 202b 0048 movel %a3@(72),%d0 49702: 7203 moveq #3,%d1 49704: b280 cmpl %d0,%d1 49706: 6706 beqs 4970e result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 49708: 7204 moveq #4,%d1 4970a: b280 cmpl %d0,%d1 4970c: 6616 bnes 49724 result = IMFS_evaluate_link( pathloc, 0 ); 4970e: 42a7 clrl %sp@- if ( result == -1 ) 49710: 78ff moveq #-1,%d4 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 49712: 2f0a movel %a2,%sp@- 49714: 4eb9 0004 9568 jsr 49568 if ( result == -1 ) 4971a: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4971c: 2400 movel %d0,%d2 if ( result == -1 ) 4971e: b880 cmpl %d0,%d4 49720: 6700 0146 beqw 49868 return -1; } node = pathloc->node_access; 49724: 2052 moveal %a2@,%a0 if ( !node ) 49726: 4a88 tstl %a0 49728: 6700 0110 beqw 4983a /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4972c: 7001 moveq #1,%d0 4972e: b0a8 0048 cmpl %a0@(72),%d0 49732: 6600 0106 bnew 4983a /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49736: 2f03 movel %d3,%sp@- 49738: 2f08 movel %a0,%sp@- 4973a: 4eb9 0004 9918 jsr 49918 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49740: 508f addql #8,%sp /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 49742: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 49744: 4a80 tstl %d0 49746: 6700 00a0 beqw 497e8 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4974a: 7001 moveq #1,%d0 4974c: b0ab 0048 cmpl %a3@(72),%d0 49750: 6672 bnes 497c4 49752: 4aab 0058 tstl %a3@(88) 49756: 676c beqs 497c4 IMFS_skip_separator( path, &pathlen, &i); 49758: 2f05 movel %d5,%sp@- 4975a: 486e fffc pea %fp@(-4) if ((path[i] != '.') || (path[i + 1] != '.')) { 4975e: 240c movel %a4,%d2 49760: 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); 49762: 2f0c movel %a4,%sp@- 49764: 4eba f98e jsr %pc@(490f4 ) if ((path[i] != '.') || (path[i + 1] != '.')) { 49768: 202e fff4 movel %fp@(-12),%d0 4976c: d480 addl %d0,%d2 4976e: 2042 moveal %d2,%a0 49770: 4fef 000c lea %sp@(12),%sp 49774: 1210 moveb %a0@,%d1 49776: 49c1 extbl %d1 49778: b881 cmpl %d1,%d4 4977a: 660a bnes 49786 4977c: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 49780: 49c1 extbl %d1 49782: b881 cmpl %d1,%d4 49784: 6730 beqs 497b6 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 49786: 4878 0014 pea 14 4978a: 266b 0058 moveal %a3@(88),%a3 4978e: 47eb 001c lea %a3@(28),%a3 49792: 2f0b movel %a3,%sp@- 49794: 2f0a movel %a2,%sp@- 49796: 4eb9 0004 d588 jsr 4d588 return (*pathloc->ops->evalformake_h)( &path[i], 4979c: 206a 000c moveal %a2@(12),%a0 497a0: 2f0d movel %a5,%sp@- 497a2: 2f0a movel %a2,%sp@- 497a4: 2f02 movel %d2,%sp@- 497a6: 2068 0004 moveal %a0@(4),%a0 497aa: 4e90 jsr %a0@ 497ac: 4fef 0018 lea %sp@(24),%sp 497b0: 2400 movel %d0,%d2 497b2: 6000 00b4 braw 49868 pathloc, name ); } i += 2; 497b6: 5480 addql #2,%d0 pathlen -= 2; 497b8: 55ae fffc subql #2,%fp@(-4) node = node->Parent; 497bc: 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; 497c0: 2d40 fff4 movel %d0,%fp@(-12) pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 497c4: 248b movel %a3,%a2@ 497c6: 6000 fe7c braw 49644 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 497ca: 4eb9 0004 cd68 jsr 4cd68 <__errno> 497d0: 7c11 moveq #17,%d6 497d2: 2040 moveal %d0,%a0 497d4: 2086 movel %d6,%a0@ 497d6: 6000 008e braw 49866 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 497da: 4eb9 0004 cd68 jsr 4cd68 <__errno> 497e0: 7a5b moveq #91,%d5 497e2: 2040 moveal %d0,%a0 497e4: 2085 movel %d5,%a0@ 497e6: 607e bras 49866 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 497e8: 202e fff4 movel %fp@(-12),%d0 497ec: 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 ] ) ) 497f0: 47f9 0004 38a4 lea 438a4 ,%a3 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 497f6: d08c addl %a4,%d0 497f8: 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++) { 497fa: 601e bras 4981a if ( !IMFS_is_separator( path[ i ] ) ) 497fc: 49c0 extbl %d0 497fe: 2f00 movel %d0,%sp@- 49800: 4e93 jsr %a3@ 49802: 588f addql #4,%sp 49804: 4a80 tstl %d0 49806: 660e bnes 49816 rtems_set_errno_and_return_minus_one( ENOENT ); 49808: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4980e: 7802 moveq #2,%d4 49810: 2040 moveal %d0,%a0 49812: 2084 movel %d4,%a0@ 49814: 6050 bras 49866 /* * 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++) { 49816: 52ae fff4 addql #1,%fp@(-12) 4981a: 202e fff4 movel %fp@(-12),%d0 4981e: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 49822: 66d8 bnes 497fc /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 49824: 2f0a movel %a2,%sp@- 49826: 4eb9 0004 9140 jsr 49140 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4982c: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4982e: 2400 movel %d0,%d2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 49830: 588f addql #4,%sp 49832: 7001 moveq #1,%d0 49834: b0a8 0048 cmpl %a0@(72),%d0 49838: 670e beqs 49848 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 4983a: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49840: 7614 moveq #20,%d3 49842: 2040 moveal %d0,%a0 49844: 2083 movel %d3,%a0@ 49846: 601e bras 49866 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 49848: 4878 0003 pea 3 4984c: 2f0a movel %a2,%sp@- 4984e: 4eb9 0004 91ae jsr 491ae 49854: 508f addql #8,%sp 49856: 4a80 tstl %d0 49858: 660e bnes 49868 rtems_set_errno_and_return_minus_one( EACCES ); 4985a: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49860: 740d moveq #13,%d2 49862: 2040 moveal %d0,%a0 49864: 2082 movel %d2,%a0@ 49866: 74ff moveq #-1,%d2 return result; } 49868: 2002 movel %d2,%d0 4986a: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 49870: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000491ae : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 491ae: 70f8 moveq #-8,%d0 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 491b0: 4e56 fff4 linkw %fp,#-12 491b4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 491b8: 242e 000c movel %fp@(12),%d2 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 491bc: c082 andl %d2,%d0 491be: 6710 beqs 491d0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 491c0: 4eb9 0004 cd68 jsr 4cd68 <__errno> <== NOT EXECUTED 491c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 491c8: 7001 moveq #1,%d0 <== NOT EXECUTED 491ca: 2080 movel %d0,%a0@ <== NOT EXECUTED 491cc: 70ff moveq #-1,%d0 <== NOT EXECUTED 491ce: 6048 bras 49218 <== NOT EXECUTED jnode = node->node_access; 491d0: 206e 0008 moveal %fp@(8),%a0 491d4: 2450 moveal %a0@,%a2 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 491d6: 4eb9 0004 9e20 jsr 49e20 491dc: 3600 movew %d0,%d3 st_gid = getegid(); 491de: 4eb9 0004 9e0c jsr 49e0c * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 491e4: 4281 clrl %d1 491e6: 0283 0000 ffff andil #65535,%d3 491ec: 322a 0038 movew %a2@(56),%d1 491f0: b283 cmpl %d3,%d1 491f2: 6604 bnes 491f8 flags_to_test <<= 6; 491f4: ed8a lsll #6,%d2 491f6: 6012 bras 4920a else if ( st_gid == jnode->st_gid ) 491f8: 4281 clrl %d1 491fa: 0280 0000 ffff andil #65535,%d0 49200: 322a 003a movew %a2@(58),%d1 49204: b280 cmpl %d0,%d1 49206: 6602 bnes 4920a flags_to_test <<= 3; 49208: e78a lsll #3,%d2 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4920a: 2002 movel %d2,%d0 4920c: c0aa 002e andl %a2@(46),%d0 return 1; 49210: b480 cmpl %d0,%d2 49212: 57c0 seq %d0 49214: 49c0 extbl %d0 49216: 4480 negl %d0 return 0; } 49218: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4921e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c468 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4c468: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4c46c: 206e 0008 moveal %fp@(8),%a0 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4c470: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 4c472: 2450 moveal %a0@,%a2 int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4c474: 2f02 movel %d2,%sp@- * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c476: 4282 clrl %d2 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4c478: 4eb9 0004 9e20 jsr 49e20 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4c47e: 4281 clrl %d1 4c480: 3400 movew %d0,%d2 4c482: 322a 0038 movew %a2@(56),%d1 4c486: b282 cmpl %d2,%d1 4c488: 6714 beqs 4c49e 4c48a: 4a40 tstw %d0 4c48c: 6710 beqs 4c49e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 4c48e: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4c494: 2040 moveal %d0,%a0 4c496: 7001 moveq #1,%d0 4c498: 2080 movel %d0,%a0@ 4c49a: 70ff moveq #-1,%d0 4c49c: 6030 bras 4c4ce /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4c49e: 202a 002e movel %a2@(46),%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4c4a2: 222e 000c movel %fp@(12),%d1 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4c4a6: 0280 ffff f000 andil #-4096,%d0 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 4c4ac: 0281 0000 0fff andil #4095,%d1 4c4b2: 8280 orl %d0,%d1 4c4b4: 2541 002e movel %d1,%a2@(46) IMFS_update_ctime( jnode ); 4c4b8: 42a7 clrl %sp@- 4c4ba: 486e fff8 pea %fp@(-8) 4c4be: 4eb9 0004 2bf0 jsr 42bf0 4c4c4: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; 4c4ca: 508f addql #8,%sp 4c4cc: 4280 clrl %d0 } 4c4ce: 242e fff0 movel %fp@(-16),%d2 4c4d2: 246e fff4 moveal %fp@(-12),%a2 4c4d6: 4e5e unlk %fp ... =============================================================================== 000432e6 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 432e6: 4e56 0000 linkw %fp,#0 432ea: 206e 0008 moveal %fp@(8),%a0 432ee: 202e 000c movel %fp@(12),%d0 432f2: 226e 0010 moveal %fp@(16),%a1 432f6: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 432f8: 0c80 8004 667e cmpil #-2147195266,%d0 432fe: 661a bnes 4331a if (buffer == NULL) 43300: 4a89 tstl %a1 43302: 6734 beqs 43338 <== NEVER TAKEN err = -EFAULT; else { if (*(int *)buffer) 43304: 4a91 tstl %a1@ 43306: 6708 beqs 43310 iop->flags |= LIBIO_FLAGS_NO_DELAY; 43308: 7001 moveq #1,%d0 4330a: 81a8 0014 orl %d0,%a0@(20) 4330e: 6006 bras 43316 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43310: 70fe moveq #-2,%d0 43312: c1a8 0014 andl %d0,%a0@(20) 43316: 4282 clrl %d2 43318: 602e bras 43348 return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 4331a: 2f08 movel %a0,%sp@- 4331c: 2f09 movel %a1,%sp@- 4331e: 2f00 movel %d0,%sp@- 43320: 2068 0018 moveal %a0@(24),%a0 43324: 2f28 004c movel %a0@(76),%sp@- 43328: 4eb9 0004 bdee jsr 4bdee IMFS_FIFO_RETURN(err); 4332e: 4fef 0010 lea %sp@(16),%sp iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 43332: 2400 movel %d0,%d2 IMFS_FIFO_RETURN(err); 43334: 6c12 bges 43348 43336: 6002 bras 4333a { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 43338: 74f2 moveq #-14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 4333a: 4eb9 0004 eae4 jsr 4eae4 <__errno> 43340: 4482 negl %d2 43342: 2040 moveal %d0,%a0 43344: 2082 movel %d2,%a0@ 43346: 74ff moveq #-1,%d2 } 43348: 2002 movel %d2,%d0 4334a: 242e fffc movel %fp@(-4),%d2 4334e: 4e5e unlk %fp ... =============================================================================== 00043150 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 43150: 4e56 fff4 linkw %fp,#-12 43154: 206e 0008 moveal %fp@(8),%a0 43158: 48d7 001c moveml %d2-%d4,%sp@ off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4315c: 2f08 movel %a0,%sp@- 4315e: 2f2e 0014 movel %fp@(20),%sp@- 43162: 2f2e 0010 movel %fp@(16),%sp@- 43166: 2f2e 000c movel %fp@(12),%sp@- 4316a: 2068 0018 moveal %a0@(24),%a0 4316e: 2f28 004c movel %a0@(76),%sp@- 43172: 4eb9 0004 be4e jsr 4be4e IMFS_FIFO_RETURN(err); 43178: 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); 4317c: 2800 movel %d0,%d4 4317e: 2600 movel %d0,%d3 43180: 5bc2 smi %d2 43182: 49c2 extbl %d2 IMFS_FIFO_RETURN(err); 43184: 4a82 tstl %d2 43186: 6a10 bpls 43198 <== NEVER TAKEN 43188: 4eb9 0004 eae4 jsr 4eae4 <__errno> 4318e: 4484 negl %d4 43190: 2040 moveal %d0,%a0 43192: 74ff moveq #-1,%d2 43194: 76ff moveq #-1,%d3 43196: 2084 movel %d4,%a0@ } 43198: 2002 movel %d2,%d0 4319a: 2203 movel %d3,%d1 4319c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 431a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000431a6 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 431a6: 4e56 fff8 linkw %fp,#-8 431aa: 206e 0008 moveal %fp@(8),%a0 431ae: 2f0a movel %a2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; 431b0: 2468 0018 moveal %a0@(24),%a2 ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 431b4: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 431b6: 2f08 movel %a0,%sp@- 431b8: 2f2e 0010 movel %fp@(16),%sp@- 431bc: 2f2e 000c movel %fp@(12),%sp@- 431c0: 2f2a 004c movel %a2@(76),%sp@- 431c4: 4eb9 0004 bc5c jsr 4bc5c if (err > 0) { 431ca: 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); 431ce: 2400 movel %d0,%d2 if (err > 0) { 431d0: 6f1c bles 431ee IMFS_mtime_ctime_update(jnode); 431d2: 42a7 clrl %sp@- 431d4: 486e fff8 pea %fp@(-8) 431d8: 4eb9 0004 438c jsr 4438c 431de: 202e fff8 movel %fp@(-8),%d0 431e2: 508f addql #8,%sp 431e4: 2540 0040 movel %d0,%a2@(64) 431e8: 2540 0044 movel %d0,%a2@(68) 431ec: 6012 bras 43200 } IMFS_FIFO_RETURN(err); 431ee: 4a80 tstl %d0 431f0: 670e beqs 43200 <== NEVER TAKEN 431f2: 4eb9 0004 eae4 jsr 4eae4 <__errno> 431f8: 4482 negl %d2 431fa: 2040 moveal %d0,%a0 431fc: 2082 movel %d2,%a0@ 431fe: 74ff moveq #-1,%d2 } 43200: 2002 movel %d2,%d0 43202: 242e fff0 movel %fp@(-16),%d2 43206: 246e fff4 moveal %fp@(-12),%a2 4320a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049918 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49918: 4e56 fff0 linkw %fp,#-16 4991c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49920: 4879 0005 c53a pea 5c53a 49926: 49f9 0004 db20 lea 4db20 ,%a4 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4992c: 242e 000c movel %fp@(12),%d2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49930: 2f02 movel %d2,%sp@- IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 49932: 246e 0008 moveal %fp@(8),%a2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 49936: 4e94 jsr %a4@ 49938: 508f addql #8,%sp 4993a: 4a80 tstl %d0 4993c: 673a beqs 49978 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 4993e: 4879 0005 c53c pea 5c53c 49944: 2f02 movel %d2,%sp@- 49946: 4e94 jsr %a4@ 49948: 508f addql #8,%sp 4994a: 4a80 tstl %d0 4994c: 6606 bnes 49954 <== ALWAYS TAKEN return directory->Parent; 4994e: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED 49952: 6024 bras 49978 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49954: 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)); 49958: 45ea 0050 lea %a2@(80),%a2 the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4995c: 6010 bras 4996e !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 ) ) 4995e: 486b 000c pea %a3@(12) 49962: 2f02 movel %d2,%sp@- 49964: 4e94 jsr %a4@ 49966: 508f addql #8,%sp 49968: 4a80 tstl %d0 4996a: 670a beqs 49976 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 ) { 4996c: 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 ); 4996e: b5cb cmpal %a3,%a2 49970: 66ec bnes 4995e if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 49972: 95ca subal %a2,%a2 49974: 6002 bras 49978 !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 ) ) 49976: 244b moveal %a3,%a2 return the_jnode; } return 0; } 49978: 200a movel %a2,%d0 4997a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49980: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049874 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 49874: 4e56 ffd8 linkw %fp,#-40 49878: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4987c: 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; 49880: 240e movel %fp,%d2 49882: 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 ); 49888: 49f9 0004 9140 lea 49140 ,%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; 4988e: 246b 001c moveal %a3@(28),%a2 loc = temp_mt_entry->mt_fs_root; 49892: 4878 0014 pea 14 49896: 486b 001c pea %a3@(28) 4989a: 2f02 movel %d2,%sp@- 4989c: 4eb9 0004 d588 jsr 4d588 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 498a2: 4fef 000c lea %sp@(12),%sp 498a6: 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 ); 498aa: 47f9 0004 24e8 lea 424e8 ,%a3 498b0: 6002 bras 498b4 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 498b2: 2440 moveal %d0,%a2 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 498b4: 262a 0008 movel %a2@(8),%d3 loc.node_access = (void *)jnode; 498b8: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 498bc: 2f02 movel %d2,%sp@- 498be: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 498c0: 588f addql #4,%sp 498c2: 7001 moveq #1,%d0 498c4: b0aa 0048 cmpl %a2@(72),%d0 498c8: 660e bnes 498d8 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 498ca: 200a movel %a2,%d0 498cc: 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 ) ) { 498d2: b0aa 004c cmpl %a2@(76),%d0 498d6: 660e bnes 498e6 result = IMFS_unlink( NULL, &loc ); 498d8: 2f02 movel %d2,%sp@- 498da: 42a7 clrl %sp@- 498dc: 4e93 jsr %a3@ if (result != 0) 498de: 508f addql #8,%sp 498e0: 4a80 tstl %d0 498e2: 6624 bnes 49908 <== NEVER TAKEN return -1; jnode = next; 498e4: 2443 moveal %d3,%a2 } if ( jnode != NULL ) { 498e6: 4a8a tstl %a2 498e8: 6722 beqs 4990c if ( jnode->type == IMFS_DIRECTORY ) { 498ea: 7001 moveq #1,%d0 498ec: b0aa 0048 cmpl %a2@(72),%d0 498f0: 66c2 bnes 498b4 <== NEVER TAKEN 498f2: 220a movel %a2,%d1 498f4: 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; 498fa: 202a 004c movel %a2@(76),%d0 if ( jnode_has_children( jnode ) ) 498fe: b280 cmpl %d0,%d1 49900: 67b2 beqs 498b4 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 49902: 4a80 tstl %d0 49904: 66ac bnes 498b2 <== ALWAYS TAKEN 49906: 6006 bras 4990e <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 49908: 70ff moveq #-1,%d0 <== NOT EXECUTED 4990a: 6002 bras 4990e <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 4990c: 4280 clrl %d0 } 4990e: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4 49914: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049984 : const char *path, int pathlen, char *token, int *token_len ) { 49984: 4e56 ffe4 linkw %fp,#-28 49988: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4998c: 2a6e 0008 moveal %fp@(8),%a5 register int i = 0; 49990: 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) ) { 49992: 283c 0004 38a4 movel #276644,%d4 const char *path, int pathlen, char *token, int *token_len ) { 49998: 246e 0010 moveal %fp@(16),%a2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4999c: 284a moveal %a2,%a4 const char *path, int pathlen, char *token, int *token_len ) { 4999e: 266e 000c moveal %fp@(12),%a3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 499a2: 1615 moveb %a5@,%d3 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 499a4: 600e bras 499b4 token[i] = c; if ( i == IMFS_NAME_MAX ) 499a6: 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; 499a8: 18c3 moveb %d3,%a4@+ if ( i == IMFS_NAME_MAX ) 499aa: b082 cmpl %d2,%d0 499ac: 6776 beqs 49a24 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 499ae: 5282 addql #1,%d2 499b0: 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) ) { 499b4: 2044 moveal %d4,%a0 499b6: 1003 moveb %d3,%d0 499b8: 49c0 extbl %d0 499ba: 2f00 movel %d0,%sp@- 499bc: 4e90 jsr %a0@ 499be: 588f addql #4,%sp 499c0: 4a80 tstl %d0 499c2: 6604 bnes 499c8 499c4: b7c2 cmpal %d2,%a3 499c6: 6ede bgts 499a6 /* * Copy a seperator into token. */ if ( i == 0 ) { 499c8: 4a82 tstl %d2 499ca: 660a bnes 499d6 token[i] = c; 499cc: 1483 moveb %d3,%a2@ if ( (token[i] != '\0') && pathlen ) { 499ce: 6714 beqs 499e4 499d0: 4a8b tstl %a3 499d2: 6614 bnes 499e8 499d4: 600e bras 499e4 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 499d6: 4a32 28ff tstb %a2@(ffffffff,%d2:l) 499da: 6712 beqs 499ee <== NEVER TAKEN token[i] = '\0'; 499dc: 4200 clrb %d0 499de: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) 499e2: 600a bras 499ee if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 499e4: 4283 clrl %d3 499e6: 6008 bras 499f0 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; 499e8: 7601 moveq #1,%d3 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 499ea: 7401 moveq #1,%d2 499ec: 6002 bras 499f0 char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 499ee: 7603 moveq #3,%d3 /* * Set token_len to the number of characters copied. */ *token_len = i; 499f0: 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 ) { 499f4: 7003 moveq #3,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 499f6: 2082 movel %d2,%a0@ /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 499f8: b083 cmpl %d3,%d0 499fa: 6632 bnes 49a2e if ( strcmp( token, "..") == 0 ) 499fc: 4879 0005 c53f pea 5c53f 49a02: 47f9 0004 db20 lea 4db20 ,%a3 49a08: 2f0a movel %a2,%sp@- 49a0a: 4e93 jsr %a3@ 49a0c: 508f addql #8,%sp 49a0e: 4a80 tstl %d0 49a10: 6716 beqs 49a28 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 49a12: 4879 0005 c540 pea 5c540 49a18: 2f0a movel %a2,%sp@- 49a1a: 4e93 jsr %a3@ 49a1c: 508f addql #8,%sp 49a1e: 4a80 tstl %d0 49a20: 670a beqs 49a2c 49a22: 600a bras 49a2e while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 49a24: 7604 moveq #4,%d3 49a26: 6006 bras 49a2e * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 49a28: 7602 moveq #2,%d3 49a2a: 6002 bras 49a2e else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 49a2c: 7601 moveq #1,%d3 } return type; } 49a2e: 2003 movel %d3,%d0 49a30: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 49a36: 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 d2de movel 5d2de ,%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 e244 movel %d0,5e244 /* * 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 90ba jsr 490ba 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 c50a pea 5c50a 42152: 486a 0038 pea %a2@(56) 42156: 4eb9 0004 d588 jsr 4d588 /* * 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 cd68 jsr 4cd68 <__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 e248 movel 5e248 ,%d0 42198: 2080 movel %d0,%a0@ 4219a: 5280 addql #1,%d0 4219c: 23c0 0005 e248 movel %d0,5e248 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 =============================================================================== 0004b668 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4b668: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4b66c: 2039 0005 e244 movel 5e244 ,%d0 4b672: e488 lsrl #2,%d0 4b674: 2200 movel %d0,%d1 4b676: 5381 subql #1,%d1 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4b678: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4b67c: 246e 0008 moveal %fp@(8),%a2 4b680: 242e 000c movel %fp@(12),%d2 4b684: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4b688: b282 cmpl %d2,%d1 4b68a: 6536 bcss 4b6c2 p = info->indirect; 4b68c: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4b690: 4a88 tstl %a0 4b692: 6720 beqs 4b6b4 if ( !p ) { 4b694: 4a89 tstl %a1 4b696: 6610 bnes 4b6a8 p = memfile_alloc_block(); 4b698: 4eb9 0004 b644 jsr 4b644 if ( !p ) 4b69e: 4a80 tstl %d0 4b6a0: 6700 00f8 beqw 4b79a return 0; info->indirect = p; 4b6a4: 2540 0054 movel %d0,%a2@(84) } return &info->indirect[ my_block ]; 4b6a8: 206a 0054 moveal %a2@(84),%a0 4b6ac: e58a lsll #2,%d2 4b6ae: d1c2 addal %d2,%a0 4b6b0: 6000 00ea braw 4b79c } if ( !p ) 4b6b4: 4a89 tstl %a1 4b6b6: 6700 00e2 beqw 4b79a return 0; return &info->indirect[ my_block ]; 4b6ba: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0 4b6be: 6000 00dc braw 4b79c /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4b6c2: 2200 movel %d0,%d1 4b6c4: 5281 addql #1,%d1 4b6c6: 4c00 1800 mulsl %d0,%d1 4b6ca: 2241 moveal %d1,%a1 4b6cc: 5389 subql #1,%a1 4b6ce: b3c2 cmpal %d2,%a1 4b6d0: 653e bcss 4b710 my_block -= FIRST_DOUBLY_INDIRECT; 4b6d2: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b6d4: 4c40 2003 remul %d0,%d3,%d2 4b6d8: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4b6dc: 202a 0058 movel %a2@(88),%d0 if ( malloc_it ) { 4b6e0: 4a88 tstl %a0 4b6e2: 671c beqs 4b700 if ( !p ) { 4b6e4: 4a80 tstl %d0 4b6e6: 6610 bnes 4b6f8 p = memfile_alloc_block(); 4b6e8: 4eb9 0004 b644 jsr 4b644 if ( !p ) 4b6ee: 4a80 tstl %d0 4b6f0: 6700 00a8 beqw 4b79a return 0; info->doubly_indirect = p; 4b6f4: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4b6f8: 2040 moveal %d0,%a0 4b6fa: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4b6fe: 6066 bras 4b766 } return (block_p *)&p1[ singly ]; } if ( !p ) 4b700: 4a80 tstl %d0 4b702: 6700 0096 beqw 4b79a return 0; p = (block_p *)p[ doubly ]; 4b706: 2240 moveal %d0,%a1 4b708: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 4b70c: 6000 0082 braw 4b790 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4b710: 2601 movel %d1,%d3 4b712: 5283 addql #1,%d3 4b714: 4c00 3800 mulsl %d0,%d3 4b718: 5383 subql #1,%d3 4b71a: b682 cmpl %d2,%d3 4b71c: 657c bcss 4b79a <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4b71e: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4b720: 4c40 2003 remul %d0,%d3,%d2 4b724: 4c40 2002 remul %d0,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4b728: 4c40 2004 remul %d0,%d4,%d2 4b72c: 4c40 2002 remul %d0,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4b730: 202a 005c movel %a2@(92),%d0 if ( malloc_it ) { 4b734: 4a88 tstl %a0 4b736: 6746 beqs 4b77e if ( !p ) { 4b738: 4a80 tstl %d0 4b73a: 660e bnes 4b74a p = memfile_alloc_block(); 4b73c: 4eb9 0004 b644 jsr 4b644 if ( !p ) 4b742: 4a80 tstl %d0 4b744: 6754 beqs 4b79a <== NEVER TAKEN return 0; info->triply_indirect = p; 4b746: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4b74a: 2040 moveal %d0,%a0 4b74c: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 4b750: 2012 movel %a2@,%d0 if ( !p1 ) { 4b752: 660c bnes 4b760 p1 = memfile_alloc_block(); 4b754: 4eb9 0004 b644 jsr 4b644 if ( !p1 ) 4b75a: 4a80 tstl %d0 4b75c: 673c beqs 4b79a <== NEVER TAKEN return 0; p[ triply ] = (block_p) p1; 4b75e: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4b760: 2240 moveal %d0,%a1 4b762: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2 4b766: 2012 movel %a2@,%d0 if ( !p2 ) { 4b768: 660c bnes 4b776 p2 = memfile_alloc_block(); 4b76a: 4eb9 0004 b644 jsr 4b644 if ( !p2 ) 4b770: 4a80 tstl %d0 4b772: 6726 beqs 4b79a <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4b774: 2480 movel %d0,%a2@ } return (block_p *)&p2[ singly ]; 4b776: 2240 moveal %d0,%a1 4b778: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 4b77c: 601e bras 4b79c } if ( !p ) 4b77e: 4a80 tstl %d0 4b780: 6718 beqs 4b79a <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4b782: 2240 moveal %d0,%a1 4b784: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4b788: 4a88 tstl %a0 4b78a: 670e beqs 4b79a <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4b78c: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 if ( !p2 ) 4b790: 4a88 tstl %a0 4b792: 6706 beqs 4b79a <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4b794: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4b798: 6002 bras 4b79c } return &info->indirect[ my_block ]; } if ( !p ) return 0; 4b79a: 91c8 subal %a0,%a0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4b79c: 2008 movel %a0,%d0 4b79e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4b7a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b7a8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4b7a8: 4e56 ffc8 linkw %fp,#-56 4b7ac: 206e 0018 moveal %fp@(24),%a0 4b7b0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b7b4: 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) { 4b7b8: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4b7ba: 2a2e 0014 movel %fp@(20),%d5 4b7be: 286e 000c moveal %fp@(12),%a4 4b7c2: 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) { 4b7c6: b4aa 0048 cmpl %a2@(72),%d2 4b7ca: 665c bnes 4b828 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4b7cc: 97cb subal %a3,%a3 4b7ce: 242a 004c movel %a2@(76),%d2 4b7d2: 262a 0050 movel %a2@(80),%d3 4b7d6: 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; 4b7da: 226a 0054 moveal %a2@(84),%a1 if (my_length > (the_jnode->info.linearfile.size - start)) 4b7de: 2002 movel %d2,%d0 4b7e0: 2203 movel %d3,%d1 4b7e2: 2d4b fff0 movel %a3,%fp@(-16) 4b7e6: 280c movel %a4,%d4 4b7e8: 928d subl %a5,%d1 4b7ea: 9184 subxl %d4,%d0 4b7ec: 2c2e fff0 movel %fp@(-16),%d6 4b7f0: 2e2e fff4 movel %fp@(-12),%d7 4b7f4: 9e81 subl %d1,%d7 4b7f6: 9d80 subxl %d0,%d6 4b7f8: 6f04 bles 4b7fe <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4b7fa: 968d subl %a5,%d3 4b7fc: 6002 bras 4b800 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4b7fe: 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); 4b800: 2f03 movel %d3,%sp@- 4b802: 4871 d800 pea %a1@(00000000,%a5:l) 4b806: 2f05 movel %d5,%sp@- 4b808: 4eb9 0004 d588 jsr 4d588 IMFS_update_atime( the_jnode ); 4b80e: 42a7 clrl %sp@- 4b810: 486e fff8 pea %fp@(-8) 4b814: 4eb9 0004 2bf0 jsr 42bf0 4b81a: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4b820: 4fef 0014 lea %sp@(20),%sp 4b824: 6000 0122 braw 4b948 /* * 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; 4b828: 2808 movel %a0,%d4 4b82a: d88d addl %a5,%d4 if ( last_byte > the_jnode->info.file.size ) 4b82c: 2204 movel %d4,%d1 4b82e: 4280 clrl %d0 4b830: 242a 004c movel %a2@(76),%d2 4b834: 262a 0050 movel %a2@(80),%d3 4b838: 2c00 movel %d0,%d6 4b83a: 2e01 movel %d1,%d7 4b83c: 9e83 subl %d3,%d7 4b83e: 9d82 subxl %d2,%d6 4b840: 6f06 bles 4b848 my_length = the_jnode->info.file.size - start; 4b842: 2403 movel %d3,%d2 4b844: 948d subl %a5,%d2 4b846: 6002 bras 4b84a /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4b848: 2408 movel %a0,%d2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4b84a: 2639 0005 e244 movel 5e244 ,%d3 4b850: 2e03 movel %d3,%d7 4b852: 5bc6 smi %d6 4b854: 49c6 extbl %d6 4b856: 2f07 movel %d7,%sp@- 4b858: 2f06 movel %d6,%sp@- 4b85a: 2f0d movel %a5,%sp@- 4b85c: 2f0c movel %a4,%sp@- 4b85e: 4eb9 0005 9744 jsr 59744 <__moddi3> 4b864: 4fef 0010 lea %sp@(16),%sp 4b868: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4b86a: 2f07 movel %d7,%sp@- 4b86c: 2f06 movel %d6,%sp@- 4b86e: 2f0d movel %a5,%sp@- 4b870: 2f0c movel %a4,%sp@- 4b872: 4eb9 0005 92fc jsr 592fc <__divdi3> 4b878: 4fef 0010 lea %sp@(16),%sp 4b87c: 2c01 movel %d1,%d6 if ( start_offset ) { 4b87e: 4a84 tstl %d4 4b880: 673e beqs 4b8c0 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 ); 4b882: 42a7 clrl %sp@- 4b884: 2f01 movel %d1,%sp@- 4b886: 2f0a movel %a2,%sp@- 4b888: 4eb9 0004 b668 jsr 4b668 if ( !block_ptr ) 4b88e: 4fef 000c lea %sp@(12),%sp 4b892: 4a80 tstl %d0 4b894: 6700 00b0 beqw 4b946 * 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; 4b898: 2203 movel %d3,%d1 4b89a: 9284 subl %d4,%d1 4b89c: 2602 movel %d2,%d3 4b89e: b282 cmpl %d2,%d1 4b8a0: 6402 bccs 4b8a4 4b8a2: 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 ); 4b8a4: 2f03 movel %d3,%sp@- 4b8a6: 2040 moveal %d0,%a0 4b8a8: d890 addl %a0@,%d4 dest += to_copy; block++; 4b8aa: 5286 addql #1,%d6 my_length -= to_copy; 4b8ac: 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 ); 4b8ae: 2f04 movel %d4,%sp@- 4b8b0: 2f05 movel %d5,%sp@- dest += to_copy; 4b8b2: 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 ); 4b8b4: 4eb9 0004 d588 jsr 4d588 dest += to_copy; block++; my_length -= to_copy; 4b8ba: 4fef 000c lea %sp@(12),%sp 4b8be: 6002 bras 4b8c2 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4b8c0: 4283 clrl %d3 } /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4b8c2: 2839 0005 e244 movel 5e244 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b8c8: 47f9 0004 b668 lea 4b668 ,%a3 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b8ce: 49f9 0004 d588 lea 4d588 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4b8d4: 6026 bras 4b8fc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b8d6: 42a7 clrl %sp@- 4b8d8: 2f06 movel %d6,%sp@- 4b8da: 2f0a movel %a2,%sp@- 4b8dc: 4e93 jsr %a3@ if ( !block_ptr ) 4b8de: 4fef 000c lea %sp@(12),%sp 4b8e2: 4a80 tstl %d0 4b8e4: 6762 beqs 4b948 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4b8e6: 2040 moveal %d0,%a0 dest += to_copy; block++; 4b8e8: 5286 addql #1,%d6 my_length -= to_copy; 4b8ea: 9484 subl %d4,%d2 copied += to_copy; 4b8ec: 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 ); 4b8ee: 2f04 movel %d4,%sp@- 4b8f0: 2f10 movel %a0@,%sp@- 4b8f2: 2f05 movel %d5,%sp@- dest += to_copy; 4b8f4: 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 ); 4b8f6: 4e94 jsr %a4@ dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4b8f8: 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 ) { 4b8fc: b4b9 0005 e244 cmpl 5e244 ,%d2 4b902: 64d2 bccs 4b8d6 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4b904: 4a82 tstl %d2 4b906: 6728 beqs 4b930 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4b908: 42a7 clrl %sp@- 4b90a: 2f06 movel %d6,%sp@- 4b90c: 2f0a movel %a2,%sp@- 4b90e: 4eb9 0004 b668 jsr 4b668 if ( !block_ptr ) 4b914: 4fef 000c lea %sp@(12),%sp 4b918: 4a80 tstl %d0 4b91a: 672c beqs 4b948 <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4b91c: 2640 moveal %d0,%a3 copied += my_length; 4b91e: 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 ); 4b920: 2f02 movel %d2,%sp@- 4b922: 2f13 movel %a3@,%sp@- 4b924: 2f05 movel %d5,%sp@- 4b926: 4eb9 0004 d588 jsr 4d588 copied += my_length; 4b92c: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4b930: 42a7 clrl %sp@- 4b932: 486e fff8 pea %fp@(-8) 4b936: 4eb9 0004 2bf0 jsr 42bf0 4b93c: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4b942: 508f addql #8,%sp 4b944: 6002 bras 4b948 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; 4b946: 4283 clrl %d3 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4b948: 2003 movel %d3,%d0 4b94a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4b950: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba16 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4ba16: 4e56 ffe4 linkw %fp,#-28 4ba1a: 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; 4ba1e: 2439 0005 e244 movel 5e244 ,%d2 4ba24: e48a lsrl #2,%d2 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4ba26: 246e 0008 moveal %fp@(8),%a2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4ba2a: 4aaa 0054 tstl %a2@(84) 4ba2e: 670e beqs 4ba3e memfile_free_blocks_in_table( &info->indirect, to_free ); 4ba30: 2f02 movel %d2,%sp@- 4ba32: 486a 0054 pea %a2@(84) 4ba36: 4eb9 0004 b9d0 jsr 4b9d0 4ba3c: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4ba3e: 4aaa 0058 tstl %a2@(88) 4ba42: 661c bnes 4ba60 4ba44: 603c bras 4ba82 * 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( 4ba46: 2003 movel %d3,%d0 4ba48: e588 lsll #2,%d0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 4ba4a: 206a 0058 moveal %a2@(88),%a0 4ba4e: d1c0 addal %d0,%a0 4ba50: 4a90 tstl %a0@ 4ba52: 6708 beqs 4ba5c <== NEVER TAKEN memfile_free_blocks_in_table( 4ba54: 2f02 movel %d2,%sp@- 4ba56: 2f08 movel %a0,%sp@- 4ba58: 4e93 jsr %a3@ 4ba5a: 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 ) { 4ba60: 4283 clrl %d3 for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 4ba62: 47f9 0004 b9d0 lea 4b9d0 ,%a3 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i,%d0 4ba6e: e488 lsrl #2,%d0 4ba70: b083 cmpl %d3,%d0 4ba72: 62d2 bhis 4ba46 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 ); 4ba74: 2f02 movel %d2,%sp@- 4ba76: 486a 0058 pea %a2@(88) 4ba7a: 4eb9 0004 b9d0 jsr 4b9d0 4ba80: 508f addql #8,%sp } if ( info->triply_indirect ) { 4ba82: 4aaa 005c tstl %a2@(92) 4ba86: 6642 bnes 4baca 4ba88: 6062 bras 4baec * 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( 4ba8a: 2c03 movel %d3,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4ba8c: 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( 4ba90: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4ba92: 2a30 6800 movel %a0@(00000000,%d6:l),%d5 if ( !p ) /* ensure we have a valid pointer */ 4ba96: 6746 beqs 4bade <== NEVER TAKEN 4ba98: 4284 clrl %d4 4ba9a: 6012 bras 4baae break; for ( j=0 ; j <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4baa4: 2f02 movel %d2,%sp@- 4baa6: 2f08 movel %a0,%sp@- 4baa8: 4e93 jsr %a3@ 4baaa: 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 4bab4: e488 lsrl #2,%d0 4bab6: b084 cmpl %d4,%d0 4bab8: 62e2 bhis 4ba9c if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4baba: 2f02 movel %d2,%sp@- 4babc: 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 ) { 4baca: 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 4bad8: e488 lsrl #2,%d0 4bada: b083 cmpl %d3,%d0 4badc: 62ac bhis 4ba8a } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4bade: 2f02 movel %d2,%sp@- 4bae0: 486a 005c pea %a2@(92) 4bae4: 4eb9 0004 b9d0 jsr 4b9d0 4baea: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return 0; } 4baec: 4280 clrl %d0 4baee: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4baf4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bc30 : * 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 ) { 4bc30: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4bc32: 4e56 ffd0 linkw %fp,#-48 4bc36: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4bc3a: 286e 000c moveal %fp@(12),%a4 4bc3e: 2a6e 0010 moveal %fp@(16),%a5 4bc42: 246e 0008 moveal %fp@(8),%a2 4bc46: 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; 4bc4a: 41f5 2800 lea %a5@(00000000,%d2:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4bc4e: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4bc50: 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 ) { 4bc54: 282a 004c movel %a2@(76),%d4 4bc58: 2a2a 0050 movel %a2@(80),%d5 4bc5c: 9a81 subl %d1,%d5 4bc5e: 9980 subxl %d0,%d4 4bc60: 6c26 bges 4bc88 status = IMFS_memfile_extend( the_jnode, last_byte ); 4bc62: 2f08 movel %a0,%sp@- 4bc64: 2f00 movel %d0,%sp@- 4bc66: 2f0a movel %a2,%sp@- 4bc68: 4eb9 0004 bb20 jsr 4bb20 if ( status ) 4bc6e: 4fef 000c lea %sp@(12),%sp 4bc72: 4a80 tstl %d0 4bc74: 6712 beqs 4bc88 rtems_set_errno_and_return_minus_one( ENOSPC ); 4bc76: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4bc7c: 741c moveq #28,%d2 4bc7e: 7aff moveq #-1,%d5 4bc80: 2040 moveal %d0,%a0 4bc82: 2082 movel %d2,%a0@ 4bc84: 6000 0102 braw 4bd88 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4bc88: 2a39 0005 e244 movel 5e244 ,%d5 4bc8e: 2e05 movel %d5,%d7 4bc90: 5bc6 smi %d6 4bc92: 49c6 extbl %d6 4bc94: 2f07 movel %d7,%sp@- 4bc96: 2f06 movel %d6,%sp@- 4bc98: 2f0d movel %a5,%sp@- 4bc9a: 2f0c movel %a4,%sp@- 4bc9c: 4eb9 0005 9744 jsr 59744 <__moddi3> 4bca2: 4fef 0010 lea %sp@(16),%sp 4bca6: 2801 movel %d1,%d4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4bca8: 2f07 movel %d7,%sp@- 4bcaa: 2f06 movel %d6,%sp@- 4bcac: 2f0d movel %a5,%sp@- 4bcae: 2f0c movel %a4,%sp@- 4bcb0: 4eb9 0005 92fc jsr 592fc <__divdi3> 4bcb6: 4fef 0010 lea %sp@(16),%sp 4bcba: 2c01 movel %d1,%d6 if ( start_offset ) { 4bcbc: 4a84 tstl %d4 4bcbe: 673a beqs 4bcfa 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 ); 4bcc0: 42a7 clrl %sp@- 4bcc2: 2f01 movel %d1,%sp@- 4bcc4: 2f0a movel %a2,%sp@- 4bcc6: 4eb9 0004 b668 jsr 4b668 if ( !block_ptr ) 4bccc: 4fef 000c lea %sp@(12),%sp 4bcd0: 4a80 tstl %d0 4bcd2: 6700 00b2 beqw 4bd86 * 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; 4bcd6: 9a84 subl %d4,%d5 4bcd8: b485 cmpl %d5,%d2 4bcda: 6402 bccs 4bcde 4bcdc: 2a02 movel %d2,%d5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4bcde: 2f05 movel %d5,%sp@- 4bce0: 2040 moveal %d0,%a0 src += to_copy; block++; 4bce2: 5286 addql #1,%d6 my_length -= to_copy; 4bce4: 9485 subl %d5,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4bce6: 2f03 movel %d3,%sp@- 4bce8: d890 addl %a0@,%d4 src += to_copy; 4bcea: d685 addl %d5,%d3 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4bcec: 2f04 movel %d4,%sp@- 4bcee: 4eb9 0004 d588 jsr 4d588 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4bcf4: 4fef 000c lea %sp@(12),%sp 4bcf8: 6002 bras 4bcfc status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4bcfa: 4285 clrl %d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4bcfc: 2839 0005 e244 movel 5e244 ,%d4 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4bd02: 47f9 0004 b668 lea 4b668 ,%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 ); 4bd08: 49f9 0004 d588 lea 4d588 ,%a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4bd0e: 6026 bras 4bd36 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4bd10: 42a7 clrl %sp@- 4bd12: 2f06 movel %d6,%sp@- 4bd14: 2f0a movel %a2,%sp@- 4bd16: 4e93 jsr %a3@ if ( !block_ptr ) 4bd18: 4fef 000c lea %sp@(12),%sp 4bd1c: 4a80 tstl %d0 4bd1e: 6768 beqs 4bd88 <== 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 ); 4bd20: 2f04 movel %d4,%sp@- 4bd22: 2040 moveal %d0,%a0 src += to_copy; block++; 4bd24: 5286 addql #1,%d6 my_length -= to_copy; 4bd26: 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( 4bd28: 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 ); 4bd2a: 2f03 movel %d3,%sp@- 4bd2c: 2f10 movel %a0@,%sp@- src += to_copy; 4bd2e: 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 ); 4bd30: 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( 4bd32: 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 ) { 4bd36: b4b9 0005 e244 cmpl 5e244 ,%d2 4bd3c: 64d2 bccs 4bd10 * 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 ) { 4bd3e: 4a82 tstl %d2 4bd40: 6728 beqs 4bd6a block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4bd42: 42a7 clrl %sp@- 4bd44: 2f06 movel %d6,%sp@- 4bd46: 2f0a movel %a2,%sp@- 4bd48: 4eb9 0004 b668 jsr 4b668 if ( !block_ptr ) 4bd4e: 4fef 000c lea %sp@(12),%sp 4bd52: 4a80 tstl %d0 4bd54: 6732 beqs 4bd88 <== 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 ); 4bd56: 2f02 movel %d2,%sp@- 4bd58: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4bd5a: 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 ); 4bd5c: 2f03 movel %d3,%sp@- 4bd5e: 2f10 movel %a0@,%sp@- 4bd60: 4eb9 0004 d588 jsr 4d588 my_length = 0; copied += to_copy; 4bd66: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4bd6a: 42a7 clrl %sp@- 4bd6c: 486e fff8 pea %fp@(-8) 4bd70: 4eb9 0004 2bf0 jsr 42bf0 4bd76: 202e fff8 movel %fp@(-8),%d0 return copied; 4bd7a: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4bd7c: 2540 0040 movel %d0,%a2@(64) 4bd80: 2540 0044 movel %d0,%a2@(68) return copied; 4bd84: 6002 bras 4bd88 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; 4bd86: 4285 clrl %d5 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4bd88: 2005 movel %d5,%d0 4bd8a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4bd90: 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 e0d4 jsr 4e0d4 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 9984 jsr 49984 /* * 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 8fa6 jsr 48fa6 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 cd68 jsr 4cd68 <__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 cd68 jsr 4cd68 <__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 2f88 moveal 62f88 <_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 0fd0 jsr 50fd0 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 2f88 moveal 62f88 <_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 0f00 jsr 50f00 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 15e5 pea 615e5 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 15f8 pea 615f8 44a1a: 2f28 0008 movel %a0@(8),%sp@- 44a1e: 4eb9 0005 0e82 jsr 50e82 (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 1607 pea 61607 44a34: 2f28 0008 movel %a0@(8),%sp@- 44a38: 4eb9 0005 0e82 jsr 50e82 (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 1613 pea 61613 44a4e: 600a bras 44a5a return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44a50: 2f28 0008 movel %a0@(8),%sp@- 44a54: 4879 0006 1627 pea 61627 44a5a: 4eb9 0005 0fd0 jsr 50fd0 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 163a pea 6163a <== NOT EXECUTED 44a6c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44a70: 4eb9 0005 0e82 jsr 50e82 <== 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 1cee movel #400622,%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 2752 jmp 52752 } 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 e0f0 jsr 4e0f0 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 63ec jsr 463ec <_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 63b4 jsr 463b4 <_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 =============================================================================== 000490f4 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 490f4: 4e56 fff0 linkw %fp,#-16 490f8: 48d7 3c00 moveml %a2-%a5,%sp@ 490fc: 286e 0008 moveal %fp@(8),%a4 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 49100: 4bf9 0004 38a4 lea 438a4 ,%a5 static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 49106: 266e 000c moveal %fp@(12),%a3 4910a: 246e 0010 moveal %fp@(16),%a2 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4910e: 6008 bras 49118 ++(*index); 49110: 5281 addql #1,%d1 --(*len); 49112: 5380 subql #1,%d0 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 49114: 2481 movel %d1,%a2@ --(*len); 49116: 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 ) { 49118: 2012 movel %a2@,%d0 4911a: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 4911e: 49c0 extbl %d0 49120: 2f00 movel %d0,%sp@- 49122: 4e95 jsr %a5@ 49124: 588f addql #4,%sp 49126: 4a80 tstl %d0 49128: 670c beqs 49136 4912a: 2212 movel %a2@,%d1 4912c: 4a34 1800 tstb %a4@(00000000,%d1:l) 49130: 6704 beqs 49136 49132: 2013 movel %a3@,%d0 49134: 66da bnes 49110 <== ALWAYS TAKEN ++(*index); --(*len); } } 49136: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 4913c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b14 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 49b14: 7205 moveq #5,%d1 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 49b16: 4e56 0000 linkw %fp,#0 49b1a: 206e 000c moveal %fp@(12),%a0 49b1e: 2f0a movel %a2,%sp@- 49b20: 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; 49b24: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 49b26: 2029 0048 movel %a1@(72),%d0 49b2a: 5580 subql #2,%d0 49b2c: b280 cmpl %d0,%d1 49b2e: 653e bcss 49b6e <== NEVER TAKEN 49b30: 303b 0a08 movew %pc@(49b3a ,%d0:l:2),%d0 49b34: 48c0 extl %d0 49b36: 4efb 0802 jmp %pc@(49b3a ,%d0:l) 49b3a: 000c .short 0x000c <== NOT EXECUTED 49b3c: 0034 .short 0x0034 <== NOT EXECUTED 49b3e: 0026 .short 0x0026 <== NOT EXECUTED 49b40: 001c .short 0x001c <== NOT EXECUTED 49b42: 001c .short 0x001c <== NOT EXECUTED 49b44: 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 ); 49b46: 2029 0050 movel %a1@(80),%d0 49b4a: 2169 004c 0016 movel %a1@(76),%a0@(22) 49b50: 2140 001a movel %d0,%a0@(26) break; 49b54: 602a bras 49b80 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 49b56: 2029 004c movel %a1@(76),%d0 49b5a: 2229 0050 movel %a1@(80),%d1 49b5e: 6004 bras 49b64 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 49b60: 4280 clrl %d0 49b62: 4281 clrl %d1 49b64: 2140 001e movel %d0,%a0@(30) 49b68: 2141 0022 movel %d1,%a0@(34) break; 49b6c: 6012 bras 49b80 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 49b6e: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49b74: 2040 moveal %d0,%a0 49b76: 70ff moveq #-1,%d0 49b78: 20bc 0000 0086 movel #134,%a0@ 49b7e: 6050 bras 49bd0 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 49b80: 246a 0010 moveal %a2@(16),%a2 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 49b84: 246a 0034 moveal %a2@(52),%a2 49b88: 2012 movel %a2@,%d0 buf->st_mode = the_jnode->st_mode; 49b8a: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 49b90: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 49b96: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 49b9c: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 49ba2: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 49ba8: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 49bae: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 49bb4: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 49bba: 43f9 0005 d2de lea 5d2de ,%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 = 49bc0: 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; 49bc4: 2151 003e movel %a1@,%a0@(62) return 0; 49bc8: 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 = 49bca: 20bc 0000 fffe movel #65534,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 49bd0: 246e fffc moveal %fp@(-4),%a2 49bd4: 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 cd68 jsr 4cd68 <__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 d588 jsr 4d588 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 9140 jsr 49140 /* * 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 cd68 jsr 4cd68 <__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 cd68 jsr 4cd68 <__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 ... =============================================================================== 000424a0 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 424a0: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 424a2: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 424a6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 424aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 424ae: b08a cmpl %a2,%d0 <== NOT EXECUTED 424b0: 6616 bnes 424c8 <== NOT EXECUTED if (!Stack_check_Interrupt_stack.area) 424b2: 4ab9 0006 1228 tstl 61228 <== NOT EXECUTED 424b8: 6700 00f8 beqw 425b2 <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 424bc: 49f9 0006 1224 lea 61224 ,%a4 <== NOT EXECUTED the_thread = 0; current = 0; 424c2: 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; 424c4: 95ca subal %a2,%a2 <== NOT EXECUTED 424c6: 6008 bras 424d0 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 424c8: 262a 00f2 movel %a2@(242),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 424cc: 49ea 00b2 lea %a2@(178),%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); 424d0: 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++) 424d2: 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); 424d4: 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); 424da: 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; 424de: 41e9 0020 lea %a1@(32),%a0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 424e2: c082 andl %d2,%d0 <== NOT EXECUTED 424e4: d088 addl %a0,%d0 <== NOT EXECUTED 424e6: 600c bras 424f4 <== NOT EXECUTED if (*base != U32_PATTERN) 424e8: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 424ee: b290 cmpl %a0@,%d1 <== NOT EXECUTED 424f0: 6608 bnes 424fa <== 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++) 424f2: 5888 addql #4,%a0 <== NOT EXECUTED 424f4: b088 cmpl %a0,%d0 <== NOT EXECUTED 424f6: 62f0 bhis 424e8 <== NOT EXECUTED 424f8: 600c bras 42506 <== 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 ) 424fa: 4a88 tstl %a0 <== NOT EXECUTED 424fc: 6708 beqs 42506 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 424fe: 47f1 2810 lea %a1@(00000010,%d2:l),%a3 <== NOT EXECUTED 42502: 97c8 subal %a0,%a3 <== NOT EXECUTED 42504: 6002 bras 42508 <== NOT EXECUTED else used = 0; 42506: 97cb subal %a3,%a3 <== NOT EXECUTED 42508: 2a79 0006 0a0c moveal 60a0c ,%a5 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 4250e: 4a8a tstl %a2 <== NOT EXECUTED 42510: 672c beqs 4253e <== NOT EXECUTED #endif { (*print_handler)( 42512: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42516: 4878 0005 pea 5 <== NOT EXECUTED 4251a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4251e: 4eb9 0004 7cd0 jsr 47cd0 <== NOT EXECUTED 42524: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42526: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4252a: 4879 0005 e381 pea 5e381 <== NOT EXECUTED 42530: 2f39 0006 0a10 movel 60a10 ,%sp@- <== NOT EXECUTED 42536: 4e95 jsr %a5@ <== NOT EXECUTED 42538: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 4253c: 6016 bras 42554 <== 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 ); 4253e: 4878 ffff pea ffffffff <== NOT EXECUTED 42542: 4879 0005 e38e pea 5e38e <== NOT EXECUTED 42548: 2f39 0006 0a10 movel 60a10 ,%sp@- <== NOT EXECUTED 4254e: 4e95 jsr %a5@ <== NOT EXECUTED 42550: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42554: 206c 0004 moveal %a4@(4),%a0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42558: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4255a: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 4255c: 2014 movel %a4@,%d0 <== NOT EXECUTED 4255e: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42560: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42564: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42566: 4879 0005 e39c pea 5e39c <== NOT EXECUTED 4256c: 2f39 0006 0a10 movel 60a10 ,%sp@- <== NOT EXECUTED 42572: 2079 0006 0a0c moveal 60a0c ,%a0 <== NOT EXECUTED 42578: 4e90 jsr %a0@ <== NOT EXECUTED 4257a: 2079 0006 0a0c moveal 60a0c ,%a0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42580: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42584: 4ab9 0006 0a08 tstl 60a08 <== NOT EXECUTED 4258a: 6612 bnes 4259e <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 4258c: 4879 0005 e3ba pea 5e3ba <== NOT EXECUTED 42592: 2f39 0006 0a10 movel 60a10 ,%sp@- <== NOT EXECUTED 42598: 4e90 jsr %a0@ <== NOT EXECUTED 4259a: 508f addql #8,%sp <== NOT EXECUTED 4259c: 6014 bras 425b2 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 4259e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 425a0: 4879 0005 e3c7 pea 5e3c7 <== NOT EXECUTED 425a6: 2f39 0006 0a10 movel 60a10 ,%sp@- <== NOT EXECUTED 425ac: 4e90 jsr %a0@ <== NOT EXECUTED 425ae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 425b2: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 <== NOT EXECUTED 425b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000425bc : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 425bc: 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 ) 425c0: 4ab9 0006 0a08 tstl 60a08 425c6: 6668 bnes 42630 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 425c8: 203c feed f00d movel #-17960947,%d0 425ce: 23c0 0006 1214 movel %d0,61214 425d4: 203c 0bad 0d06 movel #195890438,%d0 425da: 23c0 0006 1218 movel %d0,61218 425e0: 203c dead f00d movel #-559026163,%d0 425e6: 23c0 0006 121c movel %d0,6121c 425ec: 203c 600d 0d06 movel #1611468038,%d0 425f2: 23c0 0006 1220 movel %d0,61220 /* * 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) { 425f8: 2039 0006 1846 movel 61846 <_Per_CPU_Information>,%d0 425fe: 6728 beqs 42628 <== NEVER TAKEN 42600: 2239 0006 184a movel 6184a <_Per_CPU_Information+0x4>,%d1 42606: 6720 beqs 42628 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 42608: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 4260a: 2f01 movel %d1,%sp@- 4260c: 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; 42610: 23c0 0006 1228 movel %d0,61228 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 42616: 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 - 42618: 23c1 0006 1224 movel %d1,61224 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 4261e: 4eb9 0004 fad4 jsr 4fad4 42624: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 42628: 7001 moveq #1,%d0 4262a: 23c0 0006 0a08 movel %d0,60a08 } 42630: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042696 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42696: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 4269a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 4269e: 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"); 426a2: 45f9 0004 4384 lea 44384 ,%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); 426a8: 286b 00b6 moveal %a3@(182),%a4 <== NOT EXECUTED char name[32]; printk("BLOWN STACK!!!\n"); 426ac: 4879 0005 e3cd pea 5e3cd <== 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) { 426b2: 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"); 426b6: 4e92 jsr %a2@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 426b8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 426ba: 4879 0005 e3dd pea 5e3dd <== NOT EXECUTED 426c0: 4e92 jsr %a2@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 426c2: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 426c6: 4879 0005 e3fa pea 5e3fa <== NOT EXECUTED 426cc: 4e92 jsr %a2@ <== NOT EXECUTED printk( 426ce: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 426d2: 4879 0005 e40c pea 5e40c <== NOT EXECUTED 426d8: 4e92 jsr %a2@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 426da: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 426de: 4878 0020 pea 20 <== NOT EXECUTED 426e2: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED 426e6: 4eb9 0004 7cd0 jsr 47cd0 <== NOT EXECUTED 426ec: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 426f0: 2e80 movel %d0,%sp@ <== NOT EXECUTED 426f2: 4879 0005 e420 pea 5e420 <== NOT EXECUTED 426f8: 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) 426fa: 206b 00b6 moveal %a3@(182),%a0 <== NOT EXECUTED 426fe: 202b 00b2 movel %a3@(178),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 42702: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42706: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42708: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4270a: 4879 0005 e436 pea 5e436 <== NOT EXECUTED 42710: 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) { 42712: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42716: 4a02 tstb %d2 <== NOT EXECUTED 42718: 6618 bnes 42732 <== NOT EXECUTED printk( 4271a: 486c 0018 pea %a4@(24) <== NOT EXECUTED 4271e: 486c 0008 pea %a4@(8) <== NOT EXECUTED 42722: 4878 0010 pea 10 <== NOT EXECUTED 42726: 4879 0005 e467 pea 5e467 <== NOT EXECUTED 4272c: 4e92 jsr %a2@ <== NOT EXECUTED 4272e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 42732: 4878 0081 pea 81 <== NOT EXECUTED 42736: 4eb9 0004 850c jsr 4850c <== NOT EXECUTED =============================================================================== 0004af78 : * 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; 4af78: 41f9 0006 1df8 lea 61df8 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4af7e: 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; 4af82: 202e 0008 movel %fp@(8),%d0 4af86: 4c50 0001 remul %a0@,%d1,%d0 4af8a: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4af8e: 4a81 tstl %d1 4af90: 6702 beqs 4af94 <== ALWAYS TAKEN ticks += 1; 4af92: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4af94: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046e08 : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 46e08: 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(); 46e0c: 2039 0005 e0d8 movel 5e0d8 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 46e12: 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(); 46e14: 243c 0000 03e8 movel #1000,%d2 46e1a: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 46e1e: 242e 0008 movel %fp@(8),%d2 46e22: 4c40 2001 remul %d0,%d1,%d2 46e26: 4c40 2002 remul %d0,%d2,%d2 46e2a: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 46e2c: 4a81 tstl %d1 46e2e: 6702 beqs 46e32 <== ALWAYS TAKEN ticks += 1; 46e30: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 46e32: 241f movel %sp@+,%d2 46e34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000484ac <_CORE_RWLock_Release>: * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 484ac: 223c 0000 0700 movel #1792,%d1 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 484b2: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 484b6: 2079 0006 19ce moveal 619ce <_Per_CPU_Information+0xc>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 484bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 484c0: 246e 0008 moveal %fp@(8),%a2 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 484c4: 40c0 movew %sr,%d0 484c6: 8280 orl %d0,%d1 484c8: 46c1 movew %d1,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 484ca: 222a 0044 movel %a2@(68),%d1 484ce: 660a bnes 484da <_CORE_RWLock_Release+0x2e> _ISR_Enable( level ); 484d0: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 484d2: 7002 moveq #2,%d0 484d4: 2140 0034 movel %d0,%a0@(52) return CORE_RWLOCK_SUCCESSFUL; 484d8: 6078 bras 48552 <_CORE_RWLock_Release+0xa6> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 484da: 7401 moveq #1,%d2 484dc: b481 cmpl %d1,%d2 484de: 6610 bnes 484f0 <_CORE_RWLock_Release+0x44> the_rwlock->number_of_readers -= 1; 484e0: 222a 0048 movel %a2@(72),%d1 484e4: 5381 subql #1,%d1 484e6: 2541 0048 movel %d1,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 484ea: 6704 beqs 484f0 <_CORE_RWLock_Release+0x44> /* must be unlocked again */ _ISR_Enable( level ); 484ec: 46c0 movew %d0,%sr return CORE_RWLOCK_SUCCESSFUL; 484ee: 6062 bras 48552 <_CORE_RWLock_Release+0xa6> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 484f0: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 484f4: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 484f8: 46c0 movew %d0,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 484fa: 2f0a movel %a2,%sp@- 484fc: 4eb9 0004 9ec4 jsr 49ec4 <_Thread_queue_Dequeue> if ( next ) { 48502: 588f addql #4,%sp 48504: 4a80 tstl %d0 48506: 674a beqs 48552 <_CORE_RWLock_Release+0xa6> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 48508: 7201 moveq #1,%d1 4850a: 2040 moveal %d0,%a0 4850c: b2a8 0030 cmpl %a0@(48),%d1 48510: 6608 bnes 4851a <_CORE_RWLock_Release+0x6e> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 48512: 7002 moveq #2,%d0 48514: 2540 0044 movel %d0,%a2@(68) return CORE_RWLOCK_SUCCESSFUL; 48518: 6038 bras 48552 <_CORE_RWLock_Release+0xa6> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4851a: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4851c: 52aa 0048 addql #1,%a2@(72) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 48520: 49f9 0004 a2f8 lea 4a2f8 <_Thread_queue_First>,%a4 if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 48526: 47f9 0004 a1d0 lea 4a1d0 <_Thread_queue_Extract>,%a3 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4852c: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 48530: 2f0a movel %a2,%sp@- 48532: 4e94 jsr %a4@ if ( !next || 48534: 588f addql #4,%sp 48536: 4a80 tstl %d0 48538: 6718 beqs 48552 <_CORE_RWLock_Release+0xa6> 4853a: 7401 moveq #1,%d2 4853c: 2040 moveal %d0,%a0 4853e: b4a8 0030 cmpl %a0@(48),%d2 48542: 670e beqs 48552 <_CORE_RWLock_Release+0xa6> <== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 48544: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 48548: 2f00 movel %d0,%sp@- 4854a: 2f0a movel %a2,%sp@- 4854c: 4e93 jsr %a3@ } 4854e: 508f addql #8,%sp 48550: 60de bras 48530 <_CORE_RWLock_Release+0x84> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 48552: 4280 clrl %d0 48554: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4855a: 4e5e unlk %fp ... =============================================================================== 00048560 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 48560: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48564: 486e fffc pea %fp@(-4) 48568: 2f2e 0008 movel %fp@(8),%sp@- 4856c: 4eb9 0004 9bf0 jsr 49bf0 <_Thread_Get> switch ( location ) { 48572: 508f addql #8,%sp 48574: 4aae fffc tstl %fp@(-4) 48578: 661e bnes 48598 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4857a: 2f00 movel %d0,%sp@- 4857c: 4eb9 0004 a3e4 jsr 4a3e4 <_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; 48582: 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--; 48584: 2039 0006 156c movel 6156c <_Thread_Dispatch_disable_level>,%d0 4858a: 5380 subql #1,%d0 4858c: 23c0 0006 156c movel %d0,6156c <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48592: 2039 0006 156c movel 6156c <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 48598: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047244 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 47244: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4724a: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4724e: 2279 0006 03ae moveal 603ae <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 47254: 48d7 001c moveml %d2-%d4,%sp@ 47258: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4725c: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 47260: 242e 000c movel %fp@(12),%d2 47264: 262e 0014 movel %fp@(20),%d3 47268: 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 ); 4726c: 40c1 movew %sr,%d1 4726e: 8081 orl %d1,%d0 47270: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 47272: 2028 0048 movel %a0@(72),%d0 47276: 5280 addql #1,%d0 47278: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4727c: 4aa8 0040 tstl %a0@(64) 47280: 6626 bnes 472a8 <_CORE_barrier_Wait+0x64> if ( the_barrier->number_of_waiting_threads == 47282: b0a8 0044 cmpl %a0@(68),%d0 47286: 6620 bnes 472a8 <_CORE_barrier_Wait+0x64> the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 47288: 7001 moveq #1,%d0 4728a: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4728e: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 47290: 2d44 0010 movel %d4,%fp@(16) 47294: 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 ); } 47298: 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 ); 4729c: 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 ); } 472a0: 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 ); 472a2: 4ef9 0004 bd0c jmp 4bd0c <_CORE_barrier_Release> 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; 472a8: 7001 moveq #1,%d0 472aa: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 472ae: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 472b2: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 472b6: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 472b8: 2d43 000c movel %d3,%fp@(12) 472bc: 203c 0004 92cc movel #299724,%d0 472c2: 2d48 0008 movel %a0,%fp@(8) } 472c6: 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 ); 472ca: 2d40 0010 movel %d0,%fp@(16) } 472ce: 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 ); 472d0: 4ef9 0004 8fd4 jmp 48fd4 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 0004675c <_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 ) { 4675c: 4e56 0000 linkw %fp,#0 46760: 2f0a movel %a2,%sp@- 46762: 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)) ) { 46766: 2f0a movel %a2,%sp@- 46768: 4eb9 0004 807c jsr 4807c <_Thread_queue_Dequeue> 4676e: 588f addql #4,%sp 46770: 4a80 tstl %d0 46772: 6624 bnes 46798 <_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 ); 46774: 303c 0700 movew #1792,%d0 46778: 40c1 movew %sr,%d1 4677a: 8081 orl %d1,%d0 4677c: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 4677e: 202a 0048 movel %a2@(72),%d0 46782: b0aa 0040 cmpl %a2@(64),%d0 46786: 640a bccs 46792 <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN the_semaphore->count += 1; 46788: 5280 addql #1,%d0 4678a: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 4678e: 4280 clrl %d0 46790: 6002 bras 46794 <_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; 46792: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 46794: 46c1 movew %d1,%sr 46796: 6002 bras 4679a <_CORE_semaphore_Surrender+0x3e> { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 46798: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4679a: 246e fffc moveal %fp@(-4),%a2 4679e: 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 00fe moveal %a2@(254),%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 eff6 tstl 5eff6 <_Per_CPU_Information+0x8> 4560c: 674a beqs 45658 <_Event_Surrender+0x80> 4560e: b5f9 0005 effa cmpal 5effa <_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 f3d4 moveal 5f3d4 <_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 f3d4 moveal 5f3d4 <_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 f3d4 movel %d0,5f3d4 <_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 7a0c jsr 47a0c <_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 8ab8 jsr 48ab8 <_Watchdog_Remove> 456ba: 2f3c 1003 fff8 movel #268697592,%sp@- 456c0: 2f0a movel %a2,%sp@- 456c2: 4eb9 0004 7a0c jsr 47a0c <_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 7da8 jsr 47da8 <_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 effa cmpl 5effa <_Per_CPU_Information+0xc>,%d0 45712: 6614 bnes 45728 <_Event_Timeout+0x4c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 45714: 2239 0005 f3d4 movel 5f3d4 <_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 f3d4 movel %d1,5f3d4 <_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 7a0c jsr 47a0c <_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 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 45748: 5380 subql #1,%d0 4574a: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 45750: 2039 0005 eb98 movel 5eb98 <_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 ... =============================================================================== 0004b168 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4b168: 4e56 ffcc linkw %fp,#-52 4b16c: 202e 0010 movel %fp@(16),%d0 4b170: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b174: 246e 0008 moveal %fp@(8),%a2 4b178: 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; 4b17c: 2403 movel %d3,%d2 4b17e: d480 addl %d0,%d2 uintptr_t const free_size = stats->free_size; 4b180: 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; 4b184: 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; 4b188: 2a2a 0010 movel %a2@(16),%d5 uintptr_t const min_block_size = heap->min_block_size; 4b18c: 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; 4b190: 42ae fff8 clrl %fp@(-8) Heap_Block *extend_last_block = NULL; 4b194: 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; 4b198: 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 ) { 4b19c: b682 cmpl %d2,%d3 4b19e: 6200 01a6 bhiw 4b346 <_Heap_Extend+0x1de> return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4b1a2: 486e fffc pea %fp@(-4) 4b1a6: 486e fff8 pea %fp@(-8) 4b1aa: 2f01 movel %d1,%sp@- 4b1ac: 2f05 movel %d5,%sp@- 4b1ae: 2f00 movel %d0,%sp@- 4b1b0: 2f03 movel %d3,%sp@- 4b1b2: 4eb9 0004 69e6 jsr 469e6 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4b1b8: 4fef 0018 lea %sp@(24),%sp 4b1bc: 4a00 tstb %d0 4b1be: 6700 0186 beqw 4b346 <_Heap_Extend+0x1de> 4b1c2: 2044 moveal %d4,%a0 4b1c4: 9bcd subal %a5,%a5 4b1c6: 4281 clrl %d1 4b1c8: 97cb subal %a3,%a3 4b1ca: 99cc subal %a4,%a4 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4b1cc: b888 cmpl %a0,%d4 4b1ce: 6704 beqs 4b1d4 <_Heap_Extend+0x6c> 4b1d0: 2248 moveal %a0,%a1 4b1d2: 6004 bras 4b1d8 <_Heap_Extend+0x70> 4b1d4: 226a 0018 moveal %a2@(24),%a1 uintptr_t const sub_area_end = start_block->prev_size; 4b1d8: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4b1da: b680 cmpl %d0,%d3 4b1dc: 6406 bccs 4b1e4 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4b1de: b3c2 cmpal %d2,%a1 4b1e0: 6500 0164 bcsw 4b346 <_Heap_Extend+0x1de> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4b1e4: b3c2 cmpal %d2,%a1 4b1e6: 6706 beqs 4b1ee <_Heap_Extend+0x86> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4b1e8: b082 cmpl %d2,%d0 4b1ea: 6206 bhis 4b1f2 <_Heap_Extend+0x8a> 4b1ec: 6006 bras 4b1f4 <_Heap_Extend+0x8c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4b1ee: 2848 moveal %a0,%a4 4b1f0: 6002 bras 4b1f4 <_Heap_Extend+0x8c> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4b1f2: 2208 movel %a0,%d1 4b1f4: 2e00 movel %d0,%d7 4b1f6: 2240 moveal %d0,%a1 4b1f8: 5189 subql #8,%a1 4b1fa: 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); 4b1fe: 93c6 subal %d6,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4b200: b680 cmpl %d0,%d3 4b202: 6606 bnes 4b20a <_Heap_Extend+0xa2> start_block->prev_size = extend_area_end; 4b204: 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 ) 4b206: 2649 moveal %a1,%a3 4b208: 6006 bras 4b210 <_Heap_Extend+0xa8> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4b20a: b680 cmpl %d0,%d3 4b20c: 6302 blss 4b210 <_Heap_Extend+0xa8> 4b20e: 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; 4b210: 70fe moveq #-2,%d0 4b212: 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); 4b216: 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 ); 4b21a: b888 cmpl %a0,%d4 4b21c: 66ae bnes 4b1cc <_Heap_Extend+0x64> if ( extend_area_begin < heap->area_begin ) { 4b21e: b6aa 0018 cmpl %a2@(24),%d3 4b222: 6406 bccs 4b22a <_Heap_Extend+0xc2> heap->area_begin = extend_area_begin; 4b224: 2543 0018 movel %d3,%a2@(24) 4b228: 600a bras 4b234 <_Heap_Extend+0xcc> } else if ( heap->area_end < extend_area_end ) { 4b22a: b4aa 001c cmpl %a2@(28),%d2 4b22e: 6304 blss 4b234 <_Heap_Extend+0xcc> heap->area_end = extend_area_end; 4b230: 2542 001c movel %d2,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4b234: 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 = 4b238: 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; 4b23a: 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; 4b23c: 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 = 4b240: 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; 4b242: 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; 4b244: 2282 movel %d2,%a1@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4b246: 2344 0004 movel %d4,%a1@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4b24a: 2080 movel %d0,%a0@ extend_last_block->size_and_flag = 0; 4b24c: 42a8 0004 clrl %a0@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4b250: b3ea 0020 cmpal %a2@(32),%a1 4b254: 6406 bccs 4b25c <_Heap_Extend+0xf4> heap->first_block = extend_first_block; 4b256: 2549 0020 movel %a1,%a2@(32) 4b25a: 600a bras 4b266 <_Heap_Extend+0xfe> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4b25c: b1ea 0024 cmpal %a2@(36),%a0 4b260: 6304 blss 4b266 <_Heap_Extend+0xfe> heap->last_block = extend_last_block; 4b262: 2548 0024 movel %a0,%a2@(36) } if ( merge_below_block != NULL ) { 4b266: 4a8c tstl %a4 4b268: 6732 beqs 4b29c <_Heap_Extend+0x134> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4b26a: 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 ); 4b26e: 5083 addql #8,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4b270: 2803 movel %d3,%d4 4b272: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4b276: 4a81 tstl %d1 4b278: 6704 beqs 4b27e <_Heap_Extend+0x116> return value - remainder + alignment; 4b27a: d680 addl %d0,%d3 4b27c: 9681 subl %d1,%d3 uintptr_t const new_first_block_begin = 4b27e: 2043 moveal %d3,%a0 4b280: 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 = 4b282: 200c movel %a4,%d0 4b284: 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; 4b286: 7201 moveq #1,%d1 4b288: 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; 4b28a: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4b28c: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4b290: 2f08 movel %a0,%sp@- 4b292: 2f0a movel %a2,%sp@- 4b294: 4eba feb6 jsr %pc@(4b14c <_Heap_Free_block>) 4b298: 508f addql #8,%sp 4b29a: 600e bras 4b2aa <_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 ) { 4b29c: 4a81 tstl %d1 4b29e: 670a beqs 4b2aa <_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; 4b2a0: 9288 subl %a0,%d1 4b2a2: 7801 moveq #1,%d4 4b2a4: 8881 orl %d1,%d4 4b2a6: 2144 0004 movel %d4,%a0@(4) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4b2aa: 4a8b tstl %a3 4b2ac: 6734 beqs 4b2e2 <_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, 4b2ae: 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( 4b2b0: 948b subl %a3,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4b2b2: 2202 movel %d2,%d1 4b2b4: 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; 4b2ba: 7201 moveq #1,%d1 4b2bc: 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) 4b2be: 202b 0004 movel %a3@(4),%d0 4b2c2: 9082 subl %d2,%d0 | HEAP_PREV_BLOCK_USED; 4b2c4: 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; 4b2c6: 7001 moveq #1,%d0 4b2c8: 2781 2804 movel %d1,%a3@(00000004,%d2:l) 4b2cc: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4b2d0: 8480 orl %d0,%d2 4b2d2: 2742 0004 movel %d2,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4b2d6: 2f0b movel %a3,%sp@- 4b2d8: 2f0a movel %a2,%sp@- 4b2da: 4eba fe70 jsr %pc@(4b14c <_Heap_Free_block>) 4b2de: 508f addql #8,%sp 4b2e0: 6020 bras 4b302 <_Heap_Extend+0x19a> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4b2e2: 4a8d tstl %a5 4b2e4: 671c beqs 4b302 <_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; 4b2e6: 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; 4b2e8: 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 ); 4b2ea: 202e fff8 movel %fp@(-8),%d0 4b2ee: 908d subl %a5,%d0 4b2f0: 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( 4b2f4: 206e fffc moveal %fp@(-4),%a0 block->size_and_flag = size | flag; 4b2f8: 8280 orl %d0,%d1 4b2fa: 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; 4b2fe: 89a8 0004 orl %d4,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4b302: 4a8c tstl %a4 4b304: 6610 bnes 4b316 <_Heap_Extend+0x1ae> 4b306: 4a8b tstl %a3 4b308: 660c bnes 4b316 <_Heap_Extend+0x1ae> _Heap_Free_block( heap, extend_first_block ); 4b30a: 2f2e fff8 movel %fp@(-8),%sp@- 4b30e: 2f0a movel %a2,%sp@- 4b310: 4eba fe3a jsr %pc@(4b14c <_Heap_Free_block>) 4b314: 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 4b316: 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; 4b31a: 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( 4b31c: 202a 0020 movel %a2@(32),%d0 4b320: 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; 4b322: c2a8 0004 andl %a0@(4),%d1 block->size_and_flag = size | flag; 4b326: 8280 orl %d0,%d1 4b328: 2141 0004 movel %d1,%a0@(4) } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4b32c: 202a 0030 movel %a2@(48),%d0 4b330: 90ae fff4 subl %fp@(-12),%d0 /* Statistics */ stats->size += extended_size; 4b334: d1aa 002c addl %d0,%a2@(44) if ( extended_size_ptr != NULL ) 4b338: 4aae 0014 tstl %fp@(20) 4b33c: 670c beqs 4b34a <_Heap_Extend+0x1e2> <== NEVER TAKEN *extended_size_ptr = extended_size; 4b33e: 206e 0014 moveal %fp@(20),%a0 4b342: 2080 movel %d0,%a0@ 4b344: 6004 bras 4b34a <_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; 4b346: 4200 clrb %d0 4b348: 6002 bras 4b34c <_Heap_Extend+0x1e4> stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4b34a: 7001 moveq #1,%d0 } 4b34c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b352: 4e5e unlk %fp ... =============================================================================== 0004b118 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4b118: 4e56 ffe8 linkw %fp,#-24 4b11c: 206e 0008 moveal %fp@(8),%a0 4b120: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4b124: 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 ) { 4b128: 6700 014e beqw 4b278 <_Heap_Free+0x160> 4b12c: 2240 moveal %d0,%a1 4b12e: 5189 subql #8,%a1 4b130: 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 4b136: 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); 4b13a: 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; 4b13c: b889 cmpl %a1,%d4 4b13e: 620c bhis 4b14c <_Heap_Free+0x34> 4b140: b3e8 0024 cmpal %a0@(36),%a1 4b144: 53c0 sls %d0 4b146: 49c0 extbl %d0 4b148: 4480 negl %d0 4b14a: 6002 bras 4b14e <_Heap_Free+0x36> 4b14c: 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 ) ) { 4b14e: 4a00 tstb %d0 4b150: 6700 012a beqw 4b27c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4b154: 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; 4b158: 70fe moveq #-2,%d0 4b15a: 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); 4b15c: 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; 4b160: b88a cmpl %a2,%d4 4b162: 620c bhis 4b170 <_Heap_Free+0x58> <== NEVER TAKEN 4b164: b5e8 0024 cmpal %a0@(36),%a2 4b168: 53c1 sls %d1 4b16a: 49c1 extbl %d1 4b16c: 4481 negl %d1 4b16e: 6002 bras 4b172 <_Heap_Free+0x5a> 4b170: 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 ) ) { 4b172: 4a01 tstb %d1 4b174: 6700 0106 beqw 4b27c <_Heap_Free+0x164> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4b178: 242a 0004 movel %a2@(4),%d2 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4b17c: 0802 0000 btst #0,%d2 4b180: 6700 00fa beqw 4b27c <_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; 4b184: 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 4b186: 2668 0024 moveal %a0@(36),%a3 4b18a: c481 andl %d1,%d2 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4b18c: b7ca cmpal %a2,%a3 4b18e: 670c beqs 4b19c <_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; 4b190: 7201 moveq #1,%d1 4b192: c2b2 2804 andl %a2@(00000004,%d2:l),%d1 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4b196: 5381 subql #1,%d1 4b198: 4481 negl %d1 4b19a: 6002 bras 4b19e <_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 )); 4b19c: 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 4b19e: 1a01 moveb %d1,%d5 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4b1a0: 0803 0000 btst #0,%d3 4b1a4: 6660 bnes 4b206 <_Heap_Free+0xee> uintptr_t const prev_size = block->prev_size; 4b1a6: 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); 4b1a8: 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; 4b1aa: b889 cmpl %a1,%d4 4b1ac: 620a bhis 4b1b8 <_Heap_Free+0xa0> <== NEVER TAKEN 4b1ae: b3cb cmpal %a3,%a1 4b1b0: 53c1 sls %d1 4b1b2: 49c1 extbl %d1 4b1b4: 4481 negl %d1 4b1b6: 6002 bras 4b1ba <_Heap_Free+0xa2> 4b1b8: 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 ) ) { 4b1ba: 4a01 tstb %d1 4b1bc: 6700 00be beqw 4b27c <_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; 4b1c0: 7201 moveq #1,%d1 4b1c2: 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) ) { 4b1c6: 6700 00b4 beqw 4b27c <_Heap_Free+0x164> 4b1ca: d680 addl %d0,%d3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4b1cc: 4a05 tstb %d5 4b1ce: 6724 beqs 4b1f4 <_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; 4b1d0: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + prev_size + next_block_size; 4b1d4: d483 addl %d3,%d2 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b1d6: 7201 moveq #1,%d1 Heap_Block *prev = block->prev; 4b1d8: 246a 000c moveal %a2@(12),%a2 prev->next = next; 4b1dc: 254b 0008 movel %a3,%a2@(8) 4b1e0: 8282 orl %d2,%d1 next->prev = prev; 4b1e2: 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; 4b1e6: 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; 4b1ea: 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; 4b1ee: 2341 0004 movel %d1,%a1@(4) 4b1f2: 6078 bras 4b26c <_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; 4b1f4: 7401 moveq #1,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b1f6: 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; 4b1f8: 8483 orl %d3,%d2 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4b1fa: 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; 4b1fc: 2342 0004 movel %d2,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b200: c3aa 0004 andl %d1,%a2@(4) 4b204: 6066 bras 4b26c <_Heap_Free+0x154> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4b206: 4a01 tstb %d1 4b208: 672a beqs 4b234 <_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; 4b20a: 266a 0008 moveal %a2@(8),%a3 uintptr_t const size = block_size + next_block_size; 4b20e: 2202 movel %d2,%d1 4b210: d280 addl %d0,%d1 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4b212: 7401 moveq #1,%d2 Heap_Block *prev = old_block->prev; 4b214: 246a 000c moveal %a2@(12),%a2 new_block->next = next; 4b218: 234b 0008 movel %a3,%a1@(8) 4b21c: 8481 orl %d1,%d2 new_block->prev = prev; 4b21e: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4b222: 2381 1800 movel %d1,%a1@(00000000,%d1:l) next->prev = new_block; 4b226: 2749 000c movel %a1,%a3@(12) prev->next = new_block; 4b22a: 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; 4b22e: 2342 0004 movel %d2,%a1@(4) 4b232: 6038 bras 4b26c <_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; 4b234: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4b236: 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; 4b238: 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; 4b23a: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4b23e: 2348 000c movel %a0,%a1@(12) 4b242: 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; 4b246: 2228 0038 movel %a0@(56),%d1 4b24a: 5281 addql #1,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4b24c: 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; 4b250: c5aa 0004 andl %d2,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4b254: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4b258: 2480 movel %d0,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4b25a: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4b25e: 2141 0038 movel %d1,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4b262: b2a8 003c cmpl %a0@(60),%d1 4b266: 6304 blss 4b26c <_Heap_Free+0x154> stats->max_free_blocks = stats->free_blocks; 4b268: 2141 003c movel %d1,%a0@(60) } } /* Statistics */ --stats->used_blocks; 4b26c: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4b270: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4b274: 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; 4b278: 7001 moveq #1,%d0 4b27a: 6002 bras 4b27e <_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 ); 4b27c: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4b27e: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4b282: 4e5e unlk %fp ... =============================================================================== 0004697e <_Heap_Get_first_and_last_block>: uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 4697e: 4e56 fff4 linkw %fp,#-12 46982: 206e 0008 moveal %fp@(8),%a0 uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 46986: 2008 movel %a0,%d0 46988: 5080 addql #8,%d0 uintptr_t page_size, uintptr_t min_block_size, Heap_Block **first_block_ptr, Heap_Block **last_block_ptr ) { 4698a: 48d7 001c moveml %d2-%d4,%sp@ 4698e: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 46992: 2800 movel %d0,%d4 46994: 242e 000c movel %fp@(12),%d2 uintptr_t const heap_area_end = heap_area_begin + heap_area_size; 46998: 43f0 2800 lea %a0@(00000000,%d2:l),%a1 4699c: 4c41 4003 remul %d1,%d3,%d4 if ( remainder != 0 ) { 469a0: 4a83 tstl %d3 469a2: 6704 beqs 469a8 <_Heap_Get_first_and_last_block+0x2a> return value - remainder + alignment; 469a4: d081 addl %d1,%d0 469a6: 9083 subl %d3,%d0 _Heap_Align_down( heap_area_size - overhead, page_size ); Heap_Block *const first_block = (Heap_Block *) first_block_begin; Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( 469a8: b1c9 cmpal %a1,%a0 469aa: 622e bhis 469da <_Heap_Get_first_and_last_block+0x5c> uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); 469ac: 2240 moveal %d0,%a1 469ae: 5189 subql #8,%a1 uintptr_t const heap_area_end = heap_area_begin + heap_area_size; uintptr_t const alloc_area_begin = _Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = 469b0: 9088 subl %a0,%d0 Heap_Block *const last_block = _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead 469b2: b082 cmpl %d2,%d0 469b4: 6424 bccs 469da <_Heap_Get_first_and_last_block+0x5c> uintptr_t const first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); uintptr_t const first_block_size = _Heap_Align_down( heap_area_size - overhead, page_size ); 469b6: 9480 subl %d0,%d2 469b8: 2002 movel %d2,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 469ba: 2602 movel %d2,%d3 469bc: 4c41 3002 remul %d1,%d2,%d3 469c0: 9082 subl %d2,%d0 _Heap_Block_at( first_block, first_block_size ); if ( heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size 469c2: b0ae 0014 cmpl %fp@(20),%d0 469c6: 6512 bcss 469da <_Heap_Get_first_and_last_block+0x5c><== NEVER TAKEN ) { /* Invalid area or area too small */ return false; } *first_block_ptr = first_block; 469c8: 206e 0018 moveal %fp@(24),%a0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 469cc: d089 addl %a1,%d0 469ce: 2089 movel %a1,%a0@ 469d0: 206e 001c moveal %fp@(28),%a0 469d4: 2080 movel %d0,%a0@ *last_block_ptr = last_block; return true; 469d6: 7001 moveq #1,%d0 469d8: 6002 bras 469dc <_Heap_Get_first_and_last_block+0x5e> heap_area_end < heap_area_begin || heap_area_size <= overhead || first_block_size < min_block_size ) { /* Invalid area or area too small */ return false; 469da: 4200 clrb %d0 *first_block_ptr = first_block; *last_block_ptr = last_block; return true; } 469dc: 4cd7 001c moveml %sp@,%d2-%d4 469e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b19c <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5b19c: 4e56 0000 linkw %fp,#0 5b1a0: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5b1a4: 2040 moveal %d0,%a0 5b1a6: 5188 subql #8,%a0 5b1a8: 226e 0008 moveal %fp@(8),%a1 5b1ac: 2f02 movel %d2,%sp@- 5b1ae: 2400 movel %d0,%d2 5b1b0: 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 5b1b6: 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); 5b1ba: 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; 5b1bc: b488 cmpl %a0,%d2 5b1be: 620c bhis 5b1cc <_Heap_Size_of_alloc_area+0x30> 5b1c0: b1e9 0024 cmpal %a1@(36),%a0 5b1c4: 53c1 sls %d1 5b1c6: 49c1 extbl %d1 5b1c8: 4481 negl %d1 5b1ca: 6002 bras 5b1ce <_Heap_Size_of_alloc_area+0x32> 5b1cc: 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 ) ) { 5b1ce: 4a01 tstb %d1 5b1d0: 673a beqs 5b20c <_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; 5b1d2: 72fe moveq #-2,%d1 5b1d4: 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); 5b1d8: 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; 5b1dc: b488 cmpl %a0,%d2 5b1de: 620c bhis 5b1ec <_Heap_Size_of_alloc_area+0x50> <== NEVER TAKEN 5b1e0: b1e9 0024 cmpal %a1@(36),%a0 5b1e4: 53c1 sls %d1 5b1e6: 49c1 extbl %d1 5b1e8: 4481 negl %d1 5b1ea: 6002 bras 5b1ee <_Heap_Size_of_alloc_area+0x52> 5b1ec: 4281 clrl %d1 <== NOT EXECUTED } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 5b1ee: 4a01 tstb %d1 5b1f0: 671a beqs 5b20c <_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; 5b1f2: 7201 moveq #1,%d1 5b1f4: c2a8 0004 andl %a0@(4),%d1 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5b1f8: 6712 beqs 5b20c <_Heap_Size_of_alloc_area+0x70> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5b1fa: 7204 moveq #4,%d1 5b1fc: 9280 subl %d0,%d1 5b1fe: 2001 movel %d1,%d0 5b200: d088 addl %a0,%d0 5b202: 226e 0010 moveal %fp@(16),%a1 5b206: 2280 movel %d0,%a1@ return true; 5b208: 7001 moveq #1,%d0 5b20a: 6002 bras 5b20e <_Heap_Size_of_alloc_area+0x72> if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5b20c: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } 5b20e: 241f movel %sp@+,%d2 5b210: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047416 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47416: 4e56 ffd0 linkw %fp,#-48 4741a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4741e: 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; 47422: 45fa ffac lea %pc@(473d0 <_Heap_Walk_print_nothing>),%a2 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 47426: 242e 000c movel %fp@(12),%d2 uintptr_t const page_size = heap->page_size; 4742a: 282b 0010 movel %a3@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4742e: 2a2b 0014 movel %a3@(20),%d5 Heap_Block *const first_block = heap->first_block; 47432: 2c2b 0020 movel %a3@(32),%d6 Heap_Block *const last_block = heap->last_block; 47436: 2e2b 0024 movel %a3@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 4743a: 4a2e 0013 tstb %fp@(19) 4743e: 6704 beqs 47444 <_Heap_Walk+0x2e> 47440: 45fa ff96 lea %pc@(473d8 <_Heap_Walk_print>),%a2 if ( !_System_state_Is_up( _System_state_Get() ) ) { 47444: 7003 moveq #3,%d0 47446: b0b9 0006 0e44 cmpl 60e44 <_System_state_Current>,%d0 4744c: 6600 02fc bnew 4774a <_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)( 47450: 2f2b 000c movel %a3@(12),%sp@- 47454: 2f2b 0008 movel %a3@(8),%sp@- 47458: 2f07 movel %d7,%sp@- 4745a: 2f06 movel %d6,%sp@- 4745c: 2f2b 001c movel %a3@(28),%sp@- 47460: 2f2b 0018 movel %a3@(24),%sp@- 47464: 2f05 movel %d5,%sp@- 47466: 2f04 movel %d4,%sp@- 47468: 4879 0005 d0cb pea 5d0cb <_Status_Object_name_errors_to_status+0x5d> 4746e: 42a7 clrl %sp@- 47470: 2f02 movel %d2,%sp@- 47472: 4e92 jsr %a2@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 47474: 4fef 002c lea %sp@(44),%sp 47478: 4a84 tstl %d4 4747a: 6608 bnes 47484 <_Heap_Walk+0x6e> (*printer)( source, true, "page size is zero\n" ); 4747c: 4879 0005 d15c pea 5d15c <_Status_Object_name_errors_to_status+0xee> 47482: 606c bras 474f0 <_Heap_Walk+0xda> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 47484: 7003 moveq #3,%d0 47486: c084 andl %d4,%d0 return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 47488: 670c beqs 47496 <_Heap_Walk+0x80> (*printer)( 4748a: 2f04 movel %d4,%sp@- 4748c: 4879 0005 d16f pea 5d16f <_Status_Object_name_errors_to_status+0x101> 47492: 6000 02ca braw 4775e <_Heap_Walk+0x348> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 47496: 2205 movel %d5,%d1 47498: 4c44 1000 remul %d4,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 4749c: 4a80 tstl %d0 4749e: 670c beqs 474ac <_Heap_Walk+0x96> (*printer)( 474a0: 2f05 movel %d5,%sp@- 474a2: 4879 0005 d18d pea 5d18d <_Status_Object_name_errors_to_status+0x11f> 474a8: 6000 02b4 braw 4775e <_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; 474ac: 2006 movel %d6,%d0 474ae: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 474b0: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( 474b4: 4a81 tstl %d1 474b6: 670c beqs 474c4 <_Heap_Walk+0xae> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 474b8: 2f06 movel %d6,%sp@- 474ba: 4879 0005 d1b1 pea 5d1b1 <_Status_Object_name_errors_to_status+0x143> 474c0: 6000 029c braw 4775e <_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; 474c4: 7001 moveq #1,%d0 474c6: 2046 moveal %d6,%a0 474c8: c0a8 0004 andl %a0@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 474cc: 6608 bnes 474d6 <_Heap_Walk+0xc0> (*printer)( 474ce: 4879 0005 d1e2 pea 5d1e2 <_Status_Object_name_errors_to_status+0x174> 474d4: 601a bras 474f0 <_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; 474d6: 70fe moveq #-2,%d0 474d8: 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); 474da: 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; 474dc: 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); 474e0: 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; 474e2: 7001 moveq #1,%d0 474e4: c0ac 0004 andl %a4@(4),%d0 ); return false; } if ( _Heap_Is_free( last_block ) ) { 474e8: 6616 bnes 47500 <_Heap_Walk+0xea> (*printer)( 474ea: 4879 0005 d210 pea 5d210 <_Status_Object_name_errors_to_status+0x1a2> 474f0: 4878 0001 pea 1 474f4: 2f02 movel %d2,%sp@- 474f6: 4e92 jsr %a2@ 474f8: 4fef 000c lea %sp@(12),%sp 474fc: 6000 009e braw 4759c <_Heap_Walk+0x186> ); return false; } if ( 47500: bc8c cmpl %a4,%d6 47502: 6708 beqs 4750c <_Heap_Walk+0xf6> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 47504: 4879 0005 d225 pea 5d225 <_Status_Object_name_errors_to_status+0x1b7> 4750a: 60e4 bras 474f0 <_Heap_Walk+0xda> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 4750c: 262b 0010 movel %a3@(16),%d3 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 47510: 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; 47512: 206b 0008 moveal %a3@(8),%a0 47516: 2d44 fff8 movel %d4,%fp@(-8) 4751a: 2d43 fffc movel %d3,%fp@(-4) 4751e: 6000 0088 braw 475a8 <_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; 47522: b1eb 0020 cmpal %a3@(32),%a0 47526: 650c bcss 47534 <_Heap_Walk+0x11e> 47528: b1eb 0024 cmpal %a3@(36),%a0 4752c: 53c0 sls %d0 4752e: 49c0 extbl %d0 47530: 4480 negl %d0 47532: 6002 bras 47536 <_Heap_Walk+0x120> 47534: 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 ) ) { 47536: 4a00 tstb %d0 47538: 660c bnes 47546 <_Heap_Walk+0x130> (*printer)( 4753a: 2f08 movel %a0,%sp@- 4753c: 4879 0005 d254 pea 5d254 <_Status_Object_name_errors_to_status+0x1e6> 47542: 6000 021a braw 4775e <_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; 47546: 4be8 0008 lea %a0@(8),%a5 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4754a: 200d movel %a5,%d0 4754c: 262e fffc movel %fp@(-4),%d3 47550: 4c43 0004 remul %d3,%d4,%d0 ); return false; } if ( 47554: 4a84 tstl %d4 47556: 670c beqs 47564 <_Heap_Walk+0x14e> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 47558: 2f08 movel %a0,%sp@- 4755a: 4879 0005 d274 pea 5d274 <_Status_Object_name_errors_to_status+0x206> 47560: 6000 01fc braw 4775e <_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; 47564: 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; 47566: 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; 47568: 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; 4756c: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 47570: 670c beqs 4757e <_Heap_Walk+0x168> (*printer)( 47572: 2f08 movel %a0,%sp@- 47574: 4879 0005 d2a4 pea 5d2a4 <_Status_Object_name_errors_to_status+0x236> 4757a: 6000 01e2 braw 4775e <_Heap_Walk+0x348> ); return false; } if ( free_block->prev != prev_block ) { 4757e: 2028 000c movel %a0@(12),%d0 47582: b280 cmpl %d0,%d1 47584: 671c beqs 475a2 <_Heap_Walk+0x18c> (*printer)( 47586: 2f00 movel %d0,%sp@- 47588: 2f08 movel %a0,%sp@- 4758a: 4879 0005 d2c0 pea 5d2c0 <_Status_Object_name_errors_to_status+0x252> 47590: 4878 0001 pea 1 47594: 2f02 movel %d2,%sp@- 47596: 4e92 jsr %a2@ 47598: 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; 4759c: 4200 clrb %d0 4759e: 6000 01ac braw 4774c <_Heap_Walk+0x336> return false; } prev_block = free_block; free_block = free_block->next; 475a2: 2208 movel %a0,%d1 475a4: 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 ) { 475a8: b7c8 cmpal %a0,%a3 475aa: 6600 ff76 bnew 47522 <_Heap_Walk+0x10c> 475ae: 282e fff8 movel %fp@(-8),%d4 475b2: 6002 bras 475b6 <_Heap_Walk+0x1a0> block->prev_size ); } block = next_block; } while ( block != first_block ); 475b4: 284d moveal %a5,%a4 return true; } 475b6: 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; 475ba: 76fe moveq #-2,%d3 475bc: c680 andl %d0,%d3 475be: 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); 475c2: 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; 475c6: bbeb 0020 cmpal %a3@(32),%a5 475ca: 650c bcss 475d8 <_Heap_Walk+0x1c2> <== NEVER TAKEN 475cc: bbeb 0024 cmpal %a3@(36),%a5 475d0: 53c0 sls %d0 475d2: 49c0 extbl %d0 475d4: 4480 negl %d0 475d6: 6002 bras 475da <_Heap_Walk+0x1c4> 475d8: 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 ) ) { 475da: 4a00 tstb %d0 475dc: 660c bnes 475ea <_Heap_Walk+0x1d4> (*printer)( 475de: 2f0d movel %a5,%sp@- 475e0: 2f0c movel %a4,%sp@- 475e2: 4879 0005 d2f2 pea 5d2f2 <_Status_Object_name_errors_to_status+0x284> 475e8: 60a6 bras 47590 <_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; 475ea: be8c cmpl %a4,%d7 475ec: 56c0 sne %d0 475ee: 2200 movel %d0,%d1 475f0: 4481 negl %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 475f2: 2003 movel %d3,%d0 475f4: 1d41 fffb moveb %d1,%fp@(-5) 475f8: 4c44 0001 remul %d4,%d1,%d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 475fc: 4a81 tstl %d1 475fe: 6714 beqs 47614 <_Heap_Walk+0x1fe> 47600: 4a2e fffb tstb %fp@(-5) 47604: 670e beqs 47614 <_Heap_Walk+0x1fe> (*printer)( 47606: 2f03 movel %d3,%sp@- 47608: 2f0c movel %a4,%sp@- 4760a: 4879 0005 d31f pea 5d31f <_Status_Object_name_errors_to_status+0x2b1> 47610: 6000 ff7e braw 47590 <_Heap_Walk+0x17a> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 47614: ba83 cmpl %d3,%d5 47616: 6322 blss 4763a <_Heap_Walk+0x224> 47618: 4a2e fffb tstb %fp@(-5) 4761c: 671c beqs 4763a <_Heap_Walk+0x224> <== NEVER TAKEN (*printer)( 4761e: 2f05 movel %d5,%sp@- 47620: 2f03 movel %d3,%sp@- 47622: 2f0c movel %a4,%sp@- 47624: 4879 0005 d34d pea 5d34d <_Status_Object_name_errors_to_status+0x2df> 4762a: 4878 0001 pea 1 4762e: 2f02 movel %d2,%sp@- 47630: 4e92 jsr %a2@ block, block_size, min_block_size ); return false; 47632: 4fef 0018 lea %sp@(24),%sp 47636: 6000 ff64 braw 4759c <_Heap_Walk+0x186> } if ( next_block_begin <= block_begin && is_not_last_block ) { 4763a: b9cd cmpal %a5,%a4 4763c: 6514 bcss 47652 <_Heap_Walk+0x23c> 4763e: 4a2e fffb tstb %fp@(-5) 47642: 670e beqs 47652 <_Heap_Walk+0x23c> (*printer)( 47644: 2f0d movel %a5,%sp@- 47646: 2f0c movel %a4,%sp@- 47648: 4879 0005 d378 pea 5d378 <_Status_Object_name_errors_to_status+0x30a> 4764e: 6000 ff40 braw 47590 <_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; 47652: 7001 moveq #1,%d0 47654: c0ae fffc andl %fp@(-4),%d0 47658: 2d40 fffc movel %d0,%fp@(-4) 4765c: 7001 moveq #1,%d0 4765e: c0ad 0004 andl %a5@(4),%d0 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 47662: 6600 00ae bnew 47712 <_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; 47666: 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)( 4766a: 43f9 0005 d098 lea 5d098 <_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 ? 47670: 206c 0008 moveal %a4@(8),%a0 47674: 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)( 47678: b1eb 000c cmpal %a3@(12),%a0 4767c: 6710 beqs 4768e <_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)" : "") 4767e: 43f9 0005 cfe0 lea 5cfe0 ,%a1 47684: b7c8 cmpal %a0,%a3 47686: 6606 bnes 4768e <_Heap_Walk+0x278> 47688: 43f9 0005 d0a7 lea 5d0a7 <_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 ? 4768e: 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)( 47692: 223c 0005 d0b1 movel #381105,%d1 47698: b0ae fff8 cmpl %fp@(-8),%d0 4769c: 6710 beqs 476ae <_Heap_Walk+0x298> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 4769e: 223c 0005 cfe0 movel #380896,%d1 476a4: b7c0 cmpal %d0,%a3 476a6: 6606 bnes 476ae <_Heap_Walk+0x298> 476a8: 223c 0005 d0c1 movel #381121,%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)( 476ae: 2f09 movel %a1,%sp@- 476b0: 2f08 movel %a0,%sp@- 476b2: 2f01 movel %d1,%sp@- 476b4: 2f00 movel %d0,%sp@- 476b6: 2f03 movel %d3,%sp@- 476b8: 2f0c movel %a4,%sp@- 476ba: 4879 0005 d3ac pea 5d3ac <_Status_Object_name_errors_to_status+0x33e> 476c0: 42a7 clrl %sp@- 476c2: 2f02 movel %d2,%sp@- 476c4: 4e92 jsr %a2@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 476c6: 2015 movel %a5@,%d0 476c8: 4fef 0024 lea %sp@(36),%sp 476cc: b083 cmpl %d3,%d0 476ce: 671e beqs 476ee <_Heap_Walk+0x2d8> (*printer)( 476d0: 2f0d movel %a5,%sp@- 476d2: 2f00 movel %d0,%sp@- 476d4: 2f03 movel %d3,%sp@- 476d6: 2f0c movel %a4,%sp@- 476d8: 4879 0005 d3e1 pea 5d3e1 <_Status_Object_name_errors_to_status+0x373> 476de: 4878 0001 pea 1 476e2: 2f02 movel %d2,%sp@- 476e4: 4e92 jsr %a2@ 476e6: 4fef 001c lea %sp@(28),%sp 476ea: 6000 feb0 braw 4759c <_Heap_Walk+0x186> ); return false; } if ( !prev_used ) { 476ee: 4aae fffc tstl %fp@(-4) 476f2: 660a bnes 476fe <_Heap_Walk+0x2e8> (*printer)( 476f4: 2f0c movel %a4,%sp@- 476f6: 4879 0005 d41a pea 5d41a <_Status_Object_name_errors_to_status+0x3ac> 476fc: 6060 bras 4775e <_Heap_Walk+0x348> 476fe: 206b 0008 moveal %a3@(8),%a0 47702: 6008 bras 4770c <_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 ) { 47704: b9c8 cmpal %a0,%a4 47706: 673c beqs 47744 <_Heap_Walk+0x32e> return true; } free_block = free_block->next; 47708: 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 ) { 4770c: b7c8 cmpal %a0,%a3 4770e: 66f4 bnes 47704 <_Heap_Walk+0x2ee> 47710: 6044 bras 47756 <_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) { 47712: 4aae fffc tstl %fp@(-4) 47716: 6716 beqs 4772e <_Heap_Walk+0x318> (*printer)( 47718: 2f03 movel %d3,%sp@- 4771a: 2f0c movel %a4,%sp@- 4771c: 4879 0005 d449 pea 5d449 <_Status_Object_name_errors_to_status+0x3db> 47722: 42a7 clrl %sp@- 47724: 2f02 movel %d2,%sp@- 47726: 4e92 jsr %a2@ 47728: 4fef 0014 lea %sp@(20),%sp 4772c: 6016 bras 47744 <_Heap_Walk+0x32e> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 4772e: 2f14 movel %a4@,%sp@- 47730: 2f03 movel %d3,%sp@- 47732: 2f0c movel %a4,%sp@- 47734: 4879 0005 d460 pea 5d460 <_Status_Object_name_errors_to_status+0x3f2> 4773a: 42a7 clrl %sp@- 4773c: 2f02 movel %d2,%sp@- 4773e: 4e92 jsr %a2@ 47740: 4fef 0018 lea %sp@(24),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 47744: bc8d cmpl %a5,%d6 47746: 6600 fe6c bnew 475b4 <_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; 4774a: 7001 moveq #1,%d0 block = next_block; } while ( block != first_block ); return true; } 4774c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 47752: 4e5e unlk %fp 47754: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 47756: 2f0c movel %a4,%sp@- 47758: 4879 0005 d485 pea 5d485 <_Status_Object_name_errors_to_status+0x417> 4775e: 4878 0001 pea 1 47762: 2f02 movel %d2,%sp@- 47764: 4e92 jsr %a2@ 47766: 4fef 0010 lea %sp@(16),%sp 4776a: 6000 fe30 braw 4759c <_Heap_Walk+0x186> ... =============================================================================== 00046bdc <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46bdc: 4e56 0000 linkw %fp,#0 46be0: 222e 000c movel %fp@(12),%d1 46be4: 2f02 movel %d2,%sp@- 46be6: 242e 0010 movel %fp@(16),%d2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 46bea: 13c1 0005 ec32 moveb %d1,5ec32 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 46bf0: 2f02 movel %d2,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 46bf2: 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 ); 46bf6: 0281 0000 00ff andil #255,%d1 bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 46bfc: 23c0 0005 ec2e movel %d0,5ec2e <_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 ); 46c02: 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; 46c04: 23c2 0005 ec34 movel %d2,5ec34 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 46c0a: 2f00 movel %d0,%sp@- 46c0c: 4eb9 0004 884a jsr 4884a <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 46c12: 7005 moveq #5,%d0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 46c14: 2042 moveal %d2,%a0 46c16: 243c 0000 0700 movel #1792,%d2 46c1c: 23c0 0005 ecdc movel %d0,5ecdc <_System_state_Current> 46c22: 40c0 movew %sr,%d0 46c24: 8082 orl %d2,%d0 46c26: 46c0 movew %d0,%sr 46c28: 2008 movel %a0,%d0 <== NOT EXECUTED 46c2a: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46c30: 4ac8 halt <== NOT EXECUTED 46c32: 4fef 000c lea %sp@(12),%sp 46c36: 60fe bras 46c36 <_Internal_error_Occurred+0x5a> =============================================================================== 00046c98 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 46c98: 4e56 fff0 linkw %fp,#-16 46c9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46ca0: 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 ) 46ca4: 4aaa 0014 tstl %a2@(20) 46ca8: 675e beqs 46d08 <_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 ); 46caa: 240a movel %a2,%d2 46cac: 0682 0000 001c addil #28,%d2 46cb2: 47f9 0004 6414 lea 46414 <_Chain_Get>,%a3 46cb8: 2f02 movel %d2,%sp@- 46cba: 4e93 jsr %a3@ if ( information->auto_extend ) { 46cbc: 588f addql #4,%sp 46cbe: 4a2a 0010 tstb %a2@(16) 46cc2: 6746 beqs 46d0a <_Objects_Allocate+0x72> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 46cc4: 4a80 tstl %d0 46cc6: 6612 bnes 46cda <_Objects_Allocate+0x42> _Objects_Extend_information( information ); 46cc8: 2f0a movel %a2,%sp@- 46cca: 4eb9 0004 6d3c jsr 46d3c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 46cd0: 2f02 movel %d2,%sp@- 46cd2: 4e93 jsr %a3@ } if ( the_object ) { 46cd4: 508f addql #8,%sp 46cd6: 4a80 tstl %d0 46cd8: 6730 beqs 46d0a <_Objects_Allocate+0x72> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46cda: 2040 moveal %d0,%a0 46cdc: 4281 clrl %d1 46cde: 4282 clrl %d2 46ce0: 3228 000a movew %a0@(10),%d1 46ce4: 342a 0008 movew %a2@(8),%d2 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 46ce8: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 46cec: 9282 subl %d2,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 46cee: 342a 0012 movew %a2@(18),%d2 46cf2: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; 46cf6: e589 lsll #2,%d1 46cf8: d1c1 addal %d1,%a0 46cfa: 5390 subql #1,%a0@ information->inactive--; 46cfc: 322a 0028 movew %a2@(40),%d1 46d00: 5381 subql #1,%d1 46d02: 3541 0028 movew %d1,%a2@(40) 46d06: 6002 bras 46d0a <_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; 46d08: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 46d0a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 46d10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046d14 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46d14: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 46d16: 4e56 0000 linkw %fp,#0 46d1a: 206e 0008 moveal %fp@(8),%a0 46d1e: 226e 000c moveal %fp@(12),%a1 46d22: 2f0a movel %a2,%sp@- 46d24: 2468 0018 moveal %a0@(24),%a2 46d28: 3029 000a movew %a1@(10),%d0 46d2c: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 46d30: 245f moveal %sp@+,%a2 46d32: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 46d34: 4ef9 0004 725c jmp 4725c <_Objects_Namespace_remove> ... =============================================================================== 00047044 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 47044: 4e56 0000 linkw %fp,#0 47048: 2f03 movel %d3,%sp@- 4704a: 362e 000e movew %fp@(14),%d3 4704e: 2f02 movel %d2,%sp@- 47050: 242e 0008 movel %fp@(8),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47054: 4a43 tstw %d3 47056: 673a beqs 47092 <_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 ); 47058: 2f02 movel %d2,%sp@- 4705a: 4eb9 0004 b288 jsr 4b288 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47060: 588f addql #4,%sp 47062: 4a80 tstl %d0 47064: 672c beqs 47092 <_Objects_Get_information+0x4e> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 47066: 0283 0000 ffff andil #65535,%d3 4706c: b083 cmpl %d3,%d0 4706e: 6522 bcss 47092 <_Objects_Get_information+0x4e> return NULL; if ( !_Objects_Information_table[ the_api ] ) 47070: 41f9 0005 eb54 lea 5eb54 <_Objects_Information_table>,%a0 47076: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 4707a: 4a88 tstl %a0 4707c: 6714 beqs 47092 <_Objects_Get_information+0x4e> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4707e: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0 if ( !info ) 47082: 6710 beqs 47094 <_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; 47084: 2040 moveal %d0,%a0 47086: 4a68 000e tstw %a0@(14) 4708a: 56c1 sne %d1 4708c: 49c1 extbl %d1 4708e: c081 andl %d1,%d0 47090: 6002 bras 47094 <_Objects_Get_information+0x50> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 47092: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 47094: 242e fff8 movel %fp@(-8),%d2 47098: 262e fffc movel %fp@(-4),%d3 4709c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053df4 <_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; 53df4: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 53df6: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53df8: 4e56 0000 linkw %fp,#0 53dfc: 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; 53e00: 90a8 0006 subl %a0@(6),%d0 53e04: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 53e08: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 53e0c: 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 ) { 53e10: b081 cmpl %d1,%d0 53e12: 620e bhis 53e22 <_Objects_Get_no_protection+0x2e> if ( (the_object = information->local_table[ index ]) != NULL ) { 53e14: 2068 0018 moveal %a0@(24),%a0 53e18: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 53e1c: 6704 beqs 53e22 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN *location = OBJECTS_LOCAL; 53e1e: 4291 clrl %a1@ return the_object; 53e20: 6006 bras 53e28 <_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; 53e22: 7001 moveq #1,%d0 53e24: 2280 movel %d0,%a1@ return NULL; 53e26: 4280 clrl %d0 } 53e28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000477fc <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 477fc: 4e56 fffc linkw %fp,#-4 47800: 222e 0008 movel %fp@(8),%d1 47804: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 47806: 4a81 tstl %d1 47808: 660a bnes 47814 <_Objects_Id_to_name+0x18> 4780a: 2079 0005 ff62 moveal 5ff62 <_Per_CPU_Information+0xc>,%a0 47810: 2228 0008 movel %a0@(8),%d1 47814: 7418 moveq #24,%d2 47816: 2001 movel %d1,%d0 47818: e4a8 lsrl %d2,%d0 4781a: 143c 0007 moveb #7,%d2 4781e: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47820: 143c 0002 moveb #2,%d2 47824: 2040 moveal %d0,%a0 47826: 5388 subql #1,%a0 47828: b488 cmpl %a0,%d2 4782a: 6540 bcss 4786c <_Objects_Id_to_name+0x70> <== NEVER TAKEN 4782c: 6048 bras 47876 <_Objects_Id_to_name+0x7a> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 4782e: 2001 movel %d1,%d0 47830: 741b moveq #27,%d2 47832: 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 ]; 47834: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 47838: 4a88 tstl %a0 4783a: 6730 beqs 4786c <_Objects_Id_to_name+0x70> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 4783c: 4a28 0032 tstb %a0@(50) 47840: 662a bnes 4786c <_Objects_Id_to_name+0x70> <== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 47842: 486e fffc pea %fp@(-4) 47846: 2f01 movel %d1,%sp@- 47848: 2f08 movel %a0,%sp@- 4784a: 4eb9 0004 7794 jsr 47794 <_Objects_Get> if ( !the_object ) 47850: 4fef 000c lea %sp@(12),%sp 47854: 4a80 tstl %d0 47856: 6714 beqs 4786c <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 47858: 206e 000c moveal %fp@(12),%a0 4785c: 2240 moveal %d0,%a1 4785e: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 47862: 4eb9 0004 8434 jsr 48434 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 47868: 4280 clrl %d0 4786a: 6002 bras 4786e <_Objects_Id_to_name+0x72> 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; 4786c: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4786e: 242e fff8 movel %fp@(-8),%d2 47872: 4e5e unlk %fp 47874: 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 ] ) 47876: 41f9 0005 fabc lea 5fabc <_Objects_Information_table>,%a0 4787c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47880: 4a88 tstl %a0 47882: 66aa bnes 4782e <_Objects_Id_to_name+0x32> 47884: 60e6 bras 4786c <_Objects_Id_to_name+0x70> ... =============================================================================== 00047288 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 47288: 4e56 fff4 linkw %fp,#-12 4728c: 226e 0008 moveal %fp@(8),%a1 47290: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47294: 242e 000c movel %fp@(12),%d2 47298: 202e 0010 movel %fp@(16),%d0 4729c: 246e 0014 moveal %fp@(20),%a2 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 472a0: 4a8a tstl %a2 472a2: 674a beqs 472ee <_Objects_Name_to_id_u32+0x66> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 472a4: 4a82 tstl %d2 472a6: 674a beqs 472f2 <_Objects_Name_to_id_u32+0x6a> <== NEVER TAKEN return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 472a8: 3229 000e movew %a1@(14),%d1 472ac: 6744 beqs 472f2 <_Objects_Name_to_id_u32+0x6a> 472ae: 4a80 tstl %d0 472b0: 672e beqs 472e0 <_Objects_Name_to_id_u32+0x58> (node == OBJECTS_SEARCH_ALL_NODES || 472b2: 0c80 7fff ffff cmpil #2147483647,%d0 472b8: 6726 beqs 472e0 <_Objects_Name_to_id_u32+0x58> node == OBJECTS_SEARCH_LOCAL_NODE || 472ba: 7601 moveq #1,%d3 472bc: b680 cmpl %d0,%d3 472be: 6632 bnes 472f2 <_Objects_Name_to_id_u32+0x6a> <== NEVER TAKEN 472c0: 601e bras 472e0 <_Objects_Name_to_id_u32+0x58> )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 472c2: 2069 0018 moveal %a1@(24),%a0 472c6: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !the_object ) 472ca: 4a88 tstl %a0 472cc: 670e beqs 472dc <_Objects_Name_to_id_u32+0x54> continue; if ( name == the_object->name.name_u32 ) { 472ce: b4a8 000c cmpl %a0@(12),%d2 472d2: 6608 bnes 472dc <_Objects_Name_to_id_u32+0x54> *id = the_object->id; 472d4: 24a8 0008 movel %a0@(8),%a2@ return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 472d8: 4280 clrl %d0 472da: 6018 bras 472f4 <_Objects_Name_to_id_u32+0x6c> _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 472dc: 5280 addql #1,%d0 472de: 6008 bras 472e8 <_Objects_Name_to_id_u32+0x60> search_local_node = false; if ( information->maximum != 0 && (node == OBJECTS_SEARCH_ALL_NODES || node == OBJECTS_SEARCH_LOCAL_NODE || 472e0: 7001 moveq #1,%d0 _Objects_Is_local_node( node ) )) search_local_node = true; if ( search_local_node ) { for ( index = 1; index <= information->maximum; index++ ) { 472e2: 0281 0000 ffff andil #65535,%d1 472e8: b280 cmpl %d0,%d1 472ea: 64d6 bccs 472c2 <_Objects_Name_to_id_u32+0x3a> 472ec: 6004 bras 472f2 <_Objects_Name_to_id_u32+0x6a> #endif /* ASSERT: information->is_string == false */ if ( !id ) return OBJECTS_INVALID_ADDRESS; 472ee: 7002 moveq #2,%d0 472f0: 6002 bras 472f4 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_NAME; name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; 472f2: 7001 moveq #1,%d0 #endif } 472f4: 4cd7 040c moveml %sp@,%d2-%d3/%a2 472f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047470 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47470: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47472: 4e56 ffec linkw %fp,#-20 47476: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4747a: 2a6e 0008 moveal %fp@(8),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4747e: 302d 0034 movew %a5@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47482: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47486: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 47488: 286e 000c moveal %fp@(12),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4748c: 2f0a movel %a2,%sp@- 4748e: 4eb9 0004 e6f8 jsr 4e6f8 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47494: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 47496: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 47498: 4a2d 0032 tstb %a5@(50) 4749c: 673c beqs 474da <_Objects_Set_name+0x6a> char *d; d = _Workspace_Allocate( length + 1 ); 4749e: 486b 0001 pea %a3@(1) 474a2: 4eb9 0004 8e4c jsr 48e4c <_Workspace_Allocate> if ( !d ) 474a8: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 474aa: 2a40 moveal %d0,%a5 if ( !d ) 474ac: 4a80 tstl %d0 474ae: 677a beqs 4752a <_Objects_Set_name+0xba> <== NEVER TAKEN return false; _Workspace_Free( (void *)the_object->name.name_p ); 474b0: 2f2c 000c movel %a4@(12),%sp@- 474b4: 4eb9 0004 8e68 jsr 48e68 <_Workspace_Free> the_object->name.name_p = NULL; 474ba: 42ac 000c clrl %a4@(12) strncpy( d, name, length ); 474be: 2f0b movel %a3,%sp@- 474c0: 2f0a movel %a2,%sp@- 474c2: 2f0d movel %a5,%sp@- 474c4: 4eb9 0004 e670 jsr 4e670 d[length] = '\0'; the_object->name.name_p = d; 474ca: 4fef 0010 lea %sp@(16),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; 474ce: 4200 clrb %d0 474d0: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l) the_object->name.name_p = d; 474d4: 294d 000c movel %a5,%a4@(12) 474d8: 604c bras 47526 <_Objects_Set_name+0xb6> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 474da: 7418 moveq #24,%d2 474dc: 1212 moveb %a2@,%d1 474de: 7020 moveq #32,%d0 474e0: 4840 swap %d0 474e2: 49c1 extbl %d1 474e4: e5a9 lsll %d2,%d1 474e6: 143c 0001 moveb #1,%d2 474ea: b48b cmpl %a3,%d2 474ec: 640a bccs 474f8 <_Objects_Set_name+0x88> 474ee: 102a 0001 moveb %a2@(1),%d0 474f2: 49c0 extbl %d0 474f4: 4840 swap %d0 474f6: 4240 clrw %d0 474f8: 7402 moveq #2,%d2 474fa: 8280 orl %d0,%d1 474fc: 203c 0000 2000 movel #8192,%d0 47502: b48b cmpl %a3,%d2 47504: 6408 bccs 4750e <_Objects_Set_name+0x9e> 47506: 102a 0002 moveb %a2@(2),%d0 4750a: 49c0 extbl %d0 4750c: e188 lsll #8,%d0 4750e: 8081 orl %d1,%d0 47510: 7203 moveq #3,%d1 47512: b28b cmpl %a3,%d1 47514: 6408 bccs 4751e <_Objects_Set_name+0xae> 47516: 142a 0003 moveb %a2@(3),%d2 4751a: 49c2 extbl %d2 4751c: 6002 bras 47520 <_Objects_Set_name+0xb0> 4751e: 7420 moveq #32,%d2 47520: 8082 orl %d2,%d0 47522: 2940 000c movel %d0,%a4@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 47526: 7001 moveq #1,%d0 47528: 6002 bras 4752c <_Objects_Set_name+0xbc> if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 4752a: 4200 clrb %d0 ); } return true; } 4752c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 47532: 4e5e unlk %fp ... =============================================================================== 000458b0 <_POSIX_Keys_Free_memory>: #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 458b0: 4e56 0000 linkw %fp,#0 458b4: 2f0b movel %a3,%sp@- uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 458b6: 47f9 0004 9910 lea 49910 <_Workspace_Free>,%a3 #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 458bc: 2f0a movel %a2,%sp@- 458be: 246e 0008 moveal %fp@(8),%a2 uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 458c2: 2f2a 0018 movel %a2@(24),%sp@- 458c6: 4e93 jsr %a3@ 458c8: 2f2a 001c movel %a2@(28),%sp@- 458cc: 4e93 jsr %a3@ 458ce: 2d6a 0020 0008 movel %a2@(32),%fp@(8) 458d4: 508f addql #8,%sp } 458d6: 246e fff8 moveal %fp@(-8),%a2 458da: 266e fffc moveal %fp@(-4),%a3 458de: 4e5e unlk %fp ) { uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 458e0: 4ef9 0004 9910 jmp 49910 <_Workspace_Free> ... =============================================================================== 0004c5a0 <_POSIX_Keys_Run_destructors>: 4c5a0: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4c5a2: 4e56 ffe8 linkw %fp,#-24 Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 4c5a6: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4c5aa: 48d7 047c moveml %d2-%d6/%a2,%sp@ Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 4c5ae: 2428 0008 movel %a0@(8),%d2 4c5b2: 2002 movel %d2,%d0 4c5b4: e2a8 lsrl %d1,%d0 4c5b6: 123c 0007 moveb #7,%d1 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4c5ba: 0282 0000 ffff andil #65535,%d2 4c5c0: c081 andl %d1,%d0 4c5c2: e58a lsll #2,%d2 4c5c4: 2a00 movel %d0,%d5 4c5c6: 5a85 addql #5,%d5 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4c5c8: 4286 clrl %d6 4c5ca: 7601 moveq #1,%d3 */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; 4c5cc: 7201 moveq #1,%d1 for ( index = 1 ; index <= max ; ++index ) { 4c5ce: 3c39 0005 eeee movew 5eeee <_POSIX_Keys_Information+0xe>,%d6 4c5d4: 6030 bras 4c606 <_POSIX_Keys_Run_destructors+0x66> POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4c5d6: 2079 0005 eef8 moveal 5eef8 <_POSIX_Keys_Information+0x18>,%a0 4c5dc: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 4c5e0: 4a88 tstl %a0 4c5e2: 6720 beqs 4c604 <_POSIX_Keys_Run_destructors+0x64> 4c5e4: 4aa8 0010 tstl %a0@(16) 4c5e8: 671a beqs 4c604 <_POSIX_Keys_Run_destructors+0x64> void *value = key->Values [ thread_api ][ thread_index ]; 4c5ea: 2470 5c00 moveal %a0@(00000000,%d5:l:4),%a2 4c5ee: d5c2 addal %d2,%a2 4c5f0: 2252 moveal %a2@,%a1 if ( value != NULL ) { 4c5f2: 4a89 tstl %a1 4c5f4: 670e beqs 4c604 <_POSIX_Keys_Run_destructors+0x64><== ALWAYS TAKEN key->Values [ thread_api ][ thread_index ] = NULL; 4c5f6: 4292 clrl %a2@ <== NOT EXECUTED (*key->destructor)( value ); 4c5f8: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4c5fa: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED 4c5fe: 4e90 jsr %a0@ <== NOT EXECUTED 4c600: 588f addql #4,%sp <== NOT EXECUTED done = false; 4c602: 4201 clrb %d1 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4c604: 5283 addql #1,%d3 4c606: 4284 clrl %d4 4c608: 3803 movew %d3,%d4 4c60a: bc84 cmpl %d4,%d6 4c60c: 64c8 bccs 4c5d6 <_POSIX_Keys_Run_destructors+0x36> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 4c60e: 4a01 tstb %d1 4c610: 67b6 beqs 4c5c8 <_POSIX_Keys_Run_destructors+0x28><== NEVER TAKEN done = false; } } } } } 4c612: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4c618: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049fc0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 49fc0: 4e56 ffe4 linkw %fp,#-28 49fc4: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 49fc8: 486e fff8 pea %fp@(-8) 49fcc: 242e 0008 movel %fp@(8),%d2 49fd0: 2f02 movel %d2,%sp@- 49fd2: 4879 0006 7144 pea 67144 <_POSIX_Message_queue_Information_fds> 49fd8: 246e 0014 moveal %fp@(20),%a2 49fdc: 162e 001b moveb %fp@(27),%d3 49fe0: 4eb9 0004 ce3c jsr 4ce3c <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 49fe6: 4fef 000c lea %sp@(12),%sp 49fea: 4aae fff8 tstl %fp@(-8) 49fee: 6600 00be bnew 4a0ae <_POSIX_Message_queue_Receive_support+0xee> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 49ff2: 2040 moveal %d0,%a0 49ff4: 7803 moveq #3,%d4 49ff6: 7a01 moveq #1,%d5 49ff8: 2228 0014 movel %a0@(20),%d1 49ffc: c881 andl %d1,%d4 49ffe: ba84 cmpl %d4,%d5 4a000: 660a bnes 4a00c <_POSIX_Message_queue_Receive_support+0x4c> _Thread_Enable_dispatch(); 4a002: 4eb9 0004 dad0 jsr 4dad0 <_Thread_Enable_dispatch> 4a008: 6000 00a4 braw 4a0ae <_POSIX_Message_queue_Receive_support+0xee> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4a00c: 2068 0010 moveal %a0@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4a010: 2028 0066 movel %a0@(102),%d0 4a014: b0ae 0010 cmpl %fp@(16),%d0 4a018: 6316 blss 4a030 <_POSIX_Message_queue_Receive_support+0x70> _Thread_Enable_dispatch(); 4a01a: 4eb9 0004 dad0 jsr 4dad0 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4a020: 4eb9 0005 3158 jsr 53158 <__errno> 4a026: 727a moveq #122,%d1 4a028: 2040 moveal %d0,%a0 4a02a: 2081 movel %d1,%a0@ 4a02c: 6000 008c braw 4a0ba <_POSIX_Message_queue_Receive_support+0xfa> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4a030: 70ff moveq #-1,%d0 4a032: 2d40 fffc movel %d0,%fp@(-4) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4a036: 4a03 tstb %d3 4a038: 670a beqs 4a044 <_POSIX_Message_queue_Receive_support+0x84> do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; 4a03a: 0801 000e btst #14,%d1 4a03e: 57c0 seq %d0 4a040: 4480 negl %d0 4a042: 6002 bras 4a046 <_POSIX_Message_queue_Receive_support+0x86> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4a044: 4200 clrb %d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4a046: 2f2e 001c movel %fp@(28),%sp@- 4a04a: 0280 0000 00ff andil #255,%d0 4a050: 2f00 movel %d0,%sp@- 4a052: 486e fffc pea %fp@(-4) 4a056: 2f2e 000c movel %fp@(12),%sp@- 4a05a: 2f02 movel %d2,%sp@- 4a05c: 4868 001a pea %a0@(26) 4a060: 4eb9 0004 bf28 jsr 4bf28 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4a066: 4eb9 0004 dad0 jsr 4dad0 <_Thread_Enable_dispatch> 4a06c: 2079 0006 71b6 moveal 671b6 <_Per_CPU_Information+0xc>,%a0 if (msg_prio) { 4a072: 4fef 0018 lea %sp@(24),%sp 4a076: 4a8a tstl %a2 4a078: 670a beqs 4a084 <_POSIX_Message_queue_Receive_support+0xc4><== NEVER TAKEN RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 4a07a: 2028 0024 movel %a0@(36),%d0 4a07e: 6c02 bges 4a082 <_POSIX_Message_queue_Receive_support+0xc2> 4a080: 4480 negl %d0 *msg_prio = _POSIX_Message_queue_Priority_from_core( 4a082: 2480 movel %d0,%a2@ _Thread_Executing->Wait.count ); } if ( !_Thread_Executing->Wait.return_code ) 4a084: 4aa8 0034 tstl %a0@(52) 4a088: 6606 bnes 4a090 <_POSIX_Message_queue_Receive_support+0xd0> return length_out; 4a08a: 202e fffc movel %fp@(-4),%d0 4a08e: 602c bras 4a0bc <_POSIX_Message_queue_Receive_support+0xfc> rtems_set_errno_and_return_minus_one( 4a090: 4eb9 0005 3158 jsr 53158 <__errno> 4a096: 2079 0006 71b6 moveal 671b6 <_Per_CPU_Information+0xc>,%a0 4a09c: 2440 moveal %d0,%a2 4a09e: 2f28 0034 movel %a0@(52),%sp@- 4a0a2: 4eb9 0004 a2d8 jsr 4a2d8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4a0a8: 588f addql #4,%sp 4a0aa: 2480 movel %d0,%a2@ 4a0ac: 600c bras 4a0ba <_POSIX_Message_queue_Receive_support+0xfa> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4a0ae: 4eb9 0005 3158 jsr 53158 <__errno> 4a0b4: 2040 moveal %d0,%a0 4a0b6: 7009 moveq #9,%d0 4a0b8: 2080 movel %d0,%a0@ 4a0ba: 70ff moveq #-1,%d0 } 4a0bc: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4a0c2: 4e5e unlk %fp ... =============================================================================== 0004a450 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4a450: 4e56 0000 linkw %fp,#0 4a454: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4a458: 2069 0102 moveal %a1@(258),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4a45c: 4aa8 00d8 tstl %a0@(216) 4a460: 6634 bnes 4a496 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x46><== NEVER TAKEN 4a462: 7001 moveq #1,%d0 4a464: b0a8 00dc cmpl %a0@(220),%d0 4a468: 662c bnes 4a496 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x46> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4a46a: 4aa8 00e0 tstl %a0@(224) 4a46e: 6726 beqs 4a496 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x46> * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 4a470: 2039 0005 f00c movel 5f00c <_Thread_Dispatch_disable_level>,%d0 thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4a476: 4878 ffff pea ffffffff 4a47a: 5380 subql #1,%d0 4a47c: 23c0 0005 f00c movel %d0,5f00c <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 4a482: 2039 0005 f00c movel 5f00c <_Thread_Dispatch_disable_level>,%d0 4a488: 2f09 movel %a1,%sp@- 4a48a: 4eb9 0004 aab0 jsr 4aab0 <_POSIX_Thread_Exit> 4a490: 508f addql #8,%sp } else _Thread_Enable_dispatch(); } 4a492: 4e5e unlk %fp 4a494: 4e75 rts 4a496: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 4a498: 4ef9 0004 7eec jmp 47eec <_Thread_Enable_dispatch> ... =============================================================================== 0004b58c <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4b58c: 4e56 ffec linkw %fp,#-20 4b590: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b594: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4b598: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4b59a: 242e 0008 movel %fp@(8),%d2 4b59e: 266e 0010 moveal %fp@(16),%a3 4b5a2: 286e 0014 moveal %fp@(20),%a4 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4b5a6: 4eb9 0004 b568 jsr 4b568 <_POSIX_Priority_Is_valid> 4b5ac: 588f addql #4,%sp 4b5ae: 4a00 tstb %d0 4b5b0: 677a beqs 4b62c <_POSIX_Thread_Translate_sched_param+0xa0><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4b5b2: 4293 clrl %a3@ *budget_callout = NULL; 4b5b4: 4294 clrl %a4@ if ( policy == SCHED_OTHER ) { 4b5b6: 4a82 tstl %d2 4b5b8: 6606 bnes 4b5c0 <_POSIX_Thread_Translate_sched_param+0x34> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4b5ba: 7401 moveq #1,%d2 4b5bc: 2682 movel %d2,%a3@ 4b5be: 6068 bras 4b628 <_POSIX_Thread_Translate_sched_param+0x9c> return 0; } if ( policy == SCHED_FIFO ) { 4b5c0: 7001 moveq #1,%d0 4b5c2: b082 cmpl %d2,%d0 4b5c4: 6762 beqs 4b628 <_POSIX_Thread_Translate_sched_param+0x9c> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4b5c6: 103c 0002 moveb #2,%d0 4b5ca: b082 cmpl %d2,%d0 4b5cc: 6608 bnes 4b5d6 <_POSIX_Thread_Translate_sched_param+0x4a> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4b5ce: 7202 moveq #2,%d1 return 0; 4b5d0: 4200 clrb %d0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4b5d2: 2681 movel %d1,%a3@ return 0; 4b5d4: 6058 bras 4b62e <_POSIX_Thread_Translate_sched_param+0xa2> } if ( policy == SCHED_SPORADIC ) { 4b5d6: 7004 moveq #4,%d0 4b5d8: b082 cmpl %d2,%d0 4b5da: 6650 bnes 4b62c <_POSIX_Thread_Translate_sched_param+0xa0> if ( (param->sched_ss_repl_period.tv_sec == 0) && 4b5dc: 4aaa 0008 tstl %a2@(8) 4b5e0: 6606 bnes 4b5e8 <_POSIX_Thread_Translate_sched_param+0x5c> 4b5e2: 4aaa 000c tstl %a2@(12) 4b5e6: 6744 beqs 4b62c <_POSIX_Thread_Translate_sched_param+0xa0><== NEVER TAKEN (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4b5e8: 4aaa 0010 tstl %a2@(16) 4b5ec: 6606 bnes 4b5f4 <_POSIX_Thread_Translate_sched_param+0x68> 4b5ee: 4aaa 0014 tstl %a2@(20) 4b5f2: 6738 beqs 4b62c <_POSIX_Thread_Translate_sched_param+0xa0><== NEVER TAKEN (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4b5f4: 486a 0008 pea %a2@(8) 4b5f8: 4bf9 0004 94b8 lea 494b8 <_Timespec_To_ticks>,%a5 4b5fe: 4e95 jsr %a5@ _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4b600: 486a 0010 pea %a2@(16) if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4b604: 2400 movel %d0,%d2 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4b606: 4e95 jsr %a5@ if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4b608: 508f addql #8,%sp 4b60a: b082 cmpl %d2,%d0 4b60c: 621e bhis 4b62c <_POSIX_Thread_Translate_sched_param+0xa0> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4b60e: 2f2a 0004 movel %a2@(4),%sp@- 4b612: 4eb9 0004 b568 jsr 4b568 <_POSIX_Priority_Is_valid> 4b618: 588f addql #4,%sp 4b61a: 4a00 tstb %d0 4b61c: 670e beqs 4b62c <_POSIX_Thread_Translate_sched_param+0xa0> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4b61e: 7003 moveq #3,%d0 4b620: 2680 movel %d0,%a3@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4b622: 28bc 0004 5f02 movel #286466,%a4@ return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 4b628: 4280 clrl %d0 4b62a: 6002 bras 4b62e <_POSIX_Thread_Translate_sched_param+0xa2> if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; 4b62c: 7016 moveq #22,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4b62e: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b634: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a69a <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 4a69a: 4e56 ffec linkw %fp,#-20 4a69e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4a6a2: 246e 000c moveal %fp@(12),%a2 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4a6a6: 49f9 0004 807c lea 4807c <_Thread_queue_Dequeue>,%a4 { Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; 4a6ac: 266a 0102 moveal %a2@(258),%a3 /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4a6b0: 240b movel %a3,%d2 4a6b2: 0682 0000 0044 addil #68,%d2 api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 4a6b8: 2f0a movel %a2,%sp@- 4a6ba: 4eb9 0004 c538 jsr 4c538 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 4a6c0: 2f0a movel %a2,%sp@- 4a6c2: 4eb9 0004 c5a0 jsr 4c5a0 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 4a6c8: 262a 0028 movel %a2@(40),%d3 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4a6cc: 508f addql #8,%sp 4a6ce: 6008 bras 4a6d8 <_POSIX_Threads_Delete_extension+0x3e> *(void **)the_thread->Wait.return_argument = value_ptr; 4a6d0: 2240 moveal %d0,%a1 <== NOT EXECUTED 4a6d2: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED 4a6d6: 2083 movel %d3,%a0@ <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 4a6d8: 2f02 movel %d2,%sp@- 4a6da: 4e94 jsr %a4@ 4a6dc: 588f addql #4,%sp 4a6de: 4a80 tstl %d0 4a6e0: 66ee bnes 4a6d0 <_POSIX_Threads_Delete_extension+0x36><== NEVER TAKEN *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 4a6e2: 103c 0004 moveb #4,%d0 4a6e6: b0ab 0084 cmpl %a3@(132),%d0 4a6ea: 660c bnes 4a6f8 <_POSIX_Threads_Delete_extension+0x5e> (void) _Watchdog_Remove( &api->Sporadic_timer ); 4a6ec: 486b 00a8 pea %a3@(168) 4a6f0: 4eb9 0004 8ab8 jsr 48ab8 <_Watchdog_Remove> 4a6f6: 588f addql #4,%sp deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 4a6f8: 42aa 0102 clrl %a2@(258) _Workspace_Free( api ); 4a6fc: 2d4b 0008 movel %a3,%fp@(8) } 4a700: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4a706: 4e5e unlk %fp if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; _Workspace_Free( api ); 4a708: 4ef9 0004 8c2c jmp 48c2c <_Workspace_Free> =============================================================================== 00045c2c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 45c2c: 4e56 ff98 linkw %fp,#-104 45c30: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 45c34: 2479 0005 e024 moveal 5e024 ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 45c3a: 2839 0005 e020 movel 5e020 ,%d4 if ( !user_threads || maximum == 0 ) 45c40: 4a8a tstl %a2 45c42: 676a beqs 45cae <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN 45c44: 4a84 tstl %d4 45c46: 6766 beqs 45cae <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 45c48: 240e movel %fp,%d2 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); status = pthread_create( 45c4a: 2a0e movel %fp,%d5 pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; maximum = Configuration_POSIX_API.number_of_initialization_threads; if ( !user_threads || maximum == 0 ) 45c4c: 4283 clrl %d3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 45c4e: 0682 ffff ffbc addil #-68,%d2 45c54: 2c3c 0004 b638 movel #308792,%d6 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 45c5a: 4bf9 0004 b664 lea 4b664 ,%a5 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 45c60: 49f9 0004 b69c lea 4b69c ,%a4 status = pthread_create( 45c66: 5985 subql #4,%d5 45c68: 47f9 0004 5904 lea 45904 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 45c6e: 2f02 movel %d2,%sp@- 45c70: 2046 moveal %d6,%a0 45c72: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 45c74: 4878 0002 pea 2 45c78: 2f02 movel %d2,%sp@- 45c7a: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 45c7c: 2f2a 0004 movel %a2@(4),%sp@- 45c80: 2f02 movel %d2,%sp@- 45c82: 4e94 jsr %a4@ status = pthread_create( 45c84: 42a7 clrl %sp@- 45c86: 2f12 movel %a2@,%sp@- 45c88: 2f02 movel %d2,%sp@- 45c8a: 2f05 movel %d5,%sp@- 45c8c: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 45c8e: 4fef 0024 lea %sp@(36),%sp 45c92: 4a80 tstl %d0 45c94: 6710 beqs 45ca6 <_POSIX_Threads_Initialize_user_threads_body+0x7a> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 45c96: 2f00 movel %d0,%sp@- 45c98: 4878 0001 pea 1 45c9c: 4878 0002 pea 2 45ca0: 4eb9 0004 79a8 jsr 479a8 <_Internal_error_Occurred> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 45ca6: 5283 addql #1,%d3 45ca8: 508a addql #8,%a2 45caa: b883 cmpl %d3,%d4 45cac: 66c0 bnes 45c6e <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 45cae: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 45cb4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a822 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4a822: 4e56 0000 linkw %fp,#0 4a826: 2f0b movel %a3,%sp@- 4a828: 2f0a movel %a2,%sp@- 4a82a: 246e 000c moveal %fp@(12),%a2 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4a82e: 266a 0102 moveal %a2@(258),%a3 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4a832: 486b 0098 pea %a3@(152) 4a836: 4eb9 0004 b56c jsr 4b56c <_Timespec_To_ticks> */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4a83c: 588f addql #4,%sp api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 4a83e: 2540 0076 movel %d0,%a2@(118) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4a842: 4280 clrl %d0 4a844: 1039 0005 d1fa moveb 5d1fa ,%d0 4a84a: 90ab 0088 subl %a3@(136),%d0 new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4a84e: 2540 0018 movel %d0,%a2@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4a852: 4aaa 001c tstl %a2@(28) 4a856: 6618 bnes 4a870 <_POSIX_Threads_Sporadic_budget_TSR+0x4e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4a858: b0aa 0014 cmpl %a2@(20),%d0 4a85c: 6412 bccs 4a870 <_POSIX_Threads_Sporadic_budget_TSR+0x4e> _Thread_Change_priority( the_thread, new_priority, true ); 4a85e: 4878 0001 pea 1 4a862: 2f00 movel %d0,%sp@- 4a864: 2f0a movel %a2,%sp@- 4a866: 4eb9 0004 7930 jsr 47930 <_Thread_Change_priority> 4a86c: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4a870: 486b 0090 pea %a3@(144) 4a874: 4eb9 0004 b56c jsr 4b56c <_Timespec_To_ticks> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 4a87a: 246e fff8 moveal %fp@(-8),%a2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4a87e: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4a880: 2740 00b4 movel %d0,%a3@(180) } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4a884: 47eb 00a8 lea %a3@(168),%a3 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4a888: 203c 0005 ec50 movel #388176,%d0 4a88e: 2d4b 000c movel %a3,%fp@(12) } 4a892: 266e fffc moveal %fp@(-4),%a3 4a896: 2d40 0008 movel %d0,%fp@(8) 4a89a: 4e5e unlk %fp 4a89c: 4ef9 0004 8994 jmp 48994 <_Watchdog_Insert> =============================================================================== 0004a8a2 <_POSIX_Threads_Sporadic_budget_callout>: /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4a8a2: 70ff moveq #-1,%d0 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4a8a4: 4e56 0000 linkw %fp,#0 4a8a8: 206e 0008 moveal %fp@(8),%a0 /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 4a8ac: 2140 0076 movel %d0,%a0@(118) 4a8b0: 4280 clrl %d0 4a8b2: 1039 0005 d1fa moveb 5d1fa ,%d0 ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4a8b8: 2268 0102 moveal %a0@(258),%a1 4a8bc: 90a9 008c subl %a1@(140),%d0 * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4a8c0: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4a8c4: 4aa8 001c tstl %a0@(28) 4a8c8: 6618 bnes 4a8e2 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4a8ca: b0a8 0014 cmpl %a0@(20),%d0 4a8ce: 6312 blss 4a8e2 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); 4a8d0: 4878 0001 pea 1 4a8d4: 2f00 movel %d0,%sp@- 4a8d6: 2f08 movel %a0,%sp@- 4a8d8: 4eb9 0004 7930 jsr 47930 <_Thread_Change_priority> 4a8de: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4a8e2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045764 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 45764: 4e56 0000 linkw %fp,#0 45768: 2f0a movel %a2,%sp@- 4576a: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4576e: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 45772: 4aaa 0052 tstl %a2@(82) 45776: 6606 bnes 4577e <_POSIX_Timer_TSR+0x1a> 45778: 4aaa 0056 tstl %a2@(86) 4577c: 6736 beqs 457b4 <_POSIX_Timer_TSR+0x50> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 4577e: 2f0a movel %a2,%sp@- 45780: 4879 0004 5764 pea 45764 <_POSIX_Timer_TSR> 45786: 2f2a 0008 movel %a2@(8),%sp@- 4578a: 2f2a 0062 movel %a2@(98),%sp@- 4578e: 486a 0010 pea %a2@(16) 45792: 4eb9 0004 aff4 jsr 4aff4 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 45798: 4fef 0014 lea %sp@(20),%sp 4579c: 4a00 tstb %d0 4579e: 672e beqs 457ce <_POSIX_Timer_TSR+0x6a> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 457a0: 486a 006a pea %a2@(106) 457a4: 4eb9 0004 6cf4 jsr 46cf4 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 457aa: 588f addql #4,%sp 457ac: 7003 moveq #3,%d0 457ae: 1540 003c moveb %d0,%a2@(60) 457b2: 6006 bras 457ba <_POSIX_Timer_TSR+0x56> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 457b4: 7004 moveq #4,%d0 <== NOT EXECUTED 457b6: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 457ba: 2f2a 0042 movel %a2@(66),%sp@- 457be: 2f2a 0038 movel %a2@(56),%sp@- 457c2: 4eb9 0004 abe0 jsr 4abe0 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 457c8: 508f addql #8,%sp 457ca: 42aa 0066 clrl %a2@(102) } 457ce: 246e fffc moveal %fp@(-4),%a2 457d2: 4e5e unlk %fp ... =============================================================================== 0004c61c <_POSIX_signals_Check_signal>: { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4c61c: 4280 clrl %d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4c61e: 4e56 ffb4 linkw %fp,#-76 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4c622: 102e 0013 moveb %fp@(19),%d0 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4c626: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4c62a: 4878 0001 pea 1 4c62e: 2a0e movel %fp,%d5 4c630: 0685 ffff fff4 addil #-12,%d5 4c636: 2f00 movel %d0,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4c638: 242e 000c movel %fp@(12),%d2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4c63c: 2f05 movel %d5,%sp@- bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 4c63e: 246e 0008 moveal %fp@(8),%a2 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4c642: 2f02 movel %d2,%sp@- 4c644: 2f0a movel %a2,%sp@- 4c646: 4eb9 0004 c6f4 jsr 4c6f4 <_POSIX_signals_Clear_signals> 4c64c: 4fef 0014 lea %sp@(20),%sp 4c650: 4a00 tstb %d0 4c652: 6700 0092 beqw 4c6e6 <_POSIX_signals_Check_signal+0xca> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4c656: 2002 movel %d2,%d0 4c658: 2602 movel %d2,%d3 4c65a: e588 lsll #2,%d0 4c65c: e98b lsll #4,%d3 4c65e: 9680 subl %d0,%d3 4c660: 2043 moveal %d3,%a0 4c662: d1fc 0005 f034 addal #389172,%a0 4c668: 7001 moveq #1,%d0 4c66a: 2668 0008 moveal %a0@(8),%a3 4c66e: b08b cmpl %a3,%d0 4c670: 6774 beqs 4c6e6 <_POSIX_signals_Check_signal+0xca><== NEVER TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4c672: 2028 0004 movel %a0@(4),%d0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4c676: 282a 00d0 movel %a2@(208),%d4 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4c67a: 8084 orl %d4,%d0 /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 4c67c: 2079 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a0 4c682: 41e8 0020 lea %a0@(32),%a0 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4c686: 2540 00d0 movel %d0,%a2@(208) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 4c68a: 4878 0028 pea 28 4c68e: 2f08 movel %a0,%sp@- 4c690: 486e ffcc pea %fp@(-52) 4c694: 4eb9 0004 d588 jsr 4d588 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4c69a: 4fef 000c lea %sp@(12),%sp 4c69e: 41f9 0005 f034 lea 5f034 <_POSIX_signals_Vectors>,%a0 4c6a4: 7002 moveq #2,%d0 4c6a6: b0b0 3800 cmpl %a0@(00000000,%d3:l),%d0 4c6aa: 660e bnes 4c6ba <_POSIX_signals_Check_signal+0x9e> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4c6ac: 42a7 clrl %sp@- 4c6ae: 2f05 movel %d5,%sp@- 4c6b0: 2f02 movel %d2,%sp@- 4c6b2: 4e93 jsr %a3@ signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; 4c6b4: 4fef 000c lea %sp@(12),%sp 4c6b8: 6006 bras 4c6c0 <_POSIX_signals_Check_signal+0xa4> default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4c6ba: 2f02 movel %d2,%sp@- 4c6bc: 4e93 jsr %a3@ break; 4c6be: 588f addql #4,%sp } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 4c6c0: 4878 0028 pea 28 4c6c4: 486e ffcc pea %fp@(-52) 4c6c8: 2079 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a0 4c6ce: 41e8 0020 lea %a0@(32),%a0 4c6d2: 2f08 movel %a0,%sp@- 4c6d4: 4eb9 0004 d588 jsr 4d588 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 4c6da: 4fef 000c lea %sp@(12),%sp sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4c6de: 2544 00d0 movel %d4,%a2@(208) return true; 4c6e2: 7001 moveq #1,%d0 4c6e4: 6002 bras 4c6e8 <_POSIX_signals_Check_signal+0xcc> /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) return false; 4c6e6: 4200 clrb %d0 * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; } 4c6e8: 4cee 0c3c ffb4 moveml %fp@(-76),%d2-%d5/%a2-%a3 4c6ee: 4e5e unlk %fp ... =============================================================================== 0004cce0 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4cce0: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4cce6: 4e56 0000 linkw %fp,#0 4ccea: 222e 0008 movel %fp@(8),%d1 4ccee: 2f03 movel %d3,%sp@- 4ccf0: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4ccf2: 40c2 movew %sr,%d2 4ccf4: 8082 orl %d2,%d0 4ccf6: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4ccf8: 2601 movel %d1,%d3 4ccfa: 2001 movel %d1,%d0 4ccfc: 41f9 0005 f034 lea 5f034 <_POSIX_signals_Vectors>,%a0 4cd02: e58b lsll #2,%d3 4cd04: e988 lsll #4,%d0 4cd06: 9083 subl %d3,%d0 4cd08: 7602 moveq #2,%d3 4cd0a: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4cd0e: 6610 bnes 4cd20 <_POSIX_signals_Clear_process_signals+0x40> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4cd10: 2040 moveal %d0,%a0 4cd12: d1fc 0005 f22c addal #389676,%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4cd18: 2008 movel %a0,%d0 4cd1a: 5880 addql #4,%d0 4cd1c: b090 cmpl %a0@,%d0 4cd1e: 660e bnes 4cd2e <_POSIX_signals_Clear_process_signals+0x4e><== NEVER TAKEN 4cd20: 5381 subql #1,%d1 4cd22: 7001 moveq #1,%d0 4cd24: e3a8 lsll %d1,%d0 clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4cd26: 4680 notl %d0 4cd28: c1b9 0005 f228 andl %d0,5f228 <_POSIX_signals_Pending> } _ISR_Enable( level ); 4cd2e: 46c2 movew %d2,%sr } 4cd30: 241f movel %sp@+,%d2 4cd32: 261f movel %sp@+,%d3 4cd34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000462dc <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 462dc: 701b moveq #27,%d0 #include int _POSIX_signals_Get_lowest( sigset_t set ) { 462de: 4e56 fff4 linkw %fp,#-12 462e2: 48d7 001c moveml %d2-%d4,%sp@ 462e6: 242e 0008 movel %fp@(8),%d2 462ea: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 462ec: 2200 movel %d0,%d1 462ee: 5381 subql #1,%d1 462f0: 2803 movel %d3,%d4 462f2: e3ac lsll %d1,%d4 462f4: 2204 movel %d4,%d1 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 462f6: c282 andl %d2,%d1 462f8: 6626 bnes 46320 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 462fa: 5280 addql #1,%d0 462fc: 123c 0020 moveb #32,%d1 46300: b280 cmpl %d0,%d1 46302: 66e8 bnes 462ec <_POSIX_signals_Get_lowest+0x10> 46304: 7001 moveq #1,%d0 46306: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 46308: 2200 movel %d0,%d1 4630a: 5381 subql #1,%d1 4630c: 2803 movel %d3,%d4 4630e: e3ac lsll %d1,%d4 46310: 2204 movel %d4,%d1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 46312: c282 andl %d2,%d1 46314: 660a bnes 46320 <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 46316: 5280 addql #1,%d0 46318: 123c 001b moveb #27,%d1 4631c: b280 cmpl %d0,%d1 4631e: 66e8 bnes 46308 <_POSIX_signals_Get_lowest+0x2c> <== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 46320: 4cd7 001c moveml %sp@,%d2-%d4 46324: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a482 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4a482: 4e56 ffec linkw %fp,#-20 POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4a486: 206e 0008 moveal %fp@(8),%a0 */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4a48a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; int hold_errno; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4a48e: 2468 0102 moveal %a0@(258),%a2 /* * We need to ensure that if the signal handler executes a call * which overwrites the unblocking status, we restore it. */ hold_errno = _Thread_Executing->Wait.return_code; 4a492: 2079 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a0 4a498: 2628 0034 movel %a0@(52),%d3 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 4a49c: 4a8a tstl %a2 4a49e: 677a beqs 4a51a <_POSIX_signals_Post_switch_extension+0x98><== NEVER TAKEN * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4a4a0: 283c 0000 0700 movel #1792,%d4 break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4a4a6: 47f9 0004 c61c lea 4c61c <_POSIX_signals_Check_signal>,%a3 * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4a4ac: 2004 movel %d4,%d0 4a4ae: 40c1 movew %sr,%d1 4a4b0: 8081 orl %d1,%d0 4a4b2: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4a4b4: 2039 0005 f228 movel 5f228 <_POSIX_signals_Pending>,%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4a4ba: 242a 00d0 movel %a2@(208),%d2 4a4be: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4a4c0: 80aa 00d4 orl %a2@(212),%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4a4c4: c082 andl %d2,%d0 (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4a4c6: 46c1 movew %d1,%sr * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4a4c8: 4a80 tstl %d0 4a4ca: 660c bnes 4a4d8 <_POSIX_signals_Post_switch_extension+0x56> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; 4a4cc: 2079 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a0 4a4d2: 2143 0034 movel %d3,%a0@(52) 4a4d6: 6042 bras 4a51a <_POSIX_signals_Post_switch_extension+0x98> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4a4d8: 741b moveq #27,%d2 _POSIX_signals_Check_signal( api, signo, false ); 4a4da: 42a7 clrl %sp@- 4a4dc: 2f02 movel %d2,%sp@- 4a4de: 2f0a movel %a2,%sp@- 4a4e0: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4a4e2: 4878 0001 pea 1 4a4e6: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4a4e8: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4a4ea: 2f0a movel %a2,%sp@- 4a4ec: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4a4ee: 4fef 0018 lea %sp@(24),%sp 4a4f2: 7020 moveq #32,%d0 4a4f4: b082 cmpl %d2,%d0 4a4f6: 66e2 bnes 4a4da <_POSIX_signals_Post_switch_extension+0x58> 4a4f8: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4a4fa: 42a7 clrl %sp@- 4a4fc: 2f02 movel %d2,%sp@- 4a4fe: 2f0a movel %a2,%sp@- 4a500: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4a502: 4878 0001 pea 1 4a506: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4a508: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4a50a: 2f0a movel %a2,%sp@- 4a50c: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4a50e: 4fef 0018 lea %sp@(24),%sp 4a512: 701b moveq #27,%d0 4a514: b082 cmpl %d2,%d0 4a516: 66e2 bnes 4a4fa <_POSIX_signals_Post_switch_extension+0x78> 4a518: 6092 bras 4a4ac <_POSIX_signals_Post_switch_extension+0x2a> _POSIX_signals_Check_signal( api, signo, true ); } } _Thread_Executing->Wait.return_code = hold_errno; } 4a51a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4a520: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005ae80 <_POSIX_signals_Unblock_thread>: 5ae80: 7201 moveq #1,%d1 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5ae82: 4e56 fff4 linkw %fp,#-12 5ae86: 226e 0010 moveal %fp@(16),%a1 5ae8a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5ae8e: 242e 000c movel %fp@(12),%d2 5ae92: 2002 movel %d2,%d0 5ae94: 5380 subql #1,%d0 5ae96: 246e 0008 moveal %fp@(8),%a2 5ae9a: e1a9 lsll %d0,%d1 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5ae9c: 202a 0010 movel %a2@(16),%d0 5aea0: 2600 movel %d0,%d3 5aea2: 0283 1000 8000 andil #268468224,%d3 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5aea8: 206a 0102 moveal %a2@(258),%a0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5aeac: 0c83 1000 8000 cmpil #268468224,%d3 5aeb2: 6650 bnes 5af04 <_POSIX_signals_Unblock_thread+0x84> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 5aeb4: 2001 movel %d1,%d0 5aeb6: c0aa 0030 andl %a2@(48),%d0 5aeba: 660c bnes 5aec8 <_POSIX_signals_Unblock_thread+0x48> 5aebc: 2028 00d0 movel %a0@(208),%d0 5aec0: 4680 notl %d0 5aec2: c280 andl %d0,%d1 5aec4: 6700 00a8 beqw 5af6e <_POSIX_signals_Unblock_thread+0xee> the_thread->Wait.return_code = EINTR; 5aec8: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5aeca: 206a 0028 moveal %a2@(40),%a0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 5aece: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5aed2: 4a89 tstl %a1 5aed4: 660e bnes 5aee4 <_POSIX_signals_Unblock_thread+0x64> the_info->si_signo = signo; the_info->si_code = SI_USER; 5aed6: 7201 moveq #1,%d1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 5aed8: 2082 movel %d2,%a0@ the_info->si_code = SI_USER; 5aeda: 2141 0004 movel %d1,%a0@(4) the_info->si_value.sival_int = 0; 5aede: 42a8 0008 clrl %a0@(8) 5aee2: 6012 bras 5aef6 <_POSIX_signals_Unblock_thread+0x76> } else { *the_info = *info; 5aee4: 4878 000c pea c 5aee8: 2f09 movel %a1,%sp@- 5aeea: 2f08 movel %a0,%sp@- 5aeec: 4eb9 0004 d588 jsr 4d588 5aef2: 4fef 000c lea %sp@(12),%sp } _Thread_queue_Extract_with_proxy( the_thread ); 5aef6: 2f0a movel %a2,%sp@- 5aef8: 4eb9 0004 8388 jsr 48388 <_Thread_queue_Extract_with_proxy> return true; 5aefe: 588f addql #4,%sp 5af00: 7001 moveq #1,%d0 5af02: 606c bras 5af70 <_POSIX_signals_Unblock_thread+0xf0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 5af04: 2428 00d0 movel %a0@(208),%d2 5af08: 4682 notl %d2 5af0a: c282 andl %d2,%d1 5af0c: 6760 beqs 5af6e <_POSIX_signals_Unblock_thread+0xee> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 5af0e: 0800 001c btst #28,%d0 5af12: 673e beqs 5af52 <_POSIX_signals_Unblock_thread+0xd2> the_thread->Wait.return_code = EINTR; 5af14: 7204 moveq #4,%d1 5af16: 2541 0034 movel %d1,%a2@(52) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 5af1a: 2200 movel %d0,%d1 5af1c: 0281 0003 bee0 andil #245472,%d1 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 5af22: 670c beqs 5af30 <_POSIX_signals_Unblock_thread+0xb0> _Thread_queue_Extract_with_proxy( the_thread ); 5af24: 2f0a movel %a2,%sp@- 5af26: 4eb9 0004 8388 jsr 48388 <_Thread_queue_Extract_with_proxy> 5af2c: 588f addql #4,%sp 5af2e: 603e bras 5af6e <_POSIX_signals_Unblock_thread+0xee> else if ( _States_Is_delaying(the_thread->current_state) ) { 5af30: 44c0 movew %d0,%ccr 5af32: 6a3a bpls 5af6e <_POSIX_signals_Unblock_thread+0xee><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 5af34: 486a 0048 pea %a2@(72) 5af38: 4eb9 0004 8ab8 jsr 48ab8 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5af3e: 2f3c 1003 fff8 movel #268697592,%sp@- 5af44: 2f0a movel %a2,%sp@- 5af46: 4eb9 0004 7a0c jsr 47a0c <_Thread_Clear_state> 5af4c: 4fef 000c lea %sp@(12),%sp 5af50: 601c bras 5af6e <_POSIX_signals_Unblock_thread+0xee> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 5af52: 4a80 tstl %d0 5af54: 6618 bnes 5af6e <_POSIX_signals_Unblock_thread+0xee><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5af56: 4ab9 0005 eff6 tstl 5eff6 <_Per_CPU_Information+0x8> 5af5c: 6710 beqs 5af6e <_POSIX_signals_Unblock_thread+0xee> 5af5e: b5f9 0005 effa cmpal 5effa <_Per_CPU_Information+0xc>,%a2 5af64: 6608 bnes 5af6e <_POSIX_signals_Unblock_thread+0xee><== NEVER TAKEN _Thread_Dispatch_necessary = true; 5af66: 7001 moveq #1,%d0 5af68: 13c0 0005 f006 moveb %d0,5f006 <_Per_CPU_Information+0x18> } } return false; 5af6e: 4200 clrb %d0 } 5af70: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5af76: 4e5e unlk %fp ... =============================================================================== 0004bb9e <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4bb9e: 4e56 ffec linkw %fp,#-20 4bba2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4bba6: 286e 0008 moveal %fp@(8),%a4 4bbaa: 246e 000c moveal %fp@(12),%a2 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 4bbae: 4a8a tstl %a2 4bbb0: 6700 0110 beqw 4bcc2 <_RBTree_Extract_unprotected+0x124> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 4bbb4: b5ec 0008 cmpal %a4@(8),%a2 4bbb8: 661a bnes 4bbd4 <_RBTree_Extract_unprotected+0x36> if (the_node->child[RBT_RIGHT]) 4bbba: 202a 0008 movel %a2@(8),%d0 4bbbe: 6706 beqs 4bbc6 <_RBTree_Extract_unprotected+0x28> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 4bbc0: 2940 0008 movel %d0,%a4@(8) 4bbc4: 600e bras 4bbd4 <_RBTree_Extract_unprotected+0x36> else { the_rbtree->first[RBT_LEFT] = the_node->parent; 4bbc6: 2012 movel %a2@,%d0 4bbc8: 2940 0008 movel %d0,%a4@(8) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4bbcc: b08c cmpl %a4,%d0 4bbce: 6604 bnes 4bbd4 <_RBTree_Extract_unprotected+0x36> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 4bbd0: 42ac 0008 clrl %a4@(8) 4bbd4: 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]) { 4bbd8: b5ec 000c cmpal %a4@(12),%a2 4bbdc: 6618 bnes 4bbf6 <_RBTree_Extract_unprotected+0x58> if (the_node->child[RBT_LEFT]) 4bbde: 4a8d tstl %a5 4bbe0: 6706 beqs 4bbe8 <_RBTree_Extract_unprotected+0x4a> the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 4bbe2: 294d 000c movel %a5,%a4@(12) 4bbe6: 600e bras 4bbf6 <_RBTree_Extract_unprotected+0x58> else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 4bbe8: 2012 movel %a2@,%d0 4bbea: 2940 000c movel %d0,%a4@(12) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4bbee: b08c cmpl %a4,%d0 4bbf0: 6604 bnes 4bbf6 <_RBTree_Extract_unprotected+0x58> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 4bbf2: 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]) { 4bbf6: 264d moveal %a5,%a3 4bbf8: 4a8d tstl %a5 4bbfa: 6778 beqs 4bc74 <_RBTree_Extract_unprotected+0xd6> 4bbfc: 4aaa 0008 tstl %a2@(8) 4bc00: 6604 bnes 4bc06 <_RBTree_Extract_unprotected+0x68> 4bc02: 6078 bras 4bc7c <_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]; 4bc04: 2640 moveal %d0,%a3 4bc06: 202b 0008 movel %a3@(8),%d0 4bc0a: 66f8 bnes 4bc04 <_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]; 4bc0c: 2a6b 0004 moveal %a3@(4),%a5 if(leaf) { 4bc10: 4a8d tstl %a5 4bc12: 6704 beqs 4bc18 <_RBTree_Extract_unprotected+0x7a> leaf->parent = target->parent; 4bc14: 2a93 movel %a3@,%a5@ 4bc16: 600a bras 4bc22 <_RBTree_Extract_unprotected+0x84> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4bc18: 2f0b movel %a3,%sp@- 4bc1a: 4eb9 0004 ba58 jsr 4ba58 <_RBTree_Extract_validate_unprotected> 4bc20: 588f addql #4,%sp } victim_color = target->color; dir = target != target->parent->child[0]; 4bc22: 2053 moveal %a3@,%a0 4bc24: b7e8 0004 cmpal %a0@(4),%a3 4bc28: 56c1 sne %d1 target->parent->child[dir] = leaf; 4bc2a: 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]; 4bc2c: 49c1 extbl %d1 target->parent->child[dir] = leaf; 4bc2e: 9481 subl %d1,%d2 4bc30: 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; 4bc34: 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]; 4bc36: 2052 moveal %a2@,%a0 4bc38: b5e8 0004 cmpal %a0@(4),%a2 4bc3c: 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; 4bc3e: 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]; 4bc42: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4bc44: 9481 subl %d1,%d2 4bc46: 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]; 4bc4a: 276a 0008 0008 movel %a2@(8),%a3@(8) if (the_node->child[RBT_RIGHT]) 4bc50: 206a 0008 moveal %a2@(8),%a0 4bc54: 4a88 tstl %a0 4bc56: 6702 beqs 4bc5a <_RBTree_Extract_unprotected+0xbc><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4bc58: 208b movel %a3,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4bc5a: 276a 0004 0004 movel %a2@(4),%a3@(4) if (the_node->child[RBT_LEFT]) 4bc60: 206a 0004 moveal %a2@(4),%a0 4bc64: 4a88 tstl %a0 4bc66: 6702 beqs 4bc6a <_RBTree_Extract_unprotected+0xcc> the_node->child[RBT_LEFT]->parent = target; 4bc68: 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; 4bc6a: 2692 movel %a2@,%a3@ target->color = the_node->color; 4bc6c: 276a 000c 000c movel %a2@(12),%a3@(12) 4bc72: 602c bras 4bca0 <_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]; 4bc74: 2a6a 0008 moveal %a2@(8),%a5 if( leaf ) { 4bc78: 4a8d tstl %a5 4bc7a: 6704 beqs 4bc80 <_RBTree_Extract_unprotected+0xe2> leaf->parent = the_node->parent; 4bc7c: 2a92 movel %a2@,%a5@ 4bc7e: 600a bras 4bc8a <_RBTree_Extract_unprotected+0xec> } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4bc80: 2f0a movel %a2,%sp@- 4bc82: 4eb9 0004 ba58 jsr 4ba58 <_RBTree_Extract_validate_unprotected> 4bc88: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4bc8a: 2052 moveal %a2@,%a0 4bc8c: b5e8 0004 cmpal %a0@(4),%a2 4bc90: 56c1 sne %d1 the_node->parent->child[dir] = leaf; 4bc92: 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]; 4bc94: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4bc96: 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; 4bc98: 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; 4bc9c: 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 */ 4bca0: 4a80 tstl %d0 4bca2: 6608 bnes 4bcac <_RBTree_Extract_unprotected+0x10e> if (leaf) { 4bca4: 4a8d tstl %a5 4bca6: 6704 beqs 4bcac <_RBTree_Extract_unprotected+0x10e> leaf->color = RBT_BLACK; /* case 2 */ 4bca8: 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; 4bcac: 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; 4bcb0: 42aa 0008 clrl %a2@(8) 4bcb4: 42aa 0004 clrl %a2@(4) 4bcb8: 4292 clrl %a2@ 4bcba: 4a88 tstl %a0 4bcbc: 6704 beqs 4bcc2 <_RBTree_Extract_unprotected+0x124> 4bcbe: 42a8 000c clrl %a0@(12) } 4bcc2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4bcc8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ba58 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 4ba58: 4e56 ffe8 linkw %fp,#-24 4ba5c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4ba60: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 4ba64: 2453 moveal %a3@,%a2 if(!parent->parent) return; 4ba66: 4a92 tstl %a2@ 4ba68: 6700 012a beqw 4bb94 <_RBTree_Extract_validate_unprotected+0x13c> sibling = _RBTree_Sibling(the_node); 4ba6c: 2f0b movel %a3,%sp@- 4ba6e: 49fa ff6c lea %pc@(4b9dc <_RBTree_Sibling>),%a4 4ba72: 4e94 jsr %a4@ 4ba74: 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); 4ba76: 4bfa ff8e lea %pc@(4ba06 <_RBTree_Rotate>),%a5 RBTree_Direction dir; parent = the_node->parent; if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); 4ba7a: 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) { 4ba7c: 6000 00ec braw 4bb6a <_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); 4ba80: 4a88 tstl %a0 4ba82: 6730 beqs 4bab4 <_RBTree_Extract_validate_unprotected+0x5c><== NEVER TAKEN 4ba84: 7001 moveq #1,%d0 4ba86: b0a8 000c cmpl %a0@(12),%d0 4ba8a: 6628 bnes 4bab4 <_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]; 4ba8c: b7ea 0004 cmpal %a2@(4),%a3 4ba90: 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; 4ba92: 2540 000c movel %d0,%a2@(12) sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4ba96: 49c2 extbl %d2 4ba98: 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; 4ba9a: 42a8 000c clrl %a0@(12) dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); 4ba9e: 2f02 movel %d2,%sp@- 4baa0: 2f0a movel %a2,%sp@- 4baa2: 4e95 jsr %a5@ sibling = parent->child[!dir]; 4baa4: 508f addql #8,%sp 4baa6: 4a82 tstl %d2 4baa8: 57c0 seq %d0 4baaa: 7201 moveq #1,%d1 4baac: 49c0 extbl %d0 4baae: 9280 subl %d0,%d1 4bab0: 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]) && 4bab4: 2268 0008 moveal %a0@(8),%a1 4bab8: 4a89 tstl %a1 4baba: 670e beqs 4baca <_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( 4babc: 7001 moveq #1,%d0 4babe: b0a9 000c cmpl %a1@(12),%d0 4bac2: 57c0 seq %d0 4bac4: 49c0 extbl %d0 4bac6: 4480 negl %d0 4bac8: 6002 bras 4bacc <_RBTree_Extract_validate_unprotected+0x74> 4baca: 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]) && 4bacc: 4a00 tstb %d0 4bace: 6630 bnes 4bb00 <_RBTree_Extract_validate_unprotected+0xa8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 4bad0: 2268 0004 moveal %a0@(4),%a1 4bad4: 4a89 tstl %a1 4bad6: 670e beqs 4bae6 <_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( 4bad8: 7201 moveq #1,%d1 4bada: b2a9 000c cmpl %a1@(12),%d1 4bade: 57c0 seq %d0 4bae0: 49c0 extbl %d0 4bae2: 4480 negl %d0 4bae4: 6002 bras 4bae8 <_RBTree_Extract_validate_unprotected+0x90> 4bae6: 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]) && 4bae8: 4a00 tstb %d0 4baea: 6614 bnes 4bb00 <_RBTree_Extract_validate_unprotected+0xa8> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; 4baec: 7001 moveq #1,%d0 4baee: 2140 000c movel %d0,%a0@(12) 4baf2: b0aa 000c cmpl %a2@(12),%d0 4baf6: 6600 008c bnew 4bb84 <_RBTree_Extract_validate_unprotected+0x12c> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 4bafa: 42aa 000c clrl %a2@(12) break; 4bafe: 6078 bras 4bb78 <_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]; 4bb00: b7ea 0004 cmpal %a2@(4),%a3 4bb04: 56c2 sne %d2 4bb06: 49c2 extbl %d2 4bb08: 4482 negl %d2 if (!_RBTree_Is_red(sibling->child[!dir])) { 4bb0a: 57c3 seq %d3 4bb0c: 49c3 extbl %d3 4bb0e: 4483 negl %d3 4bb10: 2270 3c04 moveal %a0@(00000004,%d3:l:4),%a1 4bb14: 4a89 tstl %a1 4bb16: 670e beqs 4bb26 <_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( 4bb18: 7201 moveq #1,%d1 4bb1a: b2a9 000c cmpl %a1@(12),%d1 4bb1e: 57c0 seq %d0 4bb20: 49c0 extbl %d0 4bb22: 4480 negl %d0 4bb24: 6002 bras 4bb28 <_RBTree_Extract_validate_unprotected+0xd0> 4bb26: 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])) { 4bb28: 4a00 tstb %d0 4bb2a: 6620 bnes 4bb4c <_RBTree_Extract_validate_unprotected+0xf4> sibling->color = RBT_RED; 4bb2c: 7001 moveq #1,%d0 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4bb2e: 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; 4bb30: 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; 4bb34: 2140 000c movel %d0,%a0@(12) sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4bb38: 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; 4bb3a: 42a9 000c clrl %a1@(12) _RBTree_Rotate(sibling, !dir); 4bb3e: 2f01 movel %d1,%sp@- 4bb40: 2f08 movel %a0,%sp@- 4bb42: 4eba fec2 jsr %pc@(4ba06 <_RBTree_Rotate>) sibling = parent->child[!dir]; 4bb46: 508f addql #8,%sp 4bb48: 2072 3c04 moveal %a2@(00000004,%d3:l:4),%a0 } sibling->color = parent->color; 4bb4c: 216a 000c 000c movel %a2@(12),%a0@(12) parent->color = RBT_BLACK; sibling->child[!dir]->color = RBT_BLACK; 4bb52: 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; 4bb56: 42aa 000c clrl %a2@(12) sibling->child[!dir]->color = RBT_BLACK; 4bb5a: 42a8 000c clrl %a0@(12) _RBTree_Rotate(parent, dir); 4bb5e: 2f02 movel %d2,%sp@- 4bb60: 2f0a movel %a2,%sp@- 4bb62: 4eba fea2 jsr %pc@(4ba06 <_RBTree_Rotate>) break; /* done */ 4bb66: 508f addql #8,%sp 4bb68: 600e bras 4bb78 <_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) { 4bb6a: 7001 moveq #1,%d0 4bb6c: b0ab 000c cmpl %a3@(12),%d0 4bb70: 6706 beqs 4bb78 <_RBTree_Extract_validate_unprotected+0x120> 4bb72: 4a92 tstl %a2@ 4bb74: 6600 ff0a bnew 4ba80 <_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; 4bb78: 2053 moveal %a3@,%a0 4bb7a: 4a90 tstl %a0@ 4bb7c: 6616 bnes 4bb94 <_RBTree_Extract_validate_unprotected+0x13c> 4bb7e: 42ab 000c clrl %a3@(12) 4bb82: 6010 bras 4bb94 <_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; 4bb84: 2412 movel %a2@,%d2 sibling = _RBTree_Sibling(the_node); 4bb86: 264a moveal %a2,%a3 4bb88: 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; 4bb8a: 2442 moveal %d2,%a2 sibling = _RBTree_Sibling(the_node); 4bb8c: 4e94 jsr %a4@ 4bb8e: 588f addql #4,%sp 4bb90: 2040 moveal %d0,%a0 4bb92: 60d6 bras 4bb6a <_RBTree_Extract_validate_unprotected+0x112> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; } 4bb94: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4bb9a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ae4 <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 48ae4: 4e56 ffec linkw %fp,#-20 48ae8: 202e 001c movel %fp@(28),%d0 48aec: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 48af0: 246e 0008 moveal %fp@(8),%a2 48af4: 262e 0014 movel %fp@(20),%d3 48af8: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 48afc: 4a8a tstl %a2 48afe: 6734 beqs 48b34 <_RBTree_Initialize+0x50> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 48b00: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 48b02: 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; 48b08: 242e 0010 movel %fp@(16),%d2 RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 48b0c: 42aa 0004 clrl %a2@(4) while ( count-- ) { _RBTree_Insert(the_rbtree, next); 48b10: 47f9 0004 8ab8 lea 48ab8 <_RBTree_Insert>,%a3 the_rbtree->first[0] = NULL; 48b16: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 48b1a: 42aa 000c clrl %a2@(12) the_rbtree->compare_function = compare_function; the_rbtree->is_unique = is_unique; 48b1e: 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-- ) { 48b22: 600c bras 48b30 <_RBTree_Initialize+0x4c> _RBTree_Insert(the_rbtree, next); 48b24: 2f02 movel %d2,%sp@- * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 48b26: d484 addl %d4,%d2 48b28: 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); 48b2a: 2f0a movel %a2,%sp@- 48b2c: 4e93 jsr %a3@ * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 48b2e: 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-- ) { 48b30: 4a83 tstl %d3 48b32: 66f0 bnes 48b24 <_RBTree_Initialize+0x40> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 48b34: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48b3a: 4e5e unlk %fp ... =============================================================================== 0004b9dc <_RBTree_Sibling>: * exists, and NULL if not. */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { 4b9dc: 4e56 0000 linkw %fp,#0 4b9e0: 226e 0008 moveal %fp@(8),%a1 if(!the_node) return NULL; 4b9e4: 4a89 tstl %a1 4b9e6: 6718 beqs 4ba00 <_RBTree_Sibling+0x24> if(!(the_node->parent)) return NULL; 4b9e8: 2051 moveal %a1@,%a0 4b9ea: 4a88 tstl %a0 4b9ec: 6712 beqs 4ba00 <_RBTree_Sibling+0x24> <== NEVER TAKEN if(!(the_node->parent->parent)) return NULL; 4b9ee: 4a90 tstl %a0@ 4b9f0: 670e beqs 4ba00 <_RBTree_Sibling+0x24> if(the_node == the_node->parent->child[RBT_LEFT]) 4b9f2: 2028 0004 movel %a0@(4),%d0 4b9f6: b089 cmpl %a1,%d0 4b9f8: 6608 bnes 4ba02 <_RBTree_Sibling+0x26> return the_node->parent->child[RBT_RIGHT]; 4b9fa: 2028 0008 movel %a0@(8),%d0 4b9fe: 6002 bras 4ba02 <_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; 4ba00: 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]; } 4ba02: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bd4a <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 4bd4a: 4e56 fff0 linkw %fp,#-16 4bd4e: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4bd52: 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)); 4bd56: 49fa ffa0 lea %pc@(4bcf8 <_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))) { 4bd5a: 604e bras 4bdaa <_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; 4bd5c: 4a92 tstl %a2@ 4bd5e: 6762 beqs 4bdc2 <_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]) 4bd60: 226a 0004 moveal %a2@(4),%a1 4bd64: b3c8 cmpal %a0,%a1 4bd66: 6604 bnes 4bd6c <_RBTree_Validate_insert_unprotected+0x22> return the_node->parent->child[RBT_RIGHT]; 4bd68: 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); 4bd6c: 4a89 tstl %a1 4bd6e: 6752 beqs 4bdc2 <_RBTree_Validate_insert_unprotected+0x78> 4bd70: 7001 moveq #1,%d0 4bd72: b0a9 000c cmpl %a1@(12),%d0 4bd76: 664a bnes 4bdc2 <_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; 4bd78: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4bd7c: 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; 4bd7e: 42a9 000c clrl %a1@(12) g->color = RBT_RED; 4bd82: 2540 000c movel %d0,%a2@(12) 4bd86: 6022 bras 4bdaa <_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); 4bd88: 2f02 movel %d2,%sp@- 4bd8a: 2f08 movel %a0,%sp@- 4bd8c: 4e94 jsr %a4@ the_node = the_node->child[pdir]; 4bd8e: 508f addql #8,%sp 4bd90: 2673 2c04 moveal %a3@(00000004,%d2:l:4),%a3 } the_node->parent->color = RBT_BLACK; 4bd94: 2053 moveal %a3@,%a0 g->color = RBT_RED; 4bd96: 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; 4bd98: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 4bd9c: 2540 000c movel %d0,%a2@(12) /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); 4bda0: 9082 subl %d2,%d0 4bda2: 2f00 movel %d0,%sp@- 4bda4: 2f0a movel %a2,%sp@- 4bda6: 4e94 jsr %a4@ 4bda8: 508f addql #8,%sp ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4bdaa: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4bdac: 2450 moveal %a0@,%a2 4bdae: 4a8a tstl %a2 4bdb0: 670a beqs 4bdbc <_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); 4bdb2: 7001 moveq #1,%d0 4bdb4: b0a8 000c cmpl %a0@(12),%d0 4bdb8: 6622 bnes 4bddc <_RBTree_Validate_insert_unprotected+0x92> 4bdba: 60a0 bras 4bd5c <_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; 4bdbc: 42ab 000c clrl %a3@(12) 4bdc0: 601a bras 4bddc <_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]; 4bdc2: b1ea 0004 cmpal %a2@(4),%a0 4bdc6: 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]; 4bdc8: b7e8 0004 cmpal %a0@(4),%a3 4bdcc: 56c0 sne %d0 RBTree_Direction pdir = the_node->parent != g->child[0]; 4bdce: 49c2 extbl %d2 4bdd0: 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]; 4bdd2: 49c0 extbl %d0 4bdd4: 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) { 4bdd6: b480 cmpl %d0,%d2 4bdd8: 66ae bnes 4bd88 <_RBTree_Validate_insert_unprotected+0x3e> 4bdda: 60b8 bras 4bd94 <_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; } 4bddc: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4bde2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057a68 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 57a68: 4e56 ffe4 linkw %fp,#-28 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 57a6c: 2039 0007 6b3c movel 76b3c <_Thread_Dispatch_disable_level>,%d0 57a72: 5280 addql #1,%d0 57a74: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 57a78: 23c0 0007 6b3c movel %d0,76b3c <_Thread_Dispatch_disable_level> 57a7e: 266e 0008 moveal %fp@(8),%a3 return _Thread_Dispatch_disable_level; 57a82: 2039 0007 6b3c movel 76b3c <_Thread_Dispatch_disable_level>,%d0 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57a88: 2f39 0007 6bdc movel 76bdc <_RTEMS_Allocator_Mutex>,%sp@- /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57a8e: 240b movel %a3,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 57a90: 260b movel %a3,%d3 57a92: 0682 0000 0010 addil #16,%d2 57a98: 0683 0000 0068 addil #104,%d3 57a9e: 4bf9 0005 2ec8 lea 52ec8 <_Heap_Allocate_aligned_with_boundary>,%a5 if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57aa4: 49f9 0005 80ec lea 580ec <_Thread_queue_Extract>,%a4 * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 57aaa: 4eb9 0005 2428 jsr 52428 <_API_Mutex_Unlock> 57ab0: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57ab2: 283c 0005 81e8 movel #360936,%d4 57ab8: 2f02 movel %d2,%sp@- 57aba: 2044 moveal %d4,%a0 57abc: 4e90 jsr %a0@ if ( the_thread == NULL ) 57abe: 588f addql #4,%sp /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 57ac0: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 57ac2: 4a80 tstl %d0 57ac4: 672c beqs 57af2 <_Region_Process_queue+0x8a> 57ac6: 42a7 clrl %sp@- 57ac8: 42a7 clrl %sp@- 57aca: 2f2a 0024 movel %a2@(36),%sp@- 57ace: 2f03 movel %d3,%sp@- 57ad0: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 57ad2: 4fef 0010 lea %sp@(16),%sp 57ad6: 4a80 tstl %d0 57ad8: 6718 beqs 57af2 <_Region_Process_queue+0x8a> <== NEVER TAKEN break; *(void **)the_thread->Wait.return_argument = the_segment; 57ada: 206a 0028 moveal %a2@(40),%a0 57ade: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 57ae0: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 57ae4: 2f0a movel %a2,%sp@- 57ae6: 2f02 movel %d2,%sp@- 57ae8: 4e94 jsr %a4@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 57aea: 508f addql #8,%sp break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 57aec: 42aa 0034 clrl %a2@(52) } 57af0: 60c6 bras 57ab8 <_Region_Process_queue+0x50> _Thread_Enable_dispatch(); } 57af2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 57af8: 4e5e unlk %fp *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 57afa: 4ef9 0005 4ab4 jmp 54ab4 <_Thread_Enable_dispatch> =============================================================================== 00047b10 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 47b10: 4e56 0000 linkw %fp,#0 47b14: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 47b16: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 47b1a: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 47b1e: 4eb9 0004 933c jsr 4933c <_Workspace_Allocate> if ( sched ) { 47b24: 588f addql #4,%sp 47b26: 4a80 tstl %d0 47b28: 670e beqs 47b38 <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 47b2a: 2540 008a movel %d0,%a2@(138) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 47b2e: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 47b30: 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; 47b32: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 47b34: 2141 0014 movel %d1,%a0@(20) } return sched; } 47b38: 246e fffc moveal %fp@(-4),%a2 47b3c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b40 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 47b40: 4e56 0000 linkw %fp,#0 47b44: 2f02 movel %d2,%sp@- 47b46: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 47b4a: 2f02 movel %d2,%sp@- 47b4c: 4eb9 0004 7bb8 jsr 47bb8 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 47b52: 588f addql #4,%sp 47b54: b4b9 0006 04a6 cmpl 604a6 <_Per_CPU_Information+0x10>,%d2 47b5a: 6606 bnes 47b62 <_Scheduler_EDF_Block+0x22> <== NEVER TAKEN _Scheduler_EDF_Schedule(); 47b5c: 4eb9 0004 7cd8 jsr 47cd8 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 47b62: b4b9 0006 04a2 cmpl 604a2 <_Per_CPU_Information+0xc>,%d2 47b68: 6608 bnes 47b72 <_Scheduler_EDF_Block+0x32> <== NEVER TAKEN _Thread_Dispatch_necessary = true; 47b6a: 7001 moveq #1,%d0 47b6c: 13c0 0006 04ae moveb %d0,604ae <_Per_CPU_Information+0x18> } 47b72: 242e fffc movel %fp@(-4),%d2 47b76: 4e5e unlk %fp ... =============================================================================== 00047be4 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 47be4: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47be8: 206e 0008 moveal %fp@(8),%a0 47bec: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 47bf2: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 47bf4: 4ef9 0004 9358 jmp 49358 <_Workspace_Free> ... =============================================================================== 00047c9c <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 47c9c: 4e56 0000 linkw %fp,#0 47ca0: 206e 0008 moveal %fp@(8),%a0 47ca4: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; if (deadline) { 47ca8: 670e beqs 47cb8 <_Scheduler_EDF_Release_job+0x1c><== NEVER TAKEN /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 47caa: 2239 0006 0142 movel 60142 <_Watchdog_Ticks_since_boot>,%d1 47cb0: d081 addl %d1,%d0 47cb2: 0880 001f bclr #31,%d0 47cb6: 6004 bras 47cbc <_Scheduler_EDF_Release_job+0x20> & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 47cb8: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED } the_thread->real_priority = new_priority; 47cbc: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 47cc0: 4878 0001 pea 1 47cc4: 2f00 movel %d0,%sp@- 47cc6: 2f08 movel %a0,%sp@- 47cc8: 4eb9 0004 7fdc jsr 47fdc <_Thread_Change_priority> 47cce: 4fef 000c lea %sp@(12),%sp } 47cd2: 4e5e unlk %fp ... =============================================================================== 00047cfc <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 47cfc: 4e56 0000 linkw %fp,#0 47d00: 2f0a movel %a2,%sp@- 47d02: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 47d06: 2f0a movel %a2,%sp@- 47d08: 4eb9 0004 7b88 jsr 47b88 <_Scheduler_EDF_Enqueue> 47d0e: 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( 47d12: 2079 0006 04a6 moveal 604a6 <_Per_CPU_Information+0x10>,%a0 47d18: 2f28 0014 movel %a0@(20),%sp@- 47d1c: 2079 0005 e6fe moveal 5e6fe <_Scheduler+0x30>,%a0 47d22: 4e90 jsr %a0@ 47d24: 4fef 000c lea %sp@(12),%sp 47d28: 4a80 tstl %d0 47d2a: 6c20 bges 47d4c <_Scheduler_EDF_Unblock+0x50> _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 47d2c: 2079 0006 04a2 moveal 604a2 <_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; 47d32: 23ca 0006 04a6 movel %a2,604a6 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 47d38: 4a28 0074 tstb %a0@(116) 47d3c: 6606 bnes 47d44 <_Scheduler_EDF_Unblock+0x48> <== ALWAYS TAKEN 47d3e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 47d42: 6608 bnes 47d4c <_Scheduler_EDF_Unblock+0x50> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 47d44: 7001 moveq #1,%d0 47d46: 13c0 0006 04ae moveb %d0,604ae <_Per_CPU_Information+0x18> } } 47d4c: 246e fffc moveal %fp@(-4),%a2 47d50: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047d54 <_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) { 47d54: 7002 moveq #2,%d0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 47d56: 4e56 0000 linkw %fp,#0 47d5a: 2f0a movel %a2,%sp@- 47d5c: 246e 0008 moveal %fp@(8),%a2 Scheduler_EDF_Per_thread *sched_info = 47d60: 206a 008a moveal %a2@(138),%a0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 47d64: 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) { 47d66: b0a8 0014 cmpl %a0@(20),%d0 47d6a: 6618 bnes 47d84 <_Scheduler_EDF_Update+0x30> /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 47d6c: 202a 00ac movel %a2@(172),%d0 47d70: 08c0 001f bset #31,%d0 47d74: 2540 00ac movel %d0,%a2@(172) the_thread->real_priority = the_thread->Start.initial_priority; 47d78: 2540 0018 movel %d0,%a2@(24) the_thread->current_priority = the_thread->Start.initial_priority; 47d7c: 2540 0014 movel %d0,%a2@(20) sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 47d80: 42a8 0014 clrl %a0@(20) } if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) { 47d84: 7001 moveq #1,%d0 47d86: b0a8 0014 cmpl %a0@(20),%d0 47d8a: 664c bnes 47dd8 <_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); 47d8c: 2408 movel %a0,%d2 <== NOT EXECUTED 47d8e: 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); 47d90: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47d92: 4879 0006 04b8 pea 604b8 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47d98: 4eb9 0004 bccc jsr 4bccc <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); 47d9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47da0: 4879 0006 04b8 pea 604b8 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47da6: 4eb9 0004 be90 jsr 4be90 <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); 47dac: 4eb9 0004 7cd8 jsr 47cd8 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { 47db2: 2079 0006 04a2 moveal 604a2 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 47db8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 47dbc: b1f9 0006 04a6 cmpal 604a6 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 47dc2: 6714 beqs 47dd8 <_Scheduler_EDF_Update+0x84> <== NOT EXECUTED if ( _Thread_Executing->is_preemptible || 47dc4: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 47dc8: 6606 bnes 47dd0 <_Scheduler_EDF_Update+0x7c> <== NOT EXECUTED 47dca: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 47dce: 6608 bnes 47dd8 <_Scheduler_EDF_Update+0x84> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 47dd0: 7001 moveq #1,%d0 <== NOT EXECUTED 47dd2: 13c0 0006 04ae moveb %d0,604ae <_Per_CPU_Information+0x18> <== NOT EXECUTED } } } 47dd8: 242e fff8 movel %fp@(-8),%d2 47ddc: 246e fffc moveal %fp@(-4),%a2 47de0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047de4 <_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 ); 47de4: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { 47dea: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 47dee: 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; 47df2: 2479 0006 04a2 moveal 604a2 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = 47df8: 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 ); 47dfc: 40c2 movew %sr,%d2 <== NOT EXECUTED 47dfe: 8082 orl %d2,%d0 <== NOT EXECUTED 47e00: 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); 47e02: 2079 0006 04bc moveal 604bc <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 47e08: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 47e0c: 660c bnes 47e1a <_Scheduler_EDF_Yield+0x36> <== NOT EXECUTED #include #include #include #include void _Scheduler_EDF_Yield(void) 47e0e: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 47e12: 57c0 seq %d0 <== NOT EXECUTED 47e14: 49c0 extbl %d0 <== NOT EXECUTED 47e16: 4480 negl %d0 <== NOT EXECUTED 47e18: 6002 bras 47e1c <_Scheduler_EDF_Yield+0x38> <== NOT EXECUTED 47e1a: 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) ) { 47e1c: 4a00 tstb %d0 <== NOT EXECUTED 47e1e: 6652 bnes 47e72 <_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); 47e20: 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 ); 47e22: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47e24: 4879 0006 04b8 pea 604b8 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47e2a: 4eb9 0004 bccc jsr 4bccc <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); 47e30: 2f03 movel %d3,%sp@- <== NOT EXECUTED 47e32: 4879 0006 04b8 pea 604b8 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47e38: 4eb9 0004 be90 jsr 4be90 <_RBTree_Insert> <== NOT EXECUTED _ISR_Flash( level ); 47e3e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 47e44: 46c2 movew %d2,%sr <== NOT EXECUTED 47e46: 8082 orl %d2,%d0 <== NOT EXECUTED 47e48: 46c0 movew %d0,%sr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) { 47e4a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 47e4e: b5f9 0006 04a6 cmpal 604a6 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 47e54: 6624 bnes 47e7a <_Scheduler_EDF_Yield+0x96> <== NOT EXECUTED first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); 47e56: 42a7 clrl %sp@- <== NOT EXECUTED 47e58: 4879 0006 04b8 pea 604b8 <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 47e5e: 4eb9 0004 bebc jsr 4bebc <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; 47e64: 508f addql #8,%sp <== NOT EXECUTED 47e66: 2040 moveal %d0,%a0 <== NOT EXECUTED 47e68: 5988 subql #4,%a0 <== NOT EXECUTED 47e6a: 23d0 0006 04a6 movel %a0@,604a6 <_Per_CPU_Information+0x10><== NOT EXECUTED 47e70: 6008 bras 47e7a <_Scheduler_EDF_Yield+0x96> <== NOT EXECUTED } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 47e72: b5f9 0006 04a6 cmpal 604a6 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 47e78: 6708 beqs 47e82 <_Scheduler_EDF_Yield+0x9e> <== NOT EXECUTED _Thread_Dispatch_necessary = true; 47e7a: 7001 moveq #1,%d0 <== NOT EXECUTED 47e7c: 13c0 0006 04ae moveb %d0,604ae <_Per_CPU_Information+0x18> <== NOT EXECUTED _ISR_Enable( level ); 47e82: 46c2 movew %d2,%sr <== NOT EXECUTED } 47e84: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 47e8a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00047434 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 47434: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 47438: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 4743a: 2279 0005 d2a2 moveal 5d2a2 <_Scheduler+0x4>,%a1 47440: 4ed1 jmp %a1@ ... =============================================================================== 0004760c <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 4760c: 4e56 0000 linkw %fp,#0 _Workspace_Free( the_thread->scheduler_info ); 47610: 206e 0008 moveal %fp@(8),%a0 47614: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 4761a: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 4761c: 4ef9 0004 8c2c jmp 48c2c <_Workspace_Free> ... =============================================================================== 00047704 <_Scheduler_priority_Tick>: #include #include void _Scheduler_priority_Tick( void ) { 47704: 4e56 0000 linkw %fp,#0 47708: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 4770a: 2479 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 47710: 4a2a 0074 tstb %a2@(116) 47714: 6758 beqs 4776e <_Scheduler_priority_Tick+0x6a> return; if ( !_States_Is_ready( executing->current_state ) ) 47716: 4aaa 0010 tstl %a2@(16) 4771a: 6652 bnes 4776e <_Scheduler_priority_Tick+0x6a> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 4771c: 202a 007a movel %a2@(122),%d0 47720: 7201 moveq #1,%d1 47722: b280 cmpl %d0,%d1 47724: 6248 bhis 4776e <_Scheduler_priority_Tick+0x6a> 47726: 123c 0002 moveb #2,%d1 4772a: b280 cmpl %d0,%d1 4772c: 640a bccs 47738 <_Scheduler_priority_Tick+0x34> 4772e: 123c 0003 moveb #3,%d1 47732: b280 cmpl %d0,%d1 47734: 6638 bnes 4776e <_Scheduler_priority_Tick+0x6a> <== NEVER TAKEN 47736: 6020 bras 47758 <_Scheduler_priority_Tick+0x54> case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 47738: 202a 0076 movel %a2@(118),%d0 4773c: 5380 subql #1,%d0 4773e: 2540 0076 movel %d0,%a2@(118) 47742: 6e2a bgts 4776e <_Scheduler_priority_Tick+0x6a> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 47744: 2079 0005 d2aa moveal 5d2aa <_Scheduler+0xc>,%a0 4774a: 4e90 jsr %a0@ * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4774c: 41f9 0005 eb50 lea 5eb50 <_Thread_Ticks_per_timeslice>,%a0 47752: 2550 0076 movel %a0@,%a2@(118) 47756: 6016 bras 4776e <_Scheduler_priority_Tick+0x6a> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 47758: 202a 0076 movel %a2@(118),%d0 4775c: 5380 subql #1,%d0 4775e: 2540 0076 movel %d0,%a2@(118) 47762: 660a bnes 4776e <_Scheduler_priority_Tick+0x6a> (*executing->budget_callout)( executing ); 47764: 2f0a movel %a2,%sp@- 47766: 206a 007e moveal %a2@(126),%a0 4776a: 4e90 jsr %a0@ 4776c: 588f addql #4,%sp break; #endif } } 4776e: 246e fffc moveal %fp@(-4),%a2 47772: 4e5e unlk %fp ... =============================================================================== 000461dc <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 461dc: 4e56 0000 linkw %fp,#0 461e0: 206e 0008 moveal %fp@(8),%a0 461e4: 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(); 461e6: 2039 0005 efd8 movel 5efd8 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 461ec: 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) || 461ee: 4a88 tstl %a0 461f0: 6762 beqs 46254 <_TOD_Validate+0x78> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 461f2: 243c 000f 4240 movel #1000000,%d2 461f8: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 461fc: b4a8 0018 cmpl %a0@(24),%d2 46200: 6352 blss 46254 <_TOD_Validate+0x78> (the_tod->ticks >= ticks_per_second) || 46202: 763b moveq #59,%d3 46204: b6a8 0014 cmpl %a0@(20),%d3 46208: 654a bcss 46254 <_TOD_Validate+0x78> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 4620a: b6a8 0010 cmpl %a0@(16),%d3 4620e: 6544 bcss 46254 <_TOD_Validate+0x78> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 46210: 7017 moveq #23,%d0 46212: b0a8 000c cmpl %a0@(12),%d0 46216: 653c bcss 46254 <_TOD_Validate+0x78> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 46218: 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) || 4621c: 6736 beqs 46254 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->month == 0) || 4621e: 720c moveq #12,%d1 46220: b280 cmpl %d0,%d1 46222: 6530 bcss 46254 <_TOD_Validate+0x78> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 46224: 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) || 46226: 0c82 0000 07c3 cmpil #1987,%d2 4622c: 6326 blss 46254 <_TOD_Validate+0x78> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 4622e: 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) || 46232: 6720 beqs 46254 <_TOD_Validate+0x78> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 46234: 163c 0003 moveb #3,%d3 46238: 41f9 0005 e058 lea 5e058 <_TOD_Days_per_month>,%a0 4623e: c483 andl %d3,%d2 46240: 6606 bnes 46248 <_TOD_Validate+0x6c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 46242: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0 46246: 6004 bras 4624c <_TOD_Validate+0x70> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 46248: 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( 4624c: b081 cmpl %d1,%d0 4624e: 54c0 scc %d0 46250: 4480 negl %d0 46252: 6002 bras 46256 <_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; 46254: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 46256: 241f movel %sp@+,%d2 46258: 261f movel %sp@+,%d3 4625a: 4e5e unlk %fp ... =============================================================================== 00047930 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47930: 4e56 fff0 linkw %fp,#-16 47934: 48d7 041c moveml %d2-%d4/%a2,%sp@ 47938: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 4793c: 282a 0010 movel %a2@(16),%d4 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47940: 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 ); 47944: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 47946: 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 ); 4794a: 4eb9 0004 8548 jsr 48548 <_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 ) 47950: 588f addql #4,%sp 47952: b4aa 0014 cmpl %a2@(20),%d2 47956: 670c beqs 47964 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 47958: 2f02 movel %d2,%sp@- 4795a: 2f0a movel %a2,%sp@- 4795c: 4eb9 0004 84ec jsr 484ec <_Thread_Set_priority> 47962: 508f addql #8,%sp _ISR_Disable( level ); 47964: 203c 0000 0700 movel #1792,%d0 4796a: 40c2 movew %sr,%d2 4796c: 8082 orl %d2,%d0 4796e: 46c0 movew %d0,%sr 47970: 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; 47972: 202a 0010 movel %a2@(16),%d0 47976: c284 andl %d4,%d1 if ( state != STATES_TRANSIENT ) { 47978: 7804 moveq #4,%d4 4797a: b880 cmpl %d0,%d4 4797c: 672e beqs 479ac <_Thread_Change_priority+0x7c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 4797e: 4a81 tstl %d1 47980: 6608 bnes 4798a <_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); 47982: 72fb moveq #-5,%d1 47984: c280 andl %d0,%d1 47986: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 4798a: 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); 4798c: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 47992: 676c beqs 47a00 <_Thread_Change_priority+0xd0> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 47994: 2d4a 000c movel %a2,%fp@(12) 47998: 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 ); } 4799e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 479a4: 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 ); 479a6: 4ef9 0004 844c jmp 4844c <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 479ac: 4a81 tstl %d1 479ae: 661e bnes 479ce <_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 ); 479b0: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 479b4: 4a03 tstb %d3 479b6: 670a beqs 479c2 <_Thread_Change_priority+0x92> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 479b8: 2f0a movel %a2,%sp@- 479ba: 2079 0005 d2c6 moveal 5d2c6 <_Scheduler+0x28>,%a0 479c0: 6008 bras 479ca <_Thread_Change_priority+0x9a> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 479c2: 2079 0005 d2c2 moveal 5d2c2 <_Scheduler+0x24>,%a0 479c8: 2f0a movel %a2,%sp@- 479ca: 4e90 jsr %a0@ 479cc: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 479ce: 203c 0000 0700 movel #1792,%d0 479d4: 46c2 movew %d2,%sr 479d6: 8082 orl %d2,%d0 479d8: 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(); 479da: 2079 0005 d2a6 moveal 5d2a6 <_Scheduler+0x8>,%a0 479e0: 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 ); 479e2: 2079 0005 effa moveal 5effa <_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() && 479e8: b1f9 0005 effe cmpal 5effe <_Per_CPU_Information+0x10>,%a0 479ee: 670e beqs 479fe <_Thread_Change_priority+0xce> 479f0: 4a28 0074 tstb %a0@(116) 479f4: 6708 beqs 479fe <_Thread_Change_priority+0xce> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 479f6: 7801 moveq #1,%d4 479f8: 13c4 0005 f006 moveb %d4,5f006 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 479fe: 46c2 movew %d2,%sr } 47a00: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 47a06: 4e5e unlk %fp ... =============================================================================== 00047be4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 47be4: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 47be8: 486e fffc pea %fp@(-4) 47bec: 2f2e 0008 movel %fp@(8),%sp@- 47bf0: 4eb9 0004 7da8 jsr 47da8 <_Thread_Get> switch ( location ) { 47bf6: 508f addql #8,%sp 47bf8: 4aae fffc tstl %fp@(-4) 47bfc: 6624 bnes 47c22 <_Thread_Delay_ended+0x3e> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 47bfe: 2f3c 1000 0018 movel #268435480,%sp@- 47c04: 2f00 movel %d0,%sp@- 47c06: 4eb9 0004 7a0c jsr 47a0c <_Thread_Clear_state> 47c0c: 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--; 47c0e: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 47c14: 5380 subql #1,%d0 47c16: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47c1c: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 47c22: 4e5e unlk %fp ... =============================================================================== 00047c28 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 47c28: 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++; 47c2c: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 47c32: 5280 addql #1,%d0 47c34: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47c3a: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 47c40: 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 ); 47c44: 223c 0000 0700 movel #1792,%d1 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 47c4a: 2479 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 47c50: 40c0 movew %sr,%d0 47c52: 8280 orl %d0,%d1 47c54: 46c1 movew %d1,%sr _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47c56: 260e movel %fp,%d3 _Timestamp_Subtract( 47c58: 240e movel %fp,%d2 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47c5a: 0683 ffff fff0 addil #-16,%d3 47c60: 2a3c 0004 af48 movel #307016,%d5 _Timestamp_Subtract( 47c66: 5182 subql #8,%d2 47c68: 283c 0004 86dc movel #296668,%d4 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47c6e: 4bf9 0004 86a4 lea 486a4 <_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 ); 47c74: 49f9 0004 895c lea 4895c <_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 ) { 47c7a: 6000 00d2 braw 47d4e <_Thread_Dispatch+0x126> heir = _Thread_Heir; 47c7e: 2679 0005 effe moveal 5effe <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 47c84: 4201 clrb %d1 _Thread_Executing = heir; 47c86: 23cb 0005 effa movel %a3,5effa <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 47c8c: 13c1 0005 f006 moveb %d1,5f006 <_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 ) 47c92: b5cb cmpal %a3,%a2 47c94: 6700 00c2 beqw 47d58 <_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 ) 47c98: 7201 moveq #1,%d1 47c9a: b2ab 007a cmpl %a3@(122),%d1 47c9e: 660a bnes 47caa <_Thread_Dispatch+0x82> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 47ca0: 41f9 0005 eb50 lea 5eb50 <_Thread_Ticks_per_timeslice>,%a0 47ca6: 2750 0076 movel %a0@,%a3@(118) _ISR_Enable( level ); 47caa: 46c0 movew %d0,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 47cac: 2f03 movel %d3,%sp@- 47cae: 2045 moveal %d5,%a0 47cb0: 4e90 jsr %a0@ _Timestamp_Subtract( 47cb2: 2044 moveal %d4,%a0 47cb4: 2f02 movel %d2,%sp@- 47cb6: 2f03 movel %d3,%sp@- 47cb8: 4879 0005 f008 pea 5f008 <_Per_CPU_Information+0x1a> 47cbe: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 47cc0: 2f02 movel %d2,%sp@- 47cc2: 486a 0082 pea %a2@(130) 47cc6: 4e95 jsr %a5@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47cc8: 2079 0005 ec1e moveal 5ec1e <_Thread_libc_reent>,%a0 47cce: 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; 47cd2: 202e fff0 movel %fp@(-16),%d0 47cd6: 222e fff4 movel %fp@(-12),%d1 47cda: 23c0 0005 f008 movel %d0,5f008 <_Per_CPU_Information+0x1a> 47ce0: 23c1 0005 f00c movel %d1,5f00c <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 47ce6: 4a88 tstl %a0 47ce8: 6708 beqs 47cf2 <_Thread_Dispatch+0xca> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 47cea: 2550 00fa movel %a0@,%a2@(250) *_Thread_libc_reent = heir->libc_reent; 47cee: 20ab 00fa movel %a3@(250),%a0@ } _User_extensions_Thread_switch( executing, heir ); 47cf2: 2f0b movel %a3,%sp@- 47cf4: 2f0a movel %a2,%sp@- 47cf6: 4e94 jsr %a4@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 47cf8: 486b 00c2 pea %a3@(194) 47cfc: 486a 00c2 pea %a2@(194) 47d00: 4eb9 0004 8c7c jsr 48c7c <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 47d06: 4fef 0010 lea %sp@(16),%sp 47d0a: 4aaa 00f6 tstl %a2@(246) 47d0e: 672c beqs 47d3c <_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 ); 47d10: 2079 0005 ec1a moveal 5ec1a <_Thread_Allocated_fp>,%a0 47d16: b1ca cmpal %a2,%a0 47d18: 6722 beqs 47d3c <_Thread_Dispatch+0x114> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 47d1a: 4a88 tstl %a0 47d1c: 670c beqs 47d2a <_Thread_Dispatch+0x102> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 47d1e: 4868 00f6 pea %a0@(246) 47d22: 4eb9 0004 8dc2 jsr 48dc2 <_CPU_Context_save_fp> 47d28: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 47d2a: 486a 00f6 pea %a2@(246) 47d2e: 4eb9 0004 8de4 jsr 48de4 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 47d34: 588f addql #4,%sp 47d36: 23ca 0005 ec1a movel %a2,5ec1a <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 47d3c: 2479 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 47d42: 223c 0000 0700 movel #1792,%d1 47d48: 40c0 movew %sr,%d0 47d4a: 8280 orl %d0,%d1 47d4c: 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 ) { 47d4e: 1239 0005 f006 moveb 5f006 <_Per_CPU_Information+0x18>,%d1 47d54: 6600 ff28 bnew 47c7e <_Thread_Dispatch+0x56> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 47d58: 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--; 47d5a: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 47d60: 5380 subql #1,%d0 47d62: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47d68: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 47d6e: 4eb9 0004 6288 jsr 46288 <_API_extensions_Run_postswitch> } 47d74: 4cee 3c3c ffd0 moveml %fp@(-48),%d2-%d5/%a2-%a5 47d7a: 4e5e unlk %fp ... =============================================================================== 00047da8 <_Thread_Get>: */ Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 47da8: 4e56 0000 linkw %fp,#0 47dac: 202e 0008 movel %fp@(8),%d0 47db0: 2f03 movel %d3,%sp@- 47db2: 206e 000c moveal %fp@(12),%a0 47db6: 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 ) ) { 47db8: 4a80 tstl %d0 47dba: 661e bnes 47dda <_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++; 47dbc: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 47dc2: 5280 addql #1,%d0 47dc4: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47dca: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 47dd0: 4290 clrl %a0@ tp = _Thread_Executing; 47dd2: 2039 0005 effa movel 5effa <_Per_CPU_Information+0xc>,%d0 goto done; 47dd8: 6044 bras 47e1e <_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); 47dda: 7418 moveq #24,%d2 47ddc: 2200 movel %d0,%d1 47dde: e4a9 lsrl %d2,%d1 47de0: 7607 moveq #7,%d3 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47de2: 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); 47de6: c283 andl %d3,%d1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 47de8: 2241 moveal %d1,%a1 47dea: 5389 subql #1,%a1 47dec: b489 cmpl %a1,%d2 47dee: 643a bccs 47e2a <_Thread_Get+0x82> 47df0: 6014 bras 47e06 <_Thread_Get+0x5e> if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 47df2: 43f9 0005 eb54 lea 5eb54 <_Objects_Information_table>,%a1 47df8: 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 ) { 47dfc: 4a89 tstl %a1 47dfe: 6706 beqs 47e06 <_Thread_Get+0x5e> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 47e00: 2229 0004 movel %a1@(4),%d1 if ( !information ) { 47e04: 6608 bnes 47e0e <_Thread_Get+0x66> *location = OBJECTS_ERROR; 47e06: 7001 moveq #1,%d0 47e08: 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; 47e0a: 4280 clrl %d0 } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; goto done; 47e0c: 6010 bras 47e1e <_Thread_Get+0x76> } tp = (Thread_Control *) _Objects_Get( information, id, location ); 47e0e: 2f08 movel %a0,%sp@- 47e10: 2f00 movel %d0,%sp@- 47e12: 2f01 movel %d1,%sp@- 47e14: 4eb9 0004 70f8 jsr 470f8 <_Objects_Get> 47e1a: 4fef 000c lea %sp@(12),%sp done: return tp; } 47e1e: 242e fff8 movel %fp@(-8),%d2 47e22: 262e fffc movel %fp@(-4),%d3 47e26: 4e5e unlk %fp 47e28: 4e75 rts */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 47e2a: 761b moveq #27,%d3 47e2c: 2400 movel %d0,%d2 47e2e: e6aa lsrl %d3,%d2 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 47e30: 163c 0001 moveb #1,%d3 47e34: b682 cmpl %d2,%d3 47e36: 67ba beqs 47df2 <_Thread_Get+0x4a> 47e38: 60cc bras 47e06 <_Thread_Get+0x5e> ... =============================================================================== 0004cb84 <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4cb84: 4e56 0000 linkw %fp,#0 4cb88: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4cb8a: 2479 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a2 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4cb90: 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; 4cb92: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4cb96: 40c0 movew %sr,%d0 4cb98: e189 lsll #8,%d1 4cb9a: 0280 0000 f8ff andil #63743,%d0 4cba0: 8081 orl %d1,%d0 4cba2: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4cba4: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4cba6: 1439 0005 e358 moveb 5e358 ,%d2 doneConstructors = true; 4cbac: 13c0 0005 e358 moveb %d0,5e358 #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4cbb2: 4aaa 00f6 tstl %a2@(246) 4cbb6: 6720 beqs 4cbd8 <_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 ); 4cbb8: 2079 0005 ec1a moveal 5ec1a <_Thread_Allocated_fp>,%a0 4cbbe: b1ca cmpal %a2,%a0 4cbc0: 6716 beqs 4cbd8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4cbc2: 4a88 tstl %a0 4cbc4: 670c beqs 4cbd2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4cbc6: 4868 00f6 pea %a0@(246) 4cbca: 4eb9 0004 8dc2 jsr 48dc2 <_CPU_Context_save_fp> 4cbd0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4cbd2: 23ca 0005 ec1a movel %a2,5ec1a <_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 ); 4cbd8: 2f0a movel %a2,%sp@- 4cbda: 4eb9 0004 87d8 jsr 487d8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4cbe0: 4eb9 0004 7d80 jsr 47d80 <_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) */ { 4cbe6: 588f addql #4,%sp 4cbe8: 4a02 tstb %d2 4cbea: 6606 bnes 4cbf2 <_Thread_Handler+0x6e> INIT_NAME (); 4cbec: 4eb9 0005 b2a8 jsr 5b2a8 <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4cbf2: 202a 0092 movel %a2@(146),%d0 4cbf6: 6606 bnes 4cbfe <_Thread_Handler+0x7a> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4cbf8: 2f2a 009a movel %a2@(154),%sp@- 4cbfc: 600a bras 4cc08 <_Thread_Handler+0x84> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4cbfe: 7201 moveq #1,%d1 4cc00: b280 cmpl %d0,%d1 4cc02: 6610 bnes 4cc14 <_Thread_Handler+0x90> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4cc04: 2f2a 0096 movel %a2@(150),%sp@- 4cc08: 206a 008e moveal %a2@(142),%a0 4cc0c: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4cc0e: 588f addql #4,%sp 4cc10: 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 ); 4cc14: 2f0a movel %a2,%sp@- 4cc16: 4eb9 0004 8810 jsr 48810 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4cc1c: 4878 0005 pea 5 4cc20: 4878 0001 pea 1 4cc24: 42a7 clrl %sp@- 4cc26: 4eb9 0004 6bdc jsr 46bdc <_Internal_error_Occurred> =============================================================================== 00047e3c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 47e3c: 4e56 ffe4 linkw %fp,#-28 47e40: 222e 0010 movel %fp@(16),%d1 47e44: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 47e48: 246e 000c moveal %fp@(12),%a2 47e4c: 242e 0014 movel %fp@(20),%d2 47e50: 2a2e 001c movel %fp@(28),%d5 47e54: 282e 0024 movel %fp@(36),%d4 47e58: 162e 001b moveb %fp@(27),%d3 47e5c: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 47e60: 42aa 00fe clrl %a2@(254) 47e64: 42aa 0102 clrl %a2@(258) extensions_area = NULL; the_thread->libc_reent = NULL; 47e68: 42aa 00fa clrl %a2@(250) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 47e6c: 4a81 tstl %d1 47e6e: 6624 bnes 47e94 <_Thread_Initialize+0x58> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 47e70: 2f02 movel %d2,%sp@- 47e72: 2f0a movel %a2,%sp@- 47e74: 4eb9 0004 8584 jsr 48584 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 47e7a: 508f addql #8,%sp 47e7c: 4a80 tstl %d0 47e7e: 6700 0152 beqw 47fd2 <_Thread_Initialize+0x196> 47e82: b480 cmpl %d0,%d2 47e84: 6200 014c bhiw 47fd2 <_Thread_Initialize+0x196> return false; /* stack allocation failed */ stack = the_thread->Start.stack; 47e88: 222a 00be movel %a2@(190),%d1 the_thread->Start.core_allocated_stack = true; 47e8c: 7401 moveq #1,%d2 47e8e: 1542 00b0 moveb %d2,%a2@(176) 47e92: 6008 bras 47e9c <_Thread_Initialize+0x60> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 47e94: 4200 clrb %d0 47e96: 1540 00b0 moveb %d0,%a2@(176) 47e9a: 2002 movel %d2,%d0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 47e9c: 2541 00b6 movel %d1,%a2@(182) the_stack->size = size; 47ea0: 2540 00b2 movel %d0,%a2@(178) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 47ea4: 4a03 tstb %d3 47ea6: 6714 beqs 47ebc <_Thread_Initialize+0x80> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47ea8: 4878 001c pea 1c 47eac: 4eb9 0004 8c10 jsr 48c10 <_Workspace_Allocate> if ( !fp_area ) 47eb2: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 47eb4: 2600 movel %d0,%d3 if ( !fp_area ) 47eb6: 6606 bnes 47ebe <_Thread_Initialize+0x82> 47eb8: 6000 00e4 braw 47f9e <_Thread_Initialize+0x162> extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 47ebc: 4283 clrl %d3 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47ebe: 2039 0005 ec2a movel 5ec2a <_Thread_Maximum_extensions>,%d0 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 47ec4: 2543 00f6 movel %d3,%a2@(246) the_thread->Start.fp_context = fp_area; 47ec8: 2543 00ba movel %d3,%a2@(186) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47ecc: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 47ed0: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 47ed4: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 47ed8: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 47edc: 4a80 tstl %d0 47ede: 6718 beqs 47ef8 <_Thread_Initialize+0xbc> extensions_area = _Workspace_Allocate( 47ee0: e588 lsll #2,%d0 47ee2: 2040 moveal %d0,%a0 47ee4: 4868 0004 pea %a0@(4) 47ee8: 4eb9 0004 8c10 jsr 48c10 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47eee: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 47ef0: 2400 movel %d0,%d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 47ef2: 6606 bnes 47efa <_Thread_Initialize+0xbe> 47ef4: 6000 00aa braw 47fa0 <_Thread_Initialize+0x164> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 47ef8: 4282 clrl %d2 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 47efa: 2542 0106 movel %d2,%a2@(262) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 47efe: 6718 beqs 47f18 <_Thread_Initialize+0xdc> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47f00: 2239 0005 ec2a movel 5ec2a <_Thread_Maximum_extensions>,%d1 47f06: 4280 clrl %d0 47f08: 600a bras 47f14 <_Thread_Initialize+0xd8> the_thread->extensions[i] = NULL; 47f0a: 206a 0106 moveal %a2@(262),%a0 47f0e: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 47f12: 5280 addql #1,%d0 47f14: b280 cmpl %d0,%d1 47f16: 64f2 bccs 47f0a <_Thread_Initialize+0xce> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 47f18: 2544 00a0 movel %d4,%a2@(160) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 47f1c: 7002 moveq #2,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 47f1e: 1546 009e moveb %d6,%a2@(158) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 47f22: 256e 0028 00a4 movel %fp@(40),%a2@(164) switch ( budget_algorithm ) { 47f28: b084 cmpl %d4,%d0 47f2a: 660a bnes 47f36 <_Thread_Initialize+0xfa> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 47f2c: 41f9 0005 eb50 lea 5eb50 <_Thread_Ticks_per_timeslice>,%a0 47f32: 2550 0076 movel %a0@,%a2@(118) #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 47f36: 7001 moveq #1,%d0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 47f38: 256e 002c 00a8 movel %fp@(44),%a2@(168) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 47f3e: 2079 0005 d2b6 moveal 5d2b6 <_Scheduler+0x18>,%a0 the_thread->current_state = STATES_DORMANT; 47f44: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 47f48: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 47f4c: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 47f50: 2545 0018 movel %d5,%a2@(24) the_thread->Start.initial_priority = priority; 47f54: 2545 00ac movel %d5,%a2@(172) 47f58: 2f0a movel %a2,%sp@- 47f5a: 4e90 jsr %a0@ sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 47f5c: 588f addql #4,%sp 47f5e: 2800 movel %d0,%d4 47f60: 6740 beqs 47fa2 <_Thread_Initialize+0x166> <== NEVER TAKEN goto failed; _Thread_Set_priority( the_thread, priority ); 47f62: 2f05 movel %d5,%sp@- 47f64: 2f0a movel %a2,%sp@- 47f66: 4eb9 0004 84ec jsr 484ec <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47f6c: 206e 0008 moveal %fp@(8),%a0 47f70: 4280 clrl %d0 47f72: 2068 0018 moveal %a0@(24),%a0 47f76: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 47f7a: 42aa 0082 clrl %a2@(130) 47f7e: 42aa 0086 clrl %a2@(134) 47f82: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 47f86: 256e 0030 000c movel %fp@(48),%a2@(12) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 47f8c: 2f0a movel %a2,%sp@- 47f8e: 4eb9 0004 8894 jsr 48894 <_User_extensions_Thread_create> if ( extension_status ) 47f94: 4fef 000c lea %sp@(12),%sp 47f98: 4a00 tstb %d0 47f9a: 6706 beqs 47fa2 <_Thread_Initialize+0x166> 47f9c: 6038 bras 47fd6 <_Thread_Initialize+0x19a> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 47f9e: 4282 clrl %d2 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 47fa0: 4284 clrl %d4 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 47fa2: 2f2a 00fa movel %a2@(250),%sp@- 47fa6: 47f9 0004 8c2c lea 48c2c <_Workspace_Free>,%a3 47fac: 4e93 jsr %a3@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 47fae: 2f2a 00fe movel %a2@(254),%sp@- 47fb2: 4e93 jsr %a3@ 47fb4: 2f2a 0102 movel %a2@(258),%sp@- 47fb8: 4e93 jsr %a3@ _Workspace_Free( extensions_area ); 47fba: 2f02 movel %d2,%sp@- 47fbc: 4e93 jsr %a3@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 47fbe: 2f03 movel %d3,%sp@- 47fc0: 4e93 jsr %a3@ #endif _Workspace_Free( sched ); 47fc2: 2f04 movel %d4,%sp@- 47fc4: 4e93 jsr %a3@ _Thread_Stack_Free( the_thread ); 47fc6: 2f0a movel %a2,%sp@- 47fc8: 4eb9 0004 85d0 jsr 485d0 <_Thread_Stack_Free> return false; 47fce: 4fef 001c lea %sp@(28),%sp stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 47fd2: 4200 clrb %d0 47fd4: 6002 bras 47fd8 <_Thread_Initialize+0x19c> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 47fd6: 7001 moveq #1,%d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 47fd8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47fde: 4e5e unlk %fp ... =============================================================================== 00048ae8 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 48ae8: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 48aea: 4e56 0000 linkw %fp,#0 48aee: 2f0a movel %a2,%sp@- 48af0: 246e 0008 moveal %fp@(8),%a2 48af4: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 48af8: 6664 bnes 48b5e <_Thread_Restart+0x76> _Thread_Set_transient( the_thread ); 48afa: 2f0a movel %a2,%sp@- 48afc: 4eb9 0004 8bc8 jsr 48bc8 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 48b02: 2f2e 0010 movel %fp@(16),%sp@- 48b06: 2f2e 000c movel %fp@(12),%sp@- 48b0a: 2f0a movel %a2,%sp@- 48b0c: 4eb9 0004 bc2c jsr 4bc2c <_Thread_Reset> _Thread_Load_environment( the_thread ); 48b12: 2f0a movel %a2,%sp@- 48b14: 4eb9 0004 b970 jsr 4b970 <_Thread_Load_environment> _Thread_Ready( the_thread ); 48b1a: 2f0a movel %a2,%sp@- 48b1c: 4eb9 0004 bbfc jsr 4bbfc <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 48b22: 2f0a movel %a2,%sp@- 48b24: 4eb9 0004 8f9c jsr 48f9c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 48b2a: 4fef 001c lea %sp@(28),%sp 48b2e: b5f9 0005 f902 cmpal 5f902 <_Per_CPU_Information+0xc>,%a2 48b34: 662c bnes 48b62 <_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 ) 48b36: 4aaa 00f6 tstl %a2@(246) 48b3a: 670c beqs 48b48 <_Thread_Restart+0x60> _Context_Restore_fp( &_Thread_Executing->fp_context ); 48b3c: 486a 00f6 pea %a2@(246) 48b40: 4eb9 0004 94a4 jsr 494a4 <_CPU_Context_restore_fp> 48b46: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 48b48: 2079 0005 f902 moveal 5f902 <_Per_CPU_Information+0xc>,%a0 48b4e: 41e8 00c2 lea %a0@(194),%a0 48b52: 2f08 movel %a0,%sp@- 48b54: 4eb9 0004 9352 jsr 49352 <_CPU_Context_Restart_self> 48b5a: 588f addql #4,%sp <== NOT EXECUTED 48b5c: 6004 bras 48b62 <_Thread_Restart+0x7a> <== NOT EXECUTED _Thread_Restart_self(); return true; } return false; 48b5e: 4200 clrb %d0 48b60: 6002 bras 48b64 <_Thread_Restart+0x7c> _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 48b62: 7001 moveq #1,%d0 } return false; } 48b64: 246e fffc moveal %fp@(-4),%a2 48b68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000485d0 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 485d0: 4e56 0000 linkw %fp,#0 485d4: 206e 0008 moveal %fp@(8),%a0 #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 485d8: 4a28 00b0 tstb %a0@(176) 485dc: 671c beqs 485fa <_Thread_Stack_Free+0x2a> <== NEVER TAKEN * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 485de: 2279 0005 d1e0 moveal 5d1e0 ,%a1 (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 485e4: 2d68 00b6 0008 movel %a0@(182),%fp@(8) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) 485ea: 4a89 tstl %a1 485ec: 6704 beqs 485f2 <_Thread_Stack_Free+0x22> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 485ee: 4e5e unlk %fp * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 485f0: 4ed1 jmp %a1@ else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 485f2: 4e5e unlk %fp */ if ( Configuration.stack_free_hook ) (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 485f4: 4ef9 0004 8c2c jmp 48c2c <_Workspace_Free> } 485fa: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000478e0 <_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 ) ) { 478e0: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 478e2: 4e56 0000 linkw %fp,#0 478e6: 202e 0010 movel %fp@(16),%d0 478ea: 2f0a movel %a2,%sp@- 478ec: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 478f0: 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 ) ) { 478f4: b2aa 0050 cmpl %a2@(80),%d1 478f8: 6618 bnes 47912 <_Thread_blocking_operation_Cancel+0x32> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 478fa: 123c 0003 moveb #3,%d1 478fe: 2541 0050 movel %d1,%a2@(80) _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 47902: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 47904: 486a 0048 pea %a2@(72) 47908: 4eb9 0004 8ab8 jsr 48ab8 <_Watchdog_Remove> 4790e: 588f addql #4,%sp 47910: 6002 bras 47914 <_Thread_blocking_operation_Cancel+0x34> } else _ISR_Enable( level ); 47912: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47914: 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 } 47918: 246e fffc moveal %fp@(-4),%a2 4791c: 203c 1003 fff8 movel #268697592,%d0 47922: 2d40 000c movel %d0,%fp@(12) 47926: 4e5e unlk %fp 47928: 4ef9 0004 7a0c jmp 47a0c <_Thread_Clear_state> ... =============================================================================== 0004cc2c <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4cc2c: 223c 0000 0700 movel #1792,%d1 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4cc32: 4e56 0000 linkw %fp,#0 4cc36: 2f0a movel %a2,%sp@- 4cc38: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4cc3c: 40c0 movew %sr,%d0 4cc3e: 8280 orl %d0,%d1 4cc40: 46c1 movew %d1,%sr 4cc42: 222a 0010 movel %a2@(16),%d1 4cc46: 0281 0003 bee0 andil #245472,%d1 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4cc4c: 660a bnes 4cc58 <_Thread_queue_Extract_fifo+0x2c> _ISR_Enable( level ); 4cc4e: 46c0 movew %d0,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cc50: 246e fffc moveal %fp@(-4),%a2 4cc54: 4e5e unlk %fp 4cc56: 4e75 rts ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4cc58: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cc5a: 7202 moveq #2,%d1 previous = the_node->previous; 4cc5c: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4cc60: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4cc64: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4cc66: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cc6a: b2aa 0050 cmpl %a2@(80),%d1 4cc6e: 6704 beqs 4cc74 <_Thread_queue_Extract_fifo+0x48> _ISR_Enable( level ); 4cc70: 46c0 movew %d0,%sr 4cc72: 6014 bras 4cc88 <_Thread_queue_Extract_fifo+0x5c> 4cc74: 7203 moveq #3,%d1 4cc76: 2541 0050 movel %d1,%a2@(80) } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4cc7a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4cc7c: 486a 0048 pea %a2@(72) 4cc80: 4eb9 0004 8ab8 jsr 48ab8 <_Watchdog_Remove> 4cc86: 588f addql #4,%sp RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4cc88: 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 } 4cc8c: 246e fffc moveal %fp@(-4),%a2 4cc90: 203c 1003 fff8 movel #268697592,%d0 4cc96: 2d40 000c movel %d0,%fp@(12) 4cc9a: 4e5e unlk %fp 4cc9c: 4ef9 0004 7a0c jmp 47a0c <_Thread_Clear_state> ... =============================================================================== 0004844c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4844c: 4e56 fff0 linkw %fp,#-16 48450: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48454: 246e 0008 moveal %fp@(8),%a2 48458: 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 ) 4845c: 4a8a tstl %a2 4845e: 6746 beqs 484a6 <_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 ) { 48460: 7001 moveq #1,%d0 48462: b0aa 0034 cmpl %a2@(52),%d0 48466: 663e bnes 484a6 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 48468: 303c 0700 movew #1792,%d0 4846c: 40c2 movew %sr,%d2 4846e: 8082 orl %d2,%d0 48470: 46c0 movew %d0,%sr 48472: 202b 0010 movel %a3@(16),%d0 48476: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4847c: 6726 beqs 484a4 <_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; 4847e: 7001 moveq #1,%d0 48480: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 48484: 4878 0001 pea 1 48488: 2f0b movel %a3,%sp@- 4848a: 2f0a movel %a2,%sp@- 4848c: 4eb9 0004 b434 jsr 4b434 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 48492: 486e fffc pea %fp@(-4) 48496: 2f0b movel %a3,%sp@- 48498: 2f0a movel %a2,%sp@- 4849a: 4eb9 0004 8250 jsr 48250 <_Thread_queue_Enqueue_priority> 484a0: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 484a4: 46c2 movew %d2,%sr } } 484a6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 484ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000484b0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 484b0: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 484b4: 486e fffc pea %fp@(-4) 484b8: 2f2e 0008 movel %fp@(8),%sp@- 484bc: 4eb9 0004 7da8 jsr 47da8 <_Thread_Get> switch ( location ) { 484c2: 508f addql #8,%sp 484c4: 4aae fffc tstl %fp@(-4) 484c8: 661e bnes 484e8 <_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 ); 484ca: 2f00 movel %d0,%sp@- 484cc: 4eb9 0004 b4f8 jsr 4b4f8 <_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; 484d2: 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--; 484d4: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 484da: 5380 subql #1,%d0 484dc: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 484e2: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 484e8: 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 586c lea 5586c <_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 57ec lea 557ec <_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 6c3e movel 76c3e <_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 6bc6 moveal 76bc6 <_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 58f8 lea 558f8 <_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 24c0 jsr 524c0 <_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> <== ALWAYS TAKEN 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 <== NOT EXECUTED 51aae: 7201 moveq #1,%d1 <== NOT EXECUTED 51ab0: b280 cmpl %d0,%d1 <== NOT EXECUTED 51ab2: 6608 bnes 51abc <_Timer_server_Body+0xdc> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 51ab4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51ab8: 2f05 movel %d5,%sp@- <== NOT EXECUTED 51aba: 600c bras 51ac8 <_Timer_server_Body+0xe8> <== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 51abc: 7203 moveq #3,%d1 <== NOT EXECUTED 51abe: b280 cmpl %d0,%d1 <== NOT EXECUTED 51ac0: 66d4 bnes 51a96 <_Timer_server_Body+0xb6> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 51ac2: 4868 0010 pea %a0@(16) <== NOT EXECUTED 51ac6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 51ac8: 4e94 jsr %a4@ <== NOT EXECUTED 51aca: 508f addql #8,%sp <== NOT EXECUTED 51acc: 60c8 bras 51a96 <_Timer_server_Body+0xb6> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 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 5a1c lea 55a1c <_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 52bc jsr 552bc <_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 4ab4 jsr 54ab4 <_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 6c3e movel 76c3e <_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 58f8 jsr 558f8 <_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 6bc6 movel 76bc6 <_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 58f8 jsr 558f8 <_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 4ab4 jmp 54ab4 <_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 <== NOT EXECUTED 51c7c: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED } } 51c80: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 51c86: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 51c8a: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 51c8c: 4ef9 0005 2460 jmp 52460 <_Chain_Append> <== NOT EXECUTED =============================================================================== 00048724 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 48724: 4e56 ffe8 linkw %fp,#-24 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48728: 203c 0005 ece4 movel #388324,%d0 4872e: 23c0 0005 ece0 movel %d0,5ece0 <_User_extensions_List> head->previous = NULL; tail->previous = head; 48734: 203c 0005 ece0 movel #388320,%d0 4873a: 23c0 0005 ece8 movel %d0,5ece8 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 48740: 203c 0005 eba0 movel #388000,%d0 48746: 23c0 0005 eb9c movel %d0,5eb9c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 4874c: 203c 0005 eb9c movel #387996,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 48752: 42b9 0005 ece4 clrl 5ece4 <_User_extensions_List+0x4> 48758: 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; 4875c: 2839 0005 d1f2 movel 5d1f2 ,%d4 initial_extensions = Configuration.User_extension_table; 48762: 2639 0005 d1f6 movel 5d1f6 ,%d3 48768: 42b9 0005 eba0 clrl 5eba0 <_User_extensions_Switches_list+0x4> tail->previous = head; 4876e: 23c0 0005 eba4 movel %d0,5eba4 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 48774: 4a83 tstl %d3 48776: 6754 beqs 487cc <_User_extensions_Handler_initialization+0xa8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 48778: 7434 moveq #52,%d2 4877a: 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; 4877e: 49f9 0004 d588 lea 4d588 ,%a4 _User_extensions_Add_set( extension ); 48784: 47f9 0004 b5c0 lea 4b5c0 <_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 *) 4878a: 2f02 movel %d2,%sp@- 4878c: 4eb9 0004 8c46 jsr 48c46 <_Workspace_Allocate_or_fatal_error> 48792: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48794: 2f02 movel %d2,%sp@- extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 48796: 4282 clrl %d2 extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 48798: 42a7 clrl %sp@- 4879a: 2f00 movel %d0,%sp@- 4879c: 4eb9 0004 d5f8 jsr 4d5f8 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 487a2: 4fef 0010 lea %sp@(16),%sp 487a6: 6020 bras 487c8 <_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; 487a8: 4878 0020 pea 20 487ac: 5282 addql #1,%d2 487ae: 2f03 movel %d3,%sp@- 487b0: 486a 0014 pea %a2@(20) 487b4: 0683 0000 0020 addil #32,%d3 487ba: 4e94 jsr %a4@ _User_extensions_Add_set( extension ); 487bc: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 487be: 45ea 0034 lea %a2@(52),%a2 487c2: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 487c4: 4fef 0010 lea %sp@(16),%sp 487c8: b882 cmpl %d2,%d4 487ca: 66dc bnes 487a8 <_User_extensions_Handler_initialization+0x84> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 487cc: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 487d2: 4e5e unlk %fp ... =============================================================================== 00049c60 <_Watchdog_Adjust>: Watchdog_Interval units ) { ISR_Level level; _ISR_Disable( level ); 49c60: 327c 0700 moveaw #1792,%a1 49c64: 2209 movel %a1,%d1 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 49c66: 4e56 ffec linkw %fp,#-20 49c6a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 49c6e: 266e 0008 moveal %fp@(8),%a3 49c72: 262e 000c movel %fp@(12),%d3 49c76: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 49c7a: 40c0 movew %sr,%d0 49c7c: 8280 orl %d0,%d1 49c7e: 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; 49c80: 244b moveal %a3,%a2 49c82: 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 ) ) { 49c84: b5c8 cmpal %a0,%a2 49c86: 674c beqs 49cd4 <_Watchdog_Adjust+0x74> switch ( direction ) { 49c88: 4a83 tstl %d3 49c8a: 673c beqs 49cc8 <_Watchdog_Adjust+0x68> 49c8c: 7201 moveq #1,%d1 49c8e: b283 cmpl %d3,%d1 49c90: 6642 bnes 49cd4 <_Watchdog_Adjust+0x74> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 49c92: d5a8 0010 addl %d2,%a0@(16) break; 49c96: 603c bras 49cd4 <_Watchdog_Adjust+0x74> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49c98: 2053 moveal %a3@,%a0 case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 49c9a: 2228 0010 movel %a0@(16),%d1 49c9e: b282 cmpl %d2,%d1 49ca0: 6308 blss 49caa <_Watchdog_Adjust+0x4a> _Watchdog_First( header )->delta_interval -= units; 49ca2: 9282 subl %d2,%d1 49ca4: 2141 0010 movel %d1,%a0@(16) break; 49ca8: 602a bras 49cd4 <_Watchdog_Adjust+0x74> } else { units -= _Watchdog_First( header )->delta_interval; 49caa: 9481 subl %d1,%d2 _Watchdog_First( header )->delta_interval = 1; 49cac: 7201 moveq #1,%d1 49cae: 2141 0010 movel %d1,%a0@(16) _ISR_Enable( level ); 49cb2: 46c0 movew %d0,%sr _Watchdog_Tickle( header ); 49cb4: 2f0b movel %a3,%sp@- 49cb6: 4e94 jsr %a4@ _ISR_Disable( level ); 49cb8: 2203 movel %d3,%d1 49cba: 40c0 movew %sr,%d0 49cbc: 8280 orl %d0,%d1 49cbe: 46c1 movew %d1,%sr if ( _Chain_Is_empty( header ) ) 49cc0: 588f addql #4,%sp 49cc2: b5d3 cmpal %a3@,%a2 49cc4: 660a bnes 49cd0 <_Watchdog_Adjust+0x70> 49cc6: 600c bras 49cd4 <_Watchdog_Adjust+0x74> units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; _ISR_Enable( level ); _Watchdog_Tickle( header ); 49cc8: 49f9 0004 9e80 lea 49e80 <_Watchdog_Tickle>,%a4 _ISR_Disable( level ); 49cce: 2609 movel %a1,%d3 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 49cd0: 4a82 tstl %d2 49cd2: 66c4 bnes 49c98 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 49cd4: 46c0 movew %d0,%sr } 49cd6: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 49cdc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048ab8 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48ab8: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 48abe: 4e56 0000 linkw %fp,#0 48ac2: 206e 0008 moveal %fp@(8),%a0 48ac6: 2f0a movel %a2,%sp@- 48ac8: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 48aca: 40c1 movew %sr,%d1 48acc: 8081 orl %d1,%d0 48ace: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 48ad0: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 48ad4: 7401 moveq #1,%d2 48ad6: b480 cmpl %d0,%d2 48ad8: 670c beqs 48ae6 <_Watchdog_Remove+0x2e> 48ada: 6242 bhis 48b1e <_Watchdog_Remove+0x66> 48adc: 143c 0003 moveb #3,%d2 48ae0: b480 cmpl %d0,%d2 48ae2: 653a bcss 48b1e <_Watchdog_Remove+0x66> <== NEVER TAKEN 48ae4: 6006 bras 48aec <_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; 48ae6: 42a8 0008 clrl %a0@(8) break; 48aea: 6032 bras 48b1e <_Watchdog_Remove+0x66> } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 48aec: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 48aee: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 48af2: 4a91 tstl %a1@ 48af4: 6708 beqs 48afe <_Watchdog_Remove+0x46> next_watchdog->delta_interval += the_watchdog->delta_interval; 48af6: 2428 0010 movel %a0@(16),%d2 48afa: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 48afe: 2479 0005 ec96 moveal 5ec96 <_Watchdog_Sync_count>,%a2 48b04: 4a8a tstl %a2 48b06: 670c beqs 48b14 <_Watchdog_Remove+0x5c> _Watchdog_Sync_level = _ISR_Nest_level; 48b08: 45f9 0005 eff6 lea 5eff6 <_Per_CPU_Information+0x8>,%a2 48b0e: 23d2 0005 ec3c movel %a2@,5ec3c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 48b14: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 48b18: 234a 0004 movel %a2,%a1@(4) previous->next = next; 48b1c: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 48b1e: 2279 0005 ec9a moveal 5ec9a <_Watchdog_Ticks_since_boot>,%a1 48b24: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 48b28: 46c1 movew %d1,%sr return( previous_state ); } 48b2a: 241f movel %sp@+,%d2 48b2c: 245f moveal %sp@+,%a2 48b2e: 4e5e unlk %fp ... =============================================================================== 0005a794 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5a794: 4e56 0000 linkw %fp,#0 5a798: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5a79c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5a7a2: 2d40 0008 movel %d0,%fp@(8) } 5a7a6: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5a7a8: 4ef9 0004 27cc jmp 427cc ... =============================================================================== 00049d48 <_close_r>: int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { 49d48: 4e56 0000 linkw %fp,#0 return close( fd ); 49d4c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 49d52: 4e5e unlk %fp int _close_r( struct _reent *ptr __attribute__((unused)), int fd ) { return close( fd ); 49d54: 4ef9 0004 9cd8 jmp 49cd8 ... =============================================================================== 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 b2bc jsr 5b2bc <_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 6030 jsr 46030 ... =============================================================================== 000508b2 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 508b2: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 508b6: 206e 0008 moveal %fp@(8),%a0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 508ba: 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; 508be: 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; 508c0: 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); 508c2: 4bf9 0005 05a0 lea 505a0 ,%a5 if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 508c8: 49f9 0005 950c lea 5950c ,%a4 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 508ce: 282e 0014 movel %fp@(20),%d4 508d2: 2e2e 0018 movel %fp@(24),%d7 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 508d6: 2668 0034 moveal %a0@(52),%a3 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 508da: 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; 508dc: 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; 508e0: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 508e4: 6040 bras 50926 <_fat_block_read+0x74> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 508e6: 2f0a movel %a2,%sp@- 508e8: 4878 0001 pea 1 508ec: 2f05 movel %d5,%sp@- 508ee: 2f0b movel %a3,%sp@- 508f0: 4e95 jsr %a5@ if (rc != RC_OK) 508f2: 4fef 0010 lea %sp@(16),%sp 508f6: 4a80 tstl %d0 508f8: 6632 bnes 5092c <_fat_block_read+0x7a> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 508fa: 4282 clrl %d2 508fc: 3413 movew %a3@,%d2 508fe: 9486 subl %d6,%d2 50900: b882 cmpl %d2,%d4 50902: 6402 bccs 50906 <_fat_block_read+0x54> 50904: 2404 movel %d4,%d2 memcpy((buff + cmpltd), (block->buffer + ofs), c); 50906: 206e fffc moveal %fp@(-4),%a0 count -= c; 5090a: 9882 subl %d2,%d4 cmpltd += c; blk++; 5090c: 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); 5090e: 2f02 movel %d2,%sp@- 50910: dca8 001e addl %a0@(30),%d6 50914: 2047 moveal %d7,%a0 50916: 2f06 movel %d6,%sp@- 50918: 4870 3800 pea %a0@(00000000,%d3:l) count -= c; cmpltd += c; blk++; ofs = 0; 5091c: 4286 clrl %d6 c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; 5091e: 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); 50920: 4e94 jsr %a4@ count -= c; cmpltd += c; blk++; ofs = 0; 50922: 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) 50926: 4a84 tstl %d4 50928: 66bc bnes 508e6 <_fat_block_read+0x34> 5092a: 6002 bras 5092e <_fat_block_read+0x7c> { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 5092c: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 5092e: 2003 movel %d3,%d0 50930: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 50936: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000509d6 <_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) { 509d6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 509da: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 509de: 2d68 0034 0008 movel %a0@(52),%fp@(8) <== NOT EXECUTED } 509e4: 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); 509e6: 4ef9 0005 0780 jmp 50780 <== NOT EXECUTED =============================================================================== 0005093a <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 5093a: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5093e: 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) { 50942: 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; 50946: 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; 50948: 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); 5094a: 49f9 0005 05a0 lea 505a0 ,%a4 if (rc != RC_OK) return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 50950: 4bf9 0005 950c lea 5950c ,%a5 rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 50956: 282e 0014 movel %fp@(20),%d4 5095a: 2e2e 0018 movel %fp@(24),%d7 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5095e: 2668 0034 moveal %a0@(52),%a3 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 50962: 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; 50964: 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; 50968: 2a2e 000c movel %fp@(12),%d5 uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 5096c: 6054 bras 509c2 <_fat_block_write+0x88> { c = MIN(count, (fs_info->vol.bps - ofs)); 5096e: 4280 clrl %d0 50970: 3013 movew %a3@,%d0 50972: 2400 movel %d0,%d2 50974: 9486 subl %d6,%d2 50976: b882 cmpl %d2,%d4 50978: 6402 bccs 5097c <_fat_block_write+0x42> 5097a: 2404 movel %d4,%d2 if (c == fs_info->vol.bps) 5097c: b082 cmpl %d2,%d0 5097e: 6608 bnes 50988 <_fat_block_write+0x4e> rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 50980: 2f0a movel %a2,%sp@- 50982: 4878 0002 pea 2 50986: 6006 bras 5098e <_fat_block_write+0x54> else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 50988: 2f0a movel %a2,%sp@- 5098a: 4878 0001 pea 1 5098e: 2f05 movel %d5,%sp@- 50990: 2f0b movel %a3,%sp@- 50992: 4e94 jsr %a4@ 50994: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 50998: 4a80 tstl %d0 5099a: 662c bnes 509c8 <_fat_block_write+0x8e> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 5099c: 2f02 movel %d2,%sp@- 5099e: 2047 moveal %d7,%a0 509a0: 4870 3800 pea %a0@(00000000,%d3:l) fat_buf_mark_modified(fs_info); count -= c; 509a4: 9882 subl %d2,%d4 cmpltd +=c; 509a6: d682 addl %d2,%d3 blk++; 509a8: 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); 509aa: 206e fffc moveal %fp@(-4),%a0 509ae: dca8 001e addl %a0@(30),%d6 509b2: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 509b4: 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); 509b6: 4e95 jsr %a5@ fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 509b8: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 509bc: 7001 moveq #1,%d0 509be: 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) 509c2: 4a84 tstl %d4 509c4: 66a8 bnes 5096e <_fat_block_write+0x34> 509c6: 6002 bras 509ca <_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; 509c8: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 509ca: 2003 movel %d3,%d0 509cc: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 509d2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bdf0 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 5bdf0: 4e56 0000 linkw %fp,#0 5bdf4: 222e 0010 movel %fp@(16),%d1 5bdf8: 202e 000c movel %fp@(12),%d0 return fcntl( fd, cmd, arg ); 5bdfc: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5be02: 2d41 000c movel %d1,%fp@(12) 5be06: 2d40 0008 movel %d0,%fp@(8) } 5be0a: 4e5e unlk %fp int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 5be0c: 4ef9 0005 bc88 jmp 5bc88 ... =============================================================================== 0005a7b0 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5a7b0: 4e56 0000 linkw %fp,#0 free( ptr ); 5a7b4: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a7ba: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5a7bc: 4ef9 0004 2b68 jmp 42b68 ... =============================================================================== 0004fab6 <_hash_search>: uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4fab6: 7001 moveq #1,%d0 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4fab8: 4e56 ffe8 linkw %fp,#-24 4fabc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4fac0: 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); 4fac4: 49fa ff9e lea %pc@(4fa64 ),%a4 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 4fac8: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4faca: 266e 000c moveal %fp@(12),%a3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4face: 2200 movel %d0,%d1 4fad0: e988 lsll #4,%d0 4fad2: e589 lsll #2,%d1 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4fad4: 282e 0008 movel %fp@(8),%d4 uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); 4fad8: 9081 subl %d1,%d0 4fada: d7c0 addal %d0,%a3 rtems_chain_control *hash, uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { 4fadc: 262e 0014 movel %fp@(20),%d3 4fae0: 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) ; ) 4fae2: 6024 bras 4fb08 <_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); 4fae4: 486a 0020 pea %a2@(32) 4fae8: 2f04 movel %d4,%sp@- 4faea: 4e94 jsr %a4@ 4faec: 508f addql #8,%sp if ( (key1) == ck) 4faee: b082 cmpl %d2,%d0 4faf0: 6614 bnes 4fb06 <_hash_search+0x50> { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 4faf2: 4a83 tstl %d3 4faf4: 6706 beqs 4fafc <_hash_search+0x46> <== ALWAYS TAKEN 4faf6: b6aa 000c cmpl %a2@(12),%d3 <== NOT EXECUTED 4fafa: 660a bnes 4fb06 <_hash_search+0x50> <== NOT EXECUTED { *ret = (void *)the_node; 4fafc: 206e 0018 moveal %fp@(24),%a0 return 0; 4fb00: 4280 clrl %d0 if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) { *ret = (void *)the_node; 4fb02: 208a movel %a2,%a0@ return 0; 4fb04: 6008 bras 4fb0e <_hash_search+0x58> } } the_node = the_node->next; 4fb06: 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) ; ) 4fb08: b7ca cmpal %a2,%a3 4fb0a: 66d8 bnes 4fae4 <_hash_search+0x2e> return 0; } } the_node = the_node->next; } return -1; 4fb0c: 70ff moveq #-1,%d0 } 4fb0e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4fb14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005a884 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5a884: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5a888: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a88e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5a890: 4ef9 0005 b214 jmp 5b214 ... =============================================================================== 0005a964 <_lseek_r>: struct _reent *ptr __attribute__((unused)), int fd, off_t offset, int whence ) { 5a964: 4e56 0000 linkw %fp,#0 5a968: 206e 000c moveal %fp@(12),%a0 5a96c: 202e 0010 movel %fp@(16),%d0 5a970: 222e 0014 movel %fp@(20),%d1 return lseek( fd, offset, whence ); 5a974: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5a97a: 2d40 000c movel %d0,%fp@(12) 5a97e: 2d41 0010 movel %d1,%fp@(16) 5a982: 2d48 0008 movel %a0,%fp@(8) } 5a986: 4e5e unlk %fp int fd, off_t offset, int whence ) { return lseek( fd, offset, whence ); 5a988: 4ef9 0005 a898 jmp 5a898 ... =============================================================================== 0005a990 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5a990: 4e56 0000 linkw %fp,#0 return malloc( size ); 5a994: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5a99a: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5a99c: 4ef9 0004 2e54 jmp 42e54 ... =============================================================================== 0005aa40 <_read_r>: struct _reent *ptr __attribute__((unused)), int fd, void *buf, size_t nbytes ) { 5aa40: 4e56 0000 linkw %fp,#0 5aa44: 222e 0010 movel %fp@(16),%d1 5aa48: 202e 000c movel %fp@(12),%d0 return read( fd, buf, nbytes ); 5aa4c: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5aa52: 2d41 000c movel %d1,%fp@(12) 5aa56: 2d40 0008 movel %d0,%fp@(8) } 5aa5a: 4e5e unlk %fp int fd, void *buf, size_t nbytes ) { return read( fd, buf, nbytes ); 5aa5c: 4ef9 0005 a9a4 jmp 5a9a4 ... =============================================================================== 0005aa64 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5aa64: 4e56 0000 linkw %fp,#0 5aa68: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5aa6c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5aa72: 2d40 0008 movel %d0,%fp@(8) } 5aa76: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5aa78: 4ef9 0005 aac4 jmp 5aac4 ... =============================================================================== 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> ... =============================================================================== 0005aa80 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5aa80: 4e56 0000 linkw %fp,#0 5aa84: 222e 0010 movel %fp@(16),%d1 5aa88: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5aa8c: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5aa92: 2d41 000c movel %d1,%fp@(12) 5aa96: 2d40 0008 movel %d0,%fp@(8) } 5aa9a: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5aa9c: 4ef9 0005 aba8 jmp 5aba8 ... =============================================================================== 00045f10 : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 45f10: 4e56 ffe8 linkw %fp,#-24 45f14: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 45f18: 4879 0006 12c8 pea 612c8 45f1e: 49f9 0004 6fe0 lea 46fe0 ,%a4 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 45f24: 242e 0008 movel %fp@(8),%d2 45f28: 246e 000c moveal %fp@(12),%a2 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 45f2c: 4e94 jsr %a4@ if (fcntl (fildes, F_GETFD) < 0) { 45f2e: 4878 0001 pea 1 45f32: 2f02 movel %d2,%sp@- 45f34: 4eb9 0004 c41c jsr 4c41c 45f3a: 4fef 000c lea %sp@(12),%sp 45f3e: 4a80 tstl %d0 45f40: 6c1c bges 45f5e pthread_mutex_unlock(&aio_request_queue.mutex); 45f42: 4879 0006 12c8 pea 612c8 45f48: 4eb9 0004 7078 jsr 47078 rtems_set_errno_and_return_minus_one (EBADF); 45f4e: 4eb9 0004 f1bc jsr 4f1bc <__errno> 45f54: 7209 moveq #9,%d1 45f56: 2040 moveal %d0,%a0 45f58: 2081 movel %d1,%a0@ 45f5a: 6000 00f6 braw 46052 } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 45f5e: 4a8a tstl %a2 45f60: 6600 00d2 bnew 46034 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 45f64: 42a7 clrl %sp@- 45f66: 47f9 0004 62ba lea 462ba ,%a3 45f6c: 2f02 movel %d2,%sp@- 45f6e: 4879 0006 1310 pea 61310 45f74: 4e93 jsr %a3@ if (r_chain == NULL) { 45f76: 4fef 000c lea %sp@(12),%sp /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 45f7a: 2440 moveal %d0,%a2 if (r_chain == NULL) { 45f7c: 4a80 tstl %d0 45f7e: 667c bnes 45ffc AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 45f80: 203c 0006 1320 movel #398112,%d0 45f86: b0b9 0006 131c cmpl 6131c ,%d0 45f8c: 6700 012c beqw 460ba r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 45f90: 42a7 clrl %sp@- 45f92: 2f02 movel %d2,%sp@- 45f94: 4879 0006 131c pea 6131c 45f9a: 4e93 jsr %a3@ if (r_chain == NULL) { 45f9c: 4fef 000c lea %sp@(12),%sp r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 45fa0: 2400 movel %d0,%d2 if (r_chain == NULL) { 45fa2: 6616 bnes 45fba pthread_mutex_unlock(&aio_request_queue.mutex); 45fa4: 4879 0006 12c8 pea 612c8 return AIO_ALLDONE; 45faa: 143c 0002 moveb #2,%d2 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock(&aio_request_queue.mutex); 45fae: 4eb9 0004 7078 jsr 47078 return AIO_ALLDONE; 45fb4: 588f addql #4,%sp 45fb6: 6000 0144 braw 460fc */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 45fba: 2f00 movel %d0,%sp@- AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 45fbc: 2602 movel %d2,%d3 45fbe: 0683 0000 001c addil #28,%d3 45fc4: 4eb9 0004 8854 jsr 48854 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 45fca: 2f02 movel %d2,%sp@- 45fcc: 4eb9 0004 660c jsr 4660c pthread_mutex_destroy (&r_chain->mutex); 45fd2: 2f03 movel %d3,%sp@- 45fd4: 4eb9 0004 6da8 jsr 46da8 pthread_cond_destroy (&r_chain->mutex); 45fda: 2f03 movel %d3,%sp@- 45fdc: 4eb9 0004 6a94 jsr 46a94 free (r_chain); 45fe2: 2f02 movel %d2,%sp@- 45fe4: 4eb9 0004 33b4 jsr 433b4 pthread_mutex_unlock (&aio_request_queue.mutex); 45fea: 4879 0006 12c8 pea 612c8 45ff0: 4eb9 0004 7078 jsr 47078 return AIO_CANCELED; 45ff6: 4fef 0018 lea %sp@(24),%sp 45ffa: 6032 bras 4602e return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 45ffc: 2400 movel %d0,%d2 45ffe: 0682 0000 001c addil #28,%d2 46004: 2f02 movel %d2,%sp@- 46006: 4e94 jsr %a4@ 46008: 2f0a movel %a2,%sp@- 4600a: 4eb9 0004 8854 jsr 48854 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 46010: 2f0a movel %a2,%sp@- pthread_mutex_unlock (&r_chain->mutex); 46012: 45f9 0004 7078 lea 47078 ,%a2 AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 46018: 4eb9 0004 660c jsr 4660c pthread_mutex_unlock (&r_chain->mutex); 4601e: 2f02 movel %d2,%sp@- 46020: 4e92 jsr %a2@ pthread_mutex_unlock (&aio_request_queue.mutex); 46022: 4879 0006 12c8 pea 612c8 46028: 4e92 jsr %a2@ return AIO_CANCELED; 4602a: 4fef 0014 lea %sp@(20),%sp 4602e: 4282 clrl %d2 46030: 6000 00ca braw 460fc } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 46034: 2612 movel %a2@,%d3 46036: b483 cmpl %d3,%d2 46038: 6720 beqs 4605a pthread_mutex_unlock (&aio_request_queue.mutex); 4603a: 4879 0006 12c8 pea 612c8 46040: 4eb9 0004 7078 jsr 47078 rtems_set_errno_and_return_minus_one (EINVAL); 46046: 4eb9 0004 f1bc jsr 4f1bc <__errno> 4604c: 2040 moveal %d0,%a0 4604e: 7016 moveq #22,%d0 46050: 2080 movel %d0,%a0@ 46052: 588f addql #4,%sp 46054: 74ff moveq #-1,%d2 46056: 6000 00a4 braw 460fc } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 4605a: 42a7 clrl %sp@- 4605c: 4bf9 0004 62ba lea 462ba ,%a5 46062: 2f03 movel %d3,%sp@- 46064: 4879 0006 1310 pea 61310 4606a: 4e95 jsr %a5@ if (r_chain == NULL) { 4606c: 4fef 000c lea %sp@(12),%sp if (aiocbp->aio_fildes != fildes) { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 46070: 2640 moveal %d0,%a3 if (r_chain == NULL) { 46072: 4a80 tstl %d0 46074: 6656 bnes 460cc if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 46076: 203c 0006 1320 movel #398112,%d0 4607c: b0b9 0006 131c cmpl 6131c ,%d0 46082: 6736 beqs 460ba <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 46084: 42a7 clrl %sp@- 46086: 2f03 movel %d3,%sp@- 46088: 4879 0006 131c pea 6131c 4608e: 4e95 jsr %a5@ if (r_chain == NULL) { 46090: 4fef 000c lea %sp@(12),%sp 46094: 4a80 tstl %d0 46096: 67a2 beqs 4603a rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 46098: 2f0a movel %a2,%sp@- 4609a: 2040 moveal %d0,%a0 4609c: 4868 0008 pea %a0@(8) 460a0: 4eb9 0004 6662 jsr 46662 pthread_mutex_unlock (&aio_request_queue.mutex); 460a6: 4879 0006 12c8 pea 612c8 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 460ac: 2400 movel %d0,%d2 pthread_mutex_unlock (&aio_request_queue.mutex); 460ae: 4eb9 0004 7078 jsr 47078 return result; 460b4: 4fef 000c lea %sp@(12),%sp 460b8: 6042 bras 460fc } else { pthread_mutex_unlock (&aio_request_queue.mutex); 460ba: 4879 0006 12c8 pea 612c8 <== NOT EXECUTED return AIO_ALLDONE; 460c0: 7402 moveq #2,%d2 <== NOT EXECUTED result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 460c2: 4eb9 0004 7078 jsr 47078 <== NOT EXECUTED return AIO_ALLDONE; 460c8: 588f addql #4,%sp <== NOT EXECUTED 460ca: 6030 bras 460fc <== NOT EXECUTED } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 460cc: 2600 movel %d0,%d3 460ce: 0683 0000 001c addil #28,%d3 460d4: 2f03 movel %d3,%sp@- 460d6: 4e94 jsr %a4@ result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 460d8: 2f0a movel %a2,%sp@- 460da: 486b 0008 pea %a3@(8) pthread_mutex_unlock (&r_chain->mutex); 460de: 45f9 0004 7078 lea 47078 ,%a2 } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 460e4: 4eb9 0004 6662 jsr 46662 460ea: 2400 movel %d0,%d2 pthread_mutex_unlock (&r_chain->mutex); 460ec: 2f03 movel %d3,%sp@- 460ee: 4e92 jsr %a2@ pthread_mutex_unlock (&aio_request_queue.mutex); 460f0: 4879 0006 12c8 pea 612c8 460f6: 4e92 jsr %a2@ return result; 460f8: 4fef 0014 lea %sp@(20),%sp } return AIO_ALLDONE; } 460fc: 2002 movel %d2,%d0 460fe: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 46104: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046118 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 46118: 203c 0000 2000 movel #8192,%d0 int aio_fsync( int op, struct aiocb *aiocbp ) { 4611e: 4e56 0000 linkw %fp,#0 46122: 2f0a movel %a2,%sp@- 46124: 246e 000c moveal %fp@(12),%a2 rtems_aio_request *req; int mode; if (op != O_SYNC) 46128: b0ae 0008 cmpl %fp@(8),%d0 4612c: 671a beqs 46148 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4612e: 7216 moveq #22,%d1 46130: 70ff moveq #-1,%d0 46132: 2541 0030 movel %d1,%a2@(48) 46136: 2540 0034 movel %d0,%a2@(52) 4613a: 4eb9 0004 f1bc jsr 4f1bc <__errno> 46140: 2040 moveal %d0,%a0 46142: 7016 moveq #22,%d0 46144: 2080 movel %d0,%a0@ 46146: 607e bras 461c6 mode = fcntl (aiocbp->aio_fildes, F_GETFL); 46148: 4878 0003 pea 3 4614c: 2f12 movel %a2@,%sp@- 4614e: 4eb9 0004 c41c jsr 4c41c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 46154: 508f addql #8,%sp 46156: 7203 moveq #3,%d1 46158: c081 andl %d1,%d0 4615a: 123c 0001 moveb #1,%d1 4615e: 5380 subql #1,%d0 46160: b280 cmpl %d0,%d1 46162: 641a bccs 4617e rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 46164: 72ff moveq #-1,%d1 46166: 7009 moveq #9,%d0 46168: 2541 0034 movel %d1,%a2@(52) 4616c: 2540 0030 movel %d0,%a2@(48) 46170: 4eb9 0004 f1bc jsr 4f1bc <__errno> 46176: 7209 moveq #9,%d1 46178: 2040 moveal %d0,%a0 4617a: 2081 movel %d1,%a0@ 4617c: 6048 bras 461c6 req = malloc (sizeof (rtems_aio_request)); 4617e: 4878 0018 pea 18 46182: 4eb9 0004 38dc jsr 438dc if (req == NULL) 46188: 588f addql #4,%sp 4618a: 4a80 tstl %d0 4618c: 661c bnes 461aa <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4618e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 46192: 72ff moveq #-1,%d1 <== NOT EXECUTED 46194: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 46198: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4619c: 4eb9 0004 f1bc jsr 4f1bc <__errno> <== NOT EXECUTED 461a2: 2040 moveal %d0,%a0 <== NOT EXECUTED 461a4: 700b moveq #11,%d0 <== NOT EXECUTED 461a6: 2080 movel %d0,%a0@ <== NOT EXECUTED 461a8: 601c bras 461c6 <== NOT EXECUTED req->aiocbp = aiocbp; 461aa: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_SYNC; 461ac: 7203 moveq #3,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 461ae: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_SYNC; 461b2: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 461b6: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 461ba: 2d40 0008 movel %d0,%fp@(8) } 461be: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 461c0: 4ef9 0004 66bc jmp 466bc } 461c6: 246e fffc moveal %fp@(-4),%a2 461ca: 70ff moveq #-1,%d0 461cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000468a8 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 468a8: 4e56 0000 linkw %fp,#0 468ac: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 468ae: 4878 0003 pea 3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 468b2: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 468b6: 2f12 movel %a2@,%sp@- 468b8: 4eb9 0004 c41c jsr 4c41c if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 468be: 508f addql #8,%sp 468c0: 7203 moveq #3,%d1 468c2: c081 andl %d1,%d0 468c4: 6722 beqs 468e8 <== NEVER TAKEN 468c6: 123c 0002 moveb #2,%d1 468ca: b280 cmpl %d0,%d1 468cc: 671a beqs 468e8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 468ce: 7009 moveq #9,%d0 468d0: 72ff moveq #-1,%d1 468d2: 2540 0030 movel %d0,%a2@(48) 468d6: 2541 0034 movel %d1,%a2@(52) 468da: 4eb9 0004 f1bc jsr 4f1bc <__errno> 468e0: 2040 moveal %d0,%a0 468e2: 7009 moveq #9,%d0 468e4: 2080 movel %d0,%a0@ 468e6: 606e bras 46956 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 468e8: 4aaa 0014 tstl %a2@(20) 468ec: 6606 bnes 468f4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 468ee: 4aaa 0004 tstl %a2@(4) 468f2: 6a1a bpls 4690e rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 468f4: 72ff moveq #-1,%d1 468f6: 7016 moveq #22,%d0 468f8: 2541 0034 movel %d1,%a2@(52) 468fc: 2540 0030 movel %d0,%a2@(48) 46900: 4eb9 0004 f1bc jsr 4f1bc <__errno> 46906: 7216 moveq #22,%d1 46908: 2040 moveal %d0,%a0 4690a: 2081 movel %d1,%a0@ 4690c: 6048 bras 46956 req = malloc (sizeof (rtems_aio_request)); 4690e: 4878 0018 pea 18 46912: 4eb9 0004 38dc jsr 438dc if (req == NULL) 46918: 588f addql #4,%sp 4691a: 4a80 tstl %d0 4691c: 661c bnes 4693a <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4691e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 46922: 72ff moveq #-1,%d1 <== NOT EXECUTED 46924: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 46928: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4692c: 4eb9 0004 f1bc jsr 4f1bc <__errno> <== NOT EXECUTED 46932: 2040 moveal %d0,%a0 <== NOT EXECUTED 46934: 700b moveq #11,%d0 <== NOT EXECUTED 46936: 2080 movel %d0,%a0@ <== NOT EXECUTED 46938: 601c bras 46956 <== NOT EXECUTED req->aiocbp = aiocbp; 4693a: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_READ; 4693c: 7201 moveq #1,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4693e: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_READ; 46942: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 46946: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 4694a: 2d40 0008 movel %d0,%fp@(8) } 4694e: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 46950: 4ef9 0004 66bc jmp 466bc } 46956: 246e fffc moveal %fp@(-4),%a2 4695a: 70ff moveq #-1,%d0 4695c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046970 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 46970: 4e56 0000 linkw %fp,#0 46974: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 46976: 4878 0003 pea 3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 4697a: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 4697e: 2f12 movel %a2@,%sp@- 46980: 4eb9 0004 c41c jsr 4c41c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 46986: 508f addql #8,%sp 46988: 7203 moveq #3,%d1 4698a: c081 andl %d1,%d0 4698c: 123c 0001 moveb #1,%d1 46990: 5380 subql #1,%d0 46992: b280 cmpl %d0,%d1 46994: 641a bccs 469b0 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 46996: 7009 moveq #9,%d0 46998: 72ff moveq #-1,%d1 4699a: 2540 0030 movel %d0,%a2@(48) 4699e: 2541 0034 movel %d1,%a2@(52) 469a2: 4eb9 0004 f1bc jsr 4f1bc <__errno> 469a8: 2040 moveal %d0,%a0 469aa: 7009 moveq #9,%d0 469ac: 2080 movel %d0,%a0@ 469ae: 606e bras 46a1e if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 469b0: 4aaa 0014 tstl %a2@(20) 469b4: 6606 bnes 469bc rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 469b6: 4aaa 0004 tstl %a2@(4) 469ba: 6a1a bpls 469d6 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 469bc: 72ff moveq #-1,%d1 469be: 7016 moveq #22,%d0 469c0: 2541 0034 movel %d1,%a2@(52) 469c4: 2540 0030 movel %d0,%a2@(48) 469c8: 4eb9 0004 f1bc jsr 4f1bc <__errno> 469ce: 7216 moveq #22,%d1 469d0: 2040 moveal %d0,%a0 469d2: 2081 movel %d1,%a0@ 469d4: 6048 bras 46a1e req = malloc (sizeof (rtems_aio_request)); 469d6: 4878 0018 pea 18 469da: 4eb9 0004 38dc jsr 438dc if (req == NULL) 469e0: 588f addql #4,%sp 469e2: 4a80 tstl %d0 469e4: 661c bnes 46a02 <== ALWAYS TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 469e6: 103c 000b moveb #11,%d0 <== NOT EXECUTED 469ea: 72ff moveq #-1,%d1 <== NOT EXECUTED 469ec: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 469f0: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 469f4: 4eb9 0004 f1bc jsr 4f1bc <__errno> <== NOT EXECUTED 469fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 469fc: 700b moveq #11,%d0 <== NOT EXECUTED 469fe: 2080 movel %d0,%a0@ <== NOT EXECUTED 46a00: 601c bras 46a1e <== NOT EXECUTED req->aiocbp = aiocbp; 46a02: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_WRITE; 46a04: 7202 moveq #2,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 46a06: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_WRITE; 46a0a: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 46a0e: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 46a12: 2d40 0008 movel %d0,%fp@(8) } 46a16: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 46a18: 4ef9 0004 66bc jmp 466bc } 46a1e: 246e fffc moveal %fp@(-4),%a2 46a22: 70ff moveq #-1,%d0 46a24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 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 0005 0618 jsr 50618 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 16a4 movel #399012,%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 0006 0030 cmpl 60030 ,%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 16a4 lea 616a4 ,%a0 44662: b1f9 0006 0030 cmpal 60030 ,%a0 44668: 6610 bnes 4467a rtems_set_errno_and_return_minus_one( ENOTSUP ); 4466a: 4eb9 0004 f51c jsr 4f51c <__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 f51c lea 4f51c <__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 de45 pea 5de45 <_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 0006 0030 moveal 60030 ,%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 0006 0030 moveal 60030 ,%a0 446e0: 41e8 0018 lea %a0@(24),%a0 446e4: 2f02 movel %d2,%sp@- 446e6: 2f08 movel %a0,%sp@- 446e8: 4eb9 0004 fd3c jsr 4fd3c 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 ... =============================================================================== 00045694 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 45694: 4e56 0000 linkw %fp,#0 45698: 222e 0008 movel %fp@(8),%d1 4569c: 202e 000c movel %fp@(12),%d0 456a0: 2f02 movel %d2,%sp@- if ( !tp ) 456a2: 4a80 tstl %d0 456a4: 6608 bnes 456ae rtems_set_errno_and_return_minus_one( EINVAL ); 456a6: 4eb9 0004 da30 jsr 4da30 <__errno> 456ac: 6042 bras 456f0 if ( clock_id == CLOCK_REALTIME ) { 456ae: 7401 moveq #1,%d2 456b0: b481 cmpl %d1,%d2 456b2: 660a bnes 456be _TOD_Get(tp); 456b4: 2f00 movel %d0,%sp@- 456b6: 4eb9 0004 7350 jsr 47350 <_TOD_Get> 456bc: 6014 bras 456d2 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 456be: 7404 moveq #4,%d2 456c0: b481 cmpl %d1,%d2 456c2: 6706 beqs 456ca <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) { 456c4: 7402 moveq #2,%d2 456c6: b481 cmpl %d1,%d2 456c8: 660e bnes 456d8 _TOD_Get_uptime_as_timespec( tp ); 456ca: 2f00 movel %d0,%sp@- 456cc: 4eb9 0004 73b4 jsr 473b4 <_TOD_Get_uptime_as_timespec> return 0; 456d2: 588f addql #4,%sp 456d4: 4280 clrl %d0 456d6: 6020 bras 456f8 456d8: 41f9 0004 da30 lea 4da30 <__errno>,%a0 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 456de: 7003 moveq #3,%d0 456e0: b081 cmpl %d1,%d0 456e2: 660a bnes 456ee rtems_set_errno_and_return_minus_one( ENOSYS ); 456e4: 4e90 jsr %a0@ 456e6: 7258 moveq #88,%d1 456e8: 2040 moveal %d0,%a0 456ea: 2081 movel %d1,%a0@ 456ec: 6008 bras 456f6 #endif rtems_set_errno_and_return_minus_one( EINVAL ); 456ee: 4e90 jsr %a0@ 456f0: 2040 moveal %d0,%a0 456f2: 7016 moveq #22,%d0 456f4: 2080 movel %d0,%a0@ 456f6: 70ff moveq #-1,%d0 return 0; } 456f8: 242e fffc movel %fp@(-4),%d2 456fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00045700 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 45700: 4e56 0000 linkw %fp,#0 45704: 202e 0008 movel %fp@(8),%d0 45708: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 4570c: 4a88 tstl %a0 4570e: 6710 beqs 45720 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 45710: 7201 moveq #1,%d1 45712: b280 cmpl %d0,%d1 45714: 663a bnes 45750 <== NEVER TAKEN if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 45716: 203c 21da e4ff movel #567993599,%d0 4571c: b090 cmpl %a0@,%d0 4571e: 6508 bcss 45728 rtems_set_errno_and_return_minus_one( EINVAL ); 45720: 4eb9 0004 da30 jsr 4da30 <__errno> 45726: 6046 bras 4576e * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 45728: 2039 0006 05c8 movel 605c8 <_Thread_Dispatch_disable_level>,%d0 4572e: 5280 addql #1,%d0 45730: 23c0 0006 05c8 movel %d0,605c8 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 45736: 2039 0006 05c8 movel 605c8 <_Thread_Dispatch_disable_level>,%d0 _Thread_Disable_dispatch(); _TOD_Set( tp ); 4573c: 2f08 movel %a0,%sp@- 4573e: 4eb9 0004 740c jsr 4740c <_TOD_Set> _Thread_Enable_dispatch(); 45744: 4eb9 0004 894c jsr 4894c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 4574a: 588f addql #4,%sp 4574c: 4280 clrl %d0 4574e: 6026 bras 45776 45750: 41f9 0004 da30 lea 4da30 <__errno>,%a0 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) 45756: 7202 moveq #2,%d1 45758: b280 cmpl %d0,%d1 4575a: 6706 beqs 45762 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) 4575c: 7203 moveq #3,%d1 4575e: b280 cmpl %d0,%d1 45760: 660a bnes 4576c rtems_set_errno_and_return_minus_one( ENOSYS ); 45762: 4e90 jsr %a0@ 45764: 7258 moveq #88,%d1 45766: 2040 moveal %d0,%a0 45768: 2081 movel %d1,%a0@ 4576a: 6008 bras 45774 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 4576c: 4e90 jsr %a0@ 4576e: 2040 moveal %d0,%a0 45770: 7016 moveq #22,%d0 45772: 2080 movel %d0,%a0@ 45774: 70ff moveq #-1,%d0 return 0; } 45776: 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 15ca moveal 615ca ,%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 15ce movel 615ce ,%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 0005 0c00 jsr 50c00 <== 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 15ce movel %a3,615ce <== NOT EXECUTED disktab_size = new_size; 425a2: 23c4 0006 15ca movel %d4,615ca <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 425a8: 2479 0006 15ce moveal 615ce ,%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 0005 0c00 jsr 50c00 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 11f0 jsr 511f0 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 =============================================================================== 0004a24c : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4a24c: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4a24e: 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 ) ) 4a252: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4a256: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4a25a: 282e 0008 movel %fp@(8),%d4 4a25e: 262e 000c movel %fp@(12),%d3 4a262: 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 ) ) 4a266: 4a80 tstl %d0 4a268: 670e beqs 4a278 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 4a26a: 4eb9 0004 c718 jsr 4c718 <__errno> <== NOT EXECUTED 4a270: 7401 moveq #1,%d2 <== NOT EXECUTED 4a272: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a274: 2082 movel %d2,%a0@ <== NOT EXECUTED 4a276: 607a bras 4a2f2 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4a278: 2652 moveal %a2@,%a3 if (!device_name_table) 4a27a: 4a8b tstl %a3 4a27c: 670a beqs 4a288 4a27e: 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) 4a280: 4bf9 0004 e038 lea 4e038 ,%a5 4a286: 6056 bras 4a2de 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 ); 4a288: 4eb9 0004 c718 jsr 4c718 <__errno> 4a28e: 720e moveq #14,%d1 4a290: 2040 moveal %d0,%a0 4a292: 2081 movel %d1,%a0@ 4a294: 605c bras 4a2f2 for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 4a296: 2853 moveal %a3@,%a4 4a298: 4a8c tstl %a4 4a29a: 673c beqs 4a2d8 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4a29c: 2f03 movel %d3,%sp@- 4a29e: 2f0c movel %a4,%sp@- 4a2a0: 2f04 movel %d4,%sp@- 4a2a2: 4e95 jsr %a5@ 4a2a4: 4fef 000c lea %sp@(12),%sp 4a2a8: 4a80 tstl %d0 4a2aa: 662c bnes 4a2d8 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4a2ac: 4a34 3800 tstb %a4@(00000000,%d3:l) 4a2b0: 6626 bnes 4a2d8 <== 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; 4a2b2: 41f9 0005 bfa0 lea 5bfa0 ,%a0 4a2b8: 2548 000c movel %a0,%a2@(12) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4a2bc: 2079 0005 c104 moveal 5c104 ,%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; 4a2c2: 203c 0005 bf68 movel #376680,%d0 pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4a2c8: 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; 4a2ce: 2540 0008 movel %d0,%a2@(8) pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4a2d2: 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]; 4a2d4: 248b movel %a3,%a2@ pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 4a2d6: 601c bras 4a2f4 /* 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++) { 4a2d8: 5282 addql #1,%d2 4a2da: 47eb 0014 lea %a3@(20),%a3 4a2de: b4b9 0005 bf26 cmpl 5bf26 ,%d2 4a2e4: 65b0 bcss 4a296 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4a2e6: 4eb9 0004 c718 jsr 4c718 <__errno> 4a2ec: 2040 moveal %d0,%a0 4a2ee: 7002 moveq #2,%d0 4a2f0: 2080 movel %d0,%a0@ 4a2f2: 70ff moveq #-1,%d0 } 4a2f4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4a2fa: 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 c718 jsr 4c718 <__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 dae4 lea 4dae4 ,%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 c718 jsr 4c718 <__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 c718 jsr 4c718 <__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 bf26 cmpl 5bf26 ,%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 c718 jsr 4c718 <__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 e01c jsr 4e01c 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 15c6 movel 615c6 ,%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 15c4 moveb %d0,615c4 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 15c6 movel 615c6 ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42512: 13c0 0006 15c4 moveb %d0,615c4 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 6d40 jsr 46d40 <== 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 60a4 jsr 460a4 <== 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 d4e4 moveal 5d4e4 <__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 fb00 movel 5fb00 ,%d0 437dc: 670a beqs 437e8 <== NEVER TAKEN fclose(group_fp); 437de: 2f00 movel %d0,%sp@- 437e0: 4eb9 0004 da30 jsr 4da30 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 fa26 movel 5fa26 ,%d0 43696: 670a beqs 436a2 <== NEVER TAKEN fclose(passwd_fp); 43698: 2f00 movel %d0,%sp@- 4369a: 4eb9 0004 da30 jsr 4da30 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 d4e4 moveal 5d4e4 <__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 c32f pea 5c32f 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 c32d pea 5c32d <== 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 d4e4 moveal 5d4e4 <__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 c32d pea 5c32d 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 =============================================================================== 000505a0 : #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) { 505a0: 4e56 ffdc linkw %fp,#-36 505a4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 505a8: 246e 0008 moveal %fp@(8),%a2 505ac: 242e 000c movel %fp@(12),%d2 505b0: 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) 505b4: 4a2a 0077 tstb %a2@(119) 505b8: 664e bnes 50608 505ba: 200a movel %a2,%d0 505bc: 0680 0000 0078 addil #120,%d0 { if (op_type == FAT_OP_TYPE_READ) 505c2: 7201 moveq #1,%d1 505c4: b284 cmpl %d4,%d1 505c6: 6614 bnes 505dc sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 505c8: 2f00 movel %d0,%sp@- 505ca: 2f02 movel %d2,%sp@- 505cc: 2f2a 004e movel %a2@(78),%sp@- 505d0: 2f2a 004a movel %a2@(74),%sp@- 505d4: 4eb9 0004 efec jsr 4efec 505da: 6012 bras 505ee else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 505dc: 2f00 movel %d0,%sp@- 505de: 2f02 movel %d2,%sp@- 505e0: 2f2a 004e movel %a2@(78),%sp@- 505e4: 2f2a 004a movel %a2@(74),%sp@- 505e8: 4eb9 0004 ef28 jsr 4ef28 505ee: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 505f2: 4a80 tstl %d0 505f4: 6600 015c bnew 50752 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 505f8: 2542 0072 movel %d2,%a2@(114) fs_info->c.modified = 0; 505fc: 4200 clrb %d0 fs_info->c.state = FAT_CACHE_ACTUAL; 505fe: 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; 50600: 1540 0076 moveb %d0,%a2@(118) fs_info->c.state = FAT_CACHE_ACTUAL; 50604: 1541 0077 moveb %d1,%a2@(119) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 50608: 4281 clrl %d1 5060a: 322a 0014 movew %a2@(20),%d1 5060e: 202a 0072 movel %a2@(114),%d0 50612: b280 cmpl %d0,%d1 50614: 620c bhis 50622 <== NEVER TAKEN 50616: b0aa 001a cmpl %a2@(26),%d0 5061a: 55c3 scs %d3 5061c: 49c3 extbl %d3 5061e: 4483 negl %d3 50620: 6002 bras 50624 50622: 4283 clrl %d3 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 50624: b480 cmpl %d0,%d2 50626: 6700 0144 beqw 5076c { if (fs_info->c.modified) 5062a: 4a2a 0076 tstb %a2@(118) 5062e: 6700 00d0 beqw 50700 { if (sec_of_fat && !fs_info->vol.mirror) 50632: 4a03 tstb %d3 50634: 6722 beqs 50658 <== ALWAYS TAKEN 50636: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 5063a: 661c bnes 50658 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 5063c: 4280 clrl %d0 <== NOT EXECUTED 5063e: 206a 0078 moveal %a2@(120),%a0 <== NOT EXECUTED 50642: 3012 movew %a2@,%d0 <== NOT EXECUTED 50644: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50646: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 5064a: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 5064e: 4eb9 0005 950c jsr 5950c <== NOT EXECUTED 50654: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 50658: 2f2a 0078 movel %a2@(120),%sp@- 5065c: 47f9 0004 f2b0 lea 4f2b0 ,%a3 50662: 4e93 jsr %a3@ fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 50664: 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; 50666: 4201 clrb %d1 50668: 1541 0077 moveb %d1,%a2@(119) fs_info->c.modified = 0; 5066c: 1541 0076 moveb %d1,%a2@(118) if (sc != RTEMS_SUCCESSFUL) 50670: 4a80 tstl %d0 50672: 6600 00de bnew 50752 rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 50676: 4a03 tstb %d3 50678: 6700 009c beqw 50716 5067c: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 50680: 675c beqs 506de <== NOT EXECUTED 50682: 6000 0092 braw 50716 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 50686: 2f05 movel %d5,%sp@- <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, 50688: 41ea 0016 lea %a2@(22),%a0 <== NOT EXECUTED 5068c: 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, 50690: d0aa 0072 addl %a2@(114),%d0 <== NOT EXECUTED 50694: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50696: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 5069a: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 5069e: 4e95 jsr %a5@ <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 506a0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 506a4: 4a80 tstl %d0 <== NOT EXECUTED 506a6: 6622 bnes 506ca <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 506a8: 4280 clrl %d0 <== NOT EXECUTED 506aa: 3012 movew %a2@,%d0 <== NOT EXECUTED 506ac: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 506b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 506b2: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 506b6: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 506ba: 4e94 jsr %a4@ <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 506bc: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 506c0: 4e93 jsr %a3@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 506c2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 506c6: 4a80 tstl %d0 <== NOT EXECUTED 506c8: 6710 beqs 506da <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 506ca: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 506d0: 720c moveq #12,%d1 <== NOT EXECUTED 506d2: 2040 moveal %d0,%a0 <== NOT EXECUTED 506d4: 2081 movel %d1,%a0@ <== NOT EXECUTED 506d6: 6000 0086 braw 5075e <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 506da: 5283 addql #1,%d3 <== NOT EXECUTED 506dc: 6012 bras 506f0 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 506de: 2a0e movel %fp,%d5 <== NOT EXECUTED 506e0: 5985 subql #4,%d5 <== NOT EXECUTED 506e2: 4bf9 0004 ef28 lea 4ef28 ,%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); 506e8: 49f9 0005 950c lea 5950c ,%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) 506ee: 7601 moveq #1,%d3 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 506f0: 4281 clrl %d1 <== NOT EXECUTED 506f2: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED 506f6: 4280 clrl %d0 <== NOT EXECUTED 506f8: 1003 moveb %d3,%d0 <== NOT EXECUTED 506fa: b280 cmpl %d0,%d1 <== NOT EXECUTED 506fc: 6288 bhis 50686 <== NOT EXECUTED 506fe: 6016 bras 50716 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 50700: 2f2a 0078 movel %a2@(120),%sp@- 50704: 4eb9 0004 f206 jsr 4f206 fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 5070a: 588f addql #4,%sp } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 5070c: 4201 clrb %d1 5070e: 1541 0077 moveb %d1,%a2@(119) if (sc != RTEMS_SUCCESSFUL) 50712: 4a80 tstl %d0 50714: 663c bnes 50752 <== NEVER TAKEN 50716: 200a movel %a2,%d0 50718: 0680 0000 0078 addil #120,%d0 rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 5071e: 7201 moveq #1,%d1 50720: b284 cmpl %d4,%d1 50722: 6614 bnes 50738 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 50724: 2f00 movel %d0,%sp@- 50726: 2f02 movel %d2,%sp@- 50728: 2f2a 004e movel %a2@(78),%sp@- 5072c: 2f2a 004a movel %a2@(74),%sp@- 50730: 4eb9 0004 efec jsr 4efec 50736: 6012 bras 5074a else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 50738: 2f00 movel %d0,%sp@- 5073a: 2f02 movel %d2,%sp@- 5073c: 2f2a 004e movel %a2@(78),%sp@- 50740: 2f2a 004a movel %a2@(74),%sp@- 50744: 4eb9 0004 ef28 jsr 4ef28 5074a: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 5074e: 4a80 tstl %d0 50750: 6710 beqs 50762 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 50752: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50758: 2040 moveal %d0,%a0 <== NOT EXECUTED 5075a: 7005 moveq #5,%d0 <== NOT EXECUTED 5075c: 2080 movel %d0,%a0@ <== NOT EXECUTED 5075e: 70ff moveq #-1,%d0 <== NOT EXECUTED 50760: 6014 bras 50776 <== NOT EXECUTED fs_info->c.blk_num = blk; 50762: 2542 0072 movel %d2,%a2@(114) fs_info->c.state = FAT_CACHE_ACTUAL; 50766: 7001 moveq #1,%d0 50768: 1540 0077 moveb %d0,%a2@(119) } *buf = fs_info->c.buf; 5076c: 206e 0014 moveal %fp@(20),%a0 return RC_OK; 50770: 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; 50772: 20aa 0078 movel %a2@(120),%a0@ return RC_OK; } 50776: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 5077c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050780 : int fat_buf_release(fat_fs_info_t *fs_info) { 50780: 4e56 ffe4 linkw %fp,#-28 50784: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 50788: 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) 5078c: 4a2a 0077 tstb %a2@(119) 50790: 6700 0114 beqw 508a6 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 50794: 4281 clrl %d1 50796: 322a 0014 movew %a2@(20),%d1 5079a: 202a 0072 movel %a2@(114),%d0 5079e: b280 cmpl %d0,%d1 507a0: 620c bhis 507ae <== NEVER TAKEN *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 507a2: b0aa 001a cmpl %a2@(26),%d0 507a6: 55c2 scs %d2 507a8: 49c2 extbl %d2 507aa: 4482 negl %d2 507ac: 6002 bras 507b0 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) && 507ae: 4282 clrl %d2 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 507b0: 4a2a 0076 tstb %a2@(118) 507b4: 6700 00ca beqw 50880 { if (sec_of_fat && !fs_info->vol.mirror) 507b8: 4a02 tstb %d2 507ba: 6722 beqs 507de 507bc: 4a2a 0042 tstb %a2@(66) 507c0: 661c bnes 507de <== NEVER TAKEN memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 507c2: 4280 clrl %d0 507c4: 206a 0078 moveal %a2@(120),%a0 507c8: 3012 movew %a2@,%d0 507ca: 2f00 movel %d0,%sp@- 507cc: 2f28 001e movel %a0@(30),%sp@- 507d0: 2f2a 007c movel %a2@(124),%sp@- 507d4: 4eb9 0005 950c jsr 5950c 507da: 4fef 000c lea %sp@(12),%sp sc = rtems_bdbuf_release_modified(fs_info->c.buf); 507de: 2f2a 0078 movel %a2@(120),%sp@- 507e2: 47f9 0004 f2b0 lea 4f2b0 ,%a3 507e8: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 507ea: 588f addql #4,%sp 507ec: 4a80 tstl %d0 507ee: 6600 00a0 bnew 50890 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 507f2: 4200 clrb %d0 507f4: 1540 0076 moveb %d0,%a2@(118) if (sec_of_fat && !fs_info->vol.mirror) 507f8: 4a02 tstb %d2 507fa: 6700 00a4 beqw 508a0 507fe: 4a2a 0042 tstb %a2@(66) 50802: 675a beqs 5085e <== ALWAYS TAKEN 50804: 6000 009a braw 508a0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 50808: 2f03 movel %d3,%sp@- fs_info->c.blk_num + fs_info->vol.fat_length * i, 5080a: 41ea 0016 lea %a2@(22),%a0 5080e: 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, 50812: d0aa 0072 addl %a2@(114),%d0 50816: 2f00 movel %d0,%sp@- 50818: 2f2a 004e movel %a2@(78),%sp@- 5081c: 2f2a 004a movel %a2@(74),%sp@- 50820: 4e95 jsr %a5@ fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 50822: 4fef 0010 lea %sp@(16),%sp 50826: 4a80 tstl %d0 50828: 6622 bnes 5084c <== NEVER TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 5082a: 4280 clrl %d0 5082c: 3012 movew %a2@,%d0 5082e: 206e fffc moveal %fp@(-4),%a0 50832: 2f00 movel %d0,%sp@- 50834: 2f2a 007c movel %a2@(124),%sp@- 50838: 2f28 001e movel %a0@(30),%sp@- 5083c: 4e94 jsr %a4@ sc = rtems_bdbuf_release_modified(b); 5083e: 2f2e fffc movel %fp@(-4),%sp@- 50842: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 50844: 4fef 0010 lea %sp@(16),%sp 50848: 4a80 tstl %d0 5084a: 670e beqs 5085a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 5084c: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50852: 760c moveq #12,%d3 <== NOT EXECUTED 50854: 2040 moveal %d0,%a0 <== NOT EXECUTED 50856: 2083 movel %d3,%a0@ <== NOT EXECUTED 50858: 6042 bras 5089c <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 5085a: 5282 addql #1,%d2 5085c: 6012 bras 50870 { sc = rtems_bdbuf_get(fs_info->vol.dev, 5085e: 260e movel %fp,%d3 50860: 5983 subql #4,%d3 50862: 4bf9 0004 ef28 lea 4ef28 ,%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); 50868: 49f9 0005 950c lea 5950c ,%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) 5086e: 7401 moveq #1,%d2 { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 50870: 4281 clrl %d1 50872: 122a 0009 moveb %a2@(9),%d1 50876: 4280 clrl %d0 50878: 1002 moveb %d2,%d0 5087a: b280 cmpl %d0,%d1 5087c: 628a bhis 50808 5087e: 6020 bras 508a0 } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 50880: 2f2a 0078 movel %a2@(120),%sp@- 50884: 4eb9 0004 f206 jsr 4f206 if (sc != RTEMS_SUCCESSFUL) 5088a: 588f addql #4,%sp 5088c: 4a80 tstl %d0 5088e: 6710 beqs 508a0 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 50890: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50896: 7405 moveq #5,%d2 <== NOT EXECUTED 50898: 2040 moveal %d0,%a0 <== NOT EXECUTED 5089a: 2082 movel %d2,%a0@ <== NOT EXECUTED 5089c: 70ff moveq #-1,%d0 <== NOT EXECUTED 5089e: 6008 bras 508a8 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 508a0: 4200 clrb %d0 508a2: 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; 508a6: 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; } 508a8: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 508ae: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fa2c : 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( 4fa2c: 4e56 0000 linkw %fp,#0 4fa30: 206e 0008 moveal %fp@(8),%a0 4fa34: 202e 000c movel %fp@(12),%d0 4fa38: 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)) ) 4fa3a: 4a80 tstl %d0 4fa3c: 6612 bnes 4fa50 4fa3e: 4281 clrl %d1 4fa40: 1228 000a moveb %a0@(10),%d1 4fa44: 7403 moveq #3,%d2 4fa46: c282 andl %d2,%d1 4fa48: 6706 beqs 4fa50 <== NEVER TAKEN return fs_info->vol.rdir_loc; 4fa4a: 2028 001a movel %a0@(26),%d0 4fa4e: 600e bras 4fa5e return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 4fa50: 4281 clrl %d1 4fa52: 1228 0005 moveb %a0@(5),%d1 4fa56: 5580 subql #2,%d0 4fa58: e3a8 lsll %d1,%d0 4fa5a: d0a8 002c addl %a0@(44),%d0 fs_info->vol.data_fsec); } 4fa5e: 241f movel %sp@+,%d2 4fa60: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000509ec : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 509ec: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 509f0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 509f4: 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); 509f8: 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; 509fa: 246b 0034 moveal %a3@(52),%a2 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); 509fe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 50a02: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50a04: 4eba fb62 jsr %pc@(50568 )<== NOT EXECUTED return _fat_block_read(mt_entry, fsec, 0, 50a08: 588f addql #4,%sp <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 50a0a: 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, 50a0c: 2eae 0010 movel %fp@(16),%sp@ <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 50a10: 122a 0004 moveb %a2@(4),%d1 <== NOT EXECUTED 50a14: 142a 0002 moveb %a2@(2),%d2 <== NOT EXECUTED 50a18: 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, 50a1a: 2f01 movel %d1,%sp@- <== NOT EXECUTED 50a1c: 42a7 clrl %sp@- <== NOT EXECUTED 50a1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50a20: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50a22: 4eb9 0005 08b2 jsr 508b2 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 50a28: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 50a2e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050c16 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 50c16: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 50c1a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED 50c1e: 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); 50c22: 47fa f90c lea %pc@(50530 ),%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; 50c26: 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); 50c2a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 50c2e: 4e93 jsr %a3@ <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 50c30: 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); 50c34: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 50c38: 4e93 jsr %a3@ <== NOT EXECUTED 50c3a: 588f addql #4,%sp <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 50c3c: 47f9 0005 093a lea 5093a <_fat_block_write>,%a3 <== NOT EXECUTED 50c42: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 50c46: 4878 0004 pea 4 <== NOT EXECUTED 50c4a: 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); 50c4e: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 50c52: 4280 clrl %d0 <== NOT EXECUTED 50c54: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 50c58: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50c5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50c5c: 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, 50c5e: 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, 50c62: 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, 50c64: 4878 0004 pea 4 <== NOT EXECUTED 50c68: 4280 clrl %d0 <== NOT EXECUTED 50c6a: 4878 01ec pea 1ec <== NOT EXECUTED 50c6e: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 50c72: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50c74: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50c76: 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) ) 50c78: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 50c7c: 4a82 tstl %d2 <== NOT EXECUTED 50c7e: 6d08 blts 50c88 <== NOT EXECUTED return -1; 50c80: 4a80 tstl %d0 <== NOT EXECUTED 50c82: 5dc0 slt %d0 <== NOT EXECUTED 50c84: 49c0 extbl %d0 <== NOT EXECUTED 50c86: 6002 bras 50c8a <== NOT EXECUTED 50c88: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; } 50c8a: 4cee 1c04 ffe8 moveml %fp@(-24),%d2/%a2-%a4 <== NOT EXECUTED 50c90: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004feb6 : /* * 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) 4feb6: 7201 moveq #1,%d1 int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 4feb8: 4e56 fff4 linkw %fp,#-12 4febc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4fec0: 266e 0008 moveal %fp@(8),%a3 4fec4: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fec8: 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) 4fecc: 202a 0008 movel %a2@(8),%d0 4fed0: b280 cmpl %d0,%d1 4fed2: 640c bccs 4fee0 { fat_fd->links_num--; 4fed4: 5380 subql #1,%d0 4fed6: 2540 0008 movel %d0,%a2@(8) return rc; 4feda: 4280 clrl %d0 4fedc: 6000 0094 braw 4ff72 } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 4fee0: 4280 clrl %d0 4fee2: 102a 0030 moveb %a2@(48),%d0 4fee6: 0800 0000 btst #0,%d0 4feea: 674a beqs 4ff36 <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); 4feec: 42a7 clrl %sp@- <== NOT EXECUTED 4feee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fef0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fef2: 4eb9 0004 fdcc jsr 4fdcc <== NOT EXECUTED if ( rc != RC_OK ) 4fef8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fefc: 4a80 tstl %d0 <== NOT EXECUTED 4fefe: 6672 bnes 4ff72 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4ff00: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ff02: 4eb9 0004 9a3c jsr 49a3c <_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) ) 4ff08: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4ff0c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ff0e: 4eb9 0005 0bfa jsr 50bfa <== NOT EXECUTED 4ff14: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4ff18: 4a00 tstb %d0 <== NOT EXECUTED 4ff1a: 670e beqs 4ff2a <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 4ff1c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4ff20: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4ff22: 4eb9 0005 0bc8 jsr 50bc8 <== NOT EXECUTED 4ff28: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 4ff2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ff2c: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED 4ff32: 588f addql #4,%sp <== NOT EXECUTED 4ff34: 602a bras 4ff60 <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 4ff36: 2f2a 000c movel %a2@(12),%sp@- 4ff3a: 2f0b movel %a3,%sp@- 4ff3c: 4eb9 0005 0bfa jsr 50bfa 4ff42: 508f addql #8,%sp 4ff44: 4a00 tstb %d0 4ff46: 6706 beqs 4ff4e <== ALWAYS TAKEN { fat_fd->links_num = 0; 4ff48: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED 4ff4c: 6012 bras 4ff60 <== NOT EXECUTED 4ff4e: 2f0a movel %a2,%sp@- 4ff50: 4eb9 0004 9a3c jsr 49a3c <_Chain_Extract> } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 4ff56: 2f0a movel %a2,%sp@- 4ff58: 4eb9 0004 54d0 jsr 454d0 4ff5e: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4ff60: 2d42 0008 movel %d2,%fp@(8) return rc; } 4ff64: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ff6a: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 4ff6c: 4ef9 0005 0780 jmp 50780 return rc; } 4ff72: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ff78: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000503b8 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 503b8: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 503bc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 503c0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 503c4: 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; 503c8: 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; 503ce: 246c 0034 moveal %a4@(52),%a2 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 503d2: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 503d6: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 503da: 6700 00b8 beqw 50494 <== 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); 503de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 503e0: 4eb9 0005 0780 jsr 50780 <== NOT EXECUTED if (rc != RC_OK) 503e6: 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); 503e8: 2400 movel %d0,%d2 <== NOT EXECUTED if (rc != RC_OK) 503ea: 6774 beqs 50460 <== NOT EXECUTED 503ec: 6000 00ac braw 5049a <== 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); 503f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 503f2: 2f2c 0034 movel %a4@(52),%sp@- <== NOT EXECUTED 503f6: 2047 moveal %d7,%a0 <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 503f8: 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); 503fa: 4e90 jsr %a0@ <== NOT EXECUTED 503fc: 508f addql #8,%sp <== NOT EXECUTED 503fe: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 50402: 603e bras 50442 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 50404: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 50408: 2f06 movel %d6,%sp@- <== NOT EXECUTED 5040a: 4873 8800 pea %a3@(00000000,%a0:l) <== NOT EXECUTED 5040e: 2045 moveal %d5,%a0 <== NOT EXECUTED 50410: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 50414: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 50418: 4e90 jsr %a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 5041a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5041e: 4a80 tstl %d0 <== NOT EXECUTED 50420: 660e bnes 50430 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 50422: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 50426: 2044 moveal %d4,%a0 <== NOT EXECUTED 50428: 4e90 jsr %a0@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 5042a: 588f addql #4,%sp <== NOT EXECUTED 5042c: 4a80 tstl %d0 <== NOT EXECUTED 5042e: 6710 beqs 50440 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 50430: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50436: 7605 moveq #5,%d3 <== NOT EXECUTED 50438: 74ff moveq #-1,%d2 <== NOT EXECUTED 5043a: 2040 moveal %d0,%a0 <== NOT EXECUTED 5043c: 2083 movel %d3,%a0@ <== NOT EXECUTED 5043e: 605a bras 5049a <== 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++ ) 50440: 528b addql #1,%a3 <== NOT EXECUTED 50442: 4280 clrl %d0 <== NOT EXECUTED 50444: 102a 0004 moveb %a2@(4),%d0 <== NOT EXECUTED 50448: b08b cmpl %a3,%d0 <== NOT EXECUTED 5044a: 62b8 bhis 50404 <== 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); 5044c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5044e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 50452: 2f0c movel %a4,%sp@- <== NOT EXECUTED 50454: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 50456: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5045a: 4a80 tstl %d0 <== NOT EXECUTED 5045c: 6722 beqs 50480 <== NOT EXECUTED 5045e: 6038 bras 50498 <== 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); 50460: 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); 50462: 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); 50464: 2e3c 0004 fa2c movel #326188,%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); 5046a: 5986 subql #4,%d6 <== NOT EXECUTED 5046c: 2a3c 0004 efec movel #323564,%d5 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 50472: 283c 0004 f31e movel #324382,%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); 50478: 5183 subql #8,%d3 <== NOT EXECUTED 5047a: 4bf9 0005 708c lea 5708c ,%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) 50480: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 50484: 2200 movel %d0,%d1 <== NOT EXECUTED 50486: c2aa 000c andl %a2@(12),%d1 <== NOT EXECUTED 5048a: b2aa 0010 cmpl %a2@(16),%d1 <== NOT EXECUTED 5048e: 6500 ff60 bcsw 503f0 <== NOT EXECUTED 50492: 6006 bras 5049a <== 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; 50494: 4282 clrl %d2 <== NOT EXECUTED 50496: 6002 bras 5049a <== 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); 50498: 2400 movel %d0,%d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 5049a: 2002 movel %d2,%d0 <== NOT EXECUTED 5049c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 504a2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050014 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 50014: 4e56 ffcc linkw %fp,#-52 50018: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 5001c: 266e 0008 moveal %fp@(8),%a3 50020: 262e 0010 movel %fp@(16),%d3 50024: 2a6e 0014 moveal %fp@(20),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 50028: 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 ) { 5002c: 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; 50030: 2a83 movel %d3,%a5@ if (new_length <= fat_fd->fat_file_size) 50032: 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; 50036: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 5003a: 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) 5003e: b083 cmpl %d3,%d0 50040: 6400 0152 bccw 50194 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 50044: 7201 moveq #1,%d1 50046: b2aa 0020 cmpl %a2@(32),%d1 5004a: 6612 bnes 5005e <== ALWAYS TAKEN 5004c: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 50050: 660c bnes 5005e <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 50052: 4281 clrl %d1 <== NOT EXECUTED 50054: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED 50058: 7403 moveq #3,%d2 <== NOT EXECUTED 5005a: 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)) && 5005c: 665a bnes 500b8 <== 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))) & 5005e: 4284 clrl %d4 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 50060: 2a03 movel %d3,%d5 50062: 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))) & 50064: 382c 0006 movew %a4@(6),%d4 50068: 2204 movel %d4,%d1 5006a: 5381 subql #1,%d1 5006c: 2401 movel %d1,%d2 5006e: 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 - 50070: 9882 subl %d2,%d4 50072: 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) 50074: b885 cmpl %d5,%d4 50076: 6400 011c bccw 50194 bytes2add -= bytes_remain; 5007a: 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) 5007c: 6700 0116 beqw 50194 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 50080: 4280 clrl %d0 50082: 102c 0008 moveb %a4@(8),%d0 50086: 2c05 movel %d5,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 50088: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 5008c: 5386 subql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 5008e: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 50092: e0ae lsrl %d0,%d6 50094: 5286 addql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 50096: 2f06 movel %d6,%sp@- 50098: 486e fff0 pea %fp@(-16) 5009c: 2f0b movel %a3,%sp@- 5009e: 4eb9 0005 750c jsr 5750c &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 500a4: 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, 500a8: 2400 movel %d0,%d2 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 500aa: 6600 00ea bnew 50196 return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 500ae: 202e fffc movel %fp@(-4),%d0 500b2: 6616 bnes 500ca <== ALWAYS TAKEN 500b4: 4a84 tstl %d4 <== NOT EXECUTED 500b6: 6612 bnes 500ca <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 500b8: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 500be: 74ff moveq #-1,%d2 <== NOT EXECUTED 500c0: 721c moveq #28,%d1 <== NOT EXECUTED 500c2: 2040 moveal %d0,%a0 <== NOT EXECUTED 500c4: 2081 movel %d1,%a0@ <== NOT EXECUTED 500c6: 6000 00ce braw 50196 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 500ca: b086 cmpl %d6,%d0 500cc: 671e beqs 500ec <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 500ce: 4680 notl %d0 <== NOT EXECUTED 500d0: dc80 addl %d0,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 500d2: 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) - 500d4: 4280 clrl %d0 <== NOT EXECUTED 500d6: 102c 0008 moveb %a4@(8),%d0 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 500da: 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) - 500de: 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 - 500e0: 2003 movel %d3,%d0 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 500e2: 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 - 500e4: 9086 subl %d6,%d0 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); 500e6: 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) - 500e8: 9085 subl %d5,%d0 <== NOT EXECUTED 500ea: 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 ) 500ec: 206a 0018 moveal %a2@(24),%a0 500f0: 4a88 tstl %a0 500f2: 6612 bnes 50106 { fat_fd->map.disk_cln = fat_fd->cln = chain; 500f4: 202e fff0 movel %fp@(-16),%d0 fat_fd->map.file_cln = 0; 500f8: 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; 500fc: 2540 001c movel %d0,%a2@(28) 50100: 2540 0036 movel %d0,%a2@(54) 50104: 6050 bras 50156 fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 50106: 202a 003a movel %a2@(58),%d0 5010a: 72ff moveq #-1,%d1 5010c: b280 cmpl %d0,%d1 5010e: 6706 beqs 50116 <== NEVER TAKEN { old_last_cl = fat_fd->map.last_cln; 50110: 2d40 fff4 movel %d0,%fp@(-12) 50114: 601e bras 50134 } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 50116: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 5011a: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 5011e: 4878 0001 pea 1 <== NOT EXECUTED 50122: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50124: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50126: 4eb9 0004 ff7c jsr 4ff7c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 5012c: 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, 50130: 2800 movel %d0,%d4 <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 50132: 6648 bnes 5017c <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 50134: 2f2e fff0 movel %fp@(-16),%sp@- 50138: 2f2e fff4 movel %fp@(-12),%sp@- 5013c: 2f0b movel %a3,%sp@- 5013e: 4eb9 0005 7204 jsr 57204 if ( rc != RC_OK ) 50144: 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); 50148: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5014a: 6630 bnes 5017c <== NEVER TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 5014c: 2f0c movel %a4,%sp@- 5014e: 4eb9 0005 0780 jsr 50780 50154: 588f addql #4,%sp } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 50156: 4aae fffc tstl %fp@(-4) 5015a: 6732 beqs 5018e <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 5015c: 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; 5015e: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 50164: b0aa 0010 cmpl %a2@(16),%d0 50168: 6624 bnes 5018e { rc = fat_init_clusters_chain(mt_entry, chain); 5016a: 2f2e fff0 movel %fp@(-16),%sp@- 5016e: 2f0b movel %a3,%sp@- 50170: 4eb9 0005 0a78 jsr 50a78 if ( rc != RC_OK ) 50176: 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); 50178: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5017a: 6712 beqs 5018e <== ALWAYS TAKEN { fat_free_fat_clusters_chain(mt_entry, chain); 5017c: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED return rc; 50180: 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); 50182: 2f0b movel %a3,%sp@- <== NOT EXECUTED 50184: 4eb9 0005 7462 jsr 57462 <== NOT EXECUTED return rc; 5018a: 508f addql #8,%sp <== NOT EXECUTED 5018c: 6008 bras 50196 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 5018e: 2543 0018 movel %d3,%a2@(24) return RC_OK; 50192: 6002 bras 50196 * 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; 50194: 4282 clrl %d2 } fat_fd->fat_file_size = new_length; return RC_OK; } 50196: 2002 movel %d2,%d0 50198: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 5019e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ff7c : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4ff7c: 7001 moveq #1,%d0 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 4ff7e: 4e56 fff0 linkw %fp,#-16 4ff82: 226e 0008 moveal %fp@(8),%a1 4ff86: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ff8a: 206e 000c moveal %fp@(12),%a0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 4ff8e: 2669 0034 moveal %a1@(52),%a3 uint32_t cur_cln = 0; 4ff92: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 4ff96: b0ae 0010 cmpl %fp@(16),%d0 4ff9a: 6660 bnes 4fffc <== NEVER TAKEN { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 4ff9c: 222e 0014 movel %fp@(20),%d1 ret = va_arg(ap, uint32_t *); 4ffa0: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 4ffa4: b2a8 0018 cmpl %a0@(24),%d1 4ffa8: 650e bcss 4ffb8 <== ALWAYS TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 4ffaa: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 4ffb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ffb2: 7005 moveq #5,%d0 <== NOT EXECUTED 4ffb4: 2080 movel %d0,%a0@ <== NOT EXECUTED 4ffb6: 6050 bras 50008 <== NOT EXECUTED } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4ffb8: 7001 moveq #1,%d0 4ffba: b0a8 0020 cmpl %a0@(32),%d0 4ffbe: 6618 bnes 4ffd8 4ffc0: 4aa8 0024 tstl %a0@(36) 4ffc4: 6612 bnes 4ffd8 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 4ffc6: 4280 clrl %d0 4ffc8: 102b 000a moveb %a3@(10),%d0 4ffcc: 7403 moveq #3,%d2 4ffce: 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)) && 4ffd0: 6706 beqs 4ffd8 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 4ffd2: 4292 clrl %a2@ rc = RC_OK; 4ffd4: 4280 clrl %d0 break; 4ffd6: 6032 bras 5000a } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4ffd8: 486e fffc pea %fp@(-4) *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 4ffdc: 4280 clrl %d0 4ffde: 102b 0008 moveb %a3@(8),%d0 4ffe2: e0a9 lsrl %d0,%d1 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4ffe4: 2f01 movel %d1,%sp@- 4ffe6: 2f08 movel %a0,%sp@- 4ffe8: 2f09 movel %a1,%sp@- 4ffea: 4eba f9b8 jsr %pc@(4f9a4 ) if ( rc != RC_OK ) 4ffee: 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); 4fff2: 2001 movel %d1,%d0 if ( rc != RC_OK ) 4fff4: 6614 bnes 5000a <== NEVER TAKEN break; *ret = cur_cln; 4fff6: 24ae fffc movel %fp@(-4),%a2@ break; 4fffa: 600e bras 5000a default: errno = EINVAL; 4fffc: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50002: 7416 moveq #22,%d2 <== NOT EXECUTED 50004: 2040 moveal %d0,%a0 <== NOT EXECUTED 50006: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; 50008: 70ff moveq #-1,%d0 <== NOT EXECUTED break; } va_end(ap); return rc; } 5000a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 50010: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f9a4 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 4f9a4: 4e56 ffdc linkw %fp,#-36 4f9a8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4f9ac: 246e 000c moveal %fp@(12),%a2 4f9b0: 2c2e 0008 movel %fp@(8),%d6 4f9b4: 242e 0010 movel %fp@(16),%d2 4f9b8: 266e 0014 moveal %fp@(20),%a3 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 4f9bc: 202a 0032 movel %a2@(50),%d0 4f9c0: b082 cmpl %d2,%d0 4f9c2: 6606 bnes 4f9ca <== NEVER TAKEN *disk_cln = fat_fd->map.disk_cln; 4f9c4: 26aa 0036 movel %a2@(54),%a3@ 4f9c8: 6054 bras 4fa1e { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 4f9ca: b082 cmpl %d2,%d0 <== NOT EXECUTED 4f9cc: 640c bccs 4f9da <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; 4f9ce: 2802 movel %d2,%d4 <== NOT EXECUTED 4f9d0: 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; 4f9d2: 2d6a 0036 fffc movel %a2@(54),%fp@(-4) <== NOT EXECUTED 4f9d8: 6008 bras 4f9e2 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 4f9da: 2802 movel %d2,%d4 <== NOT EXECUTED 4f9dc: 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); 4f9e2: 2a0e movel %fp,%d5 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f9e4: 4283 clrl %d3 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4f9e6: 5985 subql #4,%d5 <== NOT EXECUTED 4f9e8: 49f9 0005 708c lea 5708c ,%a4 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4f9ee: 601c bras 4fa0c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4f9f0: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4f9f2: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4f9f6: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4f9f8: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 4f9fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4f9fe: 4a80 tstl %d0 <== NOT EXECUTED 4fa00: 6708 beqs 4fa0a <== NOT EXECUTED return rc; 4fa02: 2200 movel %d0,%d1 <== NOT EXECUTED 4fa04: 5bc0 smi %d0 <== NOT EXECUTED 4fa06: 49c0 extbl %d0 <== NOT EXECUTED 4fa08: 6018 bras 4fa22 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 4fa0a: 5283 addql #1,%d3 <== NOT EXECUTED 4fa0c: b883 cmpl %d3,%d4 <== NOT EXECUTED 4fa0e: 66e0 bnes 4f9f0 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 4fa10: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 4fa14: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 4fa18: 2540 0036 movel %d0,%a2@(54) <== NOT EXECUTED *disk_cln = cur_cln; 4fa1c: 2680 movel %d0,%a3@ <== NOT EXECUTED } return RC_OK; 4fa1e: 4280 clrl %d0 4fa20: 4281 clrl %d1 } 4fa22: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4fa28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005035a : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 5035a: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 5035e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 50362: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 50366: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 5036a: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED uint32_t key = 0; key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); 5036e: 486a 0020 pea %a2@(32) <== NOT EXECUTED 50372: 2f08 movel %a0,%sp@- <== NOT EXECUTED 50374: 4eba f6ee jsr %pc@(4fa64 ) <== NOT EXECUTED 50378: 508f addql #8,%sp <== NOT EXECUTED 5037a: 2400 movel %d0,%d2 <== NOT EXECUTED 5037c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5037e: 4eb9 0004 9a3c jsr 49a3c <_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); 50384: 7001 moveq #1,%d0 <== NOT EXECUTED 50386: 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 ); 50388: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5038a: 2200 movel %d0,%d1 <== NOT EXECUTED 5038c: e988 lsll #4,%d0 <== NOT EXECUTED 5038e: e589 lsll #2,%d1 <== NOT EXECUTED 50390: 9081 subl %d1,%d0 <== NOT EXECUTED 50392: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 50396: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50398: 4eb9 0004 9a04 jsr 49a04 <_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; 5039e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 503a2: 7201 moveq #1,%d1 <== NOT EXECUTED 503a4: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 503a8: 8081 orl %d1,%d0 <== NOT EXECUTED 503aa: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 503ae: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 503b4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fb18 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 4fb18: 4e56 ffe0 linkw %fp,#-32 4fb1c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4fb20: 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; 4fb24: 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); 4fb26: 283c 0004 fab6 movel #326326,%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; 4fb2c: 286b 0034 moveal %a3@(52),%a4 fat_file_fd_t *lfat_fd = NULL; 4fb30: 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 ) { 4fb32: 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); 4fb36: 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 ) { 4fb38: 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); 4fb3c: 2f0b movel %a3,%sp@- 4fb3e: 4eba ff24 jsr %pc@(4fa64 ) 4fb42: 508f addql #8,%sp /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 4fb44: 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); 4fb46: 2400 movel %d0,%d2 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); 4fb48: 2f0a movel %a2,%sp@- 4fb4a: 42a7 clrl %sp@- 4fb4c: 2f00 movel %d0,%sp@- 4fb4e: 2f2c 005a movel %a4@(90),%sp@- 4fb52: 2f0b movel %a3,%sp@- 4fb54: 4e90 jsr %a0@ if ( rc == RC_OK ) 4fb56: 4fef 0014 lea %sp@(20),%sp 4fb5a: 4a80 tstl %d0 4fb5c: 660e bnes 4fb6c { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 4fb5e: 206e fffc moveal %fp@(-4),%a0 4fb62: 2a88 movel %a0,%a5@ lfat_fd->links_num++; 4fb64: 52a8 0008 addql #1,%a0@(8) return rc; 4fb68: 6000 00d0 braw 4fc3a } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); 4fb6c: 2f0a movel %a2,%sp@- 4fb6e: 2044 moveal %d4,%a0 4fb70: 2f02 movel %d2,%sp@- 4fb72: 2f02 movel %d2,%sp@- 4fb74: 2f2c 005e movel %a4@(94),%sp@- 4fb78: 2f0b movel %a3,%sp@- 4fb7a: 4e90 jsr %a0@ lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 4fb7c: 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); 4fb80: 2800 movel %d0,%d4 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 4fb82: 4eb9 0004 5af0 jsr 45af0 if ( lfat_fd == NULL ) 4fb88: 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)); 4fb8c: 2440 moveal %d0,%a2 4fb8e: 2a80 movel %d0,%a5@ 4fb90: 2d40 fffc movel %d0,%fp@(-4) if ( lfat_fd == NULL ) 4fb94: 660e bnes 4fba4 rtems_set_errno_and_return_minus_one( ENOMEM ); 4fb96: 4eb9 0005 8b98 jsr 58b98 <__errno> 4fb9c: 720c moveq #12,%d1 4fb9e: 2040 moveal %d0,%a0 4fba0: 2081 movel %d1,%a0@ 4fba2: 6072 bras 4fc16 memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 4fba4: 4878 0042 pea 42 4fba8: 42a7 clrl %sp@- 4fbaa: 2f00 movel %d0,%sp@- 4fbac: 4eb9 0005 957c jsr 5957c lfat_fd->links_num = 1; 4fbb2: 7001 moveq #1,%d0 lfat_fd->flags &= ~FAT_FILE_REMOVED; 4fbb4: 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; 4fbb6: 2540 0008 movel %d0,%a2@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; 4fbba: 102a 0030 moveb %a2@(48),%d0 4fbbe: c081 andl %d1,%d0 4fbc0: 1540 0030 moveb %d0,%a2@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 4fbc4: 70ff moveq #-1,%d0 4fbc6: 2540 003a movel %d0,%a2@(58) lfat_fd->dir_pos = *dir_pos; 4fbca: 4878 0010 pea 10 4fbce: 2f03 movel %d3,%sp@- 4fbd0: 486a 0020 pea %a2@(32) 4fbd4: 4eb9 0005 950c jsr 5950c if ( rc != RC_OK ) 4fbda: 4fef 0018 lea %sp@(24),%sp 4fbde: 4a84 tstl %d4 4fbe0: 6706 beqs 4fbe8 <== NEVER TAKEN lfat_fd->ino = key; 4fbe2: 2542 000c movel %d2,%a2@(12) 4fbe6: 6032 bras 4fc1a else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 4fbe8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fbea: 4eb9 0005 0b30 jsr 50b30 <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4fbf0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 4fbf4: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 4fbf6: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 4fbfa: 4aa8 000c tstl %a0@(12) <== NOT EXECUTED 4fbfe: 661a bnes 4fc1a <== NOT EXECUTED { free((*fat_fd)); 4fc00: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4fc02: 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 ); 4fc08: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 4fc0e: 588f addql #4,%sp <== NOT EXECUTED 4fc10: 2040 moveal %d0,%a0 <== NOT EXECUTED 4fc12: 700c moveq #12,%d0 <== NOT EXECUTED 4fc14: 2080 movel %d0,%a0@ <== NOT EXECUTED 4fc16: 70ff moveq #-1,%d0 4fc18: 6020 bras 4fc3a */ 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); 4fc1a: 7001 moveq #1,%d0 4fc1c: c480 andl %d0,%d2 4fc1e: 2f2e fffc movel %fp@(-4),%sp@- 4fc22: 2002 movel %d2,%d0 4fc24: e98a lsll #4,%d2 4fc26: e588 lsll #2,%d0 4fc28: 9480 subl %d0,%d2 4fc2a: d4ac 005a addl %a4@(90),%d2 4fc2e: 2f02 movel %d2,%sp@- 4fc30: 4eb9 0004 9a04 jsr 49a04 <_Chain_Append> /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 4fc36: 508f addql #8,%sp 4fc38: 4280 clrl %d0 } 4fc3a: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4fc40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fc56 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 4fc56: 4e56 ffd4 linkw %fp,#-44 4fc5a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4fc5e: 286e 0008 moveal %fp@(8),%a4 4fc62: 266e 000c moveal %fp@(12),%a3 4fc66: 2e2e 0010 movel %fp@(16),%d7 4fc6a: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 4fc6e: 246c 0034 moveal %a4@(52),%a2 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 4fc72: 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) 4fc76: 4a82 tstl %d2 4fc78: 6700 013e beqw 4fdb8 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 4fc7c: 202b 0018 movel %a3@(24),%d0 4fc80: b087 cmpl %d7,%d0 4fc82: 6300 0134 blsw 4fdb8 return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4fc86: b082 cmpl %d2,%d0 4fc88: 6508 bcss 4fc92 <== NEVER TAKEN (start > fat_fd->fat_file_size - count)) 4fc8a: 2200 movel %d0,%d1 4fc8c: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 4fc8e: b287 cmpl %d7,%d1 4fc90: 6404 bccs 4fc96 <== ALWAYS TAKEN (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 4fc92: 2400 movel %d0,%d2 <== NOT EXECUTED 4fc94: 9487 subl %d7,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 4fc96: 7001 moveq #1,%d0 4fc98: b0ab 0020 cmpl %a3@(32),%d0 4fc9c: 6652 bnes 4fcf0 4fc9e: 4aab 0024 tstl %a3@(36) 4fca2: 664c bnes 4fcf0 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 4fca4: 4280 clrl %d0 4fca6: 102a 000a moveb %a2@(10),%d0 4fcaa: 7203 moveq #3,%d1 4fcac: 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)) && 4fcae: 6740 beqs 4fcf0 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 4fcb0: 2f2b 001c movel %a3@(28),%sp@- 4fcb4: 2f0a movel %a2,%sp@- 4fcb6: 4eba fd74 jsr %pc@(4fa2c ) sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fcba: 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); 4fcbc: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fcbe: 2040 moveal %d0,%a0 4fcc0: 2eae 0018 movel %fp@(24),%sp@ 4fcc4: 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); 4fcc6: 3212 movew %a2@,%d1 4fcc8: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fcca: c287 andl %d7,%d1 4fccc: 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); 4fcce: 4281 clrl %d1 4fcd0: 122a 0002 moveb %a2@(2),%d1 4fcd4: e2af lsrl %d1,%d7 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 4fcd6: 4870 7800 pea %a0@(00000000,%d7:l) 4fcda: 2f0c movel %a4,%sp@- 4fcdc: 4eb9 0005 08b2 jsr 508b2 <_fat_block_read> if ( ret < 0 ) 4fce2: 4fef 0014 lea %sp@(20),%sp 4fce6: 4a80 tstl %d0 4fce8: 6c00 00d8 bgew 4fdc2 4fcec: 6000 00d2 braw 4fdc0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4fcf0: 4280 clrl %d0 4fcf2: 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); 4fcf6: 280e movel %fp,%d4 4fcf8: 5984 subql #4,%d4 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 4fcfa: 2607 movel %d7,%d3 4fcfc: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4fcfe: 3a2a 0006 movew %a2@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fd02: 2f04 movel %d4,%sp@- 4fd04: 2f03 movel %d3,%sp@- 4fd06: 2f0b movel %a3,%sp@- 4fd08: 2f0c movel %a4,%sp@- 4fd0a: 4eba fc98 jsr %pc@(4f9a4 ) if (rc != RC_OK) 4fd0e: 4fef 0010 lea %sp@(16),%sp 4fd12: 4a81 tstl %d1 4fd14: 6600 00a6 bnew 4fdbc return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 4fd18: 4286 clrl %d6 4fd1a: 9bcd subal %a5,%a5 4fd1c: 0285 0000 ffff andil #65535,%d5 4fd22: 5385 subql #1,%d5 4fd24: ce85 andl %d5,%d7 4fd26: 2a07 movel %d7,%d5 4fd28: 606e bras 4fd98 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 4fd2a: 4284 clrl %d4 4fd2c: 382a 0006 movew %a2@(6),%d4 4fd30: 9885 subl %d5,%d4 4fd32: b484 cmpl %d4,%d2 4fd34: 6402 bccs 4fd38 4fd36: 2802 movel %d2,%d4 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 4fd38: 2f2e fffc movel %fp@(-4),%sp@- 4fd3c: 2f2c 0034 movel %a4@(52),%sp@- 4fd40: 4eba fcea jsr %pc@(4fa2c ) 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); 4fd44: 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); 4fd48: 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); 4fd4a: 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); 4fd4e: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fd50: 2040 moveal %d0,%a0 4fd52: 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); 4fd54: 3212 movew %a2@,%d1 4fd56: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fd58: c285 andl %d5,%d1 4fd5a: 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); 4fd5c: 4281 clrl %d1 4fd5e: 122a 0002 moveb %a2@(2),%d1 4fd62: e2ad lsrl %d1,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 4fd64: 4870 5800 pea %a0@(00000000,%d5:l) 4fd68: 2f0c movel %a4,%sp@- 4fd6a: 4eb9 0005 08b2 jsr 508b2 <_fat_block_read> if ( ret < 0 ) 4fd70: 4fef 0014 lea %sp@(20),%sp 4fd74: 4a80 tstl %d0 4fd76: 6d48 blts 4fdc0 <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4fd78: 486e fffc pea %fp@(-4) ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 4fd7c: 9484 subl %d4,%d2 cmpltd += c; 4fd7e: dbc4 addal %d4,%a5 save_cln = cur_cln; 4fd80: 2c2e fffc movel %fp@(-4),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 4fd84: 2f06 movel %d6,%sp@- 4fd86: 2f0c movel %a4,%sp@- 4fd88: 4eb9 0005 708c jsr 5708c if ( rc != RC_OK ) 4fd8e: 4fef 000c lea %sp@(12),%sp 4fd92: 4a80 tstl %d0 4fd94: 662c bnes 4fdc2 <== NEVER TAKEN return rc; ofs = 0; 4fd96: 4285 clrl %d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 4fd98: 4a82 tstl %d2 4fd9a: 668e bnes 4fd2a } /* 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); 4fd9c: 4281 clrl %d1 4fd9e: 122a 0008 moveb %a2@(8),%d1 4fda2: 41f5 78ff lea %a5@(ffffffff,%d7:l),%a0 fat_fd->map.disk_cln = save_cln; 4fda6: 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); 4fdaa: 2008 movel %a0,%d0 4fdac: e2a8 lsrl %d1,%d0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 4fdae: d083 addl %d3,%d0 4fdb0: 2740 0032 movel %d0,%a3@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 4fdb4: 200d movel %a5,%d0 4fdb6: 600a bras 4fdc2 /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; 4fdb8: 4280 clrl %d0 <== NOT EXECUTED 4fdba: 6006 bras 4fdc2 <== 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) 4fdbc: 2001 movel %d1,%d0 <== NOT EXECUTED 4fdbe: 6002 bras 4fdc2 <== 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; 4fdc0: 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; } 4fdc2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4fdc8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000504a6 : 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)) && 504a6: 7001 moveq #1,%d0 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 504a8: 4e56 ffe4 linkw %fp,#-28 504ac: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 504b0: 286e 0008 moveal %fp@(8),%a4 504b4: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 504b8: 266c 0034 moveal %a4@(52),%a3 uint32_t cur_cln = fat_fd->cln; 504bc: 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)) && 504c2: b0aa 0020 cmpl %a2@(32),%d0 504c6: 661a bnes 504e2 <== ALWAYS TAKEN 504c8: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 504cc: 6614 bnes 504e2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 504ce: 4280 clrl %d0 <== NOT EXECUTED 504d0: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 504d4: 7203 moveq #3,%d1 <== NOT EXECUTED 504d6: 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)) && 504d8: 6708 beqs 504e2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 504da: 256b 0024 0018 movel %a3@(36),%a2@(24) <== NOT EXECUTED 504e0: 6042 bras 50524 <== 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); 504e2: 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; 504e4: 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); 504e6: 5983 subql #4,%d3 504e8: 4bf9 0005 708c lea 5708c ,%a5 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 504ee: 42aa 0018 clrl %a2@(24) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 504f2: 601c bras 50510 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 504f4: 2f03 movel %d3,%sp@- 504f6: 2f02 movel %d2,%sp@- 504f8: 2f0c movel %a4,%sp@- 504fa: 4e95 jsr %a5@ if ( rc != RC_OK ) 504fc: 4fef 000c lea %sp@(12),%sp 50500: 4a80 tstl %d0 50502: 6622 bnes 50526 <== NEVER TAKEN return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 50504: 4280 clrl %d0 50506: 302b 0006 movew %a3@(6),%d0 5050a: 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; 5050e: 2002 movel %d2,%d0 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 50510: 242e fffc movel %fp@(-4),%d2 50514: 2202 movel %d2,%d1 50516: c2ab 000c andl %a3@(12),%d1 5051a: b2ab 0010 cmpl %a3@(16),%d1 5051e: 65d4 bcss 504f4 if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 50520: 2540 003a movel %d0,%a2@(58) return rc; 50524: 4280 clrl %d0 } 50526: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 5052c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004fdcc : { 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; 4fdcc: 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 ) { 4fdce: 4e56 ffe8 linkw %fp,#-24 4fdd2: 206e 0010 moveal %fp@(16),%a0 4fdd6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4fdda: 266e 0008 moveal %fp@(8),%a3 4fdde: 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; 4fde2: 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; 4fde6: 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 ) 4fdea: 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; 4fdee: 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 ) 4fdf2: b088 cmpl %a0,%d0 4fdf4: 6300 00b4 blsw 4feaa return rc; assert(fat_fd->fat_file_size); 4fdf8: 4a80 tstl %d0 4fdfa: 661c bnes 4fe18 <== ALWAYS TAKEN 4fdfc: 4879 0006 8a62 pea 68a62 <== NOT EXECUTED 4fe02: 4879 0006 8ac0 pea 68ac0 <__FUNCTION__.6164> <== NOT EXECUTED 4fe08: 4878 026d pea 26d <== NOT EXECUTED 4fe0c: 4879 0006 8a78 pea 68a78 <== NOT EXECUTED 4fe12: 4eb9 0005 2244 jsr 52244 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 4fe18: 4282 clrl %d2 4fe1a: 4281 clrl %d1 4fe1c: 1229 0008 moveb %a1@(8),%d1 4fe20: 3429 0006 movew %a1@(6),%d2 4fe24: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 4fe28: 2408 movel %a0,%d2 4fe2a: e2aa lsrl %d1,%d2 if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 4fe2c: 2602 movel %d2,%d3 4fe2e: e3ab lsll %d1,%d3 4fe30: b083 cmpl %d3,%d0 4fe32: 6376 blss 4feaa <== NEVER TAKEN return RC_OK; if (cl_start != 0) 4fe34: 4a82 tstl %d2 4fe36: 671a beqs 4fe52 <== ALWAYS TAKEN { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 4fe38: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4fe3c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4fe3e: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 4fe42: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fe44: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fe46: 4eba fb5c jsr %pc@(4f9a4 ) <== NOT EXECUTED if (rc != RC_OK) 4fe4a: 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); 4fe4e: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 4fe50: 665a bnes 4feac <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fe52: 486e fff8 pea %fp@(-8) 4fe56: 2f02 movel %d2,%sp@- 4fe58: 2f0a movel %a2,%sp@- 4fe5a: 2f0b movel %a3,%sp@- 4fe5c: 4eba fb46 jsr %pc@(4f9a4 ) if (rc != RC_OK) 4fe60: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 4fe64: 2001 movel %d1,%d0 if (rc != RC_OK) 4fe66: 6644 bnes 4feac <== NEVER TAKEN return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 4fe68: 2f2e fff8 movel %fp@(-8),%sp@- 4fe6c: 2f0b movel %a3,%sp@- 4fe6e: 4eb9 0005 7462 jsr 57462 if (rc != RC_OK) 4fe74: 508f addql #8,%sp 4fe76: 4a80 tstl %d0 4fe78: 6632 bnes 4feac <== NEVER TAKEN return rc; if (cl_start != 0) 4fe7a: 4a82 tstl %d2 4fe7c: 672e beqs 4feac <== ALWAYS TAKEN { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 4fe7e: 4878 ffff pea ffffffff <== NOT EXECUTED 4fe82: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4fe86: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4fe88: 4eb9 0005 7204 jsr 57204 <== NOT EXECUTED if ( rc != RC_OK ) 4fe8e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4fe92: 4a80 tstl %d0 <== NOT EXECUTED 4fe94: 6616 bnes 4feac <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 4fe96: 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; 4fe9a: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 4fe9c: 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; 4fea0: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 4fea4: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED 4fea8: 6002 bras 4feac <== 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; 4feaa: 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; } 4feac: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4feb2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000501a2 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 501a2: 4e56 ffd0 linkw %fp,#-48 501a6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 501aa: 286e 0008 moveal %fp@(8),%a4 501ae: 246e 000c moveal %fp@(12),%a2 501b2: 2e2e 0010 movel %fp@(16),%d7 501b6: 242e 0014 movel %fp@(20),%d2 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 501ba: 266c 0034 moveal %a4@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 501be: 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; 501c2: 42ae fffc clrl %fp@(-4) if ( count == 0 ) 501c6: 4a82 tstl %d2 501c8: 6700 0180 beqw 5034a return cmpltd; if ( start > fat_fd->fat_file_size ) 501cc: beaa 0018 cmpl %a2@(24),%d7 501d0: 620e bhis 501e0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 501d2: 202a 0014 movel %a2@(20),%d0 501d6: b082 cmpl %d2,%d0 501d8: 6506 bcss 501e0 <== NEVER TAKEN (start > fat_fd->size_limit - count)) 501da: 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) || 501dc: b087 cmpl %d7,%d0 501de: 6410 bccs 501f0 <== ALWAYS TAKEN (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 501e0: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 501e6: 7405 moveq #5,%d2 <== NOT EXECUTED 501e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 501ea: 2082 movel %d2,%a0@ <== NOT EXECUTED 501ec: 6000 0160 braw 5034e <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 501f0: 486e fffc pea %fp@(-4) 501f4: 2602 movel %d2,%d3 501f6: d687 addl %d7,%d3 501f8: 2f03 movel %d3,%sp@- 501fa: 2f0a movel %a2,%sp@- 501fc: 2f0c movel %a4,%sp@- 501fe: 4eb9 0005 0014 jsr 50014 if (rc != RC_OK) 50204: 4fef 0010 lea %sp@(16),%sp 50208: 4a80 tstl %d0 5020a: 6600 0144 bnew 50350 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 5020e: 202e fffc movel %fp@(-4),%d0 50212: b680 cmpl %d0,%d3 50214: 6704 beqs 5021a <== ALWAYS TAKEN count = c - start; 50216: 2400 movel %d0,%d2 <== NOT EXECUTED 50218: 9487 subl %d7,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5021a: 7001 moveq #1,%d0 5021c: b0aa 0020 cmpl %a2@(32),%d0 50220: 6654 bnes 50276 50222: 4aaa 0024 tstl %a2@(36) 50226: 664e bnes 50276 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 50228: 4280 clrl %d0 5022a: 102b 000a moveb %a3@(10),%d0 5022e: 7203 moveq #3,%d1 50230: c081 andl %d1,%d0 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 50232: 6742 beqs 50276 <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 50234: 2f2a 001c movel %a2@(28),%sp@- 50238: 2f2c 0034 movel %a4@(52),%sp@- 5023c: 4eba f7ee jsr %pc@(4fa2c ) sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50240: 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); 50242: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50244: 2040 moveal %d0,%a0 50246: 2eae 0018 movel %fp@(24),%sp@ 5024a: 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); 5024c: 3213 movew %a3@,%d1 5024e: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 50250: c287 andl %d7,%d1 50252: 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); 50254: 4281 clrl %d1 50256: 122b 0002 moveb %a3@(2),%d1 5025a: e2af lsrl %d1,%d7 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 5025c: 4870 7800 pea %a0@(00000000,%d7:l) 50260: 2f0c movel %a4,%sp@- 50262: 4eb9 0005 093a jsr 5093a <_fat_block_write> if ( ret < 0 ) 50268: 4fef 0014 lea %sp@(20),%sp 5026c: 4a80 tstl %d0 5026e: 6c00 00e0 bgew 50350 50272: 6000 00da braw 5034e <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 50276: 4280 clrl %d0 50278: 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); 5027c: 280e movel %fp,%d4 5027e: 5184 subql #8,%d4 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 50280: 2607 movel %d7,%d3 50282: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 50284: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 50288: 2f04 movel %d4,%sp@- 5028a: 2f03 movel %d3,%sp@- 5028c: 2f0a movel %a2,%sp@- 5028e: 2f0c movel %a4,%sp@- 50290: 4eba f712 jsr %pc@(4f9a4 ) if (rc != RC_OK) 50294: 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); 50298: 2001 movel %d1,%d0 if (rc != RC_OK) 5029a: 6600 00b4 bnew 50350 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 5029e: 4286 clrl %d6 502a0: 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); 502a2: 283c 0005 708c movel #356492,%d4 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 502a8: 0285 0000 ffff andil #65535,%d5 502ae: 5385 subql #1,%d5 502b0: ce85 andl %d5,%d7 502b2: 2a07 movel %d7,%d5 502b4: 6074 bras 5032a if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 502b6: 4286 clrl %d6 502b8: 3c2b 0006 movew %a3@(6),%d6 502bc: 9c85 subl %d5,%d6 502be: b486 cmpl %d6,%d2 502c0: 6402 bccs 502c4 502c2: 2c02 movel %d2,%d6 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 502c4: 2f2e fff8 movel %fp@(-8),%sp@- 502c8: 2f2c 0034 movel %a4@(52),%sp@- if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 502cc: 2d46 fffc movel %d6,%fp@(-4) sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 502d0: 4eba f75a jsr %pc@(4fa2c ) 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); 502d4: 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); 502d8: 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); 502da: 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); 502de: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 502e0: 2040 moveal %d0,%a0 502e2: 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); 502e4: 3213 movew %a3@,%d1 502e6: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 502e8: c285 andl %d5,%d1 502ea: 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); 502ec: 4281 clrl %d1 502ee: 122b 0002 moveb %a3@(2),%d1 502f2: e2ad lsrl %d1,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 502f4: 4870 5800 pea %a0@(00000000,%d5:l) 502f8: 2f0c movel %a4,%sp@- 502fa: 4eb9 0005 093a jsr 5093a <_fat_block_write> if ( ret < 0 ) 50300: 4fef 0014 lea %sp@(20),%sp 50304: 4a80 tstl %d0 50306: 6d46 blts 5034e <== NEVER TAKEN return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50308: 486e fff8 pea %fp@(-8) 5030c: 2044 moveal %d4,%a0 if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 5030e: 2c2e fff8 movel %fp@(-8),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50312: 2f06 movel %d6,%sp@- ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 50314: 202e fffc movel %fp@(-4),%d0 50318: 9480 subl %d0,%d2 cmpltd += c; 5031a: dbc0 addal %d0,%a5 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5031c: 2f0c movel %a4,%sp@- 5031e: 4e90 jsr %a0@ if ( rc != RC_OK ) 50320: 4fef 000c lea %sp@(12),%sp 50324: 4a80 tstl %d0 50326: 6628 bnes 50350 <== NEVER TAKEN return rc; ofs = 0; 50328: 4285 clrl %d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5032a: 4a82 tstl %d2 5032c: 6688 bnes 502b6 } /* 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); 5032e: 4281 clrl %d1 50330: 122b 0008 moveb %a3@(8),%d1 50334: 41f5 78ff lea %a5@(ffffffff,%d7:l),%a0 fat_fd->map.disk_cln = save_cln; 50338: 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); 5033c: 2008 movel %a0,%d0 5033e: e2a8 lsrl %d1,%d0 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 50340: d083 addl %d3,%d0 50342: 2540 0032 movel %d0,%a2@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 50346: 200d movel %a5,%d0 50348: 6006 bras 50350 uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; 5034a: 4280 clrl %d0 <== NOT EXECUTED 5034c: 6002 bras 50350 <== 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; 5034e: 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; } 50350: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 50356: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057462 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 57462: 4e56 ffd4 linkw %fp,#-44 57466: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5746a: 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; 5746e: 264e moveal %fp,%a3 uint32_t freed_cls_cnt = 0; 57470: 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; 57472: 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); 57474: 2e3c 0005 708c movel #356492,%d7 fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5747a: 4bf9 0005 7204 lea 57204 ,%a5 int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 57480: 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; 57484: 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; 57486: 246c 0034 moveal %a4@(52),%a2 uint32_t cur_cln = chain; uint32_t next_cln = 0; 5748a: 42a3 clrl %a3@- uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5748c: 6046 bras 574d4 { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 5748e: 2f0b movel %a3,%sp@- 57490: 2047 moveal %d7,%a0 57492: 2f03 movel %d3,%sp@- 57494: 2f0c movel %a4,%sp@- 57496: 4e90 jsr %a0@ if ( rc != RC_OK ) 57498: 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); 5749c: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5749e: 671c beqs 574bc <== ALWAYS TAKEN { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 574a0: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 574a4: 72ff moveq #-1,%d1 <== NOT EXECUTED 574a6: b280 cmpl %d0,%d1 <== NOT EXECUTED 574a8: 6706 beqs 574b0 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 574aa: d480 addl %d0,%d2 <== NOT EXECUTED 574ac: 2542 003a movel %d2,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 574b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 574b2: 4eb9 0005 0780 jsr 50780 <== NOT EXECUTED return rc; 574b8: 588f addql #4,%sp <== NOT EXECUTED 574ba: 6044 bras 57500 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 574bc: 42a7 clrl %sp@- 574be: 2f03 movel %d3,%sp@- 574c0: 2f0c movel %a4,%sp@- 574c2: 4e95 jsr %a5@ if ( rc != RC_OK ) 574c4: 4fef 000c lea %sp@(12),%sp 574c8: 4a80 tstl %d0 574ca: 6702 beqs 574ce <== ALWAYS TAKEN 574cc: 2a00 movel %d0,%d5 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 574ce: 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++; 574d2: 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) 574d4: 2003 movel %d3,%d0 574d6: c0aa 000c andl %a2@(12),%d0 574da: b0aa 0010 cmpl %a2@(16),%d0 574de: 65ae bcss 5748e freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 574e0: 202a 003a movel %a2@(58),%d0 574e4: 72ff moveq #-1,%d1 freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 574e6: 2546 003e movel %d6,%a2@(62) if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 574ea: b280 cmpl %d0,%d1 574ec: 6706 beqs 574f4 <== ALWAYS TAKEN fs_info->vol.free_cls += freed_cls_cnt; 574ee: d480 addl %d0,%d2 <== NOT EXECUTED 574f0: 2542 003a movel %d2,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 574f4: 2f0a movel %a2,%sp@- 574f6: 2805 movel %d5,%d4 574f8: 4eb9 0005 0780 jsr 50780 574fe: 588f addql #4,%sp if (rc1 != RC_OK) return rc1; return RC_OK; } 57500: 2004 movel %d4,%d0 57502: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 57508: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050bc8 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 50bc8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 50bcc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 50bd0: 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; 50bd4: 2268 0034 moveal %a0@(52),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 50bd8: 90a9 006e subl %a1@(110),%d0 <== NOT EXECUTED 50bdc: 2200 movel %d0,%d1 <== NOT EXECUTED 50bde: e689 lsrl #3,%d1 <== NOT EXECUTED 50be0: 2069 0062 moveal %a1@(98),%a0 <== NOT EXECUTED 50be4: d1c1 addal %d1,%a0 <== NOT EXECUTED 50be6: 7207 moveq #7,%d1 <== NOT EXECUTED 50be8: c280 andl %d0,%d1 <== NOT EXECUTED 50bea: 7001 moveq #1,%d0 <== NOT EXECUTED 50bec: e3a8 lsll %d1,%d0 <== NOT EXECUTED 50bee: 1210 moveb %a0@,%d1 <== NOT EXECUTED 50bf0: 4680 notl %d0 <== NOT EXECUTED 50bf2: c081 andl %d1,%d0 <== NOT EXECUTED 50bf4: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 50bf6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005708c : 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)) ) 5708c: 7001 moveq #1,%d0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 5708e: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 57092: 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 ) { 57096: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 5709a: 242e 000c movel %fp@(12),%d2 5709e: 246e 0010 moveal %fp@(16),%a2 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 570a2: 2668 0034 moveal %a0@(52),%a3 rtems_bdbuf_buffer *block0 = NULL; 570a6: 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)) ) 570aa: b082 cmpl %d2,%d0 570ac: 6400 0138 bccw 571e6 570b0: 202b 0030 movel %a3@(48),%d0 570b4: 5280 addql #1,%d0 570b6: b082 cmpl %d2,%d0 570b8: 6500 012c bcsw 571e6 rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 570bc: 4280 clrl %d0 570be: 102b 000a moveb %a3@(10),%d0 570c2: 7201 moveq #1,%d1 570c4: 2802 movel %d2,%d4 570c6: c280 andl %d0,%d1 570c8: 6706 beqs 570d0 <== NEVER TAKEN 570ca: e28c lsrl #1,%d4 570cc: d882 addl %d2,%d4 570ce: 600c bras 570dc 570d0: 0800 0001 btst #1,%d0 <== NOT EXECUTED 570d4: 6704 beqs 570da <== NOT EXECUTED 570d6: d884 addl %d4,%d4 <== NOT EXECUTED 570d8: 6002 bras 570dc <== NOT EXECUTED 570da: e58c lsll #2,%d4 <== NOT EXECUTED 570dc: 4283 clrl %d3 570de: 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); 570e2: 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) + 570e4: e6ac lsrl %d3,%d4 570e6: 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); 570ea: 4a81 tstl %d1 570ec: 6706 beqs 570f4 <== NEVER TAKEN 570ee: e28d lsrl #1,%d5 570f0: da82 addl %d2,%d5 570f2: 600c bras 57100 570f4: 0800 0001 btst #1,%d0 <== NOT EXECUTED 570f8: 6704 beqs 570fe <== NOT EXECUTED 570fa: da85 addl %d5,%d5 <== NOT EXECUTED 570fc: 6002 bras 57100 <== NOT EXECUTED 570fe: e58d lsll #2,%d5 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 57100: 2c0e movel %fp,%d6 57102: 5986 subql #4,%d6 57104: 49f9 0005 05a0 lea 505a0 ,%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); 5710a: 3e13 movew %a3@,%d7 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5710c: 2f06 movel %d6,%sp@- 5710e: 4878 0001 pea 1 57112: 2f04 movel %d4,%sp@- 57114: 2f0b movel %a3,%sp@- 57116: 4e94 jsr %a4@ if (rc != RC_OK) 57118: 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); 5711c: 2600 movel %d0,%d3 if (rc != RC_OK) 5711e: 6600 00d8 bnew 571f8 return rc; switch ( fs_info->vol.type ) 57122: 4280 clrl %d0 57124: 102b 000a moveb %a3@(10),%d0 57128: 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); 5712a: 0287 0000 ffff andil #65535,%d7 57130: 5387 subql #1,%d7 57132: 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 ) 57134: b280 cmpl %d0,%d1 57136: 677a beqs 571b2 <== NEVER TAKEN 57138: 123c 0004 moveb #4,%d1 5713c: b280 cmpl %d0,%d1 5713e: 6700 0090 beqw 571d0 57142: 123c 0001 moveb #1,%d1 57146: b280 cmpl %d0,%d1 57148: 6600 009c bnew 571e6 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))); 5714c: 206e fffc moveal %fp@(-4),%a0 57150: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 57152: 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))); 57154: 2068 001e moveal %a0@(30),%a0 57158: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 5715c: 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))); 5715e: 2481 movel %d1,%a2@ if ( ofs == (fs_info->vol.bps - 1) ) 57160: 5380 subql #1,%d0 57162: b085 cmpl %d5,%d0 57164: 662a bnes 57190 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 57166: 2f06 movel %d6,%sp@- <== NOT EXECUTED 57168: 4878 0001 pea 1 <== NOT EXECUTED 5716c: 2044 moveal %d4,%a0 <== NOT EXECUTED 5716e: 4868 0001 pea %a0@(1) <== NOT EXECUTED 57172: 2f0b movel %a3,%sp@- <== NOT EXECUTED 57174: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 57176: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5717a: 4a80 tstl %d0 <== NOT EXECUTED 5717c: 6678 bnes 571f6 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 5717e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 57182: 4280 clrl %d0 <== NOT EXECUTED 57184: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 57188: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5718a: e188 lsll #8,%d0 <== NOT EXECUTED 5718c: 8192 orl %d0,%a2@ <== NOT EXECUTED 5718e: 600c bras 5719c <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 57190: 4280 clrl %d0 57192: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 57196: e188 lsll #8,%d0 57198: 8081 orl %d1,%d0 5719a: 2480 movel %d0,%a2@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 5719c: 0802 0000 btst #0,%d2 571a0: 6706 beqs 571a8 *ret_val = (*ret_val) >> FAT12_SHIFT; 571a2: 2012 movel %a2@,%d0 571a4: e888 lsrl #4,%d0 571a6: 603a bras 571e2 else *ret_val = (*ret_val) & FAT_FAT12_MASK; 571a8: 203c 0000 0fff movel #4095,%d0 571ae: c192 andl %d0,%a2@ 571b0: 6046 bras 571f8 break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 571b2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 571b6: 4281 clrl %d1 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 571b8: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 571bc: 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)); 571c0: 2001 movel %d1,%d0 <== NOT EXECUTED 571c2: e089 lsrl #8,%d1 <== NOT EXECUTED 571c4: e188 lsll #8,%d0 <== NOT EXECUTED 571c6: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 571cc: 8081 orl %d1,%d0 <== NOT EXECUTED 571ce: 6012 bras 571e2 <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 571d0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 571d4: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_L(*ret_val); 571d8: 2f30 5800 movel %a0@(00000000,%d5:l),%sp@- <== NOT EXECUTED 571dc: 4eba fe76 jsr %pc@(57054 ) <== NOT EXECUTED 571e0: 588f addql #4,%sp <== NOT EXECUTED 571e2: 2480 movel %d0,%a2@ break; 571e4: 6012 bras 571f8 default: rtems_set_errno_and_return_minus_one(EIO); 571e6: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 571ec: 76ff moveq #-1,%d3 <== NOT EXECUTED 571ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 571f0: 7005 moveq #5,%d0 <== NOT EXECUTED 571f2: 2080 movel %d0,%a0@ <== NOT EXECUTED 571f4: 6002 bras 571f8 <== 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) 571f6: 2600 movel %d0,%d3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 571f8: 2003 movel %d3,%d0 571fa: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 57200: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050b30 : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 50b30: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 50b34: 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) { 50b38: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 50b3c: 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); 50b40: 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) 50b46: 606c bras 50bb4 <== NOT EXECUTED { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 50b48: 222a 0066 movel %a2@(102),%d1 <== NOT EXECUTED 50b4c: 2401 movel %d1,%d2 <== NOT EXECUTED 50b4e: e68a lsrl #3,%d2 <== NOT EXECUTED 50b50: 7607 moveq #7,%d3 <== NOT EXECUTED 50b52: 206a 0062 moveal %a2@(98),%a0 <== NOT EXECUTED 50b56: d1c2 addal %d2,%a0 <== NOT EXECUTED 50b58: 1410 moveb %a0@,%d2 <== NOT EXECUTED 50b5a: c681 andl %d1,%d3 <== NOT EXECUTED 50b5c: 1802 moveb %d2,%d4 <== NOT EXECUTED 50b5e: 49c4 extbl %d4 <== NOT EXECUTED 50b60: 0704 btst %d3,%d4 <== NOT EXECUTED 50b62: 6612 bnes 50b76 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 50b64: 7001 moveq #1,%d0 <== NOT EXECUTED 50b66: e7a8 lsll %d3,%d0 <== NOT EXECUTED 50b68: 8082 orl %d2,%d0 <== NOT EXECUTED 50b6a: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 50b6c: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 50b70: d0aa 006e addl %a2@(110),%d0 <== NOT EXECUTED 50b74: 6048 bras 50bbe <== NOT EXECUTED } fs_info->index++; 50b76: 5281 addql #1,%d1 <== NOT EXECUTED 50b78: 2541 0066 movel %d1,%a2@(102) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 50b7c: b3c1 cmpal %d1,%a1 <== NOT EXECUTED 50b7e: 6204 bhis 50b84 <== NOT EXECUTED fs_info->index = 0; 50b80: 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++) 50b84: 5280 addql #1,%d0 <== NOT EXECUTED 50b86: b3c0 cmpal %d0,%a1 <== NOT EXECUTED 50b88: 66be bnes 50b48 <== 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)) 50b8a: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED 50b90: 92aa 006e subl %a2@(110),%d1 <== NOT EXECUTED 50b94: d080 addl %d0,%d0 <== NOT EXECUTED 50b96: b280 cmpl %d0,%d1 <== NOT EXECUTED 50b98: 6322 blss 50bbc <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 50b9a: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 50b9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50ba0: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 50ba4: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 50ba6: 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); 50ba8: 2540 0062 movel %d0,%a2@(98) <== NOT EXECUTED if (fs_info->uino != NULL) 50bac: 670e beqs 50bbc <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 50bae: 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++) 50bb4: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED 50bb8: 4280 clrl %d0 <== NOT EXECUTED 50bba: 60ca bras 50b86 <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 50bbc: 4280 clrl %d0 <== NOT EXECUTED } 50bbe: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED 50bc4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050a78 : 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)); 50a78: 4280 clrl %d0 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 50a7a: 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; 50a7e: 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 ) { 50a84: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 50a88: 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; 50a8c: 246b 0034 moveal %a3@(52),%a2 uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 50a90: 4878 0001 pea 1 50a94: 302a 0006 movew %a2@(6),%d0 50a98: 2f00 movel %d0,%sp@- 50a9a: 4eb9 0004 4e3c jsr 44e3c if ( buf == NULL ) 50aa0: 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)); 50aa2: 2400 movel %d0,%d2 if ( buf == NULL ) 50aa4: 6654 bnes 50afa <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EIO ); 50aa6: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50aac: 2040 moveal %d0,%a0 <== NOT EXECUTED 50aae: 7005 moveq #5,%d0 <== NOT EXECUTED 50ab0: 2080 movel %d0,%a0@ <== NOT EXECUTED 50ab2: 601c bras 50ad0 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 50ab4: 2f02 movel %d2,%sp@- 50ab6: 2f00 movel %d0,%sp@- 50ab8: 2f0b movel %a3,%sp@- 50aba: 4e95 jsr %a5@ if ( ret == -1 ) 50abc: 4fef 000c lea %sp@(12),%sp 50ac0: 72ff moveq #-1,%d1 50ac2: b280 cmpl %d0,%d1 50ac4: 660e bnes 50ad4 <== ALWAYS TAKEN { free(buf); 50ac6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50ac8: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED return -1; 50ace: 588f addql #4,%sp <== NOT EXECUTED 50ad0: 70ff moveq #-1,%d0 <== NOT EXECUTED 50ad2: 6052 bras 50b26 <== NOT EXECUTED } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50ad4: 2f03 movel %d3,%sp@- 50ad6: 2f2e fffc movel %fp@(-4),%sp@- 50ada: 2f0b movel %a3,%sp@- 50adc: 4e94 jsr %a4@ if ( rc != RC_OK ) 50ade: 4fef 000c lea %sp@(12),%sp 50ae2: 4a80 tstl %d0 50ae4: 6724 beqs 50b0a <== ALWAYS TAKEN { free(buf); 50ae6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 50ae8: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 50aec: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED return rc; 50af2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 50af6: 588f addql #4,%sp <== NOT EXECUTED 50af8: 602c bras 50b26 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50afa: 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); 50afc: 4bf9 0005 0a32 lea 50a32 ,%a5 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 50b02: 5983 subql #4,%d3 50b04: 49f9 0005 708c lea 5708c ,%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) 50b0a: 202e fffc movel %fp@(-4),%d0 50b0e: 2200 movel %d0,%d1 50b10: c2aa 000c andl %a2@(12),%d1 50b14: b2aa 0010 cmpl %a2@(16),%d1 50b18: 659a bcss 50ab4 free(buf); return rc; } } free(buf); 50b1a: 2f02 movel %d2,%sp@- 50b1c: 4eb9 0004 54d0 jsr 454d0 return rc; 50b22: 588f addql #4,%sp 50b24: 4280 clrl %d0 } 50b26: 4cee 3c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a5 50b2c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050d9c : * 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) { 50d9c: 4e56 ff64 linkw %fp,#-156 50da0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 50da4: 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; 50da8: 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); 50dac: 486e ffaa pea %fp@(-86) 50db0: 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; 50db4: 42ae fffc clrl %fp@(-4) rc = stat(mt_entry->dev, &stat_buf); 50db8: 4eb9 0004 6960 jsr 46960 if (rc == -1) 50dbe: 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); 50dc0: 2400 movel %d0,%d2 if (rc == -1) 50dc2: 70ff moveq #-1,%d0 50dc4: b082 cmpl %d2,%d0 50dc6: 6700 0756 beqw 5151e return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 50dca: 202e ffb6 movel %fp@(-74),%d0 50dce: 0280 0000 f000 andil #61440,%d0 50dd4: 0c80 0000 6000 cmpil #24576,%d0 50dda: 6710 beqs 50dec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOTTY); 50ddc: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50de2: 7619 moveq #25,%d3 <== NOT EXECUTED 50de4: 2040 moveal %d0,%a0 <== NOT EXECUTED 50de6: 2083 movel %d3,%a0@ <== NOT EXECUTED 50de8: 6000 072e braw 51518 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 50dec: 2f2e ffc4 movel %fp@(-60),%sp@- 50df0: 2f2e ffc0 movel %fp@(-64),%sp@- 50df4: 4eb9 0004 44ba jsr 444ba if (vol->dd == NULL) 50dfa: 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); 50dfc: 2540 0052 movel %d0,%a2@(82) if (vol->dd == NULL) 50e00: 6610 bnes 50e12 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 50e02: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50e08: 7405 moveq #5,%d2 <== NOT EXECUTED 50e0a: 2240 moveal %d0,%a1 <== NOT EXECUTED 50e0c: 2282 movel %d2,%a1@ <== NOT EXECUTED 50e0e: 6000 0708 braw 51518 <== NOT EXECUTED vol->dev = stat_buf.st_rdev; 50e12: 202e ffc0 movel %fp@(-64),%d0 50e16: 222e ffc4 movel %fp@(-60),%d1 50e1a: 2540 004a movel %d0,%a2@(74) 50e1e: 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); 50e22: 486e fffc pea %fp@(-4) 50e26: 42a7 clrl %sp@- 50e28: 2f01 movel %d1,%sp@- 50e2a: 2f00 movel %d0,%sp@- 50e2c: 4eb9 0004 efec jsr 4efec if (sc != RTEMS_SUCCESSFUL) 50e32: 4fef 0010 lea %sp@(16),%sp 50e36: 4a80 tstl %d0 50e38: 6600 00d4 bnew 50f0e { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 50e3c: 206e fffc moveal %fp@(-4),%a0 50e40: 2268 001e moveal %a0@(30),%a1 50e44: 1229 000b moveb %a1@(11),%d1 50e48: 1829 000e moveb %a1@(14),%d4 50e4c: 1029 000f moveb %a1@(15),%d0 50e50: 1d41 ff95 moveb %d1,%fp@(-107) 50e54: 1229 0011 moveb %a1@(17),%d1 50e58: 3844 moveaw %d4,%a4 50e5a: 1d41 ff9c moveb %d1,%fp@(-100) 50e5e: 1229 0012 moveb %a1@(18),%d1 50e62: 1c29 000c moveb %a1@(12),%d6 50e66: 1d41 ff9b moveb %d1,%fp@(-101) 50e6a: 1229 0013 moveb %a1@(19),%d1 50e6e: 1429 000d moveb %a1@(13),%d2 50e72: 1d41 ff9a moveb %d1,%fp@(-102) 50e76: 1229 0014 moveb %a1@(20),%d1 50e7a: 1829 0010 moveb %a1@(16),%d4 50e7e: 1d41 ff99 moveb %d1,%fp@(-103) 50e82: 1229 0016 moveb %a1@(22),%d1 50e86: 3a40 moveaw %d0,%a5 50e88: 1d41 ff97 moveb %d1,%fp@(-105) 50e8c: 1229 0017 moveb %a1@(23),%d1 50e90: 1d41 ff96 moveb %d1,%fp@(-106) 50e94: 1229 0020 moveb %a1@(32),%d1 50e98: 1d41 ff9f moveb %d1,%fp@(-97) 50e9c: 1229 0021 moveb %a1@(33),%d1 50ea0: 1d41 ff9e moveb %d1,%fp@(-98) 50ea4: 1229 0022 moveb %a1@(34),%d1 50ea8: 1d41 ff9d moveb %d1,%fp@(-99) 50eac: 1229 0023 moveb %a1@(35),%d1 50eb0: 1d41 ff8f moveb %d1,%fp@(-113) 50eb4: 1229 0024 moveb %a1@(36),%d1 50eb8: 1d41 ffa1 moveb %d1,%fp@(-95) 50ebc: 1229 0025 moveb %a1@(37),%d1 50ec0: 1d41 ffa0 moveb %d1,%fp@(-96) 50ec4: 1229 0026 moveb %a1@(38),%d1 50ec8: 1d41 ffa5 moveb %d1,%fp@(-91) 50ecc: 1229 002c moveb %a1@(44),%d1 50ed0: 1e29 0027 moveb %a1@(39),%d7 50ed4: 1629 0028 moveb %a1@(40),%d3 50ed8: 1d41 ffa4 moveb %d1,%fp@(-92) 50edc: 1229 002d moveb %a1@(45),%d1 50ee0: 1a29 002f moveb %a1@(47),%d5 50ee4: 1d41 ffa3 moveb %d1,%fp@(-93) 50ee8: 1229 002e moveb %a1@(46),%d1 50eec: 1d41 ffa2 moveb %d1,%fp@(-94) 50ef0: 1229 0030 moveb %a1@(48),%d1 50ef4: 1d41 ffa7 moveb %d1,%fp@(-89) 50ef8: 1229 0031 moveb %a1@(49),%d1 sc = rtems_bdbuf_release( block); 50efc: 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); 50efe: 1d41 ffa6 moveb %d1,%fp@(-90) sc = rtems_bdbuf_release( block); 50f02: 4eb9 0004 f206 jsr 4f206 if (sc != RTEMS_SUCCESSFUL) 50f08: 588f addql #4,%sp 50f0a: 4a80 tstl %d0 50f0c: 671a beqs 50f28 <== ALWAYS TAKEN { rtems_disk_release(vol->dd); 50f0e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50f12: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 50f18: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50f1e: 7205 moveq #5,%d1 <== NOT EXECUTED 50f20: 2040 moveal %d0,%a0 <== NOT EXECUTED 50f22: 2081 movel %d1,%a0@ <== NOT EXECUTED 50f24: 6000 04fe braw 51424 <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 50f28: 4280 clrl %d0 50f2a: 1006 moveb %d6,%d0 50f2c: 4281 clrl %d1 50f2e: 122e ff95 moveb %fp@(-107),%d1 50f32: e188 lsll #8,%d0 50f34: 8081 orl %d1,%d0 if ( (vol->bps != 512) && 50f36: 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); 50f38: 3480 movew %d0,%a2@ 50f3a: 3040 moveaw %d0,%a0 if ( (vol->bps != 512) && 50f3c: 0c81 0000 0200 cmpil #512,%d1 50f42: 6732 beqs 50f76 <== ALWAYS TAKEN 50f44: 0c81 0000 0400 cmpil #1024,%d1 <== NOT EXECUTED 50f4a: 672a beqs 50f76 <== NOT EXECUTED (vol->bps != 1024) && 50f4c: 0c81 0000 0800 cmpil #2048,%d1 <== NOT EXECUTED 50f52: 6722 beqs 50f76 <== NOT EXECUTED (vol->bps != 2048) && 50f54: 0c81 0000 1000 cmpil #4096,%d1 <== NOT EXECUTED 50f5a: 671a beqs 50f76 <== NOT EXECUTED (vol->bps != 4096)) { rtems_disk_release(vol->dd); 50f5c: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50f60: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 50f66: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50f6c: 2240 moveal %d0,%a1 <== NOT EXECUTED 50f6e: 7016 moveq #22,%d0 <== NOT EXECUTED 50f70: 2280 movel %d0,%a1@ <== NOT EXECUTED 50f72: 6000 04b0 braw 51424 <== NOT EXECUTED } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 50f76: 7c09 moveq #9,%d6 50f78: eca9 lsrl %d6,%d1 50f7a: 4200 clrb %d0 50f7c: 1c2e ff8f moveb %fp@(-113),%d6 50f80: 1540 0003 moveb %d0,%a2@(3) 50f84: 600c bras 50f92 i >>= 1, vol->sec_mul++); 50f86: e281 asrl #1,%d1 <== NOT EXECUTED 50f88: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED 50f8c: 5280 addql #1,%d0 <== NOT EXECUTED 50f8e: 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; 50f92: 0801 0000 btst #0,%d1 50f96: 67ee beqs 50f86 <== NEVER TAKEN i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 50f98: 4281 clrl %d1 50f9a: 3208 movew %a0,%d1 50f9c: 4200 clrb %d0 50f9e: 1d46 ff8f moveb %d6,%fp@(-113) 50fa2: 2d41 ff90 movel %d1,%fp@(-112) 50fa6: 2241 moveal %d1,%a1 50fa8: 1540 0002 moveb %d0,%a2@(2) 50fac: 6010 bras 50fbe i >>= 1, vol->sec_log2++); 50fae: e281 asrl #1,%d1 50fb0: 102a 0002 moveb %a2@(2),%d0 50fb4: 3040 moveaw %d0,%a0 50fb6: 5288 addql #1,%a0 50fb8: 3008 movew %a0,%d0 50fba: 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; 50fbe: 0801 0000 btst #0,%d1 50fc2: 67ea beqs 50fae 50fc4: 2d49 ff90 movel %a1,%fp@(-112) 50fc8: 1d46 ff8f moveb %d6,%fp@(-113) i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 50fcc: 1542 0004 moveb %d2,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 50fd0: 6700 0258 beqw 5122a { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 50fd4: 4281 clrl %d1 50fd6: 1202 moveb %d2,%d1 50fd8: 4200 clrb %d0 50fda: 226e ff90 moveal %fp@(-112),%a1 50fde: 1540 0005 moveb %d0,%a2@(5) 50fe2: 1c2e ff8f moveb %fp@(-113),%d6 50fe6: 6010 bras 50ff8 i >>= 1, vol->spc_log2++); 50fe8: e281 asrl #1,%d1 50fea: 102a 0005 moveb %a2@(5),%d0 50fee: 3040 moveaw %d0,%a0 50ff0: 5288 addql #1,%a0 50ff2: 3008 movew %a0,%d0 50ff4: 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; 50ff8: 0801 0000 btst #0,%d1 50ffc: 67ea beqs 50fe8 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) 50ffe: 4281 clrl %d1 51000: 122a 0005 moveb %a2@(5),%d1 51004: 4280 clrl %d0 51006: 1d46 ff8f moveb %d6,%fp@(-113) 5100a: 2c09 movel %a1,%d6 5100c: e3ae lsll %d1,%d6 5100e: 2d49 ff90 movel %a1,%fp@(-112) 51012: 3006 movew %d6,%d0 51014: 3546 0006 movew %d6,%a2@(6) 51018: 2040 moveal %d0,%a0 5101a: b1fc 0000 8000 cmpal #32768,%a0 51020: 6200 0208 bhiw 5122a 51024: 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; 51028: 2208 movel %a0,%d1 5102a: 4200 clrb %d0 5102c: 1c2e ff8f moveb %fp@(-113),%d6 51030: 1540 0008 moveb %d0,%a2@(8) 51034: 6010 bras 51046 i >>= 1, vol->bpc_log2++); 51036: e281 asrl #1,%d1 51038: 102a 0008 moveb %a2@(8),%d0 5103c: 3040 moveaw %d0,%a0 5103e: 5288 addql #1,%a0 51040: 3008 movew %a0,%d0 51042: 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; 51046: 0801 0000 btst #0,%d1 5104a: 67ea beqs 51036 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); 5104c: 4280 clrl %d0 5104e: 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); 51052: 320d movew %a5,%d1 51054: 1d46 ff8f moveb %d6,%fp@(-113) 51058: 3c0c movew %a4,%d6 5105a: 0281 0000 00ff andil #255,%d1 51060: 2d49 ff90 movel %a1,%fp@(-112) 51064: 0286 0000 00ff andil #255,%d6 5106a: e189 lsll #8,%d1 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5106c: 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); 5106e: 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); 51070: 1544 0009 moveb %d4,%a2@(9) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 51074: 3041 moveaw %d1,%a0 51076: 3541 0014 movew %d1,%a2@(20) vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5107a: 4281 clrl %d1 5107c: 122e ff9c moveb %fp@(-100),%d1 51080: 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)) / 51082: 2200 movel %d0,%d1 51084: 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); 51086: 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)) / 5108a: 49f1 18ff lea %a1@(ffffffff,%d1:l),%a4 5108e: 2209 movel %a1,%d1 51090: 200c movel %a4,%d0 51092: 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) 51096: 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)) / 51098: 2840 moveal %d0,%a4 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 5109a: 220c movel %a4,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5109c: 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)) / 510a0: 2540 0020 movel %d0,%a2@(32) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 510a4: 4280 clrl %d0 510a6: 102a 0002 moveb %a2@(2),%d0 510aa: e1a9 lsll %d0,%d1 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 510ac: 4280 clrl %d0 510ae: 102e ff96 moveb %fp@(-106),%d0 510b2: 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; 510b4: 2541 0024 movel %d1,%a2@(36) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 510b8: 8086 orl %d6,%d0 510ba: 4a40 tstw %d0 510bc: 6708 beqs 510c6 <== NEVER TAKEN vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 510be: 0280 0000 ffff andil #65535,%d0 510c4: 6022 bras 510e8 else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 510c6: 4280 clrl %d0 <== NOT EXECUTED 510c8: 4281 clrl %d1 <== NOT EXECUTED 510ca: 102e ffa0 moveb %fp@(-96),%d0 <== NOT EXECUTED 510ce: 122e ffa5 moveb %fp@(-91),%d1 <== NOT EXECUTED 510d2: 4286 clrl %d6 <== NOT EXECUTED 510d4: 1c2e ffa1 moveb %fp@(-95),%d6 <== NOT EXECUTED 510d8: 4841 swap %d1 <== NOT EXECUTED 510da: 4241 clrw %d1 <== NOT EXECUTED 510dc: e188 lsll #8,%d0 <== NOT EXECUTED 510de: 8081 orl %d1,%d0 <== NOT EXECUTED 510e0: 7218 moveq #24,%d1 <== NOT EXECUTED 510e2: 8086 orl %d6,%d0 <== NOT EXECUTED 510e4: e3af lsll %d1,%d7 <== NOT EXECUTED 510e6: 8087 orl %d7,%d0 <== NOT EXECUTED 510e8: 2540 0016 movel %d0,%a2@(22) vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 510ec: 4280 clrl %d0 510ee: 220c movel %a4,%d1 510f0: 0284 0000 00ff andil #255,%d4 510f6: 3008 movew %a0,%d0 510f8: 41ea 0016 lea %a2@(22),%a0 510fc: 4c10 4800 mulsl %a0@,%d4 51100: 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) 51102: 4280 clrl %d0 51104: 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 + 51108: 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; 5110a: 2544 001a movel %d4,%a2@(26) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5110e: 4284 clrl %d4 51110: 182e ff9a moveb %fp@(-102),%d4 51114: 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 + 51116: 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) 5111a: 8084 orl %d4,%d0 5111c: 4a40 tstw %d0 5111e: 6708 beqs 51128 <== NEVER TAKEN vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 51120: 0280 0000 ffff andil #65535,%d0 51126: 6026 bras 5114e else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 51128: 4280 clrl %d0 <== NOT EXECUTED 5112a: 4284 clrl %d4 <== NOT EXECUTED 5112c: 102e ff9e moveb %fp@(-98),%d0 <== NOT EXECUTED 51130: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 51134: e188 lsll #8,%d0 <== NOT EXECUTED 51136: 4844 swap %d4 <== NOT EXECUTED 51138: 4244 clrw %d4 <== NOT EXECUTED 5113a: 1c2e ff8f moveb %fp@(-113),%d6 <== NOT EXECUTED 5113e: 8084 orl %d4,%d0 <== NOT EXECUTED 51140: 4284 clrl %d4 <== NOT EXECUTED 51142: 182e ff9f moveb %fp@(-97),%d4 <== NOT EXECUTED 51146: 8084 orl %d4,%d0 <== NOT EXECUTED 51148: 7818 moveq #24,%d4 <== NOT EXECUTED 5114a: e9ae lsll %d4,%d6 <== NOT EXECUTED 5114c: 8086 orl %d6,%d0 <== NOT EXECUTED 5114e: 2540 0028 movel %d0,%a2@(40) data_secs = vol->tot_secs - vol->data_fsec; 51152: 2c2a 0028 movel %a2@(40),%d6 51156: 9c81 subl %d1,%d6 51158: 2206 movel %d6,%d1 vol->data_cls = data_secs / vol->spc; 5115a: 0282 0000 00ff andil #255,%d2 51160: 4c42 1001 remul %d2,%d1,%d1 51164: 2541 0030 movel %d1,%a2@(48) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 51168: 0c81 0000 0ff4 cmpil #4084,%d1 5116e: 6218 bhis 51188 <== NEVER TAKEN { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 51170: 223c 0000 0fff movel #4095,%d1 vol->eoc_val = FAT_FAT12_EOC; 51176: 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; 5117c: 7001 moveq #1,%d0 vol->mask = FAT_FAT12_MASK; 5117e: 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; 51182: 1540 000a moveb %d0,%a2@(10) 51186: 603a bras 511c2 vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 51188: 0c81 0000 fff4 cmpil #65524,%d1 <== NOT EXECUTED 5118e: 621c bhis 511ac <== NOT EXECUTED { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 51190: 2c3c 0000 ffff movel #65535,%d6 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 51196: 207c 0000 fff8 moveal #65528,%a0 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 5119c: 7802 moveq #2,%d4 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 5119e: 2546 000c movel %d6,%a2@(12) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 511a2: 1544 000a moveb %d4,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 511a6: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 511aa: 601a bras 511c6 <== NOT EXECUTED } else { vol->type = FAT_FAT32; 511ac: 7004 moveq #4,%d0 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 511ae: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 511b4: 1540 000a moveb %d0,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 511b8: 2541 000c movel %d1,%a2@(12) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 511bc: 243c 0fff fff8 movel #268435448,%d2 <== NOT EXECUTED 511c2: 2542 0010 movel %d2,%a2@(16) } } if (vol->type == FAT_FAT32) 511c6: 4280 clrl %d0 511c8: 102a 000a moveb %a2@(10),%d0 511cc: 7804 moveq #4,%d4 511ce: b880 cmpl %d0,%d4 511d0: 6600 01ac bnew 5137e { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 511d4: 4280 clrl %d0 <== NOT EXECUTED 511d6: 4281 clrl %d1 <== NOT EXECUTED 511d8: 102e ffa3 moveb %fp@(-93),%d0 <== NOT EXECUTED 511dc: 122e ffa2 moveb %fp@(-94),%d1 <== NOT EXECUTED 511e0: 7c18 moveq #24,%d6 <== NOT EXECUTED 511e2: 4841 swap %d1 <== NOT EXECUTED 511e4: 4241 clrw %d1 <== NOT EXECUTED 511e6: e188 lsll #8,%d0 <== NOT EXECUTED 511e8: edad lsll %d6,%d5 <== NOT EXECUTED 511ea: 8081 orl %d1,%d0 <== NOT EXECUTED 511ec: 4281 clrl %d1 <== NOT EXECUTED 511ee: 122e ffa4 moveb %fp@(-92),%d1 <== NOT EXECUTED 511f2: 8081 orl %d1,%d0 <== NOT EXECUTED 511f4: 8085 orl %d5,%d0 <== NOT EXECUTED 511f6: 2540 0034 movel %d0,%a2@(52) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 511fa: 7080 moveq #-128,%d0 <== NOT EXECUTED 511fc: c083 andl %d3,%d0 <== NOT EXECUTED 511fe: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED if (vol->mirror) 51202: 670a beqs 5120e <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 51204: 700f moveq #15,%d0 <== NOT EXECUTED 51206: c680 andl %d0,%d3 <== NOT EXECUTED 51208: 1543 0048 moveb %d3,%a2@(72) <== NOT EXECUTED 5120c: 6006 bras 51214 <== NOT EXECUTED else vol->afat = 0; 5120e: 4201 clrb %d1 <== NOT EXECUTED 51210: 1541 0048 moveb %d1,%a2@(72) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 51214: 4280 clrl %d0 <== NOT EXECUTED 51216: 102e ffa6 moveb %fp@(-90),%d0 <== NOT EXECUTED 5121a: 4281 clrl %d1 <== NOT EXECUTED 5121c: 122e ffa7 moveb %fp@(-89),%d1 <== NOT EXECUTED 51220: e188 lsll #8,%d0 <== NOT EXECUTED 51222: 8081 orl %d1,%d0 <== NOT EXECUTED 51224: 3540 0038 movew %d0,%a2@(56) <== NOT EXECUTED if( vol->info_sec == 0 ) 51228: 661a bnes 51244 <== NOT EXECUTED { rtems_disk_release(vol->dd); 5122a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5122e: 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); 51230: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 51236: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 5123c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5123e: 2087 movel %d7,%a0@ <== NOT EXECUTED 51240: 6000 01e2 braw 51424 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 51244: 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, 51248: 4bf9 0005 08b2 lea 508b2 <_fat_block_read>,%a5 <== NOT EXECUTED 5124e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 51250: 4878 0004 pea 4 <== NOT EXECUTED 51254: 42a7 clrl %sp@- <== NOT EXECUTED 51256: 3f00 movew %d0,%sp@- <== NOT EXECUTED 51258: 4267 clrw %sp@- <== NOT EXECUTED 5125a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5125c: 4e95 jsr %a5@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 5125e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 51262: 4a80 tstl %d0 <== NOT EXECUTED 51264: 6c0e bges 51274 <== NOT EXECUTED { rtems_disk_release(vol->dd); 51266: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 5126a: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED 51270: 6000 01b2 braw 51424 <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 51274: 4280 clrl %d0 <== NOT EXECUTED 51276: 4281 clrl %d1 <== NOT EXECUTED 51278: 102c 0001 moveb %a4@(1),%d0 <== NOT EXECUTED 5127c: 122c 0002 moveb %a4@(2),%d1 <== NOT EXECUTED 51280: 7418 moveq #24,%d2 <== NOT EXECUTED 51282: 4841 swap %d1 <== NOT EXECUTED 51284: 4241 clrw %d1 <== NOT EXECUTED 51286: e188 lsll #8,%d0 <== NOT EXECUTED 51288: 8081 orl %d1,%d0 <== NOT EXECUTED 5128a: 4281 clrl %d1 <== NOT EXECUTED 5128c: 1214 moveb %a4@,%d1 <== NOT EXECUTED 5128e: 8081 orl %d1,%d0 <== NOT EXECUTED 51290: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED 51294: e5a9 lsll %d2,%d1 <== NOT EXECUTED 51296: 8081 orl %d1,%d0 <== NOT EXECUTED 51298: 0c80 4161 5252 cmpil #1096897106,%d0 <== NOT EXECUTED 5129e: 6724 beqs 512c4 <== 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); 512a0: 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 ); 512a4: 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); 512a6: 4eb9 0005 0780 jsr 50780 <== 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); 512ac: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 512b0: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 512b6: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 512bc: 2040 moveal %d0,%a0 <== NOT EXECUTED 512be: 2086 movel %d6,%a0@ <== NOT EXECUTED 512c0: 6000 01de braw 514a0 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 512c4: 2f0c movel %a4,%sp@- <== NOT EXECUTED 512c6: 4878 000c pea c <== NOT EXECUTED 512ca: 4280 clrl %d0 <== NOT EXECUTED 512cc: 4878 01e4 pea 1e4 <== NOT EXECUTED 512d0: 302a 0038 movew %a2@(56),%d0 <== NOT EXECUTED 512d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 512d6: 2f0b movel %a3,%sp@- <== NOT EXECUTED 512d8: 4e95 jsr %a5@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 512da: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 512de: 4a80 tstl %d0 <== NOT EXECUTED 512e0: 6c18 bges 512fa <== 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); 512e2: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 512e6: 4eb9 0005 0780 jsr 50780 <== 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); 512ec: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 512f0: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED 512f6: 6000 01a8 braw 514a0 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 512fa: 4280 clrl %d0 <== NOT EXECUTED 512fc: 4281 clrl %d1 <== NOT EXECUTED 512fe: 102c 0005 moveb %a4@(5),%d0 <== NOT EXECUTED 51302: 122c 0006 moveb %a4@(6),%d1 <== NOT EXECUTED 51306: 7418 moveq #24,%d2 <== NOT EXECUTED 51308: 4841 swap %d1 <== NOT EXECUTED 5130a: 4241 clrw %d1 <== NOT EXECUTED 5130c: e188 lsll #8,%d0 <== NOT EXECUTED 5130e: 8081 orl %d1,%d0 <== NOT EXECUTED 51310: 4281 clrl %d1 <== NOT EXECUTED 51312: 122c 0004 moveb %a4@(4),%d1 <== NOT EXECUTED 51316: 8081 orl %d1,%d0 <== NOT EXECUTED 51318: 122c 0007 moveb %a4@(7),%d1 <== NOT EXECUTED 5131c: e5a9 lsll %d2,%d1 <== NOT EXECUTED 5131e: 8081 orl %d1,%d0 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 51320: 4281 clrl %d1 <== NOT EXECUTED 51322: 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); 51326: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5132a: 4280 clrl %d0 <== NOT EXECUTED 5132c: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 51330: 4841 swap %d1 <== NOT EXECUTED 51332: 4241 clrw %d1 <== NOT EXECUTED 51334: e188 lsll #8,%d0 <== NOT EXECUTED 51336: 8081 orl %d1,%d0 <== NOT EXECUTED 51338: 4281 clrl %d1 <== NOT EXECUTED 5133a: 122c 0008 moveb %a4@(8),%d1 <== NOT EXECUTED 5133e: 8081 orl %d1,%d0 <== NOT EXECUTED 51340: 122c 000b moveb %a4@(11),%d1 <== NOT EXECUTED 51344: e5a9 lsll %d2,%d1 <== NOT EXECUTED 51346: 8081 orl %d1,%d0 <== NOT EXECUTED 51348: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 5134c: 4878 ffff pea ffffffff <== NOT EXECUTED 51350: 4878 ffff pea ffffffff <== NOT EXECUTED 51354: 2f0b movel %a3,%sp@- <== NOT EXECUTED 51356: 4eb9 0005 0c16 jsr 50c16 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 5135c: 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, 51360: 2400 movel %d0,%d2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 51362: 6732 beqs 51396 <== 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); 51364: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 51368: 4eb9 0005 0780 jsr 50780 <== 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); 5136e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 51372: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED return rc; 51378: 508f addql #8,%sp <== NOT EXECUTED 5137a: 6000 01a2 braw 5151e <== NOT EXECUTED else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 5137e: 7cff moveq #-1,%d6 } } else { vol->rdir_cl = 0; vol->mirror = 0; 51380: 4204 clrb %d4 } } } else { vol->rdir_cl = 0; 51382: 42aa 0034 clrl %a2@(52) vol->mirror = 0; 51386: 1544 0042 moveb %d4,%a2@(66) vol->afat = 0; 5138a: 1544 0048 moveb %d4,%a2@(72) vol->free_cls = 0xFFFFFFFF; 5138e: 2546 003a movel %d6,%a2@(58) vol->next_cl = 0xFFFFFFFF; 51392: 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); 51396: 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)); 5139a: 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); 513a0: 4eb9 0005 0780 jsr 50780 vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 513a6: 4280 clrl %d0 513a8: 102a 0048 moveb %a2@(72),%d0 513ac: 41ea 0016 lea %a2@(22),%a0 513b0: 4c10 0800 mulsl %a0@,%d0 513b4: 4281 clrl %d1 513b6: 322a 0014 movew %a2@(20),%d1 513ba: d081 addl %d1,%d0 513bc: 2540 0044 movel %d0,%a2@(68) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 513c0: 4878 000c pea c 513c4: 4878 0002 pea 2 513c8: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 513ca: 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)); 513ce: 2040 moveal %d0,%a0 513d0: 2540 005a movel %d0,%a2@(90) if ( fs_info->vhash == NULL ) 513d4: 6738 beqs 5140e <== 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 ); 513d6: 2240 moveal %d0,%a1 513d8: 5889 addql #4,%a1 513da: 2089 movel %a1,%a0@ 513dc: 43e8 0010 lea %a0@(16),%a1 513e0: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 513e4: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 513e8: 42a8 0004 clrl %a0@(4) tail->previous = head; 513ec: 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; 513f0: 42a8 0010 clrl %a0@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 513f4: 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)); 513f8: 4878 000c pea c 513fc: 4878 0002 pea 2 51400: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 51402: 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)); 51404: 2040 moveal %d0,%a0 51406: 2540 005e movel %d0,%a2@(94) if ( fs_info->rhash == NULL ) 5140a: 661e bnes 5142a <== ALWAYS TAKEN 5140c: 6072 bras 51480 <== 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); 5140e: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 51412: 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); 51414: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5141a: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 51420: 2040 moveal %d0,%a0 <== NOT EXECUTED 51422: 2085 movel %d5,%a0@ <== NOT EXECUTED 51424: 588f addql #4,%sp <== NOT EXECUTED 51426: 6000 00f0 braw 51518 <== NOT EXECUTED Chain_Node *tail = _Chain_Tail( the_chain ); 5142a: 2240 moveal %d0,%a1 5142c: 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; 5142e: 4281 clrl %d1 51430: 2089 movel %a1,%a0@ 51432: 43e8 0010 lea %a0@(16),%a1 51436: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5143a: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 5143e: 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; 51442: 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; 51448: 42a8 0004 clrl %a0@(4) 5144c: 42a8 0010 clrl %a0@(16) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 51450: 2149 0014 movel %a1,%a0@(20) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 51454: 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; 51458: 2540 006a movel %d0,%a2@(106) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 5145c: 202a 0028 movel %a2@(40),%d0 51460: e3a8 lsll %d1,%d0 fs_info->index = 0; 51462: 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; 51466: e988 lsll #4,%d0 51468: 2540 006e movel %d0,%a2@(110) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 5146c: 4878 0001 pea 1 51470: 4878 0100 pea 100 51474: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 51476: 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)); 51478: 2540 0062 movel %d0,%a2@(98) if ( fs_info->uino == NULL ) 5147c: 6654 bnes 514d2 <== ALWAYS TAKEN 5147e: 6024 bras 514a4 <== 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); 51480: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 51484: 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); 51486: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 5148c: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 51490: 4eb9 0004 54d0 jsr 454d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 51496: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 5149c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5149e: 2084 movel %d4,%a0@ <== NOT EXECUTED 514a0: 508f addql #8,%sp <== NOT EXECUTED 514a2: 6074 bras 51518 <== 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); 514a4: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 514a8: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 514ae: 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); 514b0: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 514b6: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 514ba: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 514bc: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 514c0: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 514c2: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 514c8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 514cc: 2240 moveal %d0,%a1 <== NOT EXECUTED 514ce: 2283 movel %d3,%a1@ <== NOT EXECUTED 514d0: 6046 bras 51518 <== NOT EXECUTED } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 514d2: 4878 0001 pea 1 514d6: 4280 clrl %d0 514d8: 3012 movew %a2@,%d0 514da: 2f00 movel %d0,%sp@- 514dc: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 514de: 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)); 514e0: 2540 007c movel %d0,%a2@(124) if (fs_info->sec_buf == NULL) 514e4: 6636 bnes 5151c <== ALWAYS TAKEN { rtems_disk_release(vol->dd); 514e6: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 514ea: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 514f0: 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); 514f2: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED free(fs_info->vhash); 514f8: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 514fc: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 514fe: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 51502: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 51504: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 51508: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5150a: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 51510: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 51514: 2040 moveal %d0,%a0 <== NOT EXECUTED 51516: 2082 movel %d2,%a0@ <== NOT EXECUTED 51518: 74ff moveq #-1,%d2 <== NOT EXECUTED 5151a: 6002 bras 5151e <== NOT EXECUTED } return RC_OK; 5151c: 4282 clrl %d2 } 5151e: 2002 movel %d2,%d0 51520: 4cee 3cfc ff64 moveml %fp@(-156),%d2-%d7/%a2-%a5 51526: 4e5e unlk %fp ... =============================================================================== 0005750c : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5750c: 4e56 ffd4 linkw %fp,#-44 57510: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57514: 266e 0008 moveal %fp@(8),%a3 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 57518: 246b 0034 moveal %a3@(52),%a2 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5751c: 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; 57520: 2e2a 0030 movel %a2@(48),%d7 57524: 5487 addql #2,%d7 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 57526: 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; 5752a: 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; 5752e: 4294 clrl %a4@ if (count == 0) 57530: 4aae 0010 tstl %fp@(16) 57534: 6700 0138 beqw 5766e return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 57538: 242a 003e movel %a2@(62),%d2 5753c: 70ff moveq #-1,%d0 5753e: b082 cmpl %d2,%d0 57540: 6602 bnes 57544 uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; 57542: 7402 moveq #2,%d2 } } i++; cl4find++; if (cl4find >= data_cls_val) cl4find = 2; 57544: 7c02 moveq #2,%d6 57546: 4284 clrl %d4 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 57548: 2a3c 0005 7204 movel #356868,%d5 5754e: 6000 00f4 braw 57644 * 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); 57552: 486e fffc pea %fp@(-4) 57556: 2f02 movel %d2,%sp@- 57558: 2f0b movel %a3,%sp@- 5755a: 4eb9 0005 708c jsr 5708c if ( rc != RC_OK ) 57560: 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); 57564: 2600 movel %d0,%d3 if ( rc != RC_OK ) 57566: 6716 beqs 5757e <== ALWAYS TAKEN { if (*cls_added != 0) 57568: 4a94 tstl %a4@ <== NOT EXECUTED 5756a: 6700 0108 beqw 57674 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 5756e: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 57570: 2f0b movel %a3,%sp@- <== NOT EXECUTED 57572: 4eb9 0005 7462 jsr 57462 <== NOT EXECUTED 57578: 508f addql #8,%sp <== NOT EXECUTED 5757a: 6000 00f8 braw 57674 <== NOT EXECUTED return rc; } if (next_cln == FAT_GENFAT_FREE) 5757e: 4aae fffc tstl %fp@(-4) 57582: 6600 00b6 bnew 5763a /* * 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) 57586: 4a94 tstl %a4@ 57588: 661a bnes 575a4 <== NEVER TAKEN { *chain = cl4find; 5758a: 2a82 movel %d2,%a5@ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5758c: 4878 ffff pea ffffffff 57590: 2045 moveal %d5,%a0 57592: 2f02 movel %d2,%sp@- 57594: 2f0b movel %a3,%sp@- 57596: 4e90 jsr %a0@ if ( rc != RC_OK ) 57598: 4fef 000c lea %sp@(12),%sp 5759c: 4a80 tstl %d0 5759e: 6766 beqs 57606 <== ALWAYS TAKEN 575a0: 6000 00d0 braw 57672 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 575a4: 4878 ffff pea ffffffff <== NOT EXECUTED 575a8: 2045 moveal %d5,%a0 <== NOT EXECUTED 575aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 575ac: 2f0b movel %a3,%sp@- <== NOT EXECUTED 575ae: 4e90 jsr %a0@ <== NOT EXECUTED if ( rc != RC_OK ) 575b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 575b4: 4a80 tstl %d0 <== NOT EXECUTED 575b6: 6714 beqs 575cc <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 575b8: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 575ba: 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); 575bc: 2607 movel %d7,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 575be: 2f0b movel %a3,%sp@- <== NOT EXECUTED 575c0: 4eb9 0005 7462 jsr 57462 <== NOT EXECUTED return rc; 575c6: 508f addql #8,%sp <== NOT EXECUTED 575c8: 6000 00aa braw 57674 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 575cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 575ce: 2045 moveal %d5,%a0 <== NOT EXECUTED 575d0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 575d2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 575d4: 4e90 jsr %a0@ <== NOT EXECUTED if ( rc != RC_OK ) 575d6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 575da: 4a80 tstl %d0 <== NOT EXECUTED 575dc: 6728 beqs 57606 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 575de: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 575e0: 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); 575e2: 2604 movel %d4,%d3 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 575e4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 575e6: 4eb9 0005 7462 jsr 57462 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 575ec: 42a7 clrl %sp@- <== NOT EXECUTED 575ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 575f0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 575f2: 4eb9 0005 7204 jsr 57204 <== NOT EXECUTED fat_buf_release(fs_info); 575f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 575fa: 4eb9 0005 0780 jsr 50780 <== NOT EXECUTED return rc; 57600: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 57604: 606e bras 57674 <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 57606: 2014 movel %a4@,%d0 57608: 5280 addql #1,%d0 5760a: 2880 movel %d0,%a4@ /* have we satisfied request ? */ if (*cls_added == count) 5760c: b0ae 0010 cmpl %fp@(16),%d0 57610: 6626 bnes 57638 <== NEVER TAKEN { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 57612: 202a 003a movel %a2@(58),%d0 57616: 72ff moveq #-1,%d1 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 57618: 2542 003e movel %d2,%a2@(62) if (fs_info->vol.free_cls != 0xFFFFFFFF) 5761c: b280 cmpl %d0,%d1 5761e: 6706 beqs 57626 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 57620: 9094 subl %a4@,%d0 <== NOT EXECUTED 57622: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED *last_cl = save_cln; 57626: 206e 0018 moveal %fp@(24),%a0 5762a: 2082 movel %d2,%a0@ fat_buf_release(fs_info); 5762c: 2f0a movel %a2,%sp@- 5762e: 4eb9 0005 0780 jsr 50780 return rc; 57634: 588f addql #4,%sp 57636: 603c bras 57674 save_cln = cl4find; (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) 57638: 2802 movel %d2,%d4 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 5763a: 5286 addql #1,%d6 cl4find++; 5763c: 5282 addql #1,%d2 if (cl4find >= data_cls_val) 5763e: be82 cmpl %d2,%d7 57640: 6202 bhis 57644 <== ALWAYS TAKEN cl4find = 2; 57642: 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) 57644: be86 cmpl %d6,%d7 57646: 6200 ff0a bhiw 57552 if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 5764a: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 5764e: 72ff moveq #-1,%d1 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 57650: 2544 003e movel %d4,%a2@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 57654: b280 cmpl %d0,%d1 <== NOT EXECUTED 57656: 6706 beqs 5765e <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 57658: 9094 subl %a4@,%d0 <== NOT EXECUTED 5765a: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED *last_cl = save_cln; 5765e: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED 57662: 2084 movel %d4,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 57664: 2f0a movel %a2,%sp@- <== NOT EXECUTED 57666: 4eb9 0005 0780 jsr 50780 <== NOT EXECUTED return RC_OK; 5766c: 588f addql #4,%sp <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; 5766e: 4283 clrl %d3 <== NOT EXECUTED 57670: 6002 bras 57674 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 57672: 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; } 57674: 2003 movel %d3,%d0 57676: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 5767c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057204 : 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)) ) 57204: 7001 moveq #1,%d0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 57206: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5720a: 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 ) { 5720e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 57212: 242e 000c movel %fp@(12),%d2 57216: 2a2e 0010 movel %fp@(16),%d5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5721a: 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; 5721e: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 57222: b082 cmpl %d2,%d0 57224: 6400 0222 bccw 57448 57228: 202a 0030 movel %a2@(48),%d0 5722c: 5280 addql #1,%d0 5722e: b082 cmpl %d2,%d0 57230: 6500 0216 bcsw 57448 rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 57234: 4280 clrl %d0 57236: 102a 000a moveb %a2@(10),%d0 5723a: 7601 moveq #1,%d3 5723c: 2202 movel %d2,%d1 5723e: c680 andl %d0,%d3 57240: 6706 beqs 57248 <== NEVER TAKEN 57242: e289 lsrl #1,%d1 57244: d282 addl %d2,%d1 57246: 600c bras 57254 57248: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5724c: 6704 beqs 57252 <== NOT EXECUTED 5724e: d281 addl %d1,%d1 <== NOT EXECUTED 57250: 6002 bras 57254 <== NOT EXECUTED 57252: e589 lsll #2,%d1 <== NOT EXECUTED 57254: 4284 clrl %d4 57256: 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); 5725a: 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) + 5725c: e8a9 lsrl %d4,%d1 5725e: 2641 moveal %d1,%a3 57260: 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); 57264: 4a83 tstl %d3 57266: 6706 beqs 5726e <== NEVER TAKEN 57268: e28f lsrl #1,%d7 5726a: de82 addl %d2,%d7 5726c: 600c bras 5727a 5726e: 0800 0001 btst #1,%d0 <== NOT EXECUTED 57272: 6704 beqs 57278 <== NOT EXECUTED 57274: de87 addl %d7,%d7 <== NOT EXECUTED 57276: 6002 bras 5727a <== NOT EXECUTED 57278: e58f lsll #2,%d7 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5727a: 2c0e movel %fp,%d6 5727c: 5986 subql #4,%d6 5727e: 49f9 0005 05a0 lea 505a0 ,%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); 57284: 3612 movew %a2@,%d3 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 57286: 2f06 movel %d6,%sp@- 57288: 4878 0001 pea 1 5728c: 2f0b movel %a3,%sp@- 5728e: 2f0a movel %a2,%sp@- 57290: 4e94 jsr %a4@ if (rc != RC_OK) 57292: 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); 57296: 2800 movel %d0,%d4 if (rc != RC_OK) 57298: 6600 01bc bnew 57456 return rc; switch ( fs_info->vol.type ) 5729c: 4280 clrl %d0 5729e: 102a 000a moveb %a2@(10),%d0 572a2: 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); 572a4: 0283 0000 ffff andil #65535,%d3 572aa: 5383 subql #1,%d3 572ac: 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 ) 572ae: b280 cmpl %d0,%d1 572b0: 6700 0142 beqw 573f4 572b4: 123c 0004 moveb #4,%d1 572b8: b280 cmpl %d0,%d1 572ba: 6700 015a beqw 57416 572be: 123c 0001 moveb #1,%d1 572c2: b280 cmpl %d0,%d1 572c4: 6600 0182 bnew 57448 572c8: 206e fffc moveal %fp@(-4),%a0 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 572cc: 0802 0000 btst #0,%d2 572d0: 6700 0084 beqw 57356 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 572d4: 2068 001e moveal %a0@(30),%a0 572d8: 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)) = 572da: 123c 000f moveb #15,%d1 572de: 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; 572e0: e98d lsll #4,%d5 *((uint8_t *)(block0->buffer + ofs)) = 572e2: c081 andl %d1,%d0 572e4: 1080 moveb %d0,%a0@ (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 572e6: 206e fffc moveal %fp@(-4),%a0 572ea: 2068 001e moveal %a0@(30),%a0 572ee: 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)) = 572f0: 1010 moveb %a0@,%d0 572f2: 8085 orl %d5,%d0 572f4: 1080 moveb %d0,%a0@ } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 572f6: 7001 moveq #1,%d0 572f8: 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) ) 572fc: 4280 clrl %d0 572fe: 3012 movew %a2@,%d0 57300: 5380 subql #1,%d0 57302: b083 cmpl %d3,%d0 57304: 663c bnes 57342 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 57306: 2f06 movel %d6,%sp@- <== NOT EXECUTED 57308: 4878 0001 pea 1 <== NOT EXECUTED 5730c: 486b 0001 pea %a3@(1) <== NOT EXECUTED 57310: 2f0a movel %a2,%sp@- <== NOT EXECUTED 57312: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 57314: 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, 57318: 2800 movel %d0,%d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 5731a: 6600 013a bnew 57456 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 5731e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 57322: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 57326: 4210 clrb %a0@ <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 57328: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5732e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); 57332: e08d lsrl #8,%d5 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 57334: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 57338: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5733a: 8a80 orl %d0,%d5 <== NOT EXECUTED 5733c: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5733e: 6000 0100 braw 57440 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 57342: 206e fffc moveal %fp@(-4),%a0 57346: 5283 addql #1,%d3 57348: 2068 001e moveal %a0@(30),%a0 5734c: 4200 clrb %d0 5734e: 1180 3800 moveb %d0,%a0@(00000000,%d3:l) 57352: 6000 0086 braw 573da } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 57356: 2068 001e moveal %a0@(30),%a0 5735a: 4201 clrb %d1 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 5735c: 0285 0000 0fff andil #4095,%d5 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 57362: 1181 3800 moveb %d1,%a0@(00000000,%d3:l) *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 57366: 206e fffc moveal %fp@(-4),%a0 5736a: 2068 001e moveal %a0@(30),%a0 5736e: 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)) = 57370: 1010 moveb %a0@,%d0 57372: 8085 orl %d5,%d0 57374: 1080 moveb %d0,%a0@ 57376: 7001 moveq #1,%d0 57378: 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) ) 5737c: 4280 clrl %d0 5737e: 3012 movew %a2@,%d0 57380: 5380 subql #1,%d0 57382: b083 cmpl %d3,%d0 57384: 6640 bnes 573c6 <== ALWAYS TAKEN { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 57386: 2f06 movel %d6,%sp@- <== NOT EXECUTED 57388: 4878 0001 pea 1 <== NOT EXECUTED 5738c: 486b 0001 pea %a3@(1) <== NOT EXECUTED 57390: 2f0a movel %a2,%sp@- <== NOT EXECUTED 57392: 4e94 jsr %a4@ <== NOT EXECUTED &block0); if (rc != RC_OK) 57394: 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, 57398: 2800 movel %d0,%d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 5739a: 6600 00ba bnew 57456 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 5739e: 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)) = 573a2: 72f0 moveq #-16,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; 573a4: 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)) = 573a8: 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); 573aa: 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)) = 573b0: 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); 573b2: 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)) = 573b4: 1080 moveb %d0,%a0@ <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 573b6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 573ba: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 573be: 1010 moveb %a0@,%d0 <== NOT EXECUTED 573c0: 8a80 orl %d0,%d5 <== NOT EXECUTED 573c2: 1085 moveb %d5,%a0@ <== NOT EXECUTED 573c4: 6048 bras 5740e <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 573c6: 206e fffc moveal %fp@(-4),%a0 573ca: 5283 addql #1,%d3 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 573cc: 72f0 moveq #-16,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 573ce: 2068 001e moveal %a0@(30),%a0 573d2: d1c3 addal %d3,%a0 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 573d4: 1010 moveb %a0@,%d0 573d6: c081 andl %d1,%d0 573d8: 1080 moveb %d0,%a0@ (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 573da: 206e fffc moveal %fp@(-4),%a0 573de: 2068 001e moveal %a0@(30),%a0 573e2: d1c3 addal %d3,%a0 (uint8_t )((fat16_clv & 0xFF00)>>8); 573e4: 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)) = 573ea: 1010 moveb %a0@,%d0 (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 573ec: e08d lsrl #8,%d5 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 573ee: 8a80 orl %d0,%d5 573f0: 1085 moveb %d5,%a0@ 573f2: 6062 bras 57456 } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 573f4: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 573f8: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 573fe: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 57402: 2005 movel %d5,%d0 <== NOT EXECUTED 57404: e08d lsrl #8,%d5 <== NOT EXECUTED 57406: e188 lsll #8,%d0 <== NOT EXECUTED 57408: 8085 orl %d5,%d0 <== NOT EXECUTED 5740a: 3180 3800 movew %d0,%a0@(00000000,%d3:l) <== NOT EXECUTED 5740e: 7001 moveq #1,%d0 <== NOT EXECUTED 57410: 1540 0076 moveb %d0,%a2@(118) <== NOT EXECUTED 57414: 6040 bras 57456 <== 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)); 57416: 49fa fc3c lea %pc@(57054 ),%a4 <== NOT EXECUTED 5741a: 0285 0fff ffff andil #268435455,%d5 <== NOT EXECUTED 57420: 2f05 movel %d5,%sp@- <== NOT EXECUTED 57422: 4e94 jsr %a4@ <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 57424: 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)); 57428: 2400 movel %d0,%d2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 5742a: 2668 001e moveal %a0@(30),%a3 <== NOT EXECUTED 5742e: d7c3 addal %d3,%a3 <== NOT EXECUTED 57430: 2ebc f000 0000 movel #-268435456,%sp@ <== NOT EXECUTED 57436: 4e94 jsr %a4@ <== NOT EXECUTED 57438: 588f addql #4,%sp <== NOT EXECUTED 5743a: c093 andl %a3@,%d0 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 5743c: 8082 orl %d2,%d0 <== NOT EXECUTED 5743e: 2680 movel %d0,%a3@ <== NOT EXECUTED 57440: 7201 moveq #1,%d1 <== NOT EXECUTED 57442: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED 57446: 600e bras 57456 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 57448: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 5744e: 78ff moveq #-1,%d4 <== NOT EXECUTED 57450: 7205 moveq #5,%d1 <== NOT EXECUTED 57452: 2040 moveal %d0,%a0 <== NOT EXECUTED 57454: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return RC_OK; } 57456: 2004 movel %d4,%d0 57458: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4 5745e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00050c94 : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 50c94: 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) { 50c96: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 50c9a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 50c9e: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 50ca2: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 50ca6: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 50caa: 44c0 movew %d0,%ccr <== NOT EXECUTED 50cac: 661c bnes 50cca <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 50cae: 2f2a 003e movel %a2@(62),%sp@- <== NOT EXECUTED 50cb2: 2f2a 003a movel %a2@(58),%sp@- <== NOT EXECUTED 50cb6: 2f08 movel %a0,%sp@- <== NOT EXECUTED 50cb8: 4eb9 0005 0c16 jsr 50c16 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 50cbe: 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, 50cc2: 2400 movel %d0,%d2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 50cc4: 6706 beqs 50ccc <== NOT EXECUTED rc = -1; 50cc6: 74ff moveq #-1,%d2 <== NOT EXECUTED 50cc8: 6002 bras 50ccc <== NOT EXECUTED * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { int rc = RC_OK; 50cca: 4282 clrl %d2 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 50ccc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 50cce: 4eb9 0005 0780 jsr 50780 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 50cd4: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 50cd8: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 50cdc: 4eb9 0004 f446 jsr 4f446 <== NOT EXECUTED 50ce2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 50ce6: 4a80 tstl %d0 <== NOT EXECUTED 50ce8: 6702 beqs 50cec <== NOT EXECUTED rc = -1; 50cea: 74ff moveq #-1,%d2 <== NOT EXECUTED 50cec: 4283 clrl %d3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 50cee: 49f9 0004 9a64 lea 49a64 <_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); 50cf4: 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; 50cfa: 282a 005a movel %a2@(90),%d4 <== NOT EXECUTED 50cfe: d883 addl %d3,%d4 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 50d00: 6006 bras 50d08 <== NOT EXECUTED free(node); 50d02: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50d04: 4e93 jsr %a3@ <== NOT EXECUTED 50d06: 588f addql #4,%sp <== NOT EXECUTED 50d08: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50d0a: 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 ) 50d0c: 588f addql #4,%sp <== NOT EXECUTED 50d0e: 4a80 tstl %d0 <== NOT EXECUTED 50d10: 66f0 bnes 50d02 <== NOT EXECUTED 50d12: 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++) 50d18: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 50d1c: b083 cmpl %d3,%d0 <== NOT EXECUTED 50d1e: 66da bnes 50cfa <== NOT EXECUTED 50d20: 4283 clrl %d3 <== NOT EXECUTED 50d22: 49f9 0004 9a64 lea 49a64 <_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); 50d28: 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; 50d2e: 282a 005e movel %a2@(94),%d4 <== NOT EXECUTED 50d32: d883 addl %d3,%d4 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 50d34: 6006 bras 50d3c <== NOT EXECUTED free(node); 50d36: 2f00 movel %d0,%sp@- <== NOT EXECUTED 50d38: 4e93 jsr %a3@ <== NOT EXECUTED 50d3a: 588f addql #4,%sp <== NOT EXECUTED 50d3c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 50d3e: 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 ) 50d40: 588f addql #4,%sp <== NOT EXECUTED 50d42: 4a80 tstl %d0 <== NOT EXECUTED 50d44: 66f0 bnes 50d36 <== NOT EXECUTED 50d46: 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++) 50d4c: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 50d50: b083 cmpl %d3,%d0 <== NOT EXECUTED 50d52: 66da bnes 50d2e <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 50d54: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 50d58: 47f9 0004 54d0 lea 454d0 ,%a3 <== NOT EXECUTED 50d5e: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 50d60: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 50d64: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 50d66: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 50d6a: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->sec_buf); 50d6c: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 50d70: 4e93 jsr %a3@ <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 50d72: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 50d76: 4eb9 0004 4522 jsr 44522 <== NOT EXECUTED if (rc) 50d7c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 50d80: 4a82 tstl %d2 <== NOT EXECUTED 50d82: 670c beqs 50d90 <== NOT EXECUTED errno = EIO; 50d84: 4eb9 0005 8b98 jsr 58b98 <__errno> <== NOT EXECUTED 50d8a: 7205 moveq #5,%d1 <== NOT EXECUTED 50d8c: 2040 moveal %d0,%a0 <== NOT EXECUTED 50d8e: 2081 movel %d1,%a0@ <== NOT EXECUTED return rc; } 50d90: 2002 movel %d2,%d0 <== NOT EXECUTED 50d92: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 50d98: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bc88 : int fcntl( int fd, int cmd, ... ) { 5bc88: 4e56 fff0 linkw %fp,#-16 5bc8c: 202e 0008 movel %fp@(8),%d0 5bc90: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 5bc94: 262e 000c movel %fp@(12),%d3 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 5bc98: 2239 0005 eca2 movel 5eca2 ,%d1 5bc9e: b280 cmpl %d0,%d1 5bca0: 631c blss 5bcbe iop = rtems_libio_iop( fd ); 5bca2: 2400 movel %d0,%d2 5bca4: ed88 lsll #6,%d0 5bca6: e78a lsll #3,%d2 5bca8: 2679 0006 0494 moveal 60494 ,%a3 5bcae: 9082 subl %d2,%d0 5bcb0: 45f3 0800 lea %a3@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 5bcb4: 202a 0014 movel %a2@(20),%d0 5bcb8: 0800 0008 btst #8,%d0 5bcbc: 6610 bnes 5bcce 5bcbe: 4eb9 0004 d9cc jsr 4d9cc <__errno> 5bcc4: 7209 moveq #9,%d1 5bcc6: 2040 moveal %d0,%a0 5bcc8: 2081 movel %d1,%a0@ 5bcca: 6000 0116 braw 5bde2 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5bcce: 7409 moveq #9,%d2 5bcd0: b483 cmpl %d3,%d2 5bcd2: 6500 00de bcsw 5bdb2 5bcd6: 307b 3a06 moveaw %pc@(5bcde ,%d3:l:2),%a0 5bcda: 4efb 8802 jmp %pc@(5bcde ,%a0:l) 5bcde: 0014 .short 0x0014 <== NOT EXECUTED 5bce0: 006e .short 0x006e <== NOT EXECUTED 5bce2: 007a .short 0x007a <== NOT EXECUTED 5bce4: 0090 009e 00c4 oril #10354884,%d0 <== NOT EXECUTED 5bcea: 00c4 bitrev %d4 <== NOT EXECUTED 5bcec: 00c4 bitrev %d4 <== NOT EXECUTED 5bcee: 00c4 bitrev %d4 <== NOT EXECUTED 5bcf0: 00c4 bitrev %d4 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 5bcf2: 242e 0010 movel %fp@(16),%d2 if ( fd2 ) 5bcf6: 6710 beqs 5bd08 diop = rtems_libio_iop( fd2 ); 5bcf8: b282 cmpl %d2,%d1 5bcfa: 631c blss 5bd18 <== NEVER TAKEN 5bcfc: 2002 movel %d2,%d0 5bcfe: ed8a lsll #6,%d2 5bd00: e788 lsll #3,%d0 5bd02: 9480 subl %d0,%d2 5bd04: d7c2 addal %d2,%a3 5bd06: 6012 bras 5bd1a else { /* allocate a file control block */ diop = rtems_libio_allocate(); 5bd08: 4eb9 0004 358c jsr 4358c 5bd0e: 2640 moveal %d0,%a3 if ( diop == 0 ) { 5bd10: 4a80 tstl %d0 5bd12: 6606 bnes 5bd1a <== ALWAYS TAKEN 5bd14: 6000 00cc braw 5bde2 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 5bd18: 97cb subal %a3,%a3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5bd1a: 240b movel %a3,%d2 ret = -1; break; } } diop->flags = iop->flags; 5bd1c: 276a 0014 0014 movel %a2@(20),%a3@(20) diop->pathinfo = iop->pathinfo; 5bd22: 4878 0014 pea 14 5bd26: 486a 0018 pea %a2@(24) 5bd2a: 486b 0018 pea %a3@(24) 5bd2e: 4eb9 0004 e6bc jsr 4e6bc ret = (int) (diop - rtems_libio_iops); 5bd34: 4fef 000c lea %sp@(12),%sp 5bd38: 94b9 0006 0494 subl 60494 ,%d2 5bd3e: 203c b6db 6db7 movel #-1227133513,%d0 5bd44: e682 asrl #3,%d2 5bd46: 4c00 2800 mulsl %d0,%d2 5bd4a: 6074 bras 5bdc0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 5bd4c: 0800 000b btst #11,%d0 5bd50: 56c2 sne %d2 5bd52: 49c2 extbl %d2 5bd54: 4482 negl %d2 5bd56: 606c bras 5bdc4 * 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 ) ) 5bd58: 4aae 0010 tstl %fp@(16) 5bd5c: 6706 beqs 5bd64 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 5bd5e: 08c0 000b bset #11,%d0 5bd62: 6004 bras 5bd68 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 5bd64: 0880 000b bclr #11,%d0 5bd68: 2540 0014 movel %d0,%a2@(20) 5bd6c: 6030 bras 5bd9e break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 5bd6e: 2f00 movel %d0,%sp@- 5bd70: 4eb9 0004 353e jsr 4353e 5bd76: 588f addql #4,%sp 5bd78: 2400 movel %d0,%d2 5bd7a: 6044 bras 5bdc0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5bd7c: 2f2e 0010 movel %fp@(16),%sp@- 5bd80: 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); 5bd86: 222a 0014 movel %a2@(20),%d1 5bd8a: 588f addql #4,%sp 5bd8c: 0280 0000 0201 andil #513,%d0 5bd92: 0281 ffff fdfe andil #-514,%d1 5bd98: 8081 orl %d1,%d0 5bd9a: 2540 0014 movel %d0,%a2@(20) rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5bd9e: 4282 clrl %d2 5bda0: 6022 bras 5bdc4 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5bda2: 4eb9 0004 d9cc jsr 4d9cc <__errno> 5bda8: 2040 moveal %d0,%a0 5bdaa: 20bc 0000 0086 movel #134,%a0@ 5bdb0: 6030 bras 5bde2 ret = -1; break; default: errno = EINVAL; 5bdb2: 4eb9 0004 d9cc jsr 4d9cc <__errno> 5bdb8: 2040 moveal %d0,%a0 5bdba: 7016 moveq #22,%d0 5bdbc: 2080 movel %d0,%a0@ 5bdbe: 6022 bras 5bde2 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5bdc0: 4a82 tstl %d2 5bdc2: 6d20 blts 5bde4 <== NEVER TAKEN int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 5bdc4: 206a 0020 moveal %a2@(32),%a0 5bdc8: 2f0a movel %a2,%sp@- 5bdca: 2f03 movel %d3,%sp@- 5bdcc: 2068 0030 moveal %a0@(48),%a0 5bdd0: 4e90 jsr %a0@ if (err) { 5bdd2: 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 ); 5bdd4: 2600 movel %d0,%d3 if (err) { 5bdd6: 670c beqs 5bde4 <== ALWAYS TAKEN errno = err; 5bdd8: 4eb9 0004 d9cc jsr 4d9cc <__errno> <== NOT EXECUTED 5bdde: 2040 moveal %d0,%a0 <== NOT EXECUTED 5bde0: 2083 movel %d3,%a0@ <== NOT EXECUTED ret = -1; 5bde2: 74ff moveq #-1,%d2 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5bde4: 2002 movel %d2,%d0 5bde6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 5bdec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b726 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4b726: 4e56 ffd8 linkw %fp,#-40 4b72a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4b72e: 266e 0008 moveal %fp@(8),%a3 4b732: 286e 000c moveal %fp@(12),%a4 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4b736: 4ab9 0006 04a8 tstl 604a8 4b73c: 6656 bnes 4b794 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 ); 4b73e: 42a7 clrl %sp@- 4b740: 42a7 clrl %sp@- 4b742: 2f39 0006 0ba0 movel 60ba0 ,%sp@- 4b748: 4eb9 0004 766c jsr 4766c rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4b74e: 4fef 000c lea %sp@(12),%sp 4b752: 4ab9 0006 04a8 tstl 604a8 4b758: 6624 bnes 4b77e <== NEVER TAKEN sc = rtems_semaphore_create( 4b75a: 4879 0006 04a8 pea 604a8 4b760: 42a7 clrl %sp@- 4b762: 4878 0054 pea 54 4b766: 4878 0001 pea 1 4b76a: 2f3c 5049 5045 movel #1346981957,%sp@- 4b770: 4eb9 0004 7430 jsr 47430 4b776: 4fef 0014 lea %sp@(20),%sp 4b77a: 2400 movel %d0,%d2 4b77c: 6002 bras 4b780 free(pipe); } static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; 4b77e: 4282 clrl %d2 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4b780: 2f39 0006 0ba0 movel 60ba0 ,%sp@- 4b786: 4eb9 0004 7778 jsr 47778 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4b78c: 588f addql #4,%sp 4b78e: 4a82 tstl %d2 4b790: 6600 0362 bnew 4baf4 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4b794: 42a7 clrl %sp@- 4b796: 42a7 clrl %sp@- 4b798: 2f39 0006 04a8 movel 604a8 ,%sp@- 4b79e: 4eb9 0004 766c jsr 4766c } if (sc == RTEMS_SUCCESSFUL) { 4b7a4: 4fef 000c lea %sp@(12),%sp 4b7a8: 4a80 tstl %d0 4b7aa: 6600 0348 bnew 4baf4 err = pipe_lock(); if (err) return err; pipe = *pipep; 4b7ae: 2453 moveal %a3@,%a2 if (pipe == NULL) { 4b7b0: 4a8a tstl %a2 4b7b2: 6600 015c bnew 4b910 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b7b6: 4878 0034 pea 34 4b7ba: 4bf9 0004 49e0 lea 449e0 ,%a5 4b7c0: 4e95 jsr %a5@ if (pipe == NULL) 4b7c2: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4b7c4: 2440 moveal %d0,%a2 if (pipe == NULL) 4b7c6: 4a80 tstl %d0 4b7c8: 6700 0142 beqw 4b90c return err; memset(pipe, 0, sizeof(pipe_control_t)); 4b7cc: 4878 0034 pea 34 4b7d0: 42a7 clrl %sp@- 4b7d2: 2f00 movel %d0,%sp@- 4b7d4: 4eb9 0004 fa70 jsr 4fa70 pipe->Size = PIPE_BUF; 4b7da: 203c 0000 0200 movel #512,%d0 4b7e0: 2540 0004 movel %d0,%a2@(4) pipe->Buffer = malloc(pipe->Size); 4b7e4: 4878 0200 pea 200 4b7e8: 4e95 jsr %a5@ if (! pipe->Buffer) 4b7ea: 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); 4b7ee: 2480 movel %d0,%a2@ if (! pipe->Buffer) 4b7f0: 6700 0110 beqw 4b902 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b7f4: 486a 002c pea %a2@(44) 4b7f8: 4bf9 0004 cee8 lea 4cee8 ,%a5 rtems_build_name ('P', 'I', 'r', c), 4b7fe: 1039 0005 f558 moveb 5f558 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b804: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4b806: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4b808: 42a7 clrl %sp@- 4b80a: 0080 5049 7200 oril #1346990592,%d0 4b810: 2f00 movel %d0,%sp@- 4b812: 4e95 jsr %a5@ 4b814: 4fef 0010 lea %sp@(16),%sp 4b818: 4a80 tstl %d0 4b81a: 6600 00dc bnew 4b8f8 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4b81e: 486a 0030 pea %a2@(48) rtems_build_name ('P', 'I', 'w', c), 4b822: 1039 0005 f558 moveb 5f558 ,%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( 4b828: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4b82a: 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( 4b82c: 42a7 clrl %sp@- 4b82e: 0080 5049 7700 oril #1346991872,%d0 4b834: 2f00 movel %d0,%sp@- 4b836: 4e95 jsr %a5@ 4b838: 4fef 0010 lea %sp@(16),%sp 4b83c: 4a80 tstl %d0 4b83e: 6600 00ac bnew 4b8ec rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4b842: 486a 0028 pea %a2@(40) rtems_build_name ('P', 'I', 's', c), 1, 4b846: 1039 0005 f558 moveb 5f558 ,%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( 4b84c: 42a7 clrl %sp@- 4b84e: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4b852: 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( 4b854: 4878 0001 pea 1 4b858: 0080 5049 7300 oril #1346990848,%d0 4b85e: 2f00 movel %d0,%sp@- 4b860: 4eb9 0004 7430 jsr 47430 4b866: 4fef 0014 lea %sp@(20),%sp 4b86a: 4a80 tstl %d0 4b86c: 6672 bnes 4b8e0 /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 4b86e: 260e movel %fp,%d3 4b870: 5983 subql #4,%d3 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 4b872: 243c 0004 8d38 movel #298296,%d2 4b878: 2042 moveal %d2,%a0 |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 4b87a: 4bf9 0004 997c lea 4997c <_Thread_Enable_dispatch>,%a5 4b880: 2f03 movel %d3,%sp@- 4b882: 2f2a 002c movel %a2@(44),%sp@- 4b886: 4879 0006 1528 pea 61528 <_Barrier_Information> 4b88c: 4e90 jsr %a0@ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4b88e: 223c 1000 0000 movel #268435456,%d1 4b894: 2040 moveal %d0,%a0 4b896: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4b89a: 4e95 jsr %a5@ 4b89c: 2042 moveal %d2,%a0 4b89e: 2f03 movel %d3,%sp@- 4b8a0: 2f2a 0030 movel %a2@(48),%sp@- 4b8a4: 4879 0006 1528 pea 61528 <_Barrier_Information> 4b8aa: 4e90 jsr %a0@ _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 4b8ac: 223c 1000 0000 movel #268435456,%d1 4b8b2: 2040 moveal %d0,%a0 4b8b4: 83a8 004c orl %d1,%a0@(76) _Thread_Enable_dispatch(); 4b8b8: 4e95 jsr %a5@ #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4b8ba: 4fef 0018 lea %sp@(24),%sp 4b8be: 1039 0005 f558 moveb 5f558 ,%d0 4b8c4: 49c0 extbl %d0 4b8c6: 2200 movel %d0,%d1 4b8c8: 5281 addql #1,%d1 4b8ca: 13c1 0005 f558 moveb %d1,5f558 4b8d0: 727a moveq #122,%d1 4b8d2: b280 cmpl %d0,%d1 4b8d4: 663a bnes 4b910 c = 'a'; 4b8d6: 7061 moveq #97,%d0 4b8d8: 13c0 0005 f558 moveb %d0,5f558 4b8de: 6030 bras 4b910 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4b8e0: 2f2a 0030 movel %a2@(48),%sp@- 4b8e4: 4eb9 0004 cfa4 jsr 4cfa4 4b8ea: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4b8ec: 2f2a 002c movel %a2@(44),%sp@- 4b8f0: 4eb9 0004 cfa4 jsr 4cfa4 4b8f6: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4b8f8: 2f12 movel %a2@,%sp@- 4b8fa: 4eb9 0004 42dc jsr 442dc 4b900: 588f addql #4,%sp err_buf: free(pipe); 4b902: 2f0a movel %a2,%sp@- 4b904: 4eb9 0004 42dc jsr 442dc 4b90a: 588f addql #4,%sp if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4b90c: 74f4 moveq #-12,%d2 4b90e: 6030 bras 4b940 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4b910: 42a7 clrl %sp@- 4b912: 42a7 clrl %sp@- 4b914: 2f2a 0028 movel %a2@(40),%sp@- 4b918: 4eb9 0004 766c jsr 4766c 4b91e: 4fef 000c lea %sp@(12),%sp 4b922: 4a80 tstl %d0 4b924: 6604 bnes 4b92a <== NEVER TAKEN 4b926: 4282 clrl %d2 4b928: 6002 bras 4b92c err = -EINTR; 4b92a: 74fc moveq #-4,%d2 <== NOT EXECUTED if (*pipep == NULL) { 4b92c: 4a93 tstl %a3@ 4b92e: 6610 bnes 4b940 if (err) 4b930: 4a82 tstl %d2 4b932: 670a beqs 4b93e <== ALWAYS TAKEN pipe_free(pipe); 4b934: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b936: 4eba fd14 jsr %pc@(4b64c ) <== NOT EXECUTED 4b93a: 588f addql #4,%sp <== NOT EXECUTED 4b93c: 6002 bras 4b940 <== NOT EXECUTED else *pipep = pipe; 4b93e: 268a movel %a2,%a3@ static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4b940: 2f39 0006 04a8 movel 604a8 ,%sp@- 4b946: 4eb9 0004 7778 jsr 47778 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4b94c: 588f addql #4,%sp 4b94e: 4a82 tstl %d2 4b950: 6600 01a4 bnew 4baf6 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4b954: 7006 moveq #6,%d0 4b956: 7204 moveq #4,%d1 4b958: c0ac 0014 andl %a4@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4b95c: 2453 moveal %a3@,%a2 switch (LIBIO_ACCMODE(iop)) { 4b95e: b280 cmpl %d0,%d1 4b960: 6700 009c beqw 4b9fe 4b964: 123c 0006 moveb #6,%d1 4b968: b280 cmpl %d0,%d1 4b96a: 6700 0122 beqw 4ba8e 4b96e: 123c 0002 moveb #2,%d1 4b972: b280 cmpl %d0,%d1 4b974: 6600 0160 bnew 4bad6 case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4b978: 202a 0010 movel %a2@(16),%d0 4b97c: 2040 moveal %d0,%a0 4b97e: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4b980: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4b984: 2548 0010 movel %a0,%a2@(16) 4b988: 4a80 tstl %d0 4b98a: 6610 bnes 4b99c <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4b98c: 486e fff8 pea %fp@(-8) 4b990: 2f2a 0030 movel %a2@(48),%sp@- 4b994: 4eb9 0004 d040 jsr 4d040 4b99a: 508f addql #8,%sp if (pipe->Writers == 0) { 4b99c: 4aaa 0014 tstl %a2@(20) 4b9a0: 6600 0134 bnew 4bad6 /* Not an error */ if (LIBIO_NODELAY(iop)) 4b9a4: 7001 moveq #1,%d0 4b9a6: c0ac 0014 andl %a4@(20),%d0 4b9aa: 6600 012a bnew 4bad6 break; prevCounter = pipe->writerCounter; 4b9ae: 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)) 4b9b2: 4bf9 0004 766c lea 4766c ,%a5 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b9b8: 283c 0004 7778 movel #292728,%d4 if (! PIPE_READWAIT(pipe)) 4b9be: 263c 0004 d0a4 movel #315556,%d3 prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4b9c4: 2f2a 0028 movel %a2@(40),%sp@- 4b9c8: 2044 moveal %d4,%a0 4b9ca: 4e90 jsr %a0@ if (! PIPE_READWAIT(pipe)) 4b9cc: 2043 moveal %d3,%a0 4b9ce: 42a7 clrl %sp@- 4b9d0: 2f2a 002c movel %a2@(44),%sp@- 4b9d4: 4e90 jsr %a0@ 4b9d6: 4fef 000c lea %sp@(12),%sp 4b9da: 4a80 tstl %d0 4b9dc: 6600 0106 bnew 4bae4 goto out_error; if (! PIPE_LOCK(pipe)) 4b9e0: 42a7 clrl %sp@- 4b9e2: 42a7 clrl %sp@- 4b9e4: 2f2a 0028 movel %a2@(40),%sp@- 4b9e8: 4e95 jsr %a5@ 4b9ea: 4fef 000c lea %sp@(12),%sp 4b9ee: 4a80 tstl %d0 4b9f0: 6600 00f2 bnew 4bae4 goto out_error; } while (prevCounter == pipe->writerCounter); 4b9f4: baaa 0024 cmpl %a2@(36),%d5 4b9f8: 67ca beqs 4b9c4 <== NEVER TAKEN 4b9fa: 6000 00da braw 4bad6 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4b9fe: 202a 0014 movel %a2@(20),%d0 4ba02: 2200 movel %d0,%d1 4ba04: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4ba06: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4ba0a: 2541 0014 movel %d1,%a2@(20) 4ba0e: 4a80 tstl %d0 4ba10: 6610 bnes 4ba22 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4ba12: 486e fff8 pea %fp@(-8) 4ba16: 2f2a 002c movel %a2@(44),%sp@- 4ba1a: 4eb9 0004 d040 jsr 4d040 4ba20: 508f addql #8,%sp if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4ba22: 4aaa 0010 tstl %a2@(16) 4ba26: 6600 00ae bnew 4bad6 4ba2a: 7001 moveq #1,%d0 4ba2c: c0ac 0014 andl %a4@(20),%d0 4ba30: 6712 beqs 4ba44 PIPE_UNLOCK(pipe); 4ba32: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4ba36: 74fa moveq #-6,%d2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4ba38: 4eb9 0004 7778 jsr 47778 err = -ENXIO; goto out_error; 4ba3e: 588f addql #4,%sp 4ba40: 6000 00a4 braw 4bae6 } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4ba44: 2a2a 0020 movel %a2@(32),%d5 err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 4ba48: 4bf9 0004 766c lea 4766c ,%a5 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ba4e: 283c 0004 7778 movel #292728,%d4 if (! PIPE_WRITEWAIT(pipe)) 4ba54: 263c 0004 d0a4 movel #315556,%d3 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 4ba5a: 2f2a 0028 movel %a2@(40),%sp@- 4ba5e: 2044 moveal %d4,%a0 4ba60: 4e90 jsr %a0@ if (! PIPE_WRITEWAIT(pipe)) 4ba62: 2043 moveal %d3,%a0 4ba64: 42a7 clrl %sp@- 4ba66: 2f2a 0030 movel %a2@(48),%sp@- 4ba6a: 4e90 jsr %a0@ 4ba6c: 4fef 000c lea %sp@(12),%sp 4ba70: 4a80 tstl %d0 4ba72: 6670 bnes 4bae4 <== NEVER TAKEN goto out_error; if (! PIPE_LOCK(pipe)) 4ba74: 42a7 clrl %sp@- 4ba76: 42a7 clrl %sp@- 4ba78: 2f2a 0028 movel %a2@(40),%sp@- 4ba7c: 4e95 jsr %a5@ 4ba7e: 4fef 000c lea %sp@(12),%sp 4ba82: 4a80 tstl %d0 4ba84: 665e bnes 4bae4 <== NEVER TAKEN goto out_error; } while (prevCounter == pipe->readerCounter); 4ba86: baaa 0020 cmpl %a2@(32),%d5 4ba8a: 67ce beqs 4ba5a <== NEVER TAKEN 4ba8c: 6048 bras 4bad6 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4ba8e: 202a 0010 movel %a2@(16),%d0 4ba92: 2200 movel %d0,%d1 4ba94: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4ba96: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4ba9a: 2541 0010 movel %d1,%a2@(16) 4ba9e: 4a80 tstl %d0 4baa0: 6610 bnes 4bab2 <== NEVER TAKEN PIPE_WAKEUPWRITERS(pipe); 4baa2: 486e fff8 pea %fp@(-8) 4baa6: 2f2a 0030 movel %a2@(48),%sp@- 4baaa: 4eb9 0004 d040 jsr 4d040 4bab0: 508f addql #8,%sp pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4bab2: 202a 0014 movel %a2@(20),%d0 4bab6: 2040 moveal %d0,%a0 4bab8: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4baba: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4babe: 2548 0014 movel %a0,%a2@(20) 4bac2: 4a80 tstl %d0 4bac4: 6610 bnes 4bad6 <== NEVER TAKEN PIPE_WAKEUPREADERS(pipe); 4bac6: 486e fff8 pea %fp@(-8) 4baca: 2f2a 002c movel %a2@(44),%sp@- 4bace: 4eb9 0004 d040 jsr 4d040 4bad4: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4bad6: 2f2a 0028 movel %a2@(40),%sp@- 4bada: 4eb9 0004 7778 jsr 47778 return 0; 4bae0: 588f addql #4,%sp 4bae2: 6012 bras 4baf6 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4bae4: 74fc moveq #-4,%d2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4bae6: 2f0c movel %a4,%sp@- 4bae8: 2f0b movel %a3,%sp@- 4baea: 4eb9 0004 b694 jsr 4b694 return err; 4baf0: 508f addql #8,%sp 4baf2: 6002 bras 4baf6 if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { 4baf4: 74f4 moveq #-12,%d2 return 0; out_error: pipe_release(pipep, iop); return err; } 4baf6: 2002 movel %d2,%d0 4baf8: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4bafe: 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 eb12 cmpl 5eb12 ,%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 0006 0274 moveal 60274 ,%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 dadc jsr 4dadc <__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 dadc jsr 4dadc <__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 ea68 addql #1,5ea68 #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 ecdc cmpl 5ecdc <_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 da14 moveal 5da14 ,%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 d29a movel 5d29a ,%sp@- 42bba: 4eb9 0004 73ec jsr 473ec <_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 d29a moveal 5d29a ,%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 c244 pea 5c244 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 16a4 cmpal #399012,%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 eb12 cmpl 5eb12 ,%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 0006 0274 moveal 60274 ,%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 dadc jsr 4dadc <__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@ ... =============================================================================== 00049d5c : int ftruncate( int fd, off_t length ) { 49d5c: 4e56 ffec linkw %fp,#-20 49d60: 202e 0008 movel %fp@(8),%d0 49d64: 2f0a movel %a2,%sp@- 49d66: 2f02 movel %d2,%sp@- rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 49d68: b0b9 0005 d2e2 cmpl 5d2e2 ,%d0 49d6e: 641a bccs 49d8a <== NEVER TAKEN iop = rtems_libio_iop( fd ); 49d70: 2200 movel %d0,%d1 49d72: ed88 lsll #6,%d0 49d74: e789 lsll #3,%d1 49d76: 2479 0005 ea44 moveal 5ea44 ,%a2 49d7c: 9081 subl %d1,%d0 49d7e: d5c0 addal %d0,%a2 rtems_libio_check_is_open(iop); 49d80: 202a 0014 movel %a2@(20),%d0 49d84: 0800 0008 btst #8,%d0 49d88: 660e bnes 49d98 49d8a: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49d90: 7409 moveq #9,%d2 49d92: 2040 moveal %d0,%a0 49d94: 2082 movel %d2,%a0@ 49d96: 604c bras 49de4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 49d98: 44c0 movew %d0,%ccr 49d9a: 670e beqs 49daa 49d9c: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49da2: 7216 moveq #22,%d1 49da4: 2040 moveal %d0,%a0 49da6: 2081 movel %d1,%a0@ 49da8: 603a bras 49de4 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 49daa: 4878 0014 pea 14 49dae: 240e movel %fp,%d2 49db0: 486a 0018 pea %a2@(24) 49db4: 0682 ffff ffec addil #-20,%d2 49dba: 2f02 movel %d2,%sp@- 49dbc: 4eb9 0004 d588 jsr 4d588 if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 49dc2: 206e fff8 moveal %fp@(-8),%a0 49dc6: 2f02 movel %d2,%sp@- 49dc8: 2068 0010 moveal %a0@(16),%a0 49dcc: 4e90 jsr %a0@ 49dce: 4fef 0010 lea %sp@(16),%sp 49dd2: 7201 moveq #1,%d1 49dd4: b280 cmpl %d0,%d1 49dd6: 6610 bnes 49de8 rtems_set_errno_and_return_minus_one( EISDIR ); 49dd8: 4eb9 0004 cd68 jsr 4cd68 <__errno> 49dde: 2040 moveal %d0,%a0 49de0: 7015 moveq #21,%d0 49de2: 2080 movel %d0,%a0@ 49de4: 70ff moveq #-1,%d0 49de6: 6018 bras 49e00 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 49de8: 206a 0020 moveal %a2@(32),%a0 49dec: 2f2e 0010 movel %fp@(16),%sp@- 49df0: 2f2e 000c movel %fp@(12),%sp@- 49df4: 2f0a movel %a2,%sp@- 49df6: 2068 0020 moveal %a0@(32),%a0 49dfa: 4e90 jsr %a0@ 49dfc: 4fef 000c lea %sp@(12),%sp } 49e00: 242e ffe4 movel %fp@(-28),%d2 49e04: 246e ffe8 moveal %fp@(-24),%a2 49e08: 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 15ca cmpl 615ca ,%d2 4244a: 6432 bccs 4247e <== NEVER TAKEN 4244c: 2239 0006 15ce movel 615ce ,%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 =============================================================================== 0005bed4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5bed4: 4e56 ffec linkw %fp,#-20 5bed8: 202e 0008 movel %fp@(8),%d0 5bedc: 2f0a movel %a2,%sp@- 5bede: 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 ); 5bee0: b0b9 0005 eca2 cmpl 5eca2 ,%d0 5bee6: 6412 bccs 5befa <== NEVER TAKEN 5bee8: 2200 movel %d0,%d1 5beea: ed88 lsll #6,%d0 5beec: e789 lsll #3,%d1 5beee: 2479 0006 0494 moveal 60494 ,%a2 5bef4: 9081 subl %d1,%d0 5bef6: d5c0 addal %d0,%a2 5bef8: 6002 bras 5befc 5befa: 95ca subal %a2,%a2 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5befc: 4878 0014 pea 14 5bf00: 240e movel %fp,%d2 5bf02: 486a 0018 pea %a2@(24) 5bf06: 0682 ffff ffec addil #-20,%d2 5bf0c: 2f02 movel %d2,%sp@- 5bf0e: 4eb9 0004 e6bc jsr 4e6bc if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5bf14: 206e fff8 moveal %fp@(-8),%a0 5bf18: 2f02 movel %d2,%sp@- 5bf1a: 2068 0010 moveal %a0@(16),%a0 5bf1e: 4e90 jsr %a0@ 5bf20: 4fef 0010 lea %sp@(16),%sp 5bf24: 7201 moveq #1,%d1 5bf26: b280 cmpl %d0,%d1 5bf28: 6710 beqs 5bf3a rtems_set_errno_and_return_minus_one( ENOTDIR ); 5bf2a: 4eb9 0004 d9cc jsr 4d9cc <__errno> 5bf30: 2040 moveal %d0,%a0 5bf32: 7014 moveq #20,%d0 5bf34: 2080 movel %d0,%a0@ 5bf36: 70ff moveq #-1,%d0 5bf38: 6018 bras 5bf52 /* * 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 ); 5bf3a: 206a 0020 moveal %a2@(32),%a0 5bf3e: 2f2e 0010 movel %fp@(16),%sp@- 5bf42: 2f2e 000c movel %fp@(12),%sp@- 5bf46: 2f0a movel %a2,%sp@- 5bf48: 2068 0008 moveal %a0@(8),%a0 5bf4c: 4e90 jsr %a0@ 5bf4e: 4fef 000c lea %sp@(12),%sp } 5bf52: 242e ffe4 movel %fp@(-28),%d2 5bf56: 246e ffe8 moveal %fp@(-24),%a2 5bf5a: 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 e19f pea 5e19f <_global_impure_ptr+0xc7> 43410: 4879 0005 d930 pea 5d930 43416: 4eb9 0004 e0f2 jsr 4e0f2 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 d8fc jsr 4d8fc <__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 f7e0 lea 4f7e0 ,%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 da30 jsr 4da30 *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 da30 jsr 4da30 rtems_set_errno_and_return_minus_one( EINVAL ); 4348a: 4eb9 0004 d8fc jsr 4d8fc <__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 =============================================================================== 0004c1c4 : 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 ) 4c1c4: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4c1c6: 4e56 0000 linkw %fp,#0 4c1ca: 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 ) 4c1ce: 2268 0018 moveal %a0@(24),%a1 4c1d2: b0a9 0048 cmpl %a1@(72),%d0 4c1d6: 6610 bnes 4c1e8 <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4c1d8: 4280 clrl %d0 4c1da: 4281 clrl %d1 4c1dc: 2140 000c movel %d0,%a0@(12) 4c1e0: 2141 0010 movel %d1,%a0@(16) return 0; 4c1e4: 4280 clrl %d0 4c1e6: 6002 bras 4c1ea /* 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 */ 4c1e8: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4c1ea: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c1ee : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4c1ee: 4e56 fec0 linkw %fp,#-320 4c1f2: 222e 0010 movel %fp@(16),%d1 4c1f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c1fa: 266e 0008 moveal %fp@(8),%a3 int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; 4c1fe: 206b 0018 moveal %a3@(24),%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4c202: 2008 movel %a0,%d0 4c204: 0680 0000 0050 addil #80,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4c20a: 2468 004c moveal %a0@(76),%a2 the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 4c20e: b08a cmpl %a2,%d0 4c210: 6700 00c2 beqw 4c2d4 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4c214: 263c 0000 0110 movel #272,%d3 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 4c21a: 280e movel %fp,%d4 4c21c: 0684 ffff fef0 addil #-272,%d4 4c222: 2e04 movel %d4,%d7 4c224: 0687 0000 0010 addil #16,%d7 4c22a: 4bf9 0004 dbcc lea 4dbcc ,%a5 memcpy( 4c230: 49f9 0004 d588 lea 4d588 ,%a4 bytes_transferred = 0; first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4c236: 4c43 1001 remul %d3,%d1,%d1 /* Move to the first of the desired directory entries */ the_node = rtems_chain_first( the_chain ); bytes_transferred = 0; first_entry = iop->offset; 4c23a: 2a2b 0010 movel %a3@(16),%d5 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4c23e: 2401 movel %d1,%d2 4c240: e189 lsll #8,%d1 4c242: e98a lsll #4,%d2 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 4c244: 2d40 fee8 movel %d0,%fp@(-280) 4c248: d282 addl %d2,%d1 4c24a: d285 addl %d5,%d1 return 0; /* Move to the first of the desired directory entries */ the_node = rtems_chain_first( the_chain ); bytes_transferred = 0; 4c24c: 4282 clrl %d2 first_entry = iop->offset; /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 4c24e: 2d41 feec movel %d1,%fp@(-276) /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; 4c252: 4243 clrw %d3 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 4c254: 6076 bras 4c2cc current_entry = 0; current_entry < last_entry; current_entry = current_entry + sizeof(struct dirent) ){ if ( rtems_chain_is_tail( the_chain, the_node ) ){ 4c256: b5ee fee8 cmpal %fp@(-280),%a2 4c25a: 677a beqs 4c2d6 <== NEVER TAKEN /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 4c25c: ba83 cmpl %d3,%d5 4c25e: 6e64 bgts 4c2c4 <== NEVER TAKEN /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 4c260: 2d6a 0034 fef0 movel %a2@(52),%fp@(-272) /* entries to return */ } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 4c266: 2d43 fef8 movel %d3,%fp@(-264) 4c26a: 5bc6 smi %d6 4c26c: 49c6 extbl %d6 4c26e: 2d46 fef4 movel %d6,%fp@(-268) tmp_dirent.d_reclen = sizeof( struct dirent ); 4c272: 307c 0110 moveaw #272,%a0 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4c276: 2c0a movel %a2,%d6 4c278: 0686 0000 000c addil #12,%d6 4c27e: 2f06 movel %d6,%sp@- } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 4c280: 3d48 fefc movew %a0,%fp@(-260) the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4c284: 4eb9 0004 e0d4 jsr 4e0d4 strcpy( tmp_dirent.d_name, the_jnode->name ); 4c28a: 2e86 movel %d6,%sp@ /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 4c28c: 3d40 fefe movew %d0,%fp@(-258) strcpy( tmp_dirent.d_name, the_jnode->name ); 4c290: 2f07 movel %d7,%sp@- 4c292: 4e95 jsr %a5@ memcpy( 4c294: 4878 0110 pea 110 4c298: 206e 000c moveal %fp@(12),%a0 4c29c: 2f04 movel %d4,%sp@- 4c29e: 4870 2800 pea %a0@(00000000,%d2:l) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4c2a2: 0682 0000 0110 addil #272,%d2 tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); memcpy( 4c2a8: 4e94 jsr %a4@ buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); 4c2aa: 4fef 0014 lea %sp@(20),%sp memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 4c2ae: 4280 clrl %d0 4c2b0: 223c 0000 0110 movel #272,%d1 4c2b6: d3ab 0010 addl %d1,%a3@(16) 4c2ba: 2c2b 000c movel %a3@(12),%d6 4c2be: dd80 addxl %d0,%d6 4c2c0: 2746 000c movel %d6,%a3@(12) bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 4c2c4: 2452 moveal %a2@,%a2 * to the end of the exisiting file, the remaining entries will be placed in * the buffer and the returned value will be equal to -m actual- times the * size of a directory entry. */ ssize_t imfs_dir_read( 4c2c6: 0683 0000 0110 addil #272,%d3 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( 4c2cc: b6ae feec cmpl %fp@(-276),%d3 4c2d0: 6d84 blts 4c256 <== NEVER TAKEN 4c2d2: 6002 bras 4c2d6 the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access; the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) return 0; 4c2d4: 4282 clrl %d2 the_node = the_node->next; } /* Success */ return bytes_transferred; } 4c2d6: 2002 movel %d2,%d0 4c2d8: 4cee 3cfc fec0 moveml %fp@(-320),%d2-%d7/%a2-%a5 4c2de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c402 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4c402: 4e56 0000 linkw %fp,#0 4c406: 206e 000c moveal %fp@(12),%a0 4c40a: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4c40c: 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 ); 4c40e: 200a movel %a2,%d0 4c410: 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 ) ) 4c416: b0aa 004c cmpl %a2@(76),%d0 4c41a: 670e beqs 4c42a rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4c41c: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4c422: 2040 moveal %d0,%a0 4c424: 705a moveq #90,%d0 4c426: 2080 movel %d0,%a0@ 4c428: 6016 bras 4c440 4c42a: 2068 0010 moveal %a0@(16),%a0 /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 4c42e: b5e8 001c cmpal %a0@(28),%a2 4c432: 6610 bnes 4c444 rtems_set_errno_and_return_minus_one( EBUSY ); 4c434: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4c43a: 7210 moveq #16,%d1 4c43c: 2040 moveal %d0,%a0 4c43e: 2081 movel %d1,%a0@ 4c440: 70ff moveq #-1,%d0 4c442: 601a bras 4c45e /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4c444: 4aaa 0058 tstl %a2@(88) 4c448: 66ea bnes 4c434 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4c44a: 2f0a movel %a2,%sp@- 4c44c: 4eb9 0004 9a3c jsr 49a3c IMFS_check_node_remove( the_jnode ); 4c452: 2f0a movel %a2,%sp@- 4c454: 4eb9 0004 9a80 jsr 49a80 return 0; 4c45a: 508f addql #8,%sp 4c45c: 4280 clrl %d0 } 4c45e: 246e fffc moveal %fp@(-4),%a2 4c462: 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 f940 tstb 5f940 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 e0f2 lea 4e0f2 ,%a2 static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; mkdir("/etc", 0777); 43324: 4879 0005 d8b6 pea 5d8b6 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 f940 moveb %d0,5f940 mkdir("/etc", 0777); 43332: 4eb9 0004 3b1c jsr 43b1c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 43338: 4879 0005 e19f pea 5e19f <_global_impure_ptr+0xc7> 4333e: 4879 0005 d8bb pea 5d8bb 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 da30 jsr 4da30 43356: 588f addql #4,%sp 43358: 602e bras 43388 } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 4335a: 4879 0005 d8c7 pea 5d8c7 43360: 4879 0005 d8bb pea 5d8bb 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 d8c9 pea 5d8c9 43376: 4eb9 0004 e1d4 jsr 4e1d4 "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 da30 jsr 4da30 43384: 4fef 000c lea %sp@(12),%sp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 43388: 4879 0005 e19f pea 5e19f <_global_impure_ptr+0xc7> 4338e: 45f9 0004 e0f2 lea 4e0f2 ,%a2 43394: 4879 0005 d930 pea 5d930 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 da30 jsr 4da30 433aa: 588f addql #4,%sp 433ac: 602e bras 433dc } else if ((fp = fopen("/etc/group", "w")) != NULL) { 433ae: 4879 0005 d8c7 pea 5d8c7 433b4: 4879 0005 d930 pea 5d930 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 d93b pea 5d93b 433ca: 4eb9 0004 e1d4 jsr 4e1d4 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 433d0: 2f02 movel %d2,%sp@- 433d2: 4eb9 0004 da30 jsr 4da30 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 d4e4 moveal 5d4e4 <__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 d418 movel 5d418 ,%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 =============================================================================== 0005ac44 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 5ac44: 4e56 ffcc linkw %fp,#-52 5ac48: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5ac4c: 242e 000c movel %fp@(12),%d2 5ac50: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 5ac54: 4eb9 0005 a870 jsr 5a870 5ac5a: b0ae 0008 cmpl %fp@(8),%d0 5ac5e: 6710 beqs 5ac70 rtems_set_errno_and_return_minus_one( ESRCH ); 5ac60: 4eb9 0004 cd68 jsr 4cd68 <__errno> 5ac66: 7403 moveq #3,%d2 5ac68: 2040 moveal %d0,%a0 5ac6a: 2082 movel %d2,%a0@ 5ac6c: 6000 01ae braw 5ae1c /* * Validate the signal passed. */ if ( !sig ) 5ac70: 4a82 tstl %d2 5ac72: 670a beqs 5ac7e static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5ac74: 2002 movel %d2,%d0 5ac76: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5ac78: 721f moveq #31,%d1 5ac7a: b280 cmpl %d0,%d1 5ac7c: 6410 bccs 5ac8e rtems_set_errno_and_return_minus_one( EINVAL ); 5ac7e: 4eb9 0004 cd68 jsr 4cd68 <__errno> 5ac84: 7216 moveq #22,%d1 5ac86: 2040 moveal %d0,%a0 5ac88: 2081 movel %d1,%a0@ 5ac8a: 6000 0190 braw 5ae1c /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 5ac8e: 2202 movel %d2,%d1 5ac90: 2802 movel %d2,%d4 5ac92: e589 lsll #2,%d1 5ac94: e98c lsll #4,%d4 5ac96: 9881 subl %d1,%d4 5ac98: 2044 moveal %d4,%a0 5ac9a: d1fc 0005 f03c addal #389180,%a0 5aca0: 7201 moveq #1,%d1 5aca2: b290 cmpl %a0@,%d1 5aca4: 6700 01ae beqw 5ae54 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 5aca8: 123c 0008 moveb #8,%d1 5acac: b282 cmpl %d2,%d1 5acae: 6710 beqs 5acc0 5acb0: 123c 0004 moveb #4,%d1 5acb4: b282 cmpl %d2,%d1 5acb6: 6708 beqs 5acc0 5acb8: 123c 000b moveb #11,%d1 5acbc: b282 cmpl %d2,%d1 5acbe: 6616 bnes 5acd6 return pthread_kill( pthread_self(), sig ); 5acc0: 4eb9 0005 b028 jsr 5b028 5acc6: 2f02 movel %d2,%sp@- 5acc8: 2f00 movel %d0,%sp@- 5acca: 4eb9 0005 af7c jsr 5af7c 5acd0: 508f addql #8,%sp 5acd2: 6000 0182 braw 5ae56 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5acd6: 7601 moveq #1,%d3 5acd8: e1ab lsll %d0,%d3 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 5acda: 7001 moveq #1,%d0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 5acdc: 2d42 fff4 movel %d2,%fp@(-12) siginfo->si_code = SI_USER; 5ace0: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 5ace4: 4a8a tstl %a2 5ace6: 6606 bnes 5acee siginfo->si_value.sival_int = 0; 5ace8: 42ae fffc clrl %fp@(-4) 5acec: 6004 bras 5acf2 } else { siginfo->si_value = *value; 5acee: 2d52 fffc movel %a2@,%fp@(-4) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 5acf2: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 5acf8: 5280 addql #1,%d0 5acfa: 23c0 0005 eb98 movel %d0,5eb98 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 5ad00: 2039 0005 eb98 movel 5eb98 <_Thread_Dispatch_disable_level>,%d0 /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; 5ad06: 2079 0005 effa moveal 5effa <_Per_CPU_Information+0xc>,%a0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 5ad0c: 2268 0102 moveal %a0@(258),%a1 5ad10: 2029 00d0 movel %a1@(208),%d0 5ad14: 4680 notl %d0 5ad16: c083 andl %d3,%d0 5ad18: 6600 00ae bnew 5adc8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 5ad1c: 2079 0005 f1c0 moveal 5f1c0 <_POSIX_signals_Wait_queue>,%a0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5ad22: 601c bras 5ad40 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5ad24: 2003 movel %d3,%d0 5ad26: c0a8 0030 andl %a0@(48),%d0 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5ad2a: 2268 0102 moveal %a0@(258),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5ad2e: 6600 0098 bnew 5adc8 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 5ad32: 2029 00d0 movel %a1@(208),%d0 5ad36: 4680 notl %d0 5ad38: c083 andl %d3,%d0 5ad3a: 6600 008c bnew 5adc8 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5ad3e: 2050 moveal %a0@,%a0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5ad40: b1fc 0005 f1c4 cmpal #389572,%a0 5ad46: 66dc bnes 5ad24 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 5ad48: 4280 clrl %d0 5ad4a: 1039 0005 d1fa moveb 5d1fa ,%d0 5ad50: 45f9 0005 eb5c lea 5eb5c <_Objects_Information_table+0x8>,%a2 5ad56: 5280 addql #1,%d0 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 5ad58: 91c8 subal %a0,%a0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 5ad5a: 225a moveal %a2@+,%a1 5ad5c: 4a89 tstl %a1 5ad5e: 675c beqs 5adbc <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 5ad60: 2269 0004 moveal %a1@(4),%a1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5ad64: 4281 clrl %d1 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5ad66: 7a01 moveq #1,%d5 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5ad68: 3229 000e movew %a1@(14),%d1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5ad6c: 2669 0018 moveal %a1@(24),%a3 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5ad70: 2841 moveal %d1,%a4 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5ad72: 588b addql #4,%a3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5ad74: 6042 bras 5adb8 the_thread = (Thread_Control *) object_table[ index ]; 5ad76: 225b moveal %a3@+,%a1 if ( !the_thread ) 5ad78: 4a89 tstl %a1 5ad7a: 673a beqs 5adb6 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 5ad7c: 2229 0014 movel %a1@(20),%d1 5ad80: b081 cmpl %d1,%d0 5ad82: 6532 bcss 5adb6 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 5ad84: 2a69 0102 moveal %a1@(258),%a5 5ad88: 2c2d 00d0 movel %a5@(208),%d6 5ad8c: 4686 notl %d6 5ad8e: cc83 andl %d3,%d6 5ad90: 6724 beqs 5adb6 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 5ad92: b081 cmpl %d1,%d0 5ad94: 621c bhis 5adb2 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 5ad96: 4a88 tstl %a0 5ad98: 671c beqs 5adb6 <== NEVER TAKEN 5ad9a: 2e28 0010 movel %a0@(16),%d7 5ad9e: 6716 beqs 5adb6 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5ada0: 2c29 0010 movel %a1@(16),%d6 5ada4: 670c beqs 5adb2 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 5ada6: 0807 001c btst #28,%d7 5adaa: 660a bnes 5adb6 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 5adac: 0806 001c btst #28,%d6 5adb0: 6704 beqs 5adb6 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5adb2: 2001 movel %d1,%d0 5adb4: 2049 moveal %a1,%a0 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5adb6: 5285 addql #1,%d5 5adb8: b9c5 cmpal %d5,%a4 5adba: 64ba bccs 5ad76 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 5adbc: b5fc 0005 eb64 cmpal #387940,%a2 5adc2: 6696 bnes 5ad5a } } } } if ( interested ) { 5adc4: 4a88 tstl %a0 5adc6: 6716 beqs 5adde /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 5adc8: 486e fff4 pea %fp@(-12) 5adcc: 2f02 movel %d2,%sp@- 5adce: 2f08 movel %a0,%sp@- 5add0: 4eb9 0005 ae80 jsr 5ae80 <_POSIX_signals_Unblock_thread> 5add6: 4fef 000c lea %sp@(12),%sp 5adda: 4a00 tstb %d0 5addc: 6670 bnes 5ae4e /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); 5adde: 2f03 movel %d3,%sp@- 5ade0: 4eb9 0005 ae60 jsr 5ae60 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 5ade6: 588f addql #4,%sp 5ade8: 41f9 0005 f034 lea 5f034 <_POSIX_signals_Vectors>,%a0 5adee: 7002 moveq #2,%d0 5adf0: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0 5adf4: 6658 bnes 5ae4e psiginfo = (POSIX_signals_Siginfo_node *) 5adf6: 4879 0005 f1b4 pea 5f1b4 <_POSIX_signals_Inactive_siginfo> 5adfc: 4eb9 0004 6414 jsr 46414 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5ae02: 588f addql #4,%sp */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 5ae04: 2440 moveal %d0,%a2 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 5ae06: 4a80 tstl %d0 5ae08: 6616 bnes 5ae20 _Thread_Enable_dispatch(); 5ae0a: 4eb9 0004 7d80 jsr 47d80 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 5ae10: 4eb9 0004 cd68 jsr 4cd68 <__errno> 5ae16: 2040 moveal %d0,%a0 5ae18: 700b moveq #11,%d0 5ae1a: 2080 movel %d0,%a0@ 5ae1c: 70ff moveq #-1,%d0 5ae1e: 6036 bras 5ae56 } psiginfo->Info = *siginfo; 5ae20: 4878 000c pea c 5ae24: 486e fff4 pea %fp@(-12) 5ae28: 486a 0008 pea %a2@(8) 5ae2c: 4eb9 0004 d588 jsr 4d588 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5ae32: 2002 movel %d2,%d0 5ae34: e98a lsll #4,%d2 5ae36: e588 lsll #2,%d0 5ae38: 2f0a movel %a2,%sp@- 5ae3a: 9480 subl %d0,%d2 5ae3c: 0682 0005 f22c addil #389676,%d2 5ae42: 2f02 movel %d2,%sp@- 5ae44: 4eb9 0004 63b4 jsr 463b4 <_Chain_Append> 5ae4a: 4fef 0014 lea %sp@(20),%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5ae4e: 4eb9 0004 7d80 jsr 47d80 <_Thread_Enable_dispatch> /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 5ae54: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5ae56: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 5ae5c: 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 ecdc cmpl 5ecdc <_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 c9ee moveal 5c9ee <_global_impure_ptr>,%a2 432e6: b5f9 0005 d4e8 cmpal 5d4e8 <_impure_ptr>,%a2 432ec: 6710 beqs 432fe _wrapup_reent(_global_impure_ptr); 432ee: 2f0a movel %a2,%sp@- 432f0: 4eb9 0004 d7d2 jsr 4d7d2 <_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 d4e8 movel %a2,5d4e8 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 432fe: 2079 0005 d4e8 moveal 5d4e8 <_impure_ptr>,%a0 43304: 45f9 0004 ce9c lea 4ce9c ,%a2 4330a: 2f28 0004 movel %a0@(4),%sp@- 4330e: 4e92 jsr %a2@ fclose (stdout); 43310: 2079 0005 d4e8 moveal 5d4e8 <_impure_ptr>,%a0 43316: 2f28 0008 movel %a0@(8),%sp@- 4331a: 4e92 jsr %a2@ fclose (stderr); 4331c: 2079 0005 d4e8 moveal 5d4e8 <_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 f130 jsr 4f130 <__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 0005 0618 jsr 50618 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 f9c0 jsr 4f9c0 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 ea60 addql #1,5ea60 #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 ecdc cmpl 5ecdc <_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 d29a movel 5d29a ,%sp@- 42e90: 4eb9 0004 73ac jsr 473ac <_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 da10 moveal 5da10 ,%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 cd68 jsr 4cd68 <__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 da0c moveal 5da0c ,%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 da14 moveal 5da14 ,%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 e918 movel 5e918 <_RTEMS_Allocator_Mutex>,%sp@- 42bf2: 4eb9 0004 615c jsr 4615c <_API_Mutex_Lock> *stats = rtems_malloc_statistics; 42bf8: 4878 002c pea 2c 42bfc: 4879 0005 e73c pea 5e73c 42c02: 2f02 movel %d2,%sp@- 42c04: 4eb9 0004 d354 jsr 4d354 _RTEMS_Unlock_allocator(); 42c0a: 2f39 0005 e918 movel 5e918 <_RTEMS_Allocator_Mutex>,%sp@- 42c10: 4eb9 0004 61bc jsr 461bc <_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 ed70 movel 5ed70 ,%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 d43a movel 5d43a ,%sp@- 42f12: 4eb9 0004 73e0 jsr 473e0 <_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 cfa8 jsr 4cfa8 <__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 ed44 addl %d2,5ed44 42f3e: 42a7 clrl %sp@- 42f40: 2f03 movel %d3,%sp@- 42f42: 2f39 0005 d43a movel 5d43a ,%sp@- 42f48: 4eb9 0004 73a0 jsr 473a0 <_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 ed70 movel %d1,5ed70 * 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 610c jsr 4610c /* 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 =============================================================================== 0004bee2 : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4bee2: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4bee4: 4e56 fff0 linkw %fp,#-16 4bee8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4beec: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4bef0: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4bef4: b0ab 0048 cmpl %a3@(72),%d0 4bef8: 6620 bnes 4bf1a if (iop->offset > the_jnode->info.linearfile.size) 4befa: 202b 004c movel %a3@(76),%d0 4befe: 222b 0050 movel %a3@(80),%d1 4bf02: 242a 000c movel %a2@(12),%d2 4bf06: 262a 0010 movel %a2@(16),%d3 4bf0a: 9681 subl %d1,%d3 4bf0c: 9580 subxl %d0,%d2 4bf0e: 6f44 bles 4bf54 iop->offset = the_jnode->info.linearfile.size; 4bf10: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED 4bf14: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4bf18: 603a bras 4bf54 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4bf1a: 2f2a 0010 movel %a2@(16),%sp@- 4bf1e: 2f2a 000c movel %a2@(12),%sp@- 4bf22: 2f0b movel %a3,%sp@- 4bf24: 4eb9 0004 bb20 jsr 4bb20 4bf2a: 4fef 000c lea %sp@(12),%sp 4bf2e: 4a80 tstl %d0 4bf30: 6712 beqs 4bf44 rtems_set_errno_and_return_minus_one( ENOSPC ); 4bf32: 4eb9 0004 cd68 jsr 4cd68 <__errno> 4bf38: 761c moveq #28,%d3 4bf3a: 2040 moveal %d0,%a0 4bf3c: 2083 movel %d3,%a0@ 4bf3e: 70ff moveq #-1,%d0 4bf40: 72ff moveq #-1,%d1 4bf42: 6018 bras 4bf5c iop->size = the_jnode->info.file.size; 4bf44: 202b 004c movel %a3@(76),%d0 4bf48: 222b 0050 movel %a3@(80),%d1 4bf4c: 2540 0004 movel %d0,%a2@(4) 4bf50: 2541 0008 movel %d1,%a2@(8) } return iop->offset; 4bf54: 202a 000c movel %a2@(12),%d0 4bf58: 222a 0010 movel %a2@(16),%d1 } 4bf5c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4bf62: 4e5e unlk %fp ... =============================================================================== 0004bdd6 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4bdd6: 4e56 fff0 linkw %fp,#-16 4bdda: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4bdde: 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)) 4bde2: 202b 0014 movel %a3@(20),%d0 4bde6: 0280 0000 0204 andil #516,%d0 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4bdec: 246b 0018 moveal %a3@(24),%a2 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4bdf0: 674c beqs 4be3e && (the_jnode->type == IMFS_LINEAR_FILE)) { 4bdf2: 7006 moveq #6,%d0 4bdf4: b0aa 0048 cmpl %a2@(72),%d0 4bdf8: 6644 bnes 4be3e <== 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; 4bdfa: 7405 moveq #5,%d2 <== NOT EXECUTED 4bdfc: 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; 4be00: 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; 4be04: 4282 clrl %d2 <== NOT EXECUTED 4be06: 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; 4be08: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4be0c: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED 4be10: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 4be14: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 4be18: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4be1c: 42aa 005c clrl %a2@(92) <== NOT EXECUTED if ((count != 0) 4be20: 4a80 tstl %d0 <== NOT EXECUTED 4be22: 671a beqs 4be3e <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4be24: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4be26: 76ff moveq #-1,%d3 <== NOT EXECUTED 4be28: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4be2a: 42a7 clrl %sp@- <== NOT EXECUTED 4be2c: 42a7 clrl %sp@- <== NOT EXECUTED 4be2e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4be30: 4eb9 0004 bc30 jsr 4bc30 <== NOT EXECUTED 4be36: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4be3a: b680 cmpl %d0,%d3 <== NOT EXECUTED 4be3c: 6730 beqs 4be6e <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4be3e: 202b 0014 movel %a3@(20),%d0 4be42: 0280 0000 0200 andil #512,%d0 4be48: 6710 beqs 4be5a iop->offset = the_jnode->info.file.size; 4be4a: 202a 004c movel %a2@(76),%d0 4be4e: 222a 0050 movel %a2@(80),%d1 4be52: 2740 000c movel %d0,%a3@(12) 4be56: 2741 0010 movel %d1,%a3@(16) iop->size = the_jnode->info.file.size; return 0; 4be5a: 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; 4be5c: 222a 004c movel %a2@(76),%d1 4be60: 242a 0050 movel %a2@(80),%d2 4be64: 2741 0004 movel %d1,%a3@(4) 4be68: 2742 0008 movel %d2,%a3@(8) return 0; 4be6c: 6002 bras 4be70 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; 4be6e: 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; } 4be70: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4be76: 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 cd68 jsr 4cd68 <__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 a144 jsr 4a144 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 cd68 jsr 4cd68 <__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 bdc8 movel #376264,%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 e0d4 lea 4e0d4 ,%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 e0d4 jsr 4e0d4 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 d588 lea 4d588 ,%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 c27c pea 5c27c 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 cd68 jsr 4cd68 <__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 cd68 jsr 4cd68 <__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 cd68 jsr 4cd68 <__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 d308 movel #381704,%d0 43226: b0b9 0005 d304 cmpl 5d304 ,%d0 4322c: 670e beqs 4323c <== ALWAYS TAKEN errno = EINVAL; 4322e: 4eb9 0004 cd68 jsr 4cd68 <__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 d304 pea 5d304 43268: 4eb9 0004 63b4 jsr 463b4 <_Chain_Append> 4326e: 2f39 0005 ea4c movel 5ea4c ,%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 d420 moveal 5d420 ,%a0 43290: 41e8 0018 lea %a0@(24),%a0 43294: 2f08 movel %a0,%sp@- 43296: 4eb9 0004 d588 jsr 4d588 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 d1f0 jsr 4d1f0 <__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 =============================================================================== 00054958 : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 54958: 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) { 5495a: 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; 5495e: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 54960: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 54964: 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); 54968: 47ee ffa8 lea %fp@(-88),%a3 5496c: 2a3c 0005 957c movel #365948,%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; 54972: 206a 0010 moveal %a2@(16),%a0 fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 54976: 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; 54978: 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); 5497c: 4878 0020 pea 20 54980: 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) { 54982: 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); 54986: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 54988: 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); 5498c: 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) { 5498e: 2a6e 000c moveal %fp@(12),%a5 54992: 2d41 fff0 movel %d1,%fp@(-16) 54996: 282e 001c movel %fp@(28),%d4 dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 5499a: 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; 5499e: 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; 549a2: 42ae fff8 clrl %fp@(-8) time_t time_ret = 0; uint16_t time_val = 0; uint16_t date = 0; 549a6: 3d40 fffe movew %d0,%fp@(-2) static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 549aa: 42ae ffe8 clrl %fp@(-24) dir_pos->sname.ofs = 0; 549ae: 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); 549b2: 4e90 jsr %a0@ memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 549b4: 4878 0040 pea 40 549b8: 2045 moveal %d5,%a0 549ba: 42a7 clrl %sp@- 549bc: 486e ff68 pea %fp@(-152) 549c0: 4e90 jsr %a0@ name_type = msdos_long_to_short (name, name_len, 549c2: 4878 000b pea b 549c6: 2f0b movel %a3,%sp@- 549c8: 2f06 movel %d6,%sp@- 549ca: 2f02 movel %d2,%sp@- 549cc: 4eb9 0005 58bc jsr 558bc /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 549d2: 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, 549d6: 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; 549d8: 4200 clrb %d0 /* set up last write date and time */ time_ret = time(NULL); 549da: 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; 549dc: 1d40 ffb4 moveb %d0,%fp@(-76) /* set up last write date and time */ time_ret = time(NULL); 549e0: 4eb9 0005 c9b4 jsr 5c9b4