=============================================================================== 0010df98 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10df98: 55 push %ebp 10df99: 89 e5 mov %esp,%ebp 10df9b: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 10df9e: 8b 50 10 mov 0x10(%eax),%edx 10dfa1: 8b 52 34 mov 0x34(%edx),%edx switch( node->type ) { 10dfa4: 8b 08 mov (%eax),%ecx 10dfa6: 8b 49 4c mov 0x4c(%ecx),%ecx 10dfa9: 49 dec %ecx 10dfaa: 83 f9 06 cmp $0x6,%ecx 10dfad: 77 2d ja 10dfdc <== NEVER TAKEN 10dfaf: ff 24 8d ec f3 11 00 jmp *0x11f3ec(,%ecx,4) case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10dfb6: 8b 52 0c mov 0xc(%edx),%edx 10dfb9: eb 15 jmp 10dfd0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10dfbb: c7 40 08 24 f5 11 00 movl $0x11f524,0x8(%eax) break; 10dfc2: eb 18 jmp 10dfdc case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 10dfc4: c7 40 08 94 f5 11 00 movl $0x11f594,0x8(%eax) break; 10dfcb: eb 0f jmp 10dfdc case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; 10dfcd: 8b 52 08 mov 0x8(%edx),%edx 10dfd0: 89 50 08 mov %edx,0x8(%eax) break; 10dfd3: eb 07 jmp 10dfdc case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10dfd5: c7 40 08 68 f4 11 00 movl $0x11f468,0x8(%eax) break; } return 0; } 10dfdc: 31 c0 xor %eax,%eax 10dfde: c9 leave 10dfdf: c3 ret =============================================================================== 0010ddfc : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10ddfc: 55 push %ebp 10ddfd: 89 e5 mov %esp,%ebp 10ddff: 53 push %ebx 10de00: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10de03: 6a 64 push $0x64 10de05: 6a 01 push $0x1 10de07: e8 b0 96 ff ff call 1074bc 10de0c: 89 c3 mov %eax,%ebx if ( !node ) 10de0e: 83 c4 10 add $0x10,%esp 10de11: 85 c0 test %eax,%eax 10de13: 74 49 je 10de5e <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10de15: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10de1b: 8b 45 08 mov 0x8(%ebp),%eax 10de1e: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10de21: 51 push %ecx 10de22: 6a 20 push $0x20 10de24: ff 75 0c pushl 0xc(%ebp) 10de27: 8d 43 0c lea 0xc(%ebx),%eax 10de2a: 50 push %eax 10de2b: e8 a8 47 00 00 call 1125d8 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10de30: 8b 45 10 mov 0x10(%ebp),%eax 10de33: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 10de36: 66 c7 43 3c 00 00 movw $0x0,0x3c(%ebx) node->st_gid = 0; 10de3c: 66 c7 43 3e 00 00 movw $0x0,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10de42: 58 pop %eax 10de43: 5a pop %edx 10de44: 6a 00 push $0x0 10de46: 8d 45 f0 lea -0x10(%ebp),%eax 10de49: 50 push %eax 10de4a: e8 c5 98 ff ff call 107714 node->stat_atime = (time_t) tv.tv_sec; 10de4f: 8b 45 f0 mov -0x10(%ebp),%eax 10de52: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10de55: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10de58: 89 43 48 mov %eax,0x48(%ebx) return node; 10de5b: 83 c4 10 add $0x10,%esp } 10de5e: 89 d8 mov %ebx,%eax 10de60: 8b 5d fc mov -0x4(%ebp),%ebx 10de63: c9 leave 10de64: c3 ret =============================================================================== 0010de98 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10de98: 55 push %ebp 10de99: 89 e5 mov %esp,%ebp 10de9b: 57 push %edi 10de9c: 56 push %esi 10de9d: 53 push %ebx 10de9e: 83 ec 1c sub $0x1c,%esp 10dea1: 8b 75 08 mov 0x8(%ebp),%esi 10dea4: 8b 7d 0c mov 0xc(%ebp),%edi 10dea7: 8b 5d 18 mov 0x18(%ebp),%ebx IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10deaa: 31 c0 xor %eax,%eax 10deac: 85 f6 test %esi,%esi 10deae: 0f 84 dc 00 00 00 je 10df90 <== NEVER TAKEN return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10deb4: 50 push %eax 10deb5: a1 74 34 12 00 mov 0x123474,%eax 10deba: 8b 40 2c mov 0x2c(%eax),%eax 10debd: f7 d0 not %eax 10debf: 23 45 14 and 0x14(%ebp),%eax 10dec2: 50 push %eax 10dec3: ff 75 10 pushl 0x10(%ebp) 10dec6: 57 push %edi 10dec7: e8 30 ff ff ff call 10ddfc if ( !node ) 10decc: 83 c4 10 add $0x10,%esp 10decf: 85 c0 test %eax,%eax 10ded1: 0f 84 b9 00 00 00 je 10df90 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10ded7: 4f dec %edi 10ded8: 83 ff 06 cmp $0x6,%edi 10dedb: 77 73 ja 10df50 <== NEVER TAKEN 10dedd: ff 24 bd bc f3 11 00 jmp *0x11f3bc(,%edi,4) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10dee4: 8d 50 54 lea 0x54(%eax),%edx 10dee7: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10deea: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10def1: 8d 50 50 lea 0x50(%eax),%edx 10def4: 89 50 58 mov %edx,0x58(%eax) 10def7: eb 6d jmp 10df66 case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 10def9: 8b 13 mov (%ebx),%edx 10defb: 89 50 50 mov %edx,0x50(%eax) break; 10defe: eb 66 jmp 10df66 case IMFS_DEVICE: node->info.device.major = info->device.major; 10df00: 8b 13 mov (%ebx),%edx 10df02: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10df05: 8b 53 04 mov 0x4(%ebx),%edx 10df08: 89 50 54 mov %edx,0x54(%eax) break; 10df0b: eb 59 jmp 10df66 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10df0d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10df14: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10df1b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10df22: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10df29: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10df30: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10df37: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10df3e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10df45: eb 1f jmp 10df66 case IMFS_FIFO: node->info.fifo.pipe = NULL; 10df47: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10df4e: eb 16 jmp 10df66 default: assert(0); 10df50: 68 77 e7 11 00 push $0x11e777 <== NOT EXECUTED 10df55: 68 d8 f3 11 00 push $0x11f3d8 <== NOT EXECUTED 10df5a: 6a 5c push $0x5c <== NOT EXECUTED 10df5c: 68 6c f3 11 00 push $0x11f36c <== NOT EXECUTED 10df61: e8 3a 94 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10df66: 8b 16 mov (%esi),%edx fs_info = parent_loc->mt_entry->fs_info; 10df68: 8b 4e 10 mov 0x10(%esi),%ecx 10df6b: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10df6e: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10df71: 8b 4b 04 mov 0x4(%ebx),%ecx 10df74: 41 inc %ecx 10df75: 89 4b 04 mov %ecx,0x4(%ebx) 10df78: 89 48 38 mov %ecx,0x38(%eax) 10df7b: 53 push %ebx 10df7c: 53 push %ebx 10df7d: 50 push %eax 10df7e: 83 c2 50 add $0x50,%edx 10df81: 52 push %edx 10df82: 89 45 e4 mov %eax,-0x1c(%ebp) 10df85: e8 5a ce ff ff call 10ade4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10df8a: 83 c4 10 add $0x10,%esp 10df8d: 8b 45 e4 mov -0x1c(%ebp),%eax } 10df90: 8d 65 f4 lea -0xc(%ebp),%esp 10df93: 5b pop %ebx 10df94: 5e pop %esi 10df95: 5f pop %edi 10df96: c9 leave 10df97: c3 ret =============================================================================== 0010de65 : IMFS_jnode_t *IMFS_create_root_node(void) { 10de65: 55 push %ebp 10de66: 89 e5 mov %esp,%ebp 10de68: 83 ec 0c sub $0xc,%esp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 10de6b: 68 ed 41 00 00 push $0x41ed 10de70: 68 25 f0 11 00 push $0x11f025 10de75: 6a 01 push $0x1 10de77: e8 80 ff ff ff call 10ddfc if ( !node ) 10de7c: 83 c4 10 add $0x10,%esp 10de7f: 85 c0 test %eax,%eax 10de81: 74 13 je 10de96 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10de83: 8d 50 54 lea 0x54(%eax),%edx 10de86: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10de89: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10de90: 8d 50 50 lea 0x50(%eax),%edx 10de93: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10de96: c9 leave 10de97: c3 ret =============================================================================== 00108e4b : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 108e4b: 55 push %ebp 108e4c: 89 e5 mov %esp,%ebp 108e4e: 57 push %edi 108e4f: 56 push %esi 108e50: 53 push %ebx 108e51: 83 ec 1c sub $0x1c,%esp 108e54: 8b 45 08 mov 0x8(%ebp),%eax 108e57: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 108e5a: 85 c0 test %eax,%eax 108e5c: 75 11 jne 108e6f <== ALWAYS TAKEN 108e5e: 68 f9 40 12 00 push $0x1240f9 <== NOT EXECUTED 108e63: 68 e4 41 12 00 push $0x1241e4 <== NOT EXECUTED 108e68: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 108e6d: eb 13 jmp 108e82 <== NOT EXECUTED assert( level >= 0 ); 108e6f: 85 f6 test %esi,%esi 108e71: 79 19 jns 108e8c <== ALWAYS TAKEN 108e73: 68 07 41 12 00 push $0x124107 <== NOT EXECUTED 108e78: 68 e4 41 12 00 push $0x1241e4 <== NOT EXECUTED 108e7d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 108e82: 68 46 40 12 00 push $0x124046 <== NOT EXECUTED 108e87: e8 2c 07 00 00 call 1095b8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 108e8c: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 108e90: 74 11 je 108ea3 <== ALWAYS TAKEN 108e92: 68 12 41 12 00 push $0x124112 <== NOT EXECUTED 108e97: 68 e4 41 12 00 push $0x1241e4 <== NOT EXECUTED 108e9c: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 108ea1: eb df jmp 108e82 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ea3: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108ea6: 83 c0 54 add $0x54,%eax 108ea9: 89 45 e4 mov %eax,-0x1c(%ebp) 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 ); 108eac: 8d 46 01 lea 0x1(%esi),%eax 108eaf: 89 45 e0 mov %eax,-0x20(%ebp) assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108eb2: eb 40 jmp 108ef4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 108eb4: 31 ff xor %edi,%edi for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 108eb6: 51 push %ecx 108eb7: 51 push %ecx 108eb8: a1 00 90 12 00 mov 0x129000,%eax 108ebd: ff 70 08 pushl 0x8(%eax) 108ec0: 68 38 41 12 00 push $0x124138 108ec5: e8 5a c3 00 00 call 115224 !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++ ) 108eca: 47 inc %edi 108ecb: 83 c4 10 add $0x10,%esp 108ece: 39 f7 cmp %esi,%edi 108ed0: 7e e4 jle 108eb6 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 108ed2: 83 ec 0c sub $0xc,%esp 108ed5: 53 push %ebx 108ed6: e8 53 fe ff ff call 108d2e if ( the_jnode->type == IMFS_DIRECTORY ) 108edb: 83 c4 10 add $0x10,%esp 108ede: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 108ee2: 75 0e jne 108ef2 IMFS_dump_directory( the_jnode, level + 1 ); 108ee4: 52 push %edx 108ee5: 52 push %edx 108ee6: ff 75 e0 pushl -0x20(%ebp) 108ee9: 53 push %ebx 108eea: e8 5c ff ff ff call 108e4b 108eef: 83 c4 10 add $0x10,%esp the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 108ef2: 8b 1b mov (%ebx),%ebx assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 108ef4: 3b 5d e4 cmp -0x1c(%ebp),%ebx 108ef7: 75 bb jne 108eb4 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 108ef9: 8d 65 f4 lea -0xc(%ebp),%esp 108efc: 5b pop %ebx 108efd: 5e pop %esi 108efe: 5f pop %edi 108eff: c9 leave 108f00: c3 ret =============================================================================== 0010e100 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 10e100: 55 push %ebp 10e101: 89 e5 mov %esp,%ebp 10e103: 57 push %edi 10e104: 56 push %esi 10e105: 53 push %ebx 10e106: 83 ec 4c sub $0x4c,%esp 10e109: 8b 5d 14 mov 0x14(%ebp),%ebx 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 ) ) { 10e10c: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10e113: 74 19 je 10e12e <== ALWAYS TAKEN assert( 0 ); 10e115: 68 77 e7 11 00 push $0x11e777 <== NOT EXECUTED 10e11a: 68 08 f4 11 00 push $0x11f408 <== NOT EXECUTED 10e11f: 68 08 02 00 00 push $0x208 <== NOT EXECUTED 10e124: 68 17 f4 11 00 push $0x11f417 <== NOT EXECUTED 10e129: e8 72 92 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e12e: 8b 3b mov (%ebx),%edi 10e130: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) 10e137: be 01 00 00 00 mov $0x1,%esi /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e13c: e9 98 01 00 00 jmp 10e2d9 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 10e141: 8d 45 e4 lea -0x1c(%ebp),%eax 10e144: 50 push %eax 10e145: 8d 4d c3 lea -0x3d(%ebp),%ecx 10e148: 51 push %ecx 10e149: ff 75 0c pushl 0xc(%ebp) 10e14c: 8b 45 08 mov 0x8(%ebp),%eax 10e14f: 03 45 b4 add -0x4c(%ebp),%eax 10e152: 50 push %eax 10e153: e8 14 08 00 00 call 10e96c 10e158: 89 c6 mov %eax,%esi pathnamelen -= len; 10e15a: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 10e15d: 83 c4 10 add $0x10,%esp 10e160: 83 3b 00 cmpl $0x0,(%ebx) 10e163: 0f 84 d2 00 00 00 je 10e23b <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e169: 85 c0 test %eax,%eax 10e16b: 74 21 je 10e18e if ( node->type == IMFS_DIRECTORY ) 10e16d: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e171: 75 1b jne 10e18e if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e173: 57 push %edi 10e174: 57 push %edi 10e175: 6a 01 push $0x1 10e177: 53 push %ebx 10e178: 89 55 b0 mov %edx,-0x50(%ebp) 10e17b: e8 60 fe ff ff call 10dfe0 10e180: 83 c4 10 add $0x10,%esp 10e183: 85 c0 test %eax,%eax 10e185: 8b 55 b0 mov -0x50(%ebp),%edx 10e188: 0f 84 b2 01 00 00 je 10e340 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 10e18e: 29 55 0c sub %edx,0xc(%ebp) i += len; 10e191: 01 55 b4 add %edx,-0x4c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e194: 8b 3b mov (%ebx),%edi switch( type ) { 10e196: 83 fe 03 cmp $0x3,%esi 10e199: 74 39 je 10e1d4 10e19b: 83 fe 04 cmp $0x4,%esi 10e19e: 0f 84 28 01 00 00 je 10e2cc 10e1a4: 83 fe 02 cmp $0x2,%esi 10e1a7: 0f 85 2c 01 00 00 jne 10e2d9 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e1ad: a1 74 34 12 00 mov 0x123474,%eax 10e1b2: 3b 78 18 cmp 0x18(%eax),%edi 10e1b5: 74 8a je 10e141 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 10e1b7: 8b 73 10 mov 0x10(%ebx),%esi /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 10e1ba: 3b 7e 1c cmp 0x1c(%esi),%edi 10e1bd: 75 08 jne 10e1c7 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 10e1bf: 83 c6 08 add $0x8,%esi 10e1c2: e9 2f 01 00 00 jmp 10e2f6 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 10e1c7: 8b 7f 08 mov 0x8(%edi),%edi 10e1ca: 85 ff test %edi,%edi 10e1cc: 0f 85 f3 00 00 00 jne 10e2c5 10e1d2: eb 67 jmp 10e23b case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e1d4: 8b 47 4c mov 0x4c(%edi),%eax 10e1d7: 83 f8 03 cmp $0x3,%eax 10e1da: 75 15 jne 10e1f1 IMFS_evaluate_hard_link( pathloc, 0 ); 10e1dc: 51 push %ecx 10e1dd: 51 push %ecx 10e1de: 6a 00 push $0x0 10e1e0: 53 push %ebx 10e1e1: e8 31 fe ff ff call 10e017 node = pathloc->node_access; 10e1e6: 8b 3b mov (%ebx),%edi if ( !node ) 10e1e8: 83 c4 10 add $0x10,%esp 10e1eb: 85 ff test %edi,%edi 10e1ed: 75 21 jne 10e210 <== ALWAYS TAKEN 10e1ef: eb 25 jmp 10e216 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 10e1f1: 83 f8 04 cmp $0x4,%eax 10e1f4: 75 1a jne 10e210 result = IMFS_evaluate_sym_link( pathloc, 0 ); 10e1f6: 52 push %edx 10e1f7: 52 push %edx 10e1f8: 6a 00 push $0x0 10e1fa: 53 push %ebx 10e1fb: e8 6d fe ff ff call 10e06d 10e200: 89 c6 mov %eax,%esi node = pathloc->node_access; 10e202: 8b 3b mov (%ebx),%edi if ( result == -1 ) 10e204: 83 c4 10 add $0x10,%esp 10e207: 83 f8 ff cmp $0xffffffff,%eax 10e20a: 0f 84 3e 01 00 00 je 10e34e <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e210: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e214: 74 10 je 10e226 rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e216: e8 a5 36 00 00 call 1118c0 <__errno> 10e21b: c7 00 14 00 00 00 movl $0x14,(%eax) 10e221: e9 25 01 00 00 jmp 10e34b /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 10e226: 50 push %eax 10e227: 50 push %eax 10e228: 8d 45 c3 lea -0x3d(%ebp),%eax 10e22b: 50 push %eax 10e22c: 57 push %edi 10e22d: e8 ae 06 00 00 call 10e8e0 10e232: 89 c7 mov %eax,%edi if ( !node ) 10e234: 83 c4 10 add $0x10,%esp 10e237: 85 c0 test %eax,%eax 10e239: 75 10 jne 10e24b rtems_set_errno_and_return_minus_one( ENOENT ); 10e23b: e8 80 36 00 00 call 1118c0 <__errno> 10e240: c7 00 02 00 00 00 movl $0x2,(%eax) 10e246: e9 00 01 00 00 jmp 10e34b * 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 )) { 10e24b: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e24f: 75 74 jne 10e2c5 10e251: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10e255: 74 6e je 10e2c5 10e257: 8b 75 08 mov 0x8(%ebp),%esi 10e25a: 03 75 b4 add -0x4c(%ebp),%esi 10e25d: eb 06 jmp 10e265 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 10e25f: ff 45 b4 incl -0x4c(%ebp) --(*len); 10e262: ff 4d 0c decl 0xc(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10e265: 83 ec 0c sub $0xc,%esp 10e268: 0f be 06 movsbl (%esi),%eax 10e26b: 50 push %eax 10e26c: 89 75 b0 mov %esi,-0x50(%ebp) 10e26f: e8 94 a1 ff ff call 108408 10e274: 83 c4 10 add $0x10,%esp 10e277: 85 c0 test %eax,%eax 10e279: 8b 55 b0 mov -0x50(%ebp),%edx 10e27c: 74 0c je 10e28a 10e27e: 80 3e 00 cmpb $0x0,(%esi) 10e281: 74 07 je 10e28a 10e283: 46 inc %esi 10e284: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10e288: 75 d5 jne 10e25f <== ALWAYS TAKEN * 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); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 10e28a: 80 3a 2e cmpb $0x2e,(%edx) 10e28d: 75 0d jne 10e29c 10e28f: 8b 45 08 mov 0x8(%ebp),%eax 10e292: 8b 4d b4 mov -0x4c(%ebp),%ecx 10e295: 80 7c 08 01 2e cmpb $0x2e,0x1(%eax,%ecx,1) 10e29a: 74 1e je 10e2ba *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e29c: 8b 77 5c mov 0x5c(%edi),%esi 10e29f: 83 c6 1c add $0x1c,%esi 10e2a2: b9 05 00 00 00 mov $0x5,%ecx 10e2a7: 89 df mov %ebx,%edi 10e2a9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i], 10e2ab: 8b 43 0c mov 0xc(%ebx),%eax 10e2ae: 53 push %ebx 10e2af: ff 75 10 pushl 0x10(%ebp) 10e2b2: ff 75 0c pushl 0xc(%ebp) 10e2b5: 52 push %edx 10e2b6: ff 10 call *(%eax) 10e2b8: eb 62 jmp 10e31c pathnamelen, flags, pathloc ); } i += 2; 10e2ba: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathnamelen -= 2; 10e2be: 83 6d 0c 02 subl $0x2,0xc(%ebp) node = node->Parent; 10e2c2: 8b 7f 08 mov 0x8(%edi),%edi /* * Set the node access to the point we have found. */ pathloc->node_access = node; 10e2c5: 89 3b mov %edi,(%ebx) 10e2c7: e9 75 fe ff ff jmp 10e141 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e2cc: e8 ef 35 00 00 call 1118c0 <__errno> 10e2d1: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e2d7: eb 72 jmp 10e34b /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 10e2d9: 83 fe 04 cmp $0x4,%esi 10e2dc: 74 08 je 10e2e6 <== NEVER TAKEN 10e2de: 85 f6 test %esi,%esi 10e2e0: 0f 85 5b fe ff ff jne 10e141 * 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 ) { 10e2e6: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 10e2ea: 75 37 jne 10e323 if ( node->info.directory.mt_fs != NULL ) { 10e2ec: 8b 77 5c mov 0x5c(%edi),%esi 10e2ef: 85 f6 test %esi,%esi 10e2f1: 74 30 je 10e323 <== ALWAYS TAKEN *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e2f3: 83 c6 1c add $0x1c,%esi <== NOT EXECUTED 10e2f6: b9 05 00 00 00 mov $0x5,%ecx 10e2fb: 89 df mov %ebx,%edi 10e2fd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 10e2ff: 8b 45 e4 mov -0x1c(%ebp),%eax 10e302: 8b 53 0c mov 0xc(%ebx),%edx 10e305: 53 push %ebx 10e306: ff 75 10 pushl 0x10(%ebp) 10e309: 8b 4d 0c mov 0xc(%ebp),%ecx 10e30c: 01 c1 add %eax,%ecx 10e30e: 51 push %ecx 10e30f: 8b 4d b4 mov -0x4c(%ebp),%ecx 10e312: 29 c1 sub %eax,%ecx 10e314: 8b 45 08 mov 0x8(%ebp),%eax 10e317: 01 c8 add %ecx,%eax 10e319: 50 push %eax 10e31a: ff 12 call *(%edx) 10e31c: 89 c6 mov %eax,%esi 10e31e: 83 c4 10 add $0x10,%esp 10e321: eb 2b jmp 10e34e flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 10e323: 83 ec 0c sub $0xc,%esp 10e326: 53 push %ebx 10e327: e8 6c fc ff ff call 10df98 10e32c: 89 c6 mov %eax,%esi 10e32e: 59 pop %ecx 10e32f: 5f pop %edi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 10e330: ff 75 10 pushl 0x10(%ebp) 10e333: 53 push %ebx 10e334: e8 a7 fc ff ff call 10dfe0 10e339: 83 c4 10 add $0x10,%esp 10e33c: 85 c0 test %eax,%eax 10e33e: 75 0e jne 10e34e rtems_set_errno_and_return_minus_one( EACCES ); 10e340: e8 7b 35 00 00 call 1118c0 <__errno> 10e345: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e34b: 83 ce ff or $0xffffffff,%esi return result; } 10e34e: 89 f0 mov %esi,%eax 10e350: 8d 65 f4 lea -0xc(%ebp),%esp 10e353: 5b pop %ebx 10e354: 5e pop %esi 10e355: 5f pop %edi 10e356: c9 leave 10e357: c3 ret =============================================================================== 0010e3db : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 10e3db: 55 push %ebp 10e3dc: 89 e5 mov %esp,%ebp 10e3de: 57 push %edi 10e3df: 56 push %esi 10e3e0: 53 push %ebx 10e3e1: 83 ec 4c sub $0x4c,%esp 10e3e4: 8b 55 0c mov 0xc(%ebp),%edx /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 10e3e7: 8b 1a mov (%edx),%ebx /* * Get the path length. */ pathlen = strlen( path ); 10e3e9: 31 c0 xor %eax,%eax 10e3eb: 83 c9 ff or $0xffffffff,%ecx 10e3ee: 8b 7d 08 mov 0x8(%ebp),%edi 10e3f1: f2 ae repnz scas %es:(%edi),%al 10e3f3: f7 d1 not %ecx 10e3f5: 8d 79 ff lea -0x1(%ecx),%edi 10e3f8: c7 45 b4 00 00 00 00 movl $0x0,-0x4c(%ebp) * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 10e3ff: 89 d6 mov %edx,%esi 10e401: 8d 45 e4 lea -0x1c(%ebp),%eax 10e404: 50 push %eax 10e405: 8d 55 c3 lea -0x3d(%ebp),%edx 10e408: 52 push %edx 10e409: 57 push %edi 10e40a: 8b 45 08 mov 0x8(%ebp),%eax 10e40d: 03 45 b4 add -0x4c(%ebp),%eax 10e410: 50 push %eax 10e411: e8 56 05 00 00 call 10e96c 10e416: 89 c2 mov %eax,%edx pathlen -= len; 10e418: 8b 4d e4 mov -0x1c(%ebp),%ecx i += len; if ( !pathloc->node_access ) 10e41b: 83 c4 10 add $0x10,%esp 10e41e: 83 3e 00 cmpl $0x0,(%esi) 10e421: 0f 84 e5 01 00 00 je 10e60c <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 10e427: 85 c0 test %eax,%eax 10e429: 74 36 je 10e461 if ( node->type == IMFS_DIRECTORY ) 10e42b: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e42f: 75 30 jne 10e461 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 10e431: 50 push %eax 10e432: 50 push %eax 10e433: 6a 01 push $0x1 10e435: 56 push %esi 10e436: 89 55 ac mov %edx,-0x54(%ebp) 10e439: 89 4d a8 mov %ecx,-0x58(%ebp) 10e43c: e8 9f fb ff ff call 10dfe0 10e441: 83 c4 10 add $0x10,%esp 10e444: 85 c0 test %eax,%eax 10e446: 8b 55 ac mov -0x54(%ebp),%edx 10e449: 8b 4d a8 mov -0x58(%ebp),%ecx 10e44c: 75 13 jne 10e461 rtems_set_errno_and_return_minus_one( EACCES ); 10e44e: e8 6d 34 00 00 call 1118c0 <__errno> 10e453: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e459: 83 cb ff or $0xffffffff,%ebx 10e45c: e9 05 02 00 00 jmp 10e666 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 10e461: 29 cf sub %ecx,%edi i += len; 10e463: 01 4d b4 add %ecx,-0x4c(%ebp) if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 10e466: 8b 1e mov (%esi),%ebx switch( type ) { 10e468: 83 fa 02 cmp $0x2,%edx 10e46b: 74 1f je 10e48c 10e46d: 77 0a ja 10e479 10e46f: 85 d2 test %edx,%edx 10e471: 0f 84 43 01 00 00 je 10e5ba 10e477: eb 88 jmp 10e401 10e479: 83 fa 03 cmp $0x3,%edx 10e47c: 74 5b je 10e4d9 10e47e: 83 fa 04 cmp $0x4,%edx 10e481: 0f 85 7a ff ff ff jne 10e401 <== NEVER TAKEN 10e487: e9 3e 01 00 00 jmp 10e5ca case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 10e48c: a1 74 34 12 00 mov 0x123474,%eax 10e491: 3b 58 18 cmp 0x18(%eax),%ebx 10e494: 0f 84 67 ff ff ff je 10e401 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 10e49a: 8b 46 10 mov 0x10(%esi),%eax 10e49d: 3b 58 1c cmp 0x1c(%eax),%ebx 10e4a0: 75 27 jne 10e4c9 10e4a2: 89 f2 mov %esi,%edx 10e4a4: 89 c6 mov %eax,%esi if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 10e4a6: 83 c6 08 add $0x8,%esi 10e4a9: b9 05 00 00 00 mov $0x5,%ecx 10e4ae: 89 d7 mov %edx,%edi 10e4b0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 10e4b2: 53 push %ebx 10e4b3: 8b 42 0c mov 0xc(%edx),%eax 10e4b6: ff 75 10 pushl 0x10(%ebp) 10e4b9: 52 push %edx 10e4ba: 8b 55 b4 mov -0x4c(%ebp),%edx 10e4bd: 2b 55 e4 sub -0x1c(%ebp),%edx 10e4c0: 03 55 08 add 0x8(%ebp),%edx 10e4c3: 52 push %edx 10e4c4: e9 d3 00 00 00 jmp 10e59c } } else { if ( !node->Parent ) 10e4c9: 8b 5b 08 mov 0x8(%ebx),%ebx 10e4cc: 85 db test %ebx,%ebx 10e4ce: 0f 85 df 00 00 00 jne 10e5b3 10e4d4: e9 33 01 00 00 jmp 10e60c case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 10e4d9: 8b 43 4c mov 0x4c(%ebx),%eax 10e4dc: 83 f8 03 cmp $0x3,%eax 10e4df: 74 05 je 10e4e6 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 10e4e1: 83 f8 04 cmp $0x4,%eax 10e4e4: 75 16 jne 10e4fc result = IMFS_evaluate_link( pathloc, 0 ); 10e4e6: 51 push %ecx 10e4e7: 51 push %ecx 10e4e8: 6a 00 push $0x0 10e4ea: 56 push %esi 10e4eb: e8 68 fe ff ff call 10e358 if ( result == -1 ) 10e4f0: 83 c4 10 add $0x10,%esp 10e4f3: 83 f8 ff cmp $0xffffffff,%eax 10e4f6: 0f 84 68 01 00 00 je 10e664 <== NEVER TAKEN return -1; } node = pathloc->node_access; 10e4fc: 8b 06 mov (%esi),%eax if ( !node ) 10e4fe: 85 c0 test %eax,%eax 10e500: 0f 84 38 01 00 00 je 10e63e <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 10e506: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e50a: 0f 85 2e 01 00 00 jne 10e63e /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 10e510: 52 push %edx 10e511: 52 push %edx 10e512: 8d 4d c3 lea -0x3d(%ebp),%ecx 10e515: 51 push %ecx 10e516: 50 push %eax 10e517: e8 c4 03 00 00 call 10e8e0 10e51c: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 10e51e: 83 c4 10 add $0x10,%esp 10e521: 85 c0 test %eax,%eax 10e523: 0f 84 b1 00 00 00 je 10e5da done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 10e529: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e52d: 0f 85 80 00 00 00 jne 10e5b3 10e533: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10e537: 74 7a je 10e5b3 10e539: 8b 55 08 mov 0x8(%ebp),%edx 10e53c: 03 55 b4 add -0x4c(%ebp),%edx 10e53f: eb 04 jmp 10e545 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 10e541: ff 45 b4 incl -0x4c(%ebp) --(*len); 10e544: 4f dec %edi 10e545: 89 55 b0 mov %edx,-0x50(%ebp) const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 10e548: 83 ec 0c sub $0xc,%esp 10e54b: 0f be 02 movsbl (%edx),%eax 10e54e: 50 push %eax 10e54f: 89 55 ac mov %edx,-0x54(%ebp) 10e552: e8 b1 9e ff ff call 108408 10e557: 83 c4 10 add $0x10,%esp 10e55a: 85 c0 test %eax,%eax 10e55c: 8b 55 ac mov -0x54(%ebp),%edx 10e55f: 74 0a je 10e56b 10e561: 80 3a 00 cmpb $0x0,(%edx) 10e564: 74 05 je 10e56b <== NEVER TAKEN 10e566: 42 inc %edx 10e567: 85 ff test %edi,%edi 10e569: 75 d6 jne 10e541 <== ALWAYS TAKEN if ( ! node ) 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] != '.')) { 10e56b: 8b 45 b0 mov -0x50(%ebp),%eax 10e56e: 80 38 2e cmpb $0x2e,(%eax) 10e571: 75 0d jne 10e580 10e573: 8b 4d 08 mov 0x8(%ebp),%ecx 10e576: 8b 55 b4 mov -0x4c(%ebp),%edx 10e579: 80 7c 11 01 2e cmpb $0x2e,0x1(%ecx,%edx,1) 10e57e: 74 29 je 10e5a9 <== ALWAYS TAKEN 10e580: 89 f2 mov %esi,%edx *pathloc = node->info.directory.mt_fs->mt_fs_root; 10e582: 8b 73 5c mov 0x5c(%ebx),%esi 10e585: 83 c6 1c add $0x1c,%esi 10e588: b9 05 00 00 00 mov $0x5,%ecx 10e58d: 89 d7 mov %edx,%edi 10e58f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i], 10e591: 53 push %ebx 10e592: 8b 42 0c mov 0xc(%edx),%eax 10e595: ff 75 10 pushl 0x10(%ebp) 10e598: 52 push %edx 10e599: ff 75 b0 pushl -0x50(%ebp) 10e59c: ff 50 04 call *0x4(%eax) 10e59f: 89 c3 mov %eax,%ebx 10e5a1: 83 c4 10 add $0x10,%esp 10e5a4: e9 bd 00 00 00 jmp 10e666 pathloc, name ); } i += 2; 10e5a9: 83 45 b4 02 addl $0x2,-0x4c(%ebp) pathlen -= 2; 10e5ad: 83 ef 02 sub $0x2,%edi node = node->Parent; 10e5b0: 8b 5b 08 mov 0x8(%ebx),%ebx } pathloc->node_access = node; 10e5b3: 89 1e mov %ebx,(%esi) 10e5b5: e9 47 fe ff ff jmp 10e401 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 10e5ba: e8 01 33 00 00 call 1118c0 <__errno> 10e5bf: c7 00 11 00 00 00 movl $0x11,(%eax) 10e5c5: e9 8f fe ff ff jmp 10e459 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 10e5ca: e8 f1 32 00 00 call 1118c0 <__errno> 10e5cf: c7 00 5b 00 00 00 movl $0x5b,(%eax) 10e5d5: e9 7f fe ff ff jmp 10e459 10e5da: 89 f2 mov %esi,%edx case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 10e5dc: 8b 45 b4 mov -0x4c(%ebp),%eax 10e5df: 2b 45 e4 sub -0x1c(%ebp),%eax 10e5e2: 03 45 08 add 0x8(%ebp),%eax 10e5e5: 8b 4d 10 mov 0x10(%ebp),%ecx 10e5e8: 89 01 mov %eax,(%ecx) 10e5ea: 8b 5d 08 mov 0x8(%ebp),%ebx 10e5ed: 03 5d b4 add -0x4c(%ebp),%ebx /* * 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++) { 10e5f0: eb 2a jmp 10e61c if ( !IMFS_is_separator( path[ i ] ) ) 10e5f2: 83 ec 0c sub $0xc,%esp 10e5f5: 0f be c0 movsbl %al,%eax 10e5f8: 50 push %eax 10e5f9: 89 55 ac mov %edx,-0x54(%ebp) 10e5fc: e8 07 9e ff ff call 108408 10e601: 43 inc %ebx 10e602: 83 c4 10 add $0x10,%esp 10e605: 85 c0 test %eax,%eax 10e607: 8b 55 ac mov -0x54(%ebp),%edx 10e60a: 75 10 jne 10e61c rtems_set_errno_and_return_minus_one( ENOENT ); 10e60c: e8 af 32 00 00 call 1118c0 <__errno> 10e611: c7 00 02 00 00 00 movl $0x2,(%eax) 10e617: e9 3d fe ff ff jmp 10e459 /* * 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++) { 10e61c: 8a 03 mov (%ebx),%al 10e61e: 84 c0 test %al,%al 10e620: 75 d0 jne 10e5f2 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 10e622: 83 ec 0c sub $0xc,%esp 10e625: 52 push %edx 10e626: 89 55 ac mov %edx,-0x54(%ebp) 10e629: e8 6a f9 ff ff call 10df98 10e62e: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 10e630: 8b 55 ac mov -0x54(%ebp),%edx 10e633: 8b 02 mov (%edx),%eax 10e635: 83 c4 10 add $0x10,%esp 10e638: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 10e63c: 74 10 je 10e64e <== ALWAYS TAKEN if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 10e63e: e8 7d 32 00 00 call 1118c0 <__errno> 10e643: c7 00 14 00 00 00 movl $0x14,(%eax) 10e649: e9 0b fe ff ff jmp 10e459 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 10e64e: 51 push %ecx 10e64f: 51 push %ecx 10e650: 6a 03 push $0x3 10e652: 52 push %edx 10e653: e8 88 f9 ff ff call 10dfe0 10e658: 83 c4 10 add $0x10,%esp 10e65b: 85 c0 test %eax,%eax 10e65d: 75 07 jne 10e666 10e65f: e9 ea fd ff ff jmp 10e44e 10e664: 89 c3 mov %eax,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10e666: 89 d8 mov %ebx,%eax 10e668: 8d 65 f4 lea -0xc(%ebp),%esp 10e66b: 5b pop %ebx 10e66c: 5e pop %esi 10e66d: 5f pop %edi 10e66e: c9 leave 10e66f: c3 ret =============================================================================== 0010e017 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e017: 55 push %ebp 10e018: 89 e5 mov %esp,%ebp 10e01a: 53 push %ebx 10e01b: 83 ec 04 sub $0x4,%esp 10e01e: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10e021: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10e023: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10e027: 74 0d je 10e036 <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e029: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e02c: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e031: e8 52 cb ff ff call 10ab88 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10e036: 8b 40 50 mov 0x50(%eax),%eax 10e039: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10e03b: 83 ec 0c sub $0xc,%esp 10e03e: 53 push %ebx 10e03f: e8 54 ff ff ff call 10df98 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e044: 58 pop %eax 10e045: 5a pop %edx 10e046: ff 75 0c pushl 0xc(%ebp) 10e049: 53 push %ebx 10e04a: e8 91 ff ff ff call 10dfe0 10e04f: 89 c2 mov %eax,%edx 10e051: 83 c4 10 add $0x10,%esp 10e054: 31 c0 xor %eax,%eax 10e056: 85 d2 test %edx,%edx 10e058: 75 0e jne 10e068 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e05a: e8 61 38 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e05f: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e065: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return result; } 10e068: 8b 5d fc mov -0x4(%ebp),%ebx 10e06b: c9 leave 10e06c: c3 ret =============================================================================== 0010dfe0 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10dfe0: 55 push %ebp 10dfe1: 89 e5 mov %esp,%ebp 10dfe3: 83 ec 08 sub $0x8,%esp 10dfe6: 8b 45 0c mov 0xc(%ebp),%eax uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 10dfe9: a9 f8 ff ff ff test $0xfffffff8,%eax 10dfee: 74 10 je 10e000 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10dff0: e8 cb 38 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10dff5: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10dffb: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10dffe: eb 15 jmp 10e015 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 10e000: c1 e0 06 shl $0x6,%eax 10e003: 8b 55 08 mov 0x8(%ebp),%edx 10e006: 8b 12 mov (%edx),%edx 10e008: 8b 52 30 mov 0x30(%edx),%edx 10e00b: 21 c2 and %eax,%edx 10e00d: 39 c2 cmp %eax,%edx 10e00f: 0f 94 c0 sete %al 10e012: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10e015: c9 leave 10e016: c3 ret =============================================================================== 0010e06d : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10e06d: 55 push %ebp 10e06e: 89 e5 mov %esp,%ebp 10e070: 57 push %edi 10e071: 56 push %esi 10e072: 53 push %ebx 10e073: 83 ec 1c sub $0x1c,%esp 10e076: 8b 5d 08 mov 0x8(%ebp),%ebx 10e079: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10e07c: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10e07e: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10e082: 74 0a je 10e08e <== ALWAYS TAKEN rtems_fatal_error_occurred (0xABCD0000); 10e084: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e087: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10e08c: eb 0f jmp 10e09d <== NOT EXECUTED if ( !jnode->Parent ) 10e08e: 8b 47 08 mov 0x8(%edi),%eax 10e091: 85 c0 test %eax,%eax 10e093: 75 0d jne 10e0a2 <== ALWAYS TAKEN rtems_fatal_error_occurred( 0xBAD00000 ); 10e095: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e098: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 10e09d: e8 e6 ca ff ff call 10ab88 <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10e0a2: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10e0a4: 52 push %edx 10e0a5: 53 push %ebx 10e0a6: 8d 45 e4 lea -0x1c(%ebp),%eax 10e0a9: 50 push %eax 10e0aa: ff 77 50 pushl 0x50(%edi) 10e0ad: e8 46 10 00 00 call 10f0f8 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10e0b2: 8b 57 50 mov 0x50(%edi),%edx 10e0b5: 03 55 e4 add -0x1c(%ebp),%edx 10e0b8: 31 c0 xor %eax,%eax 10e0ba: 83 c9 ff or $0xffffffff,%ecx 10e0bd: 89 d7 mov %edx,%edi 10e0bf: f2 ae repnz scas %es:(%edi),%al 10e0c1: f7 d1 not %ecx 10e0c3: 49 dec %ecx 10e0c4: 53 push %ebx 10e0c5: 56 push %esi 10e0c6: 51 push %ecx 10e0c7: 52 push %edx 10e0c8: e8 33 00 00 00 call 10e100 10e0cd: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10e0cf: 83 c4 14 add $0x14,%esp 10e0d2: 53 push %ebx 10e0d3: e8 c0 fe ff ff call 10df98 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10e0d8: 59 pop %ecx 10e0d9: 58 pop %eax 10e0da: 56 push %esi 10e0db: 53 push %ebx 10e0dc: e8 ff fe ff ff call 10dfe0 10e0e1: 83 c4 10 add $0x10,%esp 10e0e4: 85 c0 test %eax,%eax 10e0e6: 75 0e jne 10e0f6 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EACCES ); 10e0e8: e8 d3 37 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e0ed: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10e0f3: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED return result; } 10e0f6: 89 f8 mov %edi,%eax 10e0f8: 8d 65 f4 lea -0xc(%ebp),%esp 10e0fb: 5b pop %ebx 10e0fc: 5e pop %esi 10e0fd: 5f pop %edi 10e0fe: c9 leave 10e0ff: c3 ret =============================================================================== 0010e7b9 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 10e7b9: 55 push %ebp <== NOT EXECUTED 10e7ba: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e7bc: 57 push %edi <== NOT EXECUTED 10e7bd: 56 push %esi <== NOT EXECUTED 10e7be: 53 push %ebx <== NOT EXECUTED 10e7bf: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 10e7c2: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e7c5: 8b 77 38 mov 0x38(%edi),%esi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 10e7c8: 57 push %edi <== NOT EXECUTED 10e7c9: 8d 46 50 lea 0x50(%esi),%eax <== NOT EXECUTED 10e7cc: 50 push %eax <== NOT EXECUTED 10e7cd: e8 fa f1 ff ff call 10d9cc <== NOT EXECUTED 10e7d2: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (! err) { 10e7d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e7d7: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e7da: 75 2c jne 10e808 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 10e7dc: 81 67 14 ff fe ff ff andl $0xfffffeff,0x14(%edi) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 10e7e3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e7e6: 56 push %esi <== NOT EXECUTED 10e7e7: e8 02 05 00 00 call 10ecee <== NOT EXECUTED 10e7ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e7ef: 85 c0 test %eax,%eax <== NOT EXECUTED 10e7f1: 75 23 jne 10e816 <== NOT EXECUTED 10e7f3: 66 83 7e 34 00 cmpw $0x0,0x34(%esi) <== NOT EXECUTED 10e7f8: 75 1c jne 10e816 <== NOT EXECUTED free(jnode); 10e7fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e7fd: 56 push %esi <== NOT EXECUTED 10e7fe: e8 99 8e ff ff call 10769c <== NOT EXECUTED 10e803: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e806: eb 0e jmp 10e816 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e808: 7d 0c jge 10e816 <== NOT EXECUTED 10e80a: e8 b1 30 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e80f: f7 db neg %ebx <== NOT EXECUTED 10e811: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e813: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e816: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e818: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e81b: 5b pop %ebx <== NOT EXECUTED 10e81c: 5e pop %esi <== NOT EXECUTED 10e81d: 5f pop %edi <== NOT EXECUTED 10e81e: c9 leave <== NOT EXECUTED 10e81f: c3 ret <== NOT EXECUTED =============================================================================== 0010e6ac : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 10e6ac: 55 push %ebp <== NOT EXECUTED 10e6ad: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e6af: 53 push %ebx <== NOT EXECUTED 10e6b0: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 10e6b3: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10e6b6: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 10e6b9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int err; if (command == FIONBIO) { 10e6bc: 81 f9 7e 66 04 80 cmp $0x8004667e,%ecx <== NOT EXECUTED 10e6c2: 75 1c jne 10e6e0 <== NOT EXECUTED if (buffer == NULL) 10e6c4: bb f2 ff ff ff mov $0xfffffff2,%ebx <== NOT EXECUTED 10e6c9: 85 d2 test %edx,%edx <== NOT EXECUTED 10e6cb: 74 2a je 10e6f7 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 10e6cd: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10e6d0: 74 06 je 10e6d8 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 10e6d2: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 10e6d6: eb 04 jmp 10e6dc <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 10e6d8: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 10e6dc: 31 db xor %ebx,%ebx <== NOT EXECUTED 10e6de: eb 23 jmp 10e703 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 10e6e0: 50 push %eax <== NOT EXECUTED 10e6e1: 52 push %edx <== NOT EXECUTED 10e6e2: 51 push %ecx <== NOT EXECUTED 10e6e3: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e6e6: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e6e9: e8 59 ef ff ff call 10d647 <== NOT EXECUTED 10e6ee: 89 c3 mov %eax,%ebx <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e6f0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e6f3: 85 c0 test %eax,%eax <== NOT EXECUTED 10e6f5: 79 0c jns 10e703 <== NOT EXECUTED 10e6f7: e8 c4 31 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e6fc: f7 db neg %ebx <== NOT EXECUTED 10e6fe: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e700: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e703: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e705: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e708: c9 leave <== NOT EXECUTED 10e709: c3 ret <== NOT EXECUTED =============================================================================== 0010e670 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 10e670: 55 push %ebp <== NOT EXECUTED 10e671: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e673: 53 push %ebx <== NOT EXECUTED 10e674: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e677: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 10e67a: 50 push %eax <== NOT EXECUTED 10e67b: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 10e67e: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e681: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e684: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 10e687: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 10e68a: e8 61 ef ff ff call 10d5f0 <== NOT EXECUTED 10e68f: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10e691: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e692: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10e695: 85 d2 test %edx,%edx <== NOT EXECUTED 10e697: 79 0e jns 10e6a7 <== NOT EXECUTED 10e699: e8 22 32 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e69e: f7 db neg %ebx <== NOT EXECUTED 10e6a0: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e6a2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e6a5: 89 c2 mov %eax,%edx <== NOT EXECUTED } 10e6a7: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10e6aa: c9 leave <== NOT EXECUTED 10e6ab: c3 ret <== NOT EXECUTED =============================================================================== 0010e820 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10e820: 55 push %ebp 10e821: 89 e5 mov %esp,%ebp 10e823: 53 push %ebx 10e824: 83 ec 0c sub $0xc,%esp 10e827: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 10e82a: 50 push %eax 10e82b: 8b 40 38 mov 0x38(%eax),%eax 10e82e: 83 c0 50 add $0x50,%eax 10e831: 50 push %eax 10e832: e8 65 f2 ff ff call 10da9c 10e837: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 10e839: 83 c4 10 add $0x10,%esp 10e83c: 85 c0 test %eax,%eax 10e83e: 79 0c jns 10e84c <== NEVER TAKEN 10e840: e8 7b 30 00 00 call 1118c0 <__errno> 10e845: f7 db neg %ebx 10e847: 89 18 mov %ebx,(%eax) 10e849: 83 cb ff or $0xffffffff,%ebx } 10e84c: 89 d8 mov %ebx,%eax 10e84e: 8b 5d fc mov -0x4(%ebp),%ebx 10e851: c9 leave 10e852: c3 ret =============================================================================== 0010e763 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 10e763: 55 push %ebp <== NOT EXECUTED 10e764: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e766: 56 push %esi <== NOT EXECUTED 10e767: 53 push %ebx <== NOT EXECUTED 10e768: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e76b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e76e: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 10e771: 50 push %eax <== NOT EXECUTED 10e772: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e775: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e778: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e77b: e8 af f0 ff ff call 10d82f <== NOT EXECUTED 10e780: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 10e782: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e785: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e788: 7e 18 jle 10e7a2 <== NOT EXECUTED IMFS_update_atime(jnode); 10e78a: 52 push %edx <== NOT EXECUTED 10e78b: 52 push %edx <== NOT EXECUTED 10e78c: 6a 00 push $0x0 <== NOT EXECUTED 10e78e: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e791: 50 push %eax <== NOT EXECUTED 10e792: e8 7d 8f ff ff call 107714 <== NOT EXECUTED 10e797: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e79a: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 10e79d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e7a0: eb 0e jmp 10e7b0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 10e7a2: 74 0c je 10e7b0 <== NOT EXECUTED 10e7a4: e8 17 31 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e7a9: f7 db neg %ebx <== NOT EXECUTED 10e7ab: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e7ad: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e7b0: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e7b2: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e7b5: 5b pop %ebx <== NOT EXECUTED 10e7b6: 5e pop %esi <== NOT EXECUTED 10e7b7: c9 leave <== NOT EXECUTED 10e7b8: c3 ret <== NOT EXECUTED =============================================================================== 0010e70a : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10e70a: 55 push %ebp <== NOT EXECUTED 10e70b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e70d: 56 push %esi <== NOT EXECUTED 10e70e: 53 push %ebx <== NOT EXECUTED 10e70f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10e712: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 10e715: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 10e718: 50 push %eax <== NOT EXECUTED 10e719: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 10e71c: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10e71f: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 10e722: e8 76 ef ff ff call 10d69d <== NOT EXECUTED 10e727: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) { 10e729: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e72c: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 10e72f: 7e 1b jle 10e74c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 10e731: 50 push %eax <== NOT EXECUTED 10e732: 50 push %eax <== NOT EXECUTED 10e733: 6a 00 push $0x0 <== NOT EXECUTED 10e735: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 10e738: 50 push %eax <== NOT EXECUTED 10e739: e8 d6 8f ff ff call 107714 <== NOT EXECUTED 10e73e: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 10e741: 89 46 44 mov %eax,0x44(%esi) <== NOT EXECUTED 10e744: 89 46 48 mov %eax,0x48(%esi) <== NOT EXECUTED 10e747: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e74a: eb 0e jmp 10e75a <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 10e74c: 74 0c je 10e75a <== NOT EXECUTED 10e74e: e8 6d 31 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10e753: f7 db neg %ebx <== NOT EXECUTED 10e755: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 10e757: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED } 10e75a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10e75c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10e75f: 5b pop %ebx <== NOT EXECUTED 10e760: 5e pop %esi <== NOT EXECUTED 10e761: c9 leave <== NOT EXECUTED 10e762: c3 ret <== NOT EXECUTED =============================================================================== 0010e8e0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 10e8e0: 55 push %ebp 10e8e1: 89 e5 mov %esp,%ebp 10e8e3: 57 push %edi 10e8e4: 56 push %esi 10e8e5: 53 push %ebx 10e8e6: 83 ec 0c sub $0xc,%esp 10e8e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10e8ec: 8b 7d 0c mov 0xc(%ebp),%edi /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 10e8ef: 85 db test %ebx,%ebx 10e8f1: 75 16 jne 10e909 <== ALWAYS TAKEN 10e8f3: 68 a0 f4 11 00 push $0x11f4a0 <== NOT EXECUTED 10e8f8: 68 08 f5 11 00 push $0x11f508 <== NOT EXECUTED 10e8fd: 6a 2a push $0x2a <== NOT EXECUTED 10e8ff: 68 aa f4 11 00 push $0x11f4aa <== NOT EXECUTED 10e904: e8 97 8a ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( !name ) 10e909: 85 ff test %edi,%edi 10e90b: 74 52 je 10e95f <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 10e90d: 56 push %esi 10e90e: 56 push %esi 10e90f: 68 00 f5 11 00 push $0x11f500 10e914: 57 push %edi 10e915: e8 c2 3a 00 00 call 1123dc 10e91a: 83 c4 10 add $0x10,%esp 10e91d: 85 c0 test %eax,%eax 10e91f: 74 40 je 10e961 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 10e921: 51 push %ecx 10e922: 51 push %ecx 10e923: 68 02 f5 11 00 push $0x11f502 10e928: 57 push %edi 10e929: e8 ae 3a 00 00 call 1123dc 10e92e: 83 c4 10 add $0x10,%esp 10e931: 85 c0 test %eax,%eax 10e933: 75 05 jne 10e93a <== ALWAYS TAKEN return directory->Parent; 10e935: 8b 5b 08 mov 0x8(%ebx),%ebx <== NOT EXECUTED 10e938: eb 27 jmp 10e961 <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10e93a: 8b 73 50 mov 0x50(%ebx),%esi 10e93d: 83 c3 54 add $0x54,%ebx 10e940: eb 19 jmp 10e95b !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 ) ) 10e942: 8d 46 0c lea 0xc(%esi),%eax 10e945: 52 push %edx 10e946: 52 push %edx 10e947: 50 push %eax 10e948: 57 push %edi 10e949: e8 8e 3a 00 00 call 1123dc 10e94e: 83 c4 10 add $0x10,%esp 10e951: 85 c0 test %eax,%eax 10e953: 75 04 jne 10e959 10e955: 89 f3 mov %esi,%ebx 10e957: eb 08 jmp 10e961 the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 10e959: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 10e95b: 39 de cmp %ebx,%esi 10e95d: 75 e3 jne 10e942 10e95f: 31 db xor %ebx,%ebx if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 10e961: 89 d8 mov %ebx,%eax 10e963: 8d 65 f4 lea -0xc(%ebp),%esp 10e966: 5b pop %ebx 10e967: 5e pop %esi 10e968: 5f pop %edi 10e969: c9 leave 10e96a: c3 ret =============================================================================== 0010e85c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 10e85c: 55 push %ebp 10e85d: 89 e5 mov %esp,%ebp 10e85f: 57 push %edi 10e860: 56 push %esi 10e861: 53 push %ebx 10e862: 83 ec 2c sub $0x2c,%esp 10e865: 8b 45 08 mov 0x8(%ebp),%eax /* * 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; 10e868: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 10e86b: 8d 7d d4 lea -0x2c(%ebp),%edi 10e86e: 8d 70 1c lea 0x1c(%eax),%esi 10e871: b9 05 00 00 00 mov $0x5,%ecx 10e876: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 10e878: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 10e87f: 8d 75 d4 lea -0x2c(%ebp),%esi */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 10e882: 8b 7b 08 mov 0x8(%ebx),%edi loc.node_access = (void *)jnode; 10e885: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 10e888: 83 ec 0c sub $0xc,%esp 10e88b: 56 push %esi 10e88c: e8 07 f7 ff ff call 10df98 if ( jnode->type != IMFS_DIRECTORY ) { 10e891: 83 c4 10 add $0x10,%esp 10e894: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e898: 75 08 jne 10e8a2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e89a: 8d 43 54 lea 0x54(%ebx),%eax 10e89d: 39 43 50 cmp %eax,0x50(%ebx) 10e8a0: 75 13 jne 10e8b5 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 10e8a2: 50 push %eax 10e8a3: 50 push %eax 10e8a4: 56 push %esi 10e8a5: 6a 00 push $0x0 10e8a7: e8 e4 88 ff ff call 107190 if (result != 0) 10e8ac: 83 c4 10 add $0x10,%esp 10e8af: 85 c0 test %eax,%eax 10e8b1: 75 1d jne 10e8d0 <== NEVER TAKEN 10e8b3: 89 fb mov %edi,%ebx return -1; jnode = next; } if ( jnode != NULL ) { 10e8b5: 85 db test %ebx,%ebx 10e8b7: 74 1c je 10e8d5 if ( jnode->type == IMFS_DIRECTORY ) { 10e8b9: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 10e8bd: 75 c3 jne 10e882 <== NEVER TAKEN 10e8bf: 8d 43 54 lea 0x54(%ebx),%eax 10e8c2: 39 43 50 cmp %eax,0x50(%ebx) 10e8c5: 74 bb je 10e882 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 10e8c7: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 10e8ca: 85 db test %ebx,%ebx 10e8cc: 75 b4 jne 10e882 <== ALWAYS TAKEN 10e8ce: eb 05 jmp 10e8d5 <== NOT EXECUTED 10e8d0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10e8d3: eb 02 jmp 10e8d7 <== NOT EXECUTED 10e8d5: 31 c0 xor %eax,%eax return 0; } 10e8d7: 8d 65 f4 lea -0xc(%ebp),%esp 10e8da: 5b pop %ebx 10e8db: 5e pop %esi 10e8dc: 5f pop %edi 10e8dd: c9 leave 10e8de: c3 ret =============================================================================== 0010e96c : const char *path, int pathlen, char *token, int *token_len ) { 10e96c: 55 push %ebp 10e96d: 89 e5 mov %esp,%ebp 10e96f: 57 push %edi 10e970: 56 push %esi 10e971: 53 push %ebx 10e972: 83 ec 1c sub $0x1c,%esp 10e975: 8b 7d 08 mov 0x8(%ebp),%edi 10e978: 8b 75 10 mov 0x10(%ebp),%esi register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 10e97b: 8a 17 mov (%edi),%dl 10e97d: 31 db xor %ebx,%ebx while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10e97f: eb 16 jmp 10e997 token[i] = c; 10e981: 88 14 1e mov %dl,(%esi,%ebx,1) if ( i == IMFS_NAME_MAX ) 10e984: 83 fb 20 cmp $0x20,%ebx 10e987: 75 0a jne 10e993 10e989: bf 04 00 00 00 mov $0x4,%edi 10e98e: e9 8c 00 00 00 jmp 10ea1f return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 10e993: 43 inc %ebx 10e994: 8a 14 1f mov (%edi,%ebx,1),%dl /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 10e997: 83 ec 0c sub $0xc,%esp 10e99a: 0f be c2 movsbl %dl,%eax 10e99d: 50 push %eax 10e99e: 88 55 e4 mov %dl,-0x1c(%ebp) 10e9a1: e8 62 9a ff ff call 108408 10e9a6: 83 c4 10 add $0x10,%esp 10e9a9: 85 c0 test %eax,%eax 10e9ab: 8a 55 e4 mov -0x1c(%ebp),%dl 10e9ae: 75 05 jne 10e9b5 10e9b0: 3b 5d 0c cmp 0xc(%ebp),%ebx 10e9b3: 7c cc jl 10e981 /* * Copy a seperator into token. */ if ( i == 0 ) { 10e9b5: 85 db test %ebx,%ebx 10e9b7: 75 19 jne 10e9d2 token[i] = c; 10e9b9: 88 16 mov %dl,(%esi) if ( (token[i] != '\0') && pathlen ) { 10e9bb: 84 d2 test %dl,%dl 10e9bd: 74 0f je 10e9ce 10e9bf: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 10e9c3: 74 09 je 10e9ce 10e9c5: bf 01 00 00 00 mov $0x1,%edi 10e9ca: b3 01 mov $0x1,%bl 10e9cc: eb 14 jmp 10e9e2 10e9ce: 31 ff xor %edi,%edi 10e9d0: eb 10 jmp 10e9e2 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 10e9d2: bf 03 00 00 00 mov $0x3,%edi 10e9d7: 80 7c 1e ff 00 cmpb $0x0,-0x1(%esi,%ebx,1) 10e9dc: 74 04 je 10e9e2 <== NEVER TAKEN token[i] = '\0'; 10e9de: c6 04 1e 00 movb $0x0,(%esi,%ebx,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 10e9e2: 8b 45 14 mov 0x14(%ebp),%eax 10e9e5: 89 18 mov %ebx,(%eax) /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 10e9e7: 83 ff 03 cmp $0x3,%edi 10e9ea: 75 33 jne 10ea1f if ( strcmp( token, "..") == 0 ) 10e9ec: 52 push %edx 10e9ed: 52 push %edx 10e9ee: 68 1f f5 11 00 push $0x11f51f 10e9f3: 56 push %esi 10e9f4: e8 e3 39 00 00 call 1123dc 10e9f9: 83 c4 10 add $0x10,%esp 10e9fc: 85 c0 test %eax,%eax 10e9fe: 75 06 jne 10ea06 10ea00: 66 bf 02 00 mov $0x2,%di 10ea04: eb 19 jmp 10ea1f type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 10ea06: 50 push %eax 10ea07: 50 push %eax 10ea08: 68 20 f5 11 00 push $0x11f520 10ea0d: 56 push %esi 10ea0e: e8 c9 39 00 00 call 1123dc 10ea13: 83 c4 10 add $0x10,%esp 10ea16: 85 c0 test %eax,%eax 10ea18: 75 05 jne 10ea1f 10ea1a: bf 01 00 00 00 mov $0x1,%edi type = IMFS_CURRENT_DIR; } return type; } 10ea1f: 89 f8 mov %edi,%eax 10ea21: 8d 65 f4 lea -0xc(%ebp),%esp 10ea24: 5b pop %ebx 10ea25: 5e pop %esi 10ea26: 5f pop %edi 10ea27: c9 leave 10ea28: c3 ret =============================================================================== 00106e10 : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 106e10: 55 push %ebp 106e11: 89 e5 mov %esp,%ebp 106e13: 57 push %edi 106e14: 56 push %esi 106e15: 53 push %ebx 106e16: 83 ec 0c sub $0xc,%esp 106e19: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 106e1c: 8b 0d 68 16 12 00 mov 0x121668,%ecx 106e22: 31 d2 xor %edx,%edx 106e24: b8 10 00 00 00 mov $0x10,%eax int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 106e29: 39 c8 cmp %ecx,%eax 106e2b: 74 0d je 106e3a 106e2d: d1 e0 shl %eax 106e2f: 42 inc %edx 106e30: 83 fa 06 cmp $0x6,%edx 106e33: 75 f4 jne 106e29 <== ALWAYS TAKEN 106e35: b8 80 00 00 00 mov $0x80,%eax <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 106e3a: a3 2c 52 12 00 mov %eax,0x12522c /* * 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(); 106e3f: e8 21 70 00 00 call 10de65 106e44: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 106e47: 8b 45 14 mov 0x14(%ebp),%eax 106e4a: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 106e4d: 8b 45 0c mov 0xc(%ebp),%eax 106e50: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 106e53: 8d 7b 38 lea 0x38(%ebx),%edi 106e56: be 3c f3 11 00 mov $0x11f33c,%esi 106e5b: b9 0c 00 00 00 mov $0xc,%ecx 106e60: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 106e62: 50 push %eax 106e63: 50 push %eax 106e64: 6a 10 push $0x10 106e66: 6a 01 push $0x1 106e68: e8 4f 06 00 00 call 1074bc if ( !fs_info ) { 106e6d: 83 c4 10 add $0x10,%esp 106e70: 85 c0 test %eax,%eax 106e72: 75 1e jne 106e92 <== ALWAYS TAKEN free(temp_mt_entry->mt_fs_root.node_access); 106e74: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106e77: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 106e7a: e8 1d 08 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 106e7f: e8 3c aa 00 00 call 1118c0 <__errno> <== NOT EXECUTED 106e84: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106e8a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e90: eb 36 jmp 106ec8 <== NOT EXECUTED } temp_mt_entry->fs_info = fs_info; 106e92: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 106e95: 8b 15 30 52 12 00 mov 0x125230,%edx 106e9b: 89 10 mov %edx,(%eax) 106e9d: 42 inc %edx 106e9e: 89 15 30 52 12 00 mov %edx,0x125230 fs_info->ino_count = 1; 106ea4: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 106eab: 8b 55 10 mov 0x10(%ebp),%edx 106eae: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 106eb1: 8b 55 14 mov 0x14(%ebp),%edx 106eb4: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 106eb7: 8b 43 1c mov 0x1c(%ebx),%eax 106eba: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 106ec1: e8 34 67 00 00 call 10d5fa 106ec6: 31 c0 xor %eax,%eax return 0; } 106ec8: 8d 65 f4 lea -0xc(%ebp),%esp 106ecb: 5b pop %ebx 106ecc: 5e pop %esi 106ecd: 5f pop %edi 106ece: c9 leave 106ecf: c3 ret =============================================================================== 00106ed0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 106ed0: 55 push %ebp 106ed1: 89 e5 mov %esp,%ebp 106ed3: 57 push %edi 106ed4: 53 push %ebx 106ed5: 83 ec 50 sub $0x50,%esp 106ed8: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 106edb: 8b 45 08 mov 0x8(%ebp),%eax 106ede: 8b 00 mov (%eax),%eax 106ee0: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 106ee3: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 106ee8: 76 0d jbe 106ef7 rtems_set_errno_and_return_minus_one( EMLINK ); 106eea: e8 d1 a9 00 00 call 1118c0 <__errno> 106eef: c7 00 1f 00 00 00 movl $0x1f,(%eax) 106ef5: eb 43 jmp 106f3a /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 106ef7: 31 c0 xor %eax,%eax 106ef9: 83 c9 ff or $0xffffffff,%ecx 106efc: 89 d7 mov %edx,%edi 106efe: f2 ae repnz scas %es:(%edi),%al 106f00: f7 d1 not %ecx 106f02: 49 dec %ecx 106f03: 8d 45 f4 lea -0xc(%ebp),%eax 106f06: 50 push %eax 106f07: 8d 5d b7 lea -0x49(%ebp),%ebx 106f0a: 53 push %ebx 106f0b: 51 push %ecx 106f0c: 52 push %edx 106f0d: e8 5a 7a 00 00 call 10e96c * 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( 106f12: 8d 45 d8 lea -0x28(%ebp),%eax 106f15: 89 04 24 mov %eax,(%esp) 106f18: 68 ff a1 00 00 push $0xa1ff 106f1d: 53 push %ebx 106f1e: 6a 03 push $0x3 106f20: ff 75 0c pushl 0xc(%ebp) 106f23: e8 70 6f 00 00 call 10de98 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 106f28: 83 c4 20 add $0x20,%esp 106f2b: 85 c0 test %eax,%eax 106f2d: 75 10 jne 106f3f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106f2f: e8 8c a9 00 00 call 1118c0 <__errno> <== NOT EXECUTED 106f34: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106f3a: 83 c8 ff or $0xffffffff,%eax 106f3d: eb 22 jmp 106f61 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 106f3f: 8b 45 d8 mov -0x28(%ebp),%eax 106f42: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 106f46: 50 push %eax 106f47: 50 push %eax 106f48: 6a 00 push $0x0 106f4a: 8d 45 ec lea -0x14(%ebp),%eax 106f4d: 50 push %eax 106f4e: e8 c1 07 00 00 call 107714 106f53: 8b 55 ec mov -0x14(%ebp),%edx 106f56: 8b 45 d8 mov -0x28(%ebp),%eax 106f59: 89 50 48 mov %edx,0x48(%eax) 106f5c: 31 c0 xor %eax,%eax return 0; 106f5e: 83 c4 10 add $0x10,%esp } 106f61: 8d 65 f8 lea -0x8(%ebp),%esp 106f64: 5b pop %ebx 106f65: 5f pop %edi 106f66: c9 leave 106f67: c3 ret =============================================================================== 00110458 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 110458: 55 push %ebp 110459: 89 e5 mov %esp,%ebp 11045b: 53 push %ebx 11045c: 83 ec 04 sub $0x4,%esp 11045f: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 110462: 85 c0 test %eax,%eax 110464: 75 11 jne 110477 <== ALWAYS TAKEN 110466: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 11046b: 68 60 f8 11 00 push $0x11f860 <== NOT EXECUTED 110470: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 110475: eb 15 jmp 11048c <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110477: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11047b: 74 19 je 110496 <== ALWAYS TAKEN 11047d: 68 0b f7 11 00 push $0x11f70b <== NOT EXECUTED 110482: 68 60 f8 11 00 push $0x11f860 <== NOT EXECUTED 110487: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 11048c: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 110491: e8 0a 6f ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 110496: 52 push %edx 110497: 6a 01 push $0x1 110499: ff 75 0c pushl 0xc(%ebp) 11049c: 50 push %eax 11049d: e8 90 fb ff ff call 110032 1104a2: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 1104a4: 83 c4 10 add $0x10,%esp 1104a7: 31 c0 xor %eax,%eax 1104a9: 83 3b 00 cmpl $0x0,(%ebx) 1104ac: 75 14 jne 1104c2 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 1104ae: e8 5d fb ff ff call 110010 1104b3: 89 c2 mov %eax,%edx if ( !memory ) 1104b5: b8 01 00 00 00 mov $0x1,%eax 1104ba: 85 d2 test %edx,%edx 1104bc: 74 04 je 1104c2 <== NEVER TAKEN return 1; *block_entry_ptr = memory; 1104be: 89 13 mov %edx,(%ebx) 1104c0: 30 c0 xor %al,%al return 0; } 1104c2: 8b 5d fc mov -0x4(%ebp),%ebx 1104c5: c9 leave 1104c6: c3 ret =============================================================================== 001104c7 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1104c7: 55 push %ebp 1104c8: 89 e5 mov %esp,%ebp 1104ca: 57 push %edi 1104cb: 56 push %esi 1104cc: 53 push %ebx 1104cd: 83 ec 2c sub $0x2c,%esp 1104d0: 8b 5d 08 mov 0x8(%ebp),%ebx 1104d3: 8b 75 0c mov 0xc(%ebp),%esi 1104d6: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 1104d9: 85 db test %ebx,%ebx 1104db: 75 11 jne 1104ee <== ALWAYS TAKEN 1104dd: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 1104e2: 68 78 f8 11 00 push $0x11f878 <== NOT EXECUTED 1104e7: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 1104ec: eb 15 jmp 110503 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1104ee: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1104f2: 74 19 je 11050d <== ALWAYS TAKEN 1104f4: 68 0b f7 11 00 push $0x11f70b <== NOT EXECUTED 1104f9: 68 78 f8 11 00 push $0x11f878 <== NOT EXECUTED 1104fe: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 110503: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 110508: e8 93 6e ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 11050d: a1 2c 52 12 00 mov 0x12522c,%eax 110512: 89 c1 mov %eax,%ecx 110514: c1 e9 02 shr $0x2,%ecx 110517: 8d 51 01 lea 0x1(%ecx),%edx 11051a: 0f af d1 imul %ecx,%edx 11051d: 42 inc %edx 11051e: 0f af d1 imul %ecx,%edx 110521: 4a dec %edx 110522: 0f af d0 imul %eax,%edx 110525: 83 ff 00 cmp $0x0,%edi 110528: 7c 16 jl 110540 <== NEVER TAKEN 11052a: 7f 04 jg 110530 <== NEVER TAKEN 11052c: 39 d6 cmp %edx,%esi 11052e: 72 10 jb 110540 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 110530: e8 8b 13 00 00 call 1118c0 <__errno> <== NOT EXECUTED 110535: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11053b: e9 92 00 00 00 jmp 1105d2 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 110540: 8b 53 50 mov 0x50(%ebx),%edx 110543: 8b 4b 54 mov 0x54(%ebx),%ecx 110546: 89 55 e0 mov %edx,-0x20(%ebp) 110549: 89 4d e4 mov %ecx,-0x1c(%ebp) 11054c: 39 cf cmp %ecx,%edi 11054e: 7f 0e jg 11055e <== NEVER TAKEN 110550: 0f 8c 8d 00 00 00 jl 1105e3 <== NEVER TAKEN 110556: 39 d6 cmp %edx,%esi 110558: 0f 86 85 00 00 00 jbe 1105e3 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 11055e: 89 45 d8 mov %eax,-0x28(%ebp) 110561: 89 c1 mov %eax,%ecx 110563: c1 f9 1f sar $0x1f,%ecx 110566: 89 4d dc mov %ecx,-0x24(%ebp) 110569: ff 75 dc pushl -0x24(%ebp) 11056c: ff 75 d8 pushl -0x28(%ebp) 11056f: 57 push %edi 110570: 56 push %esi 110571: e8 e6 c3 00 00 call 11c95c <__divdi3> 110576: 83 c4 10 add $0x10,%esp 110579: 89 45 d4 mov %eax,-0x2c(%ebp) old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 11057c: ff 75 dc pushl -0x24(%ebp) 11057f: ff 75 d8 pushl -0x28(%ebp) 110582: ff 75 e4 pushl -0x1c(%ebp) 110585: ff 75 e0 pushl -0x20(%ebp) 110588: e8 cf c3 00 00 call 11c95c <__divdi3> 11058d: 83 c4 10 add $0x10,%esp 110590: 89 45 e0 mov %eax,-0x20(%ebp) 110593: 89 c2 mov %eax,%edx /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 110595: eb 41 jmp 1105d8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 110597: 50 push %eax 110598: 50 push %eax 110599: 52 push %edx 11059a: 53 push %ebx 11059b: 89 55 d0 mov %edx,-0x30(%ebp) 11059e: e8 b5 fe ff ff call 110458 1105a3: 83 c4 10 add $0x10,%esp 1105a6: 85 c0 test %eax,%eax 1105a8: 8b 55 d0 mov -0x30(%ebp),%edx 1105ab: 74 2a je 1105d7 <== ALWAYS TAKEN 1105ad: eb 13 jmp 1105c2 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 1105af: 51 push %ecx <== NOT EXECUTED 1105b0: 51 push %ecx <== NOT EXECUTED 1105b1: 52 push %edx <== NOT EXECUTED 1105b2: 53 push %ebx <== NOT EXECUTED 1105b3: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 1105b6: e8 5c fc ff ff call 110217 <== NOT EXECUTED * 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-- ) { 1105bb: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 1105be: 4a dec %edx <== NOT EXECUTED 1105bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1105c2: 3b 55 e0 cmp -0x20(%ebp),%edx <== NOT EXECUTED 1105c5: 73 e8 jae 1105af <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1105c7: e8 f4 12 00 00 call 1118c0 <__errno> <== NOT EXECUTED 1105cc: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1105d2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1105d5: eb 0e jmp 1105e5 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 1105d7: 42 inc %edx 1105d8: 3b 55 d4 cmp -0x2c(%ebp),%edx 1105db: 76 ba jbe 110597 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1105dd: 89 73 50 mov %esi,0x50(%ebx) 1105e0: 89 7b 54 mov %edi,0x54(%ebx) 1105e3: 31 c0 xor %eax,%eax return 0; } 1105e5: 8d 65 f4 lea -0xc(%ebp),%esp 1105e8: 5b pop %ebx 1105e9: 5e pop %esi 1105ea: 5f pop %edi 1105eb: c9 leave 1105ec: c3 ret =============================================================================== 00110032 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 110032: 55 push %ebp 110033: 89 e5 mov %esp,%ebp 110035: 57 push %edi 110036: 56 push %esi 110037: 53 push %ebx 110038: 83 ec 1c sub $0x1c,%esp 11003b: 8b 5d 08 mov 0x8(%ebp),%ebx 11003e: 8b 7d 0c mov 0xc(%ebp),%edi 110041: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 110044: 85 db test %ebx,%ebx 110046: 75 11 jne 110059 <== ALWAYS TAKEN 110048: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 11004d: 68 c8 f7 11 00 push $0x11f7c8 <== NOT EXECUTED 110052: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 110057: eb 15 jmp 11006e <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 110059: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 11005d: 74 19 je 110078 <== ALWAYS TAKEN 11005f: 68 0b f7 11 00 push $0x11f70b <== NOT EXECUTED 110064: 68 c8 f7 11 00 push $0x11f7c8 <== NOT EXECUTED 110069: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 11006e: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 110073: e8 28 73 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 110078: 8b 0d 2c 52 12 00 mov 0x12522c,%ecx 11007e: c1 e9 02 shr $0x2,%ecx 110081: 8d 41 ff lea -0x1(%ecx),%eax 110084: 39 c7 cmp %eax,%edi 110086: 77 32 ja 1100ba <== NEVER TAKEN #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 110088: 8b 53 58 mov 0x58(%ebx),%edx if ( malloc_it ) { 11008b: 85 f6 test %esi,%esi 11008d: 74 23 je 1100b2 if ( !p ) { 11008f: 85 d2 test %edx,%edx 110091: 75 10 jne 1100a3 p = memfile_alloc_block(); 110093: e8 78 ff ff ff call 110010 if ( !p ) 110098: 85 c0 test %eax,%eax 11009a: 0f 84 03 01 00 00 je 1101a3 <== NEVER TAKEN return 0; info->indirect = p; 1100a0: 89 43 58 mov %eax,0x58(%ebx) } return &info->indirect[ my_block ]; 1100a3: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax 1100aa: 03 43 58 add 0x58(%ebx),%eax 1100ad: e9 f3 00 00 00 jmp 1101a5 } if ( !p ) return 0; return &info->indirect[ my_block ]; 1100b2: 8d 04 ba lea (%edx,%edi,4),%eax 1100b5: e9 e5 00 00 00 jmp 11019f /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 1100ba: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 1100bd: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 1100c0: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 1100c3: 39 d7 cmp %edx,%edi <== NOT EXECUTED 1100c5: 77 58 ja 11011f <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 1100c7: 29 cf sub %ecx,%edi <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 1100c9: 89 f8 mov %edi,%eax <== NOT EXECUTED 1100cb: 31 d2 xor %edx,%edx <== NOT EXECUTED 1100cd: f7 f1 div %ecx <== NOT EXECUTED 1100cf: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 1100d2: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 1100d4: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 1100d7: 85 f6 test %esi,%esi <== NOT EXECUTED 1100d9: 74 37 je 110112 <== NOT EXECUTED if ( !p ) { 1100db: 85 c0 test %eax,%eax <== NOT EXECUTED 1100dd: 75 10 jne 1100ef <== NOT EXECUTED p = memfile_alloc_block(); 1100df: e8 2c ff ff ff call 110010 <== NOT EXECUTED if ( !p ) 1100e4: 85 c0 test %eax,%eax <== NOT EXECUTED 1100e6: 0f 84 b7 00 00 00 je 1101a3 <== NOT EXECUTED return 0; info->doubly_indirect = p; 1100ec: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 1100ef: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 1100f2: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 1100f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1100f6: 75 0f jne 110107 <== NOT EXECUTED p1 = memfile_alloc_block(); 1100f8: e8 13 ff ff ff call 110010 <== NOT EXECUTED if ( !p1 ) 1100fd: 85 c0 test %eax,%eax <== NOT EXECUTED 1100ff: 0f 84 9e 00 00 00 je 1101a3 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 110105: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 110107: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 11010a: 8d 04 88 lea (%eax,%ecx,4),%eax <== NOT EXECUTED 11010d: e9 93 00 00 00 jmp 1101a5 <== NOT EXECUTED } if ( !p ) 110112: 85 c0 test %eax,%eax <== NOT EXECUTED 110114: 0f 84 89 00 00 00 je 1101a3 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 11011a: 8b 14 b8 mov (%eax,%edi,4),%edx <== NOT EXECUTED 11011d: eb 7a jmp 110199 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 11011f: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 110122: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 110125: 4a dec %edx <== NOT EXECUTED 110126: 39 d7 cmp %edx,%edi <== NOT EXECUTED 110128: 77 79 ja 1101a3 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 11012a: 29 c7 sub %eax,%edi <== NOT EXECUTED 11012c: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 11012e: 31 d2 xor %edx,%edx <== NOT EXECUTED 110130: f7 f1 div %ecx <== NOT EXECUTED 110132: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 110135: 31 d2 xor %edx,%edx <== NOT EXECUTED 110137: f7 f1 div %ecx <== NOT EXECUTED 110139: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 11013c: 89 c7 mov %eax,%edi <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 11013e: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 110141: 85 f6 test %esi,%esi <== NOT EXECUTED 110143: 74 43 je 110188 <== NOT EXECUTED if ( !p ) { 110145: 85 c0 test %eax,%eax <== NOT EXECUTED 110147: 75 0c jne 110155 <== NOT EXECUTED p = memfile_alloc_block(); 110149: e8 c2 fe ff ff call 110010 <== NOT EXECUTED if ( !p ) 11014e: 85 c0 test %eax,%eax <== NOT EXECUTED 110150: 74 51 je 1101a3 <== NOT EXECUTED return 0; info->triply_indirect = p; 110152: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 110155: 8d 1c b8 lea (%eax,%edi,4),%ebx <== NOT EXECUTED 110158: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 11015a: 85 c0 test %eax,%eax <== NOT EXECUTED 11015c: 75 0b jne 110169 <== NOT EXECUTED p1 = memfile_alloc_block(); 11015e: e8 ad fe ff ff call 110010 <== NOT EXECUTED if ( !p1 ) 110163: 85 c0 test %eax,%eax <== NOT EXECUTED 110165: 74 3c je 1101a3 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 110167: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 110169: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 11016c: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 11016f: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 110171: 85 c0 test %eax,%eax <== NOT EXECUTED 110173: 75 0b jne 110180 <== NOT EXECUTED p2 = memfile_alloc_block(); 110175: e8 96 fe ff ff call 110010 <== NOT EXECUTED if ( !p2 ) 11017a: 85 c0 test %eax,%eax <== NOT EXECUTED 11017c: 74 25 je 1101a3 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 11017e: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 110180: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 110183: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED 110186: eb 1d jmp 1101a5 <== NOT EXECUTED } if ( !p ) 110188: 85 c0 test %eax,%eax <== NOT EXECUTED 11018a: 74 17 je 1101a3 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 11018c: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p1 ) 11018f: 85 c0 test %eax,%eax <== NOT EXECUTED 110191: 74 10 je 1101a3 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 110193: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 110196: 8b 14 88 mov (%eax,%ecx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 110199: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 11019c: 8d 04 8a lea (%edx,%ecx,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 11019f: 85 d2 test %edx,%edx 1101a1: 75 02 jne 1101a5 <== ALWAYS TAKEN return 0; return (block_p *)&p2[ singly ]; 1101a3: 31 c0 xor %eax,%eax /* * This means the requested block number is out of range. */ return 0; } 1101a5: 8d 65 f4 lea -0xc(%ebp),%esp 1101a8: 5b pop %ebx 1101a9: 5e pop %esi 1101aa: 5f pop %edi 1101ab: c9 leave 1101ac: c3 ret =============================================================================== 0011095e : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 11095e: 55 push %ebp 11095f: 89 e5 mov %esp,%ebp 110961: 57 push %edi 110962: 56 push %esi 110963: 53 push %ebx 110964: 83 ec 3c sub $0x3c,%esp 110967: 8b 75 0c mov 0xc(%ebp),%esi 11096a: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 11096d: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 110971: 75 11 jne 110984 <== ALWAYS TAKEN 110973: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 110978: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 11097d: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 110982: eb 1d jmp 1109a1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 110984: 8b 55 08 mov 0x8(%ebp),%edx 110987: 8b 42 4c mov 0x4c(%edx),%eax 11098a: 8d 48 fb lea -0x5(%eax),%ecx 11098d: 83 f9 01 cmp $0x1,%ecx 110990: 76 19 jbe 1109ab <== ALWAYS TAKEN 110992: 68 75 f7 11 00 push $0x11f775 <== NOT EXECUTED 110997: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 11099c: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1109a1: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 1109a6: e8 f5 69 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1109ab: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1109af: 75 11 jne 1109c2 <== ALWAYS TAKEN 1109b1: 68 c0 f7 11 00 push $0x11f7c0 <== NOT EXECUTED 1109b6: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 1109bb: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1109c0: eb df jmp 1109a1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 1109c2: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 1109c6: 75 13 jne 1109db <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1109c8: e8 f3 0e 00 00 call 1118c0 <__errno> <== NOT EXECUTED 1109cd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1109d3: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 1109d6: e9 d0 01 00 00 jmp 110bab <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 1109db: 83 f8 06 cmp $0x6,%eax 1109de: 75 64 jne 110a44 <== ALWAYS TAKEN unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 1109e0: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1109e3: 8b 49 58 mov 0x58(%ecx),%ecx <== NOT EXECUTED 1109e6: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1109e9: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1109ec: 8b 48 50 mov 0x50(%eax),%ecx <== NOT EXECUTED 1109ef: 8b 58 54 mov 0x54(%eax),%ebx <== NOT EXECUTED 1109f2: 89 c8 mov %ecx,%eax <== NOT EXECUTED 1109f4: 89 da mov %ebx,%edx <== NOT EXECUTED 1109f6: 29 f0 sub %esi,%eax <== NOT EXECUTED 1109f8: 19 fa sbb %edi,%edx <== NOT EXECUTED 1109fa: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 1109fd: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 110a00: 31 c0 xor %eax,%eax <== NOT EXECUTED 110a02: 39 d0 cmp %edx,%eax <== NOT EXECUTED 110a04: 7f 0f jg 110a15 <== NOT EXECUTED 110a06: 7c 08 jl 110a10 <== NOT EXECUTED 110a08: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 110a0b: 39 55 18 cmp %edx,0x18(%ebp) <== NOT EXECUTED 110a0e: 77 05 ja 110a15 <== NOT EXECUTED 110a10: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 110a13: eb 04 jmp 110a19 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 110a15: 89 ca mov %ecx,%edx <== NOT EXECUTED 110a17: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 110a19: 03 75 c8 add -0x38(%ebp),%esi <== NOT EXECUTED 110a1c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 110a1f: 89 d1 mov %edx,%ecx <== NOT EXECUTED 110a21: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 110a23: 51 push %ecx <== NOT EXECUTED 110a24: 51 push %ecx <== NOT EXECUTED 110a25: 6a 00 push $0x0 <== NOT EXECUTED 110a27: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 110a2a: 50 push %eax <== NOT EXECUTED 110a2b: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 110a2e: e8 e1 6c ff ff call 107714 <== NOT EXECUTED 110a33: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 110a36: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 110a39: 89 41 40 mov %eax,0x40(%ecx) <== NOT EXECUTED return my_length; 110a3c: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 110a3f: e9 64 01 00 00 jmp 110ba8 <== NOT EXECUTED /* * 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; 110a44: 89 f0 mov %esi,%eax if ( last_byte > the_jnode->info.file.size ) 110a46: 8b 55 08 mov 0x8(%ebp),%edx 110a49: 8b 5a 50 mov 0x50(%edx),%ebx 110a4c: 8b 4d 18 mov 0x18(%ebp),%ecx 110a4f: 01 f1 add %esi,%ecx 110a51: 89 4d d0 mov %ecx,-0x30(%ebp) 110a54: 31 c9 xor %ecx,%ecx 110a56: 3b 4a 54 cmp 0x54(%edx),%ecx 110a59: 7f 0f jg 110a6a <== NEVER TAKEN 110a5b: 7c 05 jl 110a62 <== NEVER TAKEN 110a5d: 39 5d d0 cmp %ebx,-0x30(%ebp) 110a60: 77 08 ja 110a6a 110a62: 8b 45 18 mov 0x18(%ebp),%eax 110a65: 89 45 d0 mov %eax,-0x30(%ebp) 110a68: eb 05 jmp 110a6f my_length = the_jnode->info.file.size - start; 110a6a: 29 c3 sub %eax,%ebx 110a6c: 89 5d d0 mov %ebx,-0x30(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 110a6f: 8b 15 2c 52 12 00 mov 0x12522c,%edx 110a75: 89 55 c4 mov %edx,-0x3c(%ebp) 110a78: 89 d0 mov %edx,%eax 110a7a: 99 cltd 110a7b: 89 d3 mov %edx,%ebx 110a7d: 52 push %edx 110a7e: 50 push %eax 110a7f: 57 push %edi 110a80: 56 push %esi 110a81: 89 45 c0 mov %eax,-0x40(%ebp) 110a84: e8 23 c0 00 00 call 11caac <__moddi3> 110a89: 83 c4 10 add $0x10,%esp 110a8c: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 110a8f: 8b 4d c0 mov -0x40(%ebp),%ecx 110a92: 53 push %ebx 110a93: 51 push %ecx 110a94: 57 push %edi 110a95: 56 push %esi 110a96: e8 c1 be 00 00 call 11c95c <__divdi3> 110a9b: 83 c4 10 add $0x10,%esp 110a9e: 89 c3 mov %eax,%ebx if ( start_offset ) { 110aa0: 83 7d c8 00 cmpl $0x0,-0x38(%ebp) 110aa4: 75 0f jne 110ab5 110aa6: 8b 55 14 mov 0x14(%ebp),%edx 110aa9: 89 55 c8 mov %edx,-0x38(%ebp) 110aac: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 110ab3: eb 4c jmp 110b01 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 ); 110ab5: 50 push %eax 110ab6: 6a 00 push $0x0 110ab8: 53 push %ebx 110ab9: ff 75 08 pushl 0x8(%ebp) 110abc: e8 71 f5 ff ff call 110032 assert( block_ptr ); 110ac1: 83 c4 10 add $0x10,%esp 110ac4: 85 c0 test %eax,%eax 110ac6: 75 14 jne 110adc <== ALWAYS TAKEN 110ac8: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 110acd: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 110ad2: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 110ad7: e9 c5 fe ff ff jmp 1109a1 <== NOT EXECUTED */ 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; 110adc: 8b 4d c4 mov -0x3c(%ebp),%ecx 110adf: 2b 4d c8 sub -0x38(%ebp),%ecx 110ae2: 8b 55 d0 mov -0x30(%ebp),%edx 110ae5: 39 ca cmp %ecx,%edx 110ae7: 76 02 jbe 110aeb 110ae9: 89 ca mov %ecx,%edx to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 110aeb: 8b 75 c8 mov -0x38(%ebp),%esi 110aee: 03 30 add (%eax),%esi dest += to_copy; 110af0: 8b 7d 14 mov 0x14(%ebp),%edi 110af3: 89 d1 mov %edx,%ecx 110af5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 110af7: 89 7d c8 mov %edi,-0x38(%ebp) block++; 110afa: 43 inc %ebx my_length -= to_copy; 110afb: 29 55 d0 sub %edx,-0x30(%ebp) 110afe: 89 55 cc mov %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 110b01: 8b 15 2c 52 12 00 mov 0x12522c,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 110b07: eb 40 jmp 110b49 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110b09: 57 push %edi 110b0a: 6a 00 push $0x0 110b0c: 53 push %ebx 110b0d: ff 75 08 pushl 0x8(%ebp) 110b10: 89 55 c0 mov %edx,-0x40(%ebp) 110b13: e8 1a f5 ff ff call 110032 assert( block_ptr ); 110b18: 83 c4 10 add $0x10,%esp 110b1b: 85 c0 test %eax,%eax 110b1d: 8b 55 c0 mov -0x40(%ebp),%edx 110b20: 75 14 jne 110b36 <== ALWAYS TAKEN 110b22: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 110b27: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 110b2c: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 110b31: e9 6b fe ff ff jmp 1109a1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 110b36: 8b 30 mov (%eax),%esi 110b38: 8b 7d c8 mov -0x38(%ebp),%edi 110b3b: 89 d1 mov %edx,%ecx 110b3d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 110b3f: 89 7d c8 mov %edi,-0x38(%ebp) block++; 110b42: 43 inc %ebx my_length -= to_copy; 110b43: 29 55 d0 sub %edx,-0x30(%ebp) copied += to_copy; 110b46: 01 55 cc add %edx,-0x34(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 110b49: 8b 45 d0 mov -0x30(%ebp),%eax 110b4c: 3b 05 2c 52 12 00 cmp 0x12522c,%eax 110b52: 73 b5 jae 110b09 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 110b54: 85 c0 test %eax,%eax 110b56: 74 37 je 110b8f block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110b58: 56 push %esi 110b59: 6a 00 push $0x0 110b5b: 53 push %ebx 110b5c: ff 75 08 pushl 0x8(%ebp) 110b5f: e8 ce f4 ff ff call 110032 assert( block_ptr ); 110b64: 83 c4 10 add $0x10,%esp 110b67: 85 c0 test %eax,%eax 110b69: 75 14 jne 110b7f <== ALWAYS TAKEN 110b6b: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 110b70: 68 fc f7 11 00 push $0x11f7fc <== NOT EXECUTED 110b75: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 110b7a: e9 22 fe ff ff jmp 1109a1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 110b7f: 8b 30 mov (%eax),%esi 110b81: 8b 7d c8 mov -0x38(%ebp),%edi 110b84: 8b 4d d0 mov -0x30(%ebp),%ecx 110b87: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 110b89: 8b 55 d0 mov -0x30(%ebp),%edx 110b8c: 01 55 cc add %edx,-0x34(%ebp) } IMFS_update_atime( the_jnode ); 110b8f: 53 push %ebx 110b90: 53 push %ebx 110b91: 6a 00 push $0x0 110b93: 8d 45 e0 lea -0x20(%ebp),%eax 110b96: 50 push %eax 110b97: e8 78 6b ff ff call 107714 110b9c: 8b 45 e0 mov -0x20(%ebp),%eax 110b9f: 8b 4d 08 mov 0x8(%ebp),%ecx 110ba2: 89 41 40 mov %eax,0x40(%ecx) return copied; 110ba5: 8b 55 cc mov -0x34(%ebp),%edx 110ba8: 83 c4 10 add $0x10,%esp } 110bab: 89 d0 mov %edx,%eax 110bad: 8d 65 f4 lea -0xc(%ebp),%esp 110bb0: 5b pop %ebx 110bb1: 5e pop %esi 110bb2: 5f pop %edi 110bb3: c9 leave 110bb4: c3 ret =============================================================================== 00110262 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 110262: 55 push %ebp 110263: 89 e5 mov %esp,%ebp 110265: 57 push %edi 110266: 56 push %esi 110267: 53 push %ebx 110268: 83 ec 1c sub $0x1c,%esp 11026b: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Perform internal consistency checks */ assert( the_jnode ); 11026e: 85 db test %ebx,%ebx 110270: 75 11 jne 110283 <== ALWAYS TAKEN 110272: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 110277: 68 10 f8 11 00 push $0x11f810 <== NOT EXECUTED 11027c: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 110281: eb 15 jmp 110298 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 110283: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 110287: 74 19 je 1102a2 <== ALWAYS TAKEN 110289: 68 0b f7 11 00 push $0x11f70b <== NOT EXECUTED 11028e: 68 10 f8 11 00 push $0x11f810 <== NOT EXECUTED 110293: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 110298: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 11029d: e8 fe 70 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * 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; 1102a2: 8b 35 2c 52 12 00 mov 0x12522c,%esi 1102a8: c1 ee 02 shr $0x2,%esi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1102ab: 83 7b 58 00 cmpl $0x0,0x58(%ebx) 1102af: 74 0f je 1102c0 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 1102b1: 57 push %edi 1102b2: 57 push %edi 1102b3: 56 push %esi 1102b4: 8d 43 58 lea 0x58(%ebx),%eax 1102b7: 50 push %eax 1102b8: e8 f0 fe ff ff call 1101ad 1102bd: 83 c4 10 add $0x10,%esp * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1102c0: 31 ff xor %edi,%edi 1102c2: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 1102c6: 75 21 jne 1102e9 <== NEVER TAKEN 1102c8: eb 3a jmp 110304 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { 1102ca: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1102cd: 8d 14 bd 00 00 00 00 lea 0x0(,%edi,4),%edx <== NOT EXECUTED 1102d4: 83 3c b8 00 cmpl $0x0,(%eax,%edi,4) <== NOT EXECUTED 1102d8: 74 0e je 1102e8 <== NOT EXECUTED memfile_free_blocks_in_table( 1102da: 51 push %ecx <== NOT EXECUTED 1102db: 51 push %ecx <== NOT EXECUTED 1102dc: 56 push %esi <== NOT EXECUTED 1102dd: 01 d0 add %edx,%eax <== NOT EXECUTED 1102df: 50 push %eax <== NOT EXECUTED 1102e0: e8 c8 fe ff ff call 1101ad <== NOT EXECUTED 1102e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED 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 ); 1102f5: 57 push %edi <== NOT EXECUTED 1102f6: 57 push %edi <== NOT EXECUTED 1102f7: 56 push %esi <== NOT EXECUTED 1102f8: 8d 43 5c lea 0x5c(%ebx),%eax <== NOT EXECUTED 1102fb: 50 push %eax <== NOT EXECUTED 1102fc: e8 ac fe ff ff call 1101ad <== NOT EXECUTED 110301: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 110304: 31 ff xor %edi,%edi 110306: 83 7b 60 00 cmpl $0x0,0x60(%ebx) 11030a: 75 5b jne 110367 <== NEVER TAKEN 11030c: eb 74 jmp 110382 11030e: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 110315: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 110318: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 11031b: 8b 04 b8 mov (%eax,%edi,4),%eax <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 11031e: 85 c0 test %eax,%eax <== NOT EXECUTED 110320: 74 51 je 110373 <== NOT EXECUTED 110322: 31 d2 xor %edx,%edx <== NOT EXECUTED 110324: eb 21 jmp 110347 <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 11032b: 51 push %ecx <== NOT EXECUTED 11032c: 51 push %ecx <== NOT EXECUTED 11032d: 56 push %esi <== NOT EXECUTED 11032e: 50 push %eax <== NOT EXECUTED 11032f: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 110332: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 110335: e8 73 fe ff ff call 1101ad <== NOT EXECUTED 11033a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11033d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 110340: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 110354: 52 push %edx <== NOT EXECUTED 110355: 52 push %edx <== NOT EXECUTED 110356: 56 push %esi <== NOT EXECUTED 110357: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 11035a: 03 43 60 add 0x60(%ebx),%eax <== NOT EXECUTED 11035d: 50 push %eax <== NOT EXECUTED 11035e: e8 4a fe ff ff call 1101ad <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 110373: 50 push %eax <== NOT EXECUTED 110374: 50 push %eax <== NOT EXECUTED 110375: 56 push %esi <== NOT EXECUTED 110376: 83 c3 60 add $0x60,%ebx <== NOT EXECUTED 110379: 53 push %ebx <== NOT EXECUTED 11037a: e8 2e fe ff ff call 1101ad <== NOT EXECUTED 11037f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 110382: 31 c0 xor %eax,%eax 110384: 8d 65 f4 lea -0xc(%ebp),%esp 110387: 5b pop %ebx 110388: 5e pop %esi 110389: 5f pop %edi 11038a: c9 leave 11038b: c3 ret =============================================================================== 00110217 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 110217: 55 push %ebp <== NOT EXECUTED 110218: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11021a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 11021d: 6a 00 push $0x0 <== NOT EXECUTED 11021f: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110222: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 110225: e8 08 fe ff ff call 110032 <== NOT EXECUTED assert( block_ptr ); 11022a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11022d: 85 c0 test %eax,%eax <== NOT EXECUTED 11022f: 75 19 jne 11024a <== NOT EXECUTED 110231: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 110236: 68 44 f8 11 00 push $0x11f844 <== NOT EXECUTED 11023b: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 110240: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 110245: e8 56 71 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 11024a: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 11024c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 110252: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110255: 52 push %edx <== NOT EXECUTED 110256: e8 9c fd ff ff call 10fff7 <== NOT EXECUTED } return 1; } 11025b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110260: c9 leave <== NOT EXECUTED 110261: c3 ret <== NOT EXECUTED =============================================================================== 001106aa : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 1106aa: 55 push %ebp 1106ab: 89 e5 mov %esp,%ebp 1106ad: 57 push %edi 1106ae: 56 push %esi 1106af: 53 push %ebx 1106b0: 83 ec 3c sub $0x3c,%esp 1106b3: 8b 75 0c mov 0xc(%ebp),%esi 1106b6: 8b 7d 10 mov 0x10(%ebp),%edi /* * Perform internal consistency checks */ assert( the_jnode ); 1106b9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) 1106bd: 75 11 jne 1106d0 <== ALWAYS TAKEN 1106bf: 68 b4 f6 11 00 push $0x11f6b4 <== NOT EXECUTED 1106c4: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 1106c9: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 1106ce: eb 18 jmp 1106e8 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1106d0: 8b 45 08 mov 0x8(%ebp),%eax 1106d3: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 1106d7: 74 19 je 1106f2 <== ALWAYS TAKEN 1106d9: 68 0b f7 11 00 push $0x11f70b <== NOT EXECUTED 1106de: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 1106e3: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 1106e8: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 1106ed: e8 ae 6c ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 1106f2: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 1106f6: 75 11 jne 110709 <== ALWAYS TAKEN 1106f8: 68 45 f7 11 00 push $0x11f745 <== NOT EXECUTED 1106fd: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 110702: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 110707: eb df jmp 1106e8 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 110709: 83 7d 18 00 cmpl $0x0,0x18(%ebp) 11070d: 75 0d jne 11071c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 11070f: e8 ac 11 00 00 call 1118c0 <__errno> <== NOT EXECUTED 110714: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11071a: eb 33 jmp 11074f <== NOT EXECUTED * 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 + length; if ( last_byte > the_jnode->info.file.size ) { 11071c: 8b 45 18 mov 0x18(%ebp),%eax 11071f: 01 f0 add %esi,%eax 110721: 31 d2 xor %edx,%edx 110723: 8b 4d 08 mov 0x8(%ebp),%ecx 110726: 3b 51 54 cmp 0x54(%ecx),%edx 110729: 7c 2c jl 110757 <== NEVER TAKEN 11072b: 7f 05 jg 110732 <== NEVER TAKEN 11072d: 3b 41 50 cmp 0x50(%ecx),%eax 110730: 76 25 jbe 110757 <== NEVER TAKEN status = IMFS_memfile_extend( the_jnode, last_byte ); 110732: 51 push %ecx 110733: 52 push %edx 110734: 50 push %eax 110735: ff 75 08 pushl 0x8(%ebp) 110738: e8 8a fd ff ff call 1104c7 if ( status ) 11073d: 83 c4 10 add $0x10,%esp 110740: 85 c0 test %eax,%eax 110742: 74 13 je 110757 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 110744: e8 77 11 00 00 call 1118c0 <__errno> <== NOT EXECUTED 110749: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11074f: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 110752: e9 3b 01 00 00 jmp 110892 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 110757: a1 2c 52 12 00 mov 0x12522c,%eax 11075c: 89 45 c8 mov %eax,-0x38(%ebp) 11075f: 99 cltd 110760: 89 d3 mov %edx,%ebx 110762: 52 push %edx 110763: 50 push %eax 110764: 57 push %edi 110765: 56 push %esi 110766: 89 45 c4 mov %eax,-0x3c(%ebp) 110769: e8 3e c3 00 00 call 11caac <__moddi3> 11076e: 83 c4 10 add $0x10,%esp 110771: 89 45 cc mov %eax,-0x34(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 110774: 8b 4d c4 mov -0x3c(%ebp),%ecx 110777: 53 push %ebx 110778: 51 push %ecx 110779: 57 push %edi 11077a: 56 push %esi 11077b: e8 dc c1 00 00 call 11c95c <__divdi3> 110780: 83 c4 10 add $0x10,%esp 110783: 89 45 d0 mov %eax,-0x30(%ebp) if ( start_offset ) { 110786: 83 7d cc 00 cmpl $0x0,-0x34(%ebp) 11078a: 75 0d jne 110799 11078c: 8b 75 14 mov 0x14(%ebp),%esi 11078f: 8b 55 18 mov 0x18(%ebp),%edx 110792: 89 55 d4 mov %edx,-0x2c(%ebp) 110795: 31 db xor %ebx,%ebx 110797: eb 52 jmp 1107eb 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 ); 110799: 50 push %eax 11079a: 6a 00 push $0x0 11079c: ff 75 d0 pushl -0x30(%ebp) 11079f: ff 75 08 pushl 0x8(%ebp) 1107a2: e8 8b f8 ff ff call 110032 assert( block_ptr ); 1107a7: 83 c4 10 add $0x10,%esp 1107aa: 85 c0 test %eax,%eax 1107ac: 75 14 jne 1107c2 <== ALWAYS TAKEN 1107ae: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 1107b3: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 1107b8: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 1107bd: e9 26 ff ff ff jmp 1106e8 <== NOT EXECUTED */ 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; 1107c2: 8b 55 c8 mov -0x38(%ebp),%edx 1107c5: 2b 55 cc sub -0x34(%ebp),%edx 1107c8: 3b 55 18 cmp 0x18(%ebp),%edx 1107cb: 76 03 jbe 1107d0 1107cd: 8b 55 18 mov 0x18(%ebp),%edx if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 1107d0: 8b 00 mov (%eax),%eax 1107d2: 03 45 cc add -0x34(%ebp),%eax src += to_copy; 1107d5: 89 c7 mov %eax,%edi 1107d7: 8b 75 14 mov 0x14(%ebp),%esi 1107da: 89 d1 mov %edx,%ecx 1107dc: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1107de: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 1107e1: 8b 4d 18 mov 0x18(%ebp),%ecx 1107e4: 29 d1 sub %edx,%ecx 1107e6: 89 4d d4 mov %ecx,-0x2c(%ebp) copied += to_copy; 1107e9: 89 d3 mov %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1107eb: 8b 15 2c 52 12 00 mov 0x12522c,%edx while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1107f1: eb 3f jmp 110832 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1107f3: 57 push %edi 1107f4: 6a 00 push $0x0 1107f6: ff 75 d0 pushl -0x30(%ebp) 1107f9: ff 75 08 pushl 0x8(%ebp) 1107fc: 89 55 c4 mov %edx,-0x3c(%ebp) 1107ff: e8 2e f8 ff ff call 110032 assert( block_ptr ); 110804: 83 c4 10 add $0x10,%esp 110807: 85 c0 test %eax,%eax 110809: 8b 55 c4 mov -0x3c(%ebp),%edx 11080c: 75 14 jne 110822 <== ALWAYS TAKEN 11080e: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 110813: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 110818: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 11081d: e9 c6 fe ff ff jmp 1106e8 <== NOT EXECUTED 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 ); 110822: 8b 00 mov (%eax),%eax src += to_copy; 110824: 89 c7 mov %eax,%edi 110826: 89 d1 mov %edx,%ecx 110828: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 11082a: ff 45 d0 incl -0x30(%ebp) my_length -= to_copy; 11082d: 29 55 d4 sub %edx,-0x2c(%ebp) * * 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( 110830: 01 d3 add %edx,%ebx /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 110832: 8b 45 d4 mov -0x2c(%ebp),%eax 110835: 3b 05 2c 52 12 00 cmp 0x12522c,%eax 11083b: 73 b6 jae 1107f3 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 11083d: 85 c0 test %eax,%eax 11083f: 74 35 je 110876 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 110841: 51 push %ecx 110842: 6a 00 push $0x0 110844: ff 75 d0 pushl -0x30(%ebp) 110847: ff 75 08 pushl 0x8(%ebp) 11084a: e8 e3 f7 ff ff call 110032 assert( block_ptr ); 11084f: 83 c4 10 add $0x10,%esp 110852: 85 c0 test %eax,%eax 110854: 75 14 jne 11086a <== ALWAYS TAKEN 110856: 68 3b f7 11 00 push $0x11f73b <== NOT EXECUTED 11085b: 68 e8 f7 11 00 push $0x11f7e8 <== NOT EXECUTED 110860: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 110865: e9 7e fe ff ff jmp 1106e8 <== NOT EXECUTED 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 ); 11086a: 8b 00 mov (%eax),%eax 11086c: 89 c7 mov %eax,%edi 11086e: 8b 4d d4 mov -0x2c(%ebp),%ecx 110871: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 110873: 03 5d d4 add -0x2c(%ebp),%ebx } IMFS_mtime_ctime_update( the_jnode ); 110876: 52 push %edx 110877: 52 push %edx 110878: 6a 00 push $0x0 11087a: 8d 45 e0 lea -0x20(%ebp),%eax 11087d: 50 push %eax 11087e: e8 91 6e ff ff call 107714 110883: 8b 45 e0 mov -0x20(%ebp),%eax 110886: 8b 55 08 mov 0x8(%ebp),%edx 110889: 89 42 44 mov %eax,0x44(%edx) 11088c: 89 42 48 mov %eax,0x48(%edx) return copied; 11088f: 83 c4 10 add $0x10,%esp } 110892: 89 d8 mov %ebx,%eax 110894: 8d 65 f4 lea -0xc(%ebp),%esp 110897: 5b pop %ebx 110898: 5e pop %esi 110899: 5f pop %edi 11089a: c9 leave 11089b: c3 ret =============================================================================== 00106f68 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 106f68: 55 push %ebp 106f69: 89 e5 mov %esp,%ebp 106f6b: 57 push %edi 106f6c: 56 push %esi 106f6d: 53 push %ebx 106f6e: 83 ec 4c sub $0x4c,%esp 106f71: 8b 55 08 mov 0x8(%ebp),%edx 106f74: 8b 5d 10 mov 0x10(%ebp),%ebx 106f77: 8b 75 14 mov 0x14(%ebp),%esi 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 ); 106f7a: 31 c0 xor %eax,%eax 106f7c: 83 c9 ff or $0xffffffff,%ecx 106f7f: 89 d7 mov %edx,%edi 106f81: f2 ae repnz scas %es:(%edi),%al 106f83: f7 d1 not %ecx 106f85: 49 dec %ecx 106f86: 8d 45 e4 lea -0x1c(%ebp),%eax 106f89: 50 push %eax 106f8a: 8d 45 af lea -0x51(%ebp),%eax 106f8d: 50 push %eax 106f8e: 51 push %ecx 106f8f: 52 push %edx 106f90: e8 d7 79 00 00 call 10e96c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 106f95: 8b 45 0c mov 0xc(%ebp),%eax 106f98: 25 00 f0 00 00 and $0xf000,%eax 106f9d: 83 c4 10 add $0x10,%esp 106fa0: 3d 00 40 00 00 cmp $0x4000,%eax 106fa5: 74 40 je 106fe7 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 106fa7: ba 05 00 00 00 mov $0x5,%edx 106fac: 3d 00 80 00 00 cmp $0x8000,%eax 106fb1: 74 39 je 106fec type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 106fb3: 3d 00 20 00 00 cmp $0x2000,%eax 106fb8: 74 07 je 106fc1 106fba: 3d 00 60 00 00 cmp $0x6000,%eax 106fbf: 75 0d jne 106fce type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 106fc1: 89 5d d0 mov %ebx,-0x30(%ebp) 106fc4: 89 75 d4 mov %esi,-0x2c(%ebp) 106fc7: ba 02 00 00 00 mov $0x2,%edx 106fcc: eb 1e jmp 106fec } else if (S_ISFIFO(mode)) 106fce: ba 07 00 00 00 mov $0x7,%edx 106fd3: 3d 00 10 00 00 cmp $0x1000,%eax 106fd8: 74 12 je 106fec <== ALWAYS TAKEN type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 106fda: e8 e1 a8 00 00 call 1118c0 <__errno> <== NOT EXECUTED 106fdf: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106fe5: eb 32 jmp 107019 <== NOT EXECUTED 106fe7: ba 01 00 00 00 mov $0x1,%edx * 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( 106fec: 83 ec 0c sub $0xc,%esp 106fef: 8d 45 d0 lea -0x30(%ebp),%eax 106ff2: 50 push %eax 106ff3: ff 75 0c pushl 0xc(%ebp) 106ff6: 8d 45 af lea -0x51(%ebp),%eax 106ff9: 50 push %eax 106ffa: 52 push %edx 106ffb: ff 75 18 pushl 0x18(%ebp) 106ffe: e8 95 6e 00 00 call 10de98 107003: 89 c2 mov %eax,%edx new_name, mode, &info ); if ( !new_node ) 107005: 83 c4 20 add $0x20,%esp 107008: 31 c0 xor %eax,%eax 10700a: 85 d2 test %edx,%edx 10700c: 75 0e jne 10701c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 10700e: e8 ad a8 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107013: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107019: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return 0; } 10701c: 8d 65 f4 lea -0xc(%ebp),%esp 10701f: 5b pop %ebx 107020: 5e pop %esi 107021: 5f pop %edi 107022: c9 leave 107023: c3 ret =============================================================================== 00107024 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107024: 55 push %ebp 107025: 89 e5 mov %esp,%ebp 107027: 83 ec 08 sub $0x8,%esp 10702a: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10702d: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107030: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107034: 74 10 je 107046 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 107036: e8 85 a8 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10703b: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107041: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107044: eb 05 jmp 10704b <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 107046: 89 50 5c mov %edx,0x5c(%eax) 107049: 31 c0 xor %eax,%eax return 0; } 10704b: c9 leave 10704c: c3 ret =============================================================================== 00108d2e : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 108d2e: 55 push %ebp 108d2f: 89 e5 mov %esp,%ebp 108d31: 53 push %ebx 108d32: 83 ec 04 sub $0x4,%esp 108d35: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 108d38: 85 db test %ebx,%ebx 108d3a: 75 11 jne 108d4d <== ALWAYS TAKEN 108d3c: 68 3c 40 12 00 push $0x12403c <== NOT EXECUTED 108d41: 68 f8 41 12 00 push $0x1241f8 <== NOT EXECUTED 108d46: 6a 38 push $0x38 <== NOT EXECUTED 108d48: e9 98 00 00 00 jmp 108de5 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 108d4d: 50 push %eax 108d4e: 50 push %eax 108d4f: a1 00 90 12 00 mov 0x129000,%eax 108d54: ff 70 08 pushl 0x8(%eax) 108d57: 8d 43 0c lea 0xc(%ebx),%eax 108d5a: 50 push %eax 108d5b: e8 c4 c4 00 00 call 115224 switch( the_jnode->type ) { 108d60: 8b 43 4c mov 0x4c(%ebx),%eax 108d63: 83 c4 10 add $0x10,%esp 108d66: 8d 50 ff lea -0x1(%eax),%edx 108d69: 83 fa 06 cmp $0x6,%edx 108d6c: 0f 87 b7 00 00 00 ja 108e29 <== NEVER TAKEN 108d72: a1 00 90 12 00 mov 0x129000,%eax 108d77: ff 24 95 c8 41 12 00 jmp *0x1241c8(,%edx,4) case IMFS_DIRECTORY: fprintf(stdout, "/" ); 108d7e: 53 push %ebx 108d7f: 53 push %ebx 108d80: ff 70 08 pushl 0x8(%eax) 108d83: 6a 2f push $0x2f 108d85: e8 ae c3 00 00 call 115138 108d8a: eb 2b jmp 108db7 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 108d8c: ff 73 54 pushl 0x54(%ebx) 108d8f: ff 73 50 pushl 0x50(%ebx) 108d92: 68 96 40 12 00 push $0x124096 108d97: eb 16 jmp 108daf the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 108d99: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 108d9c: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 108d9f: 68 a9 40 12 00 push $0x1240a9 <== NOT EXECUTED 108da4: eb 09 jmp 108daf <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 108da6: 51 push %ecx 108da7: ff 73 50 pushl 0x50(%ebx) 108daa: 68 b8 40 12 00 push $0x1240b8 108daf: ff 70 08 pushl 0x8(%eax) 108db2: e8 45 c3 00 00 call 1150fc (uint32_t)the_jnode->info.file.size ); #endif break; 108db7: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dba: c7 45 08 0d 44 12 00 movl $0x12440d,0x8(%ebp) } 108dc1: 8b 5d fc mov -0x4(%ebp),%ebx 108dc4: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 108dc5: e9 96 dc 00 00 jmp 116a60 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 108dca: 52 push %edx <== NOT EXECUTED 108dcb: 52 push %edx <== NOT EXECUTED 108dcc: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108dcf: 68 c4 40 12 00 push $0x1240c4 <== NOT EXECUTED 108dd4: e8 4b c4 00 00 call 115224 <== NOT EXECUTED assert(0); 108dd9: 68 8f 38 12 00 push $0x12388f <== NOT EXECUTED 108dde: 68 f8 41 12 00 push $0x1241f8 <== NOT EXECUTED 108de3: 6a 5d push $0x5d <== NOT EXECUTED 108de5: 68 46 40 12 00 push $0x124046 <== NOT EXECUTED 108dea: e8 c9 07 00 00 call 1095b8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 108def: 53 push %ebx <== NOT EXECUTED 108df0: 53 push %ebx <== NOT EXECUTED 108df1: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108df4: 68 c4 40 12 00 push $0x1240c4 <== NOT EXECUTED 108df9: e8 26 c4 00 00 call 115224 <== NOT EXECUTED assert(0); 108dfe: 68 8f 38 12 00 push $0x12388f <== NOT EXECUTED 108e03: 68 f8 41 12 00 push $0x1241f8 <== NOT EXECUTED 108e08: 6a 62 push $0x62 <== NOT EXECUTED 108e0a: eb d9 jmp 108de5 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 108e0c: 51 push %ecx <== NOT EXECUTED 108e0d: 51 push %ecx <== NOT EXECUTED 108e0e: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e11: 68 d8 40 12 00 push $0x1240d8 <== NOT EXECUTED 108e16: e8 09 c4 00 00 call 115224 <== NOT EXECUTED assert(0); 108e1b: 68 8f 38 12 00 push $0x12388f <== NOT EXECUTED 108e20: 68 f8 41 12 00 push $0x1241f8 <== NOT EXECUTED 108e25: 6a 67 push $0x67 <== NOT EXECUTED 108e27: eb bc jmp 108de5 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 108e29: 52 push %edx <== NOT EXECUTED 108e2a: 50 push %eax <== NOT EXECUTED 108e2b: 68 eb 40 12 00 push $0x1240eb <== NOT EXECUTED 108e30: a1 00 90 12 00 mov 0x129000,%eax <== NOT EXECUTED 108e35: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 108e38: e8 bf c2 00 00 call 1150fc <== NOT EXECUTED assert(0); 108e3d: 68 8f 38 12 00 push $0x12388f <== NOT EXECUTED 108e42: 68 f8 41 12 00 push $0x1241f8 <== NOT EXECUTED 108e47: 6a 6c push $0x6c <== NOT EXECUTED 108e49: eb 9a jmp 108de5 <== NOT EXECUTED =============================================================================== 00107060 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107060: 55 push %ebp 107061: 89 e5 mov %esp,%ebp 107063: 56 push %esi 107064: 53 push %ebx 107065: 8b 75 0c mov 0xc(%ebp),%esi 107068: 8b 5d 10 mov 0x10(%ebp),%ebx IMFS_jnode_t *node; int i; node = loc->node_access; 10706b: 8b 45 08 mov 0x8(%ebp),%eax 10706e: 8b 10 mov (%eax),%edx if ( node->type != IMFS_SYM_LINK ) 107070: 31 c0 xor %eax,%eax 107072: 83 7a 4c 04 cmpl $0x4,0x4c(%edx) 107076: 74 14 je 10708c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 107078: e8 43 a8 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10707d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107083: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107086: eb 12 jmp 10709a <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 107088: 88 0c 06 mov %cl,(%esi,%eax,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 10708b: 40 inc %eax 10708c: 39 d8 cmp %ebx,%eax 10708e: 73 0a jae 10709a 107090: 8b 4a 50 mov 0x50(%edx),%ecx 107093: 8a 0c 01 mov (%ecx,%eax,1),%cl 107096: 84 c9 test %cl,%cl 107098: 75 ee jne 107088 buf[i] = node->info.sym_link.name[i]; return i; } 10709a: 5b pop %ebx 10709b: 5e pop %esi 10709c: c9 leave 10709d: c3 ret =============================================================================== 001070a0 : 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 */ ) { 1070a0: 55 push %ebp 1070a1: 89 e5 mov %esp,%ebp 1070a3: 53 push %ebx 1070a4: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1070a7: 8b 45 0c mov 0xc(%ebp),%eax 1070aa: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1070ac: 6a 20 push $0x20 1070ae: ff 75 14 pushl 0x14(%ebp) 1070b1: 8d 43 0c lea 0xc(%ebx),%eax 1070b4: 50 push %eax 1070b5: e8 1e b5 00 00 call 1125d8 if ( the_jnode->Parent != NULL ) 1070ba: 83 c4 10 add $0x10,%esp 1070bd: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1070c1: 74 0c je 1070cf <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1070c3: 83 ec 0c sub $0xc,%esp 1070c6: 53 push %ebx 1070c7: e8 3c 3d 00 00 call 10ae08 <_Chain_Extract> 1070cc: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1070cf: 8b 45 10 mov 0x10(%ebp),%eax 1070d2: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 1070d4: 89 43 08 mov %eax,0x8(%ebx) RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1070d7: 51 push %ecx 1070d8: 51 push %ecx 1070d9: 53 push %ebx 1070da: 83 c0 50 add $0x50,%eax 1070dd: 50 push %eax 1070de: e8 01 3d 00 00 call 10ade4 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1070e3: 58 pop %eax 1070e4: 5a pop %edx 1070e5: 6a 00 push $0x0 1070e7: 8d 45 f0 lea -0x10(%ebp),%eax 1070ea: 50 push %eax 1070eb: e8 24 06 00 00 call 107714 1070f0: 8b 45 f0 mov -0x10(%ebp),%eax 1070f3: 89 43 48 mov %eax,0x48(%ebx) return 0; } 1070f6: 31 c0 xor %eax,%eax 1070f8: 8b 5d fc mov -0x4(%ebp),%ebx 1070fb: c9 leave 1070fc: c3 ret =============================================================================== 0010ea2c : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 10ea2c: 55 push %ebp 10ea2d: 89 e5 mov %esp,%ebp 10ea2f: 56 push %esi 10ea30: 53 push %ebx 10ea31: 83 ec 10 sub $0x10,%esp 10ea34: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 10ea37: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 10ea39: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10ea3d: 74 13 je 10ea52 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10ea3f: 83 ec 0c sub $0xc,%esp 10ea42: 53 push %ebx 10ea43: e8 c0 c3 ff ff call 10ae08 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 10ea48: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 10ea4f: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 10ea52: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 10ea56: 50 push %eax 10ea57: 50 push %eax 10ea58: 6a 00 push $0x0 10ea5a: 8d 45 f0 lea -0x10(%ebp),%eax 10ea5d: 50 push %eax 10ea5e: e8 b1 8c ff ff call 107714 10ea63: 8b 45 f0 mov -0x10(%ebp),%eax 10ea66: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 10ea69: 89 1c 24 mov %ebx,(%esp) 10ea6c: e8 7d 02 00 00 call 10ecee 10ea71: 83 c4 10 add $0x10,%esp 10ea74: 85 c0 test %eax,%eax 10ea76: 75 3f jne 10eab7 <== NEVER TAKEN 10ea78: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 10ea7d: 75 38 jne 10eab7 <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 10ea7f: a1 74 34 12 00 mov 0x123474,%eax 10ea84: 8b 50 04 mov 0x4(%eax),%edx 10ea87: 3b 16 cmp (%esi),%edx 10ea89: 75 07 jne 10ea92 <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 10ea8b: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 10ea92: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 10ea96: 75 13 jne 10eaab if ( the_jnode->info.sym_link.name ) 10ea98: 8b 43 50 mov 0x50(%ebx),%eax 10ea9b: 85 c0 test %eax,%eax 10ea9d: 74 0c je 10eaab <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 10ea9f: 83 ec 0c sub $0xc,%esp 10eaa2: 50 push %eax 10eaa3: e8 f4 8b ff ff call 10769c 10eaa8: 83 c4 10 add $0x10,%esp } free( the_jnode ); 10eaab: 83 ec 0c sub $0xc,%esp 10eaae: 53 push %ebx 10eaaf: e8 e8 8b ff ff call 10769c 10eab4: 83 c4 10 add $0x10,%esp } return 0; } 10eab7: 31 c0 xor %eax,%eax 10eab9: 8d 65 f8 lea -0x8(%ebp),%esp 10eabc: 5b pop %ebx 10eabd: 5e pop %esi 10eabe: c9 leave 10eabf: c3 ret =============================================================================== 0010eac0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 10eac0: 55 push %ebp 10eac1: 89 e5 mov %esp,%ebp 10eac3: 56 push %esi 10eac4: 53 push %ebx 10eac5: 8b 4d 08 mov 0x8(%ebp),%ecx 10eac8: 8b 45 0c mov 0xc(%ebp),%eax IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 10eacb: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 10eacd: 8b 5a 4c mov 0x4c(%edx),%ebx 10ead0: 83 eb 02 sub $0x2,%ebx 10ead3: 83 fb 05 cmp $0x5,%ebx 10ead6: 77 33 ja 10eb0b <== NEVER TAKEN 10ead8: ff 24 9d 04 f6 11 00 jmp *0x11f604(,%ebx,4) case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 10eadf: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 10eae2: 8b 72 50 mov 0x50(%edx),%esi 10eae5: 89 70 18 mov %esi,0x18(%eax) 10eae8: 89 58 1c mov %ebx,0x1c(%eax) break; 10eaeb: eb 2e jmp 10eb1b case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 10eaed: 8b 5a 50 mov 0x50(%edx),%ebx 10eaf0: 8b 72 54 mov 0x54(%edx),%esi 10eaf3: 89 58 20 mov %ebx,0x20(%eax) 10eaf6: 89 70 24 mov %esi,0x24(%eax) break; 10eaf9: eb 20 jmp 10eb1b case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 10eafb: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 10eb02: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED break; 10eb09: eb 10 jmp 10eb1b <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10eb0b: e8 b0 2d 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10eb10: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10eb16: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10eb19: eb 50 jmp 10eb6b <== 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; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 10eb1b: 8b 49 10 mov 0x10(%ecx),%ecx 10eb1e: 8b 49 34 mov 0x34(%ecx),%ecx 10eb21: 8b 09 mov (%ecx),%ecx /* * 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 = 10eb23: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 10eb29: 89 48 04 mov %ecx,0x4(%eax) rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 10eb2c: 8b 4a 30 mov 0x30(%edx),%ecx 10eb2f: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 10eb32: 8b 4a 34 mov 0x34(%edx),%ecx 10eb35: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 10eb39: 8b 4a 38 mov 0x38(%edx),%ecx 10eb3c: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 10eb3f: 8b 4a 3c mov 0x3c(%edx),%ecx 10eb42: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 10eb46: 66 8b 4a 3e mov 0x3e(%edx),%cx 10eb4a: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 10eb4e: 8b 4a 40 mov 0x40(%edx),%ecx 10eb51: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 10eb54: 8b 4a 44 mov 0x44(%edx),%ecx 10eb57: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 10eb5a: 8b 52 48 mov 0x48(%edx),%edx 10eb5d: 89 50 38 mov %edx,0x38(%eax) buf->st_blksize = imfs_rq_memfile_bytes_per_block; 10eb60: 8b 15 68 16 12 00 mov 0x121668,%edx 10eb66: 89 50 40 mov %edx,0x40(%eax) 10eb69: 31 c0 xor %eax,%eax return 0; } 10eb6b: 5b pop %ebx 10eb6c: 5e pop %esi 10eb6d: c9 leave 10eb6e: c3 ret =============================================================================== 00107100 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107100: 55 push %ebp 107101: 89 e5 mov %esp,%ebp 107103: 57 push %edi 107104: 53 push %ebx 107105: 83 ec 40 sub $0x40,%esp 107108: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 10710b: 31 c0 xor %eax,%eax 10710d: 83 c9 ff or $0xffffffff,%ecx 107110: 89 d7 mov %edx,%edi 107112: f2 ae repnz scas %es:(%edi),%al 107114: f7 d1 not %ecx 107116: 49 dec %ecx 107117: 8d 45 f4 lea -0xc(%ebp),%eax 10711a: 50 push %eax 10711b: 8d 5d bf lea -0x41(%ebp),%ebx 10711e: 53 push %ebx 10711f: 51 push %ecx 107120: 52 push %edx 107121: e8 46 78 00 00 call 10e96c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107126: 58 pop %eax 107127: ff 75 0c pushl 0xc(%ebp) 10712a: e8 55 b3 00 00 call 112484 10712f: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107132: 83 c4 10 add $0x10,%esp 107135: 85 c0 test %eax,%eax 107137: 75 10 jne 107149 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one(ENOMEM); 107139: e8 82 a7 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10713e: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107144: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107147: eb 3e jmp 107187 <== 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( 107149: 83 ec 0c sub $0xc,%esp 10714c: 8d 45 e0 lea -0x20(%ebp),%eax 10714f: 50 push %eax 107150: 68 ff a1 00 00 push $0xa1ff 107155: 53 push %ebx 107156: 6a 04 push $0x4 107158: ff 75 08 pushl 0x8(%ebp) 10715b: e8 38 6d 00 00 call 10de98 107160: 89 c2 mov %eax,%edx new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107162: 83 c4 20 add $0x20,%esp 107165: 31 c0 xor %eax,%eax 107167: 85 d2 test %edx,%edx 107169: 75 1c jne 107187 <== ALWAYS TAKEN free(info.sym_link.name); 10716b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10716e: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107171: e8 26 05 00 00 call 10769c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107176: e8 45 a7 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10717b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107181: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107184: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 107187: 8d 65 f8 lea -0x8(%ebp),%esp 10718a: 5b pop %ebx 10718b: 5f pop %edi 10718c: c9 leave 10718d: c3 ret =============================================================================== 00107190 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107190: 55 push %ebp 107191: 89 e5 mov %esp,%ebp 107193: 57 push %edi 107194: 56 push %esi 107195: 53 push %ebx 107196: 83 ec 2c sub $0x2c,%esp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 107199: 8b 45 0c mov 0xc(%ebp),%eax 10719c: 8b 18 mov (%eax),%ebx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 10719e: 83 7b 4c 03 cmpl $0x3,0x4c(%ebx) 1071a2: 75 7a jne 10721e if ( !node->info.hard_link.link_node ) 1071a4: 8b 43 50 mov 0x50(%ebx),%eax 1071a7: 85 c0 test %eax,%eax 1071a9: 75 10 jne 1071bb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1071ab: e8 10 a7 00 00 call 1118c0 <__errno> <== NOT EXECUTED 1071b0: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1071b6: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1071b9: eb 75 jmp 107230 <== NOT EXECUTED the_link = *loc; 1071bb: 8d 7d cc lea -0x34(%ebp),%edi 1071be: b9 05 00 00 00 mov $0x5,%ecx 1071c3: 8b 75 0c mov 0xc(%ebp),%esi 1071c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 1071c8: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 1071cb: 83 ec 0c sub $0xc,%esp 1071ce: 8d 75 cc lea -0x34(%ebp),%esi 1071d1: 56 push %esi 1071d2: e8 c1 6d 00 00 call 10df98 /* * 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) 1071d7: 8b 43 50 mov 0x50(%ebx),%eax 1071da: 8b 50 34 mov 0x34(%eax),%edx 1071dd: 83 c4 10 add $0x10,%esp 1071e0: 66 83 fa 01 cmp $0x1,%dx 1071e4: 75 1a jne 107200 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1071e6: 51 push %ecx 1071e7: 51 push %ecx 1071e8: 56 push %esi 1071e9: ff 75 08 pushl 0x8(%ebp) 1071ec: 8b 45 d4 mov -0x2c(%ebp),%eax 1071ef: ff 50 34 call *0x34(%eax) 1071f2: 89 c2 mov %eax,%edx if ( result != 0 ) 1071f4: 83 c4 10 add $0x10,%esp 1071f7: 83 c8 ff or $0xffffffff,%eax 1071fa: 85 d2 test %edx,%edx 1071fc: 74 20 je 10721e 1071fe: eb 30 jmp 107230 return -1; } else { node->info.hard_link.link_node->st_nlink --; 107200: 4a dec %edx 107201: 66 89 50 34 mov %dx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 107205: 52 push %edx 107206: 52 push %edx 107207: 6a 00 push $0x0 107209: 8d 45 e0 lea -0x20(%ebp),%eax 10720c: 50 push %eax 10720d: e8 02 05 00 00 call 107714 107212: 8b 43 50 mov 0x50(%ebx),%eax 107215: 8b 55 e0 mov -0x20(%ebp),%edx 107218: 89 50 48 mov %edx,0x48(%eax) 10721b: 83 c4 10 add $0x10,%esp /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 10721e: 50 push %eax 10721f: 50 push %eax 107220: 8b 55 0c mov 0xc(%ebp),%edx 107223: 8b 42 08 mov 0x8(%edx),%eax 107226: 52 push %edx 107227: ff 75 08 pushl 0x8(%ebp) 10722a: ff 50 34 call *0x34(%eax) return result; 10722d: 83 c4 10 add $0x10,%esp } 107230: 8d 65 f4 lea -0xc(%ebp),%esp 107233: 5b pop %ebx 107234: 5e pop %esi 107235: 5f pop %edi 107236: c9 leave 107237: c3 ret =============================================================================== 00107238 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107238: 55 push %ebp 107239: 89 e5 mov %esp,%ebp 10723b: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 10723e: 8b 45 08 mov 0x8(%ebp),%eax 107241: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107244: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107248: 74 0d je 107257 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTDIR ); 10724a: e8 71 a6 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10724f: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107255: eb 11 jmp 107268 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 107257: 83 78 5c 00 cmpl $0x0,0x5c(%eax) 10725b: 75 10 jne 10726d <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 10725d: e8 5e a6 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107262: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107268: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10726b: eb 09 jmp 107276 <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 10726d: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 107274: 31 c0 xor %eax,%eax return 0; } 107276: c9 leave 107277: c3 ret =============================================================================== 00107894 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 107894: 55 push %ebp 107895: 89 e5 mov %esp,%ebp 107897: 57 push %edi 107898: 56 push %esi 107899: 53 push %ebx 10789a: 83 ec 0c sub $0xc,%esp 10789d: 8b 5d 08 mov 0x8(%ebp),%ebx 1078a0: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1078a3: a1 f0 39 12 00 mov 0x1239f0,%eax 1078a8: 85 c0 test %eax,%eax 1078aa: 74 02 je 1078ae (*rtems_malloc_statistics_helpers->initialize)(); 1078ac: ff 10 call *(%eax) } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1078ae: e8 7c ff ff ff call 10782f /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1078b3: a1 f4 39 12 00 mov 0x1239f4,%eax 1078b8: 85 c0 test %eax,%eax 1078ba: 74 12 je 1078ce <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1078bc: 52 push %edx <== NOT EXECUTED 1078bd: 52 push %edx <== NOT EXECUTED 1078be: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1078c1: 53 push %ebx <== NOT EXECUTED 1078c2: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1078c4: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1078c7: 29 c6 sub %eax,%esi <== NOT EXECUTED 1078c9: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1078cb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * 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 ( 1078ce: 80 3d ed 39 12 00 00 cmpb $0x0,0x1239ed 1078d5: 75 11 jne 1078e8 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1078d7: 80 3d 40 17 12 00 00 cmpb $0x0,0x121740 1078de: 74 08 je 1078e8 ) { memset( heap_begin, 0, heap_size ); 1078e0: 31 c0 xor %eax,%eax 1078e2: 89 df mov %ebx,%edi 1078e4: 89 f1 mov %esi,%ecx 1078e6: f3 aa rep stos %al,%es:(%edi) * 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 ) { 1078e8: 80 3d ed 39 12 00 00 cmpb $0x0,0x1239ed 1078ef: 75 20 jne 107911 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1078f1: 6a 04 push $0x4 1078f3: 56 push %esi 1078f4: 53 push %ebx 1078f5: ff 35 70 16 12 00 pushl 0x121670 1078fb: e8 d0 39 00 00 call 10b2d0 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 107900: 83 c4 10 add $0x10,%esp 107903: 85 c0 test %eax,%eax 107905: 75 0a jne 107911 <== ALWAYS TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 107907: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10790a: 6a 1a push $0x1a <== NOT EXECUTED 10790c: e8 77 32 00 00 call 10ab88 <== NOT EXECUTED } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 107911: 8b 1d 58 55 12 00 mov 0x125558,%ebx 107917: 83 ec 0c sub $0xc,%esp 10791a: ff 35 70 16 12 00 pushl 0x121670 107920: e8 17 44 00 00 call 10bd3c <_Protected_heap_Get_size> 107925: 8d 1c 18 lea (%eax,%ebx,1),%ebx 107928: 89 1d 58 55 12 00 mov %ebx,0x125558 10792e: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 107931: 8d 65 f4 lea -0xc(%ebp),%esp 107934: 5b pop %ebx 107935: 5e pop %esi 107936: 5f pop %edi 107937: c9 leave 107938: c3 ret =============================================================================== 0010b6a2 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 10b6a2: 55 push %ebp <== NOT EXECUTED 10b6a3: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b6a5: 57 push %edi <== NOT EXECUTED 10b6a6: 56 push %esi <== NOT EXECUTED 10b6a7: 53 push %ebx <== NOT EXECUTED 10b6a8: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 10b6ab: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 10b6ae: 85 db test %ebx,%ebx <== NOT EXECUTED 10b6b0: 0f 84 fa 00 00 00 je 10b7b0 <== NOT EXECUTED return; if ( !print_handler ) 10b6b6: a1 2c 4e 16 00 mov 0x164e2c,%eax <== NOT EXECUTED 10b6bb: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10b6be: 85 c0 test %eax,%eax <== NOT EXECUTED 10b6c0: 0f 84 ea 00 00 00 je 10b7b0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 10b6c6: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 10b6c9: 75 1d jne 10b6e8 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 10b6cb: 83 3d 4c 7a 16 00 00 cmpl $0x0,0x167a4c <== NOT EXECUTED 10b6d2: 0f 84 d8 00 00 00 je 10b7b0 <== NOT EXECUTED 10b6d8: be 48 7a 16 00 mov $0x167a48,%esi <== NOT EXECUTED 10b6dd: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 10b6e4: 31 db xor %ebx,%ebx <== NOT EXECUTED 10b6e6: eb 0f jmp 10b6f7 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 10b6e8: 8d b3 c0 00 00 00 lea 0xc0(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 10b6ee: 8b 8b d4 00 00 00 mov 0xd4(%ebx),%ecx <== NOT EXECUTED 10b6f4: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 10b6f7: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10b6fa: 83 c2 10 add $0x10,%edx <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 10b6fd: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10b6ff: 83 e8 10 sub $0x10,%eax <== NOT EXECUTED 10b702: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 10b705: 50 push %eax <== NOT EXECUTED 10b706: 52 push %edx <== NOT EXECUTED 10b707: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 10b70a: e8 6c ff ff ff call 10b67b <== NOT EXECUTED if ( high_water_mark ) 10b70f: 59 pop %ecx <== NOT EXECUTED 10b710: 5f pop %edi <== NOT EXECUTED 10b711: 31 ff xor %edi,%edi <== NOT EXECUTED 10b713: 85 c0 test %eax,%eax <== NOT EXECUTED 10b715: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 10b718: 74 08 je 10b722 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 10b71a: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10b71d: 8d 3c 0a lea (%edx,%ecx,1),%edi <== NOT EXECUTED 10b720: 29 c7 sub %eax,%edi <== NOT EXECUTED else used = 0; if ( the_thread ) { 10b722: 85 db test %ebx,%ebx <== NOT EXECUTED 10b724: 74 26 je 10b74c <== NOT EXECUTED (*print_handler)( 10b726: 52 push %edx <== NOT EXECUTED 10b727: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 10b72a: 50 push %eax <== NOT EXECUTED 10b72b: 6a 05 push $0x5 <== NOT EXECUTED 10b72d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b730: e8 47 52 00 00 call 11097c <== NOT EXECUTED 10b735: 50 push %eax <== NOT EXECUTED 10b736: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b739: 68 9c 57 15 00 push $0x15579c <== NOT EXECUTED 10b73e: ff 35 28 4e 16 00 pushl 0x164e28 <== NOT EXECUTED 10b744: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b747: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b74a: eb 14 jmp 10b760 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 10b74c: 50 push %eax <== NOT EXECUTED 10b74d: 6a ff push $0xffffffff <== NOT EXECUTED 10b74f: 68 a9 57 15 00 push $0x1557a9 <== NOT EXECUTED 10b754: ff 35 28 4e 16 00 pushl 0x164e28 <== NOT EXECUTED 10b75a: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 10b75d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } (*print_handler)( 10b760: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 10b763: 53 push %ebx <== NOT EXECUTED 10b764: 53 push %ebx <== NOT EXECUTED 10b765: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10b768: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 10b76b: 8b 16 mov (%esi),%edx <== NOT EXECUTED 10b76d: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 10b771: 52 push %edx <== NOT EXECUTED 10b772: 50 push %eax <== NOT EXECUTED 10b773: 68 b7 57 15 00 push $0x1557b7 <== NOT EXECUTED 10b778: ff 35 28 4e 16 00 pushl 0x164e28 <== NOT EXECUTED 10b77e: ff 15 2c 4e 16 00 call *0x164e2c <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 10b784: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b787: 83 3d 24 4e 16 00 00 cmpl $0x0,0x164e24 <== NOT EXECUTED 10b78e: a1 2c 4e 16 00 mov 0x164e2c,%eax <== NOT EXECUTED 10b793: 75 09 jne 10b79e <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 10b795: 51 push %ecx <== NOT EXECUTED 10b796: 51 push %ecx <== NOT EXECUTED 10b797: 68 d5 57 15 00 push $0x1557d5 <== NOT EXECUTED 10b79c: eb 07 jmp 10b7a5 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 10b79e: 52 push %edx <== NOT EXECUTED 10b79f: 57 push %edi <== NOT EXECUTED 10b7a0: 68 e2 57 15 00 push $0x1557e2 <== NOT EXECUTED 10b7a5: ff 35 28 4e 16 00 pushl 0x164e28 <== NOT EXECUTED 10b7ab: ff d0 call *%eax <== NOT EXECUTED 10b7ad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 10b7b0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b7b3: 5b pop %ebx <== NOT EXECUTED 10b7b4: 5e pop %esi <== NOT EXECUTED 10b7b5: 5f pop %edi <== NOT EXECUTED 10b7b6: c9 leave <== NOT EXECUTED 10b7b7: c3 ret <== NOT EXECUTED =============================================================================== 0010b9b5 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 10b9b5: 55 push %ebp 10b9b6: 89 e5 mov %esp,%ebp 10b9b8: 57 push %edi static uint32_t pattern[ 4 ] = { 0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */ 0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */ }; if (Stack_check_Initialized) 10b9b9: 83 3d 24 4e 16 00 00 cmpl $0x0,0x164e24 10b9c0: 75 4d jne 10ba0f 10b9c2: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 10b9c4: 89 c2 mov %eax,%edx 10b9c6: 83 e2 03 and $0x3,%edx 10b9c9: 8b 14 95 1c 59 15 00 mov 0x15591c(,%edx,4),%edx 10b9d0: 89 14 85 38 7a 16 00 mov %edx,0x167a38(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 10b9d7: 40 inc %eax 10b9d8: 83 f8 04 cmp $0x4,%eax 10b9db: 75 e7 jne 10b9c4 /* * 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) { 10b9dd: 8b 15 b4 7b 16 00 mov 0x167bb4,%edx 10b9e3: 85 d2 test %edx,%edx 10b9e5: 74 1e je 10ba05 <== NEVER TAKEN 10b9e7: 8b 0d 74 7b 16 00 mov 0x167b74,%ecx 10b9ed: 85 c9 test %ecx,%ecx 10b9ef: 74 14 je 10ba05 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 10b9f1: 89 15 4c 7a 16 00 mov %edx,0x167a4c Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 10b9f7: 29 d1 sub %edx,%ecx 10b9f9: 89 0d 48 7a 16 00 mov %ecx,0x167a48 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 10b9ff: b0 a5 mov $0xa5,%al 10ba01: 89 d7 mov %edx,%edi 10ba03: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 10ba05: c7 05 24 4e 16 00 01 movl $0x1,0x164e24 10ba0c: 00 00 00 } 10ba0f: 5f pop %edi 10ba10: c9 leave 10ba11: c3 ret =============================================================================== 0010b67b : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 10b67b: 55 push %ebp <== NOT EXECUTED 10b67c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b67e: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 10b681: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10b684: 83 c0 10 add $0x10,%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 10b687: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 10b68a: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 10b68d: eb 0b jmp 10b69a <== NOT EXECUTED if (*base != U32_PATTERN) 10b68f: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 10b695: 75 09 jne 10b6a0 <== 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++) 10b697: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 10b69a: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10b69c: 72 f1 jb 10b68f <== NOT EXECUTED 10b69e: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 10b6a0: c9 leave <== NOT EXECUTED 10b6a1: c3 ret <== NOT EXECUTED =============================================================================== 0010b830 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 10b830: 55 push %ebp <== NOT EXECUTED 10b831: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b833: 56 push %esi <== NOT EXECUTED 10b834: 53 push %ebx <== NOT EXECUTED 10b835: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 10b838: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b83b: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10b83e: 8b b3 c4 00 00 00 mov 0xc4(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 10b844: 68 49 58 15 00 push $0x155849 <== NOT EXECUTED 10b849: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 10b84c: e8 1b 27 00 00 call 10df6c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 10b851: 5a pop %edx <== NOT EXECUTED 10b852: 59 pop %ecx <== NOT EXECUTED 10b853: 53 push %ebx <== NOT EXECUTED 10b854: 68 59 58 15 00 push $0x155859 <== NOT EXECUTED 10b859: e8 0e 27 00 00 call 10df6c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 10b85e: 59 pop %ecx <== NOT EXECUTED 10b85f: 58 pop %eax <== NOT EXECUTED 10b860: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b863: 68 76 58 15 00 push $0x155876 <== NOT EXECUTED 10b868: e8 ff 26 00 00 call 10df6c <== NOT EXECUTED printk( 10b86d: 58 pop %eax <== NOT EXECUTED 10b86e: 5a pop %edx <== NOT EXECUTED 10b86f: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 10b872: 68 88 58 15 00 push $0x155888 <== NOT EXECUTED 10b877: e8 f0 26 00 00 call 10df6c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 10b87c: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10b87f: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 10b882: 50 push %eax <== NOT EXECUTED 10b883: 6a 20 push $0x20 <== NOT EXECUTED 10b885: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 10b888: e8 ef 50 00 00 call 11097c <== NOT EXECUTED 10b88d: 5a pop %edx <== NOT EXECUTED 10b88e: 59 pop %ecx <== NOT EXECUTED 10b88f: 50 push %eax <== NOT EXECUTED 10b890: 68 9c 58 15 00 push $0x15589c <== NOT EXECUTED 10b895: e8 d2 26 00 00 call 10df6c <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 10b89a: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx <== NOT EXECUTED 10b8a0: 8b 83 c0 00 00 00 mov 0xc0(%ebx),%eax <== NOT EXECUTED 10b8a6: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 10b8a9: 53 push %ebx <== NOT EXECUTED 10b8aa: 51 push %ecx <== NOT EXECUTED 10b8ab: 50 push %eax <== NOT EXECUTED 10b8ac: 68 b2 58 15 00 push $0x1558b2 <== NOT EXECUTED 10b8b1: e8 b6 26 00 00 call 10df6c <== 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) { 10b8b6: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b8b9: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 10b8bc: 84 d2 test %dl,%dl <== NOT EXECUTED 10b8be: 75 17 jne 10b8d7 <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 10b8c0: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 10b8c3: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 10b8c6: 56 push %esi <== NOT EXECUTED 10b8c7: 50 push %eax <== NOT EXECUTED 10b8c8: 6a 10 push $0x10 <== NOT EXECUTED 10b8ca: 68 e3 58 15 00 push $0x1558e3 <== NOT EXECUTED 10b8cf: e8 98 26 00 00 call 10df6c <== NOT EXECUTED 10b8d4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 10b8d7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b8da: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 10b8df: e8 c0 59 00 00 call 1112a4 <== NOT EXECUTED =============================================================================== 0013c3e6 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13c3e6: 55 push %ebp <== NOT EXECUTED 13c3e7: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13c3e9: 57 push %edi <== NOT EXECUTED 13c3ea: 56 push %esi <== NOT EXECUTED 13c3eb: 53 push %ebx <== NOT EXECUTED 13c3ec: 83 ec 6c sub $0x6c,%esp <== NOT EXECUTED 13c3ef: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED 13c3f2: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 13c3f5: 89 4d ac mov %ecx,-0x54(%ebp) <== NOT EXECUTED 13c3f8: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 13c3fb: c6 01 00 movb $0x0,(%ecx) <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 13c3fe: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 13c401: e8 8c fc ff ff call 13c092 <== NOT EXECUTED if (rc > 0) 13c406: 85 c0 test %eax,%eax <== NOT EXECUTED 13c408: 0f 8f aa 01 00 00 jg 13c5b8 <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 13c40e: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 13c411: 8b 02 mov (%edx),%eax <== NOT EXECUTED end_bit = test_bit + (window * direction); 13c413: 89 da mov %ebx,%edx <== NOT EXECUTED 13c415: c1 e2 0b shl $0xb,%edx <== NOT EXECUTED if (end_bit < 0) 13c418: 01 c2 add %eax,%edx <== NOT EXECUTED 13c41a: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 13c41d: 79 09 jns 13c428 <== NOT EXECUTED 13c41f: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 13c426: eb 0f jmp 13c437 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 13c428: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 13c42b: 8b 51 0c mov 0xc(%ecx),%edx <== NOT EXECUTED 13c42e: 39 55 d4 cmp %edx,-0x2c(%ebp) <== NOT EXECUTED 13c431: 72 04 jb 13c437 <== NOT EXECUTED end_bit = control->size - 1; 13c433: 4a dec %edx <== NOT EXECUTED 13c434: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); 13c437: 89 c2 mov %eax,%edx <== NOT EXECUTED 13c439: c1 fa 05 sar $0x5,%edx <== NOT EXECUTED 13c43c: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); 13c43f: 89 c6 mov %eax,%esi <== NOT EXECUTED 13c441: 83 e6 1f and $0x1f,%esi <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 13c444: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED search_bits = &control->search_bits[search_index]; 13c447: 89 c1 mov %eax,%ecx <== NOT EXECUTED 13c449: c1 f9 0a sar $0xa,%ecx <== NOT EXECUTED 13c44c: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 13c44f: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 13c452: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 13c455: 8b 49 14 mov 0x14(%ecx),%ecx <== NOT EXECUTED 13c458: 01 4d d0 add %ecx,-0x30(%ebp) <== NOT EXECUTED map_bits = &map[map_index]; 13c45b: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 13c45e: c1 e7 02 shl $0x2,%edi <== NOT EXECUTED 13c461: 03 7d e4 add -0x1c(%ebp),%edi <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 13c464: 8d 0c 9d 00 00 00 00 lea 0x0(,%ebx,4),%ecx <== NOT EXECUTED 13c46b: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13c46e: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 13c470: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 13c473: 89 4d a8 mov %ecx,-0x58(%ebp) <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 13c476: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 13c479: 8b 09 mov (%ecx),%ecx <== NOT EXECUTED 13c47b: 89 4d c0 mov %ecx,-0x40(%ebp) <== NOT EXECUTED 13c47e: 85 c9 test %ecx,%ecx <== NOT EXECUTED 13c480: 0f 84 d2 00 00 00 je 13c558 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13c486: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 13c489: 01 d9 add %ebx,%ecx <== NOT EXECUTED 13c48b: c1 e1 05 shl $0x5,%ecx <== NOT EXECUTED 13c48e: 89 4d c4 mov %ecx,-0x3c(%ebp) <== NOT EXECUTED 13c491: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED 13c494: e9 b3 00 00 00 jmp 13c54c <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 13c499: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 13c49e: 8a 4d bc mov -0x44(%ebp),%cl <== NOT EXECUTED 13c4a1: d3 e2 shl %cl,%edx <== NOT EXECUTED 13c4a3: 89 55 b8 mov %edx,-0x48(%ebp) <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 13c4a6: 8b 4d c0 mov -0x40(%ebp),%ecx <== NOT EXECUTED 13c4a9: 85 ca test %ecx,%edx <== NOT EXECUTED 13c4ab: 75 53 jne 13c500 <== NOT EXECUTED 13c4ad: eb 6a jmp 13c519 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 13c4af: 8b 17 mov (%edi),%edx <== NOT EXECUTED 13c4b1: 89 55 bc mov %edx,-0x44(%ebp) <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 13c4b4: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 13c4b9: 89 f1 mov %esi,%ecx <== NOT EXECUTED 13c4bb: d3 e2 shl %cl,%edx <== NOT EXECUTED 13c4bd: 89 55 a4 mov %edx,-0x5c(%ebp) <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 13c4c0: 85 55 bc test %edx,-0x44(%ebp) <== NOT EXECUTED 13c4c3: 74 30 je 13c4f5 <== NOT EXECUTED */ static rtems_rfs_bitmap_element rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_element bits) { return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 13c4c5: f7 d2 not %edx <== NOT EXECUTED 13c4c7: 23 55 bc and -0x44(%ebp),%edx <== NOT EXECUTED while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); 13c4ca: 89 17 mov %edx,(%edi) <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 13c4cc: 85 d2 test %edx,%edx <== NOT EXECUTED 13c4ce: 75 0a jne 13c4da <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 13c4d0: 8b 55 b8 mov -0x48(%ebp),%edx <== NOT EXECUTED 13c4d3: f7 d2 not %edx <== NOT EXECUTED 13c4d5: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 13c4d8: 21 11 and %edx,(%ecx) <== NOT EXECUTED 1 << search_offset); control->free--; 13c4da: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 13c4dd: ff 4a 10 decl 0x10(%edx) <== NOT EXECUTED *bit = test_bit; 13c4e0: 8b 4d b0 mov -0x50(%ebp),%ecx <== NOT EXECUTED 13c4e3: 89 01 mov %eax,(%ecx) <== NOT EXECUTED *found = true; 13c4e5: 8b 45 ac mov -0x54(%ebp),%eax <== NOT EXECUTED 13c4e8: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED rtems_rfs_buffer_mark_dirty (control->buffer); 13c4eb: 8b 02 mov (%edx),%eax <== NOT EXECUTED 13c4ed: c6 00 01 movb $0x1,(%eax) <== NOT EXECUTED 13c4f0: e9 c1 00 00 00 jmp 13c5b6 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 13c4f5: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13c4f8: 74 19 je 13c513 <== NOT EXECUTED 13c4fa: 01 de add %ebx,%esi <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13c4fc: 01 d8 add %ebx,%eax <== NOT EXECUTED 13c4fe: eb 06 jmp 13c506 <== NOT EXECUTED 13c500: 8b 55 bc mov -0x44(%ebp),%edx <== NOT EXECUTED 13c503: 89 55 94 mov %edx,-0x6c(%ebp) <== NOT EXECUTED { /* * Find the clear bit in the map. Update the search map and map if * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) 13c506: 83 fe 1f cmp $0x1f,%esi <== NOT EXECUTED 13c509: 76 a4 jbe 13c4af <== NOT EXECUTED 13c50b: 8b 4d 94 mov -0x6c(%ebp),%ecx <== NOT EXECUTED 13c50e: 89 4d bc mov %ecx,-0x44(%ebp) <== NOT EXECUTED 13c511: eb 06 jmp 13c519 <== NOT EXECUTED 13c513: 8b 45 94 mov -0x6c(%ebp),%eax <== NOT EXECUTED 13c516: 89 45 bc mov %eax,-0x44(%ebp) <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 13c519: 03 7d b4 add -0x4c(%ebp),%edi <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 13c51c: 01 5d cc add %ebx,-0x34(%ebp) <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 13c51f: 85 db test %ebx,%ebx <== NOT EXECUTED 13c521: 0f 9f c0 setg %al <== NOT EXECUTED 13c524: 0f b6 f0 movzbl %al,%esi <== NOT EXECUTED 13c527: 4e dec %esi <== NOT EXECUTED 13c528: 83 e6 1f and $0x1f,%esi <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 13c52b: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 13c52e: 8d 04 16 lea (%esi,%edx,1),%eax <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 13c531: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13c534: 7f 04 jg 13c53a <== NOT EXECUTED 13c536: 85 db test %ebx,%ebx <== NOT EXECUTED 13c538: 78 51 js 13c58b <== NOT EXECUTED 13c53a: 8b 4d a8 mov -0x58(%ebp),%ecx <== NOT EXECUTED 13c53d: 01 4d c4 add %ecx,-0x3c(%ebp) <== NOT EXECUTED 13c540: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13c543: 7c 04 jl 13c549 <== NOT EXECUTED 13c545: 85 db test %ebx,%ebx <== NOT EXECUTED 13c547: 7f 42 jg 13c58b <== NOT EXECUTED 13c549: 01 5d bc add %ebx,-0x44(%ebp) <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 13c54c: 83 7d bc 1f cmpl $0x1f,-0x44(%ebp) <== NOT EXECUTED 13c550: 0f 86 43 ff ff ff jbe 13c499 <== NOT EXECUTED 13c556: eb 33 jmp 13c58b <== NOT EXECUTED * * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); 13c558: 83 e0 e0 and $0xffffffe0,%eax <== NOT EXECUTED if (direction > 0) 13c55b: 85 db test %ebx,%ebx <== NOT EXECUTED 13c55d: 7e 13 jle 13c572 <== NOT EXECUTED { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 13c55f: b9 20 00 00 00 mov $0x20,%ecx <== NOT EXECUTED 13c564: 29 d1 sub %edx,%ecx <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 13c566: 89 ca mov %ecx,%edx <== NOT EXECUTED 13c568: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED 13c56b: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 13c56e: 31 f6 xor %esi,%esi <== NOT EXECUTED 13c570: eb 10 jmp 13c582 <== NOT EXECUTED map_offset = 0; } else { bits_skipped = search_offset + 1; 13c572: 8d 4a 01 lea 0x1(%edx),%ecx <== NOT EXECUTED /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 13c575: c1 e2 05 shl $0x5,%edx <== NOT EXECUTED 13c578: f7 d2 not %edx <== NOT EXECUTED 13c57a: 8d 04 02 lea (%edx,%eax,1),%eax <== NOT EXECUTED 13c57d: be 1f 00 00 00 mov $0x1f,%esi <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 13c582: 0f af cb imul %ebx,%ecx <== NOT EXECUTED 13c585: 8d 3c 8f lea (%edi,%ecx,4),%edi <== NOT EXECUTED map_index += direction * bits_skipped; 13c588: 01 4d cc add %ecx,-0x34(%ebp) <== NOT EXECUTED } search_bits += direction; 13c58b: 8b 55 b4 mov -0x4c(%ebp),%edx <== NOT EXECUTED 13c58e: 01 55 d0 add %edx,-0x30(%ebp) <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 13c591: 31 d2 xor %edx,%edx <== NOT EXECUTED 13c593: 85 db test %ebx,%ebx <== NOT EXECUTED 13c595: 0f 9f c2 setg %dl <== NOT EXECUTED 13c598: 4a dec %edx <== NOT EXECUTED 13c599: 83 e2 1f and $0x1f,%edx <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 13c59c: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13c59f: 7c 0d jl 13c5ae <== NOT EXECUTED 13c5a1: 85 db test %ebx,%ebx <== NOT EXECUTED 13c5a3: 0f 88 cd fe ff ff js 13c476 <== NOT EXECUTED 13c5a9: 3b 45 d4 cmp -0x2c(%ebp),%eax <== NOT EXECUTED 13c5ac: 7f 08 jg 13c5b6 <== NOT EXECUTED 13c5ae: 85 db test %ebx,%ebx <== NOT EXECUTED 13c5b0: 0f 8f c0 fe ff ff jg 13c476 <== NOT EXECUTED 13c5b6: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13c5b8: 83 c4 6c add $0x6c,%esp <== NOT EXECUTED 13c5bb: 5b pop %ebx <== NOT EXECUTED 13c5bc: 5e pop %esi <== NOT EXECUTED 13c5bd: 5f pop %edi <== NOT EXECUTED 13c5be: c9 leave <== NOT EXECUTED 13c5bf: c3 ret <== NOT EXECUTED =============================================================================== 00100200 <_Barrier_Manager_initialization>: #include #include #include void _Barrier_Manager_initialization(void) { 100200: 55 push %ebp 100201: 89 e5 mov %esp,%ebp } 100203: c9 leave 100204: c3 ret =============================================================================== 00117a0c <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 117a0c: 55 push %ebp 117a0d: 89 e5 mov %esp,%ebp 117a0f: 57 push %edi 117a10: 56 push %esi 117a11: 53 push %ebx 117a12: 83 ec 1c sub $0x1c,%esp 117a15: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 117a18: b8 01 00 00 00 mov $0x1,%eax 117a1d: 8b 55 10 mov 0x10(%ebp),%edx 117a20: 3b 53 4c cmp 0x4c(%ebx),%edx 117a23: 77 4c ja 117a71 <_CORE_message_queue_Broadcast+0x65><== NEVER TAKEN * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a25: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 117a2c: 83 7b 48 00 cmpl $0x0,0x48(%ebx) 117a30: 74 23 je 117a55 <_CORE_message_queue_Broadcast+0x49> *count = 0; 117a32: 8b 45 1c mov 0x1c(%ebp),%eax 117a35: c7 00 00 00 00 00 movl $0x0,(%eax) 117a3b: eb 32 jmp 117a6f <_CORE_message_queue_Broadcast+0x63> */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 117a3d: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 117a40: 8b 42 2c mov 0x2c(%edx),%eax 117a43: 89 c7 mov %eax,%edi 117a45: 8b 75 0c mov 0xc(%ebp),%esi 117a48: 8b 4d 10 mov 0x10(%ebp),%ecx 117a4b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 117a4d: 8b 42 28 mov 0x28(%edx),%eax 117a50: 8b 55 10 mov 0x10(%ebp),%edx 117a53: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 117a55: 83 ec 0c sub $0xc,%esp 117a58: 53 push %ebx 117a59: e8 b2 20 00 00 call 119b10 <_Thread_queue_Dequeue> 117a5e: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 117a60: 83 c4 10 add $0x10,%esp 117a63: 85 c0 test %eax,%eax 117a65: 75 d6 jne 117a3d <_CORE_message_queue_Broadcast+0x31> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 117a67: 8b 55 e4 mov -0x1c(%ebp),%edx 117a6a: 8b 45 1c mov 0x1c(%ebp),%eax 117a6d: 89 10 mov %edx,(%eax) 117a6f: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 117a71: 8d 65 f4 lea -0xc(%ebp),%esp 117a74: 5b pop %ebx 117a75: 5e pop %esi 117a76: 5f pop %edi 117a77: c9 leave 117a78: c3 ret =============================================================================== 00112894 <_CORE_message_queue_Initialize>: 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 ) { 112894: 55 push %ebp 112895: 89 e5 mov %esp,%ebp 112897: 57 push %edi 112898: 56 push %esi 112899: 53 push %ebx 11289a: 83 ec 0c sub $0xc,%esp 11289d: 8b 5d 08 mov 0x8(%ebp),%ebx 1128a0: 8b 75 10 mov 0x10(%ebp),%esi 1128a3: 8b 55 14 mov 0x14(%ebp),%edx size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 1128a6: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 1128a9: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 1128b0: 89 53 4c mov %edx,0x4c(%ebx) /* * 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)) { 1128b3: 89 d0 mov %edx,%eax 1128b5: f6 c2 03 test $0x3,%dl 1128b8: 74 0a je 1128c4 <_CORE_message_queue_Initialize+0x30> allocated_message_size += sizeof(uint32_t); 1128ba: 8d 42 04 lea 0x4(%edx),%eax allocated_message_size &= ~(sizeof(uint32_t) - 1); 1128bd: 83 e0 fc and $0xfffffffc,%eax } if (allocated_message_size < maximum_message_size) 1128c0: 39 d0 cmp %edx,%eax 1128c2: 72 5f jb 112923 <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 1128c4: 8d 78 10 lea 0x10(%eax),%edi /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 1128c7: 89 fa mov %edi,%edx 1128c9: 0f af d6 imul %esi,%edx (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 1128cc: 39 c2 cmp %eax,%edx 1128ce: 72 53 jb 112923 <_CORE_message_queue_Initialize+0x8f><== NEVER TAKEN return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 1128d0: 83 ec 0c sub $0xc,%esp 1128d3: 52 push %edx 1128d4: e8 4f 25 00 00 call 114e28 <_Workspace_Allocate> 1128d9: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 1128dc: 83 c4 10 add $0x10,%esp 1128df: 85 c0 test %eax,%eax 1128e1: 74 40 je 112923 <_CORE_message_queue_Initialize+0x8f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 1128e3: 57 push %edi 1128e4: 56 push %esi 1128e5: 50 push %eax 1128e6: 8d 43 60 lea 0x60(%ebx),%eax 1128e9: 50 push %eax 1128ea: e8 ed 4a 00 00 call 1173dc <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1128ef: 8d 43 54 lea 0x54(%ebx),%eax 1128f2: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 1128f5: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 1128fc: 8d 43 50 lea 0x50(%ebx),%eax 1128ff: 89 43 58 mov %eax,0x58(%ebx) allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 112902: 6a 06 push $0x6 112904: 68 80 00 00 00 push $0x80 112909: 8b 45 0c mov 0xc(%ebp),%eax 11290c: 83 38 01 cmpl $0x1,(%eax) 11290f: 0f 94 c0 sete %al 112912: 0f b6 c0 movzbl %al,%eax 112915: 50 push %eax 112916: 53 push %ebx 112917: e8 20 1c 00 00 call 11453c <_Thread_queue_Initialize> 11291c: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 11291e: 83 c4 20 add $0x20,%esp 112921: eb 02 jmp 112925 <_CORE_message_queue_Initialize+0x91> 112923: 31 c0 xor %eax,%eax } 112925: 8d 65 f4 lea -0xc(%ebp),%esp 112928: 5b pop %ebx 112929: 5e pop %esi 11292a: 5f pop %edi 11292b: c9 leave 11292c: c3 ret =============================================================================== 00112930 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 112930: 55 push %ebp 112931: 89 e5 mov %esp,%ebp 112933: 57 push %edi 112934: 56 push %esi 112935: 53 push %ebx 112936: 83 ec 2c sub $0x2c,%esp 112939: 8b 45 08 mov 0x8(%ebp),%eax 11293c: 8b 55 0c mov 0xc(%ebp),%edx 11293f: 89 55 dc mov %edx,-0x24(%ebp) 112942: 8b 55 10 mov 0x10(%ebp),%edx 112945: 89 55 e0 mov %edx,-0x20(%ebp) 112948: 8b 7d 14 mov 0x14(%ebp),%edi 11294b: 8b 55 1c mov 0x1c(%ebp),%edx 11294e: 89 55 d4 mov %edx,-0x2c(%ebp) 112951: 8a 55 18 mov 0x18(%ebp),%dl 112954: 88 55 db mov %dl,-0x25(%ebp) ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 112957: 8b 0d b4 d3 12 00 mov 0x12d3b4,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 11295d: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 112964: 9c pushf 112965: fa cli 112966: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112969: 8b 50 50 mov 0x50(%eax),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11296c: 8d 58 54 lea 0x54(%eax),%ebx 11296f: 39 da cmp %ebx,%edx 112971: 74 47 je 1129ba <_CORE_message_queue_Seize+0x8a> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 112973: 8b 32 mov (%edx),%esi the_chain->first = new_first; 112975: 89 70 50 mov %esi,0x50(%eax) new_first->previous = _Chain_Head(the_chain); 112978: 8d 58 50 lea 0x50(%eax),%ebx 11297b: 89 5e 04 mov %ebx,0x4(%esi) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 11297e: 85 d2 test %edx,%edx 112980: 74 38 je 1129ba <_CORE_message_queue_Seize+0x8a><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; 112982: ff 48 48 decl 0x48(%eax) _ISR_Enable( level ); 112985: ff 75 e4 pushl -0x1c(%ebp) 112988: 9d popf *size_p = the_message->Contents.size; 112989: 8b 4a 08 mov 0x8(%edx),%ecx 11298c: 89 0f mov %ecx,(%edi) _Thread_Executing->Wait.count = 11298e: 8b 0d b4 d3 12 00 mov 0x12d3b4,%ecx 112994: c7 41 24 00 00 00 00 movl $0x0,0x24(%ecx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11299b: 8d 72 0c lea 0xc(%edx),%esi 11299e: 8b 0f mov (%edi),%ecx 1129a0: 8b 7d e0 mov -0x20(%ebp),%edi 1129a3: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 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 ); 1129a5: 89 55 0c mov %edx,0xc(%ebp) 1129a8: 83 c0 60 add $0x60,%eax 1129ab: 89 45 08 mov %eax,0x8(%ebp) 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 ); } 1129ae: 83 c4 2c add $0x2c,%esp 1129b1: 5b pop %ebx 1129b2: 5e pop %esi 1129b3: 5f pop %edi 1129b4: c9 leave 1129b5: e9 5a fe ff ff jmp 112814 <_Chain_Append> return; } #endif } if ( !wait ) { 1129ba: 80 7d db 00 cmpb $0x0,-0x25(%ebp) 1129be: 75 13 jne 1129d3 <_CORE_message_queue_Seize+0xa3> _ISR_Enable( level ); 1129c0: ff 75 e4 pushl -0x1c(%ebp) 1129c3: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 1129c4: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx) 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 ); } 1129cb: 83 c4 2c add $0x2c,%esp 1129ce: 5b pop %ebx 1129cf: 5e pop %esi 1129d0: 5f pop %edi 1129d1: c9 leave 1129d2: c3 ret 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; 1129d3: c7 40 30 01 00 00 00 movl $0x1,0x30(%eax) 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; 1129da: 89 41 44 mov %eax,0x44(%ecx) executing->Wait.id = id; 1129dd: 8b 55 dc mov -0x24(%ebp),%edx 1129e0: 89 51 20 mov %edx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 1129e3: 8b 55 e0 mov -0x20(%ebp),%edx 1129e6: 89 51 2c mov %edx,0x2c(%ecx) executing->Wait.return_argument = size_p; 1129e9: 89 79 28 mov %edi,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1129ec: ff 75 e4 pushl -0x1c(%ebp) 1129ef: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1129f0: c7 45 10 e0 45 11 00 movl $0x1145e0,0x10(%ebp) 1129f7: 8b 55 d4 mov -0x2c(%ebp),%edx 1129fa: 89 55 0c mov %edx,0xc(%ebp) 1129fd: 89 45 08 mov %eax,0x8(%ebp) } 112a00: 83 c4 2c add $0x2c,%esp 112a03: 5b pop %ebx 112a04: 5e pop %esi 112a05: 5f pop %edi 112a06: c9 leave 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 ); 112a07: e9 24 19 00 00 jmp 114330 <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010afcd <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10afcd: 55 push %ebp 10afce: 89 e5 mov %esp,%ebp 10afd0: 53 push %ebx 10afd1: 83 ec 14 sub $0x14,%esp 10afd4: 8b 5d 08 mov 0x8(%ebp),%ebx 10afd7: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10afda: a1 90 56 12 00 mov 0x125690,%eax 10afdf: 85 c0 test %eax,%eax 10afe1: 74 19 je 10affc <_CORE_mutex_Seize+0x2f> 10afe3: 84 d2 test %dl,%dl 10afe5: 74 15 je 10affc <_CORE_mutex_Seize+0x2f><== NEVER TAKEN 10afe7: 83 3d 28 58 12 00 01 cmpl $0x1,0x125828 10afee: 76 0c jbe 10affc <_CORE_mutex_Seize+0x2f> 10aff0: 53 push %ebx 10aff1: 6a 13 push $0x13 10aff3: 6a 00 push $0x0 10aff5: 6a 00 push $0x0 10aff7: e8 c4 05 00 00 call 10b5c0 <_Internal_error_Occurred> 10affc: 51 push %ecx 10affd: 51 push %ecx 10affe: 8d 45 18 lea 0x18(%ebp),%eax 10b001: 50 push %eax 10b002: 53 push %ebx 10b003: 88 55 f4 mov %dl,-0xc(%ebp) 10b006: e8 79 47 00 00 call 10f784 <_CORE_mutex_Seize_interrupt_trylock> 10b00b: 83 c4 10 add $0x10,%esp 10b00e: 85 c0 test %eax,%eax 10b010: 8a 55 f4 mov -0xc(%ebp),%dl 10b013: 74 48 je 10b05d <_CORE_mutex_Seize+0x90> 10b015: 84 d2 test %dl,%dl 10b017: 75 12 jne 10b02b <_CORE_mutex_Seize+0x5e> 10b019: ff 75 18 pushl 0x18(%ebp) 10b01c: 9d popf 10b01d: a1 4c 57 12 00 mov 0x12574c,%eax 10b022: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) 10b029: eb 32 jmp 10b05d <_CORE_mutex_Seize+0x90> 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; 10b02b: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10b032: a1 4c 57 12 00 mov 0x12574c,%eax 10b037: 89 58 44 mov %ebx,0x44(%eax) 10b03a: 8b 55 0c mov 0xc(%ebp),%edx 10b03d: 89 50 20 mov %edx,0x20(%eax) 10b040: a1 90 56 12 00 mov 0x125690,%eax 10b045: 40 inc %eax 10b046: a3 90 56 12 00 mov %eax,0x125690 10b04b: ff 75 18 pushl 0x18(%ebp) 10b04e: 9d popf 10b04f: 50 push %eax 10b050: 50 push %eax 10b051: ff 75 14 pushl 0x14(%ebp) 10b054: 53 push %ebx 10b055: e8 26 ff ff ff call 10af80 <_CORE_mutex_Seize_interrupt_blocking> 10b05a: 83 c4 10 add $0x10,%esp } 10b05d: 8b 5d fc mov -0x4(%ebp),%ebx 10b060: c9 leave 10b061: c3 ret =============================================================================== 0010f784 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 10f784: 55 push %ebp 10f785: 89 e5 mov %esp,%ebp 10f787: 53 push %ebx 10f788: 83 ec 04 sub $0x4,%esp 10f78b: 8b 45 08 mov 0x8(%ebp),%eax 10f78e: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10f791: 8b 15 4c 57 12 00 mov 0x12574c,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 10f797: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 10f79e: 83 78 50 00 cmpl $0x0,0x50(%eax) 10f7a2: 74 7a je 10f81e <_CORE_mutex_Seize_interrupt_trylock+0x9a> the_mutex->lock = CORE_MUTEX_LOCKED; 10f7a4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 10f7ab: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 10f7ae: 8b 5a 08 mov 0x8(%edx),%ebx 10f7b1: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 10f7b4: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10f7bb: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10f7be: 83 fb 02 cmp $0x2,%ebx 10f7c1: 74 05 je 10f7c8 <_CORE_mutex_Seize_interrupt_trylock+0x44> 10f7c3: 83 fb 03 cmp $0x3,%ebx 10f7c6: 75 75 jne 10f83d <_CORE_mutex_Seize_interrupt_trylock+0xb9> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 10f7c8: ff 42 1c incl 0x1c(%edx) } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 10f7cb: 83 fb 03 cmp $0x3,%ebx 10f7ce: 75 6d jne 10f83d <_CORE_mutex_Seize_interrupt_trylock+0xb9> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 10f7d0: 8b 5a 14 mov 0x14(%edx),%ebx if ( current == ceiling ) { 10f7d3: 3b 58 4c cmp 0x4c(%eax),%ebx 10f7d6: 74 65 je 10f83d <_CORE_mutex_Seize_interrupt_trylock+0xb9> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 10f7d8: 76 2a jbe 10f804 <_CORE_mutex_Seize_interrupt_trylock+0x80> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10f7da: 8b 15 90 56 12 00 mov 0x125690,%edx 10f7e0: 42 inc %edx 10f7e1: 89 15 90 56 12 00 mov %edx,0x125690 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 10f7e7: ff 31 pushl (%ecx) 10f7e9: 9d popf _Thread_Change_priority( 10f7ea: 52 push %edx 10f7eb: 6a 00 push $0x0 10f7ed: ff 70 4c pushl 0x4c(%eax) 10f7f0: ff 70 5c pushl 0x5c(%eax) 10f7f3: e8 9c c5 ff ff call 10bd94 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 10f7f8: e8 34 ca ff ff call 10c231 <_Thread_Enable_dispatch> 10f7fd: 31 c0 xor %eax,%eax 10f7ff: 83 c4 10 add $0x10,%esp 10f802: eb 45 jmp 10f849 <_CORE_mutex_Seize_interrupt_trylock+0xc5> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 10f804: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 10f80b: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 10f812: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 10f819: ff 4a 1c decl 0x1c(%edx) 10f81c: eb 1f jmp 10f83d <_CORE_mutex_Seize_interrupt_trylock+0xb9> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 10f81e: 8b 58 5c mov 0x5c(%eax),%ebx 10f821: 39 d3 cmp %edx,%ebx 10f823: 75 1f jne 10f844 <_CORE_mutex_Seize_interrupt_trylock+0xc0> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 10f825: 8b 50 40 mov 0x40(%eax),%edx 10f828: 85 d2 test %edx,%edx 10f82a: 74 05 je 10f831 <_CORE_mutex_Seize_interrupt_trylock+0xad> 10f82c: 4a dec %edx 10f82d: 75 15 jne 10f844 <_CORE_mutex_Seize_interrupt_trylock+0xc0><== ALWAYS TAKEN 10f82f: eb 05 jmp 10f836 <_CORE_mutex_Seize_interrupt_trylock+0xb2><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 10f831: ff 40 54 incl 0x54(%eax) 10f834: eb 07 jmp 10f83d <_CORE_mutex_Seize_interrupt_trylock+0xb9> _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 10f836: c7 43 34 02 00 00 00 movl $0x2,0x34(%ebx) <== NOT EXECUTED _ISR_Enable( *level_p ); 10f83d: ff 31 pushl (%ecx) 10f83f: 9d popf 10f840: 31 c0 xor %eax,%eax 10f842: eb 05 jmp 10f849 <_CORE_mutex_Seize_interrupt_trylock+0xc5> 10f844: b8 01 00 00 00 mov $0x1,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 10f849: 8b 5d fc mov -0x4(%ebp),%ebx 10f84c: c9 leave 10f84d: c3 ret =============================================================================== 0010b190 <_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 ) { 10b190: 55 push %ebp 10b191: 89 e5 mov %esp,%ebp 10b193: 53 push %ebx 10b194: 83 ec 10 sub $0x10,%esp 10b197: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 10b19a: 53 push %ebx 10b19b: e8 18 14 00 00 call 10c5b8 <_Thread_queue_Dequeue> 10b1a0: 89 c2 mov %eax,%edx 10b1a2: 83 c4 10 add $0x10,%esp 10b1a5: 31 c0 xor %eax,%eax 10b1a7: 85 d2 test %edx,%edx 10b1a9: 75 15 jne 10b1c0 <_CORE_semaphore_Surrender+0x30> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 10b1ab: 9c pushf 10b1ac: fa cli 10b1ad: 59 pop %ecx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10b1ae: 8b 53 48 mov 0x48(%ebx),%edx 10b1b1: b0 04 mov $0x4,%al 10b1b3: 3b 53 40 cmp 0x40(%ebx),%edx 10b1b6: 73 06 jae 10b1be <_CORE_semaphore_Surrender+0x2e><== NEVER TAKEN the_semaphore->count += 1; 10b1b8: 42 inc %edx 10b1b9: 89 53 48 mov %edx,0x48(%ebx) 10b1bc: 30 c0 xor %al,%al else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10b1be: 51 push %ecx 10b1bf: 9d popf } return status; } 10b1c0: 8b 5d fc mov -0x4(%ebp),%ebx 10b1c3: c9 leave 10b1c4: c3 ret =============================================================================== 00100208 <_Dual_ported_memory_Manager_initialization>: #include #include #include void _Dual_ported_memory_Manager_initialization(void) { 100208: 55 push %ebp 100209: 89 e5 mov %esp,%ebp } 10020b: c9 leave 10020c: c3 ret =============================================================================== 00100210 <_Event_Manager_initialization>: #include #include #include void _Event_Manager_initialization(void) { 100210: 55 push %ebp 100211: 89 e5 mov %esp,%ebp } 100213: c9 leave 100214: c3 ret =============================================================================== 0010a088 <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10a088: 55 push %ebp 10a089: 89 e5 mov %esp,%ebp 10a08b: 57 push %edi 10a08c: 56 push %esi 10a08d: 53 push %ebx 10a08e: 83 ec 1c sub $0x1c,%esp 10a091: 8b 45 08 mov 0x8(%ebp),%eax 10a094: 8b 75 0c mov 0xc(%ebp),%esi 10a097: 8b 55 10 mov 0x10(%ebp),%edx 10a09a: 89 55 dc mov %edx,-0x24(%ebp) 10a09d: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 10a0a0: 8b 1d 4c 57 12 00 mov 0x12574c,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10a0a6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10a0ad: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi _ISR_Disable( level ); 10a0b3: 9c pushf 10a0b4: fa cli 10a0b5: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10a0b8: 8b 17 mov (%edi),%edx 10a0ba: 89 55 e0 mov %edx,-0x20(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10a0bd: 21 c2 and %eax,%edx 10a0bf: 74 1b je 10a0dc <_Event_Seize+0x54> 10a0c1: 39 c2 cmp %eax,%edx 10a0c3: 74 08 je 10a0cd <_Event_Seize+0x45> 10a0c5: f7 c6 02 00 00 00 test $0x2,%esi 10a0cb: 74 0f je 10a0dc <_Event_Seize+0x54> <== NEVER TAKEN (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10a0cd: 89 d0 mov %edx,%eax 10a0cf: f7 d0 not %eax 10a0d1: 23 45 e0 and -0x20(%ebp),%eax 10a0d4: 89 07 mov %eax,(%edi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10a0d6: ff 75 e4 pushl -0x1c(%ebp) 10a0d9: 9d popf 10a0da: eb 13 jmp 10a0ef <_Event_Seize+0x67> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10a0dc: f7 c6 01 00 00 00 test $0x1,%esi 10a0e2: 74 12 je 10a0f6 <_Event_Seize+0x6e> _ISR_Enable( level ); 10a0e4: ff 75 e4 pushl -0x1c(%ebp) 10a0e7: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10a0e8: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10a0ef: 89 11 mov %edx,(%ecx) return; 10a0f1: e9 91 00 00 00 jmp 10a187 <_Event_Seize+0xff> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; 10a0f6: 89 73 30 mov %esi,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10a0f9: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10a0fc: 89 4b 28 mov %ecx,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10a0ff: c7 05 24 59 12 00 01 movl $0x1,0x125924 10a106: 00 00 00 _ISR_Enable( level ); 10a109: ff 75 e4 pushl -0x1c(%ebp) 10a10c: 9d popf if ( ticks ) { 10a10d: 83 7d dc 00 cmpl $0x0,-0x24(%ebp) 10a111: 74 34 je 10a147 <_Event_Seize+0xbf> _Watchdog_Initialize( 10a113: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a116: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10a11d: c7 43 64 c0 a2 10 00 movl $0x10a2c0,0x64(%ebx) the_watchdog->id = id; 10a124: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10a127: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a12e: 8b 45 dc mov -0x24(%ebp),%eax 10a131: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a134: 52 push %edx 10a135: 52 push %edx 10a136: 8d 43 48 lea 0x48(%ebx),%eax 10a139: 50 push %eax 10a13a: 68 6c 57 12 00 push $0x12576c 10a13f: e8 60 2e 00 00 call 10cfa4 <_Watchdog_Insert> 10a144: 83 c4 10 add $0x10,%esp NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10a147: 50 push %eax 10a148: 50 push %eax 10a149: 68 00 01 00 00 push $0x100 10a14e: 53 push %ebx 10a14f: e8 b4 28 00 00 call 10ca08 <_Thread_Set_state> _ISR_Disable( level ); 10a154: 9c pushf 10a155: fa cli 10a156: 5a pop %edx sync_state = _Event_Sync_state; 10a157: a1 24 59 12 00 mov 0x125924,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10a15c: c7 05 24 59 12 00 00 movl $0x0,0x125924 10a163: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10a166: 83 c4 10 add $0x10,%esp 10a169: 83 f8 01 cmp $0x1,%eax 10a16c: 75 04 jne 10a172 <_Event_Seize+0xea> _ISR_Enable( level ); 10a16e: 52 push %edx 10a16f: 9d popf 10a170: eb 15 jmp 10a187 <_Event_Seize+0xff> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a172: 89 55 10 mov %edx,0x10(%ebp) 10a175: 89 5d 0c mov %ebx,0xc(%ebp) 10a178: 89 45 08 mov %eax,0x8(%ebp) } 10a17b: 8d 65 f4 lea -0xc(%ebp),%esp 10a17e: 5b pop %ebx 10a17f: 5e pop %esi 10a180: 5f pop %edi 10a181: c9 leave * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 10a182: e9 c1 1b 00 00 jmp 10bd48 <_Thread_blocking_operation_Cancel> } 10a187: 8d 65 f4 lea -0xc(%ebp),%esp 10a18a: 5b pop %ebx 10a18b: 5e pop %esi 10a18c: 5f pop %edi 10a18d: c9 leave 10a18e: c3 ret =============================================================================== 0010a1dc <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10a1dc: 55 push %ebp 10a1dd: 89 e5 mov %esp,%ebp 10a1df: 57 push %edi 10a1e0: 56 push %esi 10a1e1: 53 push %ebx 10a1e2: 83 ec 2c sub $0x2c,%esp 10a1e5: 8b 5d 08 mov 0x8(%ebp),%ebx 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 ]; 10a1e8: 8b bb f0 00 00 00 mov 0xf0(%ebx),%edi option_set = (rtems_option) the_thread->Wait.option; 10a1ee: 8b 43 30 mov 0x30(%ebx),%eax 10a1f1: 89 45 e0 mov %eax,-0x20(%ebp) _ISR_Disable( level ); 10a1f4: 9c pushf 10a1f5: fa cli 10a1f6: 58 pop %eax pending_events = api->pending_events; 10a1f7: 8b 17 mov (%edi),%edx 10a1f9: 89 55 d4 mov %edx,-0x2c(%ebp) event_condition = (rtems_event_set) the_thread->Wait.count; 10a1fc: 8b 73 24 mov 0x24(%ebx),%esi seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 10a1ff: 21 f2 and %esi,%edx 10a201: 0f 84 ac 00 00 00 je 10a2b3 <_Event_Surrender+0xd7> /* * 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() && 10a207: 8b 0d 28 57 12 00 mov 0x125728,%ecx 10a20d: 85 c9 test %ecx,%ecx 10a20f: 74 47 je 10a258 <_Event_Surrender+0x7c> 10a211: 3b 1d 4c 57 12 00 cmp 0x12574c,%ebx 10a217: 75 3f jne 10a258 <_Event_Surrender+0x7c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 10a219: 8b 0d 24 59 12 00 mov 0x125924,%ecx /* * 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() && 10a21f: 83 f9 02 cmp $0x2,%ecx 10a222: 74 09 je 10a22d <_Event_Surrender+0x51> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10a224: 8b 0d 24 59 12 00 mov 0x125924,%ecx /* * 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() && 10a22a: 49 dec %ecx 10a22b: 75 2b jne 10a258 <_Event_Surrender+0x7c> _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) ) { 10a22d: 39 f2 cmp %esi,%edx 10a22f: 74 06 je 10a237 <_Event_Surrender+0x5b> 10a231: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a235: 74 7c je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10a237: 89 d6 mov %edx,%esi 10a239: f7 d6 not %esi 10a23b: 23 75 d4 and -0x2c(%ebp),%esi 10a23e: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a240: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a247: 8b 4b 28 mov 0x28(%ebx),%ecx 10a24a: 89 11 mov %edx,(%ecx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10a24c: c7 05 24 59 12 00 03 movl $0x3,0x125924 10a253: 00 00 00 10a256: eb 5b jmp 10a2b3 <_Event_Surrender+0xd7> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10a258: f6 43 11 01 testb $0x1,0x11(%ebx) 10a25c: 74 55 je 10a2b3 <_Event_Surrender+0xd7> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10a25e: 39 f2 cmp %esi,%edx 10a260: 74 06 je 10a268 <_Event_Surrender+0x8c> 10a262: f6 45 e0 02 testb $0x2,-0x20(%ebp) 10a266: 74 4b je 10a2b3 <_Event_Surrender+0xd7> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10a268: 89 d6 mov %edx,%esi 10a26a: f7 d6 not %esi 10a26c: 23 75 d4 and -0x2c(%ebp),%esi 10a26f: 89 37 mov %esi,(%edi) the_thread->Wait.count = 0; 10a271: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10a278: 8b 4b 28 mov 0x28(%ebx),%ecx 10a27b: 89 11 mov %edx,(%ecx) _ISR_Flash( level ); 10a27d: 50 push %eax 10a27e: 9d popf 10a27f: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10a280: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10a284: 74 06 je 10a28c <_Event_Surrender+0xb0> _ISR_Enable( level ); 10a286: 50 push %eax 10a287: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10a288: 51 push %ecx 10a289: 51 push %ecx 10a28a: eb 17 jmp 10a2a3 <_Event_Surrender+0xc7> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10a28c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10a293: 50 push %eax 10a294: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10a295: 83 ec 0c sub $0xc,%esp 10a298: 8d 43 48 lea 0x48(%ebx),%eax 10a29b: 50 push %eax 10a29c: e8 17 2e 00 00 call 10d0b8 <_Watchdog_Remove> 10a2a1: 58 pop %eax 10a2a2: 5a pop %edx 10a2a3: 68 f8 ff 03 10 push $0x1003fff8 10a2a8: 53 push %ebx 10a2a9: e8 06 1c 00 00 call 10beb4 <_Thread_Clear_state> 10a2ae: 83 c4 10 add $0x10,%esp 10a2b1: eb 02 jmp 10a2b5 <_Event_Surrender+0xd9> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10a2b3: 50 push %eax 10a2b4: 9d popf } 10a2b5: 8d 65 f4 lea -0xc(%ebp),%esp 10a2b8: 5b pop %ebx 10a2b9: 5e pop %esi 10a2ba: 5f pop %edi 10a2bb: c9 leave 10a2bc: c3 ret =============================================================================== 0010a2c0 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10a2c0: 55 push %ebp 10a2c1: 89 e5 mov %esp,%ebp 10a2c3: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10a2c6: 8d 45 f4 lea -0xc(%ebp),%eax 10a2c9: 50 push %eax 10a2ca: ff 75 08 pushl 0x8(%ebp) 10a2cd: e8 82 1f 00 00 call 10c254 <_Thread_Get> switch ( location ) { 10a2d2: 83 c4 10 add $0x10,%esp 10a2d5: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10a2d9: 75 49 jne 10a324 <_Event_Timeout+0x64> <== 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 ); 10a2db: 9c pushf 10a2dc: fa cli 10a2dd: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10a2de: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10a2e5: 3b 05 4c 57 12 00 cmp 0x12574c,%eax 10a2eb: 75 13 jne 10a300 <_Event_Timeout+0x40> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 10a2ed: 8b 0d 24 59 12 00 mov 0x125924,%ecx 10a2f3: 49 dec %ecx 10a2f4: 75 0a jne 10a300 <_Event_Timeout+0x40> <== ALWAYS TAKEN _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10a2f6: c7 05 24 59 12 00 02 movl $0x2,0x125924 <== NOT EXECUTED 10a2fd: 00 00 00 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 10a300: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10a307: 52 push %edx 10a308: 9d popf 10a309: 52 push %edx 10a30a: 52 push %edx 10a30b: 68 f8 ff 03 10 push $0x1003fff8 10a310: 50 push %eax 10a311: e8 9e 1b 00 00 call 10beb4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10a316: a1 90 56 12 00 mov 0x125690,%eax 10a31b: 48 dec %eax 10a31c: a3 90 56 12 00 mov %eax,0x125690 10a321: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10a324: c9 leave 10a325: c3 ret =============================================================================== 00100248 <_Extension_Manager_initialization>: #include #include #include void _Extension_Manager_initialization(void) { 100248: 55 push %ebp 100249: 89 e5 mov %esp,%ebp } 10024b: c9 leave 10024c: c3 ret =============================================================================== 0010f8ac <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 10f8ac: 55 push %ebp 10f8ad: 89 e5 mov %esp,%ebp 10f8af: 57 push %edi 10f8b0: 56 push %esi 10f8b1: 53 push %ebx 10f8b2: 83 ec 2c sub $0x2c,%esp 10f8b5: 8b 75 08 mov 0x8(%ebp),%esi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10f8b8: 8b 4e 08 mov 0x8(%esi),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 10f8bb: 8b 46 10 mov 0x10(%esi),%eax 10f8be: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 10f8c1: 8b 45 0c mov 0xc(%ebp),%eax 10f8c4: 83 c0 04 add $0x4,%eax 10f8c7: 89 45 cc mov %eax,-0x34(%ebp) 10f8ca: 0f 82 2f 01 00 00 jb 10f9ff <_Heap_Allocate_aligned_with_boundary+0x153> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 10f8d0: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f8d4: 74 18 je 10f8ee <_Heap_Allocate_aligned_with_boundary+0x42> if ( boundary < alloc_size ) { 10f8d6: 8b 45 0c mov 0xc(%ebp),%eax 10f8d9: 39 45 14 cmp %eax,0x14(%ebp) 10f8dc: 0f 82 1d 01 00 00 jb 10f9ff <_Heap_Allocate_aligned_with_boundary+0x153> return NULL; } if ( alignment == 0 ) { 10f8e2: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f8e6: 75 06 jne 10f8ee <_Heap_Allocate_aligned_with_boundary+0x42> 10f8e8: 8b 45 e0 mov -0x20(%ebp),%eax 10f8eb: 89 45 10 mov %eax,0x10(%ebp) 10f8ee: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 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 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 10f8f5: 8b 45 e0 mov -0x20(%ebp),%eax 10f8f8: 83 c0 07 add $0x7,%eax 10f8fb: 89 45 c8 mov %eax,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f8fe: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 10f905: 8b 45 0c mov 0xc(%ebp),%eax 10f908: 29 45 d8 sub %eax,-0x28(%ebp) 10f90b: 89 f7 mov %esi,%edi 10f90d: e9 ba 00 00 00 jmp 10f9cc <_Heap_Allocate_aligned_with_boundary+0x120> while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 10f912: ff 45 e4 incl -0x1c(%ebp) /* * 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 ) { 10f915: 8b 59 04 mov 0x4(%ecx),%ebx 10f918: 3b 5d cc cmp -0x34(%ebp),%ebx 10f91b: 0f 86 a8 00 00 00 jbe 10f9c9 <_Heap_Allocate_aligned_with_boundary+0x11d> if ( alignment == 0 ) { 10f921: 83 7d 10 00 cmpl $0x0,0x10(%ebp) 10f925: 8d 41 08 lea 0x8(%ecx),%eax 10f928: 89 45 dc mov %eax,-0x24(%ebp) 10f92b: 75 07 jne 10f934 <_Heap_Allocate_aligned_with_boundary+0x88> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10f92d: 89 c3 mov %eax,%ebx 10f92f: e9 91 00 00 00 jmp 10f9c5 <_Heap_Allocate_aligned_with_boundary+0x119> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 10f934: 8b 47 14 mov 0x14(%edi),%eax 10f937: 89 45 d4 mov %eax,-0x2c(%ebp) 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; 10f93a: 83 e3 fe and $0xfffffffe,%ebx 10f93d: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 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; 10f940: 8b 75 c8 mov -0x38(%ebp),%esi 10f943: 29 c6 sub %eax,%esi 10f945: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 10f947: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 10f94a: 89 d8 mov %ebx,%eax 10f94c: 31 d2 xor %edx,%edx 10f94e: f7 75 10 divl 0x10(%ebp) 10f951: 29 d3 sub %edx,%ebx 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 ) { 10f953: 39 f3 cmp %esi,%ebx 10f955: 76 0b jbe 10f962 <_Heap_Allocate_aligned_with_boundary+0xb6> 10f957: 89 f0 mov %esi,%eax 10f959: 31 d2 xor %edx,%edx 10f95b: f7 75 10 divl 0x10(%ebp) 10f95e: 89 f3 mov %esi,%ebx 10f960: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 10f962: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 10f966: 74 3f je 10f9a7 <_Heap_Allocate_aligned_with_boundary+0xfb> /* 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; 10f968: 8b 45 0c mov 0xc(%ebp),%eax 10f96b: 8d 34 03 lea (%ebx,%eax,1),%esi /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 10f96e: 8b 45 dc mov -0x24(%ebp),%eax 10f971: 03 45 0c add 0xc(%ebp),%eax 10f974: 89 45 d0 mov %eax,-0x30(%ebp) 10f977: eb 19 jmp 10f992 <_Heap_Allocate_aligned_with_boundary+0xe6> uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 10f979: 3b 55 d0 cmp -0x30(%ebp),%edx 10f97c: 72 4b jb 10f9c9 <_Heap_Allocate_aligned_with_boundary+0x11d> return 0; } alloc_begin = boundary_line - alloc_size; 10f97e: 89 d3 mov %edx,%ebx 10f980: 2b 5d 0c sub 0xc(%ebp),%ebx 10f983: 89 d8 mov %ebx,%eax 10f985: 31 d2 xor %edx,%edx 10f987: f7 75 10 divl 0x10(%ebp) 10f98a: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 10f98c: 8b 45 0c mov 0xc(%ebp),%eax 10f98f: 8d 34 03 lea (%ebx,%eax,1),%esi 10f992: 89 f0 mov %esi,%eax 10f994: 31 d2 xor %edx,%edx 10f996: f7 75 14 divl 0x14(%ebp) 10f999: 89 f0 mov %esi,%eax 10f99b: 29 d0 sub %edx,%eax 10f99d: 89 c2 mov %eax,%edx /* 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 ) { 10f99f: 39 f0 cmp %esi,%eax 10f9a1: 73 04 jae 10f9a7 <_Heap_Allocate_aligned_with_boundary+0xfb> 10f9a3: 39 c3 cmp %eax,%ebx 10f9a5: 72 d2 jb 10f979 <_Heap_Allocate_aligned_with_boundary+0xcd> 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 ) { 10f9a7: 3b 5d dc cmp -0x24(%ebp),%ebx 10f9aa: 72 1d jb 10f9c9 <_Heap_Allocate_aligned_with_boundary+0x11d> 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; 10f9ac: be f8 ff ff ff mov $0xfffffff8,%esi 10f9b1: 29 ce sub %ecx,%esi 10f9b3: 01 de add %ebx,%esi 10f9b5: 89 d8 mov %ebx,%eax 10f9b7: 31 d2 xor %edx,%edx 10f9b9: f7 75 e0 divl -0x20(%ebp) if ( free_size >= min_block_size || free_size == 0 ) { 10f9bc: 29 d6 sub %edx,%esi 10f9be: 74 05 je 10f9c5 <_Heap_Allocate_aligned_with_boundary+0x119> 10f9c0: 3b 75 d4 cmp -0x2c(%ebp),%esi 10f9c3: 72 04 jb 10f9c9 <_Heap_Allocate_aligned_with_boundary+0x11d> boundary ); } } if ( alloc_begin != 0 ) { 10f9c5: 85 db test %ebx,%ebx 10f9c7: 75 11 jne 10f9da <_Heap_Allocate_aligned_with_boundary+0x12e><== ALWAYS TAKEN break; } block = block->next; 10f9c9: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 10f9cc: 39 f9 cmp %edi,%ecx 10f9ce: 0f 85 3e ff ff ff jne 10f912 <_Heap_Allocate_aligned_with_boundary+0x66> 10f9d4: 89 fe mov %edi,%esi 10f9d6: 31 db xor %ebx,%ebx 10f9d8: eb 16 jmp 10f9f0 <_Heap_Allocate_aligned_with_boundary+0x144> 10f9da: 89 fe mov %edi,%esi block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 10f9dc: 8b 45 e4 mov -0x1c(%ebp),%eax 10f9df: 01 47 4c add %eax,0x4c(%edi) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 10f9e2: ff 75 0c pushl 0xc(%ebp) 10f9e5: 53 push %ebx 10f9e6: 51 push %ecx 10f9e7: 57 push %edi 10f9e8: e8 f7 ba ff ff call 10b4e4 <_Heap_Block_allocate> 10f9ed: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 10f9f0: 8b 45 e4 mov -0x1c(%ebp),%eax 10f9f3: 39 46 44 cmp %eax,0x44(%esi) 10f9f6: 73 03 jae 10f9fb <_Heap_Allocate_aligned_with_boundary+0x14f> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 10f9f8: 89 46 44 mov %eax,0x44(%esi) } return (void *) alloc_begin; 10f9fb: 89 d8 mov %ebx,%eax 10f9fd: eb 02 jmp 10fa01 <_Heap_Allocate_aligned_with_boundary+0x155> 10f9ff: 31 c0 xor %eax,%eax } 10fa01: 8d 65 f4 lea -0xc(%ebp),%esp 10fa04: 5b pop %ebx 10fa05: 5e pop %esi 10fa06: 5f pop %edi 10fa07: c9 leave 10fa08: c3 ret =============================================================================== 00112d04 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 112d04: 55 push %ebp 112d05: 89 e5 mov %esp,%ebp 112d07: 56 push %esi 112d08: 53 push %ebx 112d09: 8b 4d 08 mov 0x8(%ebp),%ecx 112d0c: 8b 55 0c mov 0xc(%ebp),%edx Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 112d0f: 8b 71 1c mov 0x1c(%ecx),%esi uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 112d12: 8b 59 24 mov 0x24(%ecx),%ebx * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 112d15: 39 f2 cmp %esi,%edx 112d17: 73 0a jae 112d23 <_Heap_Extend+0x1f> uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 112d19: b8 01 00 00 00 mov $0x1,%eax 112d1e: 3b 51 18 cmp 0x18(%ecx),%edx 112d21: 73 5f jae 112d82 <_Heap_Extend+0x7e> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 112d23: b8 02 00 00 00 mov $0x2,%eax 112d28: 39 f2 cmp %esi,%edx 112d2a: 75 56 jne 112d82 <_Heap_Extend+0x7e> { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 112d2c: 03 55 10 add 0x10(%ebp),%edx * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 112d2f: 89 51 1c mov %edx,0x1c(%ecx) extend_size = new_heap_area_end 112d32: 29 da sub %ebx,%edx 112d34: 8d 72 f8 lea -0x8(%edx),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 112d37: 89 f0 mov %esi,%eax 112d39: 31 d2 xor %edx,%edx 112d3b: f7 71 10 divl 0x10(%ecx) 112d3e: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 112d40: 8b 45 14 mov 0x14(%ebp),%eax 112d43: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 112d45: 31 c0 xor %eax,%eax 112d47: 3b 71 14 cmp 0x14(%ecx),%esi 112d4a: 72 36 jb 112d82 <_Heap_Extend+0x7e> <== NEVER TAKEN RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 112d4c: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 112d4f: 8b 43 04 mov 0x4(%ebx),%eax 112d52: 83 e0 01 and $0x1,%eax 112d55: 09 f0 or %esi,%eax 112d57: 89 43 04 mov %eax,0x4(%ebx) Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 112d5a: 8b 41 20 mov 0x20(%ecx),%eax 112d5d: 29 d0 sub %edx,%eax 112d5f: 83 c8 01 or $0x1,%eax 112d62: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 112d65: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 112d68: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 112d6b: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 112d6e: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 112d71: 50 push %eax 112d72: 50 push %eax 112d73: 83 c3 08 add $0x8,%ebx 112d76: 53 push %ebx 112d77: 51 push %ecx 112d78: e8 67 b1 ff ff call 10dee4 <_Heap_Free> 112d7d: 31 c0 xor %eax,%eax 112d7f: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 112d82: 8d 65 f8 lea -0x8(%ebp),%esp 112d85: 5b pop %ebx 112d86: 5e pop %esi 112d87: c9 leave 112d88: c3 ret =============================================================================== 0010fa0c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 10fa0c: 55 push %ebp 10fa0d: 89 e5 mov %esp,%ebp 10fa0f: 57 push %edi 10fa10: 56 push %esi 10fa11: 53 push %ebx 10fa12: 83 ec 14 sub $0x14,%esp 10fa15: 8b 4d 08 mov 0x8(%ebp),%ecx 10fa18: 8b 45 0c mov 0xc(%ebp),%eax 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 ) 10fa1b: 8d 58 f8 lea -0x8(%eax),%ebx 10fa1e: 31 d2 xor %edx,%edx 10fa20: f7 71 10 divl 0x10(%ecx) 10fa23: 29 d3 sub %edx,%ebx 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; 10fa25: 8b 41 20 mov 0x20(%ecx),%eax 10fa28: 89 45 f0 mov %eax,-0x10(%ebp) 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 10fa2b: 31 c0 xor %eax,%eax 10fa2d: 3b 5d f0 cmp -0x10(%ebp),%ebx 10fa30: 72 08 jb 10fa3a <_Heap_Free+0x2e> 10fa32: 31 c0 xor %eax,%eax 10fa34: 39 59 24 cmp %ebx,0x24(%ecx) 10fa37: 0f 93 c0 setae %al Heap_Block *next_block = NULL; uintptr_t block_size = 0; uintptr_t next_block_size = 0; bool next_is_free = false; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 10fa3a: 85 c0 test %eax,%eax 10fa3c: 0f 84 2d 01 00 00 je 10fb6f <_Heap_Free+0x163> - 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; 10fa42: 8b 7b 04 mov 0x4(%ebx),%edi 10fa45: 89 fa mov %edi,%edx 10fa47: 83 e2 fe and $0xfffffffe,%edx 10fa4a: 89 55 e0 mov %edx,-0x20(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10fa4d: 8d 04 13 lea (%ebx,%edx,1),%eax 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 10fa50: 31 f6 xor %esi,%esi 10fa52: 3b 45 f0 cmp -0x10(%ebp),%eax 10fa55: 72 0e jb 10fa65 <_Heap_Free+0x59> <== NEVER TAKEN 10fa57: 39 41 24 cmp %eax,0x24(%ecx) 10fa5a: 0f 93 c2 setae %dl 10fa5d: 89 d6 mov %edx,%esi 10fa5f: 81 e6 ff 00 00 00 and $0xff,%esi } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10fa65: 85 f6 test %esi,%esi 10fa67: 0f 84 02 01 00 00 je 10fb6f <_Heap_Free+0x163> <== 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; 10fa6d: 8b 70 04 mov 0x4(%eax),%esi _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10fa70: f7 c6 01 00 00 00 test $0x1,%esi 10fa76: 0f 84 f3 00 00 00 je 10fb6f <_Heap_Free+0x163> <== 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; 10fa7c: 83 e6 fe and $0xfffffffe,%esi 10fa7f: 89 75 e8 mov %esi,-0x18(%ebp) return false; } 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 )); 10fa82: 8b 51 24 mov 0x24(%ecx),%edx 10fa85: 89 55 e4 mov %edx,-0x1c(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 10fa88: 31 f6 xor %esi,%esi 10fa8a: 39 d0 cmp %edx,%eax 10fa8c: 74 0d je 10fa9b <_Heap_Free+0x8f> 10fa8e: 8b 55 e8 mov -0x18(%ebp),%edx 10fa91: 8b 74 10 04 mov 0x4(%eax,%edx,1),%esi 10fa95: 83 e6 01 and $0x1,%esi 10fa98: 83 f6 01 xor $0x1,%esi && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 10fa9b: 83 e7 01 and $0x1,%edi 10fa9e: 75 64 jne 10fb04 <_Heap_Free+0xf8> uintptr_t const prev_size = block->prev_size; 10faa0: 8b 13 mov (%ebx),%edx 10faa2: 89 55 ec mov %edx,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10faa5: 29 d3 sub %edx,%ebx 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 10faa7: 31 ff xor %edi,%edi 10faa9: 3b 5d f0 cmp -0x10(%ebp),%ebx 10faac: 72 0e jb 10fabc <_Heap_Free+0xb0> <== NEVER TAKEN 10faae: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10fab1: 0f 93 c2 setae %dl 10fab4: 89 d7 mov %edx,%edi 10fab6: 81 e7 ff 00 00 00 and $0xff,%edi Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { 10fabc: 85 ff test %edi,%edi 10fabe: 0f 84 ab 00 00 00 je 10fb6f <_Heap_Free+0x163> <== NEVER TAKEN 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) ) { 10fac4: f6 43 04 01 testb $0x1,0x4(%ebx) 10fac8: 0f 84 a1 00 00 00 je 10fb6f <_Heap_Free+0x163> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 10face: 89 f2 mov %esi,%edx 10fad0: 84 d2 test %dl,%dl 10fad2: 74 1a je 10faee <_Heap_Free+0xe2> uintptr_t const size = block_size + prev_size + next_block_size; 10fad4: 8b 75 e0 mov -0x20(%ebp),%esi 10fad7: 03 75 e8 add -0x18(%ebp),%esi 10fada: 03 75 ec add -0x14(%ebp),%esi return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10fadd: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = block->prev; 10fae0: 8b 40 0c mov 0xc(%eax),%eax prev->next = next; 10fae3: 89 78 08 mov %edi,0x8(%eax) next->prev = prev; 10fae6: 89 47 0c mov %eax,0xc(%edi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 10fae9: ff 49 38 decl 0x38(%ecx) 10faec: eb 34 jmp 10fb22 <_Heap_Free+0x116> 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; 10faee: 8b 75 e0 mov -0x20(%ebp),%esi 10faf1: 03 75 ec add -0x14(%ebp),%esi prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10faf4: 89 f7 mov %esi,%edi 10faf6: 83 cf 01 or $0x1,%edi 10faf9: 89 7b 04 mov %edi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fafc: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = size; 10fb00: 89 30 mov %esi,(%eax) 10fb02: eb 5b jmp 10fb5f <_Heap_Free+0x153> } } else if ( next_is_free ) { /* coalesce next */ 10fb04: 89 f2 mov %esi,%edx 10fb06: 84 d2 test %dl,%dl 10fb08: 74 25 je 10fb2f <_Heap_Free+0x123> uintptr_t const size = block_size + next_block_size; 10fb0a: 8b 75 e8 mov -0x18(%ebp),%esi 10fb0d: 03 75 e0 add -0x20(%ebp),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10fb10: 8b 78 08 mov 0x8(%eax),%edi Heap_Block *prev = old_block->prev; 10fb13: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10fb16: 89 7b 08 mov %edi,0x8(%ebx) new_block->prev = prev; 10fb19: 89 43 0c mov %eax,0xc(%ebx) next->prev = new_block; 10fb1c: 89 5f 0c mov %ebx,0xc(%edi) prev->next = new_block; 10fb1f: 89 58 08 mov %ebx,0x8(%eax) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 10fb22: 89 f0 mov %esi,%eax 10fb24: 83 c8 01 or $0x1,%eax 10fb27: 89 43 04 mov %eax,0x4(%ebx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 10fb2a: 89 34 33 mov %esi,(%ebx,%esi,1) 10fb2d: eb 30 jmp 10fb5f <_Heap_Free+0x153> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10fb2f: 8b 71 08 mov 0x8(%ecx),%esi new_block->next = next; 10fb32: 89 73 08 mov %esi,0x8(%ebx) new_block->prev = block_before; 10fb35: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10fb38: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10fb3b: 89 5e 0c mov %ebx,0xc(%esi) } 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; 10fb3e: 8b 75 e0 mov -0x20(%ebp),%esi 10fb41: 83 ce 01 or $0x1,%esi 10fb44: 89 73 04 mov %esi,0x4(%ebx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10fb47: 83 60 04 fe andl $0xfffffffe,0x4(%eax) next_block->prev_size = block_size; 10fb4b: 8b 55 e0 mov -0x20(%ebp),%edx 10fb4e: 89 10 mov %edx,(%eax) /* Statistics */ ++stats->free_blocks; 10fb50: 8b 41 38 mov 0x38(%ecx),%eax 10fb53: 40 inc %eax 10fb54: 89 41 38 mov %eax,0x38(%ecx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 10fb57: 39 41 3c cmp %eax,0x3c(%ecx) 10fb5a: 73 03 jae 10fb5f <_Heap_Free+0x153> 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; 10fb5c: 89 41 3c mov %eax,0x3c(%ecx) } } /* Statistics */ --stats->used_blocks; 10fb5f: ff 49 40 decl 0x40(%ecx) ++stats->frees; 10fb62: ff 41 50 incl 0x50(%ecx) stats->free_size += block_size; 10fb65: 8b 45 e0 mov -0x20(%ebp),%eax 10fb68: 01 41 30 add %eax,0x30(%ecx) 10fb6b: b0 01 mov $0x1,%al return( true ); 10fb6d: eb 02 jmp 10fb71 <_Heap_Free+0x165> 10fb6f: 31 c0 xor %eax,%eax } 10fb71: 83 c4 14 add $0x14,%esp 10fb74: 5b pop %ebx 10fb75: 5e pop %esi 10fb76: 5f pop %edi 10fb77: c9 leave 10fb78: c3 ret =============================================================================== 0011d494 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 11d494: 55 push %ebp 11d495: 89 e5 mov %esp,%ebp 11d497: 56 push %esi 11d498: 53 push %ebx 11d499: 8b 5d 08 mov 0x8(%ebp),%ebx 11d49c: 8b 75 0c mov 0xc(%ebp),%esi 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 ) 11d49f: 8d 4e f8 lea -0x8(%esi),%ecx 11d4a2: 89 f0 mov %esi,%eax 11d4a4: 31 d2 xor %edx,%edx 11d4a6: f7 73 10 divl 0x10(%ebx) 11d4a9: 29 d1 sub %edx,%ecx 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; 11d4ab: 8b 53 20 mov 0x20(%ebx),%edx 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 11d4ae: 31 c0 xor %eax,%eax 11d4b0: 39 d1 cmp %edx,%ecx 11d4b2: 72 08 jb 11d4bc <_Heap_Size_of_alloc_area+0x28> 11d4b4: 31 c0 xor %eax,%eax 11d4b6: 39 4b 24 cmp %ecx,0x24(%ebx) 11d4b9: 0f 93 c0 setae %al uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { 11d4bc: 85 c0 test %eax,%eax 11d4be: 74 2e je 11d4ee <_Heap_Size_of_alloc_area+0x5a> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 11d4c0: 8b 41 04 mov 0x4(%ecx),%eax 11d4c3: 83 e0 fe and $0xfffffffe,%eax 11d4c6: 01 c1 add %eax,%ecx 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 11d4c8: 31 c0 xor %eax,%eax 11d4ca: 39 d1 cmp %edx,%ecx 11d4cc: 72 08 jb 11d4d6 <_Heap_Size_of_alloc_area+0x42><== NEVER TAKEN 11d4ce: 31 c0 xor %eax,%eax 11d4d0: 39 4b 24 cmp %ecx,0x24(%ebx) 11d4d3: 0f 93 c0 setae %al } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 11d4d6: 85 c0 test %eax,%eax 11d4d8: 74 14 je 11d4ee <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN 11d4da: f6 41 04 01 testb $0x1,0x4(%ecx) 11d4de: 74 0e je 11d4ee <_Heap_Size_of_alloc_area+0x5a><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 11d4e0: 29 f1 sub %esi,%ecx 11d4e2: 8d 51 04 lea 0x4(%ecx),%edx 11d4e5: 8b 45 10 mov 0x10(%ebp),%eax 11d4e8: 89 10 mov %edx,(%eax) 11d4ea: b0 01 mov $0x1,%al return true; 11d4ec: eb 02 jmp 11d4f0 <_Heap_Size_of_alloc_area+0x5c> 11d4ee: 31 c0 xor %eax,%eax } 11d4f0: 5b pop %ebx 11d4f1: 5e pop %esi 11d4f2: c9 leave 11d4f3: c3 ret =============================================================================== 0010bfb9 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10bfb9: 55 push %ebp 10bfba: 89 e5 mov %esp,%ebp 10bfbc: 57 push %edi 10bfbd: 56 push %esi 10bfbe: 53 push %ebx 10bfbf: 83 ec 4c sub $0x4c,%esp 10bfc2: 8b 7d 08 mov 0x8(%ebp),%edi 10bfc5: 8b 75 0c mov 0xc(%ebp),%esi uintptr_t const page_size = heap->page_size; 10bfc8: 8b 4f 10 mov 0x10(%edi),%ecx uintptr_t const min_block_size = heap->min_block_size; 10bfcb: 8b 47 14 mov 0x14(%edi),%eax 10bfce: 89 45 dc mov %eax,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10bfd1: 8b 57 24 mov 0x24(%edi),%edx 10bfd4: 89 55 d0 mov %edx,-0x30(%ebp) Heap_Block *block = heap->first_block; 10bfd7: 8b 5f 20 mov 0x20(%edi),%ebx Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10bfda: c7 45 e4 cb c2 10 00 movl $0x10c2cb,-0x1c(%ebp) 10bfe1: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10bfe5: 75 07 jne 10bfee <_Heap_Walk+0x35> 10bfe7: c7 45 e4 b4 bf 10 00 movl $0x10bfb4,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10bfee: 83 3d 90 73 12 00 03 cmpl $0x3,0x127390 10bff5: 0f 85 c6 02 00 00 jne 10c2c1 <_Heap_Walk+0x308> <== NEVER TAKEN 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)( 10bffb: 50 push %eax 10bffc: ff 77 0c pushl 0xc(%edi) 10bfff: ff 77 08 pushl 0x8(%edi) 10c002: ff 75 d0 pushl -0x30(%ebp) 10c005: 53 push %ebx 10c006: ff 77 1c pushl 0x1c(%edi) 10c009: ff 77 18 pushl 0x18(%edi) 10c00c: ff 75 dc pushl -0x24(%ebp) 10c00f: 51 push %ecx 10c010: 68 b4 01 12 00 push $0x1201b4 10c015: 6a 00 push $0x0 10c017: 56 push %esi 10c018: 89 4d bc mov %ecx,-0x44(%ebp) 10c01b: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10c01e: 83 c4 30 add $0x30,%esp 10c021: 8b 4d bc mov -0x44(%ebp),%ecx 10c024: 85 c9 test %ecx,%ecx 10c026: 75 0b jne 10c033 <_Heap_Walk+0x7a> (*printer)( source, true, "page size is zero\n" ); 10c028: 53 push %ebx 10c029: 68 45 02 12 00 push $0x120245 10c02e: e9 5b 02 00 00 jmp 10c28e <_Heap_Walk+0x2d5> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10c033: f6 c1 03 test $0x3,%cl 10c036: 74 0b je 10c043 <_Heap_Walk+0x8a> (*printer)( 10c038: 51 push %ecx 10c039: 68 58 02 12 00 push $0x120258 10c03e: e9 4b 02 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10c043: 8b 45 dc mov -0x24(%ebp),%eax 10c046: 31 d2 xor %edx,%edx 10c048: f7 f1 div %ecx 10c04a: 85 d2 test %edx,%edx 10c04c: 74 0d je 10c05b <_Heap_Walk+0xa2> (*printer)( 10c04e: ff 75 dc pushl -0x24(%ebp) 10c051: 68 76 02 12 00 push $0x120276 10c056: e9 33 02 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( 10c05b: 8d 43 08 lea 0x8(%ebx),%eax 10c05e: 31 d2 xor %edx,%edx 10c060: f7 f1 div %ecx 10c062: 85 d2 test %edx,%edx 10c064: 74 0b je 10c071 <_Heap_Walk+0xb8> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10c066: 53 push %ebx 10c067: 68 9a 02 12 00 push $0x12029a 10c06c: e9 1d 02 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10c071: f6 43 04 01 testb $0x1,0x4(%ebx) 10c075: 75 0b jne 10c082 <_Heap_Walk+0xc9> (*printer)( 10c077: 51 push %ecx 10c078: 68 cb 02 12 00 push $0x1202cb 10c07d: e9 0c 02 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( first_block->prev_size != page_size ) { 10c082: 8b 03 mov (%ebx),%eax 10c084: 89 45 d4 mov %eax,-0x2c(%ebp) 10c087: 39 c8 cmp %ecx,%eax 10c089: 74 0f je 10c09a <_Heap_Walk+0xe1> (*printer)( 10c08b: 83 ec 0c sub $0xc,%esp 10c08e: 51 push %ecx 10c08f: 50 push %eax 10c090: 68 f9 02 12 00 push $0x1202f9 10c095: e9 3d 01 00 00 jmp 10c1d7 <_Heap_Walk+0x21e> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10c09a: 8b 55 d0 mov -0x30(%ebp),%edx 10c09d: 8b 42 04 mov 0x4(%edx),%eax 10c0a0: 83 e0 fe and $0xfffffffe,%eax 10c0a3: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10c0a8: 75 0b jne 10c0b5 <_Heap_Walk+0xfc> (*printer)( 10c0aa: 52 push %edx 10c0ab: 68 24 03 12 00 push $0x120324 10c0b0: e9 d9 01 00 00 jmp 10c28e <_Heap_Walk+0x2d5> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10c0b5: 8b 4f 10 mov 0x10(%edi),%ecx 10c0b8: 89 4d d8 mov %ecx,-0x28(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c0bb: 8b 4f 08 mov 0x8(%edi),%ecx 10c0be: 89 7d e0 mov %edi,-0x20(%ebp) 10c0c1: eb 6a jmp 10c12d <_Heap_Walk+0x174> 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 10c0c3: 31 c0 xor %eax,%eax 10c0c5: 39 4f 20 cmp %ecx,0x20(%edi) 10c0c8: 77 08 ja 10c0d2 <_Heap_Walk+0x119> 10c0ca: 31 c0 xor %eax,%eax 10c0cc: 39 4f 24 cmp %ecx,0x24(%edi) 10c0cf: 0f 93 c0 setae %al const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 10c0d2: 85 c0 test %eax,%eax 10c0d4: 75 0b jne 10c0e1 <_Heap_Walk+0x128> (*printer)( 10c0d6: 51 push %ecx 10c0d7: 68 39 03 12 00 push $0x120339 10c0dc: e9 ad 01 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( 10c0e1: 8d 41 08 lea 0x8(%ecx),%eax 10c0e4: 31 d2 xor %edx,%edx 10c0e6: f7 75 d8 divl -0x28(%ebp) 10c0e9: 85 d2 test %edx,%edx 10c0eb: 74 0b je 10c0f8 <_Heap_Walk+0x13f> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10c0ed: 51 push %ecx 10c0ee: 68 59 03 12 00 push $0x120359 10c0f3: e9 96 01 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10c0f8: 8b 41 04 mov 0x4(%ecx),%eax 10c0fb: 83 e0 fe and $0xfffffffe,%eax 10c0fe: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10c103: 74 0b je 10c110 <_Heap_Walk+0x157> (*printer)( 10c105: 51 push %ecx 10c106: 68 89 03 12 00 push $0x120389 10c10b: e9 7e 01 00 00 jmp 10c28e <_Heap_Walk+0x2d5> ); return false; } if ( free_block->prev != prev_block ) { 10c110: 8b 41 0c mov 0xc(%ecx),%eax 10c113: 3b 45 e0 cmp -0x20(%ebp),%eax 10c116: 74 0f je 10c127 <_Heap_Walk+0x16e> (*printer)( 10c118: 83 ec 0c sub $0xc,%esp 10c11b: 50 push %eax 10c11c: 51 push %ecx 10c11d: 68 a5 03 12 00 push $0x1203a5 10c122: e9 b0 00 00 00 jmp 10c1d7 <_Heap_Walk+0x21e> return false; } prev_block = free_block; free_block = free_block->next; 10c127: 89 4d e0 mov %ecx,-0x20(%ebp) 10c12a: 8b 49 08 mov 0x8(%ecx),%ecx 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 ) { 10c12d: 39 f9 cmp %edi,%ecx 10c12f: 75 92 jne 10c0c3 <_Heap_Walk+0x10a> 10c131: 89 75 e0 mov %esi,-0x20(%ebp) 10c134: e9 7f 01 00 00 jmp 10c2b8 <_Heap_Walk+0x2ff> - 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; 10c139: 8b 43 04 mov 0x4(%ebx),%eax 10c13c: 89 c1 mov %eax,%ecx 10c13e: 83 e1 fe and $0xfffffffe,%ecx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c141: 8d 34 0b lea (%ebx,%ecx,1),%esi 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; if ( prev_used ) { 10c144: a8 01 test $0x1,%al 10c146: 74 0c je 10c154 <_Heap_Walk+0x19b> (*printer)( 10c148: 83 ec 0c sub $0xc,%esp 10c14b: 51 push %ecx 10c14c: 53 push %ebx 10c14d: 68 d7 03 12 00 push $0x1203d7 10c152: eb 0b jmp 10c15f <_Heap_Walk+0x1a6> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10c154: 50 push %eax 10c155: 50 push %eax 10c156: ff 33 pushl (%ebx) 10c158: 51 push %ecx 10c159: 53 push %ebx 10c15a: 68 ee 03 12 00 push $0x1203ee 10c15f: 6a 00 push $0x0 10c161: ff 75 e0 pushl -0x20(%ebp) 10c164: 89 4d bc mov %ecx,-0x44(%ebp) 10c167: ff 55 e4 call *-0x1c(%ebp) 10c16a: 83 c4 20 add $0x20,%esp 10c16d: 8b 4d bc mov -0x44(%ebp),%ecx 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 10c170: 31 c0 xor %eax,%eax 10c172: 39 77 20 cmp %esi,0x20(%edi) 10c175: 77 08 ja 10c17f <_Heap_Walk+0x1c6> <== NEVER TAKEN 10c177: 31 c0 xor %eax,%eax 10c179: 39 77 24 cmp %esi,0x24(%edi) 10c17c: 0f 93 c0 setae %al block_size, block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 10c17f: 85 c0 test %eax,%eax 10c181: 75 11 jne 10c194 <_Heap_Walk+0x1db> 10c183: 89 f1 mov %esi,%ecx 10c185: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c188: 83 ec 0c sub $0xc,%esp 10c18b: 51 push %ecx 10c18c: 53 push %ebx 10c18d: 68 13 04 12 00 push $0x120413 10c192: eb 43 jmp 10c1d7 <_Heap_Walk+0x21e> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10c194: 89 c8 mov %ecx,%eax 10c196: 31 d2 xor %edx,%edx 10c198: f7 75 d4 divl -0x2c(%ebp) 10c19b: 85 d2 test %edx,%edx 10c19d: 74 0f je 10c1ae <_Heap_Walk+0x1f5> 10c19f: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1a2: 83 ec 0c sub $0xc,%esp 10c1a5: 51 push %ecx 10c1a6: 53 push %ebx 10c1a7: 68 40 04 12 00 push $0x120440 10c1ac: eb 29 jmp 10c1d7 <_Heap_Walk+0x21e> ); return false; } if ( block_size < min_block_size ) { 10c1ae: 3b 4d dc cmp -0x24(%ebp),%ecx 10c1b1: 73 11 jae 10c1c4 <_Heap_Walk+0x20b> 10c1b3: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1b6: 57 push %edi 10c1b7: 57 push %edi 10c1b8: ff 75 dc pushl -0x24(%ebp) 10c1bb: 51 push %ecx 10c1bc: 53 push %ebx 10c1bd: 68 6e 04 12 00 push $0x12046e 10c1c2: eb 13 jmp 10c1d7 <_Heap_Walk+0x21e> ); return false; } if ( next_block_begin <= block_begin ) { 10c1c4: 39 de cmp %ebx,%esi 10c1c6: 77 1f ja 10c1e7 <_Heap_Walk+0x22e> 10c1c8: 89 f1 mov %esi,%ecx 10c1ca: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c1cd: 83 ec 0c sub $0xc,%esp 10c1d0: 51 push %ecx 10c1d1: 53 push %ebx 10c1d2: 68 99 04 12 00 push $0x120499 10c1d7: 6a 01 push $0x1 10c1d9: 56 push %esi 10c1da: ff 55 e4 call *-0x1c(%ebp) 10c1dd: 31 c0 xor %eax,%eax "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 10c1df: 83 c4 20 add $0x20,%esp 10c1e2: e9 dc 00 00 00 jmp 10c2c3 <_Heap_Walk+0x30a> } if ( !_Heap_Is_prev_used( next_block ) ) { 10c1e7: f6 46 04 01 testb $0x1,0x4(%esi) 10c1eb: 0f 85 c5 00 00 00 jne 10c2b6 <_Heap_Walk+0x2fd> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c1f1: 8b 47 08 mov 0x8(%edi),%eax 10c1f4: 89 45 c0 mov %eax,-0x40(%ebp) 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; 10c1f7: 8b 53 04 mov 0x4(%ebx),%edx 10c1fa: 89 55 c4 mov %edx,-0x3c(%ebp) - 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; 10c1fd: 83 e2 fe and $0xfffffffe,%edx 10c200: 89 55 cc mov %edx,-0x34(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10c203: 01 da add %ebx,%edx 10c205: 89 55 c8 mov %edx,-0x38(%ebp) 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)( 10c208: 8b 4b 08 mov 0x8(%ebx),%ecx 10c20b: 89 4d b4 mov %ecx,-0x4c(%ebp) return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10c20e: ba cd 04 12 00 mov $0x1204cd,%edx 10c213: 3b 4f 0c cmp 0xc(%edi),%ecx 10c216: 74 0e je 10c226 <_Heap_Walk+0x26d> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10c218: ba d7 04 12 00 mov $0x1204d7,%edx 10c21d: 39 f9 cmp %edi,%ecx 10c21f: 74 05 je 10c226 <_Heap_Walk+0x26d> 10c221: ba 01 01 12 00 mov $0x120101,%edx 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)( 10c226: 8b 43 0c mov 0xc(%ebx),%eax 10c229: 89 45 d8 mov %eax,-0x28(%ebp) 10c22c: b8 e1 04 12 00 mov $0x1204e1,%eax 10c231: 8b 4d c0 mov -0x40(%ebp),%ecx 10c234: 39 4d d8 cmp %ecx,-0x28(%ebp) 10c237: 74 0f je 10c248 <_Heap_Walk+0x28f> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10c239: b8 ec 04 12 00 mov $0x1204ec,%eax 10c23e: 39 7d d8 cmp %edi,-0x28(%ebp) 10c241: 74 05 je 10c248 <_Heap_Walk+0x28f> 10c243: b8 01 01 12 00 mov $0x120101,%eax 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)( 10c248: 52 push %edx 10c249: ff 75 b4 pushl -0x4c(%ebp) 10c24c: 50 push %eax 10c24d: ff 75 d8 pushl -0x28(%ebp) 10c250: 53 push %ebx 10c251: 68 f6 04 12 00 push $0x1204f6 10c256: 6a 00 push $0x0 10c258: ff 75 e0 pushl -0x20(%ebp) 10c25b: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10c25e: 8b 55 c8 mov -0x38(%ebp),%edx 10c261: 8b 02 mov (%edx),%eax 10c263: 83 c4 20 add $0x20,%esp 10c266: 39 45 cc cmp %eax,-0x34(%ebp) 10c269: 74 14 je 10c27f <_Heap_Walk+0x2c6> 10c26b: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c26e: 51 push %ecx 10c26f: 52 push %edx 10c270: 50 push %eax 10c271: ff 75 cc pushl -0x34(%ebp) 10c274: 53 push %ebx 10c275: 68 22 05 12 00 push $0x120522 10c27a: e9 58 ff ff ff jmp 10c1d7 <_Heap_Walk+0x21e> ); return false; } if ( !prev_used ) { 10c27f: f6 45 c4 01 testb $0x1,-0x3c(%ebp) 10c283: 75 16 jne 10c29b <_Heap_Walk+0x2e2> 10c285: 8b 75 e0 mov -0x20(%ebp),%esi (*printer)( 10c288: 53 push %ebx 10c289: 68 5b 05 12 00 push $0x12055b 10c28e: 6a 01 push $0x1 10c290: 56 push %esi 10c291: ff 55 e4 call *-0x1c(%ebp) 10c294: 31 c0 xor %eax,%eax 10c296: 83 c4 10 add $0x10,%esp 10c299: eb 28 jmp 10c2c3 <_Heap_Walk+0x30a> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10c29b: 8b 47 08 mov 0x8(%edi),%eax 10c29e: eb 07 jmp 10c2a7 <_Heap_Walk+0x2ee> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 10c2a0: 39 d8 cmp %ebx,%eax 10c2a2: 74 12 je 10c2b6 <_Heap_Walk+0x2fd> return true; } free_block = free_block->next; 10c2a4: 8b 40 08 mov 0x8(%eax),%eax ) { 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 ) { 10c2a7: 39 f8 cmp %edi,%eax 10c2a9: 75 f5 jne 10c2a0 <_Heap_Walk+0x2e7> 10c2ab: 8b 75 e0 mov -0x20(%ebp),%esi return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10c2ae: 53 push %ebx 10c2af: 68 8a 05 12 00 push $0x12058a 10c2b4: eb d8 jmp 10c28e <_Heap_Walk+0x2d5> ) { 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 ) { 10c2b6: 89 f3 mov %esi,%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10c2b8: 3b 5d d0 cmp -0x30(%ebp),%ebx 10c2bb: 0f 85 78 fe ff ff jne 10c139 <_Heap_Walk+0x180> 10c2c1: b0 01 mov $0x1,%al block = next_block; } return true; } 10c2c3: 8d 65 f4 lea -0xc(%ebp),%esp 10c2c6: 5b pop %ebx 10c2c7: 5e pop %esi 10c2c8: 5f pop %edi 10c2c9: c9 leave 10c2ca: c3 ret =============================================================================== 0010b5c0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10b5c0: 55 push %ebp 10b5c1: 89 e5 mov %esp,%ebp 10b5c3: 53 push %ebx 10b5c4: 83 ec 08 sub $0x8,%esp 10b5c7: 8b 45 08 mov 0x8(%ebp),%eax 10b5ca: 8b 55 0c mov 0xc(%ebp),%edx 10b5cd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10b5d0: a3 34 57 12 00 mov %eax,0x125734 _Internal_errors_What_happened.is_internal = is_internal; 10b5d5: 88 15 38 57 12 00 mov %dl,0x125738 _Internal_errors_What_happened.the_error = the_error; 10b5db: 89 1d 3c 57 12 00 mov %ebx,0x12573c _User_extensions_Fatal( the_source, is_internal, the_error ); 10b5e1: 53 push %ebx 10b5e2: 0f b6 d2 movzbl %dl,%edx 10b5e5: 52 push %edx 10b5e6: 50 push %eax 10b5e7: e8 9b 18 00 00 call 10ce87 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10b5ec: c7 05 28 58 12 00 05 movl $0x5,0x125828 <== NOT EXECUTED 10b5f3: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10b5f6: fa cli <== NOT EXECUTED 10b5f7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b5f9: f4 hlt <== NOT EXECUTED 10b5fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b5fd: eb fe jmp 10b5fd <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 00100218 <_Message_queue_Manager_initialization>: #include #include #include void _Message_queue_Manager_initialization(void) { 100218: 55 push %ebp 100219: 89 e5 mov %esp,%ebp } 10021b: c9 leave 10021c: c3 ret =============================================================================== 0010b658 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10b658: 55 push %ebp 10b659: 89 e5 mov %esp,%ebp 10b65b: 56 push %esi 10b65c: 53 push %ebx 10b65d: 8b 5d 08 mov 0x8(%ebp),%ebx * 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 ) 10b660: 31 c9 xor %ecx,%ecx 10b662: 83 7b 18 00 cmpl $0x0,0x18(%ebx) 10b666: 74 53 je 10b6bb <_Objects_Allocate+0x63><== 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 ); 10b668: 8d 73 20 lea 0x20(%ebx),%esi 10b66b: 83 ec 0c sub $0xc,%esp 10b66e: 56 push %esi 10b66f: e8 ac f7 ff ff call 10ae20 <_Chain_Get> 10b674: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10b676: 83 c4 10 add $0x10,%esp 10b679: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b67d: 74 3c je 10b6bb <_Objects_Allocate+0x63> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10b67f: 85 c0 test %eax,%eax 10b681: 75 1a jne 10b69d <_Objects_Allocate+0x45> _Objects_Extend_information( information ); 10b683: 83 ec 0c sub $0xc,%esp 10b686: 53 push %ebx 10b687: e8 60 00 00 00 call 10b6ec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10b68c: 89 34 24 mov %esi,(%esp) 10b68f: e8 8c f7 ff ff call 10ae20 <_Chain_Get> 10b694: 89 c1 mov %eax,%ecx } if ( the_object ) { 10b696: 83 c4 10 add $0x10,%esp 10b699: 85 c0 test %eax,%eax 10b69b: 74 1e je 10b6bb <_Objects_Allocate+0x63> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10b69d: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10b6a1: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10b6a5: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10b6a7: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b6ab: 31 d2 xor %edx,%edx 10b6ad: f7 f6 div %esi 10b6af: c1 e0 02 shl $0x2,%eax 10b6b2: 03 43 30 add 0x30(%ebx),%eax 10b6b5: ff 08 decl (%eax) information->inactive--; 10b6b7: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10b6bb: 89 c8 mov %ecx,%eax 10b6bd: 8d 65 f8 lea -0x8(%ebp),%esp 10b6c0: 5b pop %ebx 10b6c1: 5e pop %esi 10b6c2: c9 leave 10b6c3: c3 ret =============================================================================== 0010b6ec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10b6ec: 55 push %ebp 10b6ed: 89 e5 mov %esp,%ebp 10b6ef: 57 push %edi 10b6f0: 56 push %esi 10b6f1: 53 push %ebx 10b6f2: 83 ec 4c sub $0x4c,%esp 10b6f5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10b6f8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10b6fc: 89 45 c8 mov %eax,-0x38(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10b6ff: 8b 4b 34 mov 0x34(%ebx),%ecx 10b702: 85 c9 test %ecx,%ecx 10b704: 75 0e jne 10b714 <_Objects_Extend_information+0x28> 10b706: 89 45 d4 mov %eax,-0x2c(%ebp) 10b709: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b710: 31 d2 xor %edx,%edx 10b712: eb 31 jmp 10b745 <_Objects_Extend_information+0x59> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10b714: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10b718: 8b 43 10 mov 0x10(%ebx),%eax 10b71b: 31 d2 xor %edx,%edx 10b71d: 66 f7 f6 div %si 10b720: 0f b7 d0 movzwl %ax,%edx 10b723: 8b 7d c8 mov -0x38(%ebp),%edi 10b726: 89 7d d4 mov %edi,-0x2c(%ebp) 10b729: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) 10b730: 31 c0 xor %eax,%eax for ( ; block < block_count; block++ ) { 10b732: eb 0a jmp 10b73e <_Objects_Extend_information+0x52> if ( information->object_blocks[ block ] == NULL ) 10b734: 83 3c 81 00 cmpl $0x0,(%ecx,%eax,4) 10b738: 74 08 je 10b742 <_Objects_Extend_information+0x56> 10b73a: 01 75 d4 add %esi,-0x2c(%ebp) if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10b73d: 40 inc %eax 10b73e: 39 d0 cmp %edx,%eax 10b740: 72 f2 jb 10b734 <_Objects_Extend_information+0x48> 10b742: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10b745: 0f b7 43 14 movzwl 0x14(%ebx),%eax 10b749: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b74d: 8d 0c 08 lea (%eax,%ecx,1),%ecx 10b750: 89 4d b8 mov %ecx,-0x48(%ebp) /* * 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 ) { 10b753: 81 f9 ff ff 00 00 cmp $0xffff,%ecx 10b759: 0f 87 db 01 00 00 ja 10b93a <_Objects_Extend_information+0x24e><== NEVER TAKEN /* * 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; 10b75f: 0f af 43 18 imul 0x18(%ebx),%eax if ( information->auto_extend ) { 10b763: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10b767: 74 1e je 10b787 <_Objects_Extend_information+0x9b> new_object_block = _Workspace_Allocate( block_size ); 10b769: 83 ec 0c sub $0xc,%esp 10b76c: 50 push %eax 10b76d: 89 55 b4 mov %edx,-0x4c(%ebp) 10b770: e8 3f 1a 00 00 call 10d1b4 <_Workspace_Allocate> 10b775: 89 45 bc mov %eax,-0x44(%ebp) if ( !new_object_block ) 10b778: 83 c4 10 add $0x10,%esp 10b77b: 85 c0 test %eax,%eax 10b77d: 8b 55 b4 mov -0x4c(%ebp),%edx 10b780: 75 1a jne 10b79c <_Objects_Extend_information+0xb0> 10b782: e9 b3 01 00 00 jmp 10b93a <_Objects_Extend_information+0x24e> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10b787: 83 ec 0c sub $0xc,%esp 10b78a: 50 push %eax 10b78b: 89 55 b4 mov %edx,-0x4c(%ebp) 10b78e: e8 f5 19 00 00 call 10d188 <_Workspace_Allocate_or_fatal_error> 10b793: 89 45 bc mov %eax,-0x44(%ebp) 10b796: 83 c4 10 add $0x10,%esp 10b799: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10b79c: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10b7a0: 39 45 d4 cmp %eax,-0x2c(%ebp) 10b7a3: 0f 82 14 01 00 00 jb 10b8bd <_Objects_Extend_information+0x1d1> */ /* * Up the block count and maximum */ block_count++; 10b7a9: 8d 72 01 lea 0x1(%edx),%esi * 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 ); 10b7ac: 83 ec 0c sub $0xc,%esp 10b7af: 8b 4d b8 mov -0x48(%ebp),%ecx 10b7b2: 03 4d c8 add -0x38(%ebp),%ecx 10b7b5: 8d 04 76 lea (%esi,%esi,2),%eax 10b7b8: 8d 04 01 lea (%ecx,%eax,1),%eax 10b7bb: c1 e0 02 shl $0x2,%eax 10b7be: 50 push %eax 10b7bf: 89 55 b4 mov %edx,-0x4c(%ebp) 10b7c2: e8 ed 19 00 00 call 10d1b4 <_Workspace_Allocate> if ( !object_blocks ) { 10b7c7: 83 c4 10 add $0x10,%esp 10b7ca: 85 c0 test %eax,%eax 10b7cc: 8b 55 b4 mov -0x4c(%ebp),%edx 10b7cf: 75 13 jne 10b7e4 <_Objects_Extend_information+0xf8> _Workspace_Free( new_object_block ); 10b7d1: 83 ec 0c sub $0xc,%esp 10b7d4: ff 75 bc pushl -0x44(%ebp) 10b7d7: e8 f1 19 00 00 call 10d1cd <_Workspace_Free> return; 10b7dc: 83 c4 10 add $0x10,%esp 10b7df: e9 56 01 00 00 jmp 10b93a <_Objects_Extend_information+0x24e> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10b7e4: 8d 0c b0 lea (%eax,%esi,4),%ecx 10b7e7: 89 4d c0 mov %ecx,-0x40(%ebp) 10b7ea: 8d 34 f0 lea (%eax,%esi,8),%esi 10b7ed: 89 75 c4 mov %esi,-0x3c(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10b7f0: 0f b7 73 10 movzwl 0x10(%ebx),%esi 10b7f4: 31 c9 xor %ecx,%ecx 10b7f6: 3b 75 c8 cmp -0x38(%ebp),%esi 10b7f9: 76 3e jbe 10b839 <_Objects_Extend_information+0x14d> /* * 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, 10b7fb: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi 10b802: 89 75 d0 mov %esi,-0x30(%ebp) 10b805: 8b 73 34 mov 0x34(%ebx),%esi 10b808: 89 c7 mov %eax,%edi 10b80a: 8b 4d d0 mov -0x30(%ebp),%ecx 10b80d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10b80f: 8b 73 30 mov 0x30(%ebx),%esi 10b812: 8b 7d c0 mov -0x40(%ebp),%edi 10b815: 8b 4d d0 mov -0x30(%ebp),%ecx 10b818: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10b81a: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx 10b81e: 03 4d c8 add -0x38(%ebp),%ecx 10b821: c1 e1 02 shl $0x2,%ecx 10b824: 8b 73 1c mov 0x1c(%ebx),%esi 10b827: 8b 7d c4 mov -0x3c(%ebp),%edi 10b82a: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10b82c: eb 10 jmp 10b83e <_Objects_Extend_information+0x152> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10b82e: 8b 7d c4 mov -0x3c(%ebp),%edi 10b831: c7 04 8f 00 00 00 00 movl $0x0,(%edi,%ecx,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10b838: 41 inc %ecx 10b839: 3b 4d c8 cmp -0x38(%ebp),%ecx 10b83c: 72 f0 jb 10b82e <_Objects_Extend_information+0x142> } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10b83e: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) inactive_per_block[block_count] = 0; 10b845: 8b 4d c0 mov -0x40(%ebp),%ecx 10b848: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10b84f: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b853: 8b 75 d4 mov -0x2c(%ebp),%esi 10b856: 01 d6 add %edx,%esi 10b858: 8b 7d d4 mov -0x2c(%ebp),%edi 10b85b: 8b 55 c4 mov -0x3c(%ebp),%edx 10b85e: 8d 0c ba lea (%edx,%edi,4),%ecx 10b861: 89 fa mov %edi,%edx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b863: eb 0a jmp 10b86f <_Objects_Extend_information+0x183> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10b865: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10b86b: 42 inc %edx 10b86c: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10b86f: 39 f2 cmp %esi,%edx 10b871: 72 f2 jb 10b865 <_Objects_Extend_information+0x179> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10b873: 9c pushf 10b874: fa cli 10b875: 5e pop %esi old_tables = information->object_blocks; 10b876: 8b 53 34 mov 0x34(%ebx),%edx information->object_blocks = object_blocks; 10b879: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10b87c: 8b 4d c0 mov -0x40(%ebp),%ecx 10b87f: 89 4b 30 mov %ecx,0x30(%ebx) information->local_table = local_table; 10b882: 8b 7d c4 mov -0x3c(%ebp),%edi 10b885: 89 7b 1c mov %edi,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10b888: 8b 45 b8 mov -0x48(%ebp),%eax 10b88b: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10b88f: 8b 03 mov (%ebx),%eax 10b891: c1 e0 18 shl $0x18,%eax 10b894: 0d 00 00 01 00 or $0x10000,%eax 10b899: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b89d: c1 e1 1b shl $0x1b,%ecx 10b8a0: 09 c8 or %ecx,%eax 10b8a2: 0f b7 4d b8 movzwl -0x48(%ebp),%ecx 10b8a6: 09 c8 or %ecx,%eax 10b8a8: 89 43 0c mov %eax,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10b8ab: 56 push %esi 10b8ac: 9d popf if ( old_tables ) 10b8ad: 85 d2 test %edx,%edx 10b8af: 74 0c je 10b8bd <_Objects_Extend_information+0x1d1> _Workspace_Free( old_tables ); 10b8b1: 83 ec 0c sub $0xc,%esp 10b8b4: 52 push %edx 10b8b5: e8 13 19 00 00 call 10d1cd <_Workspace_Free> 10b8ba: 83 c4 10 add $0x10,%esp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10b8bd: 8b 55 cc mov -0x34(%ebp),%edx 10b8c0: c1 e2 02 shl $0x2,%edx 10b8c3: 89 55 d0 mov %edx,-0x30(%ebp) 10b8c6: 8b 43 34 mov 0x34(%ebx),%eax 10b8c9: 8b 75 bc mov -0x44(%ebp),%esi 10b8cc: 8b 4d cc mov -0x34(%ebp),%ecx 10b8cf: 89 34 88 mov %esi,(%eax,%ecx,4) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10b8d2: ff 73 18 pushl 0x18(%ebx) 10b8d5: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b8d9: 52 push %edx 10b8da: ff 34 88 pushl (%eax,%ecx,4) 10b8dd: 8d 45 dc lea -0x24(%ebp),%eax 10b8e0: 50 push %eax 10b8e1: 89 45 b4 mov %eax,-0x4c(%ebp) 10b8e4: e8 37 3d 00 00 call 10f620 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b8e9: 8d 7b 20 lea 0x20(%ebx),%edi 10b8ec: 8b 75 d4 mov -0x2c(%ebp),%esi 10b8ef: eb 23 jmp 10b914 <_Objects_Extend_information+0x228> */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( 10b8f1: 8b 13 mov (%ebx),%edx 10b8f3: c1 e2 18 shl $0x18,%edx 10b8f6: 81 ca 00 00 01 00 or $0x10000,%edx 10b8fc: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10b900: c1 e1 1b shl $0x1b,%ecx 10b903: 09 ca or %ecx,%edx 10b905: 09 f2 or %esi,%edx 10b907: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10b90a: 52 push %edx 10b90b: 52 push %edx 10b90c: 50 push %eax 10b90d: 57 push %edi 10b90e: e8 d1 f4 ff ff call 10ade4 <_Chain_Append> index++; 10b913: 46 inc %esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10b914: 8d 45 dc lea -0x24(%ebp),%eax 10b917: 89 04 24 mov %eax,(%esp) 10b91a: e8 01 f5 ff ff call 10ae20 <_Chain_Get> 10b91f: 83 c4 10 add $0x10,%esp 10b922: 85 c0 test %eax,%eax 10b924: 75 cb jne 10b8f1 <_Objects_Extend_information+0x205> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10b926: 8b 43 30 mov 0x30(%ebx),%eax 10b929: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10b92d: 8b 4d d0 mov -0x30(%ebp),%ecx 10b930: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10b933: 8b 43 14 mov 0x14(%ebx),%eax 10b936: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10b93a: 8d 65 f4 lea -0xc(%ebp),%esp 10b93d: 5b pop %ebx 10b93e: 5e pop %esi 10b93f: 5f pop %edi 10b940: c9 leave 10b941: c3 ret =============================================================================== 0010b9d4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10b9d4: 55 push %ebp 10b9d5: 89 e5 mov %esp,%ebp 10b9d7: 56 push %esi 10b9d8: 53 push %ebx 10b9d9: 8b 75 08 mov 0x8(%ebp),%esi 10b9dc: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10b9df: 85 db test %ebx,%ebx 10b9e1: 74 2d je 10ba10 <_Objects_Get_information+0x3c> /* * 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 ); 10b9e3: 83 ec 0c sub $0xc,%esp 10b9e6: 56 push %esi 10b9e7: e8 90 41 00 00 call 10fb7c <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10b9ec: 83 c4 10 add $0x10,%esp 10b9ef: 85 c0 test %eax,%eax 10b9f1: 74 1d je 10ba10 <_Objects_Get_information+0x3c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10b9f3: 39 c3 cmp %eax,%ebx 10b9f5: 77 19 ja 10ba10 <_Objects_Get_information+0x3c> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10b9f7: 8b 04 b5 64 56 12 00 mov 0x125664(,%esi,4),%eax 10b9fe: 85 c0 test %eax,%eax 10ba00: 74 0e je 10ba10 <_Objects_Get_information+0x3c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10ba02: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10ba05: 85 c0 test %eax,%eax 10ba07: 74 09 je 10ba12 <_Objects_Get_information+0x3e><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10ba09: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10ba0e: 75 02 jne 10ba12 <_Objects_Get_information+0x3e> 10ba10: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10ba12: 8d 65 f8 lea -0x8(%ebp),%esp 10ba15: 5b pop %ebx 10ba16: 5e pop %esi 10ba17: c9 leave 10ba18: c3 ret =============================================================================== 00118ef0 <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 118ef0: 55 push %ebp 118ef1: 89 e5 mov %esp,%ebp 118ef3: 53 push %ebx 118ef4: 8b 55 08 mov 0x8(%ebp),%edx 118ef7: 8b 4d 10 mov 0x10(%ebp),%ecx /* * 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; 118efa: b8 01 00 00 00 mov $0x1,%eax 118eff: 2b 42 08 sub 0x8(%edx),%eax 118f02: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 118f05: 0f b7 5a 10 movzwl 0x10(%edx),%ebx 118f09: 39 c3 cmp %eax,%ebx 118f0b: 72 12 jb 118f1f <_Objects_Get_no_protection+0x2f> if ( (the_object = information->local_table[ index ]) != NULL ) { 118f0d: 8b 52 1c mov 0x1c(%edx),%edx 118f10: 8b 04 82 mov (%edx,%eax,4),%eax 118f13: 85 c0 test %eax,%eax 118f15: 74 08 je 118f1f <_Objects_Get_no_protection+0x2f><== NEVER TAKEN *location = OBJECTS_LOCAL; 118f17: c7 01 00 00 00 00 movl $0x0,(%ecx) return the_object; 118f1d: eb 08 jmp 118f27 <_Objects_Get_no_protection+0x37> /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 118f1f: c7 01 01 00 00 00 movl $0x1,(%ecx) 118f25: 31 c0 xor %eax,%eax return NULL; } 118f27: 5b pop %ebx 118f28: c9 leave 118f29: c3 ret =============================================================================== 0010f06c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10f06c: 55 push %ebp 10f06d: 89 e5 mov %esp,%ebp 10f06f: 83 ec 18 sub $0x18,%esp /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10f072: 8b 45 08 mov 0x8(%ebp),%eax 10f075: 85 c0 test %eax,%eax 10f077: 75 08 jne 10f081 <_Objects_Id_to_name+0x15> 10f079: a1 28 0b 13 00 mov 0x130b28,%eax 10f07e: 8b 40 08 mov 0x8(%eax),%eax */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10f081: 89 c2 mov %eax,%edx 10f083: c1 ea 18 shr $0x18,%edx 10f086: 83 e2 07 and $0x7,%edx */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 10f089: 8d 4a ff lea -0x1(%edx),%ecx 10f08c: 83 f9 03 cmp $0x3,%ecx 10f08f: 77 32 ja 10f0c3 <_Objects_Id_to_name+0x57> 10f091: eb 37 jmp 10f0ca <_Objects_Id_to_name+0x5e> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10f093: 89 c1 mov %eax,%ecx 10f095: c1 e9 1b shr $0x1b,%ecx 10f098: 8b 14 8a mov (%edx,%ecx,4),%edx if ( !information ) 10f09b: 85 d2 test %edx,%edx 10f09d: 74 24 je 10f0c3 <_Objects_Id_to_name+0x57><== 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 ); 10f09f: 51 push %ecx 10f0a0: 8d 4d f4 lea -0xc(%ebp),%ecx 10f0a3: 51 push %ecx 10f0a4: 50 push %eax 10f0a5: 52 push %edx 10f0a6: e8 69 ff ff ff call 10f014 <_Objects_Get> if ( !the_object ) 10f0ab: 83 c4 10 add $0x10,%esp 10f0ae: 85 c0 test %eax,%eax 10f0b0: 74 11 je 10f0c3 <_Objects_Id_to_name+0x57> return OBJECTS_INVALID_ID; *name = the_object->name; 10f0b2: 8b 50 0c mov 0xc(%eax),%edx 10f0b5: 8b 45 0c mov 0xc(%ebp),%eax 10f0b8: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10f0ba: e8 86 07 00 00 call 10f845 <_Thread_Enable_dispatch> 10f0bf: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10f0c1: eb 05 jmp 10f0c8 <_Objects_Id_to_name+0x5c> 10f0c3: b8 03 00 00 00 mov $0x3,%eax } 10f0c8: c9 leave 10f0c9: c3 ret the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 10f0ca: 8b 14 95 40 0a 13 00 mov 0x130a40(,%edx,4),%edx 10f0d1: 85 d2 test %edx,%edx 10f0d3: 75 be jne 10f093 <_Objects_Id_to_name+0x27> 10f0d5: eb ec jmp 10f0c3 <_Objects_Id_to_name+0x57> =============================================================================== 0010bac4 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10bac4: 55 push %ebp 10bac5: 89 e5 mov %esp,%ebp 10bac7: 57 push %edi 10bac8: 56 push %esi 10bac9: 53 push %ebx 10baca: 83 ec 1c sub $0x1c,%esp 10bacd: 8b 45 08 mov 0x8(%ebp),%eax 10bad0: 8b 55 0c mov 0xc(%ebp),%edx 10bad3: 8b 75 10 mov 0x10(%ebp),%esi 10bad6: 8b 5d 14 mov 0x14(%ebp),%ebx 10bad9: 8b 4d 20 mov 0x20(%ebp),%ecx 10badc: 89 4d e4 mov %ecx,-0x1c(%ebp) 10badf: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10bae3: 89 10 mov %edx,(%eax) information->the_class = the_class; 10bae5: 66 89 70 04 mov %si,0x4(%eax) information->size = size; 10bae9: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10baec: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10baf3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10bafa: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10bb01: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10bb07: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10bb0d: 8b 3c 95 64 56 12 00 mov 0x125664(,%edx,4),%edi 10bb14: 89 04 b7 mov %eax,(%edi,%esi,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10bb17: 89 df mov %ebx,%edi 10bb19: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10bb1c: 89 f9 mov %edi,%ecx 10bb1e: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10bb21: 89 d9 mov %ebx,%ecx 10bb23: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10bb29: 85 ff test %edi,%edi 10bb2b: 74 10 je 10bb3d <_Objects_Initialize_information+0x79> 10bb2d: 85 c9 test %ecx,%ecx 10bb2f: 75 0c jne 10bb3d <_Objects_Initialize_information+0x79> _Internal_error_Occurred( 10bb31: 50 push %eax 10bb32: 6a 14 push $0x14 10bb34: 6a 01 push $0x1 10bb36: 6a 00 push $0x0 10bb38: e8 83 fa ff ff call 10b5c0 <_Internal_error_Occurred> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10bb3d: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10bb41: c7 40 1c 38 53 12 00 movl $0x125338,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10bb48: c1 e2 18 shl $0x18,%edx 10bb4b: 81 ca 00 00 01 00 or $0x10000,%edx 10bb51: c1 e6 1b shl $0x1b,%esi 10bb54: 09 f2 or %esi,%edx 10bb56: 85 c9 test %ecx,%ecx 10bb58: 0f 95 c3 setne %bl 10bb5b: 89 de mov %ebx,%esi 10bb5d: 81 e6 ff 00 00 00 and $0xff,%esi 10bb63: 09 f2 or %esi,%edx 10bb65: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10bb68: 8b 55 e4 mov -0x1c(%ebp),%edx 10bb6b: f6 c2 03 test $0x3,%dl 10bb6e: 74 06 je 10bb76 <_Objects_Initialize_information+0xb2><== ALWAYS TAKEN name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10bb70: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 10bb73: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10bb76: 66 89 50 38 mov %dx,0x38(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10bb7a: 8d 50 24 lea 0x24(%eax),%edx 10bb7d: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10bb80: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10bb87: 8d 50 20 lea 0x20(%eax),%edx 10bb8a: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10bb8d: 85 c9 test %ecx,%ecx 10bb8f: 74 0f je 10bba0 <_Objects_Initialize_information+0xdc> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10bb91: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bb94: 8d 65 f4 lea -0xc(%ebp),%esp 10bb97: 5b pop %ebx 10bb98: 5e pop %esi 10bb99: 5f pop %edi 10bb9a: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10bb9b: e9 4c fb ff ff jmp 10b6ec <_Objects_Extend_information> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10bba0: 8d 65 f4 lea -0xc(%ebp),%esp 10bba3: 5b pop %ebx 10bba4: 5e pop %esi 10bba5: 5f pop %edi 10bba6: c9 leave 10bba7: c3 ret =============================================================================== 00100220 <_Partition_Manager_initialization>: #include #include #include void _Partition_Manager_initialization(void) { 100220: 55 push %ebp 100221: 89 e5 mov %esp,%ebp } 100223: c9 leave 100224: c3 ret =============================================================================== 0010f3e2 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 10f3e2: 55 push %ebp 10f3e3: 89 e5 mov %esp,%ebp 10f3e5: 57 push %edi 10f3e6: 56 push %esi 10f3e7: 53 push %ebx 10f3e8: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10f3eb: 8b 45 08 mov 0x8(%ebp),%eax 10f3ee: 8b 98 f0 00 00 00 mov 0xf0(%eax),%ebx if ( !api ) 10f3f4: 85 db test %ebx,%ebx 10f3f6: 74 45 je 10f43d <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 10f3f8: 9c pushf 10f3f9: fa cli 10f3fa: 58 pop %eax signal_set = asr->signals_posted; 10f3fb: 8b 7b 14 mov 0x14(%ebx),%edi asr->signals_posted = 0; 10f3fe: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 10f405: 50 push %eax 10f406: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 10f407: 85 ff test %edi,%edi 10f409: 74 32 je 10f43d <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN return; asr->nest_level += 1; 10f40b: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f40e: 50 push %eax 10f40f: 8d 75 e4 lea -0x1c(%ebp),%esi 10f412: 56 push %esi 10f413: 68 ff ff 00 00 push $0xffff 10f418: ff 73 10 pushl 0x10(%ebx) 10f41b: e8 b0 20 00 00 call 1114d0 (*asr->handler)( signal_set ); 10f420: 89 3c 24 mov %edi,(%esp) 10f423: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 10f426: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 10f429: 83 c4 0c add $0xc,%esp 10f42c: 56 push %esi 10f42d: 68 ff ff 00 00 push $0xffff 10f432: ff 75 e4 pushl -0x1c(%ebp) 10f435: e8 96 20 00 00 call 1114d0 10f43a: 83 c4 10 add $0x10,%esp } 10f43d: 8d 65 f4 lea -0xc(%ebp),%esp 10f440: 5b pop %ebx 10f441: 5e pop %esi 10f442: 5f pop %edi 10f443: c9 leave 10f444: c3 ret =============================================================================== 00100240 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { 100240: 55 push %ebp 100241: 89 e5 mov %esp,%ebp } 100243: c9 leave 100244: c3 ret =============================================================================== 0013a768 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 13a768: 55 push %ebp 13a769: 89 e5 mov %esp,%ebp 13a76b: 53 push %ebx 13a76c: 83 ec 18 sub $0x18,%esp 13a76f: 8d 45 f4 lea -0xc(%ebp),%eax 13a772: 50 push %eax 13a773: ff 75 08 pushl 0x8(%ebp) 13a776: 68 f8 7f 16 00 push $0x167ff8 13a77b: e8 58 7e fd ff call 1125d8 <_Objects_Get> 13a780: 89 c3 mov %eax,%ebx /* * 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 ) { 13a782: 83 c4 10 add $0x10,%esp 13a785: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 13a789: 75 64 jne 13a7ef <_Rate_monotonic_Timeout+0x87><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 13a78b: 8b 40 40 mov 0x40(%eax),%eax if ( _States_Is_waiting_for_period( the_thread->current_state ) && 13a78e: f6 40 11 40 testb $0x40,0x11(%eax) 13a792: 74 18 je 13a7ac <_Rate_monotonic_Timeout+0x44> the_thread->Wait.id == the_period->Object.id ) { 13a794: 8b 50 20 mov 0x20(%eax),%edx 13a797: 3b 53 08 cmp 0x8(%ebx),%edx 13a79a: 75 10 jne 13a7ac <_Rate_monotonic_Timeout+0x44> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 13a79c: 52 push %edx 13a79d: 52 push %edx 13a79e: 68 f8 ff 03 10 push $0x1003fff8 13a7a3: 50 push %eax 13a7a4: e8 27 83 fd ff call 112ad0 <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 13a7a9: 59 pop %ecx 13a7aa: eb 10 jmp 13a7bc <_Rate_monotonic_Timeout+0x54> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 13a7ac: 83 7b 38 01 cmpl $0x1,0x38(%ebx) 13a7b0: 75 2b jne 13a7dd <_Rate_monotonic_Timeout+0x75> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 13a7b2: c7 43 38 03 00 00 00 movl $0x3,0x38(%ebx) _Rate_monotonic_Initiate_statistics( the_period ); 13a7b9: 83 ec 0c sub $0xc,%esp 13a7bc: 53 push %ebx 13a7bd: e8 52 fc ff ff call 13a414 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 13a7c2: 8b 43 3c mov 0x3c(%ebx),%eax 13a7c5: 89 43 1c mov %eax,0x1c(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 13a7c8: 58 pop %eax 13a7c9: 5a pop %edx 13a7ca: 83 c3 10 add $0x10,%ebx 13a7cd: 53 push %ebx 13a7ce: 68 80 7c 16 00 push $0x167c80 13a7d3: e8 14 94 fd ff call 113bec <_Watchdog_Insert> 13a7d8: 83 c4 10 add $0x10,%esp 13a7db: eb 07 jmp 13a7e4 <_Rate_monotonic_Timeout+0x7c> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 13a7dd: c7 43 38 04 00 00 00 movl $0x4,0x38(%ebx) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 13a7e4: a1 a4 7b 16 00 mov 0x167ba4,%eax 13a7e9: 48 dec %eax 13a7ea: a3 a4 7b 16 00 mov %eax,0x167ba4 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 13a7ef: 8b 5d fc mov -0x4(%ebp),%ebx 13a7f2: c9 leave 13a7f3: c3 ret =============================================================================== 00100228 <_Region_Manager_initialization>: #include #include #include void _Region_Manager_initialization(void) { 100228: 55 push %ebp 100229: 89 e5 mov %esp,%ebp } 10022b: c9 leave 10022c: c3 ret =============================================================================== 0010b120 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10b120: 55 push %ebp 10b121: 89 e5 mov %esp,%ebp 10b123: 53 push %ebx 10b124: 8b 4d 08 mov 0x8(%ebp),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 10b127: 8b 1d 04 42 12 00 mov 0x124204,%ebx if ((!the_tod) || 10b12d: 85 c9 test %ecx,%ecx 10b12f: 74 59 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 10b131: b8 40 42 0f 00 mov $0xf4240,%eax 10b136: 31 d2 xor %edx,%edx 10b138: f7 f3 div %ebx 10b13a: 39 41 18 cmp %eax,0x18(%ecx) 10b13d: 73 4b jae 10b18a <_TOD_Validate+0x6a> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10b13f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10b143: 77 45 ja 10b18a <_TOD_Validate+0x6a> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10b145: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10b149: 77 3f ja 10b18a <_TOD_Validate+0x6a> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10b14b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10b14f: 77 39 ja 10b18a <_TOD_Validate+0x6a> (the_tod->month == 0) || 10b151: 8b 41 04 mov 0x4(%ecx),%eax 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) || 10b154: 85 c0 test %eax,%eax 10b156: 74 32 je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN 10b158: 83 f8 0c cmp $0xc,%eax 10b15b: 77 2d ja 10b18a <_TOD_Validate+0x6a> (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) || 10b15d: 8b 19 mov (%ecx),%ebx 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) || 10b15f: 81 fb c3 07 00 00 cmp $0x7c3,%ebx 10b165: 76 23 jbe 10b18a <_TOD_Validate+0x6a> (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) || (the_tod->day == 0) ) 10b167: 8b 51 08 mov 0x8(%ecx),%edx 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) || 10b16a: 85 d2 test %edx,%edx 10b16c: 74 1c je 10b18a <_TOD_Validate+0x6a> <== NEVER TAKEN (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 ) 10b16e: 80 e3 03 and $0x3,%bl 10b171: 75 09 jne 10b17c <_TOD_Validate+0x5c> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10b173: 8b 04 85 a0 19 12 00 mov 0x1219a0(,%eax,4),%eax 10b17a: eb 07 jmp 10b183 <_TOD_Validate+0x63> else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 10b17c: 8b 04 85 6c 19 12 00 mov 0x12196c(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10b183: 39 c2 cmp %eax,%edx 10b185: 0f 96 c0 setbe %al 10b188: eb 02 jmp 10b18c <_TOD_Validate+0x6c> 10b18a: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10b18c: 5b pop %ebx 10b18d: c9 leave 10b18e: c3 ret =============================================================================== 0010bd94 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10bd94: 55 push %ebp 10bd95: 89 e5 mov %esp,%ebp 10bd97: 57 push %edi 10bd98: 56 push %esi 10bd99: 53 push %ebx 10bd9a: 83 ec 28 sub $0x28,%esp 10bd9d: 8b 5d 08 mov 0x8(%ebp),%ebx 10bda0: 8b 7d 0c mov 0xc(%ebp),%edi 10bda3: 8a 45 10 mov 0x10(%ebp),%al 10bda6: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10bda9: 8b 73 10 mov 0x10(%ebx),%esi /* * 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 ); 10bdac: 53 push %ebx 10bdad: e8 22 0d 00 00 call 10cad4 <_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 ) 10bdb2: 83 c4 10 add $0x10,%esp 10bdb5: 39 7b 14 cmp %edi,0x14(%ebx) 10bdb8: 74 0c je 10bdc6 <_Thread_Change_priority+0x32> _Thread_Set_priority( the_thread, new_priority ); 10bdba: 50 push %eax 10bdbb: 50 push %eax 10bdbc: 57 push %edi 10bdbd: 53 push %ebx 10bdbe: e8 dd 0b 00 00 call 10c9a0 <_Thread_Set_priority> 10bdc3: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10bdc6: 9c pushf 10bdc7: fa cli 10bdc8: 59 pop %ecx /* * 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; 10bdc9: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10bdcc: 83 f8 04 cmp $0x4,%eax 10bdcf: 74 2f je 10be00 <_Thread_Change_priority+0x6c> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10bdd1: 83 e6 04 and $0x4,%esi 10bdd4: 75 08 jne 10bdde <_Thread_Change_priority+0x4a><== NEVER TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10bdd6: 89 c2 mov %eax,%edx 10bdd8: 83 e2 fb and $0xfffffffb,%edx 10bddb: 89 53 10 mov %edx,0x10(%ebx) _ISR_Enable( level ); 10bdde: 51 push %ecx 10bddf: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10bde0: a9 e0 be 03 00 test $0x3bee0,%eax 10bde5: 0f 84 c0 00 00 00 je 10beab <_Thread_Change_priority+0x117> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 10bdeb: 89 5d 0c mov %ebx,0xc(%ebp) 10bdee: 8b 43 44 mov 0x44(%ebx),%eax 10bdf1: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10bdf4: 8d 65 f4 lea -0xc(%ebp),%esp 10bdf7: 5b pop %ebx 10bdf8: 5e pop %esi 10bdf9: 5f pop %edi 10bdfa: c9 leave /* 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 ); 10bdfb: e9 18 0b 00 00 jmp 10c918 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10be00: 83 e6 04 and $0x4,%esi 10be03: 75 53 jne 10be58 <_Thread_Change_priority+0xc4><== 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 ); 10be05: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10be0c: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10be12: 66 8b 93 96 00 00 00 mov 0x96(%ebx),%dx 10be19: 66 09 10 or %dx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10be1c: 66 a1 40 57 12 00 mov 0x125740,%ax 10be22: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10be28: 66 a3 40 57 12 00 mov %ax,0x125740 _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10be2e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10be32: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax 10be38: 74 0e je 10be48 <_Thread_Change_priority+0xb4> Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10be3a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10be3d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10be3f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10be41: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10be43: 89 5a 04 mov %ebx,0x4(%edx) 10be46: eb 10 jmp 10be58 <_Thread_Change_priority+0xc4> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10be48: 8d 50 04 lea 0x4(%eax),%edx 10be4b: 89 13 mov %edx,(%ebx) old_last_node = the_chain->last; 10be4d: 8b 50 08 mov 0x8(%eax),%edx the_chain->last = the_node; 10be50: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10be53: 89 1a mov %ebx,(%edx) the_node->previous = old_last_node; 10be55: 89 53 04 mov %edx,0x4(%ebx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10be58: 51 push %ecx 10be59: 9d popf 10be5a: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10be5b: 66 8b 1d 40 57 12 00 mov 0x125740,%bx 10be62: 31 c0 xor %eax,%eax 10be64: 89 c2 mov %eax,%edx 10be66: 66 0f bc d3 bsf %bx,%dx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10be6a: 0f b7 d2 movzwl %dx,%edx 10be6d: 66 8b 9c 12 b8 57 12 mov 0x1257b8(%edx,%edx,1),%bx 10be74: 00 10be75: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10be79: c1 e2 04 shl $0x4,%edx 10be7c: 0f b7 c0 movzwl %ax,%eax 10be7f: 01 c2 add %eax,%edx 10be81: 6b d2 0c imul $0xc,%edx,%edx 10be84: 8b 1d 58 56 12 00 mov 0x125658,%ebx 10be8a: 8b 14 1a mov (%edx,%ebx,1),%edx 10be8d: 89 15 1c 57 12 00 mov %edx,0x12571c * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10be93: a1 4c 57 12 00 mov 0x12574c,%eax * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10be98: 39 d0 cmp %edx,%eax 10be9a: 74 0d je 10bea9 <_Thread_Change_priority+0x115> _Thread_Executing->is_preemptible ) 10be9c: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bea0: 74 07 je 10bea9 <_Thread_Change_priority+0x115> _Context_Switch_necessary = true; 10bea2: c6 05 5c 57 12 00 01 movb $0x1,0x12575c _ISR_Enable( level ); 10bea9: 51 push %ecx 10beaa: 9d popf } 10beab: 8d 65 f4 lea -0xc(%ebp),%esp 10beae: 5b pop %ebx 10beaf: 5e pop %esi 10beb0: 5f pop %edi 10beb1: c9 leave 10beb2: c3 ret =============================================================================== 0010beb4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10beb4: 55 push %ebp 10beb5: 89 e5 mov %esp,%ebp 10beb7: 53 push %ebx 10beb8: 8b 45 08 mov 0x8(%ebp),%eax 10bebb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10bebe: 9c pushf 10bebf: fa cli 10bec0: 59 pop %ecx current_state = the_thread->current_state; 10bec1: 8b 58 10 mov 0x10(%eax),%ebx if ( current_state & state ) { 10bec4: 85 da test %ebx,%edx 10bec6: 74 71 je 10bf39 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10bec8: f7 d2 not %edx 10beca: 21 da and %ebx,%edx current_state = 10becc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10becf: 85 d2 test %edx,%edx 10bed1: 75 66 jne 10bf39 <_Thread_Clear_state+0x85> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10bed3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10bed9: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10bee0: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10bee3: 66 8b 15 40 57 12 00 mov 0x125740,%dx 10beea: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10bef0: 66 89 15 40 57 12 00 mov %dx,0x125740 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10bef7: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10befd: 8d 5a 04 lea 0x4(%edx),%ebx 10bf00: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10bf02: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10bf05: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10bf08: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10bf0a: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10bf0d: 51 push %ecx 10bf0e: 9d popf 10bf0f: fa cli * 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 ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10bf10: 8b 50 14 mov 0x14(%eax),%edx 10bf13: 8b 1d 1c 57 12 00 mov 0x12571c,%ebx 10bf19: 3b 53 14 cmp 0x14(%ebx),%edx 10bf1c: 73 1b jae 10bf39 <_Thread_Clear_state+0x85> _Thread_Heir = the_thread; 10bf1e: a3 1c 57 12 00 mov %eax,0x12571c if ( _Thread_Executing->is_preemptible || 10bf23: a1 4c 57 12 00 mov 0x12574c,%eax 10bf28: 80 78 75 00 cmpb $0x0,0x75(%eax) 10bf2c: 75 04 jne 10bf32 <_Thread_Clear_state+0x7e> 10bf2e: 85 d2 test %edx,%edx 10bf30: 75 07 jne 10bf39 <_Thread_Clear_state+0x85><== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10bf32: c6 05 5c 57 12 00 01 movb $0x1,0x12575c } } } _ISR_Enable( level ); 10bf39: 51 push %ecx 10bf3a: 9d popf } 10bf3b: 5b pop %ebx 10bf3c: c9 leave 10bf3d: c3 ret =============================================================================== 0010c0b4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c0b4: 55 push %ebp 10c0b5: 89 e5 mov %esp,%ebp 10c0b7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c0ba: 8d 45 f4 lea -0xc(%ebp),%eax 10c0bd: 50 push %eax 10c0be: ff 75 08 pushl 0x8(%ebp) 10c0c1: e8 8e 01 00 00 call 10c254 <_Thread_Get> switch ( location ) { 10c0c6: 83 c4 10 add $0x10,%esp 10c0c9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c0cd: 75 1b jne 10c0ea <_Thread_Delay_ended+0x36><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10c0cf: 52 push %edx 10c0d0: 52 push %edx 10c0d1: 68 18 00 00 10 push $0x10000018 10c0d6: 50 push %eax 10c0d7: e8 d8 fd ff ff call 10beb4 <_Thread_Clear_state> 10c0dc: a1 90 56 12 00 mov 0x125690,%eax 10c0e1: 48 dec %eax 10c0e2: a3 90 56 12 00 mov %eax,0x125690 10c0e7: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10c0ea: c9 leave 10c0eb: c3 ret =============================================================================== 0010c0ec <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10c0ec: 55 push %ebp 10c0ed: 89 e5 mov %esp,%ebp 10c0ef: 57 push %edi 10c0f0: 56 push %esi 10c0f1: 53 push %ebx 10c0f2: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10c0f5: 8b 1d 4c 57 12 00 mov 0x12574c,%ebx _ISR_Disable( level ); 10c0fb: 9c pushf 10c0fc: fa cli 10c0fd: 58 pop %eax #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( 10c0fe: 8d 7d d8 lea -0x28(%ebp),%edi Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c101: e9 f1 00 00 00 jmp 10c1f7 <_Thread_Dispatch+0x10b> heir = _Thread_Heir; 10c106: 8b 35 1c 57 12 00 mov 0x12571c,%esi _Thread_Dispatch_disable_level = 1; 10c10c: c7 05 90 56 12 00 01 movl $0x1,0x125690 10c113: 00 00 00 _Context_Switch_necessary = false; 10c116: c6 05 5c 57 12 00 00 movb $0x0,0x12575c _Thread_Executing = heir; 10c11d: 89 35 4c 57 12 00 mov %esi,0x12574c #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 ) 10c123: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10c127: 75 09 jne 10c132 <_Thread_Dispatch+0x46> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10c129: 8b 15 5c 56 12 00 mov 0x12565c,%edx 10c12f: 89 56 78 mov %edx,0x78(%esi) _ISR_Enable( level ); 10c132: 50 push %eax 10c133: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10c134: 83 ec 0c sub $0xc,%esp 10c137: 8d 45 e0 lea -0x20(%ebp),%eax 10c13a: 50 push %eax 10c13b: e8 10 37 00 00 call 10f850 <_TOD_Get_uptime> _Timestamp_Subtract( 10c140: 83 c4 0c add $0xc,%esp 10c143: 57 push %edi 10c144: 8d 45 e0 lea -0x20(%ebp),%eax 10c147: 50 push %eax 10c148: 68 54 57 12 00 push $0x125754 10c14d: e8 ee 0b 00 00 call 10cd40 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10c152: 58 pop %eax 10c153: 5a pop %edx 10c154: 57 push %edi 10c155: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10c15b: 50 push %eax 10c15c: e8 af 0b 00 00 call 10cd10 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10c161: 8b 45 e0 mov -0x20(%ebp),%eax 10c164: 8b 55 e4 mov -0x1c(%ebp),%edx 10c167: a3 54 57 12 00 mov %eax,0x125754 10c16c: 89 15 58 57 12 00 mov %edx,0x125758 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10c172: a1 18 57 12 00 mov 0x125718,%eax 10c177: 83 c4 10 add $0x10,%esp 10c17a: 85 c0 test %eax,%eax 10c17c: 74 10 je 10c18e <_Thread_Dispatch+0xa2> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10c17e: 8b 10 mov (%eax),%edx 10c180: 89 93 ec 00 00 00 mov %edx,0xec(%ebx) *_Thread_libc_reent = heir->libc_reent; 10c186: 8b 96 ec 00 00 00 mov 0xec(%esi),%edx 10c18c: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10c18e: 51 push %ecx 10c18f: 51 push %ecx 10c190: 56 push %esi 10c191: 53 push %ebx 10c192: e8 d9 0d 00 00 call 10cf70 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10c197: 58 pop %eax 10c198: 5a pop %edx 10c199: 81 c6 d0 00 00 00 add $0xd0,%esi 10c19f: 56 push %esi 10c1a0: 8d 83 d0 00 00 00 lea 0xd0(%ebx),%eax 10c1a6: 50 push %eax 10c1a7: e8 84 10 00 00 call 10d230 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10c1ac: 83 c4 10 add $0x10,%esp 10c1af: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 10c1b6: 74 36 je 10c1ee <_Thread_Dispatch+0x102> #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 ); 10c1b8: a1 14 57 12 00 mov 0x125714,%eax 10c1bd: 39 c3 cmp %eax,%ebx 10c1bf: 74 2d je 10c1ee <_Thread_Dispatch+0x102> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10c1c1: 85 c0 test %eax,%eax 10c1c3: 74 11 je 10c1d6 <_Thread_Dispatch+0xea> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10c1c5: 83 ec 0c sub $0xc,%esp 10c1c8: 05 e8 00 00 00 add $0xe8,%eax 10c1cd: 50 push %eax 10c1ce: e8 91 10 00 00 call 10d264 <_CPU_Context_save_fp> 10c1d3: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10c1d6: 83 ec 0c sub $0xc,%esp 10c1d9: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax 10c1df: 50 push %eax 10c1e0: e8 89 10 00 00 call 10d26e <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10c1e5: 89 1d 14 57 12 00 mov %ebx,0x125714 10c1eb: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10c1ee: 8b 1d 4c 57 12 00 mov 0x12574c,%ebx _ISR_Disable( level ); 10c1f4: 9c pushf 10c1f5: fa cli 10c1f6: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10c1f7: 8a 15 5c 57 12 00 mov 0x12575c,%dl 10c1fd: 84 d2 test %dl,%dl 10c1ff: 0f 85 01 ff ff ff jne 10c106 <_Thread_Dispatch+0x1a> executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10c205: c7 05 90 56 12 00 00 movl $0x0,0x125690 10c20c: 00 00 00 _ISR_Enable( level ); 10c20f: 50 push %eax 10c210: 9d popf if ( _Thread_Do_post_task_switch_extension || 10c211: 83 3d 30 57 12 00 00 cmpl $0x0,0x125730 10c218: 75 06 jne 10c220 <_Thread_Dispatch+0x134><== NEVER TAKEN executing->do_post_task_switch_extension ) { 10c21a: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10c21e: 74 09 je 10c229 <_Thread_Dispatch+0x13d> executing->do_post_task_switch_extension = false; 10c220: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10c224: e8 a6 ea ff ff call 10accf <_API_extensions_Run_postswitch> } } 10c229: 8d 65 f4 lea -0xc(%ebp),%esp 10c22c: 5b pop %ebx 10c22d: 5e pop %esi 10c22e: 5f pop %edi 10c22f: c9 leave 10c230: c3 ret =============================================================================== 001116d8 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 1116d8: 55 push %ebp 1116d9: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 1116db: a1 4c 57 12 00 mov 0x12574c,%eax if ( !_States_Is_ready( executing->current_state ) || 1116e0: 83 78 10 00 cmpl $0x0,0x10(%eax) 1116e4: 75 0e jne 1116f4 <_Thread_Evaluate_mode+0x1c><== NEVER TAKEN 1116e6: 3b 05 1c 57 12 00 cmp 0x12571c,%eax 1116ec: 74 11 je 1116ff <_Thread_Evaluate_mode+0x27> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 1116ee: 80 78 75 00 cmpb $0x0,0x75(%eax) 1116f2: 74 0b je 1116ff <_Thread_Evaluate_mode+0x27><== NEVER TAKEN _Context_Switch_necessary = true; 1116f4: c6 05 5c 57 12 00 01 movb $0x1,0x12575c 1116fb: b0 01 mov $0x1,%al return true; 1116fd: eb 02 jmp 111701 <_Thread_Evaluate_mode+0x29> 1116ff: 31 c0 xor %eax,%eax } return false; } 111701: c9 leave 111702: c3 ret =============================================================================== 00111704 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 111704: 55 push %ebp 111705: 89 e5 mov %esp,%ebp 111707: 53 push %ebx 111708: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 11170b: 8b 1d 4c 57 12 00 mov 0x12574c,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 111711: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 111717: 85 c0 test %eax,%eax 111719: 74 03 je 11171e <_Thread_Handler+0x1a> 11171b: fa cli 11171c: eb 01 jmp 11171f <_Thread_Handler+0x1b> 11171e: fb sti #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 11171f: a0 48 53 12 00 mov 0x125348,%al 111724: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 111727: c6 05 48 53 12 00 01 movb $0x1,0x125348 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 11172e: 83 bb e8 00 00 00 00 cmpl $0x0,0xe8(%ebx) 111735: 74 24 je 11175b <_Thread_Handler+0x57> #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 ); 111737: a1 14 57 12 00 mov 0x125714,%eax 11173c: 39 c3 cmp %eax,%ebx 11173e: 74 1b je 11175b <_Thread_Handler+0x57> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 111740: 85 c0 test %eax,%eax 111742: 74 11 je 111755 <_Thread_Handler+0x51> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 111744: 83 ec 0c sub $0xc,%esp 111747: 05 e8 00 00 00 add $0xe8,%eax 11174c: 50 push %eax 11174d: e8 12 bb ff ff call 10d264 <_CPU_Context_save_fp> 111752: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 111755: 89 1d 14 57 12 00 mov %ebx,0x125714 /* * 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 ); 11175b: 83 ec 0c sub $0xc,%esp 11175e: 53 push %ebx 11175f: e8 c0 b6 ff ff call 10ce24 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 111764: e8 c8 aa ff ff call 10c231 <_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 (!doneCons) /* && (volatile void *)_init) */ { 111769: 83 c4 10 add $0x10,%esp 11176c: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 111770: 75 05 jne 111777 <_Thread_Handler+0x73> INIT_NAME (); 111772: e8 89 bf 00 00 call 11d700 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 111777: 83 bb a0 00 00 00 00 cmpl $0x0,0xa0(%ebx) 11177e: 75 15 jne 111795 <_Thread_Handler+0x91> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 111780: 83 ec 0c sub $0xc,%esp 111783: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 111789: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 11178f: 89 43 28 mov %eax,0x28(%ebx) 111792: 83 c4 10 add $0x10,%esp * 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 ); 111795: 83 ec 0c sub $0xc,%esp 111798: 53 push %ebx 111799: e8 b7 b6 ff ff call 10ce55 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 11179e: 83 c4 0c add $0xc,%esp 1117a1: 6a 06 push $0x6 1117a3: 6a 01 push $0x1 1117a5: 6a 00 push $0x0 1117a7: e8 14 9e ff ff call 10b5c0 <_Internal_error_Occurred> =============================================================================== 0010c2c8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10c2c8: 55 push %ebp 10c2c9: 89 e5 mov %esp,%ebp 10c2cb: 57 push %edi 10c2cc: 56 push %esi 10c2cd: 53 push %ebx 10c2ce: 83 ec 24 sub $0x24,%esp 10c2d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c2d4: 8b 75 14 mov 0x14(%ebp),%esi 10c2d7: 8a 55 18 mov 0x18(%ebp),%dl 10c2da: 8a 45 20 mov 0x20(%ebp),%al 10c2dd: 88 45 e7 mov %al,-0x19(%ebp) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 10c2e0: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10c2e7: 00 00 00 10c2ea: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10c2f1: 00 00 00 10c2f4: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10c2fb: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10c2fe: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10c305: 00 00 00 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10c308: 56 push %esi 10c309: 53 push %ebx 10c30a: 88 55 e0 mov %dl,-0x20(%ebp) 10c30d: e8 36 08 00 00 call 10cb48 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10c312: 83 c4 10 add $0x10,%esp 10c315: 39 f0 cmp %esi,%eax 10c317: 8a 55 e0 mov -0x20(%ebp),%dl 10c31a: 72 04 jb 10c320 <_Thread_Initialize+0x58> 10c31c: 85 c0 test %eax,%eax 10c31e: 75 07 jne 10c327 <_Thread_Initialize+0x5f><== ALWAYS TAKEN 10c320: 31 c0 xor %eax,%eax 10c322: e9 b9 01 00 00 jmp 10c4e0 <_Thread_Initialize+0x218> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10c327: 8b 8b cc 00 00 00 mov 0xcc(%ebx),%ecx 10c32d: 89 8b c4 00 00 00 mov %ecx,0xc4(%ebx) the_stack->size = size; 10c333: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10c339: 31 ff xor %edi,%edi 10c33b: 84 d2 test %dl,%dl 10c33d: 74 19 je 10c358 <_Thread_Initialize+0x90> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 10c33f: 83 ec 0c sub $0xc,%esp 10c342: 6a 6c push $0x6c 10c344: e8 6b 0e 00 00 call 10d1b4 <_Workspace_Allocate> 10c349: 89 c7 mov %eax,%edi if ( !fp_area ) 10c34b: 83 c4 10 add $0x10,%esp 10c34e: 31 f6 xor %esi,%esi 10c350: 85 c0 test %eax,%eax 10c352: 0f 84 02 01 00 00 je 10c45a <_Thread_Initialize+0x192> goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 10c358: 89 bb e8 00 00 00 mov %edi,0xe8(%ebx) the_thread->Start.fp_context = fp_area; 10c35e: 89 bb c8 00 00 00 mov %edi,0xc8(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10c364: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10c36b: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10c372: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10c379: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10c380: a1 2c 57 12 00 mov 0x12572c,%eax 10c385: 31 f6 xor %esi,%esi 10c387: 85 c0 test %eax,%eax 10c389: 74 1d je 10c3a8 <_Thread_Initialize+0xe0> extensions_area = _Workspace_Allocate( 10c38b: 83 ec 0c sub $0xc,%esp 10c38e: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10c395: 50 push %eax 10c396: e8 19 0e 00 00 call 10d1b4 <_Workspace_Allocate> 10c39b: 89 c6 mov %eax,%esi (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10c39d: 83 c4 10 add $0x10,%esp 10c3a0: 85 c0 test %eax,%eax 10c3a2: 0f 84 b2 00 00 00 je 10c45a <_Thread_Initialize+0x192> goto failed; } the_thread->extensions = (void **) extensions_area; 10c3a8: 89 b3 fc 00 00 00 mov %esi,0xfc(%ebx) * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 10c3ae: 85 f6 test %esi,%esi 10c3b0: 74 1c je 10c3ce <_Thread_Initialize+0x106> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c3b2: 8b 0d 2c 57 12 00 mov 0x12572c,%ecx 10c3b8: 31 c0 xor %eax,%eax 10c3ba: eb 0e jmp 10c3ca <_Thread_Initialize+0x102> the_thread->extensions[i] = NULL; 10c3bc: 8b 93 fc 00 00 00 mov 0xfc(%ebx),%edx 10c3c2: c7 04 82 00 00 00 00 movl $0x0,(%edx,%eax,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10c3c9: 40 inc %eax 10c3ca: 39 c8 cmp %ecx,%eax 10c3cc: 76 ee jbe 10c3bc <_Thread_Initialize+0xf4> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10c3ce: 8a 45 e7 mov -0x19(%ebp),%al 10c3d1: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10c3d7: 8b 45 24 mov 0x24(%ebp),%eax 10c3da: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10c3e0: 8b 45 28 mov 0x28(%ebp),%eax 10c3e3: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10c3e9: 8b 45 2c mov 0x2c(%ebp),%eax 10c3ec: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10c3f2: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10c3f9: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10c400: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10c407: 8b 45 1c mov 0x1c(%ebp),%eax 10c40a: 89 43 18 mov %eax,0x18(%ebx) the_thread->Start.initial_priority = priority; 10c40d: 89 83 bc 00 00 00 mov %eax,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10c413: 52 push %edx 10c414: 52 push %edx 10c415: 50 push %eax 10c416: 53 push %ebx 10c417: e8 84 05 00 00 call 10c9a0 <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10c41c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10c423: 00 00 00 10c426: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10c42d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c430: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10c434: 8b 45 08 mov 0x8(%ebp),%eax 10c437: 8b 40 1c mov 0x1c(%eax),%eax 10c43a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c43d: 8b 45 30 mov 0x30(%ebp),%eax 10c440: 89 43 0c mov %eax,0xc(%ebx) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 10c443: 89 1c 24 mov %ebx,(%esp) 10c446: e8 79 0a 00 00 call 10cec4 <_User_extensions_Thread_create> 10c44b: 88 c2 mov %al,%dl if ( extension_status ) 10c44d: 83 c4 10 add $0x10,%esp 10c450: b0 01 mov $0x1,%al 10c452: 84 d2 test %dl,%dl 10c454: 0f 85 86 00 00 00 jne 10c4e0 <_Thread_Initialize+0x218> return true; failed: if ( the_thread->libc_reent ) 10c45a: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 10c460: 85 c0 test %eax,%eax 10c462: 74 0c je 10c470 <_Thread_Initialize+0x1a8> _Workspace_Free( the_thread->libc_reent ); 10c464: 83 ec 0c sub $0xc,%esp 10c467: 50 push %eax 10c468: e8 60 0d 00 00 call 10d1cd <_Workspace_Free> 10c46d: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c470: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10c476: 85 c0 test %eax,%eax 10c478: 74 0c je 10c486 <_Thread_Initialize+0x1be> _Workspace_Free( the_thread->API_Extensions[i] ); 10c47a: 83 ec 0c sub $0xc,%esp 10c47d: 50 push %eax 10c47e: e8 4a 0d 00 00 call 10d1cd <_Workspace_Free> 10c483: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c486: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10c48c: 85 c0 test %eax,%eax 10c48e: 74 0c je 10c49c <_Thread_Initialize+0x1d4><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c490: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c493: 50 push %eax <== NOT EXECUTED 10c494: e8 34 0d 00 00 call 10d1cd <_Workspace_Free> <== NOT EXECUTED 10c499: 83 c4 10 add $0x10,%esp <== NOT EXECUTED failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10c49c: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10c4a2: 85 c0 test %eax,%eax 10c4a4: 74 0c je 10c4b2 <_Thread_Initialize+0x1ea><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10c4a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c4a9: 50 push %eax <== NOT EXECUTED 10c4aa: e8 1e 0d 00 00 call 10d1cd <_Workspace_Free> <== NOT EXECUTED 10c4af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10c4b2: 85 f6 test %esi,%esi 10c4b4: 74 0c je 10c4c2 <_Thread_Initialize+0x1fa> (void) _Workspace_Free( extensions_area ); 10c4b6: 83 ec 0c sub $0xc,%esp 10c4b9: 56 push %esi 10c4ba: e8 0e 0d 00 00 call 10d1cd <_Workspace_Free> 10c4bf: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10c4c2: 85 ff test %edi,%edi 10c4c4: 74 0c je 10c4d2 <_Thread_Initialize+0x20a> (void) _Workspace_Free( fp_area ); 10c4c6: 83 ec 0c sub $0xc,%esp 10c4c9: 57 push %edi 10c4ca: e8 fe 0c 00 00 call 10d1cd <_Workspace_Free> 10c4cf: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10c4d2: 83 ec 0c sub $0xc,%esp 10c4d5: 53 push %ebx 10c4d6: e8 bd 06 00 00 call 10cb98 <_Thread_Stack_Free> 10c4db: 31 c0 xor %eax,%eax return false; 10c4dd: 83 c4 10 add $0x10,%esp } 10c4e0: 8d 65 f4 lea -0xc(%ebp),%esp 10c4e3: 5b pop %ebx 10c4e4: 5e pop %esi 10c4e5: 5f pop %edi 10c4e6: c9 leave 10c4e7: c3 ret =============================================================================== 0010fe90 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 10fe90: 55 push %ebp 10fe91: 89 e5 mov %esp,%ebp 10fe93: 56 push %esi 10fe94: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10fe95: a1 4c 57 12 00 mov 0x12574c,%eax ready = executing->ready; 10fe9a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10fea0: 9c pushf 10fea1: fa cli 10fea2: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 10fea3: 8b 1a mov (%edx),%ebx 10fea5: 3b 5a 08 cmp 0x8(%edx),%ebx 10fea8: 74 33 je 10fedd <_Thread_Reset_timeslice+0x4d> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10feaa: 8b 30 mov (%eax),%esi previous = the_node->previous; 10feac: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10feaf: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10feb2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10feb4: 8d 5a 04 lea 0x4(%edx),%ebx 10feb7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10feb9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10febc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10febf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10fec1: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10fec4: 51 push %ecx 10fec5: 9d popf 10fec6: fa cli if ( _Thread_Is_heir( executing ) ) 10fec7: 3b 05 1c 57 12 00 cmp 0x12571c,%eax 10fecd: 75 07 jne 10fed6 <_Thread_Reset_timeslice+0x46><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10fecf: 8b 02 mov (%edx),%eax 10fed1: a3 1c 57 12 00 mov %eax,0x12571c _Context_Switch_necessary = true; 10fed6: c6 05 5c 57 12 00 01 movb $0x1,0x12575c _ISR_Enable( level ); 10fedd: 51 push %ecx 10fede: 9d popf } 10fedf: 5b pop %ebx 10fee0: 5e pop %esi 10fee1: c9 leave 10fee2: c3 ret =============================================================================== 0010f7b0 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 10f7b0: 55 push %ebp 10f7b1: 89 e5 mov %esp,%ebp 10f7b3: 53 push %ebx 10f7b4: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10f7b7: 9c pushf 10f7b8: fa cli 10f7b9: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 10f7ba: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 10f7bd: f6 c2 02 test $0x2,%dl 10f7c0: 74 70 je 10f832 <_Thread_Resume+0x82> <== NEVER TAKEN 10f7c2: 83 e2 fd and $0xfffffffd,%edx current_state = 10f7c5: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 10f7c8: 85 d2 test %edx,%edx 10f7ca: 75 66 jne 10f832 <_Thread_Resume+0x82> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10f7cc: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10f7d2: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 10f7d9: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10f7dc: 66 8b 15 50 89 12 00 mov 0x128950,%dx 10f7e3: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10f7e9: 66 89 15 50 89 12 00 mov %dx,0x128950 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10f7f0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10f7f6: 8d 5a 04 lea 0x4(%edx),%ebx 10f7f9: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10f7fb: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10f7fe: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10f801: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10f803: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 10f806: 51 push %ecx 10f807: 9d popf 10f808: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10f809: 8b 50 14 mov 0x14(%eax),%edx 10f80c: 8b 1d 2c 89 12 00 mov 0x12892c,%ebx 10f812: 3b 53 14 cmp 0x14(%ebx),%edx 10f815: 73 1b jae 10f832 <_Thread_Resume+0x82> _Thread_Heir = the_thread; 10f817: a3 2c 89 12 00 mov %eax,0x12892c if ( _Thread_Executing->is_preemptible || 10f81c: a1 5c 89 12 00 mov 0x12895c,%eax 10f821: 80 78 75 00 cmpb $0x0,0x75(%eax) 10f825: 75 04 jne 10f82b <_Thread_Resume+0x7b> 10f827: 85 d2 test %edx,%edx 10f829: 75 07 jne 10f832 <_Thread_Resume+0x82> <== ALWAYS TAKEN the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10f82b: c6 05 6c 89 12 00 01 movb $0x1,0x12896c } } } _ISR_Enable( level ); 10f832: 51 push %ecx 10f833: 9d popf } 10f834: 5b pop %ebx 10f835: c9 leave 10f836: c3 ret =============================================================================== 0010ccb0 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10ccb0: 55 push %ebp 10ccb1: 89 e5 mov %esp,%ebp 10ccb3: 56 push %esi 10ccb4: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10ccb5: a1 4c 57 12 00 mov 0x12574c,%eax ready = executing->ready; 10ccba: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10ccc0: 9c pushf 10ccc1: fa cli 10ccc2: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10ccc3: 8b 1a mov (%edx),%ebx 10ccc5: 3b 5a 08 cmp 0x8(%edx),%ebx 10ccc8: 74 2e je 10ccf8 <_Thread_Yield_processor+0x48> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10ccca: 8b 30 mov (%eax),%esi previous = the_node->previous; 10cccc: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10cccf: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10ccd2: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10ccd4: 8d 5a 04 lea 0x4(%edx),%ebx 10ccd7: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10ccd9: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10ccdc: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10ccdf: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10cce1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10cce4: 51 push %ecx 10cce5: 9d popf 10cce6: fa cli if ( _Thread_Is_heir( executing ) ) 10cce7: 3b 05 1c 57 12 00 cmp 0x12571c,%eax 10cced: 75 11 jne 10cd00 <_Thread_Yield_processor+0x50><== NEVER TAKEN _Thread_Heir = (Thread_Control *) ready->first; 10ccef: 8b 02 mov (%edx),%eax 10ccf1: a3 1c 57 12 00 mov %eax,0x12571c 10ccf6: eb 08 jmp 10cd00 <_Thread_Yield_processor+0x50> _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10ccf8: 3b 05 1c 57 12 00 cmp 0x12571c,%eax 10ccfe: 74 07 je 10cd07 <_Thread_Yield_processor+0x57><== ALWAYS TAKEN _Context_Switch_necessary = true; 10cd00: c6 05 5c 57 12 00 01 movb $0x1,0x12575c _ISR_Enable( level ); 10cd07: 51 push %ecx 10cd08: 9d popf } 10cd09: 5b pop %ebx 10cd0a: 5e pop %esi 10cd0b: c9 leave 10cd0c: c3 ret =============================================================================== 0010c748 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10c748: 55 push %ebp 10c749: 89 e5 mov %esp,%ebp 10c74b: 57 push %edi 10c74c: 56 push %esi 10c74d: 53 push %ebx 10c74e: 83 ec 10 sub $0x10,%esp 10c751: 8b 4d 08 mov 0x8(%ebp),%ecx 10c754: 8b 45 0c mov 0xc(%ebp),%eax */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10c757: 8d 50 3c lea 0x3c(%eax),%edx 10c75a: 89 50 38 mov %edx,0x38(%eax) the_chain->permanent_null = NULL; 10c75d: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) the_chain->last = _Chain_Head(the_chain); 10c764: 8d 50 38 lea 0x38(%eax),%edx 10c767: 89 50 40 mov %edx,0x40(%eax) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10c76a: 8b 58 14 mov 0x14(%eax),%ebx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10c76d: 89 de mov %ebx,%esi 10c76f: c1 ee 06 shr $0x6,%esi 10c772: 6b f6 0c imul $0xc,%esi,%esi 10c775: 8d 34 31 lea (%ecx,%esi,1),%esi block_state = the_thread_queue->state; 10c778: 8b 79 38 mov 0x38(%ecx),%edi if ( _Thread_queue_Is_reverse_search( priority ) ) 10c77b: f6 c3 20 test $0x20,%bl 10c77e: 75 65 jne 10c7e5 <_Thread_queue_Enqueue_priority+0x9d> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10c780: 8d 56 04 lea 0x4(%esi),%edx 10c783: 89 55 e8 mov %edx,-0x18(%ebp) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10c786: 9c pushf 10c787: fa cli 10c788: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->first; 10c78b: 8b 16 mov (%esi),%edx 10c78d: c7 45 ec ff ff ff ff movl $0xffffffff,-0x14(%ebp) 10c794: 89 75 e4 mov %esi,-0x1c(%ebp) while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c797: eb 1f jmp 10c7b8 <_Thread_queue_Enqueue_priority+0x70> search_priority = search_thread->current_priority; 10c799: 8b 72 14 mov 0x14(%edx),%esi 10c79c: 89 75 ec mov %esi,-0x14(%ebp) if ( priority <= search_priority ) 10c79f: 39 f3 cmp %esi,%ebx 10c7a1: 76 1a jbe 10c7bd <_Thread_queue_Enqueue_priority+0x75> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10c7a3: ff 75 f0 pushl -0x10(%ebp) 10c7a6: 9d popf 10c7a7: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c7a8: 85 7a 10 test %edi,0x10(%edx) 10c7ab: 75 09 jne 10c7b6 <_Thread_queue_Enqueue_priority+0x6e><== ALWAYS TAKEN 10c7ad: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED _ISR_Enable( level ); 10c7b0: ff 75 f0 pushl -0x10(%ebp) <== NOT EXECUTED 10c7b3: 9d popf <== NOT EXECUTED goto restart_forward_search; 10c7b4: eb d0 jmp 10c786 <_Thread_queue_Enqueue_priority+0x3e><== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10c7b6: 8b 12 mov (%edx),%edx restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10c7b8: 3b 55 e8 cmp -0x18(%ebp),%edx 10c7bb: 75 dc jne 10c799 <_Thread_queue_Enqueue_priority+0x51> 10c7bd: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10c7c0: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c7c4: 0f 85 9e 00 00 00 jne 10c868 <_Thread_queue_Enqueue_priority+0x120> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c7ca: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c7d1: 3b 5d ec cmp -0x14(%ebp),%ebx 10c7d4: 74 7b je 10c851 <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10c7d6: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c7d9: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c7db: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c7de: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c7e0: 89 42 04 mov %eax,0x4(%edx) 10c7e3: eb 5e jmp 10c843 <_Thread_queue_Enqueue_priority+0xfb> the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10c7e5: 0f b6 15 14 17 12 00 movzbl 0x121714,%edx 10c7ec: 42 inc %edx 10c7ed: 89 55 ec mov %edx,-0x14(%ebp) _ISR_Disable( level ); 10c7f0: 9c pushf 10c7f1: fa cli 10c7f2: 8f 45 f0 popl -0x10(%ebp) search_thread = (Thread_Control *) header->last; 10c7f5: 8b 56 08 mov 0x8(%esi),%edx 10c7f8: 89 75 e8 mov %esi,-0x18(%ebp) while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c7fb: eb 20 jmp 10c81d <_Thread_queue_Enqueue_priority+0xd5> search_priority = search_thread->current_priority; 10c7fd: 8b 72 14 mov 0x14(%edx),%esi 10c800: 89 75 ec mov %esi,-0x14(%ebp) if ( priority >= search_priority ) 10c803: 39 f3 cmp %esi,%ebx 10c805: 73 1b jae 10c822 <_Thread_queue_Enqueue_priority+0xda> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10c807: ff 75 f0 pushl -0x10(%ebp) 10c80a: 9d popf 10c80b: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10c80c: 85 7a 10 test %edi,0x10(%edx) 10c80f: 75 09 jne 10c81a <_Thread_queue_Enqueue_priority+0xd2> 10c811: 8b 75 e8 mov -0x18(%ebp),%esi _ISR_Enable( level ); 10c814: ff 75 f0 pushl -0x10(%ebp) 10c817: 9d popf goto restart_reverse_search; 10c818: eb cb jmp 10c7e5 <_Thread_queue_Enqueue_priority+0x9d> } search_thread = (Thread_Control *) 10c81a: 8b 52 04 mov 0x4(%edx),%edx restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10c81d: 3b 55 e8 cmp -0x18(%ebp),%edx 10c820: 75 db jne 10c7fd <_Thread_queue_Enqueue_priority+0xb5> 10c822: 8b 75 f0 mov -0x10(%ebp),%esi } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10c825: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10c829: 75 3d jne 10c868 <_Thread_queue_Enqueue_priority+0x120> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10c82b: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10c832: 3b 5d ec cmp -0x14(%ebp),%ebx 10c835: 74 1a je 10c851 <_Thread_queue_Enqueue_priority+0x109> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10c837: 8b 1a mov (%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10c839: 89 18 mov %ebx,(%eax) the_node->previous = search_node; 10c83b: 89 50 04 mov %edx,0x4(%eax) search_node->next = the_node; 10c83e: 89 02 mov %eax,(%edx) next_node->previous = the_node; 10c840: 89 43 04 mov %eax,0x4(%ebx) the_thread->Wait.queue = the_thread_queue; 10c843: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c846: ff 75 f0 pushl -0x10(%ebp) 10c849: 9d popf 10c84a: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c84f: eb 1f jmp 10c870 <_Thread_queue_Enqueue_priority+0x128> 10c851: 83 c2 3c add $0x3c,%edx equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10c854: 8b 5a 04 mov 0x4(%edx),%ebx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10c857: 89 10 mov %edx,(%eax) the_node->previous = previous_node; 10c859: 89 58 04 mov %ebx,0x4(%eax) previous_node->next = the_node; 10c85c: 89 03 mov %eax,(%ebx) search_node->previous = the_node; 10c85e: 89 42 04 mov %eax,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10c861: 89 48 44 mov %ecx,0x44(%eax) _ISR_Enable( level ); 10c864: 56 push %esi 10c865: 9d popf 10c866: eb e2 jmp 10c84a <_Thread_queue_Enqueue_priority+0x102> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10c868: 8b 45 10 mov 0x10(%ebp),%eax 10c86b: 89 30 mov %esi,(%eax) return the_thread_queue->sync_state; 10c86d: 8b 41 30 mov 0x30(%ecx),%eax } 10c870: 83 c4 10 add $0x10,%esp 10c873: 5b pop %ebx 10c874: 5e pop %esi 10c875: 5f pop %edi 10c876: c9 leave 10c877: c3 ret =============================================================================== 0010c918 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10c918: 55 push %ebp 10c919: 89 e5 mov %esp,%ebp 10c91b: 57 push %edi 10c91c: 56 push %esi 10c91d: 53 push %ebx 10c91e: 83 ec 1c sub $0x1c,%esp 10c921: 8b 75 08 mov 0x8(%ebp),%esi 10c924: 8b 7d 0c mov 0xc(%ebp),%edi /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 10c927: 85 f6 test %esi,%esi 10c929: 74 36 je 10c961 <_Thread_queue_Requeue+0x49><== 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 ) { 10c92b: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10c92f: 75 30 jne 10c961 <_Thread_queue_Requeue+0x49><== NEVER TAKEN Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 10c931: 9c pushf 10c932: fa cli 10c933: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10c934: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10c93b: 74 22 je 10c95f <_Thread_queue_Requeue+0x47><== NEVER TAKEN 10c93d: c7 46 30 01 00 00 00 movl $0x1,0x30(%esi) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 10c944: 50 push %eax 10c945: 6a 01 push $0x1 10c947: 57 push %edi 10c948: 56 push %esi 10c949: e8 aa 33 00 00 call 10fcf8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10c94e: 83 c4 0c add $0xc,%esp 10c951: 8d 45 e4 lea -0x1c(%ebp),%eax 10c954: 50 push %eax 10c955: 57 push %edi 10c956: 56 push %esi 10c957: e8 ec fd ff ff call 10c748 <_Thread_queue_Enqueue_priority> 10c95c: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c95f: 53 push %ebx 10c960: 9d popf } } 10c961: 8d 65 f4 lea -0xc(%ebp),%esp 10c964: 5b pop %ebx 10c965: 5e pop %esi 10c966: 5f pop %edi 10c967: c9 leave 10c968: c3 ret =============================================================================== 0010c96c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10c96c: 55 push %ebp 10c96d: 89 e5 mov %esp,%ebp 10c96f: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10c972: 8d 45 f4 lea -0xc(%ebp),%eax 10c975: 50 push %eax 10c976: ff 75 08 pushl 0x8(%ebp) 10c979: e8 d6 f8 ff ff call 10c254 <_Thread_Get> switch ( location ) { 10c97e: 83 c4 10 add $0x10,%esp 10c981: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 10c985: 75 17 jne 10c99e <_Thread_queue_Timeout+0x32><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 10c987: 83 ec 0c sub $0xc,%esp 10c98a: 50 push %eax 10c98b: e8 14 34 00 00 call 10fda4 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c990: a1 90 56 12 00 mov 0x125690,%eax 10c995: 48 dec %eax 10c996: a3 90 56 12 00 mov %eax,0x125690 10c99b: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10c99e: c9 leave 10c99f: c3 ret =============================================================================== 00100238 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { 100238: 55 push %ebp 100239: 89 e5 mov %esp,%ebp } 10023b: c9 leave 10023c: c3 ret =============================================================================== 0011721c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11721c: 55 push %ebp 11721d: 89 e5 mov %esp,%ebp 11721f: 57 push %edi 117220: 56 push %esi 117221: 53 push %ebx 117222: 83 ec 4c sub $0x4c,%esp 117225: 8b 5d 08 mov 0x8(%ebp),%ebx 117228: 8d 45 dc lea -0x24(%ebp),%eax 11722b: 8d 55 e0 lea -0x20(%ebp),%edx 11722e: 89 55 b4 mov %edx,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117231: 89 55 dc mov %edx,-0x24(%ebp) the_chain->permanent_null = NULL; 117234: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 11723b: 89 45 e4 mov %eax,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11723e: 8d 75 d0 lea -0x30(%ebp),%esi 117241: 8d 55 d4 lea -0x2c(%ebp),%edx 117244: 89 55 b0 mov %edx,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 117247: 89 55 d0 mov %edx,-0x30(%ebp) the_chain->permanent_null = NULL; 11724a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 117251: 89 75 d8 mov %esi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 117254: 8d 53 30 lea 0x30(%ebx),%edx 117257: 89 55 c0 mov %edx,-0x40(%ebp) /* * 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 ); 11725a: 8d 7b 68 lea 0x68(%ebx),%edi static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 11725d: 8d 4b 08 lea 0x8(%ebx),%ecx 117260: 89 4d b8 mov %ecx,-0x48(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 117263: 8d 53 40 lea 0x40(%ebx),%edx 117266: 89 55 bc mov %edx,-0x44(%ebp) { /* * 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; 117269: 8d 4d dc lea -0x24(%ebp),%ecx 11726c: 89 4b 78 mov %ecx,0x78(%ebx) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 11726f: a1 b0 e6 13 00 mov 0x13e6b0,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 117274: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 117277: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11727a: 51 push %ecx 11727b: 8d 4d d0 lea -0x30(%ebp),%ecx 11727e: 51 push %ecx 11727f: 29 d0 sub %edx,%eax 117281: 50 push %eax 117282: ff 75 c0 pushl -0x40(%ebp) 117285: e8 3a 35 00 00 call 11a7c4 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11728a: a1 f4 e5 13 00 mov 0x13e5f4,%eax 11728f: 89 45 c4 mov %eax,-0x3c(%ebp) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 117292: 8b 43 74 mov 0x74(%ebx),%eax /* * 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 ) { 117295: 83 c4 10 add $0x10,%esp 117298: 39 45 c4 cmp %eax,-0x3c(%ebp) 11729b: 76 13 jbe 1172b0 <_Timer_server_Body+0x94> /* * 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 ); 11729d: 52 push %edx 11729e: 8d 55 d0 lea -0x30(%ebp),%edx 1172a1: 52 push %edx 1172a2: 8b 4d c4 mov -0x3c(%ebp),%ecx 1172a5: 29 c1 sub %eax,%ecx 1172a7: 51 push %ecx 1172a8: 57 push %edi 1172a9: e8 16 35 00 00 call 11a7c4 <_Watchdog_Adjust_to_chain> 1172ae: eb 0f jmp 1172bf <_Timer_server_Body+0xa3> } else if ( snapshot < last_snapshot ) { 1172b0: 73 10 jae 1172c2 <_Timer_server_Body+0xa6> /* * 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 ); 1172b2: 51 push %ecx 1172b3: 2b 45 c4 sub -0x3c(%ebp),%eax 1172b6: 50 push %eax 1172b7: 6a 01 push $0x1 1172b9: 57 push %edi 1172ba: e8 99 34 00 00 call 11a758 <_Watchdog_Adjust> 1172bf: 83 c4 10 add $0x10,%esp } watchdogs->last_snapshot = snapshot; 1172c2: 8b 45 c4 mov -0x3c(%ebp),%eax 1172c5: 89 43 74 mov %eax,0x74(%ebx) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1172c8: 8b 43 78 mov 0x78(%ebx),%eax 1172cb: 83 ec 0c sub $0xc,%esp 1172ce: 50 push %eax 1172cf: e8 dc 06 00 00 call 1179b0 <_Chain_Get> if ( timer == NULL ) { 1172d4: 83 c4 10 add $0x10,%esp 1172d7: 85 c0 test %eax,%eax 1172d9: 74 29 je 117304 <_Timer_server_Body+0xe8><== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1172db: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1172de: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1172e1: 75 0b jne 1172ee <_Timer_server_Body+0xd2><== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1172e3: 52 push %edx <== NOT EXECUTED 1172e4: 52 push %edx <== NOT EXECUTED 1172e5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172e8: 50 push %eax <== NOT EXECUTED 1172e9: ff 75 c0 pushl -0x40(%ebp) <== NOT EXECUTED 1172ec: eb 0c jmp 1172fa <_Timer_server_Body+0xde><== NOT EXECUTED } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1172ee: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1172f1: 75 d5 jne 1172c8 <_Timer_server_Body+0xac><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1172f3: 51 push %ecx <== NOT EXECUTED 1172f4: 51 push %ecx <== NOT EXECUTED 1172f5: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1172f8: 50 push %eax <== NOT EXECUTED 1172f9: 57 push %edi <== NOT EXECUTED 1172fa: e8 4d 35 00 00 call 11a84c <_Watchdog_Insert> <== NOT EXECUTED 1172ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 117302: eb c4 jmp 1172c8 <_Timer_server_Body+0xac><== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 117304: 9c pushf 117305: fa cli 117306: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 117307: 8b 55 b4 mov -0x4c(%ebp),%edx 11730a: 39 55 dc cmp %edx,-0x24(%ebp) 11730d: 75 13 jne 117322 <_Timer_server_Body+0x106><== NEVER TAKEN ts->insert_chain = NULL; 11730f: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 117316: 50 push %eax 117317: 9d popf _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 ) ) { 117318: 8b 4d b0 mov -0x50(%ebp),%ecx 11731b: 39 4d d0 cmp %ecx,-0x30(%ebp) 11731e: 75 09 jne 117329 <_Timer_server_Body+0x10d> 117320: eb 3e jmp 117360 <_Timer_server_Body+0x144> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 117322: 50 push %eax <== NOT EXECUTED 117323: 9d popf <== NOT EXECUTED 117324: e9 46 ff ff ff jmp 11726f <_Timer_server_Body+0x53><== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 117329: 9c pushf 11732a: fa cli 11732b: 5a pop %edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11732c: 8b 45 d0 mov -0x30(%ebp),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11732f: 3b 45 b0 cmp -0x50(%ebp),%eax 117332: 74 25 je 117359 <_Timer_server_Body+0x13d> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 117334: 8b 08 mov (%eax),%ecx the_chain->first = new_first; 117336: 89 4d d0 mov %ecx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 117339: 89 71 04 mov %esi,0x4(%ecx) watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 11733c: 85 c0 test %eax,%eax 11733e: 74 19 je 117359 <_Timer_server_Body+0x13d><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; 117340: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 117347: 52 push %edx 117348: 9d popf /* * 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 ); 117349: 52 push %edx 11734a: 52 push %edx 11734b: ff 70 24 pushl 0x24(%eax) 11734e: ff 70 20 pushl 0x20(%eax) 117351: ff 50 1c call *0x1c(%eax) } 117354: 83 c4 10 add $0x10,%esp 117357: eb d0 jmp 117329 <_Timer_server_Body+0x10d> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 117359: 52 push %edx 11735a: 9d popf 11735b: e9 09 ff ff ff jmp 117269 <_Timer_server_Body+0x4d> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 117360: c6 43 7c 00 movb $0x0,0x7c(%ebx) 117364: a1 64 e5 13 00 mov 0x13e564,%eax 117369: 40 inc %eax 11736a: a3 64 e5 13 00 mov %eax,0x13e564 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 11736f: 50 push %eax 117370: 50 push %eax 117371: 6a 08 push $0x8 117373: ff 33 pushl (%ebx) 117375: e8 f2 2c 00 00 call 11a06c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 11737a: 89 d8 mov %ebx,%eax 11737c: e8 0f fe ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 117381: 89 d8 mov %ebx,%eax 117383: e8 4e fe ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 117388: e8 d0 23 00 00 call 11975d <_Thread_Enable_dispatch> ts->active = true; 11738d: c6 43 7c 01 movb $0x1,0x7c(%ebx) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 117391: 59 pop %ecx 117392: ff 75 b8 pushl -0x48(%ebp) 117395: e8 c6 35 00 00 call 11a960 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 11739a: 5a pop %edx 11739b: ff 75 bc pushl -0x44(%ebp) 11739e: e8 bd 35 00 00 call 11a960 <_Watchdog_Remove> 1173a3: 83 c4 10 add $0x10,%esp 1173a6: e9 be fe ff ff jmp 117269 <_Timer_server_Body+0x4d> =============================================================================== 001173ab <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1173ab: 55 push %ebp 1173ac: 89 e5 mov %esp,%ebp 1173ae: 57 push %edi 1173af: 56 push %esi 1173b0: 53 push %ebx 1173b1: 83 ec 2c sub $0x2c,%esp 1173b4: 8b 5d 08 mov 0x8(%ebp),%ebx 1173b7: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1173ba: 8b 53 78 mov 0x78(%ebx),%edx 1173bd: 85 d2 test %edx,%edx 1173bf: 0f 85 e6 00 00 00 jne 1174ab <_Timer_server_Schedule_operation_method+0x100><== NEVER TAKEN 1173c5: 8b 15 64 e5 13 00 mov 0x13e564,%edx 1173cb: 42 inc %edx 1173cc: 89 15 64 e5 13 00 mov %edx,0x13e564 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1173d2: 8b 50 38 mov 0x38(%eax),%edx 1173d5: 83 fa 01 cmp $0x1,%edx 1173d8: 75 5a jne 117434 <_Timer_server_Schedule_operation_method+0x89> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 1173da: 9c pushf 1173db: fa cli 1173dc: 8f 45 e0 popl -0x20(%ebp) snapshot = _Watchdog_Ticks_since_boot; 1173df: 8b 0d b0 e6 13 00 mov 0x13e6b0,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 1173e5: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1173e8: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1173eb: 8d 7b 34 lea 0x34(%ebx),%edi 1173ee: 39 fa cmp %edi,%edx 1173f0: 74 19 je 11740b <_Timer_server_Schedule_operation_method+0x60> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 1173f2: 89 cf mov %ecx,%edi 1173f4: 29 f7 sub %esi,%edi 1173f6: 89 7d e4 mov %edi,-0x1c(%ebp) delta_interval = first_watchdog->delta_interval; 1173f9: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 1173fc: 31 f6 xor %esi,%esi 1173fe: 3b 7d e4 cmp -0x1c(%ebp),%edi 117401: 76 05 jbe 117408 <_Timer_server_Schedule_operation_method+0x5d> delta_interval -= delta; 117403: 89 fe mov %edi,%esi 117405: 2b 75 e4 sub -0x1c(%ebp),%esi } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 117408: 89 72 10 mov %esi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 11740b: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 11740e: ff 75 e0 pushl -0x20(%ebp) 117411: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 117412: 57 push %edi 117413: 57 push %edi 117414: 83 c0 10 add $0x10,%eax 117417: 50 push %eax 117418: 8d 43 30 lea 0x30(%ebx),%eax 11741b: 50 push %eax 11741c: e8 2b 34 00 00 call 11a84c <_Watchdog_Insert> if ( !ts->active ) { 117421: 8a 43 7c mov 0x7c(%ebx),%al 117424: 83 c4 10 add $0x10,%esp 117427: 84 c0 test %al,%al 117429: 75 74 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_interval_system_watchdog( ts ); 11742b: 89 d8 mov %ebx,%eax 11742d: e8 5e fd ff ff call 117190 <_Timer_server_Reset_interval_system_watchdog> 117432: eb 6b jmp 11749f <_Timer_server_Schedule_operation_method+0xf4> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 117434: 83 fa 03 cmp $0x3,%edx 117437: 75 66 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 117439: 9c pushf 11743a: fa cli 11743b: 8f 45 e0 popl -0x20(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 11743e: 8b 0d f4 e5 13 00 mov 0x13e5f4,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 117444: 8b 53 74 mov 0x74(%ebx),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 117447: 8b 73 68 mov 0x68(%ebx),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11744a: 8d 7b 6c lea 0x6c(%ebx),%edi 11744d: 39 fe cmp %edi,%esi 11744f: 74 27 je 117478 <_Timer_server_Schedule_operation_method+0xcd> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 117451: 8b 7e 10 mov 0x10(%esi),%edi 117454: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 117457: 39 d1 cmp %edx,%ecx 117459: 76 15 jbe 117470 <_Timer_server_Schedule_operation_method+0xc5> /* * We advanced in time. */ delta = snapshot - last_snapshot; 11745b: 89 cf mov %ecx,%edi 11745d: 29 d7 sub %edx,%edi 11745f: 89 7d e4 mov %edi,-0x1c(%ebp) if (delta_interval > delta) { 117462: 31 d2 xor %edx,%edx 117464: 39 7d d4 cmp %edi,-0x2c(%ebp) 117467: 76 0c jbe 117475 <_Timer_server_Schedule_operation_method+0xca><== NEVER TAKEN delta_interval -= delta; 117469: 8b 55 d4 mov -0x2c(%ebp),%edx 11746c: 29 fa sub %edi,%edx 11746e: eb 05 jmp 117475 <_Timer_server_Schedule_operation_method+0xca> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 117470: 03 55 d4 add -0x2c(%ebp),%edx delta_interval += delta; 117473: 29 ca sub %ecx,%edx } first_watchdog->delta_interval = delta_interval; 117475: 89 56 10 mov %edx,0x10(%esi) } ts->TOD_watchdogs.last_snapshot = snapshot; 117478: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 11747b: ff 75 e0 pushl -0x20(%ebp) 11747e: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 11747f: 56 push %esi 117480: 56 push %esi 117481: 83 c0 10 add $0x10,%eax 117484: 50 push %eax 117485: 8d 43 68 lea 0x68(%ebx),%eax 117488: 50 push %eax 117489: e8 be 33 00 00 call 11a84c <_Watchdog_Insert> if ( !ts->active ) { 11748e: 8a 43 7c mov 0x7c(%ebx),%al 117491: 83 c4 10 add $0x10,%esp 117494: 84 c0 test %al,%al 117496: 75 07 jne 11749f <_Timer_server_Schedule_operation_method+0xf4> _Timer_server_Reset_tod_system_watchdog( ts ); 117498: 89 d8 mov %ebx,%eax 11749a: e8 37 fd ff ff call 1171d6 <_Timer_server_Reset_tod_system_watchdog> * 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 ); } } 11749f: 8d 65 f4 lea -0xc(%ebp),%esp 1174a2: 5b pop %ebx 1174a3: 5e pop %esi 1174a4: 5f pop %edi 1174a5: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 1174a6: e9 b2 22 00 00 jmp 11975d <_Thread_Enable_dispatch> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174ab: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1174ae: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1174b1: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1174b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1174b7: 5b pop %ebx <== NOT EXECUTED 1174b8: 5e pop %esi <== NOT EXECUTED 1174b9: 5f pop %edi <== NOT EXECUTED 1174ba: c9 leave <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 1174bb: e9 b4 04 00 00 jmp 117974 <_Chain_Append> <== NOT EXECUTED =============================================================================== 0010ce55 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ce55: 55 push %ebp 10ce56: 89 e5 mov %esp,%ebp 10ce58: 56 push %esi 10ce59: 53 push %ebx 10ce5a: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ce5d: 8b 1d a8 58 12 00 mov 0x1258a8,%ebx 10ce63: eb 13 jmp 10ce78 <_User_extensions_Thread_exitted+0x23> !_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 ) 10ce65: 8b 43 2c mov 0x2c(%ebx),%eax 10ce68: 85 c0 test %eax,%eax 10ce6a: 74 09 je 10ce75 <_User_extensions_Thread_exitted+0x20> (*the_extension->Callouts.thread_exitted)( executing ); 10ce6c: 83 ec 0c sub $0xc,%esp 10ce6f: 56 push %esi 10ce70: ff d0 call *%eax 10ce72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10ce75: 8b 5b 04 mov 0x4(%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 10ce78: 81 fb a0 58 12 00 cmp $0x1258a0,%ebx 10ce7e: 75 e5 jne 10ce65 <_User_extensions_Thread_exitted+0x10> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 10ce80: 8d 65 f8 lea -0x8(%ebp),%esp 10ce83: 5b pop %ebx 10ce84: 5e pop %esi 10ce85: c9 leave 10ce86: c3 ret =============================================================================== 0010e7b0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 10e7b0: 55 push %ebp 10e7b1: 89 e5 mov %esp,%ebp 10e7b3: 57 push %edi 10e7b4: 56 push %esi 10e7b5: 53 push %ebx 10e7b6: 83 ec 1c sub $0x1c,%esp 10e7b9: 8b 75 08 mov 0x8(%ebp),%esi 10e7bc: 8b 7d 0c mov 0xc(%ebp),%edi 10e7bf: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 10e7c2: 9c pushf 10e7c3: fa cli 10e7c4: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e7c5: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e7c7: 8d 4e 04 lea 0x4(%esi),%ecx * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 10e7ca: 39 ca cmp %ecx,%edx 10e7cc: 74 44 je 10e812 <_Watchdog_Adjust+0x62> switch ( direction ) { 10e7ce: 85 ff test %edi,%edi 10e7d0: 74 3c je 10e80e <_Watchdog_Adjust+0x5e> 10e7d2: 4f dec %edi 10e7d3: 75 3d jne 10e812 <_Watchdog_Adjust+0x62> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 10e7d5: 01 5a 10 add %ebx,0x10(%edx) break; 10e7d8: eb 38 jmp 10e812 <_Watchdog_Adjust+0x62> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10e7da: 8b 16 mov (%esi),%edx case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 10e7dc: 8b 7a 10 mov 0x10(%edx),%edi 10e7df: 39 fb cmp %edi,%ebx 10e7e1: 73 07 jae 10e7ea <_Watchdog_Adjust+0x3a> _Watchdog_First( header )->delta_interval -= units; 10e7e3: 29 df sub %ebx,%edi 10e7e5: 89 7a 10 mov %edi,0x10(%edx) break; 10e7e8: eb 28 jmp 10e812 <_Watchdog_Adjust+0x62> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 10e7ea: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 10e7f1: 50 push %eax 10e7f2: 9d popf _Watchdog_Tickle( header ); 10e7f3: 83 ec 0c sub $0xc,%esp 10e7f6: 56 push %esi 10e7f7: 89 4d e4 mov %ecx,-0x1c(%ebp) 10e7fa: e8 99 01 00 00 call 10e998 <_Watchdog_Tickle> _ISR_Disable( level ); 10e7ff: 9c pushf 10e800: fa cli 10e801: 58 pop %eax if ( _Chain_Is_empty( header ) ) 10e802: 83 c4 10 add $0x10,%esp 10e805: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e808: 39 0e cmp %ecx,(%esi) 10e80a: 74 06 je 10e812 <_Watchdog_Adjust+0x62> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 10e80c: 29 fb sub %edi,%ebx switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 10e80e: 85 db test %ebx,%ebx 10e810: 75 c8 jne 10e7da <_Watchdog_Adjust+0x2a> <== ALWAYS TAKEN } break; } } _ISR_Enable( level ); 10e812: 50 push %eax 10e813: 9d popf } 10e814: 8d 65 f4 lea -0xc(%ebp),%esp 10e817: 5b pop %ebx 10e818: 5e pop %esi 10e819: 5f pop %edi 10e81a: c9 leave 10e81b: c3 ret =============================================================================== 0010d0b8 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10d0b8: 55 push %ebp 10d0b9: 89 e5 mov %esp,%ebp 10d0bb: 56 push %esi 10d0bc: 53 push %ebx 10d0bd: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10d0c0: 9c pushf 10d0c1: fa cli 10d0c2: 5e pop %esi previous_state = the_watchdog->state; 10d0c3: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10d0c6: 83 f8 01 cmp $0x1,%eax 10d0c9: 74 09 je 10d0d4 <_Watchdog_Remove+0x1c> 10d0cb: 72 44 jb 10d111 <_Watchdog_Remove+0x59> 10d0cd: 83 f8 03 cmp $0x3,%eax 10d0d0: 77 3f ja 10d111 <_Watchdog_Remove+0x59> <== NEVER TAKEN 10d0d2: eb 09 jmp 10d0dd <_Watchdog_Remove+0x25> /* * 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; 10d0d4: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10d0db: eb 34 jmp 10d111 <_Watchdog_Remove+0x59> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10d0dd: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10d0e4: 8b 0a mov (%edx),%ecx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10d0e6: 83 39 00 cmpl $0x0,(%ecx) 10d0e9: 74 06 je 10d0f1 <_Watchdog_Remove+0x39> next_watchdog->delta_interval += the_watchdog->delta_interval; 10d0eb: 8b 5a 10 mov 0x10(%edx),%ebx 10d0ee: 01 59 10 add %ebx,0x10(%ecx) if ( _Watchdog_Sync_count ) 10d0f1: 8b 0d d8 57 12 00 mov 0x1257d8,%ecx 10d0f7: 85 c9 test %ecx,%ecx 10d0f9: 74 0c je 10d107 <_Watchdog_Remove+0x4f> _Watchdog_Sync_level = _ISR_Nest_level; 10d0fb: 8b 0d 28 57 12 00 mov 0x125728,%ecx 10d101: 89 0d 48 57 12 00 mov %ecx,0x125748 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10d107: 8b 1a mov (%edx),%ebx previous = the_node->previous; 10d109: 8b 4a 04 mov 0x4(%edx),%ecx next->previous = previous; 10d10c: 89 4b 04 mov %ecx,0x4(%ebx) previous->next = next; 10d10f: 89 19 mov %ebx,(%ecx) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10d111: 8b 0d dc 57 12 00 mov 0x1257dc,%ecx 10d117: 89 4a 18 mov %ecx,0x18(%edx) _ISR_Enable( level ); 10d11a: 56 push %esi 10d11b: 9d popf return( previous_state ); } 10d11c: 5b pop %ebx 10d11d: 5e pop %esi 10d11e: c9 leave 10d11f: c3 ret =============================================================================== 0010e2e8 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 10e2e8: 55 push %ebp 10e2e9: 89 e5 mov %esp,%ebp 10e2eb: 57 push %edi 10e2ec: 56 push %esi 10e2ed: 53 push %ebx 10e2ee: 83 ec 20 sub $0x20,%esp 10e2f1: 8b 7d 08 mov 0x8(%ebp),%edi 10e2f4: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 10e2f7: 9c pushf 10e2f8: fa cli 10e2f9: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 10e2fc: 56 push %esi 10e2fd: 57 push %edi 10e2fe: 68 e4 15 12 00 push $0x1215e4 10e303: e8 74 ab ff ff call 108e7c */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10e308: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e30a: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 10e30d: 83 c4 10 add $0x10,%esp 10e310: 39 f3 cmp %esi,%ebx 10e312: 74 1d je 10e331 <_Watchdog_Report_chain+0x49> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 10e314: 52 push %edx 10e315: 52 push %edx 10e316: 53 push %ebx 10e317: 6a 00 push $0x0 10e319: e8 32 00 00 00 call 10e350 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 10e31e: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 10e320: 83 c4 10 add $0x10,%esp 10e323: 39 f3 cmp %esi,%ebx 10e325: 75 ed jne 10e314 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 10e327: 50 push %eax 10e328: 50 push %eax 10e329: 57 push %edi 10e32a: 68 fb 15 12 00 push $0x1215fb 10e32f: eb 08 jmp 10e339 <_Watchdog_Report_chain+0x51> } else { printk( "Chain is empty\n" ); 10e331: 83 ec 0c sub $0xc,%esp 10e334: 68 0a 16 12 00 push $0x12160a 10e339: e8 3e ab ff ff call 108e7c 10e33e: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10e341: ff 75 e4 pushl -0x1c(%ebp) 10e344: 9d popf } 10e345: 8d 65 f4 lea -0xc(%ebp),%esp 10e348: 5b pop %ebx 10e349: 5e pop %esi 10e34a: 5f pop %edi 10e34b: c9 leave 10e34c: c3 ret =============================================================================== 00121bee <__kill>: #endif int __kill( pid_t pid, int sig ) { 121bee: 55 push %ebp <== NOT EXECUTED 121bef: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121bf1: 31 c0 xor %eax,%eax <== NOT EXECUTED 121bf3: c9 leave <== NOT EXECUTED 121bf4: c3 ret <== NOT EXECUTED =============================================================================== 0011d08c <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 11d08c: 55 push %ebp 11d08d: 89 e5 mov %esp,%ebp 11d08f: 83 ec 08 sub $0x8,%esp 11d092: e8 76 06 00 00 call 11d70d <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 11d097: e8 8c ff ff ff call 11d028 rtems_shutdown_executive(status); 11d09c: 83 ec 0c sub $0xc,%esp 11d09f: ff 75 08 pushl 0x8(%ebp) 11d0a2: e8 e9 00 00 00 call 11d190 11d0a7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11d0aa: eb fe jmp 11d0aa <_exit+0x1e> <== NOT EXECUTED =============================================================================== 00125c72 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 125c72: 55 push %ebp <== NOT EXECUTED 125c73: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125c75: 57 push %edi <== NOT EXECUTED 125c76: 56 push %esi <== NOT EXECUTED 125c77: 53 push %ebx <== NOT EXECUTED 125c78: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125c7b: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 125c7e: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125c81: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 125c84: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 125c87: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 125c8e: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 125c91: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125c94: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 125c97: 31 db xor %ebx,%ebx <== NOT EXECUTED uint32_t c = 0; while (count > 0) 125c99: eb 50 jmp 125ceb <_fat_block_read+0x79> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 125c9b: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125c9e: 51 push %ecx <== NOT EXECUTED 125c9f: 6a 01 push $0x1 <== NOT EXECUTED 125ca1: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 125ca4: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 125ca7: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 125caa: e8 ff fa ff ff call 1257ae <== NOT EXECUTED if (rc != RC_OK) 125caf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125cb2: 85 c0 test %eax,%eax <== NOT EXECUTED 125cb4: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 125cb7: 74 05 je 125cbe <_fat_block_read+0x4c> <== NOT EXECUTED 125cb9: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 125cbc: eb 31 jmp 125cef <_fat_block_read+0x7d> <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 125cbe: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 125cc1: 0f b7 01 movzwl (%ecx),%eax <== NOT EXECUTED 125cc4: 29 f0 sub %esi,%eax <== NOT EXECUTED 125cc6: 39 d0 cmp %edx,%eax <== NOT EXECUTED 125cc8: 76 02 jbe 125ccc <_fat_block_read+0x5a> <== NOT EXECUTED 125cca: 89 d0 mov %edx,%eax <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 125ccc: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 125ccf: 01 d9 add %ebx,%ecx <== NOT EXECUTED 125cd1: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 125cd4: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 125cd7: 03 71 20 add 0x20(%ecx),%esi <== NOT EXECUTED 125cda: 8b 7d cc mov -0x34(%ebp),%edi <== NOT EXECUTED 125cdd: 89 c1 mov %eax,%ecx <== NOT EXECUTED 125cdf: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED count -= c; 125ce1: 29 c2 sub %eax,%edx <== NOT EXECUTED cmpltd += c; 125ce3: 8d 1c 18 lea (%eax,%ebx,1),%ebx <== NOT EXECUTED blk++; 125ce6: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 125ce9: 31 f6 xor %esi,%esi <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 125ceb: 85 d2 test %edx,%edx <== NOT EXECUTED 125ced: 75 ac jne 125c9b <_fat_block_read+0x29> <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 125cef: 89 d8 mov %ebx,%eax <== NOT EXECUTED 125cf1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125cf4: 5b pop %ebx <== NOT EXECUTED 125cf5: 5e pop %esi <== NOT EXECUTED 125cf6: 5f pop %edi <== NOT EXECUTED 125cf7: c9 leave <== NOT EXECUTED 125cf8: c3 ret <== NOT EXECUTED =============================================================================== 00125799 <_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) { 125799: 55 push %ebp <== NOT EXECUTED 12579a: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12579c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 12579f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1257a2: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 1257a5: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1257a8: c9 leave <== 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); 1257a9: e9 b9 fe ff ff jmp 125667 <== NOT EXECUTED =============================================================================== 00125980 <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 125980: 55 push %ebp <== NOT EXECUTED 125981: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125983: 57 push %edi <== NOT EXECUTED 125984: 56 push %esi <== NOT EXECUTED 125985: 53 push %ebx <== NOT EXECUTED 125986: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125989: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12598c: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 12598f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 125996: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 125999: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 12599c: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 12599f: 31 d2 xor %edx,%edx <== NOT EXECUTED uint32_t c = 0; while(count > 0) 1259a1: eb 6b jmp 125a0e <_fat_block_write+0x8e> <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bps - ofs)); 1259a3: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 1259a6: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1259a8: 29 f1 sub %esi,%ecx <== NOT EXECUTED 1259aa: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1259ad: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 1259b0: 39 4d d4 cmp %ecx,-0x2c(%ebp) <== NOT EXECUTED 1259b3: 76 03 jbe 1259b8 <_fat_block_write+0x38> <== NOT EXECUTED 1259b5: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED if (c == fs_info->vol.bps) 1259b8: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 1259bb: 75 08 jne 1259c5 <_fat_block_write+0x45> <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 1259bd: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1259c0: 50 push %eax <== NOT EXECUTED 1259c1: 6a 02 push $0x2 <== NOT EXECUTED 1259c3: eb 06 jmp 1259cb <_fat_block_write+0x4b> <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 1259c5: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1259c8: 51 push %ecx <== NOT EXECUTED 1259c9: 6a 01 push $0x1 <== NOT EXECUTED 1259cb: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 1259ce: 53 push %ebx <== NOT EXECUTED 1259cf: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 1259d2: e8 d7 fd ff ff call 1257ae <== NOT EXECUTED 1259d7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1259da: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) 1259dd: 85 c0 test %eax,%eax <== NOT EXECUTED 1259df: 74 05 je 1259e6 <_fat_block_write+0x66> <== NOT EXECUTED 1259e1: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 1259e4: eb 2e jmp 125a14 <_fat_block_write+0x94> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 1259e6: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 1259e9: 03 70 20 add 0x20(%eax),%esi <== NOT EXECUTED 1259ec: 89 f0 mov %esi,%eax <== NOT EXECUTED 1259ee: 8b 75 18 mov 0x18(%ebp),%esi <== NOT EXECUTED 1259f1: 01 d6 add %edx,%esi <== NOT EXECUTED 1259f3: 89 c7 mov %eax,%edi <== NOT EXECUTED 1259f5: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 1259f8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 1259fa: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; 125a01: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 125a04: 29 45 14 sub %eax,0x14(%ebp) <== NOT EXECUTED cmpltd +=c; 125a07: 01 c2 add %eax,%edx <== NOT EXECUTED blk++; 125a09: ff 45 d0 incl -0x30(%ebp) <== NOT EXECUTED 125a0c: 31 f6 xor %esi,%esi <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 125a0e: 83 7d 14 00 cmpl $0x0,0x14(%ebp) <== NOT EXECUTED 125a12: 75 8f jne 1259a3 <_fat_block_write+0x23> <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 125a14: 89 d0 mov %edx,%eax <== NOT EXECUTED 125a16: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125a19: 5b pop %ebx <== NOT EXECUTED 125a1a: 5e pop %esi <== NOT EXECUTED 125a1b: 5f pop %edi <== NOT EXECUTED 125a1c: c9 leave <== NOT EXECUTED 125a1d: c3 ret <== NOT EXECUTED =============================================================================== 0013a276 <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 13a276: 55 push %ebp <== NOT EXECUTED 13a277: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a279: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 13a27c: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 13a27f: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 13a282: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 13a285: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 13a288: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 13a28b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 13a28e: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 13a28f: e9 98 fe ff ff jmp 13a12c <== NOT EXECUTED =============================================================================== 00121bc2 <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 121bc2: 55 push %ebp <== NOT EXECUTED 121bc3: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 121bc5: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121bca: c9 leave <== NOT EXECUTED 121bcb: c3 ret <== NOT EXECUTED =============================================================================== 00107763 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 107763: 55 push %ebp <== NOT EXECUTED 107764: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107766: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 107769: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10776a: e9 a5 ff ff ff jmp 107714 <== NOT EXECUTED =============================================================================== 00121be7 <_kill_r>: #if defined(RTEMS_NEWLIB) #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 121be7: 55 push %ebp <== NOT EXECUTED 121be8: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121bea: 31 c0 xor %eax,%eax <== NOT EXECUTED 121bec: c9 leave <== NOT EXECUTED 121bed: c3 ret <== NOT EXECUTED =============================================================================== 00128897 <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 128897: 55 push %ebp <== NOT EXECUTED 128898: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12889a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 12889d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 1288a0: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1288a3: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 1288a6: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1288a9: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 1288aa: e9 61 fe ff ff jmp 128710 <== NOT EXECUTED =============================================================================== 00128a52 <_lstat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 128a52: 55 push %ebp <== NOT EXECUTED 128a53: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128a55: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 128a58: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 128a5b: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 128a5e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 128a61: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 128a64: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 128a65: e9 3a ff ff ff jmp 1289a4 <== NOT EXECUTED =============================================================================== 0011d158 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 11d158: 55 push %ebp <== NOT EXECUTED 11d159: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11d15b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 11d15e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 11d161: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 11d164: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 11d167: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11d16a: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 11d16b: e9 48 00 00 00 jmp 11d1b8 <== NOT EXECUTED =============================================================================== 00152d6c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 152d6c: 55 push %ebp 152d6d: 89 e5 mov %esp,%ebp 152d6f: 57 push %edi 152d70: 56 push %esi 152d71: 53 push %ebx 152d72: 83 ec 78 sub $0x78,%esp /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 152d75: ff 75 0c pushl 0xc(%ebp) 152d78: e8 b7 9f fb ff call 10cd34 152d7d: 89 45 94 mov %eax,-0x6c(%ebp) if ( old_parent_pathlen == 0 ) 152d80: 83 c4 10 add $0x10,%esp 152d83: 85 c0 test %eax,%eax 152d85: 8d 45 b8 lea -0x48(%ebp),%eax 152d88: 75 15 jne 152d9f <_rename_r+0x33> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 152d8a: 52 push %edx 152d8b: 50 push %eax 152d8c: 8d 45 e4 lea -0x1c(%ebp),%eax 152d8f: 50 push %eax 152d90: ff 75 0c pushl 0xc(%ebp) 152d93: e8 1c b6 fb ff call 10e3b4 152d98: 31 db xor %ebx,%ebx 152d9a: 83 c4 10 add $0x10,%esp 152d9d: eb 20 jmp 152dbf <_rename_r+0x53> else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 152d9f: 83 ec 0c sub $0xc,%esp 152da2: 6a 00 push $0x0 152da4: 50 push %eax 152da5: 6a 02 push $0x2 152da7: ff 75 94 pushl -0x6c(%ebp) 152daa: ff 75 0c pushl 0xc(%ebp) 152dad: e8 7f a0 fb ff call 10ce31 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 152db2: 83 c4 20 add $0x20,%esp 152db5: 85 c0 test %eax,%eax 152db7: 0f 85 3d 02 00 00 jne 152ffa <_rename_r+0x28e> <== NEVER TAKEN 152dbd: b3 01 mov $0x1,%bl /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 152dbf: 8d 7d cc lea -0x34(%ebp),%edi 152dc2: 8d 75 b8 lea -0x48(%ebp),%esi 152dc5: b9 05 00 00 00 mov $0x5,%ecx 152dca: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 152dcc: 8b 75 0c mov 0xc(%ebp),%esi 152dcf: 03 75 94 add -0x6c(%ebp),%esi 152dd2: 89 75 e0 mov %esi,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 152dd5: 83 c9 ff or $0xffffffff,%ecx 152dd8: 89 f7 mov %esi,%edi 152dda: 31 c0 xor %eax,%eax 152ddc: f2 ae repnz scas %es:(%edi),%al 152dde: f7 d1 not %ecx 152de0: 49 dec %ecx 152de1: 57 push %edi 152de2: 57 push %edi 152de3: 51 push %ecx 152de4: 56 push %esi 152de5: e8 0e 9f fb ff call 10ccf8 152dea: 01 c6 add %eax,%esi 152dec: 89 75 e0 mov %esi,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 152def: 83 c9 ff or $0xffffffff,%ecx 152df2: 89 f7 mov %esi,%edi 152df4: 31 c0 xor %eax,%eax 152df6: f2 ae repnz scas %es:(%edi),%al 152df8: f7 d1 not %ecx 152dfa: 49 dec %ecx 152dfb: c7 04 24 00 00 00 00 movl $0x0,(%esp) 152e02: 8d 7d cc lea -0x34(%ebp),%edi 152e05: 57 push %edi 152e06: 6a 00 push $0x0 152e08: 51 push %ecx 152e09: 56 push %esi 152e0a: e8 68 9f fb ff call 10cd77 0, &old_loc, false ); if ( result != 0 ) { 152e0f: 83 c4 20 add $0x20,%esp 152e12: 85 c0 test %eax,%eax 152e14: 74 29 je 152e3f <_rename_r+0xd3> if ( free_old_parentloc ) 152e16: 84 db test %bl,%bl 152e18: 0f 84 dc 01 00 00 je 152ffa <_rename_r+0x28e> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 152e1e: 8b 45 c4 mov -0x3c(%ebp),%eax 152e21: 85 c0 test %eax,%eax 152e23: 0f 84 d1 01 00 00 je 152ffa <_rename_r+0x28e> <== NEVER TAKEN 152e29: 8b 40 1c mov 0x1c(%eax),%eax 152e2c: 85 c0 test %eax,%eax 152e2e: 0f 84 c6 01 00 00 je 152ffa <_rename_r+0x28e> <== NEVER TAKEN 152e34: 83 ec 0c sub $0xc,%esp 152e37: 8d 55 b8 lea -0x48(%ebp),%edx 152e3a: e9 89 00 00 00 jmp 152ec8 <_rename_r+0x15c> /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 152e3f: 51 push %ecx 152e40: 8d 75 a4 lea -0x5c(%ebp),%esi 152e43: 56 push %esi 152e44: 8d 45 e4 lea -0x1c(%ebp),%eax 152e47: 50 push %eax 152e48: ff 75 10 pushl 0x10(%ebp) 152e4b: e8 64 b5 fb ff call 10e3b4 if ( !new_parent_loc.ops->evalformake_h ) { 152e50: 8b 45 b0 mov -0x50(%ebp),%eax 152e53: 8b 40 04 mov 0x4(%eax),%eax 152e56: 83 c4 10 add $0x10,%esp 152e59: 85 c0 test %eax,%eax 152e5b: 0f 84 f3 00 00 00 je 152f54 <_rename_r+0x1e8> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 152e61: 52 push %edx 152e62: 8d 55 e0 lea -0x20(%ebp),%edx 152e65: 52 push %edx 152e66: 56 push %esi 152e67: 8b 55 10 mov 0x10(%ebp),%edx 152e6a: 03 55 e4 add -0x1c(%ebp),%edx 152e6d: 52 push %edx 152e6e: ff d0 call *%eax if ( result != 0 ) { 152e70: 83 c4 10 add $0x10,%esp 152e73: 85 c0 test %eax,%eax 152e75: 74 5f je 152ed6 <_rename_r+0x16a> rtems_filesystem_freenode( &new_parent_loc ); 152e77: 8b 45 b0 mov -0x50(%ebp),%eax 152e7a: 85 c0 test %eax,%eax 152e7c: 74 10 je 152e8e <_rename_r+0x122> <== NEVER TAKEN 152e7e: 8b 40 1c mov 0x1c(%eax),%eax 152e81: 85 c0 test %eax,%eax 152e83: 74 09 je 152e8e <_rename_r+0x122> <== NEVER TAKEN 152e85: 83 ec 0c sub $0xc,%esp 152e88: 56 push %esi 152e89: ff d0 call *%eax 152e8b: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 152e8e: 84 db test %bl,%bl 152e90: 74 1a je 152eac <_rename_r+0x140> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 152e92: 8b 45 c4 mov -0x3c(%ebp),%eax 152e95: 85 c0 test %eax,%eax 152e97: 74 13 je 152eac <_rename_r+0x140> <== NEVER TAKEN 152e99: 8b 40 1c mov 0x1c(%eax),%eax 152e9c: 85 c0 test %eax,%eax 152e9e: 74 0c je 152eac <_rename_r+0x140> <== NEVER TAKEN 152ea0: 83 ec 0c sub $0xc,%esp 152ea3: 8d 55 b8 lea -0x48(%ebp),%edx 152ea6: 52 push %edx 152ea7: ff d0 call *%eax 152ea9: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 152eac: 8b 45 d8 mov -0x28(%ebp),%eax 152eaf: 85 c0 test %eax,%eax 152eb1: 0f 84 43 01 00 00 je 152ffa <_rename_r+0x28e> <== NEVER TAKEN 152eb7: 8b 40 1c mov 0x1c(%eax),%eax 152eba: 85 c0 test %eax,%eax 152ebc: 0f 84 38 01 00 00 je 152ffa <_rename_r+0x28e> <== NEVER TAKEN 152ec2: 83 ec 0c sub $0xc,%esp 152ec5: 8d 55 cc lea -0x34(%ebp),%edx 152ec8: 52 push %edx 152ec9: ff d0 call *%eax 152ecb: 83 cf ff or $0xffffffff,%edi 152ece: 83 c4 10 add $0x10,%esp 152ed1: e9 27 01 00 00 jmp 152ffd <_rename_r+0x291> /* * 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 ) { 152ed6: 8b 45 c8 mov -0x38(%ebp),%eax 152ed9: 3b 45 b4 cmp -0x4c(%ebp),%eax 152edc: 8b 45 b0 mov -0x50(%ebp),%eax 152edf: 74 5c je 152f3d <_rename_r+0x1d1> rtems_filesystem_freenode( &new_parent_loc ); 152ee1: 85 c0 test %eax,%eax 152ee3: 74 10 je 152ef5 <_rename_r+0x189> <== NEVER TAKEN 152ee5: 8b 40 1c mov 0x1c(%eax),%eax 152ee8: 85 c0 test %eax,%eax 152eea: 74 09 je 152ef5 <_rename_r+0x189> <== NEVER TAKEN 152eec: 83 ec 0c sub $0xc,%esp 152eef: 56 push %esi 152ef0: ff d0 call *%eax 152ef2: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 152ef5: 84 db test %bl,%bl 152ef7: 74 1a je 152f13 <_rename_r+0x1a7> rtems_filesystem_freenode( &old_parent_loc ); 152ef9: 8b 45 c4 mov -0x3c(%ebp),%eax 152efc: 85 c0 test %eax,%eax 152efe: 74 13 je 152f13 <_rename_r+0x1a7> <== NEVER TAKEN 152f00: 8b 40 1c mov 0x1c(%eax),%eax 152f03: 85 c0 test %eax,%eax 152f05: 74 0c je 152f13 <_rename_r+0x1a7> <== NEVER TAKEN 152f07: 83 ec 0c sub $0xc,%esp 152f0a: 8d 55 b8 lea -0x48(%ebp),%edx 152f0d: 52 push %edx 152f0e: ff d0 call *%eax 152f10: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 152f13: 8b 45 d8 mov -0x28(%ebp),%eax 152f16: 85 c0 test %eax,%eax 152f18: 74 13 je 152f2d <_rename_r+0x1c1> <== NEVER TAKEN 152f1a: 8b 40 1c mov 0x1c(%eax),%eax 152f1d: 85 c0 test %eax,%eax 152f1f: 74 0c je 152f2d <_rename_r+0x1c1> <== NEVER TAKEN 152f21: 83 ec 0c sub $0xc,%esp 152f24: 8d 55 cc lea -0x34(%ebp),%edx 152f27: 52 push %edx 152f28: ff d0 call *%eax 152f2a: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 152f2d: e8 66 9e fe ff call 13cd98 <__errno> 152f32: c7 00 12 00 00 00 movl $0x12,(%eax) 152f38: e9 bd 00 00 00 jmp 152ffa <_rename_r+0x28e> } if ( !new_parent_loc.ops->rename_h ) { 152f3d: 8b 50 40 mov 0x40(%eax),%edx 152f40: 85 d2 test %edx,%edx 152f42: 75 55 jne 152f99 <_rename_r+0x22d> rtems_filesystem_freenode( &new_parent_loc ); 152f44: 8b 40 1c mov 0x1c(%eax),%eax 152f47: 85 c0 test %eax,%eax 152f49: 74 09 je 152f54 <_rename_r+0x1e8> <== NEVER TAKEN 152f4b: 83 ec 0c sub $0xc,%esp 152f4e: 56 push %esi 152f4f: ff d0 call *%eax 152f51: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 152f54: 84 db test %bl,%bl 152f56: 74 1a je 152f72 <_rename_r+0x206> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 152f58: 8b 45 c4 mov -0x3c(%ebp),%eax 152f5b: 85 c0 test %eax,%eax 152f5d: 74 13 je 152f72 <_rename_r+0x206> <== NEVER TAKEN 152f5f: 8b 40 1c mov 0x1c(%eax),%eax 152f62: 85 c0 test %eax,%eax 152f64: 74 0c je 152f72 <_rename_r+0x206> <== NEVER TAKEN 152f66: 83 ec 0c sub $0xc,%esp 152f69: 8d 55 b8 lea -0x48(%ebp),%edx 152f6c: 52 push %edx 152f6d: ff d0 call *%eax 152f6f: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 152f72: 8b 45 d8 mov -0x28(%ebp),%eax 152f75: 85 c0 test %eax,%eax 152f77: 74 13 je 152f8c <_rename_r+0x220> <== NEVER TAKEN 152f79: 8b 40 1c mov 0x1c(%eax),%eax 152f7c: 85 c0 test %eax,%eax 152f7e: 74 0c je 152f8c <_rename_r+0x220> <== NEVER TAKEN 152f80: 83 ec 0c sub $0xc,%esp 152f83: 8d 55 cc lea -0x34(%ebp),%edx 152f86: 52 push %edx 152f87: ff d0 call *%eax 152f89: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 152f8c: e8 07 9e fe ff call 13cd98 <__errno> 152f91: c7 00 86 00 00 00 movl $0x86,(%eax) 152f97: eb 61 jmp 152ffa <_rename_r+0x28e> } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 152f99: ff 75 e0 pushl -0x20(%ebp) 152f9c: 56 push %esi 152f9d: 57 push %edi 152f9e: 8d 45 b8 lea -0x48(%ebp),%eax 152fa1: 50 push %eax 152fa2: ff d2 call *%edx 152fa4: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &new_parent_loc ); 152fa6: 8b 45 b0 mov -0x50(%ebp),%eax 152fa9: 83 c4 10 add $0x10,%esp 152fac: 85 c0 test %eax,%eax 152fae: 74 10 je 152fc0 <_rename_r+0x254> <== NEVER TAKEN 152fb0: 8b 40 1c mov 0x1c(%eax),%eax 152fb3: 85 c0 test %eax,%eax 152fb5: 74 09 je 152fc0 <_rename_r+0x254> <== NEVER TAKEN 152fb7: 83 ec 0c sub $0xc,%esp 152fba: 56 push %esi 152fbb: ff d0 call *%eax 152fbd: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 152fc0: 84 db test %bl,%bl 152fc2: 74 1a je 152fde <_rename_r+0x272> rtems_filesystem_freenode( &old_parent_loc ); 152fc4: 8b 45 c4 mov -0x3c(%ebp),%eax 152fc7: 85 c0 test %eax,%eax 152fc9: 74 13 je 152fde <_rename_r+0x272> <== NEVER TAKEN 152fcb: 8b 40 1c mov 0x1c(%eax),%eax 152fce: 85 c0 test %eax,%eax 152fd0: 74 0c je 152fde <_rename_r+0x272> <== NEVER TAKEN 152fd2: 83 ec 0c sub $0xc,%esp 152fd5: 8d 55 b8 lea -0x48(%ebp),%edx 152fd8: 52 push %edx 152fd9: ff d0 call *%eax 152fdb: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 152fde: 8b 45 d8 mov -0x28(%ebp),%eax 152fe1: 85 c0 test %eax,%eax 152fe3: 74 18 je 152ffd <_rename_r+0x291> <== NEVER TAKEN 152fe5: 8b 40 1c mov 0x1c(%eax),%eax 152fe8: 85 c0 test %eax,%eax 152fea: 74 11 je 152ffd <_rename_r+0x291> <== NEVER TAKEN 152fec: 83 ec 0c sub $0xc,%esp 152fef: 8d 55 cc lea -0x34(%ebp),%edx 152ff2: 52 push %edx 152ff3: ff d0 call *%eax 152ff5: e9 d4 fe ff ff jmp 152ece <_rename_r+0x162> 152ffa: 83 cf ff or $0xffffffff,%edi return result; } 152ffd: 89 f8 mov %edi,%eax 152fff: 8d 65 f4 lea -0xc(%ebp),%esp 153002: 5b pop %ebx 153003: 5e pop %esi 153004: 5f pop %edi 153005: c9 leave 153006: c3 ret =============================================================================== 0010e39a <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10e39a: 55 push %ebp <== NOT EXECUTED 10e39b: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10e39d: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10e3a0: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10e3a3: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10e3a6: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10e3a9: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10e3ac: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10e3ad: e9 3a ff ff ff jmp 10e2ec <== NOT EXECUTED =============================================================================== 001114ab <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 1114ab: 55 push %ebp <== NOT EXECUTED 1114ac: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1114ae: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 1114b1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1114b4: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 1114b7: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 1114b8: e9 27 fe ff ff jmp 1112e4 <== NOT EXECUTED =============================================================================== 001074bc : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 1074bc: 55 push %ebp 1074bd: 89 e5 mov %esp,%ebp 1074bf: 57 push %edi 1074c0: 53 push %ebx 1074c1: 8b 5d 0c mov 0xc(%ebp),%ebx 1074c4: ff 05 6c 55 12 00 incl 0x12556c length = nelem * elsize; 1074ca: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 1074ce: 83 ec 0c sub $0xc,%esp 1074d1: 53 push %ebx 1074d2: e8 65 04 00 00 call 10793c 1074d7: 89 c2 mov %eax,%edx if ( cptr ) 1074d9: 83 c4 10 add $0x10,%esp 1074dc: 85 c0 test %eax,%eax 1074de: 74 08 je 1074e8 <== NEVER TAKEN memset( cptr, '\0', length ); 1074e0: 31 c0 xor %eax,%eax 1074e2: 89 d7 mov %edx,%edi 1074e4: 89 d9 mov %ebx,%ecx 1074e6: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 1074e8: ff 0d 5c 55 12 00 decl 0x12555c return cptr; } 1074ee: 89 d0 mov %edx,%eax 1074f0: 8d 65 f8 lea -0x8(%ebp),%esp 1074f3: 5b pop %ebx 1074f4: 5f pop %edi 1074f5: c9 leave 1074f6: c3 ret =============================================================================== 00127a24 : #include int chdir( const char *pathname ) { 127a24: 55 push %ebp 127a25: 89 e5 mov %esp,%ebp 127a27: 57 push %edi 127a28: 56 push %esi 127a29: 83 ec 20 sub $0x20,%esp 127a2c: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 127a2f: 85 d2 test %edx,%edx 127a31: 75 0d jne 127a40 rtems_set_errno_and_return_minus_one( EFAULT ); 127a33: e8 60 53 01 00 call 13cd98 <__errno> 127a38: c7 00 0e 00 00 00 movl $0xe,(%eax) 127a3e: eb 53 jmp 127a93 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 127a40: 31 c0 xor %eax,%eax 127a42: 83 c9 ff or $0xffffffff,%ecx 127a45: 89 d7 mov %edx,%edi 127a47: f2 ae repnz scas %es:(%edi),%al 127a49: f7 d1 not %ecx 127a4b: 49 dec %ecx 127a4c: 83 ec 0c sub $0xc,%esp 127a4f: 6a 01 push $0x1 127a51: 8d 75 e4 lea -0x1c(%ebp),%esi 127a54: 56 push %esi 127a55: 6a 01 push $0x1 127a57: 51 push %ecx 127a58: 52 push %edx 127a59: e8 d3 53 fe ff call 10ce31 127a5e: 89 c2 mov %eax,%edx pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 127a60: 83 c4 20 add $0x20,%esp 127a63: 83 c8 ff or $0xffffffff,%eax 127a66: 85 d2 test %edx,%edx 127a68: 0f 85 8f 00 00 00 jne 127afd return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 127a6e: 8b 55 f0 mov -0x10(%ebp),%edx 127a71: 8b 42 10 mov 0x10(%edx),%eax 127a74: 85 c0 test %eax,%eax 127a76: 75 20 jne 127a98 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 127a78: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 127a7b: 85 c0 test %eax,%eax <== NOT EXECUTED 127a7d: 74 09 je 127a88 <== NOT EXECUTED 127a7f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127a82: 56 push %esi <== NOT EXECUTED 127a83: ff d0 call *%eax <== NOT EXECUTED 127a85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127a88: e8 0b 53 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127a8d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127a93: 83 c8 ff or $0xffffffff,%eax 127a96: eb 65 jmp 127afd } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 127a98: 83 ec 0c sub $0xc,%esp 127a9b: 56 push %esi 127a9c: ff d0 call *%eax 127a9e: 83 c4 10 add $0x10,%esp 127aa1: 48 dec %eax 127aa2: 74 24 je 127ac8 rtems_filesystem_freenode( &loc ); 127aa4: 8b 45 f0 mov -0x10(%ebp),%eax 127aa7: 85 c0 test %eax,%eax 127aa9: 74 10 je 127abb <== NEVER TAKEN 127aab: 8b 40 1c mov 0x1c(%eax),%eax 127aae: 85 c0 test %eax,%eax 127ab0: 74 09 je 127abb <== NEVER TAKEN 127ab2: 83 ec 0c sub $0xc,%esp 127ab5: 56 push %esi 127ab6: ff d0 call *%eax 127ab8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 127abb: e8 d8 52 01 00 call 13cd98 <__errno> 127ac0: c7 00 14 00 00 00 movl $0x14,(%eax) 127ac6: eb cb jmp 127a93 } rtems_filesystem_freenode( &rtems_filesystem_current ); 127ac8: 8b 15 fc 21 16 00 mov 0x1621fc,%edx 127ace: 8b 42 10 mov 0x10(%edx),%eax 127ad1: 85 c0 test %eax,%eax 127ad3: 74 13 je 127ae8 <== NEVER TAKEN 127ad5: 8b 40 1c mov 0x1c(%eax),%eax 127ad8: 85 c0 test %eax,%eax 127ada: 74 0c je 127ae8 <== NEVER TAKEN 127adc: 83 ec 0c sub $0xc,%esp 127adf: 83 c2 04 add $0x4,%edx 127ae2: 52 push %edx 127ae3: ff d0 call *%eax 127ae5: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 127ae8: 8b 3d fc 21 16 00 mov 0x1621fc,%edi 127aee: 83 c7 04 add $0x4,%edi 127af1: 8d 75 e4 lea -0x1c(%ebp),%esi 127af4: b9 05 00 00 00 mov $0x5,%ecx 127af9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 127afb: 31 c0 xor %eax,%eax return 0; } 127afd: 8d 65 f8 lea -0x8(%ebp),%esp 127b00: 5e pop %esi 127b01: 5f pop %edi 127b02: c9 leave 127b03: c3 ret =============================================================================== 0010ca08 : int chmod( const char *path, mode_t mode ) { 10ca08: 55 push %ebp 10ca09: 89 e5 mov %esp,%ebp 10ca0b: 57 push %edi 10ca0c: 56 push %esi 10ca0d: 53 push %ebx 10ca0e: 83 ec 38 sub $0x38,%esp 10ca11: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 10ca14: 31 c0 xor %eax,%eax 10ca16: 83 c9 ff or $0xffffffff,%ecx 10ca19: 89 d7 mov %edx,%edi 10ca1b: f2 ae repnz scas %es:(%edi),%al 10ca1d: f7 d1 not %ecx 10ca1f: 49 dec %ecx 10ca20: 6a 01 push $0x1 10ca22: 8d 5d d4 lea -0x2c(%ebp),%ebx 10ca25: 53 push %ebx 10ca26: 6a 00 push $0x0 10ca28: 51 push %ecx 10ca29: 52 push %edx 10ca2a: e8 02 04 00 00 call 10ce31 if ( status != 0 ) 10ca2f: 83 c4 20 add $0x20,%esp 10ca32: 83 ce ff or $0xffffffff,%esi 10ca35: 85 c0 test %eax,%eax 10ca37: 75 7d jne 10cab6 return -1; if ( !loc.handlers ){ 10ca39: 8b 45 dc mov -0x24(%ebp),%eax 10ca3c: 85 c0 test %eax,%eax 10ca3e: 75 24 jne 10ca64 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10ca40: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ca43: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca45: 74 10 je 10ca57 <== NOT EXECUTED 10ca47: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca4a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca4c: 74 09 je 10ca57 <== NOT EXECUTED 10ca4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca51: 53 push %ebx <== NOT EXECUTED 10ca52: ff d0 call *%eax <== NOT EXECUTED 10ca54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 10ca57: e8 3c 03 03 00 call 13cd98 <__errno> <== NOT EXECUTED 10ca5c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10ca62: eb 29 jmp 10ca8d <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 10ca64: 8b 40 1c mov 0x1c(%eax),%eax 10ca67: 85 c0 test %eax,%eax 10ca69: 75 27 jne 10ca92 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 10ca6b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10ca6e: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca70: 74 10 je 10ca82 <== NOT EXECUTED 10ca72: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10ca75: 85 c0 test %eax,%eax <== NOT EXECUTED 10ca77: 74 09 je 10ca82 <== NOT EXECUTED 10ca79: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ca7c: 53 push %ebx <== NOT EXECUTED 10ca7d: ff d0 call *%eax <== NOT EXECUTED 10ca7f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ca82: e8 11 03 03 00 call 13cd98 <__errno> <== NOT EXECUTED 10ca87: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ca8d: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 10ca90: eb 24 jmp 10cab6 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 10ca92: 52 push %edx 10ca93: 52 push %edx 10ca94: ff 75 0c pushl 0xc(%ebp) 10ca97: 53 push %ebx 10ca98: ff d0 call *%eax 10ca9a: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10ca9c: 8b 45 e0 mov -0x20(%ebp),%eax 10ca9f: 83 c4 10 add $0x10,%esp 10caa2: 85 c0 test %eax,%eax 10caa4: 74 10 je 10cab6 <== NEVER TAKEN 10caa6: 8b 40 1c mov 0x1c(%eax),%eax 10caa9: 85 c0 test %eax,%eax 10caab: 74 09 je 10cab6 <== NEVER TAKEN 10caad: 83 ec 0c sub $0xc,%esp 10cab0: 53 push %ebx 10cab1: ff d0 call *%eax 10cab3: 83 c4 10 add $0x10,%esp return result; } 10cab6: 89 f0 mov %esi,%eax 10cab8: 8d 65 f4 lea -0xc(%ebp),%esp 10cabb: 5b pop %ebx 10cabc: 5e pop %esi 10cabd: 5f pop %edi 10cabe: c9 leave 10cabf: c3 ret =============================================================================== 00127b04 : int chown( const char *path, uid_t owner, gid_t group ) { 127b04: 55 push %ebp 127b05: 89 e5 mov %esp,%ebp 127b07: 57 push %edi 127b08: 56 push %esi 127b09: 53 push %ebx 127b0a: 83 ec 48 sub $0x48,%esp 127b0d: 8b 55 08 mov 0x8(%ebp),%edx 127b10: 8b 75 0c mov 0xc(%ebp),%esi 127b13: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 127b16: 31 c0 xor %eax,%eax 127b18: 83 c9 ff or $0xffffffff,%ecx 127b1b: 89 d7 mov %edx,%edi 127b1d: f2 ae repnz scas %es:(%edi),%al 127b1f: f7 d1 not %ecx 127b21: 49 dec %ecx 127b22: 6a 01 push $0x1 127b24: 8d 7d d4 lea -0x2c(%ebp),%edi 127b27: 57 push %edi 127b28: 6a 00 push $0x0 127b2a: 51 push %ecx 127b2b: 52 push %edx 127b2c: e8 00 53 fe ff call 10ce31 127b31: 83 c4 20 add $0x20,%esp 127b34: 83 ca ff or $0xffffffff,%edx 127b37: 85 c0 test %eax,%eax 127b39: 75 58 jne 127b93 return -1; if ( !loc.ops->chown_h ) { 127b3b: 8b 55 e0 mov -0x20(%ebp),%edx 127b3e: 8b 42 18 mov 0x18(%edx),%eax 127b41: 85 c0 test %eax,%eax 127b43: 75 20 jne 127b65 <== ALWAYS TAKEN rtems_filesystem_freenode( &loc ); 127b45: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 127b48: 85 c0 test %eax,%eax <== NOT EXECUTED 127b4a: 74 09 je 127b55 <== NOT EXECUTED 127b4c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127b4f: 57 push %edi <== NOT EXECUTED 127b50: ff d0 call *%eax <== NOT EXECUTED 127b52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127b55: e8 3e 52 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127b5a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127b60: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 127b63: eb 2e jmp 127b93 <== NOT EXECUTED } result = (*loc.ops->chown_h)( &loc, owner, group ); 127b65: 52 push %edx 127b66: 0f b7 db movzwl %bx,%ebx 127b69: 53 push %ebx 127b6a: 0f b7 f6 movzwl %si,%esi 127b6d: 56 push %esi 127b6e: 57 push %edi 127b6f: ff d0 call *%eax 127b71: 89 c2 mov %eax,%edx rtems_filesystem_freenode( &loc ); 127b73: 8b 45 e0 mov -0x20(%ebp),%eax 127b76: 83 c4 10 add $0x10,%esp 127b79: 85 c0 test %eax,%eax 127b7b: 74 16 je 127b93 <== NEVER TAKEN 127b7d: 8b 40 1c mov 0x1c(%eax),%eax 127b80: 85 c0 test %eax,%eax 127b82: 74 0f je 127b93 <== NEVER TAKEN 127b84: 83 ec 0c sub $0xc,%esp 127b87: 57 push %edi 127b88: 89 55 c4 mov %edx,-0x3c(%ebp) 127b8b: ff d0 call *%eax 127b8d: 83 c4 10 add $0x10,%esp 127b90: 8b 55 c4 mov -0x3c(%ebp),%edx return result; } 127b93: 89 d0 mov %edx,%eax 127b95: 8d 65 f4 lea -0xc(%ebp),%esp 127b98: 5b pop %ebx 127b99: 5e pop %esi 127b9a: 5f pop %edi 127b9b: c9 leave 127b9c: c3 ret =============================================================================== 00127ba0 : #include int chroot( const char *pathname ) { 127ba0: 55 push %ebp 127ba1: 89 e5 mov %esp,%ebp 127ba3: 57 push %edi 127ba4: 56 push %esi 127ba5: 83 ec 20 sub $0x20,%esp 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) { 127ba8: 81 3d fc 21 16 00 a4 cmpl $0x167aa4,0x1621fc 127baf: 7a 16 00 127bb2: 75 1e jne 127bd2 <== NEVER TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ 127bb4: e8 07 13 00 00 call 128ec0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 127bb9: 81 3d fc 21 16 00 a4 cmpl $0x167aa4,0x1621fc 127bc0: 7a 16 00 127bc3: 75 0d jne 127bd2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 127bc5: e8 ce 51 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127bca: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127bd0: eb 22 jmp 127bf4 <== NOT EXECUTED } result = chdir(pathname); 127bd2: 83 ec 0c sub $0xc,%esp 127bd5: ff 75 08 pushl 0x8(%ebp) 127bd8: e8 47 fe ff ff call 127a24 if (result) { 127bdd: 83 c4 10 add $0x10,%esp 127be0: 85 c0 test %eax,%eax 127be2: 74 15 je 127bf9 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( errno ); 127be4: e8 af 51 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127be9: 89 c6 mov %eax,%esi <== NOT EXECUTED 127beb: e8 a8 51 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127bf0: 8b 00 mov (%eax),%eax <== NOT EXECUTED 127bf2: 89 06 mov %eax,(%esi) <== NOT EXECUTED 127bf4: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 127bf7: eb 53 jmp 127c4c <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 127bf9: 83 ec 0c sub $0xc,%esp 127bfc: 6a 00 push $0x0 127bfe: 8d 45 e4 lea -0x1c(%ebp),%eax 127c01: 50 push %eax 127c02: 6a 00 push $0x0 127c04: 6a 01 push $0x1 127c06: 68 fe 74 15 00 push $0x1574fe 127c0b: e8 21 52 fe ff call 10ce31 127c10: 83 c4 20 add $0x20,%esp 127c13: 85 c0 test %eax,%eax 127c15: 75 cd jne 127be4 <== 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); 127c17: 8b 15 fc 21 16 00 mov 0x1621fc,%edx 127c1d: 8b 42 24 mov 0x24(%edx),%eax 127c20: 85 c0 test %eax,%eax 127c22: 74 13 je 127c37 <== NEVER TAKEN 127c24: 8b 40 1c mov 0x1c(%eax),%eax 127c27: 85 c0 test %eax,%eax 127c29: 74 0c je 127c37 <== NEVER TAKEN 127c2b: 83 ec 0c sub $0xc,%esp 127c2e: 83 c2 18 add $0x18,%edx 127c31: 52 push %edx 127c32: ff d0 call *%eax 127c34: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 127c37: 8b 3d fc 21 16 00 mov 0x1621fc,%edi 127c3d: 83 c7 18 add $0x18,%edi 127c40: 8d 75 e4 lea -0x1c(%ebp),%esi 127c43: b9 05 00 00 00 mov $0x5,%ecx 127c48: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 127c4a: 31 c0 xor %eax,%eax return 0; } 127c4c: 8d 65 f8 lea -0x8(%ebp),%esp 127c4f: 5e pop %esi 127c50: 5f pop %edi 127c51: c9 leave 127c52: c3 ret =============================================================================== 0010eb70 : #include int close( int fd ) { 10eb70: 55 push %ebp 10eb71: 89 e5 mov %esp,%ebp 10eb73: 56 push %esi 10eb74: 53 push %ebx 10eb75: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 10eb78: 3b 1d 64 16 12 00 cmp 0x121664,%ebx 10eb7e: 73 0f jae 10eb8f iop = rtems_libio_iop(fd); 10eb80: c1 e3 06 shl $0x6,%ebx 10eb83: 03 1d 40 55 12 00 add 0x125540,%ebx rtems_libio_check_is_open(iop); 10eb89: f6 43 15 01 testb $0x1,0x15(%ebx) 10eb8d: 75 10 jne 10eb9f 10eb8f: e8 2c 2d 00 00 call 1118c0 <__errno> 10eb94: c7 00 09 00 00 00 movl $0x9,(%eax) 10eb9a: 83 c8 ff or $0xffffffff,%eax 10eb9d: eb 3f jmp 10ebde rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 10eb9f: 8b 43 3c mov 0x3c(%ebx),%eax 10eba2: 8b 40 04 mov 0x4(%eax),%eax 10eba5: 31 f6 xor %esi,%esi 10eba7: 85 c0 test %eax,%eax 10eba9: 74 0b je 10ebb6 <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 10ebab: 83 ec 0c sub $0xc,%esp 10ebae: 53 push %ebx 10ebaf: ff d0 call *%eax 10ebb1: 89 c6 mov %eax,%esi 10ebb3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 10ebb6: 8b 43 24 mov 0x24(%ebx),%eax 10ebb9: 85 c0 test %eax,%eax 10ebbb: 74 13 je 10ebd0 <== NEVER TAKEN 10ebbd: 8b 40 1c mov 0x1c(%eax),%eax 10ebc0: 85 c0 test %eax,%eax 10ebc2: 74 0c je 10ebd0 10ebc4: 83 ec 0c sub $0xc,%esp 10ebc7: 8d 53 18 lea 0x18(%ebx),%edx 10ebca: 52 push %edx 10ebcb: ff d0 call *%eax 10ebcd: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 10ebd0: 83 ec 0c sub $0xc,%esp 10ebd3: 53 push %ebx 10ebd4: e8 cd 01 00 00 call 10eda6 return rc; 10ebd9: 89 f0 mov %esi,%eax 10ebdb: 83 c4 10 add $0x10,%esp } 10ebde: 8d 65 f8 lea -0x8(%ebp),%esp 10ebe1: 5b pop %ebx 10ebe2: 5e pop %esi 10ebe3: c9 leave 10ebe4: c3 ret =============================================================================== 001077a1 : return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 1077a1: 55 push %ebp 1077a2: 89 e5 mov %esp,%ebp 1077a4: 57 push %edi 1077a5: 56 push %esi 1077a6: 53 push %ebx 1077a7: 83 ec 2c sub $0x2c,%esp 1077aa: 89 c3 mov %eax,%ebx 1077ac: 89 d6 mov %edx,%esi 1077ae: 89 4d d4 mov %ecx,-0x2c(%ebp) ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 1077b1: 89 45 e4 mov %eax,-0x1c(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 1077b4: 89 55 d8 mov %edx,-0x28(%ebp) rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 1077b7: 8b 3d 70 86 12 00 mov 0x128670,%edi 1077bd: 39 f8 cmp %edi,%eax 1077bf: 72 4e jb 10780f rtems_disk_device_table *table = disktab; 1077c1: a1 6c 86 12 00 mov 0x12866c,%eax rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 1077c6: 8d 14 3f lea (%edi,%edi,1),%edx 1077c9: 89 55 e0 mov %edx,-0x20(%ebp) if (major >= new_size) { 1077cc: 39 d3 cmp %edx,%ebx 1077ce: 72 06 jb 1077d6 <== NEVER TAKEN new_size = major + 1; 1077d0: 89 d9 mov %ebx,%ecx 1077d2: 41 inc %ecx 1077d3: 89 4d e0 mov %ecx,-0x20(%ebp) } table = realloc(table, new_size * sizeof(*table)); 1077d6: 52 push %edx 1077d7: 52 push %edx 1077d8: 8b 55 e0 mov -0x20(%ebp),%edx 1077db: c1 e2 03 shl $0x3,%edx 1077de: 52 push %edx 1077df: 50 push %eax 1077e0: e8 b7 18 00 00 call 10909c 1077e5: 89 c2 mov %eax,%edx if (table == NULL) { 1077e7: 83 c4 10 add $0x10,%esp 1077ea: 85 c0 test %eax,%eax 1077ec: 0f 84 35 01 00 00 je 107927 <== ALWAYS TAKEN return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 1077f2: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 1077f5: 29 f9 sub %edi,%ecx <== NOT EXECUTED 1077f7: c1 e1 03 shl $0x3,%ecx <== NOT EXECUTED 1077fa: 8d 3c f8 lea (%eax,%edi,8),%edi <== NOT EXECUTED 1077fd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1077ff: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED disktab = table; 107801: 89 15 6c 86 12 00 mov %edx,0x12866c <== NOT EXECUTED disktab_size = new_size; 107807: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10780a: a3 70 86 12 00 mov %eax,0x128670 <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 10780f: 8b 55 e4 mov -0x1c(%ebp),%edx 107812: c1 e2 03 shl $0x3,%edx 107815: 89 55 dc mov %edx,-0x24(%ebp) 107818: 03 15 6c 86 12 00 add 0x12866c,%edx 10781e: 8b 02 mov (%edx),%eax 107820: 85 c0 test %eax,%eax 107822: 74 08 je 10782c 107824: 8b 4d d8 mov -0x28(%ebp),%ecx 107827: 3b 4a 04 cmp 0x4(%edx),%ecx 10782a: 72 5e jb 10788a <== ALWAYS TAKEN rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 10782c: 8b 7a 04 mov 0x4(%edx),%edi rtems_device_minor_number new_size = 0; if (old_size == 0) { 10782f: ba 08 00 00 00 mov $0x8,%edx 107834: 85 ff test %edi,%edi 107836: 74 03 je 10783b <== ALWAYS TAKEN new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 107838: 8d 14 3f lea (%edi,%edi,1),%edx <== NOT EXECUTED } if (minor >= new_size) { 10783b: 39 55 d8 cmp %edx,-0x28(%ebp) 10783e: 72 04 jb 107844 new_size = minor + 1; 107840: 8b 55 d8 mov -0x28(%ebp),%edx 107843: 42 inc %edx } table = realloc(table, new_size * sizeof(*table)); 107844: 51 push %ecx 107845: 51 push %ecx 107846: 8d 0c 95 00 00 00 00 lea 0x0(,%edx,4),%ecx 10784d: 51 push %ecx 10784e: 50 push %eax 10784f: 89 55 cc mov %edx,-0x34(%ebp) 107852: e8 45 18 00 00 call 10909c 107857: 89 45 e0 mov %eax,-0x20(%ebp) if (table == NULL) { 10785a: 83 c4 10 add $0x10,%esp 10785d: 85 c0 test %eax,%eax 10785f: 8b 55 cc mov -0x34(%ebp),%edx 107862: 0f 84 bf 00 00 00 je 107927 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 107868: 89 d1 mov %edx,%ecx 10786a: 29 f9 sub %edi,%ecx 10786c: c1 e1 02 shl $0x2,%ecx 10786f: 8d 3c b8 lea (%eax,%edi,4),%edi 107872: 89 7d d0 mov %edi,-0x30(%ebp) 107875: 31 c0 xor %eax,%eax 107877: f3 aa rep stos %al,%es:(%edi) disktab [major].minor = table; 107879: 8b 45 dc mov -0x24(%ebp),%eax 10787c: 03 05 6c 86 12 00 add 0x12866c,%eax 107882: 8b 4d e0 mov -0x20(%ebp),%ecx 107885: 89 08 mov %ecx,(%eax) disktab [major].size = new_size; 107887: 89 50 04 mov %edx,0x4(%eax) } return disktab [major].minor + minor; 10788a: a1 6c 86 12 00 mov 0x12866c,%eax 10788f: 8b 55 d8 mov -0x28(%ebp),%edx 107892: c1 e2 02 shl $0x2,%edx { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 107895: 8b 4d e4 mov -0x1c(%ebp),%ecx 107898: 03 14 c8 add (%eax,%ecx,8),%edx 10789b: 89 55 e4 mov %edx,-0x1c(%ebp) 10789e: 0f 84 83 00 00 00 je 107927 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 1078a4: b8 0c 00 00 00 mov $0xc,%eax 1078a9: 83 3a 00 cmpl $0x0,(%edx) 1078ac: 75 7e jne 10792c return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 1078ae: 83 ec 0c sub $0xc,%esp 1078b1: 6a 34 push $0x34 1078b3: e8 70 0d 00 00 call 108628 1078b8: 89 c7 mov %eax,%edi if (dd == NULL) { 1078ba: 83 c4 10 add $0x10,%esp 1078bd: 85 c0 test %eax,%eax 1078bf: 74 66 je 107927 <== NEVER TAKEN return RTEMS_NO_MEMORY; } if (name != NULL) { 1078c1: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) 1078c5: 74 3d je 107904 alloc_name = strdup(name); 1078c7: 83 ec 0c sub $0xc,%esp 1078ca: ff 75 d4 pushl -0x2c(%ebp) 1078cd: e8 aa e0 00 00 call 11597c if (alloc_name == NULL) { 1078d2: 83 c4 10 add $0x10,%esp 1078d5: 85 c0 test %eax,%eax 1078d7: 75 5b jne 107934 <== ALWAYS TAKEN free(dd); 1078d9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078dc: 57 push %edi <== NOT EXECUTED 1078dd: e8 a6 0a 00 00 call 108388 <== NOT EXECUTED 1078e2: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 1078e7: eb 16 jmp 1078ff <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 1078e9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1078ec: 52 push %edx <== NOT EXECUTED 1078ed: e8 96 0a 00 00 call 108388 <== NOT EXECUTED free(dd); 1078f2: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 1078f5: e8 8e 0a 00 00 call 108388 <== NOT EXECUTED 1078fa: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_UNSATISFIED; 1078ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107902: eb 28 jmp 10792c <== NOT EXECUTED 107904: 31 c9 xor %ecx,%ecx } } dd->dev = dev; 107906: 89 1f mov %ebx,(%edi) 107908: 89 77 04 mov %esi,0x4(%edi) dd->name = alloc_name; 10790b: 89 4f 10 mov %ecx,0x10(%edi) dd->uses = 0; 10790e: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) dd->deleted = false; 107915: c6 47 30 00 movb $0x0,0x30(%edi) *dd_entry = dd; 107919: 8b 45 e4 mov -0x1c(%ebp),%eax 10791c: 89 38 mov %edi,(%eax) *dd_ptr = dd; 10791e: 8b 45 08 mov 0x8(%ebp),%eax 107921: 89 38 mov %edi,(%eax) 107923: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 107925: eb 05 jmp 10792c 107927: b8 1a 00 00 00 mov $0x1a,%eax } 10792c: 8d 65 f4 lea -0xc(%ebp),%esp 10792f: 5b pop %ebx 107930: 5e pop %esi 107931: 5f pop %edi 107932: c9 leave 107933: c3 ret return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 107934: 56 push %esi 107935: 53 push %ebx 107936: 68 ff 61 00 00 push $0x61ff 10793b: 50 push %eax 10793c: 89 45 cc mov %eax,-0x34(%ebp) 10793f: 89 45 c8 mov %eax,-0x38(%ebp) 107942: e8 a1 0d 00 00 call 1086e8 107947: 83 c4 10 add $0x10,%esp 10794a: 85 c0 test %eax,%eax 10794c: 8b 55 cc mov -0x34(%ebp),%edx 10794f: 8b 4d c8 mov -0x38(%ebp),%ecx 107952: 79 b2 jns 107906 <== ALWAYS TAKEN 107954: eb 93 jmp 1078e9 <== NOT EXECUTED =============================================================================== 0010d330 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10d330: 55 push %ebp 10d331: 89 e5 mov %esp,%ebp 10d333: 83 ec 1c sub $0x1c,%esp 10d336: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 10d339: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10d33c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10d33f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10d346: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10d34d: 8d 55 ec lea -0x14(%ebp),%edx 10d350: 52 push %edx 10d351: ff 70 0c pushl 0xc(%eax) 10d354: ff 70 08 pushl 0x8(%eax) 10d357: e8 c8 09 00 00 call 10dd24 10d35c: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) { 10d35e: 83 c4 10 add $0x10,%esp 10d361: 31 c0 xor %eax,%eax 10d363: 85 d2 test %edx,%edx 10d365: 74 0c je 10d373 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 10d367: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10d36a: 52 push %edx <== NOT EXECUTED 10d36b: e8 c0 00 00 00 call 10d430 <== NOT EXECUTED 10d370: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 10d373: c9 leave 10d374: c3 ret =============================================================================== 0010d387 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10d387: 55 push %ebp 10d388: 89 e5 mov %esp,%ebp 10d38a: 57 push %edi 10d38b: 56 push %esi 10d38c: 53 push %ebx 10d38d: 83 ec 1c sub $0x1c,%esp 10d390: 8b 4d 0c mov 0xc(%ebp),%ecx 10d393: 8b 5d 14 mov 0x14(%ebp),%ebx int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 10d396: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10d39d: 74 0d je 10d3ac <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EPERM ); 10d39f: e8 38 16 00 00 call 10e9dc <__errno> <== NOT EXECUTED 10d3a4: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10d3aa: eb 77 jmp 10d423 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 10d3ac: 8b 33 mov (%ebx),%esi if (!device_name_table) 10d3ae: 85 f6 test %esi,%esi 10d3b0: 74 04 je 10d3b6 <== NEVER TAKEN 10d3b2: 31 ff xor %edi,%edi 10d3b4: eb 5a jmp 10d410 rtems_set_errno_and_return_minus_one( EFAULT ); 10d3b6: e8 21 16 00 00 call 10e9dc <__errno> <== NOT EXECUTED 10d3bb: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10d3c1: eb 60 jmp 10d423 <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10d3c3: 8b 16 mov (%esi),%edx 10d3c5: 85 d2 test %edx,%edx 10d3c7: 74 43 je 10d40c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10d3c9: 50 push %eax 10d3ca: 51 push %ecx 10d3cb: 52 push %edx 10d3cc: ff 75 08 pushl 0x8(%ebp) 10d3cf: 89 55 e4 mov %edx,-0x1c(%ebp) 10d3d2: 89 4d e0 mov %ecx,-0x20(%ebp) 10d3d5: e8 12 22 00 00 call 10f5ec 10d3da: 83 c4 10 add $0x10,%esp 10d3dd: 85 c0 test %eax,%eax 10d3df: 8b 55 e4 mov -0x1c(%ebp),%edx 10d3e2: 8b 4d e0 mov -0x20(%ebp),%ecx 10d3e5: 75 25 jne 10d40c <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10d3e7: 80 3c 0a 00 cmpb $0x0,(%edx,%ecx,1) 10d3eb: 75 1f jne 10d40c <== NEVER TAKEN continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 10d3ed: 89 33 mov %esi,(%ebx) pathloc->handlers = &devFS_file_handlers; 10d3ef: c7 43 08 68 ef 11 00 movl $0x11ef68,0x8(%ebx) pathloc->ops = &devFS_ops; 10d3f6: c7 43 0c 20 ef 11 00 movl $0x11ef20,0xc(%ebx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10d3fd: a1 c0 ef 11 00 mov 0x11efc0,%eax 10d402: 8b 40 28 mov 0x28(%eax),%eax 10d405: 89 43 10 mov %eax,0x10(%ebx) 10d408: 31 c0 xor %eax,%eax return 0; 10d40a: eb 1a jmp 10d426 /* 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++) { 10d40c: 47 inc %edi 10d40d: 83 c6 14 add $0x14,%esi 10d410: 3b 3d 48 d1 11 00 cmp 0x11d148,%edi 10d416: 72 ab jb 10d3c3 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10d418: e8 bf 15 00 00 call 10e9dc <__errno> 10d41d: c7 00 02 00 00 00 movl $0x2,(%eax) 10d423: 83 c8 ff or $0xffffffff,%eax } 10d426: 8d 65 f4 lea -0xc(%ebp),%esp 10d429: 5b pop %ebx 10d42a: 5e pop %esi 10d42b: 5f pop %edi 10d42c: c9 leave 10d42d: c3 ret =============================================================================== 00106d80 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 106d80: 55 push %ebp 106d81: 89 e5 mov %esp,%ebp 106d83: 57 push %edi 106d84: 53 push %ebx 106d85: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 106d88: 83 ec 0c sub $0xc,%esp 106d8b: 6b 05 48 d1 11 00 14 imul $0x14,0x11d148,%eax 106d92: 50 push %eax 106d93: e8 54 61 00 00 call 10ceec <_Workspace_Allocate> 106d98: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 106d9a: 83 c4 10 add $0x10,%esp 106d9d: 85 c0 test %eax,%eax 106d9f: 75 10 jne 106db1 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106da1: e8 36 7c 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106da6: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106dac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106daf: eb 20 jmp 106dd1 <== NOT EXECUTED memset( 106db1: 6b 0d 48 d1 11 00 14 imul $0x14,0x11d148,%ecx 106db8: 31 c0 xor %eax,%eax 106dba: 89 d7 mov %edx,%edi 106dbc: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 106dbe: c7 43 24 68 ef 11 00 movl $0x11ef68,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 106dc5: c7 43 28 20 ef 11 00 movl $0x11ef20,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 106dcc: 89 53 1c mov %edx,0x1c(%ebx) 106dcf: 31 c0 xor %eax,%eax return 0; } 106dd1: 8d 65 f8 lea -0x8(%ebp),%esp 106dd4: 5b pop %ebx 106dd5: 5f pop %edi 106dd6: c9 leave 106dd7: c3 ret =============================================================================== 00106ee4 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 106ee4: 55 push %ebp 106ee5: 89 e5 mov %esp,%ebp 106ee7: 83 ec 1c sub $0x1c,%esp 106eea: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106eed: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 106ef0: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 106ef3: 8b 55 0c mov 0xc(%ebp),%edx 106ef6: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 106ef9: 8b 55 10 mov 0x10(%ebp),%edx 106efc: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 106eff: 8d 55 e8 lea -0x18(%ebp),%edx 106f02: 52 push %edx 106f03: ff 70 0c pushl 0xc(%eax) 106f06: ff 70 08 pushl 0x8(%eax) 106f09: e8 7a 39 00 00 call 10a888 np->major, np->minor, (void *) &args ); if ( status ) 106f0e: 83 c4 10 add $0x10,%esp 106f11: 85 c0 test %eax,%eax 106f13: 74 0e je 106f23 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106f15: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f18: 50 push %eax <== NOT EXECUTED 106f19: e8 12 65 00 00 call 10d430 <== NOT EXECUTED 106f1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106f21: eb 03 jmp 106f26 <== NOT EXECUTED return args.ioctl_return; 106f23: 8b 45 f4 mov -0xc(%ebp),%eax } 106f26: c9 leave 106f27: c3 ret =============================================================================== 00106dd8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 106dd8: 55 push %ebp 106dd9: 89 e5 mov %esp,%ebp 106ddb: 57 push %edi 106ddc: 56 push %esi 106ddd: 53 push %ebx 106dde: 83 ec 1c sub $0x1c,%esp 106de1: 8b 7d 08 mov 0x8(%ebp),%edi 106de4: 8b 4d 10 mov 0x10(%ebp),%ecx 106de7: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 106dea: 80 3f 64 cmpb $0x64,(%edi) 106ded: 75 18 jne 106e07 <== NEVER TAKEN 106def: 80 7f 01 65 cmpb $0x65,0x1(%edi) 106df3: 75 12 jne 106e07 <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 106df5: 80 7f 02 76 cmpb $0x76,0x2(%edi) 106df9: 75 0c jne 106e07 <== NEVER TAKEN 106dfb: 31 c0 xor %eax,%eax 106dfd: 80 7f 03 00 cmpb $0x0,0x3(%edi) 106e01: 0f 84 c9 00 00 00 je 106ed0 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 106e07: 8b 45 0c mov 0xc(%ebp),%eax 106e0a: 25 00 f0 00 00 and $0xf000,%eax 106e0f: 3d 00 20 00 00 cmp $0x2000,%eax 106e14: 74 14 je 106e2a <== ALWAYS TAKEN 106e16: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 106e1b: 74 0d je 106e2a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 106e1d: e8 ba 7b 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106e22: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 106e28: eb 23 jmp 106e4d <== NOT EXECUTED ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 106e2a: 89 4d e0 mov %ecx,-0x20(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 106e2d: 89 55 e4 mov %edx,-0x1c(%ebp) else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 106e30: 8b 45 18 mov 0x18(%ebp),%eax 106e33: 8b 08 mov (%eax),%ecx if (!device_name_table) 106e35: 85 c9 test %ecx,%ecx 106e37: 74 09 je 106e42 <== NEVER TAKEN 106e39: 89 ca mov %ecx,%edx 106e3b: 83 ce ff or $0xffffffff,%esi 106e3e: 31 db xor %ebx,%ebx 106e40: eb 46 jmp 106e88 rtems_set_errno_and_return_minus_one( EFAULT ); 106e42: e8 95 7b 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106e47: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106e4d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106e50: eb 7e jmp 106ed0 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 106e52: 8b 02 mov (%edx),%eax 106e54: 85 c0 test %eax,%eax 106e56: 74 2a je 106e82 <== ALWAYS TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 106e58: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 106e5b: 50 push %eax <== NOT EXECUTED 106e5c: 57 push %edi <== NOT EXECUTED 106e5d: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 106e60: 89 4d d8 mov %ecx,-0x28(%ebp) <== NOT EXECUTED 106e63: e8 54 86 00 00 call 10f4bc <== NOT EXECUTED 106e68: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106e6b: 85 c0 test %eax,%eax <== NOT EXECUTED 106e6d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 106e70: 8b 4d d8 mov -0x28(%ebp),%ecx <== NOT EXECUTED 106e73: 75 0f jne 106e84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 106e75: e8 62 7b 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106e7a: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 106e80: eb cb jmp 106e4d <== NOT EXECUTED 106e82: 89 de mov %ebx,%esi /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 106e84: 43 inc %ebx 106e85: 83 c2 14 add $0x14,%edx 106e88: 3b 1d 48 d1 11 00 cmp 0x11d148,%ebx 106e8e: 72 c2 jb 106e52 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 106e90: 83 fe ff cmp $0xffffffff,%esi 106e93: 75 0d jne 106ea2 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); 106e95: e8 42 7b 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106e9a: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 106ea0: eb ab jmp 106e4d <== NOT EXECUTED _ISR_Disable(level); 106ea2: 9c pushf 106ea3: fa cli 106ea4: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 106ea5: 6b d6 14 imul $0x14,%esi,%edx 106ea8: 8d 14 11 lea (%ecx,%edx,1),%edx 106eab: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 106ead: 31 c0 xor %eax,%eax 106eaf: 83 c9 ff or $0xffffffff,%ecx 106eb2: f2 ae repnz scas %es:(%edi),%al 106eb4: f7 d1 not %ecx 106eb6: 49 dec %ecx 106eb7: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 106eba: 8b 45 e0 mov -0x20(%ebp),%eax 106ebd: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 106ec0: 8b 45 e4 mov -0x1c(%ebp),%eax 106ec3: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 106ec6: 8b 45 0c mov 0xc(%ebp),%eax 106ec9: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 106ecc: 53 push %ebx 106ecd: 9d popf 106ece: 31 c0 xor %eax,%eax return 0; } 106ed0: 8d 65 f4 lea -0xc(%ebp),%esp 106ed3: 5b pop %ebx 106ed4: 5e pop %esi 106ed5: 5f pop %edi 106ed6: c9 leave 106ed7: c3 ret =============================================================================== 00106f28 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 106f28: 55 push %ebp 106f29: 89 e5 mov %esp,%ebp 106f2b: 83 ec 1c sub $0x1c,%esp 106f2e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106f31: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 106f34: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 106f37: 8b 40 14 mov 0x14(%eax),%eax 106f3a: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 106f3d: 8b 45 14 mov 0x14(%ebp),%eax 106f40: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 106f43: 8d 45 ec lea -0x14(%ebp),%eax 106f46: 50 push %eax 106f47: ff 72 0c pushl 0xc(%edx) 106f4a: ff 72 08 pushl 0x8(%edx) 106f4d: e8 0e 3a 00 00 call 10a960 106f52: 89 c2 mov %eax,%edx np->major, np->minor, (void *) &args ); if ( status ) 106f54: 83 c4 10 add $0x10,%esp 106f57: 31 c0 xor %eax,%eax 106f59: 85 d2 test %edx,%edx 106f5b: 74 0c je 106f69 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 106f5d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106f60: 52 push %edx <== NOT EXECUTED 106f61: e8 ca 64 00 00 call 10d430 <== NOT EXECUTED 106f66: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 106f69: c9 leave 106f6a: c3 ret =============================================================================== 00106f6c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 106f6c: 55 push %ebp <== NOT EXECUTED 106f6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 106f6f: 53 push %ebx <== NOT EXECUTED 106f70: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 106f73: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 106f76: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 106f79: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 106f7c: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 106f7f: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 106f82: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 106f85: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 106f88: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 106f8b: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 106f8e: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 106f91: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 106f94: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 106f97: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 106f9a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 106fa1: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 106fa4: 50 push %eax <== NOT EXECUTED 106fa5: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 106fa8: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 106fab: e8 e0 39 00 00 call 10a990 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 106fb0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fb3: 85 c0 test %eax,%eax <== NOT EXECUTED 106fb5: 74 0e je 106fc5 <== NOT EXECUTED return rtems_deviceio_errno(status); 106fb7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 106fba: 50 push %eax <== NOT EXECUTED 106fbb: e8 70 64 00 00 call 10d430 <== NOT EXECUTED 106fc0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 106fc3: eb 03 jmp 106fc8 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 106fc5: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 106fc8: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 106fcb: c9 leave <== NOT EXECUTED 106fcc: c3 ret <== NOT EXECUTED =============================================================================== 00106fd0 : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 106fd0: 55 push %ebp 106fd1: 89 e5 mov %esp,%ebp 106fd3: 53 push %ebx 106fd4: 83 ec 04 sub $0x4,%esp 106fd7: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 106fda: 8b 45 08 mov 0x8(%ebp),%eax 106fdd: 8b 00 mov (%eax),%eax if (!the_dev) 106fdf: 85 c0 test %eax,%eax 106fe1: 75 10 jne 106ff3 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); 106fe3: e8 f4 79 00 00 call 10e9dc <__errno> <== NOT EXECUTED 106fe8: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 106fee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 106ff1: eb 14 jmp 107007 <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 106ff3: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 106ff6: 8b 58 08 mov 0x8(%eax),%ebx 106ff9: 89 5a 18 mov %ebx,0x18(%edx) 106ffc: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 106fff: 8b 40 10 mov 0x10(%eax),%eax 107002: 89 42 0c mov %eax,0xc(%edx) 107005: 31 c0 xor %eax,%eax return 0; } 107007: 5a pop %edx 107008: 5b pop %ebx 107009: c9 leave 10700a: c3 ret =============================================================================== 0010700c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 10700c: 55 push %ebp 10700d: 89 e5 mov %esp,%ebp 10700f: 53 push %ebx 107010: 83 ec 28 sub $0x28,%esp 107013: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107016: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107019: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 10701c: 8b 48 0c mov 0xc(%eax),%ecx 10701f: 8b 58 10 mov 0x10(%eax),%ebx 107022: 89 4d e0 mov %ecx,-0x20(%ebp) 107025: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107028: 8b 4d 0c mov 0xc(%ebp),%ecx 10702b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 10702e: 8b 4d 10 mov 0x10(%ebp),%ecx 107031: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107034: 8b 40 14 mov 0x14(%eax),%eax 107037: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 10703a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107041: 8d 45 dc lea -0x24(%ebp),%eax 107044: 50 push %eax 107045: ff 72 0c pushl 0xc(%edx) 107048: ff 72 08 pushl 0x8(%edx) 10704b: e8 70 39 00 00 call 10a9c0 np->major, np->minor, (void *) &args ); if ( status ) 107050: 83 c4 10 add $0x10,%esp 107053: 85 c0 test %eax,%eax 107055: 74 0e je 107065 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 107057: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10705a: 50 push %eax <== NOT EXECUTED 10705b: e8 d0 63 00 00 call 10d430 <== NOT EXECUTED 107060: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107063: eb 03 jmp 107068 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 107065: 8b 45 f4 mov -0xc(%ebp),%eax } 107068: 8b 5d fc mov -0x4(%ebp),%ebx 10706b: c9 leave 10706c: c3 ret =============================================================================== 00110e38 : */ int device_close( rtems_libio_t *iop ) { 110e38: 55 push %ebp 110e39: 89 e5 mov %esp,%ebp 110e3b: 83 ec 1c sub $0x1c,%esp 110e3e: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110e41: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 110e44: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 110e47: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 110e4e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 110e55: 8d 55 ec lea -0x14(%ebp),%edx 110e58: 52 push %edx 110e59: ff 70 54 pushl 0x54(%eax) 110e5c: ff 70 50 pushl 0x50(%eax) 110e5f: e8 84 07 00 00 call 1115e8 110e64: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 110e66: 83 c4 10 add $0x10,%esp 110e69: 31 c0 xor %eax,%eax 110e6b: 85 d2 test %edx,%edx 110e6d: 74 0c je 110e7b <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110e6f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110e72: 52 push %edx <== NOT EXECUTED 110e73: e8 98 09 00 00 call 111810 <== NOT EXECUTED 110e78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 110e7b: c9 leave 110e7c: c3 ret =============================================================================== 00110d32 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 110d32: 55 push %ebp 110d33: 89 e5 mov %esp,%ebp 110d35: 83 ec 1c sub $0x1c,%esp 110d38: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 110d3b: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 110d3e: 8b 55 0c mov 0xc(%ebp),%edx 110d41: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 110d44: 8b 55 10 mov 0x10(%ebp),%edx 110d47: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 110d4a: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 110d4d: 8d 55 e8 lea -0x18(%ebp),%edx 110d50: 52 push %edx 110d51: ff 70 54 pushl 0x54(%eax) 110d54: ff 70 50 pushl 0x50(%eax) 110d57: e8 bc 08 00 00 call 111618 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110d5c: 83 c4 10 add $0x10,%esp 110d5f: 85 c0 test %eax,%eax 110d61: 74 0e je 110d71 <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110d63: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110d66: 50 push %eax <== NOT EXECUTED 110d67: e8 a4 0a 00 00 call 111810 <== NOT EXECUTED 110d6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110d6f: eb 03 jmp 110d74 <== NOT EXECUTED return args.ioctl_return; 110d71: 8b 45 f4 mov -0xc(%ebp),%eax } 110d74: c9 leave 110d75: c3 ret =============================================================================== 00110e7d : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110e7d: 55 push %ebp 110e7e: 89 e5 mov %esp,%ebp 110e80: 83 ec 1c sub $0x1c,%esp 110e83: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110e86: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 110e89: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 110e8c: 8b 40 14 mov 0x14(%eax),%eax 110e8f: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 110e92: 8b 45 14 mov 0x14(%ebp),%eax 110e95: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 110e98: 8d 45 ec lea -0x14(%ebp),%eax 110e9b: 50 push %eax 110e9c: ff 72 54 pushl 0x54(%edx) 110e9f: ff 72 50 pushl 0x50(%edx) 110ea2: e8 a1 07 00 00 call 111648 110ea7: 89 c2 mov %eax,%edx the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110ea9: 83 c4 10 add $0x10,%esp 110eac: 31 c0 xor %eax,%eax 110eae: 85 d2 test %edx,%edx 110eb0: 74 0c je 110ebe <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110eb2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110eb5: 52 push %edx <== NOT EXECUTED 110eb6: e8 55 09 00 00 call 111810 <== NOT EXECUTED 110ebb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 110ebe: c9 leave 110ebf: c3 ret =============================================================================== 00110dd7 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 110dd7: 55 push %ebp 110dd8: 89 e5 mov %esp,%ebp 110dda: 53 push %ebx 110ddb: 83 ec 28 sub $0x28,%esp 110dde: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110de1: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 110de4: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 110de7: 8b 48 0c mov 0xc(%eax),%ecx 110dea: 8b 58 10 mov 0x10(%eax),%ebx 110ded: 89 4d e0 mov %ecx,-0x20(%ebp) 110df0: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = buffer; 110df3: 8b 4d 0c mov 0xc(%ebp),%ecx 110df6: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 110df9: 8b 4d 10 mov 0x10(%ebp),%ecx 110dfc: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 110dff: 8b 40 14 mov 0x14(%eax),%eax 110e02: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 110e05: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_read( 110e0c: 8d 45 dc lea -0x24(%ebp),%eax 110e0f: 50 push %eax 110e10: ff 72 54 pushl 0x54(%edx) 110e13: ff 72 50 pushl 0x50(%edx) 110e16: e8 5d 08 00 00 call 111678 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110e1b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110e1e: 85 c0 test %eax,%eax <== NOT EXECUTED 110e20: 74 0e je 110e30 <== NOT EXECUTED return rtems_deviceio_errno(status); 110e22: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110e25: 50 push %eax <== NOT EXECUTED 110e26: e8 e5 09 00 00 call 111810 <== NOT EXECUTED 110e2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110e2e: eb 03 jmp 110e33 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 110e30: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 110e33: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110e36: c9 leave <== NOT EXECUTED 110e37: c3 ret <== NOT EXECUTED =============================================================================== 00110d76 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 110d76: 55 push %ebp 110d77: 89 e5 mov %esp,%ebp 110d79: 53 push %ebx 110d7a: 83 ec 28 sub $0x28,%esp 110d7d: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110d80: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 110d83: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 110d86: 8b 48 0c mov 0xc(%eax),%ecx 110d89: 8b 58 10 mov 0x10(%eax),%ebx 110d8c: 89 4d e0 mov %ecx,-0x20(%ebp) 110d8f: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 110d92: 8b 4d 0c mov 0xc(%ebp),%ecx 110d95: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 110d98: 8b 4d 10 mov 0x10(%ebp),%ecx 110d9b: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 110d9e: 8b 40 14 mov 0x14(%eax),%eax 110da1: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 110da4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 110dab: 8d 45 dc lea -0x24(%ebp),%eax 110dae: 50 push %eax 110daf: ff 72 54 pushl 0x54(%edx) 110db2: ff 72 50 pushl 0x50(%edx) 110db5: e8 ee 08 00 00 call 1116a8 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 110dba: 83 c4 10 add $0x10,%esp 110dbd: 85 c0 test %eax,%eax 110dbf: 74 0e je 110dcf <== ALWAYS TAKEN return rtems_deviceio_errno(status); 110dc1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110dc4: 50 push %eax <== NOT EXECUTED 110dc5: e8 46 0a 00 00 call 111810 <== NOT EXECUTED 110dca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110dcd: eb 03 jmp 110dd2 <== NOT EXECUTED return (ssize_t) args.bytes_moved; 110dcf: 8b 45 f4 mov -0xc(%ebp),%eax } 110dd2: 8b 5d fc mov -0x4(%ebp),%ebx 110dd5: c9 leave 110dd6: c3 ret =============================================================================== 001074ec : */ static volatile bool diskdevs_protected; static rtems_status_code disk_lock(void) { 1074ec: 55 push %ebp 1074ed: 89 e5 mov %esp,%ebp 1074ef: 83 ec 0c sub $0xc,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 1074f2: 6a 00 push $0x0 1074f4: 6a 00 push $0x0 1074f6: ff 35 74 86 12 00 pushl 0x128674 1074fc: e8 9f 40 00 00 call 10b5a0 107501: 89 c2 mov %eax,%edx if (sc == RTEMS_SUCCESSFUL) { 107503: 83 c4 10 add $0x10,%esp 107506: b8 16 00 00 00 mov $0x16,%eax 10750b: 85 d2 test %edx,%edx 10750d: 75 09 jne 107518 <== NEVER TAKEN diskdevs_protected = true; 10750f: c6 05 78 86 12 00 01 movb $0x1,0x128678 107516: 30 c0 xor %al,%al return RTEMS_SUCCESSFUL; } else { return RTEMS_NOT_CONFIGURED; } } 107518: c9 leave 107519: c3 ret =============================================================================== 0010751a : static void disk_unlock(void) { 10751a: 55 push %ebp 10751b: 89 e5 mov %esp,%ebp 10751d: 83 ec 14 sub $0x14,%esp rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 107520: c6 05 78 86 12 00 00 movb $0x0,0x128678 sc = rtems_semaphore_release(diskdevs_mutex); 107527: ff 35 74 86 12 00 pushl 0x128674 10752d: e8 5a 41 00 00 call 10b68c if (sc != RTEMS_SUCCESSFUL) { 107532: 83 c4 10 add $0x10,%esp 107535: 85 c0 test %eax,%eax 107537: 74 0d je 107546 <== ALWAYS TAKEN /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 107539: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10753c: 68 ef be ad de push $0xdeadbeef <== NOT EXECUTED 107541: e8 a6 45 00 00 call 10baec <== NOT EXECUTED } } 107546: c9 leave 107547: c3 ret =============================================================================== 00109056 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 109056: 55 push %ebp 109057: 89 e5 mov %esp,%ebp 109059: 53 push %ebx 10905a: 83 ec 04 sub $0x4,%esp 10905d: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10905f: 83 b8 b4 00 00 00 00 cmpl $0x0,0xb4(%eax) 109066: 75 2e jne 109096 109068: eb 41 jmp 1090ab rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 10906a: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109071: 00 00 00 rtems_interrupt_enable (level); 109074: 50 push %eax 109075: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109076: 50 push %eax 109077: 6a 00 push $0x0 109079: 6a 00 push $0x0 10907b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109081: e8 72 15 00 00 call 10a5f8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109086: 83 c4 10 add $0x10,%esp 109089: 85 c0 test %eax,%eax 10908b: 74 09 je 109096 <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 10908d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109090: 50 push %eax <== NOT EXECUTED 109091: e8 f2 1a 00 00 call 10ab88 <== NOT EXECUTED rtems_interrupt_disable (level); 109096: 9c pushf 109097: fa cli 109098: 58 pop %eax 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) { 109099: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10909f: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 1090a5: 39 d1 cmp %edx,%ecx 1090a7: 75 c1 jne 10906a RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 1090a9: 50 push %eax 1090aa: 9d popf } } 1090ab: 8b 5d fc mov -0x4(%ebp),%ebx 1090ae: c9 leave 1090af: c3 ret =============================================================================== 00107ca0 : int dup2( int fildes, int fildes2 ) { 107ca0: 55 push %ebp 107ca1: 89 e5 mov %esp,%ebp 107ca3: 57 push %edi 107ca4: 56 push %esi 107ca5: 53 push %ebx 107ca6: 83 ec 64 sub $0x64,%esp 107ca9: 8b 5d 08 mov 0x8(%ebp),%ebx 107cac: 8b 75 0c mov 0xc(%ebp),%esi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 107caf: 8d 7d a0 lea -0x60(%ebp),%edi 107cb2: 57 push %edi 107cb3: 53 push %ebx 107cb4: e8 ab 04 00 00 call 108164 if ( status == -1 ) 107cb9: 83 c4 10 add $0x10,%esp 107cbc: 40 inc %eax 107cbd: 74 1e je 107cdd <== NEVER TAKEN /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 107cbf: 52 push %edx 107cc0: 52 push %edx 107cc1: 57 push %edi 107cc2: 56 push %esi 107cc3: e8 9c 04 00 00 call 108164 if ( status == -1 ) 107cc8: 83 c4 10 add $0x10,%esp 107ccb: 40 inc %eax 107ccc: 74 0f je 107cdd <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 107cce: 50 push %eax <== NOT EXECUTED 107ccf: 56 push %esi <== NOT EXECUTED 107cd0: 6a 00 push $0x0 <== NOT EXECUTED 107cd2: 53 push %ebx <== NOT EXECUTED 107cd3: e8 c8 01 00 00 call 107ea0 <== NOT EXECUTED 107cd8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107cdb: eb 03 jmp 107ce0 <== NOT EXECUTED 107cdd: 83 c8 ff or $0xffffffff,%eax } 107ce0: 8d 65 f4 lea -0xc(%ebp),%esp 107ce3: 5b pop %ebx 107ce4: 5e pop %esi 107ce5: 5f pop %edi 107ce6: c9 leave 107ce7: c3 ret =============================================================================== 00108c73 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 108c73: 55 push %ebp <== NOT EXECUTED 108c74: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c76: 53 push %ebx <== NOT EXECUTED 108c77: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108c7a: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 108c7e: 74 3e je 108cbe <== NOT EXECUTED 108c80: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 108c83: 8b 1d fc 34 12 00 mov 0x1234fc,%ebx <== NOT EXECUTED 108c89: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 108c8e: 74 2e je 108cbe <== NOT EXECUTED 108c90: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108c92: 74 2a je 108cbe <== NOT EXECUTED 108c94: 3c 0a cmp $0xa,%al <== NOT EXECUTED 108c96: 74 26 je 108cbe <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 108c98: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 108c9c: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 108c9f: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 108ca2: 50 push %eax <== NOT EXECUTED 108ca3: 52 push %edx <== NOT EXECUTED 108ca4: 6a 02 push $0x2 <== NOT EXECUTED 108ca6: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 108ca9: 50 push %eax <== NOT EXECUTED 108caa: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 108cad: e8 83 fd ff ff call 108a35 <== NOT EXECUTED tty->column += 2; 108cb2: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108cb5: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 108cb9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108cbc: eb 08 jmp 108cc6 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 108cbe: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108cc1: e8 8f fe ff ff call 108b55 <== NOT EXECUTED } } 108cc6: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108cc9: c9 leave <== NOT EXECUTED 108cca: c3 ret <== NOT EXECUTED =============================================================================== 00127f18 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 127f18: 55 push %ebp <== NOT EXECUTED 127f19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 127f1b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 127f1e: a1 8c 76 16 00 mov 0x16768c,%eax <== NOT EXECUTED 127f23: 85 c0 test %eax,%eax <== NOT EXECUTED 127f25: 74 0c je 127f33 <== NOT EXECUTED fclose(group_fp); 127f27: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127f2a: 50 push %eax <== NOT EXECUTED 127f2b: e8 b4 4f 01 00 call 13cee4 <== NOT EXECUTED 127f30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 127f33: c9 leave <== NOT EXECUTED 127f34: c3 ret <== NOT EXECUTED =============================================================================== 00127f35 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 127f35: 55 push %ebp <== NOT EXECUTED 127f36: 89 e5 mov %esp,%ebp <== NOT EXECUTED 127f38: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 127f3b: a1 a4 75 16 00 mov 0x1675a4,%eax <== NOT EXECUTED 127f40: 85 c0 test %eax,%eax <== NOT EXECUTED 127f42: 74 0c je 127f50 <== NOT EXECUTED fclose(passwd_fp); 127f44: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 127f47: 50 push %eax <== NOT EXECUTED 127f48: e8 97 4f 01 00 call 13cee4 <== NOT EXECUTED 127f4d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 127f50: c9 leave <== NOT EXECUTED 127f51: c3 ret <== NOT EXECUTED =============================================================================== 00108ccb : * 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) { 108ccb: 55 push %ebp <== NOT EXECUTED 108ccc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108cce: 57 push %edi <== NOT EXECUTED 108ccf: 56 push %esi <== NOT EXECUTED 108cd0: 53 push %ebx <== NOT EXECUTED 108cd1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 108cd4: 89 c3 mov %eax,%ebx <== NOT EXECUTED 108cd6: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED if (tty->ccount == 0) 108cd9: 83 78 20 00 cmpl $0x0,0x20(%eax) <== NOT EXECUTED 108cdd: 0f 84 59 01 00 00 je 108e3c <== NOT EXECUTED return; if (lineFlag) { 108ce3: 85 d2 test %edx,%edx <== NOT EXECUTED 108ce5: 0f 84 46 01 00 00 je 108e31 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 108ceb: 8b 40 3c mov 0x3c(%eax),%eax <== NOT EXECUTED 108cee: a8 08 test $0x8,%al <== NOT EXECUTED 108cf0: 75 0c jne 108cfe <== NOT EXECUTED tty->ccount = 0; 108cf2: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED return; 108cf9: e9 3e 01 00 00 jmp 108e3c <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { 108cfe: a8 10 test $0x10,%al <== NOT EXECUTED 108d00: 0f 85 2b 01 00 00 jne 108e31 <== NOT EXECUTED tty->ccount = 0; 108d06: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 108d0d: 0f b6 43 44 movzbl 0x44(%ebx),%eax <== NOT EXECUTED 108d11: 89 da mov %ebx,%edx <== NOT EXECUTED 108d13: e8 5b ff ff ff call 108c73 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 108d18: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 108d1c: 0f 84 1a 01 00 00 je 108e3c <== NOT EXECUTED echo ('\n', tty); 108d22: 89 da mov %ebx,%edx <== NOT EXECUTED 108d24: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 108d29: eb 30 jmp 108d5b <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 108d2b: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108d2e: 8d 48 ff lea -0x1(%eax),%ecx <== NOT EXECUTED 108d31: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 108d34: 8a 54 02 ff mov -0x1(%edx,%eax,1),%dl <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 108d38: 8b 7b 3c mov 0x3c(%ebx),%edi <== NOT EXECUTED 108d3b: f7 c7 08 00 00 00 test $0x8,%edi <== NOT EXECUTED 108d41: 0f 84 e4 00 00 00 je 108e2b <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 108d47: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108d4b: 75 1a jne 108d67 <== NOT EXECUTED 108d4d: f7 c7 10 00 00 00 test $0x10,%edi <== NOT EXECUTED 108d53: 75 12 jne 108d67 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 108d55: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 108d59: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 108d5b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5e: 5b pop %ebx <== NOT EXECUTED 108d5f: 5e pop %esi <== NOT EXECUTED 108d60: 5f pop %edi <== NOT EXECUTED 108d61: c9 leave <== 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); 108d62: e9 0c ff ff ff jmp 108c73 <== NOT EXECUTED } else if (c == '\t') { 108d67: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 108d6a: 8b 0d fc 34 12 00 mov 0x1234fc,%ecx <== NOT EXECUTED 108d70: 75 5d jne 108dcf <== NOT EXECUTED int col = tty->read_start_column; 108d72: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED * Erase a character or line * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) 108d75: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 108d7a: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108d80: 89 7d e0 mov %edi,-0x20(%ebp) <== NOT EXECUTED 108d83: 89 c7 mov %eax,%edi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108d85: eb 27 jmp 108dae <== NOT EXECUTED c = tty->cbuf[i++]; 108d87: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 108d8a: 8a 44 10 ff mov -0x1(%eax,%edx,1),%al <== NOT EXECUTED if (c == '\t') { 108d8e: 3c 09 cmp $0x9,%al <== NOT EXECUTED 108d90: 75 05 jne 108d97 <== NOT EXECUTED col = (col | 7) + 1; 108d92: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 108d95: eb 15 jmp 108dac <== NOT EXECUTED } else if (iscntrl (c)) { 108d97: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 108d9a: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) <== NOT EXECUTED 108d9f: 74 0b je 108dac <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 108da1: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 108da5: 74 06 je 108dad <== NOT EXECUTED col += 2; 108da7: 83 c6 02 add $0x2,%esi <== NOT EXECUTED 108daa: eb 01 jmp 108dad <== NOT EXECUTED } else { col++; 108dac: 46 inc %esi <== NOT EXECUTED 108dad: 42 inc %edx <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 108dae: 39 fa cmp %edi,%edx <== NOT EXECUTED 108db0: 75 d5 jne 108d87 <== NOT EXECUTED 108db2: eb 14 jmp 108dc8 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 108db4: 57 push %edi <== NOT EXECUTED 108db5: 53 push %ebx <== NOT EXECUTED 108db6: 6a 01 push $0x1 <== NOT EXECUTED 108db8: 68 24 f0 11 00 push $0x11f024 <== NOT EXECUTED 108dbd: e8 73 fc ff ff call 108a35 <== NOT EXECUTED tty->column--; 108dc2: ff 4b 28 decl 0x28(%ebx) <== NOT EXECUTED 108dc5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 108dc8: 39 73 28 cmp %esi,0x28(%ebx) <== NOT EXECUTED 108dcb: 7f e7 jg 108db4 <== NOT EXECUTED 108dcd: eb 5c jmp 108e2b <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 108dcf: 0f b6 f2 movzbl %dl,%esi <== NOT EXECUTED 108dd2: f6 44 31 01 20 testb $0x20,0x1(%ecx,%esi,1) <== NOT EXECUTED 108dd7: 74 24 je 108dfd <== NOT EXECUTED 108dd9: 81 e7 00 02 00 00 and $0x200,%edi <== NOT EXECUTED 108ddf: 74 1c je 108dfd <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108de1: 51 push %ecx <== NOT EXECUTED 108de2: 53 push %ebx <== NOT EXECUTED 108de3: 6a 03 push $0x3 <== NOT EXECUTED 108de5: 68 22 f0 11 00 push $0x11f022 <== NOT EXECUTED 108dea: e8 46 fc ff ff call 108a35 <== NOT EXECUTED if (tty->column) 108def: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108df2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108df5: 85 c0 test %eax,%eax <== NOT EXECUTED 108df7: 74 04 je 108dfd <== NOT EXECUTED tty->column--; 108df9: 48 dec %eax <== NOT EXECUTED 108dfa: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 108dfd: a1 fc 34 12 00 mov 0x1234fc,%eax <== NOT EXECUTED 108e02: f6 44 30 01 20 testb $0x20,0x1(%eax,%esi,1) <== NOT EXECUTED 108e07: 74 06 je 108e0f <== NOT EXECUTED 108e09: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 108e0d: 74 1c je 108e2b <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 108e0f: 52 push %edx <== NOT EXECUTED 108e10: 53 push %ebx <== NOT EXECUTED 108e11: 6a 03 push $0x3 <== NOT EXECUTED 108e13: 68 22 f0 11 00 push $0x11f022 <== NOT EXECUTED 108e18: e8 18 fc ff ff call 108a35 <== NOT EXECUTED if (tty->column) 108e1d: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 108e20: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108e23: 85 c0 test %eax,%eax <== NOT EXECUTED 108e25: 74 04 je 108e2b <== NOT EXECUTED tty->column--; 108e27: 48 dec %eax <== NOT EXECUTED 108e28: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 108e2b: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 108e2f: 74 0b je 108e3c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 108e31: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108e34: 85 c0 test %eax,%eax <== NOT EXECUTED 108e36: 0f 85 ef fe ff ff jne 108d2b <== NOT EXECUTED } } if (!lineFlag) break; } } 108e3c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108e3f: 5b pop %ebx <== NOT EXECUTED 108e40: 5e pop %esi <== NOT EXECUTED 108e41: 5f pop %edi <== NOT EXECUTED 108e42: c9 leave <== NOT EXECUTED 108e43: c3 ret <== NOT EXECUTED =============================================================================== 001257ae : #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) { 1257ae: 55 push %ebp <== NOT EXECUTED 1257af: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1257b1: 57 push %edi <== NOT EXECUTED 1257b2: 56 push %esi <== NOT EXECUTED 1257b3: 53 push %ebx <== NOT EXECUTED 1257b4: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1257b7: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 1257ba: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 1257c1: 75 4b jne 12580e <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 1257c3: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 1257c7: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 1257cd: 75 11 jne 1257e0 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 1257cf: 50 push %eax <== NOT EXECUTED 1257d0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1257d3: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1257d6: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 1257d9: e8 36 57 fe ff call 10af14 <== NOT EXECUTED 1257de: eb 0f jmp 1257ef <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 1257e0: 50 push %eax <== NOT EXECUTED 1257e1: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1257e4: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1257e7: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 1257ea: e8 67 56 fe ff call 10ae56 <== NOT EXECUTED 1257ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1257f2: 85 c0 test %eax,%eax <== NOT EXECUTED 1257f4: 0f 85 54 01 00 00 jne 12594e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 1257fa: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1257fd: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 125800: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 125807: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 12580e: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 125811: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx <== NOT EXECUTED 125815: 31 d2 xor %edx,%edx <== NOT EXECUTED 125817: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 125819: 72 08 jb 125823 <== NOT EXECUTED 12581b: 31 d2 xor %edx,%edx <== NOT EXECUTED 12581d: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 125820: 0f 92 c2 setb %dl <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 125823: 3b 45 0c cmp 0xc(%ebp),%eax <== NOT EXECUTED 125826: 0f 84 3f 01 00 00 je 12596b <== NOT EXECUTED { if (fs_info->c.modified) 12582c: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 125833: 0f 84 c6 00 00 00 je 1258ff <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 125839: 84 d2 test %dl,%dl <== NOT EXECUTED 12583b: 74 1c je 125859 <== NOT EXECUTED 12583d: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 125841: 75 16 jne 125859 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 125843: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 125849: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12584c: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 125852: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 125855: 89 c7 mov %eax,%edi <== NOT EXECUTED 125857: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 125859: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12585c: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 125862: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 125865: e8 a4 47 fe ff call 10a00e <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12586a: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED fs_info->c.modified = 0; 125871: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125878: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12587b: 85 c0 test %eax,%eax <== NOT EXECUTED 12587d: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 125880: 0f 85 c8 00 00 00 jne 12594e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 125886: 84 d2 test %dl,%dl <== NOT EXECUTED 125888: 0f 84 8d 00 00 00 je 12591b <== NOT EXECUTED 12588e: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 125892: 0f 85 83 00 00 00 jne 12591b <== NOT EXECUTED 125898: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 12589c: eb 57 jmp 1258f5 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 12589e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1258a1: 50 push %eax <== NOT EXECUTED 1258a2: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 1258a6: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 1258aa: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 1258ad: 50 push %eax <== NOT EXECUTED 1258ae: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 1258b1: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 1258b4: e8 9d 55 fe ff call 10ae56 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 1258b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1258bc: 85 c0 test %eax,%eax <== NOT EXECUTED 1258be: 75 25 jne 1258e5 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 1258c0: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 1258c3: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 1258c6: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 1258c9: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 1258cf: 89 c7 mov %eax,%edi <== NOT EXECUTED 1258d1: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 1258d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1258d6: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 1258d9: e8 30 47 fe ff call 10a00e <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 1258de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1258e1: 85 c0 test %eax,%eax <== NOT EXECUTED 1258e3: 74 0d je 1258f2 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 1258e5: e8 ae 74 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1258ea: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1258f0: eb 67 jmp 125959 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 1258f2: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 1258f5: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 1258f8: 3a 43 09 cmp 0x9(%ebx),%al <== NOT EXECUTED 1258fb: 72 a1 jb 12589e <== NOT EXECUTED 1258fd: eb 1c jmp 12591b <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 1258ff: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125902: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 125908: e8 6a 47 fe ff call 10a077 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 12590d: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125914: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125917: 85 c0 test %eax,%eax <== NOT EXECUTED 125919: 75 33 jne 12594e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 12591b: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 12591f: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax <== NOT EXECUTED 125925: 75 11 jne 125938 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 125927: 50 push %eax <== NOT EXECUTED 125928: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12592b: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12592e: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125931: e8 de 55 fe ff call 10af14 <== NOT EXECUTED 125936: eb 0f jmp 125947 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 125938: 50 push %eax <== NOT EXECUTED 125939: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 12593c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 12593f: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125942: e8 0f 55 fe ff call 10ae56 <== NOT EXECUTED 125947: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 12594a: 85 c0 test %eax,%eax <== NOT EXECUTED 12594c: 74 10 je 12595e <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 12594e: e8 45 74 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125953: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125959: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12595c: eb 1a jmp 125978 <== NOT EXECUTED fs_info->c.blk_num = blk; 12595e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125961: 89 43 7c mov %eax,0x7c(%ebx) <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 125964: c6 83 81 00 00 00 01 movb $0x1,0x81(%ebx) <== NOT EXECUTED } *buf = fs_info->c.buf; 12596b: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx <== NOT EXECUTED 125971: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 125974: 89 10 mov %edx,(%eax) <== NOT EXECUTED 125976: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 125978: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12597b: 5b pop %ebx <== NOT EXECUTED 12597c: 5e pop %esi <== NOT EXECUTED 12597d: 5f pop %edi <== NOT EXECUTED 12597e: c9 leave <== NOT EXECUTED 12597f: c3 ret <== NOT EXECUTED =============================================================================== 00125667 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 125667: 55 push %ebp <== NOT EXECUTED 125668: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12566a: 57 push %edi <== NOT EXECUTED 12566b: 56 push %esi <== NOT EXECUTED 12566c: 53 push %ebx <== NOT EXECUTED 12566d: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 125670: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 125673: 31 c0 xor %eax,%eax <== NOT EXECUTED 125675: 80 bb 81 00 00 00 00 cmpb $0x0,0x81(%ebx) <== NOT EXECUTED 12567c: 0f 84 0f 01 00 00 je 125791 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 125682: 8b 43 7c mov 0x7c(%ebx),%eax <== NOT EXECUTED 125685: 0f b7 4b 14 movzwl 0x14(%ebx),%ecx <== NOT EXECUTED 125689: 31 d2 xor %edx,%edx <== NOT EXECUTED 12568b: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 12568d: 72 08 jb 125697 <== NOT EXECUTED 12568f: 31 d2 xor %edx,%edx <== NOT EXECUTED 125691: 3b 43 1c cmp 0x1c(%ebx),%eax <== NOT EXECUTED 125694: 0f 92 c2 setb %dl <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 125697: 80 bb 80 00 00 00 00 cmpb $0x0,0x80(%ebx) <== NOT EXECUTED 12569e: 0f 84 c2 00 00 00 je 125766 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 1256a4: 84 d2 test %dl,%dl <== NOT EXECUTED 1256a6: 74 1c je 1256c4 <== NOT EXECUTED 1256a8: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 1256ac: 75 16 jne 1256c4 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 1256ae: 8b 83 88 00 00 00 mov 0x88(%ebx),%eax <== NOT EXECUTED 1256b4: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 1256b7: 8b b3 84 00 00 00 mov 0x84(%ebx),%esi <== NOT EXECUTED 1256bd: 8b 76 20 mov 0x20(%esi),%esi <== NOT EXECUTED 1256c0: 89 c7 mov %eax,%edi <== NOT EXECUTED 1256c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 1256c4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1256c7: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 1256cd: 88 55 d0 mov %dl,-0x30(%ebp) <== NOT EXECUTED 1256d0: e8 39 49 fe ff call 10a00e <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 1256d5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1256d8: 85 c0 test %eax,%eax <== NOT EXECUTED 1256da: 8a 55 d0 mov -0x30(%ebp),%dl <== NOT EXECUTED 1256dd: 0f 85 98 00 00 00 jne 12577b <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 1256e3: c6 83 80 00 00 00 00 movb $0x0,0x80(%ebx) <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 1256ea: 84 d2 test %dl,%dl <== NOT EXECUTED 1256ec: 0f 84 96 00 00 00 je 125788 <== NOT EXECUTED 1256f2: 80 7b 48 00 cmpb $0x0,0x48(%ebx) <== NOT EXECUTED 1256f6: 0f 85 8c 00 00 00 jne 125788 <== NOT EXECUTED 1256fc: c6 45 d7 01 movb $0x1,-0x29(%ebp) <== NOT EXECUTED 125700: eb 5a jmp 12575c <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 125702: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125705: 50 push %eax <== NOT EXECUTED 125706: 0f b6 45 d7 movzbl -0x29(%ebp),%eax <== NOT EXECUTED 12570a: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 12570e: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 125711: 50 push %eax <== NOT EXECUTED 125712: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125715: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125718: e8 39 57 fe ff call 10ae56 <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 12571d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125720: 85 c0 test %eax,%eax <== NOT EXECUTED 125722: 74 10 je 125734 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 125724: e8 6f 76 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125729: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12572f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125732: eb 5d jmp 125791 <== NOT EXECUTED memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 125734: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125737: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 12573a: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 12573d: 8b b3 88 00 00 00 mov 0x88(%ebx),%esi <== NOT EXECUTED 125743: 89 c7 mov %eax,%edi <== NOT EXECUTED 125745: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 125747: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12574a: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 12574d: e8 bc 48 fe ff call 10a00e <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 125752: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125755: 85 c0 test %eax,%eax <== NOT EXECUTED 125757: 75 cb jne 125724 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 125759: fe 45 d7 incb -0x29(%ebp) <== NOT EXECUTED 12575c: 8a 45 d7 mov -0x29(%ebp),%al <== NOT EXECUTED 12575f: 3a 43 09 cmp 0x9(%ebx),%al <== NOT EXECUTED 125762: 72 9e jb 125702 <== NOT EXECUTED 125764: eb 22 jmp 125788 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 125766: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125769: ff b3 84 00 00 00 pushl 0x84(%ebx) <== NOT EXECUTED 12576f: e8 03 49 fe ff call 10a077 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125774: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125777: 85 c0 test %eax,%eax <== NOT EXECUTED 125779: 74 0d je 125788 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 12577b: e8 18 76 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125780: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125786: eb a7 jmp 12572f <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 125788: c6 83 81 00 00 00 00 movb $0x0,0x81(%ebx) <== NOT EXECUTED 12578f: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; } 125791: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125794: 5b pop %ebx <== NOT EXECUTED 125795: 5e pop %esi <== NOT EXECUTED 125796: 5f pop %edi <== NOT EXECUTED 125797: c9 leave <== NOT EXECUTED 125798: c3 ret <== NOT EXECUTED =============================================================================== 001262eb : fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 1262eb: 55 push %ebp <== NOT EXECUTED 1262ec: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1262ee: 56 push %esi <== NOT EXECUTED 1262ef: 53 push %ebx <== NOT EXECUTED 1262f0: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 1262f3: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 1262f6: 8b 56 34 mov 0x34(%esi),%edx <== 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)) ) 1262f9: 85 c0 test %eax,%eax <== NOT EXECUTED 1262fb: 75 0b jne 126308 <== NOT EXECUTED 1262fd: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 126301: 74 05 je 126308 <== NOT EXECUTED return fs_info->vol.rdir_loc; 126303: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 126306: eb 0c jmp 126314 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 126308: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12630b: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12630f: d3 e0 shl %cl,%eax <== NOT EXECUTED 126311: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 126314: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126317: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 12631a: 0f b6 5a 04 movzbl 0x4(%edx),%ebx <== NOT EXECUTED 12631e: 0f b6 4a 02 movzbl 0x2(%edx),%ecx <== NOT EXECUTED 126322: d3 e3 shl %cl,%ebx <== NOT EXECUTED 126324: 53 push %ebx <== NOT EXECUTED 126325: 6a 00 push $0x0 <== NOT EXECUTED 126327: 50 push %eax <== NOT EXECUTED 126328: 56 push %esi <== NOT EXECUTED 126329: e8 44 f9 ff ff call 125c72 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 12632e: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 126331: 5b pop %ebx <== NOT EXECUTED 126332: 5e pop %esi <== NOT EXECUTED 126333: c9 leave <== NOT EXECUTED 126334: c3 ret <== NOT EXECUTED =============================================================================== 00125b85 : fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 125b85: 55 push %ebp <== NOT EXECUTED 125b86: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125b88: 56 push %esi <== NOT EXECUTED 125b89: 53 push %ebx <== NOT EXECUTED 125b8a: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 125b8d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 125b90: 8b 56 34 mov 0x34(%esi),%edx <== 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)) ) 125b93: 85 c0 test %eax,%eax <== NOT EXECUTED 125b95: 75 0b jne 125ba2 <== NOT EXECUTED 125b97: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 125b9b: 74 05 je 125ba2 <== NOT EXECUTED return fs_info->vol.rdir_loc; 125b9d: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125ba0: eb 0c jmp 125bae <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125ba2: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 125ba5: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 125ba9: d3 e0 shl %cl,%eax <== NOT EXECUTED 125bab: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 125bae: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125bb1: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 125bb4: 0f b6 5a 04 movzbl 0x4(%edx),%ebx <== NOT EXECUTED 125bb8: 0f b6 4a 02 movzbl 0x2(%edx),%ecx <== NOT EXECUTED 125bbc: d3 e3 shl %cl,%ebx <== NOT EXECUTED 125bbe: 53 push %ebx <== NOT EXECUTED 125bbf: 6a 00 push $0x0 <== NOT EXECUTED 125bc1: 50 push %eax <== NOT EXECUTED 125bc2: 56 push %esi <== NOT EXECUTED 125bc3: e8 b8 fd ff ff call 125980 <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 125bc8: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 125bcb: 5b pop %ebx <== NOT EXECUTED 125bcc: 5e pop %esi <== NOT EXECUTED 125bcd: c9 leave <== NOT EXECUTED 125bce: c3 ret <== NOT EXECUTED =============================================================================== 00125a1e : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 125a1e: 55 push %ebp <== NOT EXECUTED 125a1f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125a21: 57 push %edi <== NOT EXECUTED 125a22: 56 push %esi <== NOT EXECUTED 125a23: 53 push %ebx <== NOT EXECUTED 125a24: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 125a27: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 125a2a: 8b 73 34 mov 0x34(%ebx),%esi <== NOT EXECUTED uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 125a2d: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125a30: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 125a33: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 125a36: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 125a39: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125a3c: 50 push %eax <== NOT EXECUTED 125a3d: 6a 04 push $0x4 <== NOT EXECUTED 125a3f: 68 e8 01 00 00 push $0x1e8 <== NOT EXECUTED 125a44: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 125a48: 50 push %eax <== NOT EXECUTED 125a49: 53 push %ebx <== NOT EXECUTED 125a4a: e8 31 ff ff ff call 125980 <_fat_block_write> <== NOT EXECUTED 125a4f: 89 c7 mov %eax,%edi <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 125a51: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 125a54: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 125a57: 50 push %eax <== NOT EXECUTED 125a58: 6a 04 push $0x4 <== NOT EXECUTED 125a5a: 68 ec 01 00 00 push $0x1ec <== NOT EXECUTED 125a5f: 0f b7 46 3c movzwl 0x3c(%esi),%eax <== NOT EXECUTED 125a63: 50 push %eax <== NOT EXECUTED 125a64: 53 push %ebx <== NOT EXECUTED 125a65: e8 16 ff ff ff call 125980 <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 125a6a: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125a6d: 85 c0 test %eax,%eax <== NOT EXECUTED 125a6f: 78 06 js 125a77 <== NOT EXECUTED 125a71: 31 c0 xor %eax,%eax <== NOT EXECUTED 125a73: 85 ff test %edi,%edi <== NOT EXECUTED 125a75: 79 03 jns 125a7a <== NOT EXECUTED 125a77: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; return RC_OK; } 125a7a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125a7d: 5b pop %ebx <== NOT EXECUTED 125a7e: 5e pop %esi <== NOT EXECUTED 125a7f: 5f pop %edi <== NOT EXECUTED 125a80: c9 leave <== NOT EXECUTED 125a81: c3 ret <== NOT EXECUTED =============================================================================== 001252d5 : int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 1252d5: 55 push %ebp <== NOT EXECUTED 1252d6: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1252d8: 57 push %edi <== NOT EXECUTED 1252d9: 56 push %esi <== NOT EXECUTED 1252da: 53 push %ebx <== NOT EXECUTED 1252db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1252de: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 1252e1: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 1252e4: 8b 7e 34 mov 0x34(%esi),%edi <== NOT EXECUTED /* * 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) 1252e7: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 1252ea: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 1252ed: 76 0b jbe 1252fa <== NOT EXECUTED { fat_fd->links_num--; 1252ef: 48 dec %eax <== NOT EXECUTED 1252f0: 89 43 08 mov %eax,0x8(%ebx) <== NOT EXECUTED 1252f3: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 1252f5: e9 82 00 00 00 jmp 12537c <== NOT EXECUTED } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 1252fa: f6 43 30 01 testb $0x1,0x30(%ebx) <== NOT EXECUTED 1252fe: 74 3f je 12533f <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 125300: 50 push %eax <== NOT EXECUTED 125301: 6a 00 push $0x0 <== NOT EXECUTED 125303: 53 push %ebx <== NOT EXECUTED 125304: 56 push %esi <== NOT EXECUTED 125305: e8 9d f9 ff ff call 124ca7 <== NOT EXECUTED if ( rc != RC_OK ) 12530a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12530d: 85 c0 test %eax,%eax <== NOT EXECUTED 12530f: 75 6b jne 12537c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 125311: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125314: 53 push %ebx <== NOT EXECUTED 125315: e8 2e c3 fe ff call 111648 <_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) ) 12531a: 5a pop %edx <== NOT EXECUTED 12531b: 59 pop %ecx <== NOT EXECUTED 12531c: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 12531f: 56 push %esi <== NOT EXECUTED 125320: e8 92 02 00 00 call 1255b7 <== NOT EXECUTED 125325: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125328: 84 c0 test %al,%al <== NOT EXECUTED 12532a: 74 0e je 12533a <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 12532c: 50 push %eax <== NOT EXECUTED 12532d: 50 push %eax <== NOT EXECUTED 12532e: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 125331: 56 push %esi <== NOT EXECUTED 125332: e8 59 02 00 00 call 125590 <== NOT EXECUTED 125337: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(fat_fd); 12533a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12533d: eb 25 jmp 125364 <== NOT EXECUTED } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 12533f: 51 push %ecx <== NOT EXECUTED 125340: 51 push %ecx <== NOT EXECUTED 125341: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 125344: 56 push %esi <== NOT EXECUTED 125345: e8 6d 02 00 00 call 1255b7 <== NOT EXECUTED 12534a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12534d: 84 c0 test %al,%al <== NOT EXECUTED 12534f: 74 09 je 12535a <== NOT EXECUTED { fat_fd->links_num = 0; 125351: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED 125358: eb 13 jmp 12536d <== NOT EXECUTED 12535a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12535d: 53 push %ebx <== NOT EXECUTED 12535e: e8 e5 c2 fe ff call 111648 <_Chain_Extract> <== NOT EXECUTED } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 125363: 5a pop %edx <== NOT EXECUTED 125364: 53 push %ebx <== NOT EXECUTED 125365: e8 32 7b fe ff call 10ce9c <== NOT EXECUTED 12536a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 12536d: 89 7d 08 mov %edi,0x8(%ebp) <== NOT EXECUTED return rc; } 125370: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125373: 5b pop %ebx <== NOT EXECUTED 125374: 5e pop %esi <== NOT EXECUTED 125375: 5f pop %edi <== NOT EXECUTED 125376: c9 leave <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 125377: e9 eb 02 00 00 jmp 125667 <== NOT EXECUTED return rc; } 12537c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12537f: 5b pop %ebx <== NOT EXECUTED 125380: 5e pop %esi <== NOT EXECUTED 125381: 5f pop %edi <== NOT EXECUTED 125382: c9 leave <== NOT EXECUTED 125383: c3 ret <== NOT EXECUTED =============================================================================== 00124adc : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 124adc: 55 push %ebp <== NOT EXECUTED 124add: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124adf: 57 push %edi <== NOT EXECUTED 124ae0: 56 push %esi <== NOT EXECUTED 124ae1: 53 push %ebx <== NOT EXECUTED 124ae2: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 124ae5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 124ae8: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124aeb: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 124aee: 8b 50 1c mov 0x1c(%eax),%edx <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 124af1: 31 db xor %ebx,%ebx <== NOT EXECUTED 124af3: 83 78 18 00 cmpl $0x0,0x18(%eax) <== NOT EXECUTED 124af7: 0f 84 c9 00 00 00 je 124bc6 <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 124afd: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED ) { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 124b04: 89 55 e4 mov %edx,-0x1c(%ebp) <== 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); 124b07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124b0a: 56 push %esi <== NOT EXECUTED 124b0b: e8 57 0b 00 00 call 125667 <== NOT EXECUTED 124b10: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (rc != RC_OK) 124b12: 83 c4 10 add $0x10,%esp <== 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); 124b15: 89 c7 mov %eax,%edi <== 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); if (rc != RC_OK) 124b17: 85 c0 test %eax,%eax <== NOT EXECUTED 124b19: 0f 84 94 00 00 00 je 124bb3 <== NOT EXECUTED 124b1f: e9 a2 00 00 00 jmp 124bc6 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 124b24: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124b27: 8b 42 34 mov 0x34(%edx),%eax <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 124b2a: 85 db test %ebx,%ebx <== NOT EXECUTED 124b2c: 75 0b jne 124b39 <== NOT EXECUTED 124b2e: f6 40 0a 03 testb $0x3,0xa(%eax) <== NOT EXECUTED 124b32: 74 05 je 124b39 <== NOT EXECUTED return fs_info->vol.rdir_loc; 124b34: 8b 58 1c mov 0x1c(%eax),%ebx <== NOT EXECUTED 124b37: eb 0c jmp 124b45 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 124b39: 83 eb 02 sub $0x2,%ebx <== NOT EXECUTED 124b3c: 0f b6 48 05 movzbl 0x5(%eax),%ecx <== NOT EXECUTED 124b40: d3 e3 shl %cl,%ebx <== NOT EXECUTED 124b42: 03 58 30 add 0x30(%eax),%ebx <== NOT EXECUTED 124b45: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== 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++ ) 124b4c: eb 41 jmp 124b8f <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 124b4e: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 124b51: 50 push %eax <== NOT EXECUTED 124b52: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 124b55: 01 d8 add %ebx,%eax <== NOT EXECUTED 124b57: 50 push %eax <== NOT EXECUTED 124b58: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 124b5b: ff 76 54 pushl 0x54(%esi) <== NOT EXECUTED 124b5e: e8 b1 63 fe ff call 10af14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 124b63: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124b66: 85 c0 test %eax,%eax <== NOT EXECUTED 124b68: 75 12 jne 124b7c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 124b6a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124b6d: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 124b70: e8 10 5d fe ff call 10a885 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 124b75: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124b78: 85 c0 test %eax,%eax <== NOT EXECUTED 124b7a: 74 10 je 124b8c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 124b7c: e8 17 82 01 00 call 13cd98 <__errno> <== NOT EXECUTED 124b81: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 124b87: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 124b8a: eb 3a jmp 124bc6 <== 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++ ) 124b8c: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED 124b8f: 0f b6 46 04 movzbl 0x4(%esi),%eax <== NOT EXECUTED 124b93: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 124b96: 72 b6 jb 124b4e <== 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); 124b98: 52 push %edx <== NOT EXECUTED 124b99: 8d 55 e4 lea -0x1c(%ebp),%edx <== NOT EXECUTED 124b9c: 52 push %edx <== NOT EXECUTED 124b9d: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124ba0: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 124ba3: e8 6d 4d 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 124ba8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124bab: 85 c0 test %eax,%eax <== NOT EXECUTED 124bad: 74 04 je 124bb3 <== NOT EXECUTED 124baf: 89 c3 mov %eax,%ebx <== NOT EXECUTED 124bb1: eb 13 jmp 124bc6 <== 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) 124bb3: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 124bb6: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 124bb9: 21 d8 and %ebx,%eax <== NOT EXECUTED 124bbb: 3b 46 10 cmp 0x10(%esi),%eax <== NOT EXECUTED 124bbe: 0f 82 60 ff ff ff jb 124b24 <== NOT EXECUTED 124bc4: 89 fb mov %edi,%ebx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 124bc6: 89 d8 mov %ebx,%eax <== NOT EXECUTED 124bc8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124bcb: 5b pop %ebx <== NOT EXECUTED 124bcc: 5e pop %esi <== NOT EXECUTED 124bcd: 5f pop %edi <== NOT EXECUTED 124bce: c9 leave <== NOT EXECUTED 124bcf: c3 ret <== NOT EXECUTED =============================================================================== 00124d81 : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 124d81: 55 push %ebp <== NOT EXECUTED 124d82: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124d84: 57 push %edi <== NOT EXECUTED 124d85: 56 push %esi <== NOT EXECUTED 124d86: 53 push %ebx <== NOT EXECUTED 124d87: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 124d8a: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 124d8d: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124d90: 8b 7e 34 mov 0x34(%esi),%edi <== NOT EXECUTED uint32_t chain = 0; 124d93: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 124d9a: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 124da1: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 124da4: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 124da7: 89 10 mov %edx,(%eax) <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 124da9: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 124dac: 39 c2 cmp %eax,%edx <== NOT EXECUTED 124dae: 0f 86 61 01 00 00 jbe 124f15 <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 124db4: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 124db8: 75 0c jne 124dc6 <== NOT EXECUTED 124dba: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED 124dbe: 75 06 jne 124dc6 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124dc0: f6 47 0a 03 testb $0x3,0xa(%edi) <== NOT EXECUTED 124dc4: 75 73 jne 124e39 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 124dc6: 0f b7 4f 06 movzwl 0x6(%edi),%ecx <== NOT EXECUTED 124dca: 8d 51 ff lea -0x1(%ecx),%edx <== NOT EXECUTED 124dcd: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 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 - 124dd0: 21 c2 and %eax,%edx <== NOT EXECUTED 124dd2: 29 d1 sub %edx,%ecx <== NOT EXECUTED 124dd4: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 124dd7: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 124dda: 21 55 d4 and %edx,-0x2c(%ebp) <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 124ddd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 124de0: 29 c2 sub %eax,%edx <== NOT EXECUTED 124de2: 89 d0 mov %edx,%eax <== NOT EXECUTED if (bytes2add > bytes_remain) 124de4: 3b 55 d4 cmp -0x2c(%ebp),%edx <== NOT EXECUTED 124de7: 0f 86 28 01 00 00 jbe 124f15 <== NOT EXECUTED /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 124ded: 2b 45 d4 sub -0x2c(%ebp),%eax <== NOT EXECUTED 124df0: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 124df3: 0f 84 1c 01 00 00 je 124f15 <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 124df9: 48 dec %eax <== NOT EXECUTED 124dfa: 0f b6 4f 08 movzbl 0x8(%edi),%ecx <== NOT EXECUTED 124dfe: d3 e8 shr %cl,%eax <== NOT EXECUTED 124e00: 8d 48 01 lea 0x1(%eax),%ecx <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 124e03: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124e06: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 124e09: 50 push %eax <== NOT EXECUTED 124e0a: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 124e0d: 50 push %eax <== NOT EXECUTED 124e0e: 51 push %ecx <== NOT EXECUTED 124e0f: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 124e12: 50 push %eax <== NOT EXECUTED 124e13: 56 push %esi <== NOT EXECUTED 124e14: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 124e17: e8 0f 4d 01 00 call 139b2b <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 124e1c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 124e1f: 89 c2 mov %eax,%edx <== NOT EXECUTED 124e21: 85 c0 test %eax,%eax <== NOT EXECUTED 124e23: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 124e26: 0f 85 eb 00 00 00 jne 124f17 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 124e2c: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 124e2f: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 124e33: 75 17 jne 124e4c <== NOT EXECUTED 124e35: 85 c0 test %eax,%eax <== NOT EXECUTED 124e37: 75 13 jne 124e4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 124e39: e8 5a 7f 01 00 call 13cd98 <__errno> <== NOT EXECUTED 124e3e: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 124e44: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 124e47: e9 cb 00 00 00 jmp 124f17 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 124e4c: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 124e4e: 74 20 je 124e70 <== NOT EXECUTED *a_length = new_length - 124e50: f7 d0 not %eax <== NOT EXECUTED 124e52: 01 c8 add %ecx,%eax <== NOT EXECUTED 124e54: 0f b6 4f 08 movzbl 0x8(%edi),%ecx <== NOT EXECUTED 124e58: d3 e0 shl %cl,%eax <== NOT EXECUTED 124e5a: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 124e5d: 29 c2 sub %eax,%edx <== NOT EXECUTED 124e5f: 89 d0 mov %edx,%eax <== NOT EXECUTED 124e61: 0f b7 57 06 movzwl 0x6(%edi),%edx <== NOT EXECUTED 124e65: 4a dec %edx <== NOT EXECUTED 124e66: 23 55 d0 and -0x30(%ebp),%edx <== NOT EXECUTED 124e69: 29 d0 sub %edx,%eax <== NOT EXECUTED 124e6b: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED 124e6e: 89 02 mov %eax,(%edx) <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 124e70: 8b 43 18 mov 0x18(%ebx),%eax <== NOT EXECUTED 124e73: 85 c0 test %eax,%eax <== NOT EXECUTED 124e75: 75 12 jne 124e89 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 124e77: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 124e7a: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED 124e7d: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED fat_fd->map.file_cln = 0; 124e80: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) <== NOT EXECUTED 124e87: eb 4a jmp 124ed3 <== NOT EXECUTED } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 124e89: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 124e8c: 83 fa ff cmp $0xffffffff,%edx <== NOT EXECUTED 124e8f: 74 05 je 124e96 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 124e91: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 124e94: eb 1b jmp 124eb1 <== NOT EXECUTED } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 124e96: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124e99: 8d 55 e0 lea -0x20(%ebp),%edx <== NOT EXECUTED 124e9c: 52 push %edx <== NOT EXECUTED 124e9d: 48 dec %eax <== NOT EXECUTED 124e9e: 50 push %eax <== NOT EXECUTED 124e9f: 6a 01 push $0x1 <== NOT EXECUTED 124ea1: 53 push %ebx <== NOT EXECUTED 124ea2: 56 push %esi <== NOT EXECUTED 124ea3: e8 76 fd ff ff call 124c1e <== NOT EXECUTED 124ea8: 89 c2 mov %eax,%edx <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 124eaa: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 124ead: 85 c0 test %eax,%eax <== NOT EXECUTED 124eaf: 75 48 jne 124ef9 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 124eb1: 50 push %eax <== NOT EXECUTED 124eb2: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124eb5: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 124eb8: 56 push %esi <== NOT EXECUTED 124eb9: e8 3e 48 01 00 call 1396fc <== NOT EXECUTED 124ebe: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 124ec0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124ec3: 85 c0 test %eax,%eax <== NOT EXECUTED 124ec5: 75 32 jne 124ef9 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 124ec7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124eca: 57 push %edi <== NOT EXECUTED 124ecb: e8 97 07 00 00 call 125667 <== NOT EXECUTED 124ed0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 124ed3: 83 7d d8 00 cmpl $0x0,-0x28(%ebp) <== NOT EXECUTED 124ed7: 74 36 je 124f0f <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; 124ed9: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 124edc: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 124edf: 83 7b 10 01 cmpl $0x1,0x10(%ebx) <== NOT EXECUTED 124ee3: 75 2a jne 124f0f <== NOT EXECUTED { rc = fat_init_clusters_chain(mt_entry, chain); 124ee5: 57 push %edi <== NOT EXECUTED 124ee6: 57 push %edi <== NOT EXECUTED 124ee7: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124eea: 56 push %esi <== NOT EXECUTED 124eeb: e8 df 0c 00 00 call 125bcf <== NOT EXECUTED 124ef0: 89 c2 mov %eax,%edx <== NOT EXECUTED if ( rc != RC_OK ) 124ef2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124ef5: 85 c0 test %eax,%eax <== NOT EXECUTED 124ef7: 74 16 je 124f0f <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 124ef9: 53 push %ebx <== NOT EXECUTED 124efa: 53 push %ebx <== NOT EXECUTED 124efb: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124efe: 56 push %esi <== NOT EXECUTED 124eff: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 124f02: e8 78 4b 01 00 call 139a7f <== NOT EXECUTED return rc; 124f07: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124f0a: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 124f0d: eb 08 jmp 124f17 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 124f0f: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 124f12: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED return RC_OK; 124f15: 31 d2 xor %edx,%edx <== NOT EXECUTED } 124f17: 89 d0 mov %edx,%eax <== NOT EXECUTED 124f19: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124f1c: 5b pop %ebx <== NOT EXECUTED 124f1d: 5e pop %esi <== NOT EXECUTED 124f1e: 5f pop %edi <== NOT EXECUTED 124f1f: c9 leave <== NOT EXECUTED 124f20: c3 ret <== NOT EXECUTED =============================================================================== 00124c1e : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 124c1e: 55 push %ebp <== NOT EXECUTED 124c1f: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124c21: 56 push %esi <== NOT EXECUTED 124c22: 53 push %ebx <== NOT EXECUTED 124c23: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 124c26: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 124c29: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124c2c: 8b 48 34 mov 0x34(%eax),%ecx <== NOT EXECUTED uint32_t cur_cln = 0; 124c2f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 124c36: 83 7d 10 01 cmpl $0x1,0x10(%ebp) <== NOT EXECUTED 124c3a: 75 56 jne 124c92 <== NOT EXECUTED { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 124c3c: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED ret = va_arg(ap, uint32_t *); 124c3f: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 124c42: 3b 72 18 cmp 0x18(%edx),%esi <== NOT EXECUTED 124c45: 72 0d jb 124c54 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 124c47: e8 4c 81 01 00 call 13cd98 <__errno> <== NOT EXECUTED 124c4c: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 124c52: eb 49 jmp 124c9d <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 124c54: 83 7a 20 01 cmpl $0x1,0x20(%edx) <== NOT EXECUTED 124c58: 75 16 jne 124c70 <== NOT EXECUTED 124c5a: 83 7a 24 00 cmpl $0x0,0x24(%edx) <== NOT EXECUTED 124c5e: 75 10 jne 124c70 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124c60: f6 41 0a 03 testb $0x3,0xa(%ecx) <== NOT EXECUTED 124c64: 74 0a je 124c70 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 124c66: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 124c6c: 31 c0 xor %eax,%eax <== NOT EXECUTED return RC_OK; 124c6e: eb 30 jmp 124ca0 <== NOT EXECUTED } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 124c70: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124c73: 0f b6 49 08 movzbl 0x8(%ecx),%ecx <== NOT EXECUTED 124c77: d3 ee shr %cl,%esi <== NOT EXECUTED 124c79: 89 f1 mov %esi,%ecx <== NOT EXECUTED 124c7b: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 124c7e: 56 push %esi <== NOT EXECUTED 124c7f: e8 db fd ff ff call 124a5f <== NOT EXECUTED if ( rc != RC_OK ) 124c84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124c87: 85 c0 test %eax,%eax <== NOT EXECUTED 124c89: 75 15 jne 124ca0 <== NOT EXECUTED return rc; *ret = cur_cln; 124c8b: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 124c8e: 89 13 mov %edx,(%ebx) <== NOT EXECUTED break; 124c90: eb 0e jmp 124ca0 <== NOT EXECUTED default: errno = EINVAL; 124c92: e8 01 81 01 00 call 13cd98 <__errno> <== NOT EXECUTED 124c97: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 124c9d: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED rc = -1; break; } return rc; } 124ca0: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 124ca3: 5b pop %ebx <== NOT EXECUTED 124ca4: 5e pop %esi <== NOT EXECUTED 124ca5: c9 leave <== NOT EXECUTED 124ca6: c3 ret <== NOT EXECUTED =============================================================================== 00124a5f : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 124a5f: 55 push %ebp <== NOT EXECUTED 124a60: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124a62: 57 push %edi <== NOT EXECUTED 124a63: 56 push %esi <== NOT EXECUTED 124a64: 53 push %ebx <== NOT EXECUTED 124a65: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 124a68: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 124a6b: 89 d3 mov %edx,%ebx <== NOT EXECUTED 124a6d: 89 ce mov %ecx,%esi <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 124a6f: 8b 52 34 mov 0x34(%edx),%edx <== NOT EXECUTED 124a72: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 124a74: 75 05 jne 124a7b <== NOT EXECUTED *disk_cln = fat_fd->map.disk_cln; 124a76: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED 124a79: eb 50 jmp 124acb <== NOT EXECUTED { uint32_t cur_cln; uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) 124a7b: 76 0e jbe 124a8b <== NOT EXECUTED { cur_cln = fat_fd->map.disk_cln; 124a7d: 8b 43 38 mov 0x38(%ebx),%eax <== NOT EXECUTED 124a80: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 124a83: 89 c8 mov %ecx,%eax <== NOT EXECUTED 124a85: 29 d0 sub %edx,%eax <== NOT EXECUTED 124a87: 89 c2 mov %eax,%edx <== NOT EXECUTED 124a89: eb 08 jmp 124a93 <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 124a8b: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 124a8e: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 124a91: 89 ca mov %ecx,%edx <== NOT EXECUTED 124a93: 31 ff xor %edi,%edi <== NOT EXECUTED } /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124a95: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 124a98: eb 24 jmp 124abe <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124a9a: 50 push %eax <== NOT EXECUTED 124a9b: 51 push %ecx <== NOT EXECUTED 124a9c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124a9f: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 124aa2: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 124aa5: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 124aa8: e8 68 4e 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 124aad: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124ab0: 85 c0 test %eax,%eax <== NOT EXECUTED 124ab2: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 124ab5: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 124ab8: 74 03 je 124abd <== NOT EXECUTED return rc; 124aba: 99 cltd <== NOT EXECUTED 124abb: eb 17 jmp 124ad4 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 124abd: 47 inc %edi <== NOT EXECUTED 124abe: 39 d7 cmp %edx,%edi <== NOT EXECUTED 124ac0: 72 d8 jb 124a9a <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 124ac2: 89 73 34 mov %esi,0x34(%ebx) <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 124ac5: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 124ac8: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED *disk_cln = cur_cln; 124acb: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 124ace: 89 02 mov %eax,(%edx) <== NOT EXECUTED 124ad0: 31 c0 xor %eax,%eax <== NOT EXECUTED 124ad2: 31 d2 xor %edx,%edx <== NOT EXECUTED } return RC_OK; } 124ad4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124ad7: 5b pop %ebx <== NOT EXECUTED 124ad8: 5e pop %esi <== NOT EXECUTED 124ad9: 5f pop %edi <== NOT EXECUTED 124ada: c9 leave <== NOT EXECUTED 124adb: c3 ret <== NOT EXECUTED =============================================================================== 00124bd0 : void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 124bd0: 55 push %ebp <== NOT EXECUTED 124bd1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124bd3: 57 push %edi <== NOT EXECUTED 124bd4: 56 push %esi <== NOT EXECUTED 124bd5: 53 push %ebx <== NOT EXECUTED 124bd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124bd9: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 124bdc: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 124bdf: 8b 70 34 mov 0x34(%eax),%esi <== 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) + 124be2: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 124be5: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 124be8: 74 02 je 124bec <== 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)) ) 124bea: 85 c0 test %eax,%eax <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 124bec: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 124bef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124bf2: 53 push %ebx <== NOT EXECUTED 124bf3: e8 50 ca fe ff call 111648 <_Chain_Extract> <== 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 ); 124bf8: 59 pop %ecx <== NOT EXECUTED 124bf9: 58 pop %eax <== NOT EXECUTED 124bfa: 53 push %ebx <== NOT EXECUTED 124bfb: 89 f8 mov %edi,%eax <== NOT EXECUTED 124bfd: c1 e8 05 shr $0x5,%eax <== NOT EXECUTED 124c00: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 124c03: 6b c0 0c imul $0xc,%eax,%eax <== NOT EXECUTED 124c06: 03 46 68 add 0x68(%esi),%eax <== NOT EXECUTED 124c09: 50 push %eax <== NOT EXECUTED 124c0a: e8 15 ca fe ff call 111624 <_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; 124c0f: 80 4b 30 01 orb $0x1,0x30(%ebx) <== NOT EXECUTED 124c13: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 124c16: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124c19: 5b pop %ebx <== NOT EXECUTED 124c1a: 5e pop %esi <== NOT EXECUTED 124c1b: 5f pop %edi <== NOT EXECUTED 124c1c: c9 leave <== NOT EXECUTED 124c1d: c3 ret <== NOT EXECUTED =============================================================================== 00125384 : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 125384: 55 push %ebp <== NOT EXECUTED 125385: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125387: 57 push %edi <== NOT EXECUTED 125388: 56 push %esi <== NOT EXECUTED 125389: 53 push %ebx <== NOT EXECUTED 12538a: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 12538d: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125390: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125393: 8b 58 34 mov 0x34(%eax),%ebx <== 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) + 125396: 8b 06 mov (%esi),%eax <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 125398: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 12539d: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 1253a0: 74 23 je 1253c5 <== 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)) ) 1253a2: 85 c0 test %eax,%eax <== NOT EXECUTED 1253a4: 75 0b jne 1253b1 <== NOT EXECUTED 1253a6: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 1253aa: 74 05 je 1253b1 <== NOT EXECUTED return fs_info->vol.rdir_loc; 1253ac: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 1253af: eb 0c jmp 1253bd <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 1253b1: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 1253b4: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 1253b8: d3 e0 shl %cl,%eax <== NOT EXECUTED 1253ba: 03 43 30 add 0x30(%ebx),%eax <== 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) << 1253bd: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 1253c1: d3 e0 shl %cl,%eax <== NOT EXECUTED 1253c3: 89 c1 mov %eax,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 1253c5: 8b 56 04 mov 0x4(%esi),%edx <== 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) + 1253c8: 89 d0 mov %edx,%eax <== NOT EXECUTED 1253ca: c1 e8 09 shr $0x9,%eax <== NOT EXECUTED 1253cd: 8d 04 01 lea (%ecx,%eax,1),%eax <== NOT EXECUTED 1253d0: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 1253d3: c1 ea 05 shr $0x5,%edx <== NOT EXECUTED 1253d6: 83 e2 0f and $0xf,%edx <== NOT EXECUTED 1253d9: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 1253dc: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 1253df: 89 d0 mov %edx,%eax <== NOT EXECUTED 1253e1: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 1253e4: 6b c0 0c imul $0xc,%eax,%eax <== NOT EXECUTED 1253e7: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 1253ea: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1253ed: 01 c2 add %eax,%edx <== NOT EXECUTED 1253ef: 8b 02 mov (%edx),%eax <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1253f1: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 1253f4: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 1253f7: eb 5c jmp 125455 <== NOT EXECUTED 1253f9: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 1253fc: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 125401: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 125404: 74 23 je 125429 <== 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)) ) 125406: 85 d2 test %edx,%edx <== NOT EXECUTED 125408: 75 0b jne 125415 <== NOT EXECUTED 12540a: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 12540e: 74 05 je 125415 <== NOT EXECUTED return fs_info->vol.rdir_loc; 125410: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 125413: eb 0c jmp 125421 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125415: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 125418: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12541c: d3 e2 shl %cl,%edx <== NOT EXECUTED 12541e: 03 53 30 add 0x30(%ebx),%edx <== 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) << 125421: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 125425: d3 e2 shl %cl,%edx <== NOT EXECUTED 125427: 89 d1 mov %edx,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 125429: 8b 78 24 mov 0x24(%eax),%edi <== 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) 12542c: 89 fa mov %edi,%edx <== NOT EXECUTED 12542e: c1 ea 09 shr $0x9,%edx <== NOT EXECUTED 125431: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 125434: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 125437: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 12543a: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 12543d: 01 fa add %edi,%edx <== NOT EXECUTED 12543f: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 125442: 75 0f jne 125453 <== NOT EXECUTED /* 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; 125444: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125447: 89 02 mov %eax,(%edx) <== NOT EXECUTED lfat_fd->links_num++; 125449: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED 12544c: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 12544e: e9 22 01 00 00 jmp 125575 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 125453: 8b 00 mov (%eax),%eax <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 125455: 3b 45 e0 cmp -0x20(%ebp),%eax <== NOT EXECUTED 125458: 75 9f jne 1253f9 <== NOT EXECUTED 12545a: e9 1e 01 00 00 jmp 12557d <== 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) + 12545f: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 125462: b9 01 00 00 00 mov $0x1,%ecx <== NOT EXECUTED 125467: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 12546a: 74 23 je 12548f <== 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)) ) 12546c: 85 d2 test %edx,%edx <== NOT EXECUTED 12546e: 75 0b jne 12547b <== NOT EXECUTED 125470: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 125474: 74 05 je 12547b <== NOT EXECUTED return fs_info->vol.rdir_loc; 125476: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 125479: eb 0c jmp 125487 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12547b: 83 ea 02 sub $0x2,%edx <== NOT EXECUTED 12547e: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 125482: d3 e2 shl %cl,%edx <== NOT EXECUTED 125484: 03 53 30 add 0x30(%ebx),%edx <== 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) << 125487: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 12548b: d3 e2 shl %cl,%edx <== NOT EXECUTED 12548d: 89 d1 mov %edx,%ecx <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 12548f: 8b 78 24 mov 0x24(%eax),%edi <== 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) 125492: 89 fa mov %edi,%edx <== NOT EXECUTED 125494: c1 ea 09 shr $0x9,%edx <== NOT EXECUTED 125497: 8d 14 11 lea (%ecx,%edx,1),%edx <== NOT EXECUTED 12549a: c1 e2 04 shl $0x4,%edx <== NOT EXECUTED 12549d: c1 ef 05 shr $0x5,%edi <== NOT EXECUTED 1254a0: 83 e7 0f and $0xf,%edi <== NOT EXECUTED 1254a3: 01 fa add %edi,%edx <== NOT EXECUTED 1254a5: 39 55 e4 cmp %edx,-0x1c(%ebp) <== NOT EXECUTED 1254a8: 75 0e jne 1254b8 <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 1254aa: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1254ae: 74 18 je 1254c8 <== NOT EXECUTED 1254b0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1254b3: 3b 50 0c cmp 0xc(%eax),%edx <== NOT EXECUTED 1254b6: 74 10 je 1254c8 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 1254b8: 8b 00 mov (%eax),%eax <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 1254ba: 3b 45 e0 cmp -0x20(%ebp),%eax <== NOT EXECUTED 1254bd: 75 a0 jne 12545f <== NOT EXECUTED 1254bf: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED 1254c6: eb 07 jmp 1254cf <== NOT EXECUTED 1254c8: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== 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)); 1254cf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1254d2: 6a 44 push $0x44 <== NOT EXECUTED 1254d4: e8 0f 7f fe ff call 10d3e8 <== NOT EXECUTED 1254d9: 89 c2 mov %eax,%edx <== NOT EXECUTED 1254db: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1254de: 89 10 mov %edx,(%eax) <== NOT EXECUTED if ( lfat_fd == NULL ) 1254e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1254e3: 85 d2 test %edx,%edx <== NOT EXECUTED 1254e5: 75 10 jne 1254f7 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1254e7: e8 ac 78 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1254ec: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1254f2: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 1254f5: eb 7e jmp 125575 <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 1254f7: b9 11 00 00 00 mov $0x11,%ecx <== NOT EXECUTED 1254fc: 31 c0 xor %eax,%eax <== NOT EXECUTED 1254fe: 89 d7 mov %edx,%edi <== NOT EXECUTED 125500: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED lfat_fd->links_num = 1; 125502: c7 42 08 01 00 00 00 movl $0x1,0x8(%edx) <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 125509: 80 62 30 fe andb $0xfe,0x30(%edx) <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 12550d: c7 42 3c ff ff ff ff movl $0xffffffff,0x3c(%edx) <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 125514: 8d 7a 20 lea 0x20(%edx),%edi <== NOT EXECUTED 125517: b1 04 mov $0x4,%cl <== NOT EXECUTED 125519: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED if ( rc != RC_OK ) 12551b: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) <== NOT EXECUTED 12551f: 74 08 je 125529 <== NOT EXECUTED lfat_fd->ino = key; 125521: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125524: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED 125527: eb 38 jmp 125561 <== NOT EXECUTED else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 125529: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12552c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 12552f: 89 55 d8 mov %edx,-0x28(%ebp) <== NOT EXECUTED 125532: e8 94 00 00 00 call 1255cb <== NOT EXECUTED 125537: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 12553a: 89 42 0c mov %eax,0xc(%edx) <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 12553d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125540: 85 c0 test %eax,%eax <== NOT EXECUTED 125542: 75 1d jne 125561 <== NOT EXECUTED { free((*fat_fd)); 125544: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125547: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 12554a: ff 32 pushl (%edx) <== NOT EXECUTED 12554c: e8 4b 79 fe ff call 10ce9c <== 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 ); 125551: e8 42 78 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125556: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 12555c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 12555f: eb 11 jmp 125572 <== 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 ); 125561: 51 push %ecx <== NOT EXECUTED 125562: 51 push %ecx <== NOT EXECUTED 125563: 52 push %edx <== NOT EXECUTED 125564: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 125567: 03 43 64 add 0x64(%ebx),%eax <== NOT EXECUTED 12556a: 50 push %eax <== NOT EXECUTED 12556b: e8 b4 c0 fe ff call 111624 <_Chain_Append> <== NOT EXECUTED 125570: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; 125572: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125575: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125578: 5b pop %ebx <== NOT EXECUTED 125579: 5e pop %esi <== NOT EXECUTED 12557a: 5f pop %edi <== NOT EXECUTED 12557b: c9 leave <== NOT EXECUTED 12557c: c3 ret <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 12557d: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 125580: 03 53 68 add 0x68(%ebx),%edx <== NOT EXECUTED 125583: 8b 02 mov (%edx),%eax <== NOT EXECUTED 125585: 83 c2 04 add $0x4,%edx <== NOT EXECUTED 125588: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 12558b: e9 2a ff ff ff jmp 1254ba <== NOT EXECUTED =============================================================================== 00125123 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 125123: 55 push %ebp <== NOT EXECUTED 125124: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125126: 57 push %edi <== NOT EXECUTED 125127: 56 push %esi <== NOT EXECUTED 125128: 53 push %ebx <== NOT EXECUTED 125129: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 12512c: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 12512f: 8b 75 14 mov 0x14(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 125132: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125135: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 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) 125138: 85 f6 test %esi,%esi <== NOT EXECUTED 12513a: 0f 84 86 01 00 00 je 1252c6 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 125140: 8b 47 18 mov 0x18(%edi),%eax <== NOT EXECUTED 125143: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 125146: 0f 83 7a 01 00 00 jae 1252c6 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 12514c: 39 c6 cmp %eax,%esi <== NOT EXECUTED 12514e: 77 09 ja 125159 <== NOT EXECUTED 125150: 89 c2 mov %eax,%edx <== NOT EXECUTED 125152: 29 f2 sub %esi,%edx <== NOT EXECUTED 125154: 39 55 10 cmp %edx,0x10(%ebp) <== NOT EXECUTED 125157: 76 05 jbe 12515e <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 125159: 89 c6 mov %eax,%esi <== NOT EXECUTED 12515b: 2b 75 10 sub 0x10(%ebp),%esi <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 12515e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 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)) && 125165: 83 7f 20 01 cmpl $0x1,0x20(%edi) <== NOT EXECUTED 125169: 75 57 jne 1251c2 <== NOT EXECUTED 12516b: 83 7f 24 00 cmpl $0x0,0x24(%edi) <== NOT EXECUTED 12516f: 75 51 jne 1251c2 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 125171: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 125175: 74 4b je 1251c2 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 125177: 8b 47 1c mov 0x1c(%edi),%eax <== 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)) ) 12517a: 85 c0 test %eax,%eax <== NOT EXECUTED 12517c: 75 05 jne 125183 <== NOT EXECUTED return fs_info->vol.rdir_loc; 12517e: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED 125181: eb 0c jmp 12518f <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125183: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 125186: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 12518a: d3 e0 shl %cl,%eax <== NOT EXECUTED 12518c: 03 43 30 add 0x30(%ebx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 12518f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125192: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 125195: 56 push %esi <== NOT EXECUTED 125196: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 125199: 4a dec %edx <== NOT EXECUTED 12519a: 23 55 10 and 0x10(%ebp),%edx <== NOT EXECUTED 12519d: 52 push %edx <== NOT EXECUTED 12519e: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 1251a2: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1251a5: d3 ea shr %cl,%edx <== NOT EXECUTED 1251a7: 01 d0 add %edx,%eax <== NOT EXECUTED 1251a9: 50 push %eax <== NOT EXECUTED 1251aa: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1251ad: e8 c0 0a 00 00 call 125c72 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 1251b2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1251b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1251b7: 0f 89 10 01 00 00 jns 1252cd <== NOT EXECUTED 1251bd: e9 08 01 00 00 jmp 1252ca <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 1251c2: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 1251c6: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1251c9: d3 e8 shr %cl,%eax <== NOT EXECUTED 1251cb: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 1251ce: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 1251d2: 66 89 55 d0 mov %dx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 1251d6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1251d9: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1251dc: 51 push %ecx <== NOT EXECUTED 1251dd: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1251df: 89 fa mov %edi,%edx <== NOT EXECUTED 1251e1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1251e4: e8 76 f8 ff ff call 124a5f <== NOT EXECUTED if (rc != RC_OK) 1251e9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1251ec: 85 c0 test %eax,%eax <== NOT EXECUTED 1251ee: 0f 85 d9 00 00 00 jne 1252cd <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 1251f4: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 1251f8: 48 dec %eax <== NOT EXECUTED 1251f9: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 1251fc: 21 d0 and %edx,%eax <== NOT EXECUTED 1251fe: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 125201: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 125204: 31 d2 xor %edx,%edx <== NOT EXECUTED 125206: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 12520d: 89 7d c4 mov %edi,-0x3c(%ebp) <== NOT EXECUTED 125210: e9 89 00 00 00 jmp 12529e <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 125215: 0f b7 7b 06 movzwl 0x6(%ebx),%edi <== NOT EXECUTED 125219: 2b 7d cc sub -0x34(%ebp),%edi <== NOT EXECUTED 12521c: 39 f7 cmp %esi,%edi <== NOT EXECUTED 12521e: 76 02 jbe 125222 <== NOT EXECUTED 125220: 89 f7 mov %esi,%edi <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 125222: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 125225: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 125228: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 12522b: 85 c0 test %eax,%eax <== NOT EXECUTED 12522d: 75 0b jne 12523a <== NOT EXECUTED 12522f: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 125233: 74 05 je 12523a <== NOT EXECUTED return fs_info->vol.rdir_loc; 125235: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 125238: eb 0c jmp 125246 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 12523a: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 12523d: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 125241: d3 e0 shl %cl,%eax <== NOT EXECUTED 125243: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 125246: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125249: 8b 55 18 mov 0x18(%ebp),%edx <== NOT EXECUTED 12524c: 03 55 d4 add -0x2c(%ebp),%edx <== NOT EXECUTED 12524f: 52 push %edx <== NOT EXECUTED 125250: 57 push %edi <== NOT EXECUTED 125251: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 125254: 4a dec %edx <== NOT EXECUTED 125255: 23 55 cc and -0x34(%ebp),%edx <== NOT EXECUTED 125258: 52 push %edx <== NOT EXECUTED 125259: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 12525d: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 125260: d3 ea shr %cl,%edx <== NOT EXECUTED 125262: 01 d0 add %edx,%eax <== NOT EXECUTED 125264: 50 push %eax <== NOT EXECUTED 125265: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 125268: e8 05 0a 00 00 call 125c72 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 12526d: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125270: 85 c0 test %eax,%eax <== NOT EXECUTED 125272: 78 56 js 1252ca <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 125274: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 125277: 50 push %eax <== NOT EXECUTED 125278: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 12527b: 51 push %ecx <== NOT EXECUTED 12527c: 52 push %edx <== NOT EXECUTED 12527d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 125280: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 125283: e8 8d 46 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 125288: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12528b: 85 c0 test %eax,%eax <== NOT EXECUTED 12528d: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 125290: 75 3b jne 1252cd <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 125292: 29 fe sub %edi,%esi <== NOT EXECUTED cmpltd += c; 125294: 01 7d d4 add %edi,-0x2c(%ebp) <== NOT EXECUTED 125297: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 12529e: 85 f6 test %esi,%esi <== NOT EXECUTED 1252a0: 0f 85 6f ff ff ff jne 125215 <== NOT EXECUTED 1252a6: 8b 7d c4 mov -0x3c(%ebp),%edi <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 1252a9: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 1252ac: 8b 75 d4 mov -0x2c(%ebp),%esi <== NOT EXECUTED 1252af: 8d 44 31 ff lea -0x1(%ecx,%esi,1),%eax <== NOT EXECUTED 1252b3: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 1252b7: d3 e8 shr %cl,%eax <== NOT EXECUTED 1252b9: 03 45 c8 add -0x38(%ebp),%eax <== NOT EXECUTED 1252bc: 89 47 34 mov %eax,0x34(%edi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 1252bf: 89 57 38 mov %edx,0x38(%edi) <== NOT EXECUTED return cmpltd; 1252c2: 89 f0 mov %esi,%eax <== NOT EXECUTED 1252c4: eb 07 jmp 1252cd <== NOT EXECUTED 1252c6: 31 c0 xor %eax,%eax <== NOT EXECUTED 1252c8: eb 03 jmp 1252cd <== NOT EXECUTED 1252ca: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } 1252cd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1252d0: 5b pop %ebx <== NOT EXECUTED 1252d1: 5e pop %esi <== NOT EXECUTED 1252d2: 5f pop %edi <== NOT EXECUTED 1252d3: c9 leave <== NOT EXECUTED 1252d4: c3 ret <== NOT EXECUTED =============================================================================== 001249d4 : * RETURNS: * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { 1249d4: 55 push %ebp <== NOT EXECUTED 1249d5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1249d7: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED fat_fd->links_num++; 1249da: ff 40 08 incl 0x8(%eax) <== NOT EXECUTED return RC_OK; } 1249dd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1249df: c9 leave <== NOT EXECUTED 1249e0: c3 ret <== NOT EXECUTED =============================================================================== 001249e1 : int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 1249e1: 55 push %ebp <== NOT EXECUTED 1249e2: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1249e4: 57 push %edi <== NOT EXECUTED 1249e5: 56 push %esi <== NOT EXECUTED 1249e6: 53 push %ebx <== NOT EXECUTED 1249e7: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1249ea: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1249ed: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 1249f0: 8b 72 34 mov 0x34(%edx),%esi <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 1249f3: 8b 43 1c mov 0x1c(%ebx),%eax <== NOT EXECUTED uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 1249f6: 83 7b 20 01 cmpl $0x1,0x20(%ebx) <== NOT EXECUTED 1249fa: 75 14 jne 124a10 <== NOT EXECUTED 1249fc: 83 7b 24 00 cmpl $0x0,0x24(%ebx) <== NOT EXECUTED 124a00: 75 0e jne 124a10 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124a02: f6 46 0a 03 testb $0x3,0xa(%esi) <== NOT EXECUTED 124a06: 74 08 je 124a10 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 124a08: 8b 46 28 mov 0x28(%esi),%eax <== NOT EXECUTED 124a0b: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED 124a0e: eb 45 jmp 124a55 <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 124a10: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 124a13: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) <== NOT EXECUTED 124a1a: 31 c0 xor %eax,%eax <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124a1c: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 124a1f: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 124a22: eb 21 jmp 124a45 <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 124a24: 50 push %eax <== NOT EXECUTED 124a25: 51 push %ecx <== NOT EXECUTED 124a26: 57 push %edi <== NOT EXECUTED 124a27: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 124a2a: 89 4d d0 mov %ecx,-0x30(%ebp) <== NOT EXECUTED 124a2d: e8 e3 4e 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 124a32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124a35: 85 c0 test %eax,%eax <== NOT EXECUTED 124a37: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 124a3a: 75 1b jne 124a57 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 124a3c: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 124a40: 01 43 18 add %eax,0x18(%ebx) <== NOT EXECUTED 124a43: 89 f8 mov %edi,%eax <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 124a45: 8b 7d e4 mov -0x1c(%ebp),%edi <== NOT EXECUTED 124a48: 8b 56 0c mov 0xc(%esi),%edx <== NOT EXECUTED 124a4b: 21 fa and %edi,%edx <== NOT EXECUTED 124a4d: 3b 56 10 cmp 0x10(%esi),%edx <== NOT EXECUTED 124a50: 72 d2 jb 124a24 <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 124a52: 89 43 3c mov %eax,0x3c(%ebx) <== NOT EXECUTED 124a55: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; } 124a57: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124a5a: 5b pop %ebx <== NOT EXECUTED 124a5b: 5e pop %esi <== NOT EXECUTED 124a5c: 5f pop %edi <== NOT EXECUTED 124a5d: c9 leave <== NOT EXECUTED 124a5e: c3 ret <== NOT EXECUTED =============================================================================== 00124ca7 : fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 124ca7: 55 push %ebp <== NOT EXECUTED 124ca8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124caa: 57 push %edi <== NOT EXECUTED 124cab: 56 push %esi <== NOT EXECUTED 124cac: 53 push %ebx <== NOT EXECUTED 124cad: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 124cb0: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED 124cb3: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 124cb6: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 124cb9: 8b 5f 34 mov 0x34(%edi),%ebx <== 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 ) 124cbc: 8b 46 18 mov 0x18(%esi),%eax <== NOT EXECUTED 124cbf: 39 c2 cmp %eax,%edx <== NOT EXECUTED 124cc1: 0f 83 b0 00 00 00 jae 124d77 <== 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; 124cc7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 124cce: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 124cd5: 85 c0 test %eax,%eax <== NOT EXECUTED 124cd7: 75 19 jne 124cf2 <== NOT EXECUTED 124cd9: 68 cd 9a 15 00 push $0x159acd <== NOT EXECUTED 124cde: 68 34 9b 15 00 push $0x159b34 <== NOT EXECUTED 124ce3: 68 6d 02 00 00 push $0x26d <== NOT EXECUTED 124ce8: 68 e3 9a 15 00 push $0x159ae3 <== NOT EXECUTED 124ced: e8 be 7b fe ff call 10c8b0 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 124cf2: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 124cf6: 0f b7 5b 06 movzwl 0x6(%ebx),%ebx <== NOT EXECUTED 124cfa: 8d 5c 1a ff lea -0x1(%edx,%ebx,1),%ebx <== NOT EXECUTED 124cfe: d3 eb shr %cl,%ebx <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 124d00: 89 da mov %ebx,%edx <== NOT EXECUTED 124d02: d3 e2 shl %cl,%edx <== NOT EXECUTED 124d04: 39 c2 cmp %eax,%edx <== NOT EXECUTED 124d06: 73 6f jae 124d77 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 124d08: 85 db test %ebx,%ebx <== NOT EXECUTED 124d0a: 74 1a je 124d26 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 124d0c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124d0f: 8d 4b ff lea -0x1(%ebx),%ecx <== NOT EXECUTED 124d12: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 124d15: 50 push %eax <== NOT EXECUTED 124d16: 89 f2 mov %esi,%edx <== NOT EXECUTED 124d18: 89 f8 mov %edi,%eax <== NOT EXECUTED 124d1a: e8 40 fd ff ff call 124a5f <== NOT EXECUTED if (rc != RC_OK) 124d1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124d22: 85 c0 test %eax,%eax <== NOT EXECUTED 124d24: 75 53 jne 124d79 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 124d26: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124d29: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 124d2c: 50 push %eax <== NOT EXECUTED 124d2d: 89 d9 mov %ebx,%ecx <== NOT EXECUTED 124d2f: 89 f2 mov %esi,%edx <== NOT EXECUTED 124d31: 89 f8 mov %edi,%eax <== NOT EXECUTED 124d33: e8 27 fd ff ff call 124a5f <== NOT EXECUTED if (rc != RC_OK) 124d38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124d3b: 85 c0 test %eax,%eax <== NOT EXECUTED 124d3d: 75 3a jne 124d79 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 124d3f: 51 push %ecx <== NOT EXECUTED 124d40: 51 push %ecx <== NOT EXECUTED 124d41: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 124d44: 57 push %edi <== NOT EXECUTED 124d45: e8 35 4d 01 00 call 139a7f <== NOT EXECUTED if (rc != RC_OK) 124d4a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124d4d: 85 c0 test %eax,%eax <== NOT EXECUTED 124d4f: 75 28 jne 124d79 <== NOT EXECUTED return rc; if (cl_start != 0) 124d51: 85 db test %ebx,%ebx <== NOT EXECUTED 124d53: 74 24 je 124d79 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 124d55: 52 push %edx <== NOT EXECUTED 124d56: 6a ff push $0xffffffff <== NOT EXECUTED 124d58: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 124d5b: 57 push %edi <== NOT EXECUTED 124d5c: e8 9b 49 01 00 call 1396fc <== NOT EXECUTED if ( rc != RC_OK ) 124d61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124d64: 85 c0 test %eax,%eax <== NOT EXECUTED 124d66: 75 11 jne 124d79 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; 124d68: 4b dec %ebx <== NOT EXECUTED 124d69: 89 5e 34 mov %ebx,0x34(%esi) <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 124d6c: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 124d6f: 89 56 38 mov %edx,0x38(%esi) <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 124d72: 89 56 3c mov %edx,0x3c(%esi) <== NOT EXECUTED 124d75: eb 02 jmp 124d79 <== NOT EXECUTED 124d77: 31 c0 xor %eax,%eax <== NOT EXECUTED } return RC_OK; } 124d79: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 124d7c: 5b pop %ebx <== NOT EXECUTED 124d7d: 5e pop %esi <== NOT EXECUTED 124d7e: 5f pop %edi <== NOT EXECUTED 124d7f: c9 leave <== NOT EXECUTED 124d80: c3 ret <== NOT EXECUTED =============================================================================== 00124f21 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 124f21: 55 push %ebp <== NOT EXECUTED 124f22: 89 e5 mov %esp,%ebp <== NOT EXECUTED 124f24: 57 push %edi <== NOT EXECUTED 124f25: 56 push %esi <== NOT EXECUTED 124f26: 53 push %ebx <== NOT EXECUTED 124f27: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 124f2a: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 124f2d: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 124f30: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 124f33: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 124f36: 31 c0 xor %eax,%eax <== NOT EXECUTED 124f38: 85 ff test %edi,%edi <== NOT EXECUTED 124f3a: 0f 84 db 01 00 00 je 12511b <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 124f40: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 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; 124f47: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 124f4e: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 124f51: 3b 56 18 cmp 0x18(%esi),%edx <== NOT EXECUTED 124f54: 77 0e ja 124f64 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 124f56: 8b 46 14 mov 0x14(%esi),%eax <== NOT EXECUTED 124f59: 39 c7 cmp %eax,%edi <== NOT EXECUTED 124f5b: 77 07 ja 124f64 <== NOT EXECUTED 124f5d: 29 f8 sub %edi,%eax <== NOT EXECUTED 124f5f: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 124f62: 76 10 jbe 124f74 <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 124f64: e8 2f 7e 01 00 call 13cd98 <__errno> <== NOT EXECUTED 124f69: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 124f6f: e9 a4 01 00 00 jmp 125118 <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 124f74: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 124f77: 8d 14 0f lea (%edi,%ecx,1),%edx <== NOT EXECUTED 124f7a: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 124f7d: 50 push %eax <== NOT EXECUTED 124f7e: 52 push %edx <== NOT EXECUTED 124f7f: 56 push %esi <== NOT EXECUTED 124f80: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 124f83: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 124f86: e8 f6 fd ff ff call 124d81 <== NOT EXECUTED if (rc != RC_OK) 124f8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 124f8e: 85 c0 test %eax,%eax <== NOT EXECUTED 124f90: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 124f93: 0f 85 82 01 00 00 jne 12511b <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 124f99: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 124f9c: 39 d0 cmp %edx,%eax <== NOT EXECUTED 124f9e: 74 05 je 124fa5 <== NOT EXECUTED count = c - start; 124fa0: 89 c7 mov %eax,%edi <== NOT EXECUTED 124fa2: 2b 7d 10 sub 0x10(%ebp),%edi <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 124fa5: 83 7e 20 01 cmpl $0x1,0x20(%esi) <== NOT EXECUTED 124fa9: 75 63 jne 12500e <== NOT EXECUTED 124fab: 83 7e 24 00 cmpl $0x0,0x24(%esi) <== NOT EXECUTED 124faf: 75 5d jne 12500e <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 124fb1: f6 43 0a 03 testb $0x3,0xa(%ebx) <== NOT EXECUTED 124fb5: 74 57 je 12500e <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 124fb7: 8b 46 1c mov 0x1c(%esi),%eax <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 124fba: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 124fbd: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 124fc0: 85 c0 test %eax,%eax <== NOT EXECUTED 124fc2: 75 0b jne 124fcf <== NOT EXECUTED 124fc4: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 124fc8: 74 05 je 124fcf <== NOT EXECUTED return fs_info->vol.rdir_loc; 124fca: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 124fcd: eb 0c jmp 124fdb <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 124fcf: 83 e8 02 sub $0x2,%eax <== NOT EXECUTED 124fd2: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 124fd6: d3 e0 shl %cl,%eax <== NOT EXECUTED 124fd8: 03 42 30 add 0x30(%edx),%eax <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 124fdb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 124fde: ff 75 18 pushl 0x18(%ebp) <== NOT EXECUTED 124fe1: 57 push %edi <== NOT EXECUTED 124fe2: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 124fe5: 4a dec %edx <== NOT EXECUTED 124fe6: 23 55 10 and 0x10(%ebp),%edx <== NOT EXECUTED 124fe9: 52 push %edx <== NOT EXECUTED 124fea: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 124fee: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 124ff1: d3 ef shr %cl,%edi <== NOT EXECUTED 124ff3: 01 f8 add %edi,%eax <== NOT EXECUTED 124ff5: 50 push %eax <== NOT EXECUTED 124ff6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 124ff9: e8 82 09 00 00 call 125980 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 124ffe: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 125001: 85 c0 test %eax,%eax <== NOT EXECUTED 125003: 0f 89 12 01 00 00 jns 12511b <== NOT EXECUTED 125009: e9 0a 01 00 00 jmp 125118 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 12500e: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 125012: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 125015: d3 e8 shr %cl,%eax <== NOT EXECUTED 125017: 89 45 c8 mov %eax,-0x38(%ebp) <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); 12501a: 66 8b 53 06 mov 0x6(%ebx),%dx <== NOT EXECUTED 12501e: 66 89 55 d0 mov %dx,-0x30(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 125022: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125025: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125028: 51 push %ecx <== NOT EXECUTED 125029: 89 c1 mov %eax,%ecx <== NOT EXECUTED 12502b: 89 f2 mov %esi,%edx <== NOT EXECUTED 12502d: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125030: e8 2a fa ff ff call 124a5f <== NOT EXECUTED if (rc != RC_OK) 125035: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125038: 85 c0 test %eax,%eax <== NOT EXECUTED 12503a: 0f 85 db 00 00 00 jne 12511b <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 125040: 0f b7 45 d0 movzwl -0x30(%ebp),%eax <== NOT EXECUTED 125044: 48 dec %eax <== NOT EXECUTED 125045: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 125048: 21 d0 and %edx,%eax <== NOT EXECUTED 12504a: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 12504d: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 125050: 31 d2 xor %edx,%edx <== NOT EXECUTED 125052: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 125059: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED 12505c: e9 8f 00 00 00 jmp 1250f0 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 125061: 0f b7 43 06 movzwl 0x6(%ebx),%eax <== NOT EXECUTED 125065: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 125068: 39 f8 cmp %edi,%eax <== NOT EXECUTED 12506a: 76 02 jbe 12506e <== NOT EXECUTED 12506c: 89 f8 mov %edi,%eax <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 12506e: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 125071: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 125074: 8b 51 34 mov 0x34(%ecx),%edx <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 125077: 85 f6 test %esi,%esi <== NOT EXECUTED 125079: 75 0b jne 125086 <== NOT EXECUTED 12507b: f6 42 0a 03 testb $0x3,0xa(%edx) <== NOT EXECUTED 12507f: 74 05 je 125086 <== NOT EXECUTED return fs_info->vol.rdir_loc; 125081: 8b 72 1c mov 0x1c(%edx),%esi <== NOT EXECUTED 125084: eb 0c jmp 125092 <== NOT EXECUTED return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 125086: 83 ee 02 sub $0x2,%esi <== NOT EXECUTED 125089: 0f b6 4a 05 movzbl 0x5(%edx),%ecx <== NOT EXECUTED 12508d: d3 e6 shl %cl,%esi <== NOT EXECUTED 12508f: 03 72 30 add 0x30(%edx),%esi <== NOT EXECUTED sec += (ofs >> fs_info->vol.sec_log2); 125092: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 125096: 8b 55 cc mov -0x34(%ebp),%edx <== NOT EXECUTED 125099: d3 ea shr %cl,%edx <== NOT EXECUTED 12509b: 01 d6 add %edx,%esi <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); 12509d: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 1250a0: 4a dec %edx <== NOT EXECUTED 1250a1: 23 55 cc and -0x34(%ebp),%edx <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 1250a4: 89 45 e0 mov %eax,-0x20(%ebp) <== 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); 1250a7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1250aa: 8b 4d 18 mov 0x18(%ebp),%ecx <== NOT EXECUTED 1250ad: 03 4d d4 add -0x2c(%ebp),%ecx <== NOT EXECUTED 1250b0: 51 push %ecx <== NOT EXECUTED 1250b1: 50 push %eax <== NOT EXECUTED 1250b2: 52 push %edx <== NOT EXECUTED 1250b3: 56 push %esi <== NOT EXECUTED 1250b4: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1250b7: e8 c4 08 00 00 call 125980 <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 1250bc: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1250bf: 85 c0 test %eax,%eax <== NOT EXECUTED 1250c1: 78 55 js 125118 <== NOT EXECUTED return -1; count -= c; 1250c3: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; 1250c6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 1250c9: 51 push %ecx <== NOT EXECUTED 1250ca: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1250cd: 51 push %ecx <== NOT EXECUTED 1250ce: 52 push %edx <== NOT EXECUTED 1250cf: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1250d2: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 1250d5: e8 3b 48 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 1250da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1250dd: 85 c0 test %eax,%eax <== NOT EXECUTED 1250df: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 1250e2: 75 37 jne 12511b <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 1250e4: 29 f7 sub %esi,%edi <== NOT EXECUTED cmpltd += c; 1250e6: 01 75 d4 add %esi,-0x2c(%ebp) <== NOT EXECUTED 1250e9: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 1250f0: 85 ff test %edi,%edi <== NOT EXECUTED 1250f2: 0f 85 69 ff ff ff jne 125061 <== NOT EXECUTED 1250f8: 8b 75 c4 mov -0x3c(%ebp),%esi <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 1250fb: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 1250fe: 8b 7d d4 mov -0x2c(%ebp),%edi <== NOT EXECUTED 125101: 8d 44 39 ff lea -0x1(%ecx,%edi,1),%eax <== NOT EXECUTED 125105: 0f b6 4b 08 movzbl 0x8(%ebx),%ecx <== NOT EXECUTED 125109: d3 e8 shr %cl,%eax <== NOT EXECUTED 12510b: 03 45 c8 add -0x38(%ebp),%eax <== NOT EXECUTED 12510e: 89 46 34 mov %eax,0x34(%esi) <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 125111: 89 56 38 mov %edx,0x38(%esi) <== NOT EXECUTED return cmpltd; 125114: 89 f8 mov %edi,%eax <== NOT EXECUTED 125116: eb 03 jmp 12511b <== NOT EXECUTED 125118: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED } 12511b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 12511e: 5b pop %ebx <== NOT EXECUTED 12511f: 5e pop %esi <== NOT EXECUTED 125120: 5f pop %edi <== NOT EXECUTED 125121: c9 leave <== NOT EXECUTED 125122: c3 ret <== NOT EXECUTED =============================================================================== 00139a7f : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 139a7f: 55 push %ebp <== NOT EXECUTED 139a80: 89 e5 mov %esp,%ebp <== NOT EXECUTED 139a82: 57 push %edi <== NOT EXECUTED 139a83: 56 push %esi <== NOT EXECUTED 139a84: 53 push %ebx <== NOT EXECUTED 139a85: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 139a88: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 139a8b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 139a8e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 139a95: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 139a98: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 139a9f: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 139aa6: eb 4c jmp 139af4 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 139aa8: 52 push %edx <== NOT EXECUTED 139aa9: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 139aac: 50 push %eax <== NOT EXECUTED 139aad: 56 push %esi <== NOT EXECUTED 139aae: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139ab1: e8 5f fe ff ff call 139915 <== NOT EXECUTED 139ab6: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( rc != RC_OK ) 139ab8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139abb: 85 c0 test %eax,%eax <== NOT EXECUTED 139abd: 74 19 je 139ad8 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 139abf: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 139ac2: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 139ac5: 74 06 je 139acd <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 139ac7: 03 45 d4 add -0x2c(%ebp),%eax <== NOT EXECUTED 139aca: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 139acd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 139ad0: 53 push %ebx <== NOT EXECUTED 139ad1: e8 91 bb fe ff call 125667 <== NOT EXECUTED 139ad6: eb 46 jmp 139b1e <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 139ad8: 50 push %eax <== NOT EXECUTED 139ad9: 6a 00 push $0x0 <== NOT EXECUTED 139adb: 56 push %esi <== NOT EXECUTED 139adc: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139adf: e8 18 fc ff ff call 1396fc <== NOT EXECUTED if ( rc != RC_OK ) 139ae4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139ae7: 85 c0 test %eax,%eax <== NOT EXECUTED 139ae9: 74 03 je 139aee <== NOT EXECUTED 139aeb: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 139aee: ff 45 d4 incl -0x2c(%ebp) <== NOT EXECUTED cur_cln = next_cln; 139af1: 8b 75 e4 mov -0x1c(%ebp),%esi <== 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) 139af4: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 139af7: 21 f0 and %esi,%eax <== NOT EXECUTED 139af9: 3b 43 10 cmp 0x10(%ebx),%eax <== NOT EXECUTED 139afc: 72 aa jb 139aa8 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 139afe: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 139b01: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 139b04: 8b 43 40 mov 0x40(%ebx),%eax <== NOT EXECUTED 139b07: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 139b0a: 74 06 je 139b12 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 139b0c: 03 45 d4 add -0x2c(%ebp),%eax <== NOT EXECUTED 139b0f: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED fat_buf_release(fs_info); 139b12: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 139b15: 53 push %ebx <== NOT EXECUTED 139b16: e8 4c bb fe ff call 125667 <== NOT EXECUTED 139b1b: 8b 7d d0 mov -0x30(%ebp),%edi <== NOT EXECUTED 139b1e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 139b21: 89 f8 mov %edi,%eax <== NOT EXECUTED 139b23: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 139b26: 5b pop %ebx <== NOT EXECUTED 139b27: 5e pop %esi <== NOT EXECUTED 139b28: 5f pop %edi <== NOT EXECUTED 139b29: c9 leave <== NOT EXECUTED 139b2a: c3 ret <== NOT EXECUTED =============================================================================== 00125590 : void fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 125590: 55 push %ebp <== NOT EXECUTED 125591: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125593: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 125596: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125599: 8b 50 34 mov 0x34(%eax),%edx <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 12559c: 2b 4a 78 sub 0x78(%edx),%ecx <== NOT EXECUTED 12559f: 89 c8 mov %ecx,%eax <== NOT EXECUTED 1255a1: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 1255a4: 03 42 6c add 0x6c(%edx),%eax <== NOT EXECUTED 1255a7: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 1255aa: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1255af: d3 e2 shl %cl,%edx <== NOT EXECUTED 1255b1: f7 d2 not %edx <== NOT EXECUTED 1255b3: 20 10 and %dl,(%eax) <== NOT EXECUTED } 1255b5: c9 leave <== NOT EXECUTED 1255b6: c3 ret <== NOT EXECUTED =============================================================================== 00139915 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 139915: 55 push %ebp <== NOT EXECUTED 139916: 89 e5 mov %esp,%ebp <== NOT EXECUTED 139918: 57 push %edi <== NOT EXECUTED 139919: 56 push %esi <== NOT EXECUTED 13991a: 53 push %ebx <== NOT EXECUTED 13991b: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 13991e: 8b 7d 0c mov 0xc(%ebp),%edi <== NOT EXECUTED 139921: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 139924: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 139927: 8b 70 34 mov 0x34(%eax),%esi <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; 13992a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 139931: 83 ff 01 cmp $0x1,%edi <== NOT EXECUTED 139934: 0f 86 2d 01 00 00 jbe 139a67 <== NOT EXECUTED 13993a: 8b 46 34 mov 0x34(%esi),%eax <== NOT EXECUTED 13993d: 40 inc %eax <== NOT EXECUTED 13993e: 39 c7 cmp %eax,%edi <== NOT EXECUTED 139940: 0f 87 21 01 00 00 ja 139a67 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 139946: 0f b6 56 0a movzbl 0xa(%esi),%edx <== NOT EXECUTED 13994a: 89 d0 mov %edx,%eax <== NOT EXECUTED 13994c: 83 e0 01 and $0x1,%eax <== NOT EXECUTED 13994f: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 139952: 74 08 je 13995c <== NOT EXECUTED 139954: 89 f8 mov %edi,%eax <== NOT EXECUTED 139956: d1 e8 shr %eax <== NOT EXECUTED 139958: 01 f8 add %edi,%eax <== NOT EXECUTED 13995a: eb 0f jmp 13996b <== NOT EXECUTED 13995c: 8d 04 3f lea (%edi,%edi,1),%eax <== NOT EXECUTED 13995f: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 139962: 75 07 jne 13996b <== NOT EXECUTED 139964: 8d 04 bd 00 00 00 00 lea 0x0(,%edi,4),%eax <== NOT EXECUTED 13996b: 0f b6 4e 02 movzbl 0x2(%esi),%ecx <== NOT EXECUTED 13996f: d3 e8 shr %cl,%eax <== NOT EXECUTED 139971: 8b 4e 4c mov 0x4c(%esi),%ecx <== NOT EXECUTED 139974: 01 c8 add %ecx,%eax <== NOT EXECUTED 139976: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 139979: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp) <== NOT EXECUTED 13997d: 74 08 je 139987 <== NOT EXECUTED 13997f: 89 f9 mov %edi,%ecx <== NOT EXECUTED 139981: d1 e9 shr %ecx <== NOT EXECUTED 139983: 01 f9 add %edi,%ecx <== NOT EXECUTED 139985: eb 11 jmp 139998 <== NOT EXECUTED 139987: 80 e2 02 and $0x2,%dl <== NOT EXECUTED 13998a: 74 05 je 139991 <== NOT EXECUTED 13998c: 8d 0c 3f lea (%edi,%edi,1),%ecx <== NOT EXECUTED 13998f: eb 07 jmp 139998 <== NOT EXECUTED 139991: 8d 0c bd 00 00 00 00 lea 0x0(,%edi,4),%ecx <== NOT EXECUTED 139998: 8b 06 mov (%esi),%eax <== NOT EXECUTED 13999a: 66 89 45 d4 mov %ax,-0x2c(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 13999e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1399a1: 50 push %eax <== NOT EXECUTED 1399a2: 6a 01 push $0x1 <== NOT EXECUTED 1399a4: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 1399a7: 56 push %esi <== NOT EXECUTED 1399a8: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 1399ab: e8 fe bd fe ff call 1257ae <== NOT EXECUTED 1399b0: 89 c2 mov %eax,%edx <== NOT EXECUTED if (rc != RC_OK) 1399b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1399b5: 85 c0 test %eax,%eax <== NOT EXECUTED 1399b7: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 1399ba: 0f 85 b5 00 00 00 jne 139a75 <== NOT EXECUTED 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); 1399c0: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax <== NOT EXECUTED 1399c4: 48 dec %eax <== NOT EXECUTED 1399c5: 21 c8 and %ecx,%eax <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 1399c7: 8a 4e 0a mov 0xa(%esi),%cl <== NOT EXECUTED 1399ca: 80 f9 02 cmp $0x2,%cl <== NOT EXECUTED 1399cd: 74 7f je 139a4e <== NOT EXECUTED 1399cf: 80 f9 04 cmp $0x4,%cl <== NOT EXECUTED 1399d2: 0f 84 82 00 00 00 je 139a5a <== NOT EXECUTED 1399d8: fe c9 dec %cl <== NOT EXECUTED 1399da: 0f 85 87 00 00 00 jne 139a67 <== 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))); 1399e0: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 1399e3: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 1399e6: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 1399e9: 0f b6 0c 01 movzbl (%ecx,%eax,1),%ecx <== NOT EXECUTED 1399ed: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1399f0: 89 0b mov %ecx,(%ebx) <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 1399f2: 0f b7 0e movzwl (%esi),%ecx <== NOT EXECUTED 1399f5: 49 dec %ecx <== NOT EXECUTED 1399f6: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 1399f8: 75 32 jne 139a2c <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 1399fa: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 1399fd: 50 push %eax <== NOT EXECUTED 1399fe: 6a 01 push $0x1 <== NOT EXECUTED 139a00: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 139a03: 40 inc %eax <== NOT EXECUTED 139a04: 50 push %eax <== NOT EXECUTED 139a05: 56 push %esi <== NOT EXECUTED 139a06: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 139a09: e8 a0 bd fe ff call 1257ae <== NOT EXECUTED &block0); if (rc != RC_OK) 139a0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139a11: 85 c0 test %eax,%eax <== NOT EXECUTED 139a13: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 139a16: 74 04 je 139a1c <== NOT EXECUTED 139a18: 89 c2 mov %eax,%edx <== NOT EXECUTED 139a1a: eb 59 jmp 139a75 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 139a1c: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 139a1f: 8b 40 20 mov 0x20(%eax),%eax <== NOT EXECUTED 139a22: 0f b6 00 movzbl (%eax),%eax <== NOT EXECUTED 139a25: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 139a28: 09 03 or %eax,(%ebx) <== NOT EXECUTED 139a2a: eb 10 jmp 139a3c <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 139a2c: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 139a2f: 0f b6 44 01 01 movzbl 0x1(%ecx,%eax,1),%eax <== NOT EXECUTED 139a34: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 139a37: 0b 45 d4 or -0x2c(%ebp),%eax <== NOT EXECUTED 139a3a: 89 03 mov %eax,(%ebx) <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 139a3c: 83 e7 01 and $0x1,%edi <== NOT EXECUTED 139a3f: 74 05 je 139a46 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; 139a41: c1 2b 04 shrl $0x4,(%ebx) <== NOT EXECUTED 139a44: eb 2f jmp 139a75 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 139a46: 81 23 ff 0f 00 00 andl $0xfff,(%ebx) <== NOT EXECUTED 139a4c: eb 27 jmp 139a75 <== NOT EXECUTED break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 139a4e: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 139a51: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 139a54: 0f b7 04 01 movzwl (%ecx,%eax,1),%eax <== NOT EXECUTED 139a58: eb 09 jmp 139a63 <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 139a5a: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 139a5d: 8b 49 20 mov 0x20(%ecx),%ecx <== NOT EXECUTED 139a60: 8b 04 01 mov (%ecx,%eax,1),%eax <== NOT EXECUTED 139a63: 89 03 mov %eax,(%ebx) <== NOT EXECUTED break; 139a65: eb 0e jmp 139a75 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 139a67: e8 2c 33 00 00 call 13cd98 <__errno> <== NOT EXECUTED 139a6c: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 139a72: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED break; } return RC_OK; } 139a75: 89 d0 mov %edx,%eax <== NOT EXECUTED 139a77: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 139a7a: 5b pop %ebx <== NOT EXECUTED 139a7b: 5e pop %esi <== NOT EXECUTED 139a7c: 5f pop %edi <== NOT EXECUTED 139a7d: c9 leave <== NOT EXECUTED 139a7e: c3 ret <== NOT EXECUTED =============================================================================== 001255cb : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 1255cb: 55 push %ebp <== NOT EXECUTED 1255cc: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1255ce: 57 push %edi <== NOT EXECUTED 1255cf: 56 push %esi <== NOT EXECUTED 1255d0: 53 push %ebx <== NOT EXECUTED 1255d1: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 1255d4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1255d7: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 1255da: eb 77 jmp 125653 <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 1255dc: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED 1255df: 89 f0 mov %esi,%eax <== NOT EXECUTED 1255e1: c1 e8 03 shr $0x3,%eax <== NOT EXECUTED 1255e4: 03 43 6c add 0x6c(%ebx),%eax <== NOT EXECUTED 1255e7: 8a 08 mov (%eax),%cl <== NOT EXECUTED 1255e9: 88 4d e3 mov %cl,-0x1d(%ebp) <== NOT EXECUTED 1255ec: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1255ee: 83 e1 07 and $0x7,%ecx <== NOT EXECUTED 1255f1: 0f be 7d e3 movsbl -0x1d(%ebp),%edi <== NOT EXECUTED 1255f5: 0f a3 cf bt %ecx,%edi <== NOT EXECUTED 1255f8: 72 14 jb 12560e <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 1255fa: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 1255ff: d3 e2 shl %cl,%edx <== NOT EXECUTED 125601: 0a 55 e3 or -0x1d(%ebp),%dl <== NOT EXECUTED 125604: 88 10 mov %dl,(%eax) <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 125606: 8b 43 70 mov 0x70(%ebx),%eax <== NOT EXECUTED 125609: 03 43 78 add 0x78(%ebx),%eax <== NOT EXECUTED 12560c: eb 51 jmp 12565f <== NOT EXECUTED } fs_info->index++; 12560e: 46 inc %esi <== NOT EXECUTED 12560f: 89 73 70 mov %esi,0x70(%ebx) <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) 125612: 3b 73 74 cmp 0x74(%ebx),%esi <== NOT EXECUTED 125615: 72 07 jb 12561e <== NOT EXECUTED fs_info->index = 0; 125617: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 12561e: 42 inc %edx <== NOT EXECUTED 12561f: 3b 55 e4 cmp -0x1c(%ebp),%edx <== NOT EXECUTED 125622: 72 b8 jb 1255dc <== 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)) 125624: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125627: d1 e0 shl %eax <== NOT EXECUTED 125629: ba ff ff ff 0f mov $0xfffffff,%edx <== NOT EXECUTED 12562e: 2b 53 78 sub 0x78(%ebx),%edx <== NOT EXECUTED 125631: 39 d0 cmp %edx,%eax <== NOT EXECUTED 125633: 73 28 jae 12565d <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 125635: 89 43 74 mov %eax,0x74(%ebx) <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 125638: 52 push %edx <== NOT EXECUTED 125639: 52 push %edx <== NOT EXECUTED 12563a: 50 push %eax <== NOT EXECUTED 12563b: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 12563e: e8 05 8a fe ff call 10e048 <== NOT EXECUTED 125643: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if (fs_info->uino != NULL) 125646: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125649: 85 c0 test %eax,%eax <== NOT EXECUTED 12564b: 74 10 je 12565d <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 12564d: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 125650: 89 43 70 mov %eax,0x70(%ebx) <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 125653: 8b 43 74 mov 0x74(%ebx),%eax <== NOT EXECUTED 125656: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED 125659: 31 d2 xor %edx,%edx <== NOT EXECUTED 12565b: eb c2 jmp 12561f <== NOT EXECUTED 12565d: 31 c0 xor %eax,%eax <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 12565f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125662: 5b pop %ebx <== NOT EXECUTED 125663: 5e pop %esi <== NOT EXECUTED 125664: 5f pop %edi <== NOT EXECUTED 125665: c9 leave <== NOT EXECUTED 125666: c3 ret <== NOT EXECUTED =============================================================================== 00125bcf : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 125bcf: 55 push %ebp <== NOT EXECUTED 125bd0: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125bd2: 57 push %edi <== NOT EXECUTED 125bd3: 56 push %esi <== NOT EXECUTED 125bd4: 53 push %ebx <== NOT EXECUTED 125bd5: 83 ec 34 sub $0x34,%esp <== NOT EXECUTED 125bd8: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 125bdb: 8b 77 34 mov 0x34(%edi),%esi <== NOT EXECUTED uint32_t cur_cln = start_cln; 125bde: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 125be1: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 125be4: 6a 01 push $0x1 <== NOT EXECUTED 125be6: 0f b7 46 06 movzwl 0x6(%esi),%eax <== NOT EXECUTED 125bea: 50 push %eax <== NOT EXECUTED 125beb: e8 dc 6d fe ff call 10c9cc <== NOT EXECUTED 125bf0: 89 c3 mov %eax,%ebx <== NOT EXECUTED if ( buf == NULL ) 125bf2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125bf5: 85 c0 test %eax,%eax <== NOT EXECUTED 125bf7: 75 56 jne 125c4f <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 125bf9: e8 9a 71 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125bfe: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125c04: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125c07: eb 61 jmp 125c6a <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 125c09: 52 push %edx <== NOT EXECUTED 125c0a: 53 push %ebx <== NOT EXECUTED 125c0b: 50 push %eax <== NOT EXECUTED 125c0c: 57 push %edi <== NOT EXECUTED 125c0d: e8 73 ff ff ff call 125b85 <== NOT EXECUTED if ( ret == -1 ) 125c12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125c15: 40 inc %eax <== NOT EXECUTED 125c16: 75 0e jne 125c26 <== NOT EXECUTED { free(buf); 125c18: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125c1b: 53 push %ebx <== NOT EXECUTED 125c1c: e8 7b 72 fe ff call 10ce9c <== NOT EXECUTED 125c21: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 125c24: eb 41 jmp 125c67 <== NOT EXECUTED return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 125c26: 51 push %ecx <== NOT EXECUTED 125c27: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 125c2a: 50 push %eax <== NOT EXECUTED 125c2b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125c2e: 57 push %edi <== NOT EXECUTED 125c2f: e8 e1 3c 01 00 call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 125c34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125c37: 85 c0 test %eax,%eax <== NOT EXECUTED 125c39: 74 14 je 125c4f <== NOT EXECUTED { free(buf); 125c3b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125c3e: 53 push %ebx <== NOT EXECUTED 125c3f: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED 125c42: e8 55 72 fe ff call 10ce9c <== NOT EXECUTED return rc; 125c47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125c4a: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 125c4d: eb 1b jmp 125c6a <== NOT EXECUTED 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) 125c4f: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125c52: 8b 56 0c mov 0xc(%esi),%edx <== NOT EXECUTED 125c55: 21 c2 and %eax,%edx <== NOT EXECUTED 125c57: 3b 56 10 cmp 0x10(%esi),%edx <== NOT EXECUTED 125c5a: 72 ad jb 125c09 <== NOT EXECUTED free(buf); return rc; } } free(buf); 125c5c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125c5f: 53 push %ebx <== NOT EXECUTED 125c60: e8 37 72 fe ff call 10ce9c <== NOT EXECUTED 125c65: 31 c0 xor %eax,%eax <== NOT EXECUTED return rc; 125c67: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 125c6a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125c6d: 5b pop %ebx <== NOT EXECUTED 125c6e: 5e pop %esi <== NOT EXECUTED 125c6f: 5f pop %edi <== NOT EXECUTED 125c70: c9 leave <== NOT EXECUTED 125c71: c3 ret <== NOT EXECUTED =============================================================================== 00125cf9 : * 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) { 125cf9: 55 push %ebp <== NOT EXECUTED 125cfa: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125cfc: 57 push %edi <== NOT EXECUTED 125cfd: 56 push %esi <== NOT EXECUTED 125cfe: 53 push %ebx <== NOT EXECUTED 125cff: 81 ec d4 00 00 00 sub $0xd4,%esp <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125d05: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125d08: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED 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; 125d0b: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 125d12: 8d 45 90 lea -0x70(%ebp),%eax <== NOT EXECUTED 125d15: 50 push %eax <== NOT EXECUTED 125d16: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 125d19: ff 70 70 pushl 0x70(%eax) <== NOT EXECUTED 125d1c: e8 cb 85 fe ff call 10e2ec <== NOT EXECUTED 125d21: 89 c6 mov %eax,%esi <== NOT EXECUTED if (rc == -1) 125d23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125d26: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 125d29: 0f 84 b2 05 00 00 je 1262e1 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 125d2f: 8b 45 9c mov -0x64(%ebp),%eax <== NOT EXECUTED 125d32: 25 00 f0 00 00 and $0xf000,%eax <== NOT EXECUTED 125d37: 3d 00 60 00 00 cmp $0x6000,%eax <== NOT EXECUTED 125d3c: 74 0d je 125d4b <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); 125d3e: e8 55 70 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125d43: c7 00 19 00 00 00 movl $0x19,(%eax) <== NOT EXECUTED 125d49: eb 22 jmp 125d6d <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 125d4b: 56 push %esi <== NOT EXECUTED 125d4c: 56 push %esi <== NOT EXECUTED 125d4d: ff 75 ac pushl -0x54(%ebp) <== NOT EXECUTED 125d50: ff 75 a8 pushl -0x58(%ebp) <== NOT EXECUTED 125d53: e8 95 5f fe ff call 10bced <== NOT EXECUTED 125d58: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED if (vol->dd == NULL) 125d5b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125d5e: 85 c0 test %eax,%eax <== NOT EXECUTED 125d60: 75 13 jne 125d75 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 125d62: e8 31 70 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125d67: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125d6d: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 125d70: e9 6c 05 00 00 jmp 1262e1 <== NOT EXECUTED vol->dev = stat_buf.st_rdev; 125d75: 8b 45 a8 mov -0x58(%ebp),%eax <== NOT EXECUTED 125d78: 8b 55 ac mov -0x54(%ebp),%edx <== NOT EXECUTED 125d7b: 89 43 54 mov %eax,0x54(%ebx) <== NOT EXECUTED 125d7e: 89 53 58 mov %edx,0x58(%ebx) <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 125d81: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 125d84: 51 push %ecx <== NOT EXECUTED 125d85: 6a 00 push $0x0 <== NOT EXECUTED 125d87: 52 push %edx <== NOT EXECUTED 125d88: 50 push %eax <== NOT EXECUTED 125d89: e8 86 51 fe ff call 10af14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125d8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125d91: 85 c0 test %eax,%eax <== NOT EXECUTED 125d93: 75 25 jne 125dba <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO); } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 125d95: 8d 95 36 ff ff ff lea -0xca(%ebp),%edx <== NOT EXECUTED 125d9b: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 125d9e: 8b 70 20 mov 0x20(%eax),%esi <== NOT EXECUTED 125da1: b9 5a 00 00 00 mov $0x5a,%ecx <== NOT EXECUTED 125da6: 89 d7 mov %edx,%edi <== NOT EXECUTED 125da8: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED sc = rtems_bdbuf_release( block); 125daa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125dad: 50 push %eax <== NOT EXECUTED 125dae: e8 c4 42 fe ff call 10a077 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 125db3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125db6: 85 c0 test %eax,%eax <== NOT EXECUTED 125db8: 74 1b je 125dd5 <== NOT EXECUTED { rtems_disk_release(vol->dd); 125dba: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125dbd: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 125dc0: e8 af 60 fe ff call 10be74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 125dc5: e8 ce 6f 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125dca: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 125dd0: e9 06 05 00 00 jmp 1262db <== NOT EXECUTED } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 125dd5: 0f b6 95 42 ff ff ff movzbl -0xbe(%ebp),%edx <== NOT EXECUTED 125ddc: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 125ddf: 0f b6 85 41 ff ff ff movzbl -0xbf(%ebp),%eax <== NOT EXECUTED 125de6: 09 d0 or %edx,%eax <== NOT EXECUTED 125de8: 66 89 03 mov %ax,(%ebx) <== NOT EXECUTED if ( (vol->bps != 512) && 125deb: 66 3d 00 04 cmp $0x400,%ax <== NOT EXECUTED 125def: 74 16 je 125e07 <== NOT EXECUTED 125df1: 66 3d 00 02 cmp $0x200,%ax <== NOT EXECUTED 125df5: 74 10 je 125e07 <== NOT EXECUTED 125df7: 66 3d 00 08 cmp $0x800,%ax <== NOT EXECUTED 125dfb: 74 0a je 125e07 <== NOT EXECUTED 125dfd: 66 3d 00 10 cmp $0x1000,%ax <== NOT EXECUTED 125e01: 0f 85 43 02 00 00 jne 12604a <== 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; 125e07: c6 43 03 00 movb $0x0,0x3(%ebx) <== NOT EXECUTED 125e0b: 66 c1 e8 09 shr $0x9,%ax <== NOT EXECUTED 125e0f: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 125e12: eb 05 jmp 125e19 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 125e14: d1 f8 sar %eax <== NOT EXECUTED 125e16: fe 43 03 incb 0x3(%ebx) <== 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; 125e19: a8 01 test $0x1,%al <== NOT EXECUTED 125e1b: 74 f7 je 125e14 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 125e1d: c6 43 02 00 movb $0x0,0x2(%ebx) <== NOT EXECUTED 125e21: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 125e24: eb 05 jmp 125e2b <== NOT EXECUTED i >>= 1, vol->sec_log2++); 125e26: d1 f8 sar %eax <== NOT EXECUTED 125e28: fe 43 02 incb 0x2(%ebx) <== NOT EXECUTED 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; 125e2b: a8 01 test $0x1,%al <== NOT EXECUTED 125e2d: 74 f7 je 125e26 <== NOT EXECUTED if ( (ret1 < 0) || (ret2 < 0) ) return -1; return RC_OK; } 125e2f: 8a 85 43 ff ff ff mov -0xbd(%ebp),%al <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 125e35: 88 43 04 mov %al,0x4(%ebx) <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 125e38: 84 c0 test %al,%al <== NOT EXECUTED 125e3a: 0f 84 0a 02 00 00 je 12604a <== 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; 125e40: c6 43 05 00 movb $0x0,0x5(%ebx) <== NOT EXECUTED 125e44: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 125e47: eb 05 jmp 125e4e <== NOT EXECUTED i >>= 1, vol->spc_log2++); 125e49: d1 f8 sar %eax <== NOT EXECUTED 125e4b: fe 43 05 incb 0x5(%ebx) <== 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; 125e4e: a8 01 test $0x1,%al <== NOT EXECUTED 125e50: 74 f7 je 125e49 <== NOT EXECUTED 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) 125e52: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 125e55: 0f b6 4b 05 movzbl 0x5(%ebx),%ecx <== NOT EXECUTED 125e59: d3 e0 shl %cl,%eax <== NOT EXECUTED 125e5b: 66 89 43 06 mov %ax,0x6(%ebx) <== NOT EXECUTED 125e5f: 66 3d 00 80 cmp $0x8000,%ax <== NOT EXECUTED 125e63: 0f 87 e1 01 00 00 ja 12604a <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 125e69: c6 43 08 00 movb $0x0,0x8(%ebx) <== NOT EXECUTED 125e6d: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 125e70: eb 05 jmp 125e77 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); 125e72: d1 f8 sar %eax <== NOT EXECUTED 125e74: fe 43 08 incb 0x8(%ebx) <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 125e77: a8 01 test $0x1,%al <== NOT EXECUTED 125e79: 74 f7 je 125e72 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 125e7b: 8a 85 46 ff ff ff mov -0xba(%ebp),%al <== NOT EXECUTED 125e81: 88 43 09 mov %al,0x9(%ebx) <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 125e84: 0f b6 95 45 ff ff ff movzbl -0xbb(%ebp),%edx <== NOT EXECUTED 125e8b: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 125e8e: 0f b6 85 44 ff ff ff movzbl -0xbc(%ebp),%eax <== NOT EXECUTED 125e95: 09 d0 or %edx,%eax <== NOT EXECUTED 125e97: 66 89 43 14 mov %ax,0x14(%ebx) <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 125e9b: 0f b6 95 48 ff ff ff movzbl -0xb8(%ebp),%edx <== NOT EXECUTED 125ea2: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 125ea5: 0f b6 85 47 ff ff ff movzbl -0xb9(%ebp),%eax <== NOT EXECUTED 125eac: 09 d0 or %edx,%eax <== NOT EXECUTED 125eae: 66 89 43 20 mov %ax,0x20(%ebx) <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 125eb2: 0f b7 0b movzwl (%ebx),%ecx <== NOT EXECUTED 125eb5: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 125eb8: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 125ebb: 8d 44 01 ff lea -0x1(%ecx,%eax,1),%eax <== NOT EXECUTED 125ebf: 99 cltd <== NOT EXECUTED 125ec0: f7 f9 idiv %ecx <== NOT EXECUTED 125ec2: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 125ec5: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 125ec9: d3 e0 shl %cl,%eax <== NOT EXECUTED 125ecb: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 125ece: 0f b6 85 4d ff ff ff movzbl -0xb3(%ebp),%eax <== NOT EXECUTED 125ed5: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 125ed8: 0f b6 95 4c ff ff ff movzbl -0xb4(%ebp),%edx <== NOT EXECUTED 125edf: 66 09 d0 or %dx,%ax <== NOT EXECUTED 125ee2: 74 05 je 125ee9 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); 125ee4: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 125ee7: eb 2b jmp 125f14 <== NOT EXECUTED else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 125ee9: 0f b6 85 5b ff ff ff movzbl -0xa5(%ebp),%eax <== NOT EXECUTED 125ef0: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 125ef3: 0f b6 95 5c ff ff ff movzbl -0xa4(%ebp),%edx <== NOT EXECUTED 125efa: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 125efd: 09 d0 or %edx,%eax <== NOT EXECUTED 125eff: 0f b6 95 5a ff ff ff movzbl -0xa6(%ebp),%edx <== NOT EXECUTED 125f06: 09 d0 or %edx,%eax <== NOT EXECUTED 125f08: 0f b6 95 5d ff ff ff movzbl -0xa3(%ebp),%edx <== NOT EXECUTED 125f0f: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 125f12: 09 d0 or %edx,%eax <== NOT EXECUTED 125f14: 89 43 18 mov %eax,0x18(%ebx) <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 125f17: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 125f1b: 8b 4b 24 mov 0x24(%ebx),%ecx <== NOT EXECUTED 125f1e: 01 d1 add %edx,%ecx <== NOT EXECUTED 125f20: 0f b6 43 09 movzbl 0x9(%ebx),%eax <== NOT EXECUTED 125f24: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 125f28: 01 c1 add %eax,%ecx <== NOT EXECUTED 125f2a: 89 4b 30 mov %ecx,0x30(%ebx) <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 125f2d: 01 d0 add %edx,%eax <== NOT EXECUTED 125f2f: 89 43 1c mov %eax,0x1c(%ebx) <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 125f32: 0f b6 85 4a ff ff ff movzbl -0xb6(%ebp),%eax <== NOT EXECUTED 125f39: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 125f3c: 0f b6 95 49 ff ff ff movzbl -0xb7(%ebp),%edx <== NOT EXECUTED 125f43: 66 09 d0 or %dx,%ax <== NOT EXECUTED 125f46: 74 05 je 125f4d <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); 125f48: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 125f4b: eb 2b jmp 125f78 <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 125f4d: 0f b6 85 57 ff ff ff movzbl -0xa9(%ebp),%eax <== NOT EXECUTED 125f54: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 125f57: 0f b6 95 58 ff ff ff movzbl -0xa8(%ebp),%edx <== NOT EXECUTED 125f5e: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 125f61: 09 d0 or %edx,%eax <== NOT EXECUTED 125f63: 0f b6 95 56 ff ff ff movzbl -0xaa(%ebp),%edx <== NOT EXECUTED 125f6a: 09 d0 or %edx,%eax <== NOT EXECUTED 125f6c: 0f b6 95 59 ff ff ff movzbl -0xa7(%ebp),%edx <== NOT EXECUTED 125f73: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 125f76: 09 d0 or %edx,%eax <== NOT EXECUTED 125f78: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 125f7b: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 125f7e: 2b 43 30 sub 0x30(%ebx),%eax <== NOT EXECUTED 125f81: 0f b6 4b 04 movzbl 0x4(%ebx),%ecx <== NOT EXECUTED 125f85: 31 d2 xor %edx,%edx <== NOT EXECUTED 125f87: f7 f1 div %ecx <== NOT EXECUTED 125f89: 89 43 34 mov %eax,0x34(%ebx) <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 125f8c: 3d f4 0f 00 00 cmp $0xff4,%eax <== NOT EXECUTED 125f91: 77 14 ja 125fa7 <== NOT EXECUTED { vol->type = FAT_FAT12; 125f93: c6 43 0a 01 movb $0x1,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 125f97: c7 43 0c ff 0f 00 00 movl $0xfff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; 125f9e: c7 43 10 f8 0f 00 00 movl $0xff8,0x10(%ebx) <== NOT EXECUTED 125fa5: eb 2d jmp 125fd4 <== NOT EXECUTED } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 125fa7: 3d f4 ff 00 00 cmp $0xfff4,%eax <== NOT EXECUTED 125fac: 77 14 ja 125fc2 <== NOT EXECUTED { vol->type = FAT_FAT16; 125fae: c6 43 0a 02 movb $0x2,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 125fb2: c7 43 0c ff ff 00 00 movl $0xffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 125fb9: c7 43 10 f8 ff 00 00 movl $0xfff8,0x10(%ebx) <== NOT EXECUTED 125fc0: eb 12 jmp 125fd4 <== NOT EXECUTED } else { vol->type = FAT_FAT32; 125fc2: c6 43 0a 04 movb $0x4,0xa(%ebx) <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 125fc6: c7 43 0c ff ff ff 0f movl $0xfffffff,0xc(%ebx) <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 125fcd: c7 43 10 f8 ff ff 0f movl $0xffffff8,0x10(%ebx) <== NOT EXECUTED 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; register fat_vol_t *vol = &fs_info->vol; 125fd4: 80 7b 0a 04 cmpb $0x4,0xa(%ebx) <== NOT EXECUTED 125fd8: 0f 85 92 01 00 00 jne 126170 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 125fde: 0f b6 85 63 ff ff ff movzbl -0x9d(%ebp),%eax <== NOT EXECUTED 125fe5: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 125fe8: 0f b6 95 64 ff ff ff movzbl -0x9c(%ebp),%edx <== NOT EXECUTED 125fef: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 125ff2: 09 d0 or %edx,%eax <== NOT EXECUTED 125ff4: 0f b6 95 62 ff ff ff movzbl -0x9e(%ebp),%edx <== NOT EXECUTED 125ffb: 09 d0 or %edx,%eax <== NOT EXECUTED 125ffd: 0f b6 95 65 ff ff ff movzbl -0x9b(%ebp),%edx <== NOT EXECUTED 126004: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 126007: 09 d0 or %edx,%eax <== NOT EXECUTED 126009: 89 43 38 mov %eax,0x38(%ebx) <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 12600c: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 126012: 83 e0 80 and $0xffffff80,%eax <== NOT EXECUTED 126015: 88 43 48 mov %al,0x48(%ebx) <== NOT EXECUTED if (vol->mirror) 126018: 84 c0 test %al,%al <== NOT EXECUTED 12601a: 74 0e je 12602a <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 12601c: 8a 85 5e ff ff ff mov -0xa2(%ebp),%al <== NOT EXECUTED 126022: 83 e0 0f and $0xf,%eax <== NOT EXECUTED 126025: 88 43 50 mov %al,0x50(%ebx) <== NOT EXECUTED 126028: eb 04 jmp 12602e <== NOT EXECUTED else vol->afat = 0; 12602a: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 12602e: 0f b6 95 67 ff ff ff movzbl -0x99(%ebp),%edx <== NOT EXECUTED 126035: c1 e2 08 shl $0x8,%edx <== NOT EXECUTED 126038: 0f b6 85 66 ff ff ff movzbl -0x9a(%ebp),%eax <== NOT EXECUTED 12603f: 09 d0 or %edx,%eax <== NOT EXECUTED 126041: 66 89 43 3c mov %ax,0x3c(%ebx) <== NOT EXECUTED if( vol->info_sec == 0 ) 126045: 66 85 c0 test %ax,%ax <== NOT EXECUTED 126048: 75 05 jne 12604f <== NOT EXECUTED { rtems_disk_release(vol->dd); 12604a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12604d: eb 58 jmp 1260a7 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 12604f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126052: 8d 75 d8 lea -0x28(%ebp),%esi <== NOT EXECUTED 126055: 56 push %esi <== NOT EXECUTED 126056: 6a 04 push $0x4 <== NOT EXECUTED 126058: 6a 00 push $0x0 <== NOT EXECUTED 12605a: 0f b7 c0 movzwl %ax,%eax <== NOT EXECUTED 12605d: 50 push %eax <== NOT EXECUTED 12605e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 126061: e8 0c fc ff ff call 125c72 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 126066: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 126069: 85 c0 test %eax,%eax <== NOT EXECUTED 12606b: 79 05 jns 126072 <== NOT EXECUTED { rtems_disk_release(vol->dd); 12606d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126070: eb 7b jmp 1260ed <== NOT EXECUTED return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 126072: 0f b6 45 d9 movzbl -0x27(%ebp),%eax <== NOT EXECUTED 126076: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 126079: 0f b6 55 da movzbl -0x26(%ebp),%edx <== NOT EXECUTED 12607d: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126080: 09 d0 or %edx,%eax <== NOT EXECUTED 126082: 0f b6 55 d8 movzbl -0x28(%ebp),%edx <== NOT EXECUTED 126086: 09 d0 or %edx,%eax <== NOT EXECUTED 126088: 0f b6 55 db movzbl -0x25(%ebp),%edx <== NOT EXECUTED 12608c: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 12608f: 09 d0 or %edx,%eax <== NOT EXECUTED 126091: 3d 52 52 61 41 cmp $0x41615252,%eax <== NOT EXECUTED 126096: 74 27 je 1260bf <== 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); 126098: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12609b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12609e: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 1260a1: e8 c1 f5 ff ff call 125667 <== 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); 1260a6: 59 pop %ecx <== NOT EXECUTED 1260a7: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1260aa: e8 c5 5d fe ff call 10be74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 1260af: e8 e4 6c 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1260b4: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1260ba: e9 1c 02 00 00 jmp 1262db <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 1260bf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1260c2: 56 push %esi <== NOT EXECUTED 1260c3: 6a 0c push $0xc <== NOT EXECUTED 1260c5: 68 e4 01 00 00 push $0x1e4 <== NOT EXECUTED 1260ca: 0f b7 43 3c movzwl 0x3c(%ebx),%eax <== NOT EXECUTED 1260ce: 50 push %eax <== NOT EXECUTED 1260cf: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 1260d2: e8 9b fb ff ff call 125c72 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 1260d7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1260da: 85 c0 test %eax,%eax <== NOT EXECUTED 1260dc: 79 1c jns 1260fa <== 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); 1260de: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1260e1: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1260e4: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 1260e7: e8 7b f5 ff ff call 125667 <== 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); 1260ec: 5a pop %edx <== NOT EXECUTED 1260ed: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1260f0: e8 7f 5d fe ff call 10be74 <== NOT EXECUTED 1260f5: e9 e1 01 00 00 jmp 1262db <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 1260fa: 0f b6 45 dd movzbl -0x23(%ebp),%eax <== NOT EXECUTED 1260fe: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 126101: 0f b6 55 de movzbl -0x22(%ebp),%edx <== NOT EXECUTED 126105: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 126108: 09 d0 or %edx,%eax <== NOT EXECUTED 12610a: 0f b6 55 dc movzbl -0x24(%ebp),%edx <== NOT EXECUTED 12610e: 09 d0 or %edx,%eax <== NOT EXECUTED 126110: 0f b6 55 df movzbl -0x21(%ebp),%edx <== NOT EXECUTED 126114: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 126117: 09 d0 or %edx,%eax <== NOT EXECUTED 126119: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 12611c: 0f b6 45 e1 movzbl -0x1f(%ebp),%eax <== NOT EXECUTED 126120: c1 e0 08 shl $0x8,%eax <== NOT EXECUTED 126123: 0f b6 55 e2 movzbl -0x1e(%ebp),%edx <== NOT EXECUTED 126127: c1 e2 10 shl $0x10,%edx <== NOT EXECUTED 12612a: 09 d0 or %edx,%eax <== NOT EXECUTED 12612c: 0f b6 55 e0 movzbl -0x20(%ebp),%edx <== NOT EXECUTED 126130: 09 d0 or %edx,%eax <== NOT EXECUTED 126132: 0f b6 55 e3 movzbl -0x1d(%ebp),%edx <== NOT EXECUTED 126136: c1 e2 18 shl $0x18,%edx <== NOT EXECUTED 126139: 09 d0 or %edx,%eax <== NOT EXECUTED 12613b: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 12613e: 50 push %eax <== NOT EXECUTED 12613f: 6a ff push $0xffffffff <== NOT EXECUTED 126141: 6a ff push $0xffffffff <== NOT EXECUTED 126143: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 126146: e8 d3 f8 ff ff call 125a1e <== NOT EXECUTED 12614b: 89 c6 mov %eax,%esi <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 12614d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 126150: 85 c0 test %eax,%eax <== NOT EXECUTED 126152: 74 39 je 12618d <== 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); 126154: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126157: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 12615a: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 12615d: e8 05 f5 ff ff call 125667 <== 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); 126162: 5f pop %edi <== NOT EXECUTED 126163: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 126166: e8 09 5d fe ff call 10be74 <== NOT EXECUTED 12616b: e9 6e 01 00 00 jmp 1262de <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 126170: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) <== NOT EXECUTED vol->mirror = 0; 126177: c6 43 48 00 movb $0x0,0x48(%ebx) <== NOT EXECUTED vol->afat = 0; 12617b: c6 43 50 00 movb $0x0,0x50(%ebx) <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; 12617f: c7 43 40 ff ff ff ff movl $0xffffffff,0x40(%ebx) <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; 126186: c7 43 44 ff ff ff ff movl $0xffffffff,0x44(%ebx) <== 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); 12618d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126190: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 126193: ff 70 34 pushl 0x34(%eax) <== NOT EXECUTED 126196: e8 cc f4 ff ff call 125667 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 12619b: 0f b6 43 50 movzbl 0x50(%ebx),%eax <== NOT EXECUTED 12619f: 0f af 43 18 imul 0x18(%ebx),%eax <== NOT EXECUTED 1261a3: 0f b7 53 14 movzwl 0x14(%ebx),%edx <== NOT EXECUTED 1261a7: 01 d0 add %edx,%eax <== NOT EXECUTED 1261a9: 89 43 4c mov %eax,0x4c(%ebx) <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 1261ac: 5a pop %edx <== NOT EXECUTED 1261ad: 59 pop %ecx <== NOT EXECUTED 1261ae: 6a 0c push $0xc <== NOT EXECUTED 1261b0: 6a 02 push $0x2 <== NOT EXECUTED 1261b2: e8 15 68 fe ff call 10c9cc <== NOT EXECUTED 1261b7: 89 43 64 mov %eax,0x64(%ebx) <== NOT EXECUTED if ( fs_info->vhash == NULL ) 1261ba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1261bd: 85 c0 test %eax,%eax <== NOT EXECUTED 1261bf: 74 39 je 1261fa <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1261c1: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 1261c4: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 1261c6: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 1261cd: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); 1261d0: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1261d3: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 1261d6: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 1261d9: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 1261e0: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 1261e3: 50 push %eax <== NOT EXECUTED 1261e4: 50 push %eax <== NOT EXECUTED 1261e5: 6a 0c push $0xc <== NOT EXECUTED 1261e7: 6a 02 push $0x2 <== NOT EXECUTED 1261e9: e8 de 67 fe ff call 10c9cc <== NOT EXECUTED 1261ee: 89 43 68 mov %eax,0x68(%ebx) <== NOT EXECUTED if ( fs_info->rhash == NULL ) 1261f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1261f4: 85 c0 test %eax,%eax <== NOT EXECUTED 1261f6: 75 12 jne 12620a <== NOT EXECUTED 1261f8: eb 69 jmp 126263 <== 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); 1261fa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1261fd: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 126200: e8 6f 5c fe ff call 10be74 <== NOT EXECUTED 126205: e9 c6 00 00 00 jmp 1262d0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12620a: 8d 50 04 lea 0x4(%eax),%edx <== NOT EXECUTED 12620d: 89 10 mov %edx,(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 12620f: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 126216: 89 40 08 mov %eax,0x8(%eax) <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); 126219: 8d 50 0c lea 0xc(%eax),%edx <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12621c: 8d 48 10 lea 0x10(%eax),%ecx <== NOT EXECUTED 12621f: 89 48 0c mov %ecx,0xc(%eax) <== NOT EXECUTED the_chain->permanent_null = NULL; 126222: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 126229: 89 52 08 mov %edx,0x8(%edx) <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 12622c: c7 43 74 00 01 00 00 movl $0x100,0x74(%ebx) <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 126233: 0f b6 4b 03 movzbl 0x3(%ebx),%ecx <== NOT EXECUTED 126237: 8b 43 2c mov 0x2c(%ebx),%eax <== NOT EXECUTED 12623a: d3 e0 shl %cl,%eax <== NOT EXECUTED 12623c: c1 e0 04 shl $0x4,%eax <== NOT EXECUTED 12623f: 89 43 78 mov %eax,0x78(%ebx) <== NOT EXECUTED fs_info->index = 0; 126242: c7 43 70 00 00 00 00 movl $0x0,0x70(%ebx) <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 126249: 57 push %edi <== NOT EXECUTED 12624a: 57 push %edi <== NOT EXECUTED 12624b: 6a 01 push $0x1 <== NOT EXECUTED 12624d: 68 00 01 00 00 push $0x100 <== NOT EXECUTED 126252: e8 75 67 fe ff call 10c9cc <== NOT EXECUTED 126257: 89 43 6c mov %eax,0x6c(%ebx) <== NOT EXECUTED if ( fs_info->uino == NULL ) 12625a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 12625d: 85 c0 test %eax,%eax <== NOT EXECUTED 12625f: 75 2d jne 12628e <== NOT EXECUTED 126261: eb 11 jmp 126274 <== 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); 126263: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126266: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 126269: e8 06 5c fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 12626e: 5e pop %esi <== NOT EXECUTED 12626f: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 126272: eb 57 jmp 1262cb <== 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); 126274: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 126277: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 12627a: e8 f5 5b fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 12627f: 59 pop %ecx <== NOT EXECUTED 126280: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 126283: e8 14 6c fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 126288: 5a pop %edx <== NOT EXECUTED 126289: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 12628c: eb 3d jmp 1262cb <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 12628e: 50 push %eax <== NOT EXECUTED 12628f: 50 push %eax <== NOT EXECUTED 126290: 6a 01 push $0x1 <== NOT EXECUTED 126292: 0f b7 03 movzwl (%ebx),%eax <== NOT EXECUTED 126295: 50 push %eax <== NOT EXECUTED 126296: e8 31 67 fe ff call 10c9cc <== NOT EXECUTED 12629b: 89 83 88 00 00 00 mov %eax,0x88(%ebx) <== NOT EXECUTED if (fs_info->sec_buf == NULL) 1262a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1262a4: 31 f6 xor %esi,%esi <== NOT EXECUTED 1262a6: 85 c0 test %eax,%eax <== NOT EXECUTED 1262a8: 75 37 jne 1262e1 <== NOT EXECUTED { rtems_disk_release(vol->dd); 1262aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1262ad: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 1262b0: e8 bf 5b fe ff call 10be74 <== NOT EXECUTED free(fs_info->vhash); 1262b5: 5f pop %edi <== NOT EXECUTED 1262b6: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 1262b9: e8 de 6b fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 1262be: 5e pop %esi <== NOT EXECUTED 1262bf: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 1262c2: e8 d5 6b fe ff call 10ce9c <== NOT EXECUTED free(fs_info->uino); 1262c7: 59 pop %ecx <== NOT EXECUTED 1262c8: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 1262cb: e8 cc 6b fe ff call 10ce9c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 1262d0: e8 c3 6a 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1262d5: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 1262db: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 1262de: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return RC_OK; } 1262e1: 89 f0 mov %esi,%eax <== NOT EXECUTED 1262e3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1262e6: 5b pop %ebx <== NOT EXECUTED 1262e7: 5e pop %esi <== NOT EXECUTED 1262e8: 5f pop %edi <== NOT EXECUTED 1262e9: c9 leave <== NOT EXECUTED 1262ea: c3 ret <== NOT EXECUTED =============================================================================== 001255b7 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 1255b7: 55 push %ebp <== NOT EXECUTED 1255b8: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1255ba: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1255bd: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 1255c0: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 1255c3: 3b 50 78 cmp 0x78(%eax),%edx <== NOT EXECUTED 1255c6: 0f 93 c0 setae %al <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 1255c9: c9 leave <== NOT EXECUTED 1255ca: c3 ret <== NOT EXECUTED =============================================================================== 00139b2b : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 139b2b: 55 push %ebp <== NOT EXECUTED 139b2c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 139b2e: 57 push %edi <== NOT EXECUTED 139b2f: 56 push %esi <== NOT EXECUTED 139b30: 53 push %ebx <== NOT EXECUTED 139b31: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 139b34: 8b 55 14 mov 0x14(%ebp),%edx <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 139b37: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 139b3a: 8b 78 34 mov 0x34(%eax),%edi <== NOT EXECUTED uint32_t cl4find = 2; uint32_t next_cln = 0; 139b3d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 139b44: 8b 47 34 mov 0x34(%edi),%eax <== NOT EXECUTED 139b47: 83 c0 02 add $0x2,%eax <== NOT EXECUTED 139b4a: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 139b4d: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED if (count == 0) 139b53: 31 f6 xor %esi,%esi <== NOT EXECUTED 139b55: 83 7d 10 00 cmpl $0x0,0x10(%ebp) <== NOT EXECUTED 139b59: 0f 84 3f 01 00 00 je 139c9e <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 139b5f: 8b 5f 44 mov 0x44(%edi),%ebx <== NOT EXECUTED 139b62: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 139b65: 75 05 jne 139b6c <== NOT EXECUTED 139b67: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED 139b6c: c7 45 d4 02 00 00 00 movl $0x2,-0x2c(%ebp) <== NOT EXECUTED 139b73: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 139b75: 89 d6 mov %edx,%esi <== NOT EXECUTED 139b77: e9 f3 00 00 00 jmp 139c6f <== NOT EXECUTED * 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); 139b7c: 50 push %eax <== NOT EXECUTED 139b7d: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 139b80: 50 push %eax <== NOT EXECUTED 139b81: 53 push %ebx <== NOT EXECUTED 139b82: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139b85: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 139b88: e8 88 fd ff ff call 139915 <== NOT EXECUTED if ( rc != RC_OK ) 139b8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139b90: 85 c0 test %eax,%eax <== NOT EXECUTED 139b92: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 139b95: 74 0f je 139ba6 <== NOT EXECUTED 139b97: 89 f2 mov %esi,%edx <== NOT EXECUTED { if (*cls_added != 0) 139b99: 89 c6 mov %eax,%esi <== NOT EXECUTED 139b9b: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 139b9e: 0f 84 fa 00 00 00 je 139c9e <== NOT EXECUTED 139ba4: eb 49 jmp 139bef <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 139ba6: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) <== NOT EXECUTED 139baa: 0f 85 b1 00 00 00 jne 139c61 <== NOT EXECUTED /* * 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) 139bb0: 83 3e 00 cmpl $0x0,(%esi) <== NOT EXECUTED 139bb3: 75 1f jne 139bd4 <== NOT EXECUTED { *chain = cl4find; 139bb5: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 139bb8: 89 18 mov %ebx,(%eax) <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 139bba: 52 push %edx <== NOT EXECUTED 139bbb: 6a ff push $0xffffffff <== NOT EXECUTED 139bbd: 53 push %ebx <== NOT EXECUTED 139bbe: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139bc1: e8 36 fb ff ff call 1396fc <== NOT EXECUTED if ( rc != RC_OK ) 139bc6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139bc9: 85 c0 test %eax,%eax <== NOT EXECUTED 139bcb: 74 71 je 139c3e <== NOT EXECUTED 139bcd: 89 c6 mov %eax,%esi <== NOT EXECUTED 139bcf: e9 ca 00 00 00 jmp 139c9e <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 139bd4: 50 push %eax <== NOT EXECUTED 139bd5: 6a ff push $0xffffffff <== NOT EXECUTED 139bd7: 53 push %ebx <== NOT EXECUTED 139bd8: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139bdb: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 139bde: e8 19 fb ff ff call 1396fc <== NOT EXECUTED if ( rc != RC_OK ) 139be3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139be6: 85 c0 test %eax,%eax <== NOT EXECUTED 139be8: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 139beb: 74 16 je 139c03 <== NOT EXECUTED 139bed: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 139bef: 52 push %edx <== NOT EXECUTED 139bf0: 52 push %edx <== NOT EXECUTED 139bf1: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 139bf4: ff 30 pushl (%eax) <== NOT EXECUTED 139bf6: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139bf9: e8 81 fe ff ff call 139a7f <== NOT EXECUTED 139bfe: e9 98 00 00 00 jmp 139c9b <== NOT EXECUTED return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 139c03: 50 push %eax <== NOT EXECUTED 139c04: 53 push %ebx <== NOT EXECUTED 139c05: 51 push %ecx <== NOT EXECUTED 139c06: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139c09: e8 ee fa ff ff call 1396fc <== NOT EXECUTED if ( rc != RC_OK ) 139c0e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139c11: 85 c0 test %eax,%eax <== NOT EXECUTED 139c13: 74 29 je 139c3e <== NOT EXECUTED 139c15: 89 c6 mov %eax,%esi <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 139c17: 51 push %ecx <== NOT EXECUTED 139c18: 51 push %ecx <== NOT EXECUTED 139c19: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 139c1c: ff 30 pushl (%eax) <== NOT EXECUTED 139c1e: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139c21: e8 59 fe ff ff call 139a7f <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 139c26: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 139c29: 6a 00 push $0x0 <== NOT EXECUTED 139c2b: 53 push %ebx <== NOT EXECUTED 139c2c: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 139c2f: e8 c8 fa ff ff call 1396fc <== NOT EXECUTED fat_buf_release(fs_info); 139c34: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 139c37: e8 2b ba fe ff call 125667 <== NOT EXECUTED 139c3c: eb 5d jmp 139c9b <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 139c3e: 8b 06 mov (%esi),%eax <== NOT EXECUTED 139c40: 40 inc %eax <== NOT EXECUTED 139c41: 89 06 mov %eax,(%esi) <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 139c43: 3b 45 10 cmp 0x10(%ebp),%eax <== NOT EXECUTED 139c46: 75 17 jne 139c5f <== NOT EXECUTED { fs_info->vol.next_cl = save_cln; 139c48: 89 5f 44 mov %ebx,0x44(%edi) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 139c4b: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED 139c4e: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 139c51: 74 05 je 139c58 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 139c53: 2b 06 sub (%esi),%eax <== NOT EXECUTED 139c55: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED *last_cl = save_cln; 139c58: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 139c5b: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 139c5d: eb 31 jmp 139c90 <== NOT EXECUTED fat_buf_release(fs_info); return rc; 139c5f: 89 d9 mov %ebx,%ecx <== NOT EXECUTED } } i++; cl4find++; 139c61: 43 inc %ebx <== NOT EXECUTED if (cl4find >= data_cls_val) 139c62: 3b 5d d0 cmp -0x30(%ebp),%ebx <== NOT EXECUTED 139c65: 72 05 jb 139c6c <== NOT EXECUTED 139c67: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 139c6c: ff 45 d4 incl -0x2c(%ebp) <== 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) 139c6f: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 139c72: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 139c75: 0f 82 01 ff ff ff jb 139b7c <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 139c7b: 89 4f 44 mov %ecx,0x44(%edi) <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 139c7e: 8b 47 40 mov 0x40(%edi),%eax <== NOT EXECUTED 139c81: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 139c84: 74 05 je 139c8b <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 139c86: 2b 06 sub (%esi),%eax <== NOT EXECUTED 139c88: 89 47 40 mov %eax,0x40(%edi) <== NOT EXECUTED *last_cl = save_cln; 139c8b: 8b 45 18 mov 0x18(%ebp),%eax <== NOT EXECUTED 139c8e: 89 08 mov %ecx,(%eax) <== NOT EXECUTED fat_buf_release(fs_info); 139c90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 139c93: 57 push %edi <== NOT EXECUTED 139c94: e8 ce b9 fe ff call 125667 <== NOT EXECUTED 139c99: 31 f6 xor %esi,%esi <== NOT EXECUTED return RC_OK; 139c9b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 139c9e: 89 f0 mov %esi,%eax <== NOT EXECUTED 139ca0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 139ca3: 5b pop %ebx <== NOT EXECUTED 139ca4: 5e pop %esi <== NOT EXECUTED 139ca5: 5f pop %edi <== NOT EXECUTED 139ca6: c9 leave <== NOT EXECUTED 139ca7: c3 ret <== NOT EXECUTED =============================================================================== 001396fc : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 1396fc: 55 push %ebp <== NOT EXECUTED 1396fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1396ff: 57 push %edi <== NOT EXECUTED 139700: 56 push %esi <== NOT EXECUTED 139701: 53 push %ebx <== NOT EXECUTED 139702: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 139705: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 139708: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 13970b: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 13970e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 139715: 83 fe 01 cmp $0x1,%esi <== NOT EXECUTED 139718: 0f 86 e1 01 00 00 jbe 1398ff <== NOT EXECUTED 13971e: 8b 43 34 mov 0x34(%ebx),%eax <== NOT EXECUTED 139721: 40 inc %eax <== NOT EXECUTED 139722: 39 c6 cmp %eax,%esi <== NOT EXECUTED 139724: 0f 87 d5 01 00 00 ja 1398ff <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 13972a: 0f b6 43 0a movzbl 0xa(%ebx),%eax <== NOT EXECUTED 13972e: 89 c2 mov %eax,%edx <== NOT EXECUTED 139730: 83 e2 01 and $0x1,%edx <== NOT EXECUTED 139733: 74 08 je 13973d <== NOT EXECUTED 139735: 89 f7 mov %esi,%edi <== NOT EXECUTED 139737: d1 ef shr %edi <== NOT EXECUTED 139739: 01 f7 add %esi,%edi <== NOT EXECUTED 13973b: eb 0e jmp 13974b <== NOT EXECUTED 13973d: 8d 3c 36 lea (%esi,%esi,1),%edi <== NOT EXECUTED 139740: a8 02 test $0x2,%al <== NOT EXECUTED 139742: 75 07 jne 13974b <== NOT EXECUTED 139744: 8d 3c b5 00 00 00 00 lea 0x0(,%esi,4),%edi <== NOT EXECUTED 13974b: 0f b6 4b 02 movzbl 0x2(%ebx),%ecx <== NOT EXECUTED 13974f: d3 ef shr %cl,%edi <== NOT EXECUTED 139751: 03 7b 4c add 0x4c(%ebx),%edi <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 139754: 85 d2 test %edx,%edx <== NOT EXECUTED 139756: 74 08 je 139760 <== NOT EXECUTED 139758: 89 f2 mov %esi,%edx <== NOT EXECUTED 13975a: d1 ea shr %edx <== NOT EXECUTED 13975c: 01 f2 add %esi,%edx <== NOT EXECUTED 13975e: eb 0e jmp 13976e <== NOT EXECUTED 139760: 8d 14 36 lea (%esi,%esi,1),%edx <== NOT EXECUTED 139763: a8 02 test $0x2,%al <== NOT EXECUTED 139765: 75 07 jne 13976e <== NOT EXECUTED 139767: 8d 14 b5 00 00 00 00 lea 0x0(,%esi,4),%edx <== NOT EXECUTED 13976e: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 139770: 66 89 45 d6 mov %ax,-0x2a(%ebp) <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 139774: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 139777: 51 push %ecx <== NOT EXECUTED 139778: 6a 01 push $0x1 <== NOT EXECUTED 13977a: 57 push %edi <== NOT EXECUTED 13977b: 53 push %ebx <== NOT EXECUTED 13977c: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 13977f: e8 2a c0 fe ff call 1257ae <== NOT EXECUTED if (rc != RC_OK) 139784: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139787: 85 c0 test %eax,%eax <== NOT EXECUTED 139789: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 13978c: 0f 85 7b 01 00 00 jne 13990d <== NOT EXECUTED 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); 139792: 0f b7 4d d6 movzwl -0x2a(%ebp),%ecx <== NOT EXECUTED 139796: 49 dec %ecx <== NOT EXECUTED 139797: 21 d1 and %edx,%ecx <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 139799: 8a 53 0a mov 0xa(%ebx),%dl <== NOT EXECUTED 13979c: 80 fa 02 cmp $0x2,%dl <== NOT EXECUTED 13979f: 0f 84 2b 01 00 00 je 1398d0 <== NOT EXECUTED 1397a5: 80 fa 04 cmp $0x4,%dl <== NOT EXECUTED 1397a8: 0f 84 31 01 00 00 je 1398df <== NOT EXECUTED 1397ae: fe ca dec %dl <== NOT EXECUTED 1397b0: 0f 85 49 01 00 00 jne 1398ff <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 1397b6: 83 e6 01 and $0x1,%esi <== NOT EXECUTED 1397b9: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1397bc: 0f 84 89 00 00 00 je 13984b <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 1397c2: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 1397c5: c1 e6 04 shl $0x4,%esi <== NOT EXECUTED 1397c8: 66 89 75 d6 mov %si,-0x2a(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 1397cc: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1397cf: 01 ca add %ecx,%edx <== 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)) = 1397d1: 80 22 0f andb $0xf,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 1397d4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1397d7: 8b 72 20 mov 0x20(%edx),%esi <== NOT EXECUTED 1397da: 01 ce add %ecx,%esi <== NOT EXECUTED 1397dc: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED { 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)) = 1397df: 8a 55 d6 mov -0x2a(%ebp),%dl <== NOT EXECUTED 1397e2: 08 16 or %dl,(%esi) <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 1397e4: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 1397eb: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 1397ee: 4a dec %edx <== NOT EXECUTED 1397ef: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1397f1: 75 35 jne 139828 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 1397f3: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 1397f6: 51 push %ecx <== NOT EXECUTED 1397f7: 6a 01 push $0x1 <== NOT EXECUTED 1397f9: 47 inc %edi <== NOT EXECUTED 1397fa: 57 push %edi <== NOT EXECUTED 1397fb: 53 push %ebx <== NOT EXECUTED 1397fc: e8 ad bf fe ff call 1257ae <== NOT EXECUTED &block0); if (rc != RC_OK) 139801: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 139804: 85 c0 test %eax,%eax <== NOT EXECUTED 139806: 0f 85 01 01 00 00 jne 13990d <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 13980c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13980f: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 139812: c6 02 00 movb $0x0,(%edx) <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 139815: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 139818: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 13981b: 66 8b 4d d6 mov -0x2a(%ebp),%cx <== NOT EXECUTED 13981f: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 139823: e9 83 00 00 00 jmp 1398ab <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 139828: 8d 51 01 lea 0x1(%ecx),%edx <== NOT EXECUTED 13982b: 8b 5d e4 mov -0x1c(%ebp),%ebx <== NOT EXECUTED 13982e: 8b 5b 20 mov 0x20(%ebx),%ebx <== NOT EXECUTED 139831: c6 44 0b 01 00 movb $0x0,0x1(%ebx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 139836: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 139839: 03 51 20 add 0x20(%ecx),%edx <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 13983c: 66 8b 4d d6 mov -0x2a(%ebp),%cx <== NOT EXECUTED 139840: 66 c1 e9 08 shr $0x8,%cx <== NOT EXECUTED 139844: 08 0a or %cl,(%edx) <== NOT EXECUTED 139846: e9 c2 00 00 00 jmp 13990d <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 13984b: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 13984e: 66 81 e6 ff 0f and $0xfff,%si <== NOT EXECUTED 139853: 66 89 75 d6 mov %si,-0x2a(%ebp) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 139857: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 13985a: c6 04 0a 00 movb $0x0,(%edx,%ecx,1) <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 13985e: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 139861: 8b 72 20 mov 0x20(%edx),%esi <== NOT EXECUTED 139864: 01 ce add %ecx,%esi <== NOT EXECUTED 139866: 89 75 c4 mov %esi,-0x3c(%ebp) <== NOT EXECUTED else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 139869: 8a 55 d6 mov -0x2a(%ebp),%dl <== NOT EXECUTED 13986c: 08 16 or %dl,(%esi) <== NOT EXECUTED 13986e: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 139875: 0f b7 13 movzwl (%ebx),%edx <== NOT EXECUTED 139878: 4a dec %edx <== NOT EXECUTED 139879: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 13987b: 75 32 jne 1398af <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 13987d: 8d 4d e4 lea -0x1c(%ebp),%ecx <== NOT EXECUTED 139880: 51 push %ecx <== NOT EXECUTED 139881: 6a 01 push $0x1 <== NOT EXECUTED 139883: 47 inc %edi <== NOT EXECUTED 139884: 57 push %edi <== NOT EXECUTED 139885: 53 push %ebx <== NOT EXECUTED 139886: e8 23 bf fe ff call 1257ae <== NOT EXECUTED &block0); if (rc != RC_OK) 13988b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13988e: 85 c0 test %eax,%eax <== NOT EXECUTED 139890: 75 7b jne 13990d <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 139892: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 139895: 8b 52 20 mov 0x20(%edx),%edx <== 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)) = 139898: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 13989b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 13989e: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 1398a1: 66 8b 75 d6 mov -0x2a(%ebp),%si <== NOT EXECUTED 1398a5: 66 c1 ee 08 shr $0x8,%si <== NOT EXECUTED 1398a9: 89 f1 mov %esi,%ecx <== NOT EXECUTED 1398ab: 08 0a or %cl,(%edx) <== NOT EXECUTED 1398ad: eb 47 jmp 1398f6 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 1398af: 41 inc %ecx <== NOT EXECUTED 1398b0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1398b3: 8b 5a 20 mov 0x20(%edx),%ebx <== NOT EXECUTED 1398b6: 8d 14 19 lea (%ecx,%ebx,1),%edx <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 1398b9: 80 22 f0 andb $0xf0,(%edx) <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 1398bc: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1398bf: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 1398c2: 66 8b 75 d6 mov -0x2a(%ebp),%si <== NOT EXECUTED 1398c6: 66 c1 ee 08 shr $0x8,%si <== NOT EXECUTED 1398ca: 89 f2 mov %esi,%edx <== NOT EXECUTED 1398cc: 08 11 or %dl,(%ecx) <== NOT EXECUTED 1398ce: eb 3d jmp 13990d <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 1398d0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1398d3: 8b 52 20 mov 0x20(%edx),%edx <== NOT EXECUTED 1398d6: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 1398d9: 66 89 34 0a mov %si,(%edx,%ecx,1) <== NOT EXECUTED 1398dd: eb 17 jmp 1398f6 <== NOT EXECUTED 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)); 1398df: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 1398e2: 03 4a 20 add 0x20(%edx),%ecx <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 1398e5: 81 21 00 00 00 f0 andl $0xf0000000,(%ecx) <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 1398eb: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 1398ee: 81 e6 ff ff ff 0f and $0xfffffff,%esi <== NOT EXECUTED 1398f4: 09 31 or %esi,(%ecx) <== NOT EXECUTED 1398f6: c6 83 80 00 00 00 01 movb $0x1,0x80(%ebx) <== NOT EXECUTED 1398fd: eb 0e jmp 13990d <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 1398ff: e8 94 34 00 00 call 13cd98 <__errno> <== NOT EXECUTED 139904: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 13990a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED break; } return RC_OK; } 13990d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 139910: 5b pop %ebx <== NOT EXECUTED 139911: 5e pop %esi <== NOT EXECUTED 139912: 5f pop %edi <== NOT EXECUTED 139913: c9 leave <== NOT EXECUTED 139914: c3 ret <== NOT EXECUTED =============================================================================== 00125a82 : * 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) { 125a82: 55 push %ebp <== NOT EXECUTED 125a83: 89 e5 mov %esp,%ebp <== NOT EXECUTED 125a85: 57 push %edi <== NOT EXECUTED 125a86: 56 push %esi <== NOT EXECUTED 125a87: 53 push %ebx <== NOT EXECUTED 125a88: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 125a8b: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 125a8e: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 125a91: 31 f6 xor %esi,%esi <== NOT EXECUTED 125a93: f6 43 0a 04 testb $0x4,0xa(%ebx) <== NOT EXECUTED 125a97: 74 19 je 125ab2 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 125a99: 52 push %edx <== NOT EXECUTED 125a9a: ff 73 44 pushl 0x44(%ebx) <== NOT EXECUTED 125a9d: ff 73 40 pushl 0x40(%ebx) <== NOT EXECUTED 125aa0: 50 push %eax <== NOT EXECUTED 125aa1: e8 78 ff ff ff call 125a1e <== NOT EXECUTED 125aa6: 89 c6 mov %eax,%esi <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 125aa8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125aab: 85 c0 test %eax,%eax <== NOT EXECUTED 125aad: 74 03 je 125ab2 <== NOT EXECUTED 125aaf: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 125ab2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125ab5: 53 push %ebx <== NOT EXECUTED 125ab6: e8 ac fb ff ff call 125667 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 125abb: 59 pop %ecx <== NOT EXECUTED 125abc: 5f pop %edi <== NOT EXECUTED 125abd: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 125ac0: ff 73 54 pushl 0x54(%ebx) <== NOT EXECUTED 125ac3: e8 5a 3c fe ff call 109722 <== NOT EXECUTED 125ac8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125acb: 85 c0 test %eax,%eax <== NOT EXECUTED 125acd: 74 03 je 125ad2 <== NOT EXECUTED 125acf: 83 ce ff or $0xffffffff,%esi <== NOT EXECUTED 125ad2: 31 ff xor %edi,%edi <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 125ad4: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 125ad7: 01 f8 add %edi,%eax <== NOT EXECUTED 125ad9: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 125adc: eb 0c jmp 125aea <== NOT EXECUTED free(node); 125ade: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125ae1: 50 push %eax <== NOT EXECUTED 125ae2: e8 b5 73 fe ff call 10ce9c <== NOT EXECUTED 125ae7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 125aea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125aed: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125af0: e8 6b bb fe ff call 111660 <_Chain_Get> <== 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 ) 125af5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125af8: 85 c0 test %eax,%eax <== NOT EXECUTED 125afa: 75 e2 jne 125ade <== NOT EXECUTED 125afc: 83 c7 0c add $0xc,%edi <== 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++) 125aff: 83 ff 18 cmp $0x18,%edi <== NOT EXECUTED 125b02: 75 d0 jne 125ad4 <== NOT EXECUTED 125b04: 66 31 ff xor %di,%di <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 125b07: 8b 43 68 mov 0x68(%ebx),%eax <== NOT EXECUTED 125b0a: 01 f8 add %edi,%eax <== NOT EXECUTED 125b0c: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 125b0f: eb 0c jmp 125b1d <== NOT EXECUTED free(node); 125b11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b14: 50 push %eax <== NOT EXECUTED 125b15: e8 82 73 fe ff call 10ce9c <== NOT EXECUTED 125b1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125b1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b20: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 125b23: e8 38 bb fe ff call 111660 <_Chain_Get> <== 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 ) 125b28: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125b2b: 85 c0 test %eax,%eax <== NOT EXECUTED 125b2d: 75 e2 jne 125b11 <== NOT EXECUTED 125b2f: 83 c7 0c add $0xc,%edi <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 125b32: 83 ff 18 cmp $0x18,%edi <== NOT EXECUTED 125b35: 75 d0 jne 125b07 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 125b37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 125b3a: ff 73 64 pushl 0x64(%ebx) <== NOT EXECUTED 125b3d: e8 5a 73 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->rhash); 125b42: 5a pop %edx <== NOT EXECUTED 125b43: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 125b46: e8 51 73 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->uino); 125b4b: 58 pop %eax <== NOT EXECUTED 125b4c: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 125b4f: e8 48 73 fe ff call 10ce9c <== NOT EXECUTED free(fs_info->sec_buf); 125b54: 5f pop %edi <== NOT EXECUTED 125b55: ff b3 88 00 00 00 pushl 0x88(%ebx) <== NOT EXECUTED 125b5b: e8 3c 73 fe ff call 10ce9c <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 125b60: 59 pop %ecx <== NOT EXECUTED 125b61: ff 73 5c pushl 0x5c(%ebx) <== NOT EXECUTED 125b64: e8 0b 63 fe ff call 10be74 <== NOT EXECUTED if (rc) 125b69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 125b6c: 85 f6 test %esi,%esi <== NOT EXECUTED 125b6e: 74 0b je 125b7b <== NOT EXECUTED errno = EIO; 125b70: e8 23 72 01 00 call 13cd98 <__errno> <== NOT EXECUTED 125b75: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED return rc; } 125b7b: 89 f0 mov %esi,%eax <== NOT EXECUTED 125b7d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 125b80: 5b pop %ebx <== NOT EXECUTED 125b81: 5e pop %esi <== NOT EXECUTED 125b82: 5f pop %edi <== NOT EXECUTED 125b83: c9 leave <== NOT EXECUTED 125b84: c3 ret <== NOT EXECUTED =============================================================================== 0013a038 : #include int fchdir( int fd ) { 13a038: 55 push %ebp <== NOT EXECUTED 13a039: 89 e5 mov %esp,%ebp <== NOT EXECUTED 13a03b: 57 push %edi <== NOT EXECUTED 13a03c: 56 push %esi <== NOT EXECUTED 13a03d: 53 push %ebx <== NOT EXECUTED 13a03e: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 13a041: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 13a044: 3b 1d 44 01 16 00 cmp 0x160144,%ebx <== NOT EXECUTED 13a04a: 73 0f jae 13a05b <== NOT EXECUTED iop = rtems_libio_iop( fd ); 13a04c: c1 e3 06 shl $0x6,%ebx <== NOT EXECUTED 13a04f: 03 1d 54 7a 16 00 add 0x167a54,%ebx <== NOT EXECUTED rtems_libio_check_is_open(iop); 13a055: f6 43 15 01 testb $0x1,0x15(%ebx) <== NOT EXECUTED 13a059: 75 10 jne 13a06b <== NOT EXECUTED 13a05b: e8 38 2d 00 00 call 13cd98 <__errno> <== NOT EXECUTED 13a060: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13a066: e9 83 00 00 00 jmp 13a0ee <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 13a06b: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 13a06e: 85 c0 test %eax,%eax <== NOT EXECUTED 13a070: 74 07 je 13a079 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 13a072: 8b 40 10 mov 0x10(%eax),%eax <== NOT EXECUTED 13a075: 85 c0 test %eax,%eax <== NOT EXECUTED 13a077: 75 0d jne 13a086 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 13a079: e8 1a 2d 00 00 call 13cd98 <__errno> <== NOT EXECUTED 13a07e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 13a084: eb 68 jmp 13a0ee <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 13a086: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a089: 83 c3 18 add $0x18,%ebx <== NOT EXECUTED 13a08c: 53 push %ebx <== NOT EXECUTED 13a08d: ff d0 call *%eax <== NOT EXECUTED 13a08f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 13a092: 48 dec %eax <== NOT EXECUTED 13a093: 74 0d je 13a0a2 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 13a095: e8 fe 2c 00 00 call 13cd98 <__errno> <== NOT EXECUTED 13a09a: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 13a0a0: eb 4c jmp 13a0ee <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 13a0a2: a1 fc 21 16 00 mov 0x1621fc,%eax <== NOT EXECUTED 13a0a7: 8d 7d c0 lea -0x40(%ebp),%edi <== NOT EXECUTED 13a0aa: 8d 70 04 lea 0x4(%eax),%esi <== NOT EXECUTED 13a0ad: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13a0b2: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 13a0b4: 8d 78 04 lea 0x4(%eax),%edi <== NOT EXECUTED 13a0b7: b1 05 mov $0x5,%cl <== NOT EXECUTED 13a0b9: 89 de mov %ebx,%esi <== NOT EXECUTED 13a0bb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 13a0bd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a0c0: 6a 00 push $0x0 <== NOT EXECUTED 13a0c2: 8d 45 d4 lea -0x2c(%ebp),%eax <== NOT EXECUTED 13a0c5: 50 push %eax <== NOT EXECUTED 13a0c6: 6a 00 push $0x0 <== NOT EXECUTED 13a0c8: 6a 01 push $0x1 <== NOT EXECUTED 13a0ca: 68 fe 74 15 00 push $0x1574fe <== NOT EXECUTED 13a0cf: e8 5d 2d fd ff call 10ce31 <== NOT EXECUTED 13a0d4: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 13a0d7: 85 c0 test %eax,%eax <== NOT EXECUTED 13a0d9: 74 18 je 13a0f3 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 13a0db: 8b 3d fc 21 16 00 mov 0x1621fc,%edi <== NOT EXECUTED 13a0e1: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13a0e4: 8d 75 c0 lea -0x40(%ebp),%esi <== NOT EXECUTED 13a0e7: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13a0ec: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13a0ee: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 13a0f1: eb 2f jmp 13a122 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 13a0f3: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 13a0f6: 85 c0 test %eax,%eax <== NOT EXECUTED 13a0f8: 74 13 je 13a10d <== NOT EXECUTED 13a0fa: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 13a0fd: 85 c0 test %eax,%eax <== NOT EXECUTED 13a0ff: 74 0c je 13a10d <== NOT EXECUTED 13a101: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 13a104: 8d 55 c0 lea -0x40(%ebp),%edx <== NOT EXECUTED 13a107: 52 push %edx <== NOT EXECUTED 13a108: ff d0 call *%eax <== NOT EXECUTED 13a10a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_current = loc; 13a10d: 8b 3d fc 21 16 00 mov 0x1621fc,%edi <== NOT EXECUTED 13a113: 83 c7 04 add $0x4,%edi <== NOT EXECUTED 13a116: 8d 75 d4 lea -0x2c(%ebp),%esi <== NOT EXECUTED 13a119: b9 05 00 00 00 mov $0x5,%ecx <== NOT EXECUTED 13a11e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) <== NOT EXECUTED 13a120: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; } 13a122: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 13a125: 5b pop %ebx <== NOT EXECUTED 13a126: 5e pop %esi <== NOT EXECUTED 13a127: 5f pop %edi <== NOT EXECUTED 13a128: c9 leave <== NOT EXECUTED 13a129: c3 ret <== NOT EXECUTED =============================================================================== 00127c54 : int fchmod( int fd, mode_t mode ) { 127c54: 55 push %ebp <== NOT EXECUTED 127c55: 89 e5 mov %esp,%ebp <== NOT EXECUTED 127c57: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 127c5a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 127c5d: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 127c60: 3b 05 44 01 16 00 cmp 0x160144,%eax <== NOT EXECUTED 127c66: 73 0f jae 127c77 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 127c68: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 127c6b: 03 05 54 7a 16 00 add 0x167a54,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 127c71: f6 40 15 01 testb $0x1,0x15(%eax) <== NOT EXECUTED 127c75: 75 0d jne 127c84 <== NOT EXECUTED 127c77: e8 1c 51 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127c7c: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 127c82: eb 28 jmp 127cac <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 127c84: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 127c87: 83 7a 1c 00 cmpl $0x0,0x1c(%edx) <== NOT EXECUTED 127c8b: 75 0d jne 127c9a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127c8d: e8 06 51 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127c92: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127c98: eb 12 jmp 127cac <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 127c9a: 8b 50 20 mov 0x20(%eax),%edx <== NOT EXECUTED 127c9d: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 127ca0: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 127ca3: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 127ca6: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED } 127ca9: c9 leave <== NOT EXECUTED * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 127caa: ff e0 jmp *%eax <== NOT EXECUTED } 127cac: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 127caf: c9 leave <== NOT EXECUTED 127cb0: c3 ret <== NOT EXECUTED =============================================================================== 00127cb4 : int fchown( int fd, uid_t owner, gid_t group ) { 127cb4: 55 push %ebp <== NOT EXECUTED 127cb5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 127cb7: 53 push %ebx <== NOT EXECUTED 127cb8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 127cbb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 127cbe: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 127cc1: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 127cc4: 3b 05 44 01 16 00 cmp 0x160144,%eax <== NOT EXECUTED 127cca: 73 11 jae 127cdd <== NOT EXECUTED iop = rtems_libio_iop( fd ); 127ccc: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 127ccf: 03 05 54 7a 16 00 add 0x167a54,%eax <== NOT EXECUTED rtems_libio_check_is_open(iop); 127cd5: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED 127cd8: f6 c6 01 test $0x1,%dh <== NOT EXECUTED 127cdb: 75 0d jne 127cea <== NOT EXECUTED 127cdd: e8 b6 50 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127ce2: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 127ce8: eb 40 jmp 127d2a <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 127cea: 80 e2 04 and $0x4,%dl <== NOT EXECUTED 127ced: 75 0d jne 127cfc <== NOT EXECUTED 127cef: e8 a4 50 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127cf4: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 127cfa: eb 2e jmp 127d2a <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 127cfc: 8b 50 24 mov 0x24(%eax),%edx <== NOT EXECUTED 127cff: 8b 52 18 mov 0x18(%edx),%edx <== NOT EXECUTED 127d02: 85 d2 test %edx,%edx <== NOT EXECUTED 127d04: 75 0d jne 127d13 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 127d06: e8 8d 50 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127d0b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 127d11: eb 17 jmp 127d2a <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 127d13: 0f b7 db movzwl %bx,%ebx <== NOT EXECUTED 127d16: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 127d19: 0f b7 c9 movzwl %cx,%ecx <== NOT EXECUTED 127d1c: 89 4d 0c mov %ecx,0xc(%ebp) <== NOT EXECUTED 127d1f: 83 c0 18 add $0x18,%eax <== NOT EXECUTED 127d22: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 127d25: 59 pop %ecx <== NOT EXECUTED 127d26: 5b pop %ebx <== NOT EXECUTED 127d27: c9 leave <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 127d28: ff e2 jmp *%edx <== NOT EXECUTED } 127d2a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 127d2d: 5a pop %edx <== NOT EXECUTED 127d2e: 5b pop %ebx <== NOT EXECUTED 127d2f: c9 leave <== NOT EXECUTED 127d30: c3 ret <== NOT EXECUTED =============================================================================== 0013a12c : int fcntl( int fd, int cmd, ... ) { 13a12c: 55 push %ebp 13a12d: 89 e5 mov %esp,%ebp 13a12f: 57 push %edi 13a130: 56 push %esi 13a131: 53 push %ebx 13a132: 83 ec 0c sub $0xc,%esp 13a135: 8b 5d 08 mov 0x8(%ebp),%ebx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 13a138: 8d 55 10 lea 0x10(%ebp),%edx int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 13a13b: 8b 0d 44 01 16 00 mov 0x160144,%ecx 13a141: 39 cb cmp %ecx,%ebx 13a143: 73 16 jae 13a15b <== NEVER TAKEN iop = rtems_libio_iop( fd ); 13a145: a1 54 7a 16 00 mov 0x167a54,%eax 13a14a: c1 e3 06 shl $0x6,%ebx 13a14d: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 13a150: 8b 73 14 mov 0x14(%ebx),%esi 13a153: f7 c6 00 01 00 00 test $0x100,%esi 13a159: 75 10 jne 13a16b <== ALWAYS TAKEN 13a15b: e8 38 2c 00 00 call 13cd98 <__errno> <== NOT EXECUTED 13a160: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 13a166: e9 fe 00 00 00 jmp 13a269 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 13a16b: 83 7d 0c 09 cmpl $0x9,0xc(%ebp) 13a16f: 0f 87 c1 00 00 00 ja 13a236 13a175: 8b 7d 0c mov 0xc(%ebp),%edi 13a178: ff 24 bd a8 d7 15 00 jmp *0x15d7a8(,%edi,4) case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 13a17f: 8b 32 mov (%edx),%esi if ( fd2 ) 13a181: 85 f6 test %esi,%esi 13a183: 74 10 je 13a195 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 13a185: 31 d2 xor %edx,%edx <== NOT EXECUTED 13a187: 39 ce cmp %ecx,%esi <== NOT EXECUTED 13a189: 73 1c jae 13a1a7 <== NOT EXECUTED 13a18b: 89 f2 mov %esi,%edx <== NOT EXECUTED 13a18d: c1 e2 06 shl $0x6,%edx <== NOT EXECUTED 13a190: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 13a193: eb 12 jmp 13a1a7 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 13a195: e8 49 30 fd ff call 10d1e3 13a19a: 89 c2 mov %eax,%edx if ( diop == 0 ) { 13a19c: 83 ce ff or $0xffffffff,%esi 13a19f: 85 c0 test %eax,%eax 13a1a1: 0f 84 c5 00 00 00 je 13a26c <== NEVER TAKEN ret = -1; break; } } diop->handlers = iop->handlers; 13a1a7: 8b 43 3c mov 0x3c(%ebx),%eax 13a1aa: 89 42 3c mov %eax,0x3c(%edx) diop->file_info = iop->file_info; 13a1ad: 8b 43 38 mov 0x38(%ebx),%eax 13a1b0: 89 42 38 mov %eax,0x38(%edx) diop->flags = iop->flags; 13a1b3: 8b 43 14 mov 0x14(%ebx),%eax 13a1b6: 89 42 14 mov %eax,0x14(%edx) diop->pathinfo = iop->pathinfo; 13a1b9: 8d 7a 18 lea 0x18(%edx),%edi 13a1bc: 8d 73 18 lea 0x18(%ebx),%esi 13a1bf: b9 05 00 00 00 mov $0x5,%ecx 13a1c4: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 13a1c6: 89 d6 mov %edx,%esi 13a1c8: 2b 35 54 7a 16 00 sub 0x167a54,%esi 13a1ce: c1 fe 06 sar $0x6,%esi 13a1d1: eb 70 jmp 13a243 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 13a1d3: c1 ee 0b shr $0xb,%esi 13a1d6: 83 e6 01 and $0x1,%esi 13a1d9: eb 6c jmp 13a247 * 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 ) ) 13a1db: 83 3a 00 cmpl $0x0,(%edx) 13a1de: 74 08 je 13a1e8 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 13a1e0: 81 ce 00 08 00 00 or $0x800,%esi 13a1e6: eb 06 jmp 13a1ee else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 13a1e8: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi <== NOT EXECUTED 13a1ee: 89 73 14 mov %esi,0x14(%ebx) 13a1f1: 31 f6 xor %esi,%esi 13a1f3: eb 52 jmp 13a247 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 13a1f5: 83 ec 0c sub $0xc,%esp 13a1f8: 56 push %esi 13a1f9: e8 9a 2e fd ff call 10d098 13a1fe: 89 c6 mov %eax,%esi 13a200: 83 c4 10 add $0x10,%esp 13a203: eb 3e jmp 13a243 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 13a205: 83 ec 0c sub $0xc,%esp 13a208: ff 32 pushl (%edx) 13a20a: e8 5f 30 fd ff call 10d26e /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 13a20f: 25 01 02 00 00 and $0x201,%eax 13a214: 8b 53 14 mov 0x14(%ebx),%edx 13a217: 81 e2 fe fd ff ff and $0xfffffdfe,%edx 13a21d: 09 d0 or %edx,%eax 13a21f: 89 43 14 mov %eax,0x14(%ebx) 13a222: 31 f6 xor %esi,%esi 13a224: 83 c4 10 add $0x10,%esp 13a227: eb 1e jmp 13a247 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 13a229: e8 6a 2b 00 00 call 13cd98 <__errno> 13a22e: c7 00 86 00 00 00 movl $0x86,(%eax) 13a234: eb 33 jmp 13a269 ret = -1; break; default: errno = EINVAL; 13a236: e8 5d 2b 00 00 call 13cd98 <__errno> 13a23b: c7 00 16 00 00 00 movl $0x16,(%eax) 13a241: eb 26 jmp 13a269 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 13a243: 85 f6 test %esi,%esi 13a245: 78 25 js 13a26c <== NEVER TAKEN if (iop->handlers->fcntl_h) { 13a247: 8b 43 3c mov 0x3c(%ebx),%eax 13a24a: 8b 40 30 mov 0x30(%eax),%eax 13a24d: 85 c0 test %eax,%eax 13a24f: 74 1b je 13a26c <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 13a251: 52 push %edx 13a252: 52 push %edx 13a253: 53 push %ebx 13a254: ff 75 0c pushl 0xc(%ebp) 13a257: ff d0 call *%eax 13a259: 89 c3 mov %eax,%ebx if (err) { 13a25b: 83 c4 10 add $0x10,%esp 13a25e: 85 c0 test %eax,%eax 13a260: 74 0a je 13a26c <== ALWAYS TAKEN errno = err; 13a262: e8 31 2b 00 00 call 13cd98 <__errno> <== NOT EXECUTED 13a267: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 13a269: 83 ce ff or $0xffffffff,%esi va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 13a26c: 89 f0 mov %esi,%eax 13a26e: 8d 65 f4 lea -0xc(%ebp),%esp 13a271: 5b pop %ebx 13a272: 5e pop %esi 13a273: 5f pop %edi 13a274: c9 leave 13a275: c3 ret =============================================================================== 00108008 : #include int fdatasync( int fd ) { 108008: 55 push %ebp 108009: 89 e5 mov %esp,%ebp 10800b: 83 ec 08 sub $0x8,%esp 10800e: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 108011: 3b 05 44 21 12 00 cmp 0x122144,%eax 108017: 73 16 jae 10802f <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108019: c1 e0 06 shl $0x6,%eax 10801c: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 108022: 8b 50 14 mov 0x14(%eax),%edx 108025: f6 c6 01 test $0x1,%dh 108028: 74 05 je 10802f <== NEVER TAKEN rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 10802a: 80 e2 04 and $0x4,%dl 10802d: 75 0d jne 10803c 10802f: e8 20 a8 00 00 call 112854 <__errno> 108034: c7 00 09 00 00 00 movl $0x9,(%eax) 10803a: eb 1d jmp 108059 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 10803c: 8b 50 3c mov 0x3c(%eax),%edx 10803f: 8b 52 2c mov 0x2c(%edx),%edx 108042: 85 d2 test %edx,%edx 108044: 75 0d jne 108053 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108046: e8 09 a8 00 00 call 112854 <__errno> 10804b: c7 00 86 00 00 00 movl $0x86,(%eax) 108051: eb 06 jmp 108059 return (*iop->handlers->fdatasync_h)( iop ); 108053: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 108056: c9 leave <== NOT EXECUTED */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 108057: ff e2 jmp *%edx <== NOT EXECUTED } 108059: 83 c8 ff or $0xffffffff,%eax 10805c: c9 leave 10805d: c3 ret =============================================================================== 0010da9c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10da9c: 55 push %ebp 10da9d: 89 e5 mov %esp,%ebp 10da9f: 57 push %edi 10daa0: 56 push %esi 10daa1: 53 push %ebx 10daa2: 83 ec 30 sub $0x30,%esp ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10daa5: 6a 00 push $0x0 10daa7: 6a 00 push $0x0 10daa9: ff 35 3c 53 12 00 pushl 0x12533c 10daaf: e8 44 cb ff ff call 10a5f8 10dab4: 89 c2 mov %eax,%edx 10dab6: 83 c4 10 add $0x10,%esp 10dab9: be fc ff ff ff mov $0xfffffffc,%esi 10dabe: 85 c0 test %eax,%eax 10dac0: 0f 85 f8 02 00 00 jne 10ddbe <== ALWAYS TAKEN RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10dac6: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dac9: 8b 18 mov (%eax),%ebx <== NOT EXECUTED if (pipe == NULL) { 10dacb: 85 db test %ebx,%ebx <== NOT EXECUTED 10dacd: 0f 85 0a 01 00 00 jne 10dbdd <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10dad3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dad6: 6a 34 push $0x34 <== NOT EXECUTED 10dad8: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10dadb: e8 5c 9e ff ff call 10793c <== NOT EXECUTED 10dae0: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10dae2: 89 c6 mov %eax,%esi <== NOT EXECUTED if (pipe == NULL) 10dae4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dae7: 85 c0 test %eax,%eax <== NOT EXECUTED 10dae9: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10daec: 0f 84 e4 00 00 00 je 10dbd6 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10daf2: b9 0d 00 00 00 mov $0xd,%ecx <== NOT EXECUTED 10daf7: 89 c7 mov %eax,%edi <== NOT EXECUTED 10daf9: 89 d0 mov %edx,%eax <== NOT EXECUTED 10dafb: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10dafd: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10db04: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10db07: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10db0c: e8 2b 9e ff ff call 10793c <== NOT EXECUTED 10db11: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10db13: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db16: 85 c0 test %eax,%eax <== NOT EXECUTED 10db18: 0f 84 ac 00 00 00 je 10dbca <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10db1e: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10db21: 50 push %eax <== NOT EXECUTED 10db22: 6a 00 push $0x0 <== NOT EXECUTED 10db24: 6a 00 push $0x0 <== NOT EXECUTED 10db26: 0f be 05 98 34 12 00 movsbl 0x123498,%eax <== NOT EXECUTED 10db2d: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10db32: 50 push %eax <== NOT EXECUTED 10db33: e8 08 16 00 00 call 10f140 <== NOT EXECUTED 10db38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db3b: 85 c0 test %eax,%eax <== NOT EXECUTED 10db3d: 75 7e jne 10dbbd <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10db3f: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10db42: 50 push %eax <== NOT EXECUTED 10db43: 6a 00 push $0x0 <== NOT EXECUTED 10db45: 6a 00 push $0x0 <== NOT EXECUTED 10db47: 0f be 05 98 34 12 00 movsbl 0x123498,%eax <== NOT EXECUTED 10db4e: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10db53: 50 push %eax <== NOT EXECUTED 10db54: e8 e7 15 00 00 call 10f140 <== NOT EXECUTED 10db59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10db5c: 85 c0 test %eax,%eax <== NOT EXECUTED 10db5e: 75 4f jne 10dbaf <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10db60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10db63: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10db66: 50 push %eax <== NOT EXECUTED 10db67: 6a 00 push $0x0 <== NOT EXECUTED 10db69: 6a 10 push $0x10 <== NOT EXECUTED 10db6b: 6a 01 push $0x1 <== NOT EXECUTED 10db6d: 0f be 05 98 34 12 00 movsbl 0x123498,%eax <== NOT EXECUTED 10db74: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10db79: 50 push %eax <== NOT EXECUTED 10db7a: e8 4d c8 ff ff call 10a3cc <== NOT EXECUTED 10db7f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10db82: 85 c0 test %eax,%eax <== NOT EXECUTED 10db84: 75 1b jne 10dba1 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10db86: a0 98 34 12 00 mov 0x123498,%al <== NOT EXECUTED 10db8b: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10db8e: 88 15 98 34 12 00 mov %dl,0x123498 <== NOT EXECUTED 10db94: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10db96: 75 45 jne 10dbdd <== NOT EXECUTED c = 'a'; 10db98: c6 05 98 34 12 00 61 movb $0x61,0x123498 <== NOT EXECUTED 10db9f: eb 3c jmp 10dbdd <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10dba1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dba4: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dba7: e8 4c 16 00 00 call 10f1f8 <== NOT EXECUTED 10dbac: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10dbaf: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbb2: ff 76 2c pushl 0x2c(%esi) <== NOT EXECUTED 10dbb5: e8 3e 16 00 00 call 10f1f8 <== NOT EXECUTED 10dbba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10dbbd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbc0: ff 36 pushl (%esi) <== NOT EXECUTED 10dbc2: e8 d5 9a ff ff call 10769c <== NOT EXECUTED 10dbc7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10dbca: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dbcd: 56 push %esi <== NOT EXECUTED 10dbce: e8 c9 9a ff ff call 10769c <== NOT EXECUTED 10dbd3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dbd6: be f4 ff ff ff mov $0xfffffff4,%esi <== NOT EXECUTED 10dbdb: eb 34 jmp 10dc11 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10dbdd: 50 push %eax <== NOT EXECUTED 10dbde: 6a 00 push $0x0 <== NOT EXECUTED 10dbe0: 6a 00 push $0x0 <== NOT EXECUTED 10dbe2: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dbe5: e8 0e ca ff ff call 10a5f8 <== NOT EXECUTED 10dbea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dbed: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10dbf0: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10dbf2: f7 d6 not %esi <== NOT EXECUTED 10dbf4: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10dbf7: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10dbfa: 83 3a 00 cmpl $0x0,(%edx) <== NOT EXECUTED 10dbfd: 75 12 jne 10dc11 <== NOT EXECUTED if (err) 10dbff: 85 f6 test %esi,%esi <== NOT EXECUTED 10dc01: 74 09 je 10dc0c <== NOT EXECUTED pipe_free(pipe); 10dc03: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10dc05: e8 87 fd ff ff call 10d991 <== NOT EXECUTED 10dc0a: eb 05 jmp 10dc11 <== NOT EXECUTED else *pipep = pipe; 10dc0c: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10dc0f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10dc11: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc14: ff 35 3c 53 12 00 pushl 0x12533c <== NOT EXECUTED 10dc1a: e8 c5 ca ff ff call 10a6e4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10dc1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dc22: 85 f6 test %esi,%esi <== NOT EXECUTED 10dc24: 0f 85 94 01 00 00 jne 10ddbe <== NOT EXECUTED return err; pipe = *pipep; 10dc2a: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10dc2d: 8b 1a mov (%edx),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10dc2f: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10dc32: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10dc35: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10dc38: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10dc3b: 0f 84 91 00 00 00 je 10dcd2 <== NOT EXECUTED 10dc41: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10dc44: 0f 84 10 01 00 00 je 10dd5a <== NOT EXECUTED 10dc4a: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10dc4d: 0f 85 49 01 00 00 jne 10dd9c <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10dc53: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10dc56: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10dc59: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dc5c: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10dc5f: 85 c0 test %eax,%eax <== NOT EXECUTED 10dc61: 75 11 jne 10dc74 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10dc63: 57 push %edi <== NOT EXECUTED 10dc64: 57 push %edi <== NOT EXECUTED 10dc65: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dc68: 50 push %eax <== NOT EXECUTED 10dc69: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dc6c: e8 e7 15 00 00 call 10f258 <== NOT EXECUTED 10dc71: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Writers == 0) { 10dc74: 83 7b 14 00 cmpl $0x0,0x14(%ebx) <== NOT EXECUTED 10dc78: 0f 85 1e 01 00 00 jne 10dd9c <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10dc7e: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10dc81: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10dc85: 0f 85 11 01 00 00 jne 10dd9c <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10dc8b: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10dc8e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dc91: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dc94: e8 4b ca ff ff call 10a6e4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10dc99: 5a pop %edx <== NOT EXECUTED 10dc9a: 59 pop %ecx <== NOT EXECUTED 10dc9b: 6a 00 push $0x0 <== NOT EXECUTED 10dc9d: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dca0: e8 0b 16 00 00 call 10f2b0 <== NOT EXECUTED 10dca5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dca8: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcaa: 0f 85 f9 00 00 00 jne 10dda9 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10dcb0: 50 push %eax <== NOT EXECUTED 10dcb1: 6a 00 push $0x0 <== NOT EXECUTED 10dcb3: 6a 00 push $0x0 <== NOT EXECUTED 10dcb5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dcb8: e8 3b c9 ff ff call 10a5f8 <== NOT EXECUTED 10dcbd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dcc0: 85 c0 test %eax,%eax <== NOT EXECUTED 10dcc2: 0f 85 e1 00 00 00 jne 10dda9 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10dcc8: 3b 7b 24 cmp 0x24(%ebx),%edi <== NOT EXECUTED 10dccb: 74 c1 je 10dc8e <== NOT EXECUTED 10dccd: e9 ca 00 00 00 jmp 10dd9c <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10dcd2: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10dcd5: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10dcd8: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dcdb: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10dcde: 85 c0 test %eax,%eax <== NOT EXECUTED 10dce0: 75 11 jne 10dcf3 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10dce2: 57 push %edi <== NOT EXECUTED 10dce3: 57 push %edi <== NOT EXECUTED 10dce4: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dce7: 50 push %eax <== NOT EXECUTED 10dce8: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dceb: e8 68 15 00 00 call 10f258 <== NOT EXECUTED 10dcf0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10dcf3: 83 7b 10 00 cmpl $0x0,0x10(%ebx) <== NOT EXECUTED 10dcf7: 0f 85 9f 00 00 00 jne 10dd9c <== NOT EXECUTED 10dcfd: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10dd00: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10dd04: 74 18 je 10dd1e <== NOT EXECUTED PIPE_UNLOCK(pipe); 10dd06: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd09: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd0c: e8 d3 c9 ff ff call 10a6e4 <== NOT EXECUTED 10dd11: be fa ff ff ff mov $0xfffffffa,%esi <== NOT EXECUTED err = -ENXIO; goto out_error; 10dd16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd19: e9 90 00 00 00 jmp 10ddae <== NOT EXECUTED } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10dd1e: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); 10dd21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd24: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd27: e8 b8 c9 ff ff call 10a6e4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10dd2c: 5a pop %edx <== NOT EXECUTED 10dd2d: 59 pop %ecx <== NOT EXECUTED 10dd2e: 6a 00 push $0x0 <== NOT EXECUTED 10dd30: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd33: e8 78 15 00 00 call 10f2b0 <== NOT EXECUTED 10dd38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd3b: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd3d: 75 6a jne 10dda9 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 10dd3f: 50 push %eax <== NOT EXECUTED 10dd40: 6a 00 push $0x0 <== NOT EXECUTED 10dd42: 6a 00 push $0x0 <== NOT EXECUTED 10dd44: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dd47: e8 ac c8 ff ff call 10a5f8 <== NOT EXECUTED 10dd4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10dd4f: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd51: 75 56 jne 10dda9 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10dd53: 3b 7b 20 cmp 0x20(%ebx),%edi <== NOT EXECUTED 10dd56: 74 c9 je 10dd21 <== NOT EXECUTED 10dd58: eb 42 jmp 10dd9c <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10dd5a: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10dd5d: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10dd60: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dd63: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10dd66: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd68: 75 11 jne 10dd7b <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 10dd6a: 57 push %edi <== NOT EXECUTED 10dd6b: 57 push %edi <== NOT EXECUTED 10dd6c: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dd6f: 50 push %eax <== NOT EXECUTED 10dd70: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10dd73: e8 e0 14 00 00 call 10f258 <== NOT EXECUTED 10dd78: 83 c4 10 add $0x10,%esp <== NOT EXECUTED pipe->writerCounter ++; 10dd7b: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10dd7e: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10dd81: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10dd84: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10dd87: 85 c0 test %eax,%eax <== NOT EXECUTED 10dd89: 75 11 jne 10dd9c <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10dd8b: 51 push %ecx <== NOT EXECUTED 10dd8c: 51 push %ecx <== NOT EXECUTED 10dd8d: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10dd90: 50 push %eax <== NOT EXECUTED 10dd91: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10dd94: e8 bf 14 00 00 call 10f258 <== NOT EXECUTED 10dd99: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 10dd9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dd9f: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10dda2: e8 3d c9 ff ff call 10a6e4 <== NOT EXECUTED 10dda7: eb 12 jmp 10ddbb <== NOT EXECUTED return 0; 10dda9: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10ddae: 52 push %edx <== NOT EXECUTED 10ddaf: 52 push %edx <== NOT EXECUTED 10ddb0: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10ddb3: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10ddb6: e8 11 fc ff ff call 10d9cc <== NOT EXECUTED return err; 10ddbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10ddbe: 89 f0 mov %esi,%eax 10ddc0: 8d 65 f4 lea -0xc(%ebp),%esp 10ddc3: 5b pop %ebx 10ddc4: 5e pop %esi 10ddc5: 5f pop %edi 10ddc6: c9 leave 10ddc7: c3 ret =============================================================================== 00108060 : long fpathconf( int fd, int name ) { 108060: 55 push %ebp 108061: 89 e5 mov %esp,%ebp 108063: 83 ec 08 sub $0x8,%esp 108066: 8b 45 08 mov 0x8(%ebp),%eax 108069: 8b 55 0c mov 0xc(%ebp),%edx long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 10806c: 3b 05 44 21 12 00 cmp 0x122144,%eax 108072: 73 0f jae 108083 iop = rtems_libio_iop(fd); 108074: c1 e0 06 shl $0x6,%eax 108077: 03 05 20 60 12 00 add 0x126020,%eax rtems_libio_check_is_open(iop); 10807d: f6 40 15 01 testb $0x1,0x15(%eax) 108081: 75 0d jne 108090 <== ALWAYS TAKEN 108083: e8 cc a7 00 00 call 112854 <__errno> 108088: c7 00 09 00 00 00 movl $0x9,(%eax) 10808e: eb 56 jmp 1080e6 /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 108090: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 108093: 83 fa 0b cmp $0xb,%edx 108096: 77 43 ja 1080db 108098: ff 24 95 50 0a 12 00 jmp *0x120a50(,%edx,4) case _PC_LINK_MAX: return_value = the_limits->link_max; 10809f: 8b 40 38 mov 0x38(%eax),%eax break; 1080a2: eb 45 jmp 1080e9 case _PC_MAX_CANON: return_value = the_limits->max_canon; 1080a4: 8b 40 3c mov 0x3c(%eax),%eax break; 1080a7: eb 40 jmp 1080e9 case _PC_MAX_INPUT: return_value = the_limits->max_input; 1080a9: 8b 40 40 mov 0x40(%eax),%eax break; 1080ac: eb 3b jmp 1080e9 case _PC_NAME_MAX: return_value = the_limits->name_max; 1080ae: 8b 40 44 mov 0x44(%eax),%eax break; 1080b1: eb 36 jmp 1080e9 case _PC_PATH_MAX: return_value = the_limits->path_max; 1080b3: 8b 40 48 mov 0x48(%eax),%eax break; 1080b6: eb 31 jmp 1080e9 case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 1080b8: 8b 40 4c mov 0x4c(%eax),%eax break; 1080bb: eb 2c jmp 1080e9 case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 1080bd: 8b 40 54 mov 0x54(%eax),%eax break; 1080c0: eb 27 jmp 1080e9 case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 1080c2: 8b 40 58 mov 0x58(%eax),%eax break; 1080c5: eb 22 jmp 1080e9 case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 1080c7: 8b 40 64 mov 0x64(%eax),%eax break; 1080ca: eb 1d jmp 1080e9 case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 1080cc: 8b 40 50 mov 0x50(%eax),%eax break; 1080cf: eb 18 jmp 1080e9 case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 1080d1: 8b 40 5c mov 0x5c(%eax),%eax break; 1080d4: eb 13 jmp 1080e9 case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 1080d6: 8b 40 60 mov 0x60(%eax),%eax break; 1080d9: eb 0e jmp 1080e9 default: rtems_set_errno_and_return_minus_one( EINVAL ); 1080db: e8 74 a7 00 00 call 112854 <__errno> 1080e0: c7 00 16 00 00 00 movl $0x16,(%eax) 1080e6: 83 c8 ff or $0xffffffff,%eax break; } return return_value; } 1080e9: c9 leave 1080ea: c3 ret =============================================================================== 0010769c : void free( void *ptr ) { MSBUMP(free_calls, 1); 10769c: 55 push %ebp 10769d: 89 e5 mov %esp,%ebp 10769f: 53 push %ebx 1076a0: 83 ec 04 sub $0x4,%esp 1076a3: 8b 5d 08 mov 0x8(%ebp),%ebx 1076a6: ff 05 64 55 12 00 incl 0x125564 if ( !ptr ) 1076ac: 85 db test %ebx,%ebx 1076ae: 74 5f je 10770f /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1076b0: 83 3d 28 58 12 00 03 cmpl $0x3,0x125828 1076b7: 75 15 jne 1076ce 1076b9: e8 56 01 00 00 call 107814 1076be: 84 c0 test %al,%al 1076c0: 75 0c jne 1076ce <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1076c2: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1076c5: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1076c8: c9 leave <== NOT EXECUTED * 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); 1076c9: e9 84 01 00 00 jmp 107852 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1076ce: a1 f0 39 12 00 mov 0x1239f0,%eax 1076d3: 85 c0 test %eax,%eax 1076d5: 74 0a je 1076e1 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1076d7: 83 ec 0c sub $0xc,%esp 1076da: 53 push %ebx 1076db: ff 50 08 call *0x8(%eax) 1076de: 83 c4 10 add $0x10,%esp if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1076e1: 50 push %eax 1076e2: 50 push %eax 1076e3: 53 push %ebx 1076e4: ff 35 70 16 12 00 pushl 0x121670 1076ea: e8 19 46 00 00 call 10bd08 <_Protected_heap_Free> 1076ef: 83 c4 10 add $0x10,%esp 1076f2: 84 c0 test %al,%al 1076f4: 75 19 jne 10770f <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1076f6: a1 70 16 12 00 mov 0x121670,%eax <== NOT EXECUTED */ 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", 1076fb: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1076fe: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 107701: 53 push %ebx <== NOT EXECUTED 107702: 68 b7 ef 11 00 push $0x11efb7 <== NOT EXECUTED 107707: e8 8c 0c 00 00 call 108398 <== NOT EXECUTED 10770c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 10770f: 8b 5d fc mov -0x4(%ebp),%ebx 107712: c9 leave 107713: c3 ret =============================================================================== 00128dd4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 128dd4: 55 push %ebp <== NOT EXECUTED 128dd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128dd7: 53 push %ebx <== NOT EXECUTED 128dd8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 128ddb: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 128dde: 81 fb a4 7a 16 00 cmp $0x167aa4,%ebx <== NOT EXECUTED 128de4: 74 40 je 128e26 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 128de6: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 128de9: 85 c0 test %eax,%eax <== NOT EXECUTED 128deb: 74 13 je 128e00 <== NOT EXECUTED 128ded: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128df0: 85 c0 test %eax,%eax <== NOT EXECUTED 128df2: 74 0c je 128e00 <== NOT EXECUTED 128df4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128df7: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 128dfa: 52 push %edx <== NOT EXECUTED 128dfb: ff d0 call *%eax <== NOT EXECUTED 128dfd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 128e00: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 128e03: 85 c0 test %eax,%eax <== NOT EXECUTED 128e05: 74 13 je 128e1a <== NOT EXECUTED 128e07: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128e0a: 85 c0 test %eax,%eax <== NOT EXECUTED 128e0c: 74 0c je 128e1a <== NOT EXECUTED 128e0e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128e11: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 128e14: 52 push %edx <== NOT EXECUTED 128e15: ff d0 call *%eax <== NOT EXECUTED 128e17: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 128e1a: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 128e1d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 128e20: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 128e21: e9 76 40 fe ff jmp 10ce9c <== NOT EXECUTED } } 128e26: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 128e29: c9 leave <== NOT EXECUTED 128e2a: c3 ret <== NOT EXECUTED =============================================================================== 0011ce74 : int fstat( int fd, struct stat *sbuf ) { 11ce74: 55 push %ebp 11ce75: 89 e5 mov %esp,%ebp 11ce77: 57 push %edi 11ce78: 53 push %ebx 11ce79: 8b 55 08 mov 0x8(%ebp),%edx 11ce7c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 11ce7f: 85 db test %ebx,%ebx 11ce81: 75 0d jne 11ce90 rtems_set_errno_and_return_minus_one( EFAULT ); 11ce83: e8 38 4a ff ff call 1118c0 <__errno> 11ce88: c7 00 0e 00 00 00 movl $0xe,(%eax) 11ce8e: eb 5d jmp 11ceed /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 11ce90: 3b 15 64 16 12 00 cmp 0x121664,%edx 11ce96: 73 16 jae 11ceae 11ce98: c1 e2 06 shl $0x6,%edx 11ce9b: 03 15 40 55 12 00 add 0x125540,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 11cea1: f6 42 15 01 testb $0x1,0x15(%edx) 11cea5: 74 07 je 11ceae <== NEVER TAKEN if ( !iop->handlers ) 11cea7: 8b 42 3c mov 0x3c(%edx),%eax 11ceaa: 85 c0 test %eax,%eax 11ceac: 75 0d jne 11cebb <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 11ceae: e8 0d 4a ff ff call 1118c0 <__errno> 11ceb3: c7 00 09 00 00 00 movl $0x9,(%eax) 11ceb9: eb 32 jmp 11ceed if ( !iop->handlers->fstat_h ) 11cebb: 83 78 18 00 cmpl $0x0,0x18(%eax) 11cebf: 75 0d jne 11cece <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11cec1: e8 fa 49 ff ff call 1118c0 <__errno> <== NOT EXECUTED 11cec6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11cecc: eb 1f jmp 11ceed <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 11cece: b9 12 00 00 00 mov $0x12,%ecx 11ced3: 31 c0 xor %eax,%eax 11ced5: 89 df mov %ebx,%edi 11ced7: f3 ab rep stos %eax,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11ced9: 8b 42 3c mov 0x3c(%edx),%eax 11cedc: 89 5d 0c mov %ebx,0xc(%ebp) 11cedf: 83 c2 18 add $0x18,%edx 11cee2: 89 55 08 mov %edx,0x8(%ebp) 11cee5: 8b 40 18 mov 0x18(%eax),%eax } 11cee8: 5b pop %ebx 11cee9: 5f pop %edi 11ceea: c9 leave * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 11ceeb: ff e0 jmp *%eax } 11ceed: 83 c8 ff or $0xffffffff,%eax 11cef0: 5b pop %ebx 11cef1: 5f pop %edi 11cef2: c9 leave 11cef3: c3 ret =============================================================================== 00127dcc : #include int fsync( int fd ) { 127dcc: 55 push %ebp 127dcd: 89 e5 mov %esp,%ebp 127dcf: 83 ec 08 sub $0x8,%esp 127dd2: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 127dd5: 3b 05 44 01 16 00 cmp 0x160144,%eax 127ddb: 73 16 jae 127df3 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 127ddd: c1 e0 06 shl $0x6,%eax 127de0: 03 05 54 7a 16 00 add 0x167a54,%eax rtems_libio_check_is_open(iop); 127de6: f6 40 15 01 testb $0x1,0x15(%eax) 127dea: 74 07 je 127df3 <== NEVER TAKEN /* * Now process the fsync(). */ if ( !iop->handlers ) 127dec: 8b 50 3c mov 0x3c(%eax),%edx 127def: 85 d2 test %edx,%edx 127df1: 75 0d jne 127e00 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 127df3: e8 a0 4f 01 00 call 13cd98 <__errno> <== NOT EXECUTED 127df8: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 127dfe: eb 1a jmp 127e1a <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 127e00: 8b 52 28 mov 0x28(%edx),%edx 127e03: 85 d2 test %edx,%edx 127e05: 75 0d jne 127e14 rtems_set_errno_and_return_minus_one( ENOTSUP ); 127e07: e8 8c 4f 01 00 call 13cd98 <__errno> 127e0c: c7 00 86 00 00 00 movl $0x86,(%eax) 127e12: eb 06 jmp 127e1a return (*iop->handlers->fsync_h)( iop ); 127e14: 89 45 08 mov %eax,0x8(%ebp) } 127e17: c9 leave rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 127e18: ff e2 jmp *%edx } 127e1a: 83 c8 ff or $0xffffffff,%eax 127e1d: c9 leave 127e1e: c3 ret =============================================================================== 0010ebf8 : int ftruncate( int fd, off_t length ) { 10ebf8: 55 push %ebp 10ebf9: 89 e5 mov %esp,%ebp 10ebfb: 57 push %edi 10ebfc: 56 push %esi 10ebfd: 53 push %ebx 10ebfe: 83 ec 3c sub $0x3c,%esp 10ec01: 8b 5d 08 mov 0x8(%ebp),%ebx 10ec04: 8b 45 0c mov 0xc(%ebp),%eax 10ec07: 8b 55 10 mov 0x10(%ebp),%edx 10ec0a: 89 45 c0 mov %eax,-0x40(%ebp) 10ec0d: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 10ec10: 3b 1d 64 16 12 00 cmp 0x121664,%ebx 10ec16: 73 11 jae 10ec29 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10ec18: c1 e3 06 shl $0x6,%ebx 10ec1b: 03 1d 40 55 12 00 add 0x125540,%ebx rtems_libio_check_is_open(iop); 10ec21: 8b 43 14 mov 0x14(%ebx),%eax 10ec24: f6 c4 01 test $0x1,%ah 10ec27: 75 0d jne 10ec36 <== ALWAYS TAKEN 10ec29: e8 92 2c 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10ec2e: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 10ec34: eb 5f jmp 10ec95 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ec36: a8 04 test $0x4,%al 10ec38: 74 39 je 10ec73 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 10ec3a: 8d 7d d4 lea -0x2c(%ebp),%edi 10ec3d: 8d 73 18 lea 0x18(%ebx),%esi 10ec40: b9 05 00 00 00 mov $0x5,%ecx 10ec45: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 10ec47: 8b 45 e0 mov -0x20(%ebp),%eax 10ec4a: 8b 40 10 mov 0x10(%eax),%eax 10ec4d: 85 c0 test %eax,%eax 10ec4f: 74 39 je 10ec8a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 10ec51: 83 ec 0c sub $0xc,%esp 10ec54: 8d 55 d4 lea -0x2c(%ebp),%edx 10ec57: 52 push %edx 10ec58: ff d0 call *%eax 10ec5a: 83 c4 10 add $0x10,%esp 10ec5d: 48 dec %eax 10ec5e: 75 0d jne 10ec6d rtems_set_errno_and_return_minus_one( EISDIR ); 10ec60: e8 5b 2c 00 00 call 1118c0 <__errno> 10ec65: c7 00 15 00 00 00 movl $0x15,(%eax) 10ec6b: eb 28 jmp 10ec95 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10ec6d: f6 43 14 04 testb $0x4,0x14(%ebx) 10ec71: 75 0d jne 10ec80 <== ALWAYS TAKEN 10ec73: e8 48 2c 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10ec78: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 10ec7e: eb 15 jmp 10ec95 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 10ec80: 8b 43 3c mov 0x3c(%ebx),%eax 10ec83: 8b 40 20 mov 0x20(%eax),%eax 10ec86: 85 c0 test %eax,%eax 10ec88: 75 10 jne 10ec9a <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10ec8a: e8 31 2c 00 00 call 1118c0 <__errno> <== NOT EXECUTED 10ec8f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10ec95: 83 c8 ff or $0xffffffff,%eax 10ec98: eb 0d jmp 10eca7 return (*iop->handlers->ftruncate_h)( iop, length ); 10ec9a: 52 push %edx 10ec9b: ff 75 c4 pushl -0x3c(%ebp) 10ec9e: ff 75 c0 pushl -0x40(%ebp) 10eca1: 53 push %ebx 10eca2: ff d0 call *%eax 10eca4: 83 c4 10 add $0x10,%esp } 10eca7: 8d 65 f4 lea -0xc(%ebp),%esp 10ecaa: 5b pop %ebx 10ecab: 5e pop %esi 10ecac: 5f pop %edi 10ecad: c9 leave 10ecae: c3 ret =============================================================================== 00107330 : } } static rtems_disk_device * get_disk_entry(dev_t dev, bool lookup_only) { 107330: 55 push %ebp 107331: 89 e5 mov %esp,%ebp 107333: 53 push %ebx 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) { 107334: 3b 05 70 86 12 00 cmp 0x128670,%eax 10733a: 73 2e jae 10736a <== NEVER TAKEN 10733c: 8b 1d 6c 86 12 00 mov 0x12866c,%ebx 107342: 85 db test %ebx,%ebx 107344: 74 24 je 10736a <== NEVER TAKEN rtems_disk_device_table *dtab = disktab + major; 107346: 8d 04 c3 lea (%ebx,%eax,8),%eax if (minor < dtab->size && dtab->minor != NULL) { 107349: 3b 50 04 cmp 0x4(%eax),%edx 10734c: 73 1c jae 10736a <== NEVER TAKEN 10734e: 8b 00 mov (%eax),%eax 107350: 85 c0 test %eax,%eax 107352: 74 16 je 10736a <== NEVER TAKEN rtems_disk_device *dd = dtab->minor [minor]; 107354: 8b 04 90 mov (%eax,%edx,4),%eax if (dd != NULL && !lookup_only) { 107357: 85 c0 test %eax,%eax 107359: 74 11 je 10736c 10735b: 84 c9 test %cl,%cl 10735d: 75 0d jne 10736c if (!dd->deleted) { 10735f: 80 78 30 00 cmpb $0x0,0x30(%eax) 107363: 75 05 jne 10736a ++dd->uses; 107365: ff 40 14 incl 0x14(%eax) 107368: eb 02 jmp 10736c 10736a: 31 c0 xor %eax,%eax return dd; } } return NULL; } 10736c: 5b pop %ebx 10736d: c9 leave 10736e: c3 ret =============================================================================== 00152c7c : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 152c7c: 55 push %ebp 152c7d: 89 e5 mov %esp,%ebp 152c7f: 57 push %edi 152c80: 56 push %esi 152c81: 53 push %ebx 152c82: 83 ec 2c sub $0x2c,%esp 152c85: 8b 45 08 mov 0x8(%ebp),%eax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 152c88: 31 db xor %ebx,%ebx 152c8a: 3b 05 44 01 16 00 cmp 0x160144,%eax 152c90: 73 0b jae 152c9d <== NEVER TAKEN 152c92: 89 c3 mov %eax,%ebx 152c94: c1 e3 06 shl $0x6,%ebx 152c97: 03 1d 54 7a 16 00 add 0x167a54,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 152c9d: 8d 7d d4 lea -0x2c(%ebp),%edi 152ca0: 8d 73 18 lea 0x18(%ebx),%esi 152ca3: b9 05 00 00 00 mov $0x5,%ecx 152ca8: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 152caa: 8b 45 e0 mov -0x20(%ebp),%eax 152cad: 8b 40 10 mov 0x10(%eax),%eax 152cb0: 85 c0 test %eax,%eax 152cb2: 74 29 je 152cdd <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 152cb4: 83 ec 0c sub $0xc,%esp 152cb7: 8d 55 d4 lea -0x2c(%ebp),%edx 152cba: 52 push %edx 152cbb: ff d0 call *%eax 152cbd: 83 c4 10 add $0x10,%esp 152cc0: 48 dec %eax 152cc1: 74 10 je 152cd3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 152cc3: e8 d0 a0 fe ff call 13cd98 <__errno> 152cc8: c7 00 14 00 00 00 movl $0x14,(%eax) 152cce: 83 c8 ff or $0xffffffff,%eax 152cd1: eb 24 jmp 152cf7 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 152cd3: 8b 43 3c mov 0x3c(%ebx),%eax 152cd6: 8b 40 08 mov 0x8(%eax),%eax 152cd9: 85 c0 test %eax,%eax 152cdb: 75 0d jne 152cea <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 152cdd: e8 b6 a0 fe ff call 13cd98 <__errno> <== NOT EXECUTED 152ce2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 152ce8: eb e4 jmp 152cce <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 152cea: 52 push %edx 152ceb: ff 75 10 pushl 0x10(%ebp) 152cee: ff 75 0c pushl 0xc(%ebp) 152cf1: 53 push %ebx 152cf2: ff d0 call *%eax 152cf4: 83 c4 10 add $0x10,%esp } 152cf7: 8d 65 f4 lea -0xc(%ebp),%esp 152cfa: 5b pop %ebx 152cfb: 5e pop %esi 152cfc: 5f pop %edi 152cfd: c9 leave 152cfe: c3 ret =============================================================================== 00127ef8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 127ef8: 55 push %ebp <== NOT EXECUTED 127ef9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 127efb: a1 fc 21 16 00 mov 0x1621fc,%eax <== NOT EXECUTED 127f00: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED return _POSIX_types_Gid; } 127f03: c9 leave <== NOT EXECUTED 127f04: c3 ret <== NOT EXECUTED =============================================================================== 00128402 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 128402: 55 push %ebp 128403: 89 e5 mov %esp,%ebp 128405: 57 push %edi 128406: 56 push %esi 128407: 53 push %ebx 128408: 83 ec 1c sub $0x1c,%esp 12840b: 89 c7 mov %eax,%edi 12840d: 89 55 e4 mov %edx,-0x1c(%ebp) 128410: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 128412: e8 df fe ff ff call 1282f6 if ((fp = fopen("/etc/group", "r")) == NULL) { 128417: 53 push %ebx 128418: 53 push %ebx 128419: 68 0a 6b 15 00 push $0x156b0a 12841e: 68 d6 38 15 00 push $0x1538d6 128423: e8 d4 52 01 00 call 13d6fc 128428: 89 c3 mov %eax,%ebx 12842a: 83 c4 10 add $0x10,%esp 12842d: 85 c0 test %eax,%eax 12842f: 75 10 jne 128441 <== ALWAYS TAKEN errno = EINVAL; 128431: e8 62 49 01 00 call 13cd98 <__errno> <== NOT EXECUTED 128436: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 12843c: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 12843f: eb 6b jmp 1284ac <== NOT EXECUTED } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 128441: 83 ec 0c sub $0xc,%esp 128444: ff 75 0c pushl 0xc(%ebp) 128447: 8b 4d 08 mov 0x8(%ebp),%ecx 12844a: 89 f2 mov %esi,%edx 12844c: 89 d8 mov %ebx,%eax 12844e: e8 39 fc ff ff call 12808c 128453: 83 c4 10 add $0x10,%esp 128456: 85 c0 test %eax,%eax 128458: 75 19 jne 128473 <== ALWAYS TAKEN errno = EINVAL; 12845a: e8 39 49 01 00 call 13cd98 <__errno> <== NOT EXECUTED 12845f: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 128465: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128468: 53 push %ebx <== NOT EXECUTED 128469: e8 76 4a 01 00 call 13cee4 <== NOT EXECUTED 12846e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 128471: eb 36 jmp 1284a9 <== NOT EXECUTED return -1; } if (name) { 128473: 85 ff test %edi,%edi 128475: 74 11 je 128488 <== NEVER TAKEN match = (strcmp(grp->gr_name, name) == 0); 128477: 51 push %ecx 128478: 51 push %ecx 128479: 57 push %edi 12847a: ff 36 pushl (%esi) 12847c: e8 7b a1 01 00 call 1425fc 128481: 83 c4 10 add $0x10,%esp 128484: 85 c0 test %eax,%eax 128486: eb 07 jmp 12848f } else { match = (grp->gr_gid == gid); 128488: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 12848c: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 12848f: 0f 94 c0 sete %al 128492: 0f b6 c0 movzbl %al,%eax } if (match) { 128495: 85 c0 test %eax,%eax 128497: 74 a8 je 128441 fclose(fp); 128499: 83 ec 0c sub $0xc,%esp 12849c: 53 push %ebx 12849d: e8 42 4a 01 00 call 13cee4 *result = grp; 1284a2: 8b 45 10 mov 0x10(%ebp),%eax 1284a5: 89 30 mov %esi,(%eax) 1284a7: 31 c0 xor %eax,%eax return 0; 1284a9: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 1284ac: 8d 65 f4 lea -0xc(%ebp),%esp 1284af: 5b pop %ebx 1284b0: 5e pop %esi 1284b1: 5f pop %edi 1284b2: c9 leave 1284b3: c3 ret =============================================================================== 0012818b : return NULL; return p; } struct group *getgrent(void) { 12818b: 55 push %ebp <== NOT EXECUTED 12818c: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12818e: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 128191: a1 8c 76 16 00 mov 0x16768c,%eax <== NOT EXECUTED 128196: 85 c0 test %eax,%eax <== NOT EXECUTED 128198: 74 25 je 1281bf <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 12819a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12819d: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1281a2: b9 90 76 16 00 mov $0x167690,%ecx <== NOT EXECUTED 1281a7: ba 58 77 16 00 mov $0x167758,%edx <== NOT EXECUTED 1281ac: e8 db fe ff ff call 12808c <== NOT EXECUTED 1281b1: 89 c2 mov %eax,%edx <== NOT EXECUTED 1281b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1281b6: b8 58 77 16 00 mov $0x167758,%eax <== NOT EXECUTED 1281bb: 85 d2 test %edx,%edx <== NOT EXECUTED 1281bd: 75 02 jne 1281c1 <== NOT EXECUTED 1281bf: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 1281c1: c9 leave <== NOT EXECUTED 1281c2: c3 ret <== NOT EXECUTED =============================================================================== 001284de : } struct group *getgrgid( gid_t gid ) { 1284de: 55 push %ebp <== NOT EXECUTED 1284df: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1284e1: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 1284e4: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 1284e7: 50 push %eax <== NOT EXECUTED 1284e8: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1284ed: 68 90 76 16 00 push $0x167690 <== NOT EXECUTED 1284f2: 68 58 77 16 00 push $0x167758 <== NOT EXECUTED 1284f7: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 1284fb: 50 push %eax <== NOT EXECUTED 1284fc: e8 b3 ff ff ff call 1284b4 <== NOT EXECUTED 128501: 89 c2 mov %eax,%edx <== NOT EXECUTED 128503: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 128506: 31 c0 xor %eax,%eax <== NOT EXECUTED 128508: 85 d2 test %edx,%edx <== NOT EXECUTED 12850a: 75 03 jne 12850f <== NOT EXECUTED return NULL; return p; 12850c: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 12850f: c9 leave <== NOT EXECUTED 128510: c3 ret <== NOT EXECUTED =============================================================================== 001284b4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 1284b4: 55 push %ebp <== NOT EXECUTED 1284b5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1284b7: 53 push %ebx <== NOT EXECUTED 1284b8: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 1284bb: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1284be: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 1284c1: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 1284c5: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 1284c8: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 1284cb: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 1284ce: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 1284d1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 1284d4: 31 c0 xor %eax,%eax <== NOT EXECUTED } 1284d6: 5b pop %ebx <== NOT EXECUTED 1284d7: 5b pop %ebx <== NOT EXECUTED 1284d8: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 1284d9: e9 24 ff ff ff jmp 128402 <== NOT EXECUTED =============================================================================== 0012853a : } struct group *getgrnam( const char *name ) { 12853a: 55 push %ebp 12853b: 89 e5 mov %esp,%ebp 12853d: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 128540: 8d 45 f4 lea -0xc(%ebp),%eax 128543: 50 push %eax 128544: 68 c8 00 00 00 push $0xc8 128549: 68 90 76 16 00 push $0x167690 12854e: 68 58 77 16 00 push $0x167758 128553: ff 75 08 pushl 0x8(%ebp) 128556: e8 b6 ff ff ff call 128511 12855b: 89 c2 mov %eax,%edx 12855d: 83 c4 20 add $0x20,%esp 128560: 31 c0 xor %eax,%eax 128562: 85 d2 test %edx,%edx 128564: 75 03 jne 128569 <== NEVER TAKEN return NULL; return p; 128566: 8b 45 f4 mov -0xc(%ebp),%eax } 128569: c9 leave 12856a: c3 ret =============================================================================== 00121bb8 : * * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ pid_t getpid( void ) { 121bb8: 55 push %ebp <== NOT EXECUTED 121bb9: 89 e5 mov %esp,%ebp <== NOT EXECUTED return _Objects_Local_node; } 121bbb: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 121bc0: c9 leave <== NOT EXECUTED 121bc1: c3 ret <== NOT EXECUTED =============================================================================== 001285a6 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 1285a6: 55 push %ebp 1285a7: 89 e5 mov %esp,%ebp 1285a9: 57 push %edi 1285aa: 56 push %esi 1285ab: 53 push %ebx 1285ac: 83 ec 1c sub $0x1c,%esp 1285af: 89 c7 mov %eax,%edi 1285b1: 89 55 e4 mov %edx,-0x1c(%ebp) 1285b4: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 1285b6: e8 3b fd ff ff call 1282f6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 1285bb: 51 push %ecx 1285bc: 51 push %ecx 1285bd: 68 0a 6b 15 00 push $0x156b0a 1285c2: 68 91 38 15 00 push $0x153891 1285c7: e8 30 51 01 00 call 13d6fc 1285cc: 89 c3 mov %eax,%ebx 1285ce: 83 c4 10 add $0x10,%esp 1285d1: 85 c0 test %eax,%eax 1285d3: 75 10 jne 1285e5 <== ALWAYS TAKEN errno = EINVAL; 1285d5: e8 be 47 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1285da: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1285e0: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 1285e3: eb 6b jmp 128650 <== NOT EXECUTED } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 1285e5: 83 ec 0c sub $0xc,%esp 1285e8: ff 75 0c pushl 0xc(%ebp) 1285eb: 8b 4d 08 mov 0x8(%ebp),%ecx 1285ee: 89 f2 mov %esi,%edx 1285f0: 89 d8 mov %ebx,%eax 1285f2: e8 cc fb ff ff call 1281c3 1285f7: 83 c4 10 add $0x10,%esp 1285fa: 85 c0 test %eax,%eax 1285fc: 75 19 jne 128617 <== ALWAYS TAKEN errno = EINVAL; 1285fe: e8 95 47 01 00 call 13cd98 <__errno> <== NOT EXECUTED 128603: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 128609: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12860c: 53 push %ebx <== NOT EXECUTED 12860d: e8 d2 48 01 00 call 13cee4 <== NOT EXECUTED 128612: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 128615: eb 36 jmp 12864d <== NOT EXECUTED return -1; } if (name) { 128617: 85 ff test %edi,%edi 128619: 74 11 je 12862c <== NEVER TAKEN match = (strcmp(pwd->pw_name, name) == 0); 12861b: 52 push %edx 12861c: 52 push %edx 12861d: 57 push %edi 12861e: ff 36 pushl (%esi) 128620: e8 d7 9f 01 00 call 1425fc 128625: 83 c4 10 add $0x10,%esp 128628: 85 c0 test %eax,%eax 12862a: eb 07 jmp 128633 } else { match = (pwd->pw_uid == uid); 12862c: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 128630: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 128633: 0f 94 c0 sete %al 128636: 0f b6 c0 movzbl %al,%eax } if (match) { 128639: 85 c0 test %eax,%eax 12863b: 74 a8 je 1285e5 fclose(fp); 12863d: 83 ec 0c sub $0xc,%esp 128640: 53 push %ebx 128641: e8 9e 48 01 00 call 13cee4 *result = pwd; 128646: 8b 45 10 mov 0x10(%ebp),%eax 128649: 89 30 mov %esi,(%eax) 12864b: 31 c0 xor %eax,%eax return 0; 12864d: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 128650: 8d 65 f4 lea -0xc(%ebp),%esp 128653: 5b pop %ebx 128654: 5e pop %esi 128655: 5f pop %edi 128656: c9 leave 128657: c3 ret =============================================================================== 001282be : return NULL; return p; } struct passwd *getpwent(void) { 1282be: 55 push %ebp <== NOT EXECUTED 1282bf: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1282c1: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 1282c4: a1 a4 75 16 00 mov 0x1675a4,%eax <== NOT EXECUTED 1282c9: 85 c0 test %eax,%eax <== NOT EXECUTED 1282cb: 74 25 je 1282f2 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 1282cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1282d0: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 1282d5: b9 a8 75 16 00 mov $0x1675a8,%ecx <== NOT EXECUTED 1282da: ba 70 76 16 00 mov $0x167670,%edx <== NOT EXECUTED 1282df: e8 df fe ff ff call 1281c3 <== NOT EXECUTED 1282e4: 89 c2 mov %eax,%edx <== NOT EXECUTED 1282e6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1282e9: b8 70 76 16 00 mov $0x167670,%eax <== NOT EXECUTED 1282ee: 85 d2 test %edx,%edx <== NOT EXECUTED 1282f0: 75 02 jne 1282f4 <== NOT EXECUTED 1282f2: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 1282f4: c9 leave <== NOT EXECUTED 1282f5: c3 ret <== NOT EXECUTED =============================================================================== 001286de : } struct passwd *getpwnam( const char *name ) { 1286de: 55 push %ebp 1286df: 89 e5 mov %esp,%ebp 1286e1: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 1286e4: 8d 45 f4 lea -0xc(%ebp),%eax 1286e7: 50 push %eax 1286e8: 68 c8 00 00 00 push $0xc8 1286ed: 68 a8 75 16 00 push $0x1675a8 1286f2: 68 70 76 16 00 push $0x167670 1286f7: ff 75 08 pushl 0x8(%ebp) 1286fa: e8 b6 ff ff ff call 1286b5 1286ff: 89 c2 mov %eax,%edx 128701: 83 c4 20 add $0x20,%esp 128704: 31 c0 xor %eax,%eax 128706: 85 d2 test %edx,%edx 128708: 75 03 jne 12870d <== NEVER TAKEN return NULL; return p; 12870a: 8b 45 f4 mov -0xc(%ebp),%eax } 12870d: c9 leave 12870e: c3 ret =============================================================================== 00128682 : } struct passwd *getpwuid( uid_t uid ) { 128682: 55 push %ebp <== NOT EXECUTED 128683: 89 e5 mov %esp,%ebp <== NOT EXECUTED 128685: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 128688: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 12868b: 50 push %eax <== NOT EXECUTED 12868c: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 128691: 68 a8 75 16 00 push $0x1675a8 <== NOT EXECUTED 128696: 68 70 76 16 00 push $0x167670 <== NOT EXECUTED 12869b: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 12869f: 50 push %eax <== NOT EXECUTED 1286a0: e8 b3 ff ff ff call 128658 <== NOT EXECUTED 1286a5: 89 c2 mov %eax,%edx <== NOT EXECUTED 1286a7: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1286aa: 31 c0 xor %eax,%eax <== NOT EXECUTED 1286ac: 85 d2 test %edx,%edx <== NOT EXECUTED 1286ae: 75 03 jne 1286b3 <== NOT EXECUTED return NULL; return p; 1286b0: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 1286b3: c9 leave <== NOT EXECUTED 1286b4: c3 ret <== NOT EXECUTED =============================================================================== 00128658 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 128658: 55 push %ebp <== NOT EXECUTED 128659: 89 e5 mov %esp,%ebp <== NOT EXECUTED 12865b: 53 push %ebx <== NOT EXECUTED 12865c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 12865f: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 128662: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 128665: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 128669: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 12866c: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 12866f: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 128672: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 128675: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 128678: 31 c0 xor %eax,%eax <== NOT EXECUTED } 12867a: 5b pop %ebx <== NOT EXECUTED 12867b: 5b pop %ebx <== NOT EXECUTED 12867c: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 12867d: e9 24 ff ff ff jmp 1285a6 <== NOT EXECUTED =============================================================================== 00107714 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 107714: 55 push %ebp 107715: 89 e5 mov %esp,%ebp 107717: 56 push %esi 107718: 53 push %ebx 107719: 83 ec 10 sub $0x10,%esp 10771c: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10771f: 85 db test %ebx,%ebx 107721: 75 10 jne 107733 <== ALWAYS TAKEN errno = EFAULT; 107723: e8 98 a1 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107728: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10772e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 107731: eb 29 jmp 10775c <== NOT EXECUTED { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 107733: 9c pushf 107734: fa cli 107735: 5e pop %esi _TOD_Get( &now ); 107736: 83 ec 0c sub $0xc,%esp 107739: 8d 45 f0 lea -0x10(%ebp),%eax 10773c: 50 push %eax 10773d: e8 86 3a 00 00 call 10b1c8 <_TOD_Get> _ISR_Enable(level); 107742: 56 push %esi 107743: 9d popf useconds = (suseconds_t)now.tv_nsec; 107744: 8b 45 f4 mov -0xc(%ebp),%eax useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 107747: 8b 55 f0 mov -0x10(%ebp),%edx 10774a: 89 13 mov %edx,(%ebx) time->tv_usec = useconds; 10774c: b9 e8 03 00 00 mov $0x3e8,%ecx 107751: 99 cltd 107752: f7 f9 idiv %ecx 107754: 89 43 04 mov %eax,0x4(%ebx) 107757: 31 c0 xor %eax,%eax * 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; 107759: 83 c4 10 add $0x10,%esp } 10775c: 8d 65 f8 lea -0x8(%ebp),%esp 10775f: 5b pop %ebx 107760: 5e pop %esi 107761: c9 leave 107762: c3 ret =============================================================================== 0010cf88 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 10cf88: 55 push %ebp <== NOT EXECUTED 10cf89: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cf8b: a1 fc 21 16 00 mov 0x1621fc,%eax <== NOT EXECUTED 10cf90: 66 8b 40 32 mov 0x32(%eax),%ax <== NOT EXECUTED return _POSIX_types_Uid; } 10cf94: c9 leave <== NOT EXECUTED 10cf95: c3 ret <== NOT EXECUTED =============================================================================== 00110ec0 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 110ec0: 55 push %ebp 110ec1: 89 e5 mov %esp,%ebp 110ec3: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 110ec6: 8b 4a 38 mov 0x38(%edx),%ecx 110ec9: 83 c8 ff or $0xffffffff,%eax 110ecc: 83 79 4c 01 cmpl $0x1,0x4c(%ecx) 110ed0: 75 10 jne 110ee2 <== NEVER TAKEN if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 110ed2: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx) 110ed9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 110ee0: 31 c0 xor %eax,%eax return 0; } 110ee2: c9 leave 110ee3: c3 ret =============================================================================== 00110fe4 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110fe4: 55 push %ebp 110fe5: 89 e5 mov %esp,%ebp 110fe7: 56 push %esi 110fe8: 53 push %ebx 110fe9: 83 ec 10 sub $0x10,%esp 110fec: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110fef: 8b 1e mov (%esi),%ebx 110ff1: 8d 43 54 lea 0x54(%ebx),%eax 110ff4: 39 43 50 cmp %eax,0x50(%ebx) 110ff7: 74 0d je 111006 /* * 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 ); 110ff9: e8 c2 08 00 00 call 1118c0 <__errno> 110ffe: c7 00 5a 00 00 00 movl $0x5a,(%eax) 111004: eb 19 jmp 11101f /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 111006: 8b 46 10 mov 0x10(%esi),%eax 111009: 39 58 1c cmp %ebx,0x1c(%eax) 11100c: 74 06 je 111014 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 11100e: 83 7b 5c 00 cmpl $0x0,0x5c(%ebx) 111012: 74 10 je 111024 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBUSY ); 111014: e8 a7 08 00 00 call 1118c0 <__errno> 111019: c7 00 10 00 00 00 movl $0x10,(%eax) 11101f: 83 c8 ff or $0xffffffff,%eax 111022: eb 6b jmp 11108f /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 111024: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 111028: 74 13 je 11103d 11102a: 83 ec 0c sub $0xc,%esp 11102d: 53 push %ebx 11102e: e8 d5 9d ff ff call 10ae08 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 111033: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 11103a: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 11103d: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 111041: 50 push %eax 111042: 50 push %eax 111043: 6a 00 push $0x0 111045: 8d 45 f0 lea -0x10(%ebp),%eax 111048: 50 push %eax 111049: e8 c6 66 ff ff call 107714 11104e: 8b 45 f0 mov -0x10(%ebp),%eax 111051: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 111054: 89 1c 24 mov %ebx,(%esp) 111057: e8 92 dc ff ff call 10ecee 11105c: 83 c4 10 add $0x10,%esp 11105f: 85 c0 test %eax,%eax 111061: 75 2a jne 11108d 111063: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 111068: 75 23 jne 11108d /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 11106a: a1 74 34 12 00 mov 0x123474,%eax 11106f: 8b 50 04 mov 0x4(%eax),%edx 111072: 3b 16 cmp (%esi),%edx 111074: 75 07 jne 11107d <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 111076: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 11107d: 83 ec 0c sub $0xc,%esp 111080: 53 push %ebx 111081: e8 16 66 ff ff call 10769c 111086: 31 c0 xor %eax,%eax 111088: 83 c4 10 add $0x10,%esp 11108b: eb 02 jmp 11108f 11108d: 31 c0 xor %eax,%eax } return 0; } 11108f: 8d 65 f8 lea -0x8(%ebp),%esp 111092: 5b pop %ebx 111093: 5e pop %esi 111094: c9 leave 111095: c3 ret =============================================================================== 001282f6 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 1282f6: 55 push %ebp 1282f7: 89 e5 mov %esp,%ebp 1282f9: 53 push %ebx 1282fa: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 1282fd: 80 3d a0 75 16 00 00 cmpb $0x0,0x1675a0 128304: 0f 85 b8 00 00 00 jne 1283c2 return; etc_passwd_initted = 1; 12830a: c6 05 a0 75 16 00 01 movb $0x1,0x1675a0 mkdir("/etc", 0777); 128311: 50 push %eax 128312: 50 push %eax 128313: 68 ff 01 00 00 push $0x1ff 128318: 68 77 37 15 00 push $0x153777 12831d: e8 0e 52 fe ff call 10d530 /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 128322: 59 pop %ecx 128323: 5b pop %ebx 128324: 68 0a 6b 15 00 push $0x156b0a 128329: 68 91 38 15 00 push $0x153891 12832e: e8 c9 53 01 00 call 13d6fc 128333: 83 c4 10 add $0x10,%esp 128336: 85 c0 test %eax,%eax 128338: 74 06 je 128340 <== ALWAYS TAKEN fclose(fp); 12833a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12833d: 50 push %eax <== NOT EXECUTED 12833e: eb 2a jmp 12836a <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 128340: 52 push %edx 128341: 52 push %edx 128342: 68 80 67 15 00 push $0x156780 128347: 68 91 38 15 00 push $0x153891 12834c: e8 ab 53 01 00 call 13d6fc 128351: 89 c3 mov %eax,%ebx 128353: 83 c4 10 add $0x10,%esp 128356: 85 c0 test %eax,%eax 128358: 74 18 je 128372 <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 12835a: 50 push %eax 12835b: 50 push %eax 12835c: 53 push %ebx 12835d: 68 22 9e 15 00 push $0x159e22 128362: e8 d9 54 01 00 call 13d840 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 128367: 89 1c 24 mov %ebx,(%esp) 12836a: e8 75 4b 01 00 call 13cee4 12836f: 83 c4 10 add $0x10,%esp } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 128372: 51 push %ecx 128373: 51 push %ecx 128374: 68 0a 6b 15 00 push $0x156b0a 128379: 68 d6 38 15 00 push $0x1538d6 12837e: e8 79 53 01 00 call 13d6fc 128383: 83 c4 10 add $0x10,%esp 128386: 85 c0 test %eax,%eax 128388: 74 06 je 128390 <== ALWAYS TAKEN fclose(fp); 12838a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12838d: 50 push %eax <== NOT EXECUTED 12838e: eb 2a jmp 1283ba <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 128390: 52 push %edx 128391: 52 push %edx 128392: 68 80 67 15 00 push $0x156780 128397: 68 d6 38 15 00 push $0x1538d6 12839c: e8 5b 53 01 00 call 13d6fc 1283a1: 89 c3 mov %eax,%ebx 1283a3: 83 c4 10 add $0x10,%esp 1283a6: 85 c0 test %eax,%eax 1283a8: 74 18 je 1283c2 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 1283aa: 50 push %eax 1283ab: 50 push %eax 1283ac: 53 push %ebx 1283ad: 68 89 9e 15 00 push $0x159e89 1283b2: e8 89 54 01 00 call 13d840 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 1283b7: 89 1c 24 mov %ebx,(%esp) 1283ba: e8 25 4b 01 00 call 13cee4 1283bf: 83 c4 10 add $0x10,%esp } } 1283c2: 8b 5d fc mov -0x4(%ebp),%ebx 1283c5: c9 leave 1283c6: c3 ret =============================================================================== 0010a3d8 : int ioctl( int fd, ioctl_command_t command, ... ) { 10a3d8: 55 push %ebp 10a3d9: 89 e5 mov %esp,%ebp 10a3db: 83 ec 08 sub $0x8,%esp 10a3de: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10a3e1: 3b 05 44 41 12 00 cmp 0x124144,%eax 10a3e7: 73 19 jae 10a402 iop = rtems_libio_iop( fd ); 10a3e9: c1 e0 06 shl $0x6,%eax 10a3ec: 03 05 f0 80 12 00 add 0x1280f0,%eax rtems_libio_check_is_open(iop); 10a3f2: f6 40 15 01 testb $0x1,0x15(%eax) 10a3f6: 74 0a je 10a402 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10a3f8: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10a3fb: 8b 50 3c mov 0x3c(%eax),%edx 10a3fe: 85 d2 test %edx,%edx 10a400: 75 0d jne 10a40f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EBADF ); 10a402: e8 69 ac 00 00 call 115070 <__errno> 10a407: c7 00 09 00 00 00 movl $0x9,(%eax) 10a40d: eb 12 jmp 10a421 if ( !iop->handlers->ioctl_h ) 10a40f: 8b 52 10 mov 0x10(%edx),%edx 10a412: 85 d2 test %edx,%edx 10a414: 75 10 jne 10a426 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a416: e8 55 ac 00 00 call 115070 <__errno> <== NOT EXECUTED 10a41b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a421: 83 c8 ff or $0xffffffff,%eax 10a424: eb 0d jmp 10a433 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10a426: 83 ec 04 sub $0x4,%esp 10a429: 51 push %ecx 10a42a: ff 75 0c pushl 0xc(%ebp) 10a42d: 50 push %eax 10a42e: ff d2 call *%edx return rc; 10a430: 83 c4 10 add $0x10,%esp } 10a433: c9 leave 10a434: c3 ret =============================================================================== 00108e44 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 108e44: 55 push %ebp <== NOT EXECUTED 108e45: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e47: 53 push %ebx <== NOT EXECUTED 108e48: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 108e4b: 89 d3 mov %edx,%ebx <== NOT EXECUTED 108e4d: 88 c1 mov %al,%cl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 108e4f: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 108e52: a8 20 test $0x20,%al <== NOT EXECUTED 108e54: 74 03 je 108e59 <== NOT EXECUTED c &= 0x7f; 108e56: 83 e1 7f and $0x7f,%ecx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 108e59: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 108e5c: 74 17 je 108e75 <== NOT EXECUTED c = tolower (c); 108e5e: 0f b6 c9 movzbl %cl,%ecx <== NOT EXECUTED 108e61: 8b 15 fc 34 12 00 mov 0x1234fc,%edx <== NOT EXECUTED 108e67: 0f be 54 0a 01 movsbl 0x1(%edx,%ecx,1),%edx <== NOT EXECUTED 108e6c: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 108e6f: 4a dec %edx <== NOT EXECUTED 108e70: 75 03 jne 108e75 <== NOT EXECUTED 108e72: 83 c1 20 add $0x20,%ecx <== NOT EXECUTED if (c == '\r') { 108e75: 80 f9 0d cmp $0xd,%cl <== NOT EXECUTED 108e78: 75 11 jne 108e8b <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 108e7a: 84 c0 test %al,%al <== NOT EXECUTED 108e7c: 0f 88 d3 00 00 00 js 108f55 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 108e82: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 108e85: 74 19 je 108ea0 <== NOT EXECUTED 108e87: b1 0a mov $0xa,%cl <== NOT EXECUTED 108e89: eb 15 jmp 108ea0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 108e8b: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108e8e: 75 08 jne 108e98 <== NOT EXECUTED 108e90: a8 40 test $0x40,%al <== NOT EXECUTED 108e92: 74 0c je 108ea0 <== NOT EXECUTED 108e94: b1 0d mov $0xd,%cl <== NOT EXECUTED 108e96: eb 08 jmp 108ea0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 108e98: 84 c9 test %cl,%cl <== NOT EXECUTED 108e9a: 0f 84 87 00 00 00 je 108f27 <== NOT EXECUTED 108ea0: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED 108ea3: f6 c2 02 test $0x2,%dl <== NOT EXECUTED 108ea6: 74 7f je 108f27 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 108ea8: 3a 4b 43 cmp 0x43(%ebx),%cl <== NOT EXECUTED 108eab: 75 04 jne 108eb1 <== NOT EXECUTED erase (tty, 0); 108ead: 31 d2 xor %edx,%edx <== NOT EXECUTED 108eaf: eb 0a jmp 108ebb <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { 108eb1: 3a 4b 44 cmp 0x44(%ebx),%cl <== NOT EXECUTED 108eb4: 75 11 jne 108ec7 <== NOT EXECUTED erase (tty, 1); 108eb6: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 108ebb: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108ebd: e8 09 fe ff ff call 108ccb <== NOT EXECUTED 108ec2: e9 8e 00 00 00 jmp 108f55 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 108ec7: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 108ecc: 3a 4b 45 cmp 0x45(%ebx),%cl <== NOT EXECUTED 108ecf: 0f 84 82 00 00 00 je 108f57 <== NOT EXECUTED return 1; } else if (c == '\n') { 108ed5: 80 f9 0a cmp $0xa,%cl <== NOT EXECUTED 108ed8: 75 1a jne 108ef4 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 108eda: 80 e2 48 and $0x48,%dl <== NOT EXECUTED 108edd: 74 09 je 108ee8 <== NOT EXECUTED echo (c, tty); 108edf: 89 da mov %ebx,%edx <== NOT EXECUTED 108ee1: b0 0a mov $0xa,%al <== NOT EXECUTED 108ee3: e8 8b fd ff ff call 108c73 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108ee8: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108eeb: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108eee: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 108ef2: eb 28 jmp 108f1c <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 108ef4: 3a 4b 4c cmp 0x4c(%ebx),%cl <== NOT EXECUTED 108ef7: 74 05 je 108efe <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 108ef9: 3a 4b 51 cmp 0x51(%ebx),%cl <== NOT EXECUTED 108efc: 75 29 jne 108f27 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108efe: 80 e2 08 and $0x8,%dl <== NOT EXECUTED 108f01: 74 10 je 108f13 <== NOT EXECUTED echo (c, tty); 108f03: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f06: 89 da mov %ebx,%edx <== NOT EXECUTED 108f08: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f0b: e8 63 fd ff ff call 108c73 <== NOT EXECUTED 108f10: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f13: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f16: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f19: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f1c: 40 inc %eax <== NOT EXECUTED 108f1d: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f20: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 108f25: eb 30 jmp 108f57 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 108f27: a1 64 34 12 00 mov 0x123464,%eax <== NOT EXECUTED 108f2c: 48 dec %eax <== NOT EXECUTED 108f2d: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 108f30: 7d 23 jge 108f55 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 108f32: f6 43 3c 08 testb $0x8,0x3c(%ebx) <== NOT EXECUTED 108f36: 74 10 je 108f48 <== NOT EXECUTED echo (c, tty); 108f38: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 108f3b: 89 da mov %ebx,%edx <== NOT EXECUTED 108f3d: 88 4d f4 mov %cl,-0xc(%ebp) <== NOT EXECUTED 108f40: e8 2e fd ff ff call 108c73 <== NOT EXECUTED 108f45: 8a 4d f4 mov -0xc(%ebp),%cl <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 108f48: 8b 43 20 mov 0x20(%ebx),%eax <== NOT EXECUTED 108f4b: 8b 53 1c mov 0x1c(%ebx),%edx <== NOT EXECUTED 108f4e: 88 0c 02 mov %cl,(%edx,%eax,1) <== NOT EXECUTED 108f51: 40 inc %eax <== NOT EXECUTED 108f52: 89 43 20 mov %eax,0x20(%ebx) <== NOT EXECUTED 108f55: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 108f57: 83 c4 14 add $0x14,%esp <== NOT EXECUTED 108f5a: 5b pop %ebx <== NOT EXECUTED 108f5b: c9 leave <== NOT EXECUTED 108f5c: c3 ret <== NOT EXECUTED =============================================================================== 00121be0 : * These are directly supported (and completely correct) in the posix api. */ #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { 121be0: 55 push %ebp <== NOT EXECUTED 121be1: 89 e5 mov %esp,%ebp <== NOT EXECUTED return 0; } 121be3: 31 c0 xor %eax,%eax <== NOT EXECUTED 121be5: c9 leave <== NOT EXECUTED 121be6: c3 ret <== NOT EXECUTED =============================================================================== 00128710 : int link( const char *existing, const char *new ) { 128710: 55 push %ebp 128711: 89 e5 mov %esp,%ebp 128713: 57 push %edi 128714: 56 push %esi 128715: 53 push %ebx 128716: 83 ec 48 sub $0x48,%esp 128719: 8b 55 08 mov 0x8(%ebp),%edx 12871c: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 12871f: 31 c0 xor %eax,%eax 128721: 83 c9 ff or $0xffffffff,%ecx 128724: 89 d7 mov %edx,%edi 128726: f2 ae repnz scas %es:(%edi),%al 128728: f7 d1 not %ecx 12872a: 49 dec %ecx 12872b: 6a 01 push $0x1 12872d: 8d 75 cc lea -0x34(%ebp),%esi 128730: 56 push %esi 128731: 6a 00 push $0x0 128733: 51 push %ecx 128734: 52 push %edx 128735: e8 f7 46 fe ff call 10ce31 0, &existing_loc, true ); if ( result != 0 ) 12873a: 83 c4 20 add $0x20,%esp 12873d: 83 cf ff or $0xffffffff,%edi 128740: 85 c0 test %eax,%eax 128742: 0f 85 45 01 00 00 jne 12888d /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 128748: 57 push %edi 128749: 8d 7d b8 lea -0x48(%ebp),%edi 12874c: 57 push %edi 12874d: 8d 45 e4 lea -0x1c(%ebp),%eax 128750: 50 push %eax 128751: 53 push %ebx 128752: e8 5d 5c fe ff call 10e3b4 if ( !parent_loc.ops->evalformake_h ) { 128757: 8b 45 c4 mov -0x3c(%ebp),%eax 12875a: 8b 40 04 mov 0x4(%eax),%eax 12875d: 83 c4 10 add $0x10,%esp 128760: 85 c0 test %eax,%eax 128762: 75 1f jne 128783 <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 128764: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 128767: 85 c0 test %eax,%eax <== NOT EXECUTED 128769: 0f 84 d0 00 00 00 je 12883f <== NOT EXECUTED 12876f: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128772: 85 c0 test %eax,%eax <== NOT EXECUTED 128774: 0f 84 c5 00 00 00 je 12883f <== NOT EXECUTED 12877a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12877d: 56 push %esi <== NOT EXECUTED 12877e: e9 b7 00 00 00 jmp 12883a <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 128783: 51 push %ecx 128784: 8d 55 e0 lea -0x20(%ebp),%edx 128787: 52 push %edx 128788: 57 push %edi 128789: 03 5d e4 add -0x1c(%ebp),%ebx 12878c: 53 push %ebx 12878d: ff d0 call *%eax 12878f: 89 c3 mov %eax,%ebx if ( result != 0 ) { 128791: 83 c4 10 add $0x10,%esp 128794: 85 c0 test %eax,%eax 128796: 74 26 je 1287be rtems_filesystem_freenode( &existing_loc ); 128798: 8b 45 d8 mov -0x28(%ebp),%eax 12879b: 85 c0 test %eax,%eax 12879d: 74 10 je 1287af <== NEVER TAKEN 12879f: 8b 40 1c mov 0x1c(%eax),%eax 1287a2: 85 c0 test %eax,%eax 1287a4: 74 09 je 1287af <== NEVER TAKEN 1287a6: 83 ec 0c sub $0xc,%esp 1287a9: 56 push %esi 1287aa: ff d0 call *%eax 1287ac: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 1287af: e8 e4 45 01 00 call 13cd98 <__errno> 1287b4: 89 18 mov %ebx,(%eax) 1287b6: 83 cf ff or $0xffffffff,%edi 1287b9: e9 cf 00 00 00 jmp 12888d /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 1287be: 8b 45 c8 mov -0x38(%ebp),%eax 1287c1: 3b 45 dc cmp -0x24(%ebp),%eax 1287c4: 74 3e je 128804 rtems_filesystem_freenode( &existing_loc ); 1287c6: 8b 45 d8 mov -0x28(%ebp),%eax 1287c9: 85 c0 test %eax,%eax 1287cb: 74 10 je 1287dd <== NEVER TAKEN 1287cd: 8b 40 1c mov 0x1c(%eax),%eax 1287d0: 85 c0 test %eax,%eax 1287d2: 74 09 je 1287dd <== NEVER TAKEN 1287d4: 83 ec 0c sub $0xc,%esp 1287d7: 56 push %esi 1287d8: ff d0 call *%eax 1287da: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 1287dd: 8b 45 c4 mov -0x3c(%ebp),%eax 1287e0: 85 c0 test %eax,%eax 1287e2: 74 13 je 1287f7 <== NEVER TAKEN 1287e4: 8b 40 1c mov 0x1c(%eax),%eax 1287e7: 85 c0 test %eax,%eax 1287e9: 74 0c je 1287f7 <== NEVER TAKEN 1287eb: 83 ec 0c sub $0xc,%esp 1287ee: 8d 55 b8 lea -0x48(%ebp),%edx 1287f1: 52 push %edx 1287f2: ff d0 call *%eax 1287f4: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 1287f7: e8 9c 45 01 00 call 13cd98 <__errno> 1287fc: c7 00 12 00 00 00 movl $0x12,(%eax) 128802: eb b2 jmp 1287b6 } if ( !parent_loc.ops->link_h ) { 128804: 8b 45 c4 mov -0x3c(%ebp),%eax 128807: 8b 40 08 mov 0x8(%eax),%eax 12880a: 85 c0 test %eax,%eax 12880c: 75 41 jne 12884f <== ALWAYS TAKEN rtems_filesystem_freenode( &existing_loc ); 12880e: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 128811: 85 c0 test %eax,%eax <== NOT EXECUTED 128813: 74 10 je 128825 <== NOT EXECUTED 128815: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128818: 85 c0 test %eax,%eax <== NOT EXECUTED 12881a: 74 09 je 128825 <== NOT EXECUTED 12881c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 12881f: 56 push %esi <== NOT EXECUTED 128820: ff d0 call *%eax <== NOT EXECUTED 128822: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 128825: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 128828: 85 c0 test %eax,%eax <== NOT EXECUTED 12882a: 74 13 je 12883f <== NOT EXECUTED 12882c: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 12882f: 85 c0 test %eax,%eax <== NOT EXECUTED 128831: 74 0c je 12883f <== NOT EXECUTED 128833: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128836: 8d 55 b8 lea -0x48(%ebp),%edx <== NOT EXECUTED 128839: 52 push %edx <== NOT EXECUTED 12883a: ff d0 call *%eax <== NOT EXECUTED 12883c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 12883f: e8 54 45 01 00 call 13cd98 <__errno> <== NOT EXECUTED 128844: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12884a: e9 67 ff ff ff jmp 1287b6 <== NOT EXECUTED } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 12884f: 52 push %edx 128850: ff 75 e0 pushl -0x20(%ebp) 128853: 57 push %edi 128854: 56 push %esi 128855: ff d0 call *%eax 128857: 89 c7 mov %eax,%edi rtems_filesystem_freenode( &existing_loc ); 128859: 8b 45 d8 mov -0x28(%ebp),%eax 12885c: 83 c4 10 add $0x10,%esp 12885f: 85 c0 test %eax,%eax 128861: 74 10 je 128873 <== NEVER TAKEN 128863: 8b 40 1c mov 0x1c(%eax),%eax 128866: 85 c0 test %eax,%eax 128868: 74 09 je 128873 <== NEVER TAKEN 12886a: 83 ec 0c sub $0xc,%esp 12886d: 56 push %esi 12886e: ff d0 call *%eax 128870: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 128873: 8b 45 c4 mov -0x3c(%ebp),%eax 128876: 85 c0 test %eax,%eax 128878: 74 13 je 12888d <== NEVER TAKEN 12887a: 8b 40 1c mov 0x1c(%eax),%eax 12887d: 85 c0 test %eax,%eax 12887f: 74 0c je 12888d <== NEVER TAKEN 128881: 83 ec 0c sub $0xc,%esp 128884: 8d 55 b8 lea -0x48(%ebp),%edx 128887: 52 push %edx 128888: ff d0 call *%eax 12888a: 83 c4 10 add $0x10,%esp return result; } 12888d: 89 f8 mov %edi,%eax 12888f: 8d 65 f4 lea -0xc(%ebp),%esp 128892: 5b pop %ebx 128893: 5e pop %esi 128894: 5f pop %edi 128895: c9 leave 128896: c3 ret =============================================================================== 0011cf20 : off_t lseek( int fd, off_t offset, int whence ) { 11cf20: 55 push %ebp 11cf21: 89 e5 mov %esp,%ebp 11cf23: 57 push %edi 11cf24: 56 push %esi 11cf25: 53 push %ebx 11cf26: 83 ec 1c sub $0x1c,%esp 11cf29: 8b 5d 08 mov 0x8(%ebp),%ebx 11cf2c: 8b 45 0c mov 0xc(%ebp),%eax 11cf2f: 8b 55 10 mov 0x10(%ebp),%edx 11cf32: 8b 4d 14 mov 0x14(%ebp),%ecx rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 11cf35: 3b 1d 64 16 12 00 cmp 0x121664,%ebx 11cf3b: 73 0f jae 11cf4c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 11cf3d: c1 e3 06 shl $0x6,%ebx 11cf40: 03 1d 40 55 12 00 add 0x125540,%ebx rtems_libio_check_is_open(iop); 11cf46: f6 43 15 01 testb $0x1,0x15(%ebx) 11cf4a: 75 0d jne 11cf59 <== ALWAYS TAKEN 11cf4c: e8 6f 49 ff ff call 1118c0 <__errno> <== NOT EXECUTED 11cf51: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 11cf57: eb 61 jmp 11cfba <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 11cf59: 8b 73 3c mov 0x3c(%ebx),%esi 11cf5c: 83 7e 14 00 cmpl $0x0,0x14(%esi) 11cf60: 75 0d jne 11cf6f <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 11cf62: e8 59 49 ff ff call 1118c0 <__errno> <== NOT EXECUTED 11cf67: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 11cf6d: eb 4b jmp 11cfba <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; 11cf6f: 8b 73 0c mov 0xc(%ebx),%esi 11cf72: 8b 7b 10 mov 0x10(%ebx),%edi 11cf75: 89 75 e0 mov %esi,-0x20(%ebp) 11cf78: 89 7d e4 mov %edi,-0x1c(%ebp) switch ( whence ) { 11cf7b: 83 f9 01 cmp $0x1,%ecx 11cf7e: 74 11 je 11cf91 11cf80: 83 f9 02 cmp $0x2,%ecx 11cf83: 74 18 je 11cf9d 11cf85: 85 c9 test %ecx,%ecx 11cf87: 75 26 jne 11cfaf case SEEK_SET: iop->offset = offset; 11cf89: 89 43 0c mov %eax,0xc(%ebx) 11cf8c: 89 53 10 mov %edx,0x10(%ebx) break; 11cf8f: eb 30 jmp 11cfc1 case SEEK_CUR: iop->offset += offset; 11cf91: 8b 75 e0 mov -0x20(%ebp),%esi 11cf94: 8b 7d e4 mov -0x1c(%ebp),%edi 11cf97: 01 c6 add %eax,%esi 11cf99: 11 d7 adc %edx,%edi 11cf9b: eb 0a jmp 11cfa7 break; case SEEK_END: iop->offset = iop->size + offset; 11cf9d: 89 c6 mov %eax,%esi 11cf9f: 89 d7 mov %edx,%edi 11cfa1: 03 73 04 add 0x4(%ebx),%esi 11cfa4: 13 7b 08 adc 0x8(%ebx),%edi 11cfa7: 89 73 0c mov %esi,0xc(%ebx) 11cfaa: 89 7b 10 mov %edi,0x10(%ebx) break; 11cfad: eb 12 jmp 11cfc1 default: rtems_set_errno_and_return_minus_one( EINVAL ); 11cfaf: e8 0c 49 ff ff call 1118c0 <__errno> 11cfb4: c7 00 16 00 00 00 movl $0x16,(%eax) 11cfba: 83 c8 ff or $0xffffffff,%eax 11cfbd: 89 c2 mov %eax,%edx 11cfbf: eb 23 jmp 11cfe4 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 11cfc1: 8b 73 3c mov 0x3c(%ebx),%esi 11cfc4: 51 push %ecx 11cfc5: 52 push %edx 11cfc6: 50 push %eax 11cfc7: 53 push %ebx 11cfc8: ff 56 14 call *0x14(%esi) if ( status == (off_t) -1 ) 11cfcb: 83 c4 10 add $0x10,%esp 11cfce: 83 fa ff cmp $0xffffffff,%edx 11cfd1: 75 11 jne 11cfe4 11cfd3: 83 f8 ff cmp $0xffffffff,%eax 11cfd6: 75 0c jne 11cfe4 <== NEVER TAKEN iop->offset = old_offset; 11cfd8: 8b 75 e0 mov -0x20(%ebp),%esi 11cfdb: 8b 7d e4 mov -0x1c(%ebp),%edi 11cfde: 89 73 0c mov %esi,0xc(%ebx) 11cfe1: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 11cfe4: 8d 65 f4 lea -0xc(%ebp),%esp 11cfe7: 5b pop %ebx 11cfe8: 5e pop %esi 11cfe9: 5f pop %edi 11cfea: c9 leave 11cfeb: c3 ret =============================================================================== 001289a4 : int _STAT_NAME( const char *path, struct stat *buf ) { 1289a4: 55 push %ebp <== NOT EXECUTED 1289a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1289a7: 57 push %edi <== NOT EXECUTED 1289a8: 56 push %esi <== NOT EXECUTED 1289a9: 53 push %ebx <== NOT EXECUTED 1289aa: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 1289ad: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1289b0: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 1289b3: 85 f6 test %esi,%esi <== NOT EXECUTED 1289b5: 75 0d jne 1289c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 1289b7: e8 dc 43 01 00 call 13cd98 <__errno> <== NOT EXECUTED 1289bc: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1289c2: eb 53 jmp 128a17 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 1289c4: 31 c0 xor %eax,%eax <== NOT EXECUTED 1289c6: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED 1289c9: 89 d7 mov %edx,%edi <== NOT EXECUTED 1289cb: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1289cd: f7 d1 not %ecx <== NOT EXECUTED 1289cf: 49 dec %ecx <== NOT EXECUTED 1289d0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1289d3: 6a 00 push $0x0 <== NOT EXECUTED 1289d5: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 1289d8: 53 push %ebx <== NOT EXECUTED 1289d9: 6a 00 push $0x0 <== NOT EXECUTED 1289db: 51 push %ecx <== NOT EXECUTED 1289dc: 52 push %edx <== NOT EXECUTED 1289dd: e8 4f 44 fe ff call 10ce31 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 1289e2: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 1289e5: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 1289e8: 85 c0 test %eax,%eax <== NOT EXECUTED 1289ea: 75 5c jne 128a48 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 1289ec: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 1289ef: 83 7a 18 00 cmpl $0x0,0x18(%edx) <== NOT EXECUTED 1289f3: 75 27 jne 128a1c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1289f5: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1289f8: 85 c0 test %eax,%eax <== NOT EXECUTED 1289fa: 74 10 je 128a0c <== NOT EXECUTED 1289fc: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1289ff: 85 c0 test %eax,%eax <== NOT EXECUTED 128a01: 74 09 je 128a0c <== NOT EXECUTED 128a03: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128a06: 53 push %ebx <== NOT EXECUTED 128a07: ff d0 call *%eax <== NOT EXECUTED 128a09: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 128a0c: e8 87 43 01 00 call 13cd98 <__errno> <== NOT EXECUTED 128a11: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 128a17: 83 cf ff or $0xffffffff,%edi <== NOT EXECUTED 128a1a: eb 2c jmp 128a48 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 128a1c: b9 12 00 00 00 mov $0x12,%ecx <== NOT EXECUTED 128a21: 89 f7 mov %esi,%edi <== NOT EXECUTED 128a23: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 128a25: 50 push %eax <== NOT EXECUTED 128a26: 50 push %eax <== NOT EXECUTED 128a27: 56 push %esi <== NOT EXECUTED 128a28: 53 push %ebx <== NOT EXECUTED 128a29: ff 52 18 call *0x18(%edx) <== NOT EXECUTED 128a2c: 89 c7 mov %eax,%edi <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 128a2e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 128a31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 128a34: 85 c0 test %eax,%eax <== NOT EXECUTED 128a36: 74 10 je 128a48 <== NOT EXECUTED 128a38: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 128a3b: 85 c0 test %eax,%eax <== NOT EXECUTED 128a3d: 74 09 je 128a48 <== NOT EXECUTED 128a3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 128a42: 53 push %ebx <== NOT EXECUTED 128a43: ff d0 call *%eax <== NOT EXECUTED 128a45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return status; } 128a48: 89 f8 mov %edi,%eax <== NOT EXECUTED 128a4a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 128a4d: 5b pop %ebx <== NOT EXECUTED 128a4e: 5e pop %esi <== NOT EXECUTED 128a4f: 5f pop %edi <== NOT EXECUTED 128a50: c9 leave <== NOT EXECUTED 128a51: c3 ret <== NOT EXECUTED =============================================================================== 0010793c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10793c: 55 push %ebp 10793d: 89 e5 mov %esp,%ebp 10793f: 57 push %edi 107940: 56 push %esi 107941: 53 push %ebx 107942: 83 ec 0c sub $0xc,%esp 107945: 8b 75 08 mov 0x8(%ebp),%esi 107948: ff 05 5c 55 12 00 incl 0x12555c /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10794e: e8 17 ff ff ff call 10786a /* * Validate the parameters */ if ( !size ) 107953: 85 f6 test %esi,%esi 107955: 74 7c je 1079d3 <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 107957: 83 3d 28 58 12 00 03 cmpl $0x3,0x125828 10795e: 75 09 jne 107969 107960: e8 af fe ff ff call 107814 107965: 84 c0 test %al,%al 107967: 74 6a je 1079d3 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 107969: 6a 00 push $0x0 10796b: 6a 00 push $0x0 10796d: 56 push %esi 10796e: ff 35 70 16 12 00 pushl 0x121670 107974: e8 57 43 00 00 call 10bcd0 <_Protected_heap_Allocate_aligned_with_boundary> 107979: 89 c3 mov %eax,%ebx * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 10797b: 83 c4 10 add $0x10,%esp if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 10797e: 89 c7 mov %eax,%edi * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 107980: 85 c0 test %eax,%eax 107982: 75 26 jne 1079aa if (rtems_malloc_sbrk_helpers) 107984: a1 f4 39 12 00 mov 0x1239f4,%eax 107989: 85 c0 test %eax,%eax 10798b: 74 10 je 10799d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 10798d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107990: 56 push %esi <== NOT EXECUTED 107991: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 107994: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 107996: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107999: 85 c0 test %eax,%eax <== NOT EXECUTED 10799b: 75 0d jne 1079aa <== NOT EXECUTED errno = ENOMEM; 10799d: e8 1e 9f 00 00 call 1118c0 <__errno> 1079a2: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 1079a8: eb 2b jmp 1079d5 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 1079aa: a1 f8 39 12 00 mov 0x1239f8,%eax 1079af: 85 c0 test %eax,%eax 1079b1: 74 09 je 1079bc <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1079b3: 52 push %edx <== NOT EXECUTED 1079b4: 52 push %edx <== NOT EXECUTED 1079b5: 56 push %esi <== NOT EXECUTED 1079b6: 57 push %edi <== NOT EXECUTED 1079b7: ff d0 call *%eax <== NOT EXECUTED 1079b9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1079bc: a1 f0 39 12 00 mov 0x1239f0,%eax 1079c1: 89 fb mov %edi,%ebx 1079c3: 85 c0 test %eax,%eax 1079c5: 74 0e je 1079d5 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1079c7: 83 ec 0c sub $0xc,%esp 1079ca: 57 push %edi 1079cb: ff 50 04 call *0x4(%eax) 1079ce: 83 c4 10 add $0x10,%esp 1079d1: eb 02 jmp 1079d5 1079d3: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1079d5: 89 d8 mov %ebx,%eax 1079d7: 8d 65 f4 lea -0xc(%ebp),%esp 1079da: 5b pop %ebx 1079db: 5e pop %esi 1079dc: 5f pop %edi 1079dd: c9 leave 1079de: c3 ret =============================================================================== 00107852 : } void malloc_deferred_free( void *pointer ) { 107852: 55 push %ebp <== NOT EXECUTED 107853: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107855: 83 ec 10 sub $0x10,%esp <== 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 ); 107858: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10785b: 68 4c 55 12 00 push $0x12554c <== NOT EXECUTED 107860: e8 7f 35 00 00 call 10ade4 <_Chain_Append> <== NOT EXECUTED 107865: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 107868: c9 leave <== NOT EXECUTED 107869: c3 ret <== NOT EXECUTED =============================================================================== 0010786a : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 10786a: 55 push %ebp 10786b: 89 e5 mov %esp,%ebp 10786d: 83 ec 08 sub $0x8,%esp 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) 107870: eb 0c jmp 10787e free(to_be_freed); 107872: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107875: 50 push %eax <== NOT EXECUTED 107876: e8 21 fe ff ff call 10769c <== NOT EXECUTED 10787b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 10787e: 83 ec 0c sub $0xc,%esp 107881: 68 4c 55 12 00 push $0x12554c 107886: e8 95 35 00 00 call 10ae20 <_Chain_Get> 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) 10788b: 83 c4 10 add $0x10,%esp 10788e: 85 c0 test %eax,%eax 107890: 75 e0 jne 107872 <== NEVER TAKEN free(to_be_freed); } 107892: c9 leave 107893: c3 ret =============================================================================== 00107814 : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 107814: 55 push %ebp 107815: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 107817: 8b 15 90 56 12 00 mov 0x125690,%edx 10781d: 31 c0 xor %eax,%eax 10781f: 85 d2 test %edx,%edx 107821: 75 0a jne 10782d <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 107823: a1 28 57 12 00 mov 0x125728,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 107828: 85 c0 test %eax,%eax 10782a: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 10782d: c9 leave 10782e: c3 ret =============================================================================== 00110010 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 110010: 55 push %ebp 110011: 89 e5 mov %esp,%ebp 110013: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 110016: ff 35 2c 52 12 00 pushl 0x12522c 11001c: 6a 01 push $0x1 11001e: e8 99 74 ff ff call 1074bc if ( memory ) 110023: 83 c4 10 add $0x10,%esp 110026: 85 c0 test %eax,%eax 110028: 74 06 je 110030 <== NEVER TAKEN memfile_blocks_allocated++; 11002a: ff 05 40 53 12 00 incl 0x125340 return memory; } 110030: c9 leave 110031: c3 ret =============================================================================== 0011038c : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 11038c: 55 push %ebp 11038d: 89 e5 mov %esp,%ebp 11038f: 53 push %ebx 110390: 83 ec 10 sub $0x10,%esp 110393: 8b 5d 08 mov 0x8(%ebp),%ebx /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 110396: 53 push %ebx 110397: e8 52 e9 ff ff call 10ecee 11039c: 83 c4 10 add $0x10,%esp 11039f: 85 c0 test %eax,%eax 1103a1: 75 36 jne 1103d9 1103a3: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 1103a8: 75 2f jne 1103d9 <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 1103aa: a1 74 34 12 00 mov 0x123474,%eax 1103af: 39 58 04 cmp %ebx,0x4(%eax) 1103b2: 75 07 jne 1103bb <== ALWAYS TAKEN rtems_filesystem_current.node_access = NULL; 1103b4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 1103bb: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1103bf: 74 0c je 1103cd <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 1103c1: 83 ec 0c sub $0xc,%esp 1103c4: 53 push %ebx 1103c5: e8 98 fe ff ff call 110262 1103ca: 83 c4 10 add $0x10,%esp free( the_jnode ); 1103cd: 83 ec 0c sub $0xc,%esp 1103d0: 53 push %ebx 1103d1: e8 c6 72 ff ff call 10769c 1103d6: 83 c4 10 add $0x10,%esp } return 0; } 1103d9: 31 c0 xor %eax,%eax 1103db: 8b 5d fc mov -0x4(%ebp),%ebx 1103de: c9 leave 1103df: c3 ret =============================================================================== 001101ad : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 1101ad: 55 push %ebp 1101ae: 89 e5 mov %esp,%ebp 1101b0: 57 push %edi 1101b1: 56 push %esi 1101b2: 53 push %ebx 1101b3: 83 ec 0c sub $0xc,%esp 1101b6: 8b 75 08 mov 0x8(%ebp),%esi /* * Perform internal consistency checks */ assert( block_table ); 1101b9: 85 f6 test %esi,%esi 1101bb: 75 19 jne 1101d6 <== ALWAYS TAKEN 1101bd: 68 2f f7 11 00 push $0x11f72f <== NOT EXECUTED 1101c2: 68 24 f8 11 00 push $0x11f824 <== NOT EXECUTED 1101c7: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 1101cc: 68 be f6 11 00 push $0x11f6be <== NOT EXECUTED 1101d1: e8 ca 71 ff ff call 1073a0 <__assert_func> <== NOT EXECUTED /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 1101d6: 8b 3e mov (%esi),%edi 1101d8: 31 db xor %ebx,%ebx for ( i=0 ; i if ( b[i] ) { 1101dc: 8b 04 9f mov (%edi,%ebx,4),%eax 1101df: 85 c0 test %eax,%eax 1101e1: 74 13 je 1101f6 memfile_free_block( b[i] ); 1101e3: 83 ec 0c sub $0xc,%esp 1101e6: 50 push %eax 1101e7: e8 0b fe ff ff call 10fff7 b[i] = 0; 1101ec: c7 04 9f 00 00 00 00 movl $0x0,(%edi,%ebx,4) 1101f3: 83 c4 10 add $0x10,%esp * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 1101fc: 83 ec 0c sub $0xc,%esp 1101ff: ff 36 pushl (%esi) 110201: e8 f1 fd ff ff call 10fff7 *block_table = 0; 110206: c7 06 00 00 00 00 movl $0x0,(%esi) 11020c: 83 c4 10 add $0x10,%esp } 11020f: 8d 65 f4 lea -0xc(%ebp),%esp 110212: 5b pop %ebx 110213: 5e pop %esi 110214: 5f pop %edi 110215: c9 leave 110216: c3 ret =============================================================================== 001105ed : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 1105ed: 55 push %ebp 1105ee: 89 e5 mov %esp,%ebp 1105f0: 53 push %ebx 1105f1: 83 ec 14 sub $0x14,%esp 1105f4: 8b 4d 08 mov 0x8(%ebp),%ecx 1105f7: 8b 45 0c mov 0xc(%ebp),%eax 1105fa: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1105fd: 8b 59 38 mov 0x38(%ecx),%ebx * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 110600: 3b 53 54 cmp 0x54(%ebx),%edx 110603: 7c 12 jl 110617 <== NEVER TAKEN 110605: 7f 05 jg 11060c <== NEVER TAKEN 110607: 3b 43 50 cmp 0x50(%ebx),%eax 11060a: 76 0b jbe 110617 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 11060c: 51 push %ecx <== NOT EXECUTED 11060d: 52 push %edx <== NOT EXECUTED 11060e: 50 push %eax <== NOT EXECUTED 11060f: 53 push %ebx <== NOT EXECUTED 110610: e8 b2 fe ff ff call 1104c7 <== NOT EXECUTED 110615: eb 21 jmp 110638 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 110617: 89 43 50 mov %eax,0x50(%ebx) 11061a: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 11061d: 89 41 04 mov %eax,0x4(%ecx) 110620: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 110623: 52 push %edx 110624: 52 push %edx 110625: 6a 00 push $0x0 110627: 8d 45 f0 lea -0x10(%ebp),%eax 11062a: 50 push %eax 11062b: e8 e4 70 ff ff call 107714 110630: 8b 45 f0 mov -0x10(%ebp),%eax 110633: 89 43 40 mov %eax,0x40(%ebx) 110636: 31 c0 xor %eax,%eax return 0; 110638: 83 c4 10 add $0x10,%esp } 11063b: 8b 5d fc mov -0x4(%ebp),%ebx 11063e: c9 leave 11063f: c3 ret =============================================================================== 00110640 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 110640: 55 push %ebp 110641: 89 e5 mov %esp,%ebp 110643: 56 push %esi 110644: 53 push %ebx 110645: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 110648: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 11064b: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 11064f: 75 1a jne 11066b <== ALWAYS TAKEN if (iop->offset > the_jnode->info.linearfile.size) 110651: 8b 56 50 mov 0x50(%esi),%edx <== NOT EXECUTED 110654: 8b 46 54 mov 0x54(%esi),%eax <== NOT EXECUTED 110657: 39 43 10 cmp %eax,0x10(%ebx) <== NOT EXECUTED 11065a: 7c 41 jl 11069d <== NOT EXECUTED 11065c: 7f 05 jg 110663 <== NOT EXECUTED 11065e: 39 53 0c cmp %edx,0xc(%ebx) <== NOT EXECUTED 110661: 76 3a jbe 11069d <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 110663: 89 53 0c mov %edx,0xc(%ebx) <== NOT EXECUTED 110666: 89 43 10 mov %eax,0x10(%ebx) <== NOT EXECUTED 110669: eb 32 jmp 11069d <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 11066b: 50 push %eax 11066c: ff 73 10 pushl 0x10(%ebx) 11066f: ff 73 0c pushl 0xc(%ebx) 110672: 56 push %esi 110673: e8 4f fe ff ff call 1104c7 110678: 83 c4 10 add $0x10,%esp 11067b: 85 c0 test %eax,%eax 11067d: 74 12 je 110691 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 11067f: e8 3c 12 00 00 call 1118c0 <__errno> <== NOT EXECUTED 110684: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11068a: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 11068d: 89 c2 mov %eax,%edx <== NOT EXECUTED 11068f: eb 12 jmp 1106a3 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 110691: 8b 46 50 mov 0x50(%esi),%eax 110694: 8b 56 54 mov 0x54(%esi),%edx 110697: 89 43 04 mov %eax,0x4(%ebx) 11069a: 89 53 08 mov %edx,0x8(%ebx) } return iop->offset; 11069d: 8b 43 0c mov 0xc(%ebx),%eax 1106a0: 8b 53 10 mov 0x10(%ebx),%edx } 1106a3: 8d 65 f8 lea -0x8(%ebp),%esp 1106a6: 5b pop %ebx 1106a7: 5e pop %esi 1106a8: c9 leave 1106a9: c3 ret =============================================================================== 001108cf : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1108cf: 55 push %ebp 1108d0: 89 e5 mov %esp,%ebp 1108d2: 56 push %esi 1108d3: 53 push %ebx 1108d4: 8b 75 08 mov 0x8(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 1108d7: 8b 5e 38 mov 0x38(%esi),%ebx /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1108da: f7 46 14 04 02 00 00 testl $0x204,0x14(%esi) 1108e1: 74 54 je 110937 && (the_jnode->type == IMFS_LINEAR_FILE)) { 1108e3: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 1108e7: 75 4e jne 110937 <== ALWAYS TAKEN uint32_t count = the_jnode->info.linearfile.size; 1108e9: 8b 43 50 mov 0x50(%ebx),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1108ec: 8b 53 58 mov 0x58(%ebx),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 1108ef: c7 43 4c 05 00 00 00 movl $0x5,0x4c(%ebx) <== NOT EXECUTED the_jnode->info.file.size = 0; 1108f6: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) <== NOT EXECUTED 1108fd: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 110904: c7 43 58 00 00 00 00 movl $0x0,0x58(%ebx) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 11090b: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 110912: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) <== NOT EXECUTED if ((count != 0) 110919: 85 c0 test %eax,%eax <== NOT EXECUTED 11091b: 74 1a je 110937 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 11091d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110920: 50 push %eax <== NOT EXECUTED 110921: 52 push %edx <== NOT EXECUTED 110922: 6a 00 push $0x0 <== NOT EXECUTED 110924: 6a 00 push $0x0 <== NOT EXECUTED 110926: 53 push %ebx <== NOT EXECUTED 110927: e8 7e fd ff ff call 1106aa <== NOT EXECUTED 11092c: 89 c2 mov %eax,%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 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) 11092e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 110931: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110934: 42 inc %edx <== NOT EXECUTED 110935: 74 20 je 110957 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 110937: f6 46 15 02 testb $0x2,0x15(%esi) 11093b: 74 0c je 110949 iop->offset = the_jnode->info.file.size; 11093d: 8b 43 50 mov 0x50(%ebx),%eax 110940: 8b 53 54 mov 0x54(%ebx),%edx 110943: 89 46 0c mov %eax,0xc(%esi) 110946: 89 56 10 mov %edx,0x10(%esi) iop->size = the_jnode->info.file.size; 110949: 8b 43 50 mov 0x50(%ebx),%eax 11094c: 8b 53 54 mov 0x54(%ebx),%edx 11094f: 89 46 04 mov %eax,0x4(%esi) 110952: 89 56 08 mov %edx,0x8(%esi) 110955: 31 c0 xor %eax,%eax return 0; } 110957: 8d 65 f8 lea -0x8(%ebp),%esp 11095a: 5b pop %ebx 11095b: 5e pop %esi 11095c: c9 leave 11095d: c3 ret =============================================================================== 001103e0 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 1103e0: 55 push %ebp 1103e1: 89 e5 mov %esp,%ebp 1103e3: 53 push %ebx 1103e4: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 1103e7: 8b 45 0c mov 0xc(%ebp),%eax 1103ea: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 1103ec: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 1103f0: 74 13 je 110405 <== NEVER TAKEN 1103f2: 83 ec 0c sub $0xc,%esp 1103f5: 53 push %ebx 1103f6: e8 0d aa ff ff call 10ae08 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 1103fb: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110402: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110405: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110409: 50 push %eax 11040a: 50 push %eax 11040b: 6a 00 push $0x0 11040d: 8d 45 f0 lea -0x10(%ebp),%eax 110410: 50 push %eax 110411: e8 fe 72 ff ff call 107714 110416: 8b 45 f0 mov -0x10(%ebp),%eax 110419: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 11041c: 89 1c 24 mov %ebx,(%esp) 11041f: e8 68 ff ff ff call 11038c } 110424: 8b 5d fc mov -0x4(%ebp),%ebx 110427: c9 leave 110428: c3 ret =============================================================================== 001079fc : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1079fc: 55 push %ebp 1079fd: 89 e5 mov %esp,%ebp 1079ff: 57 push %edi 107a00: 56 push %esi 107a01: 53 push %ebx 107a02: 83 ec 3c sub $0x3c,%esp 107a05: 8b 5d 08 mov 0x8(%ebp),%ebx 107a08: 8b 7d 0c mov 0xc(%ebp),%edi 107a0b: 8b 45 10 mov 0x10(%ebp),%eax 107a0e: 8b 55 14 mov 0x14(%ebp),%edx 107a11: 89 45 c0 mov %eax,-0x40(%ebp) 107a14: 89 55 c4 mov %edx,-0x3c(%ebp) int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 107a17: 89 f8 mov %edi,%eax 107a19: 25 00 f0 00 00 and $0xf000,%eax 107a1e: 3d 00 40 00 00 cmp $0x4000,%eax 107a23: 74 2b je 107a50 107a25: 77 0e ja 107a35 107a27: 3d 00 10 00 00 cmp $0x1000,%eax 107a2c: 74 22 je 107a50 107a2e: 3d 00 20 00 00 cmp $0x2000,%eax 107a33: eb 0c jmp 107a41 107a35: 3d 00 60 00 00 cmp $0x6000,%eax 107a3a: 74 14 je 107a50 107a3c: 3d 00 80 00 00 cmp $0x8000,%eax 107a41: 74 0d je 107a50 <== ALWAYS TAKEN case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 107a43: e8 78 9e 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107a48: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107a4e: eb 27 jmp 107a77 <== NOT EXECUTED } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 107a50: 51 push %ecx 107a51: 8d 75 cc lea -0x34(%ebp),%esi 107a54: 56 push %esi 107a55: 8d 45 e4 lea -0x1c(%ebp),%eax 107a58: 50 push %eax 107a59: 53 push %ebx 107a5a: e8 51 09 00 00 call 1083b0 if ( !temp_loc.ops->evalformake_h ) { 107a5f: 8b 45 d8 mov -0x28(%ebp),%eax 107a62: 8b 40 04 mov 0x4(%eax),%eax 107a65: 83 c4 10 add $0x10,%esp 107a68: 85 c0 test %eax,%eax 107a6a: 75 10 jne 107a7c <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 107a6c: e8 4f 9e 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107a71: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 107a77: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 107a7a: eb 5e jmp 107ada <== NOT EXECUTED } result = (*temp_loc.ops->evalformake_h)( 107a7c: 52 push %edx 107a7d: 8d 55 e0 lea -0x20(%ebp),%edx 107a80: 52 push %edx 107a81: 56 push %esi 107a82: 03 5d e4 add -0x1c(%ebp),%ebx 107a85: 53 push %ebx 107a86: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 107a88: 83 c4 10 add $0x10,%esp 107a8b: 83 cb ff or $0xffffffff,%ebx 107a8e: 85 c0 test %eax,%eax 107a90: 75 48 jne 107ada return -1; if ( !temp_loc.ops->mknod_h ) { 107a92: 8b 55 d8 mov -0x28(%ebp),%edx 107a95: 8b 42 14 mov 0x14(%edx),%eax 107a98: 85 c0 test %eax,%eax 107a9a: 75 12 jne 107aae <== ALWAYS TAKEN rtems_filesystem_freenode( &temp_loc ); 107a9c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 107a9f: 85 c0 test %eax,%eax <== NOT EXECUTED 107aa1: 74 c9 je 107a6c <== NOT EXECUTED 107aa3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107aa6: 56 push %esi <== NOT EXECUTED 107aa7: ff d0 call *%eax <== NOT EXECUTED 107aa9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107aac: eb be jmp 107a6c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 107aae: 83 ec 0c sub $0xc,%esp 107ab1: 56 push %esi 107ab2: ff 75 c4 pushl -0x3c(%ebp) 107ab5: ff 75 c0 pushl -0x40(%ebp) 107ab8: 57 push %edi 107ab9: ff 75 e0 pushl -0x20(%ebp) 107abc: ff d0 call *%eax 107abe: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 107ac0: 8b 45 d8 mov -0x28(%ebp),%eax 107ac3: 83 c4 20 add $0x20,%esp 107ac6: 85 c0 test %eax,%eax 107ac8: 74 10 je 107ada <== NEVER TAKEN 107aca: 8b 40 1c mov 0x1c(%eax),%eax 107acd: 85 c0 test %eax,%eax 107acf: 74 09 je 107ada 107ad1: 83 ec 0c sub $0xc,%esp 107ad4: 56 push %esi 107ad5: ff d0 call *%eax 107ad7: 83 c4 10 add $0x10,%esp return result; } 107ada: 89 d8 mov %ebx,%eax 107adc: 8d 65 f4 lea -0xc(%ebp),%esp 107adf: 5b pop %ebx 107ae0: 5e pop %esi 107ae1: 5f pop %edi 107ae2: c9 leave 107ae3: c3 ret =============================================================================== 00107b4e : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 107b4e: 55 push %ebp 107b4f: 89 e5 mov %esp,%ebp 107b51: 57 push %edi 107b52: 56 push %esi 107b53: 53 push %ebx 107b54: 83 ec 4c sub $0x4c,%esp 107b57: 8b 75 08 mov 0x8(%ebp),%esi /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 107b5a: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 107b5e: 77 15 ja 107b75 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 107b60: 83 ec 0c sub $0xc,%esp 107b63: ff 75 10 pushl 0x10(%ebp) 107b66: e8 a0 74 00 00 call 10f00b 107b6b: 89 45 b0 mov %eax,-0x50(%ebp) if ( !mount_h ) 107b6e: 83 c4 10 add $0x10,%esp 107b71: 85 c0 test %eax,%eax 107b73: 75 10 jne 107b85 rtems_set_errno_and_return_minus_one( EINVAL ); 107b75: e8 46 9d 00 00 call 1118c0 <__errno> 107b7a: c7 00 16 00 00 00 movl $0x16,(%eax) 107b80: e9 45 02 00 00 jmp 107dca { 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; 107b85: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 107b89: 0f 95 45 bb setne -0x45(%ebp) const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 107b8d: c7 45 bc b0 ef 11 00 movl $0x11efb0,-0x44(%ebp) 107b94: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107b98: 74 06 je 107ba0 107b9a: 8b 45 0c mov 0xc(%ebp),%eax 107b9d: 89 45 bc mov %eax,-0x44(%ebp) size_t filesystemtype_size = strlen( filesystemtype ) + 1; 107ba0: 83 ca ff or $0xffffffff,%edx 107ba3: 31 c0 xor %eax,%eax 107ba5: 89 d1 mov %edx,%ecx 107ba7: 8b 7d 10 mov 0x10(%ebp),%edi 107baa: f2 ae repnz scas %es:(%edi),%al 107bac: f7 d1 not %ecx 107bae: 89 4d c0 mov %ecx,-0x40(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 107bb1: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) 107bb8: 85 f6 test %esi,%esi 107bba: 74 0b je 107bc7 107bbc: 89 d1 mov %edx,%ecx 107bbe: 89 f7 mov %esi,%edi 107bc0: f2 ae repnz scas %es:(%edi),%al 107bc2: f7 d1 not %ecx 107bc4: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t target_length = strlen( target ); 107bc7: 31 c0 xor %eax,%eax 107bc9: 83 c9 ff or $0xffffffff,%ecx 107bcc: 8b 7d bc mov -0x44(%ebp),%edi 107bcf: f2 ae repnz scas %es:(%edi),%al 107bd1: f7 d1 not %ecx 107bd3: 49 dec %ecx 107bd4: 89 4d b4 mov %ecx,-0x4c(%ebp) size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 107bd7: 53 push %ebx 107bd8: 53 push %ebx 107bd9: 8b 55 c0 mov -0x40(%ebp),%edx 107bdc: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 107be0: 03 45 c4 add -0x3c(%ebp),%eax 107be3: 50 push %eax 107be4: 6a 01 push $0x1 107be6: e8 d1 f8 ff ff call 1074bc 107beb: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 107bed: 83 c4 10 add $0x10,%esp 107bf0: 85 c0 test %eax,%eax 107bf2: 74 62 je 107c56 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 107bf4: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 107bf7: 52 push %edx 107bf8: 52 push %edx 107bf9: ff 75 10 pushl 0x10(%ebp) 107bfc: 57 push %edi 107bfd: e8 32 a8 00 00 call 112434 mt_entry->type = str; 107c02: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 107c05: 03 7d c0 add -0x40(%ebp),%edi if ( source_or_null != NULL ) { 107c08: 83 c4 10 add $0x10,%esp 107c0b: 85 f6 test %esi,%esi 107c0d: 74 12 je 107c21 strcpy( str, source_or_null ); 107c0f: 50 push %eax 107c10: 50 push %eax 107c11: 56 push %esi 107c12: 57 push %edi 107c13: e8 1c a8 00 00 call 112434 mt_entry->dev = str; 107c18: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 107c1b: 03 7d c4 add -0x3c(%ebp),%edi 107c1e: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 107c21: 51 push %ecx 107c22: 51 push %ecx 107c23: ff 75 bc pushl -0x44(%ebp) 107c26: 57 push %edi 107c27: e8 08 a8 00 00 call 112434 mt_entry->target = str; 107c2c: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 107c2f: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 107c32: 8b 4d 14 mov 0x14(%ebp),%ecx 107c35: 89 4b 30 mov %ecx,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 107c38: 8d 7b 38 lea 0x38(%ebx),%edi 107c3b: be f0 ef 11 00 mov $0x11eff0,%esi 107c40: b9 0c 00 00 00 mov $0xc,%ecx 107c45: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 107c47: 83 c4 10 add $0x10,%esp 107c4a: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107c4e: 0f 84 bf 00 00 00 je 107d13 107c54: eb 10 jmp 107c66 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107c56: e8 65 9c 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107c5b: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107c61: e9 64 01 00 00 jmp 107dca <== 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( 107c66: 83 ec 0c sub $0xc,%esp 107c69: 6a 01 push $0x1 107c6b: 8d 75 d4 lea -0x2c(%ebp),%esi 107c6e: 56 push %esi 107c6f: 6a 07 push $0x7 107c71: ff 75 b4 pushl -0x4c(%ebp) 107c74: ff 75 0c pushl 0xc(%ebp) 107c77: e8 b5 f9 ff ff call 107631 107c7c: 83 c4 20 add $0x20,%esp 107c7f: 40 inc %eax 107c80: 0f 84 16 01 00 00 je 107d9c <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 107c86: 8b 45 e0 mov -0x20(%ebp),%eax 107c89: 8b 40 10 mov 0x10(%eax),%eax 107c8c: 85 c0 test %eax,%eax 107c8e: 74 61 je 107cf1 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 107c90: 83 ec 0c sub $0xc,%esp 107c93: 56 push %esi 107c94: ff d0 call *%eax 107c96: 83 c4 10 add $0x10,%esp 107c99: 48 dec %eax 107c9a: 74 10 je 107cac errno = ENOTDIR; 107c9c: e8 1f 9c 00 00 call 1118c0 <__errno> 107ca1: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 107ca7: e9 f2 00 00 00 jmp 107d9e /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 107cac: 52 push %edx 107cad: 52 push %edx 107cae: ff 75 d4 pushl -0x2c(%ebp) 107cb1: 68 e4 7a 10 00 push $0x107ae4 107cb6: e8 3a fe ff ff call 107af5 107cbb: 83 c4 10 add $0x10,%esp 107cbe: 84 c0 test %al,%al 107cc0: 74 10 je 107cd2 errno = EBUSY; 107cc2: e8 f9 9b 00 00 call 1118c0 <__errno> 107cc7: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 107ccd: e9 cc 00 00 00 jmp 107d9e * 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; 107cd2: 8b 45 d4 mov -0x2c(%ebp),%eax 107cd5: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 107cd8: 8b 45 dc mov -0x24(%ebp),%eax 107cdb: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 107cde: 8b 45 e0 mov -0x20(%ebp),%eax 107ce1: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 107ce4: 8b 55 e4 mov -0x1c(%ebp),%edx 107ce7: 89 53 18 mov %edx,0x18(%ebx) /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 107cea: 8b 40 20 mov 0x20(%eax),%eax 107ced: 85 c0 test %eax,%eax 107cef: 75 10 jne 107d01 <== ALWAYS TAKEN errno = ENOTSUP; 107cf1: e8 ca 9b 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107cf6: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107cfc: e9 9d 00 00 00 jmp 107d9e <== NOT EXECUTED } if ( loc.ops->mount_h( mt_entry ) ) { 107d01: 83 ec 0c sub $0xc,%esp 107d04: 53 push %ebx 107d05: ff d0 call *%eax 107d07: 83 c4 10 add $0x10,%esp 107d0a: 85 c0 test %eax,%eax 107d0c: 74 20 je 107d2e <== ALWAYS TAKEN 107d0e: e9 8b 00 00 00 jmp 107d9e <== NOT EXECUTED 107d13: 31 f6 xor %esi,%esi 107d15: 81 3d 54 34 12 00 58 cmpl $0x123458,0x123454 107d1c: 34 12 00 107d1f: 74 0d je 107d2e <== ALWAYS TAKEN } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 107d21: e8 9a 9b 00 00 call 1118c0 <__errno> <== NOT EXECUTED 107d26: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 107d2c: eb 70 jmp 107d9e <== NOT EXECUTED * 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 ) ) { 107d2e: 50 push %eax 107d2f: 50 push %eax 107d30: ff 75 18 pushl 0x18(%ebp) 107d33: 53 push %ebx 107d34: ff 55 b0 call *-0x50(%ebp) 107d37: 83 c4 10 add $0x10,%esp 107d3a: 85 c0 test %eax,%eax 107d3c: 74 15 je 107d53 <== ALWAYS TAKEN /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 107d3e: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 107d41: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 107d44: 85 c0 test %eax,%eax <== NOT EXECUTED 107d46: 74 56 je 107d9e <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 107d48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d4b: 53 push %ebx <== NOT EXECUTED 107d4c: ff d0 call *%eax <== NOT EXECUTED 107d4e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d51: eb 4b jmp 107d9e <== NOT EXECUTED 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 ); 107d53: 57 push %edi 107d54: 6a 00 push $0x0 107d56: 6a 00 push $0x0 107d58: ff 35 48 55 12 00 pushl 0x125548 107d5e: e8 95 28 00 00 call 10a5f8 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 107d63: 59 pop %ecx 107d64: 5e pop %esi 107d65: 53 push %ebx 107d66: 68 54 34 12 00 push $0x123454 107d6b: e8 74 30 00 00 call 10ade4 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 107d70: 5a pop %edx 107d71: ff 35 48 55 12 00 pushl 0x125548 107d77: e8 68 29 00 00 call 10a6e4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 107d7c: 83 c4 10 add $0x10,%esp 107d7f: 31 c0 xor %eax,%eax 107d81: 80 7d bb 00 cmpb $0x0,-0x45(%ebp) 107d85: 75 46 jne 107dcd rtems_filesystem_root = mt_entry->mt_fs_root; 107d87: 8b 3d 74 34 12 00 mov 0x123474,%edi 107d8d: 83 c7 18 add $0x18,%edi 107d90: 8d 73 1c lea 0x1c(%ebx),%esi 107d93: b9 05 00 00 00 mov $0x5,%ecx 107d98: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 107d9a: eb 31 jmp 107dcd 107d9c: 31 f6 xor %esi,%esi return 0; cleanup_and_bail: free( mt_entry ); 107d9e: 83 ec 0c sub $0xc,%esp 107da1: 53 push %ebx 107da2: e8 f5 f8 ff ff call 10769c if ( loc_to_free ) 107da7: 83 c4 10 add $0x10,%esp 107daa: 85 f6 test %esi,%esi 107dac: 74 1c je 107dca <== NEVER TAKEN rtems_filesystem_freenode( loc_to_free ); 107dae: 8b 46 0c mov 0xc(%esi),%eax 107db1: 85 c0 test %eax,%eax 107db3: 74 15 je 107dca <== NEVER TAKEN 107db5: 8b 40 1c mov 0x1c(%eax),%eax 107db8: 85 c0 test %eax,%eax 107dba: 74 0e je 107dca <== NEVER TAKEN 107dbc: 83 ec 0c sub $0xc,%esp 107dbf: 56 push %esi 107dc0: ff d0 call *%eax 107dc2: 83 c8 ff or $0xffffffff,%eax 107dc5: 83 c4 10 add $0x10,%esp 107dc8: eb 03 jmp 107dcd 107dca: 83 c8 ff or $0xffffffff,%eax return -1; } 107dcd: 8d 65 f4 lea -0xc(%ebp),%esp 107dd0: 5b pop %ebx 107dd1: 5e pop %esi 107dd2: 5f pop %edi 107dd3: c9 leave 107dd4: c3 ret =============================================================================== 00131e5c : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 131e5c: 55 push %ebp <== NOT EXECUTED 131e5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 131e5f: 57 push %edi <== NOT EXECUTED 131e60: 56 push %esi <== NOT EXECUTED 131e61: 53 push %ebx <== NOT EXECUTED 131e62: 81 ec cc 00 00 00 sub $0xcc,%esp <== NOT EXECUTED 131e68: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 131e6b: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 131e6e: 8b 40 34 mov 0x34(%eax),%eax <== NOT EXECUTED 131e71: 89 85 44 ff ff ff mov %eax,-0xbc(%ebp) <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 131e77: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 131e79: 89 85 40 ff ff ff mov %eax,-0xc0(%ebp) <== NOT EXECUTED fat_file_fd_t *fat_fd = NULL; 131e7f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 131e86: 66 c7 45 e6 00 00 movw $0x0,-0x1a(%ebp) <== NOT EXECUTED uint16_t date = 0; 131e8c: 66 c7 45 e4 00 00 movw $0x0,-0x1c(%ebp) <== NOT EXECUTED static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 131e92: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED dir_pos->sname.ofs = 0; 131e99: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 131ea0: c7 45 d8 ff ff ff ff movl $0xffffffff,-0x28(%ebp) <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 131ea7: c7 45 dc ff ff ff ff movl $0xffffffff,-0x24(%ebp) <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 131eae: 8d 75 b0 lea -0x50(%ebp),%esi <== NOT EXECUTED 131eb1: 31 c0 xor %eax,%eax <== NOT EXECUTED 131eb3: b9 08 00 00 00 mov $0x8,%ecx <== NOT EXECUTED 131eb8: 89 f7 mov %esi,%edi <== NOT EXECUTED 131eba: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 131ebc: 8d 95 50 ff ff ff lea -0xb0(%ebp),%edx <== NOT EXECUTED 131ec2: b1 10 mov $0x10,%cl <== NOT EXECUTED 131ec4: 89 d7 mov %edx,%edi <== NOT EXECUTED 131ec6: f3 ab rep stos %eax,%es:(%edi) <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 131ec8: 6a 0b push $0xb <== NOT EXECUTED 131eca: 56 push %esi <== NOT EXECUTED 131ecb: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 131ece: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 131ed1: e8 14 1b 00 00 call 1339ea <== NOT EXECUTED 131ed6: 89 85 3c ff ff ff mov %eax,-0xc4(%ebp) <== NOT EXECUTED MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 131edc: c6 45 bc 00 movb $0x0,-0x44(%ebp) <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 131ee0: c7 04 24 00 00 00 00 movl $0x0,(%esp) <== NOT EXECUTED 131ee7: e8 44 5b 01 00 call 147a30