=============================================================================== 0004a7b4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 4a7b4: 7007 moveq #7,%d0 #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 4a7b6: 4e56 0000 linkw %fp,#0 4a7ba: 206e 0008 moveal %fp@(8),%a0 4a7be: 2f0a movel %a2,%sp@- IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4a7c0: 2468 0010 moveal %a0@(16),%a2 switch( node->type ) { 4a7c4: 2250 moveal %a0@,%a1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 4a7c6: 246a 0034 moveal %a2@(52),%a2 switch( node->type ) { 4a7ca: b0a9 0048 cmpl %a1@(72),%d0 4a7ce: 6526 bcss 4a7f6 <== NEVER TAKEN 4a7d0: 2029 0048 movel %a1@(72),%d0 4a7d4: d080 addl %d0,%d0 4a7d6: 303b 0808 movew %pc@(4a7e0 ,%d0:l),%d0 4a7da: 48c0 extl %d0 4a7dc: 4efb 0802 jmp %pc@(4a7e0 ,%d0:l) 4a7e0: 0016 .short 0x0016 <== NOT EXECUTED 4a7e2: 0010 .short 0x0010 <== NOT EXECUTED 4a7e4: 004c .short 0x004c <== NOT EXECUTED 4a7e6: 002c .short 0x002c <== NOT EXECUTED 4a7e8: 002c .short 0x002c <== NOT EXECUTED 4a7ea: 001e .short 0x001e <== NOT EXECUTED 4a7ec: 001e .short 0x001e <== NOT EXECUTED 4a7ee: 003e .short 0x003e <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 4a7f0: 216a 000c 0008 movel %a2@(12),%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a7f6: 245f moveal %sp@+,%a2 4a7f8: 4280 clrl %d0 4a7fa: 4e5e unlk %fp 4a7fc: 4e75 rts 4a7fe: 4280 clrl %d0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 4a800: 216a 0008 0008 movel %a2@(8),%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a806: 245f moveal %sp@+,%a2 4a808: 4e5e unlk %fp 4a80a: 4e75 rts 4a80c: 245f moveal %sp@+,%a2 case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4a80e: 203c 0005 d58e movel #382350,%d0 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a814: 4e5e unlk %fp case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 4a816: 2140 0008 movel %d0,%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a81a: 4280 clrl %d0 4a81c: 4e75 rts 4a81e: 4280 clrl %d0 break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 4a820: 216a 0010 0008 movel %a2@(16),%a0@(8) break; } return 0; } 4a826: 245f moveal %sp@+,%a2 4a828: 4e5e unlk %fp 4a82a: 4e75 rts 4a82c: 245f moveal %sp@+,%a2 switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4a82e: 203c 0005 d51e movel #382238,%d0 loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a834: 4e5e unlk %fp switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 4a836: 2140 0008 movel %d0,%a0@(8) loc->handlers = fs_info->fifo_handlers; break; } return 0; } 4a83a: 4280 clrl %d0 <== NOT EXECUTED =============================================================================== 0004b2b0 : void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { 4b2b0: 4e56 0000 linkw %fp,#0 4b2b4: 2f0a movel %a2,%sp@- 4b2b6: 246e 0008 moveal %fp@(8),%a2 if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { 4b2ba: 2f0a movel %a2,%sp@- 4b2bc: 4eb9 0004 ba18 jsr 4ba18 4b2c2: 588f addql #4,%sp 4b2c4: 4a80 tstl %d0 4b2c6: 6634 bnes 4b2fc 4b2c8: 4a6a 0032 tstw %a2@(50) 4b2cc: 662e bnes 4b2fc if ( rtems_filesystem_current.node_access == jnode ) 4b2ce: 2079 0005 e240 moveal 5e240 ,%a0 4b2d4: b5e8 0004 cmpal %a0@(4),%a2 4b2d8: 6744 beqs 4b31e <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 4b2da: 202a 0048 movel %a2@(72),%d0 4b2de: 7204 moveq #4,%d1 4b2e0: b280 cmpl %d0,%d1 4b2e2: 6748 beqs 4b32c 4b2e4: 123c 0005 moveb #5,%d1 4b2e8: b280 cmpl %d0,%d1 4b2ea: 6718 beqs 4b304 break; default: break; } free( jnode ); 4b2ec: 2d4a 0008 movel %a2,%fp@(8) } } 4b2f0: 246e fffc moveal %fp@(-4),%a2 4b2f4: 4e5e unlk %fp break; default: break; } free( jnode ); 4b2f6: 4ef9 0004 32dc jmp 432dc } } 4b2fc: 246e fffc moveal %fp@(-4),%a2 4b300: 4e5e unlk %fp 4b302: 4e75 rts if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); 4b304: 2f0a movel %a2,%sp@- 4b306: 4eb9 0004 cfb8 jsr 4cfb8 break; 4b30c: 588f addql #4,%sp break; default: break; } free( jnode ); 4b30e: 2d4a 0008 movel %a2,%fp@(8) } } 4b312: 246e fffc moveal %fp@(-4),%a2 4b316: 4e5e unlk %fp break; default: break; } free( jnode ); 4b318: 4ef9 0004 32dc jmp 432dc { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; switch ( jnode->type ) { 4b31e: 202a 0048 movel %a2@(72),%d0 4b322: 7204 moveq #4,%d1 void IMFS_check_node_remove( IMFS_jnode_t *jnode ) { if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) { if ( rtems_filesystem_current.node_access == jnode ) rtems_filesystem_current.node_access = NULL; 4b324: 42a8 0004 clrl %a0@(4) switch ( jnode->type ) { 4b328: b280 cmpl %d0,%d1 4b32a: 66b8 bnes 4b2e4 case IMFS_MEMORY_FILE: IMFS_memfile_remove( jnode ); break; case IMFS_SYM_LINK: free( jnode->info.sym_link.name ); 4b32c: 2f2a 004c movel %a2@(76),%sp@- 4b330: 4eb9 0004 32dc jsr 432dc break; 4b336: 588f addql #4,%sp default: break; } free( jnode ); 4b338: 2d4a 0008 movel %a2,%fp@(8) } } 4b33c: 246e fffc moveal %fp@(-4),%a2 4b340: 4e5e unlk %fp break; default: break; } free( jnode ); 4b342: 4ef9 0004 32dc jmp 432dc =============================================================================== 0004a528 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4a528: 4e56 ffec linkw %fp,#-20 4a52c: 206e 0008 moveal %fp@(8),%a0 4a530: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a534: 242e 000c movel %fp@(12),%d2 4a538: 286e 0018 moveal %fp@(24),%a4 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 4a53c: 4a88 tstl %a0 4a53e: 6700 00aa beqw 4a5ea return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 4a542: 2268 0010 moveal %a0@(16),%a1 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a546: 7007 moveq #7,%d0 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 4a548: 2650 moveal %a0@,%a3 fs_info = parent_loc->mt_entry->fs_info; 4a54a: 2469 0034 moveal %a1@(52),%a2 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a54e: b082 cmpl %d2,%d0 4a550: 6700 008a beqw 4a5dc return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 4a554: 2079 0005 e240 moveal 5e240 ,%a0 4a55a: 2028 002c movel %a0@(44),%d0 4a55e: 4680 notl %d0 4a560: c0ae 0014 andl %fp@(20),%d0 4a564: 2f00 movel %d0,%sp@- 4a566: 2f2e 0010 movel %fp@(16),%sp@- 4a56a: 2f02 movel %d2,%sp@- 4a56c: 4eb9 0004 a4b4 jsr 4a4b4 if ( !node ) 4a572: 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 ); 4a576: 2a40 moveal %d0,%a5 if ( !node ) 4a578: 4a80 tstl %d0 4a57a: 6754 beqs 4a5d0 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 4a57c: 7001 moveq #1,%d0 4a57e: b082 cmpl %d2,%d0 4a580: 6700 009c beqw 4a61e rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 4a584: 7003 moveq #3,%d0 4a586: b082 cmpl %d2,%d0 4a588: 676e beqs 4a5f8 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 4a58a: 7204 moveq #4,%d1 4a58c: b282 cmpl %d2,%d1 4a58e: 6768 beqs 4a5f8 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 4a590: 7002 moveq #2,%d0 4a592: b082 cmpl %d2,%d0 4a594: 6700 00f4 beqw 4a68a node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 4a598: 7206 moveq #6,%d1 4a59a: b282 cmpl %d2,%d1 4a59c: 6700 00b8 beqw 4a656 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 4a5a0: 7205 moveq #5,%d1 4a5a2: b282 cmpl %d2,%d1 4a5a4: 6700 0112 beqw 4a6b8 node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { 4a5a8: 7207 moveq #7,%d1 4a5aa: b282 cmpl %d2,%d1 4a5ac: 6700 0146 beqw 4a6f4 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a5b0: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a5b4: 5280 addql #1,%d0 <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a5b6: 2b4b 0008 movel %a3,%a5@(8) <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; 4a5ba: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED 4a5be: 2b40 0034 movel %d0,%a5@(52) <== NOT EXECUTED 4a5c2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a5c4: 486b 004c pea %a3@(76) <== NOT EXECUTED 4a5c8: 4eb9 0004 751c jsr 4751c <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a5ce: 508f addql #8,%sp <== NOT EXECUTED } 4a5d0: 200d movel %a5,%d0 4a5d2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a5d8: 4e5e unlk %fp 4a5da: 4e75 rts fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 4a5dc: 223c 0005 d4ae movel #382126,%d1 4a5e2: b2aa 0010 cmpl %a2@(16),%d1 4a5e6: 6600 ff6c bnew 4a554 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 4a5ea: 9bcd subal %a5,%a5 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 4a5ec: 200d movel %a5,%d0 4a5ee: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a5f4: 4e5e unlk %fp 4a5f6: 4e75 rts if ( type == IMFS_DIRECTORY ) { rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; 4a5f8: 2b54 004c movel %a4@,%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; 4a5fc: 202a 0004 movel %a2@(4),%d0 4a600: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a602: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a606: 2540 0004 movel %d0,%a2@(4) 4a60a: 2b40 0034 movel %d0,%a5@(52) 4a60e: 2f0d movel %a5,%sp@- 4a610: 486b 004c pea %a3@(76) 4a614: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a61a: 508f addql #8,%sp 4a61c: 60b2 bras 4a5d0 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 ); 4a61e: 41ed 0050 lea %a5@(80),%a0 4a622: 2b48 004c movel %a0,%a5@(76) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a626: 41ed 004c lea %a5@(76),%a0 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a62a: 202a 0004 movel %a2@(4),%d0 4a62e: 5280 addql #1,%d0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 4a630: 42ad 0050 clrl %a5@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4a634: 2b48 0054 movel %a0,%a5@(84) } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a638: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a63c: 2540 0004 movel %d0,%a2@(4) 4a640: 2b40 0034 movel %d0,%a5@(52) 4a644: 2f0d movel %a5,%sp@- 4a646: 486b 004c pea %a3@(76) 4a64a: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a650: 508f addql #8,%sp 4a652: 6000 ff7c braw 4a5d0 } 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; node->info.linearfile.direct = 0; 4a656: 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; 4a65a: 4280 clrl %d0 4a65c: 4281 clrl %d1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a65e: 2b4b 0008 movel %a3,%a5@(8) 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; 4a662: 2b40 004c movel %d0,%a5@(76) 4a666: 2b41 0050 movel %d1,%a5@(80) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a66a: 202a 0004 movel %a2@(4),%d0 4a66e: 5280 addql #1,%d0 4a670: 2540 0004 movel %d0,%a2@(4) 4a674: 2b40 0034 movel %d0,%a5@(52) 4a678: 2f0d movel %a5,%sp@- 4a67a: 486b 004c pea %a3@(76) 4a67e: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a684: 508f addql #8,%sp 4a686: 6000 ff48 braw 4a5d0 } else if ( type == IMFS_HARD_LINK ) { node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { node->info.device.major = info->device.major; 4a68a: 2b54 004c movel %a4@,%a5@(76) node->info.device.minor = info->device.minor; 4a68e: 2b6c 0004 0050 movel %a4@(4),%a5@(80) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a694: 202a 0004 movel %a2@(4),%d0 4a698: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a69a: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a69e: 2540 0004 movel %d0,%a2@(4) 4a6a2: 2b40 0034 movel %d0,%a5@(52) 4a6a6: 2f0d movel %a5,%sp@- 4a6a8: 486b 004c pea %a3@(76) 4a6ac: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a6b2: 508f addql #8,%sp 4a6b4: 6000 ff1a braw 4a5d0 } 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; node->info.file.indirect = 0; 4a6b8: 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; 4a6bc: 4280 clrl %d0 4a6be: 4281 clrl %d1 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; 4a6c0: 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; 4a6c4: 2b40 004c movel %d0,%a5@(76) 4a6c8: 2b41 0050 movel %d1,%a5@(80) node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 4a6cc: 42ad 005c clrl %a5@(92) /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 4a6d0: 202a 0004 movel %a2@(4),%d0 4a6d4: 5280 addql #1,%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a6d6: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a6da: 2540 0004 movel %d0,%a2@(4) 4a6de: 2b40 0034 movel %d0,%a5@(52) 4a6e2: 2f0d movel %a5,%sp@- 4a6e4: 486b 004c pea %a3@(76) 4a6e8: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a6ee: 508f addql #8,%sp 4a6f0: 6000 fede braw 4a5d0 node->info.file.size = 0; node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; } else if ( type == IMFS_FIFO ) { node->info.fifo.pipe = NULL; 4a6f4: 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; 4a6f8: 202a 0004 movel %a2@(4),%d0 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 4a6fc: 2b4b 0008 movel %a3,%a5@(8) node->st_ino = ++fs_info->ino_count; 4a700: 5280 addql #1,%d0 4a702: 2540 0004 movel %d0,%a2@(4) 4a706: 2b40 0034 movel %d0,%a5@(52) 4a70a: 2f0d movel %a5,%sp@- 4a70c: 486b 004c pea %a3@(76) 4a710: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 4a716: 508f addql #8,%sp 4a718: 6000 feb6 braw 4a5d0 =============================================================================== 0004536c : */ void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 4536c: 4e56 ffe0 linkw %fp,#-32 45370: 206e 0008 moveal %fp@(8),%a0 45374: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 45378: 2808 movel %a0,%d4 4537a: 49f9 0004 51e0 lea 451e0 ,%a4 45380: 0684 0000 0050 addil #80,%d4 45386: 262e 000c movel %fp@(12),%d3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4538a: 2668 004c moveal %a0@(76),%a3 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4538e: b88b cmpl %a3,%d4 45390: 674e beqs 453e0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 45392: 2a03 movel %d3,%d5 45394: 45f9 0005 3598 lea 53598 ,%a2 4539a: 5285 addql #1,%d5 4539c: 4bf9 0004 536c lea 4536c ,%a5 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453a2: 4a83 tstl %d3 453a4: 6d26 blts 453cc <== NEVER TAKEN 453a6: 4282 clrl %d2 fprintf(stdout, "...." ); 453a8: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453ae: 5282 addql #1,%d2 fprintf(stdout, "...." ); 453b0: 2f28 0008 movel %a0@(8),%sp@- 453b4: 4878 0004 pea 4 453b8: 4878 0001 pea 1 453bc: 4879 0006 2db8 pea 62db8 453c2: 4e92 jsr %a2@ !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 453c4: 4fef 0010 lea %sp@(16),%sp 453c8: b483 cmpl %d3,%d2 453ca: 6fdc bles 453a8 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 453cc: 2f0b movel %a3,%sp@- 453ce: 4e94 jsr %a4@ if ( the_jnode->type == IMFS_DIRECTORY ) 453d0: 588f addql #4,%sp 453d2: 7001 moveq #1,%d0 453d4: b0ab 0048 cmpl %a3@(72),%d0 453d8: 6710 beqs 453ea the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 453da: 2653 moveal %a3@,%a3 IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 453dc: b88b cmpl %a3,%d4 453de: 66c2 bnes 453a2 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 453e0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 453e6: 4e5e unlk %fp 453e8: 4e75 rts for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 453ea: 2f05 movel %d5,%sp@- 453ec: 2f0b movel %a3,%sp@- 453ee: 4e95 jsr %a5@ the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 453f0: 2653 moveal %a3@,%a3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 453f2: 508f addql #8,%sp IMFS_assert( level >= 0 ); IMFS_assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 453f4: b88b cmpl %a3,%d4 453f6: 66aa bnes 453a2 453f8: 60e6 bras 453e0 =============================================================================== 0004a8c4 : 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 ) ) { 4a8c4: 70f8 moveq #-8,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a8c6: 4e56 ffac linkw %fp,#-84 4a8ca: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a8ce: 2a2e 0010 movel %fp@(16),%d5 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 ) ) { 4a8d2: c085 andl %d5,%d0 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4a8d4: 286e 0008 moveal %fp@(8),%a4 4a8d8: 246e 0014 moveal %fp@(20),%a2 int i = 0; 4a8dc: 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 ) ) { 4a8e0: 4a80 tstl %d0 4a8e2: 6600 0280 bnew 4ab64 4a8e6: 280e movel %fp,%d4 4a8e8: 260e movel %fp,%d3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4a8ea: 4280 clrl %d0 4a8ec: 5984 subql #4,%d4 4a8ee: 0683 ffff ffd7 addil #-41,%d3 4a8f4: 4bf9 0004 b18c lea 4b18c ,%a5 /* * 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 ) ) 4a8fa: 2e3c 0004 a83e movel #305214,%d7 rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4a900: 2c3c 0004 b104 movel #307460,%d6 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4a906: 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 ); 4a908: 2f04 movel %d4,%sp@- 4a90a: 2f03 movel %d3,%sp@- 4a90c: 2f2e 000c movel %fp@(12),%sp@- 4a910: 4874 0800 pea %a4@(00000000,%d0:l) 4a914: 4e95 jsr %a5@ pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4a916: 2052 moveal %a2@,%a0 * 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 ); 4a918: 2400 movel %d0,%d2 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 4a91a: 4fef 0010 lea %sp@(16),%sp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 4a91e: 202e fffc movel %fp@(-4),%d0 4a922: 91ae 000c subl %d0,%fp@(12) i += len; 4a926: d1ae fff8 addl %d0,%fp@(-8) if ( !pathloc->node_access ) 4a92a: 4a88 tstl %a0 4a92c: 6700 00f2 beqw 4aa20 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4a930: 4a82 tstl %d2 4a932: 665c bnes 4a990 * 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 ) { 4a934: 7201 moveq #1,%d1 4a936: b2a8 0048 cmpl %a0@(72),%d1 4a93a: 6600 019c bnew 4aad8 if ( node->info.directory.mt_fs != NULL ) { 4a93e: 2268 0058 moveal %a0@(88),%a1 4a942: 4a89 tstl %a1 4a944: 6700 0192 beqw 4aad8 *pathloc = node->info.directory.mt_fs->mt_fs_root; 4a948: 204a moveal %a2,%a0 <== NOT EXECUTED 4a94a: 20e9 001c movel %a1@(28),%a0@+ <== NOT EXECUTED 4a94e: 20e9 0020 movel %a1@(32),%a0@+ <== NOT EXECUTED 4a952: 20e9 0024 movel %a1@(36),%a0@+ <== NOT EXECUTED 4a956: 20e9 0028 movel %a1@(40),%a0@+ <== NOT EXECUTED 4a95a: 20a9 002c movel %a1@(44),%a0@ <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4a95e: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4a962: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a964: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED 4a968: 9280 subl %d0,%d1 <== NOT EXECUTED 4a96a: d0ae 000c addl %fp@(12),%d0 <== NOT EXECUTED 4a96e: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED 4a972: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4a974: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a976: 4874 1800 pea %a4@(00000000,%d1:l) <== NOT EXECUTED 4a97a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4a97c: 4e90 jsr %a0@ <== NOT EXECUTED 4a97e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a982: 2400 movel %d0,%d2 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4a984: 2002 movel %d2,%d0 4a986: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4a98c: 4e5e unlk %fp 4a98e: 4e75 rts /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4a990: 7001 moveq #1,%d0 4a992: b0ab 0048 cmpl %a3@(72),%d0 4a996: 6700 00bc beqw 4aa54 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4a99a: 7003 moveq #3,%d0 4a99c: b082 cmpl %d2,%d0 4a99e: 6722 beqs 4a9c2 4a9a0: 7204 moveq #4,%d1 4a9a2: b282 cmpl %d2,%d1 4a9a4: 6700 0094 beqw 4aa3a 4a9a8: 103c 0002 moveb #2,%d0 4a9ac: b082 cmpl %d2,%d0 4a9ae: 6750 beqs 4aa00 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4a9b0: 7004 moveq #4,%d0 4a9b2: b082 cmpl %d2,%d0 4a9b4: 6700 ff7e beqw 4a934 4a9b8: 202e fff8 movel %fp@(-8),%d0 4a9bc: 2648 moveal %a0,%a3 4a9be: 6000 ff48 braw 4a908 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4a9c2: 2028 0048 movel %a0@(72),%d0 4a9c6: 7203 moveq #3,%d1 4a9c8: b280 cmpl %d0,%d1 4a9ca: 6700 0142 beqw 4ab0e * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 4a9ce: 7404 moveq #4,%d2 4a9d0: b480 cmpl %d0,%d2 4a9d2: 6700 00e4 beqw 4aab8 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4a9d6: 7201 moveq #1,%d1 4a9d8: b280 cmpl %d0,%d1 4a9da: 6600 01a2 bnew 4ab7e rtems_set_errno_and_return_minus_one( ENOTDIR ); /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 4a9de: 2f03 movel %d3,%sp@- 4a9e0: 2f08 movel %a0,%sp@- 4a9e2: 2046 moveal %d6,%a0 4a9e4: 4e90 jsr %a0@ if ( !node ) 4a9e6: 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 ); 4a9e8: 2640 moveal %d0,%a3 if ( !node ) 4a9ea: 4a80 tstl %d0 4a9ec: 6732 beqs 4aa20 * 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 )) { 4a9ee: 7001 moveq #1,%d0 4a9f0: b0ab 0048 cmpl %a3@(72),%d0 4a9f4: 6776 beqs 4aa6c } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4a9f6: 248b movel %a3,%a2@ /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4a9f8: 202e fff8 movel %fp@(-8),%d0 4a9fc: 6000 ff0a braw 4a908 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4aa00: 2279 0005 e240 moveal 5e240 ,%a1 4aa06: b1e9 0018 cmpal %a1@(24),%a0 4aa0a: 67ac beqs 4a9b8 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aa0c: 226a 0010 moveal %a2@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 4aa10: b1e9 001c cmpal %a1@(28),%a0 4aa14: 6700 010e beqw 4ab24 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 4aa18: 2668 0008 moveal %a0@(8),%a3 4aa1c: 4a8b tstl %a3 4aa1e: 66d6 bnes 4a9f6 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4aa20: 4eb9 0004 e084 jsr 4e084 <__errno> 4aa26: 74ff moveq #-1,%d2 4aa28: 7a02 moveq #2,%d5 4aa2a: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aa2c: 2002 movel %d2,%d0 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 4aa2e: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aa30: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4aa36: 4e5e unlk %fp 4aa38: 4e75 rts case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4aa3a: 4eb9 0004 e084 jsr 4e084 <__errno> 4aa40: 74ff moveq #-1,%d2 4aa42: 785b moveq #91,%d4 4aa44: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aa46: 2002 movel %d2,%d0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4aa48: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aa4a: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4aa50: 4e5e unlk %fp 4aa52: 4e75 rts /* * 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 ) ) 4aa54: 4878 0001 pea 1 4aa58: 2047 moveal %d7,%a0 4aa5a: 2f0a movel %a2,%sp@- 4aa5c: 4e90 jsr %a0@ 4aa5e: 508f addql #8,%sp 4aa60: 4a80 tstl %d0 4aa62: 6700 0090 beqw 4aaf4 4aa66: 2052 moveal %a2@,%a0 4aa68: 6000 ff30 braw 4a99a * 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 )) { 4aa6c: 4aab 0058 tstl %a3@(88) 4aa70: 6784 beqs 4a9f6 IMFS_skip_separator( pathname, &pathnamelen, &i); 4aa72: 486e fff8 pea %fp@(-8) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 4aa76: 742e moveq #46,%d2 * 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); 4aa78: 486e 000c pea %fp@(12) 4aa7c: 2f0c movel %a4,%sp@- 4aa7e: 4eba fcd8 jsr %pc@(4a758 ) if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 4aa82: 202e fff8 movel %fp@(-8),%d0 4aa86: 4fef 000c lea %sp@(12),%sp 4aa8a: 41f4 0800 lea %a4@(00000000,%d0:l),%a0 4aa8e: 1210 moveb %a0@,%d1 4aa90: 49c1 extbl %d1 4aa92: b481 cmpl %d1,%d2 4aa94: 6600 0102 bnew 4ab98 4aa98: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 4aa9c: 49c1 extbl %d1 4aa9e: b481 cmpl %d1,%d2 4aaa0: 6600 00f6 bnew 4ab98 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 4aaa4: 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; 4aaa8: 5480 addql #2,%d0 pathnamelen -= 2; 4aaaa: 55ae 000c subql #2,%fp@(12) *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 4aaae: 2d40 fff8 movel %d0,%fp@(-8) } /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4aab2: 248b movel %a3,%a2@ 4aab4: 6000 ff42 braw 4a9f8 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4aab8: 42a7 clrl %sp@- 4aaba: 2f0a movel %a2,%sp@- 4aabc: 4eb9 0004 abd8 jsr 4abd8 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 4aac2: 2052 moveal %a2@,%a0 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4aac4: 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 ) 4aac6: 508f addql #8,%sp 4aac8: 70ff moveq #-1,%d0 4aaca: b082 cmpl %d2,%d0 4aacc: 6700 feb6 beqw 4a984 4aad0: 2028 0048 movel %a0@(72),%d0 4aad4: 6000 ff00 braw 4a9d6 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4aad8: 2f0a movel %a2,%sp@- 4aada: 4eb9 0004 a7b4 jsr 4a7b4 4aae0: 2400 movel %d0,%d2 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4aae2: 2e85 movel %d5,%sp@ 4aae4: 2f0a movel %a2,%sp@- 4aae6: 4eb9 0004 a83e jsr 4a83e 4aaec: 508f addql #8,%sp 4aaee: 4a80 tstl %d0 4aaf0: 6600 fe92 bnew 4a984 rtems_set_errno_and_return_minus_one( EACCES ); 4aaf4: 4eb9 0004 e084 jsr 4e084 <__errno> 4aafa: 74ff moveq #-1,%d2 4aafc: 760d moveq #13,%d3 4aafe: 2040 moveal %d0,%a0 return result; } 4ab00: 2002 movel %d2,%d0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4ab02: 2083 movel %d3,%a0@ return result; } 4ab04: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ab0a: 4e5e unlk %fp 4ab0c: 4e75 rts case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4ab0e: 42a7 clrl %sp@- 4ab10: 2f0a movel %a2,%sp@- 4ab12: 4eb9 0004 a878 jsr 4a878 node = pathloc->node_access; 4ab18: 2052 moveal %a2@,%a0 4ab1a: 508f addql #8,%sp 4ab1c: 2028 0048 movel %a0@(72),%d0 4ab20: 6000 feb4 braw 4a9d6 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 4ab24: 204a moveal %a2,%a0 4ab26: 20e9 0008 movel %a1@(8),%a0@+ 4ab2a: 20e9 000c movel %a1@(12),%a0@+ 4ab2e: 20e9 0010 movel %a1@(16),%a0@+ 4ab32: 20e9 0014 movel %a1@(20),%a0@+ 4ab36: 20a9 0018 movel %a1@(24),%a0@ */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 4ab3a: 202e fffc movel %fp@(-4),%d0 4ab3e: 2f0a movel %a2,%sp@- 4ab40: 222e fff8 movel %fp@(-8),%d1 4ab44: 9280 subl %d0,%d1 4ab46: d0ae 000c addl %fp@(12),%d0 4ab4a: 206a 000c moveal %a2@(12),%a0 4ab4e: 2f05 movel %d5,%sp@- 4ab50: 2f00 movel %d0,%sp@- 4ab52: 4874 1800 pea %a4@(00000000,%d1:l) 4ab56: 2050 moveal %a0@,%a0 4ab58: 4e90 jsr %a0@ 4ab5a: 4fef 0010 lea %sp@(16),%sp 4ab5e: 2400 movel %d0,%d2 4ab60: 6000 fe22 braw 4a984 char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 4ab64: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 4ab6a: 74ff moveq #-1,%d2 <== NOT EXECUTED 4ab6c: 7e05 moveq #5,%d7 <== NOT EXECUTED 4ab6e: 2040 moveal %d0,%a0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ab70: 2002 movel %d2,%d0 <== NOT EXECUTED char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 4ab72: 2087 movel %d7,%a0@ <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ab74: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ab7a: 4e5e unlk %fp <== NOT EXECUTED 4ab7c: 4e75 rts <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4ab7e: 4eb9 0004 e084 jsr 4e084 <__errno> 4ab84: 74ff moveq #-1,%d2 4ab86: 7c14 moveq #20,%d6 4ab88: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ab8a: 2002 movel %d2,%d0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4ab8c: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ab8e: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4ab94: 4e5e unlk %fp 4ab96: 4e75 rts * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 4ab98: 266b 0058 moveal %a3@(88),%a3 4ab9c: 224a moveal %a2,%a1 4ab9e: 22eb 001c movel %a3@(28),%a1@+ 4aba2: 22eb 0020 movel %a3@(32),%a1@+ 4aba6: 22eb 0024 movel %a3@(36),%a1@+ 4abaa: 22eb 0028 movel %a3@(40),%a1@+ 4abae: 22ab 002c movel %a3@(44),%a1@ return (*pathloc->ops->evalpath_h)( &pathname[i], 4abb2: 226a 000c moveal %a2@(12),%a1 4abb6: 2f0a movel %a2,%sp@- 4abb8: 2f05 movel %d5,%sp@- 4abba: 2f2e 000c movel %fp@(12),%sp@- 4abbe: 2f08 movel %a0,%sp@- 4abc0: 2011 movel %a1@,%d0 4abc2: 2040 moveal %d0,%a0 4abc4: 4e90 jsr %a0@ 4abc6: 4fef 0010 lea %sp@(16),%sp 4abca: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4abcc: 2002 movel %d2,%d0 4abce: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 4abd4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ad1a : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4ad1a: 4e56 ffa8 linkw %fp,#-88 4ad1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ad22: 286e 0008 moveal %fp@(8),%a4 4ad26: 280e movel %fp,%d4 4ad28: 260e movel %fp,%d3 4ad2a: 5184 subql #8,%d4 4ad2c: 0683 ffff ffd3 addil #-45,%d3 4ad32: 4bf9 0004 b18c lea 4b18c ,%a5 * 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 ) ) 4ad38: 2c3c 0004 a83e movel #305214,%d6 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4ad3e: 2a3c 0004 b104 movel #307460,%d5 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4ad44: 2e3c 0004 ac60 movel #306272,%d7 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4ad4a: 2f0c movel %a4,%sp@- int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4ad4c: 246e 000c moveal %fp@(12),%a2 int i = 0; 4ad50: 42ae fff4 clrl %fp@(-12) node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 4ad54: 4eb9 0004 f3f0 jsr 4f3f0 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4ad5a: 2652 moveal %a2@,%a3 /* * Get the path length. */ pathlen = strlen( path ); 4ad5c: 588f addql #4,%sp 4ad5e: 4281 clrl %d1 4ad60: 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 ); 4ad64: 2f04 movel %d4,%sp@- 4ad66: 2f03 movel %d3,%sp@- 4ad68: 2f00 movel %d0,%sp@- 4ad6a: 4874 1800 pea %a4@(00000000,%d1:l) 4ad6e: 4e95 jsr %a5@ pathlen -= len; i += len; if ( !pathloc->node_access ) 4ad70: 2052 moveal %a2@,%a0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 4ad72: 2400 movel %d0,%d2 pathlen -= len; i += len; if ( !pathloc->node_access ) 4ad74: 4fef 0010 lea %sp@(16),%sp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 4ad78: 202e fff8 movel %fp@(-8),%d0 4ad7c: 91ae fffc subl %d0,%fp@(-4) i += len; 4ad80: d1ae fff4 addl %d0,%fp@(-12) if ( !pathloc->node_access ) 4ad84: 4a88 tstl %a0 4ad86: 6700 016e beqw 4aef6 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4ad8a: 4a82 tstl %d2 4ad8c: 6730 beqs 4adbe if ( node->type == IMFS_DIRECTORY ) 4ad8e: 7001 moveq #1,%d0 4ad90: b0ab 0048 cmpl %a3@(72),%d0 4ad94: 6700 00dc beqw 4ae72 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4ad98: 7002 moveq #2,%d0 4ad9a: b082 cmpl %d2,%d0 4ad9c: 6700 00a0 beqw 4ae3e 4ada0: 6418 bccs 4adba 4ada2: 7203 moveq #3,%d1 4ada4: b282 cmpl %d2,%d1 4ada6: 674a beqs 4adf2 4ada8: 7004 moveq #4,%d0 4adaa: b082 cmpl %d2,%d0 4adac: 672a beqs 4add8 <== ALWAYS TAKEN 4adae: 202e fffc movel %fp@(-4),%d0 4adb2: 2648 moveal %a0,%a3 4adb4: 222e fff4 movel %fp@(-12),%d1 4adb8: 60aa bras 4ad64 4adba: 4a82 tstl %d2 4adbc: 66f0 bnes 4adae <== ALWAYS TAKEN pathloc->node_access = node; } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 4adbe: 4eb9 0004 e084 jsr 4e084 <__errno> 4adc4: 7e11 moveq #17,%d7 4adc6: 74ff moveq #-1,%d2 4adc8: 2040 moveal %d0,%a0 4adca: 2087 movel %d7,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4adcc: 2002 movel %d2,%d0 4adce: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4add4: 4e5e unlk %fp 4add6: 4e75 rts case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4add8: 4eb9 0004 e084 jsr 4e084 <__errno> 4adde: 74ff moveq #-1,%d2 4ade0: 7c5b moveq #91,%d6 4ade2: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ade4: 2002 movel %d2,%d0 case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4ade6: 2086 movel %d6,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ade8: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4adee: 4e5e unlk %fp 4adf0: 4e75 rts pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 4adf2: 2028 0048 movel %a0@(72),%d0 4adf6: 7203 moveq #3,%d1 4adf8: b280 cmpl %d0,%d1 4adfa: 6700 00e0 beqw 4aedc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 4adfe: 7204 moveq #4,%d1 4ae00: b280 cmpl %d0,%d1 4ae02: 6700 00d8 beqw 4aedc if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 4ae06: 4a88 tstl %a0 4ae08: 6700 01d8 beqw 4afe2 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4ae0c: 7001 moveq #1,%d0 4ae0e: b0a8 0048 cmpl %a0@(72),%d0 4ae12: 6600 01ce bnew 4afe2 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4ae16: 2f03 movel %d3,%sp@- 4ae18: 2f08 movel %a0,%sp@- 4ae1a: 2045 moveal %d5,%a0 4ae1c: 4e90 jsr %a0@ /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4ae1e: 508f addql #8,%sp /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4ae20: 2640 moveal %d0,%a3 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 4ae22: 4a80 tstl %d0 4ae24: 6700 013a beqw 4af60 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4ae28: 7001 moveq #1,%d0 4ae2a: b0ab 0048 cmpl %a3@(72),%d0 4ae2e: 675a beqs 4ae8a 4ae30: 202e fffc movel %fp@(-4),%d0 4ae34: 222e fff4 movel %fp@(-12),%d1 } i += 2; pathlen -= 2; node = node->Parent; } pathloc->node_access = node; 4ae38: 248b movel %a3,%a2@ 4ae3a: 6000 ff28 braw 4ad64 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4ae3e: 2279 0005 e240 moveal 5e240 ,%a1 4ae44: 2669 0018 moveal %a1@(24),%a3 4ae48: b1cb cmpal %a3,%a0 4ae4a: 6700 00c4 beqw 4af10 if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4ae4e: 226a 0010 moveal %a2@(16),%a1 /* * Am I at the root of this mounted filesystem? */ if ( rtems_filesystem_is_root_location( pathloc ) ) { 4ae52: b1e9 001c cmpal %a1@(28),%a0 4ae56: 6700 00c4 beqw 4af1c *pathloc = pathloc->mt_entry->mt_point_node; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 4ae5a: 2668 0008 moveal %a0@(8),%a3 4ae5e: 4a8b tstl %a3 4ae60: 6700 0094 beqw 4aef6 rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 4ae64: 248b movel %a3,%a2@ 4ae66: 202e fffc movel %fp@(-4),%d0 4ae6a: 222e fff4 movel %fp@(-12),%d1 break; 4ae6e: 6000 fef4 braw 4ad64 * 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 ) ) 4ae72: 4878 0001 pea 1 4ae76: 2046 moveal %d6,%a0 4ae78: 2f0a movel %a2,%sp@- 4ae7a: 4e90 jsr %a0@ 4ae7c: 508f addql #8,%sp 4ae7e: 4a80 tstl %d0 4ae80: 6700 0146 beqw 4afc8 4ae84: 2052 moveal %a2@,%a0 4ae86: 6000 ff10 braw 4ad98 */ if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 4ae8a: 4aab 0058 tstl %a3@(88) 4ae8e: 67a0 beqs 4ae30 IMFS_skip_separator( path, &pathlen, &i); 4ae90: 486e fff4 pea %fp@(-12) if ((path[i] != '.') || (path[i + 1] != '.')) { 4ae94: 742e moveq #46,%d2 if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); 4ae96: 486e fffc pea %fp@(-4) 4ae9a: 2f0c movel %a4,%sp@- 4ae9c: 4eba f8ba jsr %pc@(4a758 ) if ((path[i] != '.') || (path[i + 1] != '.')) { 4aea0: 222e fff4 movel %fp@(-12),%d1 4aea4: 4fef 000c lea %sp@(12),%sp 4aea8: 41f4 1800 lea %a4@(00000000,%d1:l),%a0 4aeac: 1010 moveb %a0@,%d0 4aeae: 49c0 extbl %d0 4aeb0: b480 cmpl %d0,%d2 4aeb2: 6600 0148 bnew 4affc 4aeb6: 1034 1801 moveb %a4@(00000001,%d1:l),%d0 4aeba: 49c0 extbl %d0 4aebc: b480 cmpl %d0,%d2 4aebe: 6600 013c bnew 4affc return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; pathlen -= 2; 4aec2: 202e fffc movel %fp@(-4),%d0 *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 4aec6: 5481 addql #2,%d1 pathlen -= 2; 4aec8: 5580 subql #2,%d0 node = node->Parent; 4aeca: 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; 4aece: 2d41 fff4 movel %d1,%fp@(-12) pathlen -= 2; 4aed2: 2d40 fffc movel %d0,%fp@(-4) node = node->Parent; } pathloc->node_access = node; 4aed6: 248b movel %a3,%a2@ 4aed8: 6000 fe8a braw 4ad64 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4aedc: 42a7 clrl %sp@- 4aede: 2047 moveal %d7,%a0 4aee0: 2f0a movel %a2,%sp@- 4aee2: 4e90 jsr %a0@ if ( result == -1 ) 4aee4: 508f addql #8,%sp if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 4aee6: 2400 movel %d0,%d2 if ( result == -1 ) 4aee8: 70ff moveq #-1,%d0 4aeea: b082 cmpl %d2,%d0 4aeec: 6700 fede beqw 4adcc 4aef0: 2052 moveal %a2@,%a0 4aef2: 6000 ff12 braw 4ae06 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4aef6: 4eb9 0004 e084 jsr 4e084 <__errno> 4aefc: 74ff moveq #-1,%d2 4aefe: 7a02 moveq #2,%d5 4af00: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4af02: 2002 movel %d2,%d0 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 4af04: 2085 movel %d5,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4af06: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4af0c: 4e5e unlk %fp 4af0e: 4e75 rts /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4af10: 202e fffc movel %fp@(-4),%d0 4af14: 222e fff4 movel %fp@(-12),%d1 4af18: 6000 fe4a braw 4ad64 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 4af1c: 204a moveal %a2,%a0 4af1e: 20e9 0008 movel %a1@(8),%a0@+ 4af22: 20e9 000c movel %a1@(12),%a0@+ 4af26: 20e9 0010 movel %a1@(16),%a0@+ 4af2a: 20e9 0014 movel %a1@(20),%a0@+ 4af2e: 20a9 0018 movel %a1@(24),%a0@ return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 4af32: 206a 000c moveal %a2@(12),%a0 4af36: 2f2e 0010 movel %fp@(16),%sp@- 4af3a: 202e fff4 movel %fp@(-12),%d0 4af3e: 90ae fff8 subl %fp@(-8),%d0 4af42: 2f0a movel %a2,%sp@- 4af44: 4874 0800 pea %a4@(00000000,%d0:l) 4af48: 2068 0004 moveal %a0@(4),%a0 4af4c: 4e90 jsr %a0@ 4af4e: 4fef 000c lea %sp@(12),%sp 4af52: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4af54: 2002 movel %d2,%d0 4af56: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4af5c: 4e5e unlk %fp 4af5e: 4e75 rts case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 4af60: 202e fff4 movel %fp@(-12),%d0 4af64: 2200 movel %d0,%d1 4af66: 92ae fff8 subl %fp@(-8),%d1 4af6a: d28c addl %a4,%d1 4af6c: 206e 0010 moveal %fp@(16),%a0 4af70: 2081 movel %d1,%a0@ /* * 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++) { 4af72: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 4af76: 6726 beqs 4af9e 4af78: 47f9 0004 4220 lea 44220 ,%a3 if ( !IMFS_is_separator( path[ i ] ) ) 4af7e: 49c0 extbl %d0 4af80: 2f00 movel %d0,%sp@- 4af82: 4e93 jsr %a3@ 4af84: 588f addql #4,%sp 4af86: 4a80 tstl %d0 4af88: 6700 ff6c beqw 4aef6 /* * 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++) { 4af8c: 222e fff4 movel %fp@(-12),%d1 4af90: 5281 addql #1,%d1 4af92: 1034 1800 moveb %a4@(00000000,%d1:l),%d0 4af96: 2d41 fff4 movel %d1,%fp@(-12) 4af9a: 4a00 tstb %d0 4af9c: 66e0 bnes 4af7e /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4af9e: 2f0a movel %a2,%sp@- 4afa0: 4eb9 0004 a7b4 jsr 4a7b4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4afa6: 2052 moveal %a2@,%a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 4afa8: 2400 movel %d0,%d2 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 4afaa: 588f addql #4,%sp 4afac: 7001 moveq #1,%d0 4afae: b0a8 0048 cmpl %a0@(72),%d0 4afb2: 662e bnes 4afe2 <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 4afb4: 4878 0003 pea 3 4afb8: 2f0a movel %a2,%sp@- 4afba: 4eb9 0004 a83e jsr 4a83e 4afc0: 508f addql #8,%sp 4afc2: 4a80 tstl %d0 4afc4: 6600 fe06 bnew 4adcc rtems_set_errno_and_return_minus_one( EACCES ); 4afc8: 4eb9 0004 e084 jsr 4e084 <__errno> 4afce: 74ff moveq #-1,%d2 4afd0: 760d moveq #13,%d3 4afd2: 2040 moveal %d0,%a0 return result; } 4afd4: 2002 movel %d2,%d0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4afd6: 2083 movel %d3,%a0@ return result; } 4afd8: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4afde: 4e5e unlk %fp 4afe0: 4e75 rts /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4afe2: 4eb9 0004 e084 jsr 4e084 <__errno> 4afe8: 74ff moveq #-1,%d2 4afea: 7814 moveq #20,%d4 4afec: 2040 moveal %d0,%a0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4afee: 2002 movel %d2,%d0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4aff0: 2084 movel %d4,%a0@ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4aff2: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4aff8: 4e5e unlk %fp 4affa: 4e75 rts done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 4affc: 266b 0058 moveal %a3@(88),%a3 4b000: 224a moveal %a2,%a1 4b002: 22eb 001c movel %a3@(28),%a1@+ 4b006: 22eb 0020 movel %a3@(32),%a1@+ 4b00a: 22eb 0024 movel %a3@(36),%a1@+ 4b00e: 22eb 0028 movel %a3@(40),%a1@+ 4b012: 22ab 002c movel %a3@(44),%a1@ return (*pathloc->ops->evalformake_h)( &path[i], 4b016: 226a 000c moveal %a2@(12),%a1 4b01a: 2f2e 0010 movel %fp@(16),%sp@- 4b01e: 2f0a movel %a2,%sp@- 4b020: 2f08 movel %a0,%sp@- 4b022: 2029 0004 movel %a1@(4),%d0 4b026: 2040 moveal %d0,%a0 4b028: 4e90 jsr %a0@ 4b02a: 4fef 000c lea %sp@(12),%sp 4b02e: 2400 movel %d0,%d2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4b030: 2002 movel %d2,%d0 4b032: 4cee 3cfc ffa8 moveml %fp@(-88),%d2-%d7/%a2-%a5 4b038: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004ac60 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ac60: 4e56 ffec linkw %fp,#-20 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4ac64: 2079 0005 e240 moveal 5e240 ,%a0 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ac6a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4ac6e: 266e 0008 moveal %fp@(8),%a3 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4ac72: 4bf9 0004 abd8 lea 4abd8 ,%a5 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4ac78: 49f9 0004 a878 lea 4a878 ,%a4 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4ac7e: 242e 000c movel %fp@(12),%d2 IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4ac82: 2453 moveal %a3@,%a2 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ac84: 4281 clrl %d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4ac86: 3028 0030 movew %a0@(48),%d0 4ac8a: 5280 addql #1,%d0 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ac8c: 3200 movew %d0,%d1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4ac8e: 3140 0030 movew %d0,%a0@(48) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4ac92: 7005 moveq #5,%d0 4ac94: b081 cmpl %d1,%d0 4ac96: 6564 bcss 4acfc /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4ac98: 202a 0048 movel %a2@(72),%d0 4ac9c: 7203 moveq #3,%d1 4ac9e: b280 cmpl %d0,%d1 4aca0: 6740 beqs 4ace2 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4aca2: 7204 moveq #4,%d1 4aca4: b280 cmpl %d0,%d1 4aca6: 671a beqs 4acc2 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4aca8: 5780 subql #3,%d0 4acaa: 7201 moveq #1,%d1 4acac: b280 cmpl %d0,%d1 4acae: 64d2 bccs 4ac82 <== NEVER TAKEN 4acb0: 4280 clrl %d0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4acb2: 4241 clrw %d1 4acb4: 3141 0030 movew %d1,%a0@(48) return result; } 4acb8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4acbe: 4e5e unlk %fp 4acc0: 4e75 rts if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4acc2: 2f02 movel %d2,%sp@- 4acc4: 2f0b movel %a3,%sp@- 4acc6: 4e95 jsr %a5@ 4acc8: 508f addql #8,%sp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4acca: 4a80 tstl %d0 4accc: 6620 bnes 4acee 4acce: 202a 0048 movel %a2@(72),%d0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4acd2: 7201 moveq #1,%d1 4acd4: 5780 subql #3,%d0 ( jnode->type == IMFS_HARD_LINK ) ) ); 4acd6: 2079 0005 e240 moveal 5e240 ,%a0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 4acdc: b280 cmpl %d0,%d1 4acde: 64a2 bccs 4ac82 <== ALWAYS TAKEN 4ace0: 60ce bras 4acb0 <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); 4ace2: 2f02 movel %d2,%sp@- 4ace4: 2f0b movel %a3,%sp@- 4ace6: 4e94 jsr %a4@ 4ace8: 508f addql #8,%sp else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4acea: 4a80 tstl %d0 4acec: 67e0 beqs 4acce 4acee: 2079 0005 e240 moveal 5e240 ,%a0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4acf4: 4241 clrw %d1 4acf6: 3141 0030 movew %d1,%a0@(48) 4acfa: 60bc bras 4acb8 * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 4acfc: 4241 clrw %d1 4acfe: 3141 0030 movew %d1,%a0@(48) rtems_set_errno_and_return_minus_one( ELOOP ); 4ad02: 4eb9 0004 e084 jsr 4e084 <__errno> 4ad08: 725c moveq #92,%d1 4ad0a: 2040 moveal %d0,%a0 4ad0c: 70ff moveq #-1,%d0 */ rtems_filesystem_link_counts = 0; return result; } 4ad0e: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4ad14: 2081 movel %d1,%a0@ */ rtems_filesystem_link_counts = 0; return result; } 4ad16: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a83e : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4a83e: 72f8 moveq #-8,%d1 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4a840: 4e56 0000 linkw %fp,#0 4a844: 202e 000c movel %fp@(12),%d0 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 4a848: c280 andl %d0,%d1 4a84a: 661a bnes 4a866 <== NEVER TAKEN /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4a84c: 206e 0008 moveal %fp@(8),%a0 return 1; return 0; } 4a850: 4e5e unlk %fp */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 4a852: ed88 lsll #6,%d0 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 4a854: 2050 moveal %a0@,%a0 4a856: 2200 movel %d0,%d1 4a858: c2a8 002e andl %a0@(46),%d1 return 1; 4a85c: b280 cmpl %d0,%d1 4a85e: 57c0 seq %d0 4a860: 49c0 extbl %d0 4a862: 4480 negl %d0 return 0; } 4a864: 4e75 rts gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4a866: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 4a86c: 7201 moveq #1,%d1 <== NOT EXECUTED 4a86e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a870: 70ff moveq #-1,%d0 <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4a872: 4e5e unlk %fp <== NOT EXECUTED gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4a874: 2081 movel %d1,%a0@ <== NOT EXECUTED */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } =============================================================================== 00043b06 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 43b06: 4e56 0000 linkw %fp,#0 43b0a: 206e 0008 moveal %fp@(8),%a0 43b0e: 202e 000c movel %fp@(12),%d0 43b12: 226e 0010 moveal %fp@(16),%a1 43b16: 2f02 movel %d2,%sp@- int err; if (command == FIONBIO) { 43b18: 0c80 8004 667e cmpil #-2147195266,%d0 43b1e: 6724 beqs 43b44 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 43b20: 2f08 movel %a0,%sp@- 43b22: 2068 0018 moveal %a0@(24),%a0 43b26: 2f09 movel %a1,%sp@- 43b28: 2f00 movel %d0,%sp@- 43b2a: 2f28 004c movel %a0@(76),%sp@- 43b2e: 4eb9 0004 dbee jsr 4dbee IMFS_FIFO_RETURN(err); 43b34: 4fef 0010 lea %sp@(16),%sp 43b38: 4a80 tstl %d0 43b3a: 6d44 blts 43b80 } 43b3c: 242e fffc movel %fp@(-4),%d2 43b40: 4e5e unlk %fp 43b42: 4e75 rts ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43b44: 4a89 tstl %a1 43b46: 6722 beqs 43b6a err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43b48: 4280 clrl %d0 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) 43b4a: 4a91 tstl %a1@ 43b4c: 670e beqs 43b5c iop->flags |= LIBIO_FLAGS_NO_DELAY; 43b4e: 7201 moveq #1,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43b50: 242e fffc movel %fp@(-4),%d2 43b54: 4e5e unlk %fp if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 43b56: 83a8 0014 orl %d1,%a0@(20) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43b5a: 4e75 rts err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43b5c: 72fe moveq #-2,%d1 } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43b5e: 242e fffc movel %fp@(-4),%d2 43b62: 4e5e unlk %fp err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 43b64: c3a8 0014 andl %d1,%a0@(20) } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 43b68: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43b6a: 4eb9 0004 fd88 jsr 4fd88 <__errno> ) { int err; if (command == FIONBIO) { if (buffer == NULL) 43b70: 740e moveq #14,%d2 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43b72: 2040 moveal %d0,%a0 43b74: 70ff moveq #-1,%d0 43b76: 2082 movel %d2,%a0@ } 43b78: 242e fffc movel %fp@(-4),%d2 43b7c: 4e5e unlk %fp 43b7e: 4e75 rts } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 43b80: 2400 movel %d0,%d2 43b82: 4482 negl %d2 43b84: 4eb9 0004 fd88 jsr 4fd88 <__errno> 43b8a: 2040 moveal %d0,%a0 43b8c: 70ff moveq #-1,%d0 43b8e: 2082 movel %d2,%a0@ 43b90: 60e6 bras 43b78 ... =============================================================================== 00043940 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 43940: 4e56 fff4 linkw %fp,#-12 43944: 206e 0008 moveal %fp@(8),%a0 43948: 48d7 001c moveml %d2-%d4,%sp@ off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 4394c: 2f08 movel %a0,%sp@- 4394e: 2f2e 0014 movel %fp@(20),%sp@- 43952: 2068 0018 moveal %a0@(24),%a0 43956: 2f2e 0010 movel %fp@(16),%sp@- 4395a: 2f2e 000c movel %fp@(12),%sp@- 4395e: 2f28 004c movel %a0@(76),%sp@- 43962: 4eb9 0004 dc6c jsr 4dc6c IMFS_FIFO_RETURN(err); 43968: 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); 4396c: 2800 movel %d0,%d4 4396e: 2600 movel %d0,%d3 43970: 5bc2 smi %d2 43972: 49c2 extbl %d2 IMFS_FIFO_RETURN(err); 43974: 4a82 tstl %d2 43976: 6b0e bmis 43986 <== ALWAYS TAKEN } 43978: 2002 movel %d2,%d0 <== NOT EXECUTED 4397a: 2203 movel %d3,%d1 <== NOT EXECUTED 4397c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 43982: 4e5e unlk %fp <== NOT EXECUTED 43984: 4e75 rts <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 43986: 4eb9 0004 fd88 jsr 4fd88 <__errno> 4398c: 4484 negl %d4 4398e: 2040 moveal %d0,%a0 43990: 74ff moveq #-1,%d2 43992: 76ff moveq #-1,%d3 43994: 2084 movel %d4,%a0@ } 43996: 2002 movel %d2,%d0 43998: 2203 movel %d3,%d1 4399a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 439a0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000439a4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 439a4: 4e56 fff8 linkw %fp,#-8 439a8: 206e 0008 moveal %fp@(8),%a0 439ac: 2f0a movel %a2,%sp@- 439ae: 2f02 movel %d2,%sp@- IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 439b0: 2f08 movel %a0,%sp@- 439b2: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop, const void *buffer, size_t count ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; 439b6: 2468 0018 moveal %a0@(24),%a2 int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 439ba: 2f2e 000c movel %fp@(12),%sp@- 439be: 2f2a 004c movel %a2@(76),%sp@- 439c2: 4eb9 0004 d9d2 jsr 4d9d2 if (err > 0) { 439c8: 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); 439cc: 2400 movel %d0,%d2 if (err > 0) { 439ce: 6f28 bles 439f8 IMFS_mtime_ctime_update(jnode); 439d0: 42a7 clrl %sp@- 439d2: 486e fff8 pea %fp@(-8) 439d6: 4eb9 0004 4eb8 jsr 44eb8 439dc: 202e fff8 movel %fp@(-8),%d0 439e0: 508f addql #8,%sp 439e2: 2540 0040 movel %d0,%a2@(64) 439e6: 2540 0044 movel %d0,%a2@(68) } IMFS_FIFO_RETURN(err); } 439ea: 2002 movel %d2,%d0 439ec: 242e fff0 movel %fp@(-16),%d2 439f0: 246e fff4 moveal %fp@(-12),%a2 439f4: 4e5e unlk %fp 439f6: 4e75 rts int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 439f8: 4a80 tstl %d0 439fa: 67ee beqs 439ea <== NEVER TAKEN 439fc: 4eb9 0004 fd88 jsr 4fd88 <__errno> 43a02: 4482 negl %d2 43a04: 2040 moveal %d0,%a0 43a06: 2082 movel %d2,%a0@ 43a08: 74ff moveq #-1,%d2 } 43a0a: 2002 movel %d2,%d0 43a0c: 242e fff0 movel %fp@(-16),%d2 43a10: 246e fff4 moveal %fp@(-12),%a2 43a14: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b104 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b104: 4e56 ffec linkw %fp,#-20 4b108: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b10c: 4879 0005 d516 pea 5d516 4b112: 47f9 0004 ee3c lea 4ee3c ,%a3 IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b118: 242e 000c movel %fp@(12),%d2 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b11c: 2f02 movel %d2,%sp@- IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4b11e: 286e 0008 moveal %fp@(8),%a4 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4b122: 4e93 jsr %a3@ 4b124: 508f addql #8,%sp 4b126: 4a80 tstl %d0 4b128: 6736 beqs 4b160 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 4b12a: 4879 0005 d518 pea 5d518 4b130: 2f02 movel %d2,%sp@- 4b132: 4e93 jsr %a3@ 4b134: 508f addql #8,%sp 4b136: 4a80 tstl %d0 4b138: 6732 beqs 4b16c <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 4b13a: 260c movel %a4,%d3 4b13c: 0683 0000 0050 addil #80,%d3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4b142: 246c 004c moveal %a4@(76),%a2 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4b146: b68a cmpl %a2,%d3 4b148: 6714 beqs 4b15e !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 ) ) 4b14a: 486a 000c pea %a2@(12) 4b14e: 2f02 movel %d2,%sp@- 4b150: 4e93 jsr %a3@ 4b152: 508f addql #8,%sp 4b154: 4a80 tstl %d0 4b156: 6724 beqs 4b17c 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 ) { 4b158: 2452 moveal %a2@,%a2 if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 4b15a: b68a cmpl %a2,%d3 4b15c: 66ec bnes 4b14a if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; 4b15e: 99cc subal %a4,%a4 } 4b160: 200c movel %a4,%d0 4b162: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b168: 4e5e unlk %fp 4b16a: 4e75 rts if ( !strcmp( name, dotname ) ) return directory; if ( !strcmp( name, dotdotname ) ) return directory->Parent; 4b16c: 286c 0008 moveal %a4@(8),%a4 <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4b170: 200c movel %a4,%d0 <== NOT EXECUTED 4b172: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4b178: 4e5e unlk %fp <== NOT EXECUTED 4b17a: 4e75 rts <== NOT EXECUTED !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 ) ) 4b17c: 284a moveal %a2,%a4 return the_jnode; } return 0; } 4b17e: 200c movel %a4,%d0 4b180: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4b186: 4e5e unlk %fp ... =============================================================================== 0004b03c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4b03c: 4e56 ffd8 linkw %fp,#-40 4b040: 206e 0008 moveal %fp@(8),%a0 4b044: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ * 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; 4b048: 47ee ffec lea %fp@(-20),%a3 4b04c: 49f9 0004 a7b4 lea 4a7b4 ,%a4 next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 4b052: 4bf9 0004 2b9c lea 42b9c ,%a5 * 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; 4b058: 26a8 001c movel %a0@(28),%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; 4b05c: 2468 001c moveal %a0@(28),%a2 loc = temp_mt_entry->mt_fs_root; 4b060: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4b066: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4b06c: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4b072: 2d68 002c fffc movel %a0@(44),%fp@(-4) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4b078: 42a8 001c clrl %a0@(28) do { next = jnode->Parent; 4b07c: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4b080: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4b084: 2f0b movel %a3,%sp@- 4b086: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4b088: 588f addql #4,%sp 4b08a: 7001 moveq #1,%d0 4b08c: b0aa 0048 cmpl %a2@(72),%d0 4b090: 6646 bnes 4b0d8 <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4b092: 200a movel %a2,%d0 4b094: 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 ) ) { 4b09a: b0aa 004c cmpl %a2@(76),%d0 4b09e: 6738 beqs 4b0d8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 4b0a0: 4a8a tstl %a2 4b0a2: 6746 beqs 4b0ea <== NEVER TAKEN if ( jnode->type == IMFS_DIRECTORY ) { 4b0a4: 7001 moveq #1,%d0 4b0a6: b0aa 0048 cmpl %a2@(72),%d0 4b0aa: 66d0 bnes 4b07c <== NEVER TAKEN 4b0ac: 220a movel %a2,%d1 4b0ae: 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; 4b0b4: 202a 004c movel %a2@(76),%d0 if ( jnode_has_children( jnode ) ) 4b0b8: b280 cmpl %d0,%d1 4b0ba: 67c0 beqs 4b07c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4b0bc: 4a80 tstl %d0 4b0be: 672c beqs 4b0ec <== NEVER TAKEN 4b0c0: 2440 moveal %d0,%a2 */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4b0c2: 242a 0008 movel %a2@(8),%d2 loc.node_access = (void *)jnode; 4b0c6: 2d4a ffec movel %a2,%fp@(-20) IMFS_Set_handlers( &loc ); 4b0ca: 2f0b movel %a3,%sp@- 4b0cc: 4e94 jsr %a4@ if ( jnode->type != IMFS_DIRECTORY ) { 4b0ce: 588f addql #4,%sp 4b0d0: 7001 moveq #1,%d0 4b0d2: b0aa 0048 cmpl %a2@(72),%d0 4b0d6: 67ba beqs 4b092 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 4b0d8: 2f0b movel %a3,%sp@- 4b0da: 42a7 clrl %sp@- 4b0dc: 4e95 jsr %a5@ if (result != 0) 4b0de: 508f addql #8,%sp 4b0e0: 4a80 tstl %d0 4b0e2: 6612 bnes 4b0f6 <== NEVER TAKEN return -1; jnode = next; 4b0e4: 2442 moveal %d2,%a2 } if ( jnode != NULL ) { 4b0e6: 4a8a tstl %a2 4b0e8: 66ba bnes 4b0a4 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 4b0ea: 4280 clrl %d0 } 4b0ec: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4b0f2: 4e5e unlk %fp 4b0f4: 4e75 rts return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 4b0f6: 70ff moveq #-1,%d0 <== NOT EXECUTED } } } while (jnode != NULL); return 0; } 4b0f8: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4b0fe: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004b18c : const char *path, int pathlen, char *token, int *token_len ) { 4b18c: 4e56 ffe4 linkw %fp,#-28 4b190: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b194: 246e 0008 moveal %fp@(8),%a2 4b198: 49f9 0004 4220 lea 44220 ,%a4 int pathlen, char *token, int *token_len ) { register int i = 0; 4b19e: 4282 clrl %d2 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b1a0: 161a moveb %a2@+,%d3 const char *path, int pathlen, char *token, int *token_len ) { 4b1a2: 2a6e 0010 moveal %fp@(16),%a5 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4b1a6: 264d moveal %a5,%a3 while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b1a8: 1003 moveb %d3,%d0 const char *path, int pathlen, char *token, int *token_len ) { 4b1aa: 282e 000c movel %fp@(12),%d4 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 4b1ae: 49c0 extbl %d0 4b1b0: 2f00 movel %d0,%sp@- 4b1b2: 4e94 jsr %a4@ 4b1b4: 588f addql #4,%sp 4b1b6: 4a80 tstl %d0 4b1b8: 6620 bnes 4b1da 4b1ba: b882 cmpl %d2,%d4 4b1bc: 6f1c bles 4b1da token[i] = c; if ( i == IMFS_NAME_MAX ) 4b1be: 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; 4b1c0: 16c3 moveb %d3,%a3@+ if ( i == IMFS_NAME_MAX ) 4b1c2: b082 cmpl %d2,%d0 4b1c4: 6700 0082 beqw 4b248 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4b1c8: 5282 addql #1,%d2 4b1ca: 161a moveb %a2@+,%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) ) { 4b1cc: 1003 moveb %d3,%d0 4b1ce: 49c0 extbl %d0 4b1d0: 2f00 movel %d0,%sp@- 4b1d2: 4e94 jsr %a4@ 4b1d4: 588f addql #4,%sp 4b1d6: 4a80 tstl %d0 4b1d8: 67e0 beqs 4b1ba /* * Copy a seperator into token. */ if ( i == 0 ) { 4b1da: 4a82 tstl %d2 4b1dc: 6626 bnes 4b204 token[i] = c; 4b1de: 1a83 moveb %d3,%a5@ if ( (token[i] != '\0') && pathlen ) { 4b1e0: 6718 beqs 4b1fa 4b1e2: 4a84 tstl %d4 4b1e4: 6714 beqs 4b1fa /* * Set token_len to the number of characters copied. */ *token_len = i; 4b1e6: 206e 0014 moveal %fp@(20),%a0 if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { i++; 4b1ea: 7401 moveq #1,%d2 type = IMFS_CURRENT_DIR; 4b1ec: 7001 moveq #1,%d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b1ee: 2082 movel %d2,%a0@ else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b1f0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b1f6: 4e5e unlk %fp 4b1f8: 4e75 rts /* * Set token_len to the number of characters copied. */ *token_len = i; 4b1fa: 206e 0014 moveal %fp@(20),%a0 if ( (token[i] != '\0') && pathlen ) { i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; 4b1fe: 4280 clrl %d0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b200: 2082 movel %d2,%a0@ 4b202: 60ec bras 4b1f0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4b204: 4a35 28ff tstb %a5@(ffffffff,%d2:l) 4b208: 6706 beqs 4b210 <== NEVER TAKEN token[i] = '\0'; 4b20a: 4200 clrb %d0 4b20c: 1b80 2800 moveb %d0,%a5@(00000000,%d2:l) * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b210: 4879 0005 d51b pea 5d51b 4b216: 45f9 0004 ee3c lea 4ee3c ,%a2 /* * Set token_len to the number of characters copied. */ *token_len = i; 4b21c: 206e 0014 moveal %fp@(20),%a0 4b220: 2082 movel %d2,%a0@ * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4b222: 2f0d movel %a5,%sp@- 4b224: 4e92 jsr %a2@ 4b226: 508f addql #8,%sp 4b228: 4a80 tstl %d0 4b22a: 6728 beqs 4b254 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4b22c: 4879 0005 d51c pea 5d51c 4b232: 2f0d movel %a5,%sp@- 4b234: 4e92 jsr %a2@ 4b236: 508f addql #8,%sp 4b238: 4a80 tstl %d0 4b23a: 6724 beqs 4b260 4b23c: 7003 moveq #3,%d0 type = IMFS_CURRENT_DIR; } return type; } 4b23e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b244: 4e5e unlk %fp 4b246: 4e75 rts while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 4b248: 7004 moveq #4,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b24a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b250: 4e5e unlk %fp 4b252: 4e75 rts * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 4b254: 7002 moveq #2,%d0 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4b256: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b25c: 4e5e unlk %fp 4b25e: 4e75 rts if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; 4b260: 7001 moveq #1,%d0 } return type; } 4b262: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b268: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000426e0 : /* * 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) { 426e0: 7010 moveq #16,%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 ) { 426e2: 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, 426e6: 2239 0005 e0fe movel 5e0fe ,%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 ) { 426ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 426f0: 246e 0008 moveal %fp@(8),%a2 426f4: 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) { 426f8: b081 cmpl %d1,%d0 426fa: 6724 beqs 42720 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 426fc: 103c 000f moveb #15,%d0 42700: b081 cmpl %d1,%d0 42702: 6c16 bges 4271a 42704: 307c 0005 moveaw #5,%a0 42708: 103c 0020 moveb #32,%d0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 4270c: 5388 subql #1,%a0 if (bit_mask == requested_bytes_per_block) { 4270e: b081 cmpl %d1,%d0 42710: 670e beqs 42720 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 42712: 6e06 bgts 4271a <== NEVER TAKEN int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 42714: d080 addl %d0,%d0 42716: 4a88 tstl %a0 42718: 66f2 bnes 4270c <== ALWAYS TAKEN if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 4271a: 223c 0000 0080 movel #128,%d1 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 42720: 23c1 0005 efe8 movel %d1,5efe8 /* * 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(); 42726: 4eb9 0004 a71c jsr 4a71c 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 ) ); 4272c: 4878 0014 pea 14 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 42730: 41f9 0005 d4e6 lea 5d4e6 ,%a0 42736: 43f9 0005 d4ea lea 5d4ea ,%a1 /* * 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(); 4273c: 2640 moveal %d0,%a3 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4273e: 2550 0038 movel %a0@,%a2@(56) 42742: 41f9 0005 d4ee lea 5d4ee ,%a0 42748: 2551 003c movel %a1@,%a2@(60) 4274c: 43f9 0005 d4f2 lea 5d4f2 ,%a1 42752: 2550 0040 movel %a0@,%a2@(64) 42756: 41f9 0005 d4f6 lea 5d4f6 ,%a0 4275c: 2551 0044 movel %a1@,%a2@(68) 42760: 43f9 0005 d4fa lea 5d4fa ,%a1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 42766: 4878 0001 pea 1 * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4276a: 2550 0048 movel %a0@,%a2@(72) 4276e: 41f9 0005 d4fe lea 5d4fe ,%a0 42774: 2551 004c movel %a1@,%a2@(76) 42778: 43f9 0005 d502 lea 5d502 ,%a1 4277e: 2550 0050 movel %a0@,%a2@(80) 42782: 41f9 0005 d506 lea 5d506 ,%a0 42788: 2551 0054 movel %a1@,%a2@(84) 4278c: 43f9 0005 d50a lea 5d50a ,%a1 42792: 2550 0058 movel %a0@,%a2@(88) 42796: 41f9 0005 d50e lea 5d50e ,%a0 4279c: 2551 005c movel %a1@,%a2@(92) 427a0: 43f9 0005 d512 lea 5d512 ,%a1 427a6: 2550 0060 movel %a0@,%a2@(96) 427aa: 2551 0064 movel %a1@,%a2@(100) * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 427ae: 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(); 427b4: 2540 001c movel %d0,%a2@(28) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 427b8: 2542 0024 movel %d2,%a2@(36) 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 ) ); 427bc: 4eb9 0004 2ec8 jsr 42ec8 if ( !fs_info ) { 427c2: 508f addql #8,%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 ) ); 427c4: 2040 moveal %d0,%a0 if ( !fs_info ) { 427c6: 4a80 tstl %d0 427c8: 673c beqs 42806 free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 427ca: 2548 0034 movel %a0,%a2@(52) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427ce: 2239 0005 efec movel 5efec ,%d1 427d4: 2241 moveal %d1,%a1 427d6: 5289 addql #1,%a1 fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; 427d8: 4280 clrl %d0 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427da: 2081 movel %d1,%a0@ fs_info->ino_count = 1; 427dc: 7201 moveq #1,%d1 fs_info->memfile_handlers = memfile_handlers; 427de: 216e 0010 0008 movel %fp@(16),%a0@(8) fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 427e4: 216e 0018 0010 movel %fp@(24),%a0@(16) */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 427ea: 2142 000c movel %d2,%a0@(12) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 427ee: 2141 0004 movel %d1,%a0@(4) fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 427f2: 2741 0034 movel %d1,%a3@(52) return 0; } 427f6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 427fc: 23c9 0005 efec movel %a1,5efec jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 42802: 4e5e unlk %fp 42804: 4e75 rts /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 42806: 2f0b movel %a3,%sp@- 42808: 4eb9 0004 32dc jsr 432dc rtems_set_errno_and_return_minus_one(ENOMEM); 4280e: 4eb9 0004 e084 jsr 4e084 <__errno> 42814: 588f addql #4,%sp 42816: 720c moveq #12,%d1 42818: 2040 moveal %d0,%a0 4281a: 70ff moveq #-1,%d0 jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 4281c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); 42822: 2081 movel %d1,%a0@ jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 42824: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d0f6 : */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4d0f6: 4e56 ffd0 linkw %fp,#-48 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d0fa: 2039 0005 efe8 movel 5efe8 ,%d0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4d100: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d104: 2800 movel %d0,%d4 4d106: e48c lsrl #2,%d4 4d108: 2204 movel %d4,%d1 4d10a: 5281 addql #1,%d1 4d10c: 4c04 1800 mulsl %d4,%d1 4d110: 4282 clrl %d2 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4d112: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d116: 5281 addql #1,%d1 4d118: 4c04 1800 mulsl %d4,%d1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4d11c: 2c2e 000c movel %fp@(12),%d6 4d120: 2e2e 0010 movel %fp@(16),%d7 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4d124: 5381 subql #1,%d1 4d126: 4c00 1800 mulsl %d0,%d1 4d12a: 2601 movel %d1,%d3 4d12c: 2802 movel %d2,%d4 4d12e: 2a03 movel %d3,%d5 4d130: 9a87 subl %d7,%d5 4d132: 9986 subxl %d6,%d4 4d134: 6f00 00da blew 4d210 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 4d138: 282a 004c movel %a2@(76),%d4 4d13c: 2a2a 0050 movel %a2@(80),%d5 4d140: 2206 movel %d6,%d1 4d142: 2407 movel %d7,%d2 4d144: 9485 subl %d5,%d2 4d146: 9384 subxl %d4,%d1 4d148: 6f00 008a blew 4d1d4 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d14c: 47f9 0005 a5d0 lea 5a5d0 <__divdi3>,%a3 4d152: 2400 movel %d0,%d2 4d154: 5bc1 smi %d1 4d156: 49c1 extbl %d1 4d158: 2841 moveal %d1,%a4 4d15a: 2a42 moveal %d2,%a5 4d15c: 2f0d movel %a5,%sp@- 4d15e: 2f01 movel %d1,%sp@- 4d160: 2f07 movel %d7,%sp@- 4d162: 2f06 movel %d6,%sp@- 4d164: 4e93 jsr %a3@ 4d166: 4fef 0010 lea %sp@(16),%sp 4d16a: 2401 movel %d1,%d2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d16c: 2f0d movel %a5,%sp@- 4d16e: 2f0c movel %a4,%sp@- 4d170: 2f05 movel %d5,%sp@- 4d172: 2f04 movel %d4,%sp@- 4d174: 4e93 jsr %a3@ 4d176: 4fef 0010 lea %sp@(16),%sp 4d17a: 2841 moveal %d1,%a4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d17c: b282 cmpl %d2,%d1 4d17e: 621a bhis 4d19a <== NEVER TAKEN 4d180: 2801 movel %d1,%d4 4d182: 47f9 0004 cf0c lea 4cf0c ,%a3 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4d188: 2f04 movel %d4,%sp@- 4d18a: 2f0a movel %a2,%sp@- 4d18c: 4e93 jsr %a3@ 4d18e: 508f addql #8,%sp 4d190: 4a80 tstl %d0 4d192: 664c bnes 4d1e0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4d194: 5284 addql #1,%d4 4d196: b882 cmpl %d2,%d4 4d198: 63ee blss 4d188 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 4d19a: 42a7 clrl %sp@- 4d19c: 240e movel %fp,%d2 4d19e: 5182 subql #8,%d2 4d1a0: 47f9 0004 336c lea 4336c ,%a3 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4d1a6: 2546 004c movel %d6,%a2@(76) 4d1aa: 2547 0050 movel %d7,%a2@(80) IMFS_update_ctime(the_jnode); 4d1ae: 2f02 movel %d2,%sp@- 4d1b0: 4e93 jsr %a3@ 4d1b2: 256e fff8 0044 movel %fp@(-8),%a2@(68) IMFS_update_mtime(the_jnode); 4d1b8: 42a7 clrl %sp@- 4d1ba: 2f02 movel %d2,%sp@- 4d1bc: 4e93 jsr %a3@ 4d1be: 256e fff8 0040 movel %fp@(-8),%a2@(64) 4d1c4: 4fef 0010 lea %sp@(16),%sp return 0; 4d1c8: 4280 clrl %d0 } 4d1ca: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d1d0: 4e5e unlk %fp 4d1d2: 4e75 rts /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 4d1d4: 4280 clrl %d0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d1d6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d1dc: 4e5e unlk %fp 4d1de: 4e75 rts /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4d1e0: b88c cmpl %a4,%d4 4d1e2: 6514 bcss 4d1f8 <== NEVER TAKEN 4d1e4: 47f9 0004 d0ce lea 4d0ce ,%a3 IMFS_memfile_remove_block( the_jnode, block ); 4d1ea: 2f04 movel %d4,%sp@- /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4d1ec: 5384 subql #1,%d4 IMFS_memfile_remove_block( the_jnode, block ); 4d1ee: 2f0a movel %a2,%sp@- 4d1f0: 4e93 jsr %a3@ /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 4d1f2: 508f addql #8,%sp 4d1f4: b88c cmpl %a4,%d4 4d1f6: 64f2 bccs 4d1ea IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4d1f8: 4eb9 0004 e084 jsr 4e084 <__errno> 4d1fe: 721c moveq #28,%d1 4d200: 2040 moveal %d0,%a0 4d202: 70ff moveq #-1,%d0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d204: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4d20a: 2081 movel %d1,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d20c: 4e5e unlk %fp 4d20e: 4e75 rts /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4d210: 4eb9 0004 e084 jsr 4e084 <__errno> 4d216: 7416 moveq #22,%d2 4d218: 2040 moveal %d0,%a0 4d21a: 70ff moveq #-1,%d0 4d21c: 2082 movel %d2,%a0@ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 4d21e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d224: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cad8 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4cad8: 4e56 fff0 linkw %fp,#-16 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4cadc: 2239 0005 efe8 movel 5efe8 ,%d1 4cae2: e489 lsrl #2,%d1 4cae4: 2001 movel %d1,%d0 4cae6: 5380 subql #1,%d0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4cae8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4caec: 246e 0008 moveal %fp@(8),%a2 4caf0: 242e 000c movel %fp@(12),%d2 4caf4: 206e 0010 moveal %fp@(16),%a0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4caf8: b082 cmpl %d2,%d0 4cafa: 6520 bcss 4cb1c p = info->indirect; 4cafc: 226a 0054 moveal %a2@(84),%a1 if ( malloc_it ) { 4cb00: 4a88 tstl %a0 4cb02: 6700 00a4 beqw 4cba8 if ( !p ) { 4cb06: 4a89 tstl %a1 4cb08: 6700 0106 beqw 4cc10 } if ( !p ) return 0; return &info->indirect[ my_block ]; 4cb0c: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4cb10: 2009 movel %a1,%d0 /* * This means the requested block number is out of range. */ return 0; } 4cb12: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cb18: 4e5e unlk %fp 4cb1a: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4cb1c: 2001 movel %d1,%d0 4cb1e: 5280 addql #1,%d0 4cb20: 4c01 0800 mulsl %d1,%d0 4cb24: 2240 moveal %d0,%a1 4cb26: 5389 subql #1,%a1 4cb28: b3c2 cmpal %d2,%a1 4cb2a: 644e bccs 4cb7a } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4cb2c: 2600 movel %d0,%d3 4cb2e: 5283 addql #1,%d3 4cb30: 4c01 3800 mulsl %d1,%d3 4cb34: 5383 subql #1,%d3 4cb36: b682 cmpl %d2,%d3 4cb38: 6574 bcss 4cbae <== NEVER TAKEN my_block -= FIRST_TRIPLY_INDIRECT; 4cb3a: 9480 subl %d0,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4cb3c: 4c41 2004 remul %d1,%d4,%d2 4cb40: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 4cb44: 226a 005c moveal %a2@(92),%a1 if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4cb48: 4c41 2003 remul %d1,%d3,%d2 4cb4c: 4c41 2002 remul %d1,%d2,%d2 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { 4cb50: 4a88 tstl %a0 4cb52: 6600 008a bnew 4cbde p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4cb56: 4a89 tstl %a1 4cb58: 6754 beqs 4cbae <== NEVER TAKEN return 0; p1 = (block_p *) p[ triply ]; 4cb5a: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p1 ) 4cb5e: 4a88 tstl %a0 4cb60: 674c beqs 4cbae <== NEVER TAKEN return 0; p2 = (block_p *)p1[ doubly ]; 4cb62: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 if ( !p2 ) 4cb66: 4a88 tstl %a0 4cb68: 6744 beqs 4cbae <== NEVER TAKEN return 0; return (block_p *)&p2[ singly ]; 4cb6a: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4cb6e: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4cb70: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cb76: 4e5e unlk %fp 4cb78: 4e75 rts /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; 4cb7a: 9481 subl %d1,%d2 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 4cb7c: 226a 0058 moveal %a2@(88),%a1 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4cb80: 4c41 2003 remul %d1,%d3,%d2 4cb84: 4c41 2002 remul %d1,%d2,%d2 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { 4cb88: 4a88 tstl %a0 4cb8a: 662e bnes 4cbba } return (block_p *)&p1[ singly ]; } if ( !p ) 4cb8c: 4a89 tstl %a1 4cb8e: 671e beqs 4cbae <== NEVER TAKEN return 0; p = (block_p *)p[ doubly ]; 4cb90: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0 if ( !p ) 4cb94: 4a88 tstl %a0 4cb96: 6716 beqs 4cbae <== NEVER TAKEN return 0; return (block_p *)&p[ singly ]; 4cb98: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4cb9c: 2008 movel %a0,%d0 /* * This means the requested block number is out of range. */ return 0; } 4cb9e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cba4: 4e5e unlk %fp 4cba6: 4e75 rts info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4cba8: 4a89 tstl %a1 4cbaa: 6600 ff60 bnew 4cb0c return 0; 4cbae: 4280 clrl %d0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4cbb0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4cbb6: 4e5e unlk %fp <== NOT EXECUTED 4cbb8: 4e75 rts <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { 4cbba: 4a89 tstl %a1 4cbbc: 676c beqs 4cc2a if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4cbbe: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4cbc2: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cbc4: 4a88 tstl %a0 4cbc6: 66d0 bnes 4cb98 p1 = memfile_alloc_block(); 4cbc8: 4eb9 0004 cab4 jsr 4cab4 4cbce: 2040 moveal %d0,%a0 if ( !p1 ) 4cbd0: 4a80 tstl %d0 4cbd2: 67da beqs 4cbae <== NEVER TAKEN return 0; p[ doubly ] = (block_p) p1; 4cbd4: 2480 movel %d0,%a2@ p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 4cbd6: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4cbda: 2008 movel %a0,%d0 4cbdc: 60c0 bras 4cb9e doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { 4cbde: 4a89 tstl %a1 4cbe0: 676a beqs 4cc4c if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4cbe2: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4cbe6: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cbe8: 4a88 tstl %a0 4cbea: 677c beqs 4cc68 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4cbec: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4cbf0: 2052 moveal %a2@,%a0 if ( !p2 ) { 4cbf2: 4a88 tstl %a0 4cbf4: 6600 ff74 bnew 4cb6a p2 = memfile_alloc_block(); 4cbf8: 4eb9 0004 cab4 jsr 4cab4 4cbfe: 2040 moveal %d0,%a0 if ( !p2 ) 4cc00: 4a80 tstl %d0 4cc02: 67aa beqs 4cbae <== NEVER TAKEN return 0; p1[ doubly ] = (block_p) p2; 4cc04: 2480 movel %d0,%a2@ p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 4cc06: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4cc0a: 2008 movel %a0,%d0 4cc0c: 6000 ff62 braw 4cb70 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4cc10: 4eb9 0004 cab4 jsr 4cab4 4cc16: 2240 moveal %d0,%a1 if ( !p ) 4cc18: 4a80 tstl %d0 4cc1a: 6792 beqs 4cbae <== NEVER TAKEN return 0; info->indirect = p; 4cc1c: 2540 0054 movel %d0,%a2@(84) } if ( !p ) return 0; return &info->indirect[ my_block ]; 4cc20: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4cc24: 2009 movel %a1,%d0 4cc26: 6000 feea braw 4cb12 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4cc2a: 4eb9 0004 cab4 jsr 4cab4 4cc30: 2240 moveal %d0,%a1 if ( !p ) 4cc32: 4a80 tstl %d0 4cc34: 6700 ff78 beqw 4cbae return 0; info->doubly_indirect = p; 4cc38: 2540 0058 movel %d0,%a2@(88) } p1 = (block_p *)p[ doubly ]; 4cc3c: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4cc40: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cc42: 4a88 tstl %a0 4cc44: 6600 ff52 bnew 4cb98 4cc48: 6000 ff7e braw 4cbc8 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4cc4c: 4eb9 0004 cab4 jsr 4cab4 4cc52: 2240 moveal %d0,%a1 if ( !p ) 4cc54: 4a80 tstl %d0 4cc56: 6700 ff56 beqw 4cbae return 0; info->triply_indirect = p; 4cc5a: 2540 005c movel %d0,%a2@(92) } p1 = (block_p *) p[ triply ]; 4cc5e: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4cc62: 2052 moveal %a2@,%a0 if ( !p1 ) { 4cc64: 4a88 tstl %a0 4cc66: 6684 bnes 4cbec <== NEVER TAKEN p1 = memfile_alloc_block(); 4cc68: 4eb9 0004 cab4 jsr 4cab4 4cc6e: 2040 moveal %d0,%a0 if ( !p1 ) 4cc70: 4a80 tstl %d0 4cc72: 6700 ff3a beqw 4cbae return 0; p[ triply ] = (block_p) p1; 4cc76: 2480 movel %d0,%a2@ } p2 = (block_p *)p1[ doubly ]; 4cc78: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4cc7c: 2052 moveal %a2@,%a0 if ( !p2 ) { 4cc7e: 4a88 tstl %a0 4cc80: 6600 fee8 bnew 4cb6a 4cc84: 6000 ff72 braw 4cbf8 =============================================================================== 0004cc88 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4cc88: 4e56 ffc8 linkw %fp,#-56 4cc8c: 206e 0018 moveal %fp@(24),%a0 4cc90: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cc94: 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) { 4cc98: 7406 moveq #6,%d2 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4cc9a: 2e2e 0014 movel %fp@(20),%d7 4cc9e: 286e 000c moveal %fp@(12),%a4 4cca2: 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) { 4cca6: b4aa 0048 cmpl %a2@(72),%d2 4ccaa: 6700 017a beqw 4ce26 /* * 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; 4ccae: 2408 movel %a0,%d2 4ccb0: d48d addl %a5,%d2 if ( last_byte > the_jnode->info.file.size ) 4ccb2: 2202 movel %d2,%d1 4ccb4: 4280 clrl %d0 4ccb6: 242a 004c movel %a2@(76),%d2 4ccba: 262a 0050 movel %a2@(80),%d3 4ccbe: 2800 movel %d0,%d4 4ccc0: 2a01 movel %d1,%d5 4ccc2: 9a83 subl %d3,%d5 4ccc4: 9982 subxl %d2,%d4 4ccc6: 6f00 010e blew 4cdd6 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4ccca: 2839 0005 efe8 movel 5efe8 ,%d4 * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; 4ccd0: 2a03 movel %d3,%d5 4ccd2: 9a8d subl %a5,%d5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4ccd4: 2604 movel %d4,%d3 4ccd6: 5bc2 smi %d2 4ccd8: 49c2 extbl %d2 4ccda: 2f03 movel %d3,%sp@- 4ccdc: 2f02 movel %d2,%sp@- 4ccde: 2f0d movel %a5,%sp@- 4cce0: 2f0c movel %a4,%sp@- 4cce2: 4eb9 0005 aa18 jsr 5aa18 <__moddi3> 4cce8: 4fef 0010 lea %sp@(16),%sp 4ccec: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4ccee: 2f03 movel %d3,%sp@- 4ccf0: 2f02 movel %d2,%sp@- 4ccf2: 2f0d movel %a5,%sp@- 4ccf4: 2f0c movel %a4,%sp@- 4ccf6: 4eb9 0005 a5d0 jsr 5a5d0 <__divdi3> 4ccfc: 4fef 0010 lea %sp@(16),%sp 4cd00: 2401 movel %d1,%d2 if ( start_offset ) { 4cd02: 4a86 tstl %d6 4cd04: 6700 010c beqw 4ce12 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 ); 4cd08: 42a7 clrl %sp@- 4cd0a: 2f01 movel %d1,%sp@- 4cd0c: 2f0a movel %a2,%sp@- 4cd0e: 4eb9 0004 cad8 jsr 4cad8 if ( !block_ptr ) 4cd14: 4fef 000c lea %sp@(12),%sp 4cd18: 4a80 tstl %d0 4cd1a: 6700 01be beqw 4ceda * 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; 4cd1e: 9886 subl %d6,%d4 4cd20: 2845 moveal %d5,%a4 4cd22: b885 cmpl %d5,%d4 4cd24: 6500 0162 bcsw 4ce88 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 ); 4cd28: 2f0c movel %a4,%sp@- 4cd2a: 2040 moveal %d0,%a0 4cd2c: dc90 addl %a0@,%d6 dest += to_copy; block++; 4cd2e: 5282 addql #1,%d2 my_length -= to_copy; 4cd30: 9a8c subl %a4,%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 ); 4cd32: 2f06 movel %d6,%sp@- dest += to_copy; 4cd34: 2c07 movel %d7,%d6 4cd36: dc8c addl %a4,%d6 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4cd38: 2f07 movel %d7,%sp@- 4cd3a: 4eb9 0004 e8a4 jsr 4e8a4 dest += to_copy; block++; my_length -= to_copy; 4cd40: 2839 0005 efe8 movel 5efe8 ,%d4 4cd46: 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 ) { 4cd4a: b885 cmpl %d5,%d4 4cd4c: 623c bhis 4cd8a 4cd4e: 47f9 0004 cad8 lea 4cad8 ,%a3 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4cd54: 4bf9 0004 e8a4 lea 4e8a4 ,%a5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4cd5a: 42a7 clrl %sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 4cd5c: 9a84 subl %d4,%d5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4cd5e: 2f02 movel %d2,%sp@- if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4cd60: 5282 addql #1,%d2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4cd62: 2f0a movel %a2,%sp@- 4cd64: 4e93 jsr %a3@ if ( !block_ptr ) 4cd66: 4fef 000c lea %sp@(12),%sp 4cd6a: 4a80 tstl %d0 4cd6c: 6700 00ac beqw 4ce1a return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4cd70: 2240 moveal %d0,%a1 dest += to_copy; block++; my_length -= to_copy; copied += to_copy; 4cd72: d9c4 addal %d4,%a4 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 ); 4cd74: 2f04 movel %d4,%sp@- 4cd76: 2f11 movel %a1@,%sp@- 4cd78: 2f06 movel %d6,%sp@- dest += to_copy; 4cd7a: dc84 addl %d4,%d6 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 ); 4cd7c: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4cd7e: 4fef 000c lea %sp@(12),%sp 4cd82: bab9 0005 efe8 cmpl 5efe8 ,%d5 4cd88: 64d0 bccs 4cd5a /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4cd8a: 4a85 tstl %d5 4cd8c: 6728 beqs 4cdb6 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4cd8e: 42a7 clrl %sp@- 4cd90: 2f02 movel %d2,%sp@- 4cd92: 2f0a movel %a2,%sp@- 4cd94: 4eb9 0004 cad8 jsr 4cad8 if ( !block_ptr ) 4cd9a: 4fef 000c lea %sp@(12),%sp 4cd9e: 4a80 tstl %d0 4cda0: 6778 beqs 4ce1a <== NEVER TAKEN return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4cda2: 2040 moveal %d0,%a0 copied += my_length; 4cda4: d9c5 addal %d5,%a4 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 ); 4cda6: 2f05 movel %d5,%sp@- 4cda8: 2f10 movel %a0@,%sp@- 4cdaa: 2f06 movel %d6,%sp@- 4cdac: 4eb9 0004 e8a4 jsr 4e8a4 copied += my_length; 4cdb2: 4fef 000c lea %sp@(12),%sp } IMFS_update_atime( the_jnode ); 4cdb6: 42a7 clrl %sp@- 4cdb8: 486e fff8 pea %fp@(-8) 4cdbc: 4eb9 0004 336c jsr 4336c 4cdc2: 256e fff8 003c movel %fp@(-8),%a2@(60) return copied; 4cdc8: 200c movel %a4,%d0 4cdca: 508f addql #8,%sp } 4cdcc: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4cdd2: 4e5e unlk %fp 4cdd4: 4e75 rts */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4cdd6: 2839 0005 efe8 movel 5efe8 ,%d4 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4cddc: 2a08 movel %a0,%d5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4cdde: 2604 movel %d4,%d3 4cde0: 5bc2 smi %d2 4cde2: 49c2 extbl %d2 4cde4: 2f03 movel %d3,%sp@- 4cde6: 2f02 movel %d2,%sp@- 4cde8: 2f0d movel %a5,%sp@- 4cdea: 2f0c movel %a4,%sp@- 4cdec: 4eb9 0005 aa18 jsr 5aa18 <__moddi3> 4cdf2: 4fef 0010 lea %sp@(16),%sp 4cdf6: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4cdf8: 2f03 movel %d3,%sp@- 4cdfa: 2f02 movel %d2,%sp@- 4cdfc: 2f0d movel %a5,%sp@- 4cdfe: 2f0c movel %a4,%sp@- 4ce00: 4eb9 0005 a5d0 jsr 5a5d0 <__divdi3> 4ce06: 4fef 0010 lea %sp@(16),%sp 4ce0a: 2401 movel %d1,%d2 if ( start_offset ) { 4ce0c: 4a86 tstl %d6 4ce0e: 6600 fef8 bnew 4cd08 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 4ce12: 2c07 movel %d7,%d6 */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; copied = 0; 4ce14: 99cc subal %a4,%a4 4ce16: 6000 ff32 braw 4cd4a IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4ce1a: 200c movel %a4,%d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4ce1c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ce22: 4e5e unlk %fp <== NOT EXECUTED 4ce24: 4e75 rts <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4ce26: 93c9 subal %a1,%a1 4ce28: 242a 004c movel %a2@(76),%d2 4ce2c: 262a 0050 movel %a2@(80),%d3 4ce30: 2d49 fff0 movel %a1,%fp@(-16) my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 4ce34: 226a 0054 moveal %a2@(84),%a1 if (my_length > (the_jnode->info.linearfile.size - start)) 4ce38: 2002 movel %d2,%d0 4ce3a: 2203 movel %d3,%d1 4ce3c: 2d48 fff4 movel %a0,%fp@(-12) 4ce40: 280c movel %a4,%d4 4ce42: 928d subl %a5,%d1 4ce44: 9184 subxl %d4,%d0 4ce46: 2a2e fff0 movel %fp@(-16),%d5 4ce4a: 2c2e fff4 movel %fp@(-12),%d6 4ce4e: 9c81 subl %d1,%d6 4ce50: 9b80 subxl %d0,%d5 4ce52: 6f5c bles 4ceb0 <== NEVER TAKEN my_length = the_jnode->info.linearfile.size - start; 4ce54: 2403 movel %d3,%d2 4ce56: 948d subl %a5,%d2 memcpy(dest, &file_ptr[start], my_length); 4ce58: 2f02 movel %d2,%sp@- 4ce5a: 4871 d800 pea %a1@(00000000,%a5:l) 4ce5e: 2f07 movel %d7,%sp@- 4ce60: 4eb9 0004 e8a4 jsr 4e8a4 IMFS_update_atime( the_jnode ); 4ce66: 42a7 clrl %sp@- 4ce68: 486e fff8 pea %fp@(-8) 4ce6c: 4eb9 0004 336c jsr 4336c 4ce72: 256e fff8 003c movel %fp@(-8),%a2@(60) return my_length; 4ce78: 2002 movel %d2,%d0 4ce7a: 4fef 0014 lea %sp@(20),%sp } IMFS_update_atime( the_jnode ); return copied; } 4ce7e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4ce84: 4e5e unlk %fp 4ce86: 4e75 rts * 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; 4ce88: 2844 moveal %d4,%a4 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 ); 4ce8a: 2040 moveal %d0,%a0 dest += to_copy; block++; 4ce8c: 5282 addql #1,%d2 my_length -= to_copy; 4ce8e: 9a8c subl %a4,%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 ); 4ce90: 2f0c movel %a4,%sp@- 4ce92: dc90 addl %a0@,%d6 4ce94: 2f06 movel %d6,%sp@- dest += to_copy; 4ce96: 2c07 movel %d7,%d6 4ce98: dc8c addl %a4,%d6 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 4ce9a: 2f07 movel %d7,%sp@- 4ce9c: 4eb9 0004 e8a4 jsr 4e8a4 dest += to_copy; block++; my_length -= to_copy; 4cea2: 2839 0005 efe8 movel 5efe8 ,%d4 4cea8: 4fef 000c lea %sp@(12),%sp 4ceac: 6000 fe9c braw 4cd4a /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 4ceb0: 2408 movel %a0,%d2 <== 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); 4ceb2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4ceb4: 4871 d800 pea %a1@(00000000,%a5:l) <== NOT EXECUTED 4ceb8: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4ceba: 4eb9 0004 e8a4 jsr 4e8a4 <== NOT EXECUTED IMFS_update_atime( the_jnode ); 4cec0: 42a7 clrl %sp@- <== NOT EXECUTED 4cec2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4cec6: 4eb9 0004 336c jsr 4336c <== NOT EXECUTED 4cecc: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED return my_length; 4ced2: 2002 movel %d2,%d0 <== NOT EXECUTED 4ced4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ced8: 60a4 bras 4ce7e <== NOT EXECUTED to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 4ceda: 4280 clrl %d0 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4cedc: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cee2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cfb8 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4cfb8: 4e56 ffe0 linkw %fp,#-32 4cfbc: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 4cfc0: 2839 0005 efe8 movel 5efe8 ,%d4 4cfc6: e48c lsrl #2,%d4 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4cfc8: 286e 0008 moveal %fp@(8),%a4 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4cfcc: 4aac 0054 tstl %a4@(84) 4cfd0: 670e beqs 4cfe0 memfile_free_blocks_in_table( &info->indirect, to_free ); 4cfd2: 2f04 movel %d4,%sp@- 4cfd4: 486c 0054 pea %a4@(84) 4cfd8: 4eb9 0004 cf72 jsr 4cf72 4cfde: 508f addql #8,%sp } if ( info->doubly_indirect ) { 4cfe0: 206c 0058 moveal %a4@(88),%a0 4cfe4: 4a88 tstl %a0 4cfe6: 674e beqs 4d036 for ( i=0 ; i,%d1 4cfee: 2001 movel %d1,%d0 4cff0: e488 lsrl #2,%d0 4cff2: 47f9 0004 cf72 lea 4cf72 ,%a3 4cff8: 6732 beqs 4d02c <== NEVER TAKEN 4cffa: 4280 clrl %d0 4cffc: 4282 clrl %d2 4cffe: 47f9 0004 cf72 lea 4cf72 ,%a3 4d004: 5282 addql #1,%d2 if ( info->doubly_indirect[i] ) { 4d006: 41f0 0c00 lea %a0@(00000000,%d0:l:4),%a0 4d00a: 4a90 tstl %a0@ 4d00c: 670e beqs 4d01c <== NEVER TAKEN memfile_free_blocks_in_table( 4d00e: 2f04 movel %d4,%sp@- 4d010: 2f08 movel %a0,%sp@- 4d012: 4e93 jsr %a3@ 4d014: 2239 0005 efe8 movel 5efe8 ,%d1 4d01a: 508f addql #8,%sp if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i 4d026: 206c 0058 moveal %a4@(88),%a0 4d02a: 60d8 bras 4d004 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 ); 4d02c: 2f04 movel %d4,%sp@- 4d02e: 486c 0058 pea %a4@(88) 4d032: 4e93 jsr %a3@ 4d034: 508f addql #8,%sp } if ( info->triply_indirect ) { 4d036: 206c 005c moveal %a4@(92),%a0 4d03a: 4a88 tstl %a0 4d03c: 6700 0084 beqw 4d0c2 for ( i=0 ; i,%d1 4d046: 2001 movel %d1,%d0 4d048: e488 lsrl #2,%d0 4d04a: 47f9 0004 cf72 lea 4cf72 ,%a3 4d050: 6766 beqs 4d0b8 <== NEVER TAKEN p = (block_p *) info->triply_indirect[i]; 4d052: 2450 moveal %a0@,%a2 4d054: 47f9 0004 cf72 lea 4cf72 ,%a3 if ( !p ) /* ensure we have a valid pointer */ 4d05a: 4a8a tstl %a2 4d05c: 675a beqs 4d0b8 <== NEVER TAKEN } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d05e: 4286 clrl %d6 if ( !p ) /* ensure we have a valid pointer */ 4d060: 4285 clrl %d5 break; for ( j=0 ; j <== NEVER TAKEN 4d066: 4280 clrl %d0 4d068: 4282 clrl %d2 4d06a: 5282 addql #1,%d2 if ( p[j] ) { 4d06c: 41f2 0c00 lea %a2@(00000000,%d0:l:4),%a0 4d070: 4a90 tstl %a0@ 4d072: 670e beqs 4d082 <== NEVER TAKEN memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4d074: 2f04 movel %d4,%sp@- 4d076: 2f08 movel %a0,%sp@- 4d078: 4e93 jsr %a3@ 4d07a: 2239 0005 efe8 movel 5efe8 ,%d1 4d080: 508f addql #8,%sp if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4d08c: 2f04 movel %d4,%sp@- 4d08e: dcac 005c addl %a4@(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,%d1 4d09e: 2001 movel %d1,%d0 4d0a0: 508f addql #8,%sp 4d0a2: e488 lsrl #2,%d0 4d0a4: b085 cmpl %d5,%d0 4d0a6: 6310 blss 4d0b8 * 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( 4d0a8: 2c05 movel %d5,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d0aa: 206c 005c moveal %a4@(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( 4d0ae: e58e lsll #2,%d6 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4d0b0: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 if ( !p ) /* ensure we have a valid pointer */ 4d0b4: 4a8a tstl %a2 4d0b6: 66aa bnes 4d062 <== ALWAYS TAKEN } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4d0b8: 2f04 movel %d4,%sp@- 4d0ba: 486c 005c pea %a4@(92) 4d0be: 4e93 jsr %a3@ 4d0c0: 508f addql #8,%sp (block_p **)&info->triply_indirect, to_free ); } return 0; } 4d0c2: 4280 clrl %d0 4d0c4: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4d0ca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d228 : * 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 ) { 4d228: 4280 clrl %d0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4d22a: 4e56 ffd0 linkw %fp,#-48 4d22e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d232: 286e 000c moveal %fp@(12),%a4 4d236: 2a6e 0010 moveal %fp@(16),%a5 4d23a: 282e 0018 movel %fp@(24),%d4 /* * 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; 4d23e: 41f5 4800 lea %a5@(00000000,%d4:l),%a0 if ( last_byte > the_jnode->info.file.size ) { 4d242: 2208 movel %a0,%d1 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4d244: 246e 0008 moveal %fp@(8),%a2 4d248: 2e2e 0014 movel %fp@(20),%d7 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 4d24c: 242a 004c movel %a2@(76),%d2 4d250: 262a 0050 movel %a2@(80),%d3 4d254: 9681 subl %d1,%d3 4d256: 9580 subxl %d0,%d2 4d258: 6d00 0116 bltw 4d370 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4d25c: 2a39 0005 efe8 movel 5efe8 ,%d5 4d262: 2605 movel %d5,%d3 4d264: 5bc2 smi %d2 4d266: 49c2 extbl %d2 4d268: 2f03 movel %d3,%sp@- 4d26a: 2f02 movel %d2,%sp@- 4d26c: 2f0d movel %a5,%sp@- 4d26e: 2f0c movel %a4,%sp@- 4d270: 4eb9 0005 aa18 jsr 5aa18 <__moddi3> 4d276: 4fef 0010 lea %sp@(16),%sp 4d27a: 2c01 movel %d1,%d6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4d27c: 2f03 movel %d3,%sp@- 4d27e: 2f02 movel %d2,%sp@- 4d280: 2f0d movel %a5,%sp@- 4d282: 2f0c movel %a4,%sp@- 4d284: 4eb9 0005 a5d0 jsr 5a5d0 <__divdi3> 4d28a: 4fef 0010 lea %sp@(16),%sp 4d28e: 2401 movel %d1,%d2 if ( start_offset ) { 4d290: 4a86 tstl %d6 4d292: 6700 00d4 beqw 4d368 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 ); 4d296: 42a7 clrl %sp@- 4d298: 2f01 movel %d1,%sp@- 4d29a: 2f0a movel %a2,%sp@- 4d29c: 4eb9 0004 cad8 jsr 4cad8 if ( !block_ptr ) 4d2a2: 4fef 000c lea %sp@(12),%sp 4d2a6: 4a80 tstl %d0 4d2a8: 6700 0120 beqw 4d3ca * 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; 4d2ac: 9a86 subl %d6,%d5 4d2ae: b885 cmpl %d5,%d4 4d2b0: 6500 00ee bcsw 4d3a0 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d2b4: 2f05 movel %d5,%sp@- 4d2b6: 2040 moveal %d0,%a0 src += to_copy; 4d2b8: 2847 moveal %d7,%a4 4d2ba: d9c5 addal %d5,%a4 block++; my_length -= to_copy; 4d2bc: 9885 subl %d5,%d4 copied += to_copy; 4d2be: 2605 movel %d5,%d3 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4d2c0: 5282 addql #1,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d2c2: 2f07 movel %d7,%sp@- 4d2c4: dc90 addl %a0@,%d6 4d2c6: 2f06 movel %d6,%sp@- 4d2c8: 4eb9 0004 e8a4 jsr 4e8a4 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4d2ce: 2a39 0005 efe8 movel 5efe8 ,%d5 4d2d4: 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 ) { 4d2d8: ba84 cmpl %d4,%d5 4d2da: 623a bhis 4d316 4d2dc: 47f9 0004 cad8 lea 4cad8 ,%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 ); 4d2e2: 4bf9 0004 e8a4 lea 4e8a4 ,%a5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d2e8: 42a7 clrl %sp@- fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 4d2ea: 9885 subl %d5,%d4 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d2ec: 2f02 movel %d2,%sp@- #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 4d2ee: 5282 addql #1,%d2 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d2f0: 2f0a movel %a2,%sp@- 4d2f2: 4e93 jsr %a3@ if ( !block_ptr ) 4d2f4: 4fef 000c lea %sp@(12),%sp 4d2f8: 4a80 tstl %d0 4d2fa: 6760 beqs 4d35c <== 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 ); 4d2fc: 2f05 movel %d5,%sp@- 4d2fe: 2040 moveal %d0,%a0 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 4d300: d685 addl %d5,%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 ); 4d302: 2f0c movel %a4,%sp@- 4d304: 2f10 movel %a0@,%sp@- src += to_copy; 4d306: d9c5 addal %d5,%a4 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 ); 4d308: 4e95 jsr %a5@ /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4d30a: 4fef 000c lea %sp@(12),%sp 4d30e: b8b9 0005 efe8 cmpl 5efe8 ,%d4 4d314: 64d2 bccs 4d2e8 * 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 ) { 4d316: 4a84 tstl %d4 4d318: 6728 beqs 4d342 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4d31a: 42a7 clrl %sp@- 4d31c: 2f02 movel %d2,%sp@- 4d31e: 2f0a movel %a2,%sp@- 4d320: 4eb9 0004 cad8 jsr 4cad8 if ( !block_ptr ) 4d326: 4fef 000c lea %sp@(12),%sp 4d32a: 4a80 tstl %d0 4d32c: 672e beqs 4d35c <== 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 ); 4d32e: 2f04 movel %d4,%sp@- 4d330: 2040 moveal %d0,%a0 my_length = 0; copied += to_copy; 4d332: 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, my_length ); 4d334: 2f0c movel %a4,%sp@- 4d336: 2f10 movel %a0@,%sp@- 4d338: 4eb9 0004 e8a4 jsr 4e8a4 my_length = 0; copied += to_copy; 4d33e: 4fef 000c lea %sp@(12),%sp } IMFS_mtime_ctime_update( the_jnode ); 4d342: 42a7 clrl %sp@- 4d344: 486e fff8 pea %fp@(-8) 4d348: 4eb9 0004 336c jsr 4336c 4d34e: 202e fff8 movel %fp@(-8),%d0 return copied; 4d352: 508f addql #8,%sp memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 4d354: 2540 0040 movel %d0,%a2@(64) 4d358: 2540 0044 movel %d0,%a2@(68) return copied; } 4d35c: 2003 movel %d3,%d0 4d35e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d364: 4e5e unlk %fp 4d366: 4e75 rts unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 4d368: 2847 moveal %d7,%a4 status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); } copied = 0; 4d36a: 4283 clrl %d3 4d36c: 6000 ff6a braw 4d2d8 * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4d370: 2f08 movel %a0,%sp@- 4d372: 2f00 movel %d0,%sp@- 4d374: 2f0a movel %a2,%sp@- 4d376: 4eb9 0004 d0f6 jsr 4d0f6 if ( status ) 4d37c: 4fef 000c lea %sp@(12),%sp 4d380: 4a80 tstl %d0 4d382: 6700 fed8 beqw 4d25c rtems_set_errno_and_return_minus_one( ENOSPC ); 4d386: 4eb9 0004 e084 jsr 4e084 <__errno> 4d38c: 76ff moveq #-1,%d3 4d38e: 781c moveq #28,%d4 4d390: 2040 moveal %d0,%a0 } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4d392: 2003 movel %d3,%d0 last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); if ( status ) rtems_set_errno_and_return_minus_one( ENOSPC ); 4d394: 2084 movel %d4,%a0@ } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4d396: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4d39c: 4e5e unlk %fp 4d39e: 4e75 rts * 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; 4d3a0: 2a04 movel %d4,%d5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d3a2: 2040 moveal %d0,%a0 src += to_copy; 4d3a4: 2847 moveal %d7,%a4 4d3a6: d9c5 addal %d5,%a4 block++; my_length -= to_copy; 4d3a8: 9885 subl %d5,%d4 copied += to_copy; 4d3aa: 2605 movel %d5,%d3 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 4d3ac: 5282 addql #1,%d2 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4d3ae: 2f05 movel %d5,%sp@- 4d3b0: 2f07 movel %d7,%sp@- 4d3b2: dc90 addl %a0@,%d6 4d3b4: 2f06 movel %d6,%sp@- 4d3b6: 4eb9 0004 e8a4 jsr 4e8a4 src += to_copy; block++; my_length -= to_copy; copied += to_copy; 4d3bc: 2a39 0005 efe8 movel 5efe8 ,%d5 4d3c2: 4fef 000c lea %sp@(12),%sp 4d3c6: 6000 ff10 braw 4d2d8 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; 4d3ca: 4283 clrl %d3 <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 4d3cc: 2003 movel %d3,%d0 <== NOT EXECUTED 4d3ce: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d3d4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000428f8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 428f8: 4e56 ffa8 linkw %fp,#-88 428fc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42900: 262e 0008 movel %fp@(8),%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 ); 42904: 45ee ffbf lea %fp@(-65),%a2 42908: 2f03 movel %d3,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4290a: 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 ); 4290e: 4eb9 0004 f3f0 jsr 4f3f0 42914: 588f addql #4,%sp 42916: 486e fffc pea %fp@(-4) const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4291a: 282e 0010 movel %fp@(16),%d4 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 ); 4291e: 2f0a movel %a2,%sp@- const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 42920: 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 ); 42924: 2f00 movel %d0,%sp@- 42926: 2f03 movel %d3,%sp@- 42928: 4eb9 0004 b18c jsr 4b18c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4292e: 4fef 0010 lea %sp@(16),%sp 42932: 2002 movel %d2,%d0 42934: 0280 0000 f000 andil #61440,%d0 4293a: 0c80 0000 4000 cmpil #16384,%d0 42940: 6700 008e beqw 429d0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 42944: 0c80 0000 8000 cmpil #32768,%d0 4294a: 6700 0088 beqw 429d4 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4294e: 0c80 0000 6000 cmpil #24576,%d0 42954: 676e beqs 429c4 42956: 0c80 0000 2000 cmpil #8192,%d0 4295c: 6766 beqs 429c4 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 4295e: 0c80 0000 1000 cmpil #4096,%d0 42964: 6772 beqs 429d8 <== ALWAYS TAKEN mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { IMFS_token_types type = 0; 42966: 4280 clrl %d0 <== NOT EXECUTED * 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 ); 42968: 486e ffe0 pea %fp@(-32) 4296c: 2f02 movel %d2,%sp@- 4296e: 2f0a movel %a2,%sp@- 42970: 2f00 movel %d0,%sp@- 42972: 2f2e 0018 movel %fp@(24),%sp@- 42976: 4eb9 0004 a528 jsr 4a528 if ( !new_node ) 4297c: 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 ); 42980: 2440 moveal %d0,%a2 if ( !new_node ) 42982: 4a80 tstl %d0 42984: 6756 beqs 429dc rtems_set_errno_and_return_minus_one( ENOMEM ); IMFS_update_ctime(new_node->Parent); 42986: 42a7 clrl %sp@- 42988: 240e movel %fp,%d2 4298a: 0682 ffff fff4 addil #-12,%d2 42990: 47f9 0004 336c lea 4336c ,%a3 42996: 2f02 movel %d2,%sp@- 42998: 4e93 jsr %a3@ 4299a: 206a 0008 moveal %a2@(8),%a0 4299e: 216e fff4 0044 movel %fp@(-12),%a0@(68) IMFS_update_mtime(new_node->Parent); 429a4: 42a7 clrl %sp@- 429a6: 2f02 movel %d2,%sp@- 429a8: 4e93 jsr %a3@ 429aa: 206a 0008 moveal %a2@(8),%a0 return 0; 429ae: 4fef 0010 lea %sp@(16),%sp 429b2: 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); 429b4: 216e fff4 0040 movel %fp@(-12),%a0@(64) return 0; } 429ba: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3 429c0: 4e5e unlk %fp 429c2: 4e75 rts type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 429c4: 2d44 ffe0 movel %d4,%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; 429c8: 7002 moveq #2,%d0 rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 429ca: 2d4b ffe4 movel %a3,%fp@(-28) 429ce: 6098 bras 42968 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 429d0: 7001 moveq #1,%d0 429d2: 6094 bras 42968 else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 429d4: 7005 moveq #5,%d0 429d6: 6090 bras 42968 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; 429d8: 7007 moveq #7,%d0 429da: 608c bras 42968 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 429dc: 4eb9 0004 e084 jsr 4e084 <__errno> 429e2: 720c moveq #12,%d1 429e4: 2040 moveal %d0,%a0 429e6: 70ff moveq #-1,%d0 IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); return 0; } 429e8: 4cee 0c1c ffa8 moveml %fp@(-88),%d2-%d4/%a2-%a3 * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( pathloc, type, new_name, mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 429ee: 2081 movel %d1,%a0@ IMFS_update_ctime(new_node->Parent); IMFS_update_mtime(new_node->Parent); return 0; } 429f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000429f4 : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 429f4: 7001 moveq #1,%d0 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 429f6: 4e56 0000 linkw %fp,#0 429fa: 226e 0008 moveal %fp@(8),%a1 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 429fe: 2069 0008 moveal %a1@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42a02: b0a8 0048 cmpl %a0@(72),%d0 42a06: 660a bnes 42a12 <== NEVER TAKEN /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 42a08: 2149 0058 movel %a1,%a0@(88) return 0; 42a0c: 4280 clrl %d0 } 42a0e: 4e5e unlk %fp 42a10: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42a12: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 42a18: 7214 moveq #20,%d1 <== NOT EXECUTED 42a1a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a1c: 70ff moveq #-1,%d0 <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 42a1e: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42a20: 2081 movel %d1,%a0@ <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } =============================================================================== 000451e0 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451e0: 4e56 0000 linkw %fp,#0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451e4: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451ea: 2f0a movel %a2,%sp@- IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451ec: 2f28 0008 movel %a0@(8),%sp@- * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 451f0: 246e 0008 moveal %fp@(8),%a2 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 451f4: 486a 000c pea %a2@(12) 451f8: 4eb9 0005 2a68 jsr 52a68 switch( the_jnode->type ) { 451fe: 202a 0048 movel %a2@(72),%d0 45202: 508f addql #8,%sp 45204: 7207 moveq #7,%d1 45206: b280 cmpl %d0,%d1 45208: 6424 bccs 4522e <== ALWAYS TAKEN case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 4520a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4520c: 4879 0006 2daa pea 62daa <== NOT EXECUTED 45212: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 <== NOT EXECUTED 45218: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4521c: 4eb9 0005 291a jsr 5291a <== NOT EXECUTED return; } puts(""); } 45222: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; 45226: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } puts(""); } 4522a: 4e5e unlk %fp <== NOT EXECUTED 4522c: 4e75 rts <== NOT EXECUTED ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 4522e: 323b 0a08 movew %pc@(45238 ,%d0:l:2),%d1 45232: 48c1 extl %d1 45234: 4efb 1802 jmp %pc@(45238 ,%d1:l) 45238: ffd2 .short 0xffd2 <== NOT EXECUTED 4523a: 003a .short 0x003a <== NOT EXECUTED 4523c: 0066 .short 0x0066 <== NOT EXECUTED 4523e: 0010 .short 0x0010 <== NOT EXECUTED 45240: 0010 .short 0x0010 <== NOT EXECUTED 45242: 009e 00d2 010a oril #13762826,%d6 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 45248: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 4524e: 2f28 0008 movel %a0@(8),%sp@- 45252: 4878 0013 pea 13 45256: 4878 0001 pea 1 4525a: 4879 0006 2d83 pea 62d83 45260: 4eb9 0005 3598 jsr 53598 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45266: 246e fffc moveal %fp@(-4),%a2 fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; 4526a: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 4526e: 4e5e unlk %fp 45270: 4e75 rts IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 45272: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 45278: 2f28 0008 movel %a0@(8),%sp@- 4527c: 4878 002f pea 2f 45280: 4eb9 0005 2998 jsr 52998 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45286: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4528a: 203c 0006 345e movel #406622,%d0 fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; 45290: 508f addql #8,%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45292: 2d40 0008 movel %d0,%fp@(8) } 45296: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45298: 4ef9 0005 42a6 jmp 542a6 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4529e: 2f2a 0050 movel %a2@(80),%sp@- 452a2: 2f2a 004c movel %a2@(76),%sp@- 452a6: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 452ac: 4879 0006 2d55 pea 62d55 452b2: 2f28 0008 movel %a0@(8),%sp@- 452b6: 4eb9 0005 291a jsr 5291a default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 452bc: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452c0: 203c 0006 345e movel #406622,%d0 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; 452c6: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452ca: 2d40 0008 movel %d0,%fp@(8) } 452ce: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452d0: 4ef9 0005 42a6 jmp 542a6 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 452d6: 2f2a 0050 movel %a2@(80),%sp@- 452da: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 452e0: 4879 0006 2d77 pea 62d77 452e6: 2f28 0008 movel %a0@(8),%sp@- 452ea: 4eb9 0005 291a jsr 5291a default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 452f0: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452f4: 203c 0006 345e movel #406622,%d0 ); #else fprintf(stdout, " (file %" PRId32 ")", (uint32_t)the_jnode->info.file.size ); #endif break; 452fa: 4fef 000c lea %sp@(12),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 452fe: 2d40 0008 movel %d0,%fp@(8) } 45302: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45304: 4ef9 0005 42a6 jmp 542a6 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4530a: 2f2a 0054 movel %a2@(84),%sp@- 4530e: 2f2a 0050 movel %a2@(80),%sp@- 45312: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 45318: 4879 0006 2d68 pea 62d68 4531e: 2f28 0008 movel %a0@(8),%sp@- 45322: 4eb9 0005 291a jsr 5291a default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45328: 246e fffc moveal %fp@(-4),%a2 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4532c: 203c 0006 345e movel #406622,%d0 case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 45332: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 45336: 2d40 0008 movel %d0,%fp@(8) } 4533a: 4e5e unlk %fp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4533c: 4ef9 0005 42a6 jmp 542a6 case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 45342: 2079 0006 44f4 moveal 644f4 <_impure_ptr>,%a0 45348: 2f28 0008 movel %a0@(8),%sp@- 4534c: 4878 0012 pea 12 45350: 4878 0001 pea 1 45354: 4879 0006 2d97 pea 62d97 4535a: 4eb9 0005 3598 jsr 53598 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45360: 246e fffc moveal %fp@(-4),%a2 fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; 45364: 4fef 0010 lea %sp@(16),%sp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 45368: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a38 : ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42a38: 4e56 fff4 linkw %fp,#-12 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42a3c: 206e 0008 moveal %fp@(8),%a0 ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 42a40: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42a44: 266e 000c moveal %fp@(12),%a3 42a48: 242e 0010 movel %fp@(16),%d2 IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 42a4c: 2450 moveal %a0@,%a2 IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a4e: 672a beqs 42a7a <== NEVER TAKEN 42a50: 206a 004c moveal %a2@(76),%a0 42a54: 1210 moveb %a0@,%d1 42a56: 6722 beqs 42a7a <== NEVER TAKEN 42a58: 91c8 subal %a0,%a0 42a5a: 4280 clrl %d0 42a5c: 5280 addql #1,%d0 buf[i] = node->info.sym_link.name[i]; 42a5e: 1781 8800 moveb %d1,%a3@(00000000,%a0:l) node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a62: 2040 moveal %d0,%a0 42a64: b480 cmpl %d0,%d2 42a66: 670a beqs 42a72 42a68: 226a 004c moveal %a2@(76),%a1 42a6c: 1231 0800 moveb %a1@(00000000,%d0:l),%d1 42a70: 66ea bnes 42a5c buf[i] = node->info.sym_link.name[i]; return i; } 42a72: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 42a76: 4e5e unlk %fp 42a78: 4e75 rts node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 42a7a: 4280 clrl %d0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 42a7c: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 <== NOT EXECUTED 42a80: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042a84 : 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 */ ) { 42a84: 4e56 fff8 linkw %fp,#-8 IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42a88: 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 */ ) { 42a8c: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42a8e: 4878 0020 pea 20 42a92: 2f2e 0014 movel %fp@(20),%sp@- ) { IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 42a96: 2450 moveal %a0@,%a2 strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 42a98: 486a 000c pea %a2@(12) 42a9c: 4eb9 0004 f40c jsr 4f40c if ( the_jnode->Parent != NULL ) 42aa2: 4fef 000c lea %sp@(12),%sp 42aa6: 4aaa 0008 tstl %a2@(8) 42aaa: 670a beqs 42ab6 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 42aac: 2f0a movel %a2,%sp@- 42aae: 4eb9 0004 7554 jsr 47554 <_Chain_Extract> 42ab4: 588f addql #4,%sp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 42ab6: 206e 0010 moveal %fp@(16),%a0 42aba: 2050 moveal %a0@,%a0 the_jnode->Parent = new_parent; 42abc: 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 ); 42ac0: 2f0a movel %a2,%sp@- 42ac2: 4868 004c pea %a0@(76) 42ac6: 4eb9 0004 751c jsr 4751c <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 42acc: 42a7 clrl %sp@- 42ace: 486e fff8 pea %fp@(-8) 42ad2: 4eb9 0004 336c jsr 4336c 42ad8: 256e fff8 0044 movel %fp@(-8),%a2@(68) return 0; } 42ade: 4280 clrl %d0 42ae0: 246e fff4 moveal %fp@(-12),%a2 42ae4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a758 : static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 4a758: 4e56 fff0 linkw %fp,#-16 4a75c: 48d7 3c00 moveml %a2-%a5,%sp@ 4a760: 266e 0010 moveal %fp@(16),%a3 4a764: 4bf9 0004 4220 lea 44220 ,%a5 4a76a: 2013 movel %a3@,%d0 4a76c: 246e 0008 moveal %fp@(8),%a2 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a770: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 static void IMFS_skip_separator ( const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { 4a774: 286e 000c moveal %fp@(12),%a4 while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a778: 49c0 extbl %d0 4a77a: 2f00 movel %d0,%sp@- 4a77c: 4e95 jsr %a5@ 4a77e: 588f addql #4,%sp 4a780: 4a80 tstl %d0 4a782: 6726 beqs 4a7aa <== NEVER TAKEN 4a784: 2013 movel %a3@,%d0 4a786: 4a32 0800 tstb %a2@(00000000,%d0:l) 4a78a: 671e beqs 4a7aa 4a78c: 2214 movel %a4@,%d1 ++(*index); 4a78e: 5280 addql #1,%d0 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a790: 4a81 tstl %d1 4a792: 6716 beqs 4a7aa <== NEVER TAKEN ++(*index); 4a794: 2680 movel %d0,%a3@ --(*len); 4a796: 5381 subql #1,%d1 4a798: 2881 movel %d1,%a4@ const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 4a79a: 1032 0800 moveb %a2@(00000000,%d0:l),%d0 4a79e: 49c0 extbl %d0 4a7a0: 2f00 movel %d0,%sp@- 4a7a2: 4e95 jsr %a5@ 4a7a4: 588f addql #4,%sp 4a7a6: 4a80 tstl %d0 4a7a8: 66da bnes 4a784 ++(*index); --(*len); } } 4a7aa: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 4a7b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b370 : IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b370: 7007 moveq #7,%d0 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4b372: 4e56 0000 linkw %fp,#0 4b376: 206e 000c moveal %fp@(12),%a0 4b37a: 2f0a movel %a2,%sp@- 4b37c: 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; 4b380: 2252 moveal %a2@,%a1 switch ( the_jnode->type ) { 4b382: b0a9 0048 cmpl %a1@(72),%d0 4b386: 6418 bccs 4b3a0 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b388: 4eb9 0004 e084 jsr 4e084 <__errno> buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b38e: 246e fffc moveal %fp@(-4),%a2 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b392: 2040 moveal %d0,%a0 4b394: 70ff moveq #-1,%d0 buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b396: 4e5e unlk %fp case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b398: 20bc 0000 0086 movel #134,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b39e: 4e75 rts IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4b3a0: 2029 0048 movel %a1@(72),%d0 4b3a4: d080 addl %d0,%d0 4b3a6: 303b 0808 movew %pc@(4b3b0 ,%d0:l),%d0 4b3aa: 48c0 extl %d0 4b3ac: 4efb 0802 jmp %pc@(4b3b0 ,%d0:l) 4b3b0: ffd8 .short 0xffd8 <== NOT EXECUTED 4b3b2: ffd8 .short 0xffd8 <== NOT EXECUTED 4b3b4: 00d6 .short 0x00d6 <== NOT EXECUTED 4b3b6: ffd8 .short 0xffd8 <== NOT EXECUTED 4b3b8: 0010 .short 0x0010 <== NOT EXECUTED 4b3ba: 0074 .short 0x0074 <== NOT EXECUTED 4b3bc: 0074 .short 0x0074 <== NOT EXECUTED 4b3be: 0010 .short 0x0010 <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b3c0: 246a 0010 moveal %a2@(16),%a2 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b3c4: 4280 clrl %d0 4b3c6: 4281 clrl %d1 * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b3c8: 246a 0034 moveal %a2@(52),%a2 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 4b3cc: 2140 001e movel %d0,%a0@(30) 4b3d0: 2141 0022 movel %d1,%a0@(34) * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b3d4: 2212 movel %a2@,%d1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b3d6: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 4b3d8: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b3de: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b3e4: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b3ea: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b3f0: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b3f6: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b3fc: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b402: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b408: 43f9 0005 e0fe lea 5e0fe ,%a1 4b40e: 2151 003e movel %a1@,%a0@(62) /* * 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 = 4b412: 2141 0004 movel %d1,%a0@(4) 4b416: 20bc 0000 fffe movel #65534,%a0@ buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; } 4b41c: 246e fffc moveal %fp@(-4),%a2 4b420: 4e5e unlk %fp 4b422: 4e75 rts /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b424: 246a 0010 moveal %a2@(16),%a2 buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b428: 2029 004c movel %a1@(76),%d0 4b42c: 2229 0050 movel %a1@(80),%d1 * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b430: 246a 0034 moveal %a2@(52),%a2 buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4b434: 2140 001e movel %d0,%a0@(30) 4b438: 2141 0022 movel %d1,%a0@(34) * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b43c: 2212 movel %a2@,%d1 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b43e: 4280 clrl %d0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 4b440: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b446: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b44c: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b452: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b458: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b45e: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b464: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b46a: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b470: 43f9 0005 e0fe lea 5e0fe ,%a1 4b476: 2151 003e movel %a1@,%a0@(62) /* * 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 = 4b47a: 2141 0004 movel %d1,%a0@(4) 4b47e: 20bc 0000 fffe movel #65534,%a0@ 4b484: 6096 bras 4b41c /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 4b486: 246a 0010 moveal %a2@(16),%a2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b48a: 2029 0050 movel %a1@(80),%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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b48e: 246a 0034 moveal %a2@(52),%a2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b492: 2169 004c 0016 movel %a1@(76),%a0@(22) * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 4b498: 2212 movel %a2@,%d1 buf->st_mode = the_jnode->st_mode; 4b49a: 2169 002e 000c movel %a1@(46),%a0@(12) buf->st_nlink = the_jnode->st_nlink; 4b4a0: 3169 0032 0010 movew %a1@(50),%a0@(16) buf->st_ino = the_jnode->st_ino; 4b4a6: 2169 0034 0008 movel %a1@(52),%a0@(8) buf->st_uid = the_jnode->st_uid; 4b4ac: 3169 0038 0012 movew %a1@(56),%a0@(18) buf->st_gid = the_jnode->st_gid; 4b4b2: 3169 003a 0014 movew %a1@(58),%a0@(20) buf->st_atime = the_jnode->stat_atime; 4b4b8: 2169 003c 0026 movel %a1@(60),%a0@(38) buf->st_mtime = the_jnode->stat_mtime; 4b4be: 2169 0040 002e movel %a1@(64),%a0@(46) buf->st_ctime = the_jnode->stat_ctime; 4b4c4: 2169 0044 0036 movel %a1@(68),%a0@(54) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 4b4ca: 43f9 0005 e0fe lea 5e0fe ,%a1 4b4d0: 2151 003e movel %a1@,%a0@(62) switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4b4d4: 2140 001a movel %d0,%a0@(26) buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; return 0; 4b4d8: 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 = 4b4da: 20bc 0000 fffe movel #65534,%a0@ 4b4e0: 2141 0004 movel %d1,%a0@(4) 4b4e4: 6000 ff36 braw 4b41c =============================================================================== 00042b9c : /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42b9c: 7003 moveq #3,%d0 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 42b9e: 4e56 ffd4 linkw %fp,#-44 42ba2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42ba6: 246e 000c moveal %fp@(12),%a2 42baa: 242e 0008 movel %fp@(8),%d2 IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 42bae: 2652 moveal %a2@,%a3 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 42bb0: b0ab 0048 cmpl %a3@(72),%d0 42bb4: 671a beqs 42bd0 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 42bb6: 2f0a movel %a2,%sp@- 42bb8: 206a 0008 moveal %a2@(8),%a0 42bbc: 2f02 movel %d2,%sp@- 42bbe: 2068 0034 moveal %a0@(52),%a0 42bc2: 4e90 jsr %a0@ return result; 42bc4: 508f addql #8,%sp } 42bc6: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42bcc: 4e5e unlk %fp 42bce: 4e75 rts * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 42bd0: 202b 004c movel %a3@(76),%d0 42bd4: 6700 008c beqw 42c62 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 42bd8: 41ea 0004 lea %a2@(4),%a0 /* * 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) 42bdc: 7601 moveq #1,%d3 if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 42bde: 2d58 ffe8 movel %a0@+,%fp@(-24) 42be2: 2d58 ffec movel %a0@+,%fp@(-20) 42be6: 2d58 fff0 movel %a0@+,%fp@(-16) 42bea: 2d50 fff4 movel %a0@,%fp@(-12) the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 42bee: 486e ffe4 pea %fp@(-28) 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; 42bf2: 2d40 ffe4 movel %d0,%fp@(-28) IMFS_Set_handlers( &the_link ); 42bf6: 4eb9 0004 a7b4 jsr 4a7b4 /* * 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) 42bfc: 206b 004c moveal %a3@(76),%a0 42c00: 4281 clrl %d1 42c02: 588f addql #4,%sp 42c04: 3028 0032 movew %a0@(50),%d0 42c08: 3200 movew %d0,%d1 42c0a: b681 cmpl %d1,%d3 42c0c: 6730 beqs 42c3e if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 42c0e: 5380 subql #1,%d0 42c10: 3140 0032 movew %d0,%a0@(50) IMFS_update_ctime( node->info.hard_link.link_node ); 42c14: 42a7 clrl %sp@- 42c16: 486e fff8 pea %fp@(-8) 42c1a: 4eb9 0004 336c jsr 4336c 42c20: 206b 004c moveal %a3@(76),%a0 42c24: 508f addql #8,%sp 42c26: 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 ); 42c2c: 2f0a movel %a2,%sp@- 42c2e: 206a 0008 moveal %a2@(8),%a0 42c32: 2f02 movel %d2,%sp@- 42c34: 2068 0034 moveal %a0@(52),%a0 42c38: 4e90 jsr %a0@ return result; 42c3a: 508f addql #8,%sp 42c3c: 6088 bras 42bc6 * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 42c3e: 486e ffe4 pea %fp@(-28) 42c42: 206e ffec moveal %fp@(-20),%a0 42c46: 2f02 movel %d2,%sp@- 42c48: 2068 0034 moveal %a0@(52),%a0 42c4c: 4e90 jsr %a0@ if ( result != 0 ) 42c4e: 508f addql #8,%sp 42c50: 4a80 tstl %d0 42c52: 6700 ff62 beqw 42bb6 return -1; 42c56: 70ff moveq #-1,%d0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c58: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 42c5e: 4e5e unlk %fp 42c60: 4e75 rts */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42c62: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 42c68: 7216 moveq #22,%d1 <== NOT EXECUTED 42c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c6c: 70ff moveq #-1,%d0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c6e: 4cee 0c0c ffd4 moveml %fp@(-44),%d2-%d3/%a2-%a3 <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 42c74: 2081 movel %d1,%a0@ <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 42c76: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00042c7c : /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c7c: 7001 moveq #1,%d0 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 42c7e: 4e56 0000 linkw %fp,#0 42c82: 206e 0008 moveal %fp@(8),%a0 IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 42c86: 2068 0008 moveal %a0@(8),%a0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 42c8a: b0a8 0048 cmpl %a0@(72),%d0 42c8e: 6610 bnes 42ca0 <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 42c90: 4aa8 0058 tstl %a0@(88) 42c94: 671c beqs 42cb2 <== NEVER TAKEN /* * 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; 42c96: 42a8 0058 clrl %a0@(88) return 0; 42c9a: 4280 clrl %d0 } 42c9c: 4e5e unlk %fp 42c9e: 4e75 rts /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42ca0: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 42ca6: 7214 moveq #20,%d1 <== NOT EXECUTED 42ca8: 2040 moveal %d0,%a0 <== NOT EXECUTED 42caa: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cac: 4e5e unlk %fp <== NOT EXECUTED /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 42cae: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cb0: 4e75 rts <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42cb2: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 42cb8: 7216 moveq #22,%d1 <== NOT EXECUTED 42cba: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cbc: 70ff moveq #-1,%d0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 42cbe: 4e5e unlk %fp <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 42cc0: 2081 movel %d1,%a0@ <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } =============================================================================== 00043538 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 43538: 4e56 0000 linkw %fp,#0 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4353c: 2079 0005 e7b8 moveal 5e7b8 ,%a0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 43542: 2f03 movel %d3,%sp@- 43544: 262e 0008 movel %fp@(8),%d3 43548: 2f02 movel %d2,%sp@- 4354a: 242e 000c movel %fp@(12),%d2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 4354e: 4a88 tstl %a0 43550: 6704 beqs 43556 (*rtems_malloc_statistics_helpers->initialize)(); 43552: 2050 moveal %a0@,%a0 43554: 4e90 jsr %a0@ } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 43556: 4eb9 0004 34bc jsr 434bc /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 4355c: 2079 0005 e7b4 moveal 5e7b4 ,%a0 43562: 4a88 tstl %a0 43564: 6712 beqs 43578 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 43566: 2f2e 0010 movel %fp@(16),%sp@- heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 4356a: d483 addl %d3,%d2 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 4356c: 2f03 movel %d3,%sp@- 4356e: 2050 moveal %a0@,%a0 43570: 4e90 jsr %a0@ heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 43572: 508f addql #8,%sp 43574: 9480 subl %d0,%d2 heap_begin = new_heap_begin; 43576: 2600 movel %d0,%d3 * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 43578: 4a39 0005 e7bc tstb 5e7bc 4357e: 6624 bnes 435a4 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 43580: 4a39 0005 e004 tstb 5e004 43586: 6644 bnes 435cc void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 43588: 4878 0004 pea 4 4358c: 2f02 movel %d2,%sp@- 4358e: 2f03 movel %d3,%sp@- 43590: 2f39 0005 e0ba movel 5e0ba ,%sp@- 43596: 4eb9 0004 7c0a jsr 47c0a <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 4359c: 4fef 0010 lea %sp@(16),%sp 435a0: 4a80 tstl %d0 435a2: 675c beqs 43600 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435a4: 2f39 0005 e0ba movel 5e0ba ,%sp@- 435aa: 2439 0005 f800 movel 5f800 ,%d2 435b0: 4eb9 0004 8710 jsr 48710 <_Protected_heap_Get_size> } 435b6: 262e fffc movel %fp@(-4),%d3 if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435ba: d082 addl %d2,%d0 435bc: 588f addql #4,%sp } 435be: 242e fff8 movel %fp@(-8),%d2 435c2: 4e5e unlk %fp if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 435c4: 23c0 0005 f800 movel %d0,5f800 } 435ca: 4e75 rts if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 435cc: 2f02 movel %d2,%sp@- 435ce: 42a7 clrl %sp@- 435d0: 2f03 movel %d3,%sp@- 435d2: 4eb9 0004 e914 jsr 4e914 * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 435d8: 4fef 000c lea %sp@(12),%sp 435dc: 4a39 0005 e7bc tstb 5e7bc 435e2: 66c0 bnes 435a4 <== NEVER TAKEN 435e4: 4878 0004 pea 4 435e8: 2f02 movel %d2,%sp@- 435ea: 2f03 movel %d3,%sp@- 435ec: 2f39 0005 e0ba movel 5e0ba ,%sp@- 435f2: 4eb9 0004 7c0a jsr 47c0a <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 435f8: 4fef 0010 lea %sp@(16),%sp 435fc: 4a80 tstl %d0 435fe: 66a4 bnes 435a4 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 43600: 4878 001a pea 1a 43604: 4eb9 0004 7248 jsr 47248 ... =============================================================================== 000423e0 : /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 423e0: 70ff moveq #-1,%d0 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 423e2: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED 423e6: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED 423ea: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { 423ee: b08a cmpl %a2,%d0 <== NOT EXECUTED 423f0: 6700 015a beqw 4254c <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 423f4: 262a 00f0 movel %a2@(240),%d3 <== NOT EXECUTED the_thread = 0; current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; 423f8: 47ea 00b0 lea %a2@(176),%a3 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 423fc: 226a 00b4 moveal %a2@(180),%a1 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 42400: 2413 movel %a3@,%d2 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 42402: 72fc moveq #-4,%d1 <== 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); 42404: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 4240a: 2009 movel %a1,%d0 <== NOT EXECUTED 4240c: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 42412: c282 andl %d2,%d1 <== NOT EXECUTED 42414: d280 addl %d0,%d1 <== NOT EXECUTED 42416: b280 cmpl %d0,%d1 <== NOT EXECUTED 42418: 6300 00bc blsw 424d6 <== NOT EXECUTED if (*base != U32_PATTERN) 4241c: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 42422: b8a9 0020 cmpl %a1@(32),%d4 <== NOT EXECUTED 42426: 6616 bnes 4243e <== NOT EXECUTED * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( 42428: 41e9 0024 lea %a1@(36),%a0 <== 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++) 4242c: 5880 addql #4,%d0 <== NOT EXECUTED 4242e: b081 cmpl %d1,%d0 <== NOT EXECUTED 42430: 6400 00a4 bccw 424d6 <== NOT EXECUTED if (*base != U32_PATTERN) 42434: 283c a5a5 a5a5 movel #-1515870811,%d4 <== NOT EXECUTED 4243a: b898 cmpl %a0@+,%d4 <== NOT EXECUTED 4243c: 67ee beqs 4242c <== 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 ) 4243e: 4a80 tstl %d0 <== NOT EXECUTED 42440: 6700 0094 beqw 424d6 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 42444: 49f1 2810 lea %a1@(00000010,%d2:l),%a4 <== NOT EXECUTED 42448: 99c0 subal %d0,%a4 <== NOT EXECUTED else used = 0; #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 4244a: 4a8a tstl %a2 <== NOT EXECUTED 4244c: 6700 0090 beqw 424de <== NOT EXECUTED #endif { (*print_handler)( 42450: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42454: 4878 0005 pea 5 <== NOT EXECUTED 42458: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4245c: 2a79 0005 f33c moveal 5f33c ,%a5 <== NOT EXECUTED 42462: 4eb9 0004 6a04 jsr 46a04 <== NOT EXECUTED 42468: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4246a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4246e: 4879 0005 cf1b pea 5cf1b <== NOT EXECUTED 42474: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 4247a: 4e95 jsr %a5@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 4247c: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 42480: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42484: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42486: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42488: 2013 movel %a3@,%d0 <== NOT EXECUTED 4248a: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 4248c: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42490: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42492: 4879 0005 cf36 pea 5cf36 <== NOT EXECUTED 42498: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 4249e: 2079 0005 f33c moveal 5f33c ,%a0 <== NOT EXECUTED 424a4: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 424a6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 424aa: 4ab9 0005 f338 tstl 5f338 <== NOT EXECUTED 424b0: 677a beqs 4252c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 424b2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 424b4: 4879 0005 cf61 pea 5cf61 <== NOT EXECUTED 424ba: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 424c0: 2079 0005 f33c moveal 5f33c ,%a0 <== NOT EXECUTED 424c6: 4e90 jsr %a0@ <== NOT EXECUTED 424c8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } } 424cc: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 424d2: 4e5e unlk %fp <== NOT EXECUTED 424d4: 4e75 rts <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 424d6: 99cc subal %a4,%a4 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) 424d8: 4a8a tstl %a2 <== NOT EXECUTED 424da: 6600 ff74 bnew 42450 <== 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 ); 424de: 4878 ffff pea ffffffff <== NOT EXECUTED 424e2: 4879 0005 cf28 pea 5cf28 <== NOT EXECUTED 424e8: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 424ee: 2079 0005 f33c moveal 5f33c ,%a0 <== NOT EXECUTED 424f4: 4e90 jsr %a0@ <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 424f6: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 424fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } #endif (*print_handler)( 424fe: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42500: 2f03 movel %d3,%sp@- <== NOT EXECUTED print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 42502: 2013 movel %a3@,%d0 <== NOT EXECUTED 42504: 5380 subql #1,%d0 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 42506: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4250a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4250c: 4879 0005 cf36 pea 5cf36 <== NOT EXECUTED 42512: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 42518: 2079 0005 f33c moveal 5f33c ,%a0 <== NOT EXECUTED 4251e: 4e90 jsr %a0@ <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 42520: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42524: 4ab9 0005 f338 tstl 5f338 <== NOT EXECUTED 4252a: 6686 bnes 424b2 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 4252c: 4879 0005 cf54 pea 5cf54 <== NOT EXECUTED 42532: 2f39 0005 f340 movel 5f340 ,%sp@- <== NOT EXECUTED 42538: 2079 0005 f33c moveal 5f33c ,%a0 <== NOT EXECUTED 4253e: 4e90 jsr %a0@ <== NOT EXECUTED 42540: 508f addql #8,%sp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 42542: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 42548: 4e5e unlk %fp <== NOT EXECUTED 4254a: 4e75 rts <== NOT EXECUTED /* * Obtain interrupt stack information */ #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if (the_thread == (Thread_Control *) -1) { if (!Stack_check_Interrupt_stack.area) 4254c: 2279 0005 fb54 moveal 5fb54 ,%a1<== NOT EXECUTED 42552: 4a89 tstl %a1 <== NOT EXECUTED 42554: 6700 ff76 beqw 424cc <== NOT EXECUTED return; stack = &Stack_check_Interrupt_stack; 42558: 47f9 0005 fb50 lea 5fb50 ,%a3 <== NOT EXECUTED the_thread = 0; current = 0; 4255e: 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; 42560: 95ca subal %a2,%a2 <== NOT EXECUTED 42562: 6000 fe9c braw 42400 <== NOT EXECUTED =============================================================================== 00042566 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 42566: 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 ) 4256a: 4ab9 0005 f338 tstl 5f338 42570: 666a bnes 425dc /* * 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) { 42572: 2039 0005 fe34 movel 5fe34 <_Per_CPU_Information>,%d0 /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 42578: 223c feed f00d movel #-17960947,%d1 4257e: 23c1 0005 fb40 movel %d1,5fb40 42584: 223c 0bad 0d06 movel #195890438,%d1 4258a: 23c1 0005 fb44 movel %d1,5fb44 42590: 223c dead f00d movel #-559026163,%d1 42596: 23c1 0005 fb48 movel %d1,5fb48 4259c: 223c 600d 0d06 movel #1611468038,%d1 425a2: 23c1 0005 fb4c movel %d1,5fb4c /* * 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) { 425a8: 4a80 tstl %d0 425aa: 6728 beqs 425d4 <== NEVER TAKEN 425ac: 2239 0005 fe38 movel 5fe38 <_Per_CPU_Information+0x4>,%d1 425b2: 6720 beqs 425d4 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 425b4: 9280 subl %d0,%d1 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 425b6: 2f01 movel %d1,%sp@- 425b8: 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; 425bc: 23c0 0005 fb54 movel %d0,5fb54 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 425c2: 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 - 425c4: 23c1 0005 fb50 movel %d1,5fb50 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 425ca: 4eb9 0004 ebfc jsr 4ebfc 425d0: 4fef 000c lea %sp@(12),%sp } #endif Stack_check_Initialized = 1; 425d4: 7001 moveq #1,%d0 425d6: 23c0 0005 f338 movel %d0,5f338 } 425dc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042652 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42652: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42656: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); char name[32]; printk("BLOWN STACK!!!\n"); 4265a: 4879 0005 cf67 pea 5cf67 <== NOT EXECUTED 42660: 47f9 0004 4358 lea 44358 ,%a3 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 42666: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern(stack); 4266a: 286a 00b4 moveal %a2@(180),%a4 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 4266e: 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"); 42672: 4e93 jsr %a3@ <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 42674: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42676: 4879 0005 cf77 pea 5cf77 <== NOT EXECUTED 4267c: 4e93 jsr %a3@ <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 4267e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42682: 4879 0005 cf94 pea 5cf94 <== NOT EXECUTED 42688: 4e93 jsr %a3@ <== NOT EXECUTED printk( 4268a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 4268e: 4879 0005 cfa6 pea 5cfa6 <== NOT EXECUTED 42694: 4e93 jsr %a3@ <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 42696: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 4269a: 4878 0020 pea 20 <== NOT EXECUTED 4269e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 426a2: 4eb9 0004 6a04 jsr 46a04 <== NOT EXECUTED 426a8: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 426ac: 2e80 movel %d0,%sp@ <== NOT EXECUTED 426ae: 4879 0005 cfba pea 5cfba <== NOT EXECUTED 426b4: 4e93 jsr %a3@ <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 426b6: 206a 00b4 moveal %a2@(180),%a0 <== NOT EXECUTED 426ba: 202a 00b0 movel %a2@(176),%d0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 426be: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 426c2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 426c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 426c6: 4879 0005 cfd0 pea 5cfd0 <== NOT EXECUTED 426cc: 4e93 jsr %a3@ <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 426ce: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 426d2: 4a02 tstb %d2 <== NOT EXECUTED 426d4: 670a beqs 426e0 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 426d6: 4878 0081 pea 81 <== NOT EXECUTED 426da: 4eb9 0004 73dc jsr 473dc <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 426e0: 486c 0018 pea %a4@(24) <== NOT EXECUTED 426e4: 486c 0008 pea %a4@(8) <== NOT EXECUTED 426e8: 4878 0010 pea 10 <== NOT EXECUTED 426ec: 4879 0005 d001 pea 5d001 <== NOT EXECUTED 426f2: 4e93 jsr %a3@ <== NOT EXECUTED 426f4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 426f8: 4878 0081 pea 81 <== NOT EXECUTED 426fc: 4eb9 0004 73dc jsr 473dc <== NOT EXECUTED =============================================================================== 0004cc2c : * 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; 4cc2c: 41f9 0006 3618 lea 63618 ,%a0 #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { 4cc32: 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; 4cc36: 202e 0008 movel %fp@(8),%d0 4cc3a: 4c50 0001 remul %a0@,%d1,%d0 4cc3e: 4c50 0000 remul %a0@,%d0,%d0 if ( (microseconds % microseconds_per_tick) != 0 ) 4cc42: 4a81 tstl %d1 4cc44: 6702 beqs 4cc48 <== ALWAYS TAKEN ticks += 1; 4cc46: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 4cc48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004827c : #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 4827c: 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(); 48280: 2039 0005 f1a8 movel 5f1a8 ,%d0 #include uint32_t TOD_MILLISECONDS_TO_TICKS( uint32_t milliseconds ) { 48286: 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(); 48288: 243c 0000 03e8 movel #1000,%d2 4828e: 4c42 0000 remul %d2,%d0,%d0 ticks = milliseconds / milliseconds_per_tick; 48292: 242e 0008 movel %fp@(8),%d2 48296: 4c40 2001 remul %d0,%d1,%d2 4829a: 4c40 2002 remul %d0,%d2,%d2 4829e: 2002 movel %d2,%d0 if ( (milliseconds % milliseconds_per_tick) != 0 ) 482a0: 4a81 tstl %d1 482a2: 6702 beqs 482a6 <== ALWAYS TAKEN ticks += 1; 482a4: 5280 addql #1,%d0 <== NOT EXECUTED return ticks; } 482a6: 241f movel %sp@+,%d2 482a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000473be <_API_extensions_Run_postdriver>: /* * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 473be: 4e56 0000 linkw %fp,#0 473c2: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 473c4: 2479 0005 fa88 moveal 5fa88 <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473ca: b5fc 0005 fa8c cmpal #391820,%a2 473d0: 6710 beqs 473e2 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 473d2: 206a 0008 moveal %a2@(8),%a0 473d6: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 473d8: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473da: b5fc 0005 fa8c cmpal #391820,%a2 473e0: 66f0 bnes 473d2 <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 473e2: 246e fffc moveal %fp@(-4),%a2 473e6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000473ea <_API_extensions_Run_postswitch>: /* * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 473ea: 4e56 0000 linkw %fp,#0 473ee: 2f0a movel %a2,%sp@- 473f0: 2479 0005 fa88 moveal 5fa88 <_API_extensions_List>,%a2 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 473f6: b5fc 0005 fa8c cmpal #391820,%a2 473fc: 6718 beqs 47416 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 473fe: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 47404: 206a 000c moveal %a2@(12),%a0 47408: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 4740a: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 4740c: 588f addql #4,%sp 4740e: b5fc 0005 fa8c cmpal #391820,%a2 47414: 66e8 bnes 473fe <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 47416: 246e fffc moveal %fp@(-4),%a2 4741a: 4e5e unlk %fp ... =============================================================================== 0004f12c <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4f12c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f132: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 4f136: 2279 0006 2070 moveal 62070 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f13c: 48d7 001c moveml %d2-%d4,%sp@ 4f140: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 4f144: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4f148: 242e 000c movel %fp@(12),%d2 4f14c: 262e 0014 movel %fp@(20),%d3 4f150: 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 ); 4f154: 40c1 movew %sr,%d1 4f156: 8081 orl %d1,%d0 4f158: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4f15a: 2028 0048 movel %a0@(72),%d0 4f15e: 5280 addql #1,%d0 4f160: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 4f164: 4aa8 0040 tstl %a0@(64) 4f168: 6606 bnes 4f170 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 4f16a: b0a8 0044 cmpl %a0@(68),%d0 4f16e: 672e beqs 4f19e <_CORE_barrier_Wait+0x72> 4f170: 7001 moveq #1,%d0 4f172: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 4f176: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 4f17a: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 4f17e: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 4f180: 2d43 000c movel %d3,%fp@(12) 4f184: 203c 0004 ba08 movel #309768,%d0 4f18a: 2d48 0008 movel %a0,%fp@(8) } 4f18e: 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 ); 4f192: 2d40 0010 movel %d0,%fp@(16) } 4f196: 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 ); 4f198: 4ef9 0004 b680 jmp 4b680 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 4f19e: 7001 moveq #1,%d0 4f1a0: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 4f1a4: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 4f1a6: 2d44 0010 movel %d4,%fp@(16) 4f1aa: 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 ); } 4f1ae: 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 ); 4f1b2: 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 ); } 4f1b6: 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 ); 4f1b8: 4ef9 0004 f0f0 jmp 4f0f0 <_CORE_barrier_Release> ... =============================================================================== 0004d350 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4d350: 4e56 0000 linkw %fp,#0 4d354: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4d356: 2f2e 0010 movel %fp@(16),%sp@- 4d35a: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4d35e: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4d362: 2f0a movel %a2,%sp@- 4d364: 4eb9 0004 a25c jsr 4a25c <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 4d36a: 4fef 000c lea %sp@(12),%sp 4d36e: 4aaa 0048 tstl %a2@(72) 4d372: 6612 bnes 4d386 <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4d374: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4d37a: 246e fffc moveal %fp@(-4),%a2 4d37e: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4d380: 4ef9 0004 abea jmp 4abea <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4d386: 2f0a movel %a2,%sp@- 4d388: 4eb9 0004 d3a4 jsr 4d3a4 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4d38e: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4d394: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4d396: 246e fffc moveal %fp@(-4),%a2 4d39a: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4d39c: 4ef9 0004 abea jmp 4abea <_Workspace_Free> ... =============================================================================== 000503e0 <_CORE_message_queue_Initialize>: /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 503e0: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 503e2: 4e56 ffe4 linkw %fp,#-28 503e6: 202e 0014 movel %fp@(20),%d0 503ea: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 503ee: 246e 0008 moveal %fp@(8),%a2 * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); 503f2: 2600 movel %d0,%d3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 503f4: 242e 0010 movel %fp@(16),%d2 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 503f8: c280 andl %d0,%d1 ) { size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 503fa: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 503fe: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 50402: 2540 004c movel %d0,%a2@(76) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { 50406: 4a81 tstl %d1 50408: 6716 beqs 50420 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uint32_t); 5040a: 5883 addql #4,%d3 allocated_message_size &= ~(sizeof(uint32_t) - 1); 5040c: 72fc moveq #-4,%d1 5040e: c681 andl %d1,%d3 } if (allocated_message_size < maximum_message_size) 50410: b680 cmpl %d0,%d3 50412: 640c bccs 50420 <_CORE_message_queue_Initialize+0x40><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 50414: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 5041a: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 5041c: 4e5e unlk %fp 5041e: 4e75 rts /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( 50420: 0683 0000 0010 addil #16,%d3 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 50426: 2f03 movel %d3,%sp@- if ( x > SIZE_MAX ) 50428: 4286 clrl %d6 5042a: 7eff moveq #-1,%d7 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; 5042c: 42a7 clrl %sp@- 5042e: 2f02 movel %d2,%sp@- 50430: 42a7 clrl %sp@- 50432: 4eb9 0006 3798 jsr 63798 <__muldi3> 50438: 4fef 0010 lea %sp@(16),%sp 5043c: 2800 movel %d0,%d4 5043e: 2a01 movel %d1,%d5 if ( x > SIZE_MAX ) 50440: 9e85 subl %d5,%d7 50442: 9d84 subxl %d4,%d6 50444: 6dce blts 50414 <_CORE_message_queue_Initialize+0x34> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 50446: 2f01 movel %d1,%sp@- 50448: 4eb9 0005 32e6 jsr 532e6 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 5044e: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 50450: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 50454: 67be beqs 50414 <_CORE_message_queue_Initialize+0x34> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 50456: 2f03 movel %d3,%sp@- allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50458: 7e01 moveq #1,%d7 /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 5045a: 2f02 movel %d2,%sp@- 5045c: 2f00 movel %d0,%sp@- 5045e: 486a 0060 pea %a2@(96) 50462: 4eb9 0005 5370 jsr 55370 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 50468: 4878 0006 pea 6 5046c: 206e 000c moveal %fp@(12),%a0 50470: be90 cmpl %a0@,%d7 50472: 57c0 seq %d0 50474: 4878 0080 pea 80 50478: 49c0 extbl %d0 5047a: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 5047c: 41ea 0054 lea %a2@(84),%a0 50480: 2f00 movel %d0,%sp@- 50482: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 50486: 41ea 0050 lea %a2@(80),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5048a: 42aa 0054 clrl %a2@(84) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5048e: 2548 0058 movel %a0,%a2@(88) 50492: 2f0a movel %a2,%sp@- 50494: 4eb9 0005 29b0 jsr 529b0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 5049a: 4fef 0020 lea %sp@(32),%sp } 5049e: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 504a4: 7001 moveq #1,%d0 } 504a6: 4e5e unlk %fp ... =============================================================================== 000504ac <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 504ac: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 504b2: 4e56 ffe4 linkw %fp,#-28 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 504b6: 2079 0006 94d4 moveal 694d4 <_Per_CPU_Information+0xc>,%a0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 504bc: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 504c0: 246e 0008 moveal %fp@(8),%a2 504c4: 2c2e 000c movel %fp@(12),%d6 504c8: 242e 0010 movel %fp@(16),%d2 504cc: 226e 0014 moveal %fp@(20),%a1 504d0: 2a2e 001c movel %fp@(28),%d5 504d4: 182e 001b moveb %fp@(27),%d4 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 504d8: 42a8 0034 clrl %a0@(52) _ISR_Disable( level ); 504dc: 40c1 movew %sr,%d1 504de: 8081 orl %d1,%d0 504e0: 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 ); 504e2: 260a movel %a2,%d3 504e4: 200a movel %a2,%d0 504e6: 0683 0000 0050 addil #80,%d3 504ec: 0680 0000 0054 addil #84,%d0 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 504f2: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 504f6: b08b cmpl %a3,%d0 504f8: 674a beqs 50544 <_CORE_message_queue_Seize+0x98> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 504fa: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 504fc: 2143 0004 movel %d3,%a0@(4) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50500: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 50504: 2548 0050 movel %a0,%a2@(80) _ISR_Enable( level ); 50508: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; 5050a: 22ab 0008 movel %a3@(8),%a1@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5050e: 45ea 0060 lea %a2@(96),%a2 _Thread_Executing->Wait.count = 50512: 2079 0006 94d4 moveal 694d4 <_Per_CPU_Information+0xc>,%a0 50518: 42a8 0024 clrl %a0@(36) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5051c: 2f11 movel %a1@,%sp@- 5051e: 486b 000c pea %a3@(12) 50522: 2f02 movel %d2,%sp@- 50524: 4eb9 0005 79dc jsr 579dc RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5052a: 4fef 000c lea %sp@(12),%sp 5052e: 2d4a 0008 movel %a2,%fp@(8) 50532: 2d4b 000c movel %a3,%fp@(12) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50536: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 5053c: 4e5e unlk %fp 5053e: 4ef9 0005 0314 jmp 50314 <_Chain_Append> return; } #endif } if ( !wait ) { 50544: 4a04 tstb %d4 50546: 6612 bnes 5055a <_CORE_message_queue_Seize+0xae> _ISR_Enable( level ); 50548: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 5054a: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 5054c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 50552: 2140 0034 movel %d0,%a0@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50556: 4e5e unlk %fp 50558: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5055a: 7001 moveq #1,%d0 5055c: 2540 0030 movel %d0,%a2@(48) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 50560: 2142 002c movel %d2,%a0@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 50564: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; 50568: 2146 0020 movel %d6,%a0@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 5056c: 2149 0028 movel %a1,%a0@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 50570: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50572: 2d45 000c movel %d5,%fp@(12) 50576: 203c 0005 2aac movel #338604,%d0 5057c: 2d4a 0008 movel %a2,%fp@(8) } 50580: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50586: 2d40 0010 movel %d0,%fp@(16) } 5058a: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5058c: 4ef9 0005 2724 jmp 52724 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00047954 <_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 ) { 47954: 4e56 0000 linkw %fp,#0 47958: 2f0a movel %a2,%sp@- 4795a: 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)) ) { 4795e: 2f0a movel %a2,%sp@- 47960: 4eb9 0004 948c jsr 4948c <_Thread_queue_Dequeue> 47966: 588f addql #4,%sp 47968: 4a80 tstl %d0 4796a: 670a beqs 47976 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4796c: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47970: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 47972: 4e5e unlk %fp 47974: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 47976: 303c 0700 movew #1792,%d0 4797a: 40c1 movew %sr,%d1 4797c: 8081 orl %d1,%d0 4797e: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 47980: 202a 0048 movel %a2@(72),%d0 47984: b0aa 0040 cmpl %a2@(64),%d0 47988: 6412 bccs 4799c <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 4798a: 5280 addql #1,%d0 4798c: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47990: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 47992: 46c1 movew %d1,%sr } return status; } 47994: 246e fffc moveal %fp@(-4),%a2 47998: 4e5e unlk %fp 4799a: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 4799c: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4799e: 46c1 movew %d1,%sr <== NOT EXECUTED 479a0: 60f2 bras 47994 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 0004c234 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c234: 4e56 ffec linkw %fp,#-20 4c238: 202e 0010 movel %fp@(16),%d0 4c23c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c240: 246e 0008 moveal %fp@(8),%a2 size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4c244: 280a movel %a2,%d4 4c246: 5884 addql #4,%d4 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c248: 262e 000c movel %fp@(12),%d3 4c24c: 242e 0014 movel %fp@(20),%d2 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 4c250: 42aa 0004 clrl %a2@(4) while ( count-- ) { 4c254: 4a80 tstl %d0 4c256: 6740 beqs 4c298 <_Chain_Initialize+0x64> <== NEVER TAKEN { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 4c258: 2043 moveal %d3,%a0 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c25a: 224a moveal %a2,%a1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c25c: 5380 subql #1,%d0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c25e: 2208 movel %a0,%d1 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c260: 2a00 movel %d0,%d5 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c262: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c264: 2288 movel %a0,%a1@ next->previous = current; 4c266: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c26a: 4a80 tstl %d0 4c26c: 6714 beqs 4c282 <_Chain_Initialize+0x4e> 4c26e: 2248 moveal %a0,%a1 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4c270: 2041 moveal %d1,%a0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c272: 2208 movel %a0,%d1 4c274: 5380 subql #1,%d0 4c276: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c278: 2288 movel %a0,%a1@ next->previous = current; 4c27a: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c27e: 4a80 tstl %d0 4c280: 66ec bnes 4c26e <_Chain_Initialize+0x3a> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c282: 4c05 2800 mulsl %d5,%d2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c286: 2043 moveal %d3,%a0 4c288: d1c2 addal %d2,%a0 current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c28a: 2084 movel %d4,%a0@ tail->previous = current; 4c28c: 2548 0008 movel %a0,%a2@(8) } 4c290: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4c294: 4e5e unlk %fp 4c296: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c298: 204a moveal %a2,%a0 <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c29a: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; 4c29c: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED } 4c2a0: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4c2a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004661c <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 4661c: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 46622: 4e56 ffec linkw %fp,#-20 46626: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4662a: 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 ]; 4662e: 206a 00fc moveal %a2@(252),%a0 option_set = (rtems_option) the_thread->Wait.option; 46632: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 46636: 40c3 movew %sr,%d3 46638: 8083 orl %d3,%d0 4663a: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 4663c: 222a 0024 movel %a2@(36),%d1 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 ); 46640: 2001 movel %d1,%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; 46642: 2410 movel %a0@,%d2 46644: 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 ) ) { 46646: 6700 00ac beqw 466f4 <_Event_Surrender+0xd8> /* * 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() && 4664a: 4ab9 0005 fac8 tstl 5fac8 <_Per_CPU_Information+0x8> 46650: 6708 beqs 4665a <_Event_Surrender+0x3e> 46652: b5f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a2 46658: 675c beqs 466b6 <_Event_Surrender+0x9a> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 4665a: 2a2a 0010 movel %a2@(16),%d5 4665e: 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 ) ) { 46664: 6700 008e beqw 466f4 <_Event_Surrender+0xd8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 46668: b081 cmpl %d1,%d0 4666a: 6708 beqs 46674 <_Event_Surrender+0x58> 4666c: 0804 0001 btst #1,%d4 46670: 6700 0082 beqw 466f4 <_Event_Surrender+0xd8> 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) ); 46674: 2200 movel %d0,%d1 46676: 4681 notl %d1 46678: c282 andl %d2,%d1 4667a: 2081 movel %d1,%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; 4667c: 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; 46680: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 46684: 2080 movel %d0,%a0@ _ISR_Flash( level ); 46686: 203c 0000 0700 movel #1792,%d0 4668c: 46c3 movew %d3,%sr 4668e: 8083 orl %d3,%d0 46690: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 46692: 7a02 moveq #2,%d5 46694: baaa 0050 cmpl %a2@(80),%d5 46698: 6766 beqs 46700 <_Event_Surrender+0xe4> _ISR_Enable( level ); 4669a: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4669c: 2f3c 1003 fff8 movel #268697592,%sp@- 466a2: 2f0a movel %a2,%sp@- 466a4: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 466aa: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 466ac: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466b2: 4e5e unlk %fp 466b4: 4e75 rts * 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) || 466b6: 2279 0005 fb08 moveal 5fb08 <_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 ) && 466bc: 7a02 moveq #2,%d5 466be: ba89 cmpl %a1,%d5 466c0: 670e beqs 466d0 <_Event_Surrender+0xb4> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 466c2: 2279 0005 fb08 moveal 5fb08 <_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) || 466c8: 1a3c 0001 moveb #1,%d5 466cc: ba89 cmpl %a1,%d5 466ce: 668a bnes 4665a <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 466d0: b081 cmpl %d1,%d0 466d2: 6706 beqs 466da <_Event_Surrender+0xbe> 466d4: 0804 0001 btst #1,%d4 466d8: 671a beqs 466f4 <_Event_Surrender+0xd8> <== NEVER TAKEN 466da: 2200 movel %d0,%d1 466dc: 4681 notl %d1 466de: c282 andl %d2,%d1 466e0: 2081 movel %d1,%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; 466e2: 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; 466e6: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 466ea: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 466ec: 7003 moveq #3,%d0 466ee: 23c0 0005 fb08 movel %d0,5fb08 <_Event_Sync_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 466f4: 46c3 movew %d3,%sr } 466f6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 466fc: 4e5e unlk %fp 466fe: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46700: 7003 moveq #3,%d0 46702: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 46706: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 46708: 486a 0048 pea %a2@(72) 4670c: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 46712: 2f3c 1003 fff8 movel #268697592,%sp@- 46718: 2f0a movel %a2,%sp@- 4671a: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 46720: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 46724: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4672a: 4e5e unlk %fp ... =============================================================================== 00046730 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 46730: 4e56 fffc linkw %fp,#-4 46734: 2f03 movel %d3,%sp@- 46736: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 46738: 486e fffc pea %fp@(-4) 4673c: 2f2e 0008 movel %fp@(8),%sp@- 46740: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 46746: 508f addql #8,%sp 46748: 4aae fffc tstl %fp@(-4) 4674c: 6648 bnes 46796 <_Event_Timeout+0x66> <== 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 ); 4674e: 223c 0000 0700 movel #1792,%d1 46754: 40c2 movew %sr,%d2 46756: 8282 orl %d2,%d1 46758: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 4675a: 2040 moveal %d0,%a0 4675c: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 46760: b0b9 0005 facc cmpl 5facc <_Per_CPU_Information+0xc>,%d0 46766: 673a beqs 467a2 <_Event_Timeout+0x72> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46768: 7606 moveq #6,%d3 4676a: 2040 moveal %d0,%a0 4676c: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 46770: 46c2 movew %d2,%sr 46772: 2f3c 1003 fff8 movel #268697592,%sp@- 46778: 2f00 movel %d0,%sp@- 4677a: 4eb9 0004 8d38 jsr 48d38 <_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; 46780: 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--; 46782: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 46788: 5380 subql #1,%d0 4678a: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 46790: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 46796: 242e fff4 movel %fp@(-12),%d2 4679a: 262e fff8 movel %fp@(-8),%d3 4679e: 4e5e unlk %fp 467a0: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 467a2: 2239 0005 fb08 movel 5fb08 <_Event_Sync_state>,%d1 467a8: 7601 moveq #1,%d3 467aa: b681 cmpl %d1,%d3 467ac: 66ba bnes 46768 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467ae: 7606 moveq #6,%d3 467b0: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 467b2: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 467b4: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 467b8: 23c1 0005 fb08 movel %d1,5fb08 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 467be: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 467c0: 2f3c 1003 fff8 movel #268697592,%sp@- 467c6: 2f00 movel %d0,%sp@- 467c8: 4eb9 0004 8d38 jsr 48d38 <_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; 467ce: 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--; 467d0: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 467d6: 5380 subql #1,%d0 467d8: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 467de: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 467e4: 60b0 bras 46796 <_Event_Timeout+0x66> ... =============================================================================== 0004c418 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c418: 4e56 ffcc linkw %fp,#-52 4c41c: 226e 000c moveal %fp@(12),%a1 4c420: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c424: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4c428: 2c09 movel %a1,%d6 4c42a: 5886 addql #4,%d6 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c42c: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c430: 222e 0010 movel %fp@(16),%d1 4c434: 282e 0014 movel %fp@(20),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c438: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4c43c: bc89 cmpl %a1,%d6 4c43e: 6500 0148 bcsw 4c588 <_Heap_Allocate_aligned_with_boundary+0x170> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4c442: 4a84 tstl %d4 4c444: 670c beqs 4c452 <_Heap_Allocate_aligned_with_boundary+0x3a> if ( boundary < alloc_size ) { 4c446: b889 cmpl %a1,%d4 4c448: 6500 013e bcsw 4c588 <_Heap_Allocate_aligned_with_boundary+0x170> return NULL; } if ( alignment == 0 ) { 4c44c: 4a81 tstl %d1 4c44e: 6602 bnes 4c452 <_Heap_Allocate_aligned_with_boundary+0x3a> alignment = page_size; 4c450: 2200 movel %d0,%d1 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 4c452: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c456: 4283 clrl %d3 4c458: b1ca cmpal %a2,%a0 4c45a: 6732 beqs 4c48e <_Heap_Allocate_aligned_with_boundary+0x76> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c45c: 242e fffc movel %fp@(-4),%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c460: 7a04 moveq #4,%d5 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c462: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c464: 9a89 subl %a1,%d5 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c466: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4c46a: 2d45 fff4 movel %d5,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4c46e: 2028 0004 movel %a0@(4),%d0 4c472: b086 cmpl %d6,%d0 4c474: 6330 blss 4c4a6 <_Heap_Allocate_aligned_with_boundary+0x8e> if ( alignment == 0 ) { 4c476: 4a81 tstl %d1 4c478: 6638 bnes 4c4b2 <_Heap_Allocate_aligned_with_boundary+0x9a> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c47a: 2408 movel %a0,%d2 4c47c: 5082 addql #8,%d2 ); } } /* Statistics */ ++search_count; 4c47e: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4c480: 4a82 tstl %d2 4c482: 6600 00e6 bnew 4c56a <_Heap_Allocate_aligned_with_boundary+0x152> break; } block = block->next; 4c486: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c48a: b1ca cmpal %a2,%a0 4c48c: 66e0 bnes 4c46e <_Heap_Allocate_aligned_with_boundary+0x56> 4c48e: 4282 clrl %d2 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4c490: b6aa 0044 cmpl %a2@(68),%d3 4c494: 6304 blss 4c49a <_Heap_Allocate_aligned_with_boundary+0x82> stats->max_search = search_count; 4c496: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; 4c49a: 2002 movel %d2,%d0 } 4c49c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c4a2: 4e5e unlk %fp 4c4a4: 4e75 rts if ( alloc_begin != 0 ) { break; } block = block->next; 4c4a6: 2068 0008 moveal %a0@(8),%a0 ); } } /* Statistics */ ++search_count; 4c4aa: 5283 addql #1,%d3 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c4ac: b1ca cmpal %a2,%a0 4c4ae: 66be bnes 4c46e <_Heap_Allocate_aligned_with_boundary+0x56> 4c4b0: 60dc bras 4c48e <_Heap_Allocate_aligned_with_boundary+0x76> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4c4b2: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4c4b4: 4be8 0008 lea %a0@(8),%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; 4c4b8: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c4ba: 286a 0014 moveal %a2@(20),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4c4be: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4c4c0: 2a2e fff8 movel %fp@(-8),%d5 4c4c4: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4c4c6: 242e fff4 movel %fp@(-12),%d2 4c4ca: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c4cc: 2e02 movel %d2,%d7 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c4ce: d085 addl %d5,%d0 4c4d0: 4c41 7005 remul %d1,%d5,%d7 4c4d4: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4c4d6: b480 cmpl %d0,%d2 4c4d8: 630a blss 4c4e4 <_Heap_Allocate_aligned_with_boundary+0xcc> 4c4da: 2a00 movel %d0,%d5 4c4dc: 4c41 5002 remul %d1,%d2,%d5 4c4e0: 9082 subl %d2,%d0 4c4e2: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4c4e4: 4a84 tstl %d4 4c4e6: 6756 beqs 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4c4e8: 2002 movel %d2,%d0 4c4ea: d089 addl %a1,%d0 4c4ec: 2e00 movel %d0,%d7 4c4ee: 4c44 7005 remul %d4,%d5,%d7 4c4f2: 2e00 movel %d0,%d7 4c4f4: 9e85 subl %d5,%d7 4c4f6: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4c4f8: be82 cmpl %d2,%d7 4c4fa: 6342 blss 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> 4c4fc: be80 cmpl %d0,%d7 4c4fe: 643e bccs 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4c500: 2e0d movel %a5,%d7 4c502: de89 addl %a1,%d7 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4c504: ba87 cmpl %d7,%d5 4c506: 652a bcss 4c532 <_Heap_Allocate_aligned_with_boundary+0x11a> 4c508: 2647 moveal %d7,%a3 return 0; } alloc_begin = boundary_line - alloc_size; 4c50a: 2405 movel %d5,%d2 4c50c: 9489 subl %a1,%d2 4c50e: 2a02 movel %d2,%d5 4c510: 4c41 5000 remul %d1,%d0,%d5 4c514: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4c516: 2002 movel %d2,%d0 4c518: d089 addl %a1,%d0 4c51a: 2e00 movel %d0,%d7 4c51c: 4c44 7005 remul %d4,%d5,%d7 4c520: 2e00 movel %d0,%d7 4c522: 9e85 subl %d5,%d7 4c524: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4c526: be82 cmpl %d2,%d7 4c528: 6314 blss 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> 4c52a: be80 cmpl %d0,%d7 4c52c: 6410 bccs 4c53e <_Heap_Allocate_aligned_with_boundary+0x126> if ( boundary_line < boundary_floor ) { 4c52e: ba8b cmpl %a3,%d5 4c530: 64d8 bccs 4c50a <_Heap_Allocate_aligned_with_boundary+0xf2><== ALWAYS TAKEN if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4c532: 4282 clrl %d2 ); } } /* Statistics */ ++search_count; 4c534: 5283 addql #1,%d3 if ( alloc_begin != 0 ) { 4c536: 4a82 tstl %d2 4c538: 6700 ff4c beqw 4c486 <_Heap_Allocate_aligned_with_boundary+0x6e> 4c53c: 602c bras 4c56a <_Heap_Allocate_aligned_with_boundary+0x152><== NOT EXECUTED boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4c53e: b48d cmpl %a5,%d2 4c540: 65f0 bcss 4c532 <_Heap_Allocate_aligned_with_boundary+0x11a> 4c542: 70f8 moveq #-8,%d0 4c544: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c546: 2a40 moveal %d0,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c548: 2e02 movel %d2,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c54a: dbc2 addal %d2,%a5 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c54c: 202e fffc movel %fp@(-4),%d0 4c550: 4c40 7005 remul %d0,%d5,%d7 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4c554: 9bc5 subal %d5,%a5 if ( free_size >= min_block_size || free_size == 0 ) { 4c556: bbcc cmpal %a4,%a5 4c558: 6400 ff24 bccw 4c47e <_Heap_Allocate_aligned_with_boundary+0x66> return alloc_begin; } } return 0; 4c55c: 4a8d tstl %a5 4c55e: 57c0 seq %d0 ); } } /* Statistics */ ++search_count; 4c560: 5283 addql #1,%d3 if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; 4c562: 49c0 extbl %d0 4c564: c480 andl %d0,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4c566: 6700 ff1e beqw 4c486 <_Heap_Allocate_aligned_with_boundary+0x6e> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c56a: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4c56c: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4c570: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4c574: 2f02 movel %d2,%sp@- 4c576: 2f08 movel %a0,%sp@- 4c578: 2f0a movel %a2,%sp@- 4c57a: 4eb9 0004 7d54 jsr 47d54 <_Heap_Block_allocate> 4c580: 4fef 0010 lea %sp@(16),%sp 4c584: 6000 ff0a braw 4c490 <_Heap_Allocate_aligned_with_boundary+0x78> return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; 4c588: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c58a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c590: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004c548 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4c548: 4e56 ffcc linkw %fp,#-52 4c54c: 202e 0010 movel %fp@(16),%d0 4c550: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c554: 246e 0008 moveal %fp@(8),%a2 4c558: 242e 000c movel %fp@(12),%d2 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; 4c55c: 2602 movel %d2,%d3 4c55e: d680 addl %d0,%d3 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4c560: 2a2a 0020 movel %a2@(32),%d5 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; 4c564: 282a 0010 movel %a2@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4c568: 222a 0014 movel %a2@(20),%d1 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; 4c56c: 2c2a 0030 movel %a2@(48),%d6 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; 4c570: 42ae fff8 clrl %fp@(-8) Heap_Block *extend_last_block = NULL; 4c574: 42ae fffc clrl %fp@(-4) uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4c578: b682 cmpl %d2,%d3 4c57a: 640c bccs 4c588 <_Heap_Extend+0x40> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c57c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 _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; 4c582: 4200 clrb %d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c584: 4e5e unlk %fp 4c586: 4e75 rts if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4c588: 486e fffc pea %fp@(-4) 4c58c: 486e fff8 pea %fp@(-8) 4c590: 2f01 movel %d1,%sp@- 4c592: 2f04 movel %d4,%sp@- 4c594: 2f00 movel %d0,%sp@- 4c596: 2f02 movel %d2,%sp@- 4c598: 4eb9 0004 7b78 jsr 47b78 <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4c59e: 4fef 0018 lea %sp@(24),%sp 4c5a2: 4a00 tstb %d0 4c5a4: 67d6 beqs 4c57c <_Heap_Extend+0x34> 4c5a6: 2045 moveal %d5,%a0 4c5a8: 9bcd subal %a5,%a5 4c5aa: 97cb subal %a3,%a3 4c5ac: 99cc subal %a4,%a4 4c5ae: 42ae fff4 clrl %fp@(-12) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4c5b2: ba88 cmpl %a0,%d5 4c5b4: 6700 0148 beqw 4c6fe <_Heap_Extend+0x1b6> 4c5b8: 2208 movel %a0,%d1 uintptr_t const sub_area_end = start_block->prev_size; 4c5ba: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4c5bc: b082 cmpl %d2,%d0 4c5be: 6304 blss 4c5c4 <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4c5c0: b681 cmpl %d1,%d3 4c5c2: 62b8 bhis 4c57c <_Heap_Extend+0x34> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4c5c4: b681 cmpl %d1,%d3 4c5c6: 6700 0130 beqw 4c6f8 <_Heap_Extend+0x1b0> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4c5ca: b083 cmpl %d3,%d0 4c5cc: 6304 blss 4c5d2 <_Heap_Extend+0x8a> 4c5ce: 2d48 fff4 movel %a0,%fp@(-12) 4c5d2: 2e00 movel %d0,%d7 4c5d4: 2240 moveal %d0,%a1 4c5d6: 5189 subql #8,%a1 4c5d8: 4c44 7001 remul %d4,%d1,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c5dc: 93c1 subal %d1,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4c5de: b480 cmpl %d0,%d2 4c5e0: 6700 00fe beqw 4c6e0 <_Heap_Extend+0x198> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4c5e4: b082 cmpl %d2,%d0 4c5e6: 6402 bccs 4c5ea <_Heap_Extend+0xa2> 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 ) 4c5e8: 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; 4c5ea: 70fe moveq #-2,%d0 4c5ec: 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); 4c5f0: 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 ); 4c5f4: b1c5 cmpal %d5,%a0 4c5f6: 66ba bnes 4c5b2 <_Heap_Extend+0x6a> if ( extend_area_begin < heap->area_begin ) { 4c5f8: b4aa 0018 cmpl %a2@(24),%d2 4c5fc: 6500 0108 bcsw 4c706 <_Heap_Extend+0x1be> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 4c600: b6aa 001c cmpl %a2@(28),%d3 4c604: 6304 blss 4c60a <_Heap_Extend+0xc2> heap->area_end = extend_area_end; 4c606: 2543 001c movel %d3,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4c60a: 226e fffc moveal %fp@(-4),%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 = 4c60e: 2009 movel %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; 4c610: 7201 moveq #1,%d1 } 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; 4c612: 206e fff8 moveal %fp@(-8),%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 = 4c616: 9088 subl %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; 4c618: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4c61a: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c61c: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4c620: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4c622: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4c626: b1ea 0020 cmpal %a2@(32),%a0 4c62a: 6400 0102 bccw 4c72e <_Heap_Extend+0x1e6> heap->first_block = extend_first_block; 4c62e: 2548 0020 movel %a0,%a2@(32) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 4c632: 4a8c tstl %a4 4c634: 6700 0146 beqw 4c77c <_Heap_Extend+0x234> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4c638: 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 ); 4c63c: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4c63e: 2802 movel %d2,%d4 4c640: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4c644: 4a81 tstl %d1 4c646: 6704 beqs 4c64c <_Heap_Extend+0x104> return value - remainder + alignment; 4c648: d480 addl %d0,%d2 4c64a: 9481 subl %d1,%d2 uintptr_t const new_first_block_begin = 4c64c: 2042 moveal %d2,%a0 4c64e: 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 = 4c650: 200c movel %a4,%d0 4c652: 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; 4c654: 7201 moveq #1,%d1 4c656: 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; 4c658: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4c65a: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4c65e: 2f08 movel %a0,%sp@- 4c660: 2f0a movel %a2,%sp@- 4c662: 4eba fec8 jsr %pc@(4c52c <_Heap_Free_block>) 4c666: 508f addql #8,%sp link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4c668: 4a8b tstl %a3 4c66a: 6700 00d2 beqw 4c73e <_Heap_Extend+0x1f6> ) { 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, 4c66e: 5183 subql #8,%d3 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( 4c670: 968b subl %a3,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4c672: 2203 movel %d3,%d1 4c674: 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; 4c67a: 7201 moveq #1,%d1 4c67c: 9680 subl %d0,%d3 ); 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) 4c67e: 202b 0004 movel %a3@(4),%d0 4c682: 9083 subl %d3,%d0 | HEAP_PREV_BLOCK_USED; 4c684: 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; 4c686: 7001 moveq #1,%d0 4c688: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4c68c: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4c690: 8680 orl %d0,%d3 4c692: 2743 0004 movel %d3,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4c696: 2f0b movel %a3,%sp@- 4c698: 2f0a movel %a2,%sp@- 4c69a: 4eba fe90 jsr %pc@(4c52c <_Heap_Free_block>) 4c69e: 508f addql #8,%sp extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4c6a0: 4a8c tstl %a4 4c6a2: 6700 00c2 beqw 4c766 <_Heap_Extend+0x21e> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c6a6: 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; 4c6aa: 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( 4c6ac: 202a 0020 movel %a2@(32),%d0 4c6b0: 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; 4c6b2: c2a8 0004 andl %a0@(4),%d1 block->size_and_flag = size | flag; 4c6b6: 8280 orl %d0,%d1 4c6b8: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4c6bc: 222a 0030 movel %a2@(48),%d1 4c6c0: 9286 subl %d6,%d1 /* Statistics */ stats->size += extended_size; 4c6c2: d3aa 002c addl %d1,%a2@(44) if ( extended_size_ptr != NULL ) 4c6c6: 4aae 0014 tstl %fp@(20) 4c6ca: 6700 00ca beqw 4c796 <_Heap_Extend+0x24e> *extended_size_ptr = extended_size; 4c6ce: 206e 0014 moveal %fp@(20),%a0 return true; } 4c6d2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4c6d8: 7001 moveq #1,%d0 /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; 4c6da: 2081 movel %d1,%a0@ return true; } 4c6dc: 4e5e unlk %fp 4c6de: 4e75 rts - 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; 4c6e0: 70fe moveq #-2,%d0 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 ) 4c6e2: 2649 moveal %a1,%a3 } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 4c6e4: 2083 movel %d3,%a0@ - 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; 4c6e6: 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); 4c6ea: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4c6ee: b1c5 cmpal %d5,%a0 4c6f0: 6600 fec0 bnew 4c5b2 <_Heap_Extend+0x6a> 4c6f4: 6000 ff02 braw 4c5f8 <_Heap_Extend+0xb0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4c6f8: 2848 moveal %a0,%a4 4c6fa: 6000 fed6 braw 4c5d2 <_Heap_Extend+0x8a> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4c6fe: 222a 0018 movel %a2@(24),%d1 4c702: 6000 feb6 braw 4c5ba <_Heap_Extend+0x72> } 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; 4c706: 226e fffc moveal %fp@(-4),%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 = 4c70a: 2009 movel %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; 4c70c: 7201 moveq #1,%d1 } 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; 4c70e: 206e fff8 moveal %fp@(-8),%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 = 4c712: 9088 subl %a0,%d0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 4c714: 2542 0018 movel %d2,%a2@(24) extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c718: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4c71a: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4c71c: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4c720: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4c722: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4c726: b1ea 0020 cmpal %a2@(32),%a0 4c72a: 6500 ff02 bcsw 4c62e <_Heap_Extend+0xe6> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4c72e: b3ea 0024 cmpal %a2@(36),%a1 4c732: 6300 fefe blsw 4c632 <_Heap_Extend+0xea> heap->last_block = extend_last_block; 4c736: 2549 0024 movel %a1,%a2@(36) 4c73a: 6000 fef6 braw 4c632 <_Heap_Extend+0xea> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4c73e: 4a8d tstl %a5 4c740: 6700 ff5e beqw 4c6a0 <_Heap_Extend+0x158> 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; 4c744: 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 ); 4c746: 202e fff8 movel %fp@(-8),%d0 4c74a: 908d subl %a5,%d0 4c74c: 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( 4c750: 206e fffc moveal %fp@(-4),%a0 block->size_and_flag = size | flag; 4c754: 8280 orl %d0,%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; 4c756: 7001 moveq #1,%d0 4c758: 2b41 0004 movel %d1,%a5@(4) 4c75c: 81a8 0004 orl %d0,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4c760: 4a8c tstl %a4 4c762: 6600 ff42 bnew 4c6a6 <_Heap_Extend+0x15e> 4c766: 4a8b tstl %a3 4c768: 6600 ff3c bnew 4c6a6 <_Heap_Extend+0x15e> _Heap_Free_block( heap, extend_first_block ); 4c76c: 2f2e fff8 movel %fp@(-8),%sp@- 4c770: 2f0a movel %a2,%sp@- 4c772: 4eba fdb8 jsr %pc@(4c52c <_Heap_Free_block>) 4c776: 508f addql #8,%sp 4c778: 6000 ff2c braw 4c6a6 <_Heap_Extend+0x15e> 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 ) { 4c77c: 4aae fff4 tstl %fp@(-12) 4c780: 6700 fee6 beqw 4c668 <_Heap_Extend+0x120> { 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; 4c784: 202e fff4 movel %fp@(-12),%d0 4c788: 7201 moveq #1,%d1 4c78a: 9089 subl %a1,%d0 4c78c: 8280 orl %d0,%d1 4c78e: 2341 0004 movel %d1,%a1@(4) 4c792: 6000 fed4 braw 4c668 <_Heap_Extend+0x120> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4c796: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4c79c: 7001 moveq #1,%d0 <== NOT EXECUTED } 4c79e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004c594 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4c594: 4e56 ffe8 linkw %fp,#-24 4c598: 206e 0008 moveal %fp@(8),%a0 4c59c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4c5a0: 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 ) { 4c5a4: 6700 00f2 beqw 4c698 <_Heap_Free+0x104> 4c5a8: 2240 moveal %d0,%a1 4c5aa: 5189 subql #8,%a1 4c5ac: 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 4c5b2: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4c5b6: 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; 4c5b8: b089 cmpl %a1,%d0 4c5ba: 6200 0098 bhiw 4c654 <_Heap_Free+0xc0> 4c5be: 2228 0024 movel %a0@(36),%d1 4c5c2: b289 cmpl %a1,%d1 4c5c4: 6500 008e bcsw 4c654 <_Heap_Free+0xc0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c5c8: 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; 4c5cc: 74fe moveq #-2,%d2 4c5ce: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4c5d0: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4c5d4: b5c0 cmpal %d0,%a2 4c5d6: 657c bcss 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN 4c5d8: b5c1 cmpal %d1,%a2 4c5da: 6278 bhis 4c654 <_Heap_Free+0xc0> 4c5dc: 282a 0004 movel %a2@(4),%d4 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4c5e0: 0804 0000 btst #0,%d4 4c5e4: 676e beqs 4c654 <_Heap_Free+0xc0> - 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; 4c5e6: 7afe moveq #-2,%d5 4c5e8: c885 andl %d5,%d4 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 )); 4c5ea: b5c1 cmpal %d1,%a2 4c5ec: 6700 00fa beqw 4c6e8 <_Heap_Free+0x154> 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; 4c5f0: 7a01 moveq #1,%d5 4c5f2: cab2 4804 andl %a2@(00000004,%d4:l),%d5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4c5f6: 57c5 seq %d5 4c5f8: 4485 negl %d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4c5fa: 0803 0000 btst #0,%d3 4c5fe: 665e bnes 4c65e <_Heap_Free+0xca> uintptr_t const prev_size = block->prev_size; 4c600: 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); 4c602: 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; 4c604: b3c0 cmpal %d0,%a1 4c606: 654c bcss 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN 4c608: b3c1 cmpal %d1,%a1 4c60a: 6248 bhis 4c654 <_Heap_Free+0xc0> <== 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; 4c60c: 7001 moveq #1,%d0 4c60e: c0a9 0004 andl %a1@(4),%d0 return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4c612: 6740 beqs 4c654 <_Heap_Free+0xc0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4c614: 4a05 tstb %d5 4c616: 6700 00d6 beqw 4c6ee <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c61a: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4c61e: d682 addl %d2,%d3 4c620: d883 addl %d3,%d4 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c622: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c624: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4c628: 254b 0008 movel %a3,%a2@(8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c62c: 8084 orl %d4,%d0 next->prev = prev; 4c62e: 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; 4c632: 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; 4c636: 2384 4800 movel %d4,%a1@(00000000,%d4: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; 4c63a: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c63e: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c642: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c646: d5a8 0030 addl %d2,%a0@(48) return( true ); 4c64a: 7001 moveq #1,%d0 } 4c64c: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4c650: 4e5e unlk %fp 4c652: 4e75 rts 4c654: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 /* 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 ); 4c658: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c65a: 4e5e unlk %fp 4c65c: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4c65e: 4a05 tstb %d5 4c660: 673a beqs 4c69c <_Heap_Free+0x108> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c662: 266a 0008 moveal %a2@(8),%a3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; 4c666: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c668: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4c66a: 246a 000c moveal %a2@(12),%a2 next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c66e: 8084 orl %d4,%d0 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4c670: 234b 0008 movel %a3,%a1@(8) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4c674: 2384 4800 movel %d4,%a1@(00000000,%d4:l) new_block->prev = prev; 4c678: 234a 000c movel %a2,%a1@(12) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c67c: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c680: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4c682: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4c686: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c68a: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c68e: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c692: d5a8 0030 addl %d2,%a0@(48) 4c696: 60b4 bras 4c64c <_Heap_Free+0xb8> * 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; 4c698: 7001 moveq #1,%d0 4c69a: 60b0 bras 4c64c <_Heap_Free+0xb8> block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4c69c: 2028 0038 movel %a0@(56),%d0 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4c6a0: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6a2: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4c6a4: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4c6a6: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4c6aa: 2348 000c movel %a0,%a1@(12) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4c6ae: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4c6b0: 234b 0008 movel %a3,%a1@(8) 4c6b4: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6b8: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4c6bc: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4c6c0: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4c6c2: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4c6c6: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4c6ca: b0a8 003c cmpl %a0@(60),%d0 4c6ce: 6300 ff6e blsw 4c63e <_Heap_Free+0xaa> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c6d2: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c6d6: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c6da: d5a8 0030 addl %d2,%a0@(48) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4c6de: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c6e2: 7001 moveq #1,%d0 4c6e4: 6000 ff66 braw 4c64c <_Heap_Free+0xb8> 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 )); 4c6e8: 4205 clrb %d5 4c6ea: 6000 ff0e braw 4c5fa <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4c6ee: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c6f0: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6f2: 7afe moveq #-2,%d5 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c6f4: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4c6f6: 2483 movel %d3,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4c6f8: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4c6fa: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4c6fe: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4c702: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4c706: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4c70a: d5a8 0030 addl %d2,%a0@(48) 4c70e: 6000 ff3c braw 4c64c <_Heap_Free+0xb8> ... =============================================================================== 00051580 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 51580: 4e56 fff0 linkw %fp,#-16 51584: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 51588: 266e 0008 moveal %fp@(8),%a3 5158c: 246e 000c moveal %fp@(12),%a2 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 51590: 206b 0008 moveal %a3@(8),%a0 Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 51594: 4292 clrl %a2@ info->largest = 0; 51596: 42aa 0004 clrl %a2@(4) info->total = 0; 5159a: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 5159e: b1cb cmpal %a3,%a0 515a0: 6732 beqs 515d4 <_Heap_Get_free_information+0x54><== NEVER TAKEN 515a2: 327c 0001 moveaw #1,%a1 515a6: 4282 clrl %d2 515a8: 4281 clrl %d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 515aa: 70fe moveq #-2,%d0 the_block != tail; the_block = the_block->next) 515ac: 2609 movel %a1,%d3 515ae: 5283 addql #1,%d3 515b0: c0a8 0004 andl %a0@(4),%d0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; 515b4: d280 addl %d0,%d1 if ( info->largest < the_size ) 515b6: b480 cmpl %d0,%d2 515b8: 6404 bccs 515be <_Heap_Get_free_information+0x3e> info->largest = the_size; 515ba: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 515be: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 515c2: b1cb cmpal %a3,%a0 515c4: 6708 beqs 515ce <_Heap_Get_free_information+0x4e> 515c6: 242a 0004 movel %a2@(4),%d2 515ca: 2243 moveal %d3,%a1 515cc: 60dc bras 515aa <_Heap_Get_free_information+0x2a> 515ce: 2489 movel %a1,%a2@ 515d0: 2541 0008 movel %d1,%a2@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 515d4: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 515d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cfb4 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4cfb4: 4e56 fff0 linkw %fp,#-16 4cfb8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4cfbc: 246e 0008 moveal %fp@(8),%a2 4cfc0: 282e 000c movel %fp@(12),%d4 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); 4cfc4: 2044 moveal %d4,%a0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 4cfc6: 226a 0020 moveal %a2@(32),%a1 Heap_Block *const end = the_heap->last_block; 4cfca: 242a 0024 movel %a2@(36),%d2 memset(the_info, 0, sizeof(*the_info)); 4cfce: 4298 clrl %a0@+ 4cfd0: 4298 clrl %a0@+ 4cfd2: 4298 clrl %a0@+ 4cfd4: 4298 clrl %a0@+ 4cfd6: 4298 clrl %a0@+ 4cfd8: 4290 clrl %a0@ while ( the_block != end ) { 4cfda: b489 cmpl %a1,%d2 4cfdc: 6734 beqs 4d012 <_Heap_Get_information+0x5e> <== NEVER TAKEN uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4cfde: 2604 movel %d4,%d3 4cfe0: 0683 0000 000c addil #12,%d3 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4cfe6: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cfea: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4cfec: 2043 moveal %d3,%a0 4cfee: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cff0: d3c0 addal %d0,%a1 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4cff2: 2229 0004 movel %a1@(4),%d1 while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 4cff6: 0801 0000 btst #0,%d1 4cffa: 6602 bnes 4cffe <_Heap_Get_information+0x4a> info = &the_info->Used; else info = &the_info->Free; 4cffc: 2044 moveal %d4,%a0 info->number++; 4cffe: 5290 addql #1,%a0@ info->total += the_size; 4d000: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 4d004: b0a8 0004 cmpl %a0@(4),%d0 4d008: 6304 blss 4d00e <_Heap_Get_information+0x5a> info->largest = the_size; 4d00a: 2140 0004 movel %d0,%a0@(4) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d00e: b3c2 cmpal %d2,%a1 4d010: 66d8 bnes 4cfea <_Heap_Get_information+0x36> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d012: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4d016: 4e5e unlk %fp ... =============================================================================== 0005c188 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5c188: 4e56 0000 linkw %fp,#0 5c18c: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5c190: 2040 moveal %d0,%a0 5c192: 5188 subql #8,%a0 5c194: 226e 0008 moveal %fp@(8),%a1 5c198: 2f02 movel %d2,%sp@- 5c19a: 2400 movel %d0,%d2 5c19c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5c1a2: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5c1a4: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c1a8: b288 cmpl %a0,%d1 5c1aa: 6238 bhis 5c1e4 <_Heap_Size_of_alloc_area+0x5c> 5c1ac: 2269 0024 moveal %a1@(36),%a1 5c1b0: b3c8 cmpal %a0,%a1 5c1b2: 6530 bcss 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 5c1b4: 74fe moveq #-2,%d2 5c1b6: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5c1ba: 41f0 2800 lea %a0@(00000000,%d2:l),%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5c1be: b1c1 cmpal %d1,%a0 5c1c0: 6522 bcss 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN 5c1c2: b1c9 cmpal %a1,%a0 5c1c4: 621e bhis 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 5c1c6: 7201 moveq #1,%d1 5c1c8: c2a8 0004 andl %a0@(4),%d1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5c1cc: 6716 beqs 5c1e4 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c1ce: 7204 moveq #4,%d1 5c1d0: 9280 subl %d0,%d1 5c1d2: 2001 movel %d1,%d0 5c1d4: d088 addl %a0,%d0 5c1d6: 226e 0010 moveal %fp@(16),%a1 return true; } 5c1da: 241f movel %sp@+,%d2 5c1dc: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5c1de: 2280 movel %d0,%a1@ return true; 5c1e0: 7001 moveq #1,%d0 } 5c1e2: 4e75 rts 5c1e4: 241f movel %sp@+,%d2 5c1e6: 4e5e unlk %fp if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5c1e8: 4200 clrb %d0 <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } =============================================================================== 000485f2 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 485f2: 4e56 ffc4 linkw %fp,#-60 485f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 485fa: 246e 0008 moveal %fp@(8),%a2 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; 485fe: 4bfa ff94 lea %pc@(48594 <_Heap_Walk_print_nothing>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 48602: 2a2e 000c movel %fp@(12),%d5 uintptr_t const page_size = heap->page_size; 48606: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 4860a: 2c2a 0014 movel %a2@(20),%d6 Heap_Block *const first_block = heap->first_block; 4860e: 282a 0020 movel %a2@(32),%d4 Heap_Block *const last_block = heap->last_block; 48612: 2e2a 0024 movel %a2@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 48616: 4a2e 0013 tstb %fp@(19) 4861a: 6704 beqs 48620 <_Heap_Walk+0x2e> 4861c: 4bfa ff7e lea %pc@(4859c <_Heap_Walk_print>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 48620: 7003 moveq #3,%d0 48622: b0b9 0006 1c50 cmpl 61c50 <_System_state_Current>,%d0 48628: 670c beqs 48636 <_Heap_Walk+0x44> block = next_block; } while ( block != first_block ); return true; } 4862a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 48630: 7001 moveq #1,%d0 } 48632: 4e5e unlk %fp 48634: 4e75 rts 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)( 48636: 2f2a 000c movel %a2@(12),%sp@- 4863a: 2f2a 0008 movel %a2@(8),%sp@- 4863e: 2f07 movel %d7,%sp@- 48640: 2f04 movel %d4,%sp@- 48642: 2f2a 001c movel %a2@(28),%sp@- 48646: 2f2a 0018 movel %a2@(24),%sp@- 4864a: 2f06 movel %d6,%sp@- 4864c: 2f03 movel %d3,%sp@- 4864e: 4879 0005 e117 pea 5e117 <_Status_Object_name_errors_to_status+0x5d> 48654: 42a7 clrl %sp@- 48656: 2f05 movel %d5,%sp@- 48658: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 4865a: 4fef 002c lea %sp@(44),%sp 4865e: 4a83 tstl %d3 48660: 6700 0082 beqw 486e4 <_Heap_Walk+0xf2> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 48664: 7003 moveq #3,%d0 48666: c083 andl %d3,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 48668: 6600 0090 bnew 486fa <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4866c: 2206 movel %d6,%d1 4866e: 4c43 1000 remul %d3,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 48672: 4a80 tstl %d0 48674: 6600 00a4 bnew 4871a <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 48678: 2004 movel %d4,%d0 4867a: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 4867c: 4c43 0001 remul %d3,%d1,%d0 ); return false; } if ( 48680: 4a81 tstl %d1 48682: 6600 00ae bnew 48732 <_Heap_Walk+0x140> block = next_block; } while ( block != first_block ); return true; } 48686: 2044 moveal %d4,%a0 48688: 2228 0004 movel %a0@(4),%d1 4868c: 2d41 fff0 movel %d1,%fp@(-16) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 48690: 0801 0000 btst #0,%d1 48694: 6700 00b4 beqw 4874a <_Heap_Walk+0x158> - 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; 48698: 2047 moveal %d7,%a0 4869a: 72fe moveq #-2,%d1 4869c: 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); 486a0: d1c1 addal %d1,%a0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 486a2: 7201 moveq #1,%d1 486a4: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 486a8: 6724 beqs 486ce <_Heap_Walk+0xdc> ); return false; } if ( 486aa: b1c4 cmpal %d4,%a0 486ac: 6700 00b4 beqw 48762 <_Heap_Walk+0x170> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 486b0: 4879 0005 e271 pea 5e271 <_Status_Object_name_errors_to_status+0x1b7> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486b6: 4878 0001 pea 1 486ba: 2f05 movel %d5,%sp@- 486bc: 4e95 jsr %a5@ 486be: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486c2: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 486c4: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 486ca: 4e5e unlk %fp 486cc: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 486ce: 4879 0005 e25c pea 5e25c <_Status_Object_name_errors_to_status+0x1a2> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486d4: 4878 0001 pea 1 486d8: 2f05 movel %d5,%sp@- 486da: 4e95 jsr %a5@ 486dc: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486e0: 4200 clrb %d0 486e2: 60e0 bras 486c4 <_Heap_Walk+0xd2> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 486e4: 4879 0005 e1a8 pea 5e1a8 <_Status_Object_name_errors_to_status+0xee> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 486ea: 4878 0001 pea 1 486ee: 2f05 movel %d5,%sp@- 486f0: 4e95 jsr %a5@ 486f2: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 486f6: 4200 clrb %d0 486f8: 60ca bras 486c4 <_Heap_Walk+0xd2> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 486fa: 2f03 movel %d3,%sp@- 486fc: 4879 0005 e1bb pea 5e1bb <_Status_Object_name_errors_to_status+0x101> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48702: 4878 0001 pea 1 48706: 2f05 movel %d5,%sp@- 48708: 4e95 jsr %a5@ 4870a: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4870e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48710: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48716: 4e5e unlk %fp 48718: 4e75 rts return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 4871a: 2f06 movel %d6,%sp@- 4871c: 4879 0005 e1d9 pea 5e1d9 <_Status_Object_name_errors_to_status+0x11f> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48722: 4878 0001 pea 1 48726: 2f05 movel %d5,%sp@- 48728: 4e95 jsr %a5@ 4872a: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4872e: 4200 clrb %d0 48730: 60de bras 48710 <_Heap_Walk+0x11e> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 48732: 2f04 movel %d4,%sp@- 48734: 4879 0005 e1fd pea 5e1fd <_Status_Object_name_errors_to_status+0x143> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 4873a: 4878 0001 pea 1 4873e: 2f05 movel %d5,%sp@- 48740: 4e95 jsr %a5@ 48742: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48746: 4200 clrb %d0 48748: 60c6 bras 48710 <_Heap_Walk+0x11e> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4874a: 4879 0005 e22e pea 5e22e <_Status_Object_name_errors_to_status+0x174> 48750: 4878 0001 pea 1 48754: 2f05 movel %d5,%sp@- 48756: 4e95 jsr %a5@ 48758: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4875c: 4200 clrb %d0 4875e: 6000 ff64 braw 486c4 <_Heap_Walk+0xd2> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 48762: 202a 0010 movel %a2@(16),%d0 return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 48766: 206a 0008 moveal %a2@(8),%a0 4876a: 2d40 fffc movel %d0,%fp@(-4) 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 ) { 4876e: b1ca cmpal %a2,%a0 48770: 6700 0316 beqw 48a88 <_Heap_Walk+0x496> block = next_block; } while ( block != first_block ); return true; } 48774: 242a 0020 movel %a2@(32),%d2 48778: 2d42 fff4 movel %d2,%fp@(-12) 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; 4877c: b1c2 cmpal %d2,%a0 4877e: 6500 0090 bcsw 48810 <_Heap_Walk+0x21e> 48782: 266a 0024 moveal %a2@(36),%a3 48786: b7c8 cmpal %a0,%a3 48788: 6500 0086 bcsw 48810 <_Heap_Walk+0x21e> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4878c: 49e8 0008 lea %a0@(8),%a4 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48790: 200c movel %a4,%d0 48792: 222e fffc movel %fp@(-4),%d1 48796: 4c41 0002 remul %d1,%d2,%d0 ); return false; } if ( 4879a: 4a82 tstl %d2 4879c: 6600 00ae bnew 4884c <_Heap_Walk+0x25a> - 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; 487a0: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 487a2: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487a4: c4a8 0004 andl %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 487a8: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487ac: 6648 bnes 487f6 <_Heap_Walk+0x204> <== NEVER TAKEN 487ae: 222e fff4 movel %fp@(-12),%d1 487b2: 224a moveal %a2,%a1 487b4: 2848 moveal %a0,%a4 487b6: 2d43 fff8 movel %d3,%fp@(-8) ); return false; } if ( free_block->prev != prev_block ) { 487ba: 2428 000c movel %a0@(12),%d2 487be: b3c2 cmpal %d2,%a1 487c0: 6668 bnes 4882a <_Heap_Walk+0x238> <== NEVER TAKEN return false; } prev_block = free_block; free_block = free_block->next; 487c2: 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 ) { 487c6: b1ca cmpal %a2,%a0 487c8: 6700 009c beqw 48866 <_Heap_Walk+0x274> 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; 487cc: b288 cmpl %a0,%d1 487ce: 6240 bhis 48810 <_Heap_Walk+0x21e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 487d0: 2408 movel %a0,%d2 487d2: 5082 addql #8,%d2 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; 487d4: b7c8 cmpal %a0,%a3 487d6: 6538 bcss 48810 <_Heap_Walk+0x21e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 487d8: 202e fffc movel %fp@(-4),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487dc: 224c moveal %a4,%a1 487de: 2848 moveal %a0,%a4 487e0: 4c40 2003 remul %d0,%d3,%d2 ); return false; } if ( 487e4: 4a83 tstl %d3 487e6: 6664 bnes 4884c <_Heap_Walk+0x25a> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487e8: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 487ea: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487ec: c4a8 0004 andl %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 487f0: c0b0 2804 andl %a0@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487f4: 67c4 beqs 487ba <_Heap_Walk+0x1c8> (*printer)( 487f6: 2f08 movel %a0,%sp@- 487f8: 4879 0005 e2f0 pea 5e2f0 <_Status_Object_name_errors_to_status+0x236> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 487fe: 4878 0001 pea 1 48802: 2f05 movel %d5,%sp@- 48804: 4e95 jsr %a5@ 48806: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4880a: 4200 clrb %d0 4880c: 6000 ff02 braw 48710 <_Heap_Walk+0x11e> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48810: 2f08 movel %a0,%sp@- 48812: 4879 0005 e2a0 pea 5e2a0 <_Status_Object_name_errors_to_status+0x1e6> 48818: 4878 0001 pea 1 4881c: 2f05 movel %d5,%sp@- 4881e: 4e95 jsr %a5@ 48820: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48824: 4200 clrb %d0 48826: 6000 fee8 braw 48710 <_Heap_Walk+0x11e> return false; } if ( free_block->prev != prev_block ) { (*printer)( 4882a: 2f02 movel %d2,%sp@- 4882c: 2f08 movel %a0,%sp@- 4882e: 4879 0005 e30c pea 5e30c <_Status_Object_name_errors_to_status+0x252> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48834: 4878 0001 pea 1 48838: 2f05 movel %d5,%sp@- 4883a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4883c: 4fef 0014 lea %sp@(20),%sp 48840: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48842: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48848: 4e5e unlk %fp 4884a: 4e75 rts } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 4884c: 2f08 movel %a0,%sp@- 4884e: 4879 0005 e2c0 pea 5e2c0 <_Status_Object_name_errors_to_status+0x206> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48854: 4878 0001 pea 1 48858: 2f05 movel %d5,%sp@- 4885a: 4e95 jsr %a5@ 4885c: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48860: 4200 clrb %d0 48862: 6000 feac braw 48710 <_Heap_Walk+0x11e> 48866: 262e fff8 movel %fp@(-8),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4886a: 2844 moveal %d4,%a4 4886c: 2d41 fff4 movel %d1,%fp@(-12) 48870: 222e fff4 movel %fp@(-12),%d1 48874: 2d43 fffc movel %d3,%fp@(-4) 48878: 262e fff0 movel %fp@(-16),%d3 4887c: 2d47 ffec movel %d7,%fp@(-20) - 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; 48880: 74fe moveq #-2,%d2 48882: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 48884: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 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; 48888: b7c1 cmpal %d1,%a3 4888a: 657e bcss 4890a <_Heap_Walk+0x318> <== NEVER TAKEN 4888c: b7ea 0024 cmpal %a2@(36),%a3 48890: 6278 bhis 4890a <_Heap_Walk+0x318> 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; 48892: b9ee ffec cmpal %fp@(-20),%a4 48896: 56c1 sne %d1 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48898: 202e fffc movel %fp@(-4),%d0 4889c: 2e02 movel %d2,%d7 4889e: 3241 moveaw %d1,%a1 488a0: 4c40 7001 remul %d0,%d1,%d7 488a4: 2009 movel %a1,%d0 488a6: 4480 negl %d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 488a8: 4a81 tstl %d1 488aa: 6704 beqs 488b0 <_Heap_Walk+0x2be> 488ac: 4a00 tstb %d0 488ae: 6676 bnes 48926 <_Heap_Walk+0x334> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 488b0: b486 cmpl %d6,%d2 488b2: 6406 bccs 488ba <_Heap_Walk+0x2c8> 488b4: 4a00 tstb %d0 488b6: 6600 008a bnew 48942 <_Heap_Walk+0x350> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 488ba: b7cc cmpal %a4,%a3 488bc: 6206 bhis 488c4 <_Heap_Walk+0x2d2> 488be: 4a00 tstb %d0 488c0: 6600 00a4 bnew 48966 <_Heap_Walk+0x374> 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; 488c4: 7001 moveq #1,%d0 488c6: 7e01 moveq #1,%d7 488c8: c0ab 0004 andl %a3@(4),%d0 488cc: c687 andl %d7,%d3 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 488ce: 4a80 tstl %d0 488d0: 6700 00ca beqw 4899c <_Heap_Walk+0x3aa> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 488d4: 4a83 tstl %d3 488d6: 6700 00aa beqw 48982 <_Heap_Walk+0x390> (*printer)( 488da: 2f02 movel %d2,%sp@- 488dc: 2f0c movel %a4,%sp@- 488de: 4879 0005 e495 pea 5e495 <_Status_Object_name_errors_to_status+0x3db> 488e4: 42a7 clrl %sp@- 488e6: 2f05 movel %d5,%sp@- 488e8: 4e95 jsr %a5@ 488ea: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 488ee: b7c4 cmpal %d4,%a3 488f0: 6700 fd38 beqw 4862a <_Heap_Walk+0x38> 488f4: 262b 0004 movel %a3@(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; 488f8: 74fe moveq #-2,%d2 488fa: 284b moveal %a3,%a4 488fc: c483 andl %d3,%d2 488fe: 222a 0020 movel %a2@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 48902: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 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; 48906: b7c1 cmpal %d1,%a3 48908: 6482 bccs 4888c <_Heap_Walk+0x29a> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 4890a: 2f0b movel %a3,%sp@- 4890c: 2f0c movel %a4,%sp@- 4890e: 4879 0005 e33e pea 5e33e <_Status_Object_name_errors_to_status+0x284> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48914: 4878 0001 pea 1 48918: 2f05 movel %d5,%sp@- 4891a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4891c: 4fef 0014 lea %sp@(20),%sp 48920: 4200 clrb %d0 48922: 6000 ff1e braw 48842 <_Heap_Walk+0x250> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 48926: 2f02 movel %d2,%sp@- 48928: 2f0c movel %a4,%sp@- 4892a: 4879 0005 e36b pea 5e36b <_Status_Object_name_errors_to_status+0x2b1> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48930: 4878 0001 pea 1 48934: 2f05 movel %d5,%sp@- 48936: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48938: 4fef 0014 lea %sp@(20),%sp 4893c: 4200 clrb %d0 4893e: 6000 ff02 braw 48842 <_Heap_Walk+0x250> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 48942: 2f06 movel %d6,%sp@- 48944: 2f02 movel %d2,%sp@- 48946: 2f0c movel %a4,%sp@- 48948: 4879 0005 e399 pea 5e399 <_Status_Object_name_errors_to_status+0x2df> 4894e: 4878 0001 pea 1 48952: 2f05 movel %d5,%sp@- 48954: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 48956: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 4895a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 48960: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48962: 4e5e unlk %fp 48964: 4e75 rts return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48966: 2f0b movel %a3,%sp@- 48968: 2f0c movel %a4,%sp@- 4896a: 4879 0005 e3c4 pea 5e3c4 <_Status_Object_name_errors_to_status+0x30a> 48970: 4878 0001 pea 1 48974: 2f05 movel %d5,%sp@- 48976: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48978: 4fef 0014 lea %sp@(20),%sp 4897c: 4200 clrb %d0 4897e: 6000 fec2 braw 48842 <_Heap_Walk+0x250> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 48982: 2f14 movel %a4@,%sp@- 48984: 2f02 movel %d2,%sp@- 48986: 2f0c movel %a4,%sp@- 48988: 4879 0005 e4ac pea 5e4ac <_Status_Object_name_errors_to_status+0x3f2> 4898e: 42a7 clrl %sp@- 48990: 2f05 movel %d5,%sp@- 48992: 4e95 jsr %a5@ 48994: 4fef 0018 lea %sp@(24),%sp 48998: 6000 ff54 braw 488ee <_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; 4899c: 2e2a 0008 movel %a2@(8),%d7 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)( 489a0: 43f9 0005 e0e4 lea 5e0e4 <_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 ? 489a6: 222c 0008 movel %a4@(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)( 489aa: b2aa 000c cmpl %a2@(12),%d1 489ae: 670a beqs 489ba <_Heap_Walk+0x3c8> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 489b0: 43f9 0005 e030 lea 5e030 ,%a1 489b6: b28a cmpl %a2,%d1 489b8: 676c beqs 48a26 <_Heap_Walk+0x434> 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 ? 489ba: 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)( 489be: 41f9 0005 e0fd lea 5e0fd <_Status_Object_name_errors_to_status+0x43>,%a0 489c4: b087 cmpl %d7,%d0 489c6: 670a beqs 489d2 <_Heap_Walk+0x3e0> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 489c8: 41f9 0005 e030 lea 5e030 ,%a0 489ce: b08a cmpl %a2,%d0 489d0: 674c beqs 48a1e <_Heap_Walk+0x42c> 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)( 489d2: 2f09 movel %a1,%sp@- 489d4: 2f01 movel %d1,%sp@- 489d6: 2f08 movel %a0,%sp@- 489d8: 2f00 movel %d0,%sp@- 489da: 2f02 movel %d2,%sp@- 489dc: 2f0c movel %a4,%sp@- 489de: 4879 0005 e3f8 pea 5e3f8 <_Status_Object_name_errors_to_status+0x33e> 489e4: 42a7 clrl %sp@- 489e6: 2f05 movel %d5,%sp@- 489e8: 4e95 jsr %a5@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 489ea: 2213 movel %a3@,%d1 489ec: 4fef 0024 lea %sp@(36),%sp 489f0: b282 cmpl %d2,%d1 489f2: 663a bnes 48a2e <_Heap_Walk+0x43c> ); return false; } if ( !prev_used ) { 489f4: 4a83 tstl %d3 489f6: 6776 beqs 48a6e <_Heap_Walk+0x47c> 489f8: 206a 0008 moveal %a2@(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 ) { 489fc: b1ca cmpal %a2,%a0 489fe: 6754 beqs 48a54 <_Heap_Walk+0x462> <== NEVER TAKEN if ( free_block == block ) { 48a00: b1cc cmpal %a4,%a0 48a02: 6700 feea beqw 488ee <_Heap_Walk+0x2fc> 48a06: 2e2e ffec movel %fp@(-20),%d7 return true; } free_block = free_block->next; 48a0a: 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 ) { 48a0e: b1ca cmpal %a2,%a0 48a10: 6742 beqs 48a54 <_Heap_Walk+0x462> if ( free_block == block ) { 48a12: b1cc cmpal %a4,%a0 48a14: 66f4 bnes 48a0a <_Heap_Walk+0x418> 48a16: 2d47 ffec movel %d7,%fp@(-20) 48a1a: 6000 fed2 braw 488ee <_Heap_Walk+0x2fc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48a1e: 41f9 0005 e10d lea 5e10d <_Status_Object_name_errors_to_status+0x53>,%a0 48a24: 60ac bras 489d2 <_Heap_Walk+0x3e0> block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48a26: 43f9 0005 e0f3 lea 5e0f3 <_Status_Object_name_errors_to_status+0x39>,%a1 48a2c: 608c bras 489ba <_Heap_Walk+0x3c8> ); if ( block_size != next_block->prev_size ) { (*printer)( 48a2e: 2f0b movel %a3,%sp@- 48a30: 2f01 movel %d1,%sp@- 48a32: 2f02 movel %d2,%sp@- 48a34: 2f0c movel %a4,%sp@- 48a36: 4879 0005 e42d pea 5e42d <_Status_Object_name_errors_to_status+0x373> 48a3c: 4878 0001 pea 1 48a40: 2f05 movel %d5,%sp@- 48a42: 4e95 jsr %a5@ 48a44: 4fef 001c lea %sp@(28),%sp block = next_block; } while ( block != first_block ); return true; } 48a48: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 48a4e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48a50: 4e5e unlk %fp 48a52: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48a54: 2f0c movel %a4,%sp@- 48a56: 4879 0005 e4d1 pea 5e4d1 <_Status_Object_name_errors_to_status+0x417> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48a5c: 4878 0001 pea 1 48a60: 2f05 movel %d5,%sp@- 48a62: 4e95 jsr %a5@ 48a64: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48a68: 4200 clrb %d0 48a6a: 6000 fca4 braw 48710 <_Heap_Walk+0x11e> return false; } if ( !prev_used ) { (*printer)( 48a6e: 2f0c movel %a4,%sp@- 48a70: 4879 0005 e466 pea 5e466 <_Status_Object_name_errors_to_status+0x3ac> const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48a76: 4878 0001 pea 1 48a7a: 2f05 movel %d5,%sp@- 48a7c: 4e95 jsr %a5@ 48a7e: 4fef 0010 lea %sp@(16),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48a82: 4200 clrb %d0 48a84: 6000 fc8a braw 48710 <_Heap_Walk+0x11e> 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 ) { 48a88: 222a 0020 movel %a2@(32),%d1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48a8c: 2844 moveal %d4,%a4 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 ) { 48a8e: 2d41 fff4 movel %d1,%fp@(-12) 48a92: 222e fff4 movel %fp@(-12),%d1 48a96: 2d43 fffc movel %d3,%fp@(-4) 48a9a: 262e fff0 movel %fp@(-16),%d3 48a9e: 2d47 ffec movel %d7,%fp@(-20) 48aa2: 6000 fddc braw 48880 <_Heap_Walk+0x28e> ... =============================================================================== 000472f6 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 472f6: 4e56 0000 linkw %fp,#0 472fa: 2f0a movel %a2,%sp@- 472fc: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 472fe: 4ab9 0005 fb44 tstl 5fb44 <_IO_Number_of_drivers> 47304: 671e beqs 47324 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 47306: 4282 clrl %d2 47308: 45f9 0004 c1ec lea 4c1ec ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 4730e: 42a7 clrl %sp@- 47310: 42a7 clrl %sp@- 47312: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47314: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 47316: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 47318: 4fef 000c lea %sp@(12),%sp 4731c: b4b9 0005 fb44 cmpl 5fb44 <_IO_Number_of_drivers>,%d2 47322: 65ea bcss 4730e <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 47324: 242e fff8 movel %fp@(-8),%d2 47328: 246e fffc moveal %fp@(-4),%a2 4732c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004725c <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 4725c: 4e56 fff0 linkw %fp,#-16 47260: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 47264: 2639 0005 e00e movel 5e00e ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 4726a: 2439 0005 e00a movel 5e00a ,%d2 number_of_drivers = Configuration.maximum_drivers; 47270: 2839 0005 e006 movel 5e006 ,%d4 /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 47276: b882 cmpl %d2,%d4 47278: 6366 blss 472e0 <_IO_Manager_initialization+0x84> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 4727a: 2004 movel %d4,%d0 4727c: 2a04 movel %d4,%d5 4727e: e788 lsll #3,%d0 47280: eb8d lsll #5,%d5 47282: 9a80 subl %d0,%d5 47284: 2f05 movel %d5,%sp@- 47286: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 4728c: 2f05 movel %d5,%sp@- 4728e: 42a7 clrl %sp@- /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 47290: 23c0 0005 fb48 movel %d0,5fb48 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 47296: 2f00 movel %d0,%sp@- _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 47298: 23c4 0005 fb44 movel %d4,5fb44 <_IO_Number_of_drivers> memset( 4729e: 4eb9 0004 e914 jsr 4e914 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472a4: 4fef 0010 lea %sp@(16),%sp 472a8: 4a82 tstl %d2 472aa: 672a beqs 472d6 <_IO_Manager_initialization+0x7a><== NEVER TAKEN 472ac: 2839 0005 fb48 movel 5fb48 <_IO_Driver_address_table>,%d4 472b2: 4280 clrl %d0 472b4: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 472b6: 2243 moveal %d3,%a1 472b8: 2044 moveal %d4,%a0 472ba: d3c0 addal %d0,%a1 472bc: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472be: 5281 addql #1,%d1 472c0: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 472c6: 20d9 movel %a1@+,%a0@+ 472c8: 20d9 movel %a1@+,%a0@+ 472ca: 20d9 movel %a1@+,%a0@+ 472cc: 20d9 movel %a1@+,%a0@+ 472ce: 20d9 movel %a1@+,%a0@+ 472d0: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 472d2: b481 cmpl %d1,%d2 472d4: 66e0 bnes 472b6 <_IO_Manager_initialization+0x5a> _IO_Driver_address_table[index] = driver_table[index]; } 472d6: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472dc: 4e5e unlk %fp 472de: 4e75 rts * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 472e0: 23c3 0005 fb48 movel %d3,5fb48 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 472e6: 23c2 0005 fb44 movel %d2,5fb44 <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 472ec: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 472f2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047e70 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47e70: 4e56 fffc linkw %fp,#-4 47e74: 206e 0010 moveal %fp@(16),%a0 47e78: 2f02 movel %d2,%sp@- 47e7a: 222e 000c movel %fp@(12),%d1 _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 ); 47e7e: 4282 clrl %d2 47e80: 1401 moveb %d1,%d2 47e82: 2242 moveal %d2,%a1 47e84: 2f08 movel %a0,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47e86: 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 ); 47e8a: 2f09 movel %a1,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 47e8c: 13c1 0005 f9d2 moveb %d1,5f9d2 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47e92: 2d48 fffc movel %a0,%fp@(-4) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47e96: 23c0 0005 f9ce movel %d0,5f9ce <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47e9c: 23c8 0005 f9d4 movel %a0,5f9d4 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47ea2: 2f00 movel %d0,%sp@- 47ea4: 4eb9 0004 9d7e jsr 49d7e <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47eaa: 206e fffc moveal %fp@(-4),%a0 47eae: 327c 0700 moveaw #1792,%a1 47eb2: 2409 movel %a1,%d2 47eb4: 40c0 movew %sr,%d0 47eb6: 8082 orl %d2,%d0 47eb8: 46c0 movew %d0,%sr 47eba: 2008 movel %a0,%d0 <== NOT EXECUTED 47ebc: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47ec2: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47ec4: 7005 moveq #5,%d0 47ec6: 4fef 000c lea %sp@(12),%sp 47eca: 23c0 0005 fa78 movel %d0,5fa78 <_System_state_Current> 47ed0: 60fe bras 47ed0 <_Internal_error_Occurred+0x60> ... =============================================================================== 00047f34 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47f34: 4e56 fff0 linkw %fp,#-16 47f38: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47f3c: 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 ) 47f40: 4aaa 0014 tstl %a2@(20) 47f44: 6756 beqs 47f9c <_Objects_Allocate+0x68> <== 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 ); 47f46: 240a movel %a2,%d2 47f48: 0682 0000 001c addil #28,%d2 47f4e: 47f9 0004 757c lea 4757c <_Chain_Get>,%a3 47f54: 2f02 movel %d2,%sp@- 47f56: 4e93 jsr %a3@ if ( information->auto_extend ) { 47f58: 588f addql #4,%sp 47f5a: 4a2a 0010 tstb %a2@(16) 47f5e: 6732 beqs 47f92 <_Objects_Allocate+0x5e> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47f60: 4a80 tstl %d0 47f62: 6744 beqs 47fa8 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f64: 2040 moveal %d0,%a0 47f66: 4281 clrl %d1 47f68: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f6a: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f6c: 3228 000a movew %a0@(10),%d1 47f70: 362a 0008 movew %a2@(8),%d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f74: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 47f78: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47f7c: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47f7e: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 47f82: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47f86: e589 lsll #2,%d1 information->inactive--; 47f88: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47f8a: d1c1 addal %d1,%a0 47f8c: 5390 subql #1,%a0@ information->inactive--; 47f8e: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 47f92: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47f98: 4e5e unlk %fp 47f9a: 4e75 rts * 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; 47f9c: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 47f9e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 47fa4: 4e5e unlk %fp <== NOT EXECUTED 47fa6: 4e75 rts <== NOT EXECUTED * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47fa8: 2f0a movel %a2,%sp@- 47faa: 4eb9 0004 7fec jsr 47fec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47fb0: 2f02 movel %d2,%sp@- 47fb2: 4e93 jsr %a3@ } if ( the_object ) { 47fb4: 508f addql #8,%sp 47fb6: 4a80 tstl %d0 47fb8: 66aa bnes 47f64 <_Objects_Allocate+0x30> ); } #endif return the_object; } 47fba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47fc0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047fc4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47fc4: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47fc6: 4e56 0000 linkw %fp,#0 47fca: 206e 0008 moveal %fp@(8),%a0 47fce: 226e 000c moveal %fp@(12),%a1 47fd2: 2f0a movel %a2,%sp@- 47fd4: 2468 0018 moveal %a0@(24),%a2 47fd8: 3029 000a movew %a1@(10),%d0 47fdc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 47fe0: 245f moveal %sp@+,%a2 47fe2: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47fe4: 4ef9 0004 854c jmp 4854c <_Objects_Namespace_remove> ... =============================================================================== 00047fec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47fec: 4e56 ffcc linkw %fp,#-52 47ff0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47ff4: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ff8: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47ffa: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ffe: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48002: 4a88 tstl %a0 48004: 6700 0232 beqw 48238 <_Objects_Extend_information+0x24c> block_count = 0; else { block_count = information->maximum / information->allocation_size; 48008: 322a 000e movew %a2@(14),%d1 4800c: 302a 0012 movew %a2@(18),%d0 48010: 3801 movew %d1,%d4 48012: 0284 0000 ffff andil #65535,%d4 48018: 88c0 divuw %d0,%d4 4801a: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 48020: 6700 022c beqw 4824e <_Objects_Extend_information+0x262> if ( information->object_blocks[ block ] == NULL ) { 48024: 4a90 tstl %a0@ 48026: 6700 0236 beqw 4825e <_Objects_Extend_information+0x272> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 4802a: 5888 addql #4,%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 4802c: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 4802e: 4282 clrl %d2 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 48030: 0280 0000 ffff andil #65535,%d0 do_extend = false; break; } else index_base += information->allocation_size; 48036: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48038: 5282 addql #1,%d2 4803a: b484 cmpl %d4,%d2 4803c: 6400 01a6 bccw 481e4 <_Objects_Extend_information+0x1f8> if ( information->object_blocks[ block ] == NULL ) { 48040: 4a98 tstl %a0@+ 48042: 66f2 bnes 48036 <_Objects_Extend_information+0x4a> do_extend = false; 48044: 4207 clrb %d7 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 48046: 0281 0000 ffff andil #65535,%d1 4804c: 2641 moveal %d1,%a3 4804e: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 48050: b7fc 0000 ffff cmpal #65535,%a3 48056: 6200 0182 bhiw 481da <_Objects_Extend_information+0x1ee> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 4805a: 41ea 0014 lea %a2@(20),%a0 4805e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 48062: 4a2a 0010 tstb %a2@(16) 48066: 6700 0182 beqw 481ea <_Objects_Extend_information+0x1fe> new_object_block = _Workspace_Allocate( block_size ); 4806a: 2f00 movel %d0,%sp@- 4806c: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !new_object_block ) 48072: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 48074: 2c00 movel %d0,%d6 if ( !new_object_block ) 48076: 6700 0162 beqw 481da <_Objects_Extend_information+0x1ee> } /* * Do we need to grow the tables? */ if ( do_extend ) { 4807a: 4a07 tstb %d7 4807c: 6700 00be beqw 4813c <_Objects_Extend_information+0x150> */ /* * Up the block count and maximum */ block_count++; 48080: 2a44 moveal %d4,%a5 48082: 528d addql #1,%a5 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); 48084: 200b movel %a3,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 48086: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 4808a: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 4808c: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 4808e: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 48090: 2f00 movel %d0,%sp@- 48092: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !object_blocks ) { 48098: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 4809a: 2840 moveal %d0,%a4 if ( !object_blocks ) { 4809c: 4a80 tstl %d0 4809e: 6700 01ce beqw 4826e <_Objects_Extend_information+0x282> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480a2: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 480a4: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 480a6: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 480a8: 302a 000e movew %a2@(14),%d0 480ac: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 480b0: de8d addl %a5,%d7 480b2: b085 cmpl %d5,%d0 480b4: 6200 0144 bhiw 481fa <_Objects_Extend_information+0x20e> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 480b8: 4a85 tstl %d5 480ba: 670c beqs 480c8 <_Objects_Extend_information+0xdc><== NEVER TAKEN 480bc: 2047 moveal %d7,%a0 480be: 4280 clrl %d0 local_table[ index ] = NULL; 480c0: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 480c2: 5280 addql #1,%d0 480c4: b085 cmpl %d5,%d0 480c6: 65f8 bcss 480c0 <_Objects_Extend_information+0xd4><== NEVER TAKEN 480c8: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 480ca: 4281 clrl %d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 480cc: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 480d0: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 480d4: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 480d8: d283 addl %d3,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 480da: b283 cmpl %d3,%d1 480dc: 6310 blss 480ee <_Objects_Extend_information+0x102><== NEVER TAKEN 480de: 2247 moveal %d7,%a1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 480e0: 2003 movel %d3,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 480e2: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 480e6: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 480e8: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 480ea: b081 cmpl %d1,%d0 480ec: 65f8 bcss 480e6 <_Objects_Extend_information+0xfa> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 480ee: 203c 0000 0700 movel #1792,%d0 480f4: 40c4 movew %sr,%d4 480f6: 8084 orl %d4,%d0 480f8: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 480fa: 2012 movel %a2@,%d0 480fc: 7a18 moveq #24,%d5 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 480fe: 4281 clrl %d1 48100: eba8 lsll %d5,%d0 48102: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 48106: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4810a: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 4810e: eba9 lsll %d5,%d1 48110: 4285 clrl %d5 48112: 8081 orl %d1,%d0 48114: 3a0b movew %a3,%d5 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 48116: 206a 002e moveal %a2@(46),%a0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4811a: 8085 orl %d5,%d0 information->object_blocks = object_blocks; 4811c: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 48120: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 48124: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; 48128: 2547 0018 movel %d7,%a2@(24) 4812c: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 48130: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 48132: 2f08 movel %a0,%sp@- 48134: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> 4813a: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4813c: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48140: 4280 clrl %d0 48142: 280e movel %fp,%d4 48144: 0684 ffff fff4 addil #-12,%d4 4814a: 47f9 0004 757c lea 4757c <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 48150: 2a0a movel %a2,%d5 48152: 0685 0000 001c addil #28,%d5 48158: 49f9 0004 751c lea 4751c <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 4815e: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48160: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 48164: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 48168: 2f2a 0014 movel %a2@(20),%sp@- 4816c: 206a 002e moveal %a2@(46),%a0 48170: 2f00 movel %d0,%sp@- 48172: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48176: 2f04 movel %d4,%sp@- 48178: 4eb9 0004 c234 jsr 4c234 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 4817e: 4fef 0010 lea %sp@(16),%sp 48182: 2f04 movel %d4,%sp@- 48184: 4e93 jsr %a3@ 48186: 588f addql #4,%sp 48188: 4a80 tstl %d0 4818a: 6734 beqs 481c0 <_Objects_Extend_information+0x1d4><== NEVER TAKEN 4818c: 2212 movel %a2@,%d1 4818e: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 48190: 4286 clrl %d6 48192: 2040 moveal %d0,%a0 48194: 3c2a 0004 movew %a2@(4),%d6 48198: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 4819a: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 4819e: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 481a2: efae lsll %d7,%d6 481a4: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 481a6: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 481a8: 5283 addql #1,%d3 481aa: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 481ae: 2f00 movel %d0,%sp@- 481b0: 2f05 movel %d5,%sp@- 481b2: 4e94 jsr %a4@ index++; 481b4: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 481b6: 2f04 movel %d4,%sp@- 481b8: 4e93 jsr %a3@ 481ba: 588f addql #4,%sp 481bc: 4a80 tstl %d0 481be: 66cc bnes 4818c <_Objects_Extend_information+0x1a0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481c0: 4281 clrl %d1 481c2: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 481c6: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481ca: 206a 002a moveal %a2@(42),%a0 481ce: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 481d0: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 481d2: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 481d6: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 481da: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 481e0: 4e5e unlk %fp 481e2: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 481e4: 7e01 moveq #1,%d7 481e6: 6000 fe5e braw 48046 <_Objects_Extend_information+0x5a> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 481ea: 2f00 movel %d0,%sp@- 481ec: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> 481f2: 588f addql #4,%sp 481f4: 2c00 movel %d0,%d6 481f6: 6000 fe82 braw 4807a <_Objects_Extend_information+0x8e> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 481fa: e58c lsll #2,%d4 481fc: 2f04 movel %d4,%sp@- 481fe: 2f2a 002e movel %a2@(46),%sp@- 48202: 2f0c movel %a4,%sp@- 48204: 4eb9 0004 e8a4 jsr 4e8a4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 4820a: 2f04 movel %d4,%sp@- 4820c: 2f2a 002a movel %a2@(42),%sp@- 48210: 2f0d movel %a5,%sp@- 48212: 4eb9 0004 e8a4 jsr 4e8a4 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 48218: 4280 clrl %d0 4821a: 302a 000e movew %a2@(14),%d0 4821e: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 48220: e58d lsll #2,%d5 48222: 2f05 movel %d5,%sp@- 48224: 2f2a 0018 movel %a2@(24),%sp@- 48228: 2f07 movel %d7,%sp@- 4822a: 4eb9 0004 e8a4 jsr 4e8a4 48230: 4fef 0024 lea %sp@(36),%sp 48234: 6000 fe94 braw 480ca <_Objects_Extend_information+0xde> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48238: 4280 clrl %d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 4823a: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 4823c: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 4823e: 4284 clrl %d4 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 48240: 322a 000e movew %a2@(14),%d1 48244: 302a 0012 movew %a2@(18),%d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48248: 7e01 moveq #1,%d7 4824a: 6000 fdfa braw 48046 <_Objects_Extend_information+0x5a> minimum_index = _Objects_Get_index( information->minimum_id ); 4824e: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48250: 4282 clrl %d2 <== NOT EXECUTED if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 48252: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 48258: 7e01 moveq #1,%d7 <== NOT EXECUTED 4825a: 6000 fdea braw 48046 <_Objects_Extend_information+0x5a><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 4825e: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 48260: 4282 clrl %d2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 48262: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED do_extend = false; 48268: 4207 clrb %d7 <== NOT EXECUTED 4826a: 6000 fdda braw 48046 <_Objects_Extend_information+0x5a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 4826e: 2f06 movel %d6,%sp@- 48270: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> return; 48276: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 48278: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4827e: 4e5e unlk %fp ... =============================================================================== 00048334 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 48334: 4e56 0000 linkw %fp,#0 48338: 2f03 movel %d3,%sp@- 4833a: 262e 0008 movel %fp@(8),%d3 4833e: 2f02 movel %d2,%sp@- 48340: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 48344: 6744 beqs 4838a <_Objects_Get_information+0x56> /* * 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 ); 48346: 2f03 movel %d3,%sp@- 48348: 4eb9 0004 c714 jsr 4c714 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 4834e: 588f addql #4,%sp 48350: 4a80 tstl %d0 48352: 6736 beqs 4838a <_Objects_Get_information+0x56> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 48354: 0282 0000 ffff andil #65535,%d2 4835a: b480 cmpl %d0,%d2 4835c: 622c bhis 4838a <_Objects_Get_information+0x56> return NULL; if ( !_Objects_Information_table[ the_api ] ) 4835e: 41f9 0005 f8f4 lea 5f8f4 <_Objects_Information_table>,%a0 48364: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0 48368: 4a88 tstl %a0 4836a: 671e beqs 4838a <_Objects_Get_information+0x56> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4836c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 48370: 670c beqs 4837e <_Objects_Get_information+0x4a> <== 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; 48372: 2040 moveal %d0,%a0 48374: 4a68 000e tstw %a0@(14) 48378: 56c1 sne %d1 4837a: 49c1 extbl %d1 4837c: c081 andl %d1,%d0 #endif return info; } 4837e: 242e fff8 movel %fp@(-8),%d2 48382: 262e fffc movel %fp@(-4),%d3 48386: 4e5e unlk %fp 48388: 4e75 rts 4838a: 242e fff8 movel %fp@(-8),%d2 if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 4838e: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 48390: 262e fffc movel %fp@(-4),%d3 48394: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b70 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 49b70: 4e56 ffe0 linkw %fp,#-32 49b74: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49b78: 282e 0008 movel %fp@(8),%d4 49b7c: 262e 000c movel %fp@(12),%d3 49b80: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 49b84: 4a83 tstl %d3 49b86: 6700 00be beqw 49c46 <_Objects_Get_name_as_string+0xd6> return NULL; if ( name == NULL ) 49b8a: 4a82 tstl %d2 49b8c: 6700 009e beqw 49c2c <_Objects_Get_name_as_string+0xbc> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49b90: 4a84 tstl %d4 49b92: 6700 00a4 beqw 49c38 <_Objects_Get_name_as_string+0xc8> information = _Objects_Get_information_id( tmpId ); 49b96: 2f04 movel %d4,%sp@- 49b98: 4eb9 0004 9a80 jsr 49a80 <_Objects_Get_information_id> if ( !information ) 49b9e: 588f addql #4,%sp 49ba0: 4a80 tstl %d0 49ba2: 6700 00a2 beqw 49c46 <_Objects_Get_name_as_string+0xd6> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49ba6: 486e fffc pea %fp@(-4) 49baa: 2f04 movel %d4,%sp@- 49bac: 2f00 movel %d0,%sp@- 49bae: 4eb9 0004 9c60 jsr 49c60 <_Objects_Get> switch ( location ) { 49bb4: 4fef 000c lea %sp@(12),%sp 49bb8: 4aae fffc tstl %fp@(-4) 49bbc: 6600 0088 bnew 49c46 <_Objects_Get_name_as_string+0xd6> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49bc0: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49bc2: 7818 moveq #24,%d4 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bc4: 5383 subql #1,%d3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49bc6: 2228 000c movel %a0@(12),%d1 lname[ 0 ] = (u32_name >> 24) & 0xff; 49bca: 2001 movel %d1,%d0 49bcc: e8a8 lsrl %d4,%d0 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 49bce: 2801 movel %d1,%d4 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49bd0: 2a01 movel %d1,%d5 lname[ 2 ] = (u32_name >> 8) & 0xff; 49bd2: e08c lsrl #8,%d4 lname[ 3 ] = (u32_name >> 0) & 0xff; 49bd4: 1d41 fffa moveb %d1,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49bd8: 4245 clrw %d5 49bda: 4845 swap %d5 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bdc: 4201 clrb %d1 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49bde: 1d40 fff7 moveb %d0,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 49be2: 1d45 fff8 moveb %d5,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 49be6: 1d44 fff9 moveb %d4,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bea: 1d41 fffb moveb %d1,%fp@(-5) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bee: 4a83 tstl %d3 49bf0: 6762 beqs 49c54 <_Objects_Get_name_as_string+0xe4><== NEVER TAKEN 49bf2: 4a00 tstb %d0 49bf4: 675e beqs 49c54 <_Objects_Get_name_as_string+0xe4> * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 49bf6: d682 addl %d2,%d3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49bf8: 45ee fff8 lea %fp@(-8),%a2 49bfc: 2042 moveal %d2,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49bfe: 4281 clrl %d1 49c00: 1200 moveb %d0,%d1 49c02: 2279 0006 06d0 moveal 606d0 <__ctype_ptr__>,%a1 49c08: 1231 1801 moveb %a1@(00000001,%d1:l),%d1 49c0c: 49c1 extbl %d1 49c0e: 0281 0000 0097 andil #151,%d1 49c14: 6602 bnes 49c18 <_Objects_Get_name_as_string+0xa8> 49c16: 702a moveq #42,%d0 49c18: 10c0 moveb %d0,%a0@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49c1a: 2248 moveal %a0,%a1 49c1c: b688 cmpl %a0,%d3 49c1e: 6704 beqs 49c24 <_Objects_Get_name_as_string+0xb4> 49c20: 101a moveb %a2@+,%d0 49c22: 66da bnes 49bfe <_Objects_Get_name_as_string+0x8e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49c24: 4211 clrb %a1@ _Thread_Enable_dispatch(); 49c26: 4eb9 0004 a91c jsr 4a91c <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 49c2c: 2002 movel %d2,%d0 49c2e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49c34: 4e5e unlk %fp 49c36: 4e75 rts return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49c38: 2079 0006 22d4 moveal 622d4 <_Per_CPU_Information+0xc>,%a0 49c3e: 2828 0008 movel %a0@(8),%d4 49c42: 6000 ff52 braw 49b96 <_Objects_Get_name_as_string+0x26> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 49c46: 4282 clrl %d2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 49c48: 2002 movel %d2,%d0 49c4a: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49c50: 4e5e unlk %fp 49c52: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49c54: 2242 moveal %d2,%a1 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49c56: 4211 clrb %a1@ _Thread_Enable_dispatch(); 49c58: 4eb9 0004 a91c jsr 4a91c <_Thread_Enable_dispatch> 49c5e: 60cc bras 49c2c <_Objects_Get_name_as_string+0xbc> =============================================================================== 00059dd4 <_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; 59dd4: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 59dd6: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59dd8: 4e56 0000 linkw %fp,#0 59ddc: 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; 59de0: 90a8 0006 subl %a0@(6),%d0 59de4: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 59de8: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 59dec: 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 ) { 59df0: b280 cmpl %d0,%d1 59df2: 6510 bcss 59e04 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 59df4: 2068 0018 moveal %a0@(24),%a0 59df8: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 59dfc: 6706 beqs 59e04 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 59dfe: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 59e00: 4e5e unlk %fp 59e02: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 59e04: 7001 moveq #1,%d0 return NULL; } 59e06: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 59e08: 2280 movel %d0,%a1@ return NULL; 59e0a: 4280 clrl %d0 } ... =============================================================================== 00048dac <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 48dac: 4e56 fffc linkw %fp,#-4 48db0: 202e 0008 movel %fp@(8),%d0 48db4: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48db6: 4a80 tstl %d0 48db8: 6676 bnes 48e30 <_Objects_Id_to_name+0x84> 48dba: 2079 0006 0cd4 moveal 60cd4 <_Per_CPU_Information+0xc>,%a0 48dc0: 2228 0008 movel %a0@(8),%d1 48dc4: 7418 moveq #24,%d2 48dc6: 2001 movel %d1,%d0 48dc8: e4a8 lsrl %d2,%d0 48dca: 143c 0007 moveb #7,%d2 48dce: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 48dd0: 143c 0002 moveb #2,%d2 48dd4: 2040 moveal %d0,%a0 48dd6: 5388 subql #1,%a0 48dd8: b488 cmpl %a0,%d2 48dda: 654a bcss 48e26 <_Objects_Id_to_name+0x7a> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 48ddc: 41f9 0006 0afc lea 60afc <_Objects_Information_table>,%a0 48de2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 48de6: 4a88 tstl %a0 48de8: 673c beqs 48e26 <_Objects_Id_to_name+0x7a> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 48dea: 2001 movel %d1,%d0 48dec: 741b moveq #27,%d2 48dee: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 48df0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 if ( !information ) 48df4: 6730 beqs 48e26 <_Objects_Id_to_name+0x7a> <== NEVER TAKEN #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 48df6: 486e fffc pea %fp@(-4) 48dfa: 2f01 movel %d1,%sp@- 48dfc: 2f00 movel %d0,%sp@- 48dfe: 4eb9 0004 8d38 jsr 48d38 <_Objects_Get> if ( !the_object ) 48e04: 4fef 000c lea %sp@(12),%sp 48e08: 4a80 tstl %d0 48e0a: 671a beqs 48e26 <_Objects_Id_to_name+0x7a> return OBJECTS_INVALID_ID; *name = the_object->name; 48e0c: 206e 000c moveal %fp@(12),%a0 48e10: 2240 moveal %d0,%a1 48e12: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 48e16: 4eb9 0004 9a7c jsr 49a7c <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e1c: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 48e20: 4280 clrl %d0 } 48e22: 4e5e unlk %fp 48e24: 4e75 rts 48e26: 242e fff8 movel %fp@(-8),%d2 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; 48e2a: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 48e2c: 4e5e unlk %fp 48e2e: 4e75 rts /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 48e30: 2200 movel %d0,%d1 48e32: 6090 bras 48dc4 <_Objects_Id_to_name+0x18> =============================================================================== 000485dc <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 485dc: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 485de: 4e56 ffec linkw %fp,#-20 485e2: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 485e6: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 485ea: 4282 clrl %d2 block_count = (information->maximum - index_base) / 485ec: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 485ee: 342a 0008 movew %a2@(8),%d2 block_count = (information->maximum - index_base) / 485f2: 362a 000e movew %a2@(14),%d3 485f6: 322a 0012 movew %a2@(18),%d1 485fa: 9682 subl %d2,%d3 485fc: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48600: 6774 beqs 48676 <_Objects_Shrink_information+0x9a><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 48602: 206a 002a moveal %a2@(42),%a0 48606: b290 cmpl %a0@,%d1 48608: 677e beqs 48688 <_Objects_Shrink_information+0xac><== NEVER TAKEN * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 4860a: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 4860c: 4280 clrl %d0 4860e: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 48610: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48612: b680 cmpl %d0,%d3 48614: 6760 beqs 48676 <_Objects_Shrink_information+0x9a> if ( information->inactive_per_block[ block ] == 48616: 2800 movel %d0,%d4 48618: e58c lsll #2,%d4 4861a: b298 cmpl %a0@+,%d1 4861c: 66f0 bnes 4860e <_Objects_Shrink_information+0x32> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4861e: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48622: 47f9 0004 7554 lea 47554 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 48628: 4280 clrl %d0 4862a: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 4862e: 2610 movel %a0@,%d3 if ((index >= index_base) && 48630: b480 cmpl %d0,%d2 48632: 620c bhis 48640 <_Objects_Shrink_information+0x64> (index < (index_base + information->allocation_size))) { 48634: 4281 clrl %d1 48636: 322a 0012 movew %a2@(18),%d1 4863a: d282 addl %d2,%d1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 4863c: b280 cmpl %d0,%d1 4863e: 6240 bhis 48680 <_Objects_Shrink_information+0xa4> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 48640: 4a83 tstl %d3 48642: 6704 beqs 48648 <_Objects_Shrink_information+0x6c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 48644: 2043 moveal %d3,%a0 48646: 60e0 bras 48628 <_Objects_Shrink_information+0x4c> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 48648: 206a 002e moveal %a2@(46),%a0 4864c: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 48650: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> information->object_blocks[ block ] = NULL; 48656: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4865a: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 4865c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 48660: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 48664: 302a 0028 movew %a2@(40),%d0 48668: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4866c: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 48670: 9081 subl %d1,%d0 48672: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 48676: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4867c: 4e5e unlk %fp 4867e: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48680: 2f08 movel %a0,%sp@- 48682: 4e93 jsr %a3@ 48684: 588f addql #4,%sp 48686: 60b8 bras 48640 <_Objects_Shrink_information+0x64> 48688: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 4868c: 4284 clrl %d4 <== NOT EXECUTED */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 4868e: 47f9 0004 7554 lea 47554 <_Chain_Extract>,%a3 <== NOT EXECUTED 48694: 6092 bras 48628 <_Objects_Shrink_information+0x4c><== NOT EXECUTED ... =============================================================================== 0004d4fc <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4d4fc: 4e56 fff0 linkw %fp,#-16 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) 4d500: 2039 0006 5b44 movel 65b44 <_Thread_Dispatch_disable_level>,%d0 4d506: 48d7 001c moveml %d2-%d4,%sp@ 4d50a: 242e 0008 movel %fp@(8),%d2 4d50e: 282e 000c movel %fp@(12),%d4 4d512: 162e 0013 moveb %fp@(19),%d3 4d516: 4a80 tstl %d0 4d518: 6640 bnes 4d55a <_Protected_heap_Walk+0x5e> * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d51a: 2f39 0006 5be4 movel 65be4 <_RTEMS_Allocator_Mutex>,%sp@- status = _Heap_Walk( the_heap, source, do_dump ); 4d520: 0283 0000 00ff andil #255,%d3 * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); 4d526: 4eb9 0004 b778 jsr 4b778 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 4d52c: 2f03 movel %d3,%sp@- 4d52e: 2f04 movel %d4,%sp@- 4d530: 2f02 movel %d2,%sp@- 4d532: 4eb9 0004 c646 jsr 4c646 <_Heap_Walk> _RTEMS_Unlock_allocator(); 4d538: 2f39 0006 5be4 movel 65be4 <_RTEMS_Allocator_Mutex>,%sp@- 4d53e: 2d40 fffc movel %d0,%fp@(-4) 4d542: 4eb9 0004 b7d8 jsr 4b7d8 <_API_Mutex_Unlock> } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d548: 202e fffc movel %fp@(-4),%d0 * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); 4d54c: 4fef 0014 lea %sp@(20),%sp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 4d550: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d556: 4e5e unlk %fp 4d558: 4e75 rts if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d55a: 2d44 000c movel %d4,%fp@(12) 4d55e: 0283 0000 00ff andil #255,%d3 4d564: 2d42 0008 movel %d2,%fp@(8) 4d568: 2d43 0010 movel %d3,%fp@(16) } return status; } 4d56c: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 4d572: 4e5e unlk %fp if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); 4d574: 4ef9 0004 c646 jmp 4c646 <_Heap_Walk> ... =============================================================================== 0004d350 <_RBTree_Extract_unprotected>: */ void _RBTree_Extract_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { 4d350: 4e56 ffec linkw %fp,#-20 4d354: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d358: 2a6e 0008 moveal %fp@(8),%a5 4d35c: 266e 000c moveal %fp@(12),%a3 RBTree_Node *leaf, *target; RBTree_Color victim_color; RBTree_Direction dir; if (!the_node) return; 4d360: 4a8b tstl %a3 4d362: 6700 00b0 beqw 4d414 <_RBTree_Extract_unprotected+0xc4> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { 4d366: b7ed 0008 cmpal %a5@(8),%a3 4d36a: 6700 00f6 beqw 4d462 <_RBTree_Extract_unprotected+0x112> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d36e: b7ed 000c cmpal %a5@(12),%a3 4d372: 6700 00aa beqw 4d41e <_RBTree_Extract_unprotected+0xce> * 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]) { 4d376: 246b 0004 moveal %a3@(4),%a2 4d37a: 4a8a tstl %a2 4d37c: 6700 00b6 beqw 4d434 <_RBTree_Extract_unprotected+0xe4> 4d380: 4aab 0008 tstl %a3@(8) 4d384: 6700 00f0 beqw 4d476 <_RBTree_Extract_unprotected+0x126> target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; 4d388: 202a 0008 movel %a2@(8),%d0 4d38c: 6708 beqs 4d396 <_RBTree_Extract_unprotected+0x46> 4d38e: 2440 moveal %d0,%a2 4d390: 202a 0008 movel %a2@(8),%d0 4d394: 66f8 bnes 4d38e <_RBTree_Extract_unprotected+0x3e> * target's position (target is the right child of target->parent) * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; 4d396: 286a 0004 moveal %a2@(4),%a4 if(leaf) { 4d39a: 4a8c tstl %a4 4d39c: 6700 00f4 beqw 4d492 <_RBTree_Extract_unprotected+0x142> leaf->parent = target->parent; 4d3a0: 2892 movel %a2@,%a4@ } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; 4d3a2: 2252 moveal %a2@,%a1 4d3a4: b5e9 0004 cmpal %a1@(4),%a2 4d3a8: 56c0 sne %d0 target->parent->child[dir] = leaf; 4d3aa: 7201 moveq #1,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = target; 4d3ac: 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]; 4d3ae: 49c0 extbl %d0 target->parent->child[dir] = leaf; 4d3b0: 9280 subl %d0,%d1 /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3b2: 2053 moveal %a3@,%a0 /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); } victim_color = target->color; dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; 4d3b4: 238c 1c00 movel %a4,%a1@(00000000,%d1:l:4) /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3b8: b7e8 0004 cmpal %a0@(4),%a3 4d3bc: 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; 4d3be: 202a 000c movel %a2@(12),%d0 dir = target != target->parent->child[0]; target->parent->child[dir] = leaf; /* now replace the_node with target */ dir = the_node != the_node->parent->child[0]; 4d3c2: 49c1 extbl %d1 the_node->parent->child[dir] = target; 4d3c4: 9481 subl %d1,%d2 4d3c6: 218a 2c00 movel %a2,%a0@(00000000,%d2:l:4) /* set target's new children to the original node's children */ target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT]; 4d3ca: 256b 0008 0008 movel %a3@(8),%a2@(8) if (the_node->child[RBT_RIGHT]) 4d3d0: 206b 0008 moveal %a3@(8),%a0 4d3d4: 4a88 tstl %a0 4d3d6: 6702 beqs 4d3da <_RBTree_Extract_unprotected+0x8a><== NEVER TAKEN the_node->child[RBT_RIGHT]->parent = target; 4d3d8: 208a movel %a2,%a0@ target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; 4d3da: 256b 0004 0004 movel %a3@(4),%a2@(4) if (the_node->child[RBT_LEFT]) 4d3e0: 206b 0004 moveal %a3@(4),%a0 4d3e4: 4a88 tstl %a0 4d3e6: 6702 beqs 4d3ea <_RBTree_Extract_unprotected+0x9a> the_node->child[RBT_LEFT]->parent = target; 4d3e8: 208a movel %a2,%a0@ /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; 4d3ea: 2493 movel %a3@,%a2@ target->color = the_node->color; 4d3ec: 256b 000c 000c movel %a3@(12),%a2@(12) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4d3f2: 4a80 tstl %d0 4d3f4: 6608 bnes 4d3fe <_RBTree_Extract_unprotected+0xae> if (leaf) { 4d3f6: 4a8c tstl %a4 4d3f8: 6704 beqs 4d3fe <_RBTree_Extract_unprotected+0xae> leaf->color = RBT_BLACK; /* case 2 */ 4d3fa: 42ac 000c clrl %a4@(12) /* Wipe the_node */ _RBTree_Set_off_rbtree(the_node); /* set root to black, if it exists */ if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK; 4d3fe: 206d 0004 moveal %a5@(4),%a0 */ RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree( RBTree_Node *node ) { node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL; 4d402: 42ab 0008 clrl %a3@(8) 4d406: 42ab 0004 clrl %a3@(4) 4d40a: 4293 clrl %a3@ 4d40c: 4a88 tstl %a0 4d40e: 6704 beqs 4d414 <_RBTree_Extract_unprotected+0xc4> 4d410: 42a8 000c clrl %a0@(12) } 4d414: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d41a: 4e5e unlk %fp 4d41c: 4e75 rts the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) 4d41e: 202b 0004 movel %a3@(4),%d0 4d422: 6700 0098 beqw 4d4bc <_RBTree_Extract_unprotected+0x16c> * 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]) { 4d426: 246b 0004 moveal %a3@(4),%a2 } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; 4d42a: 2b40 000c movel %d0,%a5@(12) * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) { 4d42e: 4a8a tstl %a2 4d430: 6600 ff4e bnew 4d380 <_RBTree_Extract_unprotected+0x30> * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; 4d434: 286b 0008 moveal %a3@(8),%a4 if( leaf ) { 4d438: 4a8c tstl %a4 4d43a: 663c bnes 4d478 <_RBTree_Extract_unprotected+0x128> leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d43c: 2f0b movel %a3,%sp@- } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d43e: 7401 moveq #1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d440: 4eb9 0004 d154 jsr 4d154 <_RBTree_Extract_validate_unprotected> } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d446: 2053 moveal %a3@,%a0 4d448: b7e8 0004 cmpal %a0@(4),%a3 4d44c: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4d44e: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d452: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4d454: 9481 subl %d1,%d2 the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); 4d456: 588f addql #4,%sp } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d458: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are two cases: * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node, its child must be red. Paint child black. */ if (victim_color == RBT_BLACK) { /* eliminate case 1 */ 4d45c: 4a80 tstl %d0 4d45e: 669e bnes 4d3fe <_RBTree_Extract_unprotected+0xae> 4d460: 6094 bras 4d3f6 <_RBTree_Extract_unprotected+0xa6> if (!the_node) return; /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) 4d462: 202b 0008 movel %a3@(8),%d0 4d466: 6738 beqs 4d4a0 <_RBTree_Extract_unprotected+0x150> the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; 4d468: 2b40 0008 movel %d0,%a5@(8) the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d46c: b7ed 000c cmpal %a5@(12),%a3 4d470: 6600 ff04 bnew 4d376 <_RBTree_Extract_unprotected+0x26> 4d474: 60a8 bras 4d41e <_RBTree_Extract_unprotected+0xce><== NOT EXECUTED * 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]) { 4d476: 284a moveal %a2,%a4 * For now we store the color of the node being deleted in victim_color. */ leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; 4d478: 2893 movel %a3@,%a4@ } victim_color = the_node->color; /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; the_node->parent->child[dir] = leaf; 4d47a: 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]; 4d47c: 2053 moveal %a3@,%a0 4d47e: b7e8 0004 cmpal %a0@(4),%a3 4d482: 56c1 sne %d1 leaf->parent = the_node->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(the_node); } victim_color = the_node->color; 4d484: 202b 000c movel %a3@(12),%d0 /* remove the_node from the tree */ dir = the_node != the_node->parent->child[0]; 4d488: 49c1 extbl %d1 the_node->parent->child[dir] = leaf; 4d48a: 9481 subl %d1,%d2 4d48c: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4) 4d490: 60ca bras 4d45c <_RBTree_Extract_unprotected+0x10c> leaf = target->child[RBT_LEFT]; if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ _RBTree_Extract_validate_unprotected(target); 4d492: 2f0a movel %a2,%sp@- 4d494: 4eb9 0004 d154 jsr 4d154 <_RBTree_Extract_validate_unprotected> 4d49a: 588f addql #4,%sp 4d49c: 6000 ff04 braw 4d3a2 <_RBTree_Extract_unprotected+0x52> /* check if min needs to be updated */ if (the_node == the_rbtree->first[RBT_LEFT]) { if (the_node->child[RBT_RIGHT]) the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; 4d4a0: 2013 movel %a3@,%d0 4d4a2: 2b40 0008 movel %d0,%a5@(8) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4d4a6: b08d cmpl %a5,%d0 4d4a8: 6600 fec4 bnew 4d36e <_RBTree_Extract_unprotected+0x1e> the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; 4d4ac: 42ad 0008 clrl %a5@(8) } } /* check if max needs to be updated: note, min can equal max (1 element) */ if (the_node == the_rbtree->first[RBT_RIGHT]) { 4d4b0: b7ed 000c cmpal %a5@(12),%a3 4d4b4: 6600 fec0 bnew 4d376 <_RBTree_Extract_unprotected+0x26> 4d4b8: 6000 ff64 braw 4d41e <_RBTree_Extract_unprotected+0xce> if (the_node->child[RBT_LEFT]) the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; 4d4bc: 2013 movel %a3@,%d0 4d4be: 2b40 000c movel %d0,%a5@(12) if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, 4d4c2: b08d cmpl %a5,%d0 4d4c4: 6600 feb0 bnew 4d376 <_RBTree_Extract_unprotected+0x26> the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; 4d4c8: 42ad 000c clrl %a5@(12) 4d4cc: 6000 fea8 braw 4d376 <_RBTree_Extract_unprotected+0x26> =============================================================================== 0004d154 <_RBTree_Extract_validate_unprotected>: * of the extract operation. */ void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { 4d154: 4e56 ffec linkw %fp,#-20 4d158: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d15c: 266e 0008 moveal %fp@(8),%a3 RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; 4d160: 2053 moveal %a3@,%a0 if(!parent->parent) return; 4d162: 4a90 tstl %a0@ 4d164: 677e beqs 4d1e4 <_RBTree_Extract_validate_unprotected+0x90> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4d166: 2268 0004 moveal %a0@(4),%a1 4d16a: b3cb cmpal %a3,%a1 4d16c: 6700 01da beqw 4d348 <_RBTree_Extract_validate_unprotected+0x1f4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d170: 7401 moveq #1,%d2 4d172: b4ab 000c cmpl %a3@(12),%d2 4d176: 6764 beqs 4d1dc <_RBTree_Extract_validate_unprotected+0x88> sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { 4d178: 4a90 tstl %a0@ 4d17a: 6760 beqs 4d1dc <_RBTree_Extract_validate_unprotected+0x88> 4d17c: 4a89 tstl %a1 4d17e: 6708 beqs 4d188 <_RBTree_Extract_validate_unprotected+0x34><== NEVER TAKEN 4d180: 7001 moveq #1,%d0 4d182: b0a9 000c cmpl %a1@(12),%d0 4d186: 6764 beqs 4d1ec <_RBTree_Extract_validate_unprotected+0x98> _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]) && 4d188: 2469 0008 moveal %a1@(8),%a2 4d18c: 4a8a tstl %a2 4d18e: 670a beqs 4d19a <_RBTree_Extract_validate_unprotected+0x46> 4d190: 7001 moveq #1,%d0 4d192: b0aa 000c cmpl %a2@(12),%d0 4d196: 6700 00dc beqw 4d274 <_RBTree_Extract_validate_unprotected+0x120> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { 4d19a: 2469 0004 moveal %a1@(4),%a2 4d19e: 4a8a tstl %a2 4d1a0: 670a beqs 4d1ac <_RBTree_Extract_validate_unprotected+0x58> 4d1a2: 7201 moveq #1,%d1 4d1a4: b2aa 000c cmpl %a2@(12),%d1 4d1a8: 6700 00ca beqw 4d274 <_RBTree_Extract_validate_unprotected+0x120> sibling->color = RBT_RED; 4d1ac: 7601 moveq #1,%d3 4d1ae: 2343 000c movel %d3,%a1@(12) 4d1b2: b6a8 000c cmpl %a0@(12),%d3 4d1b6: 6700 00ac beqw 4d264 <_RBTree_Extract_validate_unprotected+0x110> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; 4d1ba: 2450 moveal %a0@,%a2 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d1bc: 4a8a tstl %a2 4d1be: 6700 009a beqw 4d25a <_RBTree_Extract_validate_unprotected+0x106> if(!(the_node->parent->parent)) return NULL; 4d1c2: 4a92 tstl %a2@ 4d1c4: 6700 0094 beqw 4d25a <_RBTree_Extract_validate_unprotected+0x106> if(the_node == the_node->parent->child[RBT_LEFT]) 4d1c8: 226a 0004 moveal %a2@(4),%a1 4d1cc: b3c8 cmpal %a0,%a1 4d1ce: 677e beqs 4d24e <_RBTree_Extract_validate_unprotected+0xfa><== NEVER TAKEN c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4d1d0: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d1d2: 204a moveal %a2,%a0 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d1d4: 7401 moveq #1,%d2 4d1d6: b4ab 000c cmpl %a3@(12),%d2 4d1da: 669c bnes 4d178 <_RBTree_Extract_validate_unprotected+0x24><== ALWAYS TAKEN sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d1dc: 2053 moveal %a3@,%a0 4d1de: 4a90 tstl %a0@ 4d1e0: 6700 015a beqw 4d33c <_RBTree_Extract_validate_unprotected+0x1e8> } 4d1e4: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4d1e8: 4e5e unlk %fp 4d1ea: 4e75 rts * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4d1ec: b7e8 0004 cmpal %a0@(4),%a3 4d1f0: 56c0 sne %d0 * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; 4d1f2: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d1f4: 7402 moveq #2,%d2 sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; 4d1f6: 49c0 extbl %d0 4d1f8: 4480 negl %d0 4d1fa: 9480 subl %d0,%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; 4d1fc: 2141 000c movel %d1,%a0@(12) 4d200: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2 sibling->color = RBT_BLACK; 4d204: 42a9 000c clrl %a1@(12) 4d208: 4a8a tstl %a2 4d20a: 6730 beqs 4d23c <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d20c: 2200 movel %d0,%d1 4d20e: 5281 addql #1,%d1 4d210: 43f2 1c00 lea %a2@(00000000,%d1:l:4),%a1 4d214: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4) if (c->child[dir]) 4d218: 2272 1c00 moveal %a2@(00000000,%d1:l:4),%a1 4d21c: 4a89 tstl %a1 4d21e: 6702 beqs 4d222 <_RBTree_Extract_validate_unprotected+0xce><== NEVER TAKEN c->child[dir]->parent = the_node; 4d220: 2288 movel %a0,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d222: 2250 moveal %a0@,%a1 4d224: 7401 moveq #1,%d2 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d226: 2588 1c00 movel %a0,%a2@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d22a: b1e9 0004 cmpal %a1@(4),%a0 4d22e: 56c1 sne %d1 c->parent = the_node->parent; 4d230: 2489 movel %a1,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d232: 49c1 extbl %d1 4d234: 9481 subl %d1,%d2 4d236: 238a 2c00 movel %a2,%a1@(00000000,%d2:l:4) c->parent = the_node->parent; the_node->parent = c; 4d23a: 208a movel %a2,%a0@ dir = the_node != parent->child[0]; _RBTree_Rotate(parent, dir); sibling = parent->child[!dir]; 4d23c: 4a80 tstl %d0 4d23e: 57c0 seq %d0 4d240: 7601 moveq #1,%d3 4d242: 49c0 extbl %d0 4d244: 9680 subl %d0,%d3 4d246: 2270 3c00 moveal %a0@(00000000,%d3:l:4),%a1 4d24a: 6000 ff3c braw 4d188 <_RBTree_Extract_validate_unprotected+0x34> 4d24e: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d250: 204a moveal %a2,%a0 if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d252: 226a 0008 moveal %a2@(8),%a1 4d256: 6000 ff7c braw 4d1d4 <_RBTree_Extract_validate_unprotected+0x80> c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; 4d25a: 2648 moveal %a0,%a3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 4d25c: 93c9 subal %a1,%a1 4d25e: 204a moveal %a2,%a0 4d260: 6000 ff72 braw 4d1d4 <_RBTree_Extract_validate_unprotected+0x80> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; 4d264: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d268: 2053 moveal %a3@,%a0 4d26a: 4a90 tstl %a0@ 4d26c: 6600 ff76 bnew 4d1e4 <_RBTree_Extract_validate_unprotected+0x90> 4d270: 6000 00ca braw 4d33c <_RBTree_Extract_validate_unprotected+0x1e8><== NOT EXECUTED * 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]; 4d274: b7e8 0004 cmpal %a0@(4),%a3 4d278: 56c0 sne %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4d27a: 7401 moveq #1,%d2 * 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]; 4d27c: 49c0 extbl %d0 4d27e: 4480 negl %d0 if (!_RBTree_Is_red(sibling->child[!dir])) { 4d280: 57c1 seq %d1 4d282: 49c1 extbl %d1 4d284: 9481 subl %d1,%d2 4d286: 2202 movel %d2,%d1 4d288: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d28c: 4a8a tstl %a2 4d28e: 6708 beqs 4d298 <_RBTree_Extract_validate_unprotected+0x144> 4d290: 7601 moveq #1,%d3 4d292: b6aa 000c cmpl %a2@(12),%d3 4d296: 6756 beqs 4d2ee <_RBTree_Extract_validate_unprotected+0x19a> sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4d298: 7601 moveq #1,%d3 * 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; 4d29a: 7401 moveq #1,%d2 sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, !dir); 4d29c: b183 eorl %d0,%d3 * 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; 4d29e: 2342 000c movel %d2,%a1@(12) RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d2a2: 143c 0002 moveb #2,%d2 4d2a6: 9483 subl %d3,%d2 sibling->child[dir]->color = RBT_BLACK; 4d2a8: 2871 0c04 moveal %a1@(00000004,%d0:l:4),%a4 4d2ac: 2471 2c00 moveal %a1@(00000000,%d2:l:4),%a2 4d2b0: 42ac 000c clrl %a4@(12) 4d2b4: 4a8a tstl %a2 4d2b6: 672e beqs 4d2e6 <_RBTree_Extract_validate_unprotected+0x192><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d2b8: 5283 addql #1,%d3 4d2ba: 49f2 3c00 lea %a2@(00000000,%d3:l:4),%a4 4d2be: 2394 2c00 movel %a4@,%a1@(00000000,%d2:l:4) if (c->child[dir]) 4d2c2: 2872 3c00 moveal %a2@(00000000,%d3:l:4),%a4 4d2c6: 4a8c tstl %a4 4d2c8: 6702 beqs 4d2cc <_RBTree_Extract_validate_unprotected+0x178> c->child[dir]->parent = the_node; 4d2ca: 2889 movel %a1,%a4@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2cc: 2851 moveal %a1@,%a4 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d2ce: 2589 3c00 movel %a1,%a2@(00000000,%d3:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2d2: 7601 moveq #1,%d3 4d2d4: b3ec 0004 cmpal %a4@(4),%a1 4d2d8: 56c2 sne %d2 c->parent = the_node->parent; 4d2da: 248c movel %a4,%a2@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d2dc: 49c2 extbl %d2 4d2de: 9682 subl %d2,%d3 4d2e0: 298a 3c00 movel %a2,%a4@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4d2e4: 228a movel %a2,%a1@ _RBTree_Rotate(sibling, !dir); sibling = parent->child[!dir]; 4d2e6: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4d2ea: 2471 1c00 moveal %a1@(00000000,%d1:l:4),%a2 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d2ee: 7202 moveq #2,%d1 4d2f0: 9280 subl %d0,%d1 } sibling->color = parent->color; 4d2f2: 2368 000c 000c movel %a0@(12),%a1@(12) 4d2f8: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 parent->color = RBT_BLACK; 4d2fc: 42a8 000c clrl %a0@(12) sibling->child[!dir]->color = RBT_BLACK; 4d300: 42aa 000c clrl %a2@(12) 4d304: 4a89 tstl %a1 4d306: 6700 fed4 beqw 4d1dc <_RBTree_Extract_validate_unprotected+0x88> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d30a: 5280 addql #1,%d0 4d30c: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2 4d310: 2192 1c00 movel %a2@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4d314: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2 4d318: 4a8a tstl %a2 4d31a: 6702 beqs 4d31e <_RBTree_Extract_validate_unprotected+0x1ca> c->child[dir]->parent = the_node; 4d31c: 2488 movel %a0,%a2@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d31e: 2450 moveal %a0@,%a2 4d320: 7201 moveq #1,%d1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d322: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d326: b1ea 0004 cmpal %a2@(4),%a0 4d32a: 56c0 sne %d0 c->parent = the_node->parent; 4d32c: 228a movel %a2,%a1@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d32e: 49c0 extbl %d0 4d330: 9280 subl %d0,%d1 4d332: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4d336: 2089 movel %a1,%a0@ 4d338: 6000 fea2 braw 4d1dc <_RBTree_Extract_validate_unprotected+0x88> _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; 4d33c: 42ab 000c clrl %a3@(12) } 4d340: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4d344: 4e5e unlk %fp 4d346: 4e75 rts if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d348: 2268 0008 moveal %a0@(8),%a1 4d34c: 6000 fe22 braw 4d170 <_RBTree_Extract_validate_unprotected+0x1c> =============================================================================== 00049b14 <_RBTree_Find>: { ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49b14: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Find( RBTree_Control *the_rbtree, RBTree_Node *search_node ) { 49b1a: 4e56 ffec linkw %fp,#-20 49b1e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49b22: 266e 0008 moveal %fp@(8),%a3 49b26: 242e 000c movel %fp@(12),%d2 ISR_Level level; RBTree_Node *return_node; return_node = NULL; _ISR_Disable( level ); 49b2a: 40c4 movew %sr,%d4 49b2c: 8084 orl %d4,%d0 49b2e: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected( RBTree_Control *the_rbtree, RBTree_Node *the_node ) { RBTree_Node* iter_node = the_rbtree->root; 49b30: 246b 0004 moveal %a3@(4),%a2 RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49b34: 4283 clrl %d3 49b36: 4a8a tstl %a2 49b38: 672a beqs 49b64 <_RBTree_Find+0x50> <== NEVER TAKEN compare_result = the_rbtree->compare_function(the_node, iter_node); 49b3a: 2f0a movel %a2,%sp@- 49b3c: 206b 0010 moveal %a3@(16),%a0 49b40: 2f02 movel %d2,%sp@- 49b42: 4e90 jsr %a0@ if (compare_result == 0) { 49b44: 508f addql #8,%sp 49b46: 4a80 tstl %d0 49b48: 6608 bnes 49b52 <_RBTree_Find+0x3e> found = iter_node; if ( the_rbtree->is_unique ) 49b4a: 260a movel %a2,%d3 49b4c: 4a2b 0014 tstb %a3@(20) 49b50: 6612 bnes 49b64 <_RBTree_Find+0x50> break; } RBTree_Direction dir = (compare_result == 1); 49b52: 7201 moveq #1,%d1 49b54: b280 cmpl %d0,%d1 49b56: 57c0 seq %d0 49b58: 49c0 extbl %d0 iter_node = iter_node->child[dir]; 49b5a: 9280 subl %d0,%d1 49b5c: 2472 1c00 moveal %a2@(00000000,%d1:l:4),%a2 ) { RBTree_Node* iter_node = the_rbtree->root; RBTree_Node* found = NULL; int compare_result; while (iter_node) { 49b60: 4a8a tstl %a2 49b62: 66d6 bnes 49b3a <_RBTree_Find+0x26> return_node = _RBTree_Find_unprotected( the_rbtree, search_node ); _ISR_Enable( level ); 49b64: 46c4 movew %d4,%sr return return_node; } 49b66: 2003 movel %d3,%d0 49b68: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49b6e: 4e5e unlk %fp ... =============================================================================== 00049ad4 <_RBTree_Find_header>: { ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49ad4: 203c 0000 0700 movel #1792,%d0 */ RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node ) { 49ada: 4e56 0000 linkw %fp,#0 49ade: 206e 0008 moveal %fp@(8),%a0 49ae2: 2f02 movel %d2,%sp@- ISR_Level level; RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); 49ae4: 40c2 movew %sr,%d2 49ae6: 8082 orl %d2,%d0 49ae8: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49aea: 4a88 tstl %a0 49aec: 671a beqs 49b08 <_RBTree_Find_header+0x34> if(!(the_node->parent)) return NULL; 49aee: 2050 moveal %a0@,%a0 49af0: 4a88 tstl %a0 49af2: 670a beqs 49afe <_RBTree_Find_header+0x2a> 49af4: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49af6: 6706 beqs 49afe <_RBTree_Find_header+0x2a> <== NEVER TAKEN 49af8: 2041 moveal %d1,%a0 RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; 49afa: 2210 movel %a0@,%d1 while(the_node->parent) the_node = the_node->parent; 49afc: 66fa bnes 49af8 <_RBTree_Find_header+0x24> return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49afe: 46c2 movew %d2,%sr return return_header; } 49b00: 241f movel %sp@+,%d2 49b02: 2008 movel %a0,%d0 49b04: 4e5e unlk %fp 49b06: 4e75 rts */ RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected( RBTree_Node *the_node ) { if(!the_node) return NULL; 49b08: 91c8 subal %a0,%a0 RBTree_Control *return_header; return_header = NULL; _ISR_Disable( level ); return_header = _RBTree_Find_header_unprotected( the_node ); _ISR_Enable( level ); 49b0a: 46c2 movew %d2,%sr return return_header; } 49b0c: 241f movel %sp@+,%d2 49b0e: 2008 movel %a0,%d0 49b10: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049ddc <_RBTree_Initialize>: void *starting_address, size_t number_nodes, size_t node_size, bool is_unique ) { 49ddc: 4e56 ffec linkw %fp,#-20 49de0: 202e 001c movel %fp@(28),%d0 49de4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 49de8: 246e 0008 moveal %fp@(8),%a2 49dec: 242e 0014 movel %fp@(20),%d2 49df0: 282e 0018 movel %fp@(24),%d4 size_t count; RBTree_Node *next; /* TODO: Error message? */ if (!the_rbtree) return; 49df4: 4a8a tstl %a2 49df6: 6736 beqs 49e2e <_RBTree_Initialize+0x52> <== NEVER TAKEN RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; 49df8: 4292 clrl %a2@ the_rbtree->root = NULL; the_rbtree->first[0] = NULL; the_rbtree->first[1] = NULL; the_rbtree->compare_function = compare_function; 49dfa: 256e 000c 0010 movel %fp@(12),%a2@(16) the_rbtree->is_unique = is_unique; 49e00: 1540 0014 moveb %d0,%a2@(20) RBTree_Compare_function compare_function, bool is_unique ) { the_rbtree->permanent_null = NULL; the_rbtree->root = NULL; 49e04: 42aa 0004 clrl %a2@(4) the_rbtree->first[0] = NULL; 49e08: 42aa 0008 clrl %a2@(8) the_rbtree->first[1] = NULL; 49e0c: 42aa 000c clrl %a2@(12) /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49e10: 4a82 tstl %d2 49e12: 671a beqs 49e2e <_RBTree_Initialize+0x52> <== NEVER TAKEN /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; 49e14: 262e 0010 movel %fp@(16),%d3 49e18: 47f9 0004 9dae lea 49dae <_RBTree_Insert>,%a3 while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49e1e: 2f03 movel %d3,%sp@- * node_size - size of node in bytes * * Output parameters: NONE */ void _RBTree_Initialize( 49e20: d684 addl %d4,%d3 49e22: 5382 subql #1,%d2 _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { _RBTree_Insert(the_rbtree, next); 49e24: 2f0a movel %a2,%sp@- 49e26: 4e93 jsr %a3@ /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree, compare_function, is_unique); count = number_nodes; next = starting_address; while ( count-- ) { 49e28: 508f addql #8,%sp 49e2a: 4a82 tstl %d2 49e2c: 66f0 bnes 49e1e <_RBTree_Initialize+0x42> _RBTree_Insert(the_rbtree, next); next = (RBTree_Node *) _Addresses_Add_offset( (void *) next, node_size ); } } 49e2e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49e34: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d6fa <_RBTree_Insert>: RBTree_Node *node ) { ISR_Level level; _ISR_Disable( level ); 4d6fa: 203c 0000 0700 movel #1792,%d0 RBTree_Node *_RBTree_Insert( RBTree_Control *tree, RBTree_Node *node ) { 4d700: 4e56 0000 linkw %fp,#0 4d704: 222e 0008 movel %fp@(8),%d1 4d708: 206e 000c moveal %fp@(12),%a0 4d70c: 2f02 movel %d2,%sp@- ISR_Level level; _ISR_Disable( level ); 4d70e: 40c2 movew %sr,%d2 4d710: 8082 orl %d2,%d0 4d712: 46c0 movew %d0,%sr return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d714: 241f movel %sp@+,%d2 ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4d716: 2d48 000c movel %a0,%fp@(12) 4d71a: 2d41 0008 movel %d1,%fp@(8) _ISR_Enable( level ); } 4d71e: 4e5e unlk %fp ) { ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); 4d720: 4ef9 0004 d626 jmp 4d626 <_RBTree_Insert_unprotected> ... =============================================================================== 0004d4fc <_RBTree_Validate_insert_unprotected>: * append operation. */ void _RBTree_Validate_insert_unprotected( RBTree_Node *the_node ) { 4d4fc: 4e56 ffe8 linkw %fp,#-24 4d500: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d504: 266e 0008 moveal %fp@(8),%a3 ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d508: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4d50a: 2250 moveal %a0@,%a1 4d50c: 2449 moveal %a1,%a2 4d50e: 4a89 tstl %a1 4d510: 6700 00de beqw 4d5f0 <_RBTree_Validate_insert_unprotected+0xf4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d514: 7601 moveq #1,%d3 4d516: b6a8 000c cmpl %a0@(12),%d3 4d51a: 6708 beqs 4d524 <_RBTree_Validate_insert_unprotected+0x28> /* 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; } 4d51c: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4d520: 4e5e unlk %fp 4d522: 4e75 rts ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(!(the_node->parent->parent->parent)) return NULL; 4d524: 4a91 tstl %a1@ 4d526: 6700 00ee beqw 4d616 <_RBTree_Validate_insert_unprotected+0x11a> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) 4d52a: 2429 0004 movel %a1@(4),%d2 4d52e: b488 cmpl %a0,%d2 4d530: 6700 00ec beqw 4d61e <_RBTree_Validate_insert_unprotected+0x122> 4d534: 2842 moveal %d2,%a4 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); 4d536: 4a8c tstl %a4 4d538: 670a beqs 4d544 <_RBTree_Validate_insert_unprotected+0x48> 4d53a: 7001 moveq #1,%d0 4d53c: b0ac 000c cmpl %a4@(12),%d0 4d540: 6700 00ba beqw 4d5fc <_RBTree_Validate_insert_unprotected+0x100> 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]; 4d544: b7e8 0004 cmpal %a0@(4),%a3 4d548: 56c1 sne %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4d54a: b488 cmpl %a0,%d2 4d54c: 56c0 sne %d0 the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; g->color = RBT_RED; the_node = g; } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; 4d54e: 49c1 extbl %d1 4d550: 4481 negl %d1 RBTree_Direction pdir = the_node->parent != g->child[0]; 4d552: 49c0 extbl %d0 4d554: 4480 negl %d0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d556: 7401 moveq #1,%d2 /* ensure node is on the same branch direction as parent */ if (dir != pdir) { 4d558: b081 cmpl %d1,%d0 4d55a: 6700 00b2 beqw 4d60e <_RBTree_Validate_insert_unprotected+0x112> 4d55e: 9480 subl %d0,%d2 4d560: 2202 movel %d2,%d1 4d562: 5281 addql #1,%d1 4d564: 5280 addql #1,%d0 4d566: 2870 1c00 moveal %a0@(00000000,%d1:l:4),%a4 4d56a: 4a8c tstl %a4 4d56c: 672c beqs 4d59a <_RBTree_Validate_insert_unprotected+0x9e><== NEVER TAKEN c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d56e: 4bf4 0c00 lea %a4@(00000000,%d0:l:4),%a5 4d572: 2195 1c00 movel %a5@,%a0@(00000000,%d1:l:4) if (c->child[dir]) 4d576: 2a74 0c00 moveal %a4@(00000000,%d0:l:4),%a5 4d57a: 4a8d tstl %a5 4d57c: 6704 beqs 4d582 <_RBTree_Validate_insert_unprotected+0x86> c->child[dir]->parent = the_node; 4d57e: 2a88 movel %a0,%a5@ 4d580: 2250 moveal %a0@,%a1 c->child[dir] = the_node; 4d582: 2988 0c00 movel %a0,%a4@(00000000,%d0:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d586: 7601 moveq #1,%d3 4d588: b1e9 0004 cmpal %a1@(4),%a0 4d58c: 56c1 sne %d1 c->parent = the_node->parent; 4d58e: 2889 movel %a1,%a4@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d590: 49c1 extbl %d1 4d592: 9681 subl %d1,%d3 4d594: 238c 3c00 movel %a4,%a1@(00000000,%d3:l:4) c->parent = the_node->parent; the_node->parent = c; 4d598: 208c movel %a4,%a0@ _RBTree_Rotate(the_node->parent, pdir); the_node = the_node->child[pdir]; 4d59a: 2673 0c00 moveal %a3@(00000000,%d0:l:4),%a3 4d59e: 2053 moveal %a3@,%a0 } the_node->parent->color = RBT_BLACK; 4d5a0: 42a8 000c clrl %a0@(12) g->color = RBT_RED; 4d5a4: 7201 moveq #1,%d1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[(1-dir)] == NULL) return; 4d5a6: 2072 0c00 moveal %a2@(00000000,%d0:l:4),%a0 4d5aa: 2541 000c movel %d1,%a2@(12) 4d5ae: 4a88 tstl %a0 4d5b0: 6700 ff56 beqw 4d508 <_RBTree_Validate_insert_unprotected+0xc> c = the_node->child[(1-dir)]; the_node->child[(1-dir)] = c->child[dir]; 4d5b4: 2202 movel %d2,%d1 4d5b6: 5281 addql #1,%d1 4d5b8: 43f0 1c00 lea %a0@(00000000,%d1:l:4),%a1 4d5bc: 2591 0c00 movel %a1@,%a2@(00000000,%d0:l:4) if (c->child[dir]) 4d5c0: 2270 1c00 moveal %a0@(00000000,%d1:l:4),%a1 4d5c4: 4a89 tstl %a1 4d5c6: 6702 beqs 4d5ca <_RBTree_Validate_insert_unprotected+0xce> c->child[dir]->parent = the_node; 4d5c8: 228a movel %a2,%a1@ c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5ca: 2252 moveal %a2@,%a1 the_node->child[(1-dir)] = c->child[dir]; if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; 4d5cc: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5d0: 7201 moveq #1,%d1 4d5d2: b5e9 0004 cmpal %a1@(4),%a2 4d5d6: 56c0 sne %d0 c->parent = the_node->parent; 4d5d8: 2089 movel %a1,%a0@ if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; 4d5da: 49c0 extbl %d0 4d5dc: 9280 subl %d0,%d1 4d5de: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) c->parent = the_node->parent; the_node->parent = c; 4d5e2: 2488 movel %a0,%a2@ ISR_Level level; _ISR_Disable( level ); return _RBTree_Insert_unprotected( tree, node ); _ISR_Enable( level ); } 4d5e4: 2053 moveal %a3@,%a0 */ RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent( RBTree_Node *the_node ) { if (!the_node->parent->parent) return NULL; 4d5e6: 2250 moveal %a0@,%a1 4d5e8: 2449 moveal %a1,%a2 4d5ea: 4a89 tstl %a1 4d5ec: 6600 ff26 bnew 4d514 <_RBTree_Validate_insert_unprotected+0x18> /* 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; 4d5f0: 42ab 000c clrl %a3@(12) } 4d5f4: 4cd7 3c0c moveml %sp@,%d2-%d3/%a2-%a5 4d5f8: 4e5e unlk %fp 4d5fa: 4e75 rts u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; 4d5fc: 42a8 000c clrl %a0@(12) u->color = RBT_BLACK; g->color = RBT_RED; 4d600: 2649 moveal %a1,%a3 g = the_node->parent->parent; /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; u->color = RBT_BLACK; 4d602: 42ac 000c clrl %a4@(12) g->color = RBT_RED; 4d606: 2340 000c movel %d0,%a1@(12) 4d60a: 6000 fefc braw 4d508 <_RBTree_Validate_insert_unprotected+0xc> 4d60e: 2001 movel %d1,%d0 } else { /* if uncle is black */ 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) { 4d610: 9481 subl %d1,%d2 4d612: 5280 addql #1,%d0 4d614: 608a bras 4d5a0 <_RBTree_Validate_insert_unprotected+0xa4> /* 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; } 4d616: 2429 0004 movel %a1@(4),%d2 <== NOT EXECUTED 4d61a: 6000 ff28 braw 4d544 <_RBTree_Validate_insert_unprotected+0x48><== NOT EXECUTED if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) return the_node->parent->child[RBT_RIGHT]; 4d61e: 2869 0008 moveal %a1@(8),%a4 4d622: 6000 ff12 braw 4d536 <_RBTree_Validate_insert_unprotected+0x3a> =============================================================================== 0004c08a <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c08a: 4e56 0000 linkw %fp,#0 4c08e: 2f0a movel %a2,%sp@- 4c090: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4c094: 4a39 0005 e024 tstb 5e024 4c09a: 6758 beqs 4c0f4 <_RTEMS_tasks_Create_extension+0x6a> /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 4c09c: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c09e: 2f00 movel %d0,%sp@- 4c0a0: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !api ) 4c0a6: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c0a8: 2040 moveal %d0,%a0 if ( !api ) 4c0aa: 4a80 tstl %d0 4c0ac: 6758 beqs 4c106 <_RTEMS_tasks_Create_extension+0x7c> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c0ae: 2540 00fc movel %d0,%a2@(252) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c0b2: 4200 clrb %d0 api->pending_events = EVENT_SETS_NONE_PENDING; 4c0b4: 4290 clrl %a0@ 4c0b6: 1140 0008 moveb %d0,%a0@(8) api->event_condition = 0; 4c0ba: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c0be: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c0c2: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c0c6: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c0ca: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c0ce: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c0d2: 42aa 0108 clrl %a2@(264) if ( rtems_configuration_get_notepads_enabled() ) { 4c0d6: 4a39 0005 e024 tstb 5e024 4c0dc: 670c beqs 4c0ea <_RTEMS_tasks_Create_extension+0x60> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ bool _RTEMS_tasks_Create_extension( 4c0de: 41e8 001e lea %a0@(30),%a0 4c0e2: 7010 moveq #16,%d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4c0e4: 4298 clrl %a0@+ 4c0e6: 5380 subql #1,%d0 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4c0e8: 66fa bnes 4c0e4 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c0ea: 246e fffc moveal %fp@(-4),%a2 4c0ee: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4c0f0: 7001 moveq #1,%d0 } 4c0f2: 4e75 rts * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4c0f4: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4c0f6: 2f00 movel %d0,%sp@- 4c0f8: 4eb9 0004 a1be jsr 4a1be <_Workspace_Allocate> if ( !api ) 4c0fe: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c100: 2040 moveal %d0,%a0 if ( !api ) 4c102: 4a80 tstl %d0 4c104: 66a8 bnes 4c0ae <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c106: 246e fffc moveal %fp@(-4),%a2 4c10a: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4c10c: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 0004c034 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4c034: 4e56 fff4 linkw %fp,#-12 4c038: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c03c: 246e 000c moveal %fp@(12),%a2 4c040: 47f9 0004 c15c lea 4c15c <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 4c046: 206a 0108 moveal %a2@(264),%a0 deleted->task_variables = NULL; 4c04a: 42aa 0108 clrl %a2@(264) while (tvp) { 4c04e: 4a88 tstl %a0 4c050: 671e beqs 4c070 <_RTEMS_tasks_Delete_extension+0x3c> next = (rtems_task_variable_t *)tvp->next; 4c052: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c054: 2f08 movel %a0,%sp@- 4c056: 2f0a movel %a2,%sp@- 4c058: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c05a: 508f addql #8,%sp 4c05c: 4a82 tstl %d2 4c05e: 6710 beqs 4c070 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 4c060: 2042 moveal %d2,%a0 */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 4c062: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c064: 2f08 movel %a0,%sp@- 4c066: 2f0a movel %a2,%sp@- 4c068: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c06a: 508f addql #8,%sp 4c06c: 4a82 tstl %d2 4c06e: 66f0 bnes 4c060 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4c070: 2f2a 00fc movel %a2@(252),%sp@- 4c074: 4eb9 0004 a1da jsr 4a1da <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4c07a: 588f addql #4,%sp 4c07c: 42aa 00fc clrl %a2@(252) } 4c080: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4c086: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046f00 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f00: 4e56 ffe4 linkw %fp,#-28 46f04: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46f08: 2479 0005 e04a moveal 5e04a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46f0e: 2639 0005 e046 movel 5e046 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46f14: 4a8a tstl %a2 46f16: 6754 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f18: 4a83 tstl %d3 46f1a: 6750 beqs 46f6c <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46f1c: 280e movel %fp,%d4 46f1e: 4282 clrl %d2 46f20: 5984 subql #4,%d4 46f22: 47f9 0004 6cd8 lea 46cd8 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f28: 49f9 0004 6f88 lea 46f88 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46f2e: 2f04 movel %d4,%sp@- 46f30: 2f2a 000c movel %a2@(12),%sp@- 46f34: 2f2a 0014 movel %a2@(20),%sp@- 46f38: 2f2a 0004 movel %a2@(4),%sp@- 46f3c: 2f2a 0008 movel %a2@(8),%sp@- 46f40: 2f12 movel %a2@,%sp@- 46f42: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46f44: 4fef 0018 lea %sp@(24),%sp 46f48: 4a80 tstl %d0 46f4a: 662a bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46f4c: 2f2a 0018 movel %a2@(24),%sp@- 46f50: 2f2a 0010 movel %a2@(16),%sp@- 46f54: 2f2e fffc movel %fp@(-4),%sp@- 46f58: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46f5a: 4fef 000c lea %sp@(12),%sp 46f5e: 4a80 tstl %d0 46f60: 6614 bnes 46f76 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46f62: 5282 addql #1,%d2 46f64: 45ea 001c lea %a2@(28),%a2 46f68: b682 cmpl %d2,%d3 46f6a: 66c2 bnes 46f2e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 46f6c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46f72: 4e5e unlk %fp 46f74: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 46f76: 2f00 movel %d0,%sp@- 46f78: 4878 0001 pea 1 46f7c: 4878 0001 pea 1 46f80: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> ... =============================================================================== 0004bfb8 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 4bfb8: 4e56 ffec linkw %fp,#-20 4bfbc: 206e 0008 moveal %fp@(8),%a0 4bfc0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4bfc4: 2468 00fc moveal %a0@(252),%a2 if ( !api ) 4bfc8: 4a8a tstl %a2 4bfca: 671a beqs 4bfe6 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 4bfcc: 203c 0000 0700 movel #1792,%d0 4bfd2: 40c1 movew %sr,%d1 4bfd4: 8081 orl %d1,%d0 4bfd6: 46c0 movew %d0,%sr signal_set = asr->signals_posted; 4bfd8: 242a 0012 movel %a2@(18),%d2 asr->signals_posted = 0; 4bfdc: 42aa 0012 clrl %a2@(18) _ISR_Enable( level ); 4bfe0: 46c1 movew %d1,%sr if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 4bfe2: 4a82 tstl %d2 4bfe4: 660a bnes 4bff0 <_RTEMS_tasks_Post_switch_extension+0x38> (*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); } 4bfe6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4bfec: 4e5e unlk %fp 4bfee: 4e75 rts if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1; 4bff0: 52aa 001a addql #1,%a2@(26) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4bff4: 260e movel %fp,%d3 4bff6: 5983 subql #4,%d3 4bff8: 47f9 0004 dbd4 lea 4dbd4 ,%a3 4bffe: 2f03 movel %d3,%sp@- 4c000: 2f3c 0000 ffff movel #65535,%sp@- 4c006: 2f2a 000e movel %a2@(14),%sp@- 4c00a: 4e93 jsr %a3@ (*asr->handler)( signal_set ); 4c00c: 2f02 movel %d2,%sp@- 4c00e: 206a 000a moveal %a2@(10),%a0 4c012: 4e90 jsr %a0@ asr->nest_level -= 1; 4c014: 53aa 001a subql #1,%a2@(26) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 4c018: 2f03 movel %d3,%sp@- 4c01a: 2f3c 0000 ffff movel #65535,%sp@- 4c020: 2f2e fffc movel %fp@(-4),%sp@- 4c024: 4e93 jsr %a3@ 4c026: 4fef 001c lea %sp@(28),%sp } 4c02a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c030: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bf5e <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4bf5e: 4e56 0000 linkw %fp,#0 4bf62: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4bf66: 2068 0108 moveal %a0@(264),%a0 while (tvp) { 4bf6a: 4a88 tstl %a0 4bf6c: 6712 beqs 4bf80 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4bf6e: 2268 0004 moveal %a0@(4),%a1 4bf72: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4bf76: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4bf7a: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4bf7c: 4a88 tstl %a0 4bf7e: 66ee bnes 4bf6e <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4bf80: 206e 000c moveal %fp@(12),%a0 4bf84: 2068 0108 moveal %a0@(264),%a0 while (tvp) { 4bf88: 4a88 tstl %a0 4bf8a: 6712 beqs 4bf9e <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4bf8c: 2268 0004 moveal %a0@(4),%a1 4bf90: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4bf94: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4bf98: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4bf9a: 4a88 tstl %a0 4bf9c: 66ee bnes 4bf8c <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4bf9e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047e14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47e14: 4e56 fffc linkw %fp,#-4 47e18: 2f0a movel %a2,%sp@- 47e1a: 486e fffc pea %fp@(-4) 47e1e: 2f2e 0008 movel %fp@(8),%sp@- 47e22: 4879 0006 1730 pea 61730 <_Rate_monotonic_Information> 47e28: 4eb9 0004 9d64 jsr 49d64 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 47e2e: 4fef 000c lea %sp@(12),%sp 47e32: 2440 moveal %d0,%a2 47e34: 4aae fffc tstl %fp@(-4) 47e38: 663c bnes 47e76 <_Rate_monotonic_Timeout+0x62> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47e3a: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 47e3e: 2028 0010 movel %a0@(16),%d0 47e42: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47e48: 670a beqs 47e54 <_Rate_monotonic_Timeout+0x40> 47e4a: 202a 0008 movel %a2@(8),%d0 47e4e: b0a8 0020 cmpl %a0@(32),%d0 47e52: 676a beqs 47ebe <_Rate_monotonic_Timeout+0xaa> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 47e54: 7001 moveq #1,%d0 47e56: b0aa 0038 cmpl %a2@(56),%d0 47e5a: 6722 beqs 47e7e <_Rate_monotonic_Timeout+0x6a> <== NEVER TAKEN _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 47e5c: 7004 moveq #4,%d0 47e5e: 2540 0038 movel %d0,%a2@(56) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47e62: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47e68: 5380 subql #1,%d0 47e6a: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47e70: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47e76: 246e fff8 moveal %fp@(-8),%a2 47e7a: 4e5e unlk %fp 47e7c: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 47e7e: 103c 0003 moveb #3,%d0 47e82: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47e86: 2f0a movel %a2,%sp@- 47e88: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47e8e: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47e94: 486a 0010 pea %a2@(16) 47e98: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47e9e: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> 47ea4: 4fef 000c lea %sp@(12),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47ea8: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47eae: 5380 subql #1,%d0 47eb0: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47eb6: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47ebc: 60b8 bras 47e76 <_Rate_monotonic_Timeout+0x62> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47ebe: 2f3c 1003 fff8 movel #268697592,%sp@- 47ec4: 2f08 movel %a0,%sp@- 47ec6: 4eb9 0004 a6a4 jsr 4a6a4 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 47ecc: 2f0a movel %a2,%sp@- 47ece: 4eb9 0004 77b0 jsr 477b0 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47ed4: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47eda: 486a 0010 pea %a2@(16) 47ede: 4879 0006 18d8 pea 618d8 <_Watchdog_Ticks_chain> 47ee4: 4eb9 0004 b958 jsr 4b958 <_Watchdog_Insert> 47eea: 4fef 0014 lea %sp@(20),%sp * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 47eee: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47ef4: 5380 subql #1,%d0 47ef6: 23c0 0006 1820 movel %d0,61820 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 47efc: 2039 0006 1820 movel 61820 <_Thread_Dispatch_disable_level>,%d0 47f02: 6000 ff72 braw 47e76 <_Rate_monotonic_Timeout+0x62> ... =============================================================================== 0005db60 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 5db60: 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++; 5db64: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 5db6a: 5280 addql #1,%d0 5db6c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5db70: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> 5db76: 266e 0008 moveal %fp@(8),%a3 return _Thread_Dispatch_disable_level; 5db7a: 2039 0007 c4b4 movel 7c4b4 <_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(); 5db80: 2f39 0007 c554 movel 7c554 <_RTEMS_Allocator_Mutex>,%sp@- 5db86: 240b movel %a3,%d2 5db88: 0682 0000 0010 addil #16,%d2 RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uintptr_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 5db8e: 260b movel %a3,%d3 5db90: 49f9 0005 e2e4 lea 5e2e4 <_Thread_queue_First>,%a4 5db96: 0683 0000 0068 addil #104,%d3 5db9c: 4bf9 0005 8d00 lea 58d00 <_Heap_Allocate_aligned_with_boundary>,%a5 5dba2: 4eb9 0005 81cc jsr 581cc <_API_Mutex_Unlock> 5dba8: 588f addql #4,%sp 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 ); 5dbaa: 283c 0005 e1c8 movel #385480,%d4 /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 5dbb0: 2f02 movel %d2,%sp@- 5dbb2: 4e94 jsr %a4@ if ( the_thread == NULL ) 5dbb4: 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 ); 5dbb6: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5dbb8: 4a80 tstl %d0 5dbba: 6738 beqs 5dbf4 <_Region_Process_queue+0x94> 5dbbc: 42a7 clrl %sp@- 5dbbe: 42a7 clrl %sp@- 5dbc0: 2f2a 0024 movel %a2@(36),%sp@- 5dbc4: 2f03 movel %d3,%sp@- 5dbc6: 4e95 jsr %a5@ the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 5dbc8: 4fef 0010 lea %sp@(16),%sp 5dbcc: 4a80 tstl %d0 5dbce: 6724 beqs 5dbf4 <_Region_Process_queue+0x94> break; *(void **)the_thread->Wait.return_argument = the_segment; 5dbd0: 206a 0028 moveal %a2@(40),%a0 5dbd4: 2080 movel %d0,%a0@ the_region->number_of_used_blocks += 1; 5dbd6: 52ab 0064 addql #1,%a3@(100) _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 5dbda: 2044 moveal %d4,%a0 5dbdc: 2f0a movel %a2,%sp@- 5dbde: 2f02 movel %d2,%sp@- 5dbe0: 4e90 jsr %a0@ the_thread->Wait.return_code = RTEMS_SUCCESSFUL; } 5dbe2: 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; 5dbe4: 42aa 0034 clrl %a2@(52) /* * 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 ); 5dbe8: 2f02 movel %d2,%sp@- 5dbea: 4e94 jsr %a4@ if ( the_thread == NULL ) 5dbec: 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 ); 5dbee: 2440 moveal %d0,%a2 if ( the_thread == NULL ) 5dbf0: 4a80 tstl %d0 5dbf2: 66c8 bnes 5dbbc <_Region_Process_queue+0x5c> 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(); } 5dbf4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 5dbfa: 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(); 5dbfc: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> ... =============================================================================== 000490c0 <_Scheduler_EDF_Allocate>: #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 490c0: 4e56 0000 linkw %fp,#0 490c4: 2f0a movel %a2,%sp@- void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 490c6: 4878 0018 pea 18 #include void *_Scheduler_EDF_Allocate( Thread_Control *the_thread ) { 490ca: 246e 0008 moveal %fp@(8),%a2 void *sched; Scheduler_EDF_Per_thread *schinfo; sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) ); 490ce: 4eb9 0004 abda jsr 4abda <_Workspace_Allocate> if ( sched ) { 490d4: 588f addql #4,%sp 490d6: 4a80 tstl %d0 490d8: 670e beqs 490e8 <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN the_thread->scheduler_info = sched; 490da: 2540 008a movel %d0,%a2@(138) schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info); schinfo->thread = the_thread; 490de: 2040 moveal %d0,%a0 schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 490e0: 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; 490e2: 208a movel %a2,%a0@ schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; 490e4: 2141 0014 movel %d1,%a0@(20) } return sched; } 490e8: 246e fffc moveal %fp@(-4),%a2 490ec: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000490f0 <_Scheduler_EDF_Block>: #include void _Scheduler_EDF_Block( Thread_Control *the_thread ) { 490f0: 4e56 0000 linkw %fp,#0 490f4: 2f02 movel %d2,%sp@- 490f6: 242e 0008 movel %fp@(8),%d2 _Scheduler_EDF_Extract( the_thread ); 490fa: 2f02 movel %d2,%sp@- 490fc: 4eb9 0004 9178 jsr 49178 <_Scheduler_EDF_Extract> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 49102: 588f addql #4,%sp 49104: b4b9 0006 1348 cmpl 61348 <_Per_CPU_Information+0x10>,%d2 4910a: 6720 beqs 4912c <_Scheduler_EDF_Block+0x3c> <== ALWAYS TAKEN _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 4910c: b4b9 0006 1344 cmpl 61344 <_Per_CPU_Information+0xc>,%d2 <== NOT EXECUTED 49112: 6708 beqs 4911c <_Scheduler_EDF_Block+0x2c> <== NOT EXECUTED _Thread_Dispatch_necessary = true; } 49114: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 49118: 4e5e unlk %fp <== NOT EXECUTED 4911a: 4e75 rts <== NOT EXECUTED 4911c: 242e fffc movel %fp@(-4),%d2 49120: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 49122: 7001 moveq #1,%d0 49124: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> } 4912a: 4e75 rts _Scheduler_EDF_Extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_EDF_Schedule(); 4912c: 4eb9 0004 92b0 jsr 492b0 <_Scheduler_EDF_Schedule> if ( _Thread_Is_executing( the_thread ) ) 49132: b4b9 0006 1344 cmpl 61344 <_Per_CPU_Information+0xc>,%d2 49138: 66da bnes 49114 <_Scheduler_EDF_Block+0x24> <== NEVER TAKEN 4913a: 60e0 bras 4911c <_Scheduler_EDF_Block+0x2c> =============================================================================== 000491a4 <_Scheduler_EDF_Free>: #include void _Scheduler_EDF_Free( Thread_Control *the_thread ) { 491a4: 4e56 0000 linkw %fp,#0 491a8: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 491ac: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 491b2: 4e5e unlk %fp void _Scheduler_EDF_Free( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 491b4: 4ef9 0004 abf6 jmp 4abf6 <_Workspace_Free> ... =============================================================================== 0004925c <_Scheduler_EDF_Release_job>: void _Scheduler_EDF_Release_job( Thread_Control *the_thread, uint32_t deadline ) { 4925c: 4e56 0000 linkw %fp,#0 49260: 206e 0008 moveal %fp@(8),%a0 49264: 202e 000c movel %fp@(12),%d0 Priority_Control new_priority; if (deadline) { 49268: 661e bnes 49288 <_Scheduler_EDF_Release_job+0x2c><== ALWAYS TAKEN new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; 4926a: 2028 00ac movel %a0@(172),%d0 <== NOT EXECUTED } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 4926e: 4878 0001 pea 1 <== NOT EXECUTED 49272: 2f00 movel %d0,%sp@- <== NOT EXECUTED else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 49274: 2140 0018 movel %d0,%a0@(24) <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); 49278: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4927a: 4eb9 0004 95dc jsr 495dc <_Thread_Change_priority> <== NOT EXECUTED 49280: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } 49284: 4e5e unlk %fp <== NOT EXECUTED 49286: 4e75 rts <== NOT EXECUTED { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 49288: 2239 0006 12b0 movel 612b0 <_Watchdog_Ticks_since_boot>,%d1 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 4928e: 4878 0001 pea 1 { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) 49292: d081 addl %d1,%d0 49294: 0880 001f bclr #31,%d0 /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); 49298: 2f00 movel %d0,%sp@- else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; 4929a: 2140 0018 movel %d0,%a0@(24) _Thread_Change_priority(the_thread, new_priority, true); 4929e: 2f08 movel %a0,%sp@- 492a0: 4eb9 0004 95dc jsr 495dc <_Thread_Change_priority> 492a6: 4fef 000c lea %sp@(12),%sp } 492aa: 4e5e unlk %fp ... =============================================================================== 000492d4 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { 492d4: 4e56 0000 linkw %fp,#0 492d8: 2f0a movel %a2,%sp@- 492da: 246e 0008 moveal %fp@(8),%a2 _Scheduler_EDF_Enqueue(the_thread); 492de: 2f0a movel %a2,%sp@- 492e0: 4eb9 0004 9148 jsr 49148 <_Scheduler_EDF_Enqueue> 492e6: 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( 492ea: 2079 0006 1348 moveal 61348 <_Per_CPU_Information+0x10>,%a0 492f0: 2f28 0014 movel %a0@(20),%sp@- 492f4: 2079 0005 f8fe moveal 5f8fe <_Scheduler+0x30>,%a0 492fa: 4e90 jsr %a0@ 492fc: 4fef 000c lea %sp@(12),%sp 49300: 4a80 tstl %d0 49302: 6d08 blts 4930c <_Scheduler_EDF_Unblock+0x38> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } 49304: 246e fffc moveal %fp@(-4),%a2 49308: 4e5e unlk %fp 4930a: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4930c: 2079 0006 1344 moveal 61344 <_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; 49312: 23ca 0006 1348 movel %a2,61348 <_Per_CPU_Information+0x10> if ( _Thread_Executing->is_preemptible || 49318: 4a28 0074 tstb %a0@(116) 4931c: 6710 beqs 4932e <_Scheduler_EDF_Unblock+0x5a> <== NEVER TAKEN the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 4931e: 7001 moveq #1,%d0 49320: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> } } 49326: 246e fffc moveal %fp@(-4),%a2 4932a: 4e5e unlk %fp 4932c: 4e75 rts */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4932e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 49332: 66d0 bnes 49304 <_Scheduler_EDF_Unblock+0x30> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 49334: 7001 moveq #1,%d0 <== NOT EXECUTED 49336: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4933c: 60e8 bras 49326 <_Scheduler_EDF_Unblock+0x52> <== NOT EXECUTED ... =============================================================================== 00049340 <_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) { 49340: 7202 moveq #2,%d1 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 49342: 4e56 0000 linkw %fp,#0 49346: 2f0a movel %a2,%sp@- 49348: 246e 0008 moveal %fp@(8),%a2 Scheduler_EDF_Per_thread *sched_info = 4934c: 206a 008a moveal %a2@(138),%a0 (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) { 49350: 2028 0014 movel %a0@(20),%d0 #include void _Scheduler_EDF_Update( Thread_Control *the_thread ) { 49354: 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) { 49356: b280 cmpl %d0,%d1 49358: 6712 beqs 4936c <_Scheduler_EDF_Update+0x2c> the_thread->real_priority = the_thread->Start.initial_priority; 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 ) { 4935a: 7201 moveq #1,%d1 4935c: b280 cmpl %d0,%d1 4935e: 6730 beqs 49390 <_Scheduler_EDF_Update+0x50> <== NEVER TAKEN if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49360: 242e fff8 movel %fp@(-8),%d2 49364: 246e fffc moveal %fp@(-4),%a2 49368: 4e5e unlk %fp 4936a: 4e75 rts (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) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 4936c: 202a 00ac movel %a2@(172),%d0 49370: 08c0 001f bset #31,%d0 if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49374: 242e fff8 movel %fp@(-8),%d2 (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) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); 49378: 2540 00ac movel %d0,%a2@(172) the_thread->real_priority = the_thread->Start.initial_priority; 4937c: 2540 0018 movel %d0,%a2@(24) the_thread->current_priority = the_thread->Start.initial_priority; 49380: 2540 0014 movel %d0,%a2@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 49384: 246e fffc moveal %fp@(-4),%a2 49388: 4e5e unlk %fp if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) { /* Shifts the priority to the region of background tasks. */ the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB); the_thread->real_priority = the_thread->Start.initial_priority; the_thread->current_priority = the_thread->Start.initial_priority; sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY; 4938a: 42a8 0014 clrl %a0@(20) if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 4938e: 4e75 rts 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); 49390: 2408 movel %a0,%d2 <== NOT EXECUTED 49392: 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); 49394: 2f02 movel %d2,%sp@- <== NOT EXECUTED 49396: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4939c: 4eb9 0004 d4d0 jsr 4d4d0 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node); 493a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 493a4: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 493aa: 4eb9 0004 d6fa jsr 4d6fa <_RBTree_Insert> <== NOT EXECUTED _Scheduler_EDF_Schedule(); 493b0: 4eb9 0004 92b0 jsr 492b0 <_Scheduler_EDF_Schedule> <== NOT EXECUTED if ( _Thread_Executing != _Thread_Heir ) { 493b6: 2079 0006 1344 moveal 61344 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 493bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 493c0: b1f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a0 <== NOT EXECUTED 493c6: 6798 beqs 49360 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED if ( _Thread_Executing->is_preemptible || 493c8: 4a28 0074 tstb %a0@(116) <== NOT EXECUTED 493cc: 6606 bnes 493d4 <_Scheduler_EDF_Update+0x94> <== NOT EXECUTED 493ce: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 493d2: 668c bnes 49360 <_Scheduler_EDF_Update+0x20> <== NOT EXECUTED the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; } } } 493d4: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493d8: 7001 moveq #1,%d0 <== NOT EXECUTED } } } 493da: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 493de: 4e5e unlk %fp <== NOT EXECUTED _Scheduler_EDF_Schedule(); if ( _Thread_Executing != _Thread_Heir ) { if ( _Thread_Executing->is_preemptible || the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; 493e0: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED } } } =============================================================================== 000493e8 <_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 ); 493e8: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED #include #include #include void _Scheduler_EDF_Yield(void) { 493ee: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 493f2: 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; 493f6: 2479 0006 1344 moveal 61344 <_Per_CPU_Information+0xc>,%a2 <== NOT EXECUTED Scheduler_EDF_Per_thread *executing_info = 493fc: 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 ); 49400: 40c2 movew %sr,%d2 <== NOT EXECUTED 49402: 8082 orl %d2,%d0 <== NOT EXECUTED 49404: 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); 49406: 2079 0006 135e moveal 6135e <_Scheduler_EDF_Ready_queue+0x4>,%a0<== NOT EXECUTED 4940c: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED 49410: 674a beqs 4945c <_Scheduler_EDF_Yield+0x74> <== 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); 49412: 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 ); 49414: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49416: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4941c: 4eb9 0004 d4d0 jsr 4d4d0 <_RBTree_Extract> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); 49422: 2f03 movel %d3,%sp@- <== NOT EXECUTED 49424: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4942a: 4eb9 0004 d6fa jsr 4d6fa <_RBTree_Insert> <== NOT EXECUTED _ISR_Flash( level ); 49430: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 49436: 46c2 movew %d2,%sr <== NOT EXECUTED 49438: 8082 orl %d2,%d0 <== NOT EXECUTED 4943a: 46c0 movew %d0,%sr <== NOT EXECUTED if ( _Thread_Is_heir( executing ) ) { 4943c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 49440: b5f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 49446: 672c beqs 49474 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 49448: 7001 moveq #1,%d0 <== NOT EXECUTED 4944a: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED _ISR_Enable( level ); 49450: 46c2 movew %d2,%sr <== NOT EXECUTED } 49452: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 49458: 4e5e unlk %fp <== NOT EXECUTED 4945a: 4e75 rts <== NOT EXECUTED 4945c: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED 49460: 66b0 bnes 49412 <_Scheduler_EDF_Yield+0x2a> <== NOT EXECUTED _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 49462: b5f9 0006 1348 cmpal 61348 <_Per_CPU_Information+0x10>,%a2 <== NOT EXECUTED 49468: 67e6 beqs 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _Thread_Dispatch_necessary = true; 4946a: 7001 moveq #1,%d0 <== NOT EXECUTED 4946c: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 49472: 60dc bras 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) { first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT ); 49474: 42a7 clrl %sp@- <== NOT EXECUTED 49476: 4879 0006 135a pea 6135a <_Scheduler_EDF_Ready_queue> <== NOT EXECUTED 4947c: 4eb9 0004 d728 jsr 4d728 <_RBTree_Peek> <== NOT EXECUTED first_info = _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node); _Thread_Heir = first_info->thread; 49482: 508f addql #8,%sp <== NOT EXECUTED 49484: 2040 moveal %d0,%a0 <== NOT EXECUTED 49486: 5988 subql #4,%a0 <== NOT EXECUTED 49488: 23d0 0006 1348 movel %a0@,61348 <_Per_CPU_Information+0x10><== NOT EXECUTED } _Thread_Dispatch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; 4948e: 7001 moveq #1,%d0 <== NOT EXECUTED 49490: 13c0 0006 1350 moveb %d0,61350 <_Per_CPU_Information+0x18> <== NOT EXECUTED 49496: 60b8 bras 49450 <_Scheduler_EDF_Yield+0x68> <== NOT EXECUTED =============================================================================== 00048720 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 48720: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 48724: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 48726: 2279 0005 e0c2 moveal 5e0c2 <_Scheduler+0x4>,%a1 4872c: 4ed1 jmp %a1@ ... =============================================================================== 0004874c <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 4874c: 4e56 0000 linkw %fp,#0 48750: 206e 0008 moveal %fp@(8),%a0 48754: 2f0b movel %a3,%sp@- 48756: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 48758: 2468 008a moveal %a0@(138),%a2 ready = sched_info->ready_chain; 4875c: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 4875e: 2029 0008 movel %a1@(8),%d0 48762: b091 cmpl %a1@,%d0 48764: 6700 0088 beqw 487ee <_Scheduler_priority_Block+0xa2> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 48768: 2450 moveal %a0@,%a2 previous = the_node->previous; 4876a: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 4876e: 2549 0004 movel %a1,%a2@(4) previous->next = next; 48772: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48774: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 4877a: 6720 beqs 4879c <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 4877c: b1f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a0 48782: 6708 beqs 4878c <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 48784: 245f moveal %sp@+,%a2 48786: 265f moveal %sp@+,%a3 48788: 4e5e unlk %fp 4878a: 4e75 rts 4878c: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 4878e: 7001 moveq #1,%d0 } 48790: 265f moveal %sp@+,%a3 48792: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48794: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> } 4879a: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 4879c: 3039 0005 fae4 movew 5fae4 <_Priority_Major_bit_map>,%d0 487a2: 4840 swap %d0 487a4: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 487a6: 43f9 0005 fae8 lea 5fae8 <_Priority_Bit_map>,%a1 487ac: 0280 0000 ffff andil #65535,%d0 487b2: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 487b6: 4841 swap %d1 487b8: 04c1 ff1 %d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 487ba: 2279 0005 e0be moveal 5e0be <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 487c0: 0281 0000 ffff andil #65535,%d1 487c6: e988 lsll #4,%d0 487c8: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 487ca: 2200 movel %d0,%d1 487cc: e988 lsll #4,%d0 487ce: e589 lsll #2,%d1 487d0: 9081 subl %d1,%d0 487d2: d3c0 addal %d0,%a1 487d4: 2019 movel %a1@+,%d0 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 487d6: b3c0 cmpal %d0,%a1 487d8: 56c1 sne %d1 487da: 49c1 extbl %d1 * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 487dc: c081 andl %d1,%d0 487de: 23c0 0005 fad0 movel %d0,5fad0 <_Per_CPU_Information+0x10> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 487e4: b1f9 0005 facc cmpal 5facc <_Per_CPU_Information+0xc>,%a0 487ea: 6698 bnes 48784 <_Scheduler_priority_Block+0x38> 487ec: 609e bras 4878c <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 487ee: 266a 0004 moveal %a2@(4),%a3 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 487f2: 2009 movel %a1,%d0 487f4: 5880 addql #4,%d0 487f6: 2280 movel %d0,%a1@ 487f8: 3213 movew %a3@,%d1 487fa: 302a 000e movew %a2@(14),%d0 head->next = tail; head->previous = NULL; 487fe: 42a9 0004 clrl %a1@(4) 48802: c081 andl %d1,%d0 tail->previous = head; 48804: 2349 0008 movel %a1,%a1@(8) 48808: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 4880a: 6600 ff68 bnew 48774 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 4880e: 3239 0005 fae4 movew 5fae4 <_Priority_Major_bit_map>,%d1 48814: 302a 000c movew %a2@(12),%d0 48818: c081 andl %d1,%d0 4881a: 33c0 0005 fae4 movew %d0,5fae4 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48820: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 48826: 6600 ff54 bnew 4877c <_Scheduler_priority_Block+0x30> 4882a: 6000 ff70 braw 4879c <_Scheduler_priority_Block+0x50> ... =============================================================================== 00048924 <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 48924: 4e56 0000 linkw %fp,#0 48928: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 4892c: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 48932: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 48934: 4ef9 0004 a1da jmp 4a1da <_Workspace_Free> ... =============================================================================== 000490ec <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 490ec: 4e56 0000 linkw %fp,#0 490f0: 2f02 movel %d2,%sp@- 490f2: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 490f6: 2f02 movel %d2,%sp@- 490f8: 4eb9 0004 9150 jsr 49150 <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 490fe: 588f addql #4,%sp 49100: b4b9 0006 09f8 cmpl 609f8 <_Per_CPU_Information+0x10>,%d2 49106: 6720 beqs 49128 <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 49108: b4b9 0006 09f4 cmpl 609f4 <_Per_CPU_Information+0xc>,%d2 4910e: 6708 beqs 49118 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 49110: 242e fffc movel %fp@(-4),%d2 49114: 4e5e unlk %fp 49116: 4e75 rts 49118: 242e fffc movel %fp@(-4),%d2 4911c: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 4911e: 7001 moveq #1,%d0 49120: 13c0 0006 0a00 moveb %d0,60a00 <_Per_CPU_Information+0x18> } 49126: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 49128: 4eb9 0004 9264 jsr 49264 <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 4912e: b4b9 0006 09f4 cmpl 609f4 <_Per_CPU_Information+0xc>,%d2 49134: 66da bnes 49110 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 49136: 60e0 bras 49118 <_Scheduler_simple_Block+0x2c> =============================================================================== 00047a38 <_TOD_Tickle_ticks>: * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47a38: 4e56 ffec linkw %fp,#-20 Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 47a3c: 2239 0005 dfe8 movel 5dfe8 ,%d1 * * Output parameters: NONE */ void _TOD_Tickle_ticks( void ) { 47a42: 48d7 040c moveml %d2-%d3/%a2,%sp@ /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a46: 240e movel %fp,%d2 47a48: 5182 subql #8,%d2 { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 47a4a: 263c 0000 03e8 movel #1000,%d3 47a50: 4c03 1800 mulsl %d3,%d1 /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a54: 45f9 0004 9ba0 lea 49ba0 <_Timespec_Add_to>,%a2 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 47a5a: 2039 0005 fa38 movel 5fa38 <_Watchdog_Ticks_since_boot>,%d0 47a60: 5280 addql #1,%d0 /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a62: 2f02 movel %d2,%sp@- 47a64: 4879 0005 f9b2 pea 5f9b2 <_TOD_Uptime> { Timestamp_Control tick; uint32_t seconds; /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() ); 47a6a: 2d41 fffc movel %d1,%fp@(-4) 47a6e: 42ae fff8 clrl %fp@(-8) /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; 47a72: 23c0 0005 fa38 movel %d0,5fa38 <_Watchdog_Ticks_since_boot> /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); 47a78: 4e92 jsr %a2@ /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 47a7a: 2f02 movel %d2,%sp@- 47a7c: 4879 0005 f9c2 pea 5f9c2 <_TOD_Now> 47a82: 4e92 jsr %a2@ while ( seconds ) { 47a84: 4fef 0010 lea %sp@(16),%sp /* Update the timespec format uptime */ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); 47a88: 2400 movel %d0,%d2 while ( seconds ) { 47a8a: 6716 beqs 47aa2 <_TOD_Tickle_ticks+0x6a> 47a8c: 45f9 0004 a0dc lea 4a0dc <_Watchdog_Tickle>,%a2 */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); 47a92: 4879 0005 f9e4 pea 5f9e4 <_Watchdog_Seconds_chain> _Watchdog_Tickle_seconds(); seconds--; 47a98: 5382 subql #1,%d2 47a9a: 4e92 jsr %a2@ _Timestamp_Add_to( &_TOD_Uptime, &tick ); /* we do not care how much the uptime changed */ /* Update the timespec format TOD */ seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick ); while ( seconds ) { 47a9c: 588f addql #4,%sp 47a9e: 4a82 tstl %d2 47aa0: 66f0 bnes 47a92 <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN _Watchdog_Tickle_seconds(); seconds--; } } 47aa2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47aa8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047754 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47754: 4e56 0000 linkw %fp,#0 47758: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 4775c: 2039 0006 03f8 movel 603f8 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 47762: 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) || 47764: 4a88 tstl %a0 47766: 6762 beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 47768: 243c 000f 4240 movel #1000000,%d2 4776e: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 47772: b4a8 0018 cmpl %a0@(24),%d2 47776: 6352 blss 477ca <_TOD_Validate+0x76> (the_tod->ticks >= ticks_per_second) || 47778: 703b moveq #59,%d0 4777a: b0a8 0014 cmpl %a0@(20),%d0 4777e: 654a bcss 477ca <_TOD_Validate+0x76> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 47780: b0a8 0010 cmpl %a0@(16),%d0 47784: 6544 bcss 477ca <_TOD_Validate+0x76> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 47786: 7217 moveq #23,%d1 47788: b2a8 000c cmpl %a0@(12),%d1 4778c: 653c bcss 477ca <_TOD_Validate+0x76> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 4778e: 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) || 47792: 6736 beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 47794: 740c moveq #12,%d2 47796: b480 cmpl %d0,%d2 47798: 6530 bcss 477ca <_TOD_Validate+0x76> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 4779a: 2210 movel %a0@,%d1 (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 4779c: 0c81 0000 07c3 cmpil #1987,%d1 477a2: 6326 blss 477ca <_TOD_Validate+0x76> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 477a4: 2068 0008 moveal %a0@(8),%a0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 477a8: 4a88 tstl %a0 477aa: 671e beqs 477ca <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 477ac: 143c 0003 moveb #3,%d2 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477b0: 43f9 0005 f638 lea 5f638 <_TOD_Days_per_month>,%a1 (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 477b6: c282 andl %d2,%d1 477b8: 6618 bnes 477d2 <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 477ba: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 477be: b1c0 cmpal %d0,%a0 477c0: 53c0 sls %d0 477c2: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477c4: 241f movel %sp@+,%d2 477c6: 4e5e unlk %fp 477c8: 4e75 rts 477ca: 241f movel %sp@+,%d2 477cc: 4e5e unlk %fp (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 477ce: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 477d0: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 477d2: 2031 0c00 movel %a1@(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( 477d6: b1c0 cmpal %d0,%a0 477d8: 53c0 sls %d0 477da: 4480 negl %d0 477dc: 60e6 bras 477c4 <_TOD_Validate+0x70> ... =============================================================================== 00048c54 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c54: 4e56 fff0 linkw %fp,#-16 48c58: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48c5c: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 48c60: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c64: 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 ); 48c68: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 48c6a: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 48c6e: 4eb9 0004 9a24 jsr 49a24 <_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 ) 48c74: 588f addql #4,%sp 48c76: b4aa 0014 cmpl %a2@(20),%d2 48c7a: 670c beqs 48c88 <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48c7c: 2f02 movel %d2,%sp@- 48c7e: 2f0a movel %a2,%sp@- 48c80: 4eb9 0004 99c0 jsr 499c0 <_Thread_Set_priority> 48c86: 508f addql #8,%sp _ISR_Disable( level ); 48c88: 203c 0000 0700 movel #1792,%d0 48c8e: 40c2 movew %sr,%d2 48c90: 8082 orl %d2,%d0 48c92: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 48c94: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 48c98: 7204 moveq #4,%d1 48c9a: b280 cmpl %d0,%d1 48c9c: 6738 beqs 48cd6 <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 48c9e: 44c3 movew %d3,%ccr 48ca0: 6708 beqs 48caa <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 48ca2: 72fb moveq #-5,%d1 48ca4: c280 andl %d0,%d1 48ca6: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 48caa: 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); 48cac: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 48cb2: 660a bnes 48cbe <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48cb4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48cba: 4e5e unlk %fp 48cbc: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 48cbe: 2d4a 000c movel %a2,%fp@(12) 48cc2: 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 ); } 48cc8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48cce: 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 ); 48cd0: 4ef9 0004 9910 jmp 49910 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 48cd6: 44c3 movew %d3,%ccr 48cd8: 6714 beqs 48cee <_Thread_Change_priority+0x9a> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 48cda: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 48cde: 4a04 tstb %d4 48ce0: 6748 beqs 48d2a <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 48ce2: 2f0a movel %a2,%sp@- 48ce4: 2079 0005 e0e6 moveal 5e0e6 <_Scheduler+0x28>,%a0 48cea: 4e90 jsr %a0@ 48cec: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 48cee: 203c 0000 0700 movel #1792,%d0 48cf4: 46c2 movew %d2,%sr 48cf6: 8082 orl %d2,%d0 48cf8: 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(); 48cfa: 2079 0005 e0c6 moveal 5e0c6 <_Scheduler+0x8>,%a0 48d00: 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 ); 48d02: 2079 0005 facc moveal 5facc <_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() && 48d08: b1f9 0005 fad0 cmpal 5fad0 <_Per_CPU_Information+0x10>,%a0 48d0e: 670e beqs 48d1e <_Thread_Change_priority+0xca> 48d10: 4a28 0074 tstb %a0@(116) 48d14: 6708 beqs 48d1e <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 48d16: 7001 moveq #1,%d0 48d18: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> _ISR_Enable( level ); 48d1e: 46c2 movew %d2,%sr } 48d20: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48d26: 4e5e unlk %fp 48d28: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 48d2a: 2f0a movel %a2,%sp@- 48d2c: 2079 0005 e0e2 moveal 5e0e2 <_Scheduler+0x24>,%a0 48d32: 4e90 jsr %a0@ 48d34: 588f addql #4,%sp 48d36: 60b6 bras 48cee <_Thread_Change_priority+0x9a> =============================================================================== 00048d94 <_Thread_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48d94: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 48d96: 4e56 0000 linkw %fp,#0 48d9a: 2f0b movel %a3,%sp@- 48d9c: 266e 0008 moveal %fp@(8),%a3 48da0: 2f0a movel %a2,%sp@- 48da2: 246e 000c moveal %fp@(12),%a2 48da6: 206b 0018 moveal %a3@(24),%a0 48daa: 302a 000a movew %a2@(10),%d0 48dae: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 48db2: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48db8: 5380 subql #1,%d0 48dba: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48dc0: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 48dc6: 2f0a movel %a2,%sp@- 48dc8: 4eb9 0004 9e28 jsr 49e28 <_User_extensions_Thread_delete> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48dce: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48dd4: 5280 addql #1,%d0 48dd6: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48ddc: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 48de2: 2f0a movel %a2,%sp@- 48de4: 2f0b movel %a3,%sp@- 48de6: 4eb9 0004 7fc4 jsr 47fc4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 48dec: 4878 0001 pea 1 48df0: 2f0a movel %a2,%sp@- 48df2: 4eb9 0004 99d8 jsr 499d8 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 48df8: 2f0a movel %a2,%sp@- 48dfa: 4eb9 0004 981c jsr 4981c <_Thread_queue_Extract_with_proxy> 48e00: 4fef 0018 lea %sp@(24),%sp 48e04: 4a00 tstb %d0 48e06: 660a bnes 48e12 <_Thread_Close+0x7e> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 48e08: 7002 moveq #2,%d0 48e0a: b0aa 0050 cmpl %a2@(80),%d0 48e0e: 6700 0088 beqw 48e98 <_Thread_Close+0x104> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 48e12: 2f0a movel %a2,%sp@- 48e14: 2079 0005 e0da moveal 5e0da <_Scheduler+0x1c>,%a0 48e1a: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48e1c: 588f addql #4,%sp 48e1e: b5f9 0005 f9ba cmpal 5f9ba <_Thread_Allocated_fp>,%a2 48e24: 6736 beqs 48e5c <_Thread_Close+0xc8> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48e26: 2f2a 00b8 movel %a2@(184),%sp@- 48e2a: 47f9 0004 a1da lea 4a1da <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48e30: 42aa 00f4 clrl %a2@(244) _Workspace_Free( the_thread->Start.fp_context ); 48e34: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48e36: 2f0a movel %a2,%sp@- 48e38: 4eb9 0004 9ad0 jsr 49ad0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48e3e: 2f2a 0104 movel %a2@(260),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48e42: 42aa 00bc clrl %a2@(188) _Workspace_Free( the_thread->extensions ); 48e46: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48e48: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48e4c: 4fef 000c lea %sp@(12),%sp 48e50: 42aa 0104 clrl %a2@(260) } 48e54: 246e fff8 moveal %fp@(-8),%a2 48e58: 4e5e unlk %fp 48e5a: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48e5c: 2f2a 00b8 movel %a2@(184),%sp@- 48e60: 47f9 0004 a1da lea 4a1da <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48e66: 42aa 00f4 clrl %a2@(244) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 48e6a: 42b9 0005 f9ba clrl 5f9ba <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 48e70: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48e72: 2f0a movel %a2,%sp@- 48e74: 4eb9 0004 9ad0 jsr 49ad0 <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48e7a: 2f2a 0104 movel %a2@(260),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48e7e: 42aa 00bc clrl %a2@(188) _Workspace_Free( the_thread->extensions ); 48e82: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48e84: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48e88: 4fef 000c lea %sp@(12),%sp 48e8c: 42aa 0104 clrl %a2@(260) } 48e90: 246e fff8 moveal %fp@(-8),%a2 48e94: 4e5e unlk %fp 48e96: 4e75 rts */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 48e98: 486a 0048 pea %a2@(72) 48e9c: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 48ea2: 588f addql #4,%sp 48ea4: 2079 0005 e0da moveal 5e0da <_Scheduler+0x1c>,%a0 48eaa: 2f0a movel %a2,%sp@- 48eac: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48eae: 588f addql #4,%sp 48eb0: b5f9 0005 f9ba cmpal 5f9ba <_Thread_Allocated_fp>,%a2 48eb6: 6600 ff6e bnew 48e26 <_Thread_Close+0x92> 48eba: 60a0 bras 48e5c <_Thread_Close+0xc8> <== NOT EXECUTED =============================================================================== 00048f74 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 48f74: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48f78: 486e fffc pea %fp@(-4) 48f7c: 2f2e 0008 movel %fp@(8),%sp@- 48f80: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 48f86: 508f addql #8,%sp 48f88: 4aae fffc tstl %fp@(-4) 48f8c: 6624 bnes 48fb2 <_Thread_Delay_ended+0x3e> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 48f8e: 2f3c 1000 0018 movel #268435480,%sp@- 48f94: 2f00 movel %d0,%sp@- 48f96: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 48f9c: 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--; 48f9e: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fa4: 5380 subql #1,%d0 48fa6: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48fac: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48fb2: 4e5e unlk %fp ... =============================================================================== 00048fb8 <_Thread_Dispatch>: * INTERRUPT LATENCY: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 48fb8: 4e56 ffc8 linkw %fp,#-56 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 48fbc: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fc2: 5280 addql #1,%d0 48fc4: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 48fca: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 48fd0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); 48fd4: 283c 0000 0700 movel #1792,%d4 48fda: 2004 movel %d4,%d0 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; 48fdc: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 48fe2: 40c1 movew %sr,%d1 48fe4: 8081 orl %d1,%d0 48fe6: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 48fe8: 1039 0005 fad8 moveb 5fad8 <_Per_CPU_Information+0x18>,%d0 48fee: 6700 0110 beqw 49100 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 48ff2: 2679 0005 fad0 moveal 5fad0 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 48ff8: 4200 clrb %d0 _Thread_Executing = heir; 48ffa: 23cb 0005 facc movel %a3,5facc <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 49000: 13c0 0005 fad8 moveb %d0,5fad8 <_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 ) 49006: b7ca cmpal %a2,%a3 49008: 6700 00f6 beqw 49100 <_Thread_Dispatch+0x148> 4900c: 260e movel %fp,%d3 4900e: 240e movel %fp,%d2 49010: 0683 ffff fff0 addil #-16,%d3 49016: 2e3c 0004 c3b4 movel #312244,%d7 4901c: 5182 subql #8,%d2 4901e: 2c3c 0004 9be8 movel #302056,%d6 49024: 2a3c 0004 9ba0 movel #301984,%d5 4902a: 4bf9 0004 9eb4 lea 49eb4 <_User_extensions_Thread_switch>,%a5 49030: 49f9 0004 a228 lea 4a228 <_CPU_Context_switch>,%a4 */ #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 ) 49036: 7001 moveq #1,%d0 49038: b0ab 007a cmpl %a3@(122),%d0 4903c: 6700 00e8 beqw 49126 <_Thread_Dispatch+0x16e> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 49040: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 49042: 2f03 movel %d3,%sp@- 49044: 2047 moveal %d7,%a0 49046: 4e90 jsr %a0@ _Timestamp_Subtract( 49048: 2046 moveal %d6,%a0 4904a: 2f02 movel %d2,%sp@- 4904c: 2f03 movel %d3,%sp@- 4904e: 4879 0005 fada pea 5fada <_Per_CPU_Information+0x1a> 49054: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 49056: 2045 moveal %d5,%a0 49058: 2f02 movel %d2,%sp@- 4905a: 486a 0082 pea %a2@(130) 4905e: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 49060: 2079 0005 f9be moveal 5f9be <_Thread_libc_reent>,%a0 49066: 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; 4906a: 202e fff0 movel %fp@(-16),%d0 4906e: 222e fff4 movel %fp@(-12),%d1 49072: 23c0 0005 fada movel %d0,5fada <_Per_CPU_Information+0x1a> 49078: 23c1 0005 fade movel %d1,5fade <_Per_CPU_Information+0x1e> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 4907e: 4a88 tstl %a0 49080: 6708 beqs 4908a <_Thread_Dispatch+0xd2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 49082: 2550 00f8 movel %a0@,%a2@(248) *_Thread_libc_reent = heir->libc_reent; 49086: 20ab 00f8 movel %a3@(248),%a0@ } _User_extensions_Thread_switch( executing, heir ); 4908a: 2f0b movel %a3,%sp@- 4908c: 2f0a movel %a2,%sp@- 4908e: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 49090: 486b 00c0 pea %a3@(192) 49094: 486a 00c0 pea %a2@(192) 49098: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4909a: 4fef 0010 lea %sp@(16),%sp 4909e: 4aaa 00f4 tstl %a2@(244) 490a2: 672c beqs 490d0 <_Thread_Dispatch+0x118> #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 ); 490a4: 2079 0005 f9ba moveal 5f9ba <_Thread_Allocated_fp>,%a0 490aa: b1ca cmpal %a2,%a0 490ac: 6722 beqs 490d0 <_Thread_Dispatch+0x118> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 490ae: 4a88 tstl %a0 490b0: 670c beqs 490be <_Thread_Dispatch+0x106> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 490b2: 4868 00f4 pea %a0@(244) 490b6: 4eb9 0004 a358 jsr 4a358 <_CPU_Context_save_fp> 490bc: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 490be: 486a 00f4 pea %a2@(244) 490c2: 4eb9 0004 a390 jsr 4a390 <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 490c8: 588f addql #4,%sp 490ca: 23ca 0005 f9ba movel %a2,5f9ba <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 490d0: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 490d6: 2004 movel %d4,%d0 490d8: 40c1 movew %sr,%d1 490da: 8081 orl %d1,%d0 490dc: 46c0 movew %d0,%sr /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 490de: 1039 0005 fad8 moveb 5fad8 <_Per_CPU_Information+0x18>,%d0 490e4: 671a beqs 49100 <_Thread_Dispatch+0x148> heir = _Thread_Heir; 490e6: 2679 0005 fad0 moveal 5fad0 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_necessary = false; 490ec: 4200 clrb %d0 _Thread_Executing = heir; 490ee: 23cb 0005 facc movel %a3,5facc <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_necessary = false; 490f4: 13c0 0005 fad8 moveb %d0,5fad8 <_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 ) 490fa: b5cb cmpal %a3,%a2 490fc: 6600 ff38 bnew 49036 <_Thread_Dispatch+0x7e> _ISR_Disable( level ); } post_switch: _ISR_Enable( level ); 49100: 46c1 movew %d1,%sr * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49102: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 49108: 5380 subql #1,%d0 4910a: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49110: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); _API_extensions_Run_postswitch(); 49116: 4eb9 0004 73ea jsr 473ea <_API_extensions_Run_postswitch> } 4911c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 49122: 4e5e unlk %fp 49124: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 49126: 41f9 0005 f8f0 lea 5f8f0 <_Thread_Ticks_per_timeslice>,%a0 4912c: 2750 0076 movel %a0@,%a3@(118) 49130: 6000 ff0e braw 49040 <_Thread_Dispatch+0x88> =============================================================================== 00049134 <_Thread_Enable_dispatch>: * dispatch thread * no dispatch thread */ #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { 49134: 4e56 0000 linkw %fp,#0 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { _Thread_Dispatch_disable_level--; 49138: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 4913e: 5380 subql #1,%d0 49140: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 49146: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 if ( _Thread_Dispatch_decrement_disable_level() ) 4914c: 6704 beqs 49152 <_Thread_Enable_dispatch+0x1e> return; _Thread_Dispatch(); } 4914e: 4e5e unlk %fp 49150: 4e75 rts 49152: 4e5e unlk %fp #if defined (__THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ ) void _Thread_Enable_dispatch( void ) { if ( _Thread_Dispatch_decrement_disable_level() ) return; _Thread_Dispatch(); 49154: 4ef9 0004 8fb8 jmp 48fb8 <_Thread_Dispatch> ... =============================================================================== 0004debc <_Thread_Handler>: * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4debc: 4e56 0000 linkw %fp,#0 4dec0: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static bool doneConstructors; bool doCons; #endif executing = _Thread_Executing; 4dec2: 2479 0005 facc moveal 5facc <_Per_CPU_Information+0xc>,%a2 * Input parameters: NONE * * Output parameters: NONE */ void _Thread_Handler( void ) { 4dec8: 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; 4deca: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4dece: 40c0 movew %sr,%d0 4ded0: e189 lsll #8,%d1 4ded2: 0280 0000 f8ff andil #63743,%d0 4ded8: 8081 orl %d1,%d0 4deda: 46c0 movew %d0,%sr && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; doneConstructors = true; 4dedc: 7001 moveq #1,%d0 doCons = !doneConstructors && _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API; if (doCons) doneConstructors = true; #else doCons = !doneConstructors; 4dede: 1439 0005 f0fc moveb 5f0fc ,%d2 doneConstructors = true; 4dee4: 13c0 0005 f0fc moveb %d0,5f0fc #endif #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4deea: 4aaa 00f4 tstl %a2@(244) 4deee: 6720 beqs 4df10 <_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 ); 4def0: 2079 0005 f9ba moveal 5f9ba <_Thread_Allocated_fp>,%a0 4def6: b1ca cmpal %a2,%a0 4def8: 6716 beqs 4df10 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4defa: 4a88 tstl %a0 4defc: 670c beqs 4df0a <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4defe: 4868 00f4 pea %a0@(244) 4df02: 4eb9 0004 a358 jsr 4a358 <_CPU_Context_save_fp> 4df08: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4df0a: 23ca 0005 f9ba movel %a2,5f9ba <_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 ); 4df10: 2f0a movel %a2,%sp@- 4df12: 4eb9 0004 9d00 jsr 49d00 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4df18: 4eb9 0004 9134 jsr 49134 <_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) */ { 4df1e: 588f addql #4,%sp 4df20: 4a02 tstb %d2 4df22: 6746 beqs 4df6a <_Thread_Handler+0xae> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4df24: 4aaa 0092 tstl %a2@(146) 4df28: 6718 beqs 4df42 <_Thread_Handler+0x86> <== ALWAYS TAKEN * 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 ); 4df2a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4df2c: 4eb9 0004 9d3e jsr 49d3e <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4df32: 4878 0005 pea 5 <== NOT EXECUTED 4df36: 4878 0001 pea 1 <== NOT EXECUTED 4df3a: 42a7 clrl %sp@- <== NOT EXECUTED 4df3c: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> <== NOT EXECUTED } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4df42: 2f2a 009a movel %a2@(154),%sp@- 4df46: 206a 008e moveal %a2@(142),%a0 4df4a: 4e90 jsr %a0@ #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4df4c: 588f addql #4,%sp 4df4e: 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 ); 4df52: 2f0a movel %a2,%sp@- 4df54: 4eb9 0004 9d3e jsr 49d3e <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4df5a: 4878 0005 pea 5 4df5e: 4878 0001 pea 1 4df62: 42a7 clrl %sp@- 4df64: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (doCons) /* && (volatile void *)_init) */ { INIT_NAME (); 4df6a: 4eb9 0005 c280 jsr 5c280 <_init> _Thread_Enable_dispatch(); #endif } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4df70: 4aaa 0092 tstl %a2@(146) 4df74: 66b4 bnes 4df2a <_Thread_Handler+0x6e> <== NEVER TAKEN 4df76: 60ca bras 4df42 <_Thread_Handler+0x86> =============================================================================== 00049400 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 49400: 4e56 0000 linkw %fp,#0 /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) 49404: 4ab9 0005 e000 tstl 5e000 4940a: 57c1 seq %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 4940c: 4ab9 0005 dffc tstl 5dffc 49412: 57c0 seq %d0 == (!Configuration.stack_free_hook) ) ) 49414: 4481 negl %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49416: 4480 negl %d0 49418: b380 eorl %d1,%d0 uint32_t maximum_internal_threads; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 4941a: 2239 0005 dfec movel 5dfec ,%d1 maximum_extensions = Configuration.maximum_extensions; 49420: 2079 0005 dfe4 moveal 5dfe4 ,%a0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49426: 4a00 tstb %d0 49428: 6650 bnes 4947a <_Thread_Handler_initialization+0x7a> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4942a: 4878 0008 pea 8 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 4942e: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 49430: 42a7 clrl %sp@- 49432: 4878 010c pea 10c 49436: 4878 0001 pea 1 4943a: 4878 0001 pea 1 4943e: 4878 0001 pea 1 49442: 4879 0005 fa40 pea 5fa40 <_Thread_Internal_information> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 49448: 13c0 0005 fad8 moveb %d0,5fad8 <_Per_CPU_Information+0x18> _Thread_Executing = NULL; 4944e: 42b9 0005 facc clrl 5facc <_Per_CPU_Information+0xc> _Thread_Heir = NULL; 49454: 42b9 0005 fad0 clrl 5fad0 <_Per_CPU_Information+0x10> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 4945a: 42b9 0005 f9ba clrl 5f9ba <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 49460: 23c8 0005 f9ca movel %a0,5f9ca <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 49466: 23c1 0005 f8f0 movel %d1,5f8f0 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 4946c: 4eb9 0004 846c jsr 4846c <_Objects_Initialize_information> 49472: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49476: 4e5e unlk %fp 49478: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 4947a: 4878 000e pea e 4947e: 4878 0001 pea 1 49482: 42a7 clrl %sp@- 49484: 4eb9 0004 7e70 jsr 47e70 <_Internal_error_Occurred> ... =============================================================================== 0004d3bc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4d3bc: 4e56 0000 linkw %fp,#0 4d3c0: 2f0a movel %a2,%sp@- 4d3c2: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4d3c6: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4d3cc: 256a 00a4 007e movel %a2@(164),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4d3d2: 256e 000c 0096 movel %fp@(12),%a2@(150) the_thread->Start.numeric_argument = numeric_argument; 4d3d8: 256e 0010 009a movel %fp@(16),%a2@(154) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4d3de: 156a 009e 0074 moveb %a2@(158),%a2@(116) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4d3e4: 42aa 001c clrl %a2@(28) the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4d3e8: 2f0a movel %a2,%sp@- 4d3ea: 4eb9 0004 a0d4 jsr 4a0d4 <_Thread_queue_Extract_with_proxy> 4d3f0: 588f addql #4,%sp 4d3f2: 4a00 tstb %d0 4d3f4: 6608 bnes 4d3fe <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4d3f6: 7002 moveq #2,%d0 4d3f8: b0aa 0050 cmpl %a2@(80),%d0 4d3fc: 672a beqs 4d428 <_Thread_Reset+0x6c> <== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4d3fe: 202a 00ac movel %a2@(172),%d0 4d402: b0aa 0014 cmpl %a2@(20),%d0 4d406: 6718 beqs 4d420 <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4d408: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d40c: 2d4a 0008 movel %a2,%fp@(8) } } 4d410: 246e fffc moveal %fp@(-4),%a2 (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d414: 2d40 000c movel %d0,%fp@(12) } } 4d418: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4d41a: 4ef9 0004 a308 jmp 4a308 <_Thread_Set_priority> } } 4d420: 246e fffc moveal %fp@(-4),%a2 4d424: 4e5e unlk %fp 4d426: 4e75 rts the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4d428: 486a 0048 pea %a2@(72) 4d42c: 4eb9 0004 a9c8 jsr 4a9c8 <_Watchdog_Remove> 4d432: 588f addql #4,%sp 4d434: 60c8 bras 4d3fe <_Thread_Reset+0x42> ... =============================================================================== 0004a278 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4a278: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4a27a: 4e56 0000 linkw %fp,#0 4a27e: 2f0a movel %a2,%sp@- 4a280: 246e 0008 moveal %fp@(8),%a2 4a284: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4a288: 670a beqs 4a294 <_Thread_Restart+0x1c> return true; } return false; } 4a28a: 246e fffc moveal %fp@(-4),%a2 4a28e: 4e5e unlk %fp _Thread_Restart_self(); return true; } return false; 4a290: 4200 clrb %d0 } 4a292: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4a294: 2f0a movel %a2,%sp@- 4a296: 4eb9 0004 a36c jsr 4a36c <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4a29c: 2f2e 0010 movel %fp@(16),%sp@- 4a2a0: 2f2e 000c movel %fp@(12),%sp@- 4a2a4: 2f0a movel %a2,%sp@- 4a2a6: 4eb9 0004 d3bc jsr 4d3bc <_Thread_Reset> _Thread_Load_environment( the_thread ); 4a2ac: 2f0a movel %a2,%sp@- 4a2ae: 4eb9 0004 d0c4 jsr 4d0c4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4a2b4: 2f0a movel %a2,%sp@- 4a2b6: 4eb9 0004 d38c jsr 4d38c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4a2bc: 2f0a movel %a2,%sp@- 4a2be: 4eb9 0004 a7b8 jsr 4a7b8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4a2c4: 4fef 001c lea %sp@(28),%sp 4a2c8: b5f9 0006 06a4 cmpal 606a4 <_Per_CPU_Information+0xc>,%a2 4a2ce: 670a beqs 4a2da <_Thread_Restart+0x62> return true; } return false; } 4a2d0: 246e fffc moveal %fp@(-4),%a2 4a2d4: 4e5e unlk %fp _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a2d6: 7001 moveq #1,%d0 } return false; } 4a2d8: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4a2da: 4aaa 00f4 tstl %a2@(244) 4a2de: 6712 beqs 4a2f2 <_Thread_Restart+0x7a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4a2e0: 486a 00f4 pea %a2@(244) 4a2e4: 4eb9 0004 ad1c jsr 4ad1c <_CPU_Context_restore_fp> 4a2ea: 2479 0006 06a4 moveal 606a4 <_Per_CPU_Information+0xc>,%a2 4a2f0: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4a2f2: 486a 00c0 pea %a2@(192) 4a2f6: 4eb9 0004 abca jsr 4abca <_CPU_Context_Restart_self> 4a2fc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a300: 588f addql #4,%sp <== NOT EXECUTED 4a302: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a304: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } =============================================================================== 00048bec <_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 ) ) { 48bec: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48bee: 4e56 0000 linkw %fp,#0 48bf2: 202e 0010 movel %fp@(16),%d0 48bf6: 2f0a movel %a2,%sp@- 48bf8: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48bfc: 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 ) ) { 48c00: b2aa 0050 cmpl %a2@(80),%d1 48c04: 671c beqs 48c22 <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 48c06: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 48c08: 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 } 48c0c: 246e fffc moveal %fp@(-4),%a2 48c10: 203c 1003 fff8 movel #268697592,%d0 48c16: 2d40 000c movel %d0,%fp@(12) 48c1a: 4e5e unlk %fp 48c1c: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 48c22: 123c 0003 moveb #3,%d1 48c26: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 48c2a: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 48c2c: 486a 0048 pea %a2@(72) 48c30: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 48c36: 588f addql #4,%sp 48c38: 203c 1003 fff8 movel #268697592,%d0 48c3e: 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 } 48c42: 246e fffc moveal %fp@(-4),%a2 48c46: 2d40 000c movel %d0,%fp@(12) 48c4a: 4e5e unlk %fp 48c4c: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 00049508 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 49508: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4950e: 4e56 ffe8 linkw %fp,#-24 49512: 226e 0008 moveal %fp@(8),%a1 49516: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4951a: 40c3 movew %sr,%d3 4951c: 8083 orl %d3,%d0 4951e: 46c0 movew %d0,%sr for( index=0 ; 49520: 4280 clrl %d0 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 49522: 2400 movel %d0,%d2 49524: 2200 movel %d0,%d1 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 49526: 5280 addql #1,%d0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 49528: e58a lsll #2,%d2 4952a: e989 lsll #4,%d1 4952c: 9282 subl %d2,%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4952e: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 49532: 2458 moveal %a0@+,%a2 49534: b1ca cmpal %a2,%a0 49536: 6616 bnes 4954e <_Thread_queue_Dequeue_priority+0x46> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 49538: 7204 moveq #4,%d1 4953a: b280 cmpl %d0,%d1 4953c: 66e4 bnes 49522 <_Thread_queue_Dequeue_priority+0x1a> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 4953e: 46c3 movew %d3,%sr return NULL; 49540: 95ca subal %a2,%a2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 49542: 200a movel %a2,%d0 49544: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4954a: 4e5e unlk %fp 4954c: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4954e: 200a movel %a2,%d0 49550: 0680 0000 003c addil #60,%d0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49556: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4955a: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 4955c: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 49560: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 49564: b088 cmpl %a0,%d0 49566: 6700 008a beqw 495f2 <_Thread_queue_Dequeue_priority+0xea> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4956a: 286a 0040 moveal %a2@(64),%a4 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4956e: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 49570: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 49574: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 49576: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4957a: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4957c: 226a 0040 moveal %a2@(64),%a1 49580: b3ea 0038 cmpal %a2@(56),%a1 49584: 6716 beqs 4959c <_Thread_queue_Dequeue_priority+0x94> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 49586: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4958a: 43e8 003c lea %a0@(60),%a1 4958e: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 49590: 43e8 0038 lea %a0@(56),%a1 49594: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 49598: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4959c: 7002 moveq #2,%d0 4959e: b0aa 0050 cmpl %a2@(80),%d0 495a2: 671e beqs 495c2 <_Thread_queue_Dequeue_priority+0xba> _ISR_Enable( level ); 495a4: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 495a6: 2f3c 1003 fff8 movel #268697592,%sp@- 495ac: 2f0a movel %a2,%sp@- 495ae: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 495b4: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 495b6: 200a movel %a2,%d0 495b8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 495be: 4e5e unlk %fp 495c0: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 495c2: 7203 moveq #3,%d1 495c4: 2541 0050 movel %d1,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 495c8: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 495ca: 486a 0048 pea %a2@(72) 495ce: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 495d4: 2f3c 1003 fff8 movel #268697592,%sp@- 495da: 2f0a movel %a2,%sp@- 495dc: 4eb9 0004 8d38 jsr 48d38 <_Thread_Clear_state> 495e2: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 495e6: 200a movel %a2,%d0 495e8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 495ee: 4e5e unlk %fp 495f0: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 495f2: 2689 movel %a1,%a3@ next_node->previous = previous_node; 495f4: 234b 0004 movel %a3,%a1@(4) 495f8: 60a2 bras 4959c <_Thread_queue_Dequeue_priority+0x94> ... =============================================================================== 0004df78 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4df78: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4df7e: 4e56 0000 linkw %fp,#0 4df82: 2f0a movel %a2,%sp@- 4df84: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4df88: 40c1 movew %sr,%d1 4df8a: 8081 orl %d1,%d0 4df8c: 46c0 movew %d0,%sr 4df8e: 202a 0010 movel %a2@(16),%d0 4df92: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4df98: 6734 beqs 4dfce <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4df9a: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4df9c: 7002 moveq #2,%d0 previous = the_node->previous; 4df9e: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4dfa2: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4dfa6: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4dfa8: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4dfac: b0aa 0050 cmpl %a2@(80),%d0 4dfb0: 6726 beqs 4dfd8 <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4dfb2: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4dfb4: 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 } 4dfb8: 246e fffc moveal %fp@(-4),%a2 4dfbc: 203c 1003 fff8 movel #268697592,%d0 4dfc2: 2d40 000c movel %d0,%fp@(12) 4dfc6: 4e5e unlk %fp 4dfc8: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4dfce: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4dfd0: 246e fffc moveal %fp@(-4),%a2 4dfd4: 4e5e unlk %fp 4dfd6: 4e75 rts 4dfd8: 7003 moveq #3,%d0 4dfda: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4dfde: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4dfe0: 486a 0048 pea %a2@(72) 4dfe4: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 4dfea: 588f addql #4,%sp 4dfec: 203c 1003 fff8 movel #268697592,%d0 4dff2: 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 } 4dff6: 246e fffc moveal %fp@(-4),%a2 4dffa: 2d40 000c movel %d0,%fp@(12) 4dffe: 4e5e unlk %fp 4e000: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 0004c8d4 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4c8d4: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4c8da: 4e56 ffec linkw %fp,#-20 4c8de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c8e2: 246e 000c moveal %fp@(12),%a2 4c8e6: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4c8ea: 40c1 movew %sr,%d1 4c8ec: 8081 orl %d1,%d0 4c8ee: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4c8f0: 202a 0010 movel %a2@(16),%d0 4c8f4: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4c8fa: 6772 beqs 4c96e <_Thread_queue_Extract_priority_helper+0x9a> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4c8fc: 200a movel %a2,%d0 4c8fe: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4c904: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4c906: 266a 0004 moveal %a2@(4),%a3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4c90a: 206a 0038 moveal %a2@(56),%a0 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4c90e: b088 cmpl %a0,%d0 4c910: 6768 beqs 4c97a <_Thread_queue_Extract_priority_helper+0xa6> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 4c912: 286a 0040 moveal %a2@(64),%a4 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4c916: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4c918: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4c91c: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4c91e: 214b 0004 movel %a3,%a0@(4) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c922: 202a 0040 movel %a2@(64),%d0 last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4c926: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4c928: b0aa 0038 cmpl %a2@(56),%d0 4c92c: 6716 beqs 4c944 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4c92e: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4c932: 43e8 003c lea %a0@(60),%a1 4c936: 2889 movel %a1,%a4@ new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4c938: 43e8 0038 lea %a0@(56),%a1 4c93c: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4c940: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c944: 4a02 tstb %d2 4c946: 6626 bnes 4c96e <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4c948: 7002 moveq #2,%d0 4c94a: b0aa 0050 cmpl %a2@(80),%d0 4c94e: 6736 beqs 4c986 <_Thread_queue_Extract_priority_helper+0xb2> _ISR_Enable( level ); 4c950: 46c1 movew %d1,%sr 4c952: 2d4a 0008 movel %a2,%fp@(8) 4c956: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c95c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c962: 2d49 000c movel %a1,%fp@(12) 4c966: 4e5e unlk %fp 4c968: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4c96e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4c970: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c976: 4e5e unlk %fp 4c978: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4c97a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4c97c: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4c980: 4a02 tstb %d2 4c982: 67c4 beqs 4c948 <_Thread_queue_Extract_priority_helper+0x74> 4c984: 60e8 bras 4c96e <_Thread_queue_Extract_priority_helper+0x9a> 4c986: 7003 moveq #3,%d0 4c988: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4c98c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4c98e: 486a 0048 pea %a2@(72) 4c992: 4eb9 0004 a03c jsr 4a03c <_Watchdog_Remove> 4c998: 588f addql #4,%sp 4c99a: 227c 1003 fff8 moveal #268697592,%a1 4c9a0: 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 } 4c9a4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4c9aa: 2d49 000c movel %a1,%fp@(12) 4c9ae: 4e5e unlk %fp 4c9b0: 4ef9 0004 8d38 jmp 48d38 <_Thread_Clear_state> ... =============================================================================== 00049888 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 49888: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4988a: 4e56 0000 linkw %fp,#0 4988e: 206e 0008 moveal %fp@(8),%a0 49892: 2f02 movel %d2,%sp@- 49894: 202e 000c movel %fp@(12),%d0 the_thread_queue->state = state; 49898: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4989e: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 498a4: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 498a8: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 498ac: b280 cmpl %d0,%d1 498ae: 6714 beqs 498c4 <_Thread_queue_Initialize+0x3c> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498b0: 2008 movel %a0,%d0 498b2: 5880 addql #4,%d0 head->next = tail; head->previous = NULL; 498b4: 42a8 0004 clrl %a0@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498b8: 2080 movel %d0,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 498ba: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 498be: 241f movel %sp@+,%d2 498c0: 4e5e unlk %fp 498c2: 4e75 rts the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 498c4: 4280 clrl %d0 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498c6: 2400 movel %d0,%d2 498c8: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 498ca: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498cc: e58a lsll #2,%d2 498ce: e989 lsll #4,%d1 498d0: 9282 subl %d2,%d1 498d2: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498d6: 2209 movel %a1,%d1 498d8: 5881 addql #4,%d1 498da: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 498dc: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 498de: 42a9 0004 clrl %a1@(4) tail->previous = head; 498e2: 2349 0008 movel %a1,%a1@(8) 498e6: b280 cmpl %d0,%d1 498e8: 67d4 beqs 498be <_Thread_queue_Initialize+0x36> <== NEVER TAKEN index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498ea: 2400 movel %d0,%d2 498ec: 2200 movel %d0,%d1 if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 498ee: 5280 addql #1,%d0 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 498f0: e58a lsll #2,%d2 498f2: e989 lsll #4,%d1 498f4: 9282 subl %d2,%d1 498f6: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 498fa: 2209 movel %a1,%d1 498fc: 5881 addql #4,%d1 498fe: 2281 movel %d1,%a1@ the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 49900: 7204 moveq #4,%d1 head->next = tail; head->previous = NULL; 49902: 42a9 0004 clrl %a1@(4) tail->previous = head; 49906: 2349 0008 movel %a1,%a1@(8) 4990a: b280 cmpl %d0,%d1 4990c: 66b8 bnes 498c6 <_Thread_queue_Initialize+0x3e> 4990e: 60ae bras 498be <_Thread_queue_Initialize+0x36> =============================================================================== 00049910 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 49910: 4e56 fff0 linkw %fp,#-16 49914: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49918: 246e 0008 moveal %fp@(8),%a2 4991c: 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 ) 49920: 4a8a tstl %a2 49922: 6708 beqs 4992c <_Thread_queue_Requeue+0x1c> <== 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 ) { 49924: 7001 moveq #1,%d0 49926: b0aa 0034 cmpl %a2@(52),%d0 4992a: 670a beqs 49936 <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 4992c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49932: 4e5e unlk %fp <== NOT EXECUTED 49934: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 49936: 303c 0700 movew #1792,%d0 4993a: 40c2 movew %sr,%d2 4993c: 8082 orl %d2,%d0 4993e: 46c0 movew %d0,%sr 49940: 202b 0010 movel %a3@(16),%d0 49944: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4994a: 660c bnes 49958 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 4994c: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4994e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49954: 4e5e unlk %fp 49956: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 49958: 4878 0001 pea 1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4995c: 7001 moveq #1,%d0 4995e: 2f0b movel %a3,%sp@- 49960: 2540 0030 movel %d0,%a2@(48) 49964: 2f0a movel %a2,%sp@- 49966: 4eb9 0004 c8d4 jsr 4c8d4 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4996c: 486e fffc pea %fp@(-4) 49970: 2f0b movel %a3,%sp@- 49972: 2f0a movel %a2,%sp@- 49974: 4eb9 0004 96a4 jsr 496a4 <_Thread_queue_Enqueue_priority> 4997a: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4997e: 46c2 movew %d2,%sr 49980: 60cc bras 4994e <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00049984 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 49984: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49988: 486e fffc pea %fp@(-4) 4998c: 2f2e 0008 movel %fp@(8),%sp@- 49990: 4eb9 0004 915c jsr 4915c <_Thread_Get> switch ( location ) { 49996: 508f addql #8,%sp 49998: 4aae fffc tstl %fp@(-4) 4999c: 661e bnes 499bc <_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 ); 4999e: 2f00 movel %d0,%sp@- 499a0: 4eb9 0004 c9b8 jsr 4c9b8 <_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; 499a6: 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--; 499a8: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 499ae: 5380 subql #1,%d0 499b0: 23c0 0005 f938 movel %d0,5f938 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 499b6: 2039 0005 f938 movel 5f938 <_Thread_Dispatch_disable_level>,%d0 _Thread_Unnest_dispatch(); break; } } 499bc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00057684 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 57684: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 57688: 41ee ffe8 lea %fp@(-24),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 5768c: 200e movel %fp,%d0 5768e: 5180 subql #8,%d0 57690: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57694: 246e 0008 moveal %fp@(8),%a2 57698: 260e movel %fp,%d3 5769a: 2c0e movel %fp,%d6 5769c: 0683 ffff fff4 addil #-12,%d3 576a2: 0686 ffff ffec addil #-20,%d6 576a8: 240a movel %a2,%d2 576aa: 2a0a movel %a2,%d5 576ac: 4bf9 0005 badc lea 5badc <_Watchdog_Adjust_to_chain>,%a5 576b2: 0682 0000 0030 addil #48,%d2 576b8: 0685 0000 0068 addil #104,%d5 576be: 47f9 0005 8264 lea 58264 <_Chain_Get>,%a3 576c4: 49f9 0005 bb64 lea 5bb64 <_Watchdog_Insert>,%a4 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 576ca: 283c 0000 0700 movel #1792,%d4 head->previous = NULL; tail->previous = head; 576d0: 2d48 fff0 movel %a0,%fp@(-16) 576d4: 41ea 0008 lea %a2@(8),%a0 576d8: 2d48 ffe4 movel %a0,%fp@(-28) 576dc: 41ea 0040 lea %a2@(64),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576e0: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 576e4: 42ae ffec clrl %fp@(-20) 576e8: 42ae fff8 clrl %fp@(-8) tail->previous = head; 576ec: 2d43 fffc movel %d3,%fp@(-4) 576f0: 2d40 ffd8 movel %d0,%fp@(-40) 576f4: 2d48 ffe0 movel %a0,%fp@(-32) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 576f8: 2d46 ffe8 movel %d6,%fp@(-24) { /* * 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; 576fc: 41ee ffe8 lea %fp@(-24),%a0 57700: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57704: 2039 0007 c5b4 movel 7c5b4 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5770a: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 5770e: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57712: 9081 subl %d1,%d0 57714: 2f03 movel %d3,%sp@- 57716: 2f00 movel %d0,%sp@- 57718: 2f02 movel %d2,%sp@- 5771a: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5771c: 2039 0007 c53e movel 7c53e <_TOD_Now>,%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 ) { 57722: 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; 57726: 222a 0074 movel %a2@(116),%d1 /* * 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 ) { 5772a: b280 cmpl %d0,%d1 5772c: 6500 0086 bcsw 577b4 <_Timer_server_Body+0x130> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 57730: b280 cmpl %d0,%d1 57732: 6200 00a4 bhiw 577d8 <_Timer_server_Body+0x154> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 57736: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5773a: 202a 0078 movel %a2@(120),%d0 5773e: 2f00 movel %d0,%sp@- 57740: 4e93 jsr %a3@ if ( timer == NULL ) { 57742: 588f addql #4,%sp 57744: 4a80 tstl %d0 57746: 672e beqs 57776 <_Timer_server_Body+0xf2> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 57748: 2040 moveal %d0,%a0 5774a: 7e01 moveq #1,%d7 5774c: 2228 0038 movel %a0@(56),%d1 57750: be81 cmpl %d1,%d7 57752: 6700 00a8 beqw 577fc <_Timer_server_Body+0x178> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57756: 7e03 moveq #3,%d7 57758: be81 cmpl %d1,%d7 5775a: 66de bnes 5773a <_Timer_server_Body+0xb6> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5775c: 2040 moveal %d0,%a0 5775e: 4868 0010 pea %a0@(16) 57762: 2f05 movel %d5,%sp@- 57764: 4e94 jsr %a4@ } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 57766: 202a 0078 movel %a2@(120),%d0 ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5776a: 508f addql #8,%sp } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5776c: 2f00 movel %d0,%sp@- 5776e: 4e93 jsr %a3@ if ( timer == NULL ) { 57770: 588f addql #4,%sp 57772: 4a80 tstl %d0 57774: 66d2 bnes 57748 <_Timer_server_Body+0xc4> <== NEVER TAKEN * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 57776: 2004 movel %d4,%d0 57778: 40c1 movew %sr,%d1 5777a: 8081 orl %d1,%d0 5777c: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 5777e: bcae ffe8 cmpl %fp@(-24),%d6 57782: 6700 0086 beqw 5780a <_Timer_server_Body+0x186> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 57786: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 57788: 2039 0007 c5b4 movel 7c5b4 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 5778e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 57792: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 57796: 9081 subl %d1,%d0 <== NOT EXECUTED 57798: 2f03 movel %d3,%sp@- <== NOT EXECUTED 5779a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5779c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5779e: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 577a0: 2039 0007 c53e movel 7c53e <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 577a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 577aa: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 577ae: b280 cmpl %d0,%d1 <== NOT EXECUTED 577b0: 6400 ff7e bccw 57730 <_Timer_server_Body+0xac> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 577b4: 2f03 movel %d3,%sp@- 577b6: 2e00 movel %d0,%d7 577b8: 9e81 subl %d1,%d7 577ba: 2f07 movel %d7,%sp@- 577bc: 2d40 ffdc movel %d0,%fp@(-36) 577c0: 2f05 movel %d5,%sp@- 577c2: 4eb9 0005 badc jsr 5badc <_Watchdog_Adjust_to_chain> 577c8: 202e ffdc movel %fp@(-36),%d0 577cc: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 577d0: 2540 0074 movel %d0,%a2@(116) 577d4: 6000 ff64 braw 5773a <_Timer_server_Body+0xb6> /* * 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 ); 577d8: 9280 subl %d0,%d1 577da: 2f01 movel %d1,%sp@- 577dc: 4878 0001 pea 1 577e0: 2d40 ffdc movel %d0,%fp@(-36) 577e4: 2f05 movel %d5,%sp@- 577e6: 4eb9 0005 ba48 jsr 5ba48 <_Watchdog_Adjust> 577ec: 202e ffdc movel %fp@(-36),%d0 577f0: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 577f4: 2540 0074 movel %d0,%a2@(116) 577f8: 6000 ff40 braw 5773a <_Timer_server_Body+0xb6> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 577fc: 4868 0010 pea %a0@(16) 57800: 2f02 movel %d2,%sp@- 57802: 4e94 jsr %a4@ 57804: 508f addql #8,%sp 57806: 6000 ff32 braw 5773a <_Timer_server_Body+0xb6> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 5780a: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 5780e: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 57810: 2e2e ffd8 movel %fp@(-40),%d7 57814: beae fff4 cmpl %fp@(-12),%d7 57818: 6752 beqs 5786c <_Timer_server_Body+0x1e8> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5781a: 2204 movel %d4,%d1 5781c: 40c0 movew %sr,%d0 5781e: 8280 orl %d0,%d1 57820: 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; 57822: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57826: b1ee ffd8 cmpal %fp@(-40),%a0 5782a: 6732 beqs 5785e <_Timer_server_Body+0x1da> <== NEVER TAKEN Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 5782c: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 5782e: 2343 0004 movel %d3,%a1@(4) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 57832: 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; 57836: 2d49 fff4 movel %a1,%fp@(-12) _ISR_Enable( level ); 5783a: 46c0 movew %d0,%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 ); 5783c: 2f28 0024 movel %a0@(36),%sp@- 57840: 2f28 0020 movel %a0@(32),%sp@- 57844: 2068 001c moveal %a0@(28),%a0 57848: 4e90 jsr %a0@ } 5784a: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 5784c: 2204 movel %d4,%d1 5784e: 40c0 movew %sr,%d0 57850: 8280 orl %d0,%d1 57852: 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; 57854: 206e fff4 moveal %fp@(-12),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 57858: b1ee ffd8 cmpal %fp@(-40),%a0 5785c: 66ce bnes 5782c <_Timer_server_Body+0x1a8> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 5785e: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 57860: 41ee ffe8 lea %fp@(-24),%a0 57864: 2548 0078 movel %a0,%a2@(120) 57868: 6000 fe9a braw 57704 <_Timer_server_Body+0x80> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 5786c: 4200 clrb %d0 5786e: 1540 007c moveb %d0,%a2@(124) * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 57872: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 57878: 5280 addql #1,%d0 5787a: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57880: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 57886: 4878 0008 pea 8 5788a: 2f12 movel %a2@,%sp@- _Timer_server_Reset_interval_system_watchdog( ts ); _Timer_server_Reset_tod_system_watchdog( ts ); _Thread_Enable_dispatch(); ts->active = true; 5788c: 7e01 moveq #1,%d7 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 5788e: 4eb9 0005 b480 jsr 5b480 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 57894: 2f0a movel %a2,%sp@- 57896: 4eba fd14 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 5789a: 2f0a movel %a2,%sp@- 5789c: 4eba fd78 jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 578a0: 4eb9 0005 ab4c jsr 5ab4c <_Thread_Enable_dispatch> ts->active = true; 578a6: 1547 007c moveb %d7,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 578aa: 2f2e ffe4 movel %fp@(-28),%sp@- 578ae: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 578b4: 2f2e ffe0 movel %fp@(-32),%sp@- 578b8: 4eb9 0005 bcac jsr 5bcac <_Watchdog_Remove> 578be: 4fef 0018 lea %sp@(24),%sp 578c2: 6000 fe38 braw 576fc <_Timer_server_Body+0x78> =============================================================================== 000578c6 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 578c6: 4e56 fff0 linkw %fp,#-16 578ca: 206e 000c moveal %fp@(12),%a0 578ce: 48d7 041c moveml %d2-%d4/%a2,%sp@ 578d2: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 578d6: 202a 0078 movel %a2@(120),%d0 578da: 671a beqs 578f6 <_Timer_server_Schedule_operation_method+0x30> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 578dc: 202a 0078 movel %a2@(120),%d0 578e0: 2d48 000c movel %a0,%fp@(12) } } 578e4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 * 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 ); 578ea: 2d40 0008 movel %d0,%fp@(8) } } 578ee: 4e5e unlk %fp * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 578f0: 4ef9 0005 8204 jmp 58204 <_Chain_Append> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { _Thread_Dispatch_disable_level++; 578f6: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 578fc: 5280 addql #1,%d0 578fe: 23c0 0007 c4b4 movel %d0,7c4b4 <_Thread_Dispatch_disable_level> return _Thread_Dispatch_disable_level; 57904: 2039 0007 c4b4 movel 7c4b4 <_Thread_Dispatch_disable_level>,%d0 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5790a: 2028 0038 movel %a0@(56),%d0 5790e: 7201 moveq #1,%d1 57910: b280 cmpl %d0,%d1 57912: 6700 008a beqw 5799e <_Timer_server_Schedule_operation_method+0xd8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 57916: 7803 moveq #3,%d4 57918: b880 cmpl %d0,%d4 5791a: 670e beqs 5792a <_Timer_server_Schedule_operation_method+0x64> * 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 ); } } 5791c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57922: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57924: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5792a: 203c 0000 0700 movel #1792,%d0 57930: 40c2 movew %sr,%d2 57932: 8082 orl %d2,%d0 57934: 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 ); 57936: 260a movel %a2,%d3 57938: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 5793e: 2039 0007 c53e movel 7c53e <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 57944: 222a 0074 movel %a2@(116),%d1 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 57948: 226a 0068 moveal %a2@(104),%a1 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 5794c: b689 cmpl %a1,%d3 5794e: 671c beqs 5796c <_Timer_server_Schedule_operation_method+0xa6> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 57950: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 57954: b280 cmpl %d0,%d1 57956: 6400 00ba bccw 57a12 <_Timer_server_Schedule_operation_method+0x14c> /* * We advanced in time. */ delta = snapshot - last_snapshot; 5795a: 2800 movel %d0,%d4 5795c: 9881 subl %d1,%d4 if (delta_interval > delta) { 5795e: b883 cmpl %d3,%d4 57960: 6400 00bc bccw 57a1e <_Timer_server_Schedule_operation_method+0x158> delta_interval -= delta; 57964: 9684 subl %d4,%d3 57966: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57968: 2341 0010 movel %d1,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 5796c: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 57970: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 57972: 4868 0010 pea %a0@(16) 57976: 486a 0068 pea %a2@(104) 5797a: 4eb9 0005 bb64 jsr 5bb64 <_Watchdog_Insert> if ( !ts->active ) { 57980: 508f addql #8,%sp 57982: 102a 007c moveb %a2@(124),%d0 57986: 6694 bnes 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_tod_system_watchdog( ts ); 57988: 2f0a movel %a2,%sp@- 5798a: 4eba fc8a jsr %pc@(57616 <_Timer_server_Reset_tod_system_watchdog>) 5798e: 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 ); } } 57990: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57996: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57998: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 5799e: 203c 0000 0700 movel #1792,%d0 579a4: 40c3 movew %sr,%d3 579a6: 8083 orl %d3,%d0 579a8: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 579aa: 2039 0007 c5b4 movel 7c5b4 <_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 ); 579b0: 220a movel %a2,%d1 579b2: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 579b8: 282a 003c movel %a2@(60),%d4 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 579bc: 226a 0030 moveal %a2@(48),%a1 if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 579c0: b289 cmpl %a1,%d1 579c2: 6712 beqs 579d6 <_Timer_server_Schedule_operation_method+0x110> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 579c4: 2200 movel %d0,%d1 579c6: 9284 subl %d4,%d1 delta_interval = first_watchdog->delta_interval; 579c8: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 579cc: b481 cmpl %d1,%d2 579ce: 633a blss 57a0a <_Timer_server_Schedule_operation_method+0x144> delta_interval -= delta; 579d0: 9481 subl %d1,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 579d2: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 579d6: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 579da: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 579dc: 4868 0010 pea %a0@(16) 579e0: 486a 0030 pea %a2@(48) 579e4: 4eb9 0005 bb64 jsr 5bb64 <_Watchdog_Insert> if ( !ts->active ) { 579ea: 508f addql #8,%sp 579ec: 102a 007c moveb %a2@(124),%d0 579f0: 6600 ff2a bnew 5791c <_Timer_server_Schedule_operation_method+0x56> _Timer_server_Reset_interval_system_watchdog( ts ); 579f4: 2f0a movel %a2,%sp@- 579f6: 4eba fbb4 jsr %pc@(575ac <_Timer_server_Reset_interval_system_watchdog>) 579fa: 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 ); } } 579fc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 57a02: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 57a04: 4ef9 0005 ab4c jmp 5ab4c <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a0a: 4282 clrl %d2 } first_watchdog->delta_interval = delta_interval; 57a0c: 2342 0010 movel %d2,%a1@(16) 57a10: 60c4 bras 579d6 <_Timer_server_Schedule_operation_method+0x110> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 57a12: d283 addl %d3,%d1 delta_interval += delta; 57a14: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 57a16: 2341 0010 movel %d1,%a1@(16) 57a1a: 6000 ff50 braw 5796c <_Timer_server_Schedule_operation_method+0xa6> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 57a1e: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 57a20: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 57a24: 6000 ff46 braw 5796c <_Timer_server_Schedule_operation_method+0xa6><== NOT EXECUTED =============================================================================== 00049ba0 <_Timespec_Add_to>: uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { 49ba0: 4e56 0000 linkw %fp,#0 49ba4: 226e 0008 moveal %fp@(8),%a1 49ba8: 2f0a movel %a2,%sp@- 49baa: 246e 000c moveal %fp@(12),%a2 uint32_t seconds = add->tv_sec; /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; 49bae: 2069 0004 moveal %a1@(4),%a0 49bb2: d1ea 0004 addal %a2@(4),%a0 /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49bb6: 2208 movel %a0,%d1 uint32_t _Timespec_Add_to( struct timespec *time, const struct timespec *add ) { uint32_t seconds = add->tv_sec; 49bb8: 2012 movel %a2@,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; 49bba: d191 addl %d0,%a1@ time->tv_nsec += add->tv_nsec; 49bbc: 2348 0004 movel %a0,%a1@(4) /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49bc0: b1fc 3b9a c9ff cmpal #999999999,%a0 49bc6: 631a blss 49be2 <_Timespec_Add_to+0x42> 49bc8: 2051 moveal %a1@,%a0 time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; time->tv_sec++; 49bca: 5288 addql #1,%a0 time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 49bcc: 0681 c465 3600 addil #-1000000000,%d1 time->tv_sec++; seconds++; 49bd2: 5280 addql #1,%d0 /* Add the basics */ time->tv_sec += add->tv_sec; time->tv_nsec += add->tv_nsec; /* Now adjust it so nanoseconds is in range */ while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 49bd4: 0c81 3b9a c9ff cmpil #999999999,%d1 49bda: 62ee bhis 49bca <_Timespec_Add_to+0x2a> <== NEVER TAKEN 49bdc: 2341 0004 movel %d1,%a1@(4) 49be0: 2288 movel %a0,%a1@ time->tv_sec++; seconds++; } return seconds; } 49be2: 245f moveal %sp@+,%a2 49be4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049d7e <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49d7e: 4e56 fff0 linkw %fp,#-16 49d82: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49d86: 242e 0008 movel %fp@(8),%d2 49d8a: 262e 0010 movel %fp@(16),%d3 49d8e: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49d94: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d98: b5fc 0005 fa7c cmpal #391804,%a2 49d9e: 6726 beqs 49dc6 <_User_extensions_Fatal+0x48> <== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49da0: 0284 0000 00ff andil #255,%d4 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 49da6: 206a 0030 moveal %a2@(48),%a0 49daa: 4a88 tstl %a0 49dac: 670c beqs 49dba <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49dae: 2f03 movel %d3,%sp@- 49db0: 2f04 movel %d4,%sp@- 49db2: 2f02 movel %d2,%sp@- 49db4: 4e90 jsr %a0@ 49db6: 4fef 000c lea %sp@(12),%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49dba: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49dbe: b5fc 0005 fa7c cmpal #391804,%a2 49dc4: 66e0 bnes 49da6 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49dc6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 49dcc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c3c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 49c3c: 4e56 ffec linkw %fp,#-20 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49c40: 203c 0005 fa80 movel #391808,%d0 49c46: 23c0 0005 fa7c movel %d0,5fa7c <_User_extensions_List> head->previous = NULL; tail->previous = head; 49c4c: 203c 0005 fa7c movel #391804,%d0 49c52: 23c0 0005 fa84 movel %d0,5fa84 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 49c58: 203c 0005 f940 movel #391488,%d0 49c5e: 23c0 0005 f93c movel %d0,5f93c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 49c64: 203c 0005 f93c movel #391484,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 49c6a: 42b9 0005 fa80 clrl 5fa80 <_User_extensions_List+0x4> 49c70: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%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; 49c74: 2439 0005 e012 movel 5e012 ,%d2 initial_extensions = Configuration.User_extension_table; 49c7a: 2639 0005 e016 movel 5e016 ,%d3 49c80: 42b9 0005 f940 clrl 5f940 <_User_extensions_Switches_list+0x4> tail->previous = head; 49c86: 23c0 0005 f944 movel %d0,5f944 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 49c8c: 4a83 tstl %d3 49c8e: 6764 beqs 49cf4 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 49c90: 7834 moveq #52,%d4 49c92: 4c02 4800 mulsl %d2,%d4 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) 49c96: 2f04 movel %d4,%sp@- 49c98: 4eb9 0004 a1f4 jsr 4a1f4 <_Workspace_Allocate_or_fatal_error> 49c9e: 2440 moveal %d0,%a2 _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 49ca0: 2f04 movel %d4,%sp@- 49ca2: 42a7 clrl %sp@- 49ca4: 2f00 movel %d0,%sp@- 49ca6: 4eb9 0004 e914 jsr 4e914 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49cac: 4fef 0010 lea %sp@(16),%sp 49cb0: 4a82 tstl %d2 49cb2: 6740 beqs 49cf4 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49cb4: 4284 clrl %d4 49cb6: 47f9 0004 ca30 lea 4ca30 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 49cbc: 2043 moveal %d3,%a0 49cbe: 5284 addql #1,%d4 49cc0: 0683 0000 0020 addil #32,%d3 49cc6: 2558 0014 movel %a0@+,%a2@(20) 49cca: 2558 0018 movel %a0@+,%a2@(24) 49cce: 2558 001c movel %a0@+,%a2@(28) 49cd2: 2558 0020 movel %a0@+,%a2@(32) 49cd6: 2558 0024 movel %a0@+,%a2@(36) 49cda: 2558 0028 movel %a0@+,%a2@(40) 49cde: 2558 002c movel %a0@+,%a2@(44) 49ce2: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 49ce6: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 49ce8: 45ea 0034 lea %a2@(52),%a2 49cec: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49cee: 588f addql #4,%sp 49cf0: b484 cmpl %d4,%d2 49cf2: 66c8 bnes 49cbc <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 49cf4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49cfa: 4e5e unlk %fp ... =============================================================================== 00049d00 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49d00: 4e56 0000 linkw %fp,#0 49d04: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49d06: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49d0c: 2f02 movel %d2,%sp@- 49d0e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49d12: b5fc 0005 fa80 cmpal #391808,%a2 49d18: 6718 beqs 49d32 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 49d1a: 206a 0028 moveal %a2@(40),%a0 49d1e: 4a88 tstl %a0 49d20: 6706 beqs 49d28 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 49d22: 2f02 movel %d2,%sp@- 49d24: 4e90 jsr %a0@ 49d26: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49d28: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49d2a: b5fc 0005 fa80 cmpal #391808,%a2 49d30: 66e8 bnes 49d1a <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 49d32: 242e fff8 movel %fp@(-8),%d2 49d36: 246e fffc moveal %fp@(-4),%a2 49d3a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049dd0 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49dd0: 4e56 0000 linkw %fp,#0 49dd4: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49dd6: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49ddc: 2f02 movel %d2,%sp@- 49dde: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49de2: b5fc 0005 fa80 cmpal #391808,%a2 49de8: 6722 beqs 49e0c <_User_extensions_Thread_create+0x3c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 49dea: 206a 0014 moveal %a2@(20),%a0 49dee: 4a88 tstl %a0 49df0: 6710 beqs 49e02 <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 49df2: 2f02 movel %d2,%sp@- 49df4: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49dfa: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 49dfc: 508f addql #8,%sp 49dfe: 4a00 tstb %d0 49e00: 6718 beqs 49e1a <_User_extensions_Thread_create+0x4a> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49e02: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49e04: b5fc 0005 fa80 cmpal #391808,%a2 49e0a: 66de bnes 49dea <_User_extensions_Thread_create+0x1a> return false; } } return true; } 49e0c: 242e fff8 movel %fp@(-8),%d2 49e10: 246e fffc moveal %fp@(-4),%a2 49e14: 4e5e unlk %fp if ( !status ) return false; } } return true; 49e16: 7001 moveq #1,%d0 } 49e18: 4e75 rts 49e1a: 242e fff8 movel %fp@(-8),%d2 49e1e: 246e fffc moveal %fp@(-4),%a2 49e22: 4e5e unlk %fp status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 49e24: 4200 clrb %d0 <== NOT EXECUTED } } return true; } =============================================================================== 00049e28 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 49e28: 4e56 0000 linkw %fp,#0 49e2c: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49e2e: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49e34: 2f02 movel %d2,%sp@- 49e36: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e3a: b5fc 0005 fa7c cmpal #391804,%a2 49e40: 6720 beqs 49e62 <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 49e42: 206a 0020 moveal %a2@(32),%a0 49e46: 4a88 tstl %a0 49e48: 670c beqs 49e56 <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 49e4a: 2f02 movel %d2,%sp@- 49e4c: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49e52: 4e90 jsr %a0@ 49e54: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49e56: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49e5a: b5fc 0005 fa7c cmpal #391804,%a2 49e60: 66e0 bnes 49e42 <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49e62: 242e fff8 movel %fp@(-8),%d2 49e66: 246e fffc moveal %fp@(-4),%a2 49e6a: 4e5e unlk %fp ... =============================================================================== 00049d3e <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49d3e: 4e56 0000 linkw %fp,#0 49d42: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; 49d44: 2479 0005 fa84 moveal 5fa84 <_User_extensions_List+0x8>,%a2 49d4a: 2f02 movel %d2,%sp@- 49d4c: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d50: b5fc 0005 fa7c cmpal #391804,%a2 49d56: 671a beqs 49d72 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 49d58: 206a 002c moveal %a2@(44),%a0 49d5c: 4a88 tstl %a0 49d5e: 6706 beqs 49d66 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 49d60: 2f02 movel %d2,%sp@- 49d62: 4e90 jsr %a0@ 49d64: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49d66: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49d6a: b5fc 0005 fa7c cmpal #391804,%a2 49d70: 66e6 bnes 49d58 <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 49d72: 242e fff8 movel %fp@(-8),%d2 49d76: 246e fffc moveal %fp@(-4),%a2 49d7a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a7b8 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a7b8: 4e56 0000 linkw %fp,#0 4a7bc: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a7be: 2479 0006 0654 moveal 60654 <_User_extensions_List>,%a2 4a7c4: 2f02 movel %d2,%sp@- 4a7c6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a7ca: b5fc 0006 0658 cmpal #394840,%a2 4a7d0: 671e beqs 4a7f0 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 4a7d2: 206a 001c moveal %a2@(28),%a0 4a7d6: 4a88 tstl %a0 4a7d8: 670c beqs 4a7e6 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a7da: 2f02 movel %d2,%sp@- 4a7dc: 2f39 0006 06a4 movel 606a4 <_Per_CPU_Information+0xc>,%sp@- 4a7e2: 4e90 jsr %a0@ 4a7e4: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a7e6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a7e8: b5fc 0006 0658 cmpal #394840,%a2 4a7ee: 66e2 bnes 4a7d2 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a7f0: 242e fff8 movel %fp@(-8),%d2 4a7f4: 246e fffc moveal %fp@(-4),%a2 4a7f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049e70 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49e70: 4e56 0000 linkw %fp,#0 49e74: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 49e76: 2479 0005 fa7c moveal 5fa7c <_User_extensions_List>,%a2 49e7c: 2f02 movel %d2,%sp@- 49e7e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49e82: b5fc 0005 fa80 cmpal #391808,%a2 49e88: 671e beqs 49ea8 <_User_extensions_Thread_start+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 49e8a: 206a 0018 moveal %a2@(24),%a0 49e8e: 4a88 tstl %a0 49e90: 670c beqs 49e9e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 49e92: 2f02 movel %d2,%sp@- 49e94: 2f39 0005 facc movel 5facc <_Per_CPU_Information+0xc>,%sp@- 49e9a: 4e90 jsr %a0@ 49e9c: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49e9e: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49ea0: b5fc 0005 fa80 cmpal #391808,%a2 49ea6: 66e2 bnes 49e8a <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49ea8: 242e fff8 movel %fp@(-8),%d2 49eac: 246e fffc moveal %fp@(-4),%a2 49eb0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049eb4 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 49eb4: 4e56 fff4 linkw %fp,#-12 49eb8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49ebc: 262e 0008 movel %fp@(8),%d3 49ec0: 242e 000c movel %fp@(12),%d2 49ec4: 2479 0005 f93c moveal 5f93c <_User_extensions_Switches_list>,%a2 Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49eca: b5fc 0005 f940 cmpal #391488,%a2 49ed0: 6716 beqs 49ee8 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 49ed2: 2f02 movel %d2,%sp@- 49ed4: 2f03 movel %d3,%sp@- 49ed6: 206a 0008 moveal %a2@(8),%a0 49eda: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 49edc: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49ede: 508f addql #8,%sp 49ee0: b5fc 0005 f940 cmpal #391488,%a2 49ee6: 66ea bnes 49ed2 <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49ee8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49eee: 4e5e unlk %fp ... =============================================================================== 0004b804 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b804: 4e56 ffe8 linkw %fp,#-24 4b808: 226e 000c moveal %fp@(12),%a1 4b80c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b810: 283c 0000 0700 movel #1792,%d4 4b816: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b818: 266e 0008 moveal %fp@(8),%a3 4b81c: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b820: 40c1 movew %sr,%d1 4b822: 8081 orl %d1,%d0 4b824: 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; 4b826: 244b moveal %a3,%a2 4b828: 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 ) ) { 4b82a: b5c8 cmpal %a0,%a2 4b82c: 6746 beqs 4b874 <_Watchdog_Adjust+0x70> switch ( direction ) { 4b82e: 4a89 tstl %a1 4b830: 664e bnes 4b880 <_Watchdog_Adjust+0x7c> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b832: 4a82 tstl %d2 4b834: 673e beqs 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b836: 2628 0010 movel %a0@(16),%d3 4b83a: 49f9 0004 ba80 lea 4ba80 <_Watchdog_Tickle>,%a4 4b840: b682 cmpl %d2,%d3 4b842: 622a bhis 4b86e <_Watchdog_Adjust+0x6a> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4b844: 7001 moveq #1,%d0 4b846: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b84a: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b84c: 2f0b movel %a3,%sp@- 4b84e: 4e94 jsr %a4@ _ISR_Disable( level ); 4b850: 2004 movel %d4,%d0 4b852: 40c1 movew %sr,%d1 4b854: 8081 orl %d1,%d0 4b856: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4b858: 588f addql #4,%sp while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4b85a: 9483 subl %d3,%d2 4b85c: 2053 moveal %a3@,%a0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b85e: b1ca cmpal %a2,%a0 4b860: 6712 beqs 4b874 <_Watchdog_Adjust+0x70> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b862: 4a82 tstl %d2 4b864: 670e beqs 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b866: 2628 0010 movel %a0@(16),%d3 4b86a: b483 cmpl %d3,%d2 4b86c: 64d6 bccs 4b844 <_Watchdog_Adjust+0x40> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; 4b86e: 9682 subl %d2,%d3 4b870: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b874: 46c1 movew %d1,%sr } 4b876: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b87c: 4e5e unlk %fp 4b87e: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b880: 7001 moveq #1,%d0 4b882: b089 cmpl %a1,%d0 4b884: 66ee bnes 4b874 <_Watchdog_Adjust+0x70> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b886: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b88a: 46c1 movew %d1,%sr } 4b88c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b892: 4e5e unlk %fp ... =============================================================================== 00049ef4 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 49ef4: 4e56 ffec linkw %fp,#-20 49ef8: 226e 000c moveal %fp@(12),%a1 49efc: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49f00: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 49f04: 283c 0000 0700 movel #1792,%d4 49f0a: 2004 movel %d4,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 49f0c: 2639 0005 fac8 movel 5fac8 <_Per_CPU_Information+0x8>,%d3 _ISR_Disable( level ); 49f12: 40c2 movew %sr,%d2 49f14: 8082 orl %d2,%d0 49f16: 46c0 movew %d0,%sr /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 49f18: 4aa9 0008 tstl %a1@(8) 49f1c: 6600 00bc bnew 49fda <_Watchdog_Insert+0xe6> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 49f20: 2039 0005 fa34 movel 5fa34 <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49f26: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 49f28: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49f2a: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 49f2e: 23c0 0005 fa34 movel %d0,5fa34 <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 49f34: 2029 000c movel %a1@(12),%d0 49f38: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49f3a: 6764 beqs 49fa0 <_Watchdog_Insert+0xac> 49f3c: 4a90 tstl %a0@ 49f3e: 6760 beqs 49fa0 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49f40: 2228 0010 movel %a0@(16),%d1 49f44: b280 cmpl %d0,%d1 49f46: 6252 bhis 49f9a <_Watchdog_Insert+0xa6> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 49f48: 2a04 movel %d4,%d5 49f4a: 46c2 movew %d2,%sr 49f4c: 8a82 orl %d2,%d5 49f4e: 46c5 movew %d5,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49f50: 7a01 moveq #1,%d5 49f52: baa9 0008 cmpl %a1@(8),%d5 49f56: 666e bnes 49fc6 <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49f58: 2a39 0005 f9dc movel 5f9dc <_Watchdog_Sync_level>,%d5 49f5e: ba83 cmpl %d3,%d5 49f60: 6230 bhis 49f92 <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49f62: 9081 subl %d1,%d0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49f64: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49f66: 4a80 tstl %d0 49f68: 6736 beqs 49fa0 <_Watchdog_Insert+0xac> 49f6a: 4a90 tstl %a0@ 49f6c: 6732 beqs 49fa0 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49f6e: 2228 0010 movel %a0@(16),%d1 49f72: b081 cmpl %d1,%d0 49f74: 6524 bcss 49f9a <_Watchdog_Insert+0xa6> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49f76: 9081 subl %d1,%d0 _ISR_Flash( level ); 49f78: 2204 movel %d4,%d1 49f7a: 46c2 movew %d2,%sr 49f7c: 8282 orl %d2,%d1 49f7e: 46c1 movew %d1,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49f80: 7201 moveq #1,%d1 49f82: b2a9 0008 cmpl %a1@(8),%d1 49f86: 663e bnes 49fc6 <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49f88: 2239 0005 f9dc movel 5f9dc <_Watchdog_Sync_level>,%d1 49f8e: b283 cmpl %d3,%d1 49f90: 63d2 blss 49f64 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN _Watchdog_Sync_level = insert_isr_nest_level; 49f92: 23c3 0005 f9dc movel %d3,5f9dc <_Watchdog_Sync_level> goto restart; 49f98: 609a bras 49f34 <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49f9a: 9280 subl %d0,%d1 49f9c: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 49fa0: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49fa4: 7a02 moveq #2,%d5 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 49fa6: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49fa8: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49fac: 2039 0005 fa38 movel 5fa38 <_Watchdog_Ticks_since_boot>,%d0 49fb2: 2345 0008 movel %d5,%a1@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49fb6: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 49fba: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 49fbc: 2549 0004 movel %a1,%a2@(4) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 49fc0: 228a movel %a2,%a1@ 49fc2: 2340 0014 movel %d0,%a1@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 49fc6: 23c3 0005 f9dc movel %d3,5f9dc <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49fcc: 2039 0005 fa34 movel 5fa34 <_Watchdog_Sync_count>,%d0 49fd2: 5380 subql #1,%d0 49fd4: 23c0 0005 fa34 movel %d0,5fa34 <_Watchdog_Sync_count> _ISR_Enable( level ); 49fda: 46c2 movew %d2,%sr } 49fdc: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49fe0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a03c <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a03c: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4a042: 4e56 0000 linkw %fp,#0 4a046: 206e 0008 moveal %fp@(8),%a0 4a04a: 2f0a movel %a2,%sp@- 4a04c: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4a04e: 40c1 movew %sr,%d1 4a050: 8081 orl %d1,%d0 4a052: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 4a054: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 4a058: 7401 moveq #1,%d2 4a05a: b480 cmpl %d0,%d2 4a05c: 6764 beqs 4a0c2 <_Watchdog_Remove+0x86> 4a05e: 6314 blss 4a074 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a060: 2279 0005 fa38 moveal 5fa38 <_Watchdog_Ticks_since_boot>,%a1 4a066: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a06a: 46c1 movew %d1,%sr return( previous_state ); } 4a06c: 241f movel %sp@+,%d2 4a06e: 245f moveal %sp@+,%a2 4a070: 4e5e unlk %fp 4a072: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4a074: 143c 0003 moveb #3,%d2 4a078: b480 cmpl %d0,%d2 4a07a: 65e4 bcss 4a060 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 4a07c: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4a07e: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4a082: 4a91 tstl %a1@ 4a084: 6708 beqs 4a08e <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 4a086: 2428 0010 movel %a0@(16),%d2 4a08a: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 4a08e: 2479 0005 fa34 moveal 5fa34 <_Watchdog_Sync_count>,%a2 4a094: 4a8a tstl %a2 4a096: 670c beqs 4a0a4 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 4a098: 45f9 0005 fac8 lea 5fac8 <_Per_CPU_Information+0x8>,%a2 4a09e: 23d2 0005 f9dc movel %a2@,5f9dc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4a0a4: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 4a0a8: 234a 0004 movel %a2,%a1@(4) previous->next = next; 4a0ac: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a0ae: 2279 0005 fa38 moveal 5fa38 <_Watchdog_Ticks_since_boot>,%a1 4a0b4: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a0b8: 46c1 movew %d1,%sr return( previous_state ); } 4a0ba: 241f movel %sp@+,%d2 4a0bc: 245f moveal %sp@+,%a2 4a0be: 4e5e unlk %fp 4a0c0: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a0c2: 2279 0005 fa38 moveal 5fa38 <_Watchdog_Ticks_since_boot>,%a1 /* * 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; 4a0c8: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4a0cc: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 4a0d0: 46c1 movew %d1,%sr return( previous_state ); } 4a0d2: 241f movel %sp@+,%d2 4a0d4: 245f moveal %sp@+,%a2 4a0d6: 4e5e unlk %fp ... =============================================================================== 0004b204 <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b204: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4b20a: 4e56 ffe8 linkw %fp,#-24 4b20e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b212: 242e 0008 movel %fp@(8),%d2 4b216: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b21a: 40c3 movew %sr,%d3 4b21c: 8083 orl %d3,%d0 4b21e: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4b220: 2f0b movel %a3,%sp@- 4b222: 4bf9 0004 4be0 lea 44be0 ,%a5 4b228: 2f02 movel %d2,%sp@- 4b22a: 4879 0005 f048 pea 5f048 <_Status_Object_name_errors_to_status+0x14> 4b230: 4e95 jsr %a5@ */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; 4b232: 245b moveal %a3@+,%a2 if ( !_Chain_Is_empty( header ) ) { 4b234: 4fef 000c lea %sp@(12),%sp 4b238: b7ca cmpal %a2,%a3 4b23a: 672c beqs 4b268 <_Watchdog_Report_chain+0x64> 4b23c: 49f9 0004 b280 lea 4b280 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4b242: 2f0a movel %a2,%sp@- 4b244: 42a7 clrl %sp@- 4b246: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 4b248: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 4b24a: 508f addql #8,%sp 4b24c: b7ca cmpal %a2,%a3 4b24e: 66f2 bnes 4b242 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b250: 2f02 movel %d2,%sp@- 4b252: 4879 0005 f05f pea 5f05f <_Status_Object_name_errors_to_status+0x2b> 4b258: 4e95 jsr %a5@ 4b25a: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b25c: 46c3 movew %d3,%sr } 4b25e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b264: 4e5e unlk %fp 4b266: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b268: 4879 0005 f06e pea 5f06e <_Status_Object_name_errors_to_status+0x3a> 4b26e: 4e95 jsr %a5@ 4b270: 588f addql #4,%sp } _ISR_Enable( level ); 4b272: 46c3 movew %d3,%sr } 4b274: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b27a: 4e5e unlk %fp ... =============================================================================== 0004a0dc <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4a0dc: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 4a0e2: 4e56 ffe8 linkw %fp,#-24 4a0e6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4a0ea: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 4a0ee: 40c2 movew %sr,%d2 4a0f0: 8082 orl %d2,%d0 4a0f2: 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; 4a0f4: 264c moveal %a4,%a3 4a0f6: 245b moveal %a3@+,%a2 if ( _Chain_Is_empty( header ) ) 4a0f8: b7ca cmpal %a2,%a3 4a0fa: 673c beqs 4a138 <_Watchdog_Tickle+0x5c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 4a0fc: 202a 0010 movel %a2@(16),%d0 4a100: 4bf9 0004 a03c lea 4a03c <_Watchdog_Remove>,%a5 4a106: 6708 beqs 4a110 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 4a108: 5380 subql #1,%d0 4a10a: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 4a10e: 6628 bnes 4a138 <_Watchdog_Tickle+0x5c> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a110: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 4a116: 2f0a movel %a2,%sp@- 4a118: 4e95 jsr %a5@ _ISR_Enable( level ); 4a11a: 46c2 movew %d2,%sr switch( watchdog_state ) { 4a11c: 7202 moveq #2,%d1 4a11e: 588f addql #4,%sp 4a120: b280 cmpl %d0,%d1 4a122: 6720 beqs 4a144 <_Watchdog_Tickle+0x68> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 4a124: 2003 movel %d3,%d0 4a126: 40c2 movew %sr,%d2 4a128: 8082 orl %d2,%d0 4a12a: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 4a12c: 2454 moveal %a4@,%a2 the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 4a12e: b5cb cmpal %a3,%a2 4a130: 6706 beqs 4a138 <_Watchdog_Tickle+0x5c> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 4a132: 4aaa 0010 tstl %a2@(16) 4a136: 67de beqs 4a116 <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 4a138: 46c2 movew %d2,%sr } 4a13a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4a140: 4e5e unlk %fp 4a142: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 4a144: 2f2a 0024 movel %a2@(36),%sp@- 4a148: 2f2a 0020 movel %a2@(32),%sp@- 4a14c: 206a 001c moveal %a2@(28),%a0 4a150: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 4a152: 508f addql #8,%sp 4a154: 60ce bras 4a124 <_Watchdog_Tickle+0x48> ... =============================================================================== 0005bb8c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 5bb8c: 4280 clrl %d0 <== NOT EXECUTED return 0; } #endif int __kill( pid_t pid, int sig ) { 5bb8e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5bb92: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0005ba68 <_calloc_r>: void *_calloc_r( struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { 5ba68: 4e56 0000 linkw %fp,#0 5ba6c: 202e 000c movel %fp@(12),%d0 return calloc( elements, size ); 5ba70: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5ba76: 2d40 0008 movel %d0,%fp@(8) } 5ba7a: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), size_t elements, size_t size ) { return calloc( elements, size ); 5ba7c: 4ef9 0004 2ec8 jmp 42ec8 ... =============================================================================== 00053ace <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 53ace: 4e56 ffd8 linkw %fp,#-40 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53ad2: 206e 0008 moveal %fp@(8),%a0 uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 53ad6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 53ada: 242e 0014 movel %fp@(20),%d2 53ade: 286e 0018 moveal %fp@(24),%a4 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53ae2: 2468 0034 moveal %a0@(52),%a2 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 53ae6: 42ae fffc clrl %fp@(-4) uint32_t c = 0; while (count > 0) 53aea: 4a82 tstl %d2 53aec: 6776 beqs 53b64 <_fat_block_read+0x96> <== NEVER TAKEN 53aee: 2c0e movel %fp,%d6 53af0: 4283 clrl %d3 53af2: 5986 subql #4,%d6 53af4: 47f9 0005 3758 lea 53758 ,%a3 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); 53afa: 4bf9 0005 d28c lea 5d28c ,%a5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 53b00: 2a2e 0010 movel %fp@(16),%d5 53b04: 282e 000c movel %fp@(12),%d4 { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53b08: 2f06 movel %d6,%sp@- 53b0a: 4878 0001 pea 1 53b0e: 2f04 movel %d4,%sp@- c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; cmpltd += c; blk++; 53b10: 5284 addql #1,%d4 rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 53b12: 2f0a movel %a2,%sp@- 53b14: 4e93 jsr %a3@ if (rc != RC_OK) 53b16: 4fef 0010 lea %sp@(16),%sp 53b1a: 4a80 tstl %d0 53b1c: 6638 bnes 53b56 <_fat_block_read+0x88> <== NEVER TAKEN return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 53b1e: 4280 clrl %d0 53b20: 3012 movew %a2@,%d0 memcpy((buff + cmpltd), (block->buffer + ofs), c); 53b22: 206e fffc moveal %fp@(-4),%a0 { 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)); 53b26: 9085 subl %d5,%d0 53b28: b480 cmpl %d0,%d2 53b2a: 6402 bccs 53b2e <_fat_block_read+0x60> <== ALWAYS TAKEN 53b2c: 2002 movel %d2,%d0 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 53b2e: 2f00 movel %d0,%sp@- 53b30: daa8 001e addl %a0@(30),%d5 count -= c; 53b34: 9480 subl %d0,%d2 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); 53b36: 2f05 movel %d5,%sp@- 53b38: 4874 3800 pea %a4@(00000000,%d3:l) count -= c; cmpltd += c; 53b3c: d680 addl %d0,%d3 blk++; ofs = 0; 53b3e: 4285 clrl %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); 53b40: 4e95 jsr %a5@ uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 53b42: 4fef 000c lea %sp@(12),%sp 53b46: 4a82 tstl %d2 53b48: 66be bnes 53b08 <_fat_block_read+0x3a> cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53b4a: 2003 movel %d3,%d0 53b4c: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 53b52: 4e5e unlk %fp 53b54: 4e75 rts while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; 53b56: 76ff moveq #-1,%d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53b58: 2003 movel %d3,%d0 <== NOT EXECUTED 53b5a: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53b60: 4e5e unlk %fp <== NOT EXECUTED 53b62: 4e75 rts <== NOT EXECUTED void *buff ) { int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 53b64: 4283 clrl %d3 <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 53b66: 2003 movel %d3,%d0 <== NOT EXECUTED 53b68: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED 53b6e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053c3c <_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) { 53c3c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53c40: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 53c44: 2d68 0034 0008 movel %a0@(52),%fp@(8) <== NOT EXECUTED } 53c4a: 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); 53c4c: 4ef9 0005 396c jmp 5396c <== NOT EXECUTED =============================================================================== 00053b72 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 53b72: 4e56 ffd4 linkw %fp,#-44 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53b76: 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) { 53b7a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53b7e: 262e 0014 movel %fp@(20),%d3 53b82: 286e 0018 moveal %fp@(24),%a4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53b86: 2468 0034 moveal %a0@(52),%a2 ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 53b8a: 42ae fffc clrl %fp@(-4) uint32_t c = 0; while(count > 0) 53b8e: 4a83 tstl %d3 53b90: 6700 009c beqw 53c2e <_fat_block_write+0xbc> 53b94: 2e0e movel %fp,%d7 53b96: 4284 clrl %d4 53b98: 5987 subql #4,%d7 53b9a: 47f9 0005 3758 lea 53758 ,%a3 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); 53ba0: 4bf9 0005 d28c lea 5d28c ,%a5 uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 53ba6: 2c2e 0010 movel %fp@(16),%d6 53baa: 2a2e 000c movel %fp@(12),%d5 { c = MIN(count, (fs_info->vol.bps - ofs)); 53bae: 4280 clrl %d0 53bb0: 3012 movew %a2@,%d0 53bb2: 2400 movel %d0,%d2 53bb4: 9486 subl %d6,%d2 53bb6: b682 cmpl %d2,%d3 53bb8: 6402 bccs 53bbc <_fat_block_write+0x4a> 53bba: 2403 movel %d3,%d2 if (c == fs_info->vol.bps) 53bbc: b480 cmpl %d0,%d2 53bbe: 6748 beqs 53c08 <_fat_block_write+0x96> 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); 53bc0: 2f07 movel %d7,%sp@- 53bc2: 4878 0001 pea 1 memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 53bc6: 9682 subl %d2,%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); 53bc8: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 53bca: 5285 addql #1,%d5 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); 53bcc: 2f0a movel %a2,%sp@- 53bce: 4e93 jsr %a3@ 53bd0: 4fef 0010 lea %sp@(16),%sp if (rc != RC_OK) 53bd4: 4a80 tstl %d0 53bd6: 6648 bnes 53c20 <_fat_block_write+0xae> <== NEVER TAKEN return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 53bd8: 2f02 movel %d2,%sp@- 53bda: 4874 4800 pea %a4@(00000000,%d4:l) fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 53bde: d882 addl %d2,%d4 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); 53be0: 206e fffc moveal %fp@(-4),%a0 53be4: dca8 001e addl %a0@(30),%d6 53be8: 2f06 movel %d6,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; ofs = 0; 53bea: 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); 53bec: 4e95 jsr %a5@ uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 53bee: 4fef 000c lea %sp@(12),%sp } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 53bf2: 7001 moveq #1,%d0 53bf4: 1540 0076 moveb %d0,%a2@(118) 53bf8: 4a83 tstl %d3 53bfa: 66b2 bnes 53bae <_fat_block_write+0x3c> cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53bfc: 2004 movel %d4,%d0 53bfe: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 53c04: 4e5e unlk %fp 53c06: 4e75 rts while(count > 0) { 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); 53c08: 2f07 movel %d7,%sp@- 53c0a: 4878 0002 pea 2 memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 53c0e: 9682 subl %d2,%d3 while(count > 0) { 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); 53c10: 2f05 movel %d5,%sp@- fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; blk++; 53c12: 5285 addql #1,%d5 while(count > 0) { 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); 53c14: 2f0a movel %a2,%sp@- 53c16: 4e93 jsr %a3@ 53c18: 4fef 0010 lea %sp@(16),%sp else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 53c1c: 4a80 tstl %d0 53c1e: 67b8 beqs 53bd8 <_fat_block_write+0x66> <== ALWAYS TAKEN return -1; 53c20: 78ff moveq #-1,%d4 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53c22: 2004 movel %d4,%d0 <== NOT EXECUTED 53c24: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53c2a: 4e5e unlk %fp <== NOT EXECUTED 53c2c: 4e75 rts <== NOT EXECUTED uint32_t count, const void *buff) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; 53c2e: 4284 clrl %d4 <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 53c30: 2004 movel %d4,%d0 <== NOT EXECUTED 53c32: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 53c38: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005ba84 <_free_r>: void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { 5ba84: 4e56 0000 linkw %fp,#0 free( ptr ); 5ba88: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5ba8e: 4e5e unlk %fp void _free_r( struct _reent *ignored __attribute__((unused)), void *ptr ) { free( ptr ); 5ba90: 4ef9 0004 32dc jmp 432dc ... =============================================================================== 0005bb34 <_fstat_r>: int _fstat_r( struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { 5bb34: 4e56 0000 linkw %fp,#0 5bb38: 202e 000c movel %fp@(12),%d0 return fstat( fd, buf ); 5bb3c: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5bb42: 2d40 0008 movel %d0,%fp@(8) } 5bb46: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), int fd, struct stat *buf ) { return fstat( fd, buf ); 5bb48: 4ef9 0005 ba98 jmp 5ba98 ... =============================================================================== 000433ea <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 433ea: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return gettimeofday( tp, tzp ); } 433ee: 4e5e unlk %fp <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 433f0: 4ef9 0004 336c jmp 4336c <== NOT EXECUTED ... =============================================================================== 0005bb64 <_isatty_r>: int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { 5bb64: 4e56 0000 linkw %fp,#0 return isatty( fd ); 5bb68: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5bb6e: 4e5e unlk %fp int _isatty_r( struct _reent *ptr __attribute__((unused)), int fd ) { return isatty( fd ); 5bb70: 4ef9 0005 c1ec jmp 5c1ec ... =============================================================================== 000446e4 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 446e4: 4e56 0000 linkw %fp,#0 446e8: 202e 000c movel %fp@(12),%d0 return link( existing, new ); 446ec: 2d6e 0010 000c movel %fp@(16),%fp@(12) 446f2: 2d40 0008 movel %d0,%fp@(8) } 446f6: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 446f8: 4ef9 0004 45e8 jmp 445e8 ... =============================================================================== 00045fe8 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 45fe8: 4e56 0000 linkw %fp,#0 45fec: 202e 000c movel %fp@(12),%d0 return _STAT_NAME( path, buf ); 45ff0: 2d6e 0010 000c movel %fp@(16),%fp@(12) 45ff6: 2d40 0008 movel %d0,%fp@(8) } 45ffa: 4e5e unlk %fp struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 45ffc: 4ef9 0004 5f50 jmp 45f50 ... =============================================================================== 0005bd00 <_malloc_r>: void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { 5bd00: 4e56 0000 linkw %fp,#0 return malloc( size ); 5bd04: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 5bd0a: 4e5e unlk %fp void *_malloc_r( struct _reent *ignored __attribute__((unused)), size_t size ) { return malloc( size ); 5bd0c: 4ef9 0004 360c jmp 4360c ... =============================================================================== 0005bdec <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 5bdec: 4e56 0000 linkw %fp,#0 5bdf0: 202e 000c movel %fp@(12),%d0 return realloc( ptr, size ); 5bdf4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5bdfa: 2d40 0008 movel %d0,%fp@(8) } 5bdfe: 4e5e unlk %fp struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 5be00: 4ef9 0005 be2c jmp 5be2c ... =============================================================================== 0005f0bc <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 5f0bc: 4e56 ffa0 linkw %fp,#-96 5f0c0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 5f0c4: 262e 000c movel %fp@(12),%d3 5f0c8: 2a2e 0010 movel %fp@(16),%d5 /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 5f0cc: 2f03 movel %d3,%sp@- 5f0ce: 4eb9 0004 5b6c jsr 45b6c if ( old_parent_pathlen == 0 ) 5f0d4: 588f addql #4,%sp 5f0d6: 4a80 tstl %d0 5f0d8: 6600 0092 bnew 5f16c <_rename_r+0xb0> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5f0dc: 45ee ffd0 lea %fp@(-48),%a2 5f0e0: 4282 clrl %d2 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 5f0e2: d483 addl %d3,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f0e4: 47f9 0005 28e4 lea 528e4 ,%a3 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5f0ea: 2f0a movel %a2,%sp@- 5f0ec: 486e fff8 pea %fp@(-8) rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 5f0f0: 4204 clrb %d4 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5f0f2: 2f03 movel %d3,%sp@- old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f0f4: 260e movel %fp,%d3 5f0f6: 0683 ffff ffbc addil #-68,%d3 */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5f0fc: 4eb9 0004 75b0 jsr 475b0 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5f102: 2d52 ffbc movel %a2@,%fp@(-68) */ old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 5f106: 4fef 000c lea %sp@(12),%sp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5f10a: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 5f110: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 5f116: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 5f11c: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f122: 2f02 movel %d2,%sp@- /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 5f124: 2d42 fffc movel %d2,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f128: 4e93 jsr %a3@ 5f12a: 2e80 movel %d0,%sp@ 5f12c: 2f02 movel %d2,%sp@- 5f12e: 4eb9 0004 5bae jsr 45bae 5f134: d480 addl %d0,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f136: 2f02 movel %d2,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f138: 2d42 fffc movel %d2,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f13c: 4e93 jsr %a3@ 5f13e: 4297 clrl %sp@ 5f140: 2f03 movel %d3,%sp@- 5f142: 42a7 clrl %sp@- 5f144: 2f00 movel %d0,%sp@- 5f146: 2f02 movel %d2,%sp@- 5f148: 4eb9 0004 5ab0 jsr 45ab0 0, &old_loc, false ); if ( result != 0 ) { 5f14e: 4fef 001c lea %sp@(28),%sp 5f152: 4a80 tstl %d0 5f154: 6700 009a beqw 5f1f0 <_rename_r+0x134> if ( free_old_parentloc ) 5f158: 4a04 tstb %d4 5f15a: 6600 010a bnew 5f266 <_rename_r+0x1aa> rtems_filesystem_freenode( &old_parent_loc ); return -1; 5f15e: 74ff moveq #-1,%d2 if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 5f160: 2002 movel %d2,%d0 5f162: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 5f168: 4e5e unlk %fp 5f16a: 4e75 rts old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 5f16c: 42a7 clrl %sp@- 5f16e: 45ee ffd0 lea %fp@(-48),%a2 5f172: 2400 movel %d0,%d2 5f174: 2f0a movel %a2,%sp@- 5f176: 4878 0002 pea 2 5f17a: 2f00 movel %d0,%sp@- 5f17c: 2f03 movel %d3,%sp@- 5f17e: 4eb9 0004 5b20 jsr 45b20 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 5f184: 4fef 0014 lea %sp@(20),%sp 5f188: 4a80 tstl %d0 5f18a: 66d2 bnes 5f15e <_rename_r+0xa2> <== NEVER TAKEN /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5f18c: 2d52 ffbc movel %a2@,%fp@(-68) name = old + old_parent_pathlen; 5f190: d483 addl %d3,%d2 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f192: 47f9 0005 28e4 lea 528e4 ,%a3 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f198: 260e movel %fp,%d3 5f19a: 0683 ffff ffbc addil #-68,%d3 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5f1a0: 2d6e ffd4 ffc0 movel %fp@(-44),%fp@(-64) 5f1a6: 2d6e ffd8 ffc4 movel %fp@(-40),%fp@(-60) 5f1ac: 2d6e ffdc ffc8 movel %fp@(-36),%fp@(-56) 5f1b2: 2d6e ffe0 ffcc movel %fp@(-32),%fp@(-52) name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f1b8: 2f02 movel %d2,%sp@- &old_parent_loc, false ); if ( result != 0 ) return -1; free_old_parentloc = true; 5f1ba: 7801 moveq #1,%d4 /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 5f1bc: 2d42 fffc movel %d2,%fp@(-4) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f1c0: 4e93 jsr %a3@ 5f1c2: 2e80 movel %d0,%sp@ 5f1c4: 2f02 movel %d2,%sp@- 5f1c6: 4eb9 0004 5bae jsr 45bae 5f1cc: d480 addl %d0,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f1ce: 2f02 movel %d2,%sp@- * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5f1d0: 2d42 fffc movel %d2,%fp@(-4) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5f1d4: 4e93 jsr %a3@ 5f1d6: 4297 clrl %sp@ 5f1d8: 2f03 movel %d3,%sp@- 5f1da: 42a7 clrl %sp@- 5f1dc: 2f00 movel %d0,%sp@- 5f1de: 2f02 movel %d2,%sp@- 5f1e0: 4eb9 0004 5ab0 jsr 45ab0 0, &old_loc, false ); if ( result != 0 ) { 5f1e6: 4fef 001c lea %sp@(28),%sp 5f1ea: 4a80 tstl %d0 5f1ec: 6600 ff6a bnew 5f158 <_rename_r+0x9c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 5f1f0: 47ee ffe4 lea %fp@(-28),%a3 5f1f4: 2f0b movel %a3,%sp@- 5f1f6: 486e fff8 pea %fp@(-8) 5f1fa: 2f05 movel %d5,%sp@- 5f1fc: 4eb9 0004 75b0 jsr 475b0 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 5f202: 486e fffc pea %fp@(-4) 5f206: daae fff8 addl %fp@(-8),%d5 5f20a: 2f0b movel %a3,%sp@- 5f20c: 206e fff0 moveal %fp@(-16),%a0 5f210: 2f05 movel %d5,%sp@- 5f212: 2068 0004 moveal %a0@(4),%a0 5f216: 4e90 jsr %a0@ if ( result != 0 ) { 5f218: 4fef 0018 lea %sp@(24),%sp 5f21c: 4a80 tstl %d0 5f21e: 6600 00b8 bnew 5f2d8 <_rename_r+0x21c> /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 5f222: 202e fff4 movel %fp@(-12),%d0 5f226: b0ae ffe0 cmpl %fp@(-32),%d0 5f22a: 6660 bnes 5f28c <_rename_r+0x1d0> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 5f22c: 2f2e fffc movel %fp@(-4),%sp@- rtems_filesystem_freenode( &new_parent_loc ); 5f230: 49f9 0004 5d30 lea 45d30 ,%a4 rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 5f236: 206e fff0 moveal %fp@(-16),%a0 5f23a: 2f0b movel %a3,%sp@- 5f23c: 2f03 movel %d3,%sp@- 5f23e: 2f0a movel %a2,%sp@- 5f240: 2068 0040 moveal %a0@(64),%a0 5f244: 4e90 jsr %a0@ 5f246: 2400 movel %d0,%d2 rtems_filesystem_freenode( &new_parent_loc ); 5f248: 2f0b movel %a3,%sp@- 5f24a: 4e94 jsr %a4@ if ( free_old_parentloc ) 5f24c: 4fef 0014 lea %sp@(20),%sp 5f250: 4a04 tstb %d4 5f252: 662a bnes 5f27e <_rename_r+0x1c2> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5f254: 2f03 movel %d3,%sp@- 5f256: 4e94 jsr %a4@ return result; 5f258: 588f addql #4,%sp } 5f25a: 2002 movel %d2,%d0 5f25c: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 5f262: 4e5e unlk %fp 5f264: 4e75 rts result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f266: 2f0a movel %a2,%sp@- return -1; 5f268: 74ff moveq #-1,%d2 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f26a: 4eb9 0004 5d30 jsr 45d30 5f270: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 5f272: 2002 movel %d2,%d0 5f274: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 5f27a: 4e5e unlk %fp 5f27c: 4e75 rts result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f27e: 2f0a movel %a2,%sp@- 5f280: 4e94 jsr %a4@ 5f282: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 5f284: 2f03 movel %d3,%sp@- 5f286: 4e94 jsr %a4@ return result; 5f288: 588f addql #4,%sp 5f28a: 60ce bras 5f25a <_rename_r+0x19e> * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); 5f28c: 2f0b movel %a3,%sp@- 5f28e: 49f9 0004 5d30 lea 45d30 ,%a4 5f294: 4e94 jsr %a4@ if ( free_old_parentloc ) 5f296: 588f addql #4,%sp 5f298: 4a04 tstb %d4 5f29a: 6620 bnes 5f2bc <_rename_r+0x200> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5f29c: 2f03 movel %d3,%sp@- rtems_set_errno_and_return_minus_one( EXDEV ); 5f29e: 74ff moveq #-1,%d2 if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5f2a0: 4e94 jsr %a4@ rtems_set_errno_and_return_minus_one( EXDEV ); 5f2a2: 4eb9 0005 14c0 jsr 514c0 <__errno> 5f2a8: 588f addql #4,%sp 5f2aa: 2040 moveal %d0,%a0 5f2ac: 7012 moveq #18,%d0 5f2ae: 2080 movel %d0,%a0@ if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 5f2b0: 2002 movel %d2,%d0 5f2b2: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 5f2b8: 4e5e unlk %fp 5f2ba: 4e75 rts */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f2bc: 2f0a movel %a2,%sp@- rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); 5f2be: 74ff moveq #-1,%d2 */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f2c0: 4e94 jsr %a4@ 5f2c2: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 5f2c4: 2f03 movel %d3,%sp@- 5f2c6: 4e94 jsr %a4@ rtems_set_errno_and_return_minus_one( EXDEV ); 5f2c8: 4eb9 0005 14c0 jsr 514c0 <__errno> 5f2ce: 588f addql #4,%sp 5f2d0: 2040 moveal %d0,%a0 5f2d2: 7012 moveq #18,%d0 5f2d4: 2080 movel %d0,%a0@ 5f2d6: 60d8 bras 5f2b0 <_rename_r+0x1f4> rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 5f2d8: 2f0b movel %a3,%sp@- 5f2da: 49f9 0004 5d30 lea 45d30 ,%a4 5f2e0: 4e94 jsr %a4@ if ( free_old_parentloc ) 5f2e2: 588f addql #4,%sp 5f2e4: 4a04 tstb %d4 5f2e6: 6614 bnes 5f2fc <_rename_r+0x240> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5f2e8: 2f03 movel %d3,%sp@- return -1; 5f2ea: 74ff moveq #-1,%d2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); 5f2ec: 4e94 jsr %a4@ return -1; 5f2ee: 588f addql #4,%sp if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 5f2f0: 2002 movel %d2,%d0 5f2f2: 4cee 1c3c ffa0 moveml %fp@(-96),%d2-%d5/%a2-%a4 5f2f8: 4e5e unlk %fp 5f2fa: 4e75 rts result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f2fc: 2f0a movel %a2,%sp@- rtems_filesystem_freenode( &old_loc ); return -1; 5f2fe: 74ff moveq #-1,%d2 result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); 5f300: 4e94 jsr %a4@ 5f302: 588f addql #4,%sp rtems_filesystem_freenode( &old_loc ); 5f304: 2f03 movel %d3,%sp@- 5f306: 4e94 jsr %a4@ return -1; 5f308: 588f addql #4,%sp 5f30a: 60e4 bras 5f2f0 <_rename_r+0x234> =============================================================================== 00045fe8 <_times>: #endif clock_t _times( struct tms *ptms ) { 45fe8: 4e56 ffdc linkw %fp,#-36 45fec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 45ff0: 246e 0008 moveal %fp@(8),%a2 rtems_interval ticks; if ( !ptms ) 45ff4: 4a8a tstl %a2 45ff6: 6776 beqs 4606e <_times+0x86> <== NEVER TAKEN /* * This call does not depend on TOD being initialized and can't fail. */ ticks = rtems_clock_get_ticks_since_boot(); 45ff8: 4eb9 0004 648c jsr 4648c { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 45ffe: 2239 0005 e0c8 movel 5e0c8 ,%d1 46004: 243c 0000 03e8 movel #1000,%d2 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4600a: 486e fffc pea %fp@(-4) { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 4600e: 4c01 2800 mulsl %d1,%d2 46012: 283c 000f 4240 movel #1000000,%d4 46018: 4c44 1001 remul %d4,%d1,%d1 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4601c: 486e fff8 pea %fp@(-8) 46020: 486e fff0 pea %fp@(-16) 46024: 2079 0005 fbac moveal 5fbac <_Per_CPU_Information+0xc>,%a0 4602a: 41e8 0082 lea %a0@(130),%a0 { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 4602e: 2d41 fff0 movel %d1,%fp@(-16) 46032: 223c 3b9a ca00 movel #1000000000,%d1 46038: 4c41 2003 remul %d1,%d3,%d2 TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 4603c: 2d40 ffec movel %d0,%fp@(-20) { Timestamp_Control per_tick; uint32_t ticks; uint32_t fractional_ticks; _Timestamp_Set( 46040: 2d43 fff4 movel %d3,%fp@(-12) TOD_MICROSECONDS_PER_SECOND, (rtems_configuration_get_nanoseconds_per_tick() % TOD_NANOSECONDS_PER_SECOND) ); _Timestamp_Divide( 46044: 2f08 movel %a0,%sp@- 46046: 4eb9 0004 9bf8 jsr 49bf8 <_Timespec_Divide> ptms->tms_utime = ticks; } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 4604c: 202e ffec movel %fp@(-20),%d0 ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; 46050: 4fef 0010 lea %sp@(16),%sp &_Thread_Executing->cpu_time_used, &per_tick, &ticks, &fractional_ticks ); ptms->tms_utime = ticks; 46054: 24ae fff8 movel %fp@(-8),%a2@ } #else ptms->tms_utime = _Thread_Executing->cpu_time_used; #endif ptms->tms_stime = ticks; 46058: 2540 0004 movel %d0,%a2@(4) ptms->tms_cutime = 0; 4605c: 42aa 0008 clrl %a2@(8) ptms->tms_cstime = 0; 46060: 42aa 000c clrl %a2@(12) return ticks; } 46064: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2 4606a: 4e5e unlk %fp 4606c: 4e75 rts ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 4606e: 4eb9 0004 e178 jsr 4e178 <__errno> 46074: 720e moveq #14,%d1 46076: 2040 moveal %d0,%a0 46078: 70ff moveq #-1,%d0 ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 4607a: 4cee 041c ffdc moveml %fp@(-36),%d2-%d4/%a2 ) { rtems_interval ticks; if ( !ptms ) rtems_set_errno_and_return_minus_one( EFAULT ); 46080: 2081 movel %d1,%a0@ ptms->tms_stime = ticks; ptms->tms_cutime = 0; ptms->tms_cstime = 0; return ticks; } 46082: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047190 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 47190: 4e56 0000 linkw %fp,#0 return unlink( path ); 47194: 2d6e 000c 0008 movel %fp@(12),%fp@(8) } 4719a: 4e5e unlk %fp int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 4719c: 4ef9 0004 6fc4 jmp 46fc4 ... =============================================================================== 0005be08 <_write_r>: struct _reent *ptr __attribute__((unused)), int fd, const void *buf, size_t nbytes ) { 5be08: 4e56 0000 linkw %fp,#0 5be0c: 222e 0010 movel %fp@(16),%d1 5be10: 202e 000c movel %fp@(12),%d0 return write( fd, buf, nbytes ); 5be14: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5be1a: 2d41 000c movel %d1,%fp@(12) 5be1e: 2d40 0008 movel %d0,%fp@(8) } 5be22: 4e5e unlk %fp int fd, const void *buf, size_t nbytes ) { return write( fd, buf, nbytes ); 5be24: 4ef9 0005 bf60 jmp 5bf60 ... =============================================================================== 00045224 : int chmod( const char *path, mode_t mode ) { 45224: 4e56 ffe8 linkw %fp,#-24 45228: 2f03 movel %d3,%sp@- 4522a: 262e 0008 movel %fp@(8),%d3 4522e: 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 ); 45230: 240e movel %fp,%d2 45232: 0682 ffff ffec addil #-20,%d2 45238: 2f03 movel %d3,%sp@- 4523a: 4eb9 0005 2708 jsr 52708 45240: 7201 moveq #1,%d1 45242: 2e81 movel %d1,%sp@ 45244: 2f02 movel %d2,%sp@- 45246: 42a7 clrl %sp@- 45248: 2f00 movel %d0,%sp@- 4524a: 2f03 movel %d3,%sp@- 4524c: 4eb9 0004 5774 jsr 45774 if ( status != 0 ) 45252: 4fef 0014 lea %sp@(20),%sp 45256: 4a80 tstl %d0 45258: 6630 bnes 4528a <== NEVER TAKEN return -1; result = (*loc.handlers->fchmod_h)( &loc, mode ); 4525a: 2f2e 000c movel %fp@(12),%sp@- 4525e: 206e fff4 moveal %fp@(-12),%a0 45262: 2f02 movel %d2,%sp@- 45264: 2068 001c moveal %a0@(28),%a0 45268: 4e90 jsr %a0@ rtems_filesystem_freenode( &loc ); 4526a: 2f02 movel %d2,%sp@- 4526c: 2d40 ffe8 movel %d0,%fp@(-24) 45270: 4eb9 0004 5984 jsr 45984 return result; 45276: 202e ffe8 movel %fp@(-24),%d0 4527a: 4fef 000c lea %sp@(12),%sp } 4527e: 242e ffe0 movel %fp@(-32),%d2 45282: 262e ffe4 movel %fp@(-28),%d3 45286: 4e5e unlk %fp 45288: 4e75 rts 4528a: 242e ffe0 movel %fp@(-32),%d2 rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; 4528e: 70ff moveq #-1,%d0 result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 45290: 262e ffe4 movel %fp@(-28),%d3 45294: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000456e8 : #include int chroot( const char *pathname ) { 456e8: 4e56 ffec linkw %fp,#-20 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) { 456ec: 203c 0006 30e8 movel #405736,%d0 #include int chroot( const char *pathname ) { 456f2: 2f0b movel %a3,%sp@- 456f4: 2f0a movel %a2,%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) { 456f6: b0b9 0006 1af0 cmpl 61af0 ,%d0 456fc: 6778 beqs 45776 rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 456fe: 2f2e 0008 movel %fp@(8),%sp@- 45702: 4eb9 0004 5614 jsr 45614 if (result) { 45708: 588f addql #4,%sp 4570a: 4a80 tstl %d0 4570c: 6600 009a bnew 457a8 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 45710: 42a7 clrl %sp@- 45712: 45ee ffec lea %fp@(-20),%a2 45716: 2f0a movel %a2,%sp@- 45718: 42a7 clrl %sp@- 4571a: 4878 0001 pea 1 4571e: 4879 0005 fac5 pea 5fac5 <_rodata_start+0x1b5> 45724: 4eb9 0004 5b20 jsr 45b20 4572a: 4fef 0014 lea %sp@(20),%sp 4572e: 4a80 tstl %d0 45730: 6676 bnes 457a8 <== 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); 45732: 2079 0006 1af0 moveal 61af0 ,%a0 45738: 41e8 0018 lea %a0@(24),%a0 4573c: 2f08 movel %a0,%sp@- 4573e: 4eb9 0004 5d30 jsr 45d30 rtems_filesystem_root = loc; 45744: 2079 0006 1af0 moveal 61af0 ,%a0 return 0; 4574a: 588f addql #4,%sp 4574c: 4280 clrl %d0 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* 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); rtems_filesystem_root = loc; 4574e: 2152 0018 movel %a2@,%a0@(24) 45752: 216e fff0 001c movel %fp@(-16),%a0@(28) 45758: 216e fff4 0020 movel %fp@(-12),%a0@(32) 4575e: 216e fff8 0024 movel %fp@(-8),%a0@(36) 45764: 216e fffc 0028 movel %fp@(-4),%a0@(40) return 0; } 4576a: 246e ffe4 moveal %fp@(-28),%a2 4576e: 266e ffe8 moveal %fp@(-24),%a3 45772: 4e5e unlk %fp 45774: 4e75 rts 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) { rtems_libio_set_private_env(); /* try to set a new private env*/ 45776: 4eb9 0004 70a8 jsr 470a8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4577c: 41f9 0006 30e8 lea 630e8 ,%a0 45782: b1f9 0006 1af0 cmpal 61af0 ,%a0 45788: 6600 ff74 bnew 456fe rtems_set_errno_and_return_minus_one( ENOTSUP ); 4578c: 4eb9 0005 14c0 jsr 514c0 <__errno> } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 45792: 246e ffe4 moveal %fp@(-28),%a2 /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 45796: 2040 moveal %d0,%a0 45798: 70ff moveq #-1,%d0 } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 4579a: 266e ffe8 moveal %fp@(-24),%a3 4579e: 4e5e unlk %fp /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); 457a0: 20bc 0000 0086 movel #134,%a0@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457a6: 4e75 rts } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 457a8: 45f9 0005 14c0 lea 514c0 <__errno>,%a2 457ae: 4e92 jsr %a2@ 457b0: 2640 moveal %d0,%a3 457b2: 4e92 jsr %a2@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457b4: 246e ffe4 moveal %fp@(-28),%a2 } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 457b8: 2040 moveal %d0,%a0 457ba: 70ff moveq #-1,%d0 457bc: 2690 movel %a0@,%a3@ } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; return 0; } 457be: 266e ffe8 moveal %fp@(-24),%a3 457c2: 4e5e unlk %fp ... =============================================================================== 00042dfc : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 42dfc: 4e56 ffe0 linkw %fp,#-32 42e00: 48d7 0cfc moveml %d2-%d7/%a2-%a3,%sp@ 42e04: 242e 0008 movel %fp@(8),%d2 42e08: 262e 000c movel %fp@(12),%d3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 42e0c: 2c39 0006 2dfe movel 62dfe ,%d6 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 42e12: 2802 movel %d2,%d4 ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.minor; 42e14: 2a03 movel %d3,%d5 42e16: bc84 cmpl %d4,%d6 42e18: 6300 008e blsw 42ea8 42e1c: 2479 0006 2e02 moveal 62e02 ,%a2 memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab = table; disktab_size = new_size; } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 42e22: e78c lsll #3,%d4 42e24: 47f2 4800 lea %a2@(00000000,%d4:l),%a3 42e28: 2453 moveal %a3@,%a2 42e2a: 282b 0004 movel %a3@(4),%d4 42e2e: 4a8a tstl %a2 42e30: 671e beqs 42e50 42e32: b885 cmpl %d5,%d4 42e34: 631a blss 42e50 <== NEVER TAKEN memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; } return disktab [major].minor + minor; 42e36: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 42e3a: 4a8a tstl %a2 42e3c: 675e beqs 42e9c <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 42e3e: 4a92 tstl %a2@ 42e40: 6700 00c0 beqw 42f02 return RTEMS_RESOURCE_IN_USE; 42e44: 700c moveq #12,%d0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42e46: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42e4c: 4e5e unlk %fp 42e4e: 4e75 rts if (disktab [major].minor == NULL || minor >= disktab[major].size) { rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; rtems_device_minor_number new_size = 0; if (old_size == 0) { 42e50: 4a84 tstl %d4 42e52: 6600 00a6 bnew 42efa new_size = DISKTAB_INITIAL_SIZE; 42e56: 7c08 moveq #8,%d6 } else { new_size = 2 * old_size; } if (minor >= new_size) { 42e58: bc85 cmpl %d5,%d6 42e5a: 6204 bhis 42e60 new_size = minor + 1; 42e5c: 2c05 movel %d5,%d6 42e5e: 5286 addql #1,%d6 } table = realloc(table, new_size * sizeof(*table)); 42e60: 2006 movel %d6,%d0 42e62: e588 lsll #2,%d0 42e64: 2f00 movel %d0,%sp@- 42e66: 2f0a movel %a2,%sp@- 42e68: 4eb9 0004 507c jsr 4507c if (table == NULL) { 42e6e: 508f addql #8,%sp } if (minor >= new_size) { new_size = minor + 1; } table = realloc(table, new_size * sizeof(*table)); 42e70: 2440 moveal %d0,%a2 if (table == NULL) { 42e72: 4a80 tstl %d0 42e74: 6726 beqs 42e9c return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 42e76: 2006 movel %d6,%d0 42e78: 9084 subl %d4,%d0 42e7a: e588 lsll #2,%d0 42e7c: 2f00 movel %d0,%sp@- 42e7e: 42a7 clrl %sp@- 42e80: 4872 4c00 pea %a2@(00000000,%d4:l:4) 42e84: 4eb9 0005 2a00 jsr 52a00 disktab [major].minor = table; disktab [major].size = new_size; 42e8a: 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; 42e8e: 268a movel %a2,%a3@ disktab [major].size = new_size; } return disktab [major].minor + minor; 42e90: 45f2 5c00 lea %a2@(00000000,%d5:l:4),%a2 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); disktab [major].minor = table; disktab [major].size = new_size; 42e94: 2746 0004 movel %d6,%a3@(4) { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 42e98: 4a8a tstl %a2 42e9a: 66a2 bnes 42e3e <== ALWAYS TAKEN return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); if (dd == NULL) { return RTEMS_NO_MEMORY; 42e9c: 701a moveq #26,%d0 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42e9e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42ea4: 4e5e unlk %fp 42ea6: 4e75 rts rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 42ea8: 2e06 movel %d6,%d7 42eaa: de87 addl %d7,%d7 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 42eac: 2039 0006 2e02 movel 62e02 ,%d0 rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; if (major >= new_size) { 42eb2: be84 cmpl %d4,%d7 42eb4: 6204 bhis 42eba <== NEVER TAKEN new_size = major + 1; 42eb6: 2e04 movel %d4,%d7 42eb8: 5287 addql #1,%d7 } table = realloc(table, new_size * sizeof(*table)); 42eba: 2207 movel %d7,%d1 42ebc: e789 lsll #3,%d1 42ebe: 2f01 movel %d1,%sp@- 42ec0: 2f00 movel %d0,%sp@- 42ec2: 4eb9 0004 507c jsr 4507c if (table == NULL) { 42ec8: 508f addql #8,%sp if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 42eca: 2440 moveal %d0,%a2 if (table == NULL) { 42ecc: 4a80 tstl %d0 42ece: 67cc beqs 42e9c <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 42ed0: 2007 movel %d7,%d0 <== NOT EXECUTED 42ed2: 9086 subl %d6,%d0 <== NOT EXECUTED 42ed4: e788 lsll #3,%d0 <== NOT EXECUTED 42ed6: e78e lsll #3,%d6 <== NOT EXECUTED 42ed8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42eda: 42a7 clrl %sp@- <== NOT EXECUTED 42edc: 4872 6800 pea %a2@(00000000,%d6:l) <== NOT EXECUTED 42ee0: 4eb9 0005 2a00 jsr 52a00 <== NOT EXECUTED disktab = table; disktab_size = new_size; 42ee6: 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; 42eea: 23ca 0006 2e02 movel %a2,62e02 <== NOT EXECUTED disktab_size = new_size; 42ef0: 23c7 0006 2dfe movel %d7,62dfe <== NOT EXECUTED 42ef6: 6000 ff2a braw 42e22 <== NOT EXECUTED rtems_device_minor_number new_size = 0; if (old_size == 0) { new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 42efa: 2c04 movel %d4,%d6 <== NOT EXECUTED 42efc: dc86 addl %d6,%d6 <== NOT EXECUTED 42efe: 6000 ff58 braw 42e58 <== NOT EXECUTED if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42f02: 4878 0032 pea 32 42f06: 4eb9 0004 44d8 jsr 444d8 if (dd == NULL) { 42f0c: 588f addql #4,%sp if (*dd_entry != NULL) { return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 42f0e: 2640 moveal %d0,%a3 if (dd == NULL) { 42f10: 4a80 tstl %d0 42f12: 6788 beqs 42e9c <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 42f14: 4aae 0010 tstl %fp@(16) 42f18: 676e beqs 42f88 alloc_name = strdup(name); 42f1a: 2f2e 0010 movel %fp@(16),%sp@- 42f1e: 4eb9 0005 2ff0 jsr 52ff0 if (alloc_name == NULL) { 42f24: 588f addql #4,%sp if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 42f26: 2800 movel %d0,%d4 42f28: 2a00 movel %d0,%d5 if (alloc_name == NULL) { 42f2a: 677e beqs 42faa <== NEVER TAKEN return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 42f2c: 2f03 movel %d3,%sp@- 42f2e: 2f02 movel %d2,%sp@- 42f30: 4878 61ff pea 61ff 42f34: 2f00 movel %d0,%sp@- 42f36: 4eb9 0004 45bc jsr 445bc 42f3c: 4fef 0010 lea %sp@(16),%sp 42f40: 4a80 tstl %d0 42f42: 6d28 blts 42f6c <== NEVER TAKEN return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 42f44: 2745 0010 movel %d5,%a3@(16) dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 42f48: 206e 0014 moveal %fp@(20),%a0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 42f4c: 42ab 0014 clrl %a3@(20) dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 42f50: 4280 clrl %d0 } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f52: 4201 clrb %d1 free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 42f54: 2682 movel %d2,%a3@ 42f56: 2743 0004 movel %d3,%a3@(4) dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f5a: 1741 0030 moveb %d1,%a3@(48) *dd_entry = dd; 42f5e: 248b movel %a3,%a2@ *dd_ptr = dd; 42f60: 208b movel %a3,%a0@ return RTEMS_SUCCESSFUL; } 42f62: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 42f68: 4e5e unlk %fp 42f6a: 4e75 rts } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 42f6c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42f6e: 45f9 0004 41a8 lea 441a8 ,%a2 <== NOT EXECUTED 42f74: 4e92 jsr %a2@ <== NOT EXECUTED free(dd); 42f76: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42f78: 4e92 jsr %a2@ <== NOT EXECUTED return RTEMS_UNSATISFIED; 42f7a: 508f addql #8,%sp <== NOT EXECUTED 42f7c: 700d moveq #13,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42f7e: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42f84: 4e5e unlk %fp <== NOT EXECUTED 42f86: 4e75 rts <== 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; 42f88: 4285 clrl %d5 dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 42f8a: 4280 clrl %d0 } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42f8c: 4201 clrb %d1 return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 42f8e: 2745 0010 movel %d5,%a3@(16) dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 42f92: 206e 0014 moveal %fp@(20),%a0 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 42f96: 42ab 0014 clrl %a3@(20) free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 42f9a: 2682 movel %d2,%a3@ 42f9c: 2743 0004 movel %d3,%a3@(4) dd->name = alloc_name; dd->uses = 0; dd->deleted = false; 42fa0: 1741 0030 moveb %d1,%a3@(48) *dd_entry = dd; 42fa4: 248b movel %a3,%a2@ *dd_ptr = dd; 42fa6: 208b movel %a3,%a0@ 42fa8: 60b8 bras 42f62 if (name != NULL) { alloc_name = strdup(name); if (alloc_name == NULL) { free(dd); 42faa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42fac: 4eb9 0004 41a8 jsr 441a8 <== NOT EXECUTED return RTEMS_NO_MEMORY; 42fb2: 588f addql #4,%sp <== NOT EXECUTED 42fb4: 701a moveq #26,%d0 <== NOT EXECUTED *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; } 42fb6: 4cee 0cfc ffe0 moveml %fp@(-32),%d2-%d7/%a2-%a3 <== NOT EXECUTED 42fbc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004b670 : { int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b670: 70f8 moveq #-8,%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b672: 4e56 ffdc linkw %fp,#-36 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b676: c0ae 0010 andl %fp@(16),%d0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 4b67a: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4b67e: 2c2e 0008 movel %fp@(8),%d6 4b682: 262e 000c movel %fp@(12),%d3 4b686: 286e 0014 moveal %fp@(20),%a4 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 4b68a: 4a80 tstl %d0 4b68c: 6600 0090 bnew 4b71e rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 4b690: 2814 movel %a4@,%d4 if (!device_name_table) 4b692: 6700 00a2 beqw 4b736 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 4b696: 2a39 0005 c6b6 movel 5c6b6 ,%d5 4b69c: 673c beqs 4b6da <== NEVER TAKEN 4b69e: 4280 clrl %d0 * handlers. */ extern rtems_filesystem_file_handlers_r devFS_file_handlers; int devFS_evaluate_path( 4b6a0: 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) 4b6a2: 4bf9 0004 e720 lea 4e720 ,%a5 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++) { if (!device_name_table[i].device_name) 4b6a8: 2200 movel %d0,%d1 /* 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++) { 4b6aa: 5282 addql #1,%d2 if (!device_name_table[i].device_name) 4b6ac: e989 lsll #4,%d1 4b6ae: 2041 moveal %d1,%a0 4b6b0: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 4b6b4: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 4b6b8: 2453 moveal %a3@,%a2 4b6ba: 4a8a tstl %a2 4b6bc: 6716 beqs 4b6d4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 4b6be: 2f03 movel %d3,%sp@- 4b6c0: 2f0a movel %a2,%sp@- 4b6c2: 2f06 movel %d6,%sp@- 4b6c4: 4e95 jsr %a5@ 4b6c6: 4fef 000c lea %sp@(12),%sp 4b6ca: 4a80 tstl %d0 4b6cc: 6606 bnes 4b6d4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 4b6ce: 4a32 3800 tstb %a2@(00000000,%d3:l) 4b6d2: 671e beqs 4b6f2 <== ALWAYS TAKEN /* 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++) { 4b6d4: 2002 movel %d2,%d0 4b6d6: ba82 cmpl %d2,%d5 4b6d8: 66ce bnes 4b6a8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4b6da: 4eb9 0004 d398 jsr 4d398 <__errno> 4b6e0: 7202 moveq #2,%d1 4b6e2: 2040 moveal %d0,%a0 4b6e4: 70ff moveq #-1,%d0 } 4b6e6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 4b6ec: 2081 movel %d1,%a0@ } 4b6ee: 4e5e unlk %fp 4b6f0: 4e75 rts /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 4b6f2: 2079 0005 c894 moveal 5c894 ,%a0 4b6f8: 2968 0028 0010 movel %a0@(40),%a4@(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; 4b6fe: 223c 0005 c6f8 movel #378616,%d1 pathloc->ops = &devFS_ops; 4b704: 41f9 0005 c730 lea 5c730 ,%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; 4b70a: 2941 0008 movel %d1,%a4@(8) pathloc->ops = &devFS_ops; 4b70e: 2948 000c movel %a0,%a4@(12) if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 4b712: 288b movel %a3,%a4@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b714: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4b71a: 4e5e unlk %fp 4b71c: 4e75 rts int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4b71e: 4eb9 0004 d398 jsr 4d398 <__errno> <== NOT EXECUTED 4b724: 7601 moveq #1,%d3 <== NOT EXECUTED 4b726: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b728: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b72a: 2083 movel %d3,%a0@ <== NOT EXECUTED return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b72c: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4b732: 4e5e unlk %fp <== NOT EXECUTED 4b734: 4e75 rts <== NOT EXECUTED 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 ); 4b736: 4eb9 0004 d398 jsr 4d398 <__errno> 4b73c: 740e moveq #14,%d2 4b73e: 2040 moveal %d0,%a0 4b740: 70ff moveq #-1,%d0 4b742: 2082 movel %d2,%a0@ return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 4b744: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4b74a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042da0 : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 42da0: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 42da4: 42a7 clrl %sp@- 42da6: 42a7 clrl %sp@- 42da8: 2f39 0006 2dfa movel 62dfa ,%sp@- 42dae: 4eb9 0004 7cac jsr 47cac if (sc == RTEMS_SUCCESSFUL) { 42db4: 4fef 000c lea %sp@(12),%sp 42db8: 4a80 tstl %d0 42dba: 6706 beqs 42dc2 <== ALWAYS TAKEN diskdevs_protected = true; return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; 42dbc: 7016 moveq #22,%d0 <== NOT EXECUTED } } 42dbe: 4e5e unlk %fp <== NOT EXECUTED 42dc0: 4e75 rts <== NOT EXECUTED 42dc2: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc == RTEMS_SUCCESSFUL) { diskdevs_protected = true; 42dc4: 7201 moveq #1,%d1 42dc6: 13c1 0006 2df8 moveb %d1,62df8 return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } =============================================================================== 00042dce : static void disk_unlock(void) { 42dce: 4e56 0000 linkw %fp,#0 rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42dd2: 4200 clrb %d0 sc = rtems_semaphore_release(diskdevs_mutex); 42dd4: 2f39 0006 2dfa movel 62dfa ,%sp@- static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 42dda: 13c0 0006 2df8 moveb %d0,62df8 sc = rtems_semaphore_release(diskdevs_mutex); 42de0: 4eb9 0004 7dfc jsr 47dfc if (sc != RTEMS_SUCCESSFUL) { 42de6: 588f addql #4,%sp 42de8: 4a80 tstl %d0 42dea: 6604 bnes 42df0 <== NEVER TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); } } 42dec: 4e5e unlk %fp 42dee: 4e75 rts diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); if (sc != RTEMS_SUCCESSFUL) { /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 42df0: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 42df6: 4eb9 0004 83d8 jsr 483d8 <== NOT EXECUTED =============================================================================== 000442c4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 442c4: 4e56 fff4 linkw %fp,#-12 442c8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 442cc: 243c 0000 0700 movel #1792,%d2 442d2: 2002 movel %d2,%d0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) 442d4: 246e 0008 moveal %fp@(8),%a2 { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); 442d8: 40c1 movew %sr,%d1 442da: 8081 orl %d1,%d0 442dc: 46c0 movew %d0,%sr while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 442de: 206a 0084 moveal %a2@(132),%a0 442e2: 202a 0080 movel %a2@(128),%d0 442e6: b088 cmpl %a0,%d0 442e8: 6734 beqs 4431e 442ea: 47f9 0004 6acc lea 46acc ,%a3 tty->rawOutBufState = rob_wait; 442f0: 7002 moveq #2,%d0 442f2: 2540 0094 movel %d0,%a2@(148) rtems_interrupt_enable (level); 442f6: 46c1 movew %d1,%sr sc = rtems_semaphore_obtain( 442f8: 42a7 clrl %sp@- 442fa: 42a7 clrl %sp@- 442fc: 2f2a 008c movel %a2@(140),%sp@- 44300: 4e93 jsr %a3@ tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 44302: 4fef 000c lea %sp@(12),%sp 44306: 4a80 tstl %d0 44308: 6620 bnes 4432a <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 4430a: 2002 movel %d2,%d0 4430c: 40c1 movew %sr,%d1 4430e: 8081 orl %d1,%d0 44310: 46c0 movew %d0,%sr rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 44312: 206a 0084 moveal %a2@(132),%a0 44316: 202a 0080 movel %a2@(128),%d0 4431a: b088 cmpl %a0,%d0 4431c: 66d2 bnes 442f0 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); 4431e: 46c1 movew %d1,%sr } } 44320: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44326: 4e5e unlk %fp 44328: 4e75 rts tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 4432a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4432c: 4eb9 0004 7248 jsr 47248 <== NOT EXECUTED =============================================================================== 00045038 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 45038: 4e56 fffc linkw %fp,#-4 4503c: 222e 0008 movel %fp@(8),%d1 45040: 2f0a movel %a2,%sp@- 45042: 246e 000c moveal %fp@(12),%a2 45046: 2f02 movel %d2,%sp@- if ((tty->termios.c_lflag & ECHOCTL) && 45048: 242a 003c movel %a2@(60),%d2 /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 4504c: 1001 moveb %d1,%d0 if ((tty->termios.c_lflag & ECHOCTL) && 4504e: 0282 0000 0200 andil #512,%d2 iscntrl(c) && (c != '\t') && (c != '\n')) { 45054: 0280 0000 00ff andil #255,%d0 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 4505a: 4a82 tstl %d2 4505c: 6720 beqs 4507e <== NEVER TAKEN iscntrl(c) && (c != '\t') && (c != '\n')) { 4505e: 2079 0005 e2c0 moveal 5e2c0 <__ctype_ptr__>,%a0 45064: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 45068: 49c2 extbl %d2 * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && 4506a: 0802 0005 btst #5,%d2 4506e: 670e beqs 4507e iscntrl(c) && (c != '\t') && (c != '\n')) { 45070: 7409 moveq #9,%d2 45072: b480 cmpl %d0,%d2 45074: 6708 beqs 4507e 45076: 143c 000a moveb #10,%d2 4507a: b480 cmpl %d0,%d2 4507c: 6616 bnes 45094 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4507e: 2f0a movel %a2,%sp@- 45080: 2f00 movel %d0,%sp@- 45082: 4eba fde0 jsr %pc@(44e64 ) } } 45086: 242e fff4 movel %fp@(-12),%d2 echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 4508a: 508f addql #8,%sp } } 4508c: 246e fff8 moveal %fp@(-8),%a2 45090: 4e5e unlk %fp 45092: 4e75 rts iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 45094: 2f0a movel %a2,%sp@- 45096: 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; 4509a: 7040 moveq #64,%d0 rtems_termios_puts (echobuf, 2, tty); 4509c: 486e fffe pea %fp@(-2) if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 450a0: b181 eorl %d0,%d1 { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 450a2: 745e moveq #94,%d2 echobuf[1] = c ^ 0x40; 450a4: 1d41 ffff moveb %d1,%fp@(-1) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 450a8: 1d42 fffe moveb %d2,%fp@(-2) echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 450ac: 4eb9 0004 4d60 jsr 44d60 tty->column += 2; } else { oproc (c, tty); } } 450b2: 242e fff4 movel %fp@(-12),%d2 char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; 450b6: 54aa 0028 addql #2,%a2@(40) 450ba: 4fef 000c lea %sp@(12),%sp } else { oproc (c, tty); } } 450be: 246e fff8 moveal %fp@(-8),%a2 450c2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004401c : void endgrent(void) { 4401c: 4e56 0000 linkw %fp,#0 if (group_fp != NULL) 44020: 2039 0006 09a4 movel 609a4 ,%d0 44026: 670a beqs 44032 <== NEVER TAKEN fclose(group_fp); 44028: 2f00 movel %d0,%sp@- 4402a: 4eb9 0004 ee34 jsr 4ee34 44030: 588f addql #4,%sp } 44032: 4e5e unlk %fp ... =============================================================================== 00043ed0 : void endpwent(void) { 43ed0: 4e56 0000 linkw %fp,#0 if (passwd_fp != NULL) 43ed4: 2039 0006 08ca movel 608ca ,%d0 43eda: 670a beqs 43ee6 <== NEVER TAKEN fclose(passwd_fp); 43edc: 2f00 movel %d0,%sp@- 43ede: 4eb9 0004 ee34 jsr 4ee34 43ee4: 588f addql #4,%sp } 43ee6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000450c6 : * 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) { 450c6: 4e56 ffe4 linkw %fp,#-28 450ca: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 450ce: 246e 0008 moveal %fp@(8),%a2 450d2: 282e 000c movel %fp@(12),%d4 if (tty->ccount == 0) 450d6: 202a 0020 movel %a2@(32),%d0 450da: 6736 beqs 45112 return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 450dc: 262a 003c movel %a2@(60),%d3 450e0: 7208 moveq #8,%d1 450e2: c283 andl %d3,%d1 static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { 450e4: 4a84 tstl %d4 450e6: 6734 beqs 4511c if (!(tty->termios.c_lflag & ECHO)) { 450e8: 4a81 tstl %d1 450ea: 6700 01a8 beqw 45294 tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 450ee: 0803 0004 btst #4,%d3 450f2: 6628 bnes 4511c <== ALWAYS TAKEN tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 450f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 450f6: 4280 clrl %d0 <== NOT EXECUTED 450f8: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 450fc: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 45100: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45102: 4eba ff34 jsr %pc@(45038 ) <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 45106: 508f addql #8,%sp <== NOT EXECUTED 45108: 7020 moveq #32,%d0 <== NOT EXECUTED 4510a: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 4510e: 6600 0192 bnew 452a2 <== NOT EXECUTED } } if (!lineFlag) break; } } 45112: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 45118: 4e5e unlk %fp 4511a: 4e75 rts 4511c: 47f9 0004 4d60 lea 44d60 ,%a3 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 45122: 5380 subql #1,%d0 45124: 206a 001c moveal %a2@(28),%a0 45128: 2540 0020 movel %d0,%a2@(32) 4512c: 1430 0800 moveb %a0@(00000000,%d0:l),%d2 if (tty->termios.c_lflag & ECHO) { 45130: 4a81 tstl %d1 45132: 6734 beqs 45168 <== NEVER TAKEN if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 45134: 4a84 tstl %d4 45136: 6608 bnes 45140 45138: 0803 0004 btst #4,%d3 4513c: 6700 013c beqw 4527a echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 45140: 7209 moveq #9,%d1 45142: 0282 0000 00ff andil #255,%d2 45148: b282 cmpl %d2,%d1 4514a: 6700 0090 beqw 451dc rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 4514e: 2079 0005 e2c0 moveal 5e2c0 <__ctype_ptr__>,%a0 45154: 5282 addql #1,%d2 45156: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 4515a: 49c0 extbl %d0 4515c: 0800 0005 btst #5,%d0 45160: 6756 beqs 451b8 45162: 0803 0009 btst #9,%d3 <== NOT EXECUTED 45166: 6614 bnes 4517c <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 45168: 4a84 tstl %d4 4516a: 67a6 beqs 45112 echo ('\n', tty); return; } } while (tty->ccount) { 4516c: 202a 0020 movel %a2@(32),%d0 45170: 67a0 beqs 45112 } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 45172: 262a 003c movel %a2@(60),%d3 45176: 7208 moveq #8,%d1 45178: c283 andl %d3,%d1 4517a: 60a6 bras 45122 tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 4517c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4517e: 4878 0003 pea 3 <== NOT EXECUTED 45182: 4879 0005 d30d pea 5d30d <== NOT EXECUTED 45188: 4e93 jsr %a3@ <== NOT EXECUTED if (tty->column) 4518a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4518e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45192: 6706 beqs 4519a <== NOT EXECUTED tty->column--; 45194: 5380 subql #1,%d0 <== NOT EXECUTED 45196: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 4519a: 2079 0005 e2c0 moveal 5e2c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED 451a0: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 451a4: 49c0 extbl %d0 <== NOT EXECUTED 451a6: 0800 0005 btst #5,%d0 <== NOT EXECUTED 451aa: 670c beqs 451b8 <== NOT EXECUTED 451ac: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 451b0: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 451b6: 67b0 beqs 45168 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 451b8: 2f0a movel %a2,%sp@- 451ba: 4878 0003 pea 3 451be: 4879 0005 d30d pea 5d30d 451c4: 4eb9 0004 4d60 jsr 44d60 if (tty->column) 451ca: 202a 0028 movel %a2@(40),%d0 451ce: 4fef 000c lea %sp@(12),%sp 451d2: 6794 beqs 45168 <== NEVER TAKEN tty->column--; 451d4: 5380 subql #1,%d0 451d6: 2540 0028 movel %d0,%a2@(40) 451da: 608c bras 45168 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 451dc: 242a 002c movel %a2@(44),%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 451e0: 4a80 tstl %d0 451e2: 6732 beqs 45216 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 451e4: 2c03 movel %d3,%d6 if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; int i = 0; 451e6: 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) 451e8: 0286 0000 0200 andil #512,%d6 */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 451ee: 2279 0005 e2c0 moveal 5e2c0 <__ctype_ptr__>,%a1 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 451f4: 4283 clrl %d3 451f6: 1618 moveb %a0@+,%d3 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 451f8: 5281 addql #1,%d1 if (c == '\t') { 451fa: 7a09 moveq #9,%d5 451fc: ba83 cmpl %d3,%d5 451fe: 676c beqs 4526c col = (col | 7) + 1; } else if (iscntrl (c)) { 45200: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 45204: 49c5 extbl %d5 45206: 0805 0005 btst #5,%d5 4520a: 6758 beqs 45264 <== ALWAYS TAKEN if (tty->termios.c_lflag & ECHOCTL) 4520c: 4a86 tstl %d6 <== NOT EXECUTED 4520e: 6702 beqs 45212 <== NOT EXECUTED col += 2; 45210: 5482 addql #2,%d2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45212: b280 cmpl %d0,%d1 <== NOT EXECUTED 45214: 66de bnes 451f4 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 45216: b4aa 0028 cmpl %a2@(40),%d2 4521a: 6c00 ff4c bgew 45168 rtems_termios_puts ("\b", 1, tty); 4521e: 2f0a movel %a2,%sp@- 45220: 4878 0001 pea 1 45224: 4879 0005 d30f pea 5d30f 4522a: 4e93 jsr %a3@ tty->column--; 4522c: 202a 0028 movel %a2@(40),%d0 45230: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45232: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45236: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 4523a: b480 cmpl %d0,%d2 4523c: 6c00 ff2a bgew 45168 rtems_termios_puts ("\b", 1, tty); 45240: 2f0a movel %a2,%sp@- 45242: 4878 0001 pea 1 45246: 4879 0005 d30f pea 5d30f 4524c: 4e93 jsr %a3@ tty->column--; 4524e: 202a 0028 movel %a2@(40),%d0 45252: 5380 subql #1,%d0 } /* * Back up over the tab */ while (tty->column > col) { 45254: 4fef 000c lea %sp@(12),%sp rtems_termios_puts ("\b", 1, tty); tty->column--; 45258: 2540 0028 movel %d0,%a2@(40) } /* * Back up over the tab */ while (tty->column > col) { 4525c: b480 cmpl %d0,%d2 4525e: 6dbe blts 4521e 45260: 6000 ff06 braw 45168 col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 45264: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45266: b280 cmpl %d0,%d1 45268: 668a bnes 451f4 4526a: 60aa bras 45216 c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 4526c: 7607 moveq #7,%d3 4526e: 8483 orl %d3,%d2 45270: 5282 addql #1,%d2 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 45272: b280 cmpl %d0,%d1 45274: 6600 ff7e bnew 451f4 45278: 609c bras 45216 <== 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); 4527a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 4527e: 4280 clrl %d0 <== NOT EXECUTED 45280: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED } } if (!lineFlag) break; } } 45284: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== 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); 4528a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 4528e: 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); 45290: 6000 fda6 braw 45038 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 45294: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED } } if (!lineFlag) break; } } 45298: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4529e: 4e5e unlk %fp <== NOT EXECUTED 452a0: 4e75 rts <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452a2: 700a moveq #10,%d0 <== NOT EXECUTED 452a4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED } } if (!lineFlag) break; } } 452a8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452ae: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } if (!lineFlag) break; } } 452b2: 4e5e unlk %fp <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); 452b4: 6000 fd82 braw 45038 <== NOT EXECUTED =============================================================================== 00053758 : #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) { 53758: 4e56 ffdc linkw %fp,#-36 5375c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 53760: 246e 0008 moveal %fp@(8),%a2 53764: 242e 000c movel %fp@(12),%d2 53768: 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) 5376c: 4a2a 0077 tstb %a2@(119) 53770: 6700 0116 beqw 53888 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 53774: 4281 clrl %d1 53776: 322a 0014 movew %a2@(20),%d1 rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 5377a: 202a 0072 movel %a2@(114),%d0 fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 5377e: b081 cmpl %d1,%d0 53780: 6500 0146 bcsw 538c8 53784: b0aa 001a cmpl %a2@(26),%d0 53788: 55c3 scs %d3 5378a: 4483 negl %d3 (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 5378c: b082 cmpl %d2,%d0 5378e: 6700 00e4 beqw 53874 { if (fs_info->c.modified) 53792: 4a2a 0076 tstb %a2@(118) 53796: 6700 0136 beqw 538ce { if (sec_of_fat && !fs_info->vol.mirror) 5379a: 4a03 tstb %d3 5379c: 6708 beqs 537a6 <== ALWAYS TAKEN 5379e: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 537a2: 6700 0174 beqw 53918 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 537a6: 2f2a 0078 movel %a2@(120),%sp@- 537aa: 47f9 0005 2038 lea 52038 ,%a3 537b0: 4e93 jsr %a3@ fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 537b2: 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; 537b4: 4201 clrb %d1 537b6: 1541 0077 moveb %d1,%a2@(119) fs_info->c.modified = 0; 537ba: 1541 0076 moveb %d1,%a2@(118) if (sc != RTEMS_SUCCESSFUL) 537be: 4a80 tstl %d0 537c0: 6600 0124 bnew 538e6 rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 537c4: 4a03 tstb %d3 537c6: 677e beqs 53846 <== ALWAYS TAKEN 537c8: 4a2a 0042 tstb %a2@(66) <== NOT EXECUTED 537cc: 6678 bnes 53846 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 537ce: 4280 clrl %d0 <== NOT EXECUTED 537d0: 102a 0009 moveb %a2@(9),%d0 <== NOT EXECUTED 537d4: 7201 moveq #1,%d1 <== NOT EXECUTED 537d6: b280 cmpl %d0,%d1 <== NOT EXECUTED 537d8: 646c bccs 53846 <== NOT EXECUTED 537da: 2a0e movel %fp,%d5 <== NOT EXECUTED 537dc: 49f9 0005 1bd0 lea 51bd0 ,%a4 <== NOT EXECUTED 537e2: 5985 subql #4,%d5 <== NOT EXECUTED 537e4: 7001 moveq #1,%d0 <== 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); 537e6: 4bf9 0005 d28c lea 5d28c ,%a5 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 537ec: 7601 moveq #1,%d3 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 537ee: 2f05 movel %d5,%sp@- <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, 537f0: 41ea 0016 lea %a2@(22),%a0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 537f4: 5283 addql #1,%d3 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 537f6: 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, 537fa: d0aa 0072 addl %a2@(114),%d0 <== NOT EXECUTED 537fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53800: 2f2a 004e movel %a2@(78),%sp@- <== NOT EXECUTED 53804: 2f2a 004a movel %a2@(74),%sp@- <== NOT EXECUTED 53808: 4e94 jsr %a4@ <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 5380a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5380e: 4a80 tstl %d0 <== NOT EXECUTED 53810: 6600 0142 bnew 53954 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 53814: 4280 clrl %d0 <== NOT EXECUTED 53816: 3012 movew %a2@,%d0 <== NOT EXECUTED 53818: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5381c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5381e: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 53822: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 53826: 4e95 jsr %a5@ <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 53828: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 5382c: 4e93 jsr %a3@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 5382e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 53832: 4a80 tstl %d0 <== NOT EXECUTED 53834: 6600 011e bnew 53954 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53838: 4281 clrl %d1 <== NOT EXECUTED 5383a: 122a 0009 moveb %a2@(9),%d1 <== NOT EXECUTED 5383e: 4280 clrl %d0 <== NOT EXECUTED 53840: 1003 moveb %d3,%d0 <== NOT EXECUTED 53842: b081 cmpl %d1,%d0 <== NOT EXECUTED 53844: 65a8 bcss 537ee <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 53846: 7001 moveq #1,%d0 53848: b084 cmpl %d4,%d0 5384a: 6700 00ec beqw 53938 sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 5384e: 486a 0078 pea %a2@(120) 53852: 2f02 movel %d2,%sp@- 53854: 2f2a 004e movel %a2@(78),%sp@- 53858: 2f2a 004a movel %a2@(74),%sp@- 5385c: 4eb9 0005 1bd0 jsr 51bd0 53862: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 53866: 4a80 tstl %d0 53868: 667c bnes 538e6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 5386a: 2542 0072 movel %d2,%a2@(114) fs_info->c.state = FAT_CACHE_ACTUAL; 5386e: 7201 moveq #1,%d1 53870: 1541 0077 moveb %d1,%a2@(119) } *buf = fs_info->c.buf; 53874: 206e 0014 moveal %fp@(20),%a0 return RC_OK; 53878: 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; 5387a: 20aa 0078 movel %a2@(120),%a0@ return RC_OK; } 5387e: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 53884: 4e5e unlk %fp 53886: 4e75 rts bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) 53888: 7001 moveq #1,%d0 5388a: b084 cmpl %d4,%d0 5388c: 6770 beqs 538fe sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 5388e: 486a 0078 pea %a2@(120) 53892: 2f02 movel %d2,%sp@- 53894: 2f2a 004e movel %a2@(78),%sp@- 53898: 2f2a 004a movel %a2@(74),%sp@- 5389c: 4eb9 0005 1bd0 jsr 51bd0 538a2: 4fef 0010 lea %sp@(16),%sp if (sc != RTEMS_SUCCESSFUL) 538a6: 4a80 tstl %d0 538a8: 663c bnes 538e6 <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 538aa: 2542 0072 movel %d2,%a2@(114) fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 538ae: 2002 movel %d2,%d0 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; 538b0: 4201 clrb %d1 538b2: 1541 0076 moveb %d1,%a2@(118) fs_info->c.state = FAT_CACHE_ACTUAL; 538b6: 7201 moveq #1,%d1 538b8: 1541 0077 moveb %d1,%a2@(119) } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 538bc: 4281 clrl %d1 538be: 322a 0014 movew %a2@(20),%d1 538c2: b081 cmpl %d1,%d0 538c4: 6400 febe bccw 53784 538c8: 4203 clrb %d3 <== NOT EXECUTED 538ca: 6000 fec0 braw 5378c <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 538ce: 2f2a 0078 movel %a2@(120),%sp@- 538d2: 4eb9 0005 1f6c jsr 51f6c fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 538d8: 588f addql #4,%sp } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 538da: 4201 clrb %d1 538dc: 1541 0077 moveb %d1,%a2@(119) if (sc != RTEMS_SUCCESSFUL) 538e0: 4a80 tstl %d0 538e2: 6700 ff62 beqw 53846 if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 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); 538e6: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 538ec: 7205 moveq #5,%d1 <== NOT EXECUTED 538ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 538f0: 70ff moveq #-1,%d0 <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 538f2: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 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); 538f8: 2081 movel %d1,%a0@ <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 538fa: 4e5e unlk %fp <== NOT EXECUTED 538fc: 4e75 rts <== NOT EXECUTED if (fs_info->c.state == FAT_CACHE_EMPTY) { if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 538fe: 486a 0078 pea %a2@(120) 53902: 2f02 movel %d2,%sp@- 53904: 2f2a 004e movel %a2@(78),%sp@- 53908: 2f2a 004a movel %a2@(74),%sp@- 5390c: 4eb9 0005 1cc4 jsr 51cc4 53912: 4fef 0010 lea %sp@(16),%sp 53916: 608e bras 538a6 if (fs_info->c.blk_num != blk) { if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 53918: 4280 clrl %d0 <== NOT EXECUTED 5391a: 206a 0078 moveal %a2@(120),%a0 <== NOT EXECUTED 5391e: 3012 movew %a2@,%d0 <== NOT EXECUTED 53920: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53922: 2f28 001e movel %a0@(30),%sp@- <== NOT EXECUTED 53926: 2f2a 007c movel %a2@(124),%sp@- <== NOT EXECUTED 5392a: 4eb9 0005 d28c jsr 5d28c <== NOT EXECUTED 53930: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53934: 6000 fe70 braw 537a6 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 53938: 486a 0078 pea %a2@(120) 5393c: 2f02 movel %d2,%sp@- 5393e: 2f2a 004e movel %a2@(78),%sp@- 53942: 2f2a 004a movel %a2@(74),%sp@- 53946: 4eb9 0005 1cc4 jsr 51cc4 5394c: 4fef 0010 lea %sp@(16),%sp 53950: 6000 ff14 braw 53866 if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53954: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5395a: 740c moveq #12,%d2 <== NOT EXECUTED 5395c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5395e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53960: 2082 movel %d2,%a0@ <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; } 53962: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 53968: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005396c : int fat_buf_release(fat_fs_info_t *fs_info) { 5396c: 4e56 ffe4 linkw %fp,#-28 53970: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 53974: 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) 53978: 4a2a 0077 tstb %a2@(119) 5397c: 6700 010c beqw 53a8a return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 53980: 4281 clrl %d1 53982: 322a 0014 movew %a2@(20),%d1 53986: 202a 0072 movel %a2@(114),%d0 5398a: b280 cmpl %d0,%d1 5398c: 6200 00ca bhiw 53a58 *buf = fs_info->c.buf; return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) 53990: b0aa 001a cmpl %a2@(26),%d0 53994: 55c2 scs %d2 53996: 4482 negl %d2 return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 53998: 4a2a 0076 tstb %a2@(118) 5399c: 6700 00c4 beqw 53a62 { if (sec_of_fat && !fs_info->vol.mirror) 539a0: 4a02 tstb %d2 539a2: 6708 beqs 539ac 539a4: 4a2a 0042 tstb %a2@(66) 539a8: 6700 00ec beqw 53a96 memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 539ac: 2f2a 0078 movel %a2@(120),%sp@- 539b0: 47f9 0005 2038 lea 52038 ,%a3 539b6: 4e93 jsr %a3@ if (sc != RTEMS_SUCCESSFUL) 539b8: 588f addql #4,%sp 539ba: 4a80 tstl %d0 539bc: 6600 00b4 bnew 53a72 rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 539c0: 4200 clrb %d0 539c2: 1540 0076 moveb %d0,%a2@(118) if (sec_of_fat && !fs_info->vol.mirror) 539c6: 4a02 tstb %d2 539c8: 677c beqs 53a46 539ca: 4a2a 0042 tstb %a2@(66) 539ce: 6676 bnes 53a46 <== NEVER TAKEN { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 539d0: 4280 clrl %d0 539d2: 102a 0009 moveb %a2@(9),%d0 539d6: 7201 moveq #1,%d1 539d8: b280 cmpl %d0,%d1 539da: 646a bccs 53a46 <== NEVER TAKEN 539dc: 260e movel %fp,%d3 539de: 5983 subql #4,%d3 539e0: 7001 moveq #1,%d0 539e2: 49f9 0005 1bd0 lea 51bd0 ,%a4 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); 539e8: 4bf9 0005 d28c lea 5d28c ,%a5 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 539ee: 7401 moveq #1,%d2 { sc = rtems_bdbuf_get(fs_info->vol.dev, 539f0: 2f03 movel %d3,%sp@- fs_info->c.blk_num + fs_info->vol.fat_length * i, 539f2: 41ea 0016 lea %a2@(22),%a0 if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 539f6: 5282 addql #1,%d2 { sc = rtems_bdbuf_get(fs_info->vol.dev, fs_info->c.blk_num + fs_info->vol.fat_length * i, 539f8: 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, 539fc: d0aa 0072 addl %a2@(114),%d0 53a00: 2f00 movel %d0,%sp@- 53a02: 2f2a 004e movel %a2@(78),%sp@- 53a06: 2f2a 004a movel %a2@(74),%sp@- 53a0a: 4e94 jsr %a4@ fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 53a0c: 4fef 0010 lea %sp@(16),%sp 53a10: 4a80 tstl %d0 53a12: 6600 00a2 bnew 53ab6 rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 53a16: 4280 clrl %d0 53a18: 3012 movew %a2@,%d0 53a1a: 206e fffc moveal %fp@(-4),%a0 53a1e: 2f00 movel %d0,%sp@- 53a20: 2f2a 007c movel %a2@(124),%sp@- 53a24: 2f28 001e movel %a0@(30),%sp@- 53a28: 4e95 jsr %a5@ sc = rtems_bdbuf_release_modified(b); 53a2a: 2f2e fffc movel %fp@(-4),%sp@- 53a2e: 4e93 jsr %a3@ if ( sc != RTEMS_SUCCESSFUL) 53a30: 4fef 0010 lea %sp@(16),%sp 53a34: 4a80 tstl %d0 53a36: 667e bnes 53ab6 <== NEVER TAKEN if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 53a38: 4281 clrl %d1 53a3a: 122a 0009 moveb %a2@(9),%d1 53a3e: 4280 clrl %d0 53a40: 1002 moveb %d2,%d0 53a42: b280 cmpl %d0,%d1 53a44: 62aa bhis 539f0 <== NEVER TAKEN sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; 53a46: 4280 clrl %d0 { sc = rtems_bdbuf_release(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; 53a48: 4201 clrb %d1 53a4a: 1541 0077 moveb %d1,%a2@(119) return RC_OK; } 53a4e: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53a54: 4e5e unlk %fp 53a56: 4e75 rts 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) && 53a58: 4202 clrb %d2 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 53a5a: 4a2a 0076 tstb %a2@(118) <== NOT EXECUTED 53a5e: 6600 ff40 bnew 539a0 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 53a62: 2f2a 0078 movel %a2@(120),%sp@- 53a66: 4eb9 0005 1f6c jsr 51f6c if (sc != RTEMS_SUCCESSFUL) 53a6c: 588f addql #4,%sp 53a6e: 4a80 tstl %d0 53a70: 67d4 beqs 53a46 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(EIO); 53a72: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 53a78: 7605 moveq #5,%d3 <== NOT EXECUTED 53a7a: 2040 moveal %d0,%a0 <== NOT EXECUTED 53a7c: 70ff moveq #-1,%d0 <== NOT EXECUTED 53a7e: 2083 movel %d3,%a0@ <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53a80: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED 53a86: 4e5e unlk %fp <== NOT EXECUTED 53a88: 4e75 rts <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) return RC_OK; 53a8a: 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; } 53a8c: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 53a92: 4e5e unlk %fp 53a94: 4e75 rts (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) { if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 53a96: 4280 clrl %d0 53a98: 206a 0078 moveal %a2@(120),%a0 53a9c: 3012 movew %a2@,%d0 53a9e: 2f00 movel %d0,%sp@- 53aa0: 2f28 001e movel %a0@(30),%sp@- 53aa4: 2f2a 007c movel %a2@(124),%sp@- 53aa8: 4eb9 0005 d28c jsr 5d28c 53aae: 4fef 000c lea %sp@(12),%sp 53ab2: 6000 fef8 braw 539ac if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53ab6: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 53abc: 720c moveq #12,%d1 <== NOT EXECUTED 53abe: 2040 moveal %d0,%a0 <== NOT EXECUTED 53ac0: 70ff moveq #-1,%d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53ac2: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(b); if ( sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(ENOMEM); 53ac8: 2081 movel %d1,%a0@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); } fs_info->c.state = FAT_CACHE_EMPTY; return RC_OK; } 53aca: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053c52 : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 53c52: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 53c56: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 53c5a: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 53c5e: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 53c62: 2f02 movel %d2,%sp@- <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 53c64: 4a80 tstl %d0 <== NOT EXECUTED 53c66: 660c bnes 53c74 <== NOT EXECUTED 53c68: 4281 clrl %d1 <== NOT EXECUTED 53c6a: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53c6e: 7403 moveq #3,%d2 <== NOT EXECUTED 53c70: c282 andl %d2,%d1 <== NOT EXECUTED 53c72: 6636 bnes 53caa <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53c74: 4281 clrl %d1 <== NOT EXECUTED 53c76: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53c7a: 5580 subql #2,%d0 <== 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); 53c7c: 4282 clrl %d2 <== NOT EXECUTED 53c7e: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53c80: 4281 clrl %d1 <== NOT EXECUTED 53c82: d0a8 002c addl %a0@(44),%d0 <== 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, 53c86: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53c8a: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53c8e: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53c92: 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, 53c94: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53c96: 42a7 clrl %sp@- <== NOT EXECUTED 53c98: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53c9a: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53c9c: 4eb9 0005 3ace jsr 53ace <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53ca2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53ca6: 4e5e unlk %fp <== NOT EXECUTED 53ca8: 4e75 rts <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 53caa: 2028 001a movel %a0@(26),%d0 <== 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); 53cae: 4281 clrl %d1 <== NOT EXECUTED 53cb0: 4282 clrl %d2 <== 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, 53cb2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53cb6: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53cba: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53cbe: 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, 53cc0: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53cc2: 42a7 clrl %sp@- <== NOT EXECUTED 53cc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53cc6: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53cc8: 4eb9 0005 3ace jsr 53ace <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53cce: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53cd2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053cd6 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 53cd6: 4e56 0000 linkw %fp,#0 53cda: 226e 0008 moveal %fp@(8),%a1 53cde: 202e 000c movel %fp@(12),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; 53ce2: 2069 0034 moveal %a1@(52),%a0 fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 53ce6: 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)) ) 53ce8: 4a80 tstl %d0 53cea: 660c bnes 53cf8 <== ALWAYS TAKEN 53cec: 4281 clrl %d1 <== NOT EXECUTED 53cee: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53cf2: 7403 moveq #3,%d2 <== NOT EXECUTED 53cf4: c282 andl %d2,%d1 <== NOT EXECUTED 53cf6: 6636 bnes 53d2e <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 53cf8: 4281 clrl %d1 53cfa: 1228 0005 moveb %a0@(5),%d1 53cfe: 5580 subql #2,%d0 uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53d00: 4282 clrl %d2 53d02: e3a8 lsll %d1,%d0 53d04: 4281 clrl %d1 53d06: d0a8 002c addl %a0@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53d0a: 2f2e 0010 movel %fp@(16),%sp@- fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53d0e: 1428 0002 moveb %a0@(2),%d2 53d12: 1228 0004 moveb %a0@(4),%d1 53d16: e5a9 lsll %d2,%d1 fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53d18: 2f01 movel %d1,%sp@- 53d1a: 42a7 clrl %sp@- 53d1c: 2f00 movel %d0,%sp@- 53d1e: 2f09 movel %a1,%sp@- 53d20: 4eb9 0005 3b72 jsr 53b72 <_fat_block_write> fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53d26: 242e fffc movel %fp@(-4),%d2 53d2a: 4e5e unlk %fp 53d2c: 4e75 rts ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 53d2e: 2028 001a movel %a0@(26),%d0 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53d32: 4281 clrl %d1 <== NOT EXECUTED 53d34: 4282 clrl %d2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 53d36: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); 53d3a: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED 53d3e: 1228 0004 moveb %a0@(4),%d1 <== NOT EXECUTED 53d42: 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_write(mt_entry, fsec, 0, 53d44: 2f01 movel %d1,%sp@- <== NOT EXECUTED 53d46: 42a7 clrl %sp@- <== NOT EXECUTED 53d48: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53d4a: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53d4c: 4eb9 0005 3b72 jsr 53b72 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 53d52: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 53d56: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053f60 : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 53f60: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 53f64: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 53f68: 2200 movel %d0,%d1 <== NOT EXECUTED 53f6a: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED 53f6e: 7418 moveq #24,%d2 <== 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, 53f70: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 53f74: e4a9 lsrl %d2,%d1 <== NOT EXECUTED 53f76: 2041 moveal %d1,%a0 <== NOT EXECUTED 53f78: 4878 0004 pea 4 <== NOT EXECUTED 53f7c: 7a18 moveq #24,%d5 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53f7e: 2200 movel %d0,%d1 <== NOT EXECUTED 53f80: 4878 01e8 pea 1e8 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 53f84: 2800 movel %d0,%d4 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53f86: 7c18 moveq #24,%d6 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 53f88: e08c lsrl #8,%d4 <== NOT EXECUTED 53f8a: 47f9 0005 3b72 lea 53b72 <_fat_block_write>,%a3 <== NOT EXECUTED fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 53f90: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 53f94: 2e02 movel %d2,%d7 <== NOT EXECUTED 53f96: eaaf lsrl %d5,%d7 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 53f98: 2602 movel %d2,%d3 <== NOT EXECUTED 53f9a: e08b lsrl #8,%d3 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53f9c: eba9 lsll %d5,%d1 <== NOT EXECUTED 53f9e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 53fa2: 2a00 movel %d0,%d5 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53fa4: 2002 movel %d2,%d0 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 53fa6: 286a 0034 moveal %a2@(52),%a4 <== NOT EXECUTED 53faa: eda8 lsll %d6,%d0 <== 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, 53fac: 4286 clrl %d6 <== NOT EXECUTED 53fae: 3c2c 0038 movew %a4@(56),%d6 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 53fb2: e18d lsll #8,%d5 <== NOT EXECUTED 53fb4: e18a lsll #8,%d2 <== NOT EXECUTED 53fb6: 2246 moveal %d6,%a1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 53fb8: 2c08 movel %a0,%d6 <== NOT EXECUTED 53fba: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 53fc0: 8286 orl %d6,%d1 <== NOT EXECUTED 53fc2: 0285 00ff 0000 andil #16711680,%d5 <== NOT EXECUTED 53fc8: 8087 orl %d7,%d0 <== NOT EXECUTED 53fca: 2f09 movel %a1,%sp@- <== NOT EXECUTED 53fcc: 8082 orl %d2,%d0 <== NOT EXECUTED 53fce: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53fd0: 8285 orl %d5,%d1 <== NOT EXECUTED 53fd2: 0284 0000 ff00 andil #65280,%d4 <== NOT EXECUTED 53fd8: 0283 0000 ff00 andil #65280,%d3 <== NOT EXECUTED 53fde: 8284 orl %d4,%d1 <== NOT EXECUTED 53fe0: 8083 orl %d3,%d0 <== NOT EXECUTED 53fe2: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED 53fe6: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED 53fea: 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, 53fec: 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, 53ff0: 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, 53ff2: 4878 0004 pea 4 <== NOT EXECUTED 53ff6: 4280 clrl %d0 <== NOT EXECUTED 53ff8: 4878 01ec pea 1ec <== NOT EXECUTED 53ffc: 302c 0038 movew %a4@(56),%d0 <== NOT EXECUTED 54000: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54002: 2f0a movel %a2,%sp@- <== NOT EXECUTED 54004: 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) ) 54006: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED 5400a: 4a82 tstl %d2 <== NOT EXECUTED 5400c: 6d10 blts 5401e <== NOT EXECUTED return -1; 5400e: 4a80 tstl %d0 <== NOT EXECUTED 54010: 5dc0 slt %d0 <== NOT EXECUTED return RC_OK; } 54012: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 54018: 4e5e unlk %fp <== NOT EXECUTED FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) return -1; 5401a: 49c0 extbl %d0 <== NOT EXECUTED return RC_OK; } 5401c: 4e75 rts <== NOT EXECUTED FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) return -1; 5401e: 70ff moveq #-1,%d0 <== NOT EXECUTED return RC_OK; } 54020: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 54026: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052e9e : /* * 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) 52e9e: 7201 moveq #1,%d1 int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 52ea0: 4e56 fff4 linkw %fp,#-12 52ea4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 52ea8: 266e 0008 moveal %fp@(8),%a3 52eac: 246e 000c moveal %fp@(12),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 52eb0: 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) 52eb4: 202a 0008 movel %a2@(8),%d0 52eb8: b280 cmpl %d0,%d1 52eba: 6412 bccs 52ece { fat_fd->links_num--; 52ebc: 5380 subql #1,%d0 52ebe: 2540 0008 movel %d0,%a2@(8) return rc; 52ec2: 4280 clrl %d0 * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); return rc; } 52ec4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 52eca: 4e5e unlk %fp 52ecc: 4e75 rts return rc; } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 52ece: 4280 clrl %d0 52ed0: 102a 0030 moveb %a2@(48),%d0 52ed4: 0800 0000 btst #0,%d0 52ed8: 674c beqs 52f26 <== ALWAYS TAKEN { rc = fat_file_truncate(mt_entry, fat_fd, 0); 52eda: 42a7 clrl %sp@- <== NOT EXECUTED 52edc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52ede: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52ee0: 4eb9 0005 2da2 jsr 52da2 <== NOT EXECUTED if ( rc != RC_OK ) 52ee6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52eea: 4a80 tstl %d0 <== NOT EXECUTED 52eec: 66d6 bnes 52ec4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 52eee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52ef0: 4eb9 0004 bb20 jsr 4bb20 <_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) ) 52ef6: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 52efa: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52efc: 4eb9 0005 3f44 jsr 53f44 <== NOT EXECUTED 52f02: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52f06: 4a00 tstb %d0 <== NOT EXECUTED 52f08: 6668 bnes 52f72 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); free(fat_fd); 52f0a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f0c: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED 52f12: 588f addql #4,%sp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f14: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 52f18: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 52f1e: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f20: 4ef9 0005 396c jmp 5396c <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 52f26: 2f2a 000c movel %a2@(12),%sp@- 52f2a: 2f0b movel %a3,%sp@- 52f2c: 4eb9 0005 3f44 jsr 53f44 52f32: 508f addql #8,%sp 52f34: 4a00 tstb %d0 52f36: 6716 beqs 52f4e <== ALWAYS TAKEN { fat_fd->links_num = 0; 52f38: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f3c: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED return rc; } 52f40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 52f46: 4e5e unlk %fp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f48: 4ef9 0005 396c jmp 5396c <== NOT EXECUTED 52f4e: 2f0a movel %a2,%sp@- 52f50: 4eb9 0004 bb20 jsr 4bb20 <_Chain_Extract> fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 52f56: 2f0a movel %a2,%sp@- 52f58: 4eb9 0004 680c jsr 4680c 52f5e: 508f addql #8,%sp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f60: 2d42 0008 movel %d2,%fp@(8) return rc; } 52f64: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 52f6a: 4e5e unlk %fp } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 52f6c: 4ef9 0005 396c jmp 5396c return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) fat_free_unique_ino(mt_entry, fat_fd->ino); 52f72: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 52f76: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52f78: 4eb9 0005 3f0e jsr 53f0e <== NOT EXECUTED 52f7e: 508f addql #8,%sp <== NOT EXECUTED free(fat_fd); 52f80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52f82: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED 52f88: 588f addql #4,%sp <== NOT EXECUTED 52f8a: 6088 bras 52f14 <== NOT EXECUTED =============================================================================== 0005358c : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 5358c: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 53590: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 53594: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 53598: 2a2e 0008 movel %fp@(8),%d5 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 5359c: 2245 moveal %d5,%a1 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 5359e: 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; 535a4: 2669 0034 moveal %a1@(52),%a3 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 535a8: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 535ac: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED 535b0: 660e bnes 535c0 <== NOT EXECUTED return RC_OK; 535b2: 4284 clrl %d4 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 535b4: 2004 movel %d4,%d0 <== NOT EXECUTED 535b6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 535bc: 4e5e unlk %fp <== NOT EXECUTED 535be: 4e75 rts <== 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); 535c0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 535c2: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED if (rc != RC_OK) 535c8: 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); 535ca: 2800 movel %d0,%d4 <== NOT EXECUTED if (rc != RC_OK) 535cc: 66e6 bnes 535b4 <== NOT EXECUTED 535ce: 240e movel %fp,%d2 <== NOT EXECUTED 535d0: 5982 subql #4,%d2 <== NOT EXECUTED 535d2: 4bf9 0005 1cc4 lea 51cc4 ,%a5 <== NOT EXECUTED /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 535d8: 263c 0005 20b6 movel #336054,%d3 <== 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); 535de: 2c3c 0005 ade4 movel #372196,%d6 <== 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) 535e4: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 535e8: 2200 movel %d0,%d1 <== NOT EXECUTED 535ea: c2ab 000c andl %a3@(12),%d1 <== NOT EXECUTED 535ee: b2ab 0010 cmpl %a3@(16),%d1 <== NOT EXECUTED 535f2: 64c0 bccs 535b4 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 535f4: 2245 moveal %d5,%a1 <== NOT EXECUTED 535f6: 2069 0034 moveal %a1@(52),%a0 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 535fa: 4a80 tstl %d0 <== NOT EXECUTED 535fc: 6670 bnes 5366e <== NOT EXECUTED 535fe: 4281 clrl %d1 <== NOT EXECUTED 53600: 1228 000a moveb %a0@(10),%d1 <== NOT EXECUTED 53604: 7e03 moveq #3,%d7 <== NOT EXECUTED 53606: c287 andl %d7,%d1 <== NOT EXECUTED 53608: 6764 beqs 5366e <== NOT EXECUTED return fs_info->vol.rdir_loc; 5360a: 2868 001a moveal %a0@(26),%a4 <== 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++ ) 5360e: 4a2b 0004 tstb %a3@(4) <== NOT EXECUTED 53612: 6738 beqs 5364c <== NOT EXECUTED 53614: 95ca subal %a2,%a2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 53616: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53618: 4872 c800 pea %a2@(00000000,%a4:l) <== 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++ ) 5361c: 528a addql #1,%a2 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 5361e: 2f2b 004e movel %a3@(78),%sp@- <== NOT EXECUTED 53622: 2f2b 004a movel %a3@(74),%sp@- <== NOT EXECUTED 53626: 4e95 jsr %a5@ <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 53628: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5362c: 4a80 tstl %d0 <== NOT EXECUTED 5362e: 6654 bnes 53684 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 53630: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 53634: 2243 moveal %d3,%a1 <== NOT EXECUTED 53636: 4e91 jsr %a1@ <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 53638: 588f addql #4,%sp <== NOT EXECUTED 5363a: 4a80 tstl %d0 <== NOT EXECUTED 5363c: 6646 bnes 53684 <== 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++ ) 5363e: 4280 clrl %d0 <== NOT EXECUTED 53640: 102b 0004 moveb %a3@(4),%d0 <== NOT EXECUTED 53644: b5c0 cmpal %d0,%a2 <== NOT EXECUTED 53646: 65ce bcss 53616 <== NOT EXECUTED 53648: 202e fff8 movel %fp@(-8),%d0 <== 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); 5364c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 53650: 2246 moveal %d6,%a1 <== NOT EXECUTED 53652: 2f00 movel %d0,%sp@- <== NOT EXECUTED 53654: 2f05 movel %d5,%sp@- <== NOT EXECUTED 53656: 4e91 jsr %a1@ <== NOT EXECUTED if ( rc != RC_OK ) 53658: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5365c: 4a80 tstl %d0 <== NOT EXECUTED 5365e: 6784 beqs 535e4 <== 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); 53660: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) return rc; } return rc; } 53662: 2004 movel %d4,%d0 <== NOT EXECUTED 53664: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5366a: 4e5e unlk %fp <== NOT EXECUTED 5366c: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 5366e: 4281 clrl %d1 <== NOT EXECUTED 53670: 2840 moveal %d0,%a4 <== NOT EXECUTED 53672: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53676: 558c subql #2,%a4 <== NOT EXECUTED 53678: 2e0c movel %a4,%d7 <== NOT EXECUTED 5367a: e3af lsll %d1,%d7 <== NOT EXECUTED 5367c: 2847 moveal %d7,%a4 <== NOT EXECUTED 5367e: d9e8 002c addal %a0@(44),%a4 <== NOT EXECUTED 53682: 608a bras 5360e <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 53684: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5368a: 78ff moveq #-1,%d4 <== NOT EXECUTED 5368c: 7a05 moveq #5,%d5 <== NOT EXECUTED 5368e: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 53690: 2004 movel %d4,%d0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); 53692: 2085 movel %d5,%a0@ <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 53694: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5369a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005303e : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 5303e: 4e56 ffcc linkw %fp,#-52 53042: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 53046: 266e 0008 moveal %fp@(8),%a3 5304a: 242e 0010 movel %fp@(16),%d2 5304e: 2a6e 0014 moveal %fp@(20),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 53052: 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 ) { 53056: 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; 5305a: 2a82 movel %d2,%a5@ if (new_length <= fat_fd->fat_file_size) 5305c: 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; 53060: 42ae fff0 clrl %fp@(-16) uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 53064: 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) 53068: b082 cmpl %d2,%d0 5306a: 6400 00c4 bccw 53130 return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5306e: 7201 moveq #1,%d1 53070: b2aa 0020 cmpl %a2@(32),%d1 53074: 6700 00c8 beqw 5313e (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))) & 53078: 4283 clrl %d3 (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 5307a: 2a02 movel %d2,%d5 5307c: 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))) & 5307e: 362c 0006 movew %a4@(6),%d3 53082: 2203 movel %d3,%d1 53084: 5381 subql #1,%d1 53086: c081 andl %d1,%d0 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 - 53088: 9680 subl %d0,%d3 5308a: c681 andl %d1,%d3 (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; if (bytes2add > bytes_remain) 5308c: ba83 cmpl %d3,%d5 5308e: 6300 00a0 blsw 53130 bytes2add -= bytes_remain; 53092: 9a83 subl %d3,%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) 53094: 6700 009a beqw 53130 return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 53098: 4280 clrl %d0 5309a: 102c 0008 moveb %a4@(8),%d0 5309e: 2c05 movel %d5,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 530a0: 486e fff8 pea %fp@(-8) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 530a4: 5386 subql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 530a6: 486e fffc pea %fp@(-4) * file ) - return */ if (bytes2add == 0) return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 530aa: e0ae lsrl %d0,%d6 530ac: 5286 addql #1,%d6 rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 530ae: 2f06 movel %d6,%sp@- 530b0: 486e fff0 pea %fp@(-16) 530b4: 2f0b movel %a3,%sp@- 530b6: 4eb9 0005 b302 jsr 5b302 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 530bc: 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, 530c0: 2800 movel %d0,%d4 &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 530c2: 6660 bnes 53124 <== NEVER TAKEN return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 530c4: 202e fffc movel %fp@(-4),%d0 530c8: 6606 bnes 530d0 <== ALWAYS TAKEN 530ca: 4a83 tstl %d3 <== NOT EXECUTED 530cc: 6700 0086 beqw 53154 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 530d0: b086 cmpl %d6,%d0 530d2: 6720 beqs 530f4 <== ALWAYS TAKEN *a_length = new_length - ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 530d4: 2200 movel %d0,%d1 <== NOT EXECUTED 530d6: 4681 notl %d1 <== NOT EXECUTED 530d8: dc81 addl %d1,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 530da: 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) - 530dc: 4283 clrl %d3 <== NOT EXECUTED 530de: 162c 0008 moveb %a4@(8),%d3 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 530e2: 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) - 530e6: e7ae lsll %d3,%d6 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); 530e8: 5381 subql #1,%d1 <== NOT EXECUTED 530ea: ca81 andl %d1,%d5 <== 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 - 530ec: 2202 movel %d2,%d1 <== NOT EXECUTED 530ee: 9286 subl %d6,%d1 <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - 530f0: 9285 subl %d5,%d1 <== NOT EXECUTED 530f2: 2a81 movel %d1,%a5@ <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 530f4: 206a 0018 moveal %a2@(24),%a0 530f8: 4a88 tstl %a0 530fa: 6672 bnes 5316e <== NEVER TAKEN { fat_fd->map.disk_cln = fat_fd->cln = chain; 530fc: 222e fff0 movel %fp@(-16),%d1 fat_fd->map.file_cln = 0; 53100: 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; 53104: 2541 001c movel %d1,%a2@(28) 53108: 2541 0036 movel %d1,%a2@(54) } fat_buf_release(fs_info); } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 5310c: 4a80 tstl %d0 5310e: 6710 beqs 53120 <== NEVER TAKEN { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 53110: 7601 moveq #1,%d3 } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; 53112: 256e fff8 003a movel %fp@(-8),%a2@(58) if (fat_fd->fat_file_type == FAT_DIRECTORY) 53118: b6aa 0010 cmpl %a2@(16),%d3 5311c: 6700 0086 beqw 531a4 return rc; } } } fat_fd->fat_file_size = new_length; 53120: 2542 0018 movel %d2,%a2@(24) return RC_OK; } 53124: 2004 movel %d4,%d0 53126: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 5312c: 4e5e unlk %fp 5312e: 4e75 rts * 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; 53130: 4284 clrl %d4 } fat_fd->fat_file_size = new_length; return RC_OK; } 53132: 2004 movel %d4,%d0 53134: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 5313a: 4e5e unlk %fp 5313c: 4e75 rts *a_length = new_length; if (new_length <= fat_fd->fat_file_size) return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5313e: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED 53142: 6600 ff34 bnew 53078 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 53146: 4281 clrl %d1 <== NOT EXECUTED 53148: 122c 000a moveb %a4@(10),%d1 <== NOT EXECUTED 5314c: 7603 moveq #3,%d3 <== NOT EXECUTED 5314e: c283 andl %d3,%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)) && 53150: 6700 ff26 beqw 53078 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 53154: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5315a: 78ff moveq #-1,%d4 <== NOT EXECUTED 5315c: 761c moveq #28,%d3 <== NOT EXECUTED 5315e: 2040 moveal %d0,%a0 <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 53160: 2004 movel %d4,%d0 <== NOT EXECUTED if (rc != RC_OK) return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) rtems_set_errno_and_return_minus_one(ENOSPC); 53162: 2083 movel %d3,%a0@ <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 53164: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 5316a: 4e5e unlk %fp <== NOT EXECUTED 5316c: 4e75 rts <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 5316e: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 53172: 72ff moveq #-1,%d1 <== NOT EXECUTED 53174: b280 cmpl %d0,%d1 <== NOT EXECUTED 53176: 675c beqs 531d4 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 53178: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED 5317c: 2f00 movel %d0,%sp@- <== NOT EXECUTED } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) { old_last_cl = fat_fd->map.last_cln; 5317e: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 53182: 2f0b movel %a3,%sp@- <== NOT EXECUTED 53184: 4eb9 0005 af96 jsr 5af96 <== NOT EXECUTED if ( rc != RC_OK ) 5318a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5318e: 4a80 tstl %d0 <== NOT EXECUTED 53190: 6626 bnes 531b8 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 53192: 2f0c movel %a4,%sp@- <== NOT EXECUTED 53194: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED 5319a: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 5319e: 588f addql #4,%sp <== NOT EXECUTED 531a0: 6000 ff6a braw 5310c <== NOT EXECUTED if (cls_added != 0) { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) { rc = fat_init_clusters_chain(mt_entry, chain); 531a4: 2f2e fff0 movel %fp@(-16),%sp@- 531a8: 2f0b movel %a3,%sp@- 531aa: 4eb9 0005 3d5a jsr 53d5a if ( rc != RC_OK ) 531b0: 508f addql #8,%sp 531b2: 4a80 tstl %d0 531b4: 6700 ff6a beqw 53120 { fat_free_fat_clusters_chain(mt_entry, chain); 531b8: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED return rc; 531bc: 2800 movel %d0,%d4 <== 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); 531be: 2f0b movel %a3,%sp@- <== NOT EXECUTED 531c0: 4eb9 0005 b22c jsr 5b22c <== NOT EXECUTED return rc; 531c6: 508f addql #8,%sp <== NOT EXECUTED } fat_fd->fat_file_size = new_length; return RC_OK; } 531c8: 2004 movel %d4,%d0 <== NOT EXECUTED 531ca: 4cee 3c7c ffcc moveml %fp@(-52),%d2-%d6/%a2-%a5 <== NOT EXECUTED 531d0: 4e5e unlk %fp <== NOT EXECUTED 531d2: 4e75 rts <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 531d4: 486e fff4 pea %fp@(-12) <== NOT EXECUTED 531d8: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 531dc: 4878 0001 pea 1 <== NOT EXECUTED 531e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 531e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED 531e4: 4eb9 0005 2f8c jsr 52f8c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 531ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 531ee: 4a80 tstl %d0 <== NOT EXECUTED 531f0: 66c6 bnes 531b8 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 531f2: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) { fat_free_fat_clusters_chain(mt_entry, chain); return rc; 531f6: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 531fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 531fc: 2f0b movel %a3,%sp@- <== NOT EXECUTED 531fe: 4eb9 0005 af96 jsr 5af96 <== NOT EXECUTED if ( rc != RC_OK ) 53204: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53208: 4a80 tstl %d0 <== NOT EXECUTED 5320a: 6786 beqs 53192 <== NOT EXECUTED 5320c: 60aa bras 531b8 <== NOT EXECUTED =============================================================================== 00052f8c : uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 52f8c: 7001 moveq #1,%d0 fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 52f8e: 4e56 fff0 linkw %fp,#-16 52f92: 226e 0008 moveal %fp@(8),%a1 52f96: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 52f9a: 206e 000c moveal %fp@(12),%a0 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 52f9e: 2669 0034 moveal %a1@(52),%a3 uint32_t cur_cln = 0; 52fa2: 42ae fffc clrl %fp@(-4) uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 52fa6: b0ae 0010 cmpl %fp@(16),%d0 52faa: 6718 beqs 52fc4 <== ALWAYS TAKEN *ret = cur_cln; break; default: errno = EINVAL; 52fac: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 52fb2: 7216 moveq #22,%d1 <== NOT EXECUTED 52fb4: 2040 moveal %d0,%a0 <== NOT EXECUTED rc = -1; 52fb6: 70ff moveq #-1,%d0 <== NOT EXECUTED *ret = cur_cln; break; default: errno = EINVAL; 52fb8: 2081 movel %d1,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 52fba: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 52fc0: 4e5e unlk %fp <== NOT EXECUTED 52fc2: 4e75 rts <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t); 52fc4: 202e 0014 movel %fp@(20),%d0 ret = va_arg(ap, uint32_t *); 52fc8: 246e 0018 moveal %fp@(24),%a2 /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { 52fcc: b0a8 0018 cmpl %a0@(24),%d0 52fd0: 6454 bccs 53026 <== NEVER TAKEN va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); } if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52fd2: 7201 moveq #1,%d1 52fd4: b2a8 0020 cmpl %a0@(32),%d1 52fd8: 672c beqs 53006 break; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52fda: 486e fffc pea %fp@(-4) *ret = 0; rc = RC_OK; break; } cl_start = pos >> fs_info->vol.bpc_log2; 52fde: 4281 clrl %d1 52fe0: 122b 0008 moveb %a3@(8),%d1 52fe4: e2a8 lsrl %d1,%d0 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52fe6: 2f00 movel %d0,%sp@- 52fe8: 2f08 movel %a0,%sp@- 52fea: 2f09 movel %a1,%sp@- 52fec: 4eba f802 jsr %pc@(527f0 ) if ( rc != RC_OK ) 52ff0: 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); 52ff4: 2001 movel %d1,%d0 if ( rc != RC_OK ) 52ff6: 66c2 bnes 52fba <== NEVER TAKEN break; *ret = cur_cln; 52ff8: 24ae fffc movel %fp@(-4),%a2@ rc = -1; break; } va_end(ap); return rc; } 52ffc: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53002: 4e5e unlk %fp 53004: 4e75 rts 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)) && 53006: 4aa8 0024 tstl %a0@(36) 5300a: 66ce bnes 52fda <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 5300c: 4281 clrl %d1 5300e: 122b 000a moveb %a3@(10),%d1 53012: 7403 moveq #3,%d2 53014: c282 andl %d2,%d1 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)) && 53016: 67c2 beqs 52fda <== NEVER TAKEN (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 53018: 4292 clrl %a2@ rc = RC_OK; 5301a: 4280 clrl %d0 rc = -1; break; } va_end(ap); return rc; } 5301c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 53022: 4e5e unlk %fp 53024: 4e75 rts ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) { va_end(ap); rtems_set_errno_and_return_minus_one( EIO ); 53026: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5302c: 7405 moveq #5,%d2 <== NOT EXECUTED 5302e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53030: 70ff moveq #-1,%d0 <== NOT EXECUTED 53032: 2082 movel %d2,%a0@ <== NOT EXECUTED rc = -1; break; } va_end(ap); return rc; } 53034: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 5303a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000527f0 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 527f0: 4e56 ffdc linkw %fp,#-36 527f4: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 527f8: 266e 000c moveal %fp@(12),%a3 527fc: 282e 0008 movel %fp@(8),%d4 52800: 2c2e 0010 movel %fp@(16),%d6 52804: 286e 0014 moveal %fp@(20),%a4 int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 52808: 202b 0032 movel %a3@(50),%d0 5280c: bc80 cmpl %d0,%d6 5280e: 676c beqs 5287c <== ALWAYS TAKEN { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 52810: 634e blss 52860 <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 52812: 206b 0036 moveal %a3@(54),%a0 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 52816: 2606 movel %d6,%d3 <== NOT EXECUTED 52818: 9680 subl %d0,%d3 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 5281a: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 5281e: 4a83 tstl %d3 <== NOT EXECUTED 52820: 6726 beqs 52848 <== NOT EXECUTED 52822: 2a0e movel %fp,%d5 <== NOT EXECUTED 52824: 4282 clrl %d2 <== NOT EXECUTED 52826: 5985 subql #4,%d5 <== NOT EXECUTED 52828: 45f9 0005 ade4 lea 5ade4 ,%a2 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5282e: 2f05 movel %d5,%sp@- <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 52830: 5282 addql #1,%d2 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52832: 2f08 movel %a0,%sp@- <== NOT EXECUTED 52834: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52836: 4e92 jsr %a2@ <== NOT EXECUTED if ( rc != RC_OK ) 52838: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5283c: 4a80 tstl %d0 <== NOT EXECUTED 5283e: 662c bnes 5286c <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 52840: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 52844: b682 cmpl %d2,%d3 <== NOT EXECUTED 52846: 66e6 bnes 5282e <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 52848: 2746 0032 movel %d6,%a3@(50) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 5284c: 2748 0036 movel %a0,%a3@(54) <== NOT EXECUTED *disk_cln = cur_cln; } return RC_OK; 52850: 4280 clrl %d0 <== NOT EXECUTED 52852: 4281 clrl %d1 <== NOT EXECUTED /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; 52854: 2888 movel %a0,%a4@ <== NOT EXECUTED } return RC_OK; } 52856: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5285c: 4e5e unlk %fp <== NOT EXECUTED 5285e: 4e75 rts <== NOT EXECUTED cur_cln = fat_fd->map.disk_cln; count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 52860: 206b 001c moveal %a3@(28),%a0 <== NOT EXECUTED 52864: 2606 movel %d6,%d3 <== NOT EXECUTED 52866: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 5286a: 60b2 bras 5281e <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 5286c: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; 52872: 2200 movel %d0,%d1 <== NOT EXECUTED 52874: 5bc0 smi %d0 <== NOT EXECUTED 52876: 49c0 extbl %d0 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 52878: 4e5e unlk %fp <== NOT EXECUTED 5287a: 4e75 rts <== NOT EXECUTED ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 5287c: 28ab 0036 movel %a3@(54),%a4@ fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 52880: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; 52886: 4280 clrl %d0 52888: 4281 clrl %d1 } 5288a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005348a : uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 5348a: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 5348c: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 53490: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 53494: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED 53498: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 5349c: 2668 0034 moveal %a0@(52),%a3 <== NOT EXECUTED 534a0: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 534a4: b081 cmpl %d1,%d0 <== NOT EXECUTED 534a6: 6700 008c beqw 53534 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 534aa: 4a81 tstl %d1 <== NOT EXECUTED 534ac: 666e bnes 5351c <== NOT EXECUTED 534ae: 4280 clrl %d0 <== NOT EXECUTED 534b0: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED 534b4: 7403 moveq #3,%d2 <== NOT EXECUTED 534b6: c082 andl %d2,%d0 <== NOT EXECUTED 534b8: 6762 beqs 5351c <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 534ba: 4280 clrl %d0 <== NOT EXECUTED 534bc: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 534c0: 222b 001a movel %a3@(26),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 534c4: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 534c6: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 534ca: 7609 moveq #9,%d3 <== NOT EXECUTED 534cc: 2400 movel %d0,%d2 <== NOT EXECUTED 534ce: e6aa lsrl %d3,%d2 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 534d0: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 534d2: 740f moveq #15,%d2 <== NOT EXECUTED 534d4: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 534d6: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 534da: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 534dc: c082 andl %d2,%d0 <== NOT EXECUTED 534de: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 534e0: 2401 movel %d1,%d2 <== NOT EXECUTED 534e2: d480 addl %d0,%d2 <== NOT EXECUTED 534e4: 4eb9 0004 bb20 jsr 4bb20 <_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); 534ea: 7001 moveq #1,%d0 <== NOT EXECUTED 534ec: 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 ); 534ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 534f0: 2200 movel %d0,%d1 <== NOT EXECUTED 534f2: e988 lsll #4,%d0 <== NOT EXECUTED 534f4: e589 lsll #2,%d1 <== NOT EXECUTED 534f6: 9081 subl %d1,%d0 <== NOT EXECUTED 534f8: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 534fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 534fe: 4eb9 0004 bae8 jsr 4bae8 <_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; 53504: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53508: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 5350c: 8083 orl %d3,%d0 <== NOT EXECUTED 5350e: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 53512: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 53518: 4e5e unlk %fp <== NOT EXECUTED 5351a: 4e75 rts <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 5351c: 4280 clrl %d0 <== NOT EXECUTED 5351e: 102b 0005 moveb %a3@(5),%d0 <== NOT EXECUTED 53522: 5581 subql #2,%d1 <== NOT EXECUTED 53524: e1a9 lsll %d0,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 53526: 4280 clrl %d0 <== NOT EXECUTED 53528: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 5352c: d2ab 002c addl %a3@(44),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 53530: e1a9 lsll %d0,%d1 <== NOT EXECUTED 53532: 6092 bras 534c6 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 53534: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 53538: 7609 moveq #9,%d3 <== NOT EXECUTED 5353a: 2400 movel %d0,%d2 <== NOT EXECUTED 5353c: e6aa lsrl %d3,%d2 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 5353e: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 53540: d282 addl %d2,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 53542: 740f moveq #15,%d2 <== NOT EXECUTED 53544: ea88 lsrl #5,%d0 <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 53546: 163c 0001 moveb #1,%d3 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5354a: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5354c: c082 andl %d2,%d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5354e: 2f0a movel %a2,%sp@- <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 53550: 2401 movel %d1,%d2 <== NOT EXECUTED 53552: d480 addl %d0,%d2 <== NOT EXECUTED 53554: 4eb9 0004 bb20 jsr 4bb20 <_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); 5355a: 7001 moveq #1,%d0 <== NOT EXECUTED 5355c: 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 ); 5355e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 53560: 2200 movel %d0,%d1 <== NOT EXECUTED 53562: e988 lsll #4,%d0 <== NOT EXECUTED 53564: e589 lsll #2,%d1 <== NOT EXECUTED 53566: 9081 subl %d1,%d0 <== NOT EXECUTED 53568: d0ab 005e addl %a3@(94),%d0 <== NOT EXECUTED 5356c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5356e: 4eb9 0004 bae8 jsr 4bae8 <_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; 53574: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53578: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED 5357c: 8083 orl %d3,%d0 <== NOT EXECUTED 5357e: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED } 53582: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 53588: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005288e : uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 5288e: 7201 moveq #1,%d1 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 52890: 4e56 ffdc linkw %fp,#-36 52894: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 52898: 282e 0008 movel %fp@(8),%d4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5289c: 2044 moveal %d4,%a0 fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 5289e: 286e 000c moveal %fp@(12),%a4 528a2: 2a6e 0010 moveal %fp@(16),%a5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 528a6: 2468 0034 moveal %a0@(52),%a2 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 528aa: 2014 movel %a4@,%d0 528ac: b280 cmpl %d0,%d1 528ae: 6700 020a beqw 52aba 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)) ) 528b2: 4a80 tstl %d0 528b4: 6600 016e bnew 52a24 528b8: 4281 clrl %d1 528ba: 122a 000a moveb %a2@(10),%d1 528be: 7403 moveq #3,%d2 528c0: c282 andl %d2,%d1 528c2: 6700 0160 beqw 52a24 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 528c6: 4281 clrl %d1 528c8: 122a 0003 moveb %a2@(3),%d1 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 528cc: 202a 001a movel %a2@(26),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 528d0: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 528d2: 242c 0004 movel %a4@(4),%d2 528d6: 7609 moveq #9,%d3 528d8: 2202 movel %d2,%d1 528da: e6a9 lsrl %d3,%d1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 528dc: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 528de: ea8a lsrl #5,%d2 528e0: 7a0f moveq #15,%d5 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 528e2: 163c 0001 moveb #1,%d3 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 528e6: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 528e8: c485 andl %d5,%d2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 528ea: 226a 005a moveal %a2@(90),%a1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 528ee: d480 addl %d0,%d2 528f0: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 528f2: 2003 movel %d3,%d0 528f4: e98b lsll #4,%d3 528f6: e588 lsll #2,%d0 528f8: 9680 subl %d0,%d3 528fa: d3c3 addal %d3,%a1 528fc: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 528fe: b3c8 cmpal %a0,%a1 52900: 6752 beqs 52954 52902: 2228 0020 movel %a0@(32),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52906: 2001 movel %d1,%d0 52908: 5580 subql #2,%d0 uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 5290a: 7c01 moveq #1,%d6 5290c: bc81 cmpl %d1,%d6 5290e: 6700 0158 beqw 52a68 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)) ) 52912: 4a81 tstl %d1 52914: 6600 0128 bnew 52a3e 52918: 4281 clrl %d1 5291a: 122a 000a moveb %a2@(10),%d1 5291e: 7a03 moveq #3,%d5 52920: c285 andl %d5,%d1 52922: 6700 011a beqw 52a3e fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52926: 4281 clrl %d1 52928: 122a 0003 moveb %a2@(3),%d1 ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 5292c: 202a 001a movel %a2@(26),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52930: e3a8 lsll %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52932: 2228 0024 movel %a0@(36),%d1 52936: 7c09 moveq #9,%d6 52938: 2a01 movel %d1,%d5 5293a: ecad lsrl %d6,%d5 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 5293c: d085 addl %d5,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5293e: ea89 lsrl #5,%d1 52940: 7a0f moveq #15,%d5 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52942: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52944: c285 andl %d5,%d1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52946: d081 addl %d1,%d0 { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 52948: b082 cmpl %d2,%d0 5294a: 6700 010a beqw 52a56 { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 5294e: 2050 moveal %a0@,%a0 ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52950: b3c8 cmpal %a0,%a1 52952: 66ae bnes 52902 52954: 226a 005e moveal %a2@(94),%a1 52958: d3c3 addal %d3,%a1 5295a: 2059 moveal %a1@+,%a0 5295c: b3c8 cmpal %a0,%a1 5295e: 674e beqs 529ae <== ALWAYS TAKEN 52960: 2228 0020 movel %a0@(32),%d1 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 52964: 7c01 moveq #1,%d6 <== NOT EXECUTED 52966: bc81 cmpl %d1,%d6 <== NOT EXECUTED 52968: 6700 0130 beqw 52a9a <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 5296c: 4a81 tstl %d1 <== NOT EXECUTED 5296e: 6600 0110 bnew 52a80 <== NOT EXECUTED 52972: 4280 clrl %d0 <== NOT EXECUTED 52974: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 52978: 7a03 moveq #3,%d5 <== NOT EXECUTED 5297a: c085 andl %d5,%d0 <== NOT EXECUTED 5297c: 6700 0102 beqw 52a80 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52980: 4280 clrl %d0 <== NOT EXECUTED 52982: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 52986: 222a 001a movel %a2@(26),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 5298a: e1a9 lsll %d0,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5298c: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52990: 7c09 moveq #9,%d6 <== NOT EXECUTED 52992: 2a00 movel %d0,%d5 <== NOT EXECUTED 52994: ecad lsrl %d6,%d5 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52996: d285 addl %d5,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52998: ea88 lsrl #5,%d0 <== NOT EXECUTED 5299a: 7a0f moveq #15,%d5 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 5299c: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 5299e: c085 andl %d5,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 529a0: d081 addl %d1,%d0 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 529a2: b082 cmpl %d2,%d0 <== NOT EXECUTED 529a4: 6700 00c8 beqw 52a6e <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 529a8: 2050 moveal %a0@,%a0 <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = rtems_chain_first(hash + mod); for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 529aa: b3c8 cmpal %a0,%a1 <== NOT EXECUTED 529ac: 66b2 bnes 52960 <== NOT EXECUTED return 0; } } the_node = the_node->next; } return -1; 529ae: 7aff moveq #-1,%d5 } /* 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)); 529b0: 4878 0042 pea 42 529b4: 4eb9 0004 6f84 jsr 46f84 if ( lfat_fd == NULL ) 529ba: 588f addql #4,%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)); 529bc: 2640 moveal %d0,%a3 529be: 2a80 movel %d0,%a5@ if ( lfat_fd == NULL ) 529c0: 6700 0164 beqw 52b26 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 529c4: 4878 0042 pea 42 lfat_fd->links_num = 1; 529c8: 7c01 moveq #1,%d6 lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 529ca: 42a7 clrl %sp@- 529cc: 2f00 movel %d0,%sp@- 529ce: 4eb9 0005 d2fc jsr 5d2fc lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 529d4: 275c 0020 movel %a4@+,%a3@(32) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 529d8: 72fe moveq #-2,%d1 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 529da: 4fef 000c lea %sp@(12),%sp lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 529de: 275c 0024 movel %a4@+,%a3@(36) 529e2: 275c 0028 movel %a4@+,%a3@(40) 529e6: 2754 002c movel %a4@,%a3@(44) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 529ea: 102b 0030 moveb %a3@(48),%d0 if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 529ee: 2746 0008 movel %d6,%a3@(8) lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 529f2: 7cff moveq #-1,%d6 rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 529f4: c081 andl %d1,%d0 lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 529f6: 2746 003a movel %d6,%a3@(58) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 529fa: 1740 0030 moveb %d0,%a3@(48) lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 529fe: 4a85 tstl %d5 52a00: 6700 00f0 beqw 52af2 lfat_fd->ino = key; 52a04: 2742 000c movel %d2,%a3@(12) 52a08: 2f0b movel %a3,%sp@- 52a0a: d6aa 005a addl %a2@(90),%d3 52a0e: 2f03 movel %d3,%sp@- 52a10: 4eb9 0004 bae8 jsr 4bae8 <_Chain_Append> /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 52a16: 508f addql #8,%sp 52a18: 4280 clrl %d0 } 52a1a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52a20: 4e5e unlk %fp 52a22: 4e75 rts register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a24: 4281 clrl %d1 52a26: 122a 0005 moveb %a2@(5),%d1 52a2a: 5580 subql #2,%d0 52a2c: e3a8 lsll %d1,%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a2e: 4281 clrl %d1 52a30: 122a 0003 moveb %a2@(3),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a34: d0aa 002c addl %a2@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a38: e3a8 lsll %d1,%d0 52a3a: 6000 fe96 braw 528d2 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a3e: 4281 clrl %d1 52a40: 122a 0005 moveb %a2@(5),%d1 52a44: e3a8 lsll %d1,%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a46: 4281 clrl %d1 52a48: 122a 0003 moveb %a2@(3),%d1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a4c: d0aa 002c addl %a2@(44),%d0 fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a50: e3a8 lsll %d1,%d0 52a52: 6000 fede braw 52932 /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 52a56: 2a88 movel %a0,%a5@ lfat_fd->links_num++; return rc; 52a58: 4280 clrl %d0 rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 52a5a: 52a8 0008 addql #1,%a0@(8) * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52a5e: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52a64: 4e5e unlk %fp 52a66: 4e75 rts ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 52a68: 7001 moveq #1,%d0 52a6a: 6000 fec6 braw 52932 fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 52a6e: 4a82 tstl %d2 <== NOT EXECUTED 52a70: 6708 beqs 52a7a <== NOT EXECUTED 52a72: b4a8 000c cmpl %a0@(12),%d2 <== NOT EXECUTED 52a76: 6600 ff30 bnew 529a8 <== NOT EXECUTED { *ret = (void *)the_node; return 0; 52a7a: 4285 clrl %d5 <== NOT EXECUTED 52a7c: 6000 ff32 braw 529b0 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a80: 4280 clrl %d0 <== NOT EXECUTED 52a82: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED 52a86: 5581 subql #2,%d1 <== NOT EXECUTED 52a88: e1a9 lsll %d0,%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a8a: 4280 clrl %d0 <== NOT EXECUTED 52a8c: 102a 0003 moveb %a2@(3),%d0 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52a90: d2aa 002c addl %a2@(44),%d1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 52a94: e1a9 lsll %d0,%d1 <== NOT EXECUTED 52a96: 6000 fef4 braw 5298c <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52a9a: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 52a9e: 7c09 moveq #9,%d6 <== NOT EXECUTED 52aa0: 2a00 movel %d0,%d5 <== NOT EXECUTED 52aa2: ecad lsrl %d6,%d5 <== NOT EXECUTED ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; 52aa4: 7201 moveq #1,%d1 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52aa6: d285 addl %d5,%d1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52aa8: ea88 lsrl #5,%d0 <== NOT EXECUTED 52aaa: 7a0f moveq #15,%d5 <== NOT EXECUTED fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52aac: e989 lsll #4,%d1 <== NOT EXECUTED ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52aae: c085 andl %d5,%d0 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52ab0: d081 addl %d1,%d0 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 52ab2: b082 cmpl %d2,%d0 <== NOT EXECUTED 52ab4: 6600 fef2 bnew 529a8 <== NOT EXECUTED 52ab8: 60b4 bras 52a6e <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52aba: 242c 0004 movel %a4@(4),%d2 52abe: 7609 moveq #9,%d3 52ac0: 2202 movel %d2,%d1 52ac2: e6a9 lsrl %d3,%d1 52ac4: 7001 moveq #1,%d0 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52ac6: d081 addl %d1,%d0 (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52ac8: ea8a lsrl #5,%d2 52aca: 7a0f moveq #15,%d5 uint32_t key1, uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; 52acc: 163c 0001 moveb #1,%d3 fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 52ad0: e988 lsll #4,%d0 ((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) ); 52ad2: c485 andl %d5,%d2 52ad4: 226a 005a moveal %a2@(90),%a1 static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 52ad8: d480 addl %d0,%d2 52ada: c682 andl %d2,%d3 rtems_chain_node *the_node = rtems_chain_first(hash + mod); 52adc: 2003 movel %d3,%d0 52ade: e98b lsll #4,%d3 52ae0: e588 lsll #2,%d0 52ae2: 9680 subl %d0,%d3 52ae4: d3c3 addal %d3,%a1 52ae6: 2059 moveal %a1@+,%a0 for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 52ae8: b3c8 cmpal %a0,%a1 52aea: 6600 fe16 bnew 52902 52aee: 6000 fe64 braw 52954 if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 52af2: 2f04 movel %d4,%sp@- <== NOT EXECUTED 52af4: 4eb9 0005 3e4c jsr 53e4c <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 52afa: 588f addql #4,%sp <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 52afc: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 52b00: 6600 ff06 bnew 52a08 <== NOT EXECUTED { free((*fat_fd)); 52b04: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 52b06: 4eb9 0004 680c jsr 4680c <== 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 ); 52b0c: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 52b12: 588f addql #4,%sp <== NOT EXECUTED 52b14: 720c moveq #12,%d1 <== NOT EXECUTED 52b16: 2040 moveal %d0,%a0 <== NOT EXECUTED 52b18: 70ff moveq #-1,%d0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52b1a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED free((*fat_fd)); /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 52b20: 2081 movel %d1,%a0@ <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52b22: 4e5e unlk %fp <== NOT EXECUTED 52b24: 4e75 rts <== NOT EXECUTED /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 52b26: 4eb9 0005 c918 jsr 5c918 <__errno> 52b2c: 740c moveq #12,%d2 52b2e: 2040 moveal %d0,%a0 52b30: 70ff moveq #-1,%d0 52b32: 2082 movel %d2,%a0@ * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 52b34: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 52b3a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052b50 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 52b50: 4e56 ffc8 linkw %fp,#-56 52b54: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 52b58: 246e 0008 moveal %fp@(8),%a2 52b5c: 286e 000c moveal %fp@(12),%a4 52b60: 282e 0010 movel %fp@(16),%d4 52b64: 242e 0014 movel %fp@(20),%d2 int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 52b68: 266a 0034 moveal %a2@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 52b6c: 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) 52b70: 4a82 tstl %d2 52b72: 6700 0106 beqw 52c7a /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 52b76: 202c 0018 movel %a4@(24),%d0 52b7a: b880 cmpl %d0,%d4 52b7c: 6400 00fc bccw 52c7a return FAT_EOF; if ((count > fat_fd->fat_file_size) || 52b80: b082 cmpl %d2,%d0 52b82: 6400 0102 bccw 52c86 (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 52b86: 2400 movel %d0,%d2 <== NOT EXECUTED 52b88: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52b8a: 7001 moveq #1,%d0 52b8c: b0ac 0020 cmpl %a4@(32),%d0 52b90: 6700 0106 beqw 52c98 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 52b94: 4280 clrl %d0 52b96: 102b 0008 moveb %a3@(8),%d0 52b9a: 2604 movel %d4,%d3 52b9c: e0ab lsrl %d0,%d3 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 52b9e: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52ba2: 486e fffc pea %fp@(-4) 52ba6: 2f03 movel %d3,%sp@- 52ba8: 2f0c movel %a4,%sp@- return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 52baa: 2d43 fff8 movel %d3,%fp@(-8) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52bae: 2f0a movel %a2,%sp@- 52bb0: 4eba fc3e jsr %pc@(527f0 ) if (rc != RC_OK) 52bb4: 4fef 0010 lea %sp@(16),%sp 52bb8: 4a81 tstl %d1 52bba: 6600 0136 bnew 52cf2 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 52bbe: 0285 0000 ffff andil #65535,%d5 52bc4: 5385 subql #1,%d5 52bc6: c885 andl %d5,%d4 52bc8: 2d44 fff4 movel %d4,%fp@(-12) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52bcc: 4a82 tstl %d2 52bce: 6700 01ac beqw 52d7c 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) 52bd2: 2d4c fff0 movel %a4,%fp@(-16) return rc; while (count > 0) 52bd6: 2a2e fff4 movel %fp@(-12),%d5 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) 52bda: 286e 0018 moveal %fp@(24),%a4 return rc; while (count > 0) 52bde: 9bcd subal %a5,%a5 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) 52be0: 1e2b 0002 moveb %a3@(2),%d7 52be4: 3c13 movew %a3@,%d6 return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 52be6: 4280 clrl %d0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 52be8: 226e fffc moveal %fp@(-4),%a1 register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52bec: 2209 movel %a1,%d1 52bee: 5581 subql #2,%d1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 52bf0: 302b 0006 movew %a3@(6),%d0 52bf4: 9085 subl %d5,%d0 52bf6: b480 cmpl %d0,%d2 52bf8: 6402 bccs 52bfc <== ALWAYS TAKEN 52bfa: 2002 movel %d2,%d0 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 52bfc: 206a 0034 moveal %a2@(52),%a0 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)) ) 52c00: 4a89 tstl %a1 52c02: 6600 00fa bnew 52cfe 52c06: 4284 clrl %d4 <== NOT EXECUTED 52c08: 1828 000a moveb %a0@(10),%d4 <== NOT EXECUTED 52c0c: 7603 moveq #3,%d3 <== NOT EXECUTED 52c0e: c883 andl %d3,%d4 <== NOT EXECUTED 52c10: 6700 00ec beqw 52cfe <== NOT EXECUTED return fs_info->vol.rdir_loc; 52c14: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52c18: 4874 d800 pea %a4@(00000000,%a5:l) 52c1c: 2041 moveal %d1,%a0 if ( ret < 0 ) return -1; count -= c; 52c1e: 9480 subl %d0,%d2 cmpltd += c; 52c20: dbc0 addal %d0,%a5 { 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); 52c22: 0286 0000 ffff andil #65535,%d6 ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52c28: 2f00 movel %d0,%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); 52c2a: 5386 subql #1,%d6 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); 52c2c: 0287 0000 00ff andil #255,%d7 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52c32: cc85 andl %d5,%d6 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); 52c34: eead lsrl %d7,%d5 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 52c36: 2f06 movel %d6,%sp@- 52c38: 4870 5800 pea %a0@(00000000,%d5:l) 52c3c: 2f0a movel %a2,%sp@- 52c3e: 4eb9 0005 3ace jsr 53ace <_fat_block_read> if ( ret < 0 ) 52c44: 4fef 0014 lea %sp@(20),%sp 52c48: 4a80 tstl %d0 52c4a: 6d00 009a bltw 52ce6 return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52c4e: 486e fffc pea %fp@(-4) if ( rc != RC_OK ) return rc; ofs = 0; 52c52: 4285 clrl %d5 if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 52c54: 2c2e fffc movel %fp@(-4),%d6 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 52c58: 2f06 movel %d6,%sp@- 52c5a: 2f0a movel %a2,%sp@- 52c5c: 4eb9 0005 ade4 jsr 5ade4 if ( rc != RC_OK ) 52c62: 4fef 000c lea %sp@(12),%sp 52c66: 4a80 tstl %d0 52c68: 6612 bnes 52c7c <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52c6a: 4a82 tstl %d2 52c6c: 6700 00e0 beqw 52d4e 52c70: 1e2b 0002 moveb %a3@(2),%d7 <== NOT EXECUTED 52c74: 3c13 movew %a3@,%d6 <== NOT EXECUTED 52c76: 6000 ff6e braw 52be6 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; 52c7a: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52c7c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52c82: 4e5e unlk %fp 52c84: 4e75 rts */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) 52c86: 2200 movel %d0,%d1 52c88: 9282 subl %d2,%d1 * computed from 1 */ if ( start >= fat_fd->fat_file_size ) return FAT_EOF; if ((count > fat_fd->fat_file_size) || 52c8a: b284 cmpl %d4,%d1 52c8c: 6400 fefc bccw 52b8a (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 52c90: 2400 movel %d0,%d2 <== NOT EXECUTED 52c92: 9484 subl %d4,%d2 <== NOT EXECUTED 52c94: 6000 fef4 braw 52b8a <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 52c98: 4aac 0024 tstl %a4@(36) 52c9c: 6600 fef6 bnew 52b94 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 52ca0: 4280 clrl %d0 52ca2: 102b 000a moveb %a3@(10),%d0 52ca6: 7203 moveq #3,%d1 52ca8: 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)) && 52caa: 6700 fee8 beqw 52b94 (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 52cae: 202c 001c movel %a4@(28),%d0 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)) ) 52cb2: 665a bnes 52d0e <== NEVER TAKEN return fs_info->vol.rdir_loc; 52cb4: 202b 001a movel %a3@(26),%d0 sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52cb8: 4281 clrl %d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52cba: 2040 moveal %d0,%a0 52cbc: 2f2e 0018 movel %fp@(24),%sp@- 52cc0: 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); 52cc2: 3213 movew %a3@,%d1 52cc4: 5381 subql #1,%d1 ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52cc6: c284 andl %d4,%d1 52cc8: 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); 52cca: 4281 clrl %d1 52ccc: 122b 0002 moveb %a3@(2),%d1 52cd0: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52cd2: 4870 4800 pea %a0@(00000000,%d4:l) 52cd6: 2f0a movel %a2,%sp@- 52cd8: 4eb9 0005 3ace jsr 53ace <_fat_block_read> if ( ret < 0 ) 52cde: 4fef 0014 lea %sp@(20),%sp 52ce2: 4a80 tstl %d0 52ce4: 6c96 bges 52c7c <== ALWAYS TAKEN 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; 52ce6: 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; } 52ce8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52cee: 4e5e unlk %fp <== NOT EXECUTED 52cf0: 4e75 rts <== NOT EXECUTED cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) 52cf2: 2001 movel %d1,%d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52cf4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 52cfa: 4e5e unlk %fp <== NOT EXECUTED 52cfc: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 52cfe: 4284 clrl %d4 52d00: 1828 0005 moveb %a0@(5),%d4 52d04: e9a9 lsll %d4,%d1 52d06: d2a8 002c addl %a0@(44),%d1 52d0a: 6000 ff0c braw 52c18 52d0e: 4281 clrl %d1 <== NOT EXECUTED 52d10: 122b 0005 moveb %a3@(5),%d1 <== NOT EXECUTED 52d14: 5580 subql #2,%d0 <== NOT EXECUTED 52d16: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52d18: 4281 clrl %d1 <== NOT EXECUTED 52d1a: d0ab 002c addl %a3@(44),%d0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52d1e: 2040 moveal %d0,%a0 <== NOT EXECUTED 52d20: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 52d24: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 52d26: 3213 movew %a3@,%d1 <== NOT EXECUTED 52d28: 5381 subql #1,%d1 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52d2a: c284 andl %d4,%d1 <== NOT EXECUTED 52d2c: 2f01 movel %d1,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 52d2e: 4281 clrl %d1 <== NOT EXECUTED 52d30: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 52d34: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 52d36: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 52d3a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52d3c: 4eb9 0005 3ace jsr 53ace <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 52d42: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 52d46: 4a80 tstl %d0 <== NOT EXECUTED 52d48: 6c00 ff32 bgew 52c7c <== NOT EXECUTED 52d4c: 6098 bras 52ce6 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52d4e: 206e fff4 moveal %fp@(-12),%a0 52d52: 4282 clrl %d2 52d54: 142b 0008 moveb %a3@(8),%d2 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 52d58: 200d movel %a5,%d0 } /* 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); 52d5a: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 52d5e: 286e fff0 moveal %fp@(-16),%a4 52d62: 2208 movel %a0,%d1 52d64: e4a9 lsrl %d2,%d1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52d66: d2ae fff8 addl %fp@(-8),%d1 ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 52d6a: 2946 0036 movel %d6,%a4@(54) ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52d6e: 2941 0032 movel %d1,%a4@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 52d72: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 52d78: 4e5e unlk %fp 52d7a: 4e75 rts } /* 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); 52d7c: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52d80: 9bcd subal %a5,%a5 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52d82: 4282 clrl %d2 <== NOT EXECUTED 52d84: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 52d88: 4286 clrl %d6 <== NOT EXECUTED 52d8a: 4280 clrl %d0 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52d8c: 41f0 d8ff lea %a0@(ffffffff,%a5:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 52d90: 2946 0036 movel %d6,%a4@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 52d94: 2208 movel %a0,%d1 <== NOT EXECUTED 52d96: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 52d98: d2ae fff8 addl %fp@(-8),%d1 <== NOT EXECUTED 52d9c: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 52da0: 60d0 bras 52d72 <== NOT EXECUTED =============================================================================== 0005369e : 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)) && 5369e: 7001 moveq #1,%d0 int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 536a0: 4e56 ffe0 linkw %fp,#-32 536a4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 536a8: 266e 000c moveal %fp@(12),%a3 536ac: 286e 0008 moveal %fp@(8),%a4 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 536b0: 242b 001c movel %a3@(28),%d2 rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 536b4: 246c 0034 moveal %a4@(52),%a2 uint32_t cur_cln = fat_fd->cln; 536b8: 2d42 fffc movel %d2,%fp@(-4) uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 536bc: b0ab 0020 cmpl %a3@(32),%d0 536c0: 6760 beqs 53722 <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 536c2: 2002 movel %d2,%d0 536c4: c0aa 000c andl %a2@(12),%d0 { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 536c8: 42ab 0018 clrl %a3@(24) while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 536cc: b0aa 0010 cmpl %a2@(16),%d0 536d0: 6474 bccs 53746 <== NEVER TAKEN 536d2: 260e movel %fp,%d3 536d4: 5983 subql #4,%d3 536d6: 4bf9 0005 ade4 lea 5ade4 ,%a5 { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 536dc: 2f03 movel %d3,%sp@- 536de: 2f02 movel %d2,%sp@- 536e0: 2f0c movel %a4,%sp@- 536e2: 4e95 jsr %a5@ if ( rc != RC_OK ) 536e4: 4fef 000c lea %sp@(12),%sp 536e8: 4a80 tstl %d0 536ea: 662c bnes 53718 <== NEVER TAKEN return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 536ec: 202e fffc movel %fp@(-4),%d0 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 536f0: 4284 clrl %d4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 536f2: 2200 movel %d0,%d1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 536f4: 382a 0006 movew %a2@(6),%d4 return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 536f8: c2aa 000c andl %a2@(12),%d1 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 536fc: d9ab 0018 addl %d4,%a3@(24) return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53700: b2aa 0010 cmpl %a2@(16),%d1 53704: 6442 bccs 53748 <== ALWAYS TAKEN { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53706: 2f03 movel %d3,%sp@- <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53708: 2400 movel %d0,%d2 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5370a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5370c: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5370e: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 53710: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 53714: 4a80 tstl %d0 <== NOT EXECUTED 53716: 67d4 beqs 536ec <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 53718: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 5371e: 4e5e unlk %fp <== NOT EXECUTED 53720: 4e75 rts <== 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)) && 53722: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED 53726: 669a bnes 536c2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 53728: 4280 clrl %d0 <== NOT EXECUTED 5372a: 102a 000a moveb %a2@(10),%d0 <== NOT EXECUTED 5372e: 7203 moveq #3,%d1 <== NOT EXECUTED 53730: 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)) && 53732: 678e beqs 536c2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; 53734: 4280 clrl %d0 <== NOT EXECUTED /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { fat_fd->fat_file_size = fs_info->vol.rdir_size; 53736: 276a 0024 0018 movel %a2@(36),%a3@(24) <== NOT EXECUTED fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; return rc; } 5373c: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53742: 4e5e unlk %fp <== NOT EXECUTED 53744: 4e75 rts <== NOT EXECUTED ) { 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; 53746: 4282 clrl %d2 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 53748: 2742 003a movel %d2,%a3@(58) return rc; 5374c: 4280 clrl %d0 } 5374e: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 53754: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00052da2 : { 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; 52da2: 72ff moveq #-1,%d1 <== NOT EXECUTED fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 52da4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 52da8: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 52dac: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED 52db0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 52db4: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 52db8: 226a 0034 moveal %a2@(52),%a1 <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 52dbc: 202b 0018 movel %a3@(24),%d0 <== NOT EXECUTED uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 52dc0: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 52dc4: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) 52dc8: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 52dca: 6460 bccs 52e2c <== NOT EXECUTED return rc; assert(fat_fd->fat_file_size); 52dcc: 4a80 tstl %d0 <== NOT EXECUTED 52dce: 6700 00b2 beqw 52e82 <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 52dd2: 4282 clrl %d2 <== NOT EXECUTED 52dd4: 4281 clrl %d1 <== NOT EXECUTED 52dd6: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED 52dda: 3429 0006 movew %a1@(6),%d2 <== NOT EXECUTED 52dde: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED 52de2: 2408 movel %a0,%d2 <== NOT EXECUTED 52de4: e2aa lsrl %d1,%d2 <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 52de6: 2602 movel %d2,%d3 <== NOT EXECUTED 52de8: e3ab lsll %d1,%d3 <== NOT EXECUTED 52dea: b680 cmpl %d0,%d3 <== NOT EXECUTED 52dec: 643e bccs 52e2c <== NOT EXECUTED 52dee: 49fa fa00 lea %pc@(527f0 ),%a4 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 52df2: 4a82 tstl %d2 <== NOT EXECUTED 52df4: 6718 beqs 52e0e <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 52df6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 52dfa: 2042 moveal %d2,%a0 <== NOT EXECUTED 52dfc: 4868 ffff pea %a0@(-1) <== NOT EXECUTED 52e00: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52e02: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e04: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 52e06: 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); 52e0a: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 52e0c: 6614 bnes 52e22 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52e0e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 52e12: 2f02 movel %d2,%sp@- <== NOT EXECUTED 52e14: 2f0b movel %a3,%sp@- <== NOT EXECUTED 52e16: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e18: 4e94 jsr %a4@ <== NOT EXECUTED if (rc != RC_OK) 52e1a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED if (rc != RC_OK) return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 52e1e: 2001 movel %d1,%d0 <== NOT EXECUTED if (rc != RC_OK) 52e20: 6716 beqs 52e38 <== 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; } 52e22: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52e28: 4e5e unlk %fp <== NOT EXECUTED 52e2a: 4e75 rts <== 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; 52e2c: 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; } 52e2e: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52e34: 4e5e unlk %fp <== NOT EXECUTED 52e36: 4e75 rts <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 52e38: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 52e3c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e3e: 4eb9 0005 b22c jsr 5b22c <== NOT EXECUTED if (rc != RC_OK) 52e44: 508f addql #8,%sp <== NOT EXECUTED 52e46: 4a80 tstl %d0 <== NOT EXECUTED 52e48: 66d8 bnes 52e22 <== NOT EXECUTED return rc; if (cl_start != 0) 52e4a: 4a82 tstl %d2 <== NOT EXECUTED 52e4c: 67d4 beqs 52e22 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 52e4e: 4878 ffff pea ffffffff <== NOT EXECUTED 52e52: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 52e56: 2f0a movel %a2,%sp@- <== NOT EXECUTED 52e58: 4eb9 0005 af96 jsr 5af96 <== NOT EXECUTED if ( rc != RC_OK ) 52e5e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 52e62: 4a80 tstl %d0 <== NOT EXECUTED 52e64: 66bc bnes 52e22 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 52e66: 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; 52e6a: 5382 subql #1,%d2 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 52e6c: 2741 0036 movel %d1,%a3@(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; 52e70: 2742 0032 movel %d2,%a3@(50) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 52e74: 2741 003a movel %d1,%a3@(58) <== NOT EXECUTED } return RC_OK; } 52e78: 4cee 1c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a4 <== NOT EXECUTED 52e7e: 4e5e unlk %fp <== NOT EXECUTED 52e80: 4e75 rts <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 52e82: 4879 0006 c446 pea 6c446 <== NOT EXECUTED 52e88: 4879 0006 c4a4 pea 6c4a4 <__FUNCTION__.6120> <== NOT EXECUTED 52e8e: 4878 026d pea 26d <== NOT EXECUTED 52e92: 4879 0006 c45c pea 6c45c <== NOT EXECUTED 52e98: 4eb9 0005 5a5c jsr 55a5c <__assert_func> <== NOT EXECUTED =============================================================================== 0005320e : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 5320e: 4e56 ffc8 linkw %fp,#-56 53212: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 53216: 246e 0008 moveal %fp@(8),%a2 5321a: 286e 000c moveal %fp@(12),%a4 5321e: 282e 0010 movel %fp@(16),%d4 53222: 242e 0014 movel %fp@(20),%d2 53226: 2a6e 0018 moveal %fp@(24),%a5 int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 5322a: 266a 0034 moveal %a2@(52),%a3 uint32_t cmpltd = 0; uint32_t cur_cln = 0; 5322e: 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; 53232: 42ae fffc clrl %fp@(-4) if ( count == 0 ) 53236: 4a82 tstl %d2 53238: 6700 0128 beqw 53362 return cmpltd; if ( start > fat_fd->fat_file_size ) 5323c: b8ac 0018 cmpl %a4@(24),%d4 53240: 6200 01a4 bhiw 533e6 rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 53244: 202c 0014 movel %a4@(20),%d0 53248: b082 cmpl %d2,%d0 5324a: 6500 019a bcsw 533e6 (start > fat_fd->size_limit - count)) 5324e: 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) || 53250: b084 cmpl %d4,%d0 53252: 6500 0192 bcsw 533e6 (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 53256: 486e fffc pea %fp@(-4) 5325a: 2602 movel %d2,%d3 5325c: d684 addl %d4,%d3 5325e: 2f03 movel %d3,%sp@- 53260: 2f0c movel %a4,%sp@- 53262: 2f0a movel %a2,%sp@- 53264: 4eb9 0005 303e jsr 5303e if (rc != RC_OK) 5326a: 4fef 0010 lea %sp@(16),%sp 5326e: 4a80 tstl %d0 53270: 6600 00f2 bnew 53364 /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 53274: 202e fffc movel %fp@(-4),%d0 53278: b083 cmpl %d3,%d0 5327a: 6704 beqs 53280 <== ALWAYS TAKEN count = c - start; 5327c: 2400 movel %d0,%d2 <== NOT EXECUTED 5327e: 9484 subl %d4,%d2 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53280: 7001 moveq #1,%d0 53282: b0ac 0020 cmpl %a4@(32),%d0 53286: 6700 00e6 beqw 5336e return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 5328a: 4280 clrl %d0 5328c: 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); 53290: 260e movel %fp,%d3 53292: 5183 subql #8,%d3 return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 53294: 2c04 movel %d4,%d6 53296: e0ae lsrl %d0,%d6 save_ofs = ofs = start & (fs_info->vol.bpc - 1); 53298: 3a2b 0006 movew %a3@(6),%d5 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 5329c: 2f03 movel %d3,%sp@- 5329e: 2f06 movel %d6,%sp@- 532a0: 2f0c movel %a4,%sp@- return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 532a2: 2d46 fff4 movel %d6,%fp@(-12) save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 532a6: 2f0a movel %a2,%sp@- 532a8: 4eba f546 jsr %pc@(527f0 ) if (rc != RC_OK) 532ac: 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); 532b0: 2001 movel %d1,%d0 if (rc != RC_OK) 532b2: 6600 00b0 bnew 53364 return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 532b6: 0285 0000 ffff andil #65535,%d5 532bc: 5385 subql #1,%d5 532be: c885 andl %d5,%d4 532c0: 2d44 fff0 movel %d4,%fp@(-16) rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 532c4: 4a82 tstl %d2 532c6: 6700 019e beqw 53466 532ca: 2e2e fff0 movel %fp@(-16),%d7 532ce: 4284 clrl %d4 { c = MIN(count, (fs_info->vol.bpc - ofs)); 532d0: 4280 clrl %d0 sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 532d2: 226e fff8 moveal %fp@(-8),%a1 532d6: 2209 movel %a1,%d1 532d8: 5581 subql #2,%d1 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 532da: 302b 0006 movew %a3@(6),%d0 532de: 9087 subl %d7,%d0 532e0: b480 cmpl %d0,%d2 532e2: 6402 bccs 532e6 <== NEVER TAKEN 532e4: 2002 movel %d2,%d0 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 532e6: 206a 0034 moveal %a2@(52),%a0 if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 532ea: 2d40 fffc movel %d0,%fp@(-4) uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 532ee: 4a89 tstl %a1 532f0: 6600 00e4 bnew 533d6 532f4: 4285 clrl %d5 <== NOT EXECUTED 532f6: 1a28 000a moveb %a0@(10),%d5 <== NOT EXECUTED 532fa: 7c03 moveq #3,%d6 <== NOT EXECUTED 532fc: ca86 andl %d6,%d5 <== NOT EXECUTED 532fe: 6700 00d6 beqw 533d6 <== NOT EXECUTED return fs_info->vol.rdir_loc; 53302: 2228 001a movel %a0@(26),%d1 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 53306: 4875 4800 pea %a5@(00000000,%d4:l) 5330a: 2041 moveal %d1,%a0 5330c: 2f00 movel %d0,%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); 5330e: 4280 clrl %d0 53310: 3013 movew %a3@,%d0 53312: 5380 subql #1,%d0 ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 53314: c087 andl %d7,%d0 53316: 2f00 movel %d0,%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); 53318: 4280 clrl %d0 5331a: 102b 0002 moveb %a3@(2),%d0 5331e: e0af lsrl %d0,%d7 byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 53320: 4870 7800 pea %a0@(00000000,%d7:l) 53324: 2f0a movel %a2,%sp@- 53326: 4eb9 0005 3b72 jsr 53b72 <_fat_block_write> if ( ret < 0 ) 5332c: 4fef 0014 lea %sp@(20),%sp 53330: 4a80 tstl %d0 53332: 6d00 0096 bltw 533ca return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53336: 2f03 movel %d3,%sp@- if ( ret < 0 ) return -1; count -= c; cmpltd += c; save_cln = cur_cln; 53338: 2e2e fff8 movel %fp@(-8),%d7 rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 5333c: 2f07 movel %d7,%sp@- ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 5333e: 202e fffc movel %fp@(-4),%d0 53342: 9480 subl %d0,%d2 cmpltd += c; 53344: d880 addl %d0,%d4 save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53346: 2f0a movel %a2,%sp@- 53348: 4eb9 0005 ade4 jsr 5ade4 if ( rc != RC_OK ) 5334e: 4fef 000c lea %sp@(12),%sp 53352: 4a80 tstl %d0 53354: 660e bnes 53364 <== NEVER TAKEN rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 53356: 4a82 tstl %d2 53358: 6700 00e2 beqw 5343c save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; ofs = 0; 5335c: 4287 clrl %d7 <== NOT EXECUTED 5335e: 6000 ff70 braw 532d0 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) return cmpltd; 53362: 4280 clrl %d0 <== NOT EXECUTED fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 53364: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 5336a: 4e5e unlk %fp 5336c: 4e75 rts * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 5336e: 4aac 0024 tstl %a4@(36) 53372: 6600 ff16 bnew 5328a (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 53376: 4280 clrl %d0 53378: 102b 000a moveb %a3@(10),%d0 5337c: 7203 moveq #3,%d1 5337e: c081 andl %d1,%d0 * file of 'start + count' bytes */ if (c != (start + count)) count = c - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 53380: 6700 ff08 beqw 5328a (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 53384: 202c 001c movel %a4@(28),%d0 fat_fd->map.disk_cln = cur_cln; *disk_cln = cur_cln; } return RC_OK; } 53388: 206a 0034 moveal %a2@(52),%a0 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)) ) 5338c: 6670 bnes 533fe <== NEVER TAKEN 5338e: 4281 clrl %d1 53390: 1228 000a moveb %a0@(10),%d1 53394: 7603 moveq #3,%d3 53396: c283 andl %d3,%d1 53398: 6764 beqs 533fe <== NEVER TAKEN return fs_info->vol.rdir_loc; 5339a: 2028 001a movel %a0@(26),%d0 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); 5339e: 4281 clrl %d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 533a0: 2040 moveal %d0,%a0 533a2: 2f0d movel %a5,%sp@- 533a4: 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); 533a6: 3213 movew %a3@,%d1 533a8: 5381 subql #1,%d1 ret = _fat_block_write(mt_entry, sec, byte, count, buf); 533aa: c284 andl %d4,%d1 533ac: 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); 533ae: 4281 clrl %d1 533b0: 122b 0002 moveb %a3@(2),%d1 533b4: e2ac lsrl %d1,%d4 byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 533b6: 4870 4800 pea %a0@(00000000,%d4:l) 533ba: 2f0a movel %a2,%sp@- 533bc: 4eb9 0005 3b72 jsr 53b72 <_fat_block_write> if ( ret < 0 ) 533c2: 4fef 0014 lea %sp@(20),%sp 533c6: 4a80 tstl %d0 533c8: 6c9a bges 53364 <== ALWAYS TAKEN 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; 533ca: 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; } 533cc: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 533d2: 4e5e unlk %fp <== NOT EXECUTED 533d4: 4e75 rts <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 533d6: 4285 clrl %d5 533d8: 1a28 0005 moveb %a0@(5),%d5 533dc: eba9 lsll %d5,%d1 533de: d2a8 002c addl %a0@(44),%d1 533e2: 6000 ff22 braw 53306 if ( start > fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 533e6: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 533ec: 7805 moveq #5,%d4 <== NOT EXECUTED 533ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 533f0: 70ff moveq #-1,%d0 <== NOT EXECUTED 533f2: 2084 movel %d4,%a0@ <== 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; } 533f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 533fa: 4e5e unlk %fp <== NOT EXECUTED 533fc: 4e75 rts <== NOT EXECUTED 533fe: 4281 clrl %d1 <== NOT EXECUTED 53400: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED 53404: 5580 subql #2,%d0 <== NOT EXECUTED 53406: e3a8 lsll %d1,%d0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 53408: 4281 clrl %d1 <== NOT EXECUTED 5340a: d0a8 002c addl %a0@(44),%d0 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, count, buf); 5340e: 2040 moveal %d0,%a0 <== NOT EXECUTED 53410: 2f0d movel %a5,%sp@- <== NOT EXECUTED 53412: 2f02 movel %d2,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); 53414: 3213 movew %a3@,%d1 <== NOT EXECUTED 53416: 5381 subql #1,%d1 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, count, buf); 53418: c284 andl %d4,%d1 <== NOT EXECUTED 5341a: 2f01 movel %d1,%sp@- <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); sec += (start >> fs_info->vol.sec_log2); 5341c: 4281 clrl %d1 <== NOT EXECUTED 5341e: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED 53422: e2ac lsrl %d1,%d4 <== NOT EXECUTED byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 53424: 4870 4800 pea %a0@(00000000,%d4:l) <== NOT EXECUTED 53428: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5342a: 4eb9 0005 3b72 jsr 53b72 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 53430: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 53434: 4a80 tstl %d0 <== NOT EXECUTED 53436: 6c00 ff2c bgew 53364 <== NOT EXECUTED 5343a: 608e bras 533ca <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 5343c: 206e fff0 moveal %fp@(-16),%a0 53440: 4282 clrl %d2 53442: 142b 0008 moveb %a3@(8),%d2 rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 53446: 2004 movel %d4,%d0 } /* 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); 53448: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 fat_fd->map.disk_cln = save_cln; 5344c: 2947 0036 movel %d7,%a4@(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); 53450: 2208 movel %a0,%d1 53452: e4a9 lsrl %d2,%d1 ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 53454: d2ae fff4 addl %fp@(-12),%d1 53458: 2941 0032 movel %d1,%a4@(50) ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; } 5345c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 53462: 4e5e unlk %fp 53464: 4e75 rts } /* 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); 53466: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 5346a: 4284 clrl %d4 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 5346c: 4282 clrl %d2 <== NOT EXECUTED 5346e: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 53472: 4287 clrl %d7 <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 53474: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0 <== NOT EXECUTED fat_fd->map.disk_cln = save_cln; 53478: 2947 0036 movel %d7,%a4@(54) <== NOT EXECUTED } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); 5347c: 2208 movel %a0,%d1 <== NOT EXECUTED 5347e: e4a9 lsrl %d2,%d1 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 53480: d2ae fff4 addl %fp@(-12),%d1 <== NOT EXECUTED 53484: 2941 0032 movel %d1,%a4@(50) <== NOT EXECUTED 53488: 60d2 bras 5345c <== NOT EXECUTED =============================================================================== 0005b22c : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 5b22c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 5b230: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 5b234: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED 5b238: 2e2e 000c movel %fp@(12),%d7 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5b23c: 2007 movel %d7,%d0 <== NOT EXECUTED 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; 5b23e: 246b 0034 moveal %a3@(52),%a2 <== NOT EXECUTED 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) 5b242: c0aa 000c andl %a2@(12),%d0 <== NOT EXECUTED ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 5b246: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5b24a: b0aa 0010 cmpl %a2@(16),%d0 <== NOT EXECUTED 5b24e: 6400 009e bccw 5b2ee <== NOT EXECUTED 5b252: 2a0e movel %fp,%d5 <== NOT EXECUTED 5b254: 2407 movel %d7,%d2 <== NOT EXECUTED 5b256: 4284 clrl %d4 <== NOT EXECUTED 5b258: 4286 clrl %d6 <== NOT EXECUTED 5b25a: 5985 subql #4,%d5 <== NOT EXECUTED 5b25c: 49f9 0005 ade4 lea 5ade4 ,%a4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5b262: 4bf9 0005 af96 lea 5af96 ,%a5 <== NOT EXECUTED uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 5b268: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5b26a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b26c: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b26e: 4e94 jsr %a4@ <== NOT EXECUTED if ( rc != RC_OK ) 5b270: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 5b274: 2600 movel %d0,%d3 <== NOT EXECUTED if ( rc != RC_OK ) 5b276: 6650 bnes 5b2c8 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5b278: 42a7 clrl %sp@- <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; 5b27a: 5284 addql #1,%d4 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 5b27c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b27e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5b280: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5b282: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b286: 4a80 tstl %d0 <== NOT EXECUTED 5b288: 6702 beqs 5b28c <== NOT EXECUTED 5b28a: 2c00 movel %d0,%d6 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 5b28c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 5b290: 2002 movel %d2,%d0 <== NOT EXECUTED 5b292: c0aa 000c andl %a2@(12),%d0 <== NOT EXECUTED 5b296: b0aa 0010 cmpl %a2@(16),%d0 <== NOT EXECUTED 5b29a: 65cc bcss 5b268 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b29c: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 5b2a0: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 5b2a2: 2547 003e movel %d7,%a2@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b2a6: b280 cmpl %d0,%d1 <== NOT EXECUTED 5b2a8: 6706 beqs 5b2b0 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 5b2aa: d880 addl %d0,%d4 <== NOT EXECUTED 5b2ac: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 5b2b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b2b2: 2606 movel %d6,%d3 <== NOT EXECUTED 5b2b4: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED 5b2ba: 588f addql #4,%sp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 5b2bc: 2003 movel %d3,%d0 <== NOT EXECUTED 5b2be: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b2c4: 4e5e unlk %fp <== NOT EXECUTED 5b2c6: 4e75 rts <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b2c8: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED 5b2cc: 72ff moveq #-1,%d1 <== NOT EXECUTED 5b2ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 5b2d0: 6706 beqs 5b2d8 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 5b2d2: d880 addl %d0,%d4 <== NOT EXECUTED 5b2d4: 2544 003a movel %d4,%a2@(58) <== NOT EXECUTED fat_buf_release(fs_info); 5b2d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b2da: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED return rc; 5b2e0: 588f addql #4,%sp <== NOT EXECUTED fat_buf_release(fs_info); if (rc1 != RC_OK) return rc1; return RC_OK; } 5b2e2: 2003 movel %d3,%d0 <== NOT EXECUTED 5b2e4: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b2ea: 4e5e unlk %fp <== NOT EXECUTED 5b2ec: 4e75 rts <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b2ee: 202a 003a movel %a2@(58),%d0 <== NOT EXECUTED { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; 5b2f2: 4284 clrl %d4 <== NOT EXECUTED fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; 5b2f4: 4286 clrl %d6 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b2f6: 72ff moveq #-1,%d1 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 5b2f8: 2547 003e movel %d7,%a2@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 5b2fc: b280 cmpl %d0,%d1 <== NOT EXECUTED 5b2fe: 66aa bnes 5b2aa <== NOT EXECUTED 5b300: 60ae bras 5b2b0 <== NOT EXECUTED =============================================================================== 00053f0e : uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53f0e: 7001 moveq #1,%d0 <== NOT EXECUTED void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 53f10: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 53f14: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53f18: 222e 000c movel %fp@(12),%d1 <== 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; 53f1c: 2268 0034 moveal %a0@(52),%a1 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53f20: 92a9 006e subl %a1@(110),%d1 <== NOT EXECUTED void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 53f24: 2f02 movel %d2,%sp@- <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 53f26: 2401 movel %d1,%d2 <== NOT EXECUTED 53f28: e68a lsrl #3,%d2 <== NOT EXECUTED 53f2a: 2069 0062 moveal %a1@(98),%a0 <== NOT EXECUTED 53f2e: d1c2 addal %d2,%a0 <== NOT EXECUTED 53f30: 7407 moveq #7,%d2 <== NOT EXECUTED 53f32: c282 andl %d2,%d1 <== NOT EXECUTED 53f34: 1410 moveb %a0@,%d2 <== NOT EXECUTED 53f36: e3a8 lsll %d1,%d0 <== NOT EXECUTED 53f38: 4680 notl %d0 <== NOT EXECUTED 53f3a: c082 andl %d2,%d0 <== NOT EXECUTED 53f3c: 1080 moveb %d0,%a0@ <== NOT EXECUTED } 53f3e: 241f movel %sp@+,%d2 <== NOT EXECUTED 53f40: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005ade4 : 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)) ) 5ade4: 7001 moveq #1,%d0 fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 5ade6: 4e56 ffdc linkw %fp,#-36 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 5adea: 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 ) { 5adee: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 5adf2: 242e 000c movel %fp@(12),%d2 5adf6: 286e 0010 moveal %fp@(16),%a4 int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 5adfa: 2468 0034 moveal %a0@(52),%a2 rtems_bdbuf_buffer *block0 = NULL; 5adfe: 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)) ) 5ae02: b082 cmpl %d2,%d0 5ae04: 6474 bccs 5ae7a <== NEVER TAKEN 5ae06: 202a 0030 movel %a2@(48),%d0 5ae0a: 5280 addql #1,%d0 5ae0c: b082 cmpl %d2,%d0 5ae0e: 656a bcss 5ae7a <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5ae10: 4280 clrl %d0 5ae12: 102a 000a moveb %a2@(10),%d0 5ae16: 2a02 movel %d2,%d5 5ae18: 0800 0000 btst #0,%d0 5ae1c: 6676 bnes 5ae94 <== ALWAYS TAKEN 5ae1e: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5ae22: 6776 beqs 5ae9a <== NOT EXECUTED 5ae24: da85 addl %d5,%d5 <== NOT EXECUTED 5ae26: 4280 clrl %d0 5ae28: 102a 0002 moveb %a2@(2),%d0 5ae2c: 2605 movel %d5,%d3 5ae2e: e0ab lsrl %d0,%d3 5ae30: d6aa 0044 addl %a2@(68),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5ae34: 47f9 0005 3758 lea 53758 ,%a3 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); 5ae3a: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5ae3c: 486e fffc pea %fp@(-4) 5ae40: 4878 0001 pea 1 5ae44: 2f03 movel %d3,%sp@- 5ae46: 2f0a movel %a2,%sp@- 5ae48: 4e93 jsr %a3@ if (rc != RC_OK) 5ae4a: 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); 5ae4e: 2800 movel %d0,%d4 if (rc != RC_OK) 5ae50: 6636 bnes 5ae88 <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 5ae52: 4280 clrl %d0 5ae54: 102a 000a moveb %a2@(10),%d0 5ae58: 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); 5ae5a: 0286 0000 ffff andil #65535,%d6 5ae60: 5386 subql #1,%d6 5ae62: ca86 andl %d6,%d5 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 5ae64: b280 cmpl %d0,%d1 5ae66: 6700 00b2 beqw 5af1a 5ae6a: 123c 0004 moveb #4,%d1 5ae6e: b280 cmpl %d0,%d1 5ae70: 676a beqs 5aedc <== NEVER TAKEN 5ae72: 123c 0001 moveb #1,%d1 5ae76: b280 cmpl %d0,%d1 5ae78: 6724 beqs 5ae9e <== ALWAYS TAKEN *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); break; default: rtems_set_errno_and_return_minus_one(EIO); 5ae7a: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5ae80: 78ff moveq #-1,%d4 <== NOT EXECUTED 5ae82: 2040 moveal %d0,%a0 <== NOT EXECUTED 5ae84: 7005 moveq #5,%d0 <== NOT EXECUTED 5ae86: 2080 movel %d0,%a0@ <== NOT EXECUTED break; } return RC_OK; } 5ae88: 2004 movel %d4,%d0 <== NOT EXECUTED 5ae8a: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5ae90: 4e5e unlk %fp <== NOT EXECUTED 5ae92: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5ae94: e28d lsrl #1,%d5 5ae96: da82 addl %d2,%d5 5ae98: 608c bras 5ae26 5ae9a: e58d lsll #2,%d5 <== NOT EXECUTED 5ae9c: 6088 bras 5ae26 <== NOT EXECUTED 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))); 5ae9e: 206e fffc moveal %fp@(-4),%a0 5aea2: 4281 clrl %d1 if ( ofs == (fs_info->vol.bps - 1) ) 5aea4: 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))); 5aea6: 2068 001e moveal %a0@(30),%a0 5aeaa: 1230 5800 moveb %a0@(00000000,%d5:l),%d1 if ( ofs == (fs_info->vol.bps - 1) ) 5aeae: 3012 movew %a2@,%d0 case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 5aeb0: 2881 movel %d1,%a4@ if ( ofs == (fs_info->vol.bps - 1) ) 5aeb2: 5380 subql #1,%d0 5aeb4: ba80 cmpl %d0,%d5 5aeb6: 6700 00a0 beqw 5af58 *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 5aeba: 4280 clrl %d0 5aebc: 1030 5801 moveb %a0@(00000001,%d5:l),%d0 5aec0: e188 lsll #8,%d0 5aec2: 8081 orl %d1,%d0 5aec4: 2880 movel %d0,%a4@ } if ( FAT_CLUSTER_IS_ODD(cln) ) 5aec6: 0802 0000 btst #0,%d2 5aeca: 6778 beqs 5af44 *ret_val = (*ret_val) >> FAT12_SHIFT; 5aecc: e888 lsrl #4,%d0 5aece: 2880 movel %d0,%a4@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5aed0: 2004 movel %d4,%d0 5aed2: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5aed8: 4e5e unlk %fp 5aeda: 4e75 rts *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); 5aedc: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5aee0: 7018 moveq #24,%d0 <== NOT EXECUTED 5aee2: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5aee6: 2230 5800 movel %a0@(00000000,%d5:l),%d1 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5aeea: 7a18 moveq #24,%d5 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5aeec: 2601 movel %d1,%d3 <== NOT EXECUTED 5aeee: e0ab lsrl %d0,%d3 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5aef0: 2401 movel %d1,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5aef2: 2001 movel %d1,%d0 <== NOT EXECUTED ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; 5aef4: e08a lsrl #8,%d2 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5aef6: eba8 lsll %d5,%d0 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5aef8: e189 lsll #8,%d1 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5aefa: 0282 0000 ff00 andil #65280,%d2 <== NOT EXECUTED 5af00: 8083 orl %d3,%d0 <== NOT EXECUTED 5af02: 0281 00ff 0000 andil #16711680,%d1 <== NOT EXECUTED 5af08: 8081 orl %d1,%d0 <== NOT EXECUTED 5af0a: 8082 orl %d2,%d0 <== NOT EXECUTED 5af0c: 2880 movel %d0,%a4@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5af0e: 2004 movel %d4,%d0 <== NOT EXECUTED 5af10: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5af16: 4e5e unlk %fp <== NOT EXECUTED 5af18: 4e75 rts <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 5af1a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 5af1e: 4281 clrl %d1 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); 5af20: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED *ret_val = CF_LE_W(*ret_val); 5af24: 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)); 5af28: 2001 movel %d1,%d0 <== NOT EXECUTED 5af2a: e089 lsrl #8,%d1 <== NOT EXECUTED 5af2c: e188 lsll #8,%d0 <== NOT EXECUTED 5af2e: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED 5af34: 8081 orl %d1,%d0 <== NOT EXECUTED 5af36: 2880 movel %d0,%a4@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5af38: 2004 movel %d4,%d0 <== NOT EXECUTED 5af3a: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5af40: 4e5e unlk %fp <== NOT EXECUTED 5af42: 4e75 rts <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 5af44: 0280 0000 0fff andil #4095,%d0 5af4a: 2880 movel %d0,%a4@ rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5af4c: 2004 movel %d4,%d0 5af4e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 5af54: 4e5e unlk %fp 5af56: 4e75 rts * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5af58: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5af5c: 2043 moveal %d3,%a0 <== NOT EXECUTED 5af5e: 4878 0001 pea 1 <== NOT EXECUTED 5af62: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5af66: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5af68: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5af6a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5af6e: 4a80 tstl %d0 <== NOT EXECUTED 5af70: 6616 bnes 5af88 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 5af72: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5af76: 4280 clrl %d0 <== NOT EXECUTED 5af78: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5af7c: 1010 moveb %a0@,%d0 <== NOT EXECUTED 5af7e: e188 lsll #8,%d0 <== NOT EXECUTED 5af80: 8094 orl %a4@,%d0 <== NOT EXECUTED 5af82: 2880 movel %d0,%a4@ <== NOT EXECUTED 5af84: 6000 ff40 braw 5aec6 <== 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) 5af88: 2800 movel %d0,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); break; } return RC_OK; } 5af8a: 2004 movel %d4,%d0 <== NOT EXECUTED 5af8c: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 <== NOT EXECUTED 5af92: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00053e4c : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 53e4c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 53e50: 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) { 53e54: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 53e58: 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); 53e5c: 47f9 0004 7df8 lea 47df8 ,%a3 <== NOT EXECUTED * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 53e62: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53e66: 4a82 tstl %d2 <== NOT EXECUTED 53e68: 6768 beqs 53ed2 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53e6a: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53e6e: 2200 movel %d0,%d1 <== NOT EXECUTED 53e70: e689 lsrl #3,%d1 <== NOT EXECUTED 53e72: 7807 moveq #7,%d4 <== NOT EXECUTED 53e74: 226a 0062 moveal %a2@(98),%a1 <== NOT EXECUTED 53e78: 41f1 1800 lea %a1@(00000000,%d1:l),%a0 <== NOT EXECUTED 53e7c: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53e7e: c880 andl %d0,%d4 <== NOT EXECUTED 53e80: 1203 moveb %d3,%d1 <== NOT EXECUTED 53e82: 49c1 extbl %d1 <== NOT EXECUTED 53e84: 0901 btst %d4,%d1 <== NOT EXECUTED 53e86: 6730 beqs 53eb8 <== NOT EXECUTED 53e88: 4281 clrl %d1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53e8a: 5280 addql #1,%d0 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 53e8c: 5281 addql #1,%d1 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 53e8e: 2540 0066 movel %d0,%a2@(102) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 53e92: b480 cmpl %d0,%d2 <== NOT EXECUTED 53e94: 6204 bhis 53e9a <== NOT EXECUTED fs_info->index = 0; 53e96: 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++) 53e9a: b481 cmpl %d1,%d2 <== NOT EXECUTED 53e9c: 6734 beqs 53ed2 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 53e9e: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53ea2: 2600 movel %d0,%d3 <== NOT EXECUTED 53ea4: e68b lsrl #3,%d3 <== NOT EXECUTED 53ea6: 41f1 3800 lea %a1@(00000000,%d3:l),%a0 <== NOT EXECUTED 53eaa: 7807 moveq #7,%d4 <== NOT EXECUTED 53eac: 1610 moveb %a0@,%d3 <== NOT EXECUTED 53eae: c880 andl %d0,%d4 <== NOT EXECUTED 53eb0: 1a03 moveb %d3,%d5 <== NOT EXECUTED 53eb2: 49c5 extbl %d5 <== NOT EXECUTED 53eb4: 0905 btst %d4,%d5 <== NOT EXECUTED 53eb6: 66d2 bnes 53e8a <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 53eb8: 7001 moveq #1,%d0 <== NOT EXECUTED 53eba: e9a8 lsll %d4,%d0 <== NOT EXECUTED 53ebc: 8083 orl %d3,%d0 <== NOT EXECUTED 53ebe: 1080 moveb %d0,%a0@ <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 53ec0: 202a 0066 movel %a2@(102),%d0 <== NOT EXECUTED 53ec4: d0aa 006e addl %a2@(110),%d0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 53ec8: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53ece: 4e5e unlk %fp <== NOT EXECUTED 53ed0: 4e75 rts <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 53ed2: 203c 0fff ffff movel #268435455,%d0 <== NOT EXECUTED 53ed8: 90aa 006e subl %a2@(110),%d0 <== NOT EXECUTED 53edc: d482 addl %d2,%d2 <== NOT EXECUTED 53ede: b082 cmpl %d2,%d0 <== NOT EXECUTED 53ee0: 620c bhis 53eee <== NOT EXECUTED resrc_unsuff = true; } else resrc_unsuff = true; } return 0; 53ee2: 4280 clrl %d0 <== NOT EXECUTED } 53ee4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 53eea: 4e5e unlk %fp <== NOT EXECUTED 53eec: 4e75 rts <== NOT EXECUTED fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; 53eee: 2542 006a movel %d2,%a2@(106) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 53ef2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 53ef4: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 53ef8: 4e93 jsr %a3@ <== NOT EXECUTED if (fs_info->uino != NULL) 53efa: 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); 53efc: 2540 0062 movel %d0,%a2@(98) <== NOT EXECUTED if (fs_info->uino != NULL) 53f00: 67e0 beqs 53ee2 <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 53f02: 242a 006a movel %a2@(106),%d2 <== NOT EXECUTED 53f06: 2542 0066 movel %d2,%a2@(102) <== NOT EXECUTED 53f0a: 6000 ff5a braw 53e66 <== NOT EXECUTED =============================================================================== 00053d5a : 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)); 53d5a: 4280 clrl %d0 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53d5c: 4e56 ffdc linkw %fp,#-36 53d60: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%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)); 53d64: 4878 0001 pea 1 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53d68: 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; 53d6c: 246b 0034 moveal %a3@(52),%a2 int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 53d70: 242e 000c movel %fp@(12),%d2 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)); 53d74: 302a 0006 movew %a2@(6),%d0 ) { 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; 53d78: 2d42 fffc movel %d2,%fp@(-4) char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 53d7c: 2f00 movel %d0,%sp@- 53d7e: 4eb9 0004 6090 jsr 46090 if ( buf == NULL ) 53d84: 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)); 53d86: 2600 movel %d0,%d3 if ( buf == NULL ) 53d88: 6700 00aa beqw 53e34 rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 53d8c: 2002 movel %d2,%d0 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53d8e: 280e movel %fp,%d4 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); 53d90: 49f9 0005 3cd6 lea 53cd6 ,%a4 { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53d96: 5984 subql #4,%d4 53d98: 4bf9 0005 ade4 lea 5ade4 ,%a5 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) 53d9e: c0aa 000c andl %a2@(12),%d0 53da2: b0aa 0010 cmpl %a2@(16),%d0 53da6: 6434 bccs 53ddc <== NEVER TAKEN { ret = fat_cluster_write(mt_entry, cur_cln, buf); 53da8: 2f03 movel %d3,%sp@- 53daa: 2f02 movel %d2,%sp@- 53dac: 2f0b movel %a3,%sp@- 53dae: 4e94 jsr %a4@ if ( ret == -1 ) 53db0: 4fef 000c lea %sp@(12),%sp 53db4: 72ff moveq #-1,%d1 53db6: b280 cmpl %d0,%d1 53db8: 675c beqs 53e16 <== NEVER TAKEN { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 53dba: 2f04 movel %d4,%sp@- 53dbc: 2f2e fffc movel %fp@(-4),%sp@- 53dc0: 2f0b movel %a3,%sp@- 53dc2: 4e95 jsr %a5@ if ( rc != RC_OK ) 53dc4: 4fef 000c lea %sp@(12),%sp 53dc8: 4a80 tstl %d0 53dca: 662e bnes 53dfa <== NEVER TAKEN 53dcc: 242e fffc movel %fp@(-4),%d2 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) 53dd0: 2002 movel %d2,%d0 53dd2: c0aa 000c andl %a2@(12),%d0 53dd6: b0aa 0010 cmpl %a2@(16),%d0 53dda: 65cc bcss 53da8 <== NEVER TAKEN return rc; } } free(buf); return rc; 53ddc: 4280 clrl %d0 free(buf); return rc; } } free(buf); 53dde: 2f03 movel %d3,%sp@- 53de0: 2d40 fff8 movel %d0,%fp@(-8) 53de4: 4eb9 0004 680c jsr 4680c return rc; 53dea: 202e fff8 movel %fp@(-8),%d0 53dee: 588f addql #4,%sp } 53df0: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 53df6: 4e5e unlk %fp 53df8: 4e75 rts } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) { free(buf); 53dfa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53dfc: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53e00: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED return rc; 53e06: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53e0a: 588f addql #4,%sp <== NOT EXECUTED } } free(buf); return rc; } 53e0c: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53e12: 4e5e unlk %fp <== NOT EXECUTED 53e14: 4e75 rts <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); return -1; 53e16: 70ff moveq #-1,%d0 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) { free(buf); 53e18: 2f03 movel %d3,%sp@- <== NOT EXECUTED 53e1a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 53e1e: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED return -1; 53e24: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 53e28: 588f addql #4,%sp <== NOT EXECUTED } } free(buf); return rc; } 53e2a: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53e30: 4e5e unlk %fp <== NOT EXECUTED 53e32: 4e75 rts <== NOT EXECUTED uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); 53e34: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 53e3a: 7405 moveq #5,%d2 <== NOT EXECUTED 53e3c: 2040 moveal %d0,%a0 <== NOT EXECUTED 53e3e: 70ff moveq #-1,%d0 <== NOT EXECUTED 53e40: 2082 movel %d2,%a0@ <== NOT EXECUTED } } free(buf); return rc; } 53e42: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 53e48: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00054172 : * 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) { 54172: 4e56 ff60 linkw %fp,#-160 54176: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 5417a: 486e ffaa pea %fp@(-86) * 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) { 5417e: 266e 0008 moveal %fp@(8),%a3 ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 54182: 2f2b 0070 movel %a3@(112),%sp@- int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 54186: 246b 0034 moveal %a3@(52),%a2 char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 5418a: 42ae fffc clrl %fp@(-4) rc = stat(mt_entry->dev, &stat_buf); 5418e: 4eb9 0004 80f8 jsr 480f8 if (rc == -1) 54194: 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); 54196: 2400 movel %d0,%d2 if (rc == -1) 54198: 70ff moveq #-1,%d0 5419a: b082 cmpl %d2,%d0 5419c: 6700 041c beqw 545ba return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 541a0: 202e ffb6 movel %fp@(-74),%d0 541a4: 0280 0000 f000 andil #61440,%d0 541aa: 0c80 0000 6000 cmpil #24576,%d0 541b0: 6600 0658 bnew 5480a 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); 541b4: 2f2e ffc4 movel %fp@(-60),%sp@- 541b8: 2f2e ffc0 movel %fp@(-64),%sp@- 541bc: 4eb9 0004 55a2 jsr 455a2 if (vol->dd == NULL) 541c2: 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); 541c4: 2540 0052 movel %d0,%a2@(82) if (vol->dd == NULL) 541c8: 6700 0702 beqw 548cc rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 541cc: 202e ffc0 movel %fp@(-64),%d0 541d0: 222e ffc4 movel %fp@(-60),%d1 541d4: 2540 004a movel %d0,%a2@(74) 541d8: 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); 541dc: 486e fffc pea %fp@(-4) 541e0: 42a7 clrl %sp@- 541e2: 2f01 movel %d1,%sp@- 541e4: 2f00 movel %d0,%sp@- 541e6: 4eb9 0005 1cc4 jsr 51cc4 if (sc != RTEMS_SUCCESSFUL) 541ec: 4fef 0010 lea %sp@(16),%sp 541f0: 4a80 tstl %d0 541f2: 6600 065c bnew 54850 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 541f6: 226e fffc moveal %fp@(-4),%a1 541fa: 2069 001e moveal %a1@(30),%a0 541fe: 1228 000e moveb %a0@(14),%d1 54202: 1628 000f moveb %a0@(15),%d3 54206: 1028 0013 moveb %a0@(19),%d0 5420a: 1d41 ffa7 moveb %d1,%fp@(-89) 5420e: 1228 0014 moveb %a0@(20),%d1 54212: 1d43 ffa6 moveb %d3,%fp@(-90) 54216: 3a41 moveaw %d1,%a5 54218: 1228 0016 moveb %a0@(22),%d1 5421c: 1828 000b moveb %a0@(11),%d4 54220: 1d41 ffa5 moveb %d1,%fp@(-91) 54224: 1228 0017 moveb %a0@(23),%d1 54228: 1a28 000c moveb %a0@(12),%d5 5422c: 1d41 ffa4 moveb %d1,%fp@(-92) 54230: 1228 0020 moveb %a0@(32),%d1 54234: 1428 000d moveb %a0@(13),%d2 54238: 1d41 ff9c moveb %d1,%fp@(-100) 5423c: 1228 0021 moveb %a0@(33),%d1 54240: 1628 0010 moveb %a0@(16),%d3 54244: 1d41 ff9b moveb %d1,%fp@(-101) 54248: 1228 0022 moveb %a0@(34),%d1 5424c: 1c28 0011 moveb %a0@(17),%d6 54250: 1d41 ff9a moveb %d1,%fp@(-102) 54254: 1228 0023 moveb %a0@(35),%d1 54258: 1e28 0012 moveb %a0@(18),%d7 5425c: 1d41 ff99 moveb %d1,%fp@(-103) 54260: 1228 0024 moveb %a0@(36),%d1 54264: 3840 moveaw %d0,%a4 54266: 1d41 ffa2 moveb %d1,%fp@(-94) 5426a: 1228 0025 moveb %a0@(37),%d1 5426e: 1d41 ff9d moveb %d1,%fp@(-99) 54272: 1228 0026 moveb %a0@(38),%d1 54276: 1d41 ffa3 moveb %d1,%fp@(-93) 5427a: 1228 0027 moveb %a0@(39),%d1 5427e: 1d41 ffa1 moveb %d1,%fp@(-95) 54282: 1228 0028 moveb %a0@(40),%d1 54286: 1d41 ff95 moveb %d1,%fp@(-107) 5428a: 1228 002c moveb %a0@(44),%d1 5428e: 1d41 ff8b moveb %d1,%fp@(-117) 54292: 1228 002d moveb %a0@(45),%d1 54296: 1d41 ff8a moveb %d1,%fp@(-118) 5429a: 1228 002e moveb %a0@(46),%d1 5429e: 1d41 ff89 moveb %d1,%fp@(-119) 542a2: 1228 002f moveb %a0@(47),%d1 542a6: 1d41 ff8f moveb %d1,%fp@(-113) 542aa: 1228 0030 moveb %a0@(48),%d1 542ae: 1d41 ff91 moveb %d1,%fp@(-111) 542b2: 1228 0031 moveb %a0@(49),%d1 sc = rtems_bdbuf_release( block); 542b6: 2f09 movel %a1,%sp@- { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 542b8: 1d41 ff90 moveb %d1,%fp@(-112) sc = rtems_bdbuf_release( block); 542bc: 4eb9 0005 1f6c jsr 51f6c if (sc != RTEMS_SUCCESSFUL) 542c2: 588f addql #4,%sp 542c4: 4a80 tstl %d0 542c6: 6600 0588 bnew 54850 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); 542ca: 0285 0000 00ff andil #255,%d5 542d0: 0284 0000 00ff andil #255,%d4 542d6: e18d lsll #8,%d5 542d8: 8a84 orl %d4,%d5 542da: 3485 movew %d5,%a2@ if ( (vol->bps != 512) && 542dc: 0c85 0000 0200 cmpil #512,%d5 542e2: 6700 04d8 beqw 547bc 542e6: 0c85 0000 0400 cmpil #1024,%d5 <== NOT EXECUTED 542ec: 6712 beqs 54300 <== NOT EXECUTED (vol->bps != 1024) && 542ee: 0c85 0000 0800 cmpil #2048,%d5 <== NOT EXECUTED 542f4: 670a beqs 54300 <== NOT EXECUTED (vol->bps != 2048) && 542f6: 0c85 0000 1000 cmpil #4096,%d5 <== NOT EXECUTED 542fc: 6600 052c bnew 5482a <== 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; 54300: 7209 moveq #9,%d1 <== NOT EXECUTED 54302: 2005 movel %d5,%d0 <== NOT EXECUTED 54304: e2a8 lsrl %d1,%d0 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 54306: e280 asrl #1,%d0 <== 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; 54308: 7201 moveq #1,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 5430a: 2801 movel %d1,%d4 <== NOT EXECUTED 5430c: 5284 addql #1,%d4 <== 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; 5430e: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54312: 660e bnes 54322 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 54314: e280 asrl #1,%d0 <== 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; 54316: 1204 moveb %d4,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 54318: 2801 movel %d1,%d4 <== NOT EXECUTED 5431a: 5284 addql #1,%d4 <== 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; 5431c: 0800 0000 btst #0,%d0 <== NOT EXECUTED 54320: 67f2 beqs 54314 <== NOT EXECUTED 54322: 1541 0003 moveb %d1,%a2@(3) <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 54326: 4201 clrb %d1 <== NOT EXECUTED 54328: 1541 0002 moveb %d1,%a2@(2) <== NOT EXECUTED 5432c: 0805 0000 btst #0,%d5 <== NOT EXECUTED 54330: 6622 bnes 54354 <== 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; 54332: 2005 movel %d5,%d0 <== NOT EXECUTED 54334: 7201 moveq #1,%d1 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); 54336: 2801 movel %d1,%d4 54338: 5284 addql #1,%d4 5433a: e280 asrl #1,%d0 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; 5433c: 0800 0000 btst #0,%d0 54340: 660e bnes 54350 <== NEVER TAKEN i >>= 1, vol->sec_log2++); 54342: e280 asrl #1,%d0 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; 54344: 1204 moveb %d4,%d1 i >>= 1, vol->sec_log2++); 54346: 2801 movel %d1,%d4 54348: 5284 addql #1,%d4 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; 5434a: 0800 0000 btst #0,%d0 5434e: 67f2 beqs 54342 54350: 1541 0002 moveb %d1,%a2@(2) i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 54354: 1542 0004 moveb %d2,%a2@(4) /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 54358: 6700 051c beqw 54876 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 5435c: 4200 clrb %d0 5435e: 0282 0000 00ff andil #255,%d2 54364: 1540 0005 moveb %d0,%a2@(5) 54368: 2002 movel %d2,%d0 5436a: 0802 0000 btst #0,%d2 5436e: 6600 04b4 bnew 54824 i >>= 1, vol->spc_log2++); 54372: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54374: 7201 moveq #1,%d1 i >>= 1, vol->spc_log2++); 54376: 2801 movel %d1,%d4 54378: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 5437a: 0800 0000 btst #0,%d0 5437e: 660e bnes 5438e <== ALWAYS TAKEN i >>= 1, vol->spc_log2++); 54380: e280 asrl #1,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54382: 1204 moveb %d4,%d1 <== NOT EXECUTED i >>= 1, vol->spc_log2++); 54384: 2801 movel %d1,%d4 <== NOT EXECUTED 54386: 5284 addql #1,%d4 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54388: 0800 0000 btst #0,%d0 <== NOT EXECUTED 5438c: 67f2 beqs 54380 <== NOT EXECUTED 5438e: 1541 0005 moveb %d1,%a2@(5) 54392: 0281 0000 00ff andil #255,%d1 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) 54398: 2805 movel %d5,%d4 5439a: 4280 clrl %d0 5439c: e3ac lsll %d1,%d4 5439e: 3004 movew %d4,%d0 543a0: 3544 0006 movew %d4,%a2@(6) 543a4: 0c80 0000 8000 cmpil #32768,%d0 543aa: 6200 04ca bhiw 54876 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 543ae: 4201 clrb %d1 543b0: 1541 0008 moveb %d1,%a2@(8) 543b4: 0800 0000 btst #0,%d0 543b8: 6620 bnes 543da <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 543ba: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 543bc: 7201 moveq #1,%d1 i >>= 1, vol->bpc_log2++); 543be: 2801 movel %d1,%d4 543c0: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 543c2: 0800 0000 btst #0,%d0 543c6: 660e bnes 543d6 <== NEVER TAKEN i >>= 1, vol->bpc_log2++); 543c8: e280 asrl #1,%d0 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 543ca: 1204 moveb %d4,%d1 i >>= 1, vol->bpc_log2++); 543cc: 2801 movel %d1,%d4 543ce: 5284 addql #1,%d4 { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 543d0: 0800 0000 btst #0,%d0 543d4: 67f2 beqs 543c8 543d6: 1541 0008 moveb %d1,%a2@(8) i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 543da: 4281 clrl %d1 543dc: 122e ffa6 moveb %fp@(-90),%d1 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 543e0: 4284 clrl %d4 543e2: 182e ffa4 moveb %fp@(-92),%d4 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); 543e6: 0287 0000 00ff andil #255,%d7 543ec: 0286 0000 00ff andil #255,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 543f2: e189 lsll #8,%d1 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 543f4: e18f lsll #8,%d7 vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 543f6: e18c lsll #8,%d4 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); 543f8: 8e86 orl %d6,%d7 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); 543fa: 4286 clrl %d6 543fc: 1c2e ffa7 moveb %fp@(-89),%d6 vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 54400: 2007 movel %d7,%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); 54402: 2246 moveal %d6,%a1 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)) / 54404: eb88 lsll #5,%d0 } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 54406: 1543 0009 moveb %d3,%a2@(9) vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 5440a: 3547 001e movew %d7,%a2@(30) /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 5440e: 2040 moveal %d0,%a0 54410: 41f0 58ff lea %a0@(ffffffff,%d5:l),%a0 54414: 2008 movel %a0,%d0 54416: 4c45 0800 remsl %d5,%d0,%d0 vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 5441a: 4285 clrl %d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5441c: 4286 clrl %d6 5441e: 1c2e ffa5 moveb %fp@(-91),%d6 /* 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; 54422: 1a2a 0002 moveb %a2@(2),%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 54426: 2046 moveal %d6,%a0 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 54428: 2c09 movel %a1,%d6 5442a: 8286 orl %d6,%d1 /* 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; 5442c: 2c00 movel %d0,%d6 5442e: ebae lsll %d5,%d6 for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 54430: 3541 0014 movew %d1,%a2@(20) 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)) / 54434: 2540 0020 movel %d0,%a2@(32) vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 54438: 2a06 movel %d6,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 5443a: 2c08 movel %a0,%d6 5443c: 8886 orl %d6,%d4 /* 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; 5443e: 2545 0024 movel %d5,%a2@(36) if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 54442: 4a44 tstw %d4 54444: 6700 0348 beqw 5478e vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 54448: 0284 0000 ffff andil #65535,%d4 5444e: 2544 0016 movel %d4,%a2@(22) else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 54452: 0283 0000 00ff andil #255,%d3 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) 54458: 3a0d movew %a5,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 5445a: 4c04 3800 mulsl %d4,%d3 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) 5445e: 4284 clrl %d4 54460: 1805 moveb %d5,%d4 54462: 4285 clrl %d5 54464: 3c0c movew %a4,%d6 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 + 54466: 0281 0000 ffff andil #65535,%d1 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5446c: e18c lsll #8,%d4 5446e: 1a06 moveb %d6,%d5 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 54470: d283 addl %d3,%d1 54472: d081 addl %d1,%d0 vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 54474: 8885 orl %d5,%d4 if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 54476: 2540 002c movel %d0,%a2@(44) vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 5447a: 2541 001a movel %d1,%a2@(26) if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 5447e: 4a44 tstw %d4 54480: 6700 0144 beqw 545c6 vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 54484: 0284 0000 ffff andil #65535,%d4 5448a: 2544 0028 movel %d4,%a2@(40) else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; 5448e: 9880 subl %d0,%d4 vol->data_cls = data_secs / vol->spc; 54490: 4c42 4004 remul %d2,%d4,%d4 54494: 2544 0030 movel %d4,%a2@(48) /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 54498: 0c84 0000 0ff4 cmpil #4084,%d4 5449e: 6200 0164 bhiw 54604 { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 544a2: 223c 0000 0ff8 movel #4088,%d1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 544a8: 307c 0fff moveaw #4095,%a0 vol->data_cls = data_secs / vol->spc; /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 544ac: 7001 moveq #1,%d0 vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; 544ae: 2541 0010 movel %d1,%a2@(16) } } else { vol->rdir_cl = 0; vol->mirror = 0; 544b2: 4201 clrb %d1 /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; vol->mask = FAT_FAT12_MASK; 544b4: 2548 000c movel %a0,%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; 544b8: 1540 000a moveb %d0,%a2@(10) else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 544bc: 70ff moveq #-1,%d0 } } else { vol->rdir_cl = 0; vol->mirror = 0; 544be: 1541 0042 moveb %d1,%a2@(66) vol->afat = 0; 544c2: 1541 0048 moveb %d1,%a2@(72) } } } else { vol->rdir_cl = 0; 544c6: 42aa 0034 clrl %a2@(52) vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 544ca: 2540 003a movel %d0,%a2@(58) vol->next_cl = 0xFFFFFFFF; 544ce: 2540 003e movel %d0,%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); 544d2: 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)); 544d6: 47f9 0004 6090 lea 46090 ,%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); 544dc: 4eb9 0005 396c jsr 5396c vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 544e2: 4280 clrl %d0 544e4: 102a 0048 moveb %a2@(72),%d0 544e8: 41ea 0016 lea %a2@(22),%a0 544ec: 4c10 0800 mulsl %a0@,%d0 544f0: 4281 clrl %d1 544f2: 322a 0014 movew %a2@(20),%d1 544f6: d081 addl %d1,%d0 544f8: 2540 0044 movel %d0,%a2@(68) /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 544fc: 4878 000c pea c 54500: 4878 0002 pea 2 54504: 4e93 jsr %a3@ if ( fs_info->vhash == NULL ) 54506: 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)); 5450a: 2040 moveal %d0,%a0 5450c: 2540 005a movel %d0,%a2@(90) if ( fs_info->vhash == NULL ) 54510: 6700 0472 beqw 54984 } 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)); 54514: 4878 000c pea c RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 54518: 2240 moveal %d0,%a1 5451a: 5889 addql #4,%a1 5451c: 2089 movel %a1,%a0@ 5451e: 43e8 0010 lea %a0@(16),%a1 54522: 2149 000c movel %a1,%a0@(12) 54526: 4878 0002 pea 2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5452a: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5452e: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 54532: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 54536: 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; 5453a: 42a8 0010 clrl %a0@(16) 5453e: 4e93 jsr %a3@ if ( fs_info->rhash == NULL ) 54540: 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)); 54542: 2040 moveal %d0,%a0 54544: 2540 005e movel %d0,%a2@(94) if ( fs_info->rhash == NULL ) 54548: 6700 0460 beqw 549aa 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 ); 5454c: 2240 moveal %d0,%a1 5454e: 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; 54550: 4281 clrl %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; 54552: 243c 0000 0100 movel #256,%d2 54558: 2089 movel %a1,%a0@ 5455a: 43e8 0010 lea %a0@(16),%a1 fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 5455e: 202a 0028 movel %a2@(40),%d0 54562: 2149 000c movel %a1,%a0@(12) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 54566: 43e8 000c lea %a0@(12),%a1 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5456a: 42a8 0004 clrl %a0@(4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5456e: 2149 0014 movel %a1,%a0@(20) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 54572: 2148 0008 movel %a0,%a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 54576: 42a8 0010 clrl %a0@(16) 5457a: 122a 0003 moveb %a2@(3),%d1 5457e: e3a8 lsll %d1,%d0 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; 54580: 2542 006a movel %d2,%a2@(106) fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 54584: e988 lsll #4,%d0 fs_info->index = 0; 54586: 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; 5458a: 2540 006e movel %d0,%a2@(110) fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 5458e: 4878 0001 pea 1 54592: 4878 0100 pea 100 54596: 4e93 jsr %a3@ if ( fs_info->uino == NULL ) 54598: 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)); 5459a: 2540 0062 movel %d0,%a2@(98) if ( fs_info->uino == NULL ) 5459e: 6700 0346 beqw 548e6 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)); 545a2: 4878 0001 pea 1 545a6: 4280 clrl %d0 545a8: 3012 movew %a2@,%d0 545aa: 2f00 movel %d0,%sp@- 545ac: 4e93 jsr %a3@ if (fs_info->sec_buf == NULL) 545ae: 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)); 545b0: 2540 007c movel %d0,%a2@(124) if (fs_info->sec_buf == NULL) 545b4: 6700 038e beqw 54944 free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; 545b8: 4282 clrl %d2 } 545ba: 2002 movel %d2,%d0 545bc: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 545c2: 4e5e unlk %fp 545c4: 4e75 rts vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 545c6: 4284 clrl %d4 <== NOT EXECUTED 545c8: 4281 clrl %d1 <== NOT EXECUTED 545ca: 182e ff9b moveb %fp@(-101),%d4 <== NOT EXECUTED 545ce: 122e ff9a moveb %fp@(-102),%d1 <== NOT EXECUTED 545d2: 4283 clrl %d3 <== NOT EXECUTED 545d4: 162e ff9c moveb %fp@(-100),%d3 <== NOT EXECUTED 545d8: 7e18 moveq #24,%d7 <== NOT EXECUTED 545da: 4841 swap %d1 <== NOT EXECUTED 545dc: 4241 clrw %d1 <== NOT EXECUTED 545de: e18c lsll #8,%d4 <== NOT EXECUTED 545e0: 8881 orl %d1,%d4 <== NOT EXECUTED 545e2: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED 545e6: 8883 orl %d3,%d4 <== NOT EXECUTED 545e8: efa9 lsll %d7,%d1 <== NOT EXECUTED 545ea: 8881 orl %d1,%d4 <== NOT EXECUTED 545ec: 2544 0028 movel %d4,%a2@(40) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; 545f0: 9880 subl %d0,%d4 <== NOT EXECUTED vol->data_cls = data_secs / vol->spc; 545f2: 4c42 4004 remul %d2,%d4,%d4 <== NOT EXECUTED 545f6: 2544 0030 movel %d4,%a2@(48) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 545fa: 0c84 0000 0ff4 cmpil #4084,%d4 <== NOT EXECUTED 54600: 6300 fea0 blsw 544a2 <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 54604: 0c84 0000 fff4 cmpil #65524,%d4 <== NOT EXECUTED 5460a: 6300 01be blsw 547ca <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5460e: 4280 clrl %d0 <== NOT EXECUTED 54610: 4281 clrl %d1 <== NOT EXECUTED 54612: 102e ff8a moveb %fp@(-118),%d0 <== NOT EXECUTED 54616: 122e ff89 moveb %fp@(-119),%d1 <== NOT EXECUTED 5461a: 4283 clrl %d3 <== NOT EXECUTED 5461c: 162e ff8b moveb %fp@(-117),%d3 <== NOT EXECUTED 54620: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54622: 7c80 moveq #-128,%d6 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; 54624: 207c 0fff ffff moveal #268435455,%a0 <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 5462a: 227c 0fff fff8 moveal #268435448,%a1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54630: 4841 swap %d1 <== NOT EXECUTED 54632: 4241 clrw %d1 <== NOT EXECUTED 54634: e188 lsll #8,%d0 <== NOT EXECUTED 54636: 142e ff8f moveb %fp@(-113),%d2 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 5463a: 7e04 moveq #4,%d7 <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 5463c: 2548 000c movel %a0,%a2@(12) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54640: 8081 orl %d1,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54642: 122e ff95 moveb %fp@(-107),%d1 <== NOT EXECUTED } else { vol->type = FAT_FAT32; vol->mask = FAT_FAT32_MASK; vol->eoc_val = FAT_FAT32_EOC; 54646: 2549 0010 movel %a1,%a2@(16) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5464a: ebaa lsll %d5,%d2 <== NOT EXECUTED 5464c: 8083 orl %d3,%d0 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 5464e: c286 andl %d6,%d1 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 54650: 8082 orl %d2,%d0 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; } else { vol->type = FAT_FAT32; 54652: 1547 000a moveb %d7,%a2@(10) <== NOT EXECUTED if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 54656: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 5465a: 2540 0034 movel %d0,%a2@(52) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) 5465e: 4a01 tstb %d1 <== NOT EXECUTED 54660: 6700 019e beqw 54800 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 54664: 740f moveq #15,%d2 <== NOT EXECUTED 54666: 102e ff95 moveb %fp@(-107),%d0 <== NOT EXECUTED 5466a: c082 andl %d2,%d0 <== NOT EXECUTED 5466c: 1540 0048 moveb %d0,%a2@(72) <== NOT EXECUTED else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 54670: 4280 clrl %d0 <== NOT EXECUTED 54672: 102e ff90 moveb %fp@(-112),%d0 <== NOT EXECUTED 54676: 4281 clrl %d1 <== NOT EXECUTED 54678: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED 5467c: e188 lsll #8,%d0 <== NOT EXECUTED 5467e: 8081 orl %d1,%d0 <== NOT EXECUTED 54680: 3540 0038 movew %d0,%a2@(56) <== NOT EXECUTED if( vol->info_sec == 0 ) 54684: 6700 01f0 beqw 54876 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); 54688: 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, 5468c: 4bf9 0005 3ace lea 53ace <_fat_block_read>,%a5 <== NOT EXECUTED 54692: 2f0c movel %a4,%sp@- <== NOT EXECUTED 54694: 4878 0004 pea 4 <== NOT EXECUTED 54698: 42a7 clrl %sp@- <== NOT EXECUTED 5469a: 3f00 movew %d0,%sp@- <== NOT EXECUTED 5469c: 4267 clrw %sp@- <== NOT EXECUTED 5469e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 546a0: 4e95 jsr %a5@ <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 546a2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 546a6: 4a80 tstl %d0 <== NOT EXECUTED 546a8: 6d00 0330 bltw 549da <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 546ac: 4280 clrl %d0 <== NOT EXECUTED 546ae: 4281 clrl %d1 <== NOT EXECUTED 546b0: 102c 0001 moveb %a4@(1),%d0 <== NOT EXECUTED 546b4: 122c 0002 moveb %a4@(2),%d1 <== NOT EXECUTED 546b8: 4282 clrl %d2 <== NOT EXECUTED 546ba: 1414 moveb %a4@,%d2 <== NOT EXECUTED 546bc: 4841 swap %d1 <== NOT EXECUTED 546be: 4241 clrw %d1 <== NOT EXECUTED 546c0: e188 lsll #8,%d0 <== NOT EXECUTED 546c2: 8081 orl %d1,%d0 <== NOT EXECUTED 546c4: 4281 clrl %d1 <== NOT EXECUTED 546c6: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED 546ca: 8082 orl %d2,%d0 <== NOT EXECUTED 546cc: 7418 moveq #24,%d2 <== NOT EXECUTED 546ce: e5a9 lsll %d2,%d1 <== NOT EXECUTED 546d0: 8081 orl %d1,%d0 <== NOT EXECUTED 546d2: 0c80 4161 5252 cmpil #1096897106,%d0 <== NOT EXECUTED 546d8: 6600 01c2 bnew 5489c <== 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 , FAT_FSI_INFO, 546dc: 2f0c movel %a4,%sp@- <== NOT EXECUTED 546de: 4878 000c pea c <== NOT EXECUTED 546e2: 4280 clrl %d0 <== NOT EXECUTED 546e4: 4878 01e4 pea 1e4 <== NOT EXECUTED 546e8: 302a 0038 movew %a2@(56),%d0 <== NOT EXECUTED 546ec: 2f00 movel %d0,%sp@- <== NOT EXECUTED 546ee: 2f0b movel %a3,%sp@- <== NOT EXECUTED 546f0: 4e95 jsr %a5@ <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 546f2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 546f6: 4a80 tstl %d0 <== NOT EXECUTED 546f8: 6d00 0226 bltw 54920 <== 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); 546fc: 4281 clrl %d1 <== NOT EXECUTED 546fe: 4283 clrl %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54700: 4280 clrl %d0 <== NOT EXECUTED 54702: 4282 clrl %d2 <== 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); 54704: 122c 0005 moveb %a4@(5),%d1 <== NOT EXECUTED 54708: 162c 0006 moveb %a4@(6),%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5470c: 102c 0009 moveb %a4@(9),%d0 <== NOT EXECUTED 54710: 142c 000a moveb %a4@(10),%d2 <== 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); 54714: 4285 clrl %d5 <== NOT EXECUTED 54716: 1a2c 0004 moveb %a4@(4),%d5 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5471a: 4284 clrl %d4 <== NOT EXECUTED 5471c: 182c 0008 moveb %a4@(8),%d4 <== 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); 54720: 4843 swap %d3 <== NOT EXECUTED 54722: 4243 clrw %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54724: 4842 swap %d2 <== NOT EXECUTED 54726: 4242 clrw %d2 <== 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); 54728: e189 lsll #8,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5472a: e188 lsll #8,%d0 <== 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); 5472c: 8283 orl %d3,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5472e: 8082 orl %d2,%d0 <== 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); 54730: 4283 clrl %d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54732: 4282 clrl %d2 <== 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); 54734: 162c 0007 moveb %a4@(7),%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54738: 142c 000b moveb %a4@(11),%d2 <== 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); 5473c: 8285 orl %d5,%d1 <== NOT EXECUTED 5473e: 7a18 moveq #24,%d5 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54740: 8084 orl %d4,%d0 <== NOT EXECUTED 54742: ebaa lsll %d5,%d2 <== 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); 54744: ebab lsll %d5,%d3 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 54746: 8082 orl %d2,%d0 <== 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); 54748: 8283 orl %d3,%d1 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 5474a: 2540 003e movel %d0,%a2@(62) <== 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); 5474e: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 54752: 4878 ffff pea ffffffff <== NOT EXECUTED 54756: 4878 ffff pea ffffffff <== NOT EXECUTED 5475a: 2f0b movel %a3,%sp@- <== NOT EXECUTED 5475c: 4eb9 0005 3f60 jsr 53f60 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 54762: 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, 54766: 2400 movel %d0,%d2 <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 54768: 6700 fd68 beqw 544d2 <== 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); 5476c: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED 54770: 4eb9 0005 396c jsr 5396c <== 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); 54776: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 5477a: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return rc; 54780: 508f addql #8,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54782: 2002 movel %d2,%d0 <== NOT EXECUTED 54784: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5478a: 4e5e unlk %fp <== NOT EXECUTED 5478c: 4e75 rts <== NOT EXECUTED vol->rdir_size = vol->rdir_secs << vol->sec_log2; if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 5478e: 4284 clrl %d4 <== NOT EXECUTED 54790: 4285 clrl %d5 <== NOT EXECUTED 54792: 182e ff9d moveb %fp@(-99),%d4 <== NOT EXECUTED 54796: 1a2e ffa3 moveb %fp@(-93),%d5 <== NOT EXECUTED 5479a: 4286 clrl %d6 <== NOT EXECUTED 5479c: 1c2e ffa2 moveb %fp@(-94),%d6 <== NOT EXECUTED 547a0: 7e18 moveq #24,%d7 <== NOT EXECUTED 547a2: 4845 swap %d5 <== NOT EXECUTED 547a4: 4245 clrw %d5 <== NOT EXECUTED 547a6: e18c lsll #8,%d4 <== NOT EXECUTED 547a8: 8885 orl %d5,%d4 <== NOT EXECUTED 547aa: 1a2e ffa1 moveb %fp@(-95),%d5 <== NOT EXECUTED 547ae: 8886 orl %d6,%d4 <== NOT EXECUTED 547b0: efad lsll %d7,%d5 <== NOT EXECUTED 547b2: 8885 orl %d5,%d4 <== NOT EXECUTED 547b4: 2544 0016 movel %d4,%a2@(22) <== NOT EXECUTED 547b8: 6000 fc98 braw 54452 <== 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; 547bc: 4200 clrb %d0 547be: 7201 moveq #1,%d1 547c0: 1540 0003 moveb %d0,%a2@(3) 547c4: 2005 movel %d5,%d0 547c6: 6000 fb6e braw 54336 else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 547ca: 70ff moveq #-1,%d0 <== NOT EXECUTED else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; vol->mask = FAT_FAT16_MASK; 547cc: 243c 0000 ffff movel #65535,%d2 <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 547d2: 283c 0000 fff8 movel #65528,%d4 <== NOT EXECUTED } } else { vol->rdir_cl = 0; vol->mirror = 0; 547d8: 4201 clrb %d1 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 547da: 7602 moveq #2,%d3 <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 547dc: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) { vol->type = FAT_FAT16; 547e0: 1543 000a moveb %d3,%a2@(10) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; vol->eoc_val = FAT_FAT16_EOC; 547e4: 2544 0010 movel %d4,%a2@(16) <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 547e8: 42aa 0034 clrl %a2@(52) <== NOT EXECUTED vol->mirror = 0; 547ec: 1541 0042 moveb %d1,%a2@(66) <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 547f0: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 547f4: 1541 0048 moveb %d1,%a2@(72) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 547f8: 2540 003e movel %d0,%a2@(62) <== NOT EXECUTED 547fc: 6000 fcd4 braw 544d2 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; 54800: 4203 clrb %d3 <== NOT EXECUTED 54802: 1543 0048 moveb %d3,%a2@(72) <== NOT EXECUTED 54806: 6000 fe68 braw 54670 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 5480a: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54810: 74ff moveq #-1,%d2 <== NOT EXECUTED 54812: 7c19 moveq #25,%d6 <== NOT EXECUTED 54814: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54816: 2002 movel %d2,%d0 <== NOT EXECUTED if (rc == -1) return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); 54818: 2086 movel %d6,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5481a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54820: 4e5e unlk %fp <== NOT EXECUTED 54822: 4e75 rts <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 54824: 4281 clrl %d1 <== NOT EXECUTED 54826: 6000 fb70 braw 54398 <== NOT EXECUTED if ( (vol->bps != 512) && (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); 5482a: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5482e: 74ff moveq #-1,%d2 <== NOT EXECUTED 54830: 7616 moveq #22,%d3 <== NOT EXECUTED if ( (vol->bps != 512) && (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); 54832: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 54838: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5483e: 588f addql #4,%sp <== NOT EXECUTED 54840: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54842: 2002 movel %d2,%d0 <== NOT EXECUTED (vol->bps != 1024) && (vol->bps != 2048) && (vol->bps != 4096)) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 54844: 2283 movel %d3,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54846: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5484c: 4e5e unlk %fp <== NOT EXECUTED 5484e: 4e75 rts <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 54850: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 54854: 74ff moveq #-1,%d2 <== NOT EXECUTED 54856: 7805 moveq #5,%d4 <== NOT EXECUTED memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); 54858: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 5485e: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54864: 588f addql #4,%sp <== NOT EXECUTED 54866: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54868: 2002 movel %d2,%d0 <== NOT EXECUTED sc = rtems_bdbuf_release( block); if (sc != RTEMS_SUCCESSFUL) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); 5486a: 2084 movel %d4,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5486c: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54872: 4e5e unlk %fp <== NOT EXECUTED 54874: 4e75 rts <== 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); 54876: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 5487a: 74ff moveq #-1,%d2 <== 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); 5487c: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 54882: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54888: 588f addql #4,%sp <== NOT EXECUTED 5488a: 7216 moveq #22,%d1 <== NOT EXECUTED 5488c: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5488e: 2002 movel %d2,%d0 <== NOT EXECUTED 54890: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); if( vol->info_sec == 0 ) { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); 54896: 2081 movel %d1,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54898: 4e5e unlk %fp <== NOT EXECUTED 5489a: 4e75 rts <== 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); 5489c: 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 ); 548a0: 74ff moveq #-1,%d2 <== 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); 548a2: 4eb9 0005 396c jsr 5396c <== 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); 548a8: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 548ac: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 548b2: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 548b8: 508f addql #8,%sp <== NOT EXECUTED 548ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 548bc: 7016 moveq #22,%d0 <== NOT EXECUTED 548be: 2080 movel %d0,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 548c0: 2002 movel %d2,%d0 <== NOT EXECUTED 548c2: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 548c8: 4e5e unlk %fp <== NOT EXECUTED 548ca: 4e75 rts <== NOT EXECUTED 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); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 548cc: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 548d2: 74ff moveq #-1,%d2 <== NOT EXECUTED 548d4: 7a05 moveq #5,%d5 <== NOT EXECUTED 548d6: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 548d8: 2002 movel %d2,%d0 <== NOT EXECUTED 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); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); 548da: 2285 movel %d5,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 548dc: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 548e2: 4e5e unlk %fp <== NOT EXECUTED 548e4: 4e75 rts <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 548e6: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 548ea: 47f9 0004 680c lea 4680c ,%a3 <== NOT EXECUTED free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 548f0: 74ff moveq #-1,%d2 <== NOT EXECUTED 548f2: 7a0c moveq #12,%d5 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 548f4: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 548fa: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 548fe: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 54900: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54904: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54906: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5490c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54910: 2240 moveal %d0,%a1 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54912: 2002 movel %d2,%d0 <== NOT EXECUTED if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 54914: 2285 movel %d5,%a1@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54916: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5491c: 4e5e unlk %fp <== NOT EXECUTED 5491e: 4e75 rts <== 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); 54920: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); return -1; 54924: 74ff moveq #-1,%d2 <== 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); 54926: 4eb9 0005 396c jsr 5396c <== 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); 5492c: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED 54930: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return -1; 54936: 508f addql #8,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 54938: 2002 movel %d2,%d0 <== NOT EXECUTED 5493a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54940: 4e5e unlk %fp <== NOT EXECUTED 54942: 4e75 rts <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 54944: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); 54948: 47f9 0004 680c lea 4680c ,%a3 <== NOT EXECUTED free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 5494e: 74ff moveq #-1,%d2 <== NOT EXECUTED 54950: 780c moveq #12,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); if (fs_info->sec_buf == NULL) { rtems_disk_release(vol->dd); 54952: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 54958: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 5495c: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->rhash); 5495e: 2f2a 005e movel %a2@(94),%sp@- <== NOT EXECUTED 54962: 4e93 jsr %a3@ <== NOT EXECUTED free(fs_info->uino); 54964: 2f2a 0062 movel %a2@(98),%sp@- <== NOT EXECUTED 54968: 4e93 jsr %a3@ <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 5496a: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54970: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 54974: 2040 moveal %d0,%a0 <== NOT EXECUTED } return RC_OK; } 54976: 2002 movel %d2,%d0 <== NOT EXECUTED { rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); 54978: 2084 movel %d4,%a0@ <== NOT EXECUTED } return RC_OK; } 5497a: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 54980: 4e5e unlk %fp <== NOT EXECUTED 54982: 4e75 rts <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 54984: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54988: 74ff moveq #-1,%d2 <== NOT EXECUTED 5498a: 7e0c moveq #12,%d7 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 5498c: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 54992: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54998: 588f addql #4,%sp <== NOT EXECUTED 5499a: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 5499c: 2002 movel %d2,%d0 <== 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); rtems_set_errno_and_return_minus_one( ENOMEM ); 5499e: 2087 movel %d7,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549a0: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 549a6: 4e5e unlk %fp <== NOT EXECUTED 549a8: 4e75 rts <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 549aa: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 549ae: 74ff moveq #-1,%d2 <== NOT EXECUTED 549b0: 7c0c moveq #12,%d6 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 549b2: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED free(fs_info->vhash); 549b8: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED 549bc: 4eb9 0004 680c jsr 4680c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 549c2: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 549c8: 508f addql #8,%sp <== NOT EXECUTED 549ca: 2040 moveal %d0,%a0 <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549cc: 2002 movel %d2,%d0 <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); 549ce: 2086 movel %d6,%a0@ <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549d0: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 549d6: 4e5e unlk %fp <== NOT EXECUTED 549d8: 4e75 rts <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 549da: 2f2a 0052 movel %a2@(82),%sp@- <== NOT EXECUTED return -1; 549de: 74ff moveq #-1,%d2 <== NOT EXECUTED { ret = _fat_block_read(mt_entry, vol->info_sec , 0, FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) { rtems_disk_release(vol->dd); 549e0: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED return -1; 549e6: 588f addql #4,%sp <== NOT EXECUTED free(fs_info->uino); rtems_set_errno_and_return_minus_one( ENOMEM ); } return RC_OK; } 549e8: 2002 movel %d2,%d0 <== NOT EXECUTED 549ea: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 <== NOT EXECUTED 549f0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005b302 : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5b302: 4e56 ffd0 linkw %fp,#-48 5b306: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5b30a: 246e 0008 moveal %fp@(8),%a2 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5b30e: 206a 0034 moveal %a2@(52),%a0 uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 5b312: 266e 0014 moveal %fp@(20),%a3 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; 5b316: 2a28 0030 movel %a0@(48),%d5 uint32_t *cls_added, uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5b31a: 2d48 fff8 movel %a0,%fp@(-8) uint32_t cl4find = 2; uint32_t next_cln = 0; 5b31e: 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; 5b322: 4293 clrl %a3@ if (count == 0) 5b324: 4aae 0010 tstl %fp@(16) 5b328: 6700 0112 beqw 5b43c return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 5b32c: 2428 003e movel %a0@(62),%d2 5b330: 70ff moveq #-1,%d0 5b332: b082 cmpl %d2,%d0 5b334: 6700 0114 beqw 5b44a 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; 5b338: 5485 addql #2,%d5 /* * 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) 5b33a: 7202 moveq #2,%d1 5b33c: b285 cmpl %d5,%d1 5b33e: 6400 0192 bccw 5b4d2 5b342: 2c0e movel %fp,%d6 5b344: 7602 moveq #2,%d3 5b346: 4287 clrl %d7 5b348: 5986 subql #4,%d6 5b34a: 49f9 0005 ade4 lea 5ade4 ,%a4 } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b350: 4bf9 0005 af96 lea 5af96 ,%a5 * 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); 5b356: 2f06 movel %d6,%sp@- 5b358: 2f02 movel %d2,%sp@- 5b35a: 2f0a movel %a2,%sp@- 5b35c: 4e94 jsr %a4@ if ( rc != RC_OK ) 5b35e: 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); 5b362: 2800 movel %d0,%d4 if ( rc != RC_OK ) 5b364: 6600 00ea bnew 5b450 if (*cls_added != 0) fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 5b368: 4aae fffc tstl %fp@(-4) 5b36c: 662e bnes 5b39c /* * 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) 5b36e: 4a93 tstl %a3@ 5b370: 6670 bnes 5b3e2 <== NEVER TAKEN { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b372: 4878 ffff pea ffffffff * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 5b376: 206e 000c moveal %fp@(12),%a0 rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b37a: 2f02 movel %d2,%sp@- * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; 5b37c: 2082 movel %d2,%a0@ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b37e: 2f0a movel %a2,%sp@- 5b380: 4e95 jsr %a5@ if ( rc != RC_OK ) 5b382: 4fef 000c lea %sp@(12),%sp 5b386: 4a80 tstl %d0 5b388: 6600 011c bnew 5b4a6 return rc; } } save_cln = cl4find; (*cls_added)++; 5b38c: 2013 movel %a3@,%d0 5b38e: 5280 addql #1,%d0 5b390: 2680 movel %d0,%a3@ /* have we satisfied request ? */ if (*cls_added == count) 5b392: b0ae 0010 cmpl %fp@(16),%d0 5b396: 6700 00d8 beqw 5b470 5b39a: 2e02 movel %d2,%d7 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 5b39c: 5283 addql #1,%d3 cl4find++; 5b39e: 5282 addql #1,%d2 if (cl4find >= data_cls_val) 5b3a0: b485 cmpl %d5,%d2 5b3a2: 6502 bcss 5b3a6 <== ALWAYS TAKEN cl4find = 2; 5b3a4: 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) 5b3a6: b685 cmpl %d5,%d3 5b3a8: 65ac bcss 5b356 <== ALWAYS TAKEN if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 5b3aa: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 5b3ae: 72ff moveq #-1,%d1 <== NOT EXECUTED 5b3b0: 2028 003a movel %a0@(58),%d0 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 5b3b4: 2147 003e movel %d7,%a0@(62) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 5b3b8: b280 cmpl %d0,%d1 <== NOT EXECUTED 5b3ba: 6706 beqs 5b3c2 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 5b3bc: 9093 subl %a3@,%d0 <== NOT EXECUTED 5b3be: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED *last_cl = save_cln; 5b3c2: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED fat_buf_release(fs_info); return RC_OK; 5b3c6: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; 5b3c8: 2087 movel %d7,%a0@ <== NOT EXECUTED fat_buf_release(fs_info); 5b3ca: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5b3ce: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED return RC_OK; 5b3d4: 588f addql #4,%sp <== NOT EXECUTED } 5b3d6: 2004 movel %d4,%d0 <== NOT EXECUTED 5b3d8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b3de: 4e5e unlk %fp <== NOT EXECUTED 5b3e0: 4e75 rts <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b3e2: 4878 ffff pea ffffffff <== NOT EXECUTED 5b3e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b3e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b3ea: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5b3ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b3f0: 4a80 tstl %d0 <== NOT EXECUTED 5b3f2: 6600 00c0 bnew 5b4b4 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 5b3f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b3f8: 2f07 movel %d7,%sp@- <== NOT EXECUTED 5b3fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b3fc: 4e95 jsr %a5@ <== NOT EXECUTED if ( rc != RC_OK ) 5b3fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 5b402: 4a80 tstl %d0 <== NOT EXECUTED 5b404: 6786 beqs 5b38c <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5b406: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 5b40a: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5b40c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5b40e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b410: 4eb9 0005 b22c jsr 5b22c <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 5b416: 42a7 clrl %sp@- <== NOT EXECUTED 5b418: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5b41a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b41c: 4eb9 0005 af96 jsr 5af96 <== NOT EXECUTED fat_buf_release(fs_info); 5b422: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED 5b426: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED return rc; 5b42c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b430: 2004 movel %d4,%d0 <== NOT EXECUTED 5b432: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b438: 4e5e unlk %fp <== NOT EXECUTED 5b43a: 4e75 rts <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) return rc; 5b43c: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b43e: 2004 movel %d4,%d0 <== NOT EXECUTED 5b440: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b446: 4e5e unlk %fp <== NOT EXECUTED 5b448: 4e75 rts <== NOT EXECUTED uint32_t *last_cl ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; 5b44a: 7402 moveq #2,%d2 5b44c: 6000 feea braw 5b338 while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 5b450: 4a93 tstl %a3@ <== NOT EXECUTED 5b452: 6782 beqs 5b3d6 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 5b454: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 5b458: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5b45a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b45c: 4eb9 0005 b22c jsr 5b22c <== NOT EXECUTED 5b462: 508f addql #8,%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b464: 2004 movel %d4,%d0 <== NOT EXECUTED 5b466: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b46c: 4e5e unlk %fp <== NOT EXECUTED 5b46e: 4e75 rts <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 5b470: 206e fff8 moveal %fp@(-8),%a0 5b474: 72ff moveq #-1,%d1 5b476: 2028 003a movel %a0@(58),%d0 (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 5b47a: 2142 003e movel %d2,%a0@(62) if (fs_info->vol.free_cls != 0xFFFFFFFF) 5b47e: b280 cmpl %d0,%d1 5b480: 6706 beqs 5b488 <== ALWAYS TAKEN fs_info->vol.free_cls -= (*cls_added); 5b482: 9093 subl %a3@,%d0 <== NOT EXECUTED 5b484: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED *last_cl = save_cln; 5b488: 206e 0018 moveal %fp@(24),%a0 5b48c: 2082 movel %d2,%a0@ fat_buf_release(fs_info); 5b48e: 2f2e fff8 movel %fp@(-8),%sp@- 5b492: 4eb9 0005 396c jsr 5396c return rc; 5b498: 588f addql #4,%sp fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b49a: 2004 movel %d4,%d0 5b49c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 5b4a2: 4e5e unlk %fp 5b4a4: 4e75 rts * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b4a6: 2800 movel %d0,%d4 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b4a8: 2004 movel %d4,%d0 <== NOT EXECUTED 5b4aa: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b4b0: 4e5e unlk %fp <== NOT EXECUTED 5b4b2: 4e75 rts <== NOT EXECUTED /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5b4b4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 5b4b8: 2800 movel %d0,%d4 <== NOT EXECUTED if ( rc != RC_OK ) { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 5b4ba: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 5b4bc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b4be: 4eb9 0005 b22c jsr 5b22c <== NOT EXECUTED return rc; 5b4c4: 508f addql #8,%sp <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); *last_cl = save_cln; fat_buf_release(fs_info); return RC_OK; } 5b4c6: 2004 movel %d4,%d0 <== NOT EXECUTED 5b4c8: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 5b4ce: 4e5e unlk %fp <== NOT EXECUTED 5b4d0: 4e75 rts <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 5b4d2: 4287 clrl %d7 <== NOT EXECUTED 5b4d4: 6000 fed4 braw 5b3aa <== NOT EXECUTED =============================================================================== 0005af96 : 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)) ) 5af96: 7001 moveq #1,%d0 fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 5af98: 4e56 ffe0 linkw %fp,#-32 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5af9c: 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 ) { 5afa0: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 5afa4: 242e 000c movel %fp@(12),%d2 5afa8: 2a2e 0010 movel %fp@(16),%d5 int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 5afac: 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; 5afb0: 42ae fffc clrl %fp@(-4) /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 5afb4: b082 cmpl %d2,%d0 5afb6: 6476 bccs 5b02e <== NEVER TAKEN 5afb8: 202a 0030 movel %a2@(48),%d0 5afbc: 5280 addql #1,%d0 5afbe: b082 cmpl %d2,%d0 5afc0: 656c bcss 5b02e <== NEVER TAKEN rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5afc2: 4280 clrl %d0 5afc4: 102a 000a moveb %a2@(10),%d0 5afc8: 2802 movel %d2,%d4 5afca: 0800 0000 btst #0,%d0 5afce: 6676 bnes 5b046 <== ALWAYS TAKEN 5afd0: 0800 0001 btst #1,%d0 <== NOT EXECUTED 5afd4: 6776 beqs 5b04c <== NOT EXECUTED 5afd6: d884 addl %d4,%d4 <== NOT EXECUTED 5afd8: 4280 clrl %d0 5afda: 102a 0002 moveb %a2@(2),%d0 5afde: 2604 movel %d4,%d3 5afe0: e0ab lsrl %d0,%d3 5afe2: d6aa 0044 addl %a2@(68),%d3 fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5afe6: 47f9 0005 3758 lea 53758 ,%a3 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); 5afec: 3c12 movew %a2@,%d6 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 5afee: 486e fffc pea %fp@(-4) 5aff2: 4878 0001 pea 1 5aff6: 2f03 movel %d3,%sp@- 5aff8: 2f0a movel %a2,%sp@- 5affa: 4e93 jsr %a3@ if (rc != RC_OK) 5affc: 4fef 0010 lea %sp@(16),%sp 5b000: 4a80 tstl %d0 5b002: 6638 bnes 5b03c <== NEVER TAKEN return rc; switch ( fs_info->vol.type ) 5b004: 4281 clrl %d1 5b006: 122a 000a moveb %a2@(10),%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); 5b00a: 0286 0000 ffff andil #65535,%d6 5b010: 5386 subql #1,%d6 5b012: c886 andl %d6,%d4 rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 5b014: 7c02 moveq #2,%d6 5b016: bc81 cmpl %d1,%d6 5b018: 6700 00f2 beqw 5b10c 5b01c: 1c3c 0004 moveb #4,%d6 5b020: bc81 cmpl %d1,%d6 5b022: 6700 009a beqw 5b0be 5b026: 1c3c 0001 moveb #1,%d6 5b02a: bc81 cmpl %d1,%d6 5b02c: 6722 beqs 5b050 <== ALWAYS TAKEN fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 5b02e: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 5b034: 7205 moveq #5,%d1 <== NOT EXECUTED 5b036: 2040 moveal %d0,%a0 <== NOT EXECUTED 5b038: 70ff moveq #-1,%d0 <== NOT EXECUTED 5b03a: 2081 movel %d1,%a0@ <== NOT EXECUTED break; } return RC_OK; } 5b03c: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5b042: 4e5e unlk %fp <== NOT EXECUTED 5b044: 4e75 rts <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 5b046: e28c lsrl #1,%d4 5b048: d882 addl %d2,%d4 5b04a: 608c bras 5afd8 5b04c: e58c lsll #2,%d4 <== NOT EXECUTED 5b04e: 6088 bras 5afd8 <== NOT EXECUTED case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 5b050: 206e fffc moveal %fp@(-4),%a0 5b054: 2068 001e moveal %a0@(30),%a0 return rc; switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 5b058: 0802 0000 btst #0,%d2 5b05c: 6700 00d8 beqw 5b136 { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 5b060: d1c4 addal %d4,%a0 { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 5b062: 740f moveq #15,%d2 5b064: 1210 moveb %a0@,%d1 switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 5b066: e98d lsll #4,%d5 *((uint8_t *)(block0->buffer + ofs)) = 5b068: c282 andl %d2,%d1 5b06a: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 5b06c: 206e fffc moveal %fp@(-4),%a0 5b070: 2068 001e moveal %a0@(30),%a0 5b074: d1c4 addal %d4,%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)) = 5b076: 1210 moveb %a0@,%d1 5b078: 8285 orl %d5,%d1 5b07a: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 5b07c: 4281 clrl %d1 5b07e: 3212 movew %a2@,%d1 } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 5b080: 1546 0076 moveb %d6,%a2@(118) 5b084: 5381 subql #1,%d1 5b086: b881 cmpl %d1,%d4 5b088: 6700 0110 beqw 5b19a fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 5b08c: 206e fffc moveal %fp@(-4),%a0 5b090: 5284 addql #1,%d4 5b092: 2068 001e moveal %a0@(30),%a0 5b096: 4201 clrb %d1 *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b098: 0285 0000 ffff andil #65535,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 5b09e: 1181 4800 moveb %d1,%a0@(00000000,%d4:l) *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b0a2: e08d lsrl #8,%d5 else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 5b0a4: 206e fffc moveal %fp@(-4),%a0 5b0a8: 2068 001e moveal %a0@(30),%a0 5b0ac: d1c4 addal %d4,%a0 } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 5b0ae: 1210 moveb %a0@,%d1 5b0b0: 8a81 orl %d1,%d5 5b0b2: 1085 moveb %d5,%a0@ break; } return RC_OK; } 5b0b4: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5b0ba: 4e5e unlk %fp 5b0bc: 4e75 rts case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 5b0be: 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)); 5b0c2: 2405 movel %d5,%d2 <== NOT EXECUTED byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b0c4: 7c18 moveq #24,%d6 <== NOT EXECUTED 5b0c6: 0282 0fff ffff andil #268435455,%d2 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 5b0cc: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b0d0: d1c4 addal %d4,%a0 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5b0d2: 2802 movel %d2,%d4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5b0d4: 2202 movel %d2,%d1 <== NOT EXECUTED uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; 5b0d6: ecac lsrl %d6,%d4 <== NOT EXECUTED byte3 = (value >> 16) & 0xff; 5b0d8: e089 lsrl #8,%d1 <== NOT EXECUTED byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b0da: edad lsll %d6,%d5 <== NOT EXECUTED { uint32_t byte1, byte2, byte3, byte4, swapped; byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; 5b0dc: e18a lsll #8,%d2 <== NOT EXECUTED 5b0de: 2610 movel %a0@,%d3 <== NOT EXECUTED byte1 = value & 0xff; swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; 5b0e0: 8a84 orl %d4,%d5 <== NOT EXECUTED 5b0e2: 0282 00ff 0000 andil #16711680,%d2 <== NOT EXECUTED 5b0e8: 0281 0000 ff00 andil #65280,%d1 <== NOT EXECUTED 5b0ee: 0283 0000 00f0 andil #240,%d3 <== NOT EXECUTED 5b0f4: 8a82 orl %d2,%d5 <== NOT EXECUTED 5b0f6: 8a81 orl %d1,%d5 <== NOT EXECUTED 5b0f8: 7201 moveq #1,%d1 <== NOT EXECUTED *((uint32_t *)(block0->buffer + ofs)) = fat32_clv | (*((uint32_t *)(block0->buffer + ofs))); 5b0fa: 8a83 orl %d3,%d5 <== NOT EXECUTED 5b0fc: 2085 movel %d5,%a0@ <== NOT EXECUTED 5b0fe: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5b102: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5b108: 4e5e unlk %fp <== NOT EXECUTED 5b10a: 4e75 rts <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 5b10c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED (uint16_t )(CT_LE_W(in_val)); 5b110: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 5b116: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED static inline uint16_t m68k_swap_u16( uint16_t value ) { return (((value & 0xff) << 8) | ((value >> 8) & 0xff)); 5b11a: 2205 movel %d5,%d1 <== NOT EXECUTED 5b11c: e089 lsrl #8,%d1 <== NOT EXECUTED 5b11e: e18d lsll #8,%d5 <== NOT EXECUTED 5b120: 8a81 orl %d1,%d5 <== NOT EXECUTED 5b122: 7201 moveq #1,%d1 <== NOT EXECUTED 5b124: 3185 4800 movew %d5,%a0@(00000000,%d4:l) <== NOT EXECUTED 5b128: 1541 0076 moveb %d1,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5b12c: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5b132: 4e5e unlk %fp <== NOT EXECUTED 5b134: 4e75 rts <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 5b136: 4202 clrb %d2 (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 5b138: 0285 0000 0fff andil #4095,%d5 *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 5b13e: 1182 4800 moveb %d2,%a0@(00000000,%d4:l) 5b142: 7c01 moveq #1,%d6 *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 5b144: 206e fffc moveal %fp@(-4),%a0 5b148: 2068 001e moveal %a0@(30),%a0 5b14c: d1c4 addal %d4,%a0 else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 5b14e: 1210 moveb %a0@,%d1 5b150: 8285 orl %d5,%d1 5b152: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 5b154: 4281 clrl %d1 5b156: 3212 movew %a2@,%d1 5b158: 1546 0076 moveb %d6,%a2@(118) 5b15c: 5381 subql #1,%d1 5b15e: b881 cmpl %d1,%d4 5b160: 6700 0082 beqw 5b1e4 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 5b164: 206e fffc moveal %fp@(-4),%a0 5b168: 5284 addql #1,%d4 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5b16a: 7cf0 moveq #-16,%d6 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 5b16c: 2068 001e moveal %a0@(30),%a0 5b170: d1c4 addal %d4,%a0 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5b172: 1210 moveb %a0@,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b174: 0285 0000 ffff andil #65535,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5b17a: c286 andl %d6,%d1 (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b17c: e08d lsrl #8,%d5 fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 5b17e: 1081 moveb %d1,%a0@ (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 5b180: 206e fffc moveal %fp@(-4),%a0 5b184: 2068 001e moveal %a0@(30),%a0 5b188: d1c4 addal %d4,%a0 else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 5b18a: 1210 moveb %a0@,%d1 5b18c: 8a81 orl %d1,%d5 5b18e: 1085 moveb %d5,%a0@ break; } return RC_OK; } 5b190: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 5b196: 4e5e unlk %fp 5b198: 4e75 rts fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5b19a: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5b19e: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b1a0: 4878 0001 pea 1 <== NOT EXECUTED 5b1a4: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5b1a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b1aa: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5b1ac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b1b0: 4a80 tstl %d0 <== NOT EXECUTED 5b1b2: 6600 fe88 bnew 5b03c <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 5b1b6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5b1ba: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED 5b1be: 4210 clrb %a0@ <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b1c0: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5b1c6: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b1ca: e08d lsrl #8,%d5 <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5b1cc: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 5b1d0: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5b1d2: 8a81 orl %d1,%d5 <== NOT EXECUTED 5b1d4: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5b1d6: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED break; } return RC_OK; } 5b1da: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 <== NOT EXECUTED 5b1e0: 4e5e unlk %fp <== NOT EXECUTED 5b1e2: 4e75 rts <== NOT EXECUTED fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 5b1e4: 486e fffc pea %fp@(-4) <== NOT EXECUTED 5b1e8: 2043 moveal %d3,%a0 <== NOT EXECUTED 5b1ea: 4878 0001 pea 1 <== NOT EXECUTED 5b1ee: 4868 0001 pea %a0@(1) <== NOT EXECUTED 5b1f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5b1f4: 4e93 jsr %a3@ <== NOT EXECUTED &block0); if (rc != RC_OK) 5b1f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 5b1fa: 4a80 tstl %d0 <== NOT EXECUTED 5b1fc: 6600 fe3e bnew 5b03c <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 5b200: 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)) = 5b204: 74f0 moveq #-16,%d2 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; 5b206: 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)) = 5b20a: 1210 moveb %a0@,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b20c: 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)) = 5b212: c282 andl %d2,%d1 <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | (uint8_t )((fat16_clv & 0xFF00)>>8); 5b214: 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)) = 5b216: 1081 moveb %d1,%a0@ <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 5b218: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 5b21c: 2068 001e moveal %a0@(30),%a0 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 5b220: 1210 moveb %a0@,%d1 <== NOT EXECUTED 5b222: 8a81 orl %d1,%d5 <== NOT EXECUTED 5b224: 1085 moveb %d5,%a0@ <== NOT EXECUTED 5b226: 1546 0076 moveb %d6,%a2@(118) <== NOT EXECUTED 5b22a: 60ae bras 5b1da <== NOT EXECUTED =============================================================================== 0005402a : { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; int i = 0; if (fs_info->vol.type & FAT_FAT32) 5402a: 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) { 5402c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 54030: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 54034: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 54038: 2868 0034 moveal %a0@(52),%a4 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 5403c: 102c 000a moveb %a4@(10),%d0 <== NOT EXECUTED 54040: 44c0 movew %d0,%ccr <== NOT EXECUTED 54042: 6700 00de beqw 54122 <== NOT EXECUTED * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { int rc = RC_OK; 54046: 4284 clrl %d4 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; } fat_buf_release(fs_info); 54048: 2f0c movel %a4,%sp@- <== NOT EXECUTED 5404a: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 54050: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 54054: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 54058: 4eb9 0005 2218 jsr 52218 <== NOT EXECUTED 5405e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54062: 4a80 tstl %d0 <== NOT EXECUTED 54064: 6600 00f8 bnew 5415e <== NOT EXECUTED rc = -1; 54068: 4283 clrl %d3 <== NOT EXECUTED 5406a: 45f9 0004 680c lea 4680c ,%a2 <== NOT EXECUTED 54070: 47f9 0004 bb48 lea 4bb48 <_Chain_Get>,%a3 <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 54076: 242c 005a movel %a4@(90),%d2 <== NOT EXECUTED 5407a: d483 addl %d3,%d2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 5407c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5407e: 4e93 jsr %a3@ <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 54080: 588f addql #4,%sp <== NOT EXECUTED 54082: 4a80 tstl %d0 <== NOT EXECUTED 54084: 6710 beqs 54096 <== NOT EXECUTED free(node); 54086: 2f00 movel %d0,%sp@- <== NOT EXECUTED 54088: 4e92 jsr %a2@ <== NOT EXECUTED 5408a: 588f addql #4,%sp <== NOT EXECUTED 5408c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5408e: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 54090: 588f addql #4,%sp <== NOT EXECUTED 54092: 4a80 tstl %d0 <== NOT EXECUTED 54094: 66f0 bnes 54086 <== NOT EXECUTED 54096: 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++) 5409c: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 540a0: b083 cmpl %d3,%d0 <== NOT EXECUTED 540a2: 66d2 bnes 54076 <== NOT EXECUTED 540a4: 4283 clrl %d3 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 540a6: 242c 005e movel %a4@(94),%d2 <== NOT EXECUTED 540aa: d483 addl %d3,%d2 <== NOT EXECUTED 540ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 540ae: 4e93 jsr %a3@ <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 540b0: 588f addql #4,%sp <== NOT EXECUTED 540b2: 4a80 tstl %d0 <== NOT EXECUTED 540b4: 6710 beqs 540c6 <== NOT EXECUTED free(node); 540b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 540b8: 4e92 jsr %a2@ <== NOT EXECUTED 540ba: 588f addql #4,%sp <== NOT EXECUTED 540bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 540be: 4e93 jsr %a3@ <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 540c0: 588f addql #4,%sp <== NOT EXECUTED 540c2: 4a80 tstl %d0 <== NOT EXECUTED 540c4: 66f0 bnes 540b6 <== NOT EXECUTED 540c6: 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++) 540cc: 103c 0018 moveb #24,%d0 <== NOT EXECUTED 540d0: b083 cmpl %d3,%d0 <== NOT EXECUTED 540d2: 66d2 bnes 540a6 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 540d4: 2f2c 005a movel %a4@(90),%sp@- <== NOT EXECUTED 540d8: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->rhash); 540da: 2f2c 005e movel %a4@(94),%sp@- <== NOT EXECUTED 540de: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->uino); 540e0: 2f2c 0062 movel %a4@(98),%sp@- <== NOT EXECUTED 540e4: 4e92 jsr %a2@ <== NOT EXECUTED free(fs_info->sec_buf); 540e6: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 540ea: 4e92 jsr %a2@ <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 540ec: 2f2c 0052 movel %a4@(82),%sp@- <== NOT EXECUTED 540f0: 4eb9 0004 561a jsr 4561a <== NOT EXECUTED if (rc) 540f6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 540fa: 4a84 tstl %d4 <== NOT EXECUTED 540fc: 660c bnes 5410a <== NOT EXECUTED errno = EIO; return rc; } 540fe: 2004 movel %d4,%d0 <== NOT EXECUTED 54100: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 54106: 4e5e unlk %fp <== NOT EXECUTED 54108: 4e75 rts <== NOT EXECUTED free(fs_info->uino); free(fs_info->sec_buf); rtems_disk_release(fs_info->vol.dd); if (rc) errno = EIO; 5410a: 4eb9 0005 c918 jsr 5c918 <__errno> <== NOT EXECUTED 54110: 7605 moveq #5,%d3 <== NOT EXECUTED 54112: 2040 moveal %d0,%a0 <== NOT EXECUTED return rc; } 54114: 2004 movel %d4,%d0 <== NOT EXECUTED free(fs_info->uino); free(fs_info->sec_buf); rtems_disk_release(fs_info->vol.dd); if (rc) errno = EIO; 54116: 2083 movel %d3,%a0@ <== NOT EXECUTED return rc; } 54118: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 5411e: 4e5e unlk %fp <== NOT EXECUTED 54120: 4e75 rts <== 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, 54122: 2f2c 003e movel %a4@(62),%sp@- <== NOT EXECUTED 54126: 2f2c 003a movel %a4@(58),%sp@- <== NOT EXECUTED 5412a: 2f08 movel %a0,%sp@- <== NOT EXECUTED 5412c: 4eb9 0005 3f60 jsr 53f60 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 54132: 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, 54136: 2800 movel %d0,%d4 <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 54138: 6700 ff0e beqw 54048 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 5413c: 2f0c movel %a4,%sp@- <== NOT EXECUTED if (fs_info->vol.type & FAT_FAT32) { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, fs_info->vol.next_cl); if ( rc != RC_OK ) rc = -1; 5413e: 78ff moveq #-1,%d4 <== NOT EXECUTED } fat_buf_release(fs_info); 54140: 4eb9 0005 396c jsr 5396c <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 54146: 2f2c 004e movel %a4@(78),%sp@- <== NOT EXECUTED 5414a: 2f2c 004a movel %a4@(74),%sp@- <== NOT EXECUTED 5414e: 4eb9 0005 2218 jsr 52218 <== NOT EXECUTED 54154: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 54158: 4a80 tstl %d0 <== NOT EXECUTED 5415a: 6700 ff0c beqw 54068 <== NOT EXECUTED rc = -1; 5415e: 78ff moveq #-1,%d4 <== NOT EXECUTED 54160: 4283 clrl %d3 <== NOT EXECUTED 54162: 45f9 0004 680c lea 4680c ,%a2 <== NOT EXECUTED 54168: 47f9 0004 bb48 lea 4bb48 <_Chain_Get>,%a3 <== NOT EXECUTED 5416e: 6000 ff06 braw 54076 <== NOT EXECUTED =============================================================================== 0005d404 : int fcntl( int fd, int cmd, ... ) { 5d404: 4e56 fff0 linkw %fp,#-16 5d408: 202e 0008 movel %fp@(8),%d0 5d40c: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5d410: 242e 000c movel %fp@(12),%d2 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 5d414: 2239 0005 ff82 movel 5ff82 ,%d1 5d41a: b280 cmpl %d0,%d1 5d41c: 6300 018c blsw 5d5aa iop = rtems_libio_iop( fd ); 5d420: 2600 movel %d0,%d3 5d422: ed88 lsll #6,%d0 5d424: e78b lsll #3,%d3 5d426: 2079 0006 16e8 moveal 616e8 ,%a0 5d42c: 9083 subl %d3,%d0 5d42e: 45f0 0800 lea %a0@(00000000,%d0:l),%a2 rtems_libio_check_is_open(iop); 5d432: 282a 0014 movel %a2@(20),%d4 5d436: 0804 0008 btst #8,%d4 5d43a: 6700 016e beqw 5d5aa /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5d43e: 7009 moveq #9,%d0 5d440: b082 cmpl %d2,%d0 5d442: 641a bccs 5d45e errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 5d444: 4eb9 0004 f190 jsr 4f190 <__errno> 5d44a: 2040 moveal %d0,%a0 5d44c: 7016 moveq #22,%d0 5d44e: 2080 movel %d0,%a0@ int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5d450: 76ff moveq #-1,%d3 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d452: 2003 movel %d3,%d0 5d454: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5d45a: 4e5e unlk %fp 5d45c: 4e75 rts /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 5d45e: 303b 2a08 movew %pc@(5d468 ,%d2:l:2),%d0 5d462: 48c0 extl %d0 5d464: 4efb 0802 jmp %pc@(5d468 ,%d0:l) 5d468: 00ae 00a2 0090 oril #10616976,%d6 <== NOT EXECUTED 5d46e: 0076 .short 0x0076 <== NOT EXECUTED 5d470: 0026 .short 0x0026 <== NOT EXECUTED 5d472: 0014 .short 0x0014 <== NOT EXECUTED 5d474: 0014 .short 0x0014 <== NOT EXECUTED 5d476: 0014 .short 0x0014 <== NOT EXECUTED 5d478: 0014 .short 0x0014 <== NOT EXECUTED 5d47a: 0014 .short 0x0014 <== NOT EXECUTED errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5d47c: 4eb9 0004 f190 jsr 4f190 <__errno> int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5d482: 76ff moveq #-1,%d3 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 5d484: 2040 moveal %d0,%a0 5d486: 20bc 0000 0086 movel #134,%a0@ 5d48c: 60c4 bras 5d452 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5d48e: 2f2e 0010 movel %fp@(16),%sp@- rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5d492: 4283 clrl %d3 case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 5d494: 4eb9 0004 3f24 jsr 43f24 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 5d49a: 222a 0014 movel %a2@(20),%d1 5d49e: 588f addql #4,%sp 5d4a0: 0280 0000 0201 andil #513,%d0 5d4a6: 0281 ffff fdfe andil #-514,%d1 5d4ac: 8081 orl %d1,%d0 5d4ae: 2540 0014 movel %d0,%a2@(20) * 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 ); 5d4b2: 206a 0020 moveal %a2@(32),%a0 5d4b6: 2f0a movel %a2,%sp@- 5d4b8: 2f02 movel %d2,%sp@- 5d4ba: 2068 0030 moveal %a0@(48),%a0 5d4be: 4e90 jsr %a0@ if (err) { 5d4c0: 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 ); 5d4c2: 2400 movel %d0,%d2 if (err) { 5d4c4: 678c beqs 5d452 <== ALWAYS TAKEN errno = err; 5d4c6: 4eb9 0004 f190 jsr 4f190 <__errno> <== NOT EXECUTED ret = -1; 5d4cc: 76ff moveq #-1,%d3 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 5d4ce: 2040 moveal %d0,%a0 <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d4d0: 2003 movel %d3,%d0 <== NOT EXECUTED */ if (ret >= 0) { int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 5d4d2: 2082 movel %d2,%a0@ <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d4d4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5d4da: 4e5e unlk %fp <== NOT EXECUTED 5d4dc: 4e75 rts <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 5d4de: 2f04 movel %d4,%sp@- 5d4e0: 4eb9 0004 3f64 jsr 43f64 5d4e6: 588f addql #4,%sp 5d4e8: 2600 movel %d0,%d3 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5d4ea: 6cc6 bges 5d4b2 <== ALWAYS TAKEN va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d4ec: 2003 movel %d3,%d0 <== NOT EXECUTED 5d4ee: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 5d4f4: 4e5e unlk %fp <== NOT EXECUTED 5d4f6: 4e75 rts <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 5d4f8: 4283 clrl %d3 * 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 ) ) 5d4fa: 4aae 0010 tstl %fp@(16) 5d4fe: 6768 beqs 5d568 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 5d500: 08c4 000b bset #11,%d4 5d504: 2544 0014 movel %d4,%a2@(20) 5d508: 60a8 bras 5d4b2 diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 5d50a: 0804 000b btst #11,%d4 5d50e: 56c3 sne %d3 5d510: 49c3 extbl %d3 5d512: 4483 negl %d3 5d514: 609c bras 5d4b2 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 5d516: 202e 0010 movel %fp@(16),%d0 if ( fd2 ) 5d51a: 6700 00a8 beqw 5d5c4 diop = rtems_libio_iop( fd2 ); 5d51e: b081 cmpl %d1,%d0 5d520: 6452 bccs 5d574 <== NEVER TAKEN 5d522: 2200 movel %d0,%d1 5d524: ed88 lsll #6,%d0 5d526: e789 lsll #3,%d1 5d528: 9081 subl %d1,%d0 5d52a: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 5d52e: 2609 movel %a1,%d3 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5d530: 9688 subl %a0,%d3 5d532: e683 asrl #3,%d3 5d534: 203c b6db 6db7 movel #-1227133513,%d0 5d53a: 4c00 3800 mulsl %d0,%d3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5d53e: 236a 0018 0018 movel %a2@(24),%a1@(24) 5d544: 236a 001c 001c movel %a2@(28),%a1@(28) 5d54a: 236a 0020 0020 movel %a2@(32),%a1@(32) 5d550: 236a 0024 0024 movel %a2@(36),%a1@(36) 5d556: 236a 0028 0028 movel %a2@(40),%a1@(40) ret = -1; break; } } diop->flags = iop->flags; 5d55c: 2344 0014 movel %d4,%a1@(20) /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 5d560: 4a83 tstl %d3 5d562: 6c00 ff4e bgew 5d4b2 5d566: 6084 bras 5d4ec <== NOT EXECUTED */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 5d568: 0884 000b bclr #11,%d4 5d56c: 2544 0014 movel %d4,%a2@(20) 5d570: 6000 ff40 braw 5d4b2 switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 5d574: 93c9 subal %a1,%a1 <== NOT EXECUTED 5d576: 4283 clrl %d3 <== NOT EXECUTED } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5d578: 9688 subl %a0,%d3 <== NOT EXECUTED 5d57a: e683 asrl #3,%d3 <== NOT EXECUTED 5d57c: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED 5d582: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5d586: 236a 0018 0018 movel %a2@(24),%a1@(24) <== NOT EXECUTED 5d58c: 236a 001c 001c movel %a2@(28),%a1@(28) <== NOT EXECUTED 5d592: 236a 0020 0020 movel %a2@(32),%a1@(32) <== NOT EXECUTED 5d598: 236a 0024 0024 movel %a2@(36),%a1@(36) <== NOT EXECUTED 5d59e: 236a 0028 0028 movel %a2@(40),%a1@(40) <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 5d5a4: 2344 0014 movel %d4,%a1@(20) <== NOT EXECUTED 5d5a8: 60b6 bras 5d560 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5d5aa: 4eb9 0004 f190 jsr 4f190 <__errno> 5d5b0: 76ff moveq #-1,%d3 5d5b2: 7209 moveq #9,%d1 5d5b4: 2040 moveal %d0,%a0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d5b6: 2003 movel %d3,%d0 5d5b8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 5d5be: 2081 movel %d1,%a0@ va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 5d5c0: 4e5e unlk %fp 5d5c2: 4e75 rts fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 5d5c4: 4eb9 0004 3fb2 jsr 43fb2 5d5ca: 2240 moveal %d0,%a1 if ( diop == 0 ) { 5d5cc: 4a80 tstl %d0 5d5ce: 6700 fe80 beqw 5d450 5d5d2: 282a 0014 movel %a2@(20),%d4 5d5d6: 2600 movel %d0,%d3 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5d5d8: 203c b6db 6db7 movel #-1227133513,%d0 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5d5de: 236a 0018 0018 movel %a2@(24),%a1@(24) 5d5e4: 236a 001c 001c movel %a2@(28),%a1@(28) 5d5ea: 236a 0020 0020 movel %a2@(32),%a1@(32) 5d5f0: 236a 0024 0024 movel %a2@(36),%a1@(36) if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); if ( diop == 0 ) { 5d5f6: 2079 0006 16e8 moveal 616e8 ,%a0 } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 5d5fc: 9688 subl %a0,%d3 5d5fe: e683 asrl #3,%d3 5d600: 4c00 3800 mulsl %d0,%d3 break; } } diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 5d604: 236a 0028 0028 movel %a2@(40),%a1@(40) ret = -1; break; } } diop->flags = iop->flags; 5d60a: 2344 0014 movel %d4,%a1@(20) 5d60e: 6000 ff50 braw 5d560 =============================================================================== 0004d396 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d396: 4e56 ffe0 linkw %fp,#-32 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d39a: 2039 0006 169c movel 6169c ,%d0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 4d3a0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4d3a4: 286e 0008 moveal %fp@(8),%a4 4d3a8: 47f9 0004 8bf0 lea 48bf0 ,%a3 4d3ae: 262e 000c movel %fp@(12),%d3 static int pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 4d3b2: 4a80 tstl %d0 4d3b4: 6700 0086 beqw 4d43c rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4d3b8: 42a7 clrl %sp@- 4d3ba: 42a7 clrl %sp@- 4d3bc: 2f00 movel %d0,%sp@- 4d3be: 4e93 jsr %a3@ } if (sc == RTEMS_SUCCESSFUL) { 4d3c0: 4fef 000c lea %sp@(12),%sp 4d3c4: 4a80 tstl %d0 4d3c6: 6600 0330 bnew 4d6f8 err = pipe_lock(); if (err) return err; pipe = *pipep; 4d3ca: 2414 movel %a4@,%d2 if (pipe == NULL) { 4d3cc: 6700 011a beqw 4d4e8 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 4d3d0: 42a7 clrl %sp@- 4d3d2: 2042 moveal %d2,%a0 4d3d4: 42a7 clrl %sp@- 4d3d6: 2f28 0028 movel %a0@(40),%sp@- 4d3da: 4e93 jsr %a3@ 4d3dc: 4fef 000c lea %sp@(12),%sp 4d3e0: 4a80 tstl %d0 4d3e2: 6600 008a bnew 4d46e 4d3e6: 95ca subal %a2,%a2 err = -EINTR; if (*pipep == NULL) { 4d3e8: 4a94 tstl %a4@ 4d3ea: 6700 02bc beqw 4d6a8 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d3ee: 2f39 0006 169c movel 6169c ,%sp@- 4d3f4: 4bf9 0004 8d40 lea 48d40 ,%a5 4d3fa: 4e95 jsr %a5@ pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 4d3fc: 588f addql #4,%sp 4d3fe: 4a8a tstl %a2 4d400: 662e bnes 4d430 <== NEVER TAKEN return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 4d402: 7006 moveq #6,%d0 4d404: 2043 moveal %d3,%a0 4d406: 7204 moveq #4,%d1 4d408: c0a8 0014 andl %a0@(20),%d0 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 4d40c: 2454 moveal %a4@,%a2 switch (LIBIO_ACCMODE(iop)) { 4d40e: b280 cmpl %d0,%d1 4d410: 6700 0220 beqw 4d632 4d414: 123c 0006 moveb #6,%d1 4d418: b280 cmpl %d0,%d1 4d41a: 6700 01cc beqw 4d5e8 4d41e: 123c 0002 moveb #2,%d1 4d422: b280 cmpl %d0,%d1 4d424: 6750 beqs 4d476 <== ALWAYS TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d426: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d42a: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d42c: 4e95 jsr %a5@ return 0; 4d42e: 588f addql #4,%sp out_error: pipe_release(pipep, iop); return err; } 4d430: 200a movel %a2,%d0 4d432: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4d438: 4e5e unlk %fp 4d43a: 4e75 rts 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 ); 4d43c: 42a7 clrl %sp@- 4d43e: 42a7 clrl %sp@- 4d440: 2f39 0006 1d94 movel 61d94 ,%sp@- 4d446: 4e93 jsr %a3@ rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 4d448: 4fef 000c lea %sp@(12),%sp 4d44c: 4ab9 0006 169c tstl 6169c 4d452: 6700 0270 beqw 4d6c4 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 4d456: 2f39 0006 1d94 movel 61d94 ,%sp@- <== NOT EXECUTED 4d45c: 4eb9 0004 8d40 jsr 48d40 <== NOT EXECUTED 4d462: 2039 0006 169c movel 6169c ,%d0 <== NOT EXECUTED 4d468: 588f addql #4,%sp <== NOT EXECUTED 4d46a: 6000 ff4c braw 4d3b8 <== NOT EXECUTED if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 4d46e: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED 4d472: 6000 ff74 braw 4d3e8 <== NOT EXECUTED pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d476: 202a 0010 movel %a2@(16),%d0 4d47a: 2040 moveal %d0,%a0 4d47c: 5288 addql #1,%a0 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 4d47e: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4d482: 2548 0010 movel %a0,%a2@(16) 4d486: 4a80 tstl %d0 4d488: 6700 02a6 beqw 4d730 PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 4d48c: 4aaa 0014 tstl %a2@(20) 4d490: 6694 bnes 4d426 /* Not an error */ if (LIBIO_NODELAY(iop)) 4d492: 7001 moveq #1,%d0 4d494: 2043 moveal %d3,%a0 4d496: c0a8 0014 andl %a0@(20),%d0 4d49a: 668a bnes 4d426 break; prevCounter = pipe->writerCounter; 4d49c: 282a 0024 movel %a2@(36),%d4 4d4a0: 243c 0004 ea14 movel #322068,%d2 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 4d4a6: 2f2a 0028 movel %a2@(40),%sp@- 4d4aa: 4e95 jsr %a5@ if (! PIPE_READWAIT(pipe)) 4d4ac: 2042 moveal %d2,%a0 4d4ae: 42a7 clrl %sp@- 4d4b0: 2f2a 002c movel %a2@(44),%sp@- 4d4b4: 4e90 jsr %a0@ 4d4b6: 4fef 000c lea %sp@(12),%sp 4d4ba: 4a80 tstl %d0 4d4bc: 6600 0286 bnew 4d744 goto out_error; if (! PIPE_LOCK(pipe)) 4d4c0: 42a7 clrl %sp@- 4d4c2: 42a7 clrl %sp@- 4d4c4: 2f2a 0028 movel %a2@(40),%sp@- 4d4c8: 4e93 jsr %a3@ 4d4ca: 4fef 000c lea %sp@(12),%sp 4d4ce: 4a80 tstl %d0 4d4d0: 6600 0272 bnew 4d744 goto out_error; } while (prevCounter == pipe->writerCounter); 4d4d4: b8aa 0024 cmpl %a2@(36),%d4 4d4d8: 67cc beqs 4d4a6 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d4da: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d4de: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d4e0: 4e95 jsr %a5@ return 0; 4d4e2: 588f addql #4,%sp 4d4e4: 6000 ff4a braw 4d430 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d4e8: 4878 0034 pea 34 4d4ec: 45f9 0004 5620 lea 45620 ,%a2 4d4f2: 4e92 jsr %a2@ if (pipe == NULL) 4d4f4: 588f addql #4,%sp { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 4d4f6: 2400 movel %d0,%d2 if (pipe == NULL) 4d4f8: 6700 02fe beqw 4d7f8 return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d4fc: 2040 moveal %d0,%a0 pipe->Size = PIPE_BUF; 4d4fe: 203c 0000 0200 movel #512,%d0 int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); 4d504: 4298 clrl %a0@+ 4d506: 5888 addql #4,%a0 4d508: 4298 clrl %a0@+ 4d50a: 4298 clrl %a0@+ 4d50c: 4298 clrl %a0@+ 4d50e: 4298 clrl %a0@+ 4d510: 4298 clrl %a0@+ 4d512: 4298 clrl %a0@+ 4d514: 4298 clrl %a0@+ 4d516: 4298 clrl %a0@+ 4d518: 4298 clrl %a0@+ 4d51a: 4298 clrl %a0@+ 4d51c: 4290 clrl %a0@ pipe->Size = PIPE_BUF; 4d51e: 2042 moveal %d2,%a0 4d520: 2140 0004 movel %d0,%a0@(4) pipe->Buffer = malloc(pipe->Size); 4d524: 4878 0200 pea 200 4d528: 4e92 jsr %a2@ if (! pipe->Buffer) 4d52a: 588f addql #4,%sp if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 4d52c: 2042 moveal %d2,%a0 4d52e: 45f9 0004 4e28 lea 44e28 ,%a2 4d534: 2080 movel %d0,%a0@ if (! pipe->Buffer) 4d536: 6700 02ba beqw 4d7f2 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d53a: 2042 moveal %d2,%a0 4d53c: 4868 002c pea %a0@(44) 4d540: 45f9 0004 e820 lea 4e820 ,%a2 rtems_build_name ('P', 'I', 'r', c), 4d546: 1039 0006 07d8 moveb 607d8 ,%d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d54c: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'r', c), 4d54e: 49c0 extbl %d0 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 4d550: 42a7 clrl %sp@- 4d552: 0080 5049 7200 oril #1346990592,%d0 4d558: 2f00 movel %d0,%sp@- 4d55a: 4e92 jsr %a2@ 4d55c: 4fef 0010 lea %sp@(16),%sp 4d560: 4a80 tstl %d0 4d562: 6600 0280 bnew 4d7e4 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 4d566: 2042 moveal %d2,%a0 4d568: 4868 0030 pea %a0@(48) rtems_build_name ('P', 'I', 'w', c), 4d56c: 1039 0006 07d8 moveb 607d8 ,%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( 4d572: 42a7 clrl %sp@- rtems_build_name ('P', 'I', 'w', c), 4d574: 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( 4d576: 42a7 clrl %sp@- 4d578: 0080 5049 7700 oril #1346991872,%d0 4d57e: 2f00 movel %d0,%sp@- 4d580: 4e92 jsr %a2@ 4d582: 4fef 0010 lea %sp@(16),%sp 4d586: 45f9 0004 e8f8 lea 4e8f8 ,%a2 4d58c: 4a80 tstl %d0 4d58e: 6600 024a bnew 4d7da rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 4d592: 2042 moveal %d2,%a0 4d594: 4868 0028 pea %a0@(40) rtems_build_name ('P', 'I', 's', c), 1, 4d598: 1039 0006 07d8 moveb 607d8 ,%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( 4d59e: 42a7 clrl %sp@- 4d5a0: 4878 0010 pea 10 rtems_build_name ('P', 'I', 's', c), 1, 4d5a4: 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( 4d5a6: 4878 0001 pea 1 4d5aa: 0080 5049 7300 oril #1346990848,%d0 4d5b0: 2f00 movel %d0,%sp@- 4d5b2: 4eb9 0004 8950 jsr 48950 4d5b8: 4fef 0014 lea %sp@(20),%sp 4d5bc: 4a80 tstl %d0 4d5be: 6600 020a bnew 4d7ca #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 4d5c2: 1039 0006 07d8 moveb 607d8 ,%d0 4d5c8: 49c0 extbl %d0 4d5ca: 2200 movel %d0,%d1 4d5cc: 5281 addql #1,%d1 4d5ce: 13c1 0006 07d8 moveb %d1,607d8 4d5d4: 727a moveq #122,%d1 4d5d6: b280 cmpl %d0,%d1 4d5d8: 6600 fdf6 bnew 4d3d0 c = 'a'; 4d5dc: 7061 moveq #97,%d0 4d5de: 13c0 0006 07d8 moveb %d0,607d8 4d5e4: 6000 fdea braw 4d3d0 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 4d5e8: 202a 0010 movel %a2@(16),%d0 4d5ec: 2200 movel %d0,%d1 4d5ee: 5281 addql #1,%d1 } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 4d5f0: 52aa 0020 addql #1,%a2@(32) if (pipe->Readers ++ == 0) 4d5f4: 2541 0010 movel %d1,%a2@(16) 4d5f8: 4a80 tstl %d0 4d5fa: 6700 0120 beqw 4d71c PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d5fe: 202a 0014 movel %a2@(20),%d0 4d602: 2040 moveal %d0,%a0 4d604: 5288 addql #1,%a0 case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 4d606: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4d60a: 2548 0014 movel %a0,%a2@(20) 4d60e: 4a80 tstl %d0 4d610: 6600 fe14 bnew 4d426 PIPE_WAKEUPREADERS(pipe); 4d614: 486e fffc pea %fp@(-4) 4d618: 2f2a 002c movel %a2@(44),%sp@- 4d61c: 4eb9 0004 e99c jsr 4e99c 4d622: 508f addql #8,%sp break; } PIPE_UNLOCK(pipe); 4d624: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d628: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d62a: 4e95 jsr %a5@ return 0; 4d62c: 588f addql #4,%sp 4d62e: 6000 fe00 braw 4d430 break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 4d632: 202a 0014 movel %a2@(20),%d0 4d636: 2200 movel %d0,%d1 4d638: 5281 addql #1,%d1 } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 4d63a: 52aa 0024 addql #1,%a2@(36) if (pipe->Writers ++ == 0) 4d63e: 2541 0014 movel %d1,%a2@(20) 4d642: 4a80 tstl %d0 4d644: 6700 00c2 beqw 4d708 PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 4d648: 4aaa 0010 tstl %a2@(16) 4d64c: 6600 fdd8 bnew 4d426 4d650: 7001 moveq #1,%d0 4d652: 2043 moveal %d3,%a0 4d654: c0a8 0014 andl %a0@(20),%d0 4d658: 6600 0156 bnew 4d7b0 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 4d65c: 282a 0020 movel %a2@(32),%d4 4d660: 243c 0004 ea14 movel #322068,%d2 err = -EINTR; do { PIPE_UNLOCK(pipe); 4d666: 2f2a 0028 movel %a2@(40),%sp@- 4d66a: 4e95 jsr %a5@ if (! PIPE_WRITEWAIT(pipe)) 4d66c: 2042 moveal %d2,%a0 4d66e: 42a7 clrl %sp@- 4d670: 2f2a 0030 movel %a2@(48),%sp@- 4d674: 4e90 jsr %a0@ 4d676: 4fef 000c lea %sp@(12),%sp 4d67a: 4a80 tstl %d0 4d67c: 6600 00c6 bnew 4d744 goto out_error; if (! PIPE_LOCK(pipe)) 4d680: 42a7 clrl %sp@- 4d682: 42a7 clrl %sp@- 4d684: 2f2a 0028 movel %a2@(40),%sp@- 4d688: 4e93 jsr %a3@ 4d68a: 4fef 000c lea %sp@(12),%sp 4d68e: 4a80 tstl %d0 4d690: 6600 00b2 bnew 4d744 goto out_error; } while (prevCounter == pipe->readerCounter); 4d694: b8aa 0020 cmpl %a2@(32),%d4 4d698: 67cc beqs 4d666 <== NEVER TAKEN if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d69a: 2f2a 0028 movel %a2@(40),%sp@- return 0; 4d69e: 95ca subal %a2,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 4d6a0: 4e95 jsr %a5@ return 0; 4d6a2: 588f addql #4,%sp 4d6a4: 6000 fd8a braw 4d430 if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 4d6a8: 4a8a tstl %a2 4d6aa: 6600 00b4 bnew 4d760 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d6ae: 2f39 0006 169c movel 6169c ,%sp@- 4d6b4: 4bf9 0004 8d40 lea 48d40 ,%a5 if (*pipep == NULL) { if (err) pipe_free(pipe); else *pipep = pipe; 4d6ba: 2882 movel %d2,%a4@ static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d6bc: 4e95 jsr %a5@ 4d6be: 588f addql #4,%sp 4d6c0: 6000 fd40 braw 4d402 if (pipe_semaphore == RTEMS_ID_NONE) { rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { sc = rtems_semaphore_create( 4d6c4: 4879 0006 169c pea 6169c 4d6ca: 42a7 clrl %sp@- 4d6cc: 4878 0054 pea 54 4d6d0: 4878 0001 pea 1 4d6d4: 2f3c 5049 5045 movel #1346981957,%sp@- 4d6da: 4eb9 0004 8950 jsr 48950 4d6e0: 2f39 0006 1d94 movel 61d94 ,%sp@- 4d6e6: 2400 movel %d0,%d2 4d6e8: 4eb9 0004 8d40 jsr 48d40 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4d6ee: 4fef 0018 lea %sp@(24),%sp 4d6f2: 4a82 tstl %d2 4d6f4: 6700 0116 beqw 4d80c sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); } if (sc == RTEMS_SUCCESSFUL) { 4d6f8: 347c fff4 moveaw #-12,%a2 return 0; out_error: pipe_release(pipep, iop); return err; } 4d6fc: 200a movel %a2,%d0 4d6fe: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4d704: 4e5e unlk %fp 4d706: 4e75 rts case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 4d708: 486e fffc pea %fp@(-4) 4d70c: 2f2a 002c movel %a2@(44),%sp@- 4d710: 4eb9 0004 e99c jsr 4e99c 4d716: 508f addql #8,%sp 4d718: 6000 ff2e braw 4d648 break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d71c: 486e fffc pea %fp@(-4) 4d720: 2f2a 0030 movel %a2@(48),%sp@- 4d724: 4eb9 0004 e99c jsr 4e99c 4d72a: 508f addql #8,%sp 4d72c: 6000 fed0 braw 4d5fe switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 4d730: 486e fffc pea %fp@(-4) 4d734: 2f2a 0030 movel %a2@(48),%sp@- 4d738: 4eb9 0004 e99c jsr 4e99c 4d73e: 508f addql #8,%sp 4d740: 6000 fd4a braw 4d48c PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d744: 2f03 movel %d3,%sp@- <== NOT EXECUTED goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 4d746: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d74a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d74c: 4eb9 0004 d2b0 jsr 4d2b0 <== NOT EXECUTED return err; 4d752: 508f addql #8,%sp <== NOT EXECUTED } 4d754: 200a movel %a2,%d0 4d756: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4d75c: 4e5e unlk %fp 4d75e: 4e75 rts /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d760: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d762: 49f9 0004 e8f8 lea 4e8f8 ,%a4 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); 4d768: 47f9 0004 4e28 lea 44e28 ,%a3 <== NOT EXECUTED /* Called with pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 4d76e: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4d772: 4e94 jsr %a4@ <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 4d774: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d776: 2f28 0030 movel %a0@(48),%sp@- <== NOT EXECUTED 4d77a: 4e94 jsr %a4@ <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 4d77c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d77e: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4d782: 4eb9 0004 8b18 jsr 48b18 <== NOT EXECUTED free(pipe->Buffer); 4d788: 2042 moveal %d2,%a0 <== NOT EXECUTED 4d78a: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4d78c: 4e93 jsr %a3@ <== NOT EXECUTED free(pipe); 4d78e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d790: 4e93 jsr %a3@ <== NOT EXECUTED 4d792: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d796: 2f39 0006 169c movel 6169c ,%sp@- <== NOT EXECUTED 4d79c: 4eb9 0004 8d40 jsr 48d40 <== NOT EXECUTED 4d7a2: 588f addql #4,%sp <== NOT EXECUTED return 0; out_error: pipe_release(pipep, iop); return err; } 4d7a4: 200a movel %a2,%d0 4d7a6: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5 4d7ac: 4e5e unlk %fp 4d7ae: 4e75 rts if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4d7b0: 2f2a 0028 movel %a2@(40),%sp@- err = -ENXIO; 4d7b4: 347c fffa moveaw #-6,%a2 if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 4d7b8: 4e95 jsr %a5@ err = -ENXIO; goto out_error; 4d7ba: 588f addql #4,%sp PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 4d7bc: 2f03 movel %d3,%sp@- 4d7be: 2f0c movel %a4,%sp@- 4d7c0: 4eb9 0004 d2b0 jsr 4d2b0 return err; 4d7c6: 508f addql #8,%sp 4d7c8: 608a bras 4d754 if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 4d7ca: 2042 moveal %d2,%a0 4d7cc: 45f9 0004 e8f8 lea 4e8f8 ,%a2 4d7d2: 2f28 0030 movel %a0@(48),%sp@- 4d7d6: 4e92 jsr %a2@ 4d7d8: 588f addql #4,%sp err_wbar: rtems_barrier_delete(pipe->readBarrier); 4d7da: 2042 moveal %d2,%a0 4d7dc: 2f28 002c movel %a0@(44),%sp@- 4d7e0: 4e92 jsr %a2@ 4d7e2: 588f addql #4,%sp err_rbar: free(pipe->Buffer); 4d7e4: 2042 moveal %d2,%a0 4d7e6: 45f9 0004 4e28 lea 44e28 ,%a2 4d7ec: 2f10 movel %a0@,%sp@- 4d7ee: 4e92 jsr %a2@ 4d7f0: 588f addql #4,%sp err_buf: free(pipe); 4d7f2: 2f02 movel %d2,%sp@- 4d7f4: 4e92 jsr %a2@ 4d7f6: 588f addql #4,%sp static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d7f8: 2f39 0006 169c movel 6169c ,%sp@- } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4d7fe: 347c fff4 moveaw #-12,%a2 static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 4d802: 4eb9 0004 8d40 jsr 48d40 4d808: 588f addql #4,%sp 4d80a: 6098 bras 4d7a4 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 4d80c: 2039 0006 169c movel 6169c ,%d0 4d812: 6000 fba4 braw 4d3b8 =============================================================================== 00043d7c : long fpathconf( int fd, int name ) { 43d7c: 4e56 0000 linkw %fp,#0 43d80: 202e 0008 movel %fp@(8),%d0 43d84: 222e 000c movel %fp@(12),%d1 43d88: 2f02 movel %d2,%sp@- long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 43d8a: b0b9 0005 fb22 cmpl 5fb22 ,%d0 43d90: 6400 00f2 bccw 43e84 iop = rtems_libio_iop(fd); 43d94: 2400 movel %d0,%d2 43d96: ed88 lsll #6,%d0 43d98: e78a lsll #3,%d2 43d9a: 2079 0006 1208 moveal 61208 ,%a0 43da0: 9082 subl %d2,%d0 43da2: d1c0 addal %d0,%a0 rtems_libio_check_is_open(iop); 43da4: 2028 0014 movel %a0@(20),%d0 43da8: 0280 0000 0100 andil #256,%d0 43dae: 6700 00d4 beqw 43e84 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 43db2: 2068 0028 moveal %a0@(40),%a0 switch ( name ) { 43db6: 700b moveq #11,%d0 43db8: b081 cmpl %d1,%d0 43dba: 6416 bccs 43dd2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dbc: 4eb9 0004 f070 jsr 4f070 <__errno> break; } return return_value; } 43dc2: 242e fffc movel %fp@(-4),%d2 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dc6: 2040 moveal %d0,%a0 43dc8: 7216 moveq #22,%d1 43dca: 70ff moveq #-1,%d0 break; } return return_value; } 43dcc: 4e5e unlk %fp break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43dce: 2081 movel %d1,%a0@ break; } return return_value; } 43dd0: 4e75 rts * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 43dd2: 303b 1a08 movew %pc@(43ddc ,%d1:l:2),%d0 43dd6: 48c0 extl %d0 43dd8: 4efb 0802 jmp %pc@(43ddc ,%d0:l) 43ddc: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43de2: 006c .short 0x006c <== NOT EXECUTED 43de4: 0060 .short 0x0060 <== NOT EXECUTED 43de6: 0054 .short 0x0054 <== NOT EXECUTED 43de8: 0048 .short 0x0048 <== NOT EXECUTED 43dea: 003c .short 0x003c <== NOT EXECUTED 43dec: 0030 .short 0x0030 <== NOT EXECUTED 43dee: 0024 .short 0x0024 <== NOT EXECUTED 43df0: 0018 .short 0x0018 <== NOT EXECUTED 43df2: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43df8: 4e5e unlk %fp break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 43dfa: 2028 005c movel %a0@(92),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43dfe: 4e75 rts 43e00: 242e fffc movel %fp@(-4),%d2 43e04: 4e5e unlk %fp break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 43e06: 2028 0050 movel %a0@(80),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e0a: 4e75 rts 43e0c: 242e fffc movel %fp@(-4),%d2 43e10: 4e5e unlk %fp break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 43e12: 2028 0064 movel %a0@(100),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e16: 4e75 rts 43e18: 242e fffc movel %fp@(-4),%d2 43e1c: 4e5e unlk %fp break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 43e1e: 2028 0058 movel %a0@(88),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e22: 4e75 rts 43e24: 242e fffc movel %fp@(-4),%d2 43e28: 4e5e unlk %fp break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 43e2a: 2028 0054 movel %a0@(84),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e2e: 4e75 rts 43e30: 242e fffc movel %fp@(-4),%d2 43e34: 4e5e unlk %fp break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 43e36: 2028 004c movel %a0@(76),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e3a: 4e75 rts 43e3c: 242e fffc movel %fp@(-4),%d2 43e40: 4e5e unlk %fp break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 43e42: 2028 0048 movel %a0@(72),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e46: 4e75 rts 43e48: 242e fffc movel %fp@(-4),%d2 43e4c: 4e5e unlk %fp break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 43e4e: 2028 0044 movel %a0@(68),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e52: 4e75 rts 43e54: 242e fffc movel %fp@(-4),%d2 43e58: 4e5e unlk %fp break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 43e5a: 2028 0040 movel %a0@(64),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e5e: 4e75 rts 43e60: 242e fffc movel %fp@(-4),%d2 43e64: 4e5e unlk %fp switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 43e66: 2028 003c movel %a0@(60),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e6a: 4e75 rts 43e6c: 242e fffc movel %fp@(-4),%d2 43e70: 4e5e unlk %fp the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 43e72: 2028 0038 movel %a0@(56),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e76: 4e75 rts 43e78: 242e fffc movel %fp@(-4),%d2 43e7c: 4e5e unlk %fp break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 43e7e: 2028 0060 movel %a0@(96),%d0 rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e82: 4e75 rts rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 43e84: 4eb9 0004 f070 jsr 4f070 <__errno> 43e8a: 7409 moveq #9,%d2 43e8c: 2040 moveal %d0,%a0 43e8e: 70ff moveq #-1,%d0 43e90: 2082 movel %d2,%a0@ rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 43e92: 242e fffc movel %fp@(-4),%d2 43e96: 4e5e unlk %fp ... =============================================================================== 000432dc : #include void free( void *ptr ) { 432dc: 4e56 0000 linkw %fp,#0 MSBUMP(free_calls, 1); 432e0: 52b9 0005 f80c addql #1,5f80c #include void free( void *ptr ) { 432e6: 2f02 movel %d2,%sp@- 432e8: 242e 0008 movel %fp@(8),%d2 MSBUMP(free_calls, 1); if ( !ptr ) 432ec: 6732 beqs 43320 return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 432ee: 7003 moveq #3,%d0 432f0: b0b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d0 432f6: 6758 beqs 43350 <== ALWAYS TAKEN } /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 432f8: 2079 0005 e7b8 moveal 5e7b8 ,%a0 432fe: 4a88 tstl %a0 43300: 670a beqs 4330c (*rtems_malloc_statistics_helpers->at_free)(ptr); 43302: 2f02 movel %d2,%sp@- 43304: 2068 0008 moveal %a0@(8),%a0 43308: 4e90 jsr %a0@ 4330a: 588f addql #4,%sp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 4330c: 2f02 movel %d2,%sp@- 4330e: 2f39 0005 e0ba movel 5e0ba ,%sp@- 43314: 4eb9 0004 86d8 jsr 486d8 <_Protected_heap_Free> 4331a: 508f addql #8,%sp 4331c: 4a00 tstb %d0 4331e: 6708 beqs 43328 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43320: 242e fffc movel %fp@(-4),%d2 43324: 4e5e unlk %fp 43326: 4e75 rts if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 43328: 2079 0005 e0ba moveal 5e0ba ,%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", 4332e: 2f28 001c movel %a0@(28),%sp@- 43332: 2f28 0018 movel %a0@(24),%sp@- 43336: 2f02 movel %d2,%sp@- 43338: 4879 0005 d224 pea 5d224 4333e: 4eb9 0004 4198 jsr 44198 RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 43344: 242e fffc movel %fp@(-4),%d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 43348: 4fef 0010 lea %sp@(16),%sp RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4334c: 4e5e unlk %fp 4334e: 4e75 rts /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { 43350: 4eb9 0004 349c jsr 4349c return; /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 43356: 4a00 tstb %d0 43358: 669e bnes 432f8 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4335a: 2d42 0008 movel %d2,%fp@(8) RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 4335e: 242e fffc movel %fp@(-4),%d2 43362: 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); 43364: 4ef9 0004 351e jmp 4351e ... =============================================================================== 00047060 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 47060: 4e56 0000 linkw %fp,#0 47064: 2f0b movel %a3,%sp@- 47066: 2f0a movel %a2,%sp@- 47068: 246e 0008 moveal %fp@(8),%a2 rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 4706c: b5fc 0006 30e8 cmpal #405736,%a2 47072: 6728 beqs 4709c <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 47074: 486a 0004 pea %a2@(4) 47078: 47f9 0004 5d30 lea 45d30 ,%a3 4707e: 4e93 jsr %a3@ rtems_filesystem_freenode( &env->root_directory); 47080: 486a 0018 pea %a2@(24) 47084: 4e93 jsr %a3@ free(env); } } 47086: 266e fffc moveal %fp@(-4),%a3 && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 4708a: 508f addql #8,%sp 4708c: 2d4a 0008 movel %a2,%fp@(8) } } 47090: 246e fff8 moveal %fp@(-8),%a2 47094: 4e5e unlk %fp && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 47096: 4ef9 0004 5d44 jmp 45d44 } } 4709c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 470a0: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 470a4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00042cf8 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 42cf8: 4e56 0000 linkw %fp,#0 42cfc: 202e 0008 movel %fp@(8),%d0 42d00: 2f02 movel %d2,%sp@- 42d02: 206e 000c moveal %fp@(12),%a0 42d06: 142e 0013 moveb %fp@(19),%d2 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major < disktab_size && disktab != NULL) { 42d0a: b0b9 0006 2dfe cmpl 62dfe ,%d0 42d10: 6436 bccs 42d48 <== NEVER TAKEN 42d12: 2239 0006 2e02 movel 62e02 ,%d1 42d18: 672e beqs 42d48 <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 42d1a: 2241 moveal %d1,%a1 42d1c: e788 lsll #3,%d0 42d1e: d3c0 addal %d0,%a1 if (minor < dtab->size && dtab->minor != NULL) { 42d20: b1e9 0004 cmpal %a1@(4),%a0 42d24: 6422 bccs 42d48 <== NEVER TAKEN 42d26: 2251 moveal %a1@,%a1 42d28: 4a89 tstl %a1 42d2a: 671c beqs 42d48 <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 42d2c: 2031 8c00 movel %a1@(00000000,%a0:l:4),%d0 if (dd != NULL && !lookup_only) { 42d30: 6710 beqs 42d42 42d32: 4a02 tstb %d2 42d34: 660c bnes 42d42 if (!dd->deleted) { 42d36: 2040 moveal %d0,%a0 42d38: 4a28 0030 tstb %a0@(48) 42d3c: 660a bnes 42d48 ++dd->uses; 42d3e: 52a8 0014 addql #1,%a0@(20) return dd; } } return NULL; } 42d42: 241f movel %sp@+,%d2 42d44: 4e5e unlk %fp 42d46: 4e75 rts 42d48: 241f movel %sp@+,%d2 if (dd != NULL && !lookup_only) { if (!dd->deleted) { ++dd->uses; } else { dd = NULL; 42d4a: 4280 clrl %d0 return dd; } } return NULL; } 42d4c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d700 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 5d700: 4e56 ffec linkw %fp,#-20 5d704: 202e 0008 movel %fp@(8),%d0 5d708: 2f0a movel %a2,%sp@- rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5d70a: b0b9 0005 ff82 cmpl 5ff82 ,%d0 5d710: 6464 bccs 5d776 <== NEVER TAKEN 5d712: 2200 movel %d0,%d1 5d714: ed88 lsll #6,%d0 5d716: e789 lsll #3,%d1 5d718: 2479 0006 16e8 moveal 616e8 ,%a2 5d71e: 9081 subl %d1,%d0 5d720: d5c0 addal %d0,%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5d722: 2d6a 0018 ffec movel %a2@(24),%fp@(-20) 5d728: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5d72e: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5d734: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5d73a: 206e fff8 moveal %fp@(-8),%a0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 5d73e: 2d6a 0028 fffc movel %a2@(40),%fp@(-4) if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 5d744: 486e ffec pea %fp@(-20) 5d748: 2068 0010 moveal %a0@(16),%a0 5d74c: 4e90 jsr %a0@ 5d74e: 588f addql #4,%sp 5d750: 7201 moveq #1,%d1 5d752: b280 cmpl %d0,%d1 5d754: 6624 bnes 5d77a /* * 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 ); 5d756: 206a 0020 moveal %a2@(32),%a0 5d75a: 2f2e 0010 movel %fp@(16),%sp@- 5d75e: 2f2e 000c movel %fp@(12),%sp@- 5d762: 2f0a movel %a2,%sp@- 5d764: 2068 0008 moveal %a0@(8),%a0 5d768: 4e90 jsr %a0@ } 5d76a: 246e ffe8 moveal %fp@(-24),%a2 /* * 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 ); 5d76e: 4fef 000c lea %sp@(12),%sp } 5d772: 4e5e unlk %fp 5d774: 4e75 rts rtems_filesystem_location_info_t loc; /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 5d776: 95ca subal %a2,%a2 <== NOT EXECUTED 5d778: 60a8 bras 5d722 <== NOT EXECUTED /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5d77a: 4eb9 0004 f190 jsr 4f190 <__errno> /* * 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 ); } 5d780: 246e ffe8 moveal %fp@(-24),%a2 /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5d784: 2040 moveal %d0,%a0 5d786: 7214 moveq #20,%d1 5d788: 70ff moveq #-1,%d0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } 5d78a: 4e5e unlk %fp /* * Make sure we are working on a directory */ loc = iop->pathinfo; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 5d78c: 2081 movel %d1,%a0@ <== NOT EXECUTED /* * 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 ); } =============================================================================== 00043bf6 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43bf6: 4e56 ffe0 linkw %fp,#-32 43bfa: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43bfe: 242e 0008 movel %fp@(8),%d2 43c02: 47fa fcce lea %pc@(438d2 ),%a3 for(;;) { if (!scangr(fp, grp, buffer, bufsize)) goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); 43c06: 49f9 0005 064c lea 5064c ,%a4 struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 43c0c: 2c2e 000c movel %fp@(12),%d6 43c10: 246e 0010 moveal %fp@(16),%a2 43c14: 2a2e 0014 movel %fp@(20),%d5 43c18: 282e 0018 movel %fp@(24),%d4 FILE *fp; int match; init_etc_passwd_group(); 43c1c: 4eb9 0004 3aec jsr 43aec if ((fp = fopen("/etc/group", "r")) == NULL) 43c22: 4879 0005 f0c3 pea 5f0c3 <_global_impure_ptr+0xc7> 43c28: 4879 0005 ea10 pea 5ea10 43c2e: 4eb9 0004 f4f6 jsr 4f4f6 43c34: 508f addql #8,%sp 43c36: 2600 movel %d0,%d3 43c38: 6778 beqs 43cb2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for(;;) { if (!scangr(fp, grp, buffer, bufsize)) 43c3a: 2f04 movel %d4,%sp@- 43c3c: 2f05 movel %d5,%sp@- 43c3e: 2f0a movel %a2,%sp@- 43c40: 2f03 movel %d3,%sp@- 43c42: 4e93 jsr %a3@ 43c44: 4fef 0010 lea %sp@(16),%sp 43c48: 4a80 tstl %d0 43c4a: 6744 beqs 43c90 goto error_einval; if (name) { 43c4c: 4a82 tstl %d2 43c4e: 672e beqs 43c7e match = (strcmp(grp->gr_name, name) == 0); 43c50: 2f02 movel %d2,%sp@- 43c52: 2f12 movel %a2@,%sp@- 43c54: 4e94 jsr %a4@ 43c56: 508f addql #8,%sp 43c58: 4a80 tstl %d0 43c5a: 57c0 seq %d0 43c5c: 49c0 extbl %d0 43c5e: 4480 negl %d0 } else { match = (grp->gr_gid == gid); } if (match) { 43c60: 67d8 beqs 43c3a fclose(fp); 43c62: 2f03 movel %d3,%sp@- 43c64: 4eb9 0004 ee34 jsr 4ee34 *result = grp; 43c6a: 206e 001c moveal %fp@(28),%a0 return 0; 43c6e: 588f addql #4,%sp 43c70: 4280 clrl %d0 match = (grp->gr_gid == gid); } if (match) { fclose(fp); *result = grp; 43c72: 208a movel %a2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 43c74: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43c7a: 4e5e unlk %fp 43c7c: 4e75 rts goto error_einval; if (name) { match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 43c7e: 4280 clrl %d0 43c80: 302a 0008 movew %a2@(8),%d0 43c84: bc80 cmpl %d0,%d6 43c86: 57c0 seq %d0 43c88: 49c0 extbl %d0 43c8a: 4480 negl %d0 } if (match) { 43c8c: 67ac beqs 43c3a 43c8e: 60d2 bras 43c62 *result = grp; return 0; } } error_einval: fclose(fp); 43c90: 2f03 movel %d3,%sp@- 43c92: 4eb9 0004 ee34 jsr 4ee34 rtems_set_errno_and_return_minus_one( EINVAL ); 43c98: 4eb9 0004 ed00 jsr 4ed00 <__errno> 43c9e: 588f addql #4,%sp 43ca0: 7216 moveq #22,%d1 43ca2: 2040 moveal %d0,%a0 43ca4: 70ff moveq #-1,%d0 } 43ca6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 return 0; } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); 43cac: 2081 movel %d1,%a0@ } 43cae: 4e5e unlk %fp 43cb0: 4e75 rts int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) rtems_set_errno_and_return_minus_one( EINVAL ); 43cb2: 4eb9 0004 ed00 jsr 4ed00 <__errno> 43cb8: 7416 moveq #22,%d2 43cba: 2040 moveal %d0,%a0 43cbc: 70ff moveq #-1,%d0 43cbe: 2082 movel %d2,%a0@ } } error_einval: fclose(fp); rtems_set_errno_and_return_minus_one( EINVAL ); } 43cc0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 43cc6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004336c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 4336c: 4e56 ffec linkw %fp,#-20 43370: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43374: 246e 0008 moveal %fp@(8),%a2 /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 43378: 4a8a tstl %a2 4337a: 673c beqs 433b8 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 4337c: 203c 0000 0700 movel #1792,%d0 43382: 40c2 movew %sr,%d2 43384: 8082 orl %d2,%d0 43386: 46c0 movew %d0,%sr _TOD_Get( &now ); 43388: 486e fff8 pea %fp@(-8) 4338c: 4eb9 0004 79a4 jsr 479a4 <_TOD_Get> _ISR_Enable(level); 43392: 46c2 movew %d2,%sr useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 43394: 263c 0000 03e8 movel #1000,%d3 * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 4339a: 588f addql #4,%sp 4339c: 4280 clrl %d0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 4339e: 222e fffc movel %fp@(-4),%d1 useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 433a2: 4c43 1801 remsl %d3,%d1,%d1 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 433a6: 24ae fff8 movel %fp@(-8),%a2@ time->tv_usec = useconds; 433aa: 2541 0004 movel %d1,%a2@(4) } 433ae: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 433b4: 4e5e unlk %fp 433b6: 4e75 rts void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 433b8: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 433be: 720e moveq #14,%d1 <== NOT EXECUTED 433c0: 2040 moveal %d0,%a0 <== NOT EXECUTED 433c2: 70ff moveq #-1,%d0 <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 433c4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) rtems_set_errno_and_return_minus_one( EFAULT ); 433ca: 2081 movel %d1,%a0@ <== NOT EXECUTED * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 433cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d850 : 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 ) 4d850: 7001 moveq #1,%d0 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4d852: 4e56 0000 linkw %fp,#0 4d856: 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 ) 4d85a: 2268 0018 moveal %a0@(24),%a1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4d85e: 2f02 movel %d2,%sp@- 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 ) 4d860: b0a9 0048 cmpl %a1@(72),%d0 4d864: 6614 bnes 4d87a <== NEVER TAKEN return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; 4d866: 4200 clrb %d0 the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4d868: 4281 clrl %d1 4d86a: 4282 clrl %d2 4d86c: 2141 000c movel %d1,%a0@(12) 4d870: 2142 0010 movel %d2,%a0@(16) return 0; } 4d874: 241f movel %sp@+,%d2 4d876: 4e5e unlk %fp 4d878: 4e75 rts 4d87a: 241f movel %sp@+,%d2 <== NOT EXECUTED /* 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 */ 4d87c: 70ff moveq #-1,%d0 <== NOT EXECUTED iop->offset = 0; return 0; } 4d87e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004dab8 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4dab8: 4e56 0000 linkw %fp,#0 4dabc: 206e 000c moveal %fp@(12),%a0 4dac0: 2f0a movel %a2,%sp@- IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4dac2: 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 ); 4dac4: 200a movel %a2,%d0 4dac6: 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 ) ) 4dacc: b0aa 004c cmpl %a2@(76),%d0 4dad0: 6642 bnes 4db14 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; 4dad2: 2068 0010 moveal %a0@(16),%a0 /* * You cannot remove the file system root node. */ if ( rtems_filesystem_is_root_location(pathloc) ) 4dad6: b5e8 001c cmpal %a0@(28),%a2 4dada: 6722 beqs 4dafe /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4dadc: 4aaa 0058 tstl %a2@(88) 4dae0: 661c bnes 4dafe <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); 4dae2: 2f0a movel %a2,%sp@- 4dae4: 4eb9 0004 b26c jsr 4b26c IMFS_check_node_remove( the_jnode ); 4daea: 2f0a movel %a2,%sp@- 4daec: 4eb9 0004 b2b0 jsr 4b2b0 return 0; } 4daf2: 246e fffc moveal %fp@(-4),%a2 rtems_set_errno_and_return_minus_one( EBUSY ); IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; 4daf6: 508f addql #8,%sp 4daf8: 4280 clrl %d0 } 4dafa: 4e5e unlk %fp 4dafc: 4e75 rts /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4dafe: 4eb9 0004 e084 jsr 4e084 <__errno> IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4db04: 246e fffc moveal %fp@(-4),%a2 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4db08: 2040 moveal %d0,%a0 4db0a: 7210 moveq #16,%d1 4db0c: 70ff moveq #-1,%d0 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4db0e: 4e5e unlk %fp /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4db10: 2081 movel %d1,%a0@ IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4db12: 4e75 rts /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4db14: 4eb9 0004 e084 jsr 4e084 <__errno> IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4db1a: 246e fffc moveal %fp@(-4),%a2 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4db1e: 2040 moveal %d0,%a0 4db20: 725a moveq #90,%d1 4db22: 70ff moveq #-1,%d0 IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } 4db24: 4e5e unlk %fp /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4db26: 2081 movel %d1,%a0@ IMFS_create_orphan( the_jnode ); IMFS_check_node_remove( the_jnode ); return 0; } ... =============================================================================== 000452b8 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 452b8: 4e56 fff4 linkw %fp,#-12 452bc: 222e 0008 movel %fp@(8),%d1 452c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 452c4: 246e 000c moveal %fp@(12),%a2 if (tty->termios.c_iflag & ISTRIP) 452c8: 202a 0030 movel %a2@(48),%d0 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 452cc: 1401 moveb %d1,%d2 if (tty->termios.c_iflag & ISTRIP) 452ce: 0800 0005 btst #5,%d0 452d2: 6704 beqs 452d8 <== ALWAYS TAKEN c &= 0x7f; 452d4: 747f moveq #127,%d2 <== NOT EXECUTED 452d6: c481 andl %d1,%d2 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 452d8: 0800 0009 btst #9,%d0 452dc: 6720 beqs 452fe c = tolower (c); 452de: 2079 0005 e2c0 moveal 5e2c0 <__ctype_ptr__>,%a0 452e4: 7603 moveq #3,%d3 452e6: 0282 0000 00ff andil #255,%d2 452ec: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 452f0: 49c1 extbl %d1 452f2: c283 andl %d3,%d1 452f4: 163c 0001 moveb #1,%d3 452f8: b681 cmpl %d1,%d3 452fa: 6700 00e0 beqw 453dc if (c == '\r') { 452fe: 4281 clrl %d1 45300: 1202 moveb %d2,%d1 45302: 760d moveq #13,%d3 45304: b681 cmpl %d1,%d3 45306: 6740 beqs 45348 if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 45308: 760a moveq #10,%d3 4530a: b681 cmpl %d1,%d3 4530c: 6700 00c4 beqw 453d2 c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45310: 4a02 tstb %d2 45312: 664c bnes 45360 <== ALWAYS TAKEN } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 45314: 2039 0005 e238 movel 5e238 ,%d0 4531a: 5380 subql #1,%d0 4531c: 222a 0020 movel %a2@(32),%d1 45320: b081 cmpl %d1,%d0 45322: 6f28 bles 4534c <== NEVER TAKEN if (tty->termios.c_lflag & ECHO) 45324: 7008 moveq #8,%d0 45326: c0aa 003c andl %a2@(60),%d0 4532a: 6600 00ba bnew 453e6 echo (c, tty); tty->cbuf[tty->ccount++] = c; 4532e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED } return 0; 45332: 4280 clrl %d0 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45334: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45338: 5281 addql #1,%d1 <== NOT EXECUTED 4533a: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED } return 0; } 4533e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45344: 4e5e unlk %fp 45346: 4e75 rts if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 45348: 4a00 tstb %d0 4534a: 6c0c bges 45358 <== ALWAYS TAKEN if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 4534c: 4280 clrl %d0 <== NOT EXECUTED } 4534e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45354: 4e5e unlk %fp <== NOT EXECUTED 45356: 4e75 rts <== NOT EXECUTED c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 45358: 0800 0008 btst #8,%d0 4535c: 6702 beqs 45360 <== NEVER TAKEN c = '\n'; 4535e: 740a moveq #10,%d2 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 45360: 222a 003c movel %a2@(60),%d1 45364: 0801 0001 btst #1,%d1 45368: 67aa beqs 45314 if (c == tty->termios.c_cc[VERASE]) { 4536a: 4283 clrl %d3 4536c: 162a 0043 moveb %a2@(67),%d3 45370: 4280 clrl %d0 45372: 1002 moveb %d2,%d0 45374: b083 cmpl %d3,%d0 45376: 6700 0122 beqw 4549a erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 4537a: 4283 clrl %d3 4537c: 162a 0044 moveb %a2@(68),%d3 45380: b083 cmpl %d3,%d0 45382: 6700 00a8 beqw 4542c erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 45386: 4283 clrl %d3 45388: 162a 0045 moveb %a2@(69),%d3 4538c: b083 cmpl %d3,%d0 4538e: 6700 00fe beqw 4548e return 1; } else if (c == '\n') { 45392: 760a moveq #10,%d3 45394: b680 cmpl %d0,%d3 45396: 6700 00ac beqw 45444 if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 4539a: 4283 clrl %d3 4539c: 162a 004c moveb %a2@(76),%d3 453a0: b083 cmpl %d3,%d0 453a2: 670c beqs 453b0 <== NEVER TAKEN 453a4: 4283 clrl %d3 453a6: 162a 0051 moveb %a2@(81),%d3 453aa: b083 cmpl %d3,%d0 453ac: 6600 ff66 bnew 45314 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 453b0: 44c1 movew %d1,%ccr <== NOT EXECUTED 453b2: 6b58 bmis 4540c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 453b4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 453b8: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 453ba: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 453be: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 453c2: 5281 addql #1,%d1 <== NOT EXECUTED 453c4: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 453c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 453ce: 4e5e unlk %fp <== NOT EXECUTED 453d0: 4e75 rts <== NOT EXECUTED if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 453d2: 0800 0006 btst #6,%d0 453d6: 6788 beqs 45360 <== ALWAYS TAKEN c = '\r'; 453d8: 740d moveq #13,%d2 <== NOT EXECUTED 453da: 6084 bras 45360 <== NOT EXECUTED { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 453dc: 0682 0000 0020 addil #32,%d2 453e2: 6000 ff1a braw 452fe /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 453e6: 2f0a movel %a2,%sp@- 453e8: 4280 clrl %d0 453ea: 1002 moveb %d2,%d0 453ec: 2f00 movel %d0,%sp@- 453ee: 4eba fc48 jsr %pc@(45038 ) 453f2: 222a 0020 movel %a2@(32),%d1 453f6: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; } return 0; 453f8: 4280 clrl %d0 * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 453fa: 206a 001c moveal %a2@(28),%a0 453fe: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45402: 5281 addql #1,%d1 45404: 2541 0020 movel %d1,%a2@(32) 45408: 6000 ff34 braw 4533e tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 4540c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4540e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45410: 4eba fc26 jsr %pc@(45038 ) <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 45414: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 45418: 508f addql #8,%sp <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; 4541a: 7001 moveq #1,%d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4541c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45420: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45424: 5281 addql #1,%d1 <== NOT EXECUTED 45426: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 4542a: 609c bras 453c8 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 4542c: 4878 0001 pea 1 45430: 2f0a movel %a2,%sp@- 45432: 4eba fc92 jsr %pc@(450c6 ) return 0; 45436: 508f addql #8,%sp 45438: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 4543a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45440: 4e5e unlk %fp 45442: 4e75 rts return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 45444: 7048 moveq #72,%d0 45446: c280 andl %d0,%d1 45448: 6620 bnes 4546a <== ALWAYS TAKEN echo (c, tty); tty->cbuf[tty->ccount++] = c; 4544a: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED return 1; 4544e: 7001 moveq #1,%d0 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 45450: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 45454: 740a moveq #10,%d2 <== NOT EXECUTED 45456: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 4545a: 5281 addql #1,%d1 <== NOT EXECUTED 4545c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45460: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45466: 4e5e unlk %fp 45468: 4e75 rts } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4546a: 2f0a movel %a2,%sp@- 4546c: 4878 000a pea a tty->cbuf[tty->ccount++] = c; 45470: 740a moveq #10,%d2 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 45472: 4eba fbc4 jsr %pc@(45038 ) tty->cbuf[tty->ccount++] = c; 45476: 222a 0020 movel %a2@(32),%d1 } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 4547a: 508f addql #8,%sp tty->cbuf[tty->ccount++] = c; return 1; 4547c: 7001 moveq #1,%d0 else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; 4547e: 206a 001c moveal %a2@(28),%a0 45482: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 45486: 5281 addql #1,%d1 45488: 2541 0020 movel %d1,%a2@(32) 4548c: 60d2 bras 45460 else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 4548e: 7001 moveq #1,%d0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 45490: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45496: 4e5e unlk %fp <== NOT EXECUTED 45498: 4e75 rts <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 4549a: 42a7 clrl %sp@- 4549c: 2f0a movel %a2,%sp@- 4549e: 4eba fc26 jsr %pc@(450c6 ) return 0; 454a2: 508f addql #8,%sp 454a4: 4280 clrl %d0 if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 454a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 454ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005bb78 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 5bb78: 4280 clrl %d0 <== NOT EXECUTED * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 5bb7a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED return 0; } 5bb7e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043b84 : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 43b84: 7003 moveq #3,%d0 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 43b86: 4e56 0000 linkw %fp,#0 43b8a: 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())) 43b8c: b0b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d0 43b92: 6708 beqs 43b9c <== ALWAYS TAKEN */ fclose (stdin); fclose (stdout); fclose (stderr); } 43b94: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 43b98: 4e5e unlk %fp <== NOT EXECUTED 43b9a: 4e75 rts <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 43b9c: 2479 0005 d812 moveal 5d812 <_global_impure_ptr>,%a2 43ba2: b5f9 0005 e2c4 cmpal 5e2c4 <_impure_ptr>,%a2 43ba8: 6710 beqs 43bba _wrapup_reent(_global_impure_ptr); 43baa: 2f0a movel %a2,%sp@- 43bac: 4eb9 0004 eaee jsr 4eaee <_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; 43bb2: 588f addql #4,%sp 43bb4: 23ca 0005 e2c4 movel %a2,5e2c4 <_impure_ptr> * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 43bba: 2f2a 0004 movel %a2@(4),%sp@- 43bbe: 45f9 0004 e1b8 lea 4e1b8 ,%a2 43bc4: 4e92 jsr %a2@ fclose (stdout); 43bc6: 2079 0005 e2c4 moveal 5e2c4 <_impure_ptr>,%a0 43bcc: 2f28 0008 movel %a0@(8),%sp@- 43bd0: 4e92 jsr %a2@ fclose (stderr); 43bd2: 2079 0005 e2c4 moveal 5e2c4 <_impure_ptr>,%a0 43bd8: 2f28 000c movel %a0@(12),%sp@- 43bdc: 4e92 jsr %a2@ } 43bde: 246e fffc moveal %fp@(-4),%a2 * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); 43be2: 4fef 000c lea %sp@(12),%sp } 43be6: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000445e8 : int link( const char *existing, const char *new ) { 445e8: 4e56 ffc0 linkw %fp,#-64 445ec: 48d7 041c moveml %d2-%d4/%a2,%sp@ 445f0: 242e 0008 movel %fp@(8),%d2 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 445f4: 260e movel %fp,%d3 445f6: 0683 ffff ffd0 addil #-48,%d3 445fc: 2f02 movel %d2,%sp@- int link( const char *existing, const char *new ) { 445fe: 282e 000c movel %fp@(12),%d4 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 44602: 4eb9 0005 082c jsr 5082c 44608: 7201 moveq #1,%d1 4460a: 2e81 movel %d1,%sp@ 4460c: 2f03 movel %d3,%sp@- 4460e: 42a7 clrl %sp@- 44610: 2f00 movel %d0,%sp@- 44612: 2f02 movel %d2,%sp@- 44614: 4eb9 0004 3f24 jsr 43f24 0, &existing_loc, true ); if ( result != 0 ) 4461a: 4fef 0014 lea %sp@(20),%sp 4461e: 4a80 tstl %d0 44620: 6600 009c bnew 446be /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 44624: 240e movel %fp,%d2 44626: 0682 ffff ffe4 addil #-28,%d2 4462c: 2f02 movel %d2,%sp@- 4462e: 486e fff8 pea %fp@(-8) 44632: 2f04 movel %d4,%sp@- 44634: 4eb9 0004 56c0 jsr 456c0 result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 4463a: 486e fffc pea %fp@(-4) 4463e: d8ae fff8 addl %fp@(-8),%d4 44642: 2f02 movel %d2,%sp@- 44644: 206e fff0 moveal %fp@(-16),%a0 44648: 2f04 movel %d4,%sp@- 4464a: 2068 0004 moveal %a0@(4),%a0 4464e: 4e90 jsr %a0@ if ( result != 0 ) { 44650: 4fef 0018 lea %sp@(24),%sp 44654: 4a80 tstl %d0 44656: 6674 bnes 446cc <== NEVER TAKEN /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 44658: 202e ffe0 movel %fp@(-32),%d0 4465c: b0ae fff4 cmpl %fp@(-12),%d0 44660: 6632 bnes 44694 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 44662: 2f2e fffc movel %fp@(-4),%sp@- rtems_filesystem_freenode( &existing_loc ); 44666: 45f9 0004 4134 lea 44134 ,%a2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 4466c: 206e fff0 moveal %fp@(-16),%a0 44670: 2f02 movel %d2,%sp@- 44672: 2f03 movel %d3,%sp@- 44674: 2068 0008 moveal %a0@(8),%a0 44678: 4e90 jsr %a0@ 4467a: 2800 movel %d0,%d4 rtems_filesystem_freenode( &existing_loc ); 4467c: 2f03 movel %d3,%sp@- 4467e: 4e92 jsr %a2@ rtems_filesystem_freenode( &parent_loc ); 44680: 2f02 movel %d2,%sp@- 44682: 4e92 jsr %a2@ return result; 44684: 4fef 0014 lea %sp@(20),%sp } 44688: 2004 movel %d4,%d0 4468a: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 44690: 4e5e unlk %fp 44692: 4e75 rts * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 44694: 2f03 movel %d3,%sp@- 44696: 45f9 0004 4134 lea 44134 ,%a2 rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); 4469c: 78ff moveq #-1,%d4 * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 4469e: 4e92 jsr %a2@ rtems_filesystem_freenode( &parent_loc ); 446a0: 2f02 movel %d2,%sp@- 446a2: 4e92 jsr %a2@ rtems_set_errno_and_return_minus_one( EXDEV ); 446a4: 4eb9 0004 f4c0 jsr 4f4c0 <__errno> 446aa: 508f addql #8,%sp 446ac: 2040 moveal %d0,%a0 446ae: 7012 moveq #18,%d0 446b0: 2080 movel %d0,%a0@ rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446b2: 2004 movel %d4,%d0 446b4: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446ba: 4e5e unlk %fp 446bc: 4e75 rts */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 0, &existing_loc, true ); if ( result != 0 ) return -1; 446be: 78ff moveq #-1,%d4 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446c0: 2004 movel %d4,%d0 446c2: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446c8: 4e5e unlk %fp 446ca: 4e75 rts rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 446cc: 2f03 movel %d3,%sp@- return -1; 446ce: 78ff moveq #-1,%d4 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 446d0: 4eb9 0004 4134 jsr 44134 return -1; 446d6: 588f addql #4,%sp rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 446d8: 2004 movel %d4,%d0 446da: 4cee 041c ffc0 moveml %fp@(-64),%d2-%d4/%a2 446e0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004360c : #include "malloc_p.h" void *malloc( size_t size ) { 4360c: 4e56 0000 linkw %fp,#0 void *return_this; MSBUMP(malloc_calls, 1); 43610: 52b9 0005 f804 addql #1,5f804 #include "malloc_p.h" void *malloc( size_t size ) { 43616: 2f03 movel %d3,%sp@- 43618: 262e 0008 movel %fp@(8),%d3 4361c: 2f02 movel %d2,%sp@- MSBUMP(malloc_calls, 1); /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4361e: 4eb9 0004 34dc jsr 434dc /* * Validate the parameters */ if ( !size ) 43624: 4a83 tstl %d3 43626: 6762 beqs 4368a return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43628: 7003 moveq #3,%d0 4362a: b0b9 0005 fa78 cmpl 5fa78 <_System_state_Current>,%d0 43630: 674e beqs 43680 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 43632: 42a7 clrl %sp@- 43634: 42a7 clrl %sp@- 43636: 2f03 movel %d3,%sp@- 43638: 2f39 0005 e0ba movel 5e0ba ,%sp@- 4363e: 4eb9 0004 8698 jsr 48698 <_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 ) { 43644: 4fef 0010 lea %sp@(16),%sp 43648: 2400 movel %d0,%d2 4364a: 674e beqs 4369a } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4364c: 2079 0005 e7b0 moveal 5e7b0 ,%a0 43652: 4a88 tstl %a0 43654: 6708 beqs 4365e (*rtems_malloc_dirty_helper)( return_this, size ); 43656: 2f03 movel %d3,%sp@- 43658: 2f02 movel %d2,%sp@- 4365a: 4e90 jsr %a0@ 4365c: 508f addql #8,%sp /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4365e: 2079 0005 e7b8 moveal 5e7b8 ,%a0 43664: 4a88 tstl %a0 43666: 670a beqs 43672 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 43668: 2f02 movel %d2,%sp@- 4366a: 2068 0004 moveal %a0@(4),%a0 4366e: 4e90 jsr %a0@ 43670: 588f addql #4,%sp return return_this; } 43672: 2002 movel %d2,%d0 43674: 242e fff8 movel %fp@(-8),%d2 43678: 262e fffc movel %fp@(-4),%d3 4367c: 4e5e unlk %fp 4367e: 4e75 rts /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) 43680: 4eb9 0004 349c jsr 4349c return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 43686: 4a00 tstb %d0 43688: 66a8 bnes 43632 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) return NULL; 4368a: 4282 clrl %d2 */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 4368c: 2002 movel %d2,%d0 4368e: 242e fff8 movel %fp@(-8),%d2 43692: 262e fffc movel %fp@(-4),%d3 43696: 4e5e unlk %fp 43698: 4e75 rts */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4369a: 2079 0005 e7b4 moveal 5e7b4 ,%a0 436a0: 4a88 tstl %a0 436a2: 6712 beqs 436b6 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 436a4: 2f03 movel %d3,%sp@- 436a6: 2068 0004 moveal %a0@(4),%a0 436aa: 4e90 jsr %a0@ if ( !return_this ) { 436ac: 588f addql #4,%sp 436ae: 4a80 tstl %d0 436b0: 6704 beqs 436b6 436b2: 2400 movel %d0,%d2 436b4: 6096 bras 4364c errno = ENOMEM; 436b6: 4eb9 0004 e084 jsr 4e084 <__errno> */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 436bc: 262e fffc movel %fp@(-4),%d3 if ( !return_this ) { if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; 436c0: 2040 moveal %d0,%a0 436c2: 700c moveq #12,%d0 436c4: 2080 movel %d0,%a0@ */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); return return_this; } 436c6: 2002 movel %d2,%d0 436c8: 242e fff8 movel %fp@(-8),%d2 436cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000434dc : void malloc_deferred_frees_process(void) { 434dc: 4e56 0000 linkw %fp,#0 434e0: 2f0b movel %a3,%sp@- /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 434e2: 47f9 0004 32dc lea 432dc ,%a3 { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 434e8: 2f0a movel %a2,%sp@- */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 434ea: 4879 0005 f7f4 pea 5f7f4 434f0: 45f9 0004 757c lea 4757c <_Chain_Get>,%a2 434f6: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 434f8: 588f addql #4,%sp 434fa: 4a80 tstl %d0 434fc: 6714 beqs 43512 free(to_be_freed); 434fe: 2f00 movel %d0,%sp@- 43500: 4e93 jsr %a3@ 43502: 588f addql #4,%sp 43504: 4879 0005 f7f4 pea 5f7f4 4350a: 4e92 jsr %a2@ rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 4350c: 588f addql #4,%sp 4350e: 4a80 tstl %d0 43510: 66ec bnes 434fe <== NEVER TAKEN free(to_be_freed); } 43512: 246e fff8 moveal %fp@(-8),%a2 43516: 266e fffc moveal %fp@(-4),%a3 4351a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00043600 : } void *malloc_sbrk_extend_and_allocate( size_t size ) { 43600: 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; 43604: 2039 0005 fae4 movel 5fae4 ,%d0 } void *malloc_sbrk_extend_and_allocate( size_t size ) { 4360a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4360e: 262e 0008 movel %fp@(8),%d3 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) 43612: 4a80 tstl %d0 43614: 675c beqs 43672 <== NEVER TAKEN return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43616: 2403 movel %d3,%d2 43618: d480 addl %d0,%d2 starting_address = (void *) sbrk(the_size); 4361a: 45f9 0004 0750 lea 40750 ,%a2 sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 43620: 4c40 2002 remul %d0,%d2,%d2 43624: 4c00 2800 mulsl %d0,%d2 starting_address = (void *) sbrk(the_size); 43628: 2f02 movel %d2,%sp@- 4362a: 4e92 jsr %a2@ if ( starting_address == (void*) -1 ) 4362c: 588f addql #4,%sp 4362e: 72ff moveq #-1,%d1 43630: b280 cmpl %d0,%d1 43632: 673e beqs 43672 return (void *) 0; if ( !_Protected_heap_Extend( 43634: 2f02 movel %d2,%sp@- 43636: 2f00 movel %d0,%sp@- 43638: 2f39 0005 e22a movel 5e22a ,%sp@- 4363e: 4eb9 0004 8630 jsr 48630 <_Protected_heap_Extend> 43644: 4fef 000c lea %sp@(12),%sp 43648: 4a00 tstb %d0 4364a: 6732 beqs 4367e 4364c: 42a7 clrl %sp@- sbrk(-the_size); errno = ENOMEM; return (void *) 0; } MSBUMP(space_available, the_size); 4364e: d5b9 0005 fab8 addl %d2,5fab8 43654: 42a7 clrl %sp@- 43656: 2f03 movel %d3,%sp@- 43658: 2f39 0005 e22a movel 5e22a ,%sp@- 4365e: 4eb9 0004 85f0 jsr 485f0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; 43664: 4fef 0010 lea %sp@(16),%sp } 43668: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4366e: 4e5e unlk %fp 43670: 4e75 rts the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; 43672: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 43674: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4367a: 4e5e unlk %fp 4367c: 4e75 rts if ( starting_address == (void*) -1 ) return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 4367e: 4482 negl %d2 43680: 2f02 movel %d2,%sp@- 43682: 4e92 jsr %a2@ errno = ENOMEM; 43684: 4eb9 0004 e294 jsr 4e294 <__errno> return (void *) 0; 4368a: 588f addql #4,%sp return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 4368c: 720c moveq #12,%d1 4368e: 2040 moveal %d0,%a0 return (void *) 0; 43690: 4280 clrl %d0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 43692: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 return (void *) 0; if ( !_Protected_heap_Extend( RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); errno = ENOMEM; 43698: 2081 movel %d1,%a0@ MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } 4369a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004369e : void *malloc_sbrk_initialize( void *starting_address, size_t length ) { 4369e: 4e56 0000 linkw %fp,#0 436a2: 222e 000c movel %fp@(12),%d1 436a6: 202e 0008 movel %fp@(8),%d0 uintptr_t old_address; uintptr_t uaddress; RTEMS_Malloc_Sbrk_amount = length; 436aa: 23c1 0005 fae4 movel %d1,5fae4 * 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) { 436b0: 4a80 tstl %d0 436b2: 6704 beqs 436b8 } starting_address = (void *)uaddress; } return starting_address; } 436b4: 4e5e unlk %fp 436b6: 4e75 rts * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 436b8: 2f01 movel %d1,%sp@- 436ba: 4eb9 0004 0750 jsr 40750 if (uaddress == (uintptr_t) -1) { 436c0: 588f addql #4,%sp 436c2: 72ff moveq #-1,%d1 436c4: b280 cmpl %d0,%d1 436c6: 6710 beqs 436d8 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 436c8: 7203 moveq #3,%d1 <== NOT EXECUTED 436ca: c280 andl %d0,%d1 <== NOT EXECUTED 436cc: 67e6 beqs 436b4 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 436ce: 5880 addql #4,%d0 <== NOT EXECUTED 436d0: 72fc moveq #-4,%d1 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 436d2: 4e5e unlk %fp <== NOT EXECUTED /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 436d4: c081 andl %d1,%d0 <== NOT EXECUTED } starting_address = (void *)uaddress; } return starting_address; } 436d6: 4e75 rts <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 436d8: 4878 001a pea 1a 436dc: 4eb9 0004 7220 jsr 47220 ... =============================================================================== 0004cf72 : */ void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4cf72: 4e56 ffec linkw %fp,#-20 4cf76: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4cf7a: 286e 0008 moveal %fp@(8),%a4 4cf7e: 47f9 0004 cf58 lea 4cf58 ,%a3 4cf84: 262e 000c movel %fp@(12),%d3 IMFS_assert( block_table ); /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 4cf88: 2454 moveal %a4@,%a2 for ( i=0 ; i<== NEVER TAKEN 4cf8c: 4282 clrl %d2 if ( b[i] ) { 4cf8e: 201a movel %a2@+,%d0 /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 4cf96: 2f00 movel %d0,%sp@- 4cf98: 4e93 jsr %a3@ b[i] = 0; 4cf9a: 588f addql #4,%sp 4cf9c: 42aa fffc clrl %a2@(-4) /* * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4cfa4: 2454 moveal %a4@,%a2 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4cfa6: 2f0a movel %a2,%sp@- 4cfa8: 4e93 jsr %a3@ *block_table = 0; 4cfaa: 588f addql #4,%sp 4cfac: 4294 clrl %a4@ } 4cfae: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4cfb4: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d552 : { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 4d552: 7006 moveq #6,%d0 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 4d554: 4e56 ffe8 linkw %fp,#-24 4d558: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4d55c: 246e 0008 moveal %fp@(8),%a2 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4d560: 266a 0018 moveal %a2@(24),%a3 if (the_jnode->type == IMFS_LINEAR_FILE) { 4d564: b0ab 0048 cmpl %a3@(72),%d0 4d568: 673a beqs 4d5a4 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4d56a: 2f2a 0010 movel %a2@(16),%sp@- 4d56e: 2f2a 000c movel %a2@(12),%sp@- 4d572: 2f0b movel %a3,%sp@- 4d574: 4eb9 0004 d0f6 jsr 4d0f6 4d57a: 4fef 000c lea %sp@(12),%sp 4d57e: 4a80 tstl %d0 4d580: 6652 bnes 4d5d4 rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4d582: 202b 004c movel %a3@(76),%d0 4d586: 222b 0050 movel %a3@(80),%d1 4d58a: 2540 0004 movel %d0,%a2@(4) 4d58e: 2541 0008 movel %d1,%a2@(8) 4d592: 202a 000c movel %a2@(12),%d0 4d596: 222a 0010 movel %a2@(16),%d1 } return iop->offset; } 4d59a: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4d5a0: 4e5e unlk %fp 4d5a2: 4e75 rts IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 4d5a4: 202a 000c movel %a2@(12),%d0 4d5a8: 222a 0010 movel %a2@(16),%d1 4d5ac: 242b 004c movel %a3@(76),%d2 4d5b0: 262b 0050 movel %a3@(80),%d3 4d5b4: 2800 movel %d0,%d4 4d5b6: 2a01 movel %d1,%d5 4d5b8: 9a83 subl %d3,%d5 4d5ba: 9982 subxl %d2,%d4 4d5bc: 6fdc bles 4d59a <== ALWAYS TAKEN iop->offset = the_jnode->info.linearfile.size; 4d5be: 2002 movel %d2,%d0 <== NOT EXECUTED 4d5c0: 2203 movel %d3,%d1 <== NOT EXECUTED 4d5c2: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 4d5c6: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 4d5ca: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4d5d0: 4e5e unlk %fp <== NOT EXECUTED 4d5d2: 4e75 rts <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4d5d4: 4eb9 0004 e084 jsr 4e084 <__errno> 4d5da: 7a1c moveq #28,%d5 4d5dc: 2040 moveal %d0,%a0 4d5de: 2085 movel %d5,%a0@ iop->size = the_jnode->info.file.size; } return iop->offset; } 4d5e0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4d5e6: 70ff moveq #-1,%d0 4d5e8: 72ff moveq #-1,%d1 iop->size = the_jnode->info.file.size; } return iop->offset; } 4d5ea: 4e5e unlk %fp ... =============================================================================== 0004d41a : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4d41a: 4e56 fff0 linkw %fp,#-16 4d41e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4d422: 246e 0008 moveal %fp@(8),%a2 the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4d426: 202a 0014 movel %a2@(20),%d0 4d42a: 2200 movel %d0,%d1 4d42c: 0281 0000 0204 andil #516,%d1 uint32_t mode ) { IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 4d432: 266a 0018 moveal %a2@(24),%a3 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4d436: 6708 beqs 4d440 && (the_jnode->type == IMFS_LINEAR_FILE)) { 4d438: 7206 moveq #6,%d1 4d43a: b2ab 0048 cmpl %a3@(72),%d1 4d43e: 6732 beqs 4d472 <== NEVER TAKEN the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4d440: 206b 004c moveal %a3@(76),%a0 4d444: 226b 0050 moveal %a3@(80),%a1 return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4d448: 0800 0009 btst #9,%d0 4d44c: 6710 beqs 4d45e iop->offset = the_jnode->info.file.size; 4d44e: 2548 000c movel %a0,%a2@(12) 4d452: 2549 0010 movel %a1,%a2@(16) 4d456: 206b 004c moveal %a3@(76),%a0 4d45a: 226b 0050 moveal %a3@(80),%a1 iop->size = the_jnode->info.file.size; return 0; 4d45e: 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; 4d460: 2548 0004 movel %a0,%a2@(4) 4d464: 2549 0008 movel %a1,%a2@(8) return 0; } 4d468: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4d46e: 4e5e unlk %fp 4d470: 4e75 rts /* * 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; 4d472: 202b 0050 movel %a3@(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; 4d476: 4282 clrl %d2 <== NOT EXECUTED 4d478: 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; 4d47a: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4d47e: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4d482: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED 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; the_jnode->type = IMFS_MEMORY_FILE; 4d486: 7605 moveq #5,%d3 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4d488: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED 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; the_jnode->type = IMFS_MEMORY_FILE; 4d48c: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4d490: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 4d494: 42ab 005c clrl %a3@(92) <== NOT EXECUTED if ((count != 0) 4d498: 4a80 tstl %d0 <== NOT EXECUTED 4d49a: 6610 bnes 4d4ac <== NOT EXECUTED 4d49c: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4d4a0: 91c8 subal %a0,%a0 <== NOT EXECUTED 4d4a2: 93c9 subal %a1,%a1 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4d4a4: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4d4a8: 67b4 beqs 4d45e <== NOT EXECUTED 4d4aa: 60a2 bras 4d44e <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 4d4ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d4ae: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d4b0: 42a7 clrl %sp@- <== NOT EXECUTED 4d4b2: 42a7 clrl %sp@- <== NOT EXECUTED 4d4b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4d4b6: 4eb9 0004 d228 jsr 4d228 <== NOT EXECUTED 4d4bc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d4c0: 72ff moveq #-1,%d1 <== NOT EXECUTED 4d4c2: b280 cmpl %d0,%d1 <== NOT EXECUTED 4d4c4: 6710 beqs 4d4d6 <== NOT EXECUTED 4d4c6: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4d4ca: 206b 004c moveal %a3@(76),%a0 <== NOT EXECUTED 4d4ce: 226b 0050 moveal %a3@(80),%a1 <== NOT EXECUTED 4d4d2: 6000 ff74 braw 4d448 <== NOT EXECUTED return -1; 4d4d6: 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; } 4d4d8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4d4de: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000436f0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 436f0: 4e56 ffd4 linkw %fp,#-44 436f4: 48d7 001c moveml %d2-%d4,%sp@ 436f8: 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) 436fc: 2003 movel %d3,%d0 436fe: 0280 0000 f000 andil #61440,%d0 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 43704: 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) 43708: 0c80 0000 4000 cmpil #16384,%d0 4370e: 673a beqs 4374a 43710: 6328 blss 4373a 43712: 0c80 0000 6000 cmpil #24576,%d0 43718: 6730 beqs 4374a 4371a: 0c80 0000 8000 cmpil #32768,%d0 43720: 6728 beqs 4374a <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43722: 4eb9 0004 e084 jsr 4e084 <__errno> 43728: 7216 moveq #22,%d1 4372a: 2040 moveal %d0,%a0 4372c: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 4372e: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 43734: 2081 movel %d1,%a0@ result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 43736: 4e5e unlk %fp 43738: 4e75 rts int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 4373a: 0c80 0000 1000 cmpil #4096,%d0 43740: 6708 beqs 4374a 43742: 0c80 0000 2000 cmpil #8192,%d0 43748: 66d8 bnes 43722 break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 4374a: 240e movel %fp,%d2 4374c: 0682 ffff ffe4 addil #-28,%d2 43752: 2f02 movel %d2,%sp@- 43754: 486e fff8 pea %fp@(-8) 43758: 2f04 movel %d4,%sp@- 4375a: 4eb9 0004 41b0 jsr 441b0 result = (*temp_loc.ops->evalformake_h)( 43760: 486e fffc pea %fp@(-4) 43764: d8ae fff8 addl %fp@(-8),%d4 43768: 2f02 movel %d2,%sp@- 4376a: 206e fff0 moveal %fp@(-16),%a0 4376e: 2f04 movel %d4,%sp@- 43770: 2068 0004 moveal %a0@(4),%a0 43774: 4e90 jsr %a0@ &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 43776: 4fef 0018 lea %sp@(24),%sp 4377a: 4a80 tstl %d0 4377c: 6638 bnes 437b6 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 4377e: 2f02 movel %d2,%sp@- 43780: 2f2e 0014 movel %fp@(20),%sp@- 43784: 2f2e 0010 movel %fp@(16),%sp@- 43788: 206e fff0 moveal %fp@(-16),%a0 4378c: 2f03 movel %d3,%sp@- 4378e: 2f2e fffc movel %fp@(-4),%sp@- 43792: 2068 0014 moveal %a0@(20),%a0 43796: 4e90 jsr %a0@ rtems_filesystem_freenode( &temp_loc ); 43798: 2f02 movel %d2,%sp@- 4379a: 2d40 ffe0 movel %d0,%fp@(-32) 4379e: 4eb9 0004 32c8 jsr 432c8 return result; 437a4: 202e ffe0 movel %fp@(-32),%d0 437a8: 4fef 0018 lea %sp@(24),%sp } 437ac: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437b2: 4e5e unlk %fp 437b4: 4e75 rts &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 437b6: 70ff moveq #-1,%d0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 437b8: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 437be: 4e5e unlk %fp ... =============================================================================== 00043858 : /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 43858: 7001 moveq #1,%d0 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 4385a: 4e56 ffb4 linkw %fp,#-76 4385e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43862: 282e 0008 movel %fp@(8),%d4 43866: 242e 000c movel %fp@(12),%d2 4386a: 262e 0010 movel %fp@(16),%d3 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4386e: b0ae 0014 cmpl %fp@(20),%d0 43872: 6500 022a bcsw 43a9e rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 43876: 2f03 movel %d3,%sp@- 43878: 4eb9 0004 bb94 jsr 4bb94 if ( !mount_h ) 4387e: 588f addql #4,%sp rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 43880: 2d40 ffe4 movel %d0,%fp@(-28) if ( !mount_h ) 43884: 6700 0218 beqw 43a9e { 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; 43888: 4a82 tstl %d2 4388a: 56c7 sne %d7 4388c: 4487 negl %d7 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 4388e: 4a07 tstb %d7 43890: 6700 01ee beqw 43a80 * 4) The mount point exists with the proper permissions to allow mounting * 5) The selected mount point already has a file system mounted to it * */ int mount( 43894: 2f02 movel %d2,%sp@- 43896: 45f9 0004 f3f0 lea 4f3f0 ,%a2 4389c: 2d42 ffdc movel %d2,%fp@(-36) 438a0: 4e92 jsr %a2@ 438a2: 588f addql #4,%sp 438a4: 2a40 moveal %d0,%a5 438a6: 528d addql #1,%a5 438a8: 2d40 ffe0 movel %d0,%fp@(-32) 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; 438ac: 2f03 movel %d3,%sp@- 438ae: 4e92 jsr %a2@ 438b0: 588f addql #4,%sp 438b2: 2840 moveal %d0,%a4 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 438b4: 4a84 tstl %d4 438b6: 6700 01c2 beqw 43a7a 438ba: 2f04 movel %d4,%sp@- 438bc: 4eb9 0004 f3f0 jsr 4f3f0 438c2: 588f addql #4,%sp 438c4: 2640 moveal %d0,%a3 438c6: 528b addql #1,%a3 size_t target_size = strlen( target ) + 1; size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 438c8: 41f4 d875 lea %a4@(00000075,%a5:l),%a0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 438cc: 4870 b800 pea %a0@(00000000,%a3:l) 438d0: 4878 0001 pea 1 438d4: 4eb9 0004 2ec8 jsr 42ec8 if ( mt_entry != NULL ) { 438da: 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 ); 438dc: 2440 moveal %d0,%a2 if ( mt_entry != NULL ) { 438de: 4a80 tstl %d0 438e0: 6700 0180 beqw 43a62 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; 438e4: 200c movel %a4,%d0 438e6: 5280 addql #1,%d0 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 ); 438e8: 2c0a movel %a2,%d6 438ea: 0686 0000 0074 addil #116,%d6 memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; 438f0: 2a06 movel %d6,%d5 438f2: da80 addl %d0,%d5 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 438f4: 41f3 5800 lea %a3@(00000000,%d5:l),%a0 rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 438f8: 49f9 0004 e8a4 lea 4e8a4 ,%a4 438fe: 2f00 movel %d0,%sp@- 43900: 2f03 movel %d3,%sp@- mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; 43902: 2d48 ffe8 movel %a0,%fp@(-24) rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); 43906: 2f06 movel %d6,%sp@- 43908: 4e94 jsr %a4@ mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 4390a: 2f0b movel %a3,%sp@- 4390c: 2f04 movel %d4,%sp@- if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; 4390e: 2546 006c movel %d6,%a2@(108) str += filesystemtype_size; memcpy( str, source_or_null, source_size ); 43912: 2f05 movel %d5,%sp@- 43914: 4e94 jsr %a4@ mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); 43916: 2f0d movel %a5,%sp@- 43918: 2f2e ffdc movel %fp@(-36),%sp@- memcpy( str, filesystemtype, filesystemtype_size ); mt_entry->type = str; str += filesystemtype_size; memcpy( str, source_or_null, source_size ); mt_entry->dev = str; 4391c: 2545 0070 movel %d5,%a2@(112) str += source_size; memcpy( str, target, target_size ); 43920: 2f2e ffe8 movel %fp@(-24),%sp@- 43924: 4e94 jsr %a4@ mt_entry->target = str; 43926: 222e ffe8 movel %fp@(-24),%d1 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 4392a: 7005 moveq #5,%d0 /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 4392c: 4fef 0024 lea %sp@(36),%sp ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 43930: 206e 0014 moveal %fp@(20),%a0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 43934: 2541 0068 movel %d1,%a2@(104) if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43938: 223c 0000 0080 movel #128,%d1 4393e: 2540 0038 movel %d0,%a2@(56) 43942: 103c 0007 moveb #7,%d0 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 43946: 2548 0030 movel %a0,%a2@(48) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 4394a: 307c 0400 moveaw #1024,%a0 4394e: 2541 003c movel %d1,%a2@(60) 43952: 123c ffff moveb #-1,%d1 43956: 2540 0040 movel %d0,%a2@(64) 4395a: 103c 0001 moveb #1,%d0 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 4395e: 254a 002c movel %a2,%a2@(44) mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 43962: 2541 0044 movel %d1,%a2@(68) 43966: 2541 0048 movel %d1,%a2@(72) 4396a: 2548 004c movel %a0,%a2@(76) 4396e: 42aa 0050 clrl %a2@(80) 43972: 42aa 0054 clrl %a2@(84) 43976: 2540 0058 movel %d0,%a2@(88) 4397a: 42aa 005c clrl %a2@(92) 4397e: 42aa 0060 clrl %a2@(96) 43982: 42aa 0064 clrl %a2@(100) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 43986: 4a07 tstb %d7 43988: 6632 bnes 439bc } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 4398a: 203c 0005 e128 movel #385320,%d0 43990: b0b9 0005 e124 cmpl 5e124 ,%d0 43996: 6700 0090 beqw 43a28 errno = EINVAL; 4399a: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 439a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 439a2: 7016 moveq #22,%d0 <== NOT EXECUTED 439a4: 2080 movel %d0,%a0@ <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 439a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 439a8: 4eb9 0004 32dc jsr 432dc <== NOT EXECUTED 439ae: 588f addql #4,%sp <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; 439b0: 70ff moveq #-1,%d0 <== NOT EXECUTED } 439b2: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 439b8: 4e5e unlk %fp <== NOT EXECUTED 439ba: 4e75 rts <== 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( 439bc: 4878 0001 pea 1 439c0: 260e movel %fp,%d3 439c2: 0683 ffff ffec addil #-20,%d3 439c8: 2f03 movel %d3,%sp@- 439ca: 4878 0007 pea 7 439ce: 2f2e ffe0 movel %fp@(-32),%sp@- 439d2: 2f02 movel %d2,%sp@- 439d4: 4eb9 0004 31e4 jsr 431e4 439da: 4fef 0014 lea %sp@(20),%sp 439de: 72ff moveq #-1,%d1 439e0: b280 cmpl %d0,%d1 439e2: 67c2 beqs 439a6 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 439e4: 206e fff8 moveal %fp@(-8),%a0 439e8: 2f03 movel %d3,%sp@- 439ea: 2068 0010 moveal %a0@(16),%a0 439ee: 4e90 jsr %a0@ 439f0: 588f addql #4,%sp 439f2: 7201 moveq #1,%d1 439f4: b280 cmpl %d0,%d1 439f6: 6700 012c beqw 43b24 errno = ENOTDIR; 439fa: 4eb9 0004 e084 jsr 4e084 <__errno> 43a00: 7414 moveq #20,%d2 43a02: 2040 moveal %d0,%a0 43a04: 2082 movel %d2,%a0@ return 0; cleanup_and_bail: free( mt_entry ); 43a06: 2f0a movel %a2,%sp@- 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; 43a08: 2403 movel %d3,%d2 return 0; cleanup_and_bail: free( mt_entry ); 43a0a: 4eb9 0004 32dc jsr 432dc 43a10: 588f addql #4,%sp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 43a12: 2f02 movel %d2,%sp@- 43a14: 4eb9 0004 32c8 jsr 432c8 43a1a: 588f addql #4,%sp return -1; 43a1c: 70ff moveq #-1,%d0 } 43a1e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43a24: 4e5e unlk %fp 43a26: 4e75 rts ) { 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; 43a28: 4282 clrl %d2 * 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 ) ) { 43a2a: 2f2e 0018 movel %fp@(24),%sp@- 43a2e: 206e ffe4 moveal %fp@(-28),%a0 43a32: 2f0a movel %a2,%sp@- 43a34: 4e90 jsr %a0@ 43a36: 508f addql #8,%sp 43a38: 4a80 tstl %d0 43a3a: 677a beqs 43ab6 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 43a3c: 206e fff8 moveal %fp@(-8),%a0 43a40: 2f0a movel %a2,%sp@- 43a42: 2068 0028 moveal %a0@(40),%a0 43a46: 4e90 jsr %a0@ return 0; cleanup_and_bail: free( mt_entry ); 43a48: 2e8a movel %a2,%sp@ 43a4a: 4eb9 0004 32dc jsr 432dc if ( loc_to_free ) 43a50: 588f addql #4,%sp 43a52: 4a82 tstl %d2 43a54: 66bc bnes 43a12 <== ALWAYS TAKEN rtems_filesystem_freenode( loc_to_free ); return -1; 43a56: 70ff moveq #-1,%d0 <== NOT EXECUTED } 43a58: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a5e: 4e5e unlk %fp <== NOT EXECUTED 43a60: 4e75 rts <== NOT EXECUTED target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 43a62: 4eb9 0004 e084 jsr 4e084 <__errno> <== NOT EXECUTED 43a68: 760c moveq #12,%d3 <== NOT EXECUTED 43a6a: 2040 moveal %d0,%a0 <== NOT EXECUTED 43a6c: 70ff moveq #-1,%d0 <== NOT EXECUTED 43a6e: 2083 movel %d3,%a0@ <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43a70: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43a76: 4e5e unlk %fp <== NOT EXECUTED 43a78: 4e75 rts <== NOT EXECUTED ) { 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; 43a7a: 97cb subal %a3,%a3 43a7c: 6000 fe4a braw 438c8 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 43a80: 7201 moveq #1,%d1 43a82: 41f9 0005 cda8 lea 5cda8 ,%a0 43a88: 3a7c 0002 moveaw #2,%a5 43a8c: 45f9 0004 f3f0 lea 4f3f0 ,%a2 43a92: 2d41 ffe0 movel %d1,%fp@(-32) 43a96: 2d48 ffdc movel %a0,%fp@(-36) 43a9a: 6000 fe10 braw 438ac /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 43a9e: 4eb9 0004 e084 jsr 4e084 <__errno> 43aa4: 7816 moveq #22,%d4 43aa6: 2040 moveal %d0,%a0 43aa8: 70ff moveq #-1,%d0 43aaa: 2084 movel %d4,%a0@ if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43aac: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43ab2: 4e5e unlk %fp 43ab4: 4e75 rts 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 ); 43ab6: 42a7 clrl %sp@- 43ab8: 42a7 clrl %sp@- 43aba: 2f39 0005 f7f0 movel 5f7f0 ,%sp@- 43ac0: 4eb9 0004 6acc jsr 46acc 43ac6: 2f0a movel %a2,%sp@- 43ac8: 4879 0005 e124 pea 5e124 43ace: 4eb9 0004 751c jsr 4751c <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 43ad4: 2f39 0005 f7f0 movel 5f7f0 ,%sp@- 43ada: 4eb9 0004 6c1c jsr 46c1c */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 43ae0: 4fef 0018 lea %sp@(24),%sp 43ae4: 4a07 tstb %d7 43ae6: 6630 bnes 43b18 rtems_filesystem_root = mt_entry->mt_fs_root; 43ae8: 2079 0005 e240 moveal 5e240 ,%a0 return 0; 43aee: 4280 clrl %d0 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 43af0: 216a 001c 0018 movel %a2@(28),%a0@(24) 43af6: 216a 0020 001c movel %a2@(32),%a0@(28) 43afc: 216a 0024 0020 movel %a2@(36),%a0@(32) 43b02: 216a 0028 0024 movel %a2@(40),%a0@(36) 43b08: 216a 002c 0028 movel %a2@(44),%a0@(40) if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43b0e: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b14: 4e5e unlk %fp 43b16: 4e75 rts rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 43b18: 4280 clrl %d0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 43b1a: 4cee 3cfc ffb4 moveml %fp@(-76),%d2-%d7/%a2-%a5 43b20: 4e5e unlk %fp 43b22: 4e75 rts /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 43b24: 2f2e ffec movel %fp@(-20),%sp@- 43b28: 487a fc9a pea %pc@(437c4 ) 43b2c: 4eb9 0004 37dc jsr 437dc 43b32: 508f addql #8,%sp 43b34: 4a00 tstb %d0 43b36: 671c beqs 43b54 errno = EBUSY; 43b38: 4eb9 0004 e084 jsr 4e084 <__errno> 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; 43b3e: 2403 movel %d3,%d2 /* * 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; 43b40: 7210 moveq #16,%d1 43b42: 2040 moveal %d0,%a0 43b44: 2081 movel %d1,%a0@ return 0; cleanup_and_bail: free( mt_entry ); 43b46: 2f0a movel %a2,%sp@- 43b48: 4eb9 0004 32dc jsr 432dc 43b4e: 588f addql #4,%sp 43b50: 6000 fec0 braw 43a12 * 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; 43b54: 206e fff8 moveal %fp@(-8),%a0 * 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; 43b58: 256e ffec 0008 movel %fp@(-20),%a2@(8) mt_entry->mt_point_node.handlers = loc.handlers; 43b5e: 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; 43b64: 256e fffc 0018 movel %fp@(-4),%a2@(24) /* * 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 ) ) { 43b6a: 2f0a movel %a2,%sp@- 43b6c: 2268 0020 moveal %a0@(32),%a1 * 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; 43b70: 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 ) ) { 43b74: 4e91 jsr %a1@ 43b76: 588f addql #4,%sp 43b78: 4a80 tstl %d0 43b7a: 6600 fe8a bnew 43a06 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; 43b7e: 2403 movel %d3,%d2 43b80: 6000 fea8 braw 43a2a =============================================================================== 00043d08 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 43d08: 4e56 ffec linkw %fp,#-20 43d0c: 48d7 007c moveml %d2-%d6,%sp@ 43d10: 262e 0008 movel %fp@(8),%d3 43d14: 242e 000c movel %fp@(12),%d2 43d18: 282e 0010 movel %fp@(16),%d4 43d1c: 2a2e 0014 movel %fp@(20),%d5 43d20: 2c2e 0018 movel %fp@(24),%d6 int rv = -1; if (target != NULL) { 43d24: 4a82 tstl %d2 43d26: 673e beqs 43d66 rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); 43d28: 4878 01ff pea 1ff 43d2c: 2f02 movel %d2,%sp@- 43d2e: 4eb9 0004 476c jsr 4476c if (rv == 0) { 43d34: 508f addql #8,%sp 43d36: 4a80 tstl %d0 43d38: 670a beqs 43d44 <== ALWAYS TAKEN } else { errno = EINVAL; } return rv; } 43d3a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 43d40: 4e5e unlk %fp <== NOT EXECUTED 43d42: 4e75 rts <== NOT EXECUTED int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 43d44: 2d46 0018 movel %d6,%fp@(24) 43d48: 2d45 0014 movel %d5,%fp@(20) 43d4c: 2d44 0010 movel %d4,%fp@(16) 43d50: 2d42 000c movel %d2,%fp@(12) 43d54: 2d43 0008 movel %d3,%fp@(8) } else { errno = EINVAL; } return rv; } 43d58: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43d5e: 4e5e unlk %fp int rv = -1; if (target != NULL) { rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO); if (rv == 0) { rv = mount( 43d60: 4ef9 0004 3e14 jmp 43e14 options, data ); } } else { errno = EINVAL; 43d66: 4eb9 0004 e5b8 jsr 4e5b8 <__errno> 43d6c: 7216 moveq #22,%d1 43d6e: 2040 moveal %d0,%a0 const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { int rv = -1; 43d70: 70ff moveq #-1,%d0 } else { errno = EINVAL; } return rv; } 43d72: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 options, data ); } } else { errno = EINVAL; 43d78: 2081 movel %d1,%a0@ } return rv; } 43d7a: 4e5e unlk %fp ... =============================================================================== 00057f38 : fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 57f38: 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) { 57f3a: 4e56 ff3c linkw %fp,#-196 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; 57f3e: 4240 clrw %d0 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57f40: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 57f44: 266e 0008 moveal %fp@(8),%a3 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57f48: 2a0e movel %fp,%d5 57f4a: 0685 ffff ff68 addil #-152,%d5 uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 57f50: 45ee ffa8 lea %fp@(-88),%a2 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; 57f54: 206b 0010 moveal %a3@(16),%a0 57f58: 2a68 0034 moveal %a0@(52),%a5 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57f5c: 4878 0040 pea 40 msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57f60: 242e 0010 movel %fp@(16),%d2 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57f64: 42a7 clrl %sp@- msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57f66: 282e 0014 movel %fp@(20),%d4 uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57f6a: 2f05 movel %d5,%sp@- 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; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 57f6c: 2d53 ff64 movel %a3@,%fp@(-156) msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 57f70: 262e 000c movel %fp@(12),%d3 57f74: 2d41 fff0 movel %d1,%fp@(-16) 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; 57f78: 3d40 fffc movew %d0,%fp@(-4) dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 57f7c: 2d41 fff4 movel %d1,%fp@(-12) uint16_t date = 0; 57f80: 3d40 fffe movew %d0,%fp@(-2) { 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; 57f84: 42ae fff8 clrl %fp@(-8) 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; 57f88: 4207 clrb %d7 static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 57f8a: 42ae ffe8 clrl %fp@(-24) dir_pos->sname.ofs = 0; 57f8e: 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); 57f92: 4292 clrl %a2@ 57f94: 42ae ffac clrl %fp@(-84) 57f98: 42ae ffb0 clrl %fp@(-80) 57f9c: 42ae ffb4 clrl %fp@(-76) 57fa0: 42ae ffb8 clrl %fp@(-72) 57fa4: 42ae ffbc clrl %fp@(-68) 57fa8: 42ae ffc0 clrl %fp@(-64) 57fac: 42ae ffc4 clrl %fp@(-60) memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 57fb0: 4eb9 0005 d2fc jsr 5d2fc name_type = msdos_long_to_short (name, name_len, 57fb6: 4878 000b pea b 57fba: 2f0a movel %a2,%sp@- 57fbc: 2f04 movel %d4,%sp@- 57fbe: 2f02 movel %d2,%sp@- 57fc0: 4eb9 0005 90fc jsr 590fc MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 57fc6: 1d47 ffb4 moveb %d7,%fp@(-76) 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, 57fca: 2c00 movel %d0,%d6 /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 57fcc: 42a7 clrl %sp@- 57fce: 4eb9 0006 0734 jsr 60734